Commit be97c4e20f664c939577a7f85b567dd6f0394d33

Authored by Edmar Moretti
1 parent e5f68ac7

--no commit message

classesjs/classe_barradebotoes.js
... ... @@ -684,9 +684,11 @@ i3GEO.barraDeBotoes = {
684 684 if(botao.tipo === "dinamico" && x){
685 685 i3GEO.util.criaPin("i3geoMarcaIcone",i3GEO.configura.locaplic+"/imagens/gisicons/eudock/sobe1.png","10px","10px");
686 686 temp = $i("i3geoMarcaIcone");
687   - temp.style.display = "block"
688   - temp.style.top = posY + 43;//(parseInt(y / n,10) * n) + 40;
689   - temp.style.left = posX + 18;//(parseInt(x / n,10) * n) + 6;
  687 + if(temp){
  688 + temp.style.display = "block";
  689 + temp.style.top = posY + 43;//(parseInt(y / n,10) * n) + 40;
  690 + temp.style.left = posX + 18;//(parseInt(x / n,10) * n) + 6;
  691 + }
690 692 }
691 693 if(botao.funcaoonclick){
692 694 botao.funcaoonclick.call();
... ... @@ -775,6 +777,8 @@ i3GEO.barraDeBotoes = {
775 777 n = chaves.length,
776 778 nb = euEnv.euDockArray.euDock_0.iconsArray.length,
777 779 i;
  780 + if($i("i3geoMarcaIcone"))
  781 + {$i("i3geoMarcaIcone").style.display = "none";}
778 782 if(i3GEO.barraDeBotoes.MAXBOTOES > 0 && n > nb){
779 783 for(i=nb;i<n;i+=1){
780 784 if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]] && i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]] === true){
... ... @@ -1183,7 +1187,8 @@ i3GEO.barraDeBotoes = {
1183 1187 document.body.removeChild($i("euDock_0_bar").parentNode);
1184 1188 }
1185 1189 i3GEO.barraDeBotoes.inicializaBarra();
1186   - $i("i3geoMarcaIcone").style.display = "none";
  1190 + if($i("i3geoMarcaIcone"))
  1191 + {$i("i3geoMarcaIcone").style.display = "none";}
1187 1192 return;
1188 1193 }
1189 1194  
... ...
classesjs/classe_configura.js
... ... @@ -639,8 +639,17 @@ i3GEO.configura = {
639 639 tipo:"dinamico",
640 640 dica:$trad("d3"),
641 641 funcaoonclick:function(){
642   - if(i3GEO.Interface.ATUAL === "googlemaps")
643   - {alert("Pressione a tecla CTRL junto com o botão esquerdo do mouse");return;}
  642 + if(i3GEO.Interface.ATUAL === "googlemaps"){
  643 + //alert("Pressione a tecla CTRL junto com o botão esquerdo do mouse");
  644 + i3GEO.janela.mensagemSimples("Pressione a tecla CTRL junto com o botão esquerdo do mouse e arraste para definir a área de zoom","?");
  645 + g_tipoacao='pan';
  646 + g_operacao='navega';
  647 + i3GEO.barraDeBotoes.ativaIcone("pan");
  648 + i3GEO.barraDeBotoes.BOTAOPADRAO = "pan";
  649 + i3GeoMap.setOptions({draggable:true});
  650 + i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pan",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic);
  651 + return;
  652 + }
644 653 var temp;
645 654 temp = "zoom";
646 655 if(i3GEO.Interface.ATIVAMENUCONTEXTO && i3GEO.Interface.ATUAL === "padrao")
... ...
classesjs/classe_interface.js
... ... @@ -850,6 +850,7 @@ i3GEO.Interface = {
850 850 //é necessário ativar nesse momento pois a barra de botoes já foi criada
851 851 if(i3GEO.Interface.TABLET === false)
852 852 {i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLpan);}
  853 + i3GEO.Interface.ativaBotoes();
853 854 };
854 855 i3GEO.arvoreDeCamadas.ATIVATEMA = "i3GEO.Interface.openlayers.ligaDesliga(this);i3GEO.eventos.executaEventos(i3GEO.eventos.ATUALIZAARVORECAMADAS);";
855 856 i3GEO.util.multiStep([
... ... @@ -860,8 +861,7 @@ i3GEO.Interface = {
860 861 i3GEO.idioma.mostraSeletor,
861 862 i3GEO.gadgets.mostraEscalaNumerica,
862 863 i3GEO.util.arvore,
863   - i3GEO.gadgets.mostraMenuLista,
864   - i3GEO.Interface.ativaBotoes
  864 + i3GEO.gadgets.mostraMenuLista
865 865 ],[
866 866 null,
867 867 null,
... ... @@ -870,7 +870,6 @@ i3GEO.Interface = {
870 870 null,
871 871 null,
872 872 ["<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa],
873   - null,
874 873 null
875 874 ],
876 875 function(){}
... ...
classesjs/compactados/classe_barradebotoes_compacto.js
1   -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.barraDeBotoes={TIPO:"yui",OFFSET:-205,AJUDA:true,ORIENTACAO:"vertical",HORIZONTALW:350,TIPOAJUDA:"balao",SOICONES:false,AUTOALTURA:false,TRANSICAOSUAVE:true,OPACIDADE:65,PERMITEFECHAR:true,PERMITEDESLOCAR:true,ATIVAMENUCONTEXTO:false,AUTO:false,LISTABOTOES:i3GEO.configura.funcoesBotoes.botoes,INCLUIBOTAO:{zoomli:true,pan:true,zoomtot:true,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},ICONEBOTAO:{zoomli:"/imagens/gisicons/eudock/zoom-region.png",pan:"/imagens/gisicons/eudock/pan.png",zoomtot:"/imagens/gisicons/eudock/zoom-extent.png",identifica:"/imagens/gisicons/eudock/identify.png",identificaBalao:"/imagens/gisicons/eudock/tips.png",mede:"/imagens/gisicons/eudock/length-measure.png",area:"/imagens/gisicons/eudock/area-measure.png",imprimir:"/imagens/gisicons/eudock/print.png",reinicia:"/imagens/gisicons/eudock/redraw.png",exten:"/imagens/gisicons/eudock/map-extent-info.png",referencia:"/imagens/gisicons/eudock/map-reference.png",inserexy:"/imagens/gisicons/eudock/point-create.png",textofid:"/imagens/gisicons/eudock/text-add.png",selecao:"/imagens/gisicons/eudock/select.png",google:"/imagens/gisicons/eudock/google-map.png",buscafotos:"/imagens/gisicons/eudock/fotos.png",wiki:"/imagens/gisicons/eudock/wiki.png",metar:"/imagens/gisicons/eudock/metar.png",lentei:"/imagens/gisicons/eudock/lente.png",confluence:"/imagens/gisicons/eudock/confluence.png",inseregrafico:"/imagens/gisicons/eudock/grafico.png",v3d:"/imagens/gisicons/eudock/v3d.png"},TEMPLATEBOTAO:"",BOTAOPADRAO:"pan",COMPORTAMENTO:"padrao",BARRAS:[],BOTAOCLICADO:"",ativaPadrao:function(){try{$i(i3GEO.barraDeBotoes.BOTAOPADRAO).onclick.apply()}catch(e){}},ativaIcone:function(icone){if(i3GEO.Interface.ATUAL==="openlayers"){try{i3GEO.Interface.openlayers.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"}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(e){i3GEO.barraDeBotoes.mostraJanela(this,"'+l[b].dica+'",e);}');eval('$i("'+l[b].iddiv+'").onmouseout = function(e){i3GEO.barraDeBotoes.mostraJanela(this,"",e);};')}if(l[b].funcaoonclick){temp.onclick=l[b].funcaoonclick;if(l[b].iddiv==padrao){l[b].funcaoonclick()}}if(l[b].constroiconteudo){eval(l[b].constroiconteudo)}}YAHOO.util.Event.addListener($i(l[b].iddiv),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addListener($i(l[b].iddiv),"click",YAHOO.util.Event.stopPropagation);YAHOO.util.Event.addFocusListener($i(l[b].iddiv),YAHOO.util.Event.preventDefault)}while(b--)}if(padrao===""){this.ativaIcone("")}},execBotao:function(id,x,y){var l,b,d,temp,n=38;i3GEO.barraDeBotoes.BOTAOCLICADO=id;l=i3GEO.barraDeBotoes.LISTABOTOES;b=l.length-1;if(b>=0){do{temp=l[b].iddiv;if(temp===id){try{if(l[b].tipo==="dinamico"){i3GEO.util.criaPin("i3geoMarcaIcone",i3GEO.configura.locaplic+"/imagens/gisicons/eudock/sobe1.png","10px","10px");temp=$i("i3geoMarcaIcone");temp.style.display="block"temp.style.top=(parseInt(y/n,10)*n)+40;temp.style.left=(parseInt(x/n,10)*n)+25}if(l[b].funcaoonclick){l[b].funcaoonclick.call();return}}catch(e){}}}while(b--)}},inicializaBarraOP:function(){euEnv.imageBasePath=i3GEO.configura.locaplic+"/pacotes/eudock/";var i,dock=new euDock(),temp="",chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length;dock.setObjectAlign(i3GEO.Interface.IDCORPO,euDOWN,(parseInt(document.body.style.height,10))*-1+i3GEO.barraDeBotoes.OFFSET,euUP);dock.setBar({left:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-l.png"}},horizontal:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-c-o.gif"}},right:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-r.png"}}});dock.setIconsOffset(5);for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]}}),{mouseInsideClick:function(x,y,id){i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao,x,y)},idBotao:chaves[i]})}}},inicializaBarra:function(idconteudo,idconteudonovo,barraZoom,x,y,onde){if(i3GEO.configura.map3d===""){i3GEO.barraDeBotoes.INCLUIBOTAO.v3d=false}if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){i3GEO.barraDeBotoes.inicializaBarraOP()}else{if(this.TEMPLATEBOTAO===""&&i3GEO.Interface.TABLET===false){this.TEMPLATEBOTAO="<div style='display:inline;background-color:rgb(250,250,250);'><img style='border:0px solid white;' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='$$'/></div>"}if(this.TEMPLATEBOTAO===""&&i3GEO.Interface.TABLET===true){this.TEMPLATEBOTAO="<div style='display:inline;background-color:rgb(250,250,250);'><img style='margin:4px;border:0px solid white;' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='$$'/></div>"}var ticone,tipo,mostra,i,temp,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(navm){i3GEO.barraDeBotoes.TRANSICAOSUAVE=false}if(this.AUTO===true){if(idconteudo==="barraDeBotoes1"){novoel=document.createElement("div");novoel.id="barraDeBotoes1";temp='<table style="width:100%"><tr><td style="background-color:rgb(250,250,250);"><div ID="historicozoom" ></div></td></tr><tr><td style=height:5px ></td></tr></table>'+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="zoom" alt="zoom" src="'+branco+'" id="zoomli"/>'+"</div>"+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="desloca" alt="desloca" src="'+branco+'" id="pan"/>'+"</div>"+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="geral" alt="geral" src="'+branco+'" id="zoomtot"/>'+"</div>";novoel.innerHTML=temp;document.body.appendChild(novoel)}if(idconteudo==="barraDeBotoes2"){temp="";chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO);n=chaves.length;for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){temp+=i3GEO.barraDeBotoes.TEMPLATEBOTAO.replace("$$",chaves[i])}}if(typeof(onde)==='undefined'){novoel=document.createElement("div");novoel.id="barraDeBotoes2";estilo="font-size:2px;";if(this.SOICONES===true){estilo="font-size:0px;"}novoel.innerHTML="<table style='width:100%'>"+"<tr><td style='background-color:rgb(250,250,250);'><img title='' alt='sobe' src='"+branco+"' id='sobeferramentas'/></td></tr>"+"</table>"+temp+"<table style='width:100%;'><tr><td style='background-color:rgb(250,250,250);'><img title='desce' alt='' src='"+branco+"' id='desceferramentas'/></td></tr></table>";document.body.appendChild(novoel)}else{$i(onde).innerHTML=temp;return}}}else{if(idconteudo==="barraDeBotoes2"&&onde!==undefined){$i(onde).innerHTML=$i(idconteudo)}}wj="36px";recuo="0px";novoel=document.createElement("div");novoel.id=idconteudonovo;novoel.style.display="block";if(this.SOICONES===false){novoel.style.border="1px solid gray";novoel.style.background="white"}else{novoel.style.border="0px solid white"}if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){Dom.setStyle(novoel,"opacity",this.OPACIDADE/100)}temp="";if(barraZoom===true){temp+=i3GEO.navega.barraDeZoom.cria()}temp+='<div id="'+idconteudonovo+'_" style="left:'+recuo+';top:0px;" ></div>';novoel.innerHTML=temp;novoel.onmouseover=function(){YAHOO.util.Dom.setStyle("i3geo_rosa","display","none");if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",1)}if(i3GEO.Interface.TABLET===true){}};novoel.onmouseout=function(){if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.barraDeBotoes.OPACIDADE/100)}if(i3GEO.Interface.TABLET===true){}};document.body.appendChild(novoel);if(this.ATIVAMENUCONTEXTO){i3GEO.util.mudaCursor(i3GEO.configura.cursores,"contexto",idconteudonovo,i3GEO.configura.locaplic)}ticone=28;alturadisponivel=i3GEO.parametros.h-i3GEO.Interface.BARRABOTOESTOP-ticone-38-38;if(this.AUTOALTURA===true){alturadisponivel+=28}numerobotoes=parseInt(alturadisponivel/ticone,10);if($i(idconteudo)){$i(idconteudonovo+"_").innerHTML=$i(idconteudo).innerHTML;$i(idconteudo).innerHTML="";elementos=$i(idconteudonovo+"_").getElementsByTagName("img");nelementos=elementos.length;if(i3GEO.barraDeBotoes.ORIENTACAO==="horizontal"){numerobotoes=100}if(this.AUTOALTURA===true||(numerobotoes<nelementos)){if(elementos[0].id==="sobeferramentas"){try{elementos=$i(idconteudonovo+"_").getElementsByTagName("div");nelementos=elementos.length;i=0;do{elementos[i].style.display="none";i=i+1}while(i<nelementos);i=0;do{if(elementos[i]!=undefined){elementos[i].style.display="inline"}i=i+1}while(i<numerobotoes-1)}catch(men){}}}if(elementos.length<=numerobotoes){Dom.setStyle(["sobeferramentas","desceferramentas"],"display","none")}}YAHOO.namespace("janelaBotoes.xp");if(i3GEO.barraDeBotoes.ORIENTACAO==="horizontal"){YAHOO.janelaBotoes.xp.panel=new YAHOO.widget.Panel(idconteudonovo,{zIndex:20000,height:40,width:i3GEO.barraDeBotoes.HORIZONTALW,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}else{if(this.AUTOALTURA===false||barraZoom===true||(elementos.length>numerobotoes)){YAHOO.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<nelementos);mostra.style.display="inline";i=nelementos+1;mostra=elementos[i];do{if(elementos[i]){if(elementos[i].style){if(elementos[i].style.display==="inline"){mostra=elementos[i];break}}}i=i-1}while(i>=0);mostra.style.display="none"}}}if($i("desceferramentas")){$i("desceferramentas").onclick=function(){tipo="inline";if($i(idconteudonovo+"_")){elementos=$i(idconteudonovo+"_").getElementsByTagName("div");if(elementos[elementos.length-1].style.display===tipo){return}nelementos=elementos.length;if(nelementos>0){i=0;do{e=elementos[i];if(e.style){if((e.style.display==="block")||(e.style.display==="inline")||(e.style.display==="")){if(e.id===""){e.style.display="none";break}}}i=i+1}while(i<nelementos);i=nelementos-1;var mostra=elementos[i];do{e=elementos[i];if(e.style){if(e.style.display===tipo){break}if(e.style.display==="none"){mostra=e}}i=i-1}while(i>=0);mostra.style.display=tipo}}}}this.BARRAS.push(YAHOO.janelaBotoes.xp.panel);YAHOO.janelaBotoes.xp.panel.show();if(i3GEO.Interface.TABLET===true){YAHOO.janelaBotoes.xp.panel.moveTo((i3GEO.parametros.w/2)-(i3GEO.barraDeBotoes.HORIZONTALW/2),"")}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:"&nbsp;<span class='container-close'></span>"},{text:"Fechar barra",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.fecha('"+idbarra+"')"}},{text:"Barra normal",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.AUTOALTURA=false;i3GEO.barraDeBotoes.PERMITEFECHAR=true;i3GEO.barraDeBotoes.PERMITEDESLOCAR=true;i3GEO.barraDeBotoes.recria('"+idbarra+"')"}},{text:"Barra fixa",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.AUTOALTURA=true;i3GEO.barraDeBotoes.PERMITEFECHAR=false;i3GEO.barraDeBotoes.PERMITEDESLOCAR=false;i3GEO.barraDeBotoes.recria('"+idbarra+"')"}},{text:"Remove transiçã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;i<n;i+=1){i3GEO.barraDeBotoes.BARRAS[i].show()}};try{if(arguments.length===1){i3GEO.barraDeBotoes.BARRAS[indice].show()}else{abre.call()}}catch(e){abre.call()}},recria:function(id){var n,temp,novoel,barraZoom,x,y,BARRAS=i3GEO.barraDeBotoes.BARRAS,iu=i3GEO.util;i3GEO.barraDeBotoes.BARRAS=[];n=BARRAS.length;for(i=0;i<n;i+=1){if(BARRAS[i].id===id){iu.removeChild("contexto_"+id);if(!$i("barraTemporaria"+i)){novoel=document.createElement("div");novoel.id="barraTemporaria"+i;document.body.appendChild(novoel)}novoel=$i("barraTemporaria"+i);novoel.innerHTML=$i(BARRAS[i].id+"_").innerHTML;barraZoom=false;temp=$i("vertMaisZoom");if(temp){temp=navm?temp.parentNode:temp.parentNode.parentNode;if(temp.id===id){barraZoom=true}}x=parseInt($i(BARRAS[i].id+"_c").style.left,10);y=parseInt($i(BARRAS[i].id+"_c").style.top,10);if(i3GEO.barraDeBotoes.PERMITEFECHAR===true){y=y-10}BARRAS[i].destroy();i3GEO.barraDeBotoes.inicializaBarra(novoel.id,BARRAS[i].id,barraZoom,x,y)}}i3GEO.barraDeBotoes.ativaBotoes()},fecha:function(id){var n=this.BARRAS.length;for(i=0;i<n;i+=1){if(this.BARRAS[i].id===id){$i(id+"_c").style.visibility="hidden"}}},mostraJanela:function(objeto,mensagem,evt){if(mensagem===""){try{clearTimeout(timeMostraAjudaBotoes)}catch(e){};return}var divmensagem=$i("divMensagemBarraDeBotoes"),balloonAjuda,pos=YAHOO.util.Dom.getXY(objeto);if(this.AJUDA===false||$i("janelaMenTexto")){i3GEO.ajuda.mostraJanela(mensagem);i3GEO.barraDeBotoes.escondeJanelaAjuda();return}if(i3GEO.Interface.ATUAL==="googleearth"){objeto.title=mensagem;return}if(!divmensagem&&this.TIPOAJUDA!=="balao"){divmensagem=document.createElement("div");divmensagem.id="divMensagemBarraDeBotoes";divmensagem.style.border="0px solid rgb(120 120 120)";divmensagem.style.position="absolute";divmensagem.style.zIndex=20000;if($i("i3geo")){$i("i3geo").appendChild(divmensagem)}else{document.body.appendChild(divmensagem)}if(this.TIPOAJUDA==="horizontal"){divmensagem.innerHTML="<table style='z-index:20000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='"+$im("left.png")+"' ></td><td style='text-align:left;border-left:1px solid rgb(210,210,210)'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'></div></td></tr></table>"}if(this.TIPOAJUDA==="vertical"){divmensagem.innerHTML="<table style='z-index:20000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='"+$im("top.png")+"' ></td><td style='text-align:left;border-left:1px solid rgb(210,210,210)'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'></div></td></tr></table>"}}if(mensagem!==""){if(this.TIPOAJUDA!=="balao"){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none");if(this.TIPOAJUDA==="horizontal"){divmensagem.style.left=parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)+pos[0]+10+"px";divmensagem.style.top=pos[1]-2+(parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)/2)+"px"}if(this.TIPOAJUDA==="vertical"){divmensagem.style.left=(parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)/2)+pos[0]-5+"px";divmensagem.style.top=pos[1]+5+parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)+"px"}try{clearTimeout(timeAjudaBotoes)}catch(e){}timeMostraAjudaBotoes=setTimeout("i3GEO.barraDeBotoes.mostraJanelaAjuda('"+mensagem+"');",5000)}else{hideAllTooltips();balloonAjuda=new Balloon();BalloonConfig(balloonAjuda,'GBubble');balloonAjuda.delayTime=0;balloonAjuda.stem=false;balloonAjuda.stemHeight=0;balloonAjuda.vOffset=-24;balloonAjuda.images=i3GEO.configura.locaplic+'/pacotes/balloon-tooltips/htdocs/images/GBubblec';mensagem="<table style='z-index:20000' ><tr><td style='text-align:left;'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'>"+mensagem+"</div></td></tr></table>";try{clearTimeout(timeAjudaBotoes)}catch(e){}timeMostraAjudaBotoes=setTimeout(function(){balloonAjuda.cleanup();balloonIsVisible=false;balloonAjuda.showTooltip(objeto,mensagem,null,null,null,pos[0]+12,pos[1]);try{clearTimeout(timeMostraAjudaBotoes)}catch(e){}timeAjudaBotoes=setTimeout(function(){balloonAjuda.cleanup()},4000)},4000)}}},mostraJanelaAjuda:function(mensagem){$i("divMensagemBarraDeBotoesCorpo").innerHTML=mensagem;YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","block");try{clearTimeout(timeMostraAjudaBotoes)}catch(e){}timeAjudaBotoes=setTimeout(function(){i3GEO.barraDeBotoes.escondeJanelaAjuda()},3000)},escondeJanelaAjuda:function(){try{clearTimeout(timeAjudaBotoes)}catch(e){}if($i("divMensagemBarraDeBotoes")){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none")}},editor:{inicia:function(){if(navm){alert("O editor não funciona corretamente nesse navegador.")}i3GEO.barraDeBotoes.editor.carregaJs()},carregaJs:function(idjanela){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/mashups/openlayers.js.php","i3GEO.barraDeBotoes.editor.ativaPainel('"+idjanela+"')","openlayers.js.php",true)},criaJanela:function(){if($i("i3GEOjanelaEditor")){return"i3GEOjanelaEditor"}var janela,divid,temp,titulo,cabecalho,minimiza;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOjanelaEditor")};titulo="Editor vetorial";janela=i3GEO.janela.cria("300px","200px","","","",titulo,"i3GEOjanelaEditor",false,"hd",cabecalho,minimiza);divid=janela[2].id;$i("i3GEOjanelaEditor_corpo").style.backgroundColor="white";$i("i3GEOjanelaEditor_corpo").style.textAlign="left";return divid},ativaPainel:function(idjanela){OpenLayers.ImgPath=i3GEO.configura.locaplic+"/pacotes/openlayers/img/";i3GEO.editorOL.fundo="";i3GEO.editorOL.mapa=i3geoOL;i3GEO.editorOL.maxext="";i3GEO.editorOL.controles=[];i3GEO.editorOL.botoes={'pan':false,'zoombox':false,'zoomtot':false,'legenda':false,'distancia':false,'area':false,'identifica':true,'linha':true,'ponto':true,'poligono':true,'texto':true,'edita':true,'selecao':true,'apaga':true,'procura':false,'propriedades':true,'salva':true,'ajuda':true,'fecha':true,'tools':true,'undo':true,'frente':true};var sketchSymbolizers={"Point":{fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}",strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",label:"${texto}",pointRadius:"${pointRadius}",graphicName:"${graphicName}",fontSize:"${fontSize}",fontColor:"rgb(${fontColor})",fontFamily:"Arial",fontWeight:"normal",labelAlign:"lb",labelXOffset:"3",labelYOffset:"3"},"Line":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})"},"Polygon":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}"}},style=new OpenLayers.Style(),styleMap1=new OpenLayers.StyleMap({"default":style});style.addRules([new OpenLayers.Rule({symbolizer:sketchSymbolizers})]);i3GEO.editorOL.layergrafico=new OpenLayers.Layer.Vector("Edição",{styleMap:styleMap1,displayInLayerSwitcher:false,visibility:true});i3GEO.editorOL.mapa.addLayers([i3GEO.editorOL.layergrafico]);i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}}};
2 1 \ No newline at end of file
  2 +if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.barraDeBotoes={TIPO:"yui",OFFSET:-205,MAXBOTOES:10,AJUDA:true,ORIENTACAO:"vertical",HORIZONTALW:350,TIPOAJUDA:"balao",SOICONES:false,AUTOALTURA:false,TRANSICAOSUAVE:true,OPACIDADE:65,PERMITEFECHAR:true,PERMITEDESLOCAR:true,ATIVAMENUCONTEXTO:false,AUTO:false,LISTABOTOES:i3GEO.configura.funcoesBotoes.botoes,INCLUIBOTAO:{zoomli:true,pan:true,zoomtot:true,identifica:true,identificaBalao:true,mede:true,area:true,imprimir:true,selecao:true,google:true,referencia:true,exten:true,inserexy:true,textofid:true,reinicia:true,buscafotos:true,wiki:true,metar:true,lentei:true,confluence:true,inseregrafico:true,v3d:true},ICONEBOTAO:{zoomli:"/imagens/gisicons/eudock/zoom-region.png",pan:"/imagens/gisicons/eudock/pan.png",zoomtot:"/imagens/gisicons/eudock/zoom-extent.png",identifica:"/imagens/gisicons/eudock/identify.png",identificaBalao:"/imagens/gisicons/eudock/tips.png",mede:"/imagens/gisicons/eudock/length-measure.png",area:"/imagens/gisicons/eudock/area-measure.png",imprimir:"/imagens/gisicons/eudock/print.png",reinicia:"/imagens/gisicons/eudock/redraw.png",exten:"/imagens/gisicons/eudock/map-extent-info.png",referencia:"/imagens/gisicons/eudock/map-reference.png",inserexy:"/imagens/gisicons/eudock/point-create.png",textofid:"/imagens/gisicons/eudock/text-add.png",selecao:"/imagens/gisicons/eudock/select.png",google:"/imagens/gisicons/eudock/google-map.png",buscafotos:"/imagens/gisicons/eudock/fotos.png",wiki:"/imagens/gisicons/eudock/wiki.png",metar:"/imagens/gisicons/eudock/metar.png",lentei:"/imagens/gisicons/eudock/lente.png",confluence:"/imagens/gisicons/eudock/confluence.png",inseregrafico:"/imagens/gisicons/eudock/grafico.png",v3d:"/imagens/gisicons/eudock/v3d.png"},TEMPLATEBOTAO:"",BOTAOPADRAO:"pan",COMPORTAMENTO:"padrao",BARRAS:[],BOTAOCLICADO:"",ativaPadrao:function(){try{$i(i3GEO.barraDeBotoes.BOTAOPADRAO).onclick.apply()}catch(e){}},ativaIcone:function(icone){if(i3GEO.Interface.ATUAL==="openlayers"){try{i3GEO.Interface.openlayers.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"}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(e){i3GEO.barraDeBotoes.mostraJanela(this,"'+l[b].dica+'",e);}');eval('$i("'+l[b].iddiv+'").onmouseout = function(e){i3GEO.barraDeBotoes.mostraJanela(this,"",e);};')}if(l[b].funcaoonclick){temp.onclick=l[b].funcaoonclick;if(l[b].iddiv==padrao){l[b].funcaoonclick()}}if(l[b].constroiconteudo){eval(l[b].constroiconteudo)}}YAHOO.util.Event.addListener($i(l[b].iddiv),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addListener($i(l[b].iddiv),"click",YAHOO.util.Event.stopPropagation);YAHOO.util.Event.addFocusListener($i(l[b].iddiv),YAHOO.util.Event.preventDefault)}while(b--)}if(padrao===""){this.ativaIcone("")}},execBotao:function(id,x,y,posX,posY){var temp,n=38,botao=i3GEO.barraDeBotoes.defBotao(id);i3GEO.barraDeBotoes.BOTAOCLICADO=id;if(botao===false){return}try{if(botao.tipo==="dinamico"&&x){i3GEO.util.criaPin("i3geoMarcaIcone",i3GEO.configura.locaplic+"/imagens/gisicons/eudock/sobe1.png","10px","10px");temp=$i("i3geoMarcaIcone");if(temp){temp.style.display="block";temp.style.top=posY+43;temp.style.left=posX+18}}if(botao.funcaoonclick){botao.funcaoonclick.call()}}catch(e){}},defBotao:function(iddiv){var l,b,d,temp;l=i3GEO.barraDeBotoes.LISTABOTOES;b=l.length-1;if(b>=0){do{temp=l[b].iddiv;if(l[b].iddiv===iddiv){return l[b]}}while(b--)}return false},inicializaBarraOP:function(){i3GEO.barraDeBotoes.AJUDA=false;euEnv.imageBasePath=i3GEO.configura.locaplic+"/pacotes/eudock/";var botao,i,dock=new euDock(),temp="",chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length;dock.setObjectAlign(i3GEO.Interface.IDCORPO,euDOWN,(parseInt(document.body.style.height,10))*-1+i3GEO.barraDeBotoes.OFFSET,euUP);dock.setBar({left:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-l.png"}},horizontal:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-c-o.gif"}},right:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-r.png"}}});dock.setIconsOffset(7);if(i3GEO.barraDeBotoes.MAXBOTOES>0){n=i3GEO.barraDeBotoes.MAXBOTOES}for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]&&i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){botao=i3GEO.barraDeBotoes.defBotao(chaves[i]);if(botao===false){temp=""}else{if(botao.dica){temp=botao.dica}else{temp=""}}dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]}}),{mouseInsideClick:function(x,y,id,posX,posY){i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao,x,y,posX,posY)},idBotao:chaves[i],dica:temp})}}$i(euEnv.euDockArray.euDock_0.bar.elementsArray.left.id).onclick=function(){i3GEO.ajuda.abreJanela()};$i(euEnv.euDockArray.euDock_0.bar.elementsArray.right.id).onclick=function(){var temp="",chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length,nb=euEnv.euDockArray.euDock_0.iconsArray.length,i;if($i("i3geoMarcaIcone")){$i("i3geoMarcaIcone").style.display="none"}if(i3GEO.barraDeBotoes.MAXBOTOES>0&&n>nb){for(i=nb;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]&&i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){botao=i3GEO.barraDeBotoes.defBotao(chaves[i]);if(botao===false){temp=""}else{if(botao.dica){temp=botao.dica}else{temp=""}}dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]}}),{mouseInsideClick:function(x,y,id,posX){i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao,x,y,posX)},idBotao:chaves[i],dica:temp})}}}}},inicializaBarra:function(idconteudo,idconteudonovo,barraZoom,x,y,onde){if(i3GEO.configura.map3d===""){i3GEO.barraDeBotoes.INCLUIBOTAO.v3d=false}if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){i3GEO.barraDeBotoes.inicializaBarraOP()}else{if(this.TEMPLATEBOTAO===""&&i3GEO.Interface.TABLET===false){this.TEMPLATEBOTAO="<div style='display:inline;background-color:rgb(250,250,250);'><img style='border:0px solid white;' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='$$'/></div>"}if(this.TEMPLATEBOTAO===""&&i3GEO.Interface.TABLET===true){this.TEMPLATEBOTAO="<div style='display:inline;background-color:rgb(250,250,250);'><img style='margin:4px;border:0px solid white;' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='$$'/></div>"}var ticone,tipo,mostra,i,temp,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(navm){i3GEO.barraDeBotoes.TRANSICAOSUAVE=false}if(this.AUTO===true){if(idconteudo==="barraDeBotoes1"){novoel=document.createElement("div");novoel.id="barraDeBotoes1";temp='<table style="width:100%"><tr><td style="background-color:rgb(250,250,250);"><div ID="historicozoom" ></div></td></tr><tr><td style=height:5px ></td></tr></table>'+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="zoom" alt="zoom" src="'+branco+'" id="zoomli"/>'+"</div>"+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="desloca" alt="desloca" src="'+branco+'" id="pan"/>'+"</div>"+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="geral" alt="geral" src="'+branco+'" id="zoomtot"/>'+"</div>";novoel.innerHTML=temp;document.body.appendChild(novoel)}if(idconteudo==="barraDeBotoes2"){temp="";chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO);n=chaves.length;for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){temp+=i3GEO.barraDeBotoes.TEMPLATEBOTAO.replace("$$",chaves[i])}}if(typeof(onde)==='undefined'){novoel=document.createElement("div");novoel.id="barraDeBotoes2";estilo="font-size:2px;";if(this.SOICONES===true){estilo="font-size:0px;"}novoel.innerHTML="<table style='width:100%'>"+"<tr><td style='background-color:rgb(250,250,250);'><img title='' alt='sobe' src='"+branco+"' id='sobeferramentas'/></td></tr>"+"</table>"+temp+"<table style='width:100%;'><tr><td style='background-color:rgb(250,250,250);'><img title='desce' alt='' src='"+branco+"' id='desceferramentas'/></td></tr></table>";document.body.appendChild(novoel)}else{$i(onde).innerHTML=temp;return}}}else{if(idconteudo==="barraDeBotoes2"&&onde!==undefined){$i(onde).innerHTML=$i(idconteudo)}}wj="36px";recuo="0px";novoel=document.createElement("div");novoel.id=idconteudonovo;novoel.style.display="block";if(this.SOICONES===false){novoel.style.border="1px solid gray";novoel.style.background="white"}else{novoel.style.border="0px solid white"}if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){Dom.setStyle(novoel,"opacity",this.OPACIDADE/100)}temp="";if(barraZoom===true){temp+=i3GEO.navega.barraDeZoom.cria()}temp+='<div id="'+idconteudonovo+'_" style="left:'+recuo+';top:0px;" ></div>';novoel.innerHTML=temp;novoel.onmouseover=function(){YAHOO.util.Dom.setStyle("i3geo_rosa","display","none");if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",1)}if(i3GEO.Interface.TABLET===true){}};novoel.onmouseout=function(){if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.barraDeBotoes.OPACIDADE/100)}if(i3GEO.Interface.TABLET===true){}};document.body.appendChild(novoel);if(this.ATIVAMENUCONTEXTO){i3GEO.util.mudaCursor(i3GEO.configura.cursores,"contexto",idconteudonovo,i3GEO.configura.locaplic)}ticone=28;alturadisponivel=i3GEO.parametros.h-i3GEO.Interface.BARRABOTOESTOP-ticone-38-38;if(this.AUTOALTURA===true){alturadisponivel+=28}numerobotoes=parseInt(alturadisponivel/ticone,10);if($i(idconteudo)){$i(idconteudonovo+"_").innerHTML=$i(idconteudo).innerHTML;$i(idconteudo).innerHTML="";elementos=$i(idconteudonovo+"_").getElementsByTagName("img");nelementos=elementos.length;if(i3GEO.barraDeBotoes.ORIENTACAO==="horizontal"){numerobotoes=100}if(this.AUTOALTURA===true||(numerobotoes<nelementos)){if(elementos[0].id==="sobeferramentas"){try{elementos=$i(idconteudonovo+"_").getElementsByTagName("div");nelementos=elementos.length;i=0;do{elementos[i].style.display="none";i=i+1}while(i<nelementos);i=0;do{if(elementos[i]!=undefined){elementos[i].style.display="inline"}i=i+1}while(i<numerobotoes-1)}catch(men){}}}if(elementos.length<=numerobotoes){Dom.setStyle(["sobeferramentas","desceferramentas"],"display","none")}}YAHOO.namespace("janelaBotoes.xp");if(i3GEO.barraDeBotoes.ORIENTACAO==="horizontal"){YAHOO.janelaBotoes.xp.panel=new YAHOO.widget.Panel(idconteudonovo,{zIndex:20000,height:40,width:i3GEO.barraDeBotoes.HORIZONTALW,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}else{if(this.AUTOALTURA===false||barraZoom===true||(elementos.length>numerobotoes)){YAHOO.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<nelementos);mostra.style.display="inline";i=nelementos+1;mostra=elementos[i];do{if(elementos[i]){if(elementos[i].style){if(elementos[i].style.display==="inline"){mostra=elementos[i];break}}}i=i-1}while(i>=0);mostra.style.display="none"}}}if($i("desceferramentas")){$i("desceferramentas").onclick=function(){tipo="inline";if($i(idconteudonovo+"_")){elementos=$i(idconteudonovo+"_").getElementsByTagName("div");if(elementos[elementos.length-1].style.display===tipo){return}nelementos=elementos.length;if(nelementos>0){i=0;do{e=elementos[i];if(e.style){if((e.style.display==="block")||(e.style.display==="inline")||(e.style.display==="")){if(e.id===""){e.style.display="none";break}}}i=i+1}while(i<nelementos);i=nelementos-1;var mostra=elementos[i];do{e=elementos[i];if(e.style){if(e.style.display===tipo){break}if(e.style.display==="none"){mostra=e}}i=i-1}while(i>=0);mostra.style.display=tipo}}}}this.BARRAS.push(YAHOO.janelaBotoes.xp.panel);YAHOO.janelaBotoes.xp.panel.show();if(i3GEO.Interface.TABLET===true){YAHOO.janelaBotoes.xp.panel.moveTo((i3GEO.parametros.w/2)-(i3GEO.barraDeBotoes.HORIZONTALW/2),"")}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:"&nbsp;<span class='container-close'></span>"},{text:"Fechar barra",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.fecha('"+idbarra+"')"}},{text:"Barra normal",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.AUTOALTURA=false;i3GEO.barraDeBotoes.PERMITEFECHAR=true;i3GEO.barraDeBotoes.PERMITEDESLOCAR=true;i3GEO.barraDeBotoes.recria('"+idbarra+"')"}},{text:"Barra fixa",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.AUTOALTURA=true;i3GEO.barraDeBotoes.PERMITEFECHAR=false;i3GEO.barraDeBotoes.PERMITEDESLOCAR=false;i3GEO.barraDeBotoes.recria('"+idbarra+"')"}},{text:"Remove transiçã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;i<n;i+=1){i3GEO.barraDeBotoes.BARRAS[i].show()}};try{if(arguments.length===1){i3GEO.barraDeBotoes.BARRAS[indice].show()}else{abre.call()}}catch(e){abre.call()}},recria:function(id){if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){euEnv.euDockArray=[];euEnv.Kost.num=0;if($i("euDock_0_bar")){document.body.removeChild($i("euDock_0_bar").parentNode)}i3GEO.barraDeBotoes.inicializaBarra();if($i("i3geoMarcaIcone")){$i("i3geoMarcaIcone").style.display="none"}return}var n,temp,novoel,barraZoom,x,y,BARRAS=i3GEO.barraDeBotoes.BARRAS,iu=i3GEO.util;i3GEO.barraDeBotoes.BARRAS=[];n=BARRAS.length;for(i=0;i<n;i+=1){if(BARRAS[i].id===id){iu.removeChild("contexto_"+id);if(!$i("barraTemporaria"+i)){novoel=document.createElement("div");novoel.id="barraTemporaria"+i;document.body.appendChild(novoel)}novoel=$i("barraTemporaria"+i);novoel.innerHTML=$i(BARRAS[i].id+"_").innerHTML;barraZoom=false;temp=$i("vertMaisZoom");if(temp){temp=navm?temp.parentNode:temp.parentNode.parentNode;if(temp.id===id){barraZoom=true}}x=parseInt($i(BARRAS[i].id+"_c").style.left,10);y=parseInt($i(BARRAS[i].id+"_c").style.top,10);if(i3GEO.barraDeBotoes.PERMITEFECHAR===true){y=y-10}BARRAS[i].destroy();i3GEO.barraDeBotoes.inicializaBarra(novoel.id,BARRAS[i].id,barraZoom,x,y)}}i3GEO.barraDeBotoes.ativaBotoes()},fecha:function(id){var n=this.BARRAS.length;for(i=0;i<n;i+=1){if(this.BARRAS[i].id===id){$i(id+"_c").style.visibility="hidden"}}},mostraJanela:function(objeto,mensagem,evt){if(mensagem===""){try{clearTimeout(timeMostraAjudaBotoes)}catch(e){}try{clearTimeout(timeAjudaBotoes)}catch(e){}return}var divmensagem=$i("divMensagemBarraDeBotoes"),balloonAjuda,pos=YAHOO.util.Dom.getXY(objeto);if(this.AJUDA===false||$i("janelaMenTexto")){i3GEO.ajuda.mostraJanela(mensagem);i3GEO.barraDeBotoes.escondeJanelaAjuda();return}if(i3GEO.Interface.ATUAL==="googleearth"){objeto.title=mensagem;return}if(!divmensagem&&this.TIPOAJUDA!=="balao"){divmensagem=document.createElement("div");divmensagem.id="divMensagemBarraDeBotoes";divmensagem.style.border="0px solid rgb(120 120 120)";divmensagem.style.position="absolute";divmensagem.style.zIndex=20000;if($i("i3geo")){$i("i3geo").appendChild(divmensagem)}else{document.body.appendChild(divmensagem)}if(this.TIPOAJUDA==="horizontal"){divmensagem.innerHTML="<table style='z-index:20000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='"+$im("left.png")+"' ></td><td style='text-align:left;border-left:1px solid rgb(210,210,210)'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'></div></td></tr></table>"}if(this.TIPOAJUDA==="vertical"){divmensagem.innerHTML="<table style='z-index:20000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='"+$im("top.png")+"' ></td><td style='text-align:left;border-left:1px solid rgb(210,210,210)'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'></div></td></tr></table>"}}if(mensagem!==""){if(this.TIPOAJUDA!=="balao"){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none");if(this.TIPOAJUDA==="horizontal"){divmensagem.style.left=parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)+pos[0]+10+"px";divmensagem.style.top=pos[1]-2+(parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)/2)+"px"}if(this.TIPOAJUDA==="vertical"){divmensagem.style.left=(parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)/2)+pos[0]-5+"px";divmensagem.style.top=pos[1]+5+parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)+"px"}try{clearTimeout(timeAjudaBotoes)}catch(e){}timeMostraAjudaBotoes=setTimeout("i3GEO.barraDeBotoes.mostraJanelaAjuda('"+mensagem+"');",5000)}else{hideAllTooltips();balloonAjuda=new Balloon();BalloonConfig(balloonAjuda,'GBubble');balloonAjuda.delayTime=0;balloonAjuda.stem=false;balloonAjuda.stemHeight=0;balloonAjuda.vOffset=-24;balloonAjuda.images=i3GEO.configura.locaplic+'/pacotes/balloon-tooltips/htdocs/images/GBubblec';mensagem="<table style='z-index:20000' ><tr><td style='text-align:left;'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'>"+mensagem+"</div></td></tr></table>";try{clearTimeout(timeAjudaBotoes)}catch(e){}timeMostraAjudaBotoes=setTimeout(function(){balloonAjuda.cleanup();balloonIsVisible=false;if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){balloonAjuda.showTooltip(objeto,mensagem,null,null,null,pos[0],pos[1]-40)}else{balloonAjuda.showTooltip(objeto,mensagem,null,null,null,pos[0]+12,pos[1])}try{clearTimeout(timeMostraAjudaBotoes)}catch(e){}timeAjudaBotoes=setTimeout(function(){balloonAjuda.cleanup()},4000)},4000)}}},mostraJanelaAjuda:function(mensagem){$i("divMensagemBarraDeBotoesCorpo").innerHTML=mensagem;YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","block");try{clearTimeout(timeMostraAjudaBotoes)}catch(e){}timeAjudaBotoes=setTimeout(function(){i3GEO.barraDeBotoes.escondeJanelaAjuda()},3000)},escondeJanelaAjuda:function(){try{clearTimeout(timeAjudaBotoes)}catch(e){}if($i("divMensagemBarraDeBotoes")){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none")}},editor:{inicia:function(){if(navm){alert("O editor não funciona corretamente nesse navegador.")}i3GEO.barraDeBotoes.editor.carregaJs()},carregaJs:function(idjanela){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/mashups/openlayers.js.php","i3GEO.barraDeBotoes.editor.ativaPainel('"+idjanela+"')","openlayers.js.php",true)},criaJanela:function(){if($i("i3GEOjanelaEditor")){return"i3GEOjanelaEditor"}var janela,divid,temp,titulo,cabecalho,minimiza;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOjanelaEditor")};titulo="Editor vetorial";janela=i3GEO.janela.cria("300px","200px","","","",titulo,"i3GEOjanelaEditor",false,"hd",cabecalho,minimiza);divid=janela[2].id;$i("i3GEOjanelaEditor_corpo").style.backgroundColor="white";$i("i3GEOjanelaEditor_corpo").style.textAlign="left";return divid},ativaPainel:function(idjanela){OpenLayers.ImgPath=i3GEO.configura.locaplic+"/pacotes/openlayers/img/";i3GEO.editorOL.fundo="";i3GEO.editorOL.mapa=i3geoOL;i3GEO.editorOL.maxext="";i3GEO.editorOL.controles=[];i3GEO.editorOL.botoes={'pan':false,'zoombox':false,'zoomtot':false,'legenda':false,'distancia':false,'area':false,'identifica':true,'linha':true,'ponto':true,'poligono':true,'texto':true,'edita':true,'selecao':true,'apaga':true,'procura':false,'propriedades':true,'salva':true,'ajuda':true,'fecha':true,'tools':true,'undo':true,'frente':true};var sketchSymbolizers={"Point":{fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}",strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",label:"${texto}",pointRadius:"${pointRadius}",graphicName:"${graphicName}",fontSize:"${fontSize}",fontColor:"rgb(${fontColor})",fontFamily:"Arial",fontWeight:"normal",labelAlign:"lb",labelXOffset:"3",labelYOffset:"3"},"Line":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})"},"Polygon":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}"}},style=new OpenLayers.Style(),styleMap1=new OpenLayers.StyleMap({"default":style});style.addRules([new OpenLayers.Rule({symbolizer:sketchSymbolizers})]);i3GEO.editorOL.layergrafico=new OpenLayers.Layer.Vector("Edição",{styleMap:styleMap1,displayInLayerSwitcher:false,visibility:true});i3GEO.editorOL.mapa.addLayers([i3GEO.editorOL.layergrafico]);i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}}};
3 3 \ No newline at end of file
... ...
classesjs/compactados/classe_configura_compacto.js
1   -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.configura={grupoLayers:"",oMenuData:{menu:[{nome:$trad("s1"),id:"ajudaMenu"},{nome:$trad("s2"),id:"analise"},{nome:$trad("s3"),id:"janelas"},{nome:$trad("s4"),id:"arquivos"},{nome:$trad("d32"),id:"interface"}],submenus:{"ajudaMenu":[{id:"omenudataAjudamenu1",text:$trad("u1"),url:"http://www.softwarepublico.gov.br/spb/ver-comunidade?community_id=1444332",target:"_blank"},{id:"omenudataAjudamenu2",text:$trad("u2"),url:"javascript:i3GEO.ajuda.abreDoc()"},{id:"omenudataAjudamenu3",text:$trad("u3"),url:"http://pt.wikibooks.org/wiki/I3geo",target:"_blank"},{id:"omenudataAjudamenu4",text:$trad("u4"),url:"http://www.softwarepublico.gov.br/dotlrn/clubs/i3geo/file-storage/index?folder%5fid=22667525",target:"_blank"},{id:"omenudataAjudamenu5",text:$trad("u5a"),url:"http://www.softwarepublico.gov.br",target:"_blank"},{id:"omenudataAjudamenu7",text:$trad("u5b"),url:"../ajuda_usuario.php",target:"_blank"},{id:"omenudataAjudamenu8",text:$trad("u5c"),url:"javascript:i3GEO.ajuda.redesSociais()"}],"analise":[{id:"omenudataAnalise1",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u22")+'</b></span>',url:"#"},{id:"omenudataAnalise2",text:$trad("u7"),url:"javascript:i3GEO.analise.dialogo.gradePol()"},{id:"omenudataAnalise3",text:$trad("u8"),url:"javascript:i3GEO.analise.dialogo.gradePontos()"},{id:"omenudataAnalise4",text:$trad("u9"),url:"javascript:i3GEO.analise.dialogo.gradeHex()"},{id:"omenudataAnalise5",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u23")+'</b></span>',url:"#"},{id:"omenudataAnalise6",text:$trad("u11a"),url:"javascript:i3GEO.analise.dialogo.distanciaptpt()"},{id:"omenudataAnalise7",text:$trad("u12"),url:"javascript:i3GEO.analise.dialogo.nptPol()"},{id:"omenudataAnalise8",text:$trad("u13"),url:"javascript:i3GEO.analise.dialogo.pontoempoligono()"},{id:"omenudataAnalise9",text:$trad("u14"),url:"javascript:i3GEO.analise.dialogo.pontosdistri()"},{id:"omenudataAnalise9a",text:$trad("u28"),url:"javascript:i3GEO.analise.dialogo.centromassa()"},{id:"omenudataAnalise10",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u24")+'</b></span>',url:"#"},{id:"omenudataAnalise11",text:$trad("u25"),url:"javascript:i3GEO.analise.dialogo.dissolve()"},{id:"omenudataAnalise12",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u27")+'</b></span>',url:"#"},{id:"omenudataAnalise13",text:$trad("u6"),url:"javascript:i3GEO.analise.dialogo.analisaGeometrias()"},{id:"omenudataAnalise14",text:$trad("u10"),url:"javascript:i3GEO.analise.dialogo.buffer()"},{id:"omenudataAnalise15",text:$trad("u26"),url:"javascript:i3GEO.analise.dialogo.agrupaElementos()"},{id:"omenudataAnalise16",text:$trad("u11"),url:"javascript:i3GEO.analise.dialogo.centroide()"},{id:"omenudataAnalise17",text:$trad("t37"),url:"javascript:i3GEO.analise.dialogo.graficoInterativo()"},{id:"omenudataAnalise18",text:$trad("d30"),url:"javascript:i3GEO.analise.dialogo.linhaDoTempo()"}],"janelas":[{id:"omenudataJanelas1",text:$trad("u15"),url:"javascript:i3GEO.barraDeBotoes.reativa(0);i3GEO.barraDeBotoes.reativa(1)"},{id:"omenudataJanelas2",text:$trad("u16"),url:"javascript:i3GEO.ajuda.abreJanela()"},{id:"omenudataJanelas3",text:$trad("u29"),url:"javascript:i3GEO.barraDeBotoes.editor.inicia()"}],"arquivos":[{id:"omenudataArquivos1",text:$trad("u17"),url:"javascript:i3GEO.mapa.dialogo.salvaMapa()"},{id:"omenudataArquivos2",text:$trad("u18"),url:"javascript:i3GEO.mapa.dialogo.carregaMapa()"},{id:"omenudataArquivos3",text:$trad("u19"),url:"javascript:i3GEO.gadgets.quadros.listaImagens()"},{id:"omenudataArquivos4",text:$trad("u20"),url:"javascript:i3GEO.mapa.dialogo.convertews()"},{id:"omenudataArquivos5",text:$trad("u20a"),url:"javascript:i3GEO.mapa.dialogo.convertekml()"}],"interface":[{id:"omenudataInterface1",text:"Interface normal",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/geral.htm?'+i3GEO.configura.sid"},{id:"omenudataInterface2",text:"OpenLayers",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/openlayers.htm?'+i3GEO.configura.sid"},{id:"omenudataInterface10",text:"OpenLayers tablet",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/openlayers_t.htm?'+i3GEO.configura.sid"},{id:"omenudataInterface3",text:"Flash",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/flamingo.htm?'+i3GEO.configura.sid"},{id:"omenudataInterface4",text:"Google Maps",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/googlemaps.phtml?'+i3GEO.configura.sid"},{id:"omenudataInterface5",text:"Google Earth",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/googleearth.phtml?'+i3GEO.configura.sid"},{id:"omenudataInterface6",text:$trad("u21"),url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/geradordelinks.htm')"},{id:"omenudataInterface7",text:"Serviços WMS",url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/ogc.htm')"},{id:"omenudataInterface8",text:"Hiperbólica",url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/hiperbolica.html')"},{id:"omenudataInterface9",text:"Download de dados",url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/datadownload.htm')"},{id:"omenudataInterface11",text:$trad("p20"),url:"javascript:i3GEO.mapa.dialogo.telaRemota()"}]}},tipoimagem:"nenhum",tipotip:"balao",alturatip:"200px",larguratip:"200px",funcaoTip:"i3GEO.mapa.dialogo.verificaTipDefault()",funcaoIdentifica:"i3GEO.mapa.dialogo.cliqueIdentificaDefault()",diminuixM:0,diminuixN:0,diminuiyM:100,diminuiyN:70,autotamanho:false,map3d:"",embedLegenda:"nao",templateLegenda:"",mashuppar:"",sid:"",locaplic:"",mapaRefDisplay:"block",visual:"default",cursores:{"identifica":{ff:"pointer",ie:"pointer"},"pan":{ff:"/imagens/cursores/pan.png",ie:"/imagens/cursores/pan.cur"},"area":{ff:"crosshair",ie:"crosshair"},"distancia":{ff:"crosshair",ie:"crosshair"},"zoom":{ff:"/imagens/cursores/zoom.png",ie:"/imagens/cursores/zoom.cur"},"contexto":{ff:"/imagens/cursores/contexto.png",ie:"/imagens/cursores/contexto.cur"},"identifica_contexto":{ff:"pointer",ie:"pointer"},"pan_contexto":{ff:"/imagens/cursores/pan_contexto.png",ie:"/imagens/cursores/pan_contexto.cur"},"zoom_contexto":{ff:"/imagens/cursores/zoom_contexto.png",ie:"/imagens/cursores/zoom_contexto.cur"}},listaDePropriedadesDoMapa:{"propriedades":[{text:"p2",url:"javascript:i3GEO.mapa.dialogo.tipoimagem()"},{text:"p15",url:"javascript:i3GEO.mapa.dialogo.outputformat()"},{text:"p3",url:"javascript:i3GEO.mapa.dialogo.opcoesLegenda()"},{text:"p4",url:"javascript:i3GEO.mapa.dialogo.opcoesEscala()"},{text:"p5",url:"javascript:i3GEO.mapa.dialogo.tamanho()"},{text:"p6",url:"javascript:i3GEO.navega.entorno.ativaDesativa()"},{text:"p7",url:"javascript:i3GEO.mapa.ativaLogo()"},{text:"p8",url:"javascript:i3GEO.mapa.dialogo.queryMap()"},{text:"p9",url:"javascript:i3GEO.mapa.dialogo.corFundo()"},{text:"p10",url:"javascript:i3GEO.mapa.dialogo.gradeCoord()"},{text:"p12",url:"javascript:i3GEO.mapa.dialogo.autoredesenha()"}]},tempoAplicar:4000,tempoMouseParado:2500,iniciaJanelaMensagens:true,mostraRosaDosVentos:"nao",liberaGuias:"nao",entorno:"nao",funcoesBotoes:{"botoes":[{iddiv:"historicozoom",tipo:"",dica:$trad("d1"),constroiconteudo:'i3GEO.gadgets.mostraHistoricoZoom()'},{iddiv:"zoomtot",tipo:"",dica:$trad("d2"),funcaoonclick:function(){if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.extentTotal);return}if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.extentTotal);return}i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,i3GEO.configura.tipoimagem,i3GEO.parametros.extentTotal);marcadorZoom=""}},{iddiv:"zoomli",tipo:"dinamico",dica:$trad("d3"),funcaoonclick:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){alert("Pressione a tecla CTRL junto com o botão esquerdo do mouse");return}var temp;temp="zoom";if(i3GEO.Interface.ATIVAMENUCONTEXTO&&i3GEO.Interface.ATUAL==="padrao"){temp="zoom_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic);g_operacao='navega';g_tipoacao='zoomli';i3GEO.barraDeBotoes.ativaIcone("zoomli");marcadorZoom="";if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLzoom);return}if(!$i("i3geoboxZoom")){i3GEO.navega.zoomBox.criaBox()}if(i3GEO.eventos.MOUSEDOWN.toString().search("i3GEO.navega.zoomBox.inicia()")<0){i3GEO.eventos.MOUSEDOWN.push("i3GEO.navega.zoomBox.inicia()")}if(i3GEO.eventos.MOUSEUP.toString().search("i3GEO.navega.zoomBox.termina()")<0){i3GEO.eventos.MOUSEUP.push("i3GEO.navega.zoomBox.termina()")}i3GEO.barraDeBotoes.BOTAOPADRAO="zoomli"}},{iddiv:"pan",tipo:"dinamico",dica:$trad("d4"),funcaoonclick:function(){var temp;g_tipoacao='pan';g_operacao='navega';i3GEO.barraDeBotoes.ativaIcone("pan");i3GEO.barraDeBotoes.BOTAOPADRAO="pan";if(i3GEO.Interface.ATUAL==="googlemaps"){i3GeoMap.setOptions({draggable:true});i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pan",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic);return}if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="pan";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="pan_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}marcadorZoom="";if(i3GEO.Interface.ATUAL==="openlayers"){return}panMapaInicia=function(exy){var k;leftinicial=0;topinicial=0;if($i("img")&&(g_tipoacao==="pan")){try{if(arguments.length>0){if(navm){k=event.button}else{k=exy.button}if(k===2){return}}}catch(h){}g_panM="sim";if($i(i3GEO.Interface.IDCORPO)){leftinicial=parseInt($i(i3GEO.Interface.IDCORPO).style.left,10);topinicial=parseInt($i(i3GEO.Interface.IDCORPO).style.top,10)}clicinicialx=objposicaocursor.imgx;clicinicialy=objposicaocursor.imgy;ddinicialx=objposicaocursor.ddx;ddinicialy=objposicaocursor.ddy;boxrefObj=$i("boxref");if(boxrefObj){proporcaoBox=i3GEO.parametros.w/parseInt(boxrefObj.style.width,10);boxrefObjLeft=parseInt(boxrefObj.style.left,10);boxrefObjTop=parseInt(boxrefObj.style.top,10)}}};panMapaDesloca=function(){var nx,ny,l,t;if(typeof(g_panM)!=='undefined'&&$i(i3GEO.Interface.IDMAPA)&&(g_panM==="sim")){nx=objposicaocursor.telax-leftinicial-clicinicialx;ny=objposicaocursor.telay-topinicial-clicinicialy;if(i3GEO.configura.entorno==="nao"){l=0;if(parseInt($i("i3geo").style.left,10)){l=parseInt($i("i3geo").style.left,10)}$i(i3GEO.Interface.IDMAPA).style.left=nx-l;t=0;if(parseInt($i("i3geo").style.top,10)){t=parseInt($i("i3geo").style.top,10)}$i(i3GEO.Interface.IDMAPA).style.top=ny-t;if(boxrefObj){boxrefObj.style.left=boxrefObjLeft-(nx/proporcaoBox);boxrefObj.style.top=boxrefObjTop-(ny/proporcaoBox)}}else{$left("img",i3GEO.parametros.w*-1+nx);$left("imgS",i3GEO.parametros.w*-1+nx);$left("imgL",i3GEO.parametros.w+nx);$left("imgO",i3GEO.parametros.w*-3+nx);$left("imgN",i3GEO.parametros.w*-1+nx);$top("img",i3GEO.parametros.h*-1+ny);$top("imgS",i3GEO.parametros.h*-1+ny);$top("imgL",i3GEO.parametros.h*-1+ny);$top("imgN",i3GEO.parametros.h*-1+ny);$top("imgO",i3GEO.parametros.h*-1+ny)}}};panMapaTermina=function(){if(g_tipoacao==="pan"){marcadorZoom="";g_panM="nao";try{var f="i3GEO.navega.timerNavega = null;if("+"i3GEO.navega.xy2xy('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"',"+ddinicialx+","+ddinicialy+","+objposicaocursor.ddx+","+objposicaocursor.ddy+",'"+i3GEO.parametros.mapexten+"','"+i3GEO.configura.tipoimagem+"'"+") == false"+"){"+"i3GEO.navega.zoompontoIMG('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"',"+objposicaocursor.imgx+","+objposicaocursor.imgy+")"+"}";clearTimeout(i3GEO.navega.timerNavega);i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)}catch(e){}}};if(i3GEO.eventos.MOUSEDOWN.toString().search("panMapaInicia()")<0){i3GEO.eventos.MOUSEDOWN.push("panMapaInicia()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("panMapaDesloca()")<0){i3GEO.eventos.MOUSEMOVE.push("panMapaDesloca()")}if(i3GEO.eventos.MOUSEUP.toString().search("panMapaTermina()")<0){i3GEO.eventos.MOUSEUP.push("panMapaTermina()")}}},{iddiv:"zoomiauto",tipo:"",dica:$trad("d5"),funcaoonclick:function(){i3GEO.navega.zoomin(i3GEO.configura.locaplic,i3GEO.configura.sid);marcadorZoom=''}},{iddiv:"zoomoauto",tipo:"",dica:$trad("d6"),funcaoonclick:function(){i3GEO.navega.zoomout(i3GEO.configura.locaplic,i3GEO.configura.sid);marcadorZoom=""}},{iddiv:"identifica",tipo:"dinamico",dica:$trad("d7"),funcaoonclick:function(){var temp;if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO&&i3GEO.Interface.ATUAL!=="googlemaps"){temp="identifica_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}i3GEO.barraDeBotoes.ativaIcone("identifica");g_tipoacao='identifica';g_operacao='identifica';cliqueIdentifica=function(){if(g_operacao==="identifica"||i3GEO.barraDeBotoes.BOTAOPADRAO==="identifica"){g_operacao="identifica";eval(i3GEO.configura.funcaoIdentifica)}var temp=function(){$i("i3GEOmarcaIdentifica").style.display="none"},i;i3GEO.util.criaPin("i3GEOmarcaIdentifica",i3GEO.configura.locaplic+"/imagens/marcaidentify.png",48,48,temp);i3GEO.util.posicionaImagemNoMapa("i3GEOmarcaIdentifica");i=$i("i3GEOmarcaIdentifica");if(i){i.style.display="block"}};if(i3GEO.eventos.MOUSECLIQUE.toString().search("cliqueIdentifica()")<0){i3GEO.eventos.MOUSECLIQUE.push("cliqueIdentifica()")}if(i3GEO.eventos.MOUSECLIQUE.toString().search("verificaTip()")>0){i3GEO.eventos.MOUSECLIQUE.remove("verificaTip()")}if(i3GEO.eventos.MOUSEPARADO.toString().search("verificaTip()")>0){i3GEO.eventos.MOUSEPARADO.remove("verificaTip()")}}},{iddiv:"identificaBalao",tipo:"dinamico",dica:$trad("d7a"),funcaoonclick:function(){if(i3GEO.arvoreDeCamadas.filtraCamadas("etiquetas","","diferente",i3GEO.arvoreDeCamadas.CAMADAS)===""){alert($trad("d31"));return}var temp;if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}i3GEO.barraDeBotoes.ativaIcone("identificaBalao");g_tipoacao='identifica';g_operacao='identifica';verificaTip=function(){if(i3GEO.util.verificaScriptTag("i3GEOF")===true){return}if($i("marcaIdentifica")){return}if(g_operacao==="identifica"){eval(i3GEO.configura.funcaoTip)}};if(i3GEO.eventos.MOUSECLIQUE.toString().search("cliqueIdentifica()")>0){i3GEO.eventos.MOUSECLIQUE.remove("cliqueIdentifica()")}if(i3GEO.eventos.MOUSECLIQUE.toString().search("verificaTip()")<0){i3GEO.eventos.MOUSECLIQUE.push("verificaTip()")}if(i3GEO.eventos.MOUSEPARADO.toString().search("verificaTip()")<0){i3GEO.eventos.MOUSEPARADO.push("verificaTip()")}}},{iddiv:"exten",tipo:"",dica:$trad("d8"),funcaoonclick:function(){i3GEO.mapa.dialogo.mostraExten()}},{iddiv:"referencia",tipo:"",dica:$trad("d9"),funcaoonclick:function(){i3GEO.maparef.inicia()}},{iddiv:"wiki",tipo:"",dica:$trad("d11"),funcaoonclick:function(){i3GEO.navega.dialogo.wiki()}},{iddiv:"metar",tipo:"",dica:$trad("d29"),funcaoonclick:function(){i3GEO.navega.dialogo.metar()}},{iddiv:"buscafotos",tipo:"",dica:"Fotos",funcaoonclick:function(){i3GEO.navega.dialogo.buscaFotos()}},{iddiv:"imprimir",tipo:"",dica:$trad("d12"),funcaoonclick:function(){i3GEO.mapa.dialogo.imprimir()}},{iddiv:"ondeestou",tipo:"",dica:$trad("d13"),funcaoonclick:function(){i3GEO.navega.zoomIP(i3GEO.configura.locaplic,i3GEO.configura.sid)}},{iddiv:"v3d",tipo:"",dica:$trad("d14"),funcaoonclick:function(){i3GEO.mapa.dialogo.t3d()}},{iddiv:"google",tipo:"",dica:$trad("d15"),funcaoonclick:function(){i3GEO.navega.dialogo.google()}},{iddiv:"scielo",tipo:"",dica:$trad("d16"),funcaoonclick:function(){scieloAtivo=false;g_operacao="navega";i3GEO.janela.cria("450px","190px",i3GEO.configura.locaplic+"/ferramentas/scielo/index.htm","","","Scielo");atualizascielo=function(){var docel;try{docel=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;if(docel.getElementById("resultadoscielo")){$i("wdocai").src=i3GEO.configura.locaplic+"/ferramentas/scielo/index.htm"}else{i3GEO.eventos.NAVEGAMAPA.remove("atualizascielo()");if(i3GEO.Interface.ATUAL==="googlemaps"){GEvent.removeListener(scieloDragend);GEvent.removeListener(scieloZoomend)}}}catch(e){scieloAtivo=false;i3GEO.eventos.NAVEGAMAPA.remove("atualizascielo()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizascielo()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizascielo()");if(i3GEO.Interface.ATUAL==="googlemaps"){scieloDragend=GEvent.addListener(i3GeoMap,"dragend",function(){atualizascielo()});scieloZoomend=GEvent.addListener(i3GeoMap,"zoomend",function(){atualizascielo()})}}}},{iddiv:"confluence",tipo:"",dica:$trad("d17"),funcaoonclick:function(){i3GEO.navega.dialogo.confluence()}},{iddiv:"lentei",tipo:"",dica:$trad("d18"),funcaoonclick:function(){if(i3GEO.navega.lente.ESTAATIVA==="nao"){i3GEO.navega.lente.inicia()}else{i3GEO.navega.lente.desativa()}}},{iddiv:"encolheFerramentas",tipo:"",dica:$trad("d19"),funcaoonclick:function(){i3GEO.guias.libera()}},{iddiv:"reinicia",tipo:"",dica:$trad("d20"),funcaoonclick:function(){i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));var temp=function(){var url=(window.location.href.split("?"));window.location.href=url[0]+"?"+i3GEO.configura.sid};i3GEO.php.reiniciaMapa(temp)}},{iddiv:"mede",tipo:"dinamico",dica:$trad("d21"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("mede");if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";i3GEO.util.mudaCursor(i3GEO.configura.cursores,"distancia",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}g_tipoacao="";g_operacao="";i3GEO.analise.medeDistancia.inicia()}},{iddiv:"area",tipo:"dinamico",dica:$trad("d21a"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("area");if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";i3GEO.util.mudaCursor(i3GEO.configura.cursores,"area",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}g_tipoacao="";g_operacao="";i3GEO.analise.medeArea.inicia()}},{iddiv:"inserexy",tipo:"dinamico",dica:$trad("d22"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("inserexy");g_tipoacao="";i3GEO.mapa.dialogo.cliquePonto()}},{iddiv:"inseregrafico",tipo:"dinamico",dica:$trad("d23"),funcaoonclick:function(){g_tipoacao="";i3GEO.mapa.dialogo.cliqueGrafico();i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pointer",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}},{iddiv:"selecao",tipo:"dinamico",dica:$trad("d24"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("selecao");i3GEO.mapa.dialogo.selecao()}},{iddiv:"textofid",tipo:"dinamico",dica:$trad("d25"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("textofid");g_tipoacao="";i3GEO.mapa.dialogo.cliqueTexto()}},{iddiv:"rota",tipo:"",dica:"Rota",funcaoonclick:function(){if(i3GEO.Interface.ATUAL!=="googlemaps"){alert("Operacao disponivel apenas na interface Google Maps");return}counterClick=1;var parametrosRota=function(overlay,latlng){var temp,janela;if(counterClick===1){counterClick++;alert("Clique o ponto de destino da rota");pontoRota1=latlng;return}if(counterClick===2){pontoRota2=latlng;counterClick=0;GEvent.removeListener(rotaEvento);janela=i3GEO.janela.cria("300px","300px","","center","","Rota");janela[2].style.overflow="auto";janela[2].style.height="300px";directions=new GDirections(i3GeoMap,janela[2]);temp=function(){$i("wdoca_corpo").innerHTML="Não foi possível criar a rota"};GEvent.addListener(directions,"error",temp);directions.load("from: "+pontoRota1.lat()+","+pontoRota1.lng()+" to: "+pontoRota2.lat()+","+pontoRota2.lng())}};rotaEvento=GEvent.addListener(i3GeoMap,"click",parametrosRota);alert("Clique o ponto de origem da rota")}}]}};
2 1 \ No newline at end of file
  2 +if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.configura={grupoLayers:"",oMenuData:{menu:[{nome:$trad("s1"),id:"ajudaMenu"},{nome:$trad("s2"),id:"analise"},{nome:$trad("s3"),id:"janelas"},{nome:$trad("s4"),id:"arquivos"},{nome:$trad("d32"),id:"interface"}],submenus:{"ajudaMenu":[{id:"omenudataAjudamenu1",text:$trad("u1"),url:"http://www.softwarepublico.gov.br/spb/ver-comunidade?community_id=1444332",target:"_blank"},{id:"omenudataAjudamenu2",text:$trad("u2"),url:"javascript:i3GEO.ajuda.abreDoc()"},{id:"omenudataAjudamenu3",text:$trad("u3"),url:"http://pt.wikibooks.org/wiki/I3geo",target:"_blank"},{id:"omenudataAjudamenu4",text:$trad("u4"),url:"http://www.softwarepublico.gov.br/dotlrn/clubs/i3geo/file-storage/index?folder%5fid=22667525",target:"_blank"},{id:"omenudataAjudamenu5",text:$trad("u5a"),url:"http://www.softwarepublico.gov.br",target:"_blank"},{id:"omenudataAjudamenu7",text:$trad("u5b"),url:"../ajuda_usuario.php",target:"_blank"},{id:"omenudataAjudamenu8",text:$trad("u5c"),url:"javascript:i3GEO.ajuda.redesSociais()"}],"analise":[{id:"omenudataAnalise1",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u22")+'</b></span>',url:"#"},{id:"omenudataAnalise2",text:$trad("u7"),url:"javascript:i3GEO.analise.dialogo.gradePol()"},{id:"omenudataAnalise3",text:$trad("u8"),url:"javascript:i3GEO.analise.dialogo.gradePontos()"},{id:"omenudataAnalise4",text:$trad("u9"),url:"javascript:i3GEO.analise.dialogo.gradeHex()"},{id:"omenudataAnalise5",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u23")+'</b></span>',url:"#"},{id:"omenudataAnalise6",text:$trad("u11a"),url:"javascript:i3GEO.analise.dialogo.distanciaptpt()"},{id:"omenudataAnalise7",text:$trad("u12"),url:"javascript:i3GEO.analise.dialogo.nptPol()"},{id:"omenudataAnalise8",text:$trad("u13"),url:"javascript:i3GEO.analise.dialogo.pontoempoligono()"},{id:"omenudataAnalise9",text:$trad("u14"),url:"javascript:i3GEO.analise.dialogo.pontosdistri()"},{id:"omenudataAnalise9a",text:$trad("u28"),url:"javascript:i3GEO.analise.dialogo.centromassa()"},{id:"omenudataAnalise10",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u24")+'</b></span>',url:"#"},{id:"omenudataAnalise11",text:$trad("u25"),url:"javascript:i3GEO.analise.dialogo.dissolve()"},{id:"omenudataAnalise12",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u27")+'</b></span>',url:"#"},{id:"omenudataAnalise13",text:$trad("u6"),url:"javascript:i3GEO.analise.dialogo.analisaGeometrias()"},{id:"omenudataAnalise14",text:$trad("u10"),url:"javascript:i3GEO.analise.dialogo.buffer()"},{id:"omenudataAnalise15",text:$trad("u26"),url:"javascript:i3GEO.analise.dialogo.agrupaElementos()"},{id:"omenudataAnalise16",text:$trad("u11"),url:"javascript:i3GEO.analise.dialogo.centroide()"},{id:"omenudataAnalise17",text:$trad("t37"),url:"javascript:i3GEO.analise.dialogo.graficoInterativo()"},{id:"omenudataAnalise18",text:$trad("d30"),url:"javascript:i3GEO.analise.dialogo.linhaDoTempo()"}],"janelas":[{id:"omenudataJanelas1",text:$trad("u15"),url:"javascript:i3GEO.barraDeBotoes.reativa(0);i3GEO.barraDeBotoes.reativa(1)"},{id:"omenudataJanelas2",text:$trad("u16"),url:"javascript:i3GEO.ajuda.abreJanela()"},{id:"omenudataJanelas3",text:$trad("u29"),url:"javascript:i3GEO.barraDeBotoes.editor.inicia()"}],"arquivos":[{id:"omenudataArquivos1",text:$trad("u17"),url:"javascript:i3GEO.mapa.dialogo.salvaMapa()"},{id:"omenudataArquivos2",text:$trad("u18"),url:"javascript:i3GEO.mapa.dialogo.carregaMapa()"},{id:"omenudataArquivos3",text:$trad("u19"),url:"javascript:i3GEO.gadgets.quadros.listaImagens()"},{id:"omenudataArquivos4",text:$trad("u20"),url:"javascript:i3GEO.mapa.dialogo.convertews()"},{id:"omenudataArquivos5",text:$trad("u20a"),url:"javascript:i3GEO.mapa.dialogo.convertekml()"}],"interface":[{id:"omenudataInterface1",text:"Interface normal",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/geral.htm?'+i3GEO.configura.sid"},{id:"omenudataInterface2",text:"OpenLayers",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/openlayers.htm?'+i3GEO.configura.sid"},{id:"omenudataInterface10",text:"OpenLayers tablet",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/openlayers_t.htm?'+i3GEO.configura.sid"},{id:"omenudataInterface3",text:"Flash",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/flamingo.htm?'+i3GEO.configura.sid"},{id:"omenudataInterface4",text:"Google Maps",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/googlemaps.phtml?'+i3GEO.configura.sid"},{id:"omenudataInterface5",text:"Google Earth",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/googleearth.phtml?'+i3GEO.configura.sid"},{id:"omenudataInterface6",text:$trad("u21"),url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/geradordelinks.htm')"},{id:"omenudataInterface7",text:"Serviços WMS",url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/ogc.htm')"},{id:"omenudataInterface8",text:"Hiperbólica",url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/hiperbolica.html')"},{id:"omenudataInterface9",text:"Download de dados",url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/datadownload.htm')"},{id:"omenudataInterface11",text:$trad("p20"),url:"javascript:i3GEO.mapa.dialogo.telaRemota()"}]}},tipoimagem:"nenhum",tipotip:"balao",alturatip:"200px",larguratip:"200px",funcaoTip:"i3GEO.mapa.dialogo.verificaTipDefault()",funcaoIdentifica:"i3GEO.mapa.dialogo.cliqueIdentificaDefault()",diminuixM:0,diminuixN:0,diminuiyM:100,diminuiyN:70,autotamanho:false,map3d:"",embedLegenda:"nao",templateLegenda:"",mashuppar:"",sid:"",locaplic:"",mapaRefDisplay:"block",visual:"default",cursores:{"identifica":{ff:"pointer",ie:"pointer"},"pan":{ff:"/imagens/cursores/pan.png",ie:"/imagens/cursores/pan.cur"},"area":{ff:"crosshair",ie:"crosshair"},"distancia":{ff:"crosshair",ie:"crosshair"},"zoom":{ff:"/imagens/cursores/zoom.png",ie:"/imagens/cursores/zoom.cur"},"contexto":{ff:"/imagens/cursores/contexto.png",ie:"/imagens/cursores/contexto.cur"},"identifica_contexto":{ff:"pointer",ie:"pointer"},"pan_contexto":{ff:"/imagens/cursores/pan_contexto.png",ie:"/imagens/cursores/pan_contexto.cur"},"zoom_contexto":{ff:"/imagens/cursores/zoom_contexto.png",ie:"/imagens/cursores/zoom_contexto.cur"}},listaDePropriedadesDoMapa:{"propriedades":[{text:"p2",url:"javascript:i3GEO.mapa.dialogo.tipoimagem()"},{text:"p15",url:"javascript:i3GEO.mapa.dialogo.outputformat()"},{text:"p3",url:"javascript:i3GEO.mapa.dialogo.opcoesLegenda()"},{text:"p4",url:"javascript:i3GEO.mapa.dialogo.opcoesEscala()"},{text:"p5",url:"javascript:i3GEO.mapa.dialogo.tamanho()"},{text:"p6",url:"javascript:i3GEO.navega.entorno.ativaDesativa()"},{text:"p7",url:"javascript:i3GEO.mapa.ativaLogo()"},{text:"p8",url:"javascript:i3GEO.mapa.dialogo.queryMap()"},{text:"p9",url:"javascript:i3GEO.mapa.dialogo.corFundo()"},{text:"p10",url:"javascript:i3GEO.mapa.dialogo.gradeCoord()"},{text:"p12",url:"javascript:i3GEO.mapa.dialogo.autoredesenha()"}]},tempoAplicar:4000,tempoMouseParado:2500,iniciaJanelaMensagens:true,mostraRosaDosVentos:"nao",liberaGuias:"nao",entorno:"nao",funcoesBotoes:{"botoes":[{iddiv:"historicozoom",tipo:"",dica:$trad("d1"),constroiconteudo:'i3GEO.gadgets.mostraHistoricoZoom()'},{iddiv:"zoomtot",tipo:"",dica:$trad("d2"),funcaoonclick:function(){if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.extentTotal);return}if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.extentTotal);return}i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,i3GEO.configura.tipoimagem,i3GEO.parametros.extentTotal);marcadorZoom=""}},{iddiv:"zoomli",tipo:"dinamico",dica:$trad("d3"),funcaoonclick:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.janela.mensagemSimples("Pressione a tecla CTRL junto com o botão esquerdo do mouse e arraste para definir a área de zoom","?");g_tipoacao='pan';g_operacao='navega';i3GEO.barraDeBotoes.ativaIcone("pan");i3GEO.barraDeBotoes.BOTAOPADRAO="pan";i3GeoMap.setOptions({draggable:true});i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pan",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic);return}var temp;temp="zoom";if(i3GEO.Interface.ATIVAMENUCONTEXTO&&i3GEO.Interface.ATUAL==="padrao"){temp="zoom_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic);g_operacao='navega';g_tipoacao='zoomli';i3GEO.barraDeBotoes.ativaIcone("zoomli");marcadorZoom="";if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLzoom);return}if(!$i("i3geoboxZoom")){i3GEO.navega.zoomBox.criaBox()}if(i3GEO.eventos.MOUSEDOWN.toString().search("i3GEO.navega.zoomBox.inicia()")<0){i3GEO.eventos.MOUSEDOWN.push("i3GEO.navega.zoomBox.inicia()")}if(i3GEO.eventos.MOUSEUP.toString().search("i3GEO.navega.zoomBox.termina()")<0){i3GEO.eventos.MOUSEUP.push("i3GEO.navega.zoomBox.termina()")}i3GEO.barraDeBotoes.BOTAOPADRAO="zoomli"}},{iddiv:"pan",tipo:"dinamico",dica:$trad("d4"),funcaoonclick:function(){var temp;g_tipoacao='pan';g_operacao='navega';i3GEO.barraDeBotoes.ativaIcone("pan");i3GEO.barraDeBotoes.BOTAOPADRAO="pan";if(i3GEO.Interface.ATUAL==="googlemaps"){i3GeoMap.setOptions({draggable:true});i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pan",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic);return}if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="pan";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="pan_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}marcadorZoom="";if(i3GEO.Interface.ATUAL==="openlayers"){return}panMapaInicia=function(exy){var k;leftinicial=0;topinicial=0;if($i("img")&&(g_tipoacao==="pan")){try{if(arguments.length>0){if(navm){k=event.button}else{k=exy.button}if(k===2){return}}}catch(h){}g_panM="sim";if($i(i3GEO.Interface.IDCORPO)){leftinicial=parseInt($i(i3GEO.Interface.IDCORPO).style.left,10);topinicial=parseInt($i(i3GEO.Interface.IDCORPO).style.top,10)}clicinicialx=objposicaocursor.imgx;clicinicialy=objposicaocursor.imgy;ddinicialx=objposicaocursor.ddx;ddinicialy=objposicaocursor.ddy;boxrefObj=$i("boxref");if(boxrefObj){proporcaoBox=i3GEO.parametros.w/parseInt(boxrefObj.style.width,10);boxrefObjLeft=parseInt(boxrefObj.style.left,10);boxrefObjTop=parseInt(boxrefObj.style.top,10)}}};panMapaDesloca=function(){var nx,ny,l,t;if(typeof(g_panM)!=='undefined'&&$i(i3GEO.Interface.IDMAPA)&&(g_panM==="sim")){nx=objposicaocursor.telax-leftinicial-clicinicialx;ny=objposicaocursor.telay-topinicial-clicinicialy;if(i3GEO.configura.entorno==="nao"){l=0;if(parseInt($i("i3geo").style.left,10)){l=parseInt($i("i3geo").style.left,10)}$i(i3GEO.Interface.IDMAPA).style.left=nx-l;t=0;if(parseInt($i("i3geo").style.top,10)){t=parseInt($i("i3geo").style.top,10)}$i(i3GEO.Interface.IDMAPA).style.top=ny-t;if(boxrefObj){boxrefObj.style.left=boxrefObjLeft-(nx/proporcaoBox);boxrefObj.style.top=boxrefObjTop-(ny/proporcaoBox)}}else{$left("img",i3GEO.parametros.w*-1+nx);$left("imgS",i3GEO.parametros.w*-1+nx);$left("imgL",i3GEO.parametros.w+nx);$left("imgO",i3GEO.parametros.w*-3+nx);$left("imgN",i3GEO.parametros.w*-1+nx);$top("img",i3GEO.parametros.h*-1+ny);$top("imgS",i3GEO.parametros.h*-1+ny);$top("imgL",i3GEO.parametros.h*-1+ny);$top("imgN",i3GEO.parametros.h*-1+ny);$top("imgO",i3GEO.parametros.h*-1+ny)}}};panMapaTermina=function(){if(g_tipoacao==="pan"){marcadorZoom="";g_panM="nao";try{var f="i3GEO.navega.timerNavega = null;if("+"i3GEO.navega.xy2xy('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"',"+ddinicialx+","+ddinicialy+","+objposicaocursor.ddx+","+objposicaocursor.ddy+",'"+i3GEO.parametros.mapexten+"','"+i3GEO.configura.tipoimagem+"'"+") == false"+"){"+"i3GEO.navega.zoompontoIMG('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"',"+objposicaocursor.imgx+","+objposicaocursor.imgy+")"+"}";clearTimeout(i3GEO.navega.timerNavega);i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)}catch(e){}}};if(i3GEO.eventos.MOUSEDOWN.toString().search("panMapaInicia()")<0){i3GEO.eventos.MOUSEDOWN.push("panMapaInicia()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("panMapaDesloca()")<0){i3GEO.eventos.MOUSEMOVE.push("panMapaDesloca()")}if(i3GEO.eventos.MOUSEUP.toString().search("panMapaTermina()")<0){i3GEO.eventos.MOUSEUP.push("panMapaTermina()")}}},{iddiv:"zoomiauto",tipo:"",dica:$trad("d5"),funcaoonclick:function(){i3GEO.navega.zoomin(i3GEO.configura.locaplic,i3GEO.configura.sid);marcadorZoom=''}},{iddiv:"zoomoauto",tipo:"",dica:$trad("d6"),funcaoonclick:function(){i3GEO.navega.zoomout(i3GEO.configura.locaplic,i3GEO.configura.sid);marcadorZoom=""}},{iddiv:"identifica",tipo:"dinamico",dica:$trad("d7"),funcaoonclick:function(){var temp;if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO&&i3GEO.Interface.ATUAL!=="googlemaps"){temp="identifica_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}i3GEO.barraDeBotoes.ativaIcone("identifica");g_tipoacao='identifica';g_operacao='identifica';cliqueIdentifica=function(){if(g_operacao==="identifica"||i3GEO.barraDeBotoes.BOTAOPADRAO==="identifica"){g_operacao="identifica";eval(i3GEO.configura.funcaoIdentifica)}var temp=function(){$i("i3GEOmarcaIdentifica").style.display="none"},i;i3GEO.util.criaPin("i3GEOmarcaIdentifica",i3GEO.configura.locaplic+"/imagens/marcaidentify.png",48,48,temp);i3GEO.util.posicionaImagemNoMapa("i3GEOmarcaIdentifica");i=$i("i3GEOmarcaIdentifica");if(i){i.style.display="block"}};if(i3GEO.eventos.MOUSECLIQUE.toString().search("cliqueIdentifica()")<0){i3GEO.eventos.MOUSECLIQUE.push("cliqueIdentifica()")}if(i3GEO.eventos.MOUSECLIQUE.toString().search("verificaTip()")>0){i3GEO.eventos.MOUSECLIQUE.remove("verificaTip()")}if(i3GEO.eventos.MOUSEPARADO.toString().search("verificaTip()")>0){i3GEO.eventos.MOUSEPARADO.remove("verificaTip()")}}},{iddiv:"identificaBalao",tipo:"dinamico",dica:$trad("d7a"),funcaoonclick:function(){if(i3GEO.arvoreDeCamadas.filtraCamadas("etiquetas","","diferente",i3GEO.arvoreDeCamadas.CAMADAS)===""){alert($trad("d31"));return}var temp;if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}i3GEO.barraDeBotoes.ativaIcone("identificaBalao");g_tipoacao='identifica';g_operacao='identifica';verificaTip=function(){if(i3GEO.util.verificaScriptTag("i3GEOF")===true){return}if($i("marcaIdentifica")){return}if(g_operacao==="identifica"){eval(i3GEO.configura.funcaoTip)}};if(i3GEO.eventos.MOUSECLIQUE.toString().search("cliqueIdentifica()")>0){i3GEO.eventos.MOUSECLIQUE.remove("cliqueIdentifica()")}if(i3GEO.eventos.MOUSECLIQUE.toString().search("verificaTip()")<0){i3GEO.eventos.MOUSECLIQUE.push("verificaTip()")}if(i3GEO.eventos.MOUSEPARADO.toString().search("verificaTip()")<0){i3GEO.eventos.MOUSEPARADO.push("verificaTip()")}}},{iddiv:"exten",tipo:"",dica:$trad("d8"),funcaoonclick:function(){i3GEO.mapa.dialogo.mostraExten()}},{iddiv:"referencia",tipo:"",dica:$trad("d9"),funcaoonclick:function(){i3GEO.maparef.inicia()}},{iddiv:"wiki",tipo:"",dica:$trad("d11"),funcaoonclick:function(){i3GEO.navega.dialogo.wiki()}},{iddiv:"metar",tipo:"",dica:$trad("d29"),funcaoonclick:function(){i3GEO.navega.dialogo.metar()}},{iddiv:"buscafotos",tipo:"",dica:"Fotos",funcaoonclick:function(){i3GEO.navega.dialogo.buscaFotos()}},{iddiv:"imprimir",tipo:"",dica:$trad("d12"),funcaoonclick:function(){i3GEO.mapa.dialogo.imprimir()}},{iddiv:"ondeestou",tipo:"",dica:$trad("d13"),funcaoonclick:function(){i3GEO.navega.zoomIP(i3GEO.configura.locaplic,i3GEO.configura.sid)}},{iddiv:"v3d",tipo:"",dica:$trad("d14"),funcaoonclick:function(){i3GEO.mapa.dialogo.t3d()}},{iddiv:"google",tipo:"",dica:$trad("d15"),funcaoonclick:function(){i3GEO.navega.dialogo.google()}},{iddiv:"scielo",tipo:"",dica:$trad("d16"),funcaoonclick:function(){scieloAtivo=false;g_operacao="navega";i3GEO.janela.cria("450px","190px",i3GEO.configura.locaplic+"/ferramentas/scielo/index.htm","","","Scielo");atualizascielo=function(){var docel;try{docel=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;if(docel.getElementById("resultadoscielo")){$i("wdocai").src=i3GEO.configura.locaplic+"/ferramentas/scielo/index.htm"}else{i3GEO.eventos.NAVEGAMAPA.remove("atualizascielo()");if(i3GEO.Interface.ATUAL==="googlemaps"){GEvent.removeListener(scieloDragend);GEvent.removeListener(scieloZoomend)}}}catch(e){scieloAtivo=false;i3GEO.eventos.NAVEGAMAPA.remove("atualizascielo()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizascielo()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizascielo()");if(i3GEO.Interface.ATUAL==="googlemaps"){scieloDragend=GEvent.addListener(i3GeoMap,"dragend",function(){atualizascielo()});scieloZoomend=GEvent.addListener(i3GeoMap,"zoomend",function(){atualizascielo()})}}}},{iddiv:"confluence",tipo:"",dica:$trad("d17"),funcaoonclick:function(){i3GEO.navega.dialogo.confluence()}},{iddiv:"lentei",tipo:"",dica:$trad("d18"),funcaoonclick:function(){if(i3GEO.navega.lente.ESTAATIVA==="nao"){i3GEO.navega.lente.inicia()}else{i3GEO.navega.lente.desativa()}}},{iddiv:"encolheFerramentas",tipo:"",dica:$trad("d19"),funcaoonclick:function(){i3GEO.guias.libera()}},{iddiv:"reinicia",tipo:"",dica:$trad("d20"),funcaoonclick:function(){i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));var temp=function(){var url=(window.location.href.split("?"));window.location.href=url[0]+"?"+i3GEO.configura.sid};i3GEO.php.reiniciaMapa(temp)}},{iddiv:"mede",tipo:"dinamico",dica:$trad("d21"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("mede");if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";i3GEO.util.mudaCursor(i3GEO.configura.cursores,"distancia",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}g_tipoacao="";g_operacao="";i3GEO.analise.medeDistancia.inicia()}},{iddiv:"area",tipo:"dinamico",dica:$trad("d21a"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("area");if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";i3GEO.util.mudaCursor(i3GEO.configura.cursores,"area",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}g_tipoacao="";g_operacao="";i3GEO.analise.medeArea.inicia()}},{iddiv:"inserexy",tipo:"dinamico",dica:$trad("d22"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("inserexy");g_tipoacao="";i3GEO.mapa.dialogo.cliquePonto()}},{iddiv:"inseregrafico",tipo:"dinamico",dica:$trad("d23"),funcaoonclick:function(){g_tipoacao="";i3GEO.mapa.dialogo.cliqueGrafico();i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pointer",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}},{iddiv:"selecao",tipo:"dinamico",dica:$trad("d24"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("selecao");i3GEO.mapa.dialogo.selecao()}},{iddiv:"textofid",tipo:"dinamico",dica:$trad("d25"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("textofid");g_tipoacao="";i3GEO.mapa.dialogo.cliqueTexto()}},{iddiv:"rota",tipo:"",dica:"Rota",funcaoonclick:function(){if(i3GEO.Interface.ATUAL!=="googlemaps"){alert("Operacao disponivel apenas na interface Google Maps");return}counterClick=1;var parametrosRota=function(overlay,latlng){var temp,janela;if(counterClick===1){counterClick++;alert("Clique o ponto de destino da rota");pontoRota1=latlng;return}if(counterClick===2){pontoRota2=latlng;counterClick=0;GEvent.removeListener(rotaEvento);janela=i3GEO.janela.cria("300px","300px","","center","","Rota");janela[2].style.overflow="auto";janela[2].style.height="300px";directions=new GDirections(i3GeoMap,janela[2]);temp=function(){$i("wdoca_corpo").innerHTML="Não foi possível criar a rota"};GEvent.addListener(directions,"error",temp);directions.load("from: "+pontoRota1.lat()+","+pontoRota1.lng()+" to: "+pontoRota2.lat()+","+pontoRota2.lng())}};rotaEvento=GEvent.addListener(i3GeoMap,"click",parametrosRota);alert("Clique o ponto de origem da rota")}}]}};
3 3 \ No newline at end of file
... ...
classesjs/compactados/classe_interface_compacto.js
1   -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.Interface={TABLET:false,ALTTABLET:"openlayers_t.htm",OUTPUTFORMAT:"AGG_Q",BARRABOTOESTOP:12,BARRABOTOESLEFT:3,BARRADEZOOMTOP:7,BARRADEZOOMLEFT: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")}if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.adicionaKml("foo")}},cria:function(w,h){i3GEO.Interface[i3GEO.Interface.ATUAL].cria(w,h)},inicia:function(w,h){var temp=window.location.href.split("?")[0],gadgets=i3GEO.gadgets;if($i("i3GEOcompartilhar")){i3GEO.social.compartilhar("i3GEOcompartilhar",temp,temp,"semtotal")}gadgets.quadros.inicia(10);gadgets.quadros.grava("extensao",i3GEO.parametros.extentTotal);gadgets.mostraBuscaRapida();gadgets.mostraVersao();gadgets.mostraEmail();i3GEO.guias.cria();if($i("mst")){$i("mst").style.display="block"}if(i3GEO.configura.entorno.toLowerCase()==="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(){if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){i3GEO.barraDeBotoes.inicializaBarra()}else{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="<input style='position:relative;top:0px;left:0px;' type=image src='' id='img' />";$i(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:"&nbsp;<span class='container-close'></span>"},{text:"<img class='rosamais' style='height:18px;' src='"+$im("branco.gif")+"'><span style='position:relative;top:-4px;'> Aproxima</span>",onclick:{fn:i3GEO.navega.zoomin}},{text:"<img class='rosamenos' style='height:18px;' src='"+$im("branco.gif")+"'><span style='position:relative;top:-4px;'> Afasta</span>",onclick:{fn:i3GEO.navega.zoomout}},{text:"<img class='rosanorte' style='height:18px;' src='"+$im("branco.gif")+"'><span style='position:relative;top:-7px;'> Norte</span>",onclick:{fn:i3GEO.navega.panFixoNorte}},{text:"<img class='rosasul' style='height:18px;' src='"+$im("branco.gif")+"'><span style='position:relative;top:-7px;'> Sul</span>",onclick:{fn:i3GEO.navega.panFixoSul}},{text:"<img class='rosaleste' style='height:18px;' src='"+$im("branco.gif")+"'><span style='position:relative;top:-7px;'> Leste</span>",onclick:{fn:i3GEO.navega.panFixoLeste}},{text:"<img class='rosaoeste' style='height:18px;' src='"+$im("branco.gif")+"'><span style='position:relative;top:-7px;'> Oeste</span>",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();gadgets.mostraMenuLista();i3GEO.eventos.ativa(i);i3GEO.coordenadas.mostraCoordenadas();gadgets.mostraEscalaNumerica();gadgets.mostraEscalaGrafica();gadgets.visual.inicia();iu.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",configura.listaDePropriedadesDoMapa);i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,configura.sid,configura.locaplic);i3GEO.ajuda.ativaLetreiro(parametros.mensagens);i3GEO.Interface.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(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='<div id=flamingo style="width:0px;height:0px;text-align:left;background-image:url(/"'+i3GEO.configura.locaplic+'/imagens/i3geo1bw.jpg/")"></div>';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("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa)},ativaBotoes:function(){}},openlayers:{FUNDOTEMA:"yellow",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();openlayers.sobeLayersGraficos()},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='<div id=openlayers style="width:0px;height:0px;text-align:left;background-image:url('+i3GEO.configura.locaplic+'/imagens/i3geo1bw.jpg)"></div>';i.innerHTML=ins}f=$i("openlayers");f.style.width=w;f.style.height=h}i3GEO.Interface.IDMAPA="openlayers";if(i3GEO.Interface.TABLET===true){i3geoOL=new OpenLayers.Map({div:"openlayers",theme:null,controls:[new OpenLayers.Control.Attribution(),new OpenLayers.Control.TouchNavigation({dragPanOptions:{interval:100,enableKinetic:true}}),new OpenLayers.Control.ZoomPanel()]})}else{bb.INCLUIBOTAO.zoomli=true;bb.INCLUIBOTAO.pan=true;bb.INCLUIBOTAO.zoomtot=true;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,layersn,openlayers=i3GEO.Interface.openlayers;i3GEO.util.multiStep([openlayers.registraEventos,openlayers.zoom2ext],[null,[i3GEO.parametros.mapexten]],function(){});openlayers.criaLayers();if(openlayers.GADGETS.PanZoomBar===true){i3GEO.Interface.openlayers.OLpanzoombar=new OpenLayers.Control.PanZoomBar();i3geoOL.addControl(i3GEO.Interface.openlayers.OLpanzoombar);i3GEO.Interface.openlayers.OLpanzoombar.div.style.zIndex=5000;i3GEO.Interface.openlayers.OLpanzoombar.div.style.top=i3GEO.Interface.BARRADEZOOMTOP+"px";i3GEO.Interface.openlayers.OLpanzoombar.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+"px"}if(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<layersn;i++){texto="<input type=radio style='"+estilo+"' onclick='i3GEO.Interface.openlayers.ativaFundo(this.value)' name=i3GEObaseLayer value='"+layers[i].id+"' />"+layers[i].name;temp.propriedades.push({text:texto,url:""})}i3GEO.util.arvore("<b>"+$trad("p16")+"</b>","listaLayersBase",temp)}else{if(openlayers.GADGETS.LayerSwitcher===true){i3geoOL.addControl(new OpenLayers.Control.LayerSwitcher())}}if(openlayers.GADGETS.ScaleLine===true){pz=new OpenLayers.Control.ScaleLine();i3geoOL.addControl(pz);pz.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+5+"px"}if(openlayers.GADGETS.OverviewMap===true){i3geoOL.addControl(new OpenLayers.Control.OverviewMap())}if(i3GEO.Interface.TABLET===false){i3GEO.Interface.openlayers.OLpan=new OpenLayers.Control.Navigation();i3GEO.Interface.openlayers.OLzoom=new OpenLayers.Control.ZoomBox();i3GEO.Interface.openlayers.OLpanel=new OpenLayers.Control.Panel();i3GEO.Interface.openlayers.OLpanel.addControls([i3GEO.Interface.openlayers.OLpan,i3GEO.Interface.openlayers.OLzoom]);i3geoOL.addControl(i3GEO.Interface.openlayers.OLpanel)}if(i3GEO.configura.mapaRefDisplay!=="none"){if(i3GEO.util.pegaCookie("i3GEO.configura.mapaRefDisplay")){i3GEO.configura.mapaRefDisplay=i3GEO.util.pegaCookie("i3GEO.configura.mapaRefDisplay")}if(i3GEO.configura.mapaRefDisplay==="block"){i3GEO.maparef.inicia()}}if(i3GEO.Interface.TABLET===false){i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLpan)}};i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.openlayers.ligaDesliga(this);i3GEO.eventos.executaEventos(i3GEO.eventos.ATUALIZAARVORECAMADAS);";i3GEO.util.multiStep([i3GEO.coordenadas.mostraCoordenadas,montaMapa,i3GEO.gadgets.mostraMenuSuspenso,i3GEO.ajuda.ativaLetreiro,i3GEO.idioma.mostraSeletor,i3GEO.gadgets.mostraEscalaNumerica,i3GEO.util.arvore,i3GEO.gadgets.mostraMenuLista,i3GEO.Interface.ativaBotoes],[null,null,null,[i3GEO.parametros.mensagens],null,null,["<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa],null,null],function(){});i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===true){i3GEO.Interface.openlayers.adicionaListaKml()}if(i3GEO.parametros.kmlurl!==""){i3GEO.Interface.openlayers.adicionaKml(true,i3GEO.parametros.kmlurl)}},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.openlayers.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i,zoom;if(!$i("arvoreCamadasKml")){i3GEO.Interface.openlayers.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=true}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===false){i3GEO.arvoreDeCamadas.MOSTRALISTAKML=true;i3GEO.Interface.openlayers.criaArvoreKML()}i3GEO.Interface.openlayers.adicionaNoArvoreKml(url,titulo,ativo,ngeoxml)},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.openlayers.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.openlayers.ARVORE.getRoot();titulo="<table><tr><td><b>Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false;if(i3GEO.parametros.editor==="sim"){d=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/webservices.html' target=blank >Editar cadastro</a>",idmenu:"",enableHighlight:false,expanded:false},node)}},adicionaNoArvoreKml:function(url,nomeOverlay,ativo,id){var root,node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.openlayers.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}root=i3GEO.Interface.openlayers.ARVORE.getRoot();node=i3GEO.Interface.openlayers.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.openlayers.ativaDesativaCamadaKml(this,\""+url+"\")' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";if(navm){estilo="cursor:default;vertical-align:35%;padding-top:0px;"}else{estilo="cursor:default;vertical-align:top;"}html+="&nbsp;<span style='"+estilo+"'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.openlayers.ARVORE.draw();i3GEO.Interface.openlayers.ARVORE.collapseAll();node.expand();if(ativo===true){i3GEO.Interface.openlayers.insereLayerKml(id,url)}},insereLayerKml:function(id,url){var temp;eval(id+" = new OpenLayers.Layer.Vector('"+id+"', {displayOutsideMaxExtent:true,displayInLayerSwitcher:false,visibility:true, strategies: [new OpenLayers.Strategy.Fixed()],protocol: new OpenLayers.Protocol.HTTP({url: '"+url+"',format: new OpenLayers.Format.KML({extractStyles: true,extractAttributes: true,maxDepth: 5})})})");eval("i3geoOL.addLayer("+id+");");eval("temp = "+id+".div;");temp.onclick=function(e){var targ,id,temp,features,n,i,j,html="";if(!e){e=window.event}if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}temp=targ.id.split("_");if(temp[0]==="OpenLayers.Geometry.Point"){id=targ.id;temp=i3geoOL.getLayer(this.id);features=temp.features;n=features.length;for(i=0;i<n;i++){if(features[i].geometry.id===id){for(j in features[i].attributes){html+=j+": "+features[i].attributes[j]}g=features[i].geometry;i3geoOL.addPopup(new OpenLayers.Popup.FramedCloud("kml",new OpenLayers.LonLat(g.x,g.y),null,html,null,true))}}}}},ativaDesativaCamadaKml:function(obj,url){if(!obj.checked){eval(obj.value+".setVisibility(false);")}else{if(!(i3geoOL.getLayersByName(obj.value)[0])){i3GEO.Interface.openlayers.insereLayerKml(obj.value,url)}else{eval(obj.value+".setVisibility(true);")}}},criaLayers:function(){var configura=i3GEO.configura,url=configura.locaplic+"/classesphp/mapa_openlayers.php?g_sid="+i3GEO.configura.sid+"&TIPOIMAGEM="+configura.tipoimagem,urlfundo=configura.locaplic+"/classesphp/mapa_openlayers.php?g_sid="+i3GEO.configura.sid+"&layer=&tipolayer=fundo&TIPOIMAGEM="+configura.tipoimagem,nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,layer,layers,camada,urllayer,opcoes,i,n,temp,fundoIsBase=true;try{temp=i3GEO.Interface.openlayers.LAYERSADICIONAIS;n=temp.length;for(i=0;i<n;i++){if(temp[i].isBaseLayer===true&&temp[i].visibility===true){fundoIsBase=false}}}catch(e){}if(i3geoOL.getLayersByName("Nenhum").length===0&&fundoIsBase===true){layer=new OpenLayers.Layer.WMS("Nenhum",urlfundo,{map_imagetype:i3GEO.Interface.OUTPUTFORMAT},{ratio:1,singleTile:true,isBaseLayer:true,opacity:1,visibility:true});i3geoOL.addLayer(layer)}opcoes={gutter:0,isBaseLayer:false,displayInLayerSwitcher:false,opacity:1,singleTile:!(i3GEO.Interface.openlayers.TILES),ratio:1,buffer:i3GEO.Interface.openlayers.BUFFER,wrapDateLine:true,transitionEffect:"resize",eventListeners:{"loadstart":i3GEO.Interface.openlayers.loadStartLayer,"loadend":i3GEO.Interface.openlayers.loadStopLayer}};for(i=nlayers-1;i>=0;i--){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];if(i3geoOL.getLayersByName(camada.name).length===0){urllayer=url+"&layer="+camada.name+"&r="+Math.random();try{temp=camada.type===0?opcoes.gutter=20:opcoes.gutter=0;temp=camada.transitioneffect==="nao"?opcoes.transitionEffect="null":opcoes.transitionEffect="resize";if(camada.connectiontype===7&&camada.wmsurl!==""&&camada.usasld.toLowerCase()!="sim"){urllayer=camada.wmsurl+"&r="+Math.random();layer=new OpenLayers.Layer.WMS(camada.name,urllayer,{LAYERS:camada.name,format:camada.wmsformat,transparent:true},opcoes);if(camada.wmssrs!=""){layer.url=layer.url+"&SRS="+camada.wmssrs+"&CRS="+camada.wmssrs}}else{if(camada.tiles==="nao"||camada.escondido.toLowerCase()==="sim"||camada.connectiontype===10||camada.type===0||camada.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,{LAYERS:camada.name,map_imagetype:i3GEO.Interface.OUTPUTFORMAT},opcoes)}}catch(e){}if(camada.escondido.toLowerCase()==="sim"){layer.transitionEffect="null"}i3geoOL.addLayer(layer)}else{layer=i3geoOL.getLayersByName(camada.name)[0]}temp=camada.status==0?layer.setVisibility(false):layer.setVisibility(true)}try{i3geoOL.addLayers(i3GEO.Interface.openlayers.LAYERSADICIONAIS)}catch(e){}},sobeLayersGraficos:function(){var nlayers=i3geoOL.getNumLayers(),layers=i3geoOL.layers,i;for(i=0;i<nlayers;i++){if(layers[i].CLASS_NAME=="OpenLayers.Layer.Vector"){i3geoOL.raiseLayer(i3geoOL.layers[i],nlayers)}}},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}i3GEO.Interface.openlayers.removeTodosOsLayers();i3GEO.Interface.openlayers.criaLayers()},removeTodosOsLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,layer,i,camada;for(i=nlayers-1;i>=0;i--){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];layer=i3geoOL.getLayersByName(camada.name)[0];i3geoOL.removeLayer(layer,false)}},alteraParametroLayers:function(parametro,valor){var layers=i3geoOL.layers,nlayers=layers.length,i,url,reg;for(i=0;i<nlayers;i+=1){url=layers[i].url;reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");layers[i].url=url.replace(reg,"");eval("layers[i].mergeNewParams({"+parametro+":valor})");layers[i].redraw()}},loadStartLayer:function(event){i3GEO.Interface.STATUS.atualizando.push(event.object.name);YAHOO.util.Dom.setStyle("ArvoreTituloTema"+event.object.name,"background",i3GEO.Interface.openlayers.FUNDOTEMA)},loadStopLayer:function(event){i3GEO.Interface.STATUS.atualizando.remove(event.object.name);YAHOO.util.Dom.setStyle("ArvoreTituloTema"+event.object.name,"background","")},ordenaLayers:function(){var ordem=i3GEO.arvoreDeCamadas.CAMADAS,nordem=ordem.length,layer,layers,i,maiorindice;layers=i3geoOL.layers;maiorindice=i3geoOL.getLayerIndex(layers[(layers.length)-1]);for(i=nordem-1;i>=0;i--){layers=i3geoOL.getLayersByName(ordem[i].name);layer=layers[0];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));i3GEO.Interface.openlayers.OLpanzoombar.div.style.top=i3GEO.Interface.BARRADEZOOMTOP+"px";i3GEO.Interface.openlayers.OLpanzoombar.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+"px"},atualizaMapa:function(){var layers=i3geoOL.layers,nlayers=layers.length,i;for(i=0;i<nlayers;i++){layers[i].mergeNewParams({r:Math.random()});layers[i].url=layers[i].url.replace("&&&&&&&&&&&&&&","");layers[i].url=layers[i].url+"&&";if(layers[i].visibility===true){layers[i].redraw()}}},atualizaTema:function(retorno,tema){var layer=i3geoOL.getLayersByName(tema)[0];if(layer&&layer!=undefined){layer.mergeNewParams({r:Math.random()});layer.url=layer.url.replace("&&&&&&&&&&&&&&","");layer.url=layer.url+"&&";layer.redraw()}if(retorno===""){return}i3GEO.Interface.openlayers.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},registraEventos:function(){i3GEO.eventos.ativa($i("openlayers"));i3geoOL.events.register("moveend",i3geoOL,function(e){i3GEO.Interface.openlayers.recalcPar();i3GEO.eventos.navegaMapa()});i3geoOL.events.register("mousemove",i3geoOL,function(e){var p,lonlat,d,dc,imgp,targ,pos,mousex,mousey;p=e.xy;lonlat=i3geoOL.getLonLatFromPixel(p);if(!lonlat){return}d=i3GEO.calculo.dd2dms(lonlat.lon,lonlat.lat);try{objposicaocursor.ddx=lonlat.lon;objposicaocursor.ddy=lonlat.lat;objposicaocursor.dmsx=d[0];objposicaocursor.dmsy=d[1];objposicaocursor.imgx=p.x;objposicaocursor.imgy=p.y;pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));objposicaocursor.telax=p.x+pos[0];objposicaocursor.telay=p.y+pos[1]}catch(e){}})},ativaBotoes:function(){var imagemxy,x1,y1,x2,y2;imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){x2=imagemxy[0]+i3GEO.Interface.BARRABOTOESLEFT;y2=imagemxy[1]+i3GEO.Interface.BARRABOTOESTOP}if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","i3geo_barra2",false,x2,y2)}if(i3GEO.configura.visual!=="default"){i3GEO.gadgets.visual.troca(i3GEO.configura.visual)}i3GEO.barraDeBotoes.ativaBotoes()},recalcPar:function(){var bounds=i3geoOL.getExtent().toBBOX().split(","),escalaAtual=i3geoOL.getScale();if(i3GEO.parametros.mapscale!==escalaAtual){i3GEO.arvoreDeCamadas.atualizaFarol(escalaAtual)}i3GEO.parametros.mapexten=bounds[0]+" "+bounds[1]+" "+bounds[2]+" "+bounds[3];i3GEO.parametros.mapscale=escalaAtual;i3GEO.parametros.pixelsize=i3geoOL.getResolution();try{atualizaEscalaNumerica(parseInt(escalaAtual,10))}catch(e){}},zoom2ext:function(ext){var m,b;m=ext.split(" ");b=new OpenLayers.Bounds(m[0],m[1],m[2],m[3]);i3geoOL.zoomToExtent(b)},pan2ponto:function(x,y){i3geoOL.panTo(new OpenLayers.LonLat(x,y))}},googlemaps:{OPACIDADE:0.8,TIPOMAPA:"terrain",ZOOMSCALE:[591657550,295828775,147914387,73957193,36978596,18489298,9244649,4622324,2311162,1155581,577790,288895,144447,72223,36111,18055,9027,4513,2256,1128],PARAMETROSLAYER:"&TIPOIMAGEM="+i3GEO.configura.tipoimagem,posfixo:0,atualizaTema:function(retorno,tema){var indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(tema);i3GeoMap.overlayMapTypes.removeAt(indice);i3GEO.Interface.googlemaps.posfixo+=1;i3GEO.Interface.googlemaps.insereLayer(tema,indice);if(retorno===""){return}i3GEO.Interface.googlemaps.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},redesenha:function(){i3GEO.Interface.googlemaps.posfixo+=1;var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(camada.name);if(indice!==false){try{i3GeoMap.overlayMapTypes.removeAt(indice)}catch(e){}}}i3GEO.Interface.googlemaps.criaLayers()},cria:function(w,h){var i,f,ins,js;posfixo="&nd=0";i=$i(i3GEO.Interface.IDCORPO);if(i){f=$i("googlemapsdiv");if(!f){ins='<div id=googlemapsdiv style="width:0px;height:0px;text-align:left;background-image:url('+i3GEO.configura.locaplic+'/imagens/i3geo1bw.jpg)"></div>';i.innerHTML=ins}f=$i("googlemapsdiv");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.ativaBotoes();i3GEO.eventos.ativa($i(i3GEO.Interface.IDMAPA));i3GEO.coordenadas.mostraCoordenadas();i3GEO.gadgets.mostraEscalaNumerica();i3GEO.gadgets.mostraMenuSuspenso();i3GEO.gadgets.mostraMenuLista();i3GEO.idioma.mostraSeletor();g_operacao="";g_tipoacao="";i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.googlemaps.ligaDesliga(this)";i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);i3GEO.util.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===true){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<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(camada.name);if(!indice){if(camada.status!=0){i3GEO.Interface.googlemaps.insereLayer(camada.name,0)}}}},criaImageMap:function(nomeLayer){var i3GEOTileO,s;s="i3GEOTileO = new google.maps.ImageMapType({ "+"getTileUrl: function(coord, zoom) {"+" var url = '"+i3GEO.configura.locaplic+"/classesphp/mapa_googlemaps.php?g_sid="+i3GEO.configura.sid+"&Z=' + zoom + '&X=' + coord.x + '&Y=' + coord.y + '&layer="+nomeLayer+i3GEO.Interface.googlemaps.PARAMETROSLAYER+'&r='+Math.random()+"';"+" return url+'&nd='+i3GEO.Interface.googlemaps.posfixo; "+"}, "+"tileSize: new google.maps.Size(256, 256),"+"isPng: true,"+"name: '"+nomeLayer+"'"+"});";eval(s);return i3GEOTileO},insereLayer:function(nomeLayer,indice){var i=i3GEO.Interface.googlemaps.criaImageMap(nomeLayer);i3GeoMap.overlayMapTypes.insertAt(indice,i)},registraEventos:function(){var pos;google.maps.event.addListener(i3GeoMap,"dragstart",function(){g_operacao="";g_tipoacao=""});google.maps.event.addListener(i3GeoMap,"dragend",function(){i3GEO.Interface.googlemaps.recalcPar();i3GEO.eventos.navegaMapa()});google.maps.event.addListener(i3GeoMap,"tilesloaded",function(){i3GEO.Interface.googlemaps.recalcPar()});google.maps.event.addListener(i3GeoMap,"bounds_changed",function(){i3GEO.Interface.googlemaps.recalcPar();g_operacao="";g_tipoacao="";i3GEO.eventos.navegaMapa()});pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));google.maps.event.addListener(i3GeoMap,"mousemove",function(ponto){var teladms,tela;ponto=ponto.latLng;teladms=i3GEO.calculo.dd2dms(ponto.lng(),ponto.lat());tela=i3GeoMapOverlay.getProjection().fromLatLngToContainerPixel(ponto);objposicaocursor={ddx:ponto.lng(),ddy:ponto.lat(),dmsx:teladms[0],dmsy:teladms[1],imgx:tela.x,imgy:tela.y,telax:tela.x+pos[0],telay:tela.y+pos[1]}})},retornaIndiceLayer:function(nomeLayer){var i=false;try{i3GeoMap.overlayMapTypes.forEach(function(elemento,number){if(elemento.name===nomeLayer){i=number}});return i}catch(e){return false}},retornaObjetoLayer:function(nomeLayer){var i=false;try{i3GeoMap.overlayMapTypes.forEach(function(elemento,number){if(elemento.name===nomeLayer){i=elemento}});return i}catch(e){return false}},retornaDivLayer:function(nomeLayer){var i=false,divmapa=$i("googlemapsdiv"),divlayer=divmapa.firstChild.firstChild.firstChild.getElementsByTagName("div"),divs,divimg,j,ndivs=divlayer.length;for(j=0;j<ndivs;j++){divimg=divlayer[j].getElementsByTagName("img");if(divimg.length>0){if(divimg[0].src.search("&layer="+nomeLayer+"&")>0){return divimg[0].parentNode.parentNode.parentNode}}}},ligaDesliga:function(obj){var indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(obj.value),temp=function(){i3GEO.mapa.legendaHTML.atualiza()},desligar="",ligar="";if(obj.checked&&!indice){ligar=obj.value;i3GEO.Interface.googlemaps.insereLayer(obj.value,0);i3GEO.arvoreDeCamadas.alteraPropCamadas("status","2",obj.value)}else{if(indice!==false){desligar=obj.value;i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value);i3GeoMap.overlayMapTypes.removeAt(indice)}}if(desligar!==""||ligar!==""){i3GEO.php.ligatemas(temp,desligar,ligar)}},bbox:function(){var bd,so,ne,bbox;bd=i3GeoMap.getBounds();so=bd.getSouthWest();ne=bd.getNorthEast();bbox=so.lng()+" "+so.lat()+" "+ne.lng()+" "+ne.lat();return(bbox)},ativaBotoes:function(){var imagemxy,x1,y1,x2,y2;imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){x2=imagemxy[0]+i3GEO.Interface.BARRABOTOESLEFT;y2=imagemxy[1]+i3GEO.Interface.BARRABOTOESTOP}if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","i3geo_barra2",false,x2,y2)}if(i3GEO.configura.visual!=="default"){i3GEO.gadgets.visual.troca(i3GEO.configura.visual)}i3GEO.barraDeBotoes.ativaBotoes()},mudaOpacidade:function(valor){i3GEO.Interface.googlemaps.OPACIDADE=valor/200;i3GEO.Interface.googlemaps.redesenha()},recalcPar:function(){try{var bounds,sw,ne,escalaAtual=i3GEO.parametros.mapscale;sw=i3GeoMap.getBounds().getSouthWest();ne=i3GeoMap.getBounds().getNorthEast();i3GEO.parametros.mapexten=sw.lng()+" "+sw.lat()+" "+ne.lng()+" "+ne.lat();i3GEO.parametros.mapscale=i3GEO.Interface.googlemaps.calcescala();sw=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(0,1));ne=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(1,0));i3GEO.parametros.pixelsize=sw.lng()-ne.lng();if(i3GEO.parametros.pixelsize<0){i3GEO.parametros.pixelsize=i3GEO.parametros.pixelsize*-1}if(i3GEO.parametros.mapscale!==escalaAtual&&escalaAtual!==0){i3GEO.arvoreDeCamadas.atualizaFarol(i3GEO.parametros.mapscale)}}catch(e){i3GEO.parametros.mapexten="0 0 0 0";i3GEO.parametros.mapscale=0}},calcescala:function(){var zoom=i3GeoMap.getZoom();return(i3GEO.Interface.googlemaps.ZOOMSCALE[zoom])},escala2nzoom:function(escala){var n,i;n=i3GEO.Interface.googlemaps.ZOOMSCALE.length;for(i=0;i<n;i++){if(i3GEO.Interface.googlemaps.ZOOMSCALE[i]<escala){return(i)}}},zoom2extent:function(mapexten){var pol,ret,pt1,pt2,sw,ne,z;pol=mapexten;ret=pol.split(" ");pt1=(((ret[0]*-1)-(ret[2]*-1))/2)+ret[0]*1;pt2=(((ret[1]-ret[3])/2)*-1)+ret[1]*1;sw=new google.maps.LatLng(ret[1],ret[0]);ne=new google.maps.LatLng(ret[3],ret[2]);i3GeoMap.fitBounds(new google.maps.LatLngBounds(sw,ne))},pan2ponto:function(x,y){i3GeoMap.panTo(new google.maps.LatLng(y,x))},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i,zoom;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googlemaps.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=true}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===false){i3GEO.arvoreDeCamadas.MOSTRALISTAKML=true;i3GEO.Interface.googlemaps.criaArvoreKML()}i3GEO.Interface.googlemaps.adicionaNoArvoreGoogle(url,titulo,ativo,ngeoxml)},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.googlemaps.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaNoArvoreGoogle:function(url,nomeOverlay,ativo,id){var root,node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googlemaps.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}root=i3GEO.Interface.googlemaps.ARVORE.getRoot();node=i3GEO.Interface.googlemaps.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.googlemaps.ativaDesativaCamadaKml(this,\""+url+"\")' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";if(navm){estilo="cursor:default;vertical-align:35%;padding-top:0px;"}else{estilo="cursor:default;vertical-align:top;"}html+="&nbsp;<span style='"+estilo+"'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.googlemaps.ARVORE.draw();i3GEO.Interface.googlemaps.ARVORE.collapseAll();node.expand();if(ativo===true){eval(id+" = new google.maps.KmlLayer('"+url+"',{map:i3GeoMap,preserveViewport:true});")}},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.googlemaps.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.googlemaps.ARVORE.getRoot();titulo="<table><tr><td><b>Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false;if(i3GEO.parametros.editor==="sim"){d=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/webservices.html' target=blank >Editar cadastro</a>",idmenu:"",enableHighlight:false,expanded:false},node)}},ativaDesativaCamadaKml:function(obj,url){if(!obj.checked){eval(obj.value+".setMap(null);")}else{eval(obj.value+" = new google.maps.KmlLayer(url,{map:i3GeoMap,preserveViewport:true});")}},alteraParametroLayers:function(parametro,valor){parametro=parametro.toUpperCase();var reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");i3GEO.Interface.googlemaps.PARAMETROSLAYER=i3GEO.Interface.googlemaps.PARAMETROSLAYER.replace(reg,"");i3GEO.Interface.googlemaps.PARAMETROSLAYER+="&"+parametro+"="+valor;i3GEO.Interface.googlemaps.redesenha()}},googleearth:{PARAMETROSLAYER:"&TIPOIMAGEM="+i3GEO.configura.tipoimagem,posfixo:"",GADGETS:{setMouseNavigationEnabled:true,setStatusBarVisibility:true,setOverviewMapVisibility:true,setScaleLegendVisibility:true,setAtmosphereVisibility:true,setGridVisibility:false,getSun:false,LAYER_BORDERS:true,LAYER_BUILDINGS:false,LAYER_ROADS:false,LAYER_TERRAIN:true},POSICAOTELA:[0,0],aguarde:"",ligaDesliga:function(obj){var layer=i3GEO.Interface.googleearth.retornaObjetoLayer(obj.value),temp=function(){i3GEO.mapa.legendaHTML.atualiza()},desligar="",ligar="";if(obj.checked){i3GEO.arvoreDeCamadas.alteraPropCamadas("status","2",obj.value);ligar=obj.value}else{i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value);desligar=obj.value}layer.setVisibility(obj.checked);if(desligar!==""||ligar!==""){i3GEO.php.ligatemas(temp,desligar,ligar)}},atualizaTema:function(retorno,tema){var layer=i3GEO.Interface.googleearth.retornaObjetoLayer(tema),hr=layer.getLink().getHref();hr=hr.replace("&&&&&","");layer.getLink().setHref(hr+"&");if(retorno===""){return}i3GEO.Interface.googleearth.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},redesenha:function(){i3GEO.Interface.googleearth.posfixo+="&";var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googleearth.retornaObjetoLayer(camada.name);if(indice!==false){try{i3GeoMap.getFeatures().removeChild(indice)}catch(e){}}}i3GEO.Interface.googleearth.criaLayers()},cria:function(w,h){var i,i3GeoMap3d,i3GeoMap,texto;i3GEO.configura.listaDePropriedadesDoMapa={"propriedades":[{text:"p2",url:"javascript:i3GEO.mapa.dialogo.tipoimagem()"},{text:"p3",url:"javascript:i3GEO.mapa.dialogo.opcoesLegenda()"},{text:"p4",url:"javascript:i3GEO.mapa.dialogo.opcoesEscala()"},{text:"p8",url:"javascript:i3GEO.mapa.dialogo.queryMap()"},{text:"p9",url:"javascript:i3GEO.mapa.dialogo.corFundo()"},{text:"p10",url:"javascript:i3GEO.mapa.dialogo.gradeCoord()"}]};texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setMouseNavigationEnabled===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setMouseNavigationEnabled(this.checked)'";texto+="> "+$trad("ge1");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setStatusBarVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setStatusBarVisibility(this.checked)'";texto+="> "+$trad("ge2");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setOverviewMapVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setOverviewMapVisibility(this.checked)'";texto+="> "+$trad("ge3");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setScaleLegendVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setScaleLegendVisibility(this.checked)'";texto+="> "+$trad("ge4");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setAtmosphereVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setAtmosphereVisibility(this.checked)'";texto+="> "+$trad("ge5");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setGridVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setGridVisibility(this.checked)'";texto+="> "+$trad("ge6");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.getSun===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getSun().setVisibility(this.checked)'";texto+="> "+$trad("ge7");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_BORDERS===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_BORDERS, i3GEO.Interface.checked)'";texto+="> "+$trad("ge8");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_BUILDINGS===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_BUILDINGS, i3GEO.Interface.checked)'";texto+="> "+$trad("ge9");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_ROADS===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_ROADS, i3GEO.Interface.checked)'";texto+="> "+$trad("ge10");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_TERRAIN===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_TERRAIN, i3GEO.Interface.checked)'";texto+="> "+$trad("ge11");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});i3GEO.util.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa);i3GEO.barraDeBotoes.INCLUIBOTAO.zoomli=false;i3GEO.barraDeBotoes.INCLUIBOTAO.pan=false;i3GEO.barraDeBotoes.INCLUIBOTAO.zoomtot=false;i3GEO.Interface.IDMAPA="i3GeoMap3d";i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.googleearth.ligaDesliga(this)";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)}i3GeoMap=null;google.load("earth","1")},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.gadgets.mostraMenuLista();i3GEO.Interface.googleearth.ativaBotoes();i3GEO.gadgets.mostraInserirKml("inserirKml");if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===true){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<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googleearth.retornaIndiceLayer(camada.name);layer=i3GEO.Interface.googleearth.retornaObjetoLayer(camada.name);if(indice===false){layer=i3GEO.Interface.googleearth.insereLayer(camada.name)}try{if(camada.status!=0){layer.setVisibility(true)}else{layer.setVisibility(false)}}catch(e){}}},insereLayer:function(nomeLayer){var kmlUrl=i3GEO.configura.locaplic+"/classesphp/mapa_googleearth.php?REQUEST=GetKml&g_sid="+i3GEO.configura.sid+"&layer="+nomeLayer+i3GEO.Interface.googleearth.PARAMETROSLAYER+"&r="+Math.random(),linki3geo=i3GeoMap.createLink(''),nl=i3GeoMap.createNetworkLink('');linki3geo.setHref(kmlUrl+i3GEO.Interface.googleearth.posfixo);nl.setLink(linki3geo);nl.setFlyToView(false);nl.setName(nomeLayer);i3GeoMap.getFeatures().appendChild(nl);return nl},retornaIndiceLayer:function(nomeLayer){var n=i3GeoMap.getFeatures().getChildNodes().getLength(),indice=false;for(i=0;i<n;i++){if(i3GeoMap.getFeatures().getChildNodes().item(i).getName()===nomeLayer){indice=i}}return indice},retornaObjetoLayer:function(nomeLayer){var n=i3GeoMap.getFeatures().getChildNodes().getLength(),indice=false,i;for(i=0;i<n;i++){if(i3GeoMap.getFeatures().getChildNodes().item(i).getName()===nomeLayer){indice=i3GeoMap.getFeatures().getChildNodes().item(i)}}return indice},registraEventos:function(){google.earth.addEventListener(i3GeoMap.getView(),"viewchangeend",function(e){i3GEO.Interface.googleearth.recalcPar()});google.earth.addEventListener(i3GeoMap.getGlobe(),'mousemove',function(event){d=i3GEO.calculo.dd2dms(event.getLongitude(),event.getLatitude());objposicaocursor={ddx:event.getLongitude(),ddy:event.getLatitude(),dmsx:d[0],dmsy:d[1],imgx:event.getClientX(),imgy:event.getClientY(),telax:event.getClientX()+i3GEO.Interface.googleearth.POSICAOTELA[0],telay:event.getClientY()+i3GEO.Interface.googleearth.POSICAOTELA[1]};i3GEO.eventos.mousemoveMapa()});google.earth.addEventListener(i3GeoMap.getGlobe(),'click',function(event){if(i3GEO.Interface.googleearth.aguarde.visibility==="hidden"){i3GEO.eventos.mousecliqueMapa()}else{i3GEO.Interface.googleearth.aguarde.visibility="hidden"}})},recalcPar:function(){var bounds;bounds=i3GeoMap.getView().getViewportGlobeBounds();i3GEO.parametros.mapexten=bounds.getWest()+" "+bounds.getSouth()+" "+bounds.getEast()+" "+bounds.getNorth()},falha:function(){alert("Falhou. Vc precisa do plugin instalado")},ativaBotoes:function(){var cabecalho=function(){i3GEO.barraDeBotoes.ativaIcone("")},minimiza=function(){i3GEO.janela.minimiza("i3GEOF.ferramentasGE")},janela=i3GEO.janela.cria("230px","110px","","","","Ferramentas","i3GEOF.ferramentasGE",false,"hd",cabecalho,minimiza);i3GEO.barraDeBotoes.TEMPLATEBOTAO='<div style="display:inline;background-color:rgb(250,250,250);"><img src="'+i3GEO.configura.locaplic+'/imagens/branco.gif" id="$$"/></div>&nbsp;';i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","",false,"200","200",janela[2].id);i3GEO.barraDeBotoes.ativaBotoes();i3GEO.Interface.googleearth.aguarde=$i("i3GEOF.ferramentasGE_imagemCabecalho").style;$i("i3GEOF.ferramentasGE_minimizaCabecalho").style.right="0px";$i("i3GEOF.ferramentasGE").lastChild.style.display="none";i3GEO.ajuda.abreJanela()},balao:function(texto,ddx,ddy){var placemark=i3GeoMap.createPlacemark(''),point=i3GeoMap.createPoint(''),b;point.setLatitude(ddy);point.setLongitude(ddx);placemark.setGeometry(point);b=i3GeoMap.createHtmlStringBalloon('');b.setContentString("<div style=text-align:left >"+texto+"</div>");b.setFeature(placemark);i3GeoMap.setBalloon(b)},insereMarca:function(description,ddx,ddy,name,snippet){var placemark=i3GeoMap.createPlacemark(''),point=i3GeoMap.createPoint('');placemark.setName(name);point.setLatitude(ddy);point.setLongitude(ddx);placemark.setGeometry(point);if(description!==""){placemark.setDescription(description)}placemark.setSnippet(snippet);i3GeoMap.getFeatures().appendChild(placemark)},insereCirculo:function(centerLng,centerLat,radius,name,snippet){function makeCircle(centerLat,centerLng,radius){var ring=i3GeoMap.createLinearRing(''),steps=25,i,pi2=Math.PI*2,lat,lng;for(i=0;i<steps;i++){lat=centerLat+radius*Math.cos(i/steps*pi2);lng=centerLng+radius*Math.sin(i/steps*pi2);ring.getCoordinates().pushLatLngAlt(lat,lng,0)}return ring}var polygonPlacemark=i3GeoMap.createPlacemark(''),poly=i3GeoMap.createPolygon(''),outer,polyStyle;poly.setAltitudeMode(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND);polygonPlacemark.setGeometry(poly);outer=i3GeoMap.createLinearRing('');polygonPlacemark.getGeometry().setOuterBoundary(makeCircle(centerLat,centerLng,radius));polygonPlacemark.setName(name);polygonPlacemark.setSnippet(snippet);polygonPlacemark.setStyleSelector(i3GeoMap.createStyle(''));polyStyle=polygonPlacemark.getStyleSelector().getPolyStyle();polyStyle.setFill(0);i3GeoMap.getFeatures().appendChild(polygonPlacemark)},insereLinha:function(xi,yi,xf,yf,name,snippet){var lineStringPlacemark=i3GeoMap.createPlacemark(''),lineString,lineStyle;lineStringPlacemark.setName(name);lineString=i3GeoMap.createLineString('');lineString.setAltitudeMode(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND);lineStringPlacemark.setGeometry(lineString);lineString.getCoordinates().pushLatLngAlt(yi,xi,0);lineString.getCoordinates().pushLatLngAlt(yf,xf,0);lineStringPlacemark.setStyleSelector(i3GeoMap.createStyle(''));lineStringPlacemark.setSnippet(snippet);lineStyle=lineStringPlacemark.getStyleSelector().getLineStyle();lineStyle.setWidth(3);i3GeoMap.getFeatures().appendChild(lineStringPlacemark)},removePlacemark:function(nome){var features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i,nfeatures=[];for(i=0;i<n;i++){try{if(features.getChildNodes().item(i).getName()===nome||features.getChildNodes().item(i).getDescription()===nome||features.getChildNodes().item(i).getSnippet()===nome){nfeatures.push(features.getChildNodes().item(i))}}catch(e){}}n=nfeatures.length;for(i=0;i<n;i++){features.removeChild(nfeatures[i])}},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i,zoom;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googleearth.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=false}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(arguments.length===2){ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);linki3geokml=i3GeoMap.createLink('');if(url.split("http").length===1){url=i3GEO.util.protocolo()+"://"+window.location.host+url}linki3geokml.setHref(url);eval(ngeoxml+" = i3GeoMap.createNetworkLink('')");eval(ngeoxml+".setLink(linki3geokml)");if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===false){i3GEO.arvoreDeCamadas.MOSTRALISTAKML=true;i3GEO.Interface.googleearth.criaArvoreKML()}i3GEO.Interface.googleearth.adicionaNoArvoreGoogle(url,titulo,ativo,ngeoxml)},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.googleearth.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaNoArvoreGoogle:function(url,nomeOverlay,ativo,id){var root,node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googleearth.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}root=i3GEO.Interface.googleearth.ARVORE.getRoot();node=i3GEO.Interface.googleearth.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.googleearth.ativaDesativaCamadaKml(this)' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";html+="&nbsp;<span style='cursor:move'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.googleearth.ARVORE.draw();i3GEO.Interface.googleearth.ARVORE.collapseAll();node.expand()},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.googleearth.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.googleearth.ARVORE.getRoot();titulo="<table><tr><td><b>Google Earth Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false;if(i3GEO.parametros.editor==="sim"){d=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/webservices.html' target=blank >Editar cadastro</a>",idmenu:"",enableHighlight:false,expanded:false},node)}},existeLink:function(url){var existe=false,features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i;for(i=0;i<n;i++){try{if(features.getChildNodes().item(i).getLink().getHref()===url){existe=true}}catch(e){}}return(existe)},ativaDesativaLink:function(url,valor){var features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i;for(i=0;i<n;i++){try{if(features.getChildNodes().item(i).getLink().getHref()===url){features.getChildNodes().item(i).setVisibility(valor)}}catch(e){}}},ativaDesativaCamadaKml:function(obj){var url=eval(obj.value+".getLink().getHref()"),existe=i3GEO.Interface.googleearth.existeLink(url);if(!obj.checked){i3GEO.Interface.googleearth.ativaDesativaLink(url,false)}else{if(existe===false){eval("i3GeoMap.getFeatures().appendChild("+obj.value+")")}else{i3GEO.Interface.googleearth.ativaDesativaLink(url,true)}}},zoom2extent:function(mapexten){var r=6378700,lng2,lng1,lat1,lat2,ret=mapexten.split(" "),fov=32,camera=i3GeoMap.getView().copyAsCamera(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND),dy,dx,d,dist,alt;lng2=(ret[0]*1);lng1=(ret[2]*1);lat1=(ret[1]*1);lat2=(ret[3]*1);camera.setLatitude((lat1+lat2)/2.0);camera.setLongitude((lng1+lng2)/2.0);camera.setHeading(0.0);camera.setTilt(0.0);dy=Math.max(lat1,lat2)-Math.min(lat1,lat2);dx=Math.max(lng1,lng2)-Math.min(lng1,lng2);d=Math.max(dy,dx);d=d*Math.PI/180.0;dist=r*Math.tan(d/2);alt=dist/(Math.tan(fov*Math.PI/180.0));camera.setAltitude(alt);i3GeoMap.getView().setAbstractView(camera)},alteraParametroLayers:function(parametro,valor){parametro=parametro.toUpperCase();var reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");i3GEO.Interface.googleearth.PARAMETROSLAYER=i3GEO.Interface.googleearth.PARAMETROSLAYER.replace(reg,"");i3GEO.Interface.googleearth.PARAMETROSLAYER+="&"+parametro+"="+valor;i3GEO.Interface.googleearth.redesenha()}}};
2 1 \ No newline at end of file
  2 +if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.Interface={TABLET:false,ALTTABLET:"openlayers_t.htm",OUTPUTFORMAT:"AGG_Q",BARRABOTOESTOP:12,BARRABOTOESLEFT:3,BARRADEZOOMTOP:7,BARRADEZOOMLEFT: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")}if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.adicionaKml("foo")}},cria:function(w,h){i3GEO.Interface[i3GEO.Interface.ATUAL].cria(w,h)},inicia:function(w,h){var temp=window.location.href.split("?")[0],gadgets=i3GEO.gadgets;if($i("i3GEOcompartilhar")){i3GEO.social.compartilhar("i3GEOcompartilhar",temp,temp,"semtotal")}gadgets.quadros.inicia(10);gadgets.quadros.grava("extensao",i3GEO.parametros.extentTotal);gadgets.mostraBuscaRapida();gadgets.mostraVersao();gadgets.mostraEmail();i3GEO.guias.cria();if($i("mst")){$i("mst").style.display="block"}if(i3GEO.configura.entorno.toLowerCase()==="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(){if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){i3GEO.barraDeBotoes.inicializaBarra()}else{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="<input style='position:relative;top:0px;left:0px;' type=image src='' id='img' />";$i(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:"&nbsp;<span class='container-close'></span>"},{text:"<img class='rosamais' style='height:18px;' src='"+$im("branco.gif")+"'><span style='position:relative;top:-4px;'> Aproxima</span>",onclick:{fn:i3GEO.navega.zoomin}},{text:"<img class='rosamenos' style='height:18px;' src='"+$im("branco.gif")+"'><span style='position:relative;top:-4px;'> Afasta</span>",onclick:{fn:i3GEO.navega.zoomout}},{text:"<img class='rosanorte' style='height:18px;' src='"+$im("branco.gif")+"'><span style='position:relative;top:-7px;'> Norte</span>",onclick:{fn:i3GEO.navega.panFixoNorte}},{text:"<img class='rosasul' style='height:18px;' src='"+$im("branco.gif")+"'><span style='position:relative;top:-7px;'> Sul</span>",onclick:{fn:i3GEO.navega.panFixoSul}},{text:"<img class='rosaleste' style='height:18px;' src='"+$im("branco.gif")+"'><span style='position:relative;top:-7px;'> Leste</span>",onclick:{fn:i3GEO.navega.panFixoLeste}},{text:"<img class='rosaoeste' style='height:18px;' src='"+$im("branco.gif")+"'><span style='position:relative;top:-7px;'> Oeste</span>",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();gadgets.mostraMenuLista();i3GEO.eventos.ativa(i);i3GEO.coordenadas.mostraCoordenadas();gadgets.mostraEscalaNumerica();gadgets.mostraEscalaGrafica();gadgets.visual.inicia();iu.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",configura.listaDePropriedadesDoMapa);i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,configura.sid,configura.locaplic);i3GEO.ajuda.ativaLetreiro(parametros.mensagens);i3GEO.Interface.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(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='<div id=flamingo style="width:0px;height:0px;text-align:left;background-image:url(/"'+i3GEO.configura.locaplic+'/imagens/i3geo1bw.jpg/")"></div>';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("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa)},ativaBotoes:function(){}},openlayers:{FUNDOTEMA:"yellow",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();openlayers.sobeLayersGraficos()},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='<div id=openlayers style="width:0px;height:0px;text-align:left;background-image:url('+i3GEO.configura.locaplic+'/imagens/i3geo1bw.jpg)"></div>';i.innerHTML=ins}f=$i("openlayers");f.style.width=w;f.style.height=h}i3GEO.Interface.IDMAPA="openlayers";if(i3GEO.Interface.TABLET===true){i3geoOL=new OpenLayers.Map({div:"openlayers",theme:null,controls:[new OpenLayers.Control.Attribution(),new OpenLayers.Control.TouchNavigation({dragPanOptions:{interval:100,enableKinetic:true}}),new OpenLayers.Control.ZoomPanel()]})}else{bb.INCLUIBOTAO.zoomli=true;bb.INCLUIBOTAO.pan=true;bb.INCLUIBOTAO.zoomtot=true;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,layersn,openlayers=i3GEO.Interface.openlayers;i3GEO.util.multiStep([openlayers.registraEventos,openlayers.zoom2ext],[null,[i3GEO.parametros.mapexten]],function(){});openlayers.criaLayers();if(openlayers.GADGETS.PanZoomBar===true){i3GEO.Interface.openlayers.OLpanzoombar=new OpenLayers.Control.PanZoomBar();i3geoOL.addControl(i3GEO.Interface.openlayers.OLpanzoombar);i3GEO.Interface.openlayers.OLpanzoombar.div.style.zIndex=5000;i3GEO.Interface.openlayers.OLpanzoombar.div.style.top=i3GEO.Interface.BARRADEZOOMTOP+"px";i3GEO.Interface.openlayers.OLpanzoombar.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+"px"}if(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<layersn;i++){texto="<input type=radio style='"+estilo+"' onclick='i3GEO.Interface.openlayers.ativaFundo(this.value)' name=i3GEObaseLayer value='"+layers[i].id+"' />"+layers[i].name;temp.propriedades.push({text:texto,url:""})}i3GEO.util.arvore("<b>"+$trad("p16")+"</b>","listaLayersBase",temp)}else{if(openlayers.GADGETS.LayerSwitcher===true){i3geoOL.addControl(new OpenLayers.Control.LayerSwitcher())}}if(openlayers.GADGETS.ScaleLine===true){pz=new OpenLayers.Control.ScaleLine();i3geoOL.addControl(pz);pz.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+5+"px"}if(openlayers.GADGETS.OverviewMap===true){i3geoOL.addControl(new OpenLayers.Control.OverviewMap())}if(i3GEO.Interface.TABLET===false){i3GEO.Interface.openlayers.OLpan=new OpenLayers.Control.Navigation();i3GEO.Interface.openlayers.OLzoom=new OpenLayers.Control.ZoomBox();i3GEO.Interface.openlayers.OLpanel=new OpenLayers.Control.Panel();i3GEO.Interface.openlayers.OLpanel.addControls([i3GEO.Interface.openlayers.OLpan,i3GEO.Interface.openlayers.OLzoom]);i3geoOL.addControl(i3GEO.Interface.openlayers.OLpanel)}if(i3GEO.configura.mapaRefDisplay!=="none"){if(i3GEO.util.pegaCookie("i3GEO.configura.mapaRefDisplay")){i3GEO.configura.mapaRefDisplay=i3GEO.util.pegaCookie("i3GEO.configura.mapaRefDisplay")}if(i3GEO.configura.mapaRefDisplay==="block"){i3GEO.maparef.inicia()}}if(i3GEO.Interface.TABLET===false){i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLpan)}i3GEO.Interface.ativaBotoes()};i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.openlayers.ligaDesliga(this);i3GEO.eventos.executaEventos(i3GEO.eventos.ATUALIZAARVORECAMADAS);";i3GEO.util.multiStep([i3GEO.coordenadas.mostraCoordenadas,montaMapa,i3GEO.gadgets.mostraMenuSuspenso,i3GEO.ajuda.ativaLetreiro,i3GEO.idioma.mostraSeletor,i3GEO.gadgets.mostraEscalaNumerica,i3GEO.util.arvore,i3GEO.gadgets.mostraMenuLista],[null,null,null,[i3GEO.parametros.mensagens],null,null,["<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa],null],function(){});i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===true){i3GEO.Interface.openlayers.adicionaListaKml()}if(i3GEO.parametros.kmlurl!==""){i3GEO.Interface.openlayers.adicionaKml(true,i3GEO.parametros.kmlurl)}},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.openlayers.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i,zoom;if(!$i("arvoreCamadasKml")){i3GEO.Interface.openlayers.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=true}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===false){i3GEO.arvoreDeCamadas.MOSTRALISTAKML=true;i3GEO.Interface.openlayers.criaArvoreKML()}i3GEO.Interface.openlayers.adicionaNoArvoreKml(url,titulo,ativo,ngeoxml)},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.openlayers.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.openlayers.ARVORE.getRoot();titulo="<table><tr><td><b>Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false;if(i3GEO.parametros.editor==="sim"){d=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/webservices.html' target=blank >Editar cadastro</a>",idmenu:"",enableHighlight:false,expanded:false},node)}},adicionaNoArvoreKml:function(url,nomeOverlay,ativo,id){var root,node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.openlayers.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}root=i3GEO.Interface.openlayers.ARVORE.getRoot();node=i3GEO.Interface.openlayers.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.openlayers.ativaDesativaCamadaKml(this,\""+url+"\")' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";if(navm){estilo="cursor:default;vertical-align:35%;padding-top:0px;"}else{estilo="cursor:default;vertical-align:top;"}html+="&nbsp;<span style='"+estilo+"'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.openlayers.ARVORE.draw();i3GEO.Interface.openlayers.ARVORE.collapseAll();node.expand();if(ativo===true){i3GEO.Interface.openlayers.insereLayerKml(id,url)}},insereLayerKml:function(id,url){var temp;eval(id+" = new OpenLayers.Layer.Vector('"+id+"', {displayOutsideMaxExtent:true,displayInLayerSwitcher:false,visibility:true, strategies: [new OpenLayers.Strategy.Fixed()],protocol: new OpenLayers.Protocol.HTTP({url: '"+url+"',format: new OpenLayers.Format.KML({extractStyles: true,extractAttributes: true,maxDepth: 5})})})");eval("i3geoOL.addLayer("+id+");");eval("temp = "+id+".div;");temp.onclick=function(e){var targ,id,temp,features,n,i,j,html="";if(!e){e=window.event}if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}temp=targ.id.split("_");if(temp[0]==="OpenLayers.Geometry.Point"){id=targ.id;temp=i3geoOL.getLayer(this.id);features=temp.features;n=features.length;for(i=0;i<n;i++){if(features[i].geometry.id===id){for(j in features[i].attributes){html+=j+": "+features[i].attributes[j]}g=features[i].geometry;i3geoOL.addPopup(new OpenLayers.Popup.FramedCloud("kml",new OpenLayers.LonLat(g.x,g.y),null,html,null,true))}}}}},ativaDesativaCamadaKml:function(obj,url){if(!obj.checked){eval(obj.value+".setVisibility(false);")}else{if(!(i3geoOL.getLayersByName(obj.value)[0])){i3GEO.Interface.openlayers.insereLayerKml(obj.value,url)}else{eval(obj.value+".setVisibility(true);")}}},criaLayers:function(){var configura=i3GEO.configura,url=configura.locaplic+"/classesphp/mapa_openlayers.php?g_sid="+i3GEO.configura.sid+"&TIPOIMAGEM="+configura.tipoimagem,urlfundo=configura.locaplic+"/classesphp/mapa_openlayers.php?g_sid="+i3GEO.configura.sid+"&layer=&tipolayer=fundo&TIPOIMAGEM="+configura.tipoimagem,nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,layer,layers,camada,urllayer,opcoes,i,n,temp,fundoIsBase=true;try{temp=i3GEO.Interface.openlayers.LAYERSADICIONAIS;n=temp.length;for(i=0;i<n;i++){if(temp[i].isBaseLayer===true&&temp[i].visibility===true){fundoIsBase=false}}}catch(e){}if(i3geoOL.getLayersByName("Nenhum").length===0&&fundoIsBase===true){layer=new OpenLayers.Layer.WMS("Nenhum",urlfundo,{map_imagetype:i3GEO.Interface.OUTPUTFORMAT},{ratio:1,singleTile:true,isBaseLayer:true,opacity:1,visibility:true});i3geoOL.addLayer(layer)}opcoes={gutter:0,isBaseLayer:false,displayInLayerSwitcher:false,opacity:1,singleTile:!(i3GEO.Interface.openlayers.TILES),ratio:1,buffer:i3GEO.Interface.openlayers.BUFFER,wrapDateLine:true,transitionEffect:"resize",eventListeners:{"loadstart":i3GEO.Interface.openlayers.loadStartLayer,"loadend":i3GEO.Interface.openlayers.loadStopLayer}};for(i=nlayers-1;i>=0;i--){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];if(i3geoOL.getLayersByName(camada.name).length===0){urllayer=url+"&layer="+camada.name+"&r="+Math.random();try{temp=camada.type===0?opcoes.gutter=20:opcoes.gutter=0;temp=camada.transitioneffect==="nao"?opcoes.transitionEffect="null":opcoes.transitionEffect="resize";if(camada.connectiontype===7&&camada.wmsurl!==""&&camada.usasld.toLowerCase()!="sim"){urllayer=camada.wmsurl+"&r="+Math.random();layer=new OpenLayers.Layer.WMS(camada.name,urllayer,{LAYERS:camada.name,format:camada.wmsformat,transparent:true},opcoes);if(camada.wmssrs!=""){layer.url=layer.url+"&SRS="+camada.wmssrs+"&CRS="+camada.wmssrs}}else{if(camada.tiles==="nao"||camada.escondido.toLowerCase()==="sim"||camada.connectiontype===10||camada.type===0||camada.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,{LAYERS:camada.name,map_imagetype:i3GEO.Interface.OUTPUTFORMAT},opcoes)}}catch(e){}if(camada.escondido.toLowerCase()==="sim"){layer.transitionEffect="null"}i3geoOL.addLayer(layer)}else{layer=i3geoOL.getLayersByName(camada.name)[0]}temp=camada.status==0?layer.setVisibility(false):layer.setVisibility(true)}try{i3geoOL.addLayers(i3GEO.Interface.openlayers.LAYERSADICIONAIS)}catch(e){}},sobeLayersGraficos:function(){var nlayers=i3geoOL.getNumLayers(),layers=i3geoOL.layers,i;for(i=0;i<nlayers;i++){if(layers[i].CLASS_NAME=="OpenLayers.Layer.Vector"){i3geoOL.raiseLayer(i3geoOL.layers[i],nlayers)}}},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}i3GEO.Interface.openlayers.removeTodosOsLayers();i3GEO.Interface.openlayers.criaLayers()},removeTodosOsLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,layer,i,camada;for(i=nlayers-1;i>=0;i--){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];layer=i3geoOL.getLayersByName(camada.name)[0];i3geoOL.removeLayer(layer,false)}},alteraParametroLayers:function(parametro,valor){var layers=i3geoOL.layers,nlayers=layers.length,i,url,reg;for(i=0;i<nlayers;i+=1){url=layers[i].url;reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");layers[i].url=url.replace(reg,"");eval("layers[i].mergeNewParams({"+parametro+":valor})");layers[i].redraw()}},loadStartLayer:function(event){i3GEO.Interface.STATUS.atualizando.push(event.object.name);YAHOO.util.Dom.setStyle("ArvoreTituloTema"+event.object.name,"background",i3GEO.Interface.openlayers.FUNDOTEMA)},loadStopLayer:function(event){i3GEO.Interface.STATUS.atualizando.remove(event.object.name);YAHOO.util.Dom.setStyle("ArvoreTituloTema"+event.object.name,"background","")},ordenaLayers:function(){var ordem=i3GEO.arvoreDeCamadas.CAMADAS,nordem=ordem.length,layer,layers,i,maiorindice;layers=i3geoOL.layers;maiorindice=i3geoOL.getLayerIndex(layers[(layers.length)-1]);for(i=nordem-1;i>=0;i--){layers=i3geoOL.getLayersByName(ordem[i].name);layer=layers[0];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));i3GEO.Interface.openlayers.OLpanzoombar.div.style.top=i3GEO.Interface.BARRADEZOOMTOP+"px";i3GEO.Interface.openlayers.OLpanzoombar.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+"px"},atualizaMapa:function(){var layers=i3geoOL.layers,nlayers=layers.length,i;for(i=0;i<nlayers;i++){layers[i].mergeNewParams({r:Math.random()});layers[i].url=layers[i].url.replace("&&&&&&&&&&&&&&","");layers[i].url=layers[i].url+"&&";if(layers[i].visibility===true){layers[i].redraw()}}},atualizaTema:function(retorno,tema){var layer=i3geoOL.getLayersByName(tema)[0];if(layer&&layer!=undefined){layer.mergeNewParams({r:Math.random()});layer.url=layer.url.replace("&&&&&&&&&&&&&&","");layer.url=layer.url+"&&";layer.redraw()}if(retorno===""){return}i3GEO.Interface.openlayers.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},registraEventos:function(){i3GEO.eventos.ativa($i("openlayers"));i3geoOL.events.register("moveend",i3geoOL,function(e){i3GEO.Interface.openlayers.recalcPar();i3GEO.eventos.navegaMapa()});i3geoOL.events.register("mousemove",i3geoOL,function(e){var p,lonlat,d,dc,imgp,targ,pos,mousex,mousey;p=e.xy;lonlat=i3geoOL.getLonLatFromPixel(p);if(!lonlat){return}d=i3GEO.calculo.dd2dms(lonlat.lon,lonlat.lat);try{objposicaocursor.ddx=lonlat.lon;objposicaocursor.ddy=lonlat.lat;objposicaocursor.dmsx=d[0];objposicaocursor.dmsy=d[1];objposicaocursor.imgx=p.x;objposicaocursor.imgy=p.y;pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));objposicaocursor.telax=p.x+pos[0];objposicaocursor.telay=p.y+pos[1]}catch(e){}})},ativaBotoes:function(){var imagemxy,x1,y1,x2,y2;imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){x2=imagemxy[0]+i3GEO.Interface.BARRABOTOESLEFT;y2=imagemxy[1]+i3GEO.Interface.BARRABOTOESTOP}if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","i3geo_barra2",false,x2,y2)}if(i3GEO.configura.visual!=="default"){i3GEO.gadgets.visual.troca(i3GEO.configura.visual)}i3GEO.barraDeBotoes.ativaBotoes()},recalcPar:function(){var bounds=i3geoOL.getExtent().toBBOX().split(","),escalaAtual=i3geoOL.getScale();if(i3GEO.parametros.mapscale!==escalaAtual){i3GEO.arvoreDeCamadas.atualizaFarol(escalaAtual)}i3GEO.parametros.mapexten=bounds[0]+" "+bounds[1]+" "+bounds[2]+" "+bounds[3];i3GEO.parametros.mapscale=escalaAtual;i3GEO.parametros.pixelsize=i3geoOL.getResolution();try{atualizaEscalaNumerica(parseInt(escalaAtual,10))}catch(e){}},zoom2ext:function(ext){var m,b;m=ext.split(" ");b=new OpenLayers.Bounds(m[0],m[1],m[2],m[3]);i3geoOL.zoomToExtent(b)},pan2ponto:function(x,y){i3geoOL.panTo(new OpenLayers.LonLat(x,y))}},googlemaps:{OPACIDADE:0.8,TIPOMAPA:"terrain",ZOOMSCALE:[591657550,295828775,147914387,73957193,36978596,18489298,9244649,4622324,2311162,1155581,577790,288895,144447,72223,36111,18055,9027,4513,2256,1128],PARAMETROSLAYER:"&TIPOIMAGEM="+i3GEO.configura.tipoimagem,posfixo:0,atualizaTema:function(retorno,tema){var indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(tema);i3GeoMap.overlayMapTypes.removeAt(indice);i3GEO.Interface.googlemaps.posfixo+=1;i3GEO.Interface.googlemaps.insereLayer(tema,indice);if(retorno===""){return}i3GEO.Interface.googlemaps.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},redesenha:function(){i3GEO.Interface.googlemaps.posfixo+=1;var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(camada.name);if(indice!==false){try{i3GeoMap.overlayMapTypes.removeAt(indice)}catch(e){}}}i3GEO.Interface.googlemaps.criaLayers()},cria:function(w,h){var i,f,ins,js;posfixo="&nd=0";i=$i(i3GEO.Interface.IDCORPO);if(i){f=$i("googlemapsdiv");if(!f){ins='<div id=googlemapsdiv style="width:0px;height:0px;text-align:left;background-image:url('+i3GEO.configura.locaplic+'/imagens/i3geo1bw.jpg)"></div>';i.innerHTML=ins}f=$i("googlemapsdiv");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.ativaBotoes();i3GEO.eventos.ativa($i(i3GEO.Interface.IDMAPA));i3GEO.coordenadas.mostraCoordenadas();i3GEO.gadgets.mostraEscalaNumerica();i3GEO.gadgets.mostraMenuSuspenso();i3GEO.gadgets.mostraMenuLista();i3GEO.idioma.mostraSeletor();g_operacao="";g_tipoacao="";i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.googlemaps.ligaDesliga(this)";i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);i3GEO.util.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===true){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<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(camada.name);if(!indice){if(camada.status!=0){i3GEO.Interface.googlemaps.insereLayer(camada.name,0)}}}},criaImageMap:function(nomeLayer){var i3GEOTileO,s;s="i3GEOTileO = new google.maps.ImageMapType({ "+"getTileUrl: function(coord, zoom) {"+" var url = '"+i3GEO.configura.locaplic+"/classesphp/mapa_googlemaps.php?g_sid="+i3GEO.configura.sid+"&Z=' + zoom + '&X=' + coord.x + '&Y=' + coord.y + '&layer="+nomeLayer+i3GEO.Interface.googlemaps.PARAMETROSLAYER+'&r='+Math.random()+"';"+" return url+'&nd='+i3GEO.Interface.googlemaps.posfixo; "+"}, "+"tileSize: new google.maps.Size(256, 256),"+"isPng: true,"+"name: '"+nomeLayer+"'"+"});";eval(s);return i3GEOTileO},insereLayer:function(nomeLayer,indice){var i=i3GEO.Interface.googlemaps.criaImageMap(nomeLayer);i3GeoMap.overlayMapTypes.insertAt(indice,i)},registraEventos:function(){var pos;google.maps.event.addListener(i3GeoMap,"dragstart",function(){g_operacao="";g_tipoacao=""});google.maps.event.addListener(i3GeoMap,"dragend",function(){i3GEO.Interface.googlemaps.recalcPar();i3GEO.eventos.navegaMapa()});google.maps.event.addListener(i3GeoMap,"tilesloaded",function(){i3GEO.Interface.googlemaps.recalcPar()});google.maps.event.addListener(i3GeoMap,"bounds_changed",function(){i3GEO.Interface.googlemaps.recalcPar();g_operacao="";g_tipoacao="";i3GEO.eventos.navegaMapa()});pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));google.maps.event.addListener(i3GeoMap,"mousemove",function(ponto){var teladms,tela;ponto=ponto.latLng;teladms=i3GEO.calculo.dd2dms(ponto.lng(),ponto.lat());tela=i3GeoMapOverlay.getProjection().fromLatLngToContainerPixel(ponto);objposicaocursor={ddx:ponto.lng(),ddy:ponto.lat(),dmsx:teladms[0],dmsy:teladms[1],imgx:tela.x,imgy:tela.y,telax:tela.x+pos[0],telay:tela.y+pos[1]}})},retornaIndiceLayer:function(nomeLayer){var i=false;try{i3GeoMap.overlayMapTypes.forEach(function(elemento,number){if(elemento.name===nomeLayer){i=number}});return i}catch(e){return false}},retornaObjetoLayer:function(nomeLayer){var i=false;try{i3GeoMap.overlayMapTypes.forEach(function(elemento,number){if(elemento.name===nomeLayer){i=elemento}});return i}catch(e){return false}},retornaDivLayer:function(nomeLayer){var i=false,divmapa=$i("googlemapsdiv"),divlayer=divmapa.firstChild.firstChild.firstChild.getElementsByTagName("div"),divs,divimg,j,ndivs=divlayer.length;for(j=0;j<ndivs;j++){divimg=divlayer[j].getElementsByTagName("img");if(divimg.length>0){if(divimg[0].src.search("&layer="+nomeLayer+"&")>0){return divimg[0].parentNode.parentNode.parentNode}}}},ligaDesliga:function(obj){var indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(obj.value),temp=function(){i3GEO.mapa.legendaHTML.atualiza()},desligar="",ligar="";if(obj.checked&&!indice){ligar=obj.value;i3GEO.Interface.googlemaps.insereLayer(obj.value,0);i3GEO.arvoreDeCamadas.alteraPropCamadas("status","2",obj.value)}else{if(indice!==false){desligar=obj.value;i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value);i3GeoMap.overlayMapTypes.removeAt(indice)}}if(desligar!==""||ligar!==""){i3GEO.php.ligatemas(temp,desligar,ligar)}},bbox:function(){var bd,so,ne,bbox;bd=i3GeoMap.getBounds();so=bd.getSouthWest();ne=bd.getNorthEast();bbox=so.lng()+" "+so.lat()+" "+ne.lng()+" "+ne.lat();return(bbox)},ativaBotoes:function(){var imagemxy,x1,y1,x2,y2;imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){x2=imagemxy[0]+i3GEO.Interface.BARRABOTOESLEFT;y2=imagemxy[1]+i3GEO.Interface.BARRABOTOESTOP}if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","i3geo_barra2",false,x2,y2)}if(i3GEO.configura.visual!=="default"){i3GEO.gadgets.visual.troca(i3GEO.configura.visual)}i3GEO.barraDeBotoes.ativaBotoes()},mudaOpacidade:function(valor){i3GEO.Interface.googlemaps.OPACIDADE=valor/200;i3GEO.Interface.googlemaps.redesenha()},recalcPar:function(){try{var bounds,sw,ne,escalaAtual=i3GEO.parametros.mapscale;sw=i3GeoMap.getBounds().getSouthWest();ne=i3GeoMap.getBounds().getNorthEast();i3GEO.parametros.mapexten=sw.lng()+" "+sw.lat()+" "+ne.lng()+" "+ne.lat();i3GEO.parametros.mapscale=i3GEO.Interface.googlemaps.calcescala();sw=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(0,1));ne=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(1,0));i3GEO.parametros.pixelsize=sw.lng()-ne.lng();if(i3GEO.parametros.pixelsize<0){i3GEO.parametros.pixelsize=i3GEO.parametros.pixelsize*-1}if(i3GEO.parametros.mapscale!==escalaAtual&&escalaAtual!==0){i3GEO.arvoreDeCamadas.atualizaFarol(i3GEO.parametros.mapscale)}}catch(e){i3GEO.parametros.mapexten="0 0 0 0";i3GEO.parametros.mapscale=0}},calcescala:function(){var zoom=i3GeoMap.getZoom();return(i3GEO.Interface.googlemaps.ZOOMSCALE[zoom])},escala2nzoom:function(escala){var n,i;n=i3GEO.Interface.googlemaps.ZOOMSCALE.length;for(i=0;i<n;i++){if(i3GEO.Interface.googlemaps.ZOOMSCALE[i]<escala){return(i)}}},zoom2extent:function(mapexten){var pol,ret,pt1,pt2,sw,ne,z;pol=mapexten;ret=pol.split(" ");pt1=(((ret[0]*-1)-(ret[2]*-1))/2)+ret[0]*1;pt2=(((ret[1]-ret[3])/2)*-1)+ret[1]*1;sw=new google.maps.LatLng(ret[1],ret[0]);ne=new google.maps.LatLng(ret[3],ret[2]);i3GeoMap.fitBounds(new google.maps.LatLngBounds(sw,ne))},pan2ponto:function(x,y){i3GeoMap.panTo(new google.maps.LatLng(y,x))},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i,zoom;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googlemaps.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=true}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===false){i3GEO.arvoreDeCamadas.MOSTRALISTAKML=true;i3GEO.Interface.googlemaps.criaArvoreKML()}i3GEO.Interface.googlemaps.adicionaNoArvoreGoogle(url,titulo,ativo,ngeoxml)},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.googlemaps.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaNoArvoreGoogle:function(url,nomeOverlay,ativo,id){var root,node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googlemaps.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}root=i3GEO.Interface.googlemaps.ARVORE.getRoot();node=i3GEO.Interface.googlemaps.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.googlemaps.ativaDesativaCamadaKml(this,\""+url+"\")' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";if(navm){estilo="cursor:default;vertical-align:35%;padding-top:0px;"}else{estilo="cursor:default;vertical-align:top;"}html+="&nbsp;<span style='"+estilo+"'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.googlemaps.ARVORE.draw();i3GEO.Interface.googlemaps.ARVORE.collapseAll();node.expand();if(ativo===true){eval(id+" = new google.maps.KmlLayer('"+url+"',{map:i3GeoMap,preserveViewport:true});")}},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.googlemaps.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.googlemaps.ARVORE.getRoot();titulo="<table><tr><td><b>Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false;if(i3GEO.parametros.editor==="sim"){d=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/webservices.html' target=blank >Editar cadastro</a>",idmenu:"",enableHighlight:false,expanded:false},node)}},ativaDesativaCamadaKml:function(obj,url){if(!obj.checked){eval(obj.value+".setMap(null);")}else{eval(obj.value+" = new google.maps.KmlLayer(url,{map:i3GeoMap,preserveViewport:true});")}},alteraParametroLayers:function(parametro,valor){parametro=parametro.toUpperCase();var reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");i3GEO.Interface.googlemaps.PARAMETROSLAYER=i3GEO.Interface.googlemaps.PARAMETROSLAYER.replace(reg,"");i3GEO.Interface.googlemaps.PARAMETROSLAYER+="&"+parametro+"="+valor;i3GEO.Interface.googlemaps.redesenha()}},googleearth:{PARAMETROSLAYER:"&TIPOIMAGEM="+i3GEO.configura.tipoimagem,posfixo:"",GADGETS:{setMouseNavigationEnabled:true,setStatusBarVisibility:true,setOverviewMapVisibility:true,setScaleLegendVisibility:true,setAtmosphereVisibility:true,setGridVisibility:false,getSun:false,LAYER_BORDERS:true,LAYER_BUILDINGS:false,LAYER_ROADS:false,LAYER_TERRAIN:true},POSICAOTELA:[0,0],aguarde:"",ligaDesliga:function(obj){var layer=i3GEO.Interface.googleearth.retornaObjetoLayer(obj.value),temp=function(){i3GEO.mapa.legendaHTML.atualiza()},desligar="",ligar="";if(obj.checked){i3GEO.arvoreDeCamadas.alteraPropCamadas("status","2",obj.value);ligar=obj.value}else{i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value);desligar=obj.value}layer.setVisibility(obj.checked);if(desligar!==""||ligar!==""){i3GEO.php.ligatemas(temp,desligar,ligar)}},atualizaTema:function(retorno,tema){var layer=i3GEO.Interface.googleearth.retornaObjetoLayer(tema),hr=layer.getLink().getHref();hr=hr.replace("&&&&&","");layer.getLink().setHref(hr+"&");if(retorno===""){return}i3GEO.Interface.googleearth.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},redesenha:function(){i3GEO.Interface.googleearth.posfixo+="&";var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googleearth.retornaObjetoLayer(camada.name);if(indice!==false){try{i3GeoMap.getFeatures().removeChild(indice)}catch(e){}}}i3GEO.Interface.googleearth.criaLayers()},cria:function(w,h){var i,i3GeoMap3d,i3GeoMap,texto;i3GEO.configura.listaDePropriedadesDoMapa={"propriedades":[{text:"p2",url:"javascript:i3GEO.mapa.dialogo.tipoimagem()"},{text:"p3",url:"javascript:i3GEO.mapa.dialogo.opcoesLegenda()"},{text:"p4",url:"javascript:i3GEO.mapa.dialogo.opcoesEscala()"},{text:"p8",url:"javascript:i3GEO.mapa.dialogo.queryMap()"},{text:"p9",url:"javascript:i3GEO.mapa.dialogo.corFundo()"},{text:"p10",url:"javascript:i3GEO.mapa.dialogo.gradeCoord()"}]};texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setMouseNavigationEnabled===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setMouseNavigationEnabled(this.checked)'";texto+="> "+$trad("ge1");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setStatusBarVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setStatusBarVisibility(this.checked)'";texto+="> "+$trad("ge2");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setOverviewMapVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setOverviewMapVisibility(this.checked)'";texto+="> "+$trad("ge3");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setScaleLegendVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setScaleLegendVisibility(this.checked)'";texto+="> "+$trad("ge4");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setAtmosphereVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setAtmosphereVisibility(this.checked)'";texto+="> "+$trad("ge5");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setGridVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setGridVisibility(this.checked)'";texto+="> "+$trad("ge6");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.getSun===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getSun().setVisibility(this.checked)'";texto+="> "+$trad("ge7");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_BORDERS===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_BORDERS, i3GEO.Interface.checked)'";texto+="> "+$trad("ge8");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_BUILDINGS===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_BUILDINGS, i3GEO.Interface.checked)'";texto+="> "+$trad("ge9");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_ROADS===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_ROADS, i3GEO.Interface.checked)'";texto+="> "+$trad("ge10");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_TERRAIN===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_TERRAIN, i3GEO.Interface.checked)'";texto+="> "+$trad("ge11");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});i3GEO.util.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa);i3GEO.barraDeBotoes.INCLUIBOTAO.zoomli=false;i3GEO.barraDeBotoes.INCLUIBOTAO.pan=false;i3GEO.barraDeBotoes.INCLUIBOTAO.zoomtot=false;i3GEO.Interface.IDMAPA="i3GeoMap3d";i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.googleearth.ligaDesliga(this)";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)}i3GeoMap=null;google.load("earth","1")},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.gadgets.mostraMenuLista();i3GEO.Interface.googleearth.ativaBotoes();i3GEO.gadgets.mostraInserirKml("inserirKml");if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===true){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<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googleearth.retornaIndiceLayer(camada.name);layer=i3GEO.Interface.googleearth.retornaObjetoLayer(camada.name);if(indice===false){layer=i3GEO.Interface.googleearth.insereLayer(camada.name)}try{if(camada.status!=0){layer.setVisibility(true)}else{layer.setVisibility(false)}}catch(e){}}},insereLayer:function(nomeLayer){var kmlUrl=i3GEO.configura.locaplic+"/classesphp/mapa_googleearth.php?REQUEST=GetKml&g_sid="+i3GEO.configura.sid+"&layer="+nomeLayer+i3GEO.Interface.googleearth.PARAMETROSLAYER+"&r="+Math.random(),linki3geo=i3GeoMap.createLink(''),nl=i3GeoMap.createNetworkLink('');linki3geo.setHref(kmlUrl+i3GEO.Interface.googleearth.posfixo);nl.setLink(linki3geo);nl.setFlyToView(false);nl.setName(nomeLayer);i3GeoMap.getFeatures().appendChild(nl);return nl},retornaIndiceLayer:function(nomeLayer){var n=i3GeoMap.getFeatures().getChildNodes().getLength(),indice=false;for(i=0;i<n;i++){if(i3GeoMap.getFeatures().getChildNodes().item(i).getName()===nomeLayer){indice=i}}return indice},retornaObjetoLayer:function(nomeLayer){var n=i3GeoMap.getFeatures().getChildNodes().getLength(),indice=false,i;for(i=0;i<n;i++){if(i3GeoMap.getFeatures().getChildNodes().item(i).getName()===nomeLayer){indice=i3GeoMap.getFeatures().getChildNodes().item(i)}}return indice},registraEventos:function(){google.earth.addEventListener(i3GeoMap.getView(),"viewchangeend",function(e){i3GEO.Interface.googleearth.recalcPar()});google.earth.addEventListener(i3GeoMap.getGlobe(),'mousemove',function(event){d=i3GEO.calculo.dd2dms(event.getLongitude(),event.getLatitude());objposicaocursor={ddx:event.getLongitude(),ddy:event.getLatitude(),dmsx:d[0],dmsy:d[1],imgx:event.getClientX(),imgy:event.getClientY(),telax:event.getClientX()+i3GEO.Interface.googleearth.POSICAOTELA[0],telay:event.getClientY()+i3GEO.Interface.googleearth.POSICAOTELA[1]};i3GEO.eventos.mousemoveMapa()});google.earth.addEventListener(i3GeoMap.getGlobe(),'click',function(event){if(i3GEO.Interface.googleearth.aguarde.visibility==="hidden"){i3GEO.eventos.mousecliqueMapa()}else{i3GEO.Interface.googleearth.aguarde.visibility="hidden"}})},recalcPar:function(){var bounds;bounds=i3GeoMap.getView().getViewportGlobeBounds();i3GEO.parametros.mapexten=bounds.getWest()+" "+bounds.getSouth()+" "+bounds.getEast()+" "+bounds.getNorth()},falha:function(){alert("Falhou. Vc precisa do plugin instalado")},ativaBotoes:function(){var cabecalho=function(){i3GEO.barraDeBotoes.ativaIcone("")},minimiza=function(){i3GEO.janela.minimiza("i3GEOF.ferramentasGE")},janela=i3GEO.janela.cria("230px","110px","","","","Ferramentas","i3GEOF.ferramentasGE",false,"hd",cabecalho,minimiza);i3GEO.barraDeBotoes.TEMPLATEBOTAO='<div style="display:inline;background-color:rgb(250,250,250);"><img src="'+i3GEO.configura.locaplic+'/imagens/branco.gif" id="$$"/></div>&nbsp;';i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","",false,"200","200",janela[2].id);i3GEO.barraDeBotoes.ativaBotoes();i3GEO.Interface.googleearth.aguarde=$i("i3GEOF.ferramentasGE_imagemCabecalho").style;$i("i3GEOF.ferramentasGE_minimizaCabecalho").style.right="0px";$i("i3GEOF.ferramentasGE").lastChild.style.display="none";i3GEO.ajuda.abreJanela()},balao:function(texto,ddx,ddy){var placemark=i3GeoMap.createPlacemark(''),point=i3GeoMap.createPoint(''),b;point.setLatitude(ddy);point.setLongitude(ddx);placemark.setGeometry(point);b=i3GeoMap.createHtmlStringBalloon('');b.setContentString("<div style=text-align:left >"+texto+"</div>");b.setFeature(placemark);i3GeoMap.setBalloon(b)},insereMarca:function(description,ddx,ddy,name,snippet){var placemark=i3GeoMap.createPlacemark(''),point=i3GeoMap.createPoint('');placemark.setName(name);point.setLatitude(ddy);point.setLongitude(ddx);placemark.setGeometry(point);if(description!==""){placemark.setDescription(description)}placemark.setSnippet(snippet);i3GeoMap.getFeatures().appendChild(placemark)},insereCirculo:function(centerLng,centerLat,radius,name,snippet){function makeCircle(centerLat,centerLng,radius){var ring=i3GeoMap.createLinearRing(''),steps=25,i,pi2=Math.PI*2,lat,lng;for(i=0;i<steps;i++){lat=centerLat+radius*Math.cos(i/steps*pi2);lng=centerLng+radius*Math.sin(i/steps*pi2);ring.getCoordinates().pushLatLngAlt(lat,lng,0)}return ring}var polygonPlacemark=i3GeoMap.createPlacemark(''),poly=i3GeoMap.createPolygon(''),outer,polyStyle;poly.setAltitudeMode(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND);polygonPlacemark.setGeometry(poly);outer=i3GeoMap.createLinearRing('');polygonPlacemark.getGeometry().setOuterBoundary(makeCircle(centerLat,centerLng,radius));polygonPlacemark.setName(name);polygonPlacemark.setSnippet(snippet);polygonPlacemark.setStyleSelector(i3GeoMap.createStyle(''));polyStyle=polygonPlacemark.getStyleSelector().getPolyStyle();polyStyle.setFill(0);i3GeoMap.getFeatures().appendChild(polygonPlacemark)},insereLinha:function(xi,yi,xf,yf,name,snippet){var lineStringPlacemark=i3GeoMap.createPlacemark(''),lineString,lineStyle;lineStringPlacemark.setName(name);lineString=i3GeoMap.createLineString('');lineString.setAltitudeMode(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND);lineStringPlacemark.setGeometry(lineString);lineString.getCoordinates().pushLatLngAlt(yi,xi,0);lineString.getCoordinates().pushLatLngAlt(yf,xf,0);lineStringPlacemark.setStyleSelector(i3GeoMap.createStyle(''));lineStringPlacemark.setSnippet(snippet);lineStyle=lineStringPlacemark.getStyleSelector().getLineStyle();lineStyle.setWidth(3);i3GeoMap.getFeatures().appendChild(lineStringPlacemark)},removePlacemark:function(nome){var features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i,nfeatures=[];for(i=0;i<n;i++){try{if(features.getChildNodes().item(i).getName()===nome||features.getChildNodes().item(i).getDescription()===nome||features.getChildNodes().item(i).getSnippet()===nome){nfeatures.push(features.getChildNodes().item(i))}}catch(e){}}n=nfeatures.length;for(i=0;i<n;i++){features.removeChild(nfeatures[i])}},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i,zoom;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googleearth.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=false}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(arguments.length===2){ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);linki3geokml=i3GeoMap.createLink('');if(url.split("http").length===1){url=i3GEO.util.protocolo()+"://"+window.location.host+url}linki3geokml.setHref(url);eval(ngeoxml+" = i3GeoMap.createNetworkLink('')");eval(ngeoxml+".setLink(linki3geokml)");if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===false){i3GEO.arvoreDeCamadas.MOSTRALISTAKML=true;i3GEO.Interface.googleearth.criaArvoreKML()}i3GEO.Interface.googleearth.adicionaNoArvoreGoogle(url,titulo,ativo,ngeoxml)},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.googleearth.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaNoArvoreGoogle:function(url,nomeOverlay,ativo,id){var root,node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googleearth.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}root=i3GEO.Interface.googleearth.ARVORE.getRoot();node=i3GEO.Interface.googleearth.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.googleearth.ativaDesativaCamadaKml(this)' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";html+="&nbsp;<span style='cursor:move'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.googleearth.ARVORE.draw();i3GEO.Interface.googleearth.ARVORE.collapseAll();node.expand()},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.googleearth.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.googleearth.ARVORE.getRoot();titulo="<table><tr><td><b>Google Earth Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false;if(i3GEO.parametros.editor==="sim"){d=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/webservices.html' target=blank >Editar cadastro</a>",idmenu:"",enableHighlight:false,expanded:false},node)}},existeLink:function(url){var existe=false,features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i;for(i=0;i<n;i++){try{if(features.getChildNodes().item(i).getLink().getHref()===url){existe=true}}catch(e){}}return(existe)},ativaDesativaLink:function(url,valor){var features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i;for(i=0;i<n;i++){try{if(features.getChildNodes().item(i).getLink().getHref()===url){features.getChildNodes().item(i).setVisibility(valor)}}catch(e){}}},ativaDesativaCamadaKml:function(obj){var url=eval(obj.value+".getLink().getHref()"),existe=i3GEO.Interface.googleearth.existeLink(url);if(!obj.checked){i3GEO.Interface.googleearth.ativaDesativaLink(url,false)}else{if(existe===false){eval("i3GeoMap.getFeatures().appendChild("+obj.value+")")}else{i3GEO.Interface.googleearth.ativaDesativaLink(url,true)}}},zoom2extent:function(mapexten){var r=6378700,lng2,lng1,lat1,lat2,ret=mapexten.split(" "),fov=32,camera=i3GeoMap.getView().copyAsCamera(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND),dy,dx,d,dist,alt;lng2=(ret[0]*1);lng1=(ret[2]*1);lat1=(ret[1]*1);lat2=(ret[3]*1);camera.setLatitude((lat1+lat2)/2.0);camera.setLongitude((lng1+lng2)/2.0);camera.setHeading(0.0);camera.setTilt(0.0);dy=Math.max(lat1,lat2)-Math.min(lat1,lat2);dx=Math.max(lng1,lng2)-Math.min(lng1,lng2);d=Math.max(dy,dx);d=d*Math.PI/180.0;dist=r*Math.tan(d/2);alt=dist/(Math.tan(fov*Math.PI/180.0));camera.setAltitude(alt);i3GeoMap.getView().setAbstractView(camera)},alteraParametroLayers:function(parametro,valor){parametro=parametro.toUpperCase();var reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");i3GEO.Interface.googleearth.PARAMETROSLAYER=i3GEO.Interface.googleearth.PARAMETROSLAYER.replace(reg,"");i3GEO.Interface.googleearth.PARAMETROSLAYER+="&"+parametro+"="+valor;i3GEO.Interface.googleearth.redesenha()}}};
3 3 \ No newline at end of file
... ...
classesjs/compactajs.php
... ... @@ -92,8 +92,8 @@ packer(&quot;../pacotes/yui270/build/resize/resize-min.js&quot;,&quot;../pacotes/yui270/build/r
92 92 packer("../pacotes/cpaint/cpaint2.inc.js","../pacotes/cpaint/cpaint2_compacto.inc.js","Normal");
93 93 packer("../pacotes/balloon-tooltips/htdocs/js/balloon.config.js","../pacotes/balloon-tooltips/htdocs/js/balloon_compacto.config.js","Normal");
94 94 packer("../pacotes/balloon-tooltips/htdocs/js/balloon.js","../pacotes/balloon-tooltips/htdocs/js/balloon_compacto.js","Normal");
95   -packer("../pacotes/eudock/js/euDock.2.0.js","../pacotes/eudock/js/euDock.2.0_compacto.js","Normal");
96   -packer("../pacotes/eudock/js/euDock.Image.js","../pacotes/eudock/js/euDock.Image_compacto.js","Normal");
  95 +//packer("../pacotes/eudock/js/euDock.2.0.js","../pacotes/eudock/js/euDock.2.0_compacto.js","Normal");
  96 +//packer("../pacotes/eudock/js/euDock.Image.js","../pacotes/eudock/js/euDock.Image_compacto.js","Normal");
97 97  
98 98 //
99 99 //gera um único js para a inicialização do I3Geo
... ... @@ -122,8 +122,6 @@ $jsfiles = array(
122 122 "../pacotes/yui270/build/resize/resize_compacto.js",
123 123 "../pacotes/balloon-tooltips/htdocs/js/balloon_compacto.config.js",
124 124 "../pacotes/balloon-tooltips/htdocs/js/balloon_compacto.js",
125   -"../pacotes/eudock/js/euDock.2.0_compacto.js",
126   -"../pacotes/eudock/js/euDock.Image_compacto.js",
127 125 "compactados/classe_i3geo_compacto.js",
128 126 "compactados/classe_util_compacto.js",
129 127 "compactados/dicionario_compacto.js",
... ... @@ -149,7 +147,9 @@ $jsfiles = array(
149 147 "../pacotes/richdraw/richdraw_tudo_compacto.js",
150 148 "compactados/classe_coordenadas_compacto.js",
151 149 "compactados/classe_gadgets_compacto.js",
152   -"compactados/classe_social_compacto.js"
  150 +"compactados/classe_social_compacto.js",
  151 +"../pacotes/eudock/js/euDock.2.0.js",
  152 +"../pacotes/eudock/js/euDock.Image.js"
153 153 );
154 154  
155 155 $buffer .= "\$i = function(id){return document.getElementById(id);};\n";
... ... @@ -180,39 +180,6 @@ $cssfiles = array(
180 180  
181 181 $buffer = "";
182 182 salvatudojs($cssfiles,$buffer,"../css/i3geo45.css","css");
183   -
184   -//
185   -//compacta o ferramentas/funcoes.js
186   -//
187   -/*
188   -$s = inicia("../ferramentas/funcoes.js");
189   -$abre = fopen("../ferramentas/funcoes_compacto.js", "wt");
190   -$escreve = fwrite ($abre,$s);
191   -$fecha = fclose ($abre);
192   -$jsfiles = array(
193   -"../ferramentas/funcoes_compacto.js",
194   -"../pacotes/cpaint/cpaint2.inc.js",
195   -"../pacotes/yui270/build/yahoo/yahoo-min.js",
196   -"../pacotes/yui270/build/yahoo-dom-event/yahoo-dom-event.js",
197   -"../pacotes/yui270/build/dom/dom-min.js",
198   -"../pacotes/yui270/build/container/container_core-min.js",
199   -"../pacotes/yui270/build/menu/menu-min.js",
200   -"../pacotes/yui270/build/logger/logger-min.js",
201   -"../pacotes/yui270/build/dragdrop/dragdrop-min.js",
202   -"../pacotes/yui270/build/slider/slider-min.js",
203   -"../pacotes/yui270/build/animation/animation-min.js",
204   -"../pacotes/yui270/build/container/container-min.js",
205   -"../pacotes/yui270/build/element/element-min.js",
206   -"../pacotes/yui270/build/tabview/tabview-min.js",
207   -"../pacotes/yui270/build/utilities/utilities.js",
208   -"../pacotes/yui270/build/treeview/treeview.js",
209   -"../pacotes/yui270/build/button/button-min.js",
210   -"compactados/classe_php_compacto.js",
211   -"compactados/classe_util_compacto.js"
212   -);
213   -$buffer = "\$i = function(id){return document.getElementById(id);}\n";
214   -salvatudojs($jsfiles,$buffer,"../ferramentas/i3geo_tudo_compacto.js","js");
215   -*/
216 183 //css das ferramentas
217 184 $cssfiles = array(
218 185 "../css/button.css",
... ... @@ -276,9 +243,6 @@ return $code;
276 243 }
277 244 function packer($src,$out,$tipo="None")
278 245 {
279   - //packer
280   - //$src = 'temp.js';
281   - //$out = 'i3geo_tudo_compacto.js';
282 246 require_once '../pacotes/packer/class.JavaScriptPacker.php';
283 247 $script = file_get_contents($src);
284 248 $script = str_replace("if(typeof(console)","//if(typeof(console)",$script);
... ... @@ -301,14 +265,11 @@ function salvatudojs($jsfiles,$buffer,$final,$tipo)
301 265 while (!feof($abre))
302 266 {
303 267 $linha = fgets($abre);
  268 + //$linha = str_replace("\n","",$linha);
304 269 $buffer .= $linha;
305   - //if(stristr($linha, '(console)') === FALSE)
306   - //{$buffer .= $linha;}
307   - //else
308   - //echo "<br>".$linha;
309 270 }
310 271 fclose($abre);
311   - $buffer .= "\n";
  272 + //$buffer .= "\n";
312 273 }
313 274 $abre = fopen($final, "wt");
314 275 $escreve = fwrite ($abre,$buffer);
... ... @@ -326,7 +287,6 @@ function salvatudojs($jsfiles,$buffer,$final,$tipo)
326 287 $buffer .= "\n";
327 288 $buffer .= "<?php if(extension_loaded('zlib')){ob_end_flush();}?>";
328 289 $abre = fopen($final.".php", "wt");
329   - //$buffer = str_replace("if(typeof(console)","//if(typeof(console)",$buffer);
330 290 $escreve = fwrite ($abre,$buffer);
331 291 $fecha = fclose ($abre);
332 292 chmod($final.".php",0777);
... ...
classesjs/i3geo_tudo_compacto45.js
1 1 $i = function(id){return document.getElementById(id);};
2   -function DetectaMobile(funcao){var isIphone=false;var isTierTablet=false;var isTierIphone=false;var isTierRichCss=false;var isTierGenericMobile=false;var engineWebKit="webkit";var deviceIphone="iphone";var deviceIpod="ipod";var deviceIpad="ipad";var deviceMacPpc="macintosh";var deviceAndroid="android";var deviceGoogleTV="googletv";var deviceXoom="xoom";var deviceNuvifone="nuvifone";var deviceSymbian="symbian";var deviceS60="series60";var deviceS70="series70";var deviceS80="series80";var deviceS90="series90";var deviceWinPhone7="windows phone os 7";var deviceWinMob="windows ce";var deviceWindows="windows";var deviceIeMob="iemobile";var devicePpc="ppc";var enginePie="wm5 pie";var deviceBB="blackberry";var vndRIM="vnd.rim";var deviceBBStorm="blackberry95";var deviceBBBold="blackberry97";var deviceBBTour="blackberry96";var deviceBBCurve="blackberry89";var deviceBBTorch="blackberry 98";var deviceBBPlaybook="playbook";var devicePalm="palm";var deviceWebOS="webos";var engineBlazer="blazer";var engineXiino="xiino";var deviceKindle="kindle";var vndwap="vnd.wap";var wml="wml";var deviceBrew="brew";var deviceDanger="danger";var deviceHiptop="hiptop";var devicePlaystation="playstation";var deviceNintendoDs="nitro";var deviceNintendo="nintendo";var deviceWii="wii";var deviceXbox="xbox";var deviceArchos="archos";var engineOpera="opera";var engineNetfront="netfront";var engineUpBrowser="up.browser";var engineOpenWeb="openweb";var deviceMidp="midp";var uplink="up.link";var engineTelecaQ='teleca q';var devicePda="pda";var mini="mini";var mobile="mobile";var mobi="mobi";var maemo="maemo";var maemoTablet="tablet";var linux="linux";var qtembedded="qt embedded";var mylocom2="com2";var manuSonyEricsson="sonyericsson";var manuericsson="ericsson";var manuSamsung1="sec-sgh";var manuSony="sony";var manuHtc="htc";var svcDocomo="docomo";var svcKddi="kddi";var svcVodafone="vodafone";var disUpdate="update";var uagent=navigator.userAgent.toLowerCase();function DetectIphone(){if(uagent.search(deviceIphone)>-1){if(DetectIpad()||DetectIpod())return false;else return true}else return false}function DetectIpod(){if(uagent.search(deviceIpod)>-1)return true;else return false}function DetectIpad(){if(uagent.search(deviceIpad)>-1&&DetectWebkit())return true;else return false}function DetectIphoneOrIpod(){if(uagent.search(deviceIphone)>-1||uagent.search(deviceIpod)>-1)return true;else return false}function DetectAndroid(){if(DetectAndroidTablet())return false;if(uagent.search(deviceAndroid)>-1)return true;else return false}function DetectAndroidTablet(){if(uagent.search(deviceXoom)>-1)return true;else return false}function DetectAndroidWebKit(){if(DetectAndroid()&&DetectWebkit())return true;else return false}function DetectGoogleTV(){if(uagent.search(deviceGoogleTV)>-1)return true;else return false}function DetectWebkit(){if(uagent.search(engineWebKit)>-1)return true;else return false}function DetectS60OssBrowser(){if(DetectWebkit()){if((uagent.search(deviceS60)>-1||uagent.search(deviceSymbian)>-1))return true;else return false}else return false}function DetectSymbianOS(){if(uagent.search(deviceSymbian)>-1||uagent.search(deviceS60)>-1||uagent.search(deviceS70)>-1||uagent.search(deviceS80)>-1||uagent.search(deviceS90)>-1)return true;else return false}function DetectWindowsPhone7(){if(uagent.search(deviceWinPhone7)>-1)return true;else return false}function DetectWindowsMobile(){if(DetectWindowsPhone7())return false;if(uagent.search(deviceWinMob)>-1||uagent.search(deviceIeMob)>-1||uagent.search(enginePie)>-1)return true;if((uagent.search(devicePpc)>-1)&&!(uagent.search(deviceMacPpc)>-1))return true;if(uagent.search(manuHtc)>-1&&uagent.search(deviceWindows)>-1)return true;else return false}function DetectBlackBerry(){if(uagent.search(deviceBB)>-1)return true;if(uagent.search(vndRIM)>-1)return true;else return false}function DetectBlackBerryTablet(){if(uagent.search(deviceBBPlaybook)>-1)return true;else return false}function DetectBlackBerryWebKit(){if(uagent.search(deviceBB)>-1&&uagent.search(engineWebKit)>-1)return true;else return false}function DetectBlackBerryTouch(){if((uagent.search(deviceBBStorm)>-1)||(uagent.search(deviceBBTorch)>-1))return true;else return false}function DetectBlackBerryHigh(){if(DetectBlackBerryWebKit())return false;if(DetectBlackBerry()){if(DetectBlackBerryTouch()||uagent.search(deviceBBBold)>-1||uagent.search(deviceBBTour)>-1||uagent.search(deviceBBCurve)>-1)return true;else return false}else return false}function DetectBlackBerryLow(){if(DetectBlackBerry()){if(DetectBlackBerryHigh())return false;else return true}else return false}function DetectPalmOS(){if(uagent.search(devicePalm)>-1||uagent.search(engineBlazer)>-1||uagent.search(engineXiino)>-1){if(DetectPalmWebOS())return false;else return true}else return false}function DetectPalmWebOS(){if(uagent.search(deviceWebOS)>-1)return true;else return false}function DetectGarminNuvifone(){if(uagent.search(deviceNuvifone)>-1)return true;else return false}function DetectSmartphone(){if(DetectIphoneOrIpod())return true;if(DetectS60OssBrowser())return true;if(DetectSymbianOS())return true;if(DetectWindowsMobile())return true;if(DetectWindowsPhone7())return true;if(DetectAndroid())return true;if(DetectBlackBerry())return true;if(DetectPalmWebOS())return true;if(DetectPalmOS())return true;if(DetectGarminNuvifone())return true;return false};function DetectArchos(){if(uagent.search(deviceArchos)>-1)return true;else return false}function DetectBrewDevice(){if(uagent.search(deviceBrew)>-1)return true;else return false}function DetectDangerHiptop(){if(uagent.search(deviceDanger)>-1||uagent.search(deviceHiptop)>-1)return true;else return false}function DetectMaemoTablet(){if(uagent.search(maemo)>-1)return true;if(uagent.search(maemoTablet)>-1&&uagent.search(linux)>-1)return true;else return false}function DetectSonyMylo(){if(uagent.search(manuSony)>-1){if(uagent.search(qtembedded)>-1||uagent.search(mylocom2)>-1)return true;else return false}else return false}function DetectOperaMobile(){if(uagent.search(engineOpera)>-1){if(uagent.search(mini)>-1||uagent.search(mobi)>-1)return true;else return false}else return false}function DetectSonyPlaystation(){if(uagent.search(devicePlaystation)>-1)return true;else return false};function DetectNintendo(){if(uagent.search(deviceNintendo)>-1||uagent.search(deviceWii)>-1||uagent.search(deviceNintendoDs)>-1)return true;else return false};function DetectXbox(){if(uagent.search(deviceXbox)>-1)return true;else return false};function DetectGameConsole(){if(DetectSonyPlaystation())return true;if(DetectNintendo())return true;if(DetectXbox())return true;else return false};function DetectKindle(){if(uagent.search(deviceKindle)>-1)return true;else return false}function DetectMobileQuick(){if(DetectIpad())return false;if(DetectSmartphone())return true;if(uagent.search(deviceMidp)>-1||DetectBrewDevice())return true;if(DetectOperaMobile())return true;if(uagent.search(engineNetfront)>-1)return true;if(uagent.search(engineUpBrowser)>-1)return true;if(uagent.search(engineOpenWeb)>-1)return true;if(DetectDangerHiptop())return true;if(DetectMaemoTablet())return true;if(DetectArchos())return true;if((uagent.search(devicePda)>-1)&&(uagent.search(disUpdate)<0))return true;if(uagent.search(mobile)>-1)return true;if(DetectKindle())return true;return false};function DetectMobileLong(){if(DetectMobileQuick())return true;if(DetectGameConsole())return true;if(DetectSonyMylo())return true;if(uagent.search(manuSamsung1)>-1||uagent.search(manuSonyEricsson)>-1||uagent.search(manuericsson)>-1)return true;if(uagent.search(svcDocomo)>-1)return true;if(uagent.search(svcKddi)>-1)return true;if(uagent.search(svcVodafone)>-1)return true;return false};function DetectTierTablet(){if(DetectIpad()||DetectAndroidTablet()||DetectBlackBerryTablet())return true;else return false};function DetectTierIphone(){if(DetectIphoneOrIpod())return true;if(DetectAndroid())return true;if(DetectAndroidWebKit())return true;if(DetectBlackBerryWebKit())return true;if(DetectPalmWebOS())return true;if(DetectGarminNuvifone())return true;if(DetectMaemoTablet())return true;else return false};function DetectTierRichCss(){if(DetectMobileQuick()){if(DetectTierIphone())return false;if(DetectWebkit())return true;if(DetectS60OssBrowser())return true;if(DetectBlackBerryHigh())return true;if(DetectWindowsPhone7())return true;if(DetectWindowsMobile())return true;if(uagent.search(engineTelecaQ)>-1)return true;else return false}else return false};function DetectTierOtherPhones(){if(DetectMobileLong()){if(DetectTierIphone())return false;if(DetectTierRichCss())return false;else return true}else return false};if(funcao=="DetectMobileLong"){return DetectMobileLong()}if(funcao=="DetectAndroidTablet"){return DetectAndroidTablet()}if(funcao=="DetectAndroid"){return DetectAndroid()}}
3   -/*
  2 +function DetectaMobile(funcao){var isIphone=false;var isTierTablet=false;var isTierIphone=false;var isTierRichCss=false;var isTierGenericMobile=false;var engineWebKit="webkit";var deviceIphone="iphone";var deviceIpod="ipod";var deviceIpad="ipad";var deviceMacPpc="macintosh";var deviceAndroid="android";var deviceGoogleTV="googletv";var deviceXoom="xoom";var deviceNuvifone="nuvifone";var deviceSymbian="symbian";var deviceS60="series60";var deviceS70="series70";var deviceS80="series80";var deviceS90="series90";var deviceWinPhone7="windows phone os 7";var deviceWinMob="windows ce";var deviceWindows="windows";var deviceIeMob="iemobile";var devicePpc="ppc";var enginePie="wm5 pie";var deviceBB="blackberry";var vndRIM="vnd.rim";var deviceBBStorm="blackberry95";var deviceBBBold="blackberry97";var deviceBBTour="blackberry96";var deviceBBCurve="blackberry89";var deviceBBTorch="blackberry 98";var deviceBBPlaybook="playbook";var devicePalm="palm";var deviceWebOS="webos";var engineBlazer="blazer";var engineXiino="xiino";var deviceKindle="kindle";var vndwap="vnd.wap";var wml="wml";var deviceBrew="brew";var deviceDanger="danger";var deviceHiptop="hiptop";var devicePlaystation="playstation";var deviceNintendoDs="nitro";var deviceNintendo="nintendo";var deviceWii="wii";var deviceXbox="xbox";var deviceArchos="archos";var engineOpera="opera";var engineNetfront="netfront";var engineUpBrowser="up.browser";var engineOpenWeb="openweb";var deviceMidp="midp";var uplink="up.link";var engineTelecaQ='teleca q';var devicePda="pda";var mini="mini";var mobile="mobile";var mobi="mobi";var maemo="maemo";var maemoTablet="tablet";var linux="linux";var qtembedded="qt embedded";var mylocom2="com2";var manuSonyEricsson="sonyericsson";var manuericsson="ericsson";var manuSamsung1="sec-sgh";var manuSony="sony";var manuHtc="htc";var svcDocomo="docomo";var svcKddi="kddi";var svcVodafone="vodafone";var disUpdate="update";var uagent=navigator.userAgent.toLowerCase();function DetectIphone(){if(uagent.search(deviceIphone)>-1){if(DetectIpad()||DetectIpod())return false;else return true}else return false}function DetectIpod(){if(uagent.search(deviceIpod)>-1)return true;else return false}function DetectIpad(){if(uagent.search(deviceIpad)>-1&&DetectWebkit())return true;else return false}function DetectIphoneOrIpod(){if(uagent.search(deviceIphone)>-1||uagent.search(deviceIpod)>-1)return true;else return false}function DetectAndroid(){if(DetectAndroidTablet())return false;if(uagent.search(deviceAndroid)>-1)return true;else return false}function DetectAndroidTablet(){if(uagent.search(deviceXoom)>-1)return true;else return false}function DetectAndroidWebKit(){if(DetectAndroid()&&DetectWebkit())return true;else return false}function DetectGoogleTV(){if(uagent.search(deviceGoogleTV)>-1)return true;else return false}function DetectWebkit(){if(uagent.search(engineWebKit)>-1)return true;else return false}function DetectS60OssBrowser(){if(DetectWebkit()){if((uagent.search(deviceS60)>-1||uagent.search(deviceSymbian)>-1))return true;else return false}else return false}function DetectSymbianOS(){if(uagent.search(deviceSymbian)>-1||uagent.search(deviceS60)>-1||uagent.search(deviceS70)>-1||uagent.search(deviceS80)>-1||uagent.search(deviceS90)>-1)return true;else return false}function DetectWindowsPhone7(){if(uagent.search(deviceWinPhone7)>-1)return true;else return false}function DetectWindowsMobile(){if(DetectWindowsPhone7())return false;if(uagent.search(deviceWinMob)>-1||uagent.search(deviceIeMob)>-1||uagent.search(enginePie)>-1)return true;if((uagent.search(devicePpc)>-1)&&!(uagent.search(deviceMacPpc)>-1))return true;if(uagent.search(manuHtc)>-1&&uagent.search(deviceWindows)>-1)return true;else return false}function DetectBlackBerry(){if(uagent.search(deviceBB)>-1)return true;if(uagent.search(vndRIM)>-1)return true;else return false}function DetectBlackBerryTablet(){if(uagent.search(deviceBBPlaybook)>-1)return true;else return false}function DetectBlackBerryWebKit(){if(uagent.search(deviceBB)>-1&&uagent.search(engineWebKit)>-1)return true;else return false}function DetectBlackBerryTouch(){if((uagent.search(deviceBBStorm)>-1)||(uagent.search(deviceBBTorch)>-1))return true;else return false}function DetectBlackBerryHigh(){if(DetectBlackBerryWebKit())return false;if(DetectBlackBerry()){if(DetectBlackBerryTouch()||uagent.search(deviceBBBold)>-1||uagent.search(deviceBBTour)>-1||uagent.search(deviceBBCurve)>-1)return true;else return false}else return false}function DetectBlackBerryLow(){if(DetectBlackBerry()){if(DetectBlackBerryHigh())return false;else return true}else return false}function DetectPalmOS(){if(uagent.search(devicePalm)>-1||uagent.search(engineBlazer)>-1||uagent.search(engineXiino)>-1){if(DetectPalmWebOS())return false;else return true}else return false}function DetectPalmWebOS(){if(uagent.search(deviceWebOS)>-1)return true;else return false}function DetectGarminNuvifone(){if(uagent.search(deviceNuvifone)>-1)return true;else return false}function DetectSmartphone(){if(DetectIphoneOrIpod())return true;if(DetectS60OssBrowser())return true;if(DetectSymbianOS())return true;if(DetectWindowsMobile())return true;if(DetectWindowsPhone7())return true;if(DetectAndroid())return true;if(DetectBlackBerry())return true;if(DetectPalmWebOS())return true;if(DetectPalmOS())return true;if(DetectGarminNuvifone())return true;return false};function DetectArchos(){if(uagent.search(deviceArchos)>-1)return true;else return false}function DetectBrewDevice(){if(uagent.search(deviceBrew)>-1)return true;else return false}function DetectDangerHiptop(){if(uagent.search(deviceDanger)>-1||uagent.search(deviceHiptop)>-1)return true;else return false}function DetectMaemoTablet(){if(uagent.search(maemo)>-1)return true;if(uagent.search(maemoTablet)>-1&&uagent.search(linux)>-1)return true;else return false}function DetectSonyMylo(){if(uagent.search(manuSony)>-1){if(uagent.search(qtembedded)>-1||uagent.search(mylocom2)>-1)return true;else return false}else return false}function DetectOperaMobile(){if(uagent.search(engineOpera)>-1){if(uagent.search(mini)>-1||uagent.search(mobi)>-1)return true;else return false}else return false}function DetectSonyPlaystation(){if(uagent.search(devicePlaystation)>-1)return true;else return false};function DetectNintendo(){if(uagent.search(deviceNintendo)>-1||uagent.search(deviceWii)>-1||uagent.search(deviceNintendoDs)>-1)return true;else return false};function DetectXbox(){if(uagent.search(deviceXbox)>-1)return true;else return false};function DetectGameConsole(){if(DetectSonyPlaystation())return true;if(DetectNintendo())return true;if(DetectXbox())return true;else return false};function DetectKindle(){if(uagent.search(deviceKindle)>-1)return true;else return false}function DetectMobileQuick(){if(DetectIpad())return false;if(DetectSmartphone())return true;if(uagent.search(deviceMidp)>-1||DetectBrewDevice())return true;if(DetectOperaMobile())return true;if(uagent.search(engineNetfront)>-1)return true;if(uagent.search(engineUpBrowser)>-1)return true;if(uagent.search(engineOpenWeb)>-1)return true;if(DetectDangerHiptop())return true;if(DetectMaemoTablet())return true;if(DetectArchos())return true;if((uagent.search(devicePda)>-1)&&(uagent.search(disUpdate)<0))return true;if(uagent.search(mobile)>-1)return true;if(DetectKindle())return true;return false};function DetectMobileLong(){if(DetectMobileQuick())return true;if(DetectGameConsole())return true;if(DetectSonyMylo())return true;if(uagent.search(manuSamsung1)>-1||uagent.search(manuSonyEricsson)>-1||uagent.search(manuericsson)>-1)return true;if(uagent.search(svcDocomo)>-1)return true;if(uagent.search(svcKddi)>-1)return true;if(uagent.search(svcVodafone)>-1)return true;return false};function DetectTierTablet(){if(DetectIpad()||DetectAndroidTablet()||DetectBlackBerryTablet())return true;else return false};function DetectTierIphone(){if(DetectIphoneOrIpod())return true;if(DetectAndroid())return true;if(DetectAndroidWebKit())return true;if(DetectBlackBerryWebKit())return true;if(DetectPalmWebOS())return true;if(DetectGarminNuvifone())return true;if(DetectMaemoTablet())return true;else return false};function DetectTierRichCss(){if(DetectMobileQuick()){if(DetectTierIphone())return false;if(DetectWebkit())return true;if(DetectS60OssBrowser())return true;if(DetectBlackBerryHigh())return true;if(DetectWindowsPhone7())return true;if(DetectWindowsMobile())return true;if(uagent.search(engineTelecaQ)>-1)return true;else return false}else return false};function DetectTierOtherPhones(){if(DetectMobileLong()){if(DetectTierIphone())return false;if(DetectTierRichCss())return false;else return true}else return false};if(funcao=="DetectMobileLong"){return DetectMobileLong()}if(funcao=="DetectAndroidTablet"){return DetectAndroidTablet()}if(funcao=="DetectAndroid"){return DetectAndroid()}}/*
4 3 proj4js.js -- Javascript reprojection library.
5 4  
6 5 Authors: Mike Adair madairATdmsolutions.ca
... ... @@ -207,16 +206,13 @@ p.x=Proj4js.common.adjust_lon(this.long0+lam);p.y=phi;return p;},P00:.3333333333
207 206 p.x=this.x0+this.a*ksp*cosphi*Math.sin(dlon);p.y=this.y0+this.a*ksp*(this.cos_p12*sinphi-this.sin_p12*cosphi*coslon);return p;},inverse:function(p){p.x-=this.x0;p.y-=this.y0;var rh=Math.sqrt(p.x*p.x+p.y*p.y);if(rh>(2.0*Proj4js.common.HALF_PI*this.a)){Proj4js.reportError("aeqdInvDataError");return;}
208 207 var z=rh/this.a;var sinz=Math.sin(z);var cosz=Math.cos(z);var lon=this.long0;var lat;if(Math.abs(rh)<=Proj4js.common.EPSLN){lat=this.lat0;}else{lat=Proj4js.common.asinz(cosz*this.sin_p12+(p.y*sinz*this.cos_p12)/rh);var con=Math.abs(this.lat0)-Proj4js.common.HALF_PI;if(Math.abs(con)<=Proj4js.common.EPSLN){if(lat0>=0.0){lon=Proj4js.common.adjust_lon(this.long0+Math.atan2(p.x,-p.y));}else{lon=Proj4js.common.adjust_lon(this.long0-Math.atan2(-p.x,p.y));}}else{con=cosz-this.sin_p12*Math.sin(lat);if((Math.abs(con)<Proj4js.common.EPSLN)&&(Math.abs(p.x)<Proj4js.common.EPSLN)){}else{var temp=Math.atan2((p.x*sinz*this.cos_p12),(con*rh));lon=Proj4js.common.adjust_lon(this.long0+Math.atan2((p.x*sinz*this.cos_p12),(con*rh)));}}}
209 208 p.x=lon;p.y=lat;return p;}};Proj4js.Proj.moll={init:function(){},forward:function(p){var lon=p.x;var lat=p.y;var delta_lon=Proj4js.common.adjust_lon(lon-this.long0);var theta=lat;var con=Proj4js.common.PI*Math.sin(lat);for(var i=0;true;i++){var delta_theta=-(theta+Math.sin(theta)-con)/(1.0+Math.cos(theta));theta+=delta_theta;if(Math.abs(delta_theta)<Proj4js.common.EPSLN)break;if(i>=50){Proj4js.reportError("moll:Fwd:IterationError");}}
210   -theta/=2.0;if(Proj4js.common.PI/2-Math.abs(lat)<Proj4js.common.EPSLN)delta_lon=0;var x=0.900316316158*this.a*delta_lon*Math.cos(theta)+this.x0;var y=1.4142135623731*this.a*Math.sin(theta)+this.y0;p.x=x;p.y=y;return p;},inverse:function(p){var theta;var arg;p.x-=this.x0;var arg=p.y/(1.4142135623731*this.a);if(Math.abs(arg)>0.999999999999)arg=0.999999999999;var theta=Math.asin(arg);var lon=Proj4js.common.adjust_lon(this.long0+(p.x/(0.900316316158*this.a*Math.cos(theta))));if(lon<(-Proj4js.common.PI))lon=-Proj4js.common.PI;if(lon>Proj4js.common.PI)lon=Proj4js.common.PI;arg=(2.0*theta+Math.sin(2.0*theta))/Proj4js.common.PI;if(Math.abs(arg)>1.0)arg=1.0;var lat=Math.asin(arg);p.x=lon;p.y=lat;return p;}};
211   -function cpaint(){this.version='2.0.3';var config=new Array();config['debugging']=-1;config['proxy_url']='';config['transfer_mode']='GET';config['async']=true;config['response_type']='OBJECT';config['persistent_connection']=false;config['use_cpaint_api']=true;var stack_count=0;this.capable=test_ajax_capability();this.set_debug=function(){if(typeof arguments[0]=='boolean'){if(arguments[0]===true){config['debugging']=1}else{config['debugging']=0}}else if(typeof arguments[0]=='number'){config['debugging']=Math.round(arguments[0])}};this.set_proxy_url=function(){if(typeof arguments[0]=='string'){config['proxy_url']=arguments[0]}};this.set_transfer_mode=function(){if(arguments[0].toUpperCase()=='GET'||arguments[0].toUpperCase()=='POST'){config['transfer_mode']=arguments[0].toUpperCase()}};this.set_async=function(){if(typeof arguments[0]=='boolean'){config['async']=arguments[0]}};this.set_response_type=function(){if(arguments[0].toUpperCase()=='TEXT'||arguments[0].toUpperCase()=='XML'||arguments[0].toUpperCase()=='OBJECT'||arguments[0].toUpperCase()=='E4X'||arguments[0].toUpperCase()=='JSON'){config['response_type']=arguments[0].toUpperCase()}};this.set_persistent_connection=function(){if(typeof arguments[0]=='boolean'){config['persistent_connection']=arguments[0]}};this.set_use_cpaint_api=function(){if(typeof arguments[0]=='boolean'){config['use_cpaint_api']=arguments[0]}};function test_ajax_capability(){var cpc=new cpaint_call(0,config,this.version);return cpc.test_ajax_capability()}this.call=function(){var sUrl=escape(arguments[0]);var re=new RegExp("%3F","g");var sUrl=sUrl.replace(re,'?');var re=new RegExp("%3D","g");var sUrl=sUrl.replace(re,'=');var re=new RegExp("%26","g");var sUrl=sUrl.replace(re,'&');var re=new RegExp("%3A","g");var sUrl=sUrl.replace(re,':');arguments[0]=sUrl;var use_stack=-1;if(config['persistent_connection']==true&&__cpaint_stack[0]!=null){switch(__cpaint_stack[0].get_http_state()){case-1:use_stack=0;debug('no XMLHttpObject object to re-use for persistence, creating new one later',2);break;case 4:use_stack=0;debug('re-using the persistent connection',2);break;default:debug('the persistent connection is in use - skipping this request',2)}}else if(config['persistent_connection']==true){use_stack=0;__cpaint_stack[use_stack]=new cpaint_call(use_stack,config,this.version);debug('no cpaint_call object available for re-use, created new one',2)}else{use_stack=stack_count;__cpaint_stack[use_stack]=new cpaint_call(use_stack,config,this.version);debug('no cpaint_call object created new one',2)}if(use_stack!=-1){__cpaint_stack[use_stack].set_client_callback(arguments[2]);if(config['proxy_url']!=''){__cpaint_stack[use_stack].call_proxy(arguments)}else{__cpaint_stack[use_stack].call_direct(arguments)}stack_count++;debug('stack size: '+__cpaint_stack.length,2)}};var debug=function(message,debug_level){var prefix='[CPAINT Debug] ';if(debug_level<1){prefix='[CPAINT Error] '}if(config['debugging']>=debug_level){alert(prefix+message)}}}var __cpaint_stack=new Array();var __cpaint_transformer=new cpaint_transformer();function cpaint_call(){var version=arguments[2];var config=new Array();config['debugging']=arguments[1]['debugging'];config['proxy_url']=arguments[1]['proxy_url'];config['transfer_mode']=arguments[1]['transfer_mode'];config['async']=arguments[1]['async'];config['response_type']=arguments[1]['response_type'];config['persistent_connection']=arguments[1]['persistent_connection'];config['use_cpaint_api']=arguments[1]['use_cpaint_api'];var httpobj=false;var client_callback;var stack_id=arguments[0];this.set_client_callback=function(){if(typeof arguments[0]=='function'){client_callback=arguments[0]}};this.get_http_state=function(){var return_value=-1;if(typeof httpobj=='object'){return_value=httpobj.readyState}return return_value};this.call_direct=function(call_arguments){var url=call_arguments[0];var remote_method=call_arguments[1];var querystring='';var i=0;if(url=='SELF'){url=document.location.href}if(config['use_cpaint_api']==true){for(i=3;i<call_arguments.length;i++){if((typeof call_arguments[i]=='string'&&call_arguments[i]!=''&&call_arguments[i].search(/^\s+$/g)==-1)&&!isNaN(call_arguments[i])&&isFinite(call_arguments[i])){querystring+='&cpaint_argument[]='+encodeURIComponent(JSON.stringify(Number(call_arguments[i])))}else{querystring+='&cpaint_argument[]='+encodeURIComponent(JSON.stringify(call_arguments[i]))}}querystring+='&cpaint_response_type='+config['response_type'];if(config['transfer_mode']=='GET'){if(url.indexOf('?')!=-1){url=url+'&cpaint_function='+remote_method+querystring}else{url=url+'?cpaint_function='+remote_method+querystring}}else{querystring='cpaint_function='+remote_method+querystring}}else{for(i=3;i<call_arguments.length;i++){if(i==3){querystring+=encodeURIComponent(call_arguments[i])}else{querystring+='&'+encodeURIComponent(call_arguments[i])}}if(config['transfer_mode']=='GET'){url=url+querystring}}get_connection_object();debug('opening connection to "'+url+'"',1);httpobj.open(config['transfer_mode'],url,config['async']);if(config['transfer_mode']=='POST'){try{httpobj.setRequestHeader('Content-Type','application/x-www-form-urlencoded')}catch(cp_err){debug('POST cannot be completed due to incompatible browser. Use GET as your request method.',0)}}httpobj.setRequestHeader('X-Powered-By','CPAINT v'+version+' :: http://sf.net/projects/cpaint');httpobj.onreadystatechange=callback;if(config['transfer_mode']=='GET'){httpobj.send(null)}else{debug('sending query: '+querystring,1);httpobj.send(querystring)}if(config['async']==true){callback()}};this.call_proxy=function(call_arguments){var proxyscript=config['proxy_url'];var url=call_arguments[0];var remote_method=call_arguments[1];var querystring='';var i=0;var querystring_argument_prefix='cpaint_argument[]=';if(config['use_cpaint_api']==false){querystring_argument_prefix=''}for(i=3;i<call_arguments.length;i++){if(config['use_cpaint_api']==true){if((typeof call_arguments[i]=='string'&&call_arguments[i]!=''&&call_arguments[i].search(/^\s+$/g)==-1)&&!isNaN(call_arguments[i])&&isFinite(call_arguments[i])){querystring+=encodeURIComponent(querystring_argument_prefix+JSON.stringify(Number(call_arguments[i]))+'&')}else{querystring+=encodeURIComponent(querystring_argument_prefix+JSON.stringify(call_arguments[i])+'&')}}else{querystring+=encodeURIComponent(querystring_argument_prefix+call_arguments[i]+'&')}}if(config['use_cpaint_api']==true){querystring+=encodeURIComponent('&cpaint_function='+remote_method);querystring+=encodeURIComponent('&cpaint_responsetype='+config['response_type'])}if(config['transfer_mode']=='GET'){proxyscript+='?cpaint_remote_url='+encodeURIComponent(url)+'&cpaint_remote_query='+querystring+'&cpaint_remote_method='+config['transfer_mode']+'&cpaint_response_type='+config['response_type']}else{querystring='cpaint_remote_url='+encodeURIComponent(url)+'&cpaint_remote_query='+querystring+'&cpaint_remote_method='+config['transfer_mode']+'&cpaint_response_type='+config['response_type']}get_connection_object();debug('opening connection to proxy "'+proxyscript+'"',1);httpobj.open(config['transfer_mode'],proxyscript,config['async']);if(config['transfer_mode']=='POST'){try{httpobj.setRequestHeader('Content-Type','application/x-www-form-urlencoded')}catch(cp_err){debug('POST cannot be completed due to incompatible browser. Use GET as your request method.',0)}}httpobj.setRequestHeader('X-Powered-By','CPAINT v'+version);httpobj.onreadystatechange=callback;if(config['transfer_mode']=='GET'){httpobj.send(null)}else{debug('sending query: '+querystring,1);httpobj.send(querystring)}if(config['async']==false){callback()}};this.test_ajax_capability=function(){return get_connection_object()};var get_connection_object=function(){var return_value=false;var new_connection=false;if(config['persistent_connection']==false){debug('Using new connection object',1);new_connection=true}else{debug('Using shared connection object.',1);if(typeof httpobj!='object'){debug('Getting new persistent connection object.',1);new_connection=true}}if(new_connection==true){try{httpobj=new XMLHttpRequest()}catch(e1){try{httpobj=new ActiveXObject('Msxml2.XMLHTTP')}catch(e){try{httpobj=new ActiveXObject('Microsoft.XMLHTTP')}catch(oc){httpobj=null}}}if(!httpobj){debug('Could not create connection object',0)}else{return_value=true}}if(httpobj.readyState!=4){httpobj.abort()}return return_value};var callback=function(){var response=null;if(httpobj.readyState==4&&httpobj.status==200){if(httpobj.responseText==""){alert("Ocorreu um erro! Retorno vazio.");client_callback("","erro");return}debug(httpobj.responseText,1);debug('using response type '+config['response_type'],2);var r=httpobj.responseText;r=r.split("{");if(r[0]!=""&&r.length>1);{r[0]=""}var responseText=r.join("{");switch(config['response_type']){case'XML':debug(httpobj.responseXML,2);response=__cpaint_transformer.xml_conversion(httpobj.responseXML);break;case'OBJECT':response=__cpaint_transformer.object_conversion(httpobj.responseXML);break;case'TEXT':response=__cpaint_transformer.text_conversion(httpobj.responseText);break;case'E4X':response=__cpaint_transformer.e4x_conversion(httpobj.responseText);break;case'JSON':response=__cpaint_transformer.json_conversion(responseText);break;default:debug('invalid response type \''+response_type+'\'',0)}if(response!=null&&typeof client_callback=='function'){try{if(response.data)client_callback(response,responseText);else client_callback("","erro")}catch(e){client_callback("","erro")}}remove_from_stack()}else{if(httpobj.readyState==4&&httpobj.status!=200){debug('invalid HTTP response code \''+Number(httpobj.status)+'\'',0);if(httpobj.status==500){alert("Ocorreu um erro! 500");client_callback("","erro")}else{client_callback("","erro")}}}};var remove_from_stack=function(){if(typeof stack_id=='number'&&__cpaint_stack[stack_id]&&config['persistent_connection']==false){__cpaint_stack[stack_id]=null}};var debug=function(message,debug_level){var prefix='[CPAINT Debug] ';if(config['debugging']<1){prefix='[CPAINT Error] '}if(config['debugging']>=debug_level){alert(prefix+message)}if(message.search(" error")>1){client_callback("",message)}}}function cpaint_transformer(){this.object_conversion=function(xml_document){var return_value=new cpaint_result_object();var i=0;var firstNodeName='';if(typeof xml_document=='object'&&xml_document!=null){for(i=0;i<xml_document.childNodes.length;i++){if(xml_document.childNodes[i].nodeType==1){firstNodeName=xml_document.childNodes[i].nodeName;break}}var ajax_response=xml_document.getElementsByTagName(firstNodeName);return_value[firstNodeName]=new Array();for(i=0;i<ajax_response.length;i++){var tmp_node=create_object_structure(ajax_response[i]);tmp_node.id=ajax_response[i].getAttribute('id');return_value[firstNodeName].push(tmp_node)}}else{debug('received invalid XML response',0)}return return_value};this.xml_conversion=function(xml_document){return xml_document};this.text_conversion=function(text){return decode(text)};this.e4x_conversion=function(text){text=text.replace(/^\<\?xml[^>]+\>/,'');return new XML(text)};this.json_conversion=function(text){return JSON.parse(text)};var create_object_structure=function(stream){var return_value=new cpaint_result_object();var node_name='';var i=0;var attrib=0;if(stream.hasChildNodes()==true){for(i=0;i<stream.childNodes.length;i++){node_name=stream.childNodes[i].nodeName;node_name=node_name.replace(/[^a-zA-Z0-9_]*/g,'');if(typeof return_value[node_name]!='object'){return_value[node_name]=new Array()}if(stream.childNodes[i].nodeType==1){var tmp_node=create_object_structure(stream.childNodes[i]);for(attrib=0;attrib<stream.childNodes[i].attributes.length;attrib++){tmp_node.set_attribute(stream.childNodes[i].attributes[attrib].nodeName,stream.childNodes[i].attributes[attrib].nodeValue)}return_value[node_name].push(tmp_node)}else if(stream.childNodes[i].nodeType==3){return_value.data=decode(String(stream.firstChild.data))}}}return return_value};var decode=function(rawtext){var plaintext='';var i=0;var c1=0;var c2=0;var c3=0;var u=0;var t=0;while(i<rawtext.length){if(rawtext.charAt(i)=='\\'&&rawtext.charAt(i+1)=='u'){u=0;for(j=2;j<6;j+=1){t=parseInt(rawtext.charAt(i+j),16);if(!isFinite(t)){break}u=u*16+t}plaintext+=String.fromCharCode(u);i+=6}else{plaintext+=rawtext.charAt(i);i++}}if(plaintext!=''&&plaintext.search(/^\s+$/g)==-1&&!isNaN(plaintext)&&isFinite(plaintext)){plaintext=Number(plaintext)}return plaintext}}function cpaint_result_object(){this.id=0;this.data='';var __attributes=new Array();this.find_item_by_id=function(){var return_value=null;var type=arguments[0];var id=arguments[1];var i=0;if(this[type]){for(i=0;i<this[type].length;i++){if(this[type][i].get_attribute('id')==id){return_value=this[type][i];break}}}return return_value};this.get_attribute=function(){var return_value=null;var id=arguments[0];if(typeof __attributes[id]!='undefined'){return_value=__attributes[id]}return return_value};this.set_attribute=function(){__attributes[arguments[0]]=arguments[1]}}Array.prototype.______array='______array';var JSON={org:'http://www.JSON.org',copyright:'(c)2005 JSON.org',license:'http://www.crockford.com/JSON/license.html',stringify:function(arg){var c,i,l,s='',v;var numeric=true;switch(typeof arg){case'object':if(arg){if(arg.______array=='______array'){for(i in arg){if(i!='______array'&&(isNaN(i)||!isFinite(i))){numeric=false;break}}if(numeric==true){for(i=0;i<arg.length;++i){if(typeof arg[i]!='undefined'){v=this.stringify(arg[i]);if(s){s+=','}s+=v}else{s+=',null'}}return'['+s+']'}else{for(i in arg){if(i!='______array'){v=arg[i];if(typeof v!='undefined'&&typeof v!='function'){v=this.stringify(v);if(s){s+=','}s+=this.stringify(i)+':'+v}}}return'{'+s+'}'}}else if(typeof arg.toString!='undefined'){for(i in arg){v=arg[i];if(typeof v!='undefined'&&typeof v!='function'){v=this.stringify(v);if(s){s+=','}s+=this.stringify(i)+':'+v}}return'{'+s+'}'}}return'null';case'number':return isFinite(arg)?String(arg):'null';case'string':l=arg.length;s='"';for(i=0;i<l;i+=1){c=arg.charAt(i);if(c>=' '){if(c=='\\'||c=='"'){s+='\\'}s+=c}else{switch(c){case'\b':s+='\\b';break;case'\f':s+='\\f';break;case'\n':s+='\\n';break;case'\r':s+='\\r';break;case'\t':s+='\\t';break;default:c=c.charCodeAt();s+='\\u00'+Math.floor(c/16).toString(16)+(c%16).toString(16)}}}return s+'"';case'boolean':return String(arg);default:return'null'}},parse:function(text){var at=0;var ch=' ';function error(m){throw{name:'JSONError',message:m,at:at-1,text:text}};function next(){ch=text.charAt(at);at+=1;return ch};function white(){while(ch!=''&&ch<=' '){next()}};function str(){var i,s='',t,u;if(ch=='"'){outer:while(next()){if(ch=='"'){next();return s}else if(ch=='\\'){switch(next()){case'b':s+='\b';break;case'f':s+='\f';break;case'n':s+='\n';break;case'r':s+='\r';break;case't':s+='\t';break;case'u':u=0;for(i=0;i<4;i+=1){t=parseInt(next(),16);if(!isFinite(t)){break outer}u=u*16+t}s+=String.fromCharCode(u);break;default:s+=ch}}else{s+=ch}}}error("Bad string")};function arr(){var a=[];if(ch=='['){next();white();if(ch==']'){next();return a}while(ch){a.push(val());white();if(ch==']'){next();return a}else if(ch!=','){break}next();white()}}error("Bad array")};function obj(){var k,o={};if(ch=='{'){next();white();if(ch=='}'){next();return o}while(ch){k=str();white();if(ch!=':'){break}next();o[k]=val();white();if(ch=='}'){next();return o}else if(ch!=','){break}next();white()}}error("Bad object")};function assoc(){var k,a=[];if(ch=='<'){next();white();if(ch=='>'){next();return a}while(ch){k=str();white();if(ch!=':'){break}next();a[k]=val();white();if(ch=='>'){next();return a}else if(ch!=','){break}next();white()}}error("Bad associative array")};function num(){var n='',v;if(ch=='-'){n='-';next()}while(ch>='0'&&ch<='9'){n+=ch;next()}if(ch=='.'){n+='.';while(next()&&ch>='0'&&ch<='9'){n+=ch}}if(ch=='e'||ch=='E'){n+='e';next();if(ch=='-'||ch=='+'){n+=ch;next()}while(ch>='0'&&ch<='9'){n+=ch;next()}}v=+n;if(!isFinite(v)){error("Bad number")}else{return v}};function word(){switch(ch){case't':if(next()=='r'&&next()=='u'&&next()=='e'){next();return true}break;case'f':if(next()=='a'&&next()=='l'&&next()=='s'&&next()=='e'){next();return false}break;case'n':if(next()=='u'&&next()=='l'&&next()=='l'){next();return null}break}error("Syntax error")};function val(){white();switch(ch){case'{':return obj();case'[':return arr();case'<':return assoc();case'"':return str();case'-':return num();default:return ch>='0'&&ch<='9'?num():word()}};return val()}};
212   -/*
  209 +theta/=2.0;if(Proj4js.common.PI/2-Math.abs(lat)<Proj4js.common.EPSLN)delta_lon=0;var x=0.900316316158*this.a*delta_lon*Math.cos(theta)+this.x0;var y=1.4142135623731*this.a*Math.sin(theta)+this.y0;p.x=x;p.y=y;return p;},inverse:function(p){var theta;var arg;p.x-=this.x0;var arg=p.y/(1.4142135623731*this.a);if(Math.abs(arg)>0.999999999999)arg=0.999999999999;var theta=Math.asin(arg);var lon=Proj4js.common.adjust_lon(this.long0+(p.x/(0.900316316158*this.a*Math.cos(theta))));if(lon<(-Proj4js.common.PI))lon=-Proj4js.common.PI;if(lon>Proj4js.common.PI)lon=Proj4js.common.PI;arg=(2.0*theta+Math.sin(2.0*theta))/Proj4js.common.PI;if(Math.abs(arg)>1.0)arg=1.0;var lat=Math.asin(arg);p.x=lon;p.y=lat;return p;}};function cpaint(){this.version='2.0.3';var config=new Array();config['debugging']=-1;config['proxy_url']='';config['transfer_mode']='GET';config['async']=true;config['response_type']='OBJECT';config['persistent_connection']=false;config['use_cpaint_api']=true;var stack_count=0;this.capable=test_ajax_capability();this.set_debug=function(){if(typeof arguments[0]=='boolean'){if(arguments[0]===true){config['debugging']=1}else{config['debugging']=0}}else if(typeof arguments[0]=='number'){config['debugging']=Math.round(arguments[0])}};this.set_proxy_url=function(){if(typeof arguments[0]=='string'){config['proxy_url']=arguments[0]}};this.set_transfer_mode=function(){if(arguments[0].toUpperCase()=='GET'||arguments[0].toUpperCase()=='POST'){config['transfer_mode']=arguments[0].toUpperCase()}};this.set_async=function(){if(typeof arguments[0]=='boolean'){config['async']=arguments[0]}};this.set_response_type=function(){if(arguments[0].toUpperCase()=='TEXT'||arguments[0].toUpperCase()=='XML'||arguments[0].toUpperCase()=='OBJECT'||arguments[0].toUpperCase()=='E4X'||arguments[0].toUpperCase()=='JSON'){config['response_type']=arguments[0].toUpperCase()}};this.set_persistent_connection=function(){if(typeof arguments[0]=='boolean'){config['persistent_connection']=arguments[0]}};this.set_use_cpaint_api=function(){if(typeof arguments[0]=='boolean'){config['use_cpaint_api']=arguments[0]}};function test_ajax_capability(){var cpc=new cpaint_call(0,config,this.version);return cpc.test_ajax_capability()}this.call=function(){var sUrl=escape(arguments[0]);var re=new RegExp("%3F","g");var sUrl=sUrl.replace(re,'?');var re=new RegExp("%3D","g");var sUrl=sUrl.replace(re,'=');var re=new RegExp("%26","g");var sUrl=sUrl.replace(re,'&');var re=new RegExp("%3A","g");var sUrl=sUrl.replace(re,':');arguments[0]=sUrl;var use_stack=-1;if(config['persistent_connection']==true&&__cpaint_stack[0]!=null){switch(__cpaint_stack[0].get_http_state()){case-1:use_stack=0;debug('no XMLHttpObject object to re-use for persistence, creating new one later',2);break;case 4:use_stack=0;debug('re-using the persistent connection',2);break;default:debug('the persistent connection is in use - skipping this request',2)}}else if(config['persistent_connection']==true){use_stack=0;__cpaint_stack[use_stack]=new cpaint_call(use_stack,config,this.version);debug('no cpaint_call object available for re-use, created new one',2)}else{use_stack=stack_count;__cpaint_stack[use_stack]=new cpaint_call(use_stack,config,this.version);debug('no cpaint_call object created new one',2)}if(use_stack!=-1){__cpaint_stack[use_stack].set_client_callback(arguments[2]);if(config['proxy_url']!=''){__cpaint_stack[use_stack].call_proxy(arguments)}else{__cpaint_stack[use_stack].call_direct(arguments)}stack_count++;debug('stack size: '+__cpaint_stack.length,2)}};var debug=function(message,debug_level){var prefix='[CPAINT Debug] ';if(debug_level<1){prefix='[CPAINT Error] '}if(config['debugging']>=debug_level){alert(prefix+message)}}}var __cpaint_stack=new Array();var __cpaint_transformer=new cpaint_transformer();function cpaint_call(){var version=arguments[2];var config=new Array();config['debugging']=arguments[1]['debugging'];config['proxy_url']=arguments[1]['proxy_url'];config['transfer_mode']=arguments[1]['transfer_mode'];config['async']=arguments[1]['async'];config['response_type']=arguments[1]['response_type'];config['persistent_connection']=arguments[1]['persistent_connection'];config['use_cpaint_api']=arguments[1]['use_cpaint_api'];var httpobj=false;var client_callback;var stack_id=arguments[0];this.set_client_callback=function(){if(typeof arguments[0]=='function'){client_callback=arguments[0]}};this.get_http_state=function(){var return_value=-1;if(typeof httpobj=='object'){return_value=httpobj.readyState}return return_value};this.call_direct=function(call_arguments){var url=call_arguments[0];var remote_method=call_arguments[1];var querystring='';var i=0;if(url=='SELF'){url=document.location.href}if(config['use_cpaint_api']==true){for(i=3;i<call_arguments.length;i++){if((typeof call_arguments[i]=='string'&&call_arguments[i]!=''&&call_arguments[i].search(/^\s+$/g)==-1)&&!isNaN(call_arguments[i])&&isFinite(call_arguments[i])){querystring+='&cpaint_argument[]='+encodeURIComponent(JSON.stringify(Number(call_arguments[i])))}else{querystring+='&cpaint_argument[]='+encodeURIComponent(JSON.stringify(call_arguments[i]))}}querystring+='&cpaint_response_type='+config['response_type'];if(config['transfer_mode']=='GET'){if(url.indexOf('?')!=-1){url=url+'&cpaint_function='+remote_method+querystring}else{url=url+'?cpaint_function='+remote_method+querystring}}else{querystring='cpaint_function='+remote_method+querystring}}else{for(i=3;i<call_arguments.length;i++){if(i==3){querystring+=encodeURIComponent(call_arguments[i])}else{querystring+='&'+encodeURIComponent(call_arguments[i])}}if(config['transfer_mode']=='GET'){url=url+querystring}}get_connection_object();debug('opening connection to "'+url+'"',1);httpobj.open(config['transfer_mode'],url,config['async']);if(config['transfer_mode']=='POST'){try{httpobj.setRequestHeader('Content-Type','application/x-www-form-urlencoded')}catch(cp_err){debug('POST cannot be completed due to incompatible browser. Use GET as your request method.',0)}}httpobj.setRequestHeader('X-Powered-By','CPAINT v'+version+' :: http://sf.net/projects/cpaint');httpobj.onreadystatechange=callback;if(config['transfer_mode']=='GET'){httpobj.send(null)}else{debug('sending query: '+querystring,1);httpobj.send(querystring)}if(config['async']==true){callback()}};this.call_proxy=function(call_arguments){var proxyscript=config['proxy_url'];var url=call_arguments[0];var remote_method=call_arguments[1];var querystring='';var i=0;var querystring_argument_prefix='cpaint_argument[]=';if(config['use_cpaint_api']==false){querystring_argument_prefix=''}for(i=3;i<call_arguments.length;i++){if(config['use_cpaint_api']==true){if((typeof call_arguments[i]=='string'&&call_arguments[i]!=''&&call_arguments[i].search(/^\s+$/g)==-1)&&!isNaN(call_arguments[i])&&isFinite(call_arguments[i])){querystring+=encodeURIComponent(querystring_argument_prefix+JSON.stringify(Number(call_arguments[i]))+'&')}else{querystring+=encodeURIComponent(querystring_argument_prefix+JSON.stringify(call_arguments[i])+'&')}}else{querystring+=encodeURIComponent(querystring_argument_prefix+call_arguments[i]+'&')}}if(config['use_cpaint_api']==true){querystring+=encodeURIComponent('&cpaint_function='+remote_method);querystring+=encodeURIComponent('&cpaint_responsetype='+config['response_type'])}if(config['transfer_mode']=='GET'){proxyscript+='?cpaint_remote_url='+encodeURIComponent(url)+'&cpaint_remote_query='+querystring+'&cpaint_remote_method='+config['transfer_mode']+'&cpaint_response_type='+config['response_type']}else{querystring='cpaint_remote_url='+encodeURIComponent(url)+'&cpaint_remote_query='+querystring+'&cpaint_remote_method='+config['transfer_mode']+'&cpaint_response_type='+config['response_type']}get_connection_object();debug('opening connection to proxy "'+proxyscript+'"',1);httpobj.open(config['transfer_mode'],proxyscript,config['async']);if(config['transfer_mode']=='POST'){try{httpobj.setRequestHeader('Content-Type','application/x-www-form-urlencoded')}catch(cp_err){debug('POST cannot be completed due to incompatible browser. Use GET as your request method.',0)}}httpobj.setRequestHeader('X-Powered-By','CPAINT v'+version);httpobj.onreadystatechange=callback;if(config['transfer_mode']=='GET'){httpobj.send(null)}else{debug('sending query: '+querystring,1);httpobj.send(querystring)}if(config['async']==false){callback()}};this.test_ajax_capability=function(){return get_connection_object()};var get_connection_object=function(){var return_value=false;var new_connection=false;if(config['persistent_connection']==false){debug('Using new connection object',1);new_connection=true}else{debug('Using shared connection object.',1);if(typeof httpobj!='object'){debug('Getting new persistent connection object.',1);new_connection=true}}if(new_connection==true){try{httpobj=new XMLHttpRequest()}catch(e1){try{httpobj=new ActiveXObject('Msxml2.XMLHTTP')}catch(e){try{httpobj=new ActiveXObject('Microsoft.XMLHTTP')}catch(oc){httpobj=null}}}if(!httpobj){debug('Could not create connection object',0)}else{return_value=true}}if(httpobj.readyState!=4){httpobj.abort()}return return_value};var callback=function(){var response=null;if(httpobj.readyState==4&&httpobj.status==200){if(httpobj.responseText==""){alert("Ocorreu um erro! Retorno vazio.");client_callback("","erro");return}debug(httpobj.responseText,1);debug('using response type '+config['response_type'],2);var r=httpobj.responseText;r=r.split("{");if(r[0]!=""&&r.length>1);{r[0]=""}var responseText=r.join("{");switch(config['response_type']){case'XML':debug(httpobj.responseXML,2);response=__cpaint_transformer.xml_conversion(httpobj.responseXML);break;case'OBJECT':response=__cpaint_transformer.object_conversion(httpobj.responseXML);break;case'TEXT':response=__cpaint_transformer.text_conversion(httpobj.responseText);break;case'E4X':response=__cpaint_transformer.e4x_conversion(httpobj.responseText);break;case'JSON':response=__cpaint_transformer.json_conversion(responseText);break;default:debug('invalid response type \''+response_type+'\'',0)}if(response!=null&&typeof client_callback=='function'){try{if(response.data)client_callback(response,responseText);else client_callback("","erro")}catch(e){client_callback("","erro")}}remove_from_stack()}else{if(httpobj.readyState==4&&httpobj.status!=200){debug('invalid HTTP response code \''+Number(httpobj.status)+'\'',0);if(httpobj.status==500){alert("Ocorreu um erro! 500");client_callback("","erro")}else{client_callback("","erro")}}}};var remove_from_stack=function(){if(typeof stack_id=='number'&&__cpaint_stack[stack_id]&&config['persistent_connection']==false){__cpaint_stack[stack_id]=null}};var debug=function(message,debug_level){var prefix='[CPAINT Debug] ';if(config['debugging']<1){prefix='[CPAINT Error] '}if(config['debugging']>=debug_level){alert(prefix+message)}if(message.search(" error")>1){client_callback("",message)}}}function cpaint_transformer(){this.object_conversion=function(xml_document){var return_value=new cpaint_result_object();var i=0;var firstNodeName='';if(typeof xml_document=='object'&&xml_document!=null){for(i=0;i<xml_document.childNodes.length;i++){if(xml_document.childNodes[i].nodeType==1){firstNodeName=xml_document.childNodes[i].nodeName;break}}var ajax_response=xml_document.getElementsByTagName(firstNodeName);return_value[firstNodeName]=new Array();for(i=0;i<ajax_response.length;i++){var tmp_node=create_object_structure(ajax_response[i]);tmp_node.id=ajax_response[i].getAttribute('id');return_value[firstNodeName].push(tmp_node)}}else{debug('received invalid XML response',0)}return return_value};this.xml_conversion=function(xml_document){return xml_document};this.text_conversion=function(text){return decode(text)};this.e4x_conversion=function(text){text=text.replace(/^\<\?xml[^>]+\>/,'');return new XML(text)};this.json_conversion=function(text){return JSON.parse(text)};var create_object_structure=function(stream){var return_value=new cpaint_result_object();var node_name='';var i=0;var attrib=0;if(stream.hasChildNodes()==true){for(i=0;i<stream.childNodes.length;i++){node_name=stream.childNodes[i].nodeName;node_name=node_name.replace(/[^a-zA-Z0-9_]*/g,'');if(typeof return_value[node_name]!='object'){return_value[node_name]=new Array()}if(stream.childNodes[i].nodeType==1){var tmp_node=create_object_structure(stream.childNodes[i]);for(attrib=0;attrib<stream.childNodes[i].attributes.length;attrib++){tmp_node.set_attribute(stream.childNodes[i].attributes[attrib].nodeName,stream.childNodes[i].attributes[attrib].nodeValue)}return_value[node_name].push(tmp_node)}else if(stream.childNodes[i].nodeType==3){return_value.data=decode(String(stream.firstChild.data))}}}return return_value};var decode=function(rawtext){var plaintext='';var i=0;var c1=0;var c2=0;var c3=0;var u=0;var t=0;while(i<rawtext.length){if(rawtext.charAt(i)=='\\'&&rawtext.charAt(i+1)=='u'){u=0;for(j=2;j<6;j+=1){t=parseInt(rawtext.charAt(i+j),16);if(!isFinite(t)){break}u=u*16+t}plaintext+=String.fromCharCode(u);i+=6}else{plaintext+=rawtext.charAt(i);i++}}if(plaintext!=''&&plaintext.search(/^\s+$/g)==-1&&!isNaN(plaintext)&&isFinite(plaintext)){plaintext=Number(plaintext)}return plaintext}}function cpaint_result_object(){this.id=0;this.data='';var __attributes=new Array();this.find_item_by_id=function(){var return_value=null;var type=arguments[0];var id=arguments[1];var i=0;if(this[type]){for(i=0;i<this[type].length;i++){if(this[type][i].get_attribute('id')==id){return_value=this[type][i];break}}}return return_value};this.get_attribute=function(){var return_value=null;var id=arguments[0];if(typeof __attributes[id]!='undefined'){return_value=__attributes[id]}return return_value};this.set_attribute=function(){__attributes[arguments[0]]=arguments[1]}}Array.prototype.______array='______array';var JSON={org:'http://www.JSON.org',copyright:'(c)2005 JSON.org',license:'http://www.crockford.com/JSON/license.html',stringify:function(arg){var c,i,l,s='',v;var numeric=true;switch(typeof arg){case'object':if(arg){if(arg.______array=='______array'){for(i in arg){if(i!='______array'&&(isNaN(i)||!isFinite(i))){numeric=false;break}}if(numeric==true){for(i=0;i<arg.length;++i){if(typeof arg[i]!='undefined'){v=this.stringify(arg[i]);if(s){s+=','}s+=v}else{s+=',null'}}return'['+s+']'}else{for(i in arg){if(i!='______array'){v=arg[i];if(typeof v!='undefined'&&typeof v!='function'){v=this.stringify(v);if(s){s+=','}s+=this.stringify(i)+':'+v}}}return'{'+s+'}'}}else if(typeof arg.toString!='undefined'){for(i in arg){v=arg[i];if(typeof v!='undefined'&&typeof v!='function'){v=this.stringify(v);if(s){s+=','}s+=this.stringify(i)+':'+v}}return'{'+s+'}'}}return'null';case'number':return isFinite(arg)?String(arg):'null';case'string':l=arg.length;s='"';for(i=0;i<l;i+=1){c=arg.charAt(i);if(c>=' '){if(c=='\\'||c=='"'){s+='\\'}s+=c}else{switch(c){case'\b':s+='\\b';break;case'\f':s+='\\f';break;case'\n':s+='\\n';break;case'\r':s+='\\r';break;case'\t':s+='\\t';break;default:c=c.charCodeAt();s+='\\u00'+Math.floor(c/16).toString(16)+(c%16).toString(16)}}}return s+'"';case'boolean':return String(arg);default:return'null'}},parse:function(text){var at=0;var ch=' ';function error(m){throw{name:'JSONError',message:m,at:at-1,text:text}};function next(){ch=text.charAt(at);at+=1;return ch};function white(){while(ch!=''&&ch<=' '){next()}};function str(){var i,s='',t,u;if(ch=='"'){outer:while(next()){if(ch=='"'){next();return s}else if(ch=='\\'){switch(next()){case'b':s+='\b';break;case'f':s+='\f';break;case'n':s+='\n';break;case'r':s+='\r';break;case't':s+='\t';break;case'u':u=0;for(i=0;i<4;i+=1){t=parseInt(next(),16);if(!isFinite(t)){break outer}u=u*16+t}s+=String.fromCharCode(u);break;default:s+=ch}}else{s+=ch}}}error("Bad string")};function arr(){var a=[];if(ch=='['){next();white();if(ch==']'){next();return a}while(ch){a.push(val());white();if(ch==']'){next();return a}else if(ch!=','){break}next();white()}}error("Bad array")};function obj(){var k,o={};if(ch=='{'){next();white();if(ch=='}'){next();return o}while(ch){k=str();white();if(ch!=':'){break}next();o[k]=val();white();if(ch=='}'){next();return o}else if(ch!=','){break}next();white()}}error("Bad object")};function assoc(){var k,a=[];if(ch=='<'){next();white();if(ch=='>'){next();return a}while(ch){k=str();white();if(ch!=':'){break}next();a[k]=val();white();if(ch=='>'){next();return a}else if(ch!=','){break}next();white()}}error("Bad associative array")};function num(){var n='',v;if(ch=='-'){n='-';next()}while(ch>='0'&&ch<='9'){n+=ch;next()}if(ch=='.'){n+='.';while(next()&&ch>='0'&&ch<='9'){n+=ch}}if(ch=='e'||ch=='E'){n+='e';next();if(ch=='-'||ch=='+'){n+=ch;next()}while(ch>='0'&&ch<='9'){n+=ch;next()}}v=+n;if(!isFinite(v)){error("Bad number")}else{return v}};function word(){switch(ch){case't':if(next()=='r'&&next()=='u'&&next()=='e'){next();return true}break;case'f':if(next()=='a'&&next()=='l'&&next()=='s'&&next()=='e'){next();return false}break;case'n':if(next()=='u'&&next()=='l'&&next()=='l'){next();return null}break}error("Syntax error")};function val(){white();switch(ch){case'{':return obj();case'[':return arr();case'<':return assoc();case'"':return str();case'-':return num();default:return ch>='0'&&ch<='9'?num():word()}};return val()}};/*
213 210 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
214 211 Code licensed under the BSD License:
215 212 http://developer.yahoo.net/yui/license.txt
216 213 version: 2.7.0
217 214 */
218   -if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=(""+A[C]).split(".");E=YAHOO;for(B=(D[0]=="YAHOO")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]];}}return E;};YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(B&&B.log){return B.log(D,A,C);}else{return false;}};YAHOO.register=function(A,E,D){var I=YAHOO.env.modules,B,H,G,F,C;if(!I[A]){I[A]={versions:[],builds:[]};}B=I[A];H=D.version;G=D.build;F=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=E;for(C=0;C<F.length;C=C+1){F[C](B);}if(E){E.VERSION=H;E.BUILD=G;}else{YAHOO.log("mainClass is undefined for module "+A,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(A){return YAHOO.env.modules[A]||null;};YAHOO.env.ua=function(){var C={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0,caja:0},B=navigator.userAgent,A;if((/KHTML/).test(B)){C.webkit=1;}A=B.match(/AppleWebKit\/([^\s]*)/);if(A&&A[1]){C.webkit=parseFloat(A[1]);if(/ Mobile\//.test(B)){C.mobile="Apple";}else{A=B.match(/NokiaN[^\/]*/);if(A){C.mobile=A[0];}}A=B.match(/AdobeAIR\/([^\s]*)/);if(A){C.air=A[0];}}if(!C.webkit){A=B.match(/Opera[\s\/]([^\s]*)/);if(A&&A[1]){C.opera=parseFloat(A[1]);A=B.match(/Opera Mini[^;]*/);if(A){C.mobile=A[0];}}else{A=B.match(/MSIE\s([^;]*)/);if(A&&A[1]){C.ie=parseFloat(A[1]);}else{A=B.match(/Gecko\/([^\s]*)/);if(A){C.gecko=1;A=B.match(/rv:([^\s\)]*)/);if(A&&A[1]){C.gecko=parseFloat(A[1]);}}}}}A=B.match(/Caja\/([^\s]*)/);if(A&&A[1]){C.caja=parseFloat(A[1]);}return C;}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var B=YAHOO_config.listener,A=YAHOO.env.listeners,D=true,C;if(B){for(C=0;C<A.length;C=C+1){if(A[C]==B){D=false;break;}}if(D){A.push(B);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var B=YAHOO.lang,F="[object Array]",C="[object Function]",A=Object.prototype,E=["toString","valueOf"],D={isArray:function(G){return A.toString.apply(G)===F;},isBoolean:function(G){return typeof G==="boolean";},isFunction:function(G){return A.toString.apply(G)===C;},isNull:function(G){return G===null;},isNumber:function(G){return typeof G==="number"&&isFinite(G);},isObject:function(G){return(G&&(typeof G==="object"||B.isFunction(G)))||false;},isString:function(G){return typeof G==="string";},isUndefined:function(G){return typeof G==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(I,H){var G,K,J;for(G=0;G<E.length;G=G+1){K=E[G];J=H[K];if(B.isFunction(J)&&J!=A[K]){I[K]=J;}}}:function(){},extend:function(J,K,I){if(!K||!J){throw new Error("extend failed, please check that "+"all dependencies are included.");}var H=function(){},G;H.prototype=K.prototype;J.prototype=new H();J.prototype.constructor=J;J.superclass=K.prototype;if(K.prototype.constructor==A.constructor){K.prototype.constructor=K;}if(I){for(G in I){if(B.hasOwnProperty(I,G)){J.prototype[G]=I[G];}}B._IEEnumFix(J.prototype,I);}},augmentObject:function(K,J){if(!J||!K){throw new Error("Absorb failed, verify dependencies.");}var G=arguments,I,L,H=G[2];if(H&&H!==true){for(I=2;I<G.length;I=I+1){K[G[I]]=J[G[I]];}}else{for(L in J){if(H||!(L in K)){K[L]=J[L];}}B._IEEnumFix(K,J);}},augmentProto:function(J,I){if(!I||!J){throw new Error("Augment failed, verify dependencies.");}var G=[J.prototype,I.prototype],H;for(H=2;H<arguments.length;H=H+1){G.push(arguments[H]);}B.augmentObject.apply(this,G);},dump:function(G,L){var I,K,N=[],O="{...}",H="f(){...}",M=", ",J=" => ";if(!B.isObject(G)){return G+"";}else{if(G instanceof Date||("nodeType" in G&&"tagName" in G)){return G;}else{if(B.isFunction(G)){return H;}}}L=(B.isNumber(L))?L:3;if(B.isArray(G)){N.push("[");for(I=0,K=G.length;I<K;I=I+1){if(B.isObject(G[I])){N.push((L>0)?B.dump(G[I],L-1):O);}else{N.push(G[I]);}N.push(M);}if(N.length>1){N.pop();}N.push("]");}else{N.push("{");for(I in G){if(B.hasOwnProperty(G,I)){N.push(I+J);if(B.isObject(G[I])){N.push((L>0)?B.dump(G[I],L-1):O);}else{N.push(G[I]);}N.push(M);}}if(N.length>1){N.pop();}N.push("}");}return N.join("");},substitute:function(V,H,O){var L,K,J,R,S,U,Q=[],I,M="dump",P=" ",G="{",T="}",N;for(;;){L=V.lastIndexOf(G);if(L<0){break;}K=V.indexOf(T,L);if(L+1>=K){break;}I=V.substring(L+1,K);R=I;U=null;J=R.indexOf(P);if(J>-1){U=R.substring(J+1);R=R.substring(0,J);}S=H[R];if(O){S=O(R,S,U);}if(B.isObject(S)){if(B.isArray(S)){S=B.dump(S,parseInt(U,10));}else{U=U||"";N=U.indexOf(M);if(N>-1){U=U.substring(4);}if(S.toString===A.toString||N>-1){S=B.dump(S,parseInt(U,10));}else{S=S.toString();}}}else{if(!B.isString(S)&&!B.isNumber(S)){S="~-"+Q.length+"-~";Q[Q.length]=I;}}V=V.substring(0,L)+S+V.substring(K+1);}for(L=Q.length-1;L>=0;L=L-1){V=V.replace(new RegExp("~-"+L+"-~"),"{"+Q[L]+"}","g");}return V;},trim:function(G){try{return G.replace(/^\s+|\s+$/g,"");}catch(H){return G;}},merge:function(){var J={},H=arguments,G=H.length,I;for(I=0;I<G;I=I+1){B.augmentObject(J,H[I],true);}return J;},later:function(N,H,O,J,K){N=N||0;H=H||{};var I=O,M=J,L,G;if(B.isString(O)){I=H[O];}if(!I){throw new TypeError("method undefined");}if(!B.isArray(M)){M=[J];}L=function(){I.apply(H,M);};G=(K)?setInterval(L,N):setTimeout(L,N);return{interval:K,cancel:function(){if(this.interval){clearInterval(G);}else{clearTimeout(G);}}};},isValue:function(G){return(B.isObject(G)||B.isString(G)||B.isNumber(G)||B.isBoolean(G));}};B.hasOwnProperty=(A.hasOwnProperty)?function(G,H){return G&&G.hasOwnProperty(H);}:function(G,H){return !B.isUndefined(G[H])&&G.constructor.prototype[H]!==G[H];};D.augmentObject(B,D,true);YAHOO.util.Lang=B;B.augment=B.augmentProto;YAHOO.augment=B.augmentProto;YAHOO.extend=B.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.7.0",build:"1799"});
219   -/*
  215 +if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=(""+A[C]).split(".");E=YAHOO;for(B=(D[0]=="YAHOO")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]];}}return E;};YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(B&&B.log){return B.log(D,A,C);}else{return false;}};YAHOO.register=function(A,E,D){var I=YAHOO.env.modules,B,H,G,F,C;if(!I[A]){I[A]={versions:[],builds:[]};}B=I[A];H=D.version;G=D.build;F=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=E;for(C=0;C<F.length;C=C+1){F[C](B);}if(E){E.VERSION=H;E.BUILD=G;}else{YAHOO.log("mainClass is undefined for module "+A,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(A){return YAHOO.env.modules[A]||null;};YAHOO.env.ua=function(){var C={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0,caja:0},B=navigator.userAgent,A;if((/KHTML/).test(B)){C.webkit=1;}A=B.match(/AppleWebKit\/([^\s]*)/);if(A&&A[1]){C.webkit=parseFloat(A[1]);if(/ Mobile\//.test(B)){C.mobile="Apple";}else{A=B.match(/NokiaN[^\/]*/);if(A){C.mobile=A[0];}}A=B.match(/AdobeAIR\/([^\s]*)/);if(A){C.air=A[0];}}if(!C.webkit){A=B.match(/Opera[\s\/]([^\s]*)/);if(A&&A[1]){C.opera=parseFloat(A[1]);A=B.match(/Opera Mini[^;]*/);if(A){C.mobile=A[0];}}else{A=B.match(/MSIE\s([^;]*)/);if(A&&A[1]){C.ie=parseFloat(A[1]);}else{A=B.match(/Gecko\/([^\s]*)/);if(A){C.gecko=1;A=B.match(/rv:([^\s\)]*)/);if(A&&A[1]){C.gecko=parseFloat(A[1]);}}}}}A=B.match(/Caja\/([^\s]*)/);if(A&&A[1]){C.caja=parseFloat(A[1]);}return C;}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var B=YAHOO_config.listener,A=YAHOO.env.listeners,D=true,C;if(B){for(C=0;C<A.length;C=C+1){if(A[C]==B){D=false;break;}}if(D){A.push(B);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var B=YAHOO.lang,F="[object Array]",C="[object Function]",A=Object.prototype,E=["toString","valueOf"],D={isArray:function(G){return A.toString.apply(G)===F;},isBoolean:function(G){return typeof G==="boolean";},isFunction:function(G){return A.toString.apply(G)===C;},isNull:function(G){return G===null;},isNumber:function(G){return typeof G==="number"&&isFinite(G);},isObject:function(G){return(G&&(typeof G==="object"||B.isFunction(G)))||false;},isString:function(G){return typeof G==="string";},isUndefined:function(G){return typeof G==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(I,H){var G,K,J;for(G=0;G<E.length;G=G+1){K=E[G];J=H[K];if(B.isFunction(J)&&J!=A[K]){I[K]=J;}}}:function(){},extend:function(J,K,I){if(!K||!J){throw new Error("extend failed, please check that "+"all dependencies are included.");}var H=function(){},G;H.prototype=K.prototype;J.prototype=new H();J.prototype.constructor=J;J.superclass=K.prototype;if(K.prototype.constructor==A.constructor){K.prototype.constructor=K;}if(I){for(G in I){if(B.hasOwnProperty(I,G)){J.prototype[G]=I[G];}}B._IEEnumFix(J.prototype,I);}},augmentObject:function(K,J){if(!J||!K){throw new Error("Absorb failed, verify dependencies.");}var G=arguments,I,L,H=G[2];if(H&&H!==true){for(I=2;I<G.length;I=I+1){K[G[I]]=J[G[I]];}}else{for(L in J){if(H||!(L in K)){K[L]=J[L];}}B._IEEnumFix(K,J);}},augmentProto:function(J,I){if(!I||!J){throw new Error("Augment failed, verify dependencies.");}var G=[J.prototype,I.prototype],H;for(H=2;H<arguments.length;H=H+1){G.push(arguments[H]);}B.augmentObject.apply(this,G);},dump:function(G,L){var I,K,N=[],O="{...}",H="f(){...}",M=", ",J=" => ";if(!B.isObject(G)){return G+"";}else{if(G instanceof Date||("nodeType" in G&&"tagName" in G)){return G;}else{if(B.isFunction(G)){return H;}}}L=(B.isNumber(L))?L:3;if(B.isArray(G)){N.push("[");for(I=0,K=G.length;I<K;I=I+1){if(B.isObject(G[I])){N.push((L>0)?B.dump(G[I],L-1):O);}else{N.push(G[I]);}N.push(M);}if(N.length>1){N.pop();}N.push("]");}else{N.push("{");for(I in G){if(B.hasOwnProperty(G,I)){N.push(I+J);if(B.isObject(G[I])){N.push((L>0)?B.dump(G[I],L-1):O);}else{N.push(G[I]);}N.push(M);}}if(N.length>1){N.pop();}N.push("}");}return N.join("");},substitute:function(V,H,O){var L,K,J,R,S,U,Q=[],I,M="dump",P=" ",G="{",T="}",N;for(;;){L=V.lastIndexOf(G);if(L<0){break;}K=V.indexOf(T,L);if(L+1>=K){break;}I=V.substring(L+1,K);R=I;U=null;J=R.indexOf(P);if(J>-1){U=R.substring(J+1);R=R.substring(0,J);}S=H[R];if(O){S=O(R,S,U);}if(B.isObject(S)){if(B.isArray(S)){S=B.dump(S,parseInt(U,10));}else{U=U||"";N=U.indexOf(M);if(N>-1){U=U.substring(4);}if(S.toString===A.toString||N>-1){S=B.dump(S,parseInt(U,10));}else{S=S.toString();}}}else{if(!B.isString(S)&&!B.isNumber(S)){S="~-"+Q.length+"-~";Q[Q.length]=I;}}V=V.substring(0,L)+S+V.substring(K+1);}for(L=Q.length-1;L>=0;L=L-1){V=V.replace(new RegExp("~-"+L+"-~"),"{"+Q[L]+"}","g");}return V;},trim:function(G){try{return G.replace(/^\s+|\s+$/g,"");}catch(H){return G;}},merge:function(){var J={},H=arguments,G=H.length,I;for(I=0;I<G;I=I+1){B.augmentObject(J,H[I],true);}return J;},later:function(N,H,O,J,K){N=N||0;H=H||{};var I=O,M=J,L,G;if(B.isString(O)){I=H[O];}if(!I){throw new TypeError("method undefined");}if(!B.isArray(M)){M=[J];}L=function(){I.apply(H,M);};G=(K)?setInterval(L,N):setTimeout(L,N);return{interval:K,cancel:function(){if(this.interval){clearInterval(G);}else{clearTimeout(G);}}};},isValue:function(G){return(B.isObject(G)||B.isString(G)||B.isNumber(G)||B.isBoolean(G));}};B.hasOwnProperty=(A.hasOwnProperty)?function(G,H){return G&&G.hasOwnProperty(H);}:function(G,H){return !B.isUndefined(G[H])&&G.constructor.prototype[H]!==G[H];};D.augmentObject(B,D,true);YAHOO.util.Lang=B;B.augment=B.augmentProto;YAHOO.augment=B.augmentProto;YAHOO.extend=B.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.7.0",build:"1799"});/*
220 216 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
221 217 Code licensed under the BSD License:
222 218 http://developer.yahoo.net/yui/license.txt
... ... @@ -229,7 +225,6 @@ I.splice(S,1);return true;},getTarget:function(O,N){var M=O.target||O.srcElement
229 225 /* DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller */
230 226 if(EU.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var n=document.createElement("p");EU._dri=setInterval(function(){try{n.doScroll("left");clearInterval(EU._dri);EU._dri=null;EU._ready();n=null;}catch(ex){}},EU.POLL_INTERVAL);}else{if(EU.webkit&&EU.webkit<525){EU._dri=setInterval(function(){var rs=document.readyState;if("loaded"==rs||"complete"==rs){clearInterval(EU._dri);EU._dri=null;EU._ready();}},EU.POLL_INTERVAL);}else{EU._simpleAdd(document,"DOMContentLoaded",EU._ready);}}EU._simpleAdd(window,"load",EU._load);EU._simpleAdd(window,"unload",EU._unload);EU._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(A,C,F,E){this.__yui_events=this.__yui_events||{};var D=this.__yui_events[A];if(D){D.subscribe(C,F,E);
231 227 }else{this.__yui_subscribers=this.__yui_subscribers||{};var B=this.__yui_subscribers;if(!B[A]){B[A]=[];}B[A].push({fn:C,obj:F,overrideContext:E});}},unsubscribe:function(C,E,G){this.__yui_events=this.__yui_events||{};var A=this.__yui_events;if(C){var F=A[C];if(F){return F.unsubscribe(E,G);}}else{var B=true;for(var D in A){if(YAHOO.lang.hasOwnProperty(A,D)){B=B&&A[D].unsubscribe(E,G);}}return B;}return false;},unsubscribeAll:function(A){return this.unsubscribe(A);},createEvent:function(G,D){this.__yui_events=this.__yui_events||{};var A=D||{};var I=this.__yui_events;if(I[G]){}else{var H=A.scope||this;var E=(A.silent);var B=new YAHOO.util.CustomEvent(G,H,E,YAHOO.util.CustomEvent.FLAT);I[G]=B;if(A.onSubscribeCallback){B.subscribeEvent.subscribe(A.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var F=this.__yui_subscribers[G];if(F){for(var C=0;C<F.length;++C){B.subscribe(F[C].fn,F[C].obj,F[C].overrideContext);}}}return I[G];},fireEvent:function(E,D,A,C){this.__yui_events=this.__yui_events||{};var G=this.__yui_events[E];if(!G){return null;}var B=[];for(var F=1;F<arguments.length;++F){B.push(arguments[F]);}return G.fire.apply(G,B);},hasEvent:function(A){if(this.__yui_events){if(this.__yui_events[A]){return true;}}return false;}};(function(){var A=YAHOO.util.Event,C=YAHOO.lang;YAHOO.util.KeyListener=function(D,I,E,F){if(!D){}else{if(!I){}else{if(!E){}}}if(!F){F=YAHOO.util.KeyListener.KEYDOWN;}var G=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(C.isString(D)){D=document.getElementById(D);}if(C.isFunction(E)){G.subscribe(E);}else{G.subscribe(E.fn,E.scope,E.correctScope);}function H(O,N){if(!I.shift){I.shift=false;}if(!I.alt){I.alt=false;}if(!I.ctrl){I.ctrl=false;}if(O.shiftKey==I.shift&&O.altKey==I.alt&&O.ctrlKey==I.ctrl){var J,M=I.keys,L;if(YAHOO.lang.isArray(M)){for(var K=0;K<M.length;K++){J=M[K];L=A.getCharCode(O);if(J==L){G.fire(L,O);break;}}}else{L=A.getCharCode(O);if(M==L){G.fire(L,O);}}}}this.enable=function(){if(!this.enabled){A.on(D,F,H);this.enabledEvent.fire(I);}this.enabled=true;};this.disable=function(){if(this.enabled){A.removeListener(D,F,H);this.disabledEvent.fire(I);}this.enabled=false;};this.toString=function(){return"KeyListener ["+I.keys+"] "+D.tagName+(D.id?"["+D.id+"]":"");};};var B=YAHOO.util.KeyListener;B.KEYDOWN="keydown";B.KEYUP="keyup";B.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.7.0",build:"1799"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.7.0", build: "1799"});
232   -
233 228 /*
234 229 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
235 230 Code licensed under the BSD License:
... ... @@ -238,10 +233,7 @@ version: 2.7.0
238 233 */
239 234 (function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var E=YAHOO.util,L=YAHOO.lang,m=YAHOO.env.ua,A=YAHOO.lang.trim,d={},h={},N=/^t(?:able|d|h)$/i,X=/color$/i,K=window.document,W=K.documentElement,e="ownerDocument",n="defaultView",v="documentElement",t="compatMode",b="offsetLeft",P="offsetTop",u="offsetParent",Z="parentNode",l="nodeType",C="tagName",O="scrollLeft",i="scrollTop",Q="getBoundingClientRect",w="getComputedStyle",a="currentStyle",M="CSS1Compat",c="BackCompat",g="class",F="className",J="",B=" ",s="(?:^|\\s)",k="(?= |$)",U="g",p="position",f="fixed",V="relative",j="left",o="top",r="medium",q="borderLeftWidth",R="borderTopWidth",D=m.opera,I=m.webkit,H=m.gecko,T=m.ie;E.Dom={CUSTOM_ATTRIBUTES:(!W.hasAttribute)?{"for":"htmlFor","class":F}:{"htmlFor":"for","className":g},get:function(y){var AA,Y,z,x,G;if(y){if(y[l]||y.item){return y;}if(typeof y==="string"){AA=y;y=K.getElementById(y);if(y&&y.id===AA){return y;}else{if(y&&K.all){y=null;Y=K.all[AA];for(x=0,G=Y.length;x<G;++x){if(Y[x].id===AA){return Y[x];}}}}return y;}if(y.DOM_EVENTS){y=y.get("element");}if("length" in y){z=[];for(x=0,G=y.length;x<G;++x){z[z.length]=E.Dom.get(y[x]);}return z;}return y;}return null;},getComputedStyle:function(G,Y){if(window[w]){return G[e][n][w](G,null)[Y];}else{if(G[a]){return E.Dom.IE_ComputedStyle.get(G,Y);}}},getStyle:function(G,Y){return E.Dom.batch(G,E.Dom._getStyle,Y);},_getStyle:function(){if(window[w]){return function(G,y){y=(y==="float")?y="cssFloat":E.Dom._toCamel(y);var x=G.style[y],Y;if(!x){Y=G[e][n][w](G,null);if(Y){x=Y[y];}}return x;};}else{if(W[a]){return function(G,y){var x;switch(y){case"opacity":x=100;try{x=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(z){try{x=G.filters("alpha").opacity;}catch(Y){}}return x/100;case"float":y="styleFloat";default:y=E.Dom._toCamel(y);x=G[a]?G[a][y]:null;return(G.style[y]||x);}};}}}(),setStyle:function(G,Y,x){E.Dom.batch(G,E.Dom._setStyle,{prop:Y,val:x});},_setStyle:function(){if(T){return function(Y,G){var x=E.Dom._toCamel(G.prop),y=G.val;if(Y){switch(x){case"opacity":if(L.isString(Y.style.filter)){Y.style.filter="alpha(opacity="+y*100+")";if(!Y[a]||!Y[a].hasLayout){Y.style.zoom=1;}}break;case"float":x="styleFloat";default:Y.style[x]=y;}}else{}};}else{return function(Y,G){var x=E.Dom._toCamel(G.prop),y=G.val;if(Y){if(x=="float"){x="cssFloat";}Y.style[x]=y;}else{}};}}(),getXY:function(G){return E.Dom.batch(G,E.Dom._getXY);},_canPosition:function(G){return(E.Dom._getStyle(G,"display")!=="none"&&E.Dom._inDoc(G));},_getXY:function(){if(K[v][Q]){return function(y){var z,Y,AA,AF,AE,AD,AC,G,x,AB=Math.floor,AG=false;if(E.Dom._canPosition(y)){AA=y[Q]();AF=y[e];z=E.Dom.getDocumentScrollLeft(AF);Y=E.Dom.getDocumentScrollTop(AF);AG=[AB(AA[j]),AB(AA[o])];if(T&&m.ie<8){AE=2;AD=2;AC=AF[t];G=S(AF[v],q);x=S(AF[v],R);if(m.ie===6){if(AC!==c){AE=0;AD=0;}}if((AC==c)){if(G!==r){AE=parseInt(G,10);}if(x!==r){AD=parseInt(x,10);}}AG[0]-=AE;AG[1]-=AD;}if((Y||z)){AG[0]+=z;AG[1]+=Y;}AG[0]=AB(AG[0]);AG[1]=AB(AG[1]);}else{}return AG;};}else{return function(y){var x,Y,AA,AB,AC,z=false,G=y;if(E.Dom._canPosition(y)){z=[y[b],y[P]];x=E.Dom.getDocumentScrollLeft(y[e]);Y=E.Dom.getDocumentScrollTop(y[e]);AC=((H||m.webkit>519)?true:false);while((G=G[u])){z[0]+=G[b];z[1]+=G[P];if(AC){z=E.Dom._calcBorders(G,z);}}if(E.Dom._getStyle(y,p)!==f){G=y;while((G=G[Z])&&G[C]){AA=G[i];AB=G[O];if(H&&(E.Dom._getStyle(G,"overflow")!=="visible")){z=E.Dom._calcBorders(G,z);}if(AA||AB){z[0]-=AB;z[1]-=AA;}}z[0]+=x;z[1]+=Y;}else{if(D){z[0]-=x;z[1]-=Y;}else{if(I||H){z[0]+=x;z[1]+=Y;}}}z[0]=Math.floor(z[0]);z[1]=Math.floor(z[1]);}else{}return z;};}}(),getX:function(G){var Y=function(x){return E.Dom.getXY(x)[0];};return E.Dom.batch(G,Y,E.Dom,true);},getY:function(G){var Y=function(x){return E.Dom.getXY(x)[1];};return E.Dom.batch(G,Y,E.Dom,true);},setXY:function(G,x,Y){E.Dom.batch(G,E.Dom._setXY,{pos:x,noRetry:Y});},_setXY:function(G,z){var AA=E.Dom._getStyle(G,p),y=E.Dom.setStyle,AD=z.pos,Y=z.noRetry,AB=[parseInt(E.Dom.getComputedStyle(G,j),10),parseInt(E.Dom.getComputedStyle(G,o),10)],AC,x;if(AA=="static"){AA=V;y(G,p,AA);}AC=E.Dom._getXY(G);if(!AD||AC===false){return false;}if(isNaN(AB[0])){AB[0]=(AA==V)?0:G[b];}if(isNaN(AB[1])){AB[1]=(AA==V)?0:G[P];}if(AD[0]!==null){y(G,j,AD[0]-AC[0]+AB[0]+"px");}if(AD[1]!==null){y(G,o,AD[1]-AC[1]+AB[1]+"px");}if(!Y){x=E.Dom._getXY(G);if((AD[0]!==null&&x[0]!=AD[0])||(AD[1]!==null&&x[1]!=AD[1])){E.Dom._setXY(G,{pos:AD,noRetry:true});}}},setX:function(Y,G){E.Dom.setXY(Y,[G,null]);},setY:function(G,Y){E.Dom.setXY(G,[null,Y]);},getRegion:function(G){var Y=function(x){var y=false;if(E.Dom._canPosition(x)){y=E.Region.getRegion(x);}else{}return y;};return E.Dom.batch(G,Y,E.Dom,true);},getClientWidth:function(){return E.Dom.getViewportWidth();},getClientHeight:function(){return E.Dom.getViewportHeight();},getElementsByClassName:function(AB,AF,AC,AE,x,AD){AB=L.trim(AB);AF=AF||"*";AC=(AC)?E.Dom.get(AC):null||K;if(!AC){return[];}var Y=[],G=AC.getElementsByTagName(AF),z=E.Dom.hasClass;for(var y=0,AA=G.length;y<AA;++y){if(z(G[y],AB)){Y[Y.length]=G[y];}}if(AE){E.Dom.batch(Y,AE,x,AD);}return Y;},hasClass:function(Y,G){return E.Dom.batch(Y,E.Dom._hasClass,G);},_hasClass:function(x,Y){var G=false,y;if(x&&Y){y=E.Dom.getAttribute(x,F)||J;if(Y.exec){G=Y.test(y);}else{G=Y&&(B+y+B).indexOf(B+Y+B)>-1;}}else{}return G;},addClass:function(Y,G){return E.Dom.batch(Y,E.Dom._addClass,G);},_addClass:function(x,Y){var G=false,y;if(x&&Y){y=E.Dom.getAttribute(x,F)||J;if(!E.Dom._hasClass(x,Y)){E.Dom.setAttribute(x,F,A(y+B+Y));G=true;}}else{}return G;},removeClass:function(Y,G){return E.Dom.batch(Y,E.Dom._removeClass,G);},_removeClass:function(y,x){var Y=false,AA,z,G;if(y&&x){AA=E.Dom.getAttribute(y,F)||J;E.Dom.setAttribute(y,F,AA.replace(E.Dom._getClassRegex(x),J));z=E.Dom.getAttribute(y,F);if(AA!==z){E.Dom.setAttribute(y,F,A(z));Y=true;if(E.Dom.getAttribute(y,F)===""){G=(y.hasAttribute&&y.hasAttribute(g))?g:F;y.removeAttribute(G);}}}else{}return Y;},replaceClass:function(x,Y,G){return E.Dom.batch(x,E.Dom._replaceClass,{from:Y,to:G});
240 235 },_replaceClass:function(y,x){var Y,AB,AA,G=false,z;if(y&&x){AB=x.from;AA=x.to;if(!AA){G=false;}else{if(!AB){G=E.Dom._addClass(y,x.to);}else{if(AB!==AA){z=E.Dom.getAttribute(y,F)||J;Y=(B+z.replace(E.Dom._getClassRegex(AB),B+AA)).split(E.Dom._getClassRegex(AA));Y.splice(1,0,B+AA);E.Dom.setAttribute(y,F,A(Y.join(J)));G=true;}}}}else{}return G;},generateId:function(G,x){x=x||"yui-gen";var Y=function(y){if(y&&y.id){return y.id;}var z=x+YAHOO.env._id_counter++;if(y){if(y[e].getElementById(z)){return E.Dom.generateId(y,z+x);}y.id=z;}return z;};return E.Dom.batch(G,Y,E.Dom,true)||Y.apply(E.Dom,arguments);},isAncestor:function(Y,x){Y=E.Dom.get(Y);x=E.Dom.get(x);var G=false;if((Y&&x)&&(Y[l]&&x[l])){if(Y.contains&&Y!==x){G=Y.contains(x);}else{if(Y.compareDocumentPosition){G=!!(Y.compareDocumentPosition(x)&16);}}}else{}return G;},inDocument:function(G,Y){return E.Dom._inDoc(E.Dom.get(G),Y);},_inDoc:function(Y,x){var G=false;if(Y&&Y[C]){x=x||Y[e];G=E.Dom.isAncestor(x[v],Y);}else{}return G;},getElementsBy:function(Y,AF,AB,AD,y,AC,AE){AF=AF||"*";AB=(AB)?E.Dom.get(AB):null||K;if(!AB){return[];}var x=[],G=AB.getElementsByTagName(AF);for(var z=0,AA=G.length;z<AA;++z){if(Y(G[z])){if(AE){x=G[z];break;}else{x[x.length]=G[z];}}}if(AD){E.Dom.batch(x,AD,y,AC);}return x;},getElementBy:function(x,G,Y){return E.Dom.getElementsBy(x,G,Y,null,null,null,true);},batch:function(x,AB,AA,z){var y=[],Y=(z)?AA:window;x=(x&&(x[C]||x.item))?x:E.Dom.get(x);if(x&&AB){if(x[C]||x.length===undefined){return AB.call(Y,x,AA);}for(var G=0;G<x.length;++G){y[y.length]=AB.call(Y,x[G],AA);}}else{return false;}return y;},getDocumentHeight:function(){var Y=(K[t]!=M||I)?K.body.scrollHeight:W.scrollHeight,G=Math.max(Y,E.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var Y=(K[t]!=M||I)?K.body.scrollWidth:W.scrollWidth,G=Math.max(Y,E.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,Y=K[t];if((Y||T)&&!D){G=(Y==M)?W.clientHeight:K.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,Y=K[t];if(Y||T){G=(Y==M)?W.clientWidth:K.body.clientWidth;}return G;},getAncestorBy:function(G,Y){while((G=G[Z])){if(E.Dom._testElement(G,Y)){return G;}}return null;},getAncestorByClassName:function(Y,G){Y=E.Dom.get(Y);if(!Y){return null;}var x=function(y){return E.Dom.hasClass(y,G);};return E.Dom.getAncestorBy(Y,x);},getAncestorByTagName:function(Y,G){Y=E.Dom.get(Y);if(!Y){return null;}var x=function(y){return y[C]&&y[C].toUpperCase()==G.toUpperCase();};return E.Dom.getAncestorBy(Y,x);},getPreviousSiblingBy:function(G,Y){while(G){G=G.previousSibling;if(E.Dom._testElement(G,Y)){return G;}}return null;},getPreviousSibling:function(G){G=E.Dom.get(G);if(!G){return null;}return E.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,Y){while(G){G=G.nextSibling;if(E.Dom._testElement(G,Y)){return G;}}return null;},getNextSibling:function(G){G=E.Dom.get(G);if(!G){return null;}return E.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,x){var Y=(E.Dom._testElement(G.firstChild,x))?G.firstChild:null;return Y||E.Dom.getNextSiblingBy(G.firstChild,x);},getFirstChild:function(G,Y){G=E.Dom.get(G);if(!G){return null;}return E.Dom.getFirstChildBy(G);},getLastChildBy:function(G,x){if(!G){return null;}var Y=(E.Dom._testElement(G.lastChild,x))?G.lastChild:null;return Y||E.Dom.getPreviousSiblingBy(G.lastChild,x);},getLastChild:function(G){G=E.Dom.get(G);return E.Dom.getLastChildBy(G);},getChildrenBy:function(Y,y){var x=E.Dom.getFirstChildBy(Y,y),G=x?[x]:[];E.Dom.getNextSiblingBy(x,function(z){if(!y||y(z)){G[G.length]=z;}return false;});return G;},getChildren:function(G){G=E.Dom.get(G);if(!G){}return E.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||K;return Math.max(G[v].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||K;return Math.max(G[v].scrollTop,G.body.scrollTop);},insertBefore:function(Y,G){Y=E.Dom.get(Y);G=E.Dom.get(G);if(!Y||!G||!G[Z]){return null;}return G[Z].insertBefore(Y,G);},insertAfter:function(Y,G){Y=E.Dom.get(Y);G=E.Dom.get(G);if(!Y||!G||!G[Z]){return null;}if(G.nextSibling){return G[Z].insertBefore(Y,G.nextSibling);}else{return G[Z].appendChild(Y);}},getClientRegion:function(){var x=E.Dom.getDocumentScrollTop(),Y=E.Dom.getDocumentScrollLeft(),y=E.Dom.getViewportWidth()+Y,G=E.Dom.getViewportHeight()+x;return new E.Region(x,y,G,Y);},setAttribute:function(Y,G,x){G=E.Dom.CUSTOM_ATTRIBUTES[G]||G;Y.setAttribute(G,x);},getAttribute:function(Y,G){G=E.Dom.CUSTOM_ATTRIBUTES[G]||G;return Y.getAttribute(G);},_toCamel:function(Y){var x=d;function G(y,z){return z.toUpperCase();}return x[Y]||(x[Y]=Y.indexOf("-")===-1?Y:Y.replace(/-([a-z])/gi,G));},_getClassRegex:function(Y){var G;if(Y!==undefined){if(Y.exec){G=Y;}else{G=h[Y];if(!G){Y=Y.replace(E.Dom._patterns.CLASS_RE_TOKENS,"\\$1");G=h[Y]=new RegExp(s+Y+k,U);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}])/g},_testElement:function(G,Y){return G&&G[l]==1&&(!Y||Y(G));},_calcBorders:function(x,y){var Y=parseInt(E.Dom[w](x,R),10)||0,G=parseInt(E.Dom[w](x,q),10)||0;if(H){if(N.test(x[C])){Y=0;G=0;}}y[0]+=G;y[1]+=Y;return y;}};var S=E.Dom[w];if(m.opera){E.Dom[w]=function(Y,G){var x=S(Y,G);if(X.test(G)){x=E.Dom.Color.toRGB(x);}return x;};}if(m.webkit){E.Dom[w]=function(Y,G){var x=S(Y,G);if(x==="rgba(0, 0, 0, 0)"){x="transparent";}return x;};}})();YAHOO.util.Region=function(C,D,A,B){this.top=C;this.y=C;this[1]=C;this.right=D;this.bottom=A;this.left=B;this.x=B;this[0]=B;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(A){return(A.left>=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top),D=Math.min(this.right,E.right),A=Math.min(this.bottom,E.bottom),B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new YAHOO.util.Region(C,D,A,B);
241   -}else{return null;}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top),D=Math.max(this.right,E.right),A=Math.max(this.bottom,E.bottom),B=Math.min(this.left,E.left);return new YAHOO.util.Region(C,D,A,B);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D),C=F[1],E=F[0]+D.offsetWidth,A=F[1]+D.offsetHeight,B=F[0];return new YAHOO.util.Region(C,E,A,B);};YAHOO.util.Point=function(A,B){if(YAHOO.lang.isArray(A)){B=A[1];A=A[0];}YAHOO.util.Point.superclass.constructor.call(this,B,A,B,A);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var B=YAHOO.util,A="clientTop",F="clientLeft",J="parentNode",K="right",W="hasLayout",I="px",U="opacity",L="auto",D="borderLeftWidth",G="borderTopWidth",P="borderRightWidth",V="borderBottomWidth",S="visible",Q="transparent",N="height",E="width",H="style",T="currentStyle",R=/^width|height$/,O=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,M={get:function(X,Z){var Y="",a=X[T][Z];if(Z===U){Y=B.Dom.getStyle(X,U);}else{if(!a||(a.indexOf&&a.indexOf(I)>-1)){Y=a;}else{if(B.Dom.IE_COMPUTED[Z]){Y=B.Dom.IE_COMPUTED[Z](X,Z);}else{if(O.test(a)){Y=B.Dom.IE.ComputedStyle.getPixel(X,Z);}else{Y=a;}}}}return Y;},getOffset:function(Z,e){var b=Z[T][e],X=e.charAt(0).toUpperCase()+e.substr(1),c="offset"+X,Y="pixel"+X,a="",d;if(b==L){d=Z[c];if(d===undefined){a=0;}a=d;if(R.test(e)){Z[H][e]=d;if(Z[c]>d){a=d-(Z[c]-d);}Z[H][e]=L;}}else{if(!Z[H][Y]&&!Z[H][e]){Z[H][e]=b;}a=Z[H][Y];}return a+I;},getBorderWidth:function(X,Z){var Y=null;if(!X[T][W]){X[H].zoom=1;}switch(Z){case G:Y=X[A];break;case V:Y=X.offsetHeight-X.clientHeight-X[A];break;case D:Y=X[F];break;case P:Y=X.offsetWidth-X.clientWidth-X[F];break;}return Y+I;},getPixel:function(Y,X){var a=null,b=Y[T][K],Z=Y[T][X];Y[H][K]=Z;a=Y[H].pixelRight;Y[H][K]=b;return a+I;},getMargin:function(Y,X){var Z;if(Y[T][X]==L){Z=0+I;}else{Z=B.Dom.IE.ComputedStyle.getPixel(Y,X);}return Z;},getVisibility:function(Y,X){var Z;while((Z=Y[T])&&Z[X]=="inherit"){Y=Y[J];}return(Z)?Z[X]:S;},getColor:function(Y,X){return B.Dom.Color.toRGB(Y[T][X])||Q;},getBorderColor:function(Y,X){var Z=Y[T],a=Z[X]||Z.color;return B.Dom.Color.toRGB(B.Dom.Color.toHex(a));}},C={};C.top=C.right=C.bottom=C.left=C[E]=C[N]=M.getOffset;C.color=M.getColor;C[G]=C[P]=C[V]=C[D]=M.getBorderWidth;C.marginTop=C.marginRight=C.marginBottom=C.marginLeft=M.getMargin;C.visibility=M.getVisibility;C.borderColor=C.borderTopColor=C.borderRightColor=C.borderBottomColor=C.borderLeftColor=M.getBorderColor;B.Dom.IE_COMPUTED=C;B.Dom.IE_ComputedStyle=M;})();(function(){var C="toString",A=parseInt,B=RegExp,D=YAHOO.util;D.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(E){if(!D.Dom.Color.re_RGB.test(E)){E=D.Dom.Color.toHex(E);}if(D.Dom.Color.re_hex.exec(E)){E="rgb("+[A(B.$1,16),A(B.$2,16),A(B.$3,16)].join(", ")+")";}return E;},toHex:function(H){H=D.Dom.Color.KEYWORDS[H]||H;if(D.Dom.Color.re_RGB.exec(H)){var G=(B.$1.length===1)?"0"+B.$1:Number(B.$1),F=(B.$2.length===1)?"0"+B.$2:Number(B.$2),E=(B.$3.length===1)?"0"+B.$3:Number(B.$3);H=[G[C](16),F[C](16),E[C](16)].join("");}if(H.length<6){H=H.replace(D.Dom.Color.re_hex3,"$1$1");}if(H!=="transparent"&&H.indexOf("#")<0){H="#"+H;}return H.toLowerCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.7.0",build:"1799"});
242   -if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={}}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=(""+A[C]).split(".");E=YAHOO;for(B=(D[0]=="YAHOO")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]]}}return E};YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(B&&B.log){return B.log(D,A,C)}else{return false}};YAHOO.register=function(A,E,D){var I=YAHOO.env.modules,B,H,G,F,C;if(!I[A]){I[A]={versions:[],builds:[]}}B=I[A];H=D.version;G=D.build;F=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=E;for(C=0;C<F.length;C=C+1){F[C](B)}if(E){E.VERSION=H;E.BUILD=G}else{YAHOO.log("mainClass is undefined for module "+A,"warn")}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(A){return YAHOO.env.modules[A]||null};YAHOO.env.ua=function(){var C={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0,caja:0},B=navigator.userAgent,A;if((/KHTML/).test(B)){C.webkit=1}A=B.match(/AppleWebKit\/([^\s]*)/);if(A&&A[1]){C.webkit=parseFloat(A[1]);if(/ Mobile\//.test(B)){C.mobile="Apple"}else{A=B.match(/NokiaN[^\/]*/);if(A){C.mobile=A[0]}}A=B.match(/AdobeAIR\/([^\s]*)/);if(A){C.air=A[0]}}if(!C.webkit){A=B.match(/Opera[\s\/]([^\s]*)/);if(A&&A[1]){C.opera=parseFloat(A[1]);A=B.match(/Opera Mini[^;]*/);if(A){C.mobile=A[0]}}else{A=B.match(/MSIE\s([^;]*)/);if(A&&A[1]){C.ie=parseFloat(A[1])}else{A=B.match(/Gecko\/([^\s]*)/);if(A){C.gecko=1;A=B.match(/rv:([^\s\)]*)/);if(A&&A[1]){C.gecko=parseFloat(A[1])}}}}}A=B.match(/Caja\/([^\s]*)/);if(A&&A[1]){C.caja=parseFloat(A[1])}return C}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var B=YAHOO_config.listener,A=YAHOO.env.listeners,D=true,C;if(B){for(C=0;C<A.length;C=C+1){if(A[C]==B){D=false;break}}if(D){A.push(B)}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var B=YAHOO.lang,F="[object Array]",C="[object Function]",A=Object.prototype,E=["toString","valueOf"],D={isArray:function(G){return A.toString.apply(G)===F},isBoolean:function(G){return typeof G==="boolean"},isFunction:function(G){return A.toString.apply(G)===C},isNull:function(G){return G===null},isNumber:function(G){return typeof G==="number"&&isFinite(G)},isObject:function(G){return(G&&(typeof G==="object"||B.isFunction(G)))||false},isString:function(G){return typeof G==="string"},isUndefined:function(G){return typeof G==="undefined"},_IEEnumFix:(YAHOO.env.ua.ie)?function(I,H){var G,K,J;for(G=0;G<E.length;G=G+1){K=E[G];J=H[K];if(B.isFunction(J)&&J!=A[K]){I[K]=J}}}:function(){},extend:function(J,K,I){if(!K||!J){throw new Error("extend failed, please check that "+"all dependencies are included.")}var H=function(){},G;H.prototype=K.prototype;J.prototype=new H();J.prototype.constructor=J;J.superclass=K.prototype;if(K.prototype.constructor==A.constructor){K.prototype.constructor=K}if(I){for(G in I){if(B.hasOwnProperty(I,G)){J.prototype[G]=I[G]}}B._IEEnumFix(J.prototype,I)}},augmentObject:function(K,J){if(!J||!K){throw new Error("Absorb failed, verify dependencies.")}var G=arguments,I,L,H=G[2];if(H&&H!==true){for(I=2;I<G.length;I=I+1){K[G[I]]=J[G[I]]}}else{for(L in J){if(H||!(L in K)){K[L]=J[L]}}B._IEEnumFix(K,J)}},augmentProto:function(J,I){if(!I||!J){throw new Error("Augment failed, verify dependencies.")}var G=[J.prototype,I.prototype],H;for(H=2;H<arguments.length;H=H+1){G.push(arguments[H])}B.augmentObject.apply(this,G)},dump:function(G,L){var I,K,N=[],O="{...}",H="f(){...}",M=", ",J=" => ";if(!B.isObject(G)){return G+""}else{if(G instanceof Date||("nodeType"in G&&"tagName"in G)){return G}else{if(B.isFunction(G)){return H}}}L=(B.isNumber(L))?L:3;if(B.isArray(G)){N.push("[");for(I=0,K=G.length;I<K;I=I+1){if(B.isObject(G[I])){N.push((L>0)?B.dump(G[I],L-1):O)}else{N.push(G[I])}N.push(M)}if(N.length>1){N.pop()}N.push("]")}else{N.push("{");for(I in G){if(B.hasOwnProperty(G,I)){N.push(I+J);if(B.isObject(G[I])){N.push((L>0)?B.dump(G[I],L-1):O)}else{N.push(G[I])}N.push(M)}}if(N.length>1){N.pop()}N.push("}")}return N.join("")},substitute:function(V,H,O){var L,K,J,R,S,U,Q=[],I,M="dump",P=" ",G="{",T="}",N;for(;;){L=V.lastIndexOf(G);if(L<0){break}K=V.indexOf(T,L);if(L+1>=K){break}I=V.substring(L+1,K);R=I;U=null;J=R.indexOf(P);if(J>-1){U=R.substring(J+1);R=R.substring(0,J)}S=H[R];if(O){S=O(R,S,U)}if(B.isObject(S)){if(B.isArray(S)){S=B.dump(S,parseInt(U,10))}else{U=U||"";N=U.indexOf(M);if(N>-1){U=U.substring(4)}if(S.toString===A.toString||N>-1){S=B.dump(S,parseInt(U,10))}else{S=S.toString()}}}else{if(!B.isString(S)&&!B.isNumber(S)){S="~-"+Q.length+"-~";Q[Q.length]=I}}V=V.substring(0,L)+S+V.substring(K+1)}for(L=Q.length-1;L>=0;L=L-1){V=V.replace(new RegExp("~-"+L+"-~"),"{"+Q[L]+"}","g")}return V},trim:function(G){try{return G.replace(/^\s+|\s+$/g,"")}catch(H){return G}},merge:function(){var J={},H=arguments,G=H.length,I;for(I=0;I<G;I=I+1){B.augmentObject(J,H[I],true)}return J},later:function(N,H,O,J,K){N=N||0;H=H||{};var I=O,M=J,L,G;if(B.isString(O)){I=H[O]}if(!I){throw new TypeError("method undefined")}if(!B.isArray(M)){M=[J]}L=function(){I.apply(H,M)};G=(K)?setInterval(L,N):setTimeout(L,N);return{interval:K,cancel:function(){if(this.interval){clearInterval(G)}else{clearTimeout(G)}}}},isValue:function(G){return(B.isObject(G)||B.isString(G)||B.isNumber(G)||B.isBoolean(G))}};B.hasOwnProperty=(A.hasOwnProperty)?function(G,H){return G&&G.hasOwnProperty(H)}:function(G,H){return!B.isUndefined(G[H])&&G.constructor.prototype[H]!==G[H]};D.augmentObject(B,D,true);YAHOO.util.Lang=B;B.augment=B.augmentProto;YAHOO.augment=B.augmentProto;YAHOO.extend=B.extend})();YAHOO.register("yahoo",YAHOO,{version:"2.7.0",build:"1799"});YAHOO.util.Get=function(){var M={},L=0,R=0,E=false,N=YAHOO.env.ua,S=YAHOO.lang;var J=function(W,T,X){var U=X||window,Y=U.document,Z=Y.createElement(W);for(var V in T){if(T[V]&&YAHOO.lang.hasOwnProperty(T,V)){Z.setAttribute(V,T[V])}}return Z};var I=function(T,U,W){var V=W||"utf-8";return J("link",{"id":"yui__dyn_"+(R++),"type":"text/css","charset":V,"rel":"stylesheet","href":T},U)};var P=function(T,U,W){var V=W||"utf-8";return J("script",{"id":"yui__dyn_"+(R++),"type":"text/javascript","charset":V,"src":T},U)};var A=function(T,U){return{tId:T.tId,win:T.win,data:T.data,nodes:T.nodes,msg:U,purge:function(){D(this.tId)}}};var B=function(T,W){var U=M[W],V=(S.isString(T))?U.win.document.getElementById(T):T;if(!V){Q(W,"target node not found: "+T)}return V};var Q=function(W,V){var T=M[W];if(T.onFailure){var U=T.scope||T.win;T.onFailure.call(U,A(T,V))}};var C=function(W){var T=M[W];T.finished=true;if(T.aborted){var V="transaction "+W+" was aborted";Q(W,V);return}if(T.onSuccess){var U=T.scope||T.win;T.onSuccess.call(U,A(T))}};var O=function(V){var T=M[V];if(T.onTimeout){var U=T.scope||T;T.onTimeout.call(U,A(T))}};var G=function(V,Z){var U=M[V];if(U.timer){U.timer.cancel()}if(U.aborted){var X="transaction "+V+" was aborted";Q(V,X);return}if(Z){U.url.shift();if(U.varName){U.varName.shift()}}else{U.url=(S.isString(U.url))?[U.url]:U.url;if(U.varName){U.varName=(S.isString(U.varName))?[U.varName]:U.varName}}var c=U.win,b=c.document,a=b.getElementsByTagName("head")[0],W;if(U.url.length===0){if(U.type==="script"&&N.webkit&&N.webkit<420&&!U.finalpass&&!U.varName){var Y=P(null,U.win,U.charset);Y.innerHTML='YAHOO.util.Get._finalize("'+V+'");';U.nodes.push(Y);a.appendChild(Y)}else{C(V)}return}var T=U.url[0];if(!T){U.url.shift();return G(V)}if(U.timeout){U.timer=S.later(U.timeout,U,O,V)}if(U.type==="script"){W=P(T,c,U.charset)}else{W=I(T,c,U.charset)}F(U.type,W,V,T,c,U.url.length);U.nodes.push(W);if(U.insertBefore){var e=B(U.insertBefore,V);if(e){e.parentNode.insertBefore(W,e)}}else{a.appendChild(W)}if((N.webkit||N.gecko)&&U.type==="css"){G(V,T)}};var K=function(){if(E){return}E=true;for(var T in M){var U=M[T];if(U.autopurge&&U.finished){D(U.tId);delete M[T]}}E=false};var D=function(a){var X=M[a];if(X){var Z=X.nodes,T=Z.length,Y=X.win.document,W=Y.getElementsByTagName("head")[0];if(X.insertBefore){var V=B(X.insertBefore,a);if(V){W=V.parentNode}}for(var U=0;U<T;U=U+1){W.removeChild(Z[U])}X.nodes=[]}};var H=function(U,T,V){var X="q"+(L++);V=V||{};if(L%YAHOO.util.Get.PURGE_THRESH===0){K()}M[X]=S.merge(V,{tId:X,type:U,url:T,finished:false,aborted:false,nodes:[]});var W=M[X];W.win=W.win||window;W.scope=W.scope||W.win;W.autopurge=("autopurge"in W)?W.autopurge:(U==="script")?true:false;S.later(0,W,G,X);return{tId:X}};var F=function(c,X,W,U,Y,Z,b){var a=b||G;if(N.ie){X.onreadystatechange=function(){var d=this.readyState;if("loaded"===d||"complete"===d){X.onreadystatechange=null;a(W,U)}}}else{if(N.webkit){if(c==="script"){if(N.webkit>=420){X.addEventListener("load",function(){a(W,U)})}else{var T=M[W];if(T.varName){var V=YAHOO.util.Get.POLL_FREQ;T.maxattempts=YAHOO.util.Get.TIMEOUT/V;T.attempts=0;T._cache=T.varName[0].split(".");T.timer=S.later(V,T,function(j){var f=this._cache,e=f.length,d=this.win,g;for(g=0;g<e;g=g+1){d=d[f[g]];if(!d){this.attempts++;if(this.attempts++>this.maxattempts){var h="Over retry limit, giving up";T.timer.cancel();Q(W,h)}else{}return}}T.timer.cancel();a(W,U)},null,true)}else{S.later(YAHOO.util.Get.POLL_FREQ,null,a,[W,U])}}}}else{X.onload=function(){a(W,U)}}}};return{POLL_FREQ:10,PURGE_THRESH:20,TIMEOUT:2000,_finalize:function(T){S.later(0,null,C,T)},abort:function(U){var V=(S.isString(U))?U:U.tId;var T=M[V];if(T){T.aborted=true}},script:function(T,U){return H("script",T,U)},css:function(T,U){return H("css",T,U)}}}();YAHOO.register("get",YAHOO.util.Get,{version:"2.7.0",build:"1799"});(function(){var Y=YAHOO,util=Y.util,lang=Y.lang,env=Y.env,PROV="_provides",SUPER="_supersedes",REQ="expanded",AFTER="_after";var YUI={dupsAllowed:{"yahoo":true,"get":true},info:{"root":"2.7.0/build/","base":"http://yui.yahooapis.com/2.7.0/build/","comboBase":"http://yui.yahooapis.com/combo?","skin":{"defaultSkin":"sam","base":"assets/skins/","path":"skin.css","after":["reset","fonts","grids","base"],"rollup":3},dupsAllowed:["yahoo","get"],"moduleInfo":{"animation":{"type":"js","path":"animation/animation-min.js","requires":["dom","event"]},"autocomplete":{"type":"js","path":"autocomplete/autocomplete-min.js","requires":["dom","event","datasource"],"optional":["connection","animation"],"skinnable":true},"base":{"type":"css","path":"base/base-min.css","after":["reset","fonts","grids"]},"button":{"type":"js","path":"button/button-min.js","requires":["element"],"optional":["menu"],"skinnable":true},"calendar":{"type":"js","path":"calendar/calendar-min.js","requires":["event","dom"],"skinnable":true},"carousel":{"type":"js","path":"carousel/carousel-min.js","requires":["element"],"optional":["animation"],"skinnable":true},"charts":{"type":"js","path":"charts/charts-min.js","requires":["element","json","datasource"]},"colorpicker":{"type":"js","path":"colorpicker/colorpicker-min.js","requires":["slider","element"],"optional":["animation"],"skinnable":true},"connection":{"type":"js","path":"connection/connection-min.js","requires":["event"]},"container":{"type":"js","path":"container/container-min.js","requires":["dom","event"],"optional":["dragdrop","animation","connection"],"supersedes":["containercore"],"skinnable":true},"containercore":{"type":"js","path":"container/container_core-min.js","requires":["dom","event"],"pkg":"container"},"cookie":{"type":"js","path":"cookie/cookie-min.js","requires":["yahoo"]},"datasource":{"type":"js","path":"datasource/datasource-min.js","requires":["event"],"optional":["connection"]},"datatable":{"type":"js","path":"datatable/datatable-min.js","requires":["element","datasource"],"optional":["calendar","dragdrop","paginator"],"skinnable":true},"dom":{"type":"js","path":"dom/dom-min.js","requires":["yahoo"]},"dragdrop":{"type":"js","path":"dragdrop/dragdrop-min.js","requires":["dom","event"]},"editor":{"type":"js","path":"editor/editor-min.js","requires":["menu","element","button"],"optional":["animation","dragdrop"],"supersedes":["simpleeditor"],"skinnable":true},"element":{"type":"js","path":"element/element-min.js","requires":["dom","event"]},"event":{"type":"js","path":"event/event-min.js","requires":["yahoo"]},"fonts":{"type":"css","path":"fonts/fonts-min.css"},"get":{"type":"js","path":"get/get-min.js","requires":["yahoo"]},"grids":{"type":"css","path":"grids/grids-min.css","requires":["fonts"],"optional":["reset"]},"history":{"type":"js","path":"history/history-min.js","requires":["event"]},"imagecropper":{"type":"js","path":"imagecropper/imagecropper-min.js","requires":["dom","event","dragdrop","element","resize"],"skinnable":true},"imageloader":{"type":"js","path":"imageloader/imageloader-min.js","requires":["event","dom"]},"json":{"type":"js","path":"json/json-min.js","requires":["yahoo"]},"layout":{"type":"js","path":"layout/layout-min.js","requires":["dom","event","element"],"optional":["animation","dragdrop","resize","selector"],"skinnable":true},"logger":{"type":"js","path":"logger/logger-min.js","requires":["event","dom"],"optional":["dragdrop"],"skinnable":true},"menu":{"type":"js","path":"menu/menu-min.js","requires":["containercore"],"skinnable":true},"paginator":{"type":"js","path":"paginator/paginator-min.js","requires":["element"],"skinnable":true},"profiler":{"type":"js","path":"profiler/profiler-min.js","requires":["yahoo"]},"profilerviewer":{"type":"js","path":"profilerviewer/profilerviewer-min.js","requires":["profiler","yuiloader","element"],"skinnable":true},"reset":{"type":"css","path":"reset/reset-min.css"},"reset-fonts-grids":{"type":"css","path":"reset-fonts-grids/reset-fonts-grids.css","supersedes":["reset","fonts","grids","reset-fonts"],"rollup":4},"reset-fonts":{"type":"css","path":"reset-fonts/reset-fonts.css","supersedes":["reset","fonts"],"rollup":2},"resize":{"type":"js","path":"resize/resize-min.js","requires":["dom","event","dragdrop","element"],"optional":["animation"],"skinnable":true},"selector":{"type":"js","path":"selector/selector-min.js","requires":["yahoo","dom"]},"simpleeditor":{"type":"js","path":"editor/simpleeditor-min.js","requires":["element"],"optional":["containercore","menu","button","animation","dragdrop"],"skinnable":true,"pkg":"editor"},"slider":{"type":"js","path":"slider/slider-min.js","requires":["dragdrop"],"optional":["animation"],"skinnable":true},"stylesheet":{"type":"js","path":"stylesheet/stylesheet-min.js","requires":["yahoo"]},"tabview":{"type":"js","path":"tabview/tabview-min.js","requires":["element"],"optional":["connection"],"skinnable":true},"treeview":{"type":"js","path":"treeview/treeview-min.js","requires":["event","dom"],"optional":["json"],"skinnable":true},"uploader":{"type":"js","path":"uploader/uploader.js","requires":["element"]},"utilities":{"type":"js","path":"utilities/utilities.js","supersedes":["yahoo","event","dragdrop","animation","dom","connection","element","yahoo-dom-event","get","yuiloader","yuiloader-dom-event"],"rollup":8},"yahoo":{"type":"js","path":"yahoo/yahoo-min.js"},"yahoo-dom-event":{"type":"js","path":"yahoo-dom-event/yahoo-dom-event.js","supersedes":["yahoo","event","dom"],"rollup":3},"yuiloader":{"type":"js","path":"yuiloader/yuiloader-min.js","supersedes":["yahoo","get"]},"yuiloader-dom-event":{"type":"js","path":"yuiloader-dom-event/yuiloader-dom-event.js","supersedes":["yahoo","dom","event","get","yuiloader","yahoo-dom-event"],"rollup":5},"yuitest":{"type":"js","path":"yuitest/yuitest-min.js","requires":["logger"],"skinnable":true}}},ObjectUtil:{appendArray:function(o,a){if(a){for(var i=0;i<a.length;i=i+1){o[a[i]]=true}}},keys:function(o,ordered){var a=[],i;for(i in o){if(lang.hasOwnProperty(o,i)){a.push(i)}}return a}},ArrayUtil:{appendArray:function(a1,a2){Array.prototype.push.apply(a1,a2)},indexOf:function(a,val){for(var i=0;i<a.length;i=i+1){if(a[i]===val){return i}}return-1},toObject:function(a){var o={};for(var i=0;i<a.length;i=i+1){o[a[i]]=true}return o},uniq:function(a){return YUI.ObjectUtil.keys(YUI.ArrayUtil.toObject(a))}}};YAHOO.util.YUILoader=function(o){this._internalCallback=null;this._useYahooListener=false;this.onSuccess=null;this.onFailure=Y.log;this.onProgress=null;this.onTimeout=null;this.scope=this;this.data=null;this.insertBefore=null;this.charset=null;this.varName=null;this.base=YUI.info.base;this.comboBase=YUI.info.comboBase;this.combine=false;this.root=YUI.info.root;this.timeout=0;this.ignore=null;this.force=null;this.allowRollup=true;this.filter=null;this.required={};this.moduleInfo=lang.merge(YUI.info.moduleInfo);this.rollups=null;this.loadOptional=false;this.sorted=[];this.loaded={};this.dirty=true;this.inserted={};var self=this;env.listeners.push(function(m){if(self._useYahooListener){self.loadNext(m.name)}});this.skin=lang.merge(YUI.info.skin);this._config(o)};Y.util.YUILoader.prototype={FILTERS:{RAW:{"searchExp":"-min\\.js","replaceStr":".js"},DEBUG:{"searchExp":"-min\\.js","replaceStr":"-debug.js"}},SKIN_PREFIX:"skin-",_config:function(o){if(o){for(var i in o){if(lang.hasOwnProperty(o,i)){if(i=="require"){this.require(o[i])}else{this[i]=o[i]}}}}var f=this.filter;if(lang.isString(f)){f=f.toUpperCase();if(f==="DEBUG"){this.require("logger")}if(!Y.widget.LogWriter){Y.widget.LogWriter=function(){return Y}}this.filter=this.FILTERS[f]}},addModule:function(o){if(!o||!o.name||!o.type||(!o.path&&!o.fullpath)){return false}o.ext=("ext"in o)?o.ext:true;o.requires=o.requires||[];this.moduleInfo[o.name]=o;this.dirty=true;return true},require:function(what){var a=(typeof what==="string")?arguments:what;this.dirty=true;YUI.ObjectUtil.appendArray(this.required,a)},_addSkin:function(skin,mod){var name=this.formatSkin(skin),info=this.moduleInfo,sinf=this.skin,ext=info[mod]&&info[mod].ext;if(!info[name]){this.addModule({"name":name,"type":"css","path":sinf.base+skin+"/"+sinf.path,"after":sinf.after,"rollup":sinf.rollup,"ext":ext})}if(mod){name=this.formatSkin(skin,mod);if(!info[name]){var mdef=info[mod],pkg=mdef.pkg||mod;this.addModule({"name":name,"type":"css","after":sinf.after,"path":pkg+"/"+sinf.base+skin+"/"+mod+".css","ext":ext})}}return name},getRequires:function(mod){if(!mod){return[]}if(!this.dirty&&mod.expanded){return mod.expanded}mod.requires=mod.requires||[];var i,d=[],r=mod.requires,o=mod.optional,info=this.moduleInfo,m;for(i=0;i<r.length;i=i+1){d.push(r[i]);m=info[r[i]];YUI.ArrayUtil.appendArray(d,this.getRequires(m))}if(o&&this.loadOptional){for(i=0;i<o.length;i=i+1){d.push(o[i]);YUI.ArrayUtil.appendArray(d,this.getRequires(info[o[i]]))}}mod.expanded=YUI.ArrayUtil.uniq(d);return mod.expanded},getProvides:function(name,notMe){var addMe=!(notMe),ckey=(addMe)?PROV:SUPER,m=this.moduleInfo[name],o={};if(!m){return o}if(m[ckey]){return m[ckey]}var s=m.supersedes,done={},me=this;var add=function(mm){if(!done[mm]){done[mm]=true;lang.augmentObject(o,me.getProvides(mm))}};if(s){for(var i=0;i<s.length;i=i+1){add(s[i])}}m[SUPER]=o;m[PROV]=lang.merge(o);m[PROV][name]=true;return m[ckey]},calculate:function(o){if(o||this.dirty){this._config(o);this._setup();this._explode();if(this.allowRollup){this._rollup()}this._reduce();this._sort();this.dirty=false}},_setup:function(){var info=this.moduleInfo,name,i,j;for(name in info){if(lang.hasOwnProperty(info,name)){var m=info[name];if(m&&m.skinnable){var o=this.skin.overrides,smod;if(o&&o[name]){for(i=0;i<o[name].length;i=i+1){smod=this._addSkin(o[name][i],name)}}else{smod=this._addSkin(this.skin.defaultSkin,name)}m.requires.push(smod)}}}var l=lang.merge(this.inserted);if(!this._sandbox){l=lang.merge(l,env.modules)}if(this.ignore){YUI.ObjectUtil.appendArray(l,this.ignore)}if(this.force){for(i=0;i<this.force.length;i=i+1){if(this.force[i]in l){delete l[this.force[i]]}}}for(j in l){if(lang.hasOwnProperty(l,j)){lang.augmentObject(l,this.getProvides(j))}}this.loaded=l},_explode:function(){var r=this.required,i,mod;for(i in r){if(lang.hasOwnProperty(r,i)){mod=this.moduleInfo[i];if(mod){var req=this.getRequires(mod);if(req){YUI.ObjectUtil.appendArray(r,req)}}}}},_skin:function(){},formatSkin:function(skin,mod){var s=this.SKIN_PREFIX+skin;if(mod){s=s+"-"+mod}return s},parseSkin:function(mod){if(mod.indexOf(this.SKIN_PREFIX)===0){var a=mod.split("-");return{skin:a[1],module:a[2]}}return null},_rollup:function(){var i,j,m,s,rollups={},r=this.required,roll,info=this.moduleInfo;if(this.dirty||!this.rollups){for(i in info){if(lang.hasOwnProperty(info,i)){m=info[i];if(m&&m.rollup){rollups[i]=m}}}this.rollups=rollups}for(;;){var rolled=false;for(i in rollups){if(!r[i]&&!this.loaded[i]){m=info[i];s=m.supersedes;roll=false;if(!m.rollup){continue}var skin=(m.ext)?false:this.parseSkin(i),c=0;if(skin){for(j in r){if(lang.hasOwnProperty(r,j)){if(i!==j&&this.parseSkin(j)){c++;roll=(c>=m.rollup);if(roll){break}}}}}else{for(j=0;j<s.length;j=j+1){if(this.loaded[s[j]]&&(!YUI.dupsAllowed[s[j]])){roll=false;break}else{if(r[s[j]]){c++;roll=(c>=m.rollup);if(roll){break}}}}}if(roll){r[i]=true;rolled=true;this.getRequires(m)}}}if(!rolled){break}}},_reduce:function(){var i,j,s,m,r=this.required;for(i in r){if(i in this.loaded){delete r[i]}else{var skinDef=this.parseSkin(i);if(skinDef){if(!skinDef.module){var skin_pre=this.SKIN_PREFIX+skinDef.skin;for(j in r){if(lang.hasOwnProperty(r,j)){m=this.moduleInfo[j];var ext=m&&m.ext;if(!ext&&j!==i&&j.indexOf(skin_pre)>-1){delete r[j]}}}}}else{m=this.moduleInfo[i];s=m&&m.supersedes;if(s){for(j=0;j<s.length;j=j+1){if(s[j]in r){delete r[s[j]]}}}}}}},_onFailure:function(msg){YAHOO.log("Failure","info","loader");var f=this.onFailure;if(f){f.call(this.scope,{msg:"failure: "+msg,data:this.data,success:false})}},_onTimeout:function(){YAHOO.log("Timeout","info","loader");var f=this.onTimeout;if(f){f.call(this.scope,{msg:"timeout",data:this.data,success:false})}},_sort:function(){var s=[],info=this.moduleInfo,loaded=this.loaded,checkOptional=!this.loadOptional,me=this;var requires=function(aa,bb){var mm=info[aa];if(loaded[bb]||!mm){return false}var ii,rr=mm.expanded,after=mm.after,other=info[bb],optional=mm.optional;if(rr&&YUI.ArrayUtil.indexOf(rr,bb)>-1){return true}if(after&&YUI.ArrayUtil.indexOf(after,bb)>-1){return true}if(checkOptional&&optional&&YUI.ArrayUtil.indexOf(optional,bb)>-1){return true}var ss=info[bb]&&info[bb].supersedes;if(ss){for(ii=0;ii<ss.length;ii=ii+1){if(requires(aa,ss[ii])){return true}}}if(mm.ext&&mm.type=="css"&&!other.ext&&other.type=="css"){return true}return false};for(var i in this.required){if(lang.hasOwnProperty(this.required,i)){s.push(i)}}var p=0;for(;;){var l=s.length,a,b,j,k,moved=false;for(j=p;j<l;j=j+1){a=s[j];for(k=j+1;k<l;k=k+1){if(requires(a,s[k])){b=s.splice(k,1);s.splice(j,0,b[0]);moved=true;break}}if(moved){break}else{p=p+1}}if(!moved){break}}this.sorted=s},toString:function(){var o={type:"YUILoader",base:this.base,filter:this.filter,required:this.required,loaded:this.loaded,inserted:this.inserted};lang.dump(o,1)},_combine:function(){this._combining=[];var self=this,s=this.sorted,len=s.length,js=this.comboBase,css=this.comboBase,target,startLen=js.length,i,m,type=this.loadType;YAHOO.log("type "+type);for(i=0;i<len;i=i+1){m=this.moduleInfo[s[i]];if(m&&!m.ext&&(!type||type===m.type)){target=this.root+m.path;target+="&";if(m.type=="js"){js+=target}else{css+=target}this._combining.push(s[i])}}if(this._combining.length){YAHOO.log("Attempting to combine: "+this._combining,"info","loader");var callback=function(o){var c=this._combining,len=c.length,i,m;for(i=0;i<len;i=i+1){this.inserted[c[i]]=true}this.loadNext(o.data)},loadScript=function(){if(js.length>startLen){YAHOO.util.Get.script(self._filter(js),{data:self._loading,onSuccess:callback,onFailure:self._onFailure,onTimeout:self._onTimeout,insertBefore:self.insertBefore,charset:self.charset,timeout:self.timeout,scope:self})}};if(css.length>startLen){YAHOO.util.Get.css(this._filter(css),{data:this._loading,onSuccess:loadScript,onFailure:this._onFailure,onTimeout:this._onTimeout,insertBefore:this.insertBefore,charset:this.charset,timeout:this.timeout,scope:self})}else{loadScript()}return}else{this.loadNext(this._loading)}},insert:function(o,type){this.calculate(o);this._loading=true;this.loadType=type;if(this.combine){return this._combine()}if(!type){var self=this;this._internalCallback=function(){self._internalCallback=null;self.insert(null,"js")};this.insert(null,"css");return}this.loadNext()},sandbox:function(o,type){this._config(o);if(!this.onSuccess){throw new Error("You must supply an onSuccess handler for your sandbox")}this._sandbox=true;var self=this;if(!type||type!=="js"){this._internalCallback=function(){self._internalCallback=null;self.sandbox(null,"js")};this.insert(null,"css");return}if(!util.Connect){var ld=new YAHOO.util.YUILoader();ld.insert({base:this.base,filter:this.filter,require:"connection",insertBefore:this.insertBefore,charset:this.charset,onSuccess:function(){this.sandbox(null,"js")},scope:this},"js");return}this._scriptText=[];this._loadCount=0;this._stopCount=this.sorted.length;this._xhr=[];this.calculate();var s=this.sorted,l=s.length,i,m,url;for(i=0;i<l;i=i+1){m=this.moduleInfo[s[i]];if(!m){this._onFailure("undefined module "+m);for(var j=0;j<this._xhr.length;j=j+1){this._xhr[j].abort()}return}if(m.type!=="js"){this._loadCount++;continue}url=m.fullpath;url=(url)?this._filter(url):this._url(m.path);var xhrData={success:function(o){var idx=o.argument[0],name=o.argument[2];this._scriptText[idx]=o.responseText;if(this.onProgress){this.onProgress.call(this.scope,{name:name,scriptText:o.responseText,xhrResponse:o,data:this.data})}this._loadCount++;if(this._loadCount>=this._stopCount){var v=this.varName||"YAHOO";var t="(function() {\n";var b="\nreturn "+v+";\n})();";var ref=eval(t+this._scriptText.join("\n")+b);this._pushEvents(ref);if(ref){this.onSuccess.call(this.scope,{reference:ref,data:this.data})}else{this._onFailure.call(this.varName+" reference failure")}}},failure:function(o){this.onFailure.call(this.scope,{msg:"XHR failure",xhrResponse:o,data:this.data})},scope:this,argument:[i,url,s[i]]};this._xhr.push(util.Connect.asyncRequest("GET",url,xhrData))}},loadNext:function(mname){if(!this._loading){return}if(mname){if(mname!==this._loading){return}this.inserted[mname]=true;if(this.onProgress){this.onProgress.call(this.scope,{name:mname,data:this.data})}}var s=this.sorted,len=s.length,i,m;for(i=0;i<len;i=i+1){if(s[i]in this.inserted){continue}if(s[i]===this._loading){return}m=this.moduleInfo[s[i]];if(!m){this.onFailure.call(this.scope,{msg:"undefined module "+m,data:this.data});return}if(!this.loadType||this.loadType===m.type){this._loading=s[i];var fn=(m.type==="css")?util.Get.css:util.Get.script,url=m.fullpath,self=this,c=function(o){self.loadNext(o.data)};url=(url)?this._filter(url):this._url(m.path);if(env.ua.webkit&&env.ua.webkit<420&&m.type==="js"&&!m.varName){c=null;this._useYahooListener=true}fn(url,{data:s[i],onSuccess:c,onFailure:this._onFailure,onTimeout:this._onTimeout,insertBefore:this.insertBefore,charset:this.charset,timeout:this.timeout,varName:m.varName,scope:self});return}}this._loading=null;if(this._internalCallback){var f=this._internalCallback;this._internalCallback=null;f.call(this)}else{if(this.onSuccess){this._pushEvents();this.onSuccess.call(this.scope,{data:this.data})}}},_pushEvents:function(ref){var r=ref||YAHOO;if(r.util&&r.util.Event){r.util.Event._load()}},_filter:function(str){var f=this.filter;return(f)?str.replace(new RegExp(f.searchExp,"g"),f.replaceStr):str},_url:function(path){return this._filter((this.base||"")+path)}}})();YAHOO.register("yuiloader",YAHOO.util.YUILoader,{version:"2.7.0",build:"1799"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var E=YAHOO.util,L=YAHOO.lang,m=YAHOO.env.ua,A=YAHOO.lang.trim,d={},h={},N=/^t(?:able|d|h)$/i,X=/color$/i,K=window.document,W=K.documentElement,e="ownerDocument",n="defaultView",v="documentElement",t="compatMode",b="offsetLeft",P="offsetTop",u="offsetParent",Z="parentNode",l="nodeType",C="tagName",O="scrollLeft",i="scrollTop",Q="getBoundingClientRect",w="getComputedStyle",a="currentStyle",M="CSS1Compat",c="BackCompat",g="class",F="className",J="",B=" ",s="(?:^|\\s)",k="(?= |$)",U="g",p="position",f="fixed",V="relative",j="left",o="top",r="medium",q="borderLeftWidth",R="borderTopWidth",D=m.opera,I=m.webkit,H=m.gecko,T=m.ie;E.Dom={CUSTOM_ATTRIBUTES:(!W.hasAttribute)?{"for":"htmlFor","class":F}:{"htmlFor":"for","className":g},get:function(y){var AA,Y,z,x,G;if(y){if(y[l]||y.item){return y}if(typeof y==="string"){AA=y;y=K.getElementById(y);if(y&&y.id===AA){return y}else{if(y&&K.all){y=null;Y=K.all[AA];for(x=0,G=Y.length;x<G;++x){if(Y[x].id===AA){return Y[x]}}}}return y}if(y.DOM_EVENTS){y=y.get("element")}if("length"in y){z=[];for(x=0,G=y.length;x<G;++x){z[z.length]=E.Dom.get(y[x])}return z}return y}return null},getComputedStyle:function(G,Y){if(window[w]){return G[e][n][w](G,null)[Y]}else{if(G[a]){return E.Dom.IE_ComputedStyle.get(G,Y)}}},getStyle:function(G,Y){return E.Dom.batch(G,E.Dom._getStyle,Y)},_getStyle:function(){if(window[w]){return function(G,y){y=(y==="float")?y="cssFloat":E.Dom._toCamel(y);var x=G.style[y],Y;if(!x){Y=G[e][n][w](G,null);if(Y){x=Y[y]}}return x}}else{if(W[a]){return function(G,y){var x;switch(y){case"opacity":x=100;try{x=G.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(z){try{x=G.filters("alpha").opacity}catch(Y){}}return x/100;case"float":y="styleFloat";default:y=E.Dom._toCamel(y);x=G[a]?G[a][y]:null;return(G.style[y]||x)}}}}}(),setStyle:function(G,Y,x){E.Dom.batch(G,E.Dom._setStyle,{prop:Y,val:x})},_setStyle:function(){if(T){return function(Y,G){var x=E.Dom._toCamel(G.prop),y=G.val;if(Y){switch(x){case"opacity":if(L.isString(Y.style.filter)){Y.style.filter="alpha(opacity="+y*100+")";if(!Y[a]||!Y[a].hasLayout){Y.style.zoom=1}}break;case"float":x="styleFloat";default:Y.style[x]=y}}else{}}}else{return function(Y,G){var x=E.Dom._toCamel(G.prop),y=G.val;if(Y){if(x=="float"){x="cssFloat"}Y.style[x]=y}else{}}}}(),getXY:function(G){return E.Dom.batch(G,E.Dom._getXY)},_canPosition:function(G){return(E.Dom._getStyle(G,"display")!=="none"&&E.Dom._inDoc(G))},_getXY:function(){if(K[v][Q]){return function(y){var z,Y,AA,AF,AE,AD,AC,G,x,AB=Math.floor,AG=false;if(E.Dom._canPosition(y)){AA=y[Q]();AF=y[e];z=E.Dom.getDocumentScrollLeft(AF);Y=E.Dom.getDocumentScrollTop(AF);AG=[AB(AA[j]),AB(AA[o])];if(T&&m.ie<8){AE=2;AD=2;AC=AF[t];G=S(AF[v],q);x=S(AF[v],R);if(m.ie===6){if(AC!==c){AE=0;AD=0}}if((AC==c)){if(G!==r){AE=parseInt(G,10)}if(x!==r){AD=parseInt(x,10)}}AG[0]-=AE;AG[1]-=AD}if((Y||z)){AG[0]+=z;AG[1]+=Y}AG[0]=AB(AG[0]);AG[1]=AB(AG[1])}else{}return AG}}else{return function(y){var x,Y,AA,AB,AC,z=false,G=y;if(E.Dom._canPosition(y)){z=[y[b],y[P]];x=E.Dom.getDocumentScrollLeft(y[e]);Y=E.Dom.getDocumentScrollTop(y[e]);AC=((H||m.webkit>519)?true:false);while((G=G[u])){z[0]+=G[b];z[1]+=G[P];if(AC){z=E.Dom._calcBorders(G,z)}}if(E.Dom._getStyle(y,p)!==f){G=y;while((G=G[Z])&&G[C]){AA=G[i];AB=G[O];if(H&&(E.Dom._getStyle(G,"overflow")!=="visible")){z=E.Dom._calcBorders(G,z)}if(AA||AB){z[0]-=AB;z[1]-=AA}}z[0]+=x;z[1]+=Y}else{if(D){z[0]-=x;z[1]-=Y}else{if(I||H){z[0]+=x;z[1]+=Y}}}z[0]=Math.floor(z[0]);z[1]=Math.floor(z[1])}else{}return z}}}(),getX:function(G){var Y=function(x){return E.Dom.getXY(x)[0]};return E.Dom.batch(G,Y,E.Dom,true)},getY:function(G){var Y=function(x){return E.Dom.getXY(x)[1]};return E.Dom.batch(G,Y,E.Dom,true)},setXY:function(G,x,Y){E.Dom.batch(G,E.Dom._setXY,{pos:x,noRetry:Y})},_setXY:function(G,z){var AA=E.Dom._getStyle(G,p),y=E.Dom.setStyle,AD=z.pos,Y=z.noRetry,AB=[parseInt(E.Dom.getComputedStyle(G,j),10),parseInt(E.Dom.getComputedStyle(G,o),10)],AC,x;if(AA=="static"){AA=V;y(G,p,AA)}AC=E.Dom._getXY(G);if(!AD||AC===false){return false}if(isNaN(AB[0])){AB[0]=(AA==V)?0:G[b]}if(isNaN(AB[1])){AB[1]=(AA==V)?0:G[P]}if(AD[0]!==null){y(G,j,AD[0]-AC[0]+AB[0]+"px")}if(AD[1]!==null){y(G,o,AD[1]-AC[1]+AB[1]+"px")}if(!Y){x=E.Dom._getXY(G);if((AD[0]!==null&&x[0]!=AD[0])||(AD[1]!==null&&x[1]!=AD[1])){E.Dom._setXY(G,{pos:AD,noRetry:true})}}},setX:function(Y,G){E.Dom.setXY(Y,[G,null])},setY:function(G,Y){E.Dom.setXY(G,[null,Y])},getRegion:function(G){var Y=function(x){var y=false;if(E.Dom._canPosition(x)){y=E.Region.getRegion(x)}else{}return y};return E.Dom.batch(G,Y,E.Dom,true)},getClientWidth:function(){return E.Dom.getViewportWidth()},getClientHeight:function(){return E.Dom.getViewportHeight()},getElementsByClassName:function(AB,AF,AC,AE,x,AD){AB=L.trim(AB);AF=AF||"*";AC=(AC)?E.Dom.get(AC):null||K;if(!AC){return[]}var Y=[],G=AC.getElementsByTagName(AF),z=E.Dom.hasClass;for(var y=0,AA=G.length;y<AA;++y){if(z(G[y],AB)){Y[Y.length]=G[y]}}if(AE){E.Dom.batch(Y,AE,x,AD)}return Y},hasClass:function(Y,G){return E.Dom.batch(Y,E.Dom._hasClass,G)},_hasClass:function(x,Y){var G=false,y;if(x&&Y){y=E.Dom.getAttribute(x,F)||J;if(Y.exec){G=Y.test(y)}else{G=Y&&(B+y+B).indexOf(B+Y+B)>-1}}else{}return G},addClass:function(Y,G){return E.Dom.batch(Y,E.Dom._addClass,G)},_addClass:function(x,Y){var G=false,y;if(x&&Y){y=E.Dom.getAttribute(x,F)||J;if(!E.Dom._hasClass(x,Y)){E.Dom.setAttribute(x,F,A(y+B+Y));G=true}}else{}return G},removeClass:function(Y,G){return E.Dom.batch(Y,E.Dom._removeClass,G)},_removeClass:function(y,x){var Y=false,AA,z,G;if(y&&x){AA=E.Dom.getAttribute(y,F)||J;E.Dom.setAttribute(y,F,AA.replace(E.Dom._getClassRegex(x),J));z=E.Dom.getAttribute(y,F);if(AA!==z){E.Dom.setAttribute(y,F,A(z));Y=true;if(E.Dom.getAttribute(y,F)===""){G=(y.hasAttribute&&y.hasAttribute(g))?g:F;y.removeAttribute(G)}}}else{}return Y},replaceClass:function(x,Y,G){return E.Dom.batch(x,E.Dom._replaceClass,{from:Y,to:G})},_replaceClass:function(y,x){var Y,AB,AA,G=false,z;if(y&&x){AB=x.from;AA=x.to;if(!AA){G=false}else{if(!AB){G=E.Dom._addClass(y,x.to)}else{if(AB!==AA){z=E.Dom.getAttribute(y,F)||J;Y=(B+z.replace(E.Dom._getClassRegex(AB),B+AA)).split(E.Dom._getClassRegex(AA));Y.splice(1,0,B+AA);E.Dom.setAttribute(y,F,A(Y.join(J)));G=true}}}}else{}return G},generateId:function(G,x){x=x||"yui-gen";var Y=function(y){if(y&&y.id){return y.id}var z=x+YAHOO.env._id_counter++;if(y){if(y[e].getElementById(z)){return E.Dom.generateId(y,z+x)}y.id=z}return z};return E.Dom.batch(G,Y,E.Dom,true)||Y.apply(E.Dom,arguments)},isAncestor:function(Y,x){Y=E.Dom.get(Y);x=E.Dom.get(x);var G=false;if((Y&&x)&&(Y[l]&&x[l])){if(Y.contains&&Y!==x){G=Y.contains(x)}else{if(Y.compareDocumentPosition){G=!!(Y.compareDocumentPosition(x)&16)}}}else{}return G},inDocument:function(G,Y){return E.Dom._inDoc(E.Dom.get(G),Y)},_inDoc:function(Y,x){var G=false;if(Y&&Y[C]){x=x||Y[e];G=E.Dom.isAncestor(x[v],Y)}else{}return G},getElementsBy:function(Y,AF,AB,AD,y,AC,AE){AF=AF||"*";AB=(AB)?E.Dom.get(AB):null||K;if(!AB){return[]}var x=[],G=AB.getElementsByTagName(AF);for(var z=0,AA=G.length;z<AA;++z){if(Y(G[z])){if(AE){x=G[z];break}else{x[x.length]=G[z]}}}if(AD){E.Dom.batch(x,AD,y,AC)}return x},getElementBy:function(x,G,Y){return E.Dom.getElementsBy(x,G,Y,null,null,null,true)},batch:function(x,AB,AA,z){var y=[],Y=(z)?AA:window;x=(x&&(x[C]||x.item))?x:E.Dom.get(x);if(x&&AB){if(x[C]||x.length===undefined){return AB.call(Y,x,AA)}for(var G=0;G<x.length;++G){y[y.length]=AB.call(Y,x[G],AA)}}else{return false}return y},getDocumentHeight:function(){var Y=(K[t]!=M||I)?K.body.scrollHeight:W.scrollHeight,G=Math.max(Y,E.Dom.getViewportHeight());return G},getDocumentWidth:function(){var Y=(K[t]!=M||I)?K.body.scrollWidth:W.scrollWidth,G=Math.max(Y,E.Dom.getViewportWidth());return G},getViewportHeight:function(){var G=self.innerHeight,Y=K[t];if((Y||T)&&!D){G=(Y==M)?W.clientHeight:K.body.clientHeight}return G},getViewportWidth:function(){var G=self.innerWidth,Y=K[t];if(Y||T){G=(Y==M)?W.clientWidth:K.body.clientWidth}return G},getAncestorBy:function(G,Y){while((G=G[Z])){if(E.Dom._testElement(G,Y)){return G}}return null},getAncestorByClassName:function(Y,G){Y=E.Dom.get(Y);if(!Y){return null}var x=function(y){return E.Dom.hasClass(y,G)};return E.Dom.getAncestorBy(Y,x)},getAncestorByTagName:function(Y,G){Y=E.Dom.get(Y);if(!Y){return null}var x=function(y){return y[C]&&y[C].toUpperCase()==G.toUpperCase()};return E.Dom.getAncestorBy(Y,x)},getPreviousSiblingBy:function(G,Y){while(G){G=G.previousSibling;if(E.Dom._testElement(G,Y)){return G}}return null},getPreviousSibling:function(G){G=E.Dom.get(G);if(!G){return null}return E.Dom.getPreviousSiblingBy(G)},getNextSiblingBy:function(G,Y){while(G){G=G.nextSibling;if(E.Dom._testElement(G,Y)){return G}}return null},getNextSibling:function(G){G=E.Dom.get(G);if(!G){return null}return E.Dom.getNextSiblingBy(G)},getFirstChildBy:function(G,x){var Y=(E.Dom._testElement(G.firstChild,x))?G.firstChild:null;return Y||E.Dom.getNextSiblingBy(G.firstChild,x)},getFirstChild:function(G,Y){G=E.Dom.get(G);if(!G){return null}return E.Dom.getFirstChildBy(G)},getLastChildBy:function(G,x){if(!G){return null}var Y=(E.Dom._testElement(G.lastChild,x))?G.lastChild:null;return Y||E.Dom.getPreviousSiblingBy(G.lastChild,x)},getLastChild:function(G){G=E.Dom.get(G);return E.Dom.getLastChildBy(G)},getChildrenBy:function(Y,y){var x=E.Dom.getFirstChildBy(Y,y),G=x?[x]:[];E.Dom.getNextSiblingBy(x,function(z){if(!y||y(z)){G[G.length]=z}return false});return G},getChildren:function(G){G=E.Dom.get(G);if(!G){}return E.Dom.getChildrenBy(G)},getDocumentScrollLeft:function(G){G=G||K;return Math.max(G[v].scrollLeft,G.body.scrollLeft)},getDocumentScrollTop:function(G){G=G||K;return Math.max(G[v].scrollTop,G.body.scrollTop)},insertBefore:function(Y,G){Y=E.Dom.get(Y);G=E.Dom.get(G);if(!Y||!G||!G[Z]){return null}return G[Z].insertBefore(Y,G)},insertAfter:function(Y,G){Y=E.Dom.get(Y);G=E.Dom.get(G);if(!Y||!G||!G[Z]){return null}if(G.nextSibling){return G[Z].insertBefore(Y,G.nextSibling)}else{return G[Z].appendChild(Y)}},getClientRegion:function(){var x=E.Dom.getDocumentScrollTop(),Y=E.Dom.getDocumentScrollLeft(),y=E.Dom.getViewportWidth()+Y,G=E.Dom.getViewportHeight()+x;return new E.Region(x,y,G,Y)},setAttribute:function(Y,G,x){G=E.Dom.CUSTOM_ATTRIBUTES[G]||G;Y.setAttribute(G,x)},getAttribute:function(Y,G){G=E.Dom.CUSTOM_ATTRIBUTES[G]||G;return Y.getAttribute(G)},_toCamel:function(Y){var x=d;function G(y,z){return z.toUpperCase()}return x[Y]||(x[Y]=Y.indexOf("-")===-1?Y:Y.replace(/-([a-z])/gi,G))},_getClassRegex:function(Y){var G;if(Y!==undefined){if(Y.exec){G=Y}else{G=h[Y];if(!G){Y=Y.replace(E.Dom._patterns.CLASS_RE_TOKENS,"\\$1");G=h[Y]=new RegExp(s+Y+k,U)}}}return G},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}])/g},_testElement:function(G,Y){return G&&G[l]==1&&(!Y||Y(G))},_calcBorders:function(x,y){var Y=parseInt(E.Dom[w](x,R),10)||0,G=parseInt(E.Dom[w](x,q),10)||0;if(H){if(N.test(x[C])){Y=0;G=0}}y[0]+=G;y[1]+=Y;return y}};var S=E.Dom[w];if(m.opera){E.Dom[w]=function(Y,G){var x=S(Y,G);if(X.test(G)){x=E.Dom.Color.toRGB(x)}return x}}if(m.webkit){E.Dom[w]=function(Y,G){var x=S(Y,G);if(x==="rgba(0, 0, 0, 0)"){x="transparent"}return x}}})();YAHOO.util.Region=function(C,D,A,B){this.top=C;this.y=C;this[1]=C;this.right=D;this.bottom=A;this.left=B;this.x=B;this[0]=B;this.width=this.right-this.left;this.height=this.bottom-this.top};YAHOO.util.Region.prototype.contains=function(A){return(A.left>=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom)};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left))};YAHOO.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top),D=Math.min(this.right,E.right),A=Math.min(this.bottom,E.bottom),B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new YAHOO.util.Region(C,D,A,B)}else{return null}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top),D=Math.max(this.right,E.right),A=Math.max(this.bottom,E.bottom),B=Math.min(this.left,E.left);return new YAHOO.util.Region(C,D,A,B)};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}")};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D),C=F[1],E=F[0]+D.offsetWidth,A=F[1]+D.offsetHeight,B=F[0];return new YAHOO.util.Region(C,E,A,B)};YAHOO.util.Point=function(A,B){if(YAHOO.lang.isArray(A)){B=A[1];A=A[0]}YAHOO.util.Point.superclass.constructor.call(this,B,A,B,A)};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var B=YAHOO.util,A="clientTop",F="clientLeft",J="parentNode",K="right",W="hasLayout",I="px",U="opacity",L="auto",D="borderLeftWidth",G="borderTopWidth",P="borderRightWidth",V="borderBottomWidth",S="visible",Q="transparent",N="height",E="width",H="style",T="currentStyle",R=/^width|height$/,O=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,M={get:function(X,Z){var Y="",a=X[T][Z];if(Z===U){Y=B.Dom.getStyle(X,U)}else{if(!a||(a.indexOf&&a.indexOf(I)>-1)){Y=a}else{if(B.Dom.IE_COMPUTED[Z]){Y=B.Dom.IE_COMPUTED[Z](X,Z)}else{if(O.test(a)){Y=B.Dom.IE.ComputedStyle.getPixel(X,Z)}else{Y=a}}}}return Y},getOffset:function(Z,e){var b=Z[T][e],X=e.charAt(0).toUpperCase()+e.substr(1),c="offset"+X,Y="pixel"+X,a="",d;if(b==L){d=Z[c];if(d===undefined){a=0}a=d;if(R.test(e)){Z[H][e]=d;if(Z[c]>d){a=d-(Z[c]-d)}Z[H][e]=L}}else{if(!Z[H][Y]&&!Z[H][e]){Z[H][e]=b}a=Z[H][Y]}return a+I},getBorderWidth:function(X,Z){var Y=null;if(!X[T][W]){X[H].zoom=1}switch(Z){case G:Y=X[A];break;case V:Y=X.offsetHeight-X.clientHeight-X[A];break;case D:Y=X[F];break;case P:Y=X.offsetWidth-X.clientWidth-X[F];break}return Y+I},getPixel:function(Y,X){var a=null,b=Y[T][K],Z=Y[T][X];Y[H][K]=Z;a=Y[H].pixelRight;Y[H][K]=b;return a+I},getMargin:function(Y,X){var Z;if(Y[T][X]==L){Z=0+I}else{Z=B.Dom.IE.ComputedStyle.getPixel(Y,X)}return Z},getVisibility:function(Y,X){var Z;while((Z=Y[T])&&Z[X]=="inherit"){Y=Y[J]}return(Z)?Z[X]:S},getColor:function(Y,X){return B.Dom.Color.toRGB(Y[T][X])||Q},getBorderColor:function(Y,X){var Z=Y[T],a=Z[X]||Z.color;return B.Dom.Color.toRGB(B.Dom.Color.toHex(a))}},C={};C.top=C.right=C.bottom=C.left=C[E]=C[N]=M.getOffset;C.color=M.getColor;C[G]=C[P]=C[V]=C[D]=M.getBorderWidth;C.marginTop=C.marginRight=C.marginBottom=C.marginLeft=M.getMargin;C.visibility=M.getVisibility;C.borderColor=C.borderTopColor=C.borderRightColor=C.borderBottomColor=C.borderLeftColor=M.getBorderColor;B.Dom.IE_COMPUTED=C;B.Dom.IE_ComputedStyle=M})();(function(){var C="toString",A=parseInt,B=RegExp,D=YAHOO.util;D.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(E){if(!D.Dom.Color.re_RGB.test(E)){E=D.Dom.Color.toHex(E)}if(D.Dom.Color.re_hex.exec(E)){E="rgb("+[A(B.$1,16),A(B.$2,16),A(B.$3,16)].join(", ")+")"}return E},toHex:function(H){H=D.Dom.Color.KEYWORDS[H]||H;if(D.Dom.Color.re_RGB.exec(H)){var G=(B.$1.length===1)?"0"+B.$1:Number(B.$1),F=(B.$2.length===1)?"0"+B.$2:Number(B.$2),E=(B.$3.length===1)?"0"+B.$3:Number(B.$3);H=[G[C](16),F[C](16),E[C](16)].join("")}if(H.length<6){H=H.replace(D.Dom.Color.re_hex3,"$1$1")}if(H!=="transparent"&&H.indexOf("#")<0){H="#"+H}return H.toLowerCase()}}}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.7.0",build:"1799"});YAHOO.util.CustomEvent=function(D,C,B,A){this.type=D;this.scope=C||window;this.silent=B;this.signature=A||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var E="_YUICEOnSubscribe";if(D!==E){this.subscribeEvent=new YAHOO.util.CustomEvent(E,this,true)}this.lastError=null};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(A,B,C){if(!A){throw new Error("Invalid callback for subscriber to '"+this.type+"'")}if(this.subscribeEvent){this.subscribeEvent.fire(A,B,C)}this.subscribers.push(new YAHOO.util.Subscriber(A,B,C))},unsubscribe:function(D,F){if(!D){return this.unsubscribeAll()}var E=false;for(var B=0,A=this.subscribers.length;B<A;++B){var C=this.subscribers[B];if(C&&C.contains(D,F)){this._delete(B);E=true}}return E},fire:function(){this.lastError=null;var K=[],E=this.subscribers.length;if(!E&&this.silent){return true}var I=[].slice.call(arguments,0),G=true,D,J=false;if(!this.silent){}var C=this.subscribers.slice(),A=YAHOO.util.Event.throwErrors;for(D=0;D<E;++D){var M=C[D];if(!M){J=true}else{if(!this.silent){}var L=M.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var B=null;if(I.length>0){B=I[0]}try{G=M.fn.call(L,B,M.obj)}catch(F){this.lastError=F;if(A){throw F}}}else{try{G=M.fn.call(L,this.type,I,M.obj)}catch(H){this.lastError=H;if(A){throw H}}}if(false===G){if(!this.silent){}break}}}return(G!==false)},unsubscribeAll:function(){var A=this.subscribers.length,B;for(B=A-1;B>-1;B--){this._delete(B)}this.subscribers=[];return A},_delete:function(A){var B=this.subscribers[A];if(B){delete B.fn;delete B.obj}this.subscribers.splice(A,1)},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope}};YAHOO.util.Subscriber=function(A,B,C){this.fn=A;this.obj=YAHOO.lang.isUndefined(B)?null:B;this.overrideContext=C};YAHOO.util.Subscriber.prototype.getScope=function(A){if(this.overrideContext){if(this.overrideContext===true){return this.obj}else{return this.overrideContext}}return A};YAHOO.util.Subscriber.prototype.contains=function(A,B){if(B){return(this.fn==A&&this.obj==B)}else{return(this.fn==A)}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }"};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var H=false;var I=[];var J=[];var G=[];var E=[];var C=0;var F=[];var B=[];var A=0;var D={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9};var K=YAHOO.env.ua.ie?"focusin":"focus";var L=YAHOO.env.ua.ie?"focusout":"blur";return{POLL_RETRYS:2000,POLL_INTERVAL:20,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,_dri:null,DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){var M=this;var N=function(){M._tryPreloadAttach()};this._interval=setInterval(N,this.POLL_INTERVAL)}},onAvailable:function(S,O,Q,R,P){var M=(YAHOO.lang.isString(S))?[S]:S;for(var N=0;N<M.length;N=N+1){F.push({id:M[N],fn:O,obj:Q,overrideContext:R,checkReady:P})}C=this.POLL_RETRYS;this.startInterval()},onContentReady:function(P,M,N,O){this.onAvailable(P,M,N,O,true)},onDOMReady:function(M,N,O){if(this.DOMReady){setTimeout(function(){var P=window;if(O){if(O===true){P=N}else{P=O}}M.call(P,"DOMReady",[],N)},0)}else{this.DOMReadyEvent.subscribe(M,N,O)}},_addListener:function(O,M,Y,S,W,b){if(!Y||!Y.call){return false}if(this._isValidCollection(O)){var Z=true;for(var T=0,V=O.length;T<V;++T){Z=this.on(O[T],M,Y,S,W)&&Z}return Z}else{if(YAHOO.lang.isString(O)){var R=this.getEl(O);if(R){O=R}else{this.onAvailable(O,function(){YAHOO.util.Event.on(O,M,Y,S,W)});return true}}}if(!O){return false}if("unload"==M&&S!==this){J[J.length]=[O,M,Y,S,W];return true}var N=O;if(W){if(W===true){N=S}else{N=W}}var P=function(c){return Y.call(N,YAHOO.util.Event.getEvent(c,O),S)};var a=[O,M,Y,P,N,S,W];var U=I.length;I[U]=a;if(this.useLegacyEvent(O,M)){var Q=this.getLegacyIndex(O,M);if(Q==-1||O!=G[Q][0]){Q=G.length;B[O.id+M]=Q;G[Q]=[O,M,O["on"+M]];E[Q]=[];O["on"+M]=function(c){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(c),Q)}}E[Q].push(a)}else{try{this._simpleAdd(O,M,P,b)}catch(X){this.lastError=X;this.removeListener(O,M,Y);return false}}return true},addListener:function(N,Q,M,O,P){return this._addListener(N,Q,M,O,P,false)},addFocusListener:function(N,M,O,P){return this._addListener(N,K,M,O,P,true)},removeFocusListener:function(N,M){return this.removeListener(N,K,M)},addBlurListener:function(N,M,O,P){return this._addListener(N,L,M,O,P,true)},removeBlurListener:function(N,M){return this.removeListener(N,L,M)},fireLegacyEvent:function(R,P){var T=true,M,V,U,N,S;V=E[P].slice();for(var O=0,Q=V.length;O<Q;++O){U=V[O];if(U&&U[this.WFN]){N=U[this.ADJ_SCOPE];S=U[this.WFN].call(N,R);T=(T&&S)}}M=G[P];if(M&&M[2]){M[2](R)}return T},getLegacyIndex:function(N,O){var M=this.generateId(N)+O;if(typeof B[M]=="undefined"){return-1}else{return B[M]}},useLegacyEvent:function(M,N){return(this.webkit&&this.webkit<419&&("click"==N||"dblclick"==N))},removeListener:function(N,M,V){var Q,T,X;if(typeof N=="string"){N=this.getEl(N)}else{if(this._isValidCollection(N)){var W=true;for(Q=N.length-1;Q>-1;Q--){W=(this.removeListener(N[Q],M,V)&&W)}return W}}if(!V||!V.call){return this.purgeElement(N,false,M)}if("unload"==M){for(Q=J.length-1;Q>-1;Q--){X=J[Q];if(X&&X[0]==N&&X[1]==M&&X[2]==V){J.splice(Q,1);return true}}return false}var R=null;var S=arguments[3];if("undefined"===typeof S){S=this._getCacheIndex(N,M,V)}if(S>=0){R=I[S]}if(!N||!R){return false}if(this.useLegacyEvent(N,M)){var P=this.getLegacyIndex(N,M);var O=E[P];if(O){for(Q=0,T=O.length;Q<T;++Q){X=O[Q];if(X&&X[this.EL]==N&&X[this.TYPE]==M&&X[this.FN]==V){O.splice(Q,1);break}}}}else{try{this._simpleRemove(N,M,R[this.WFN],false)}catch(U){this.lastError=U;return false}}delete I[S][this.WFN];delete I[S][this.FN];I.splice(S,1);return true},getTarget:function(O,N){var M=O.target||O.srcElement;return this.resolveTextNode(M)},resolveTextNode:function(N){try{if(N&&3==N.nodeType){return N.parentNode}}catch(M){}return N},getPageX:function(N){var M=N.pageX;if(!M&&0!==M){M=N.clientX||0;if(this.isIE){M+=this._getScrollLeft()}}return M},getPageY:function(M){var N=M.pageY;if(!N&&0!==N){N=M.clientY||0;if(this.isIE){N+=this._getScrollTop()}}return N},getXY:function(M){return[this.getPageX(M),this.getPageY(M)]},getRelatedTarget:function(N){var M=N.relatedTarget;if(!M){if(N.type=="mouseout"){M=N.toElement}else{if(N.type=="mouseover"){M=N.fromElement}}}return this.resolveTextNode(M)},getTime:function(O){if(!O.time){var N=new Date().getTime();try{O.time=N}catch(M){this.lastError=M;return N}}return O.time},stopEvent:function(M){this.stopPropagation(M);this.preventDefault(M)},stopPropagation:function(M){if(M.stopPropagation){M.stopPropagation()}else{M.cancelBubble=true}},preventDefault:function(M){if(M.preventDefault){M.preventDefault()}else{M.returnValue=false}},getEvent:function(O,M){var N=O||window.event;if(!N){var P=this.getEvent.caller;while(P){N=P.arguments[0];if(N&&Event==N.constructor){break}P=P.caller}}return N},getCharCode:function(N){var M=N.keyCode||N.charCode||0;if(YAHOO.env.ua.webkit&&(M in D)){M=D[M]}return M},_getCacheIndex:function(Q,R,P){for(var O=0,N=I.length;O<N;O=O+1){var M=I[O];if(M&&M[this.FN]==P&&M[this.EL]==Q&&M[this.TYPE]==R){return O}}return-1},generateId:function(M){var N=M.id;if(!N){N="yuievtautoid-"+A;++A;M.id=N}return N},_isValidCollection:function(N){try{return(N&&typeof N!=="string"&&N.length&&!N.tagName&&!N.alert&&typeof N[0]!=="undefined")}catch(M){return false}},elCache:{},getEl:function(M){return(typeof M==="string")?document.getElementById(M):M},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(N){if(!H){H=true;var M=YAHOO.util.Event;M._ready();M._tryPreloadAttach()}},_ready:function(N){var M=YAHOO.util.Event;if(!M.DOMReady){M.DOMReady=true;M.DOMReadyEvent.fire();M._simpleRemove(document,"DOMContentLoaded",M._ready)}},_tryPreloadAttach:function(){if(F.length===0){C=0;if(this._interval){clearInterval(this._interval);this._interval=null}return}if(this.locked){return}if(this.isIE){if(!this.DOMReady){this.startInterval();return}}this.locked=true;var S=!H;if(!S){S=(C>0&&F.length>0)}var R=[];var T=function(V,W){var U=V;if(W.overrideContext){if(W.overrideContext===true){U=W.obj}else{U=W.overrideContext}}W.fn.call(U,W.obj)};var N,M,Q,P,O=[];for(N=0,M=F.length;N<M;N=N+1){Q=F[N];if(Q){P=this.getEl(Q.id);if(P){if(Q.checkReady){if(H||P.nextSibling||!S){O.push(Q);F[N]=null}}else{T(P,Q);F[N]=null}}else{R.push(Q)}}}for(N=0,M=O.length;N<M;N=N+1){Q=O[N];T(this.getEl(Q.id),Q)}C--;if(S){for(N=F.length-1;N>-1;N--){Q=F[N];if(!Q||!Q.id){F.splice(N,1)}}this.startInterval()}else{if(this._interval){clearInterval(this._interval);this._interval=null}}this.locked=false},purgeElement:function(Q,R,T){var O=(YAHOO.lang.isString(Q))?this.getEl(Q):Q;var S=this.getListeners(O,T),P,M;if(S){for(P=S.length-1;P>-1;P--){var N=S[P];this.removeListener(O,N.type,N.fn)}}if(R&&O&&O.childNodes){for(P=0,M=O.childNodes.length;P<M;++P){this.purgeElement(O.childNodes[P],R,T)}}},getListeners:function(O,M){var R=[],N;if(!M){N=[I,J]}else{if(M==="unload"){N=[J]}else{N=[I]}}var T=(YAHOO.lang.isString(O))?this.getEl(O):O;for(var Q=0;Q<N.length;Q=Q+1){var V=N[Q];if(V){for(var S=0,U=V.length;S<U;++S){var P=V[S];if(P&&P[this.EL]===T&&(!M||M===P[this.TYPE])){R.push({type:P[this.TYPE],fn:P[this.FN],obj:P[this.OBJ],adjust:P[this.OVERRIDE],scope:P[this.ADJ_SCOPE],index:S})}}}}return(R.length)?R:null},_unload:function(T){var N=YAHOO.util.Event,Q,P,O,S,R,U=J.slice(),M;for(Q=0,S=J.length;Q<S;++Q){O=U[Q];if(O){M=window;if(O[N.ADJ_SCOPE]){if(O[N.ADJ_SCOPE]===true){M=O[N.UNLOAD_OBJ]}else{M=O[N.ADJ_SCOPE]}}O[N.FN].call(M,N.getEvent(T,O[N.EL]),O[N.UNLOAD_OBJ]);U[Q]=null}}O=null;M=null;J=null;if(I){for(P=I.length-1;P>-1;P--){O=I[P];if(O){N.removeListener(O[N.EL],O[N.TYPE],O[N.FN],P)}}O=null}G=null;N._simpleRemove(window,"unload",N._unload)},_getScrollLeft:function(){return this._getScroll()[1]},_getScrollTop:function(){return this._getScroll()[0]},_getScroll:function(){var M=document.documentElement,N=document.body;if(M&&(M.scrollTop||M.scrollLeft)){return[M.scrollTop,M.scrollLeft]}else{if(N){return[N.scrollTop,N.scrollLeft]}else{return[0,0]}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(O,P,N,M){O.addEventListener(P,N,(M))}}else{if(window.attachEvent){return function(O,P,N,M){O.attachEvent("on"+P,N)}}else{return function(){}}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(O,P,N,M){O.removeEventListener(P,N,(M))}}else{if(window.detachEvent){return function(N,O,M){N.detachEvent("on"+O,M)}}else{return function(){}}}}()}}();(function(){var EU=YAHOO.util.Event;EU.on=EU.addListener;EU.onFocus=EU.addFocusListener;EU.onBlur=EU.addBlurListener;if(EU.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var n=document.createElement("p");EU._dri=setInterval(function(){try{n.doScroll("left");clearInterval(EU._dri);EU._dri=null;EU._ready();n=null}catch(ex){}},EU.POLL_INTERVAL)}else{if(EU.webkit&&EU.webkit<525){EU._dri=setInterval(function(){var rs=document.readyState;if("loaded"==rs||"complete"==rs){clearInterval(EU._dri);EU._dri=null;EU._ready()}},EU.POLL_INTERVAL)}else{EU._simpleAdd(document,"DOMContentLoaded",EU._ready)}}EU._simpleAdd(window,"load",EU._load);EU._simpleAdd(window,"unload",EU._unload);EU._tryPreloadAttach()})()}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(A,C,F,E){this.__yui_events=this.__yui_events||{};var D=this.__yui_events[A];if(D){D.subscribe(C,F,E)}else{this.__yui_subscribers=this.__yui_subscribers||{};var B=this.__yui_subscribers;if(!B[A]){B[A]=[]}B[A].push({fn:C,obj:F,overrideContext:E})}},unsubscribe:function(C,E,G){this.__yui_events=this.__yui_events||{};var A=this.__yui_events;if(C){var F=A[C];if(F){return F.unsubscribe(E,G)}}else{var B=true;for(var D in A){if(YAHOO.lang.hasOwnProperty(A,D)){B=B&&A[D].unsubscribe(E,G)}}return B}return false},unsubscribeAll:function(A){return this.unsubscribe(A)},createEvent:function(G,D){this.__yui_events=this.__yui_events||{};var A=D||{};var I=this.__yui_events;if(I[G]){}else{var H=A.scope||this;var E=(A.silent);var B=new YAHOO.util.CustomEvent(G,H,E,YAHOO.util.CustomEvent.FLAT);I[G]=B;if(A.onSubscribeCallback){B.subscribeEvent.subscribe(A.onSubscribeCallback)}this.__yui_subscribers=this.__yui_subscribers||{};var F=this.__yui_subscribers[G];if(F){for(var C=0;C<F.length;++C){B.subscribe(F[C].fn,F[C].obj,F[C].overrideContext)}}}return I[G]},fireEvent:function(E,D,A,C){this.__yui_events=this.__yui_events||{};var G=this.__yui_events[E];if(!G){return null}var B=[];for(var F=1;F<arguments.length;++F){B.push(arguments[F])}return G.fire.apply(G,B)},hasEvent:function(A){if(this.__yui_events){if(this.__yui_events[A]){return true}}return false}};(function(){var A=YAHOO.util.Event,C=YAHOO.lang;YAHOO.util.KeyListener=function(D,I,E,F){if(!D){}else{if(!I){}else{if(!E){}}}if(!F){F=YAHOO.util.KeyListener.KEYDOWN}var G=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(C.isString(D)){D=document.getElementById(D)}if(C.isFunction(E)){G.subscribe(E)}else{G.subscribe(E.fn,E.scope,E.correctScope)}function H(O,N){if(!I.shift){I.shift=false}if(!I.alt){I.alt=false}if(!I.ctrl){I.ctrl=false}if(O.shiftKey==I.shift&&O.altKey==I.alt&&O.ctrlKey==I.ctrl){var J,M=I.keys,L;if(YAHOO.lang.isArray(M)){for(var K=0;K<M.length;K++){J=M[K];L=A.getCharCode(O);if(J==L){G.fire(L,O);break}}}else{L=A.getCharCode(O);if(M==L){G.fire(L,O)}}}}this.enable=function(){if(!this.enabled){A.on(D,F,H);this.enabledEvent.fire(I)}this.enabled=true};this.disable=function(){if(this.enabled){A.removeListener(D,F,H);this.disabledEvent.fire(I)}this.enabled=false};this.toString=function(){return"KeyListener ["+I.keys+"] "+D.tagName+(D.id?"["+D.id+"]":"")}};var B=YAHOO.util.KeyListener;B.KEYDOWN="keydown";B.KEYUP="keyup";B.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38}})();YAHOO.register("event",YAHOO.util.Event,{version:"2.7.0",build:"1799"});YAHOO.util.Connect={_msxml_progid:["Microsoft.XMLHTTP","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP"],_http_headers:{},_has_http_headers:false,_use_default_post_header:true,_default_post_header:"application/x-www-form-urlencoded; charset=UTF-8",_default_form_header:"application/x-www-form-urlencoded",_use_default_xhr_header:true,_default_xhr_header:"XMLHttpRequest",_has_default_headers:true,_default_headers:{},_isFormSubmit:false,_isFileUpload:false,_formNode:null,_sFormData:null,_poll:{},_timeOut:{},_polling_interval:50,_transaction_id:0,_submitElementValue:null,_hasSubmitListener:(function(){if(YAHOO.util.Event){YAHOO.util.Event.addListener(document,"click",function(C){var B=YAHOO.util.Event.getTarget(C),A=B.nodeName.toLowerCase();if((A==="input"||A==="button")&&(B.type&&B.type.toLowerCase()=="submit")){YAHOO.util.Connect._submitElementValue=encodeURIComponent(B.name)+"="+encodeURIComponent(B.value)}});return true}return false})(),startEvent:new YAHOO.util.CustomEvent("start"),completeEvent:new YAHOO.util.CustomEvent("complete"),successEvent:new YAHOO.util.CustomEvent("success"),failureEvent:new YAHOO.util.CustomEvent("failure"),uploadEvent:new YAHOO.util.CustomEvent("upload"),abortEvent:new YAHOO.util.CustomEvent("abort"),_customEvents:{onStart:["startEvent","start"],onComplete:["completeEvent","complete"],onSuccess:["successEvent","success"],onFailure:["failureEvent","failure"],onUpload:["uploadEvent","upload"],onAbort:["abortEvent","abort"]},setProgId:function(A){this._msxml_progid.unshift(A)},setDefaultPostHeader:function(A){if(typeof A=="string"){this._default_post_header=A}else{if(typeof A=="boolean"){this._use_default_post_header=A}}},setDefaultXhrHeader:function(A){if(typeof A=="string"){this._default_xhr_header=A}else{this._use_default_xhr_header=A}},setPollingInterval:function(A){if(typeof A=="number"&&isFinite(A)){this._polling_interval=A}},createXhrObject:function(F){var E,A;try{A=new XMLHttpRequest();E={conn:A,tId:F}}catch(D){for(var B=0;B<this._msxml_progid.length;++B){try{A=new ActiveXObject(this._msxml_progid[B]);E={conn:A,tId:F};break}catch(C){}}}finally{return E}},getConnectionObject:function(A){var C;var D=this._transaction_id;try{if(!A){C=this.createXhrObject(D)}else{C={};C.tId=D;C.isUpload=true}if(C){this._transaction_id++}}catch(B){}finally{return C}},asyncRequest:function(F,C,E,A){var D=(this._isFileUpload)?this.getConnectionObject(true):this.getConnectionObject();var B=(E&&E.argument)?E.argument:null;if(!D){return null}else{if(E&&E.customevents){this.initCustomEvents(D,E)}if(this._isFormSubmit){if(this._isFileUpload){this.uploadFile(D,E,C,A);return D}if(F.toUpperCase()=="GET"){if(this._sFormData.length!==0){C+=((C.indexOf("?")==-1)?"?":"&")+this._sFormData}}else{if(F.toUpperCase()=="POST"){A=A?this._sFormData+"&"+A:this._sFormData}}}if(F.toUpperCase()=="GET"&&(E&&E.cache===false)){C+=((C.indexOf("?")==-1)?"?":"&")+"rnd="+new Date().valueOf().toString()}D.conn.open(F,C,true);if(this._use_default_xhr_header){if(!this._default_headers["X-Requested-With"]){this.initHeader("X-Requested-With",this._default_xhr_header,true)}}if((F.toUpperCase()==="POST"&&this._use_default_post_header)&&this._isFormSubmit===false){this.initHeader("Content-Type",this._default_post_header)}if(this._has_default_headers||this._has_http_headers){this.setHeader(D)}this.handleReadyState(D,E);D.conn.send(A||"");if(this._isFormSubmit===true){this.resetFormState()}this.startEvent.fire(D,B);if(D.startEvent){D.startEvent.fire(D,B)}return D}},initCustomEvents:function(A,C){var B;for(B in C.customevents){if(this._customEvents[B][0]){A[this._customEvents[B][0]]=new YAHOO.util.CustomEvent(this._customEvents[B][1],(C.scope)?C.scope:null);A[this._customEvents[B][0]].subscribe(C.customevents[B])}}},handleReadyState:function(C,D){var B=this;var A=(D&&D.argument)?D.argument:null;if(D&&D.timeout){this._timeOut[C.tId]=window.setTimeout(function(){B.abort(C,D,true)},D.timeout)}this._poll[C.tId]=window.setInterval(function(){if(C.conn&&C.conn.readyState===4){window.clearInterval(B._poll[C.tId]);delete B._poll[C.tId];if(D&&D.timeout){window.clearTimeout(B._timeOut[C.tId]);delete B._timeOut[C.tId]}B.completeEvent.fire(C,A);if(C.completeEvent){C.completeEvent.fire(C,A)}B.handleTransactionResponse(C,D)}},this._polling_interval)},handleTransactionResponse:function(F,G,A){var D,C;var B=(G&&G.argument)?G.argument:null;try{if(F.conn.status!==undefined&&F.conn.status!==0){D=F.conn.status}else{D=13030}}catch(E){D=13030}if(D>=200&&D<300||D===1223){C=this.createResponseObject(F,B);if(G&&G.success){if(!G.scope){G.success(C)}else{G.success.apply(G.scope,[C])}}this.successEvent.fire(C);if(F.successEvent){F.successEvent.fire(C)}}else{switch(D){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:C=this.createExceptionObject(F.tId,B,(A?A:false));if(G&&G.failure){if(!G.scope){G.failure(C)}else{G.failure.apply(G.scope,[C])}}break;default:C=this.createResponseObject(F,B);if(G&&G.failure){if(!G.scope){G.failure(C)}else{G.failure.apply(G.scope,[C])}}}this.failureEvent.fire(C);if(F.failureEvent){F.failureEvent.fire(C)}}this.releaseObject(F);C=null},createResponseObject:function(A,G){var D={};var I={};try{var C=A.conn.getAllResponseHeaders();var F=C.split("\n");for(var E=0;E<F.length;E++){var B=F[E].indexOf(":");if(B!=-1){I[F[E].substring(0,B)]=F[E].substring(B+2)}}}catch(H){}D.tId=A.tId;D.status=(A.conn.status==1223)?204:A.conn.status;D.statusText=(A.conn.status==1223)?"No Content":A.conn.statusText;D.getResponseHeader=I;D.getAllResponseHeaders=C;D.responseText=A.conn.responseText;D.responseXML=A.conn.responseXML;if(G){D.argument=G}return D},createExceptionObject:function(H,D,A){var F=0;var G="communication failure";var C=-1;var B="transaction aborted";var E={};E.tId=H;if(A){E.status=C;E.statusText=B}else{E.status=F;E.statusText=G}if(D){E.argument=D}return E},initHeader:function(A,D,C){var B=(C)?this._default_headers:this._http_headers;B[A]=D;if(C){this._has_default_headers=true}else{this._has_http_headers=true}},setHeader:function(A){var B;if(this._has_default_headers){for(B in this._default_headers){if(YAHOO.lang.hasOwnProperty(this._default_headers,B)){A.conn.setRequestHeader(B,this._default_headers[B])}}}if(this._has_http_headers){for(B in this._http_headers){if(YAHOO.lang.hasOwnProperty(this._http_headers,B)){A.conn.setRequestHeader(B,this._http_headers[B])}}delete this._http_headers;this._http_headers={};this._has_http_headers=false}},resetDefaultHeaders:function(){delete this._default_headers;this._default_headers={};this._has_default_headers=false},setForm:function(M,H,C){var L,B,K,I,P,J=false,F=[],O=0,E,G,D,N,A;this.resetFormState();if(typeof M=="string"){L=(document.getElementById(M)||document.forms[M])}else{if(typeof M=="object"){L=M}else{return}}if(H){this.createFrame(C?C:null);this._isFormSubmit=true;this._isFileUpload=true;this._formNode=L;return}for(E=0,G=L.elements.length;E<G;++E){B=L.elements[E];P=B.disabled;K=B.name;if(!P&&K){K=encodeURIComponent(K)+"=";I=encodeURIComponent(B.value);switch(B.type){case"select-one":if(B.selectedIndex>-1){A=B.options[B.selectedIndex];F[O++]=K+encodeURIComponent((A.attributes.value&&A.attributes.value.specified)?A.value:A.text)}break;case"select-multiple":if(B.selectedIndex>-1){for(D=B.selectedIndex,N=B.options.length;D<N;++D){A=B.options[D];if(A.selected){F[O++]=K+encodeURIComponent((A.attributes.value&&A.attributes.value.specified)?A.value:A.text)}}}break;case"radio":case"checkbox":if(B.checked){F[O++]=K+I}break;case"file":case undefined:case"reset":case"button":break;case"submit":if(J===false){if(this._hasSubmitListener&&this._submitElementValue){F[O++]=this._submitElementValue}J=true}break;default:F[O++]=K+I}}}this._isFormSubmit=true;this._sFormData=F.join("&");this.initHeader("Content-Type",this._default_form_header);return this._sFormData},resetFormState:function(){this._isFormSubmit=false;this._isFileUpload=false;this._formNode=null;this._sFormData=""},createFrame:function(A){var B="yuiIO"+this._transaction_id;var C;if(YAHOO.env.ua.ie){C=document.createElement('<iframe id="'+B+'" name="'+B+'" />');if(typeof A=="boolean"){C.src="javascript:false"}}else{C=document.createElement("iframe");C.id=B;C.name=B}C.style.position="absolute";C.style.top="-1000px";C.style.left="-1000px";document.body.appendChild(C)},appendPostData:function(A){var D=[],B=A.split("&"),C,E;for(C=0;C<B.length;C++){E=B[C].indexOf("=");if(E!=-1){D[C]=document.createElement("input");D[C].type="hidden";D[C].name=decodeURIComponent(B[C].substring(0,E));D[C].value=decodeURIComponent(B[C].substring(E+1));this._formNode.appendChild(D[C])}}return D},uploadFile:function(D,N,E,C){var I="yuiIO"+D.tId,J="multipart/form-data",L=document.getElementById(I),O=this,K=(N&&N.argument)?N.argument:null,M,H,B,G;var A={action:this._formNode.getAttribute("action"),method:this._formNode.getAttribute("method"),target:this._formNode.getAttribute("target")};this._formNode.setAttribute("action",E);this._formNode.setAttribute("method","POST");this._formNode.setAttribute("target",I);if(YAHOO.env.ua.ie){this._formNode.setAttribute("encoding",J)}else{this._formNode.setAttribute("enctype",J)}if(C){M=this.appendPostData(C)}this._formNode.submit();this.startEvent.fire(D,K);if(D.startEvent){D.startEvent.fire(D,K)}if(N&&N.timeout){this._timeOut[D.tId]=window.setTimeout(function(){O.abort(D,N,true)},N.timeout)}if(M&&M.length>0){for(H=0;H<M.length;H++){this._formNode.removeChild(M[H])}}for(B in A){if(YAHOO.lang.hasOwnProperty(A,B)){if(A[B]){this._formNode.setAttribute(B,A[B])}else{this._formNode.removeAttribute(B)}}}this.resetFormState();var F=function(){if(N&&N.timeout){window.clearTimeout(O._timeOut[D.tId]);delete O._timeOut[D.tId]}O.completeEvent.fire(D,K);if(D.completeEvent){D.completeEvent.fire(D,K)}G={tId:D.tId,argument:N.argument};try{G.responseText=L.contentWindow.document.body?L.contentWindow.document.body.innerHTML:L.contentWindow.document.documentElement.textContent;G.responseXML=L.contentWindow.document.XMLDocument?L.contentWindow.document.XMLDocument:L.contentWindow.document}catch(P){}if(N&&N.upload){if(!N.scope){N.upload(G)}else{N.upload.apply(N.scope,[G])}}O.uploadEvent.fire(G);if(D.uploadEvent){D.uploadEvent.fire(G)}YAHOO.util.Event.removeListener(L,"load",F);setTimeout(function(){document.body.removeChild(L);O.releaseObject(D)},100)};YAHOO.util.Event.addListener(L,"load",F)},abort:function(E,G,A){var D;var B=(G&&G.argument)?G.argument:null;if(E&&E.conn){if(this.isCallInProgress(E)){E.conn.abort();window.clearInterval(this._poll[E.tId]);delete this._poll[E.tId];if(A){window.clearTimeout(this._timeOut[E.tId]);delete this._timeOut[E.tId]}D=true}}else{if(E&&E.isUpload===true){var C="yuiIO"+E.tId;var F=document.getElementById(C);if(F){YAHOO.util.Event.removeListener(F,"load");document.body.removeChild(F);if(A){window.clearTimeout(this._timeOut[E.tId]);delete this._timeOut[E.tId]}D=true}}else{D=false}}if(D===true){this.abortEvent.fire(E,B);if(E.abortEvent){E.abortEvent.fire(E,B)}this.handleTransactionResponse(E,G,true)}return D},isCallInProgress:function(B){if(B&&B.conn){return B.conn.readyState!==4&&B.conn.readyState!==0}else{if(B&&B.isUpload===true){var A="yuiIO"+B.tId;return document.getElementById(A)?true:false}else{return false}}},releaseObject:function(A){if(A&&A.conn){A.conn=null;A=null}}};YAHOO.register("connection",YAHOO.util.Connect,{version:"2.7.0",build:"1799"});(function(){var B=YAHOO.util;var A=function(D,C,E,F){if(!D){}this.init(D,C,E,F)};A.NAME="Anim";A.prototype={toString:function(){var C=this.getEl()||{};var D=C.id||C.tagName;return(this.constructor.NAME+": "+D)},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(C,E,D){return this.method(this.currentFrame,E,D-E,this.totalFrames)},setAttribute:function(C,F,E){var D=this.getEl();if(this.patterns.noNegatives.test(C)){F=(F>0)?F:0}if("style"in D){B.Dom.setStyle(D,C,F+E)}else{if(C in D){D[C]=F}}},getAttribute:function(C){var E=this.getEl();var G=B.Dom.getStyle(E,C);if(G!=="auto"&&!this.patterns.offsetUnit.test(G)){return parseFloat(G)}var D=this.patterns.offsetAttribute.exec(C)||[];var H=!!(D[3]);var F=!!(D[2]);if("style"in E){if(F||(B.Dom.getStyle(E,"position")=="absolute"&&H)){G=E["offset"+D[0].charAt(0).toUpperCase()+D[0].substr(1)]}else{G=0}}else{if(C in E){G=E[C]}}return G},getDefaultUnit:function(C){if(this.patterns.defaultUnit.test(C)){return"px"}return""},setRuntimeAttribute:function(D){var I;var E;var F=this.attributes;this.runtimeAttributes[D]={};var H=function(J){return(typeof J!=="undefined")};if(!H(F[D]["to"])&&!H(F[D]["by"])){return false}I=(H(F[D]["from"]))?F[D]["from"]:this.getAttribute(D);if(H(F[D]["to"])){E=F[D]["to"]}else{if(H(F[D]["by"])){if(I.constructor==Array){E=[];for(var G=0,C=I.length;G<C;++G){E[G]=I[G]+F[D]["by"][G]*1}}else{E=I+F[D]["by"]*1}}}this.runtimeAttributes[D].start=I;this.runtimeAttributes[D].end=E;this.runtimeAttributes[D].unit=(H(F[D].unit))?F[D]["unit"]:this.getDefaultUnit(D);return true},init:function(E,J,I,C){var D=false;var F=null;var H=0;E=B.Dom.get(E);this.attributes=J||{};this.duration=!YAHOO.lang.isUndefined(I)?I:1;this.method=C||B.Easing.easeNone;this.useSeconds=true;this.currentFrame=0;this.totalFrames=B.AnimMgr.fps;this.setEl=function(M){E=B.Dom.get(M)};this.getEl=function(){return E};this.isAnimated=function(){return D};this.getStartTime=function(){return F};this.runtimeAttributes={};this.animate=function(){if(this.isAnimated()){return false}this.currentFrame=0;this.totalFrames=(this.useSeconds)?Math.ceil(B.AnimMgr.fps*this.duration):this.duration;if(this.duration===0&&this.useSeconds){this.totalFrames=1}B.AnimMgr.registerElement(this);return true};this.stop=function(M){if(!this.isAnimated()){return false}if(M){this.currentFrame=this.totalFrames;this._onTween.fire()}B.AnimMgr.stop(this)};var L=function(){this.onStart.fire();this.runtimeAttributes={};for(var M in this.attributes){this.setRuntimeAttribute(M)}D=true;H=0;F=new Date()};var K=function(){var O={duration:new Date()-this.getStartTime(),currentFrame:this.currentFrame};O.toString=function(){return("duration: "+O.duration+", currentFrame: "+O.currentFrame)};this.onTween.fire(O);var N=this.runtimeAttributes;for(var M in N){this.setAttribute(M,this.doMethod(M,N[M].start,N[M].end),N[M].unit)}H+=1};var G=function(){var M=(new Date()-F)/1000;var N={duration:M,frames:H,fps:H/M};N.toString=function(){return("duration: "+N.duration+", frames: "+N.frames+", fps: "+N.fps)};D=false;H=0;this.onComplete.fire(N)};this._onStart=new B.CustomEvent("_start",this,true);this.onStart=new B.CustomEvent("start",this);this.onTween=new B.CustomEvent("tween",this);this._onTween=new B.CustomEvent("_tween",this,true);this.onComplete=new B.CustomEvent("complete",this);this._onComplete=new B.CustomEvent("_complete",this,true);this._onStart.subscribe(L);this._onTween.subscribe(K);this._onComplete.subscribe(G)}};B.Anim=A})();YAHOO.util.AnimMgr=new function(){var C=null;var B=[];var A=0;this.fps=1000;this.delay=1;this.registerElement=function(F){B[B.length]=F;A+=1;F._onStart.fire();this.start()};this.unRegister=function(G,F){F=F||E(G);if(!G.isAnimated()||F==-1){return false}G._onComplete.fire();B.splice(F,1);A-=1;if(A<=0){this.stop()}return true};this.start=function(){if(C===null){C=setInterval(this.run,this.delay)}};this.stop=function(H){if(!H){clearInterval(C);for(var G=0,F=B.length;G<F;++G){this.unRegister(B[0],0)}B=[];C=null;A=0}else{this.unRegister(H)}};this.run=function(){for(var H=0,F=B.length;H<F;++H){var G=B[H];if(!G||!G.isAnimated()){continue}if(G.currentFrame<G.totalFrames||G.totalFrames===null){G.currentFrame+=1;if(G.useSeconds){D(G)}G._onTween.fire()}else{YAHOO.util.AnimMgr.stop(G,H)}}};var E=function(H){for(var G=0,F=B.length;G<F;++G){if(B[G]==H){return G}}return-1};var D=function(G){var J=G.totalFrames;var I=G.currentFrame;var H=(G.currentFrame*G.duration*1000/G.totalFrames);var F=(new Date()-G.getStartTime());var K=0;if(F<G.duration*1000){K=Math.round((F/H-1)*G.currentFrame)}else{K=J-(I+1)}if(K>0&&isFinite(K)){if(G.currentFrame+K>=J){K=J-(I+1)}G.currentFrame+=K}}};YAHOO.util.Bezier=new function(){this.getPosition=function(E,D){var F=E.length;var C=[];for(var B=0;B<F;++B){C[B]=[E[B][0],E[B][1]]}for(var A=1;A<F;++A){for(B=0;B<F-A;++B){C[B][0]=(1-D)*C[B][0]+D*C[parseInt(B+1,10)][0];C[B][1]=(1-D)*C[B][1]+D*C[parseInt(B+1,10)][1]}}return[C[0][0],C[0][1]]}};(function(){var A=function(F,E,G,H){A.superclass.constructor.call(this,F,E,G,H)};A.NAME="ColorAnim";A.DEFAULT_BGCOLOR="#fff";var C=YAHOO.util;YAHOO.extend(A,C.Anim);var D=A.superclass;var B=A.prototype;B.patterns.color=/color$/i;B.patterns.rgb=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;B.patterns.hex=/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;B.patterns.hex3=/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;B.patterns.transparent=/^transparent|rgba\(0, 0, 0, 0\)$/;B.parseColor=function(E){if(E.length==3){return E}var F=this.patterns.hex.exec(E);if(F&&F.length==4){return[parseInt(F[1],16),parseInt(F[2],16),parseInt(F[3],16)]}F=this.patterns.rgb.exec(E);if(F&&F.length==4){return[parseInt(F[1],10),parseInt(F[2],10),parseInt(F[3],10)]}F=this.patterns.hex3.exec(E);if(F&&F.length==4){return[parseInt(F[1]+F[1],16),parseInt(F[2]+F[2],16),parseInt(F[3]+F[3],16)]}return null};B.getAttribute=function(E){var G=this.getEl();if(this.patterns.color.test(E)){var I=YAHOO.util.Dom.getStyle(G,E);var H=this;if(this.patterns.transparent.test(I)){var F=YAHOO.util.Dom.getAncestorBy(G,function(J){return!H.patterns.transparent.test(I)});if(F){I=C.Dom.getStyle(F,E)}else{I=A.DEFAULT_BGCOLOR}}}else{I=D.getAttribute.call(this,E)}return I};B.doMethod=function(F,J,G){var I;if(this.patterns.color.test(F)){I=[];for(var H=0,E=J.length;H<E;++H){I[H]=D.doMethod.call(this,F,J[H],G[H])}I="rgb("+Math.floor(I[0])+","+Math.floor(I[1])+","+Math.floor(I[2])+")"}else{I=D.doMethod.call(this,F,J,G)}return I};B.setRuntimeAttribute=function(F){D.setRuntimeAttribute.call(this,F);if(this.patterns.color.test(F)){var H=this.attributes;var J=this.parseColor(this.runtimeAttributes[F].start);var G=this.parseColor(this.runtimeAttributes[F].end);if(typeof H[F]["to"]==="undefined"&&typeof H[F]["by"]!=="undefined"){G=this.parseColor(H[F].by);for(var I=0,E=J.length;I<E;++I){G[I]=J[I]+G[I]}}this.runtimeAttributes[F].start=J;this.runtimeAttributes[F].end=G}};C.ColorAnim=A})();YAHOO.util.Easing={easeNone:function(B,A,D,C){return D*B/C+A},easeIn:function(B,A,D,C){return D*(B/=C)*B+A},easeOut:function(B,A,D,C){return-D*(B/=C)*(B-2)+A},easeBoth:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B+A}return-D/2*((--B)*(B-2)-1)+A},easeInStrong:function(B,A,D,C){return D*(B/=C)*B*B*B+A},easeOutStrong:function(B,A,D,C){return-D*((B=B/C-1)*B*B*B-1)+A},easeBothStrong:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B*B*B+A}return-D/2*((B-=2)*B*B*B-2)+A},elasticIn:function(C,A,G,F,B,E){if(C==0){return A}if((C/=F)==1){return A+G}if(!E){E=F*0.3}if(!B||B<Math.abs(G)){B=G;var D=E/4}else{var D=E/(2*Math.PI)*Math.asin(G/B)}return-(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A},elasticOut:function(C,A,G,F,B,E){if(C==0){return A}if((C/=F)==1){return A+G}if(!E){E=F*0.3}if(!B||B<Math.abs(G)){B=G;var D=E/4}else{var D=E/(2*Math.PI)*Math.asin(G/B)}return B*Math.pow(2,-10*C)*Math.sin((C*F-D)*(2*Math.PI)/E)+G+A},elasticBoth:function(C,A,G,F,B,E){if(C==0){return A}if((C/=F/2)==2){return A+G}if(!E){E=F*(0.3*1.5)}if(!B||B<Math.abs(G)){B=G;var D=E/4}else{var D=E/(2*Math.PI)*Math.asin(G/B)}if(C<1){return-0.5*(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A}return B*Math.pow(2,-10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E)*0.5+G+A},backIn:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158}return E*(B/=D)*B*((C+1)*B-C)+A},backOut:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158}return E*((B=B/D-1)*B*((C+1)*B+C)+1)+A},backBoth:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158}if((B/=D/2)<1){return E/2*(B*B*(((C*=(1.525))+1)*B-C))+A}return E/2*((B-=2)*B*(((C*=(1.525))+1)*B+C)+2)+A},bounceIn:function(B,A,D,C){return D-YAHOO.util.Easing.bounceOut(C-B,0,D,C)+A},bounceOut:function(B,A,D,C){if((B/=C)<(1/2.75)){return D*(7.5625*B*B)+A}else{if(B<(2/2.75)){return D*(7.5625*(B-=(1.5/2.75))*B+0.75)+A}else{if(B<(2.5/2.75)){return D*(7.5625*(B-=(2.25/2.75))*B+0.9375)+A}}}return D*(7.5625*(B-=(2.625/2.75))*B+0.984375)+A},bounceBoth:function(B,A,D,C){if(B<C/2){return YAHOO.util.Easing.bounceIn(B*2,0,D,C)*0.5+A}return YAHOO.util.Easing.bounceOut(B*2-C,0,D,C)*0.5+D*0.5+A}};(function(){var A=function(H,G,I,J){if(H){A.superclass.constructor.call(this,H,G,I,J)}};A.NAME="Motion";var E=YAHOO.util;YAHOO.extend(A,E.ColorAnim);var F=A.superclass;var C=A.prototype;C.patterns.points=/^points$/i;C.setAttribute=function(G,I,H){if(this.patterns.points.test(G)){H=H||"px";F.setAttribute.call(this,"left",I[0],H);F.setAttribute.call(this,"top",I[1],H)}else{F.setAttribute.call(this,G,I,H)}};C.getAttribute=function(G){if(this.patterns.points.test(G)){var H=[F.getAttribute.call(this,"left"),F.getAttribute.call(this,"top")]}else{H=F.getAttribute.call(this,G)}return H};C.doMethod=function(G,K,H){var J=null;if(this.patterns.points.test(G)){var I=this.method(this.currentFrame,0,100,this.totalFrames)/100;J=E.Bezier.getPosition(this.runtimeAttributes[G],I)}else{J=F.doMethod.call(this,G,K,H)}return J};C.setRuntimeAttribute=function(P){if(this.patterns.points.test(P)){var H=this.getEl();var J=this.attributes;var G;var L=J["points"]["control"]||[];var I;var M,O;if(L.length>0&&!(L[0]instanceof Array)){L=[L]}else{var K=[];for(M=0,O=L.length;M<O;++M){K[M]=L[M]}L=K}if(E.Dom.getStyle(H,"position")=="static"){E.Dom.setStyle(H,"position","relative")}if(D(J["points"]["from"])){E.Dom.setXY(H,J["points"]["from"])}else{E.Dom.setXY(H,E.Dom.getXY(H))}G=this.getAttribute("points");if(D(J["points"]["to"])){I=B.call(this,J["points"]["to"],G);var N=E.Dom.getXY(this.getEl());for(M=0,O=L.length;M<O;++M){L[M]=B.call(this,L[M],G)}}else{if(D(J["points"]["by"])){I=[G[0]+J["points"]["by"][0],G[1]+J["points"]["by"][1]];for(M=0,O=L.length;M<O;++M){L[M]=[G[0]+L[M][0],G[1]+L[M][1]]}}}this.runtimeAttributes[P]=[G];if(L.length>0){this.runtimeAttributes[P]=this.runtimeAttributes[P].concat(L)}this.runtimeAttributes[P][this.runtimeAttributes[P].length]=I}else{F.setRuntimeAttribute.call(this,P)}};var B=function(G,I){var H=E.Dom.getXY(this.getEl());G=[G[0]-H[0]+I[0],G[1]-H[1]+I[1]];return G};var D=function(G){return(typeof G!=="undefined")};E.Motion=A})();(function(){var D=function(F,E,G,H){if(F){D.superclass.constructor.call(this,F,E,G,H)}};D.NAME="Scroll";var B=YAHOO.util;YAHOO.extend(D,B.ColorAnim);var C=D.superclass;var A=D.prototype;A.doMethod=function(E,H,F){var G=null;if(E=="scroll"){G=[this.method(this.currentFrame,H[0],F[0]-H[0],this.totalFrames),this.method(this.currentFrame,H[1],F[1]-H[1],this.totalFrames)]}else{G=C.doMethod.call(this,E,H,F)}return G};A.getAttribute=function(E){var G=null;var F=this.getEl();if(E=="scroll"){G=[F.scrollLeft,F.scrollTop]}else{G=C.getAttribute.call(this,E)}return G};A.setAttribute=function(E,H,G){var F=this.getEl();if(E=="scroll"){F.scrollLeft=H[0];F.scrollTop=H[1]}else{C.setAttribute.call(this,E,H,G)}};B.Scroll=D})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.7.0",build:"1799"});if(!YAHOO.util.DragDropMgr){YAHOO.util.DragDropMgr=function(){var A=YAHOO.util.Event,B=YAHOO.util.Dom;return{useShim:false,_shimActive:false,_shimState:false,_debugShim:false,_createShim:function(){var C=document.createElement("div");C.id="yui-ddm-shim";if(document.body.firstChild){document.body.insertBefore(C,document.body.firstChild)}else{document.body.appendChild(C)}C.style.display="none";C.style.backgroundColor="red";C.style.position="absolute";C.style.zIndex="99999";B.setStyle(C,"opacity","0");this._shim=C;A.on(C,"mouseup",this.handleMouseUp,this,true);A.on(C,"mousemove",this.handleMouseMove,this,true);A.on(window,"scroll",this._sizeShim,this,true)},_sizeShim:function(){if(this._shimActive){var C=this._shim;C.style.height=B.getDocumentHeight()+"px";C.style.width=B.getDocumentWidth()+"px";C.style.top="0";C.style.left="0"}},_activateShim:function(){if(this.useShim){if(!this._shim){this._createShim()}this._shimActive=true;var C=this._shim,D="0";if(this._debugShim){D=".5"}B.setStyle(C,"opacity",D);this._sizeShim();C.style.display="block"}},_deactivateShim:function(){this._shim.style.display="none";this._shimActive=false},_shim:null,ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,interactionInfo:null,init:function(){this.initialized=true},POINT:0,INTERSECT:1,STRICT_INTERSECT:2,mode:0,_execOnAll:function(E,D){for(var F in this.ids){for(var C in this.ids[F]){var G=this.ids[F][C];if(!this.isTypeOfDD(G)){continue}G[E].apply(G,D)}}},_onLoad:function(){this.init();A.on(document,"mouseup",this.handleMouseUp,this,true);A.on(document,"mousemove",this.handleMouseMove,this,true);A.on(window,"unload",this._onUnload,this,true);A.on(window,"resize",this._onResize,this,true)},_onResize:function(C){this._execOnAll("resetConstraints",[])},lock:function(){this.locked=true},unlock:function(){this.locked=false},isLocked:function(){return this.locked},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:1000,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,fromTimeout:false,regDragDrop:function(D,C){if(!this.initialized){this.init()}if(!this.ids[C]){this.ids[C]={}}this.ids[C][D.id]=D},removeDDFromGroup:function(E,C){if(!this.ids[C]){this.ids[C]={}}var D=this.ids[C];if(D&&D[E.id]){delete D[E.id]}},_remove:function(E){for(var D in E.groups){if(D){var C=this.ids[D];if(C&&C[E.id]){delete C[E.id]}}}delete this.handleIds[E.id]},regHandle:function(D,C){if(!this.handleIds[D]){this.handleIds[D]={}}this.handleIds[D][C]=C},isDragDrop:function(C){return(this.getDDById(C))?true:false},getRelated:function(H,D){var G=[];for(var F in H.groups){for(var E in this.ids[F]){var C=this.ids[F][E];if(!this.isTypeOfDD(C)){continue}if(!D||C.isTarget){G[G.length]=C}}}return G},isLegalTarget:function(G,F){var D=this.getRelated(G,true);for(var E=0,C=D.length;E<C;++E){if(D[E].id==F.id){return true}}return false},isTypeOfDD:function(C){return(C&&C.__ygDragDrop)},isHandle:function(D,C){return(this.handleIds[D]&&this.handleIds[D][C])},getDDById:function(D){for(var C in this.ids){if(this.ids[C][D]){return this.ids[C][D]}}return null},handleMouseDown:function(E,D){this.currentTarget=YAHOO.util.Event.getTarget(E);this.dragCurrent=D;var C=D.getEl();this.startX=YAHOO.util.Event.getPageX(E);this.startY=YAHOO.util.Event.getPageY(E);this.deltaX=this.startX-C.offsetLeft;this.deltaY=this.startY-C.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var F=YAHOO.util.DDM;F.startDrag(F.startX,F.startY);F.fromTimeout=true},this.clickTimeThresh)},startDrag:function(C,E){if(this.dragCurrent&&this.dragCurrent.useShim){this._shimState=this.useShim;this.useShim=true}this._activateShim();clearTimeout(this.clickTimeout);var D=this.dragCurrent;if(D&&D.events.b4StartDrag){D.b4StartDrag(C,E);D.fireEvent("b4StartDragEvent",{x:C,y:E})}if(D&&D.events.startDrag){D.startDrag(C,E);D.fireEvent("startDragEvent",{x:C,y:E})}this.dragThreshMet=true},handleMouseUp:function(C){if(this.dragCurrent){clearTimeout(this.clickTimeout);if(this.dragThreshMet){if(this.fromTimeout){this.fromTimeout=false;this.handleMouseMove(C)}this.fromTimeout=false;this.fireEvents(C,true)}else{}this.stopDrag(C);this.stopEvent(C)}},stopEvent:function(C){if(this.stopPropagation){YAHOO.util.Event.stopPropagation(C)}if(this.preventDefault){YAHOO.util.Event.preventDefault(C)}},stopDrag:function(E,D){var C=this.dragCurrent;if(C&&!D){if(this.dragThreshMet){if(C.events.b4EndDrag){C.b4EndDrag(E);C.fireEvent("b4EndDragEvent",{e:E})}if(C.events.endDrag){C.endDrag(E);C.fireEvent("endDragEvent",{e:E})}}if(C.events.mouseUp){C.onMouseUp(E);C.fireEvent("mouseUpEvent",{e:E})}}if(this._shimActive){this._deactivateShim();if(this.dragCurrent&&this.dragCurrent.useShim){this.useShim=this._shimState;this._shimState=false}}this.dragCurrent=null;this.dragOvers={}},handleMouseMove:function(F){var C=this.dragCurrent;if(C){if(YAHOO.util.Event.isIE&&!F.button){this.stopEvent(F);return this.handleMouseUp(F)}else{if(F.clientX<0||F.clientY<0){}}if(!this.dragThreshMet){var E=Math.abs(this.startX-YAHOO.util.Event.getPageX(F));var D=Math.abs(this.startY-YAHOO.util.Event.getPageY(F));if(E>this.clickPixelThresh||D>this.clickPixelThresh){this.startDrag(this.startX,this.startY)}}if(this.dragThreshMet){if(C&&C.events.b4Drag){C.b4Drag(F);C.fireEvent("b4DragEvent",{e:F})}if(C&&C.events.drag){C.onDrag(F);C.fireEvent("dragEvent",{e:F})}if(C){this.fireEvents(F,false)}}this.stopEvent(F)}},fireEvents:function(V,L){var a=this.dragCurrent;if(!a||a.isLocked()||a.dragOnly){return}var N=YAHOO.util.Event.getPageX(V),M=YAHOO.util.Event.getPageY(V),P=new YAHOO.util.Point(N,M),K=a.getTargetCoord(P.x,P.y),F=a.getDragEl(),E=["out","over","drop","enter"],U=new YAHOO.util.Region(K.y,K.x+F.offsetWidth,K.y+F.offsetHeight,K.x),I=[],D={},Q=[],c={outEvts:[],overEvts:[],dropEvts:[],enterEvts:[]};for(var S in this.dragOvers){var d=this.dragOvers[S];if(!this.isTypeOfDD(d)){continue}if(!this.isOverTarget(P,d,this.mode,U)){c.outEvts.push(d)}I[S]=true;delete this.dragOvers[S]}for(var R in a.groups){if("string"!=typeof R){continue}for(S in this.ids[R]){var G=this.ids[R][S];if(!this.isTypeOfDD(G)){continue}if(G.isTarget&&!G.isLocked()&&G!=a){if(this.isOverTarget(P,G,this.mode,U)){D[R]=true;if(L){c.dropEvts.push(G)}else{if(!I[G.id]){c.enterEvts.push(G)}else{c.overEvts.push(G)}this.dragOvers[G.id]=G}}}}}this.interactionInfo={out:c.outEvts,enter:c.enterEvts,over:c.overEvts,drop:c.dropEvts,point:P,draggedRegion:U,sourceRegion:this.locationCache[a.id],validDrop:L};for(var C in D){Q.push(C)}if(L&&!c.dropEvts.length){this.interactionInfo.validDrop=false;if(a.events.invalidDrop){a.onInvalidDrop(V);a.fireEvent("invalidDropEvent",{e:V})}}for(S=0;S<E.length;S++){var Y=null;if(c[E[S]+"Evts"]){Y=c[E[S]+"Evts"]}if(Y&&Y.length){var H=E[S].charAt(0).toUpperCase()+E[S].substr(1),X="onDrag"+H,J="b4Drag"+H,O="drag"+H+"Event",W="drag"+H;if(this.mode){if(a.events[J]){a[J](V,Y,Q);a.fireEvent(J+"Event",{event:V,info:Y,group:Q})}if(a.events[W]){a[X](V,Y,Q);a.fireEvent(O,{event:V,info:Y,group:Q})}}else{for(var Z=0,T=Y.length;Z<T;++Z){if(a.events[J]){a[J](V,Y[Z].id,Q[0]);a.fireEvent(J+"Event",{event:V,info:Y[Z].id,group:Q[0]})}if(a.events[W]){a[X](V,Y[Z].id,Q[0]);a.fireEvent(O,{event:V,info:Y[Z].id,group:Q[0]})}}}}}},getBestMatch:function(E){var G=null;var D=E.length;if(D==1){G=E[0]}else{for(var F=0;F<D;++F){var C=E[F];if(this.mode==this.INTERSECT&&C.cursorIsOver){G=C;break}else{if(!G||!G.overlap||(C.overlap&&G.overlap.getArea()<C.overlap.getArea())){G=C}}}}return G},refreshCache:function(D){var F=D||this.ids;for(var C in F){if("string"!=typeof C){continue}for(var E in this.ids[C]){var G=this.ids[C][E];if(this.isTypeOfDD(G)){var H=this.getLocation(G);if(H){this.locationCache[G.id]=H}else{delete this.locationCache[G.id]}}}}},verifyEl:function(D){try{if(D){var C=D.offsetParent;if(C){return true}}}catch(E){}return false},getLocation:function(H){if(!this.isTypeOfDD(H)){return null}var F=H.getEl(),K,E,D,M,L,N,C,J,G;try{K=YAHOO.util.Dom.getXY(F)}catch(I){}if(!K){return null}E=K[0];D=E+F.offsetWidth;M=K[1];L=M+F.offsetHeight;N=M-H.padding[0];C=D+H.padding[1];J=L+H.padding[2];G=E-H.padding[3];return new YAHOO.util.Region(N,C,J,G)},isOverTarget:function(K,C,E,F){var G=this.locationCache[C.id];if(!G||!this.useCache){G=this.getLocation(C);this.locationCache[C.id]=G}if(!G){return false}C.cursorIsOver=G.contains(K);var J=this.dragCurrent;if(!J||(!E&&!J.constrainX&&!J.constrainY)){return C.cursorIsOver}C.overlap=null;if(!F){var H=J.getTargetCoord(K.x,K.y);var D=J.getDragEl();F=new YAHOO.util.Region(H.y,H.x+D.offsetWidth,H.y+D.offsetHeight,H.x)}var I=F.intersect(G);if(I){C.overlap=I;return(E)?true:C.cursorIsOver}else{return false}},_onUnload:function(D,C){this.unregAll()},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null}this._execOnAll("unreg",[]);this.ids={}},elementCache:{},getElWrapper:function(D){var C=this.elementCache[D];if(!C||!C.el){C=this.elementCache[D]=new this.ElementWrapper(YAHOO.util.Dom.get(D))}return C},getElement:function(C){return YAHOO.util.Dom.get(C)},getCss:function(D){var C=YAHOO.util.Dom.get(D);return(C)?C.style:null},ElementWrapper:function(C){this.el=C||null;this.id=this.el&&C.id;this.css=this.el&&C.style},getPosX:function(C){return YAHOO.util.Dom.getX(C)},getPosY:function(C){return YAHOO.util.Dom.getY(C)},swapNode:function(E,C){if(E.swapNode){E.swapNode(C)}else{var F=C.parentNode;var D=C.nextSibling;if(D==E){F.insertBefore(E,C)}else{if(C==E.nextSibling){F.insertBefore(C,E)}else{E.parentNode.replaceChild(C,E);F.insertBefore(E,D)}}}},getScroll:function(){var E,C,F=document.documentElement,D=document.body;if(F&&(F.scrollTop||F.scrollLeft)){E=F.scrollTop;C=F.scrollLeft}else{if(D){E=D.scrollTop;C=D.scrollLeft}else{}}return{top:E,left:C}},getStyle:function(D,C){return YAHOO.util.Dom.getStyle(D,C)},getScrollTop:function(){return this.getScroll().top},getScrollLeft:function(){return this.getScroll().left},moveToEl:function(C,E){var D=YAHOO.util.Dom.getXY(E);YAHOO.util.Dom.setXY(C,D)},getClientHeight:function(){return YAHOO.util.Dom.getViewportHeight()},getClientWidth:function(){return YAHOO.util.Dom.getViewportWidth()},numericSort:function(D,C){return(D-C)},_timeoutCount:0,_addListeners:function(){var C=YAHOO.util.DDM;if(YAHOO.util.Event&&document){C._onLoad()}else{if(C._timeoutCount>2000){}else{setTimeout(C._addListeners,10);if(document&&document.body){C._timeoutCount+=1}}}},handleWasClicked:function(C,E){if(this.isHandle(E,C.id)){return true}else{var D=C.parentNode;while(D){if(this.isHandle(E,D.id)){return true}else{D=D.parentNode}}}return false}}}();YAHOO.util.DDM=YAHOO.util.DragDropMgr;YAHOO.util.DDM._addListeners()}(function(){var A=YAHOO.util.Event;var B=YAHOO.util.Dom;YAHOO.util.DragDrop=function(E,C,D){if(E){this.init(E,C,D)}};YAHOO.util.DragDrop.prototype={events:null,on:function(){this.subscribe.apply(this,arguments)},id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true},unlock:function(){this.locked=false},isTarget:true,padding:null,dragOnly:false,useShim:false,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,deltaX:0,deltaY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,cursorIsOver:false,overlap:null,b4StartDrag:function(C,D){},startDrag:function(C,D){},b4Drag:function(C){},onDrag:function(C){},onDragEnter:function(C,D){},b4DragOver:function(C){},onDragOver:function(C,D){},b4DragOut:function(C){},onDragOut:function(C,D){},b4DragDrop:function(C){},onDragDrop:function(C,D){},onInvalidDrop:function(C){},b4EndDrag:function(C){},endDrag:function(C){},b4MouseDown:function(C){},onMouseDown:function(C){},onMouseUp:function(C){},onAvailable:function(){},getEl:function(){if(!this._domRef){this._domRef=B.get(this.id)}return this._domRef},getDragEl:function(){return B.get(this.dragElId)},init:function(F,C,D){this.initTarget(F,C,D);A.on(this._domRef||this.id,"mousedown",this.handleMouseDown,this,true);for(var E in this.events){this.createEvent(E+"Event")}},initTarget:function(E,C,D){this.config=D||{};this.events={};this.DDM=YAHOO.util.DDM;this.groups={};if(typeof E!=="string"){this._domRef=E;E=B.generateId(E)}this.id=E;this.addToGroup((C)?C:"default");this.handleElId=E;A.onAvailable(E,this.handleOnAvailable,this,true);this.setDragElId(E);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig()},applyConfig:function(){this.events={mouseDown:true,b4MouseDown:true,mouseUp:true,b4StartDrag:true,startDrag:true,b4EndDrag:true,endDrag:true,drag:true,b4Drag:true,invalidDrop:true,b4DragOut:true,dragOut:true,dragEnter:true,b4DragOver:true,dragOver:true,b4DragDrop:true,dragDrop:true};if(this.config.events){for(var C in this.config.events){if(this.config.events[C]===false){this.events[C]=false}}}this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false);this.dragOnly=((this.config.dragOnly===true)?true:false);this.useShim=((this.config.useShim===true)?true:false)},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable()},setPadding:function(E,C,F,D){if(!C&&0!==C){this.padding=[E,E,E,E]}else{if(!F&&0!==F){this.padding=[E,C,E,C]}else{this.padding=[E,C,F,D]}}},setInitPosition:function(F,E){var G=this.getEl();if(!this.DDM.verifyEl(G)){if(G&&G.style&&(G.style.display=="none")){}else{}return}var D=F||0;var C=E||0;var H=B.getXY(G);this.initPageX=H[0]-D;this.initPageY=H[1]-C;this.lastPageX=H[0];this.lastPageY=H[1];this.setStartPosition(H)},setStartPosition:function(D){var C=D||B.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=C[0];this.startPageY=C[1]},addToGroup:function(C){this.groups[C]=true;this.DDM.regDragDrop(this,C)},removeFromGroup:function(C){if(this.groups[C]){delete this.groups[C]}this.DDM.removeDDFromGroup(this,C)},setDragElId:function(C){this.dragElId=C},setHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C)}this.handleElId=C;this.DDM.regHandle(this.id,C)},setOuterHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C)}A.on(C,"mousedown",this.handleMouseDown,this,true);this.setHandleElId(C);this.hasOuterHandles=true},unreg:function(){A.removeListener(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this)},isLocked:function(){return(this.DDM.isLocked()||this.locked)},handleMouseDown:function(J,I){var D=J.which||J.button;if(this.primaryButtonOnly&&D>1){return}if(this.isLocked()){return}var C=this.b4MouseDown(J),F=true;if(this.events.b4MouseDown){F=this.fireEvent("b4MouseDownEvent",J)}var E=this.onMouseDown(J),H=true;if(this.events.mouseDown){H=this.fireEvent("mouseDownEvent",J)}if((C===false)||(E===false)||(F===false)||(H===false)){return}this.DDM.refreshCache(this.groups);var G=new YAHOO.util.Point(A.getPageX(J),A.getPageY(J));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(G,this)){}else{if(this.clickValidator(J)){this.setStartPosition();this.DDM.handleMouseDown(J,this);this.DDM.stopEvent(J)}else{}}},clickValidator:function(D){var C=YAHOO.util.Event.getTarget(D);return(this.isValidHandleChild(C)&&(this.id==this.handleElId||this.DDM.handleWasClicked(C,this.id)))},getTargetCoord:function(E,D){var C=E-this.deltaX;var F=D-this.deltaY;if(this.constrainX){if(C<this.minX){C=this.minX}if(C>this.maxX){C=this.maxX}}if(this.constrainY){if(F<this.minY){F=this.minY}if(F>this.maxY){F=this.maxY}}C=this.getTick(C,this.xTicks);F=this.getTick(F,this.yTicks);return{x:C,y:F}},addInvalidHandleType:function(C){var D=C.toUpperCase();this.invalidHandleTypes[D]=D},addInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C)}this.invalidHandleIds[C]=C},addInvalidHandleClass:function(C){this.invalidHandleClasses.push(C)},removeInvalidHandleType:function(C){var D=C.toUpperCase();delete this.invalidHandleTypes[D]},removeInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C)}delete this.invalidHandleIds[C]},removeInvalidHandleClass:function(D){for(var E=0,C=this.invalidHandleClasses.length;E<C;++E){if(this.invalidHandleClasses[E]==D){delete this.invalidHandleClasses[E]}}},isValidHandleChild:function(F){var E=true;var H;try{H=F.nodeName.toUpperCase()}catch(G){H=F.nodeName}E=E&&!this.invalidHandleTypes[H];E=E&&!this.invalidHandleIds[F.id];for(var D=0,C=this.invalidHandleClasses.length;E&&D<C;++D){E=!B.hasClass(F,this.invalidHandleClasses[D])}return E},setXTicks:function(F,C){this.xTicks=[];this.xTickSize=C;var E={};for(var D=this.initPageX;D>=this.minX;D=D-C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true}}for(D=this.initPageX;D<=this.maxX;D=D+C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true}}this.xTicks.sort(this.DDM.numericSort)},setYTicks:function(F,C){this.yTicks=[];this.yTickSize=C;var E={};for(var D=this.initPageY;D>=this.minY;D=D-C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true}}for(D=this.initPageY;D<=this.maxY;D=D+C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true}}this.yTicks.sort(this.DDM.numericSort)},setXConstraint:function(E,D,C){this.leftConstraint=parseInt(E,10);this.rightConstraint=parseInt(D,10);this.minX=this.initPageX-this.leftConstraint;this.maxX=this.initPageX+this.rightConstraint;if(C){this.setXTicks(this.initPageX,C)}this.constrainX=true},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks()},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0},setYConstraint:function(C,E,D){this.topConstraint=parseInt(C,10);this.bottomConstraint=parseInt(E,10);this.minY=this.initPageY-this.topConstraint;this.maxY=this.initPageY+this.bottomConstraint;if(D){this.setYTicks(this.initPageY,D)}this.constrainY=true},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var D=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var C=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(D,C)}else{this.setInitPosition()}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize)}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize)}},getTick:function(I,F){if(!F){return I}else{if(F[0]>=I){return F[0]}else{for(var D=0,C=F.length;D<C;++D){var E=D+1;if(F[E]&&F[E]>=I){var H=I-F[D];var G=F[E]-I;return(G>H)?F[D]:F[E]}}return F[F.length-1]}}},toString:function(){return("DragDrop "+this.id)}};YAHOO.augment(YAHOO.util.DragDrop,YAHOO.util.EventProvider)})();YAHOO.util.DD=function(C,A,B){if(C){this.init(C,A,B)}};YAHOO.extend(YAHOO.util.DD,YAHOO.util.DragDrop,{scroll:true,autoOffset:function(C,B){var A=C-this.startPageX;var D=B-this.startPageY;this.setDelta(A,D)},setDelta:function(B,A){this.deltaX=B;this.deltaY=A},setDragElPos:function(C,B){var A=this.getDragEl();this.alignElWithMouse(A,C,B)},alignElWithMouse:function(C,G,F){var E=this.getTargetCoord(G,F);if(!this.deltaSetXY){var H=[E.x,E.y];YAHOO.util.Dom.setXY(C,H);var D=parseInt(YAHOO.util.Dom.getStyle(C,"left"),10);var B=parseInt(YAHOO.util.Dom.getStyle(C,"top"),10);this.deltaSetXY=[D-E.x,B-E.y]}else{YAHOO.util.Dom.setStyle(C,"left",(E.x+this.deltaSetXY[0])+"px");YAHOO.util.Dom.setStyle(C,"top",(E.y+this.deltaSetXY[1])+"px")}this.cachePosition(E.x,E.y);var A=this;setTimeout(function(){A.autoScroll.call(A,E.x,E.y,C.offsetHeight,C.offsetWidth)},0)},cachePosition:function(B,A){if(B){this.lastPageX=B;this.lastPageY=A}else{var C=YAHOO.util.Dom.getXY(this.getEl());this.lastPageX=C[0];this.lastPageY=C[1]}},autoScroll:function(J,I,E,K){if(this.scroll){var L=this.DDM.getClientHeight();var B=this.DDM.getClientWidth();var N=this.DDM.getScrollTop();var D=this.DDM.getScrollLeft();var H=E+I;var M=K+J;var G=(L+N-I-this.deltaY);var F=(B+D-J-this.deltaX);var C=40;var A=(document.all)?80:30;if(H>L&&G<C){window.scrollTo(D,N+A)}if(I<N&&N>0&&I-N<C){window.scrollTo(D,N-A)}if(M>B&&F<C){window.scrollTo(D+A,N)}if(J<D&&D>0&&J-D<C){window.scrollTo(D-A,N)}}},applyConfig:function(){YAHOO.util.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false)},b4MouseDown:function(A){this.setStartPosition();this.autoOffset(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A))},b4Drag:function(A){this.setDragElPos(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A))},toString:function(){return("DD "+this.id)}});YAHOO.util.DDProxy=function(C,A,B){if(C){this.init(C,A,B);this.initFrame()}};YAHOO.util.DDProxy.dragElId="ygddfdiv";YAHOO.extend(YAHOO.util.DDProxy,YAHOO.util.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var B=this,A=document.body;if(!A||!A.firstChild){setTimeout(function(){B.createFrame()},50);return}var F=this.getDragEl(),E=YAHOO.util.Dom;if(!F){F=document.createElement("div");F.id=this.dragElId;var D=F.style;D.position="absolute";D.visibility="hidden";D.cursor="move";D.border="2px solid #aaa";D.zIndex=999;D.height="25px";D.width="25px";var C=document.createElement("div");E.setStyle(C,"height","100%");E.setStyle(C,"width","100%");E.setStyle(C,"background-color","#ccc");E.setStyle(C,"opacity","0");F.appendChild(C);A.insertBefore(F,A.firstChild)}},initFrame:function(){this.createFrame()},applyConfig:function(){YAHOO.util.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||YAHOO.util.DDProxy.dragElId)},showFrame:function(E,D){var C=this.getEl();var A=this.getDragEl();var B=A.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(B.width,10)/2),Math.round(parseInt(B.height,10)/2))}this.setDragElPos(E,D);YAHOO.util.Dom.setStyle(A,"visibility","visible")},_resizeProxy:function(){if(this.resizeFrame){var H=YAHOO.util.Dom;var B=this.getEl();var C=this.getDragEl();var G=parseInt(H.getStyle(C,"borderTopWidth"),10);var I=parseInt(H.getStyle(C,"borderRightWidth"),10);var F=parseInt(H.getStyle(C,"borderBottomWidth"),10);var D=parseInt(H.getStyle(C,"borderLeftWidth"),10);if(isNaN(G)){G=0}if(isNaN(I)){I=0}if(isNaN(F)){F=0}if(isNaN(D)){D=0}var E=Math.max(0,B.offsetWidth-I-D);var A=Math.max(0,B.offsetHeight-G-F);H.setStyle(C,"width",E+"px");H.setStyle(C,"height",A+"px")}},b4MouseDown:function(B){this.setStartPosition();var A=YAHOO.util.Event.getPageX(B);var C=YAHOO.util.Event.getPageY(B);this.autoOffset(A,C)},b4StartDrag:function(A,B){this.showFrame(A,B)},b4EndDrag:function(A){YAHOO.util.Dom.setStyle(this.getDragEl(),"visibility","hidden")},endDrag:function(D){var C=YAHOO.util.Dom;var B=this.getEl();var A=this.getDragEl();C.setStyle(A,"visibility","");C.setStyle(B,"visibility","hidden");YAHOO.util.DDM.moveToEl(B,A);C.setStyle(A,"visibility","hidden");C.setStyle(B,"visibility","")},toString:function(){return("DDProxy "+this.id)}});YAHOO.util.DDTarget=function(C,A,B){if(C){this.initTarget(C,A,B)}};YAHOO.extend(YAHOO.util.DDTarget,YAHOO.util.DragDrop,{toString:function(){return("DDTarget "+this.id)}});YAHOO.register("dragdrop",YAHOO.util.DragDropMgr,{version:"2.7.0",build:"1799"});YAHOO.util.Attribute=function(B,A){if(A){this.owner=A;this.configure(B,true)}};YAHOO.util.Attribute.prototype={name:undefined,value:null,owner:null,readOnly:false,writeOnce:false,_initialConfig:null,_written:false,method:null,setter:null,getter:null,validator:null,getValue:function(){var A=this.value;if(this.getter){A=this.getter.call(this.owner,this.name)}return A},setValue:function(F,B){var E,A=this.owner,C=this.name;var D={type:C,prevValue:this.getValue(),newValue:F};if(this.readOnly||(this.writeOnce&&this._written)){return false}if(this.validator&&!this.validator.call(A,F)){return false}if(!B){E=A.fireBeforeChangeEvent(D);if(E===false){return false}}if(this.setter){F=this.setter.call(A,F,this.name);if(F===undefined){}}if(this.method){this.method.call(A,F,this.name)}this.value=F;this._written=true;D.type=C;if(!B){this.owner.fireChangeEvent(D)}return true},configure:function(B,C){B=B||{};if(C){this._written=false}this._initialConfig=this._initialConfig||{};for(var A in B){if(B.hasOwnProperty(A)){this[A]=B[A];if(C){this._initialConfig[A]=B[A]}}}},resetValue:function(){return this.setValue(this._initialConfig.value)},resetConfig:function(){this.configure(this._initialConfig,true)},refresh:function(A){this.setValue(this.value,A)}};(function(){var A=YAHOO.util.Lang;YAHOO.util.AttributeProvider=function(){};YAHOO.util.AttributeProvider.prototype={_configs:null,get:function(C){this._configs=this._configs||{};var B=this._configs[C];if(!B||!this._configs.hasOwnProperty(C)){return null}return B.getValue()},set:function(D,E,B){this._configs=this._configs||{};var C=this._configs[D];if(!C){return false}return C.setValue(E,B)},getAttributeKeys:function(){this._configs=this._configs;var C=[],B;for(B in this._configs){if(A.hasOwnProperty(this._configs,B)&&!A.isUndefined(this._configs[B])){C[C.length]=B}}return C},setAttributes:function(D,B){for(var C in D){if(A.hasOwnProperty(D,C)){this.set(C,D[C],B)}}},resetValue:function(C,B){this._configs=this._configs||{};if(this._configs[C]){this.set(C,this._configs[C]._initialConfig.value,B);return true}return false},refresh:function(E,C){this._configs=this._configs||{};var F=this._configs;E=((A.isString(E))?[E]:E)||this.getAttributeKeys();for(var D=0,B=E.length;D<B;++D){if(F.hasOwnProperty(E[D])){this._configs[E[D]].refresh(C)}}},register:function(B,C){this.setAttributeConfig(B,C)},getAttributeConfig:function(C){this._configs=this._configs||{};var B=this._configs[C]||{};var D={};for(C in B){if(A.hasOwnProperty(B,C)){D[C]=B[C]}}return D},setAttributeConfig:function(B,C,D){this._configs=this._configs||{};C=C||{};if(!this._configs[B]){C.name=B;this._configs[B]=this.createAttribute(C)}else{this._configs[B].configure(C,D)}},configureAttribute:function(B,C,D){this.setAttributeConfig(B,C,D)},resetAttributeConfig:function(B){this._configs=this._configs||{};this._configs[B].resetConfig()},subscribe:function(B,C){this._events=this._events||{};if(!(B in this._events)){this._events[B]=this.createEvent(B)}YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments)},on:function(){this.subscribe.apply(this,arguments)},addListener:function(){this.subscribe.apply(this,arguments)},fireBeforeChangeEvent:function(C){var B="before";B+=C.type.charAt(0).toUpperCase()+C.type.substr(1)+"Change";C.type=B;return this.fireEvent(C.type,C)},fireChangeEvent:function(B){B.type+="Change";return this.fireEvent(B.type,B)},createAttribute:function(B){return new YAHOO.util.Attribute(B,this)}};YAHOO.augment(YAHOO.util.AttributeProvider,YAHOO.util.EventProvider)})();(function(){var B=YAHOO.util.Dom,C=YAHOO.util.AttributeProvider;var A=function(D,E){this.init.apply(this,arguments)};A.DOM_EVENTS={"click":true,"dblclick":true,"keydown":true,"keypress":true,"keyup":true,"mousedown":true,"mousemove":true,"mouseout":true,"mouseover":true,"mouseup":true,"focus":true,"blur":true,"submit":true,"change":true};A.prototype={DOM_EVENTS:null,DEFAULT_HTML_SETTER:function(F,D){var E=this.get("element");if(E){E[D]=F}},DEFAULT_HTML_GETTER:function(D){var E=this.get("element"),F;if(E){F=E[D]}return F},appendChild:function(D){D=D.get?D.get("element"):D;return this.get("element").appendChild(D)},getElementsByTagName:function(D){return this.get("element").getElementsByTagName(D)},hasChildNodes:function(){return this.get("element").hasChildNodes()},insertBefore:function(D,E){D=D.get?D.get("element"):D;E=(E&&E.get)?E.get("element"):E;return this.get("element").insertBefore(D,E)},removeChild:function(D){D=D.get?D.get("element"):D;return this.get("element").removeChild(D)},replaceChild:function(D,E){D=D.get?D.get("element"):D;E=E.get?E.get("element"):E;return this.get("element").replaceChild(D,E)},initAttributes:function(D){},addListener:function(H,G,I,F){var E=this.get("element")||this.get("id");F=F||this;var D=this;if(!this._events[H]){if(E&&this.DOM_EVENTS[H]){YAHOO.util.Event.addListener(E,H,function(J){if(J.srcElement&&!J.target){J.target=J.srcElement}D.fireEvent(H,J)},I,F)}this.createEvent(H,this)}return YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments)},on:function(){return this.addListener.apply(this,arguments)},subscribe:function(){return this.addListener.apply(this,arguments)},removeListener:function(E,D){return this.unsubscribe.apply(this,arguments)},addClass:function(D){B.addClass(this.get("element"),D)},getElementsByClassName:function(E,D){return B.getElementsByClassName(E,D,this.get("element"))},hasClass:function(D){return B.hasClass(this.get("element"),D)},removeClass:function(D){return B.removeClass(this.get("element"),D)},replaceClass:function(E,D){return B.replaceClass(this.get("element"),E,D)},setStyle:function(E,D){return B.setStyle(this.get("element"),E,D)},getStyle:function(D){return B.getStyle(this.get("element"),D)},fireQueue:function(){var E=this._queue;for(var F=0,D=E.length;F<D;++F){this[E[F][0]].apply(this,E[F][1])}},appendTo:function(E,F){E=(E.get)?E.get("element"):B.get(E);this.fireEvent("beforeAppendTo",{type:"beforeAppendTo",target:E});F=(F&&F.get)?F.get("element"):B.get(F);var D=this.get("element");if(!D){return false}if(!E){return false}if(D.parent!=E){if(F){E.insertBefore(D,F)}else{E.appendChild(D)}}this.fireEvent("appendTo",{type:"appendTo",target:E});return D},get:function(D){var F=this._configs||{},E=F.element;if(E&&!F[D]&&!YAHOO.lang.isUndefined(E.value[D])){this._setHTMLAttrConfig(D)}return C.prototype.get.call(this,D)},setAttributes:function(J,G){var E={},H=this._configOrder;for(var I=0,D=H.length;I<D;++I){if(J[H[I]]!==undefined){E[H[I]]=true;this.set(H[I],J[H[I]],G)}}for(var F in J){if(J.hasOwnProperty(F)&&!E[F]){this.set(F,J[F],G)}}},set:function(E,G,D){var F=this.get("element");if(!F){this._queue[this._queue.length]=["set",arguments];if(this._configs[E]){this._configs[E].value=G}return}if(!this._configs[E]&&!YAHOO.lang.isUndefined(F[E])){this._setHTMLAttrConfig(E)}return C.prototype.set.apply(this,arguments)},setAttributeConfig:function(D,E,F){this._configOrder.push(D);C.prototype.setAttributeConfig.apply(this,arguments)},createEvent:function(E,D){this._events[E]=true;return C.prototype.createEvent.apply(this,arguments)},init:function(E,D){this._initElement(E,D)},destroy:function(){var D=this.get("element");YAHOO.util.Event.purgeElement(D,true);this.unsubscribeAll();if(D&&D.parentNode){D.parentNode.removeChild(D)}this._queue=[];this._events={};this._configs={};this._configOrder=[]},_initElement:function(F,E){this._queue=this._queue||[];this._events=this._events||{};this._configs=this._configs||{};this._configOrder=[];E=E||{};E.element=E.element||F||null;var H=false;var D=A.DOM_EVENTS;this.DOM_EVENTS=this.DOM_EVENTS||{};for(var G in D){if(D.hasOwnProperty(G)){this.DOM_EVENTS[G]=D[G]}}if(typeof E.element==="string"){this._setHTMLAttrConfig("id",{value:E.element})}if(B.get(E.element)){H=true;this._initHTMLElement(E);this._initContent(E)}YAHOO.util.Event.onAvailable(E.element,function(){if(!H){this._initHTMLElement(E)}this.fireEvent("available",{type:"available",target:B.get(E.element)})},this,true);YAHOO.util.Event.onContentReady(E.element,function(){if(!H){this._initContent(E)}this.fireEvent("contentReady",{type:"contentReady",target:B.get(E.element)})},this,true)},_initHTMLElement:function(D){this.setAttributeConfig("element",{value:B.get(D.element),readOnly:true})},_initContent:function(D){this.initAttributes(D);this.setAttributes(D,true);this.fireQueue()},_setHTMLAttrConfig:function(D,F){var E=this.get("element");F=F||{};F.name=D;F.setter=F.setter||this.DEFAULT_HTML_SETTER;F.getter=F.getter||this.DEFAULT_HTML_GETTER;F.value=F.value||E[D];this._configs[D]=new YAHOO.util.Attribute(F,this)}};YAHOO.augment(A,C);YAHOO.util.Element=A})();YAHOO.register("element",YAHOO.util.Element,{version:"2.7.0",build:"1799"});YAHOO.register("utilities",YAHOO,{version:"2.7.0",build:"1799"});
243   -(function(){YAHOO.util.Config=function(owner){if(owner){this.init(owner)}};var Lang=YAHOO.lang,CustomEvent=YAHOO.util.CustomEvent,Config=YAHOO.util.Config;Config.CONFIG_CHANGED_EVENT="configChanged";Config.BOOLEAN_TYPE="boolean";Config.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(owner){this.owner=owner;this.configChangedEvent=this.createEvent(Config.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=CustomEvent.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[]},checkBoolean:function(val){return(typeof val==Config.BOOLEAN_TYPE)},checkNumber:function(val){return(!isNaN(val))},fireEvent:function(key,value){var property=this.config[key];if(property&&property.event){property.event.fire(value)}},addProperty:function(key,propertyObject){key=key.toLowerCase();this.config[key]=propertyObject;propertyObject.event=this.createEvent(key,{scope:this.owner});propertyObject.event.signature=CustomEvent.LIST;propertyObject.key=key;if(propertyObject.handler){propertyObject.event.subscribe(propertyObject.handler,this.owner)}this.setProperty(key,propertyObject.value,true);if(!propertyObject.suppressEvent){this.queueProperty(key,propertyObject.value)}},getConfig:function(){var cfg={},currCfg=this.config,prop,property;for(prop in currCfg){if(Lang.hasOwnProperty(currCfg,prop)){property=currCfg[prop];if(property&&property.event){cfg[prop]=property.value}}}return cfg},getProperty:function(key){var property=this.config[key.toLowerCase()];if(property&&property.event){return property.value}else{return undefined}},resetProperty:function(key){key=key.toLowerCase();var property=this.config[key];if(property&&property.event){if(this.initialConfig[key]&&!Lang.isUndefined(this.initialConfig[key])){this.setProperty(key,this.initialConfig[key]);return true}}else{return false}},setProperty:function(key,value,silent){var property;key=key.toLowerCase();if(this.queueInProgress&&!silent){this.queueProperty(key,value);return true}else{property=this.config[key];if(property&&property.event){if(property.validator&&!property.validator(value)){return false}else{property.value=value;if(!silent){this.fireEvent(key,value);this.configChangedEvent.fire([key,value])}return true}}else{return false}}},queueProperty:function(key,value){key=key.toLowerCase();var property=this.config[key],foundDuplicate=false,iLen,queueItem,queueItemKey,queueItemValue,sLen,supercedesCheck,qLen,queueItemCheck,queueItemCheckKey,queueItemCheckValue,i,s,q;if(property&&property.event){if(!Lang.isUndefined(value)&&property.validator&&!property.validator(value)){return false}else{if(!Lang.isUndefined(value)){property.value=value}else{value=property.value}foundDuplicate=false;iLen=this.eventQueue.length;for(i=0;i<iLen;i++){queueItem=this.eventQueue[i];if(queueItem){queueItemKey=queueItem[0];queueItemValue=queueItem[1];if(queueItemKey==key){this.eventQueue[i]=null;this.eventQueue.push([key,(!Lang.isUndefined(value)?value:queueItemValue)]);foundDuplicate=true;break}}}if(!foundDuplicate&&!Lang.isUndefined(value)){this.eventQueue.push([key,value])}}if(property.supercedes){sLen=property.supercedes.length;for(s=0;s<sLen;s++){supercedesCheck=property.supercedes[s];qLen=this.eventQueue.length;for(q=0;q<qLen;q++){queueItemCheck=this.eventQueue[q];if(queueItemCheck){queueItemCheckKey=queueItemCheck[0];queueItemCheckValue=queueItemCheck[1];if(queueItemCheckKey==supercedesCheck.toLowerCase()){this.eventQueue.push([queueItemCheckKey,queueItemCheckValue]);this.eventQueue[q]=null;break}}}}}return true}else{return false}},refireEvent:function(key){key=key.toLowerCase();var property=this.config[key];if(property&&property.event&&!Lang.isUndefined(property.value)){if(this.queueInProgress){this.queueProperty(key)}else{this.fireEvent(key,property.value)}}},applyConfig:function(userConfig,init){var sKey,oConfig;if(init){oConfig={};for(sKey in userConfig){if(Lang.hasOwnProperty(userConfig,sKey)){oConfig[sKey.toLowerCase()]=userConfig[sKey]}}this.initialConfig=oConfig}for(sKey in userConfig){if(Lang.hasOwnProperty(userConfig,sKey)){this.queueProperty(sKey,userConfig[sKey])}}},refresh:function(){var prop;for(prop in this.config){if(Lang.hasOwnProperty(this.config,prop)){this.refireEvent(prop)}}},fireQueue:function(){var i,queueItem,key,value,property;this.queueInProgress=true;for(i=0;i<this.eventQueue.length;i++){queueItem=this.eventQueue[i];if(queueItem){key=queueItem[0];value=queueItem[1];property=this.config[key];property.value=value;this.eventQueue[i]=null;this.fireEvent(key,value)}}this.queueInProgress=false;this.eventQueue=[]},subscribeToConfigEvent:function(key,handler,obj,override){var property=this.config[key.toLowerCase()];if(property&&property.event){if(!Config.alreadySubscribed(property.event,handler,obj)){property.event.subscribe(handler,obj,override)}return true}else{return false}},unsubscribeFromConfigEvent:function(key,handler,obj){var property=this.config[key.toLowerCase()];if(property&&property.event){return property.event.unsubscribe(handler,obj)}else{return false}},toString:function(){var output="Config";if(this.owner){output+=" ["+this.owner.toString()+"]"}return output},outputEventQueue:function(){var output="",queueItem,q,nQueue=this.eventQueue.length;for(q=0;q<nQueue;q++){queueItem=this.eventQueue[q];if(queueItem){output+=queueItem[0]+"="+queueItem[1]+", "}}return output},destroy:function(){var oConfig=this.config,sProperty,oProperty;for(sProperty in oConfig){if(Lang.hasOwnProperty(oConfig,sProperty)){oProperty=oConfig[sProperty];oProperty.event.unsubscribeAll();oProperty.event=null}}this.configChangedEvent.unsubscribeAll();this.configChangedEvent=null;this.owner=null;this.config=null;this.initialConfig=null;this.eventQueue=null}};Config.alreadySubscribed=function(evt,fn,obj){var nSubscribers=evt.subscribers.length,subsc,i;if(nSubscribers>0){i=nSubscribers-1;do{subsc=evt.subscribers[i];if(subsc&&subsc.obj==obj&&subsc.fn==fn){return true}}while(i--)}return false};YAHOO.lang.augmentProto(Config,YAHOO.util.EventProvider)}());(function(){YAHOO.widget.Module=function(el,userConfig){if(el){this.init(el,userConfig)}else{}};var Dom=YAHOO.util.Dom,Config=YAHOO.util.Config,Event=YAHOO.util.Event,CustomEvent=YAHOO.util.CustomEvent,Module=YAHOO.widget.Module,UA=YAHOO.env.ua,m_oModuleTemplate,m_oHeaderTemplate,m_oBodyTemplate,m_oFooterTemplate,EVENT_TYPES={"BEFORE_INIT":"beforeInit","INIT":"init","APPEND":"append","BEFORE_RENDER":"beforeRender","RENDER":"render","CHANGE_HEADER":"changeHeader","CHANGE_BODY":"changeBody","CHANGE_FOOTER":"changeFooter","CHANGE_CONTENT":"changeContent","DESTORY":"destroy","BEFORE_SHOW":"beforeShow","SHOW":"show","BEFORE_HIDE":"beforeHide","HIDE":"hide"},DEFAULT_CONFIG={"VISIBLE":{key:"visible",value:true,validator:YAHOO.lang.isBoolean},"EFFECT":{key:"effect",suppressEvent:true,supercedes:["visible"]},"MONITOR_RESIZE":{key:"monitorresize",value:true},"APPEND_TO_DOCUMENT_BODY":{key:"appendtodocumentbody",value:false}};Module.IMG_ROOT=null;Module.IMG_ROOT_SSL=null;Module.CSS_MODULE="yui-module";Module.CSS_HEADER="hd";Module.CSS_BODY="bd";Module.CSS_FOOTER="ft";Module.RESIZE_MONITOR_SECURE_URL="javascript:false;";Module.RESIZE_MONITOR_BUFFER=1;Module.textResizeEvent=new CustomEvent("textResize");Module.forceDocumentRedraw=function(){var docEl=document.documentElement;if(docEl){docEl.className+=" ";docEl.className=YAHOO.lang.trim(docEl.className)}};function createModuleTemplate(){if(!m_oModuleTemplate){m_oModuleTemplate=document.createElement("div");m_oModuleTemplate.innerHTML=("<div class=\""+Module.CSS_HEADER+"\"></div>"+"<div class=\""+Module.CSS_BODY+"\"></div><div class=\""+Module.CSS_FOOTER+"\"></div>");m_oHeaderTemplate=m_oModuleTemplate.firstChild;m_oBodyTemplate=m_oHeaderTemplate.nextSibling;m_oFooterTemplate=m_oBodyTemplate.nextSibling}return m_oModuleTemplate}function createHeader(){if(!m_oHeaderTemplate){createModuleTemplate()}return(m_oHeaderTemplate.cloneNode(false))}function createBody(){if(!m_oBodyTemplate){createModuleTemplate()}return(m_oBodyTemplate.cloneNode(false))}function createFooter(){if(!m_oFooterTemplate){createModuleTemplate()}return(m_oFooterTemplate.cloneNode(false))}Module.prototype={constructor:Module,element:null,header:null,body:null,footer:null,id:null,imageRoot:Module.IMG_ROOT,initEvents:function(){var SIGNATURE=CustomEvent.LIST;this.beforeInitEvent=this.createEvent(EVENT_TYPES.BEFORE_INIT);this.beforeInitEvent.signature=SIGNATURE;this.initEvent=this.createEvent(EVENT_TYPES.INIT);this.initEvent.signature=SIGNATURE;this.appendEvent=this.createEvent(EVENT_TYPES.APPEND);this.appendEvent.signature=SIGNATURE;this.beforeRenderEvent=this.createEvent(EVENT_TYPES.BEFORE_RENDER);this.beforeRenderEvent.signature=SIGNATURE;this.renderEvent=this.createEvent(EVENT_TYPES.RENDER);this.renderEvent.signature=SIGNATURE;this.changeHeaderEvent=this.createEvent(EVENT_TYPES.CHANGE_HEADER);this.changeHeaderEvent.signature=SIGNATURE;this.changeBodyEvent=this.createEvent(EVENT_TYPES.CHANGE_BODY);this.changeBodyEvent.signature=SIGNATURE;this.changeFooterEvent=this.createEvent(EVENT_TYPES.CHANGE_FOOTER);this.changeFooterEvent.signature=SIGNATURE;this.changeContentEvent=this.createEvent(EVENT_TYPES.CHANGE_CONTENT);this.changeContentEvent.signature=SIGNATURE;this.destroyEvent=this.createEvent(EVENT_TYPES.DESTORY);this.destroyEvent.signature=SIGNATURE;this.beforeShowEvent=this.createEvent(EVENT_TYPES.BEFORE_SHOW);this.beforeShowEvent.signature=SIGNATURE;this.showEvent=this.createEvent(EVENT_TYPES.SHOW);this.showEvent.signature=SIGNATURE;this.beforeHideEvent=this.createEvent(EVENT_TYPES.BEFORE_HIDE);this.beforeHideEvent.signature=SIGNATURE;this.hideEvent=this.createEvent(EVENT_TYPES.HIDE);this.hideEvent.signature=SIGNATURE},platform:function(){var ua=navigator.userAgent.toLowerCase();if(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1){return"windows"}else if(ua.indexOf("macintosh")!=-1){return"mac"}else{return false}}(),browser:function(){var ua=navigator.userAgent.toLowerCase();if(ua.indexOf('opera')!=-1){return'opera'}else if(ua.indexOf('msie 7')!=-1){return'ie7'}else if(ua.indexOf('msie')!=-1){return'ie'}else if(ua.indexOf('safari')!=-1){return'safari'}else if(ua.indexOf('gecko')!=-1){return'gecko'}else{return false}}(),isSecure:function(){if(window.location.href.toLowerCase().indexOf("https")===0){return true}else{return false}}(),initDefaultConfig:function(){this.cfg.addProperty(DEFAULT_CONFIG.VISIBLE.key,{handler:this.configVisible,value:DEFAULT_CONFIG.VISIBLE.value,validator:DEFAULT_CONFIG.VISIBLE.validator});this.cfg.addProperty(DEFAULT_CONFIG.EFFECT.key,{suppressEvent:DEFAULT_CONFIG.EFFECT.suppressEvent,supercedes:DEFAULT_CONFIG.EFFECT.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.MONITOR_RESIZE.key,{handler:this.configMonitorResize,value:DEFAULT_CONFIG.MONITOR_RESIZE.value});this.cfg.addProperty(DEFAULT_CONFIG.APPEND_TO_DOCUMENT_BODY.key,{value:DEFAULT_CONFIG.APPEND_TO_DOCUMENT_BODY.value})},init:function(el,userConfig){var elId,child;this.initEvents();this.beforeInitEvent.fire(Module);this.cfg=new Config(this);if(this.isSecure){this.imageRoot=Module.IMG_ROOT_SSL}if(typeof el=="string"){elId=el;el=document.getElementById(el);if(!el){el=(createModuleTemplate()).cloneNode(false);el.id=elId}}this.id=Dom.generateId(el);this.element=el;child=this.element.firstChild;if(child){var fndHd=false,fndBd=false,fndFt=false;do{if(1==child.nodeType){if(!fndHd&&Dom.hasClass(child,Module.CSS_HEADER)){this.header=child;fndHd=true}else if(!fndBd&&Dom.hasClass(child,Module.CSS_BODY)){this.body=child;fndBd=true}else if(!fndFt&&Dom.hasClass(child,Module.CSS_FOOTER)){this.footer=child;fndFt=true}}}while((child=child.nextSibling))}this.initDefaultConfig();Dom.addClass(this.element,Module.CSS_MODULE);if(userConfig){this.cfg.applyConfig(userConfig,true)}if(!Config.alreadySubscribed(this.renderEvent,this.cfg.fireQueue,this.cfg)){this.renderEvent.subscribe(this.cfg.fireQueue,this.cfg,true)}this.initEvent.fire(Module)},initResizeMonitor:function(){var isGeckoWin=(UA.gecko&&this.platform=="windows");if(isGeckoWin){var self=this;setTimeout(function(){self._initResizeMonitor()},0)}else{this._initResizeMonitor()}},_initResizeMonitor:function(){return;var oDoc,oIFrame,sHTML;function fireTextResize(){Module.textResizeEvent.fire()}if(!UA.opera){oIFrame=Dom.get("_yuiResizeMonitor");var supportsCWResize=this._supportsCWResize();if(!oIFrame){oIFrame=document.createElement("iframe");if(this.isSecure&&Module.RESIZE_MONITOR_SECURE_URL&&UA.ie){oIFrame.src=Module.RESIZE_MONITOR_SECURE_URL}if(!supportsCWResize){sHTML=["<html><head><script ","type=\"text/javascript\">","window.onresize=function(){window.parent.","YAHOO.widget.Module.textResizeEvent.","fire();};<","\/script></head>","<body></body></html>"].join('');oIFrame.src="data:text/html;charset=utf-8,"+encodeURIComponent(sHTML)}oIFrame.id="_yuiResizeMonitor";oIFrame.title="Text Resize Monitor";oIFrame.style.position="absolute";oIFrame.style.visibility="hidden";var db=document.body,fc=db.firstChild;if(fc){db.insertBefore(oIFrame,fc)}else{db.appendChild(oIFrame)}oIFrame.style.width="2em";oIFrame.style.height="2em";oIFrame.style.top=(-1*(oIFrame.offsetHeight+Module.RESIZE_MONITOR_BUFFER))+"px";oIFrame.style.left="0";oIFrame.style.borderWidth="0";oIFrame.style.visibility="visible";if(UA.webkit){oDoc=oIFrame.contentWindow.document;oDoc.open();oDoc.close()}}if(oIFrame&&oIFrame.contentWindow){Module.textResizeEvent.subscribe(this.onDomResize,this,true);if(!Module.textResizeInitialized){if(supportsCWResize){if(!Event.on(oIFrame.contentWindow,"resize",fireTextResize)){Event.on(oIFrame,"resize",fireTextResize)}}Module.textResizeInitialized=true}this.resizeMonitor=oIFrame}}},_supportsCWResize:function(){var bSupported=true;if(UA.gecko&&UA.gecko<=1.8){bSupported=false}return bSupported},onDomResize:function(e,obj){var nTop=-1*(this.resizeMonitor.offsetHeight+Module.RESIZE_MONITOR_BUFFER);this.resizeMonitor.style.top=nTop+"px";this.resizeMonitor.style.left="0"},setHeader:function(headerContent){var oHeader=this.header||(this.header=createHeader());if(headerContent.nodeName){oHeader.innerHTML="";oHeader.appendChild(headerContent)}else{oHeader.innerHTML=headerContent}this.changeHeaderEvent.fire(headerContent);this.changeContentEvent.fire()},appendToHeader:function(element){var oHeader=this.header||(this.header=createHeader());oHeader.appendChild(element);this.changeHeaderEvent.fire(element);this.changeContentEvent.fire()},setBody:function(bodyContent){var oBody=this.body||(this.body=createBody());if(bodyContent.nodeName){oBody.innerHTML="";oBody.appendChild(bodyContent)}else{oBody.innerHTML=bodyContent}this.changeBodyEvent.fire(bodyContent);this.changeContentEvent.fire()},appendToBody:function(element){var oBody=this.body||(this.body=createBody());oBody.appendChild(element);this.changeBodyEvent.fire(element);this.changeContentEvent.fire()},setFooter:function(footerContent){var oFooter=this.footer||(this.footer=createFooter());if(footerContent.nodeName){oFooter.innerHTML="";oFooter.appendChild(footerContent)}else{oFooter.innerHTML=footerContent}this.changeFooterEvent.fire(footerContent);this.changeContentEvent.fire()},appendToFooter:function(element){var oFooter=this.footer||(this.footer=createFooter());oFooter.appendChild(element);this.changeFooterEvent.fire(element);this.changeContentEvent.fire()},render:function(appendToNode,moduleElement){var me=this,firstChild;function appendTo(parentNode){if(typeof parentNode=="string"){parentNode=document.getElementById(parentNode)}if(parentNode){me._addToParent(parentNode,me.element);me.appendEvent.fire()}}this.beforeRenderEvent.fire();if(!moduleElement){moduleElement=this.element}if(appendToNode){appendTo(appendToNode)}else{if(!Dom.inDocument(this.element)){return false}}if(this.header&&!Dom.inDocument(this.header)){firstChild=moduleElement.firstChild;if(firstChild){moduleElement.insertBefore(this.header,firstChild)}else{moduleElement.appendChild(this.header)}}if(this.body&&!Dom.inDocument(this.body)){if(this.footer&&Dom.isAncestor(this.moduleElement,this.footer)){moduleElement.insertBefore(this.body,this.footer)}else{moduleElement.appendChild(this.body)}}if(this.footer&&!Dom.inDocument(this.footer)){moduleElement.appendChild(this.footer)}this.renderEvent.fire();return true},destroy:function(){var parent;if(this.element){Event.purgeElement(this.element,true);parent=this.element.parentNode}if(parent){parent.removeChild(this.element)}this.element=null;this.header=null;this.body=null;this.footer=null;Module.textResizeEvent.unsubscribe(this.onDomResize,this);this.cfg.destroy();this.cfg=null;this.destroyEvent.fire()},show:function(){this.cfg.setProperty("visible",true)},hide:function(){this.cfg.setProperty("visible",false)},configVisible:function(type,args,obj){var visible=args[0];if(visible){this.beforeShowEvent.fire();Dom.setStyle(this.element,"display","block");this.showEvent.fire()}else{this.beforeHideEvent.fire();Dom.setStyle(this.element,"display","none");this.hideEvent.fire()}},configMonitorResize:function(type,args,obj){var monitor=args[0];if(monitor){this.initResizeMonitor()}else{Module.textResizeEvent.unsubscribe(this.onDomResize,this,true);this.resizeMonitor=null}},_addToParent:function(parentNode,element){if(!this.cfg.getProperty("appendtodocumentbody")&&parentNode===document.body&&parentNode.firstChild){parentNode.insertBefore(element,parentNode.firstChild)}else{parentNode.appendChild(element)}},toString:function(){return"Module "+this.id}};YAHOO.lang.augmentProto(Module,YAHOO.util.EventProvider)}());(function(){YAHOO.widget.Overlay=function(el,userConfig){YAHOO.widget.Overlay.superclass.constructor.call(this,el,userConfig)};var Lang=YAHOO.lang,CustomEvent=YAHOO.util.CustomEvent,Module=YAHOO.widget.Module,Event=YAHOO.util.Event,Dom=YAHOO.util.Dom,Config=YAHOO.util.Config,UA=YAHOO.env.ua,Overlay=YAHOO.widget.Overlay,_SUBSCRIBE="subscribe",_UNSUBSCRIBE="unsubscribe",_CONTAINED="contained",m_oIFrameTemplate,EVENT_TYPES={"BEFORE_MOVE":"beforeMove","MOVE":"move"},DEFAULT_CONFIG={"X":{key:"x",validator:Lang.isNumber,suppressEvent:true,supercedes:["iframe"]},"Y":{key:"y",validator:Lang.isNumber,suppressEvent:true,supercedes:["iframe"]},"XY":{key:"xy",suppressEvent:true,supercedes:["iframe"]},"CONTEXT":{key:"context",suppressEvent:true,supercedes:["iframe"]},"FIXED_CENTER":{key:"fixedcenter",value:false,supercedes:["iframe","visible"]},"WIDTH":{key:"width",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"HEIGHT":{key:"height",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"AUTO_FILL_HEIGHT":{key:"autofillheight",supercedes:["height"],value:"body"},"ZINDEX":{key:"zindex",value:null},"CONSTRAIN_TO_VIEWPORT":{key:"constraintoviewport",value:false,validator:Lang.isBoolean,supercedes:["iframe","x","y","xy"]},"IFRAME":{key:"iframe",value:(UA.ie==6?true:false),validator:Lang.isBoolean,supercedes:["zindex"]},"PREVENT_CONTEXT_OVERLAP":{key:"preventcontextoverlap",value:false,validator:Lang.isBoolean,supercedes:["constraintoviewport"]}};Overlay.IFRAME_SRC="javascript:false;";Overlay.IFRAME_OFFSET=3;Overlay.VIEWPORT_OFFSET=10;Overlay.TOP_LEFT="tl";Overlay.TOP_RIGHT="tr";Overlay.BOTTOM_LEFT="bl";Overlay.BOTTOM_RIGHT="br";Overlay.CSS_OVERLAY="yui-overlay";Overlay.STD_MOD_RE=/^\s*?(body|footer|header)\s*?$/i;Overlay.windowScrollEvent=new CustomEvent("windowScroll");Overlay.windowResizeEvent=new CustomEvent("windowResize");Overlay.windowScrollHandler=function(e){var t=Event.getTarget(e);if(!t||t===window||t===window.document){if(UA.ie){if(!window.scrollEnd){window.scrollEnd=-1}clearTimeout(window.scrollEnd);window.scrollEnd=setTimeout(function(){Overlay.windowScrollEvent.fire()},1)}else{Overlay.windowScrollEvent.fire()}}};Overlay.windowResizeHandler=function(e){if(UA.ie){if(!window.resizeEnd){window.resizeEnd=-1}clearTimeout(window.resizeEnd);window.resizeEnd=setTimeout(function(){Overlay.windowResizeEvent.fire()},100)}else{Overlay.windowResizeEvent.fire()}};Overlay._initialized=null;if(Overlay._initialized===null){Event.on(window,"scroll",Overlay.windowScrollHandler);Event.on(window,"resize",Overlay.windowResizeHandler);Overlay._initialized=true}Overlay._TRIGGER_MAP={"windowScroll":Overlay.windowScrollEvent,"windowResize":Overlay.windowResizeEvent,"textResize":Module.textResizeEvent};YAHOO.extend(Overlay,Module,{CONTEXT_TRIGGERS:[],init:function(el,userConfig){Overlay.superclass.init.call(this,el);this.beforeInitEvent.fire(Overlay);Dom.addClass(this.element,Overlay.CSS_OVERLAY);if(userConfig){this.cfg.applyConfig(userConfig,true)}if(this.platform=="mac"&&UA.gecko){if(!Config.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this)){this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true)}if(!Config.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this)){this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true)}}this.initEvent.fire(Overlay)},initEvents:function(){Overlay.superclass.initEvents.call(this);var SIGNATURE=CustomEvent.LIST;this.beforeMoveEvent=this.createEvent(EVENT_TYPES.BEFORE_MOVE);this.beforeMoveEvent.signature=SIGNATURE;this.moveEvent=this.createEvent(EVENT_TYPES.MOVE);this.moveEvent.signature=SIGNATURE},initDefaultConfig:function(){Overlay.superclass.initDefaultConfig.call(this);var cfg=this.cfg;cfg.addProperty(DEFAULT_CONFIG.X.key,{handler:this.configX,validator:DEFAULT_CONFIG.X.validator,suppressEvent:DEFAULT_CONFIG.X.suppressEvent,supercedes:DEFAULT_CONFIG.X.supercedes});cfg.addProperty(DEFAULT_CONFIG.Y.key,{handler:this.configY,validator:DEFAULT_CONFIG.Y.validator,suppressEvent:DEFAULT_CONFIG.Y.suppressEvent,supercedes:DEFAULT_CONFIG.Y.supercedes});cfg.addProperty(DEFAULT_CONFIG.XY.key,{handler:this.configXY,suppressEvent:DEFAULT_CONFIG.XY.suppressEvent,supercedes:DEFAULT_CONFIG.XY.supercedes});cfg.addProperty(DEFAULT_CONFIG.CONTEXT.key,{handler:this.configContext,suppressEvent:DEFAULT_CONFIG.CONTEXT.suppressEvent,supercedes:DEFAULT_CONFIG.CONTEXT.supercedes});cfg.addProperty(DEFAULT_CONFIG.FIXED_CENTER.key,{handler:this.configFixedCenter,value:DEFAULT_CONFIG.FIXED_CENTER.value,validator:DEFAULT_CONFIG.FIXED_CENTER.validator,supercedes:DEFAULT_CONFIG.FIXED_CENTER.supercedes});cfg.addProperty(DEFAULT_CONFIG.WIDTH.key,{handler:this.configWidth,suppressEvent:DEFAULT_CONFIG.WIDTH.suppressEvent,supercedes:DEFAULT_CONFIG.WIDTH.supercedes});cfg.addProperty(DEFAULT_CONFIG.HEIGHT.key,{handler:this.configHeight,suppressEvent:DEFAULT_CONFIG.HEIGHT.suppressEvent,supercedes:DEFAULT_CONFIG.HEIGHT.supercedes});cfg.addProperty(DEFAULT_CONFIG.AUTO_FILL_HEIGHT.key,{handler:this.configAutoFillHeight,value:DEFAULT_CONFIG.AUTO_FILL_HEIGHT.value,validator:this._validateAutoFill,supercedes:DEFAULT_CONFIG.AUTO_FILL_HEIGHT.supercedes});cfg.addProperty(DEFAULT_CONFIG.ZINDEX.key,{handler:this.configzIndex,value:DEFAULT_CONFIG.ZINDEX.value});cfg.addProperty(DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.key,{handler:this.configConstrainToViewport,value:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.value,validator:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.validator,supercedes:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.supercedes});cfg.addProperty(DEFAULT_CONFIG.IFRAME.key,{handler:this.configIframe,value:DEFAULT_CONFIG.IFRAME.value,validator:DEFAULT_CONFIG.IFRAME.validator,supercedes:DEFAULT_CONFIG.IFRAME.supercedes});cfg.addProperty(DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.key,{value:DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.value,validator:DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.validator,supercedes:DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.supercedes})},moveTo:function(x,y){this.cfg.setProperty("xy",[x,y])},hideMacGeckoScrollbars:function(){Dom.replaceClass(this.element,"show-scrollbars","hide-scrollbars")},showMacGeckoScrollbars:function(){Dom.replaceClass(this.element,"hide-scrollbars","show-scrollbars")},_setDomVisibility:function(show){Dom.setStyle(this.element,"visibility",(show)?"visible":"hidden");if(show){Dom.removeClass(this.element,"yui-overlay-hidden")}else{Dom.addClass(this.element,"yui-overlay-hidden")}},configVisible:function(type,args,obj){var visible=args[0],currentVis=Dom.getStyle(this.element,"visibility"),effect=this.cfg.getProperty("effect"),effectInstances=[],isMacGecko=(this.platform=="mac"&&UA.gecko),alreadySubscribed=Config.alreadySubscribed,eff,ei,e,i,j,k,h,nEffects,nEffectInstances;if(currentVis=="inherit"){e=this.element.parentNode;while(e.nodeType!=9&&e.nodeType!=11){currentVis=Dom.getStyle(e,"visibility");if(currentVis!="inherit"){break}e=e.parentNode}if(currentVis=="inherit"){currentVis="visible"}}if(effect){if(effect instanceof Array){nEffects=effect.length;for(i=0;i<nEffects;i++){eff=effect[i];effectInstances[effectInstances.length]=eff.effect(this,eff.duration)}}else{effectInstances[effectInstances.length]=effect.effect(this,effect.duration)}}if(visible){if(isMacGecko){this.showMacGeckoScrollbars()}if(effect){if(visible){if(currentVis!="visible"||currentVis===""){this.beforeShowEvent.fire();nEffectInstances=effectInstances.length;for(j=0;j<nEffectInstances;j++){ei=effectInstances[j];if(j===0&&!alreadySubscribed(ei.animateInCompleteEvent,this.showEvent.fire,this.showEvent)){ei.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,true)}ei.animateIn()}}}}else{if(currentVis!="visible"||currentVis===""){this.beforeShowEvent.fire();this._setDomVisibility(true);this.cfg.refireEvent("iframe");this.showEvent.fire()}else{this._setDomVisibility(true)}}}else{if(isMacGecko){this.hideMacGeckoScrollbars()}if(effect){if(currentVis=="visible"){this.beforeHideEvent.fire();nEffectInstances=effectInstances.length;for(k=0;k<nEffectInstances;k++){h=effectInstances[k];if(k===0&&!alreadySubscribed(h.animateOutCompleteEvent,this.hideEvent.fire,this.hideEvent)){h.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,true)}h.animateOut()}}else if(currentVis===""){this._setDomVisibility(false)}}else{if(currentVis=="visible"||currentVis===""){this.beforeHideEvent.fire();this._setDomVisibility(false);this.hideEvent.fire()}else{this._setDomVisibility(false)}}}},doCenterOnDOMEvent:function(){var cfg=this.cfg,fc=cfg.getProperty("fixedcenter");if(cfg.getProperty("visible")){if(fc&&(fc!==_CONTAINED||this.fitsInViewport())){this.center()}}},fitsInViewport:function(){var nViewportOffset=Overlay.VIEWPORT_OFFSET,element=this.element,elementWidth=element.offsetWidth,elementHeight=element.offsetHeight,viewportWidth=Dom.getViewportWidth(),viewportHeight=Dom.getViewportHeight();return((elementWidth+nViewportOffset<viewportWidth)&&(elementHeight+nViewportOffset<viewportHeight))},configFixedCenter:function(type,args,obj){var val=args[0],alreadySubscribed=Config.alreadySubscribed,windowResizeEvent=Overlay.windowResizeEvent,windowScrollEvent=Overlay.windowScrollEvent;if(val){this.center();if(!alreadySubscribed(this.beforeShowEvent,this.center)){this.beforeShowEvent.subscribe(this.center)}if(!alreadySubscribed(windowResizeEvent,this.doCenterOnDOMEvent,this)){windowResizeEvent.subscribe(this.doCenterOnDOMEvent,this,true)}if(!alreadySubscribed(windowScrollEvent,this.doCenterOnDOMEvent,this)){windowScrollEvent.subscribe(this.doCenterOnDOMEvent,this,true)}}else{this.beforeShowEvent.unsubscribe(this.center);windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this)}},configHeight:function(type,args,obj){var height=args[0],el=this.element;Dom.setStyle(el,"height",height);this.cfg.refireEvent("iframe")},configAutoFillHeight:function(type,args,obj){var fillEl=args[0],cfg=this.cfg,autoFillHeight="autofillheight",height="height",currEl=cfg.getProperty(autoFillHeight),autoFill=this._autoFillOnHeightChange;cfg.unsubscribeFromConfigEvent(height,autoFill);Module.textResizeEvent.unsubscribe(autoFill);this.changeContentEvent.unsubscribe(autoFill);if(currEl&&fillEl!==currEl&&this[currEl]){Dom.setStyle(this[currEl],height,"")}if(fillEl){fillEl=Lang.trim(fillEl.toLowerCase());cfg.subscribeToConfigEvent(height,autoFill,this[fillEl],this);Module.textResizeEvent.subscribe(autoFill,this[fillEl],this);this.changeContentEvent.subscribe(autoFill,this[fillEl],this);cfg.setProperty(autoFillHeight,fillEl,true)}},configWidth:function(type,args,obj){var width=args[0],el=this.element;Dom.setStyle(el,"width",width);this.cfg.refireEvent("iframe")},configzIndex:function(type,args,obj){var zIndex=args[0],el=this.element;if(!zIndex){zIndex=Dom.getStyle(el,"zIndex");if(!zIndex||isNaN(zIndex)){zIndex=0}}if(this.iframe||this.cfg.getProperty("iframe")===true){if(zIndex<=0){zIndex=1}}Dom.setStyle(el,"zIndex",zIndex);this.cfg.setProperty("zIndex",zIndex,true);if(this.iframe){this.stackIframe()}},configXY:function(type,args,obj){var pos=args[0],x=pos[0],y=pos[1];this.cfg.setProperty("x",x);this.cfg.setProperty("y",y);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y])},configX:function(type,args,obj){var x=args[0],y=this.cfg.getProperty("y");this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");Dom.setX(this.element,x,true);this.cfg.setProperty("xy",[x,y],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y])},configY:function(type,args,obj){var x=this.cfg.getProperty("x"),y=args[0];this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");Dom.setY(this.element,y,true);this.cfg.setProperty("xy",[x,y],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y])},showIframe:function(){var oIFrame=this.iframe,oParentNode;if(oIFrame){oParentNode=this.element.parentNode;if(oParentNode!=oIFrame.parentNode){this._addToParent(oParentNode,oIFrame)}oIFrame.style.display="block"}},hideIframe:function(){if(this.iframe){this.iframe.style.display="none"}},syncIframe:function(){var oIFrame=this.iframe,oElement=this.element,nOffset=Overlay.IFRAME_OFFSET,nDimensionOffset=(nOffset*2),aXY;if(oIFrame){oIFrame.style.width=(oElement.offsetWidth+nDimensionOffset+"px");oIFrame.style.height=(oElement.offsetHeight+nDimensionOffset+"px");aXY=this.cfg.getProperty("xy");if(!Lang.isArray(aXY)||(isNaN(aXY[0])||isNaN(aXY[1]))){this.syncPosition();aXY=this.cfg.getProperty("xy")}Dom.setXY(oIFrame,[(aXY[0]-nOffset),(aXY[1]-nOffset)])}},stackIframe:function(){if(this.iframe){var overlayZ=Dom.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(overlayZ)&&!isNaN(overlayZ)){Dom.setStyle(this.iframe,"zIndex",(overlayZ-1))}}},configIframe:function(type,args,obj){var bIFrame=args[0];function createIFrame(){var oIFrame=this.iframe,oElement=this.element,oParent;if(!oIFrame){if(!m_oIFrameTemplate){m_oIFrameTemplate=document.createElement("iframe");if(this.isSecure){m_oIFrameTemplate.src=Overlay.IFRAME_SRC}if(UA.ie){m_oIFrameTemplate.style.filter="alpha(opacity=0)";m_oIFrameTemplate.frameBorder=0}else{m_oIFrameTemplate.style.opacity="0"}m_oIFrameTemplate.style.position="absolute";m_oIFrameTemplate.style.border="none";m_oIFrameTemplate.style.margin="0";m_oIFrameTemplate.style.padding="0";m_oIFrameTemplate.style.display="none";m_oIFrameTemplate.tabIndex=-1}oIFrame=m_oIFrameTemplate.cloneNode(false);oParent=oElement.parentNode;var parentNode=oParent||document.body;this._addToParent(parentNode,oIFrame);this.iframe=oIFrame}this.showIframe();this.syncIframe();this.stackIframe();if(!this._hasIframeEventListeners){this.showEvent.subscribe(this.showIframe);this.hideEvent.subscribe(this.hideIframe);this.changeContentEvent.subscribe(this.syncIframe);this._hasIframeEventListeners=true}}function onBeforeShow(){createIFrame.call(this);this.beforeShowEvent.unsubscribe(onBeforeShow);this._iframeDeferred=false}if(bIFrame){if(this.cfg.getProperty("visible")){createIFrame.call(this)}else{if(!this._iframeDeferred){this.beforeShowEvent.subscribe(onBeforeShow);this._iframeDeferred=true}}}else{this.hideIframe();if(this._hasIframeEventListeners){this.showEvent.unsubscribe(this.showIframe);this.hideEvent.unsubscribe(this.hideIframe);this.changeContentEvent.unsubscribe(this.syncIframe);this._hasIframeEventListeners=false}}},_primeXYFromDOM:function(){if(YAHOO.lang.isUndefined(this.cfg.getProperty("xy"))){this.syncPosition();this.cfg.refireEvent("xy");this.beforeShowEvent.unsubscribe(this._primeXYFromDOM)}},configConstrainToViewport:function(type,args,obj){var val=args[0];if(val){if(!Config.alreadySubscribed(this.beforeMoveEvent,this.enforceConstraints,this)){this.beforeMoveEvent.subscribe(this.enforceConstraints,this,true)}if(!Config.alreadySubscribed(this.beforeShowEvent,this._primeXYFromDOM)){this.beforeShowEvent.subscribe(this._primeXYFromDOM)}}else{this.beforeShowEvent.unsubscribe(this._primeXYFromDOM);this.beforeMoveEvent.unsubscribe(this.enforceConstraints,this)}},configContext:function(type,args,obj){var contextArgs=args[0],contextEl,elementMagnetCorner,contextMagnetCorner,triggers,defTriggers=this.CONTEXT_TRIGGERS;if(contextArgs){contextEl=contextArgs[0];elementMagnetCorner=contextArgs[1];contextMagnetCorner=contextArgs[2];triggers=contextArgs[3];if(defTriggers&&defTriggers.length>0){triggers=(triggers||[]).concat(defTriggers)}if(contextEl){if(typeof contextEl=="string"){this.cfg.setProperty("context",[document.getElementById(contextEl),elementMagnetCorner,contextMagnetCorner,triggers],true)}if(elementMagnetCorner&&contextMagnetCorner){this.align(elementMagnetCorner,contextMagnetCorner)}if(this._contextTriggers){this._processTriggers(this._contextTriggers,_UNSUBSCRIBE,this._alignOnTrigger)}if(triggers){this._processTriggers(triggers,_SUBSCRIBE,this._alignOnTrigger);this._contextTriggers=triggers}}}},_alignOnTrigger:function(type,args){this.align()},_findTriggerCE:function(t){var tce=null;if(t instanceof CustomEvent){tce=t}else if(Overlay._TRIGGER_MAP[t]){tce=Overlay._TRIGGER_MAP[t]}return tce},_processTriggers:function(triggers,mode,fn){var t,tce;for(var i=0,l=triggers.length;i<l;++i){t=triggers[i];tce=this._findTriggerCE(t);if(tce){tce[mode](fn,this,true)}else{this[mode](t,fn)}}},align:function(elementAlign,contextAlign){var contextArgs=this.cfg.getProperty("context"),me=this,context,element,contextRegion;function doAlign(v,h){switch(elementAlign){case Overlay.TOP_LEFT:me.moveTo(h,v);break;case Overlay.TOP_RIGHT:me.moveTo((h-element.offsetWidth),v);break;case Overlay.BOTTOM_LEFT:me.moveTo(h,(v-element.offsetHeight));break;case Overlay.BOTTOM_RIGHT:me.moveTo((h-element.offsetWidth),(v-element.offsetHeight));break}}if(contextArgs){context=contextArgs[0];element=this.element;me=this;if(!elementAlign){elementAlign=contextArgs[1]}if(!contextAlign){contextAlign=contextArgs[2]}if(element&&context){contextRegion=Dom.getRegion(context);switch(contextAlign){case Overlay.TOP_LEFT:doAlign(contextRegion.top,contextRegion.left);break;case Overlay.TOP_RIGHT:doAlign(contextRegion.top,contextRegion.right);break;case Overlay.BOTTOM_LEFT:doAlign(contextRegion.bottom,contextRegion.left);break;case Overlay.BOTTOM_RIGHT:doAlign(contextRegion.bottom,contextRegion.right);break}}}},enforceConstraints:function(type,args,obj){var pos=args[0];var cXY=this.getConstrainedXY(pos[0],pos[1]);this.cfg.setProperty("x",cXY[0],true);this.cfg.setProperty("y",cXY[1],true);this.cfg.setProperty("xy",cXY,true)},getConstrainedX:function(x){var oOverlay=this,oOverlayEl=oOverlay.element,nOverlayOffsetWidth=oOverlayEl.offsetWidth,nViewportOffset=Overlay.VIEWPORT_OFFSET,viewPortWidth=Dom.getViewportWidth(),scrollX=Dom.getDocumentScrollLeft(),bCanConstrain=(nOverlayOffsetWidth+nViewportOffset<viewPortWidth),aContext=this.cfg.getProperty("context"),oContextEl,nContextElX,nContextElWidth,bFlipped=false,nLeftRegionWidth,nRightRegionWidth,leftConstraint=scrollX+nViewportOffset,rightConstraint=scrollX+viewPortWidth-nOverlayOffsetWidth-nViewportOffset,xNew=x,oOverlapPositions={"tltr":true,"blbr":true,"brbl":true,"trtl":true};var flipHorizontal=function(){var nNewX;if((oOverlay.cfg.getProperty("x")-scrollX)>nContextElX){nNewX=(nContextElX-nOverlayOffsetWidth)}else{nNewX=(nContextElX+nContextElWidth)}oOverlay.cfg.setProperty("x",(nNewX+scrollX),true);return nNewX};var getDisplayRegionWidth=function(){if((oOverlay.cfg.getProperty("x")-scrollX)>nContextElX){return(nRightRegionWidth-nViewportOffset)}else{return(nLeftRegionWidth-nViewportOffset)}};var setHorizontalPosition=function(){var nDisplayRegionWidth=getDisplayRegionWidth(),fnReturnVal;if(nOverlayOffsetWidth>nDisplayRegionWidth){if(bFlipped){flipHorizontal()}else{flipHorizontal();bFlipped=true;fnReturnVal=setHorizontalPosition()}}return fnReturnVal};if(x<leftConstraint||x>rightConstraint){if(bCanConstrain){if(this.cfg.getProperty("preventcontextoverlap")&&aContext&&oOverlapPositions[(aContext[1]+aContext[2])]){oContextEl=aContext[0];nContextElX=Dom.getX(oContextEl)-scrollX;nContextElWidth=oContextEl.offsetWidth;nLeftRegionWidth=nContextElX;nRightRegionWidth=(viewPortWidth-(nContextElX+nContextElWidth));setHorizontalPosition();xNew=this.cfg.getProperty("x")}else{if(x<leftConstraint){xNew=leftConstraint}else if(x>rightConstraint){xNew=rightConstraint}}}else{xNew=nViewportOffset+scrollX}}return xNew},getConstrainedY:function(y){var oOverlay=this,oOverlayEl=oOverlay.element,nOverlayOffsetHeight=oOverlayEl.offsetHeight,nViewportOffset=Overlay.VIEWPORT_OFFSET,viewPortHeight=Dom.getViewportHeight(),scrollY=Dom.getDocumentScrollTop(),bCanConstrain=(nOverlayOffsetHeight+nViewportOffset<viewPortHeight),aContext=this.cfg.getProperty("context"),oContextEl,nContextElY,nContextElHeight,bFlipped=false,nTopRegionHeight,nBottomRegionHeight,topConstraint=scrollY+nViewportOffset,bottomConstraint=scrollY+viewPortHeight-nOverlayOffsetHeight-nViewportOffset,yNew=y,oOverlapPositions={"trbr":true,"tlbl":true,"bltl":true,"brtr":true};var flipVertical=function(){var nNewY;if((oOverlay.cfg.getProperty("y")-scrollY)>nContextElY){nNewY=(nContextElY-nOverlayOffsetHeight)}else{nNewY=(nContextElY+nContextElHeight)}oOverlay.cfg.setProperty("y",(nNewY+scrollY),true);return nNewY};var getDisplayRegionHeight=function(){if((oOverlay.cfg.getProperty("y")-scrollY)>nContextElY){return(nBottomRegionHeight-nViewportOffset)}else{return(nTopRegionHeight-nViewportOffset)}};var setVerticalPosition=function(){var nDisplayRegionHeight=getDisplayRegionHeight(),fnReturnVal;if(nOverlayOffsetHeight>nDisplayRegionHeight){if(bFlipped){flipVertical()}else{flipVertical();bFlipped=true;fnReturnVal=setVerticalPosition()}}return fnReturnVal};if(y<topConstraint||y>bottomConstraint){if(bCanConstrain){if(this.cfg.getProperty("preventcontextoverlap")&&aContext&&oOverlapPositions[(aContext[1]+aContext[2])]){oContextEl=aContext[0];nContextElHeight=oContextEl.offsetHeight;nContextElY=(Dom.getY(oContextEl)-scrollY);nTopRegionHeight=nContextElY;nBottomRegionHeight=(viewPortHeight-(nContextElY+nContextElHeight));setVerticalPosition();yNew=oOverlay.cfg.getProperty("y")}else{if(y<topConstraint){yNew=topConstraint}else if(y>bottomConstraint){yNew=bottomConstraint}}}else{yNew=nViewportOffset+scrollY}}return yNew},getConstrainedXY:function(x,y){return[this.getConstrainedX(x),this.getConstrainedY(y)]},center:function(){var nViewportOffset=Overlay.VIEWPORT_OFFSET,elementWidth=this.element.offsetWidth,elementHeight=this.element.offsetHeight,viewPortWidth=Dom.getViewportWidth(),viewPortHeight=Dom.getViewportHeight(),x,y;if(elementWidth<viewPortWidth){x=(viewPortWidth/2)-(elementWidth/2)+Dom.getDocumentScrollLeft()}else{x=nViewportOffset+Dom.getDocumentScrollLeft()}if(elementHeight<viewPortHeight){y=(viewPortHeight/2)-(elementHeight/2)+Dom.getDocumentScrollTop()}else{y=nViewportOffset+Dom.getDocumentScrollTop()}this.cfg.setProperty("xy",[parseInt(x,10),parseInt(y,10)]);this.cfg.refireEvent("iframe");if(UA.webkit){this.forceContainerRedraw()}},syncPosition:function(){var pos=Dom.getXY(this.element);this.cfg.setProperty("x",pos[0],true);this.cfg.setProperty("y",pos[1],true);this.cfg.setProperty("xy",pos,true)},onDomResize:function(e,obj){var me=this;Overlay.superclass.onDomResize.call(this,e,obj);setTimeout(function(){me.syncPosition();me.cfg.refireEvent("iframe");me.cfg.refireEvent("context")},0)},_getComputedHeight:(function(){if(document.defaultView&&document.defaultView.getComputedStyle){return function(el){var height=null;if(el.ownerDocument&&el.ownerDocument.defaultView){var computed=el.ownerDocument.defaultView.getComputedStyle(el,'');if(computed){height=parseInt(computed.height,10)}}return(Lang.isNumber(height))?height:null}}else{return function(el){var height=null;if(el.style.pixelHeight){height=el.style.pixelHeight}return(Lang.isNumber(height))?height:null}}})(),_validateAutoFillHeight:function(val){return(!val)||(Lang.isString(val)&&Overlay.STD_MOD_RE.test(val))},_autoFillOnHeightChange:function(type,args,el){var height=this.cfg.getProperty("height");if((height&&height!=="auto")||(height===0)){this.fillHeight(el)}},_getPreciseHeight:function(el){var height=el.offsetHeight;if(el.getBoundingClientRect){var rect=el.getBoundingClientRect();height=rect.bottom-rect.top}return height},fillHeight:function(el){if(el){var container=this.innerElement||this.element,containerEls=[this.header,this.body,this.footer],containerEl,total=0,filled=0,remaining=0,validEl=false;for(var i=0,l=containerEls.length;i<l;i++){containerEl=containerEls[i];if(containerEl){if(el!==containerEl){filled+=this._getPreciseHeight(containerEl)}else{validEl=true}}}if(validEl){if(UA.ie||UA.opera){Dom.setStyle(el,'height',0+'px')}total=this._getComputedHeight(container);if(total===null){Dom.addClass(container,"yui-override-padding");total=container.clientHeight;Dom.removeClass(container,"yui-override-padding")}remaining=Math.max(total-filled,0);Dom.setStyle(el,"height",remaining+"px");if(el.offsetHeight!=remaining){remaining=Math.max(remaining-(el.offsetHeight-remaining),0)}Dom.setStyle(el,"height",remaining+"px")}}},bringToTop:function(){var aOverlays=[],oElement=this.element;function compareZIndexDesc(p_oOverlay1,p_oOverlay2){var sZIndex1=Dom.getStyle(p_oOverlay1,"zIndex"),sZIndex2=Dom.getStyle(p_oOverlay2,"zIndex"),nZIndex1=(!sZIndex1||isNaN(sZIndex1))?0:parseInt(sZIndex1,10),nZIndex2=(!sZIndex2||isNaN(sZIndex2))?0:parseInt(sZIndex2,10);if(nZIndex1>nZIndex2){return-1}else if(nZIndex1<nZIndex2){return 1}else{return 0}}function isOverlayElement(p_oElement){var isOverlay=Dom.hasClass(p_oElement,Overlay.CSS_OVERLAY),Panel=YAHOO.widget.Panel;if(isOverlay&&!Dom.isAncestor(oElement,p_oElement)){if(Panel&&Dom.hasClass(p_oElement,Panel.CSS_PANEL)){aOverlays[aOverlays.length]=p_oElement.parentNode}else{aOverlays[aOverlays.length]=p_oElement}}}Dom.getElementsBy(isOverlayElement,"DIV",document.body);aOverlays.sort(compareZIndexDesc);var oTopOverlay=aOverlays[0],nTopZIndex;if(oTopOverlay){nTopZIndex=Dom.getStyle(oTopOverlay,"zIndex");if(!isNaN(nTopZIndex)){var bRequiresBump=false;if(oTopOverlay!=oElement){bRequiresBump=true}else if(aOverlays.length>1){var nNextZIndex=Dom.getStyle(aOverlays[1],"zIndex");if(!isNaN(nNextZIndex)&&(nTopZIndex==nNextZIndex)){bRequiresBump=true}}if(bRequiresBump){this.cfg.setProperty("zindex",(parseInt(nTopZIndex,10)+2))}}}},destroy:function(){if(this.iframe){this.iframe.parentNode.removeChild(this.iframe)}this.iframe=null;Overlay.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);Overlay.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this);Module.textResizeEvent.unsubscribe(this._autoFillOnHeightChange);Overlay.superclass.destroy.call(this)},forceContainerRedraw:function(){var c=this;Dom.addClass(c.element,"yui-force-redraw");setTimeout(function(){Dom.removeClass(c.element,"yui-force-redraw")},0)},toString:function(){return"Overlay "+this.id}})}());(function(){YAHOO.widget.OverlayManager=function(userConfig){this.init(userConfig)};var Overlay=YAHOO.widget.Overlay,Event=YAHOO.util.Event,Dom=YAHOO.util.Dom,Config=YAHOO.util.Config,CustomEvent=YAHOO.util.CustomEvent,OverlayManager=YAHOO.widget.OverlayManager;OverlayManager.CSS_FOCUSED="focused";OverlayManager.prototype={constructor:OverlayManager,overlays:null,initDefaultConfig:function(){this.cfg.addProperty("overlays",{suppressEvent:true});this.cfg.addProperty("focusevent",{value:"mousedown"})},init:function(userConfig){this.cfg=new Config(this);this.initDefaultConfig();if(userConfig){this.cfg.applyConfig(userConfig,true)}this.cfg.fireQueue();var activeOverlay=null;this.getActive=function(){return activeOverlay};this.focus=function(overlay){var o=this.find(overlay);if(o){o.focus()}};this.remove=function(overlay){var o=this.find(overlay),originalZ;if(o){if(activeOverlay==o){activeOverlay=null}var bDestroyed=(o.element===null&&o.cfg===null)?true:false;if(!bDestroyed){originalZ=Dom.getStyle(o.element,"zIndex");o.cfg.setProperty("zIndex",-1000,true)}this.overlays.sort(this.compareZIndexDesc);this.overlays=this.overlays.slice(0,(this.overlays.length-1));o.hideEvent.unsubscribe(o.blur);o.destroyEvent.unsubscribe(this._onOverlayDestroy,o);o.focusEvent.unsubscribe(this._onOverlayFocusHandler,o);o.blurEvent.unsubscribe(this._onOverlayBlurHandler,o);if(!bDestroyed){Event.removeListener(o.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus);o.cfg.setProperty("zIndex",originalZ,true);o.cfg.setProperty("manager",null)}if(o.focusEvent._managed){o.focusEvent=null}if(o.blurEvent._managed){o.blurEvent=null}if(o.focus._managed){o.focus=null}if(o.blur._managed){o.blur=null}}};this.blurAll=function(){var nOverlays=this.overlays.length,i;if(nOverlays>0){i=nOverlays-1;do{this.overlays[i].blur()}while(i--)}};this._manageBlur=function(overlay){var changed=false;if(activeOverlay==overlay){Dom.removeClass(activeOverlay.element,OverlayManager.CSS_FOCUSED);activeOverlay=null;changed=true}return changed};this._manageFocus=function(overlay){var changed=false;if(activeOverlay!=overlay){if(activeOverlay){activeOverlay.blur()}activeOverlay=overlay;this.bringToTop(activeOverlay);Dom.addClass(activeOverlay.element,OverlayManager.CSS_FOCUSED);changed=true}return changed};var overlays=this.cfg.getProperty("overlays");if(!this.overlays){this.overlays=[]}if(overlays){this.register(overlays);this.overlays.sort(this.compareZIndexDesc)}},_onOverlayElementFocus:function(p_oEvent){var oTarget=Event.getTarget(p_oEvent),oClose=this.close;if(oClose&&(oTarget==oClose||Dom.isAncestor(oClose,oTarget))){this.blur()}else{this.focus()}},_onOverlayDestroy:function(p_sType,p_aArgs,p_oOverlay){this.remove(p_oOverlay)},_onOverlayFocusHandler:function(p_sType,p_aArgs,p_oOverlay){this._manageFocus(p_oOverlay)},_onOverlayBlurHandler:function(p_sType,p_aArgs,p_oOverlay){this._manageBlur(p_oOverlay)},_bindFocus:function(overlay){var mgr=this;if(!overlay.focusEvent){overlay.focusEvent=overlay.createEvent("focus");overlay.focusEvent.signature=CustomEvent.LIST;overlay.focusEvent._managed=true}else{overlay.focusEvent.subscribe(mgr._onOverlayFocusHandler,overlay,mgr)}if(!overlay.focus){Event.on(overlay.element,mgr.cfg.getProperty("focusevent"),mgr._onOverlayElementFocus,null,overlay);overlay.focus=function(){if(mgr._manageFocus(this)){if(this.cfg.getProperty("visible")&&this.focusFirst){this.focusFirst()}this.focusEvent.fire()}};overlay.focus._managed=true}},_bindBlur:function(overlay){var mgr=this;if(!overlay.blurEvent){overlay.blurEvent=overlay.createEvent("blur");overlay.blurEvent.signature=CustomEvent.LIST;overlay.focusEvent._managed=true}else{overlay.blurEvent.subscribe(mgr._onOverlayBlurHandler,overlay,mgr)}if(!overlay.blur){overlay.blur=function(){if(mgr._manageBlur(this)){this.blurEvent.fire()}};overlay.blur._managed=true}overlay.hideEvent.subscribe(overlay.blur)},_bindDestroy:function(overlay){var mgr=this;overlay.destroyEvent.subscribe(mgr._onOverlayDestroy,overlay,mgr)},_syncZIndex:function(overlay){var zIndex=Dom.getStyle(overlay.element,"zIndex");if(!isNaN(zIndex)){overlay.cfg.setProperty("zIndex",parseInt(zIndex,10))}else{overlay.cfg.setProperty("zIndex",0)}},register:function(overlay){var registered=false,i,n;if(overlay instanceof Overlay){overlay.cfg.addProperty("manager",{value:this});this._bindFocus(overlay);this._bindBlur(overlay);this._bindDestroy(overlay);this._syncZIndex(overlay);this.overlays.push(overlay);this.bringToTop(overlay);registered=true}else if(overlay instanceof Array){for(i=0,n=overlay.length;i<n;i++){registered=this.register(overlay[i])||registered}}return registered},bringToTop:function(p_oOverlay){var oOverlay=this.find(p_oOverlay),nTopZIndex,oTopOverlay,aOverlays;if(oOverlay){aOverlays=this.overlays;aOverlays.sort(this.compareZIndexDesc);oTopOverlay=aOverlays[0];if(oTopOverlay){nTopZIndex=Dom.getStyle(oTopOverlay.element,"zIndex");if(!isNaN(nTopZIndex)){var bRequiresBump=false;if(oTopOverlay!==oOverlay){bRequiresBump=true}else if(aOverlays.length>1){var nNextZIndex=Dom.getStyle(aOverlays[1].element,"zIndex");if(!isNaN(nNextZIndex)&&(nTopZIndex==nNextZIndex)){bRequiresBump=true}}if(bRequiresBump){oOverlay.cfg.setProperty("zindex",(parseInt(nTopZIndex,10)+2))}}aOverlays.sort(this.compareZIndexDesc)}}},find:function(overlay){var isInstance=overlay instanceof Overlay,overlays=this.overlays,n=overlays.length,found=null,o,i;if(isInstance||typeof overlay=="string"){for(i=n-1;i>=0;i--){o=overlays[i];if((isInstance&&(o===overlay))||(o.id==overlay)){found=o;break}}}return found},compareZIndexDesc:function(o1,o2){var zIndex1=(o1.cfg)?o1.cfg.getProperty("zIndex"):null,zIndex2=(o2.cfg)?o2.cfg.getProperty("zIndex"):null;if(zIndex1===null&&zIndex2===null){return 0}else if(zIndex1===null){return 1}else if(zIndex2===null){return-1}else if(zIndex1>zIndex2){return-1}else if(zIndex1<zIndex2){return 1}else{return 0}},showAll:function(){var overlays=this.overlays,n=overlays.length,i;for(i=n-1;i>=0;i--){overlays[i].show()}},hideAll:function(){var overlays=this.overlays,n=overlays.length,i;for(i=n-1;i>=0;i--){overlays[i].hide()}},toString:function(){return"OverlayManager"}}}());(function(){YAHOO.widget.ContainerEffect=function(overlay,attrIn,attrOut,targetElement,animClass){if(!animClass){animClass=YAHOO.util.Anim}this.overlay=overlay;this.attrIn=attrIn;this.attrOut=attrOut;this.targetElement=targetElement||overlay.element;this.animClass=animClass};var Dom=YAHOO.util.Dom,CustomEvent=YAHOO.util.CustomEvent,ContainerEffect=YAHOO.widget.ContainerEffect;ContainerEffect.FADE=function(overlay,dur){var Easing=YAHOO.util.Easing,fin={attributes:{opacity:{from:0,to:1}},duration:dur,method:Easing.easeIn},fout={attributes:{opacity:{to:0}},duration:dur,method:Easing.easeOut},fade=new ContainerEffect(overlay,fin,fout,overlay.element);fade.handleUnderlayStart=function(){var underlay=this.overlay.underlay;if(underlay&&YAHOO.env.ua.ie){var hasFilters=(underlay.filters&&underlay.filters.length>0);if(hasFilters){Dom.addClass(overlay.element,"yui-effect-fade")}}};fade.handleUnderlayComplete=function(){var underlay=this.overlay.underlay;if(underlay&&YAHOO.env.ua.ie){Dom.removeClass(overlay.element,"yui-effect-fade")}};fade.handleStartAnimateIn=function(type,args,obj){Dom.addClass(obj.overlay.element,"hide-select");if(!obj.overlay.underlay){obj.overlay.cfg.refireEvent("underlay")}obj.handleUnderlayStart();obj.overlay._setDomVisibility(true);Dom.setStyle(obj.overlay.element,"opacity",0)};fade.handleCompleteAnimateIn=function(type,args,obj){Dom.removeClass(obj.overlay.element,"hide-select");if(obj.overlay.element.style.filter){obj.overlay.element.style.filter=null}obj.handleUnderlayComplete();obj.overlay.cfg.refireEvent("iframe");obj.animateInCompleteEvent.fire()};fade.handleStartAnimateOut=function(type,args,obj){Dom.addClass(obj.overlay.element,"hide-select");obj.handleUnderlayStart()};fade.handleCompleteAnimateOut=function(type,args,obj){Dom.removeClass(obj.overlay.element,"hide-select");if(obj.overlay.element.style.filter){obj.overlay.element.style.filter=null}obj.overlay._setDomVisibility(false);Dom.setStyle(obj.overlay.element,"opacity",1);obj.handleUnderlayComplete();obj.overlay.cfg.refireEvent("iframe");obj.animateOutCompleteEvent.fire()};fade.init();return fade};ContainerEffect.SLIDE=function(overlay,dur){var Easing=YAHOO.util.Easing,x=overlay.cfg.getProperty("x")||Dom.getX(overlay.element),y=overlay.cfg.getProperty("y")||Dom.getY(overlay.element),clientWidth=Dom.getClientWidth(),offsetWidth=overlay.element.offsetWidth,sin={attributes:{points:{to:[x,y]}},duration:dur,method:Easing.easeIn},sout={attributes:{points:{to:[(clientWidth+25),y]}},duration:dur,method:Easing.easeOut},slide=new ContainerEffect(overlay,sin,sout,overlay.element,YAHOO.util.Motion);slide.handleStartAnimateIn=function(type,args,obj){obj.overlay.element.style.left=((-25)-offsetWidth)+"px";obj.overlay.element.style.top=y+"px"};slide.handleTweenAnimateIn=function(type,args,obj){var pos=Dom.getXY(obj.overlay.element),currentX=pos[0],currentY=pos[1];if(Dom.getStyle(obj.overlay.element,"visibility")=="hidden"&&currentX<x){obj.overlay._setDomVisibility(true)}obj.overlay.cfg.setProperty("xy",[currentX,currentY],true);obj.overlay.cfg.refireEvent("iframe")};slide.handleCompleteAnimateIn=function(type,args,obj){obj.overlay.cfg.setProperty("xy",[x,y],true);obj.startX=x;obj.startY=y;obj.overlay.cfg.refireEvent("iframe");obj.animateInCompleteEvent.fire()};slide.handleStartAnimateOut=function(type,args,obj){var vw=Dom.getViewportWidth(),pos=Dom.getXY(obj.overlay.element),yso=pos[1];obj.animOut.attributes.points.to=[(vw+25),yso]};slide.handleTweenAnimateOut=function(type,args,obj){var pos=Dom.getXY(obj.overlay.element),xto=pos[0],yto=pos[1];obj.overlay.cfg.setProperty("xy",[xto,yto],true);obj.overlay.cfg.refireEvent("iframe")};slide.handleCompleteAnimateOut=function(type,args,obj){obj.overlay._setDomVisibility(false);obj.overlay.cfg.setProperty("xy",[x,y]);obj.animateOutCompleteEvent.fire()};slide.init();return slide};ContainerEffect.prototype={init:function(){this.beforeAnimateInEvent=this.createEvent("beforeAnimateIn");this.beforeAnimateInEvent.signature=CustomEvent.LIST;this.beforeAnimateOutEvent=this.createEvent("beforeAnimateOut");this.beforeAnimateOutEvent.signature=CustomEvent.LIST;this.animateInCompleteEvent=this.createEvent("animateInComplete");this.animateInCompleteEvent.signature=CustomEvent.LIST;this.animateOutCompleteEvent=this.createEvent("animateOutComplete");this.animateOutCompleteEvent.signature=CustomEvent.LIST;this.animIn=new this.animClass(this.targetElement,this.attrIn.attributes,this.attrIn.duration,this.attrIn.method);this.animIn.onStart.subscribe(this.handleStartAnimateIn,this);this.animIn.onTween.subscribe(this.handleTweenAnimateIn,this);this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn,this);this.animOut=new this.animClass(this.targetElement,this.attrOut.attributes,this.attrOut.duration,this.attrOut.method);this.animOut.onStart.subscribe(this.handleStartAnimateOut,this);this.animOut.onTween.subscribe(this.handleTweenAnimateOut,this);this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut,this)},animateIn:function(){this.beforeAnimateInEvent.fire();this.animIn.animate()},animateOut:function(){this.beforeAnimateOutEvent.fire();this.animOut.animate()},handleStartAnimateIn:function(type,args,obj){},handleTweenAnimateIn:function(type,args,obj){},handleCompleteAnimateIn:function(type,args,obj){},handleStartAnimateOut:function(type,args,obj){},handleTweenAnimateOut:function(type,args,obj){},handleCompleteAnimateOut:function(type,args,obj){},toString:function(){var output="ContainerEffect";if(this.overlay){output+=" ["+this.overlay.toString()+"]"}return output}};YAHOO.lang.augmentProto(ContainerEffect,YAHOO.util.EventProvider)})();YAHOO.register("containercore",YAHOO.widget.Module,{version:"2.7.0",build:"1799"});
244   -/*
  236 +}else{return null;}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top),D=Math.max(this.right,E.right),A=Math.max(this.bottom,E.bottom),B=Math.min(this.left,E.left);return new YAHOO.util.Region(C,D,A,B);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D),C=F[1],E=F[0]+D.offsetWidth,A=F[1]+D.offsetHeight,B=F[0];return new YAHOO.util.Region(C,E,A,B);};YAHOO.util.Point=function(A,B){if(YAHOO.lang.isArray(A)){B=A[1];A=A[0];}YAHOO.util.Point.superclass.constructor.call(this,B,A,B,A);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var B=YAHOO.util,A="clientTop",F="clientLeft",J="parentNode",K="right",W="hasLayout",I="px",U="opacity",L="auto",D="borderLeftWidth",G="borderTopWidth",P="borderRightWidth",V="borderBottomWidth",S="visible",Q="transparent",N="height",E="width",H="style",T="currentStyle",R=/^width|height$/,O=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,M={get:function(X,Z){var Y="",a=X[T][Z];if(Z===U){Y=B.Dom.getStyle(X,U);}else{if(!a||(a.indexOf&&a.indexOf(I)>-1)){Y=a;}else{if(B.Dom.IE_COMPUTED[Z]){Y=B.Dom.IE_COMPUTED[Z](X,Z);}else{if(O.test(a)){Y=B.Dom.IE.ComputedStyle.getPixel(X,Z);}else{Y=a;}}}}return Y;},getOffset:function(Z,e){var b=Z[T][e],X=e.charAt(0).toUpperCase()+e.substr(1),c="offset"+X,Y="pixel"+X,a="",d;if(b==L){d=Z[c];if(d===undefined){a=0;}a=d;if(R.test(e)){Z[H][e]=d;if(Z[c]>d){a=d-(Z[c]-d);}Z[H][e]=L;}}else{if(!Z[H][Y]&&!Z[H][e]){Z[H][e]=b;}a=Z[H][Y];}return a+I;},getBorderWidth:function(X,Z){var Y=null;if(!X[T][W]){X[H].zoom=1;}switch(Z){case G:Y=X[A];break;case V:Y=X.offsetHeight-X.clientHeight-X[A];break;case D:Y=X[F];break;case P:Y=X.offsetWidth-X.clientWidth-X[F];break;}return Y+I;},getPixel:function(Y,X){var a=null,b=Y[T][K],Z=Y[T][X];Y[H][K]=Z;a=Y[H].pixelRight;Y[H][K]=b;return a+I;},getMargin:function(Y,X){var Z;if(Y[T][X]==L){Z=0+I;}else{Z=B.Dom.IE.ComputedStyle.getPixel(Y,X);}return Z;},getVisibility:function(Y,X){var Z;while((Z=Y[T])&&Z[X]=="inherit"){Y=Y[J];}return(Z)?Z[X]:S;},getColor:function(Y,X){return B.Dom.Color.toRGB(Y[T][X])||Q;},getBorderColor:function(Y,X){var Z=Y[T],a=Z[X]||Z.color;return B.Dom.Color.toRGB(B.Dom.Color.toHex(a));}},C={};C.top=C.right=C.bottom=C.left=C[E]=C[N]=M.getOffset;C.color=M.getColor;C[G]=C[P]=C[V]=C[D]=M.getBorderWidth;C.marginTop=C.marginRight=C.marginBottom=C.marginLeft=M.getMargin;C.visibility=M.getVisibility;C.borderColor=C.borderTopColor=C.borderRightColor=C.borderBottomColor=C.borderLeftColor=M.getBorderColor;B.Dom.IE_COMPUTED=C;B.Dom.IE_ComputedStyle=M;})();(function(){var C="toString",A=parseInt,B=RegExp,D=YAHOO.util;D.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(E){if(!D.Dom.Color.re_RGB.test(E)){E=D.Dom.Color.toHex(E);}if(D.Dom.Color.re_hex.exec(E)){E="rgb("+[A(B.$1,16),A(B.$2,16),A(B.$3,16)].join(", ")+")";}return E;},toHex:function(H){H=D.Dom.Color.KEYWORDS[H]||H;if(D.Dom.Color.re_RGB.exec(H)){var G=(B.$1.length===1)?"0"+B.$1:Number(B.$1),F=(B.$2.length===1)?"0"+B.$2:Number(B.$2),E=(B.$3.length===1)?"0"+B.$3:Number(B.$3);H=[G[C](16),F[C](16),E[C](16)].join("");}if(H.length<6){H=H.replace(D.Dom.Color.re_hex3,"$1$1");}if(H!=="transparent"&&H.indexOf("#")<0){H="#"+H;}return H.toLowerCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.7.0",build:"1799"});if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={}}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=(""+A[C]).split(".");E=YAHOO;for(B=(D[0]=="YAHOO")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]]}}return E};YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(B&&B.log){return B.log(D,A,C)}else{return false}};YAHOO.register=function(A,E,D){var I=YAHOO.env.modules,B,H,G,F,C;if(!I[A]){I[A]={versions:[],builds:[]}}B=I[A];H=D.version;G=D.build;F=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=E;for(C=0;C<F.length;C=C+1){F[C](B)}if(E){E.VERSION=H;E.BUILD=G}else{YAHOO.log("mainClass is undefined for module "+A,"warn")}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(A){return YAHOO.env.modules[A]||null};YAHOO.env.ua=function(){var C={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0,caja:0},B=navigator.userAgent,A;if((/KHTML/).test(B)){C.webkit=1}A=B.match(/AppleWebKit\/([^\s]*)/);if(A&&A[1]){C.webkit=parseFloat(A[1]);if(/ Mobile\//.test(B)){C.mobile="Apple"}else{A=B.match(/NokiaN[^\/]*/);if(A){C.mobile=A[0]}}A=B.match(/AdobeAIR\/([^\s]*)/);if(A){C.air=A[0]}}if(!C.webkit){A=B.match(/Opera[\s\/]([^\s]*)/);if(A&&A[1]){C.opera=parseFloat(A[1]);A=B.match(/Opera Mini[^;]*/);if(A){C.mobile=A[0]}}else{A=B.match(/MSIE\s([^;]*)/);if(A&&A[1]){C.ie=parseFloat(A[1])}else{A=B.match(/Gecko\/([^\s]*)/);if(A){C.gecko=1;A=B.match(/rv:([^\s\)]*)/);if(A&&A[1]){C.gecko=parseFloat(A[1])}}}}}A=B.match(/Caja\/([^\s]*)/);if(A&&A[1]){C.caja=parseFloat(A[1])}return C}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var B=YAHOO_config.listener,A=YAHOO.env.listeners,D=true,C;if(B){for(C=0;C<A.length;C=C+1){if(A[C]==B){D=false;break}}if(D){A.push(B)}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var B=YAHOO.lang,F="[object Array]",C="[object Function]",A=Object.prototype,E=["toString","valueOf"],D={isArray:function(G){return A.toString.apply(G)===F},isBoolean:function(G){return typeof G==="boolean"},isFunction:function(G){return A.toString.apply(G)===C},isNull:function(G){return G===null},isNumber:function(G){return typeof G==="number"&&isFinite(G)},isObject:function(G){return(G&&(typeof G==="object"||B.isFunction(G)))||false},isString:function(G){return typeof G==="string"},isUndefined:function(G){return typeof G==="undefined"},_IEEnumFix:(YAHOO.env.ua.ie)?function(I,H){var G,K,J;for(G=0;G<E.length;G=G+1){K=E[G];J=H[K];if(B.isFunction(J)&&J!=A[K]){I[K]=J}}}:function(){},extend:function(J,K,I){if(!K||!J){throw new Error("extend failed, please check that "+"all dependencies are included.")}var H=function(){},G;H.prototype=K.prototype;J.prototype=new H();J.prototype.constructor=J;J.superclass=K.prototype;if(K.prototype.constructor==A.constructor){K.prototype.constructor=K}if(I){for(G in I){if(B.hasOwnProperty(I,G)){J.prototype[G]=I[G]}}B._IEEnumFix(J.prototype,I)}},augmentObject:function(K,J){if(!J||!K){throw new Error("Absorb failed, verify dependencies.")}var G=arguments,I,L,H=G[2];if(H&&H!==true){for(I=2;I<G.length;I=I+1){K[G[I]]=J[G[I]]}}else{for(L in J){if(H||!(L in K)){K[L]=J[L]}}B._IEEnumFix(K,J)}},augmentProto:function(J,I){if(!I||!J){throw new Error("Augment failed, verify dependencies.")}var G=[J.prototype,I.prototype],H;for(H=2;H<arguments.length;H=H+1){G.push(arguments[H])}B.augmentObject.apply(this,G)},dump:function(G,L){var I,K,N=[],O="{...}",H="f(){...}",M=", ",J=" => ";if(!B.isObject(G)){return G+""}else{if(G instanceof Date||("nodeType"in G&&"tagName"in G)){return G}else{if(B.isFunction(G)){return H}}}L=(B.isNumber(L))?L:3;if(B.isArray(G)){N.push("[");for(I=0,K=G.length;I<K;I=I+1){if(B.isObject(G[I])){N.push((L>0)?B.dump(G[I],L-1):O)}else{N.push(G[I])}N.push(M)}if(N.length>1){N.pop()}N.push("]")}else{N.push("{");for(I in G){if(B.hasOwnProperty(G,I)){N.push(I+J);if(B.isObject(G[I])){N.push((L>0)?B.dump(G[I],L-1):O)}else{N.push(G[I])}N.push(M)}}if(N.length>1){N.pop()}N.push("}")}return N.join("")},substitute:function(V,H,O){var L,K,J,R,S,U,Q=[],I,M="dump",P=" ",G="{",T="}",N;for(;;){L=V.lastIndexOf(G);if(L<0){break}K=V.indexOf(T,L);if(L+1>=K){break}I=V.substring(L+1,K);R=I;U=null;J=R.indexOf(P);if(J>-1){U=R.substring(J+1);R=R.substring(0,J)}S=H[R];if(O){S=O(R,S,U)}if(B.isObject(S)){if(B.isArray(S)){S=B.dump(S,parseInt(U,10))}else{U=U||"";N=U.indexOf(M);if(N>-1){U=U.substring(4)}if(S.toString===A.toString||N>-1){S=B.dump(S,parseInt(U,10))}else{S=S.toString()}}}else{if(!B.isString(S)&&!B.isNumber(S)){S="~-"+Q.length+"-~";Q[Q.length]=I}}V=V.substring(0,L)+S+V.substring(K+1)}for(L=Q.length-1;L>=0;L=L-1){V=V.replace(new RegExp("~-"+L+"-~"),"{"+Q[L]+"}","g")}return V},trim:function(G){try{return G.replace(/^\s+|\s+$/g,"")}catch(H){return G}},merge:function(){var J={},H=arguments,G=H.length,I;for(I=0;I<G;I=I+1){B.augmentObject(J,H[I],true)}return J},later:function(N,H,O,J,K){N=N||0;H=H||{};var I=O,M=J,L,G;if(B.isString(O)){I=H[O]}if(!I){throw new TypeError("method undefined")}if(!B.isArray(M)){M=[J]}L=function(){I.apply(H,M)};G=(K)?setInterval(L,N):setTimeout(L,N);return{interval:K,cancel:function(){if(this.interval){clearInterval(G)}else{clearTimeout(G)}}}},isValue:function(G){return(B.isObject(G)||B.isString(G)||B.isNumber(G)||B.isBoolean(G))}};B.hasOwnProperty=(A.hasOwnProperty)?function(G,H){return G&&G.hasOwnProperty(H)}:function(G,H){return!B.isUndefined(G[H])&&G.constructor.prototype[H]!==G[H]};D.augmentObject(B,D,true);YAHOO.util.Lang=B;B.augment=B.augmentProto;YAHOO.augment=B.augmentProto;YAHOO.extend=B.extend})();YAHOO.register("yahoo",YAHOO,{version:"2.7.0",build:"1799"});YAHOO.util.Get=function(){var M={},L=0,R=0,E=false,N=YAHOO.env.ua,S=YAHOO.lang;var J=function(W,T,X){var U=X||window,Y=U.document,Z=Y.createElement(W);for(var V in T){if(T[V]&&YAHOO.lang.hasOwnProperty(T,V)){Z.setAttribute(V,T[V])}}return Z};var I=function(T,U,W){var V=W||"utf-8";return J("link",{"id":"yui__dyn_"+(R++),"type":"text/css","charset":V,"rel":"stylesheet","href":T},U)};var P=function(T,U,W){var V=W||"utf-8";return J("script",{"id":"yui__dyn_"+(R++),"type":"text/javascript","charset":V,"src":T},U)};var A=function(T,U){return{tId:T.tId,win:T.win,data:T.data,nodes:T.nodes,msg:U,purge:function(){D(this.tId)}}};var B=function(T,W){var U=M[W],V=(S.isString(T))?U.win.document.getElementById(T):T;if(!V){Q(W,"target node not found: "+T)}return V};var Q=function(W,V){var T=M[W];if(T.onFailure){var U=T.scope||T.win;T.onFailure.call(U,A(T,V))}};var C=function(W){var T=M[W];T.finished=true;if(T.aborted){var V="transaction "+W+" was aborted";Q(W,V);return}if(T.onSuccess){var U=T.scope||T.win;T.onSuccess.call(U,A(T))}};var O=function(V){var T=M[V];if(T.onTimeout){var U=T.scope||T;T.onTimeout.call(U,A(T))}};var G=function(V,Z){var U=M[V];if(U.timer){U.timer.cancel()}if(U.aborted){var X="transaction "+V+" was aborted";Q(V,X);return}if(Z){U.url.shift();if(U.varName){U.varName.shift()}}else{U.url=(S.isString(U.url))?[U.url]:U.url;if(U.varName){U.varName=(S.isString(U.varName))?[U.varName]:U.varName}}var c=U.win,b=c.document,a=b.getElementsByTagName("head")[0],W;if(U.url.length===0){if(U.type==="script"&&N.webkit&&N.webkit<420&&!U.finalpass&&!U.varName){var Y=P(null,U.win,U.charset);Y.innerHTML='YAHOO.util.Get._finalize("'+V+'");';U.nodes.push(Y);a.appendChild(Y)}else{C(V)}return}var T=U.url[0];if(!T){U.url.shift();return G(V)}if(U.timeout){U.timer=S.later(U.timeout,U,O,V)}if(U.type==="script"){W=P(T,c,U.charset)}else{W=I(T,c,U.charset)}F(U.type,W,V,T,c,U.url.length);U.nodes.push(W);if(U.insertBefore){var e=B(U.insertBefore,V);if(e){e.parentNode.insertBefore(W,e)}}else{a.appendChild(W)}if((N.webkit||N.gecko)&&U.type==="css"){G(V,T)}};var K=function(){if(E){return}E=true;for(var T in M){var U=M[T];if(U.autopurge&&U.finished){D(U.tId);delete M[T]}}E=false};var D=function(a){var X=M[a];if(X){var Z=X.nodes,T=Z.length,Y=X.win.document,W=Y.getElementsByTagName("head")[0];if(X.insertBefore){var V=B(X.insertBefore,a);if(V){W=V.parentNode}}for(var U=0;U<T;U=U+1){W.removeChild(Z[U])}X.nodes=[]}};var H=function(U,T,V){var X="q"+(L++);V=V||{};if(L%YAHOO.util.Get.PURGE_THRESH===0){K()}M[X]=S.merge(V,{tId:X,type:U,url:T,finished:false,aborted:false,nodes:[]});var W=M[X];W.win=W.win||window;W.scope=W.scope||W.win;W.autopurge=("autopurge"in W)?W.autopurge:(U==="script")?true:false;S.later(0,W,G,X);return{tId:X}};var F=function(c,X,W,U,Y,Z,b){var a=b||G;if(N.ie){X.onreadystatechange=function(){var d=this.readyState;if("loaded"===d||"complete"===d){X.onreadystatechange=null;a(W,U)}}}else{if(N.webkit){if(c==="script"){if(N.webkit>=420){X.addEventListener("load",function(){a(W,U)})}else{var T=M[W];if(T.varName){var V=YAHOO.util.Get.POLL_FREQ;T.maxattempts=YAHOO.util.Get.TIMEOUT/V;T.attempts=0;T._cache=T.varName[0].split(".");T.timer=S.later(V,T,function(j){var f=this._cache,e=f.length,d=this.win,g;for(g=0;g<e;g=g+1){d=d[f[g]];if(!d){this.attempts++;if(this.attempts++>this.maxattempts){var h="Over retry limit, giving up";T.timer.cancel();Q(W,h)}else{}return}}T.timer.cancel();a(W,U)},null,true)}else{S.later(YAHOO.util.Get.POLL_FREQ,null,a,[W,U])}}}}else{X.onload=function(){a(W,U)}}}};return{POLL_FREQ:10,PURGE_THRESH:20,TIMEOUT:2000,_finalize:function(T){S.later(0,null,C,T)},abort:function(U){var V=(S.isString(U))?U:U.tId;var T=M[V];if(T){T.aborted=true}},script:function(T,U){return H("script",T,U)},css:function(T,U){return H("css",T,U)}}}();YAHOO.register("get",YAHOO.util.Get,{version:"2.7.0",build:"1799"});(function(){var Y=YAHOO,util=Y.util,lang=Y.lang,env=Y.env,PROV="_provides",SUPER="_supersedes",REQ="expanded",AFTER="_after";var YUI={dupsAllowed:{"yahoo":true,"get":true},info:{"root":"2.7.0/build/","base":"http://yui.yahooapis.com/2.7.0/build/","comboBase":"http://yui.yahooapis.com/combo?","skin":{"defaultSkin":"sam","base":"assets/skins/","path":"skin.css","after":["reset","fonts","grids","base"],"rollup":3},dupsAllowed:["yahoo","get"],"moduleInfo":{"animation":{"type":"js","path":"animation/animation-min.js","requires":["dom","event"]},"autocomplete":{"type":"js","path":"autocomplete/autocomplete-min.js","requires":["dom","event","datasource"],"optional":["connection","animation"],"skinnable":true},"base":{"type":"css","path":"base/base-min.css","after":["reset","fonts","grids"]},"button":{"type":"js","path":"button/button-min.js","requires":["element"],"optional":["menu"],"skinnable":true},"calendar":{"type":"js","path":"calendar/calendar-min.js","requires":["event","dom"],"skinnable":true},"carousel":{"type":"js","path":"carousel/carousel-min.js","requires":["element"],"optional":["animation"],"skinnable":true},"charts":{"type":"js","path":"charts/charts-min.js","requires":["element","json","datasource"]},"colorpicker":{"type":"js","path":"colorpicker/colorpicker-min.js","requires":["slider","element"],"optional":["animation"],"skinnable":true},"connection":{"type":"js","path":"connection/connection-min.js","requires":["event"]},"container":{"type":"js","path":"container/container-min.js","requires":["dom","event"],"optional":["dragdrop","animation","connection"],"supersedes":["containercore"],"skinnable":true},"containercore":{"type":"js","path":"container/container_core-min.js","requires":["dom","event"],"pkg":"container"},"cookie":{"type":"js","path":"cookie/cookie-min.js","requires":["yahoo"]},"datasource":{"type":"js","path":"datasource/datasource-min.js","requires":["event"],"optional":["connection"]},"datatable":{"type":"js","path":"datatable/datatable-min.js","requires":["element","datasource"],"optional":["calendar","dragdrop","paginator"],"skinnable":true},"dom":{"type":"js","path":"dom/dom-min.js","requires":["yahoo"]},"dragdrop":{"type":"js","path":"dragdrop/dragdrop-min.js","requires":["dom","event"]},"editor":{"type":"js","path":"editor/editor-min.js","requires":["menu","element","button"],"optional":["animation","dragdrop"],"supersedes":["simpleeditor"],"skinnable":true},"element":{"type":"js","path":"element/element-min.js","requires":["dom","event"]},"event":{"type":"js","path":"event/event-min.js","requires":["yahoo"]},"fonts":{"type":"css","path":"fonts/fonts-min.css"},"get":{"type":"js","path":"get/get-min.js","requires":["yahoo"]},"grids":{"type":"css","path":"grids/grids-min.css","requires":["fonts"],"optional":["reset"]},"history":{"type":"js","path":"history/history-min.js","requires":["event"]},"imagecropper":{"type":"js","path":"imagecropper/imagecropper-min.js","requires":["dom","event","dragdrop","element","resize"],"skinnable":true},"imageloader":{"type":"js","path":"imageloader/imageloader-min.js","requires":["event","dom"]},"json":{"type":"js","path":"json/json-min.js","requires":["yahoo"]},"layout":{"type":"js","path":"layout/layout-min.js","requires":["dom","event","element"],"optional":["animation","dragdrop","resize","selector"],"skinnable":true},"logger":{"type":"js","path":"logger/logger-min.js","requires":["event","dom"],"optional":["dragdrop"],"skinnable":true},"menu":{"type":"js","path":"menu/menu-min.js","requires":["containercore"],"skinnable":true},"paginator":{"type":"js","path":"paginator/paginator-min.js","requires":["element"],"skinnable":true},"profiler":{"type":"js","path":"profiler/profiler-min.js","requires":["yahoo"]},"profilerviewer":{"type":"js","path":"profilerviewer/profilerviewer-min.js","requires":["profiler","yuiloader","element"],"skinnable":true},"reset":{"type":"css","path":"reset/reset-min.css"},"reset-fonts-grids":{"type":"css","path":"reset-fonts-grids/reset-fonts-grids.css","supersedes":["reset","fonts","grids","reset-fonts"],"rollup":4},"reset-fonts":{"type":"css","path":"reset-fonts/reset-fonts.css","supersedes":["reset","fonts"],"rollup":2},"resize":{"type":"js","path":"resize/resize-min.js","requires":["dom","event","dragdrop","element"],"optional":["animation"],"skinnable":true},"selector":{"type":"js","path":"selector/selector-min.js","requires":["yahoo","dom"]},"simpleeditor":{"type":"js","path":"editor/simpleeditor-min.js","requires":["element"],"optional":["containercore","menu","button","animation","dragdrop"],"skinnable":true,"pkg":"editor"},"slider":{"type":"js","path":"slider/slider-min.js","requires":["dragdrop"],"optional":["animation"],"skinnable":true},"stylesheet":{"type":"js","path":"stylesheet/stylesheet-min.js","requires":["yahoo"]},"tabview":{"type":"js","path":"tabview/tabview-min.js","requires":["element"],"optional":["connection"],"skinnable":true},"treeview":{"type":"js","path":"treeview/treeview-min.js","requires":["event","dom"],"optional":["json"],"skinnable":true},"uploader":{"type":"js","path":"uploader/uploader.js","requires":["element"]},"utilities":{"type":"js","path":"utilities/utilities.js","supersedes":["yahoo","event","dragdrop","animation","dom","connection","element","yahoo-dom-event","get","yuiloader","yuiloader-dom-event"],"rollup":8},"yahoo":{"type":"js","path":"yahoo/yahoo-min.js"},"yahoo-dom-event":{"type":"js","path":"yahoo-dom-event/yahoo-dom-event.js","supersedes":["yahoo","event","dom"],"rollup":3},"yuiloader":{"type":"js","path":"yuiloader/yuiloader-min.js","supersedes":["yahoo","get"]},"yuiloader-dom-event":{"type":"js","path":"yuiloader-dom-event/yuiloader-dom-event.js","supersedes":["yahoo","dom","event","get","yuiloader","yahoo-dom-event"],"rollup":5},"yuitest":{"type":"js","path":"yuitest/yuitest-min.js","requires":["logger"],"skinnable":true}}},ObjectUtil:{appendArray:function(o,a){if(a){for(var i=0;i<a.length;i=i+1){o[a[i]]=true}}},keys:function(o,ordered){var a=[],i;for(i in o){if(lang.hasOwnProperty(o,i)){a.push(i)}}return a}},ArrayUtil:{appendArray:function(a1,a2){Array.prototype.push.apply(a1,a2)},indexOf:function(a,val){for(var i=0;i<a.length;i=i+1){if(a[i]===val){return i}}return-1},toObject:function(a){var o={};for(var i=0;i<a.length;i=i+1){o[a[i]]=true}return o},uniq:function(a){return YUI.ObjectUtil.keys(YUI.ArrayUtil.toObject(a))}}};YAHOO.util.YUILoader=function(o){this._internalCallback=null;this._useYahooListener=false;this.onSuccess=null;this.onFailure=Y.log;this.onProgress=null;this.onTimeout=null;this.scope=this;this.data=null;this.insertBefore=null;this.charset=null;this.varName=null;this.base=YUI.info.base;this.comboBase=YUI.info.comboBase;this.combine=false;this.root=YUI.info.root;this.timeout=0;this.ignore=null;this.force=null;this.allowRollup=true;this.filter=null;this.required={};this.moduleInfo=lang.merge(YUI.info.moduleInfo);this.rollups=null;this.loadOptional=false;this.sorted=[];this.loaded={};this.dirty=true;this.inserted={};var self=this;env.listeners.push(function(m){if(self._useYahooListener){self.loadNext(m.name)}});this.skin=lang.merge(YUI.info.skin);this._config(o)};Y.util.YUILoader.prototype={FILTERS:{RAW:{"searchExp":"-min\\.js","replaceStr":".js"},DEBUG:{"searchExp":"-min\\.js","replaceStr":"-debug.js"}},SKIN_PREFIX:"skin-",_config:function(o){if(o){for(var i in o){if(lang.hasOwnProperty(o,i)){if(i=="require"){this.require(o[i])}else{this[i]=o[i]}}}}var f=this.filter;if(lang.isString(f)){f=f.toUpperCase();if(f==="DEBUG"){this.require("logger")}if(!Y.widget.LogWriter){Y.widget.LogWriter=function(){return Y}}this.filter=this.FILTERS[f]}},addModule:function(o){if(!o||!o.name||!o.type||(!o.path&&!o.fullpath)){return false}o.ext=("ext"in o)?o.ext:true;o.requires=o.requires||[];this.moduleInfo[o.name]=o;this.dirty=true;return true},require:function(what){var a=(typeof what==="string")?arguments:what;this.dirty=true;YUI.ObjectUtil.appendArray(this.required,a)},_addSkin:function(skin,mod){var name=this.formatSkin(skin),info=this.moduleInfo,sinf=this.skin,ext=info[mod]&&info[mod].ext;if(!info[name]){this.addModule({"name":name,"type":"css","path":sinf.base+skin+"/"+sinf.path,"after":sinf.after,"rollup":sinf.rollup,"ext":ext})}if(mod){name=this.formatSkin(skin,mod);if(!info[name]){var mdef=info[mod],pkg=mdef.pkg||mod;this.addModule({"name":name,"type":"css","after":sinf.after,"path":pkg+"/"+sinf.base+skin+"/"+mod+".css","ext":ext})}}return name},getRequires:function(mod){if(!mod){return[]}if(!this.dirty&&mod.expanded){return mod.expanded}mod.requires=mod.requires||[];var i,d=[],r=mod.requires,o=mod.optional,info=this.moduleInfo,m;for(i=0;i<r.length;i=i+1){d.push(r[i]);m=info[r[i]];YUI.ArrayUtil.appendArray(d,this.getRequires(m))}if(o&&this.loadOptional){for(i=0;i<o.length;i=i+1){d.push(o[i]);YUI.ArrayUtil.appendArray(d,this.getRequires(info[o[i]]))}}mod.expanded=YUI.ArrayUtil.uniq(d);return mod.expanded},getProvides:function(name,notMe){var addMe=!(notMe),ckey=(addMe)?PROV:SUPER,m=this.moduleInfo[name],o={};if(!m){return o}if(m[ckey]){return m[ckey]}var s=m.supersedes,done={},me=this;var add=function(mm){if(!done[mm]){done[mm]=true;lang.augmentObject(o,me.getProvides(mm))}};if(s){for(var i=0;i<s.length;i=i+1){add(s[i])}}m[SUPER]=o;m[PROV]=lang.merge(o);m[PROV][name]=true;return m[ckey]},calculate:function(o){if(o||this.dirty){this._config(o);this._setup();this._explode();if(this.allowRollup){this._rollup()}this._reduce();this._sort();this.dirty=false}},_setup:function(){var info=this.moduleInfo,name,i,j;for(name in info){if(lang.hasOwnProperty(info,name)){var m=info[name];if(m&&m.skinnable){var o=this.skin.overrides,smod;if(o&&o[name]){for(i=0;i<o[name].length;i=i+1){smod=this._addSkin(o[name][i],name)}}else{smod=this._addSkin(this.skin.defaultSkin,name)}m.requires.push(smod)}}}var l=lang.merge(this.inserted);if(!this._sandbox){l=lang.merge(l,env.modules)}if(this.ignore){YUI.ObjectUtil.appendArray(l,this.ignore)}if(this.force){for(i=0;i<this.force.length;i=i+1){if(this.force[i]in l){delete l[this.force[i]]}}}for(j in l){if(lang.hasOwnProperty(l,j)){lang.augmentObject(l,this.getProvides(j))}}this.loaded=l},_explode:function(){var r=this.required,i,mod;for(i in r){if(lang.hasOwnProperty(r,i)){mod=this.moduleInfo[i];if(mod){var req=this.getRequires(mod);if(req){YUI.ObjectUtil.appendArray(r,req)}}}}},_skin:function(){},formatSkin:function(skin,mod){var s=this.SKIN_PREFIX+skin;if(mod){s=s+"-"+mod}return s},parseSkin:function(mod){if(mod.indexOf(this.SKIN_PREFIX)===0){var a=mod.split("-");return{skin:a[1],module:a[2]}}return null},_rollup:function(){var i,j,m,s,rollups={},r=this.required,roll,info=this.moduleInfo;if(this.dirty||!this.rollups){for(i in info){if(lang.hasOwnProperty(info,i)){m=info[i];if(m&&m.rollup){rollups[i]=m}}}this.rollups=rollups}for(;;){var rolled=false;for(i in rollups){if(!r[i]&&!this.loaded[i]){m=info[i];s=m.supersedes;roll=false;if(!m.rollup){continue}var skin=(m.ext)?false:this.parseSkin(i),c=0;if(skin){for(j in r){if(lang.hasOwnProperty(r,j)){if(i!==j&&this.parseSkin(j)){c++;roll=(c>=m.rollup);if(roll){break}}}}}else{for(j=0;j<s.length;j=j+1){if(this.loaded[s[j]]&&(!YUI.dupsAllowed[s[j]])){roll=false;break}else{if(r[s[j]]){c++;roll=(c>=m.rollup);if(roll){break}}}}}if(roll){r[i]=true;rolled=true;this.getRequires(m)}}}if(!rolled){break}}},_reduce:function(){var i,j,s,m,r=this.required;for(i in r){if(i in this.loaded){delete r[i]}else{var skinDef=this.parseSkin(i);if(skinDef){if(!skinDef.module){var skin_pre=this.SKIN_PREFIX+skinDef.skin;for(j in r){if(lang.hasOwnProperty(r,j)){m=this.moduleInfo[j];var ext=m&&m.ext;if(!ext&&j!==i&&j.indexOf(skin_pre)>-1){delete r[j]}}}}}else{m=this.moduleInfo[i];s=m&&m.supersedes;if(s){for(j=0;j<s.length;j=j+1){if(s[j]in r){delete r[s[j]]}}}}}}},_onFailure:function(msg){YAHOO.log("Failure","info","loader");var f=this.onFailure;if(f){f.call(this.scope,{msg:"failure: "+msg,data:this.data,success:false})}},_onTimeout:function(){YAHOO.log("Timeout","info","loader");var f=this.onTimeout;if(f){f.call(this.scope,{msg:"timeout",data:this.data,success:false})}},_sort:function(){var s=[],info=this.moduleInfo,loaded=this.loaded,checkOptional=!this.loadOptional,me=this;var requires=function(aa,bb){var mm=info[aa];if(loaded[bb]||!mm){return false}var ii,rr=mm.expanded,after=mm.after,other=info[bb],optional=mm.optional;if(rr&&YUI.ArrayUtil.indexOf(rr,bb)>-1){return true}if(after&&YUI.ArrayUtil.indexOf(after,bb)>-1){return true}if(checkOptional&&optional&&YUI.ArrayUtil.indexOf(optional,bb)>-1){return true}var ss=info[bb]&&info[bb].supersedes;if(ss){for(ii=0;ii<ss.length;ii=ii+1){if(requires(aa,ss[ii])){return true}}}if(mm.ext&&mm.type=="css"&&!other.ext&&other.type=="css"){return true}return false};for(var i in this.required){if(lang.hasOwnProperty(this.required,i)){s.push(i)}}var p=0;for(;;){var l=s.length,a,b,j,k,moved=false;for(j=p;j<l;j=j+1){a=s[j];for(k=j+1;k<l;k=k+1){if(requires(a,s[k])){b=s.splice(k,1);s.splice(j,0,b[0]);moved=true;break}}if(moved){break}else{p=p+1}}if(!moved){break}}this.sorted=s},toString:function(){var o={type:"YUILoader",base:this.base,filter:this.filter,required:this.required,loaded:this.loaded,inserted:this.inserted};lang.dump(o,1)},_combine:function(){this._combining=[];var self=this,s=this.sorted,len=s.length,js=this.comboBase,css=this.comboBase,target,startLen=js.length,i,m,type=this.loadType;YAHOO.log("type "+type);for(i=0;i<len;i=i+1){m=this.moduleInfo[s[i]];if(m&&!m.ext&&(!type||type===m.type)){target=this.root+m.path;target+="&";if(m.type=="js"){js+=target}else{css+=target}this._combining.push(s[i])}}if(this._combining.length){YAHOO.log("Attempting to combine: "+this._combining,"info","loader");var callback=function(o){var c=this._combining,len=c.length,i,m;for(i=0;i<len;i=i+1){this.inserted[c[i]]=true}this.loadNext(o.data)},loadScript=function(){if(js.length>startLen){YAHOO.util.Get.script(self._filter(js),{data:self._loading,onSuccess:callback,onFailure:self._onFailure,onTimeout:self._onTimeout,insertBefore:self.insertBefore,charset:self.charset,timeout:self.timeout,scope:self})}};if(css.length>startLen){YAHOO.util.Get.css(this._filter(css),{data:this._loading,onSuccess:loadScript,onFailure:this._onFailure,onTimeout:this._onTimeout,insertBefore:this.insertBefore,charset:this.charset,timeout:this.timeout,scope:self})}else{loadScript()}return}else{this.loadNext(this._loading)}},insert:function(o,type){this.calculate(o);this._loading=true;this.loadType=type;if(this.combine){return this._combine()}if(!type){var self=this;this._internalCallback=function(){self._internalCallback=null;self.insert(null,"js")};this.insert(null,"css");return}this.loadNext()},sandbox:function(o,type){this._config(o);if(!this.onSuccess){throw new Error("You must supply an onSuccess handler for your sandbox")}this._sandbox=true;var self=this;if(!type||type!=="js"){this._internalCallback=function(){self._internalCallback=null;self.sandbox(null,"js")};this.insert(null,"css");return}if(!util.Connect){var ld=new YAHOO.util.YUILoader();ld.insert({base:this.base,filter:this.filter,require:"connection",insertBefore:this.insertBefore,charset:this.charset,onSuccess:function(){this.sandbox(null,"js")},scope:this},"js");return}this._scriptText=[];this._loadCount=0;this._stopCount=this.sorted.length;this._xhr=[];this.calculate();var s=this.sorted,l=s.length,i,m,url;for(i=0;i<l;i=i+1){m=this.moduleInfo[s[i]];if(!m){this._onFailure("undefined module "+m);for(var j=0;j<this._xhr.length;j=j+1){this._xhr[j].abort()}return}if(m.type!=="js"){this._loadCount++;continue}url=m.fullpath;url=(url)?this._filter(url):this._url(m.path);var xhrData={success:function(o){var idx=o.argument[0],name=o.argument[2];this._scriptText[idx]=o.responseText;if(this.onProgress){this.onProgress.call(this.scope,{name:name,scriptText:o.responseText,xhrResponse:o,data:this.data})}this._loadCount++;if(this._loadCount>=this._stopCount){var v=this.varName||"YAHOO";var t="(function() {\n";var b="\nreturn "+v+";\n})();";var ref=eval(t+this._scriptText.join("\n")+b);this._pushEvents(ref);if(ref){this.onSuccess.call(this.scope,{reference:ref,data:this.data})}else{this._onFailure.call(this.varName+" reference failure")}}},failure:function(o){this.onFailure.call(this.scope,{msg:"XHR failure",xhrResponse:o,data:this.data})},scope:this,argument:[i,url,s[i]]};this._xhr.push(util.Connect.asyncRequest("GET",url,xhrData))}},loadNext:function(mname){if(!this._loading){return}if(mname){if(mname!==this._loading){return}this.inserted[mname]=true;if(this.onProgress){this.onProgress.call(this.scope,{name:mname,data:this.data})}}var s=this.sorted,len=s.length,i,m;for(i=0;i<len;i=i+1){if(s[i]in this.inserted){continue}if(s[i]===this._loading){return}m=this.moduleInfo[s[i]];if(!m){this.onFailure.call(this.scope,{msg:"undefined module "+m,data:this.data});return}if(!this.loadType||this.loadType===m.type){this._loading=s[i];var fn=(m.type==="css")?util.Get.css:util.Get.script,url=m.fullpath,self=this,c=function(o){self.loadNext(o.data)};url=(url)?this._filter(url):this._url(m.path);if(env.ua.webkit&&env.ua.webkit<420&&m.type==="js"&&!m.varName){c=null;this._useYahooListener=true}fn(url,{data:s[i],onSuccess:c,onFailure:this._onFailure,onTimeout:this._onTimeout,insertBefore:this.insertBefore,charset:this.charset,timeout:this.timeout,varName:m.varName,scope:self});return}}this._loading=null;if(this._internalCallback){var f=this._internalCallback;this._internalCallback=null;f.call(this)}else{if(this.onSuccess){this._pushEvents();this.onSuccess.call(this.scope,{data:this.data})}}},_pushEvents:function(ref){var r=ref||YAHOO;if(r.util&&r.util.Event){r.util.Event._load()}},_filter:function(str){var f=this.filter;return(f)?str.replace(new RegExp(f.searchExp,"g"),f.replaceStr):str},_url:function(path){return this._filter((this.base||"")+path)}}})();YAHOO.register("yuiloader",YAHOO.util.YUILoader,{version:"2.7.0",build:"1799"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var E=YAHOO.util,L=YAHOO.lang,m=YAHOO.env.ua,A=YAHOO.lang.trim,d={},h={},N=/^t(?:able|d|h)$/i,X=/color$/i,K=window.document,W=K.documentElement,e="ownerDocument",n="defaultView",v="documentElement",t="compatMode",b="offsetLeft",P="offsetTop",u="offsetParent",Z="parentNode",l="nodeType",C="tagName",O="scrollLeft",i="scrollTop",Q="getBoundingClientRect",w="getComputedStyle",a="currentStyle",M="CSS1Compat",c="BackCompat",g="class",F="className",J="",B=" ",s="(?:^|\\s)",k="(?= |$)",U="g",p="position",f="fixed",V="relative",j="left",o="top",r="medium",q="borderLeftWidth",R="borderTopWidth",D=m.opera,I=m.webkit,H=m.gecko,T=m.ie;E.Dom={CUSTOM_ATTRIBUTES:(!W.hasAttribute)?{"for":"htmlFor","class":F}:{"htmlFor":"for","className":g},get:function(y){var AA,Y,z,x,G;if(y){if(y[l]||y.item){return y}if(typeof y==="string"){AA=y;y=K.getElementById(y);if(y&&y.id===AA){return y}else{if(y&&K.all){y=null;Y=K.all[AA];for(x=0,G=Y.length;x<G;++x){if(Y[x].id===AA){return Y[x]}}}}return y}if(y.DOM_EVENTS){y=y.get("element")}if("length"in y){z=[];for(x=0,G=y.length;x<G;++x){z[z.length]=E.Dom.get(y[x])}return z}return y}return null},getComputedStyle:function(G,Y){if(window[w]){return G[e][n][w](G,null)[Y]}else{if(G[a]){return E.Dom.IE_ComputedStyle.get(G,Y)}}},getStyle:function(G,Y){return E.Dom.batch(G,E.Dom._getStyle,Y)},_getStyle:function(){if(window[w]){return function(G,y){y=(y==="float")?y="cssFloat":E.Dom._toCamel(y);var x=G.style[y],Y;if(!x){Y=G[e][n][w](G,null);if(Y){x=Y[y]}}return x}}else{if(W[a]){return function(G,y){var x;switch(y){case"opacity":x=100;try{x=G.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(z){try{x=G.filters("alpha").opacity}catch(Y){}}return x/100;case"float":y="styleFloat";default:y=E.Dom._toCamel(y);x=G[a]?G[a][y]:null;return(G.style[y]||x)}}}}}(),setStyle:function(G,Y,x){E.Dom.batch(G,E.Dom._setStyle,{prop:Y,val:x})},_setStyle:function(){if(T){return function(Y,G){var x=E.Dom._toCamel(G.prop),y=G.val;if(Y){switch(x){case"opacity":if(L.isString(Y.style.filter)){Y.style.filter="alpha(opacity="+y*100+")";if(!Y[a]||!Y[a].hasLayout){Y.style.zoom=1}}break;case"float":x="styleFloat";default:Y.style[x]=y}}else{}}}else{return function(Y,G){var x=E.Dom._toCamel(G.prop),y=G.val;if(Y){if(x=="float"){x="cssFloat"}Y.style[x]=y}else{}}}}(),getXY:function(G){return E.Dom.batch(G,E.Dom._getXY)},_canPosition:function(G){return(E.Dom._getStyle(G,"display")!=="none"&&E.Dom._inDoc(G))},_getXY:function(){if(K[v][Q]){return function(y){var z,Y,AA,AF,AE,AD,AC,G,x,AB=Math.floor,AG=false;if(E.Dom._canPosition(y)){AA=y[Q]();AF=y[e];z=E.Dom.getDocumentScrollLeft(AF);Y=E.Dom.getDocumentScrollTop(AF);AG=[AB(AA[j]),AB(AA[o])];if(T&&m.ie<8){AE=2;AD=2;AC=AF[t];G=S(AF[v],q);x=S(AF[v],R);if(m.ie===6){if(AC!==c){AE=0;AD=0}}if((AC==c)){if(G!==r){AE=parseInt(G,10)}if(x!==r){AD=parseInt(x,10)}}AG[0]-=AE;AG[1]-=AD}if((Y||z)){AG[0]+=z;AG[1]+=Y}AG[0]=AB(AG[0]);AG[1]=AB(AG[1])}else{}return AG}}else{return function(y){var x,Y,AA,AB,AC,z=false,G=y;if(E.Dom._canPosition(y)){z=[y[b],y[P]];x=E.Dom.getDocumentScrollLeft(y[e]);Y=E.Dom.getDocumentScrollTop(y[e]);AC=((H||m.webkit>519)?true:false);while((G=G[u])){z[0]+=G[b];z[1]+=G[P];if(AC){z=E.Dom._calcBorders(G,z)}}if(E.Dom._getStyle(y,p)!==f){G=y;while((G=G[Z])&&G[C]){AA=G[i];AB=G[O];if(H&&(E.Dom._getStyle(G,"overflow")!=="visible")){z=E.Dom._calcBorders(G,z)}if(AA||AB){z[0]-=AB;z[1]-=AA}}z[0]+=x;z[1]+=Y}else{if(D){z[0]-=x;z[1]-=Y}else{if(I||H){z[0]+=x;z[1]+=Y}}}z[0]=Math.floor(z[0]);z[1]=Math.floor(z[1])}else{}return z}}}(),getX:function(G){var Y=function(x){return E.Dom.getXY(x)[0]};return E.Dom.batch(G,Y,E.Dom,true)},getY:function(G){var Y=function(x){return E.Dom.getXY(x)[1]};return E.Dom.batch(G,Y,E.Dom,true)},setXY:function(G,x,Y){E.Dom.batch(G,E.Dom._setXY,{pos:x,noRetry:Y})},_setXY:function(G,z){var AA=E.Dom._getStyle(G,p),y=E.Dom.setStyle,AD=z.pos,Y=z.noRetry,AB=[parseInt(E.Dom.getComputedStyle(G,j),10),parseInt(E.Dom.getComputedStyle(G,o),10)],AC,x;if(AA=="static"){AA=V;y(G,p,AA)}AC=E.Dom._getXY(G);if(!AD||AC===false){return false}if(isNaN(AB[0])){AB[0]=(AA==V)?0:G[b]}if(isNaN(AB[1])){AB[1]=(AA==V)?0:G[P]}if(AD[0]!==null){y(G,j,AD[0]-AC[0]+AB[0]+"px")}if(AD[1]!==null){y(G,o,AD[1]-AC[1]+AB[1]+"px")}if(!Y){x=E.Dom._getXY(G);if((AD[0]!==null&&x[0]!=AD[0])||(AD[1]!==null&&x[1]!=AD[1])){E.Dom._setXY(G,{pos:AD,noRetry:true})}}},setX:function(Y,G){E.Dom.setXY(Y,[G,null])},setY:function(G,Y){E.Dom.setXY(G,[null,Y])},getRegion:function(G){var Y=function(x){var y=false;if(E.Dom._canPosition(x)){y=E.Region.getRegion(x)}else{}return y};return E.Dom.batch(G,Y,E.Dom,true)},getClientWidth:function(){return E.Dom.getViewportWidth()},getClientHeight:function(){return E.Dom.getViewportHeight()},getElementsByClassName:function(AB,AF,AC,AE,x,AD){AB=L.trim(AB);AF=AF||"*";AC=(AC)?E.Dom.get(AC):null||K;if(!AC){return[]}var Y=[],G=AC.getElementsByTagName(AF),z=E.Dom.hasClass;for(var y=0,AA=G.length;y<AA;++y){if(z(G[y],AB)){Y[Y.length]=G[y]}}if(AE){E.Dom.batch(Y,AE,x,AD)}return Y},hasClass:function(Y,G){return E.Dom.batch(Y,E.Dom._hasClass,G)},_hasClass:function(x,Y){var G=false,y;if(x&&Y){y=E.Dom.getAttribute(x,F)||J;if(Y.exec){G=Y.test(y)}else{G=Y&&(B+y+B).indexOf(B+Y+B)>-1}}else{}return G},addClass:function(Y,G){return E.Dom.batch(Y,E.Dom._addClass,G)},_addClass:function(x,Y){var G=false,y;if(x&&Y){y=E.Dom.getAttribute(x,F)||J;if(!E.Dom._hasClass(x,Y)){E.Dom.setAttribute(x,F,A(y+B+Y));G=true}}else{}return G},removeClass:function(Y,G){return E.Dom.batch(Y,E.Dom._removeClass,G)},_removeClass:function(y,x){var Y=false,AA,z,G;if(y&&x){AA=E.Dom.getAttribute(y,F)||J;E.Dom.setAttribute(y,F,AA.replace(E.Dom._getClassRegex(x),J));z=E.Dom.getAttribute(y,F);if(AA!==z){E.Dom.setAttribute(y,F,A(z));Y=true;if(E.Dom.getAttribute(y,F)===""){G=(y.hasAttribute&&y.hasAttribute(g))?g:F;y.removeAttribute(G)}}}else{}return Y},replaceClass:function(x,Y,G){return E.Dom.batch(x,E.Dom._replaceClass,{from:Y,to:G})},_replaceClass:function(y,x){var Y,AB,AA,G=false,z;if(y&&x){AB=x.from;AA=x.to;if(!AA){G=false}else{if(!AB){G=E.Dom._addClass(y,x.to)}else{if(AB!==AA){z=E.Dom.getAttribute(y,F)||J;Y=(B+z.replace(E.Dom._getClassRegex(AB),B+AA)).split(E.Dom._getClassRegex(AA));Y.splice(1,0,B+AA);E.Dom.setAttribute(y,F,A(Y.join(J)));G=true}}}}else{}return G},generateId:function(G,x){x=x||"yui-gen";var Y=function(y){if(y&&y.id){return y.id}var z=x+YAHOO.env._id_counter++;if(y){if(y[e].getElementById(z)){return E.Dom.generateId(y,z+x)}y.id=z}return z};return E.Dom.batch(G,Y,E.Dom,true)||Y.apply(E.Dom,arguments)},isAncestor:function(Y,x){Y=E.Dom.get(Y);x=E.Dom.get(x);var G=false;if((Y&&x)&&(Y[l]&&x[l])){if(Y.contains&&Y!==x){G=Y.contains(x)}else{if(Y.compareDocumentPosition){G=!!(Y.compareDocumentPosition(x)&16)}}}else{}return G},inDocument:function(G,Y){return E.Dom._inDoc(E.Dom.get(G),Y)},_inDoc:function(Y,x){var G=false;if(Y&&Y[C]){x=x||Y[e];G=E.Dom.isAncestor(x[v],Y)}else{}return G},getElementsBy:function(Y,AF,AB,AD,y,AC,AE){AF=AF||"*";AB=(AB)?E.Dom.get(AB):null||K;if(!AB){return[]}var x=[],G=AB.getElementsByTagName(AF);for(var z=0,AA=G.length;z<AA;++z){if(Y(G[z])){if(AE){x=G[z];break}else{x[x.length]=G[z]}}}if(AD){E.Dom.batch(x,AD,y,AC)}return x},getElementBy:function(x,G,Y){return E.Dom.getElementsBy(x,G,Y,null,null,null,true)},batch:function(x,AB,AA,z){var y=[],Y=(z)?AA:window;x=(x&&(x[C]||x.item))?x:E.Dom.get(x);if(x&&AB){if(x[C]||x.length===undefined){return AB.call(Y,x,AA)}for(var G=0;G<x.length;++G){y[y.length]=AB.call(Y,x[G],AA)}}else{return false}return y},getDocumentHeight:function(){var Y=(K[t]!=M||I)?K.body.scrollHeight:W.scrollHeight,G=Math.max(Y,E.Dom.getViewportHeight());return G},getDocumentWidth:function(){var Y=(K[t]!=M||I)?K.body.scrollWidth:W.scrollWidth,G=Math.max(Y,E.Dom.getViewportWidth());return G},getViewportHeight:function(){var G=self.innerHeight,Y=K[t];if((Y||T)&&!D){G=(Y==M)?W.clientHeight:K.body.clientHeight}return G},getViewportWidth:function(){var G=self.innerWidth,Y=K[t];if(Y||T){G=(Y==M)?W.clientWidth:K.body.clientWidth}return G},getAncestorBy:function(G,Y){while((G=G[Z])){if(E.Dom._testElement(G,Y)){return G}}return null},getAncestorByClassName:function(Y,G){Y=E.Dom.get(Y);if(!Y){return null}var x=function(y){return E.Dom.hasClass(y,G)};return E.Dom.getAncestorBy(Y,x)},getAncestorByTagName:function(Y,G){Y=E.Dom.get(Y);if(!Y){return null}var x=function(y){return y[C]&&y[C].toUpperCase()==G.toUpperCase()};return E.Dom.getAncestorBy(Y,x)},getPreviousSiblingBy:function(G,Y){while(G){G=G.previousSibling;if(E.Dom._testElement(G,Y)){return G}}return null},getPreviousSibling:function(G){G=E.Dom.get(G);if(!G){return null}return E.Dom.getPreviousSiblingBy(G)},getNextSiblingBy:function(G,Y){while(G){G=G.nextSibling;if(E.Dom._testElement(G,Y)){return G}}return null},getNextSibling:function(G){G=E.Dom.get(G);if(!G){return null}return E.Dom.getNextSiblingBy(G)},getFirstChildBy:function(G,x){var Y=(E.Dom._testElement(G.firstChild,x))?G.firstChild:null;return Y||E.Dom.getNextSiblingBy(G.firstChild,x)},getFirstChild:function(G,Y){G=E.Dom.get(G);if(!G){return null}return E.Dom.getFirstChildBy(G)},getLastChildBy:function(G,x){if(!G){return null}var Y=(E.Dom._testElement(G.lastChild,x))?G.lastChild:null;return Y||E.Dom.getPreviousSiblingBy(G.lastChild,x)},getLastChild:function(G){G=E.Dom.get(G);return E.Dom.getLastChildBy(G)},getChildrenBy:function(Y,y){var x=E.Dom.getFirstChildBy(Y,y),G=x?[x]:[];E.Dom.getNextSiblingBy(x,function(z){if(!y||y(z)){G[G.length]=z}return false});return G},getChildren:function(G){G=E.Dom.get(G);if(!G){}return E.Dom.getChildrenBy(G)},getDocumentScrollLeft:function(G){G=G||K;return Math.max(G[v].scrollLeft,G.body.scrollLeft)},getDocumentScrollTop:function(G){G=G||K;return Math.max(G[v].scrollTop,G.body.scrollTop)},insertBefore:function(Y,G){Y=E.Dom.get(Y);G=E.Dom.get(G);if(!Y||!G||!G[Z]){return null}return G[Z].insertBefore(Y,G)},insertAfter:function(Y,G){Y=E.Dom.get(Y);G=E.Dom.get(G);if(!Y||!G||!G[Z]){return null}if(G.nextSibling){return G[Z].insertBefore(Y,G.nextSibling)}else{return G[Z].appendChild(Y)}},getClientRegion:function(){var x=E.Dom.getDocumentScrollTop(),Y=E.Dom.getDocumentScrollLeft(),y=E.Dom.getViewportWidth()+Y,G=E.Dom.getViewportHeight()+x;return new E.Region(x,y,G,Y)},setAttribute:function(Y,G,x){G=E.Dom.CUSTOM_ATTRIBUTES[G]||G;Y.setAttribute(G,x)},getAttribute:function(Y,G){G=E.Dom.CUSTOM_ATTRIBUTES[G]||G;return Y.getAttribute(G)},_toCamel:function(Y){var x=d;function G(y,z){return z.toUpperCase()}return x[Y]||(x[Y]=Y.indexOf("-")===-1?Y:Y.replace(/-([a-z])/gi,G))},_getClassRegex:function(Y){var G;if(Y!==undefined){if(Y.exec){G=Y}else{G=h[Y];if(!G){Y=Y.replace(E.Dom._patterns.CLASS_RE_TOKENS,"\\$1");G=h[Y]=new RegExp(s+Y+k,U)}}}return G},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}])/g},_testElement:function(G,Y){return G&&G[l]==1&&(!Y||Y(G))},_calcBorders:function(x,y){var Y=parseInt(E.Dom[w](x,R),10)||0,G=parseInt(E.Dom[w](x,q),10)||0;if(H){if(N.test(x[C])){Y=0;G=0}}y[0]+=G;y[1]+=Y;return y}};var S=E.Dom[w];if(m.opera){E.Dom[w]=function(Y,G){var x=S(Y,G);if(X.test(G)){x=E.Dom.Color.toRGB(x)}return x}}if(m.webkit){E.Dom[w]=function(Y,G){var x=S(Y,G);if(x==="rgba(0, 0, 0, 0)"){x="transparent"}return x}}})();YAHOO.util.Region=function(C,D,A,B){this.top=C;this.y=C;this[1]=C;this.right=D;this.bottom=A;this.left=B;this.x=B;this[0]=B;this.width=this.right-this.left;this.height=this.bottom-this.top};YAHOO.util.Region.prototype.contains=function(A){return(A.left>=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom)};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left))};YAHOO.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top),D=Math.min(this.right,E.right),A=Math.min(this.bottom,E.bottom),B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new YAHOO.util.Region(C,D,A,B)}else{return null}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top),D=Math.max(this.right,E.right),A=Math.max(this.bottom,E.bottom),B=Math.min(this.left,E.left);return new YAHOO.util.Region(C,D,A,B)};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}")};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D),C=F[1],E=F[0]+D.offsetWidth,A=F[1]+D.offsetHeight,B=F[0];return new YAHOO.util.Region(C,E,A,B)};YAHOO.util.Point=function(A,B){if(YAHOO.lang.isArray(A)){B=A[1];A=A[0]}YAHOO.util.Point.superclass.constructor.call(this,B,A,B,A)};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var B=YAHOO.util,A="clientTop",F="clientLeft",J="parentNode",K="right",W="hasLayout",I="px",U="opacity",L="auto",D="borderLeftWidth",G="borderTopWidth",P="borderRightWidth",V="borderBottomWidth",S="visible",Q="transparent",N="height",E="width",H="style",T="currentStyle",R=/^width|height$/,O=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,M={get:function(X,Z){var Y="",a=X[T][Z];if(Z===U){Y=B.Dom.getStyle(X,U)}else{if(!a||(a.indexOf&&a.indexOf(I)>-1)){Y=a}else{if(B.Dom.IE_COMPUTED[Z]){Y=B.Dom.IE_COMPUTED[Z](X,Z)}else{if(O.test(a)){Y=B.Dom.IE.ComputedStyle.getPixel(X,Z)}else{Y=a}}}}return Y},getOffset:function(Z,e){var b=Z[T][e],X=e.charAt(0).toUpperCase()+e.substr(1),c="offset"+X,Y="pixel"+X,a="",d;if(b==L){d=Z[c];if(d===undefined){a=0}a=d;if(R.test(e)){Z[H][e]=d;if(Z[c]>d){a=d-(Z[c]-d)}Z[H][e]=L}}else{if(!Z[H][Y]&&!Z[H][e]){Z[H][e]=b}a=Z[H][Y]}return a+I},getBorderWidth:function(X,Z){var Y=null;if(!X[T][W]){X[H].zoom=1}switch(Z){case G:Y=X[A];break;case V:Y=X.offsetHeight-X.clientHeight-X[A];break;case D:Y=X[F];break;case P:Y=X.offsetWidth-X.clientWidth-X[F];break}return Y+I},getPixel:function(Y,X){var a=null,b=Y[T][K],Z=Y[T][X];Y[H][K]=Z;a=Y[H].pixelRight;Y[H][K]=b;return a+I},getMargin:function(Y,X){var Z;if(Y[T][X]==L){Z=0+I}else{Z=B.Dom.IE.ComputedStyle.getPixel(Y,X)}return Z},getVisibility:function(Y,X){var Z;while((Z=Y[T])&&Z[X]=="inherit"){Y=Y[J]}return(Z)?Z[X]:S},getColor:function(Y,X){return B.Dom.Color.toRGB(Y[T][X])||Q},getBorderColor:function(Y,X){var Z=Y[T],a=Z[X]||Z.color;return B.Dom.Color.toRGB(B.Dom.Color.toHex(a))}},C={};C.top=C.right=C.bottom=C.left=C[E]=C[N]=M.getOffset;C.color=M.getColor;C[G]=C[P]=C[V]=C[D]=M.getBorderWidth;C.marginTop=C.marginRight=C.marginBottom=C.marginLeft=M.getMargin;C.visibility=M.getVisibility;C.borderColor=C.borderTopColor=C.borderRightColor=C.borderBottomColor=C.borderLeftColor=M.getBorderColor;B.Dom.IE_COMPUTED=C;B.Dom.IE_ComputedStyle=M})();(function(){var C="toString",A=parseInt,B=RegExp,D=YAHOO.util;D.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(E){if(!D.Dom.Color.re_RGB.test(E)){E=D.Dom.Color.toHex(E)}if(D.Dom.Color.re_hex.exec(E)){E="rgb("+[A(B.$1,16),A(B.$2,16),A(B.$3,16)].join(", ")+")"}return E},toHex:function(H){H=D.Dom.Color.KEYWORDS[H]||H;if(D.Dom.Color.re_RGB.exec(H)){var G=(B.$1.length===1)?"0"+B.$1:Number(B.$1),F=(B.$2.length===1)?"0"+B.$2:Number(B.$2),E=(B.$3.length===1)?"0"+B.$3:Number(B.$3);H=[G[C](16),F[C](16),E[C](16)].join("")}if(H.length<6){H=H.replace(D.Dom.Color.re_hex3,"$1$1")}if(H!=="transparent"&&H.indexOf("#")<0){H="#"+H}return H.toLowerCase()}}}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.7.0",build:"1799"});YAHOO.util.CustomEvent=function(D,C,B,A){this.type=D;this.scope=C||window;this.silent=B;this.signature=A||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var E="_YUICEOnSubscribe";if(D!==E){this.subscribeEvent=new YAHOO.util.CustomEvent(E,this,true)}this.lastError=null};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(A,B,C){if(!A){throw new Error("Invalid callback for subscriber to '"+this.type+"'")}if(this.subscribeEvent){this.subscribeEvent.fire(A,B,C)}this.subscribers.push(new YAHOO.util.Subscriber(A,B,C))},unsubscribe:function(D,F){if(!D){return this.unsubscribeAll()}var E=false;for(var B=0,A=this.subscribers.length;B<A;++B){var C=this.subscribers[B];if(C&&C.contains(D,F)){this._delete(B);E=true}}return E},fire:function(){this.lastError=null;var K=[],E=this.subscribers.length;if(!E&&this.silent){return true}var I=[].slice.call(arguments,0),G=true,D,J=false;if(!this.silent){}var C=this.subscribers.slice(),A=YAHOO.util.Event.throwErrors;for(D=0;D<E;++D){var M=C[D];if(!M){J=true}else{if(!this.silent){}var L=M.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var B=null;if(I.length>0){B=I[0]}try{G=M.fn.call(L,B,M.obj)}catch(F){this.lastError=F;if(A){throw F}}}else{try{G=M.fn.call(L,this.type,I,M.obj)}catch(H){this.lastError=H;if(A){throw H}}}if(false===G){if(!this.silent){}break}}}return(G!==false)},unsubscribeAll:function(){var A=this.subscribers.length,B;for(B=A-1;B>-1;B--){this._delete(B)}this.subscribers=[];return A},_delete:function(A){var B=this.subscribers[A];if(B){delete B.fn;delete B.obj}this.subscribers.splice(A,1)},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope}};YAHOO.util.Subscriber=function(A,B,C){this.fn=A;this.obj=YAHOO.lang.isUndefined(B)?null:B;this.overrideContext=C};YAHOO.util.Subscriber.prototype.getScope=function(A){if(this.overrideContext){if(this.overrideContext===true){return this.obj}else{return this.overrideContext}}return A};YAHOO.util.Subscriber.prototype.contains=function(A,B){if(B){return(this.fn==A&&this.obj==B)}else{return(this.fn==A)}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }"};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var H=false;var I=[];var J=[];var G=[];var E=[];var C=0;var F=[];var B=[];var A=0;var D={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9};var K=YAHOO.env.ua.ie?"focusin":"focus";var L=YAHOO.env.ua.ie?"focusout":"blur";return{POLL_RETRYS:2000,POLL_INTERVAL:20,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,_dri:null,DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){var M=this;var N=function(){M._tryPreloadAttach()};this._interval=setInterval(N,this.POLL_INTERVAL)}},onAvailable:function(S,O,Q,R,P){var M=(YAHOO.lang.isString(S))?[S]:S;for(var N=0;N<M.length;N=N+1){F.push({id:M[N],fn:O,obj:Q,overrideContext:R,checkReady:P})}C=this.POLL_RETRYS;this.startInterval()},onContentReady:function(P,M,N,O){this.onAvailable(P,M,N,O,true)},onDOMReady:function(M,N,O){if(this.DOMReady){setTimeout(function(){var P=window;if(O){if(O===true){P=N}else{P=O}}M.call(P,"DOMReady",[],N)},0)}else{this.DOMReadyEvent.subscribe(M,N,O)}},_addListener:function(O,M,Y,S,W,b){if(!Y||!Y.call){return false}if(this._isValidCollection(O)){var Z=true;for(var T=0,V=O.length;T<V;++T){Z=this.on(O[T],M,Y,S,W)&&Z}return Z}else{if(YAHOO.lang.isString(O)){var R=this.getEl(O);if(R){O=R}else{this.onAvailable(O,function(){YAHOO.util.Event.on(O,M,Y,S,W)});return true}}}if(!O){return false}if("unload"==M&&S!==this){J[J.length]=[O,M,Y,S,W];return true}var N=O;if(W){if(W===true){N=S}else{N=W}}var P=function(c){return Y.call(N,YAHOO.util.Event.getEvent(c,O),S)};var a=[O,M,Y,P,N,S,W];var U=I.length;I[U]=a;if(this.useLegacyEvent(O,M)){var Q=this.getLegacyIndex(O,M);if(Q==-1||O!=G[Q][0]){Q=G.length;B[O.id+M]=Q;G[Q]=[O,M,O["on"+M]];E[Q]=[];O["on"+M]=function(c){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(c),Q)}}E[Q].push(a)}else{try{this._simpleAdd(O,M,P,b)}catch(X){this.lastError=X;this.removeListener(O,M,Y);return false}}return true},addListener:function(N,Q,M,O,P){return this._addListener(N,Q,M,O,P,false)},addFocusListener:function(N,M,O,P){return this._addListener(N,K,M,O,P,true)},removeFocusListener:function(N,M){return this.removeListener(N,K,M)},addBlurListener:function(N,M,O,P){return this._addListener(N,L,M,O,P,true)},removeBlurListener:function(N,M){return this.removeListener(N,L,M)},fireLegacyEvent:function(R,P){var T=true,M,V,U,N,S;V=E[P].slice();for(var O=0,Q=V.length;O<Q;++O){U=V[O];if(U&&U[this.WFN]){N=U[this.ADJ_SCOPE];S=U[this.WFN].call(N,R);T=(T&&S)}}M=G[P];if(M&&M[2]){M[2](R)}return T},getLegacyIndex:function(N,O){var M=this.generateId(N)+O;if(typeof B[M]=="undefined"){return-1}else{return B[M]}},useLegacyEvent:function(M,N){return(this.webkit&&this.webkit<419&&("click"==N||"dblclick"==N))},removeListener:function(N,M,V){var Q,T,X;if(typeof N=="string"){N=this.getEl(N)}else{if(this._isValidCollection(N)){var W=true;for(Q=N.length-1;Q>-1;Q--){W=(this.removeListener(N[Q],M,V)&&W)}return W}}if(!V||!V.call){return this.purgeElement(N,false,M)}if("unload"==M){for(Q=J.length-1;Q>-1;Q--){X=J[Q];if(X&&X[0]==N&&X[1]==M&&X[2]==V){J.splice(Q,1);return true}}return false}var R=null;var S=arguments[3];if("undefined"===typeof S){S=this._getCacheIndex(N,M,V)}if(S>=0){R=I[S]}if(!N||!R){return false}if(this.useLegacyEvent(N,M)){var P=this.getLegacyIndex(N,M);var O=E[P];if(O){for(Q=0,T=O.length;Q<T;++Q){X=O[Q];if(X&&X[this.EL]==N&&X[this.TYPE]==M&&X[this.FN]==V){O.splice(Q,1);break}}}}else{try{this._simpleRemove(N,M,R[this.WFN],false)}catch(U){this.lastError=U;return false}}delete I[S][this.WFN];delete I[S][this.FN];I.splice(S,1);return true},getTarget:function(O,N){var M=O.target||O.srcElement;return this.resolveTextNode(M)},resolveTextNode:function(N){try{if(N&&3==N.nodeType){return N.parentNode}}catch(M){}return N},getPageX:function(N){var M=N.pageX;if(!M&&0!==M){M=N.clientX||0;if(this.isIE){M+=this._getScrollLeft()}}return M},getPageY:function(M){var N=M.pageY;if(!N&&0!==N){N=M.clientY||0;if(this.isIE){N+=this._getScrollTop()}}return N},getXY:function(M){return[this.getPageX(M),this.getPageY(M)]},getRelatedTarget:function(N){var M=N.relatedTarget;if(!M){if(N.type=="mouseout"){M=N.toElement}else{if(N.type=="mouseover"){M=N.fromElement}}}return this.resolveTextNode(M)},getTime:function(O){if(!O.time){var N=new Date().getTime();try{O.time=N}catch(M){this.lastError=M;return N}}return O.time},stopEvent:function(M){this.stopPropagation(M);this.preventDefault(M)},stopPropagation:function(M){if(M.stopPropagation){M.stopPropagation()}else{M.cancelBubble=true}},preventDefault:function(M){if(M.preventDefault){M.preventDefault()}else{M.returnValue=false}},getEvent:function(O,M){var N=O||window.event;if(!N){var P=this.getEvent.caller;while(P){N=P.arguments[0];if(N&&Event==N.constructor){break}P=P.caller}}return N},getCharCode:function(N){var M=N.keyCode||N.charCode||0;if(YAHOO.env.ua.webkit&&(M in D)){M=D[M]}return M},_getCacheIndex:function(Q,R,P){for(var O=0,N=I.length;O<N;O=O+1){var M=I[O];if(M&&M[this.FN]==P&&M[this.EL]==Q&&M[this.TYPE]==R){return O}}return-1},generateId:function(M){var N=M.id;if(!N){N="yuievtautoid-"+A;++A;M.id=N}return N},_isValidCollection:function(N){try{return(N&&typeof N!=="string"&&N.length&&!N.tagName&&!N.alert&&typeof N[0]!=="undefined")}catch(M){return false}},elCache:{},getEl:function(M){return(typeof M==="string")?document.getElementById(M):M},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(N){if(!H){H=true;var M=YAHOO.util.Event;M._ready();M._tryPreloadAttach()}},_ready:function(N){var M=YAHOO.util.Event;if(!M.DOMReady){M.DOMReady=true;M.DOMReadyEvent.fire();M._simpleRemove(document,"DOMContentLoaded",M._ready)}},_tryPreloadAttach:function(){if(F.length===0){C=0;if(this._interval){clearInterval(this._interval);this._interval=null}return}if(this.locked){return}if(this.isIE){if(!this.DOMReady){this.startInterval();return}}this.locked=true;var S=!H;if(!S){S=(C>0&&F.length>0)}var R=[];var T=function(V,W){var U=V;if(W.overrideContext){if(W.overrideContext===true){U=W.obj}else{U=W.overrideContext}}W.fn.call(U,W.obj)};var N,M,Q,P,O=[];for(N=0,M=F.length;N<M;N=N+1){Q=F[N];if(Q){P=this.getEl(Q.id);if(P){if(Q.checkReady){if(H||P.nextSibling||!S){O.push(Q);F[N]=null}}else{T(P,Q);F[N]=null}}else{R.push(Q)}}}for(N=0,M=O.length;N<M;N=N+1){Q=O[N];T(this.getEl(Q.id),Q)}C--;if(S){for(N=F.length-1;N>-1;N--){Q=F[N];if(!Q||!Q.id){F.splice(N,1)}}this.startInterval()}else{if(this._interval){clearInterval(this._interval);this._interval=null}}this.locked=false},purgeElement:function(Q,R,T){var O=(YAHOO.lang.isString(Q))?this.getEl(Q):Q;var S=this.getListeners(O,T),P,M;if(S){for(P=S.length-1;P>-1;P--){var N=S[P];this.removeListener(O,N.type,N.fn)}}if(R&&O&&O.childNodes){for(P=0,M=O.childNodes.length;P<M;++P){this.purgeElement(O.childNodes[P],R,T)}}},getListeners:function(O,M){var R=[],N;if(!M){N=[I,J]}else{if(M==="unload"){N=[J]}else{N=[I]}}var T=(YAHOO.lang.isString(O))?this.getEl(O):O;for(var Q=0;Q<N.length;Q=Q+1){var V=N[Q];if(V){for(var S=0,U=V.length;S<U;++S){var P=V[S];if(P&&P[this.EL]===T&&(!M||M===P[this.TYPE])){R.push({type:P[this.TYPE],fn:P[this.FN],obj:P[this.OBJ],adjust:P[this.OVERRIDE],scope:P[this.ADJ_SCOPE],index:S})}}}}return(R.length)?R:null},_unload:function(T){var N=YAHOO.util.Event,Q,P,O,S,R,U=J.slice(),M;for(Q=0,S=J.length;Q<S;++Q){O=U[Q];if(O){M=window;if(O[N.ADJ_SCOPE]){if(O[N.ADJ_SCOPE]===true){M=O[N.UNLOAD_OBJ]}else{M=O[N.ADJ_SCOPE]}}O[N.FN].call(M,N.getEvent(T,O[N.EL]),O[N.UNLOAD_OBJ]);U[Q]=null}}O=null;M=null;J=null;if(I){for(P=I.length-1;P>-1;P--){O=I[P];if(O){N.removeListener(O[N.EL],O[N.TYPE],O[N.FN],P)}}O=null}G=null;N._simpleRemove(window,"unload",N._unload)},_getScrollLeft:function(){return this._getScroll()[1]},_getScrollTop:function(){return this._getScroll()[0]},_getScroll:function(){var M=document.documentElement,N=document.body;if(M&&(M.scrollTop||M.scrollLeft)){return[M.scrollTop,M.scrollLeft]}else{if(N){return[N.scrollTop,N.scrollLeft]}else{return[0,0]}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(O,P,N,M){O.addEventListener(P,N,(M))}}else{if(window.attachEvent){return function(O,P,N,M){O.attachEvent("on"+P,N)}}else{return function(){}}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(O,P,N,M){O.removeEventListener(P,N,(M))}}else{if(window.detachEvent){return function(N,O,M){N.detachEvent("on"+O,M)}}else{return function(){}}}}()}}();(function(){var EU=YAHOO.util.Event;EU.on=EU.addListener;EU.onFocus=EU.addFocusListener;EU.onBlur=EU.addBlurListener;if(EU.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var n=document.createElement("p");EU._dri=setInterval(function(){try{n.doScroll("left");clearInterval(EU._dri);EU._dri=null;EU._ready();n=null}catch(ex){}},EU.POLL_INTERVAL)}else{if(EU.webkit&&EU.webkit<525){EU._dri=setInterval(function(){var rs=document.readyState;if("loaded"==rs||"complete"==rs){clearInterval(EU._dri);EU._dri=null;EU._ready()}},EU.POLL_INTERVAL)}else{EU._simpleAdd(document,"DOMContentLoaded",EU._ready)}}EU._simpleAdd(window,"load",EU._load);EU._simpleAdd(window,"unload",EU._unload);EU._tryPreloadAttach()})()}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(A,C,F,E){this.__yui_events=this.__yui_events||{};var D=this.__yui_events[A];if(D){D.subscribe(C,F,E)}else{this.__yui_subscribers=this.__yui_subscribers||{};var B=this.__yui_subscribers;if(!B[A]){B[A]=[]}B[A].push({fn:C,obj:F,overrideContext:E})}},unsubscribe:function(C,E,G){this.__yui_events=this.__yui_events||{};var A=this.__yui_events;if(C){var F=A[C];if(F){return F.unsubscribe(E,G)}}else{var B=true;for(var D in A){if(YAHOO.lang.hasOwnProperty(A,D)){B=B&&A[D].unsubscribe(E,G)}}return B}return false},unsubscribeAll:function(A){return this.unsubscribe(A)},createEvent:function(G,D){this.__yui_events=this.__yui_events||{};var A=D||{};var I=this.__yui_events;if(I[G]){}else{var H=A.scope||this;var E=(A.silent);var B=new YAHOO.util.CustomEvent(G,H,E,YAHOO.util.CustomEvent.FLAT);I[G]=B;if(A.onSubscribeCallback){B.subscribeEvent.subscribe(A.onSubscribeCallback)}this.__yui_subscribers=this.__yui_subscribers||{};var F=this.__yui_subscribers[G];if(F){for(var C=0;C<F.length;++C){B.subscribe(F[C].fn,F[C].obj,F[C].overrideContext)}}}return I[G]},fireEvent:function(E,D,A,C){this.__yui_events=this.__yui_events||{};var G=this.__yui_events[E];if(!G){return null}var B=[];for(var F=1;F<arguments.length;++F){B.push(arguments[F])}return G.fire.apply(G,B)},hasEvent:function(A){if(this.__yui_events){if(this.__yui_events[A]){return true}}return false}};(function(){var A=YAHOO.util.Event,C=YAHOO.lang;YAHOO.util.KeyListener=function(D,I,E,F){if(!D){}else{if(!I){}else{if(!E){}}}if(!F){F=YAHOO.util.KeyListener.KEYDOWN}var G=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(C.isString(D)){D=document.getElementById(D)}if(C.isFunction(E)){G.subscribe(E)}else{G.subscribe(E.fn,E.scope,E.correctScope)}function H(O,N){if(!I.shift){I.shift=false}if(!I.alt){I.alt=false}if(!I.ctrl){I.ctrl=false}if(O.shiftKey==I.shift&&O.altKey==I.alt&&O.ctrlKey==I.ctrl){var J,M=I.keys,L;if(YAHOO.lang.isArray(M)){for(var K=0;K<M.length;K++){J=M[K];L=A.getCharCode(O);if(J==L){G.fire(L,O);break}}}else{L=A.getCharCode(O);if(M==L){G.fire(L,O)}}}}this.enable=function(){if(!this.enabled){A.on(D,F,H);this.enabledEvent.fire(I)}this.enabled=true};this.disable=function(){if(this.enabled){A.removeListener(D,F,H);this.disabledEvent.fire(I)}this.enabled=false};this.toString=function(){return"KeyListener ["+I.keys+"] "+D.tagName+(D.id?"["+D.id+"]":"")}};var B=YAHOO.util.KeyListener;B.KEYDOWN="keydown";B.KEYUP="keyup";B.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38}})();YAHOO.register("event",YAHOO.util.Event,{version:"2.7.0",build:"1799"});YAHOO.util.Connect={_msxml_progid:["Microsoft.XMLHTTP","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP"],_http_headers:{},_has_http_headers:false,_use_default_post_header:true,_default_post_header:"application/x-www-form-urlencoded; charset=UTF-8",_default_form_header:"application/x-www-form-urlencoded",_use_default_xhr_header:true,_default_xhr_header:"XMLHttpRequest",_has_default_headers:true,_default_headers:{},_isFormSubmit:false,_isFileUpload:false,_formNode:null,_sFormData:null,_poll:{},_timeOut:{},_polling_interval:50,_transaction_id:0,_submitElementValue:null,_hasSubmitListener:(function(){if(YAHOO.util.Event){YAHOO.util.Event.addListener(document,"click",function(C){var B=YAHOO.util.Event.getTarget(C),A=B.nodeName.toLowerCase();if((A==="input"||A==="button")&&(B.type&&B.type.toLowerCase()=="submit")){YAHOO.util.Connect._submitElementValue=encodeURIComponent(B.name)+"="+encodeURIComponent(B.value)}});return true}return false})(),startEvent:new YAHOO.util.CustomEvent("start"),completeEvent:new YAHOO.util.CustomEvent("complete"),successEvent:new YAHOO.util.CustomEvent("success"),failureEvent:new YAHOO.util.CustomEvent("failure"),uploadEvent:new YAHOO.util.CustomEvent("upload"),abortEvent:new YAHOO.util.CustomEvent("abort"),_customEvents:{onStart:["startEvent","start"],onComplete:["completeEvent","complete"],onSuccess:["successEvent","success"],onFailure:["failureEvent","failure"],onUpload:["uploadEvent","upload"],onAbort:["abortEvent","abort"]},setProgId:function(A){this._msxml_progid.unshift(A)},setDefaultPostHeader:function(A){if(typeof A=="string"){this._default_post_header=A}else{if(typeof A=="boolean"){this._use_default_post_header=A}}},setDefaultXhrHeader:function(A){if(typeof A=="string"){this._default_xhr_header=A}else{this._use_default_xhr_header=A}},setPollingInterval:function(A){if(typeof A=="number"&&isFinite(A)){this._polling_interval=A}},createXhrObject:function(F){var E,A;try{A=new XMLHttpRequest();E={conn:A,tId:F}}catch(D){for(var B=0;B<this._msxml_progid.length;++B){try{A=new ActiveXObject(this._msxml_progid[B]);E={conn:A,tId:F};break}catch(C){}}}finally{return E}},getConnectionObject:function(A){var C;var D=this._transaction_id;try{if(!A){C=this.createXhrObject(D)}else{C={};C.tId=D;C.isUpload=true}if(C){this._transaction_id++}}catch(B){}finally{return C}},asyncRequest:function(F,C,E,A){var D=(this._isFileUpload)?this.getConnectionObject(true):this.getConnectionObject();var B=(E&&E.argument)?E.argument:null;if(!D){return null}else{if(E&&E.customevents){this.initCustomEvents(D,E)}if(this._isFormSubmit){if(this._isFileUpload){this.uploadFile(D,E,C,A);return D}if(F.toUpperCase()=="GET"){if(this._sFormData.length!==0){C+=((C.indexOf("?")==-1)?"?":"&")+this._sFormData}}else{if(F.toUpperCase()=="POST"){A=A?this._sFormData+"&"+A:this._sFormData}}}if(F.toUpperCase()=="GET"&&(E&&E.cache===false)){C+=((C.indexOf("?")==-1)?"?":"&")+"rnd="+new Date().valueOf().toString()}D.conn.open(F,C,true);if(this._use_default_xhr_header){if(!this._default_headers["X-Requested-With"]){this.initHeader("X-Requested-With",this._default_xhr_header,true)}}if((F.toUpperCase()==="POST"&&this._use_default_post_header)&&this._isFormSubmit===false){this.initHeader("Content-Type",this._default_post_header)}if(this._has_default_headers||this._has_http_headers){this.setHeader(D)}this.handleReadyState(D,E);D.conn.send(A||"");if(this._isFormSubmit===true){this.resetFormState()}this.startEvent.fire(D,B);if(D.startEvent){D.startEvent.fire(D,B)}return D}},initCustomEvents:function(A,C){var B;for(B in C.customevents){if(this._customEvents[B][0]){A[this._customEvents[B][0]]=new YAHOO.util.CustomEvent(this._customEvents[B][1],(C.scope)?C.scope:null);A[this._customEvents[B][0]].subscribe(C.customevents[B])}}},handleReadyState:function(C,D){var B=this;var A=(D&&D.argument)?D.argument:null;if(D&&D.timeout){this._timeOut[C.tId]=window.setTimeout(function(){B.abort(C,D,true)},D.timeout)}this._poll[C.tId]=window.setInterval(function(){if(C.conn&&C.conn.readyState===4){window.clearInterval(B._poll[C.tId]);delete B._poll[C.tId];if(D&&D.timeout){window.clearTimeout(B._timeOut[C.tId]);delete B._timeOut[C.tId]}B.completeEvent.fire(C,A);if(C.completeEvent){C.completeEvent.fire(C,A)}B.handleTransactionResponse(C,D)}},this._polling_interval)},handleTransactionResponse:function(F,G,A){var D,C;var B=(G&&G.argument)?G.argument:null;try{if(F.conn.status!==undefined&&F.conn.status!==0){D=F.conn.status}else{D=13030}}catch(E){D=13030}if(D>=200&&D<300||D===1223){C=this.createResponseObject(F,B);if(G&&G.success){if(!G.scope){G.success(C)}else{G.success.apply(G.scope,[C])}}this.successEvent.fire(C);if(F.successEvent){F.successEvent.fire(C)}}else{switch(D){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:C=this.createExceptionObject(F.tId,B,(A?A:false));if(G&&G.failure){if(!G.scope){G.failure(C)}else{G.failure.apply(G.scope,[C])}}break;default:C=this.createResponseObject(F,B);if(G&&G.failure){if(!G.scope){G.failure(C)}else{G.failure.apply(G.scope,[C])}}}this.failureEvent.fire(C);if(F.failureEvent){F.failureEvent.fire(C)}}this.releaseObject(F);C=null},createResponseObject:function(A,G){var D={};var I={};try{var C=A.conn.getAllResponseHeaders();var F=C.split("\n");for(var E=0;E<F.length;E++){var B=F[E].indexOf(":");if(B!=-1){I[F[E].substring(0,B)]=F[E].substring(B+2)}}}catch(H){}D.tId=A.tId;D.status=(A.conn.status==1223)?204:A.conn.status;D.statusText=(A.conn.status==1223)?"No Content":A.conn.statusText;D.getResponseHeader=I;D.getAllResponseHeaders=C;D.responseText=A.conn.responseText;D.responseXML=A.conn.responseXML;if(G){D.argument=G}return D},createExceptionObject:function(H,D,A){var F=0;var G="communication failure";var C=-1;var B="transaction aborted";var E={};E.tId=H;if(A){E.status=C;E.statusText=B}else{E.status=F;E.statusText=G}if(D){E.argument=D}return E},initHeader:function(A,D,C){var B=(C)?this._default_headers:this._http_headers;B[A]=D;if(C){this._has_default_headers=true}else{this._has_http_headers=true}},setHeader:function(A){var B;if(this._has_default_headers){for(B in this._default_headers){if(YAHOO.lang.hasOwnProperty(this._default_headers,B)){A.conn.setRequestHeader(B,this._default_headers[B])}}}if(this._has_http_headers){for(B in this._http_headers){if(YAHOO.lang.hasOwnProperty(this._http_headers,B)){A.conn.setRequestHeader(B,this._http_headers[B])}}delete this._http_headers;this._http_headers={};this._has_http_headers=false}},resetDefaultHeaders:function(){delete this._default_headers;this._default_headers={};this._has_default_headers=false},setForm:function(M,H,C){var L,B,K,I,P,J=false,F=[],O=0,E,G,D,N,A;this.resetFormState();if(typeof M=="string"){L=(document.getElementById(M)||document.forms[M])}else{if(typeof M=="object"){L=M}else{return}}if(H){this.createFrame(C?C:null);this._isFormSubmit=true;this._isFileUpload=true;this._formNode=L;return}for(E=0,G=L.elements.length;E<G;++E){B=L.elements[E];P=B.disabled;K=B.name;if(!P&&K){K=encodeURIComponent(K)+"=";I=encodeURIComponent(B.value);switch(B.type){case"select-one":if(B.selectedIndex>-1){A=B.options[B.selectedIndex];F[O++]=K+encodeURIComponent((A.attributes.value&&A.attributes.value.specified)?A.value:A.text)}break;case"select-multiple":if(B.selectedIndex>-1){for(D=B.selectedIndex,N=B.options.length;D<N;++D){A=B.options[D];if(A.selected){F[O++]=K+encodeURIComponent((A.attributes.value&&A.attributes.value.specified)?A.value:A.text)}}}break;case"radio":case"checkbox":if(B.checked){F[O++]=K+I}break;case"file":case undefined:case"reset":case"button":break;case"submit":if(J===false){if(this._hasSubmitListener&&this._submitElementValue){F[O++]=this._submitElementValue}J=true}break;default:F[O++]=K+I}}}this._isFormSubmit=true;this._sFormData=F.join("&");this.initHeader("Content-Type",this._default_form_header);return this._sFormData},resetFormState:function(){this._isFormSubmit=false;this._isFileUpload=false;this._formNode=null;this._sFormData=""},createFrame:function(A){var B="yuiIO"+this._transaction_id;var C;if(YAHOO.env.ua.ie){C=document.createElement('<iframe id="'+B+'" name="'+B+'" />');if(typeof A=="boolean"){C.src="javascript:false"}}else{C=document.createElement("iframe");C.id=B;C.name=B}C.style.position="absolute";C.style.top="-1000px";C.style.left="-1000px";document.body.appendChild(C)},appendPostData:function(A){var D=[],B=A.split("&"),C,E;for(C=0;C<B.length;C++){E=B[C].indexOf("=");if(E!=-1){D[C]=document.createElement("input");D[C].type="hidden";D[C].name=decodeURIComponent(B[C].substring(0,E));D[C].value=decodeURIComponent(B[C].substring(E+1));this._formNode.appendChild(D[C])}}return D},uploadFile:function(D,N,E,C){var I="yuiIO"+D.tId,J="multipart/form-data",L=document.getElementById(I),O=this,K=(N&&N.argument)?N.argument:null,M,H,B,G;var A={action:this._formNode.getAttribute("action"),method:this._formNode.getAttribute("method"),target:this._formNode.getAttribute("target")};this._formNode.setAttribute("action",E);this._formNode.setAttribute("method","POST");this._formNode.setAttribute("target",I);if(YAHOO.env.ua.ie){this._formNode.setAttribute("encoding",J)}else{this._formNode.setAttribute("enctype",J)}if(C){M=this.appendPostData(C)}this._formNode.submit();this.startEvent.fire(D,K);if(D.startEvent){D.startEvent.fire(D,K)}if(N&&N.timeout){this._timeOut[D.tId]=window.setTimeout(function(){O.abort(D,N,true)},N.timeout)}if(M&&M.length>0){for(H=0;H<M.length;H++){this._formNode.removeChild(M[H])}}for(B in A){if(YAHOO.lang.hasOwnProperty(A,B)){if(A[B]){this._formNode.setAttribute(B,A[B])}else{this._formNode.removeAttribute(B)}}}this.resetFormState();var F=function(){if(N&&N.timeout){window.clearTimeout(O._timeOut[D.tId]);delete O._timeOut[D.tId]}O.completeEvent.fire(D,K);if(D.completeEvent){D.completeEvent.fire(D,K)}G={tId:D.tId,argument:N.argument};try{G.responseText=L.contentWindow.document.body?L.contentWindow.document.body.innerHTML:L.contentWindow.document.documentElement.textContent;G.responseXML=L.contentWindow.document.XMLDocument?L.contentWindow.document.XMLDocument:L.contentWindow.document}catch(P){}if(N&&N.upload){if(!N.scope){N.upload(G)}else{N.upload.apply(N.scope,[G])}}O.uploadEvent.fire(G);if(D.uploadEvent){D.uploadEvent.fire(G)}YAHOO.util.Event.removeListener(L,"load",F);setTimeout(function(){document.body.removeChild(L);O.releaseObject(D)},100)};YAHOO.util.Event.addListener(L,"load",F)},abort:function(E,G,A){var D;var B=(G&&G.argument)?G.argument:null;if(E&&E.conn){if(this.isCallInProgress(E)){E.conn.abort();window.clearInterval(this._poll[E.tId]);delete this._poll[E.tId];if(A){window.clearTimeout(this._timeOut[E.tId]);delete this._timeOut[E.tId]}D=true}}else{if(E&&E.isUpload===true){var C="yuiIO"+E.tId;var F=document.getElementById(C);if(F){YAHOO.util.Event.removeListener(F,"load");document.body.removeChild(F);if(A){window.clearTimeout(this._timeOut[E.tId]);delete this._timeOut[E.tId]}D=true}}else{D=false}}if(D===true){this.abortEvent.fire(E,B);if(E.abortEvent){E.abortEvent.fire(E,B)}this.handleTransactionResponse(E,G,true)}return D},isCallInProgress:function(B){if(B&&B.conn){return B.conn.readyState!==4&&B.conn.readyState!==0}else{if(B&&B.isUpload===true){var A="yuiIO"+B.tId;return document.getElementById(A)?true:false}else{return false}}},releaseObject:function(A){if(A&&A.conn){A.conn=null;A=null}}};YAHOO.register("connection",YAHOO.util.Connect,{version:"2.7.0",build:"1799"});(function(){var B=YAHOO.util;var A=function(D,C,E,F){if(!D){}this.init(D,C,E,F)};A.NAME="Anim";A.prototype={toString:function(){var C=this.getEl()||{};var D=C.id||C.tagName;return(this.constructor.NAME+": "+D)},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(C,E,D){return this.method(this.currentFrame,E,D-E,this.totalFrames)},setAttribute:function(C,F,E){var D=this.getEl();if(this.patterns.noNegatives.test(C)){F=(F>0)?F:0}if("style"in D){B.Dom.setStyle(D,C,F+E)}else{if(C in D){D[C]=F}}},getAttribute:function(C){var E=this.getEl();var G=B.Dom.getStyle(E,C);if(G!=="auto"&&!this.patterns.offsetUnit.test(G)){return parseFloat(G)}var D=this.patterns.offsetAttribute.exec(C)||[];var H=!!(D[3]);var F=!!(D[2]);if("style"in E){if(F||(B.Dom.getStyle(E,"position")=="absolute"&&H)){G=E["offset"+D[0].charAt(0).toUpperCase()+D[0].substr(1)]}else{G=0}}else{if(C in E){G=E[C]}}return G},getDefaultUnit:function(C){if(this.patterns.defaultUnit.test(C)){return"px"}return""},setRuntimeAttribute:function(D){var I;var E;var F=this.attributes;this.runtimeAttributes[D]={};var H=function(J){return(typeof J!=="undefined")};if(!H(F[D]["to"])&&!H(F[D]["by"])){return false}I=(H(F[D]["from"]))?F[D]["from"]:this.getAttribute(D);if(H(F[D]["to"])){E=F[D]["to"]}else{if(H(F[D]["by"])){if(I.constructor==Array){E=[];for(var G=0,C=I.length;G<C;++G){E[G]=I[G]+F[D]["by"][G]*1}}else{E=I+F[D]["by"]*1}}}this.runtimeAttributes[D].start=I;this.runtimeAttributes[D].end=E;this.runtimeAttributes[D].unit=(H(F[D].unit))?F[D]["unit"]:this.getDefaultUnit(D);return true},init:function(E,J,I,C){var D=false;var F=null;var H=0;E=B.Dom.get(E);this.attributes=J||{};this.duration=!YAHOO.lang.isUndefined(I)?I:1;this.method=C||B.Easing.easeNone;this.useSeconds=true;this.currentFrame=0;this.totalFrames=B.AnimMgr.fps;this.setEl=function(M){E=B.Dom.get(M)};this.getEl=function(){return E};this.isAnimated=function(){return D};this.getStartTime=function(){return F};this.runtimeAttributes={};this.animate=function(){if(this.isAnimated()){return false}this.currentFrame=0;this.totalFrames=(this.useSeconds)?Math.ceil(B.AnimMgr.fps*this.duration):this.duration;if(this.duration===0&&this.useSeconds){this.totalFrames=1}B.AnimMgr.registerElement(this);return true};this.stop=function(M){if(!this.isAnimated()){return false}if(M){this.currentFrame=this.totalFrames;this._onTween.fire()}B.AnimMgr.stop(this)};var L=function(){this.onStart.fire();this.runtimeAttributes={};for(var M in this.attributes){this.setRuntimeAttribute(M)}D=true;H=0;F=new Date()};var K=function(){var O={duration:new Date()-this.getStartTime(),currentFrame:this.currentFrame};O.toString=function(){return("duration: "+O.duration+", currentFrame: "+O.currentFrame)};this.onTween.fire(O);var N=this.runtimeAttributes;for(var M in N){this.setAttribute(M,this.doMethod(M,N[M].start,N[M].end),N[M].unit)}H+=1};var G=function(){var M=(new Date()-F)/1000;var N={duration:M,frames:H,fps:H/M};N.toString=function(){return("duration: "+N.duration+", frames: "+N.frames+", fps: "+N.fps)};D=false;H=0;this.onComplete.fire(N)};this._onStart=new B.CustomEvent("_start",this,true);this.onStart=new B.CustomEvent("start",this);this.onTween=new B.CustomEvent("tween",this);this._onTween=new B.CustomEvent("_tween",this,true);this.onComplete=new B.CustomEvent("complete",this);this._onComplete=new B.CustomEvent("_complete",this,true);this._onStart.subscribe(L);this._onTween.subscribe(K);this._onComplete.subscribe(G)}};B.Anim=A})();YAHOO.util.AnimMgr=new function(){var C=null;var B=[];var A=0;this.fps=1000;this.delay=1;this.registerElement=function(F){B[B.length]=F;A+=1;F._onStart.fire();this.start()};this.unRegister=function(G,F){F=F||E(G);if(!G.isAnimated()||F==-1){return false}G._onComplete.fire();B.splice(F,1);A-=1;if(A<=0){this.stop()}return true};this.start=function(){if(C===null){C=setInterval(this.run,this.delay)}};this.stop=function(H){if(!H){clearInterval(C);for(var G=0,F=B.length;G<F;++G){this.unRegister(B[0],0)}B=[];C=null;A=0}else{this.unRegister(H)}};this.run=function(){for(var H=0,F=B.length;H<F;++H){var G=B[H];if(!G||!G.isAnimated()){continue}if(G.currentFrame<G.totalFrames||G.totalFrames===null){G.currentFrame+=1;if(G.useSeconds){D(G)}G._onTween.fire()}else{YAHOO.util.AnimMgr.stop(G,H)}}};var E=function(H){for(var G=0,F=B.length;G<F;++G){if(B[G]==H){return G}}return-1};var D=function(G){var J=G.totalFrames;var I=G.currentFrame;var H=(G.currentFrame*G.duration*1000/G.totalFrames);var F=(new Date()-G.getStartTime());var K=0;if(F<G.duration*1000){K=Math.round((F/H-1)*G.currentFrame)}else{K=J-(I+1)}if(K>0&&isFinite(K)){if(G.currentFrame+K>=J){K=J-(I+1)}G.currentFrame+=K}}};YAHOO.util.Bezier=new function(){this.getPosition=function(E,D){var F=E.length;var C=[];for(var B=0;B<F;++B){C[B]=[E[B][0],E[B][1]]}for(var A=1;A<F;++A){for(B=0;B<F-A;++B){C[B][0]=(1-D)*C[B][0]+D*C[parseInt(B+1,10)][0];C[B][1]=(1-D)*C[B][1]+D*C[parseInt(B+1,10)][1]}}return[C[0][0],C[0][1]]}};(function(){var A=function(F,E,G,H){A.superclass.constructor.call(this,F,E,G,H)};A.NAME="ColorAnim";A.DEFAULT_BGCOLOR="#fff";var C=YAHOO.util;YAHOO.extend(A,C.Anim);var D=A.superclass;var B=A.prototype;B.patterns.color=/color$/i;B.patterns.rgb=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;B.patterns.hex=/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;B.patterns.hex3=/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;B.patterns.transparent=/^transparent|rgba\(0, 0, 0, 0\)$/;B.parseColor=function(E){if(E.length==3){return E}var F=this.patterns.hex.exec(E);if(F&&F.length==4){return[parseInt(F[1],16),parseInt(F[2],16),parseInt(F[3],16)]}F=this.patterns.rgb.exec(E);if(F&&F.length==4){return[parseInt(F[1],10),parseInt(F[2],10),parseInt(F[3],10)]}F=this.patterns.hex3.exec(E);if(F&&F.length==4){return[parseInt(F[1]+F[1],16),parseInt(F[2]+F[2],16),parseInt(F[3]+F[3],16)]}return null};B.getAttribute=function(E){var G=this.getEl();if(this.patterns.color.test(E)){var I=YAHOO.util.Dom.getStyle(G,E);var H=this;if(this.patterns.transparent.test(I)){var F=YAHOO.util.Dom.getAncestorBy(G,function(J){return!H.patterns.transparent.test(I)});if(F){I=C.Dom.getStyle(F,E)}else{I=A.DEFAULT_BGCOLOR}}}else{I=D.getAttribute.call(this,E)}return I};B.doMethod=function(F,J,G){var I;if(this.patterns.color.test(F)){I=[];for(var H=0,E=J.length;H<E;++H){I[H]=D.doMethod.call(this,F,J[H],G[H])}I="rgb("+Math.floor(I[0])+","+Math.floor(I[1])+","+Math.floor(I[2])+")"}else{I=D.doMethod.call(this,F,J,G)}return I};B.setRuntimeAttribute=function(F){D.setRuntimeAttribute.call(this,F);if(this.patterns.color.test(F)){var H=this.attributes;var J=this.parseColor(this.runtimeAttributes[F].start);var G=this.parseColor(this.runtimeAttributes[F].end);if(typeof H[F]["to"]==="undefined"&&typeof H[F]["by"]!=="undefined"){G=this.parseColor(H[F].by);for(var I=0,E=J.length;I<E;++I){G[I]=J[I]+G[I]}}this.runtimeAttributes[F].start=J;this.runtimeAttributes[F].end=G}};C.ColorAnim=A})();YAHOO.util.Easing={easeNone:function(B,A,D,C){return D*B/C+A},easeIn:function(B,A,D,C){return D*(B/=C)*B+A},easeOut:function(B,A,D,C){return-D*(B/=C)*(B-2)+A},easeBoth:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B+A}return-D/2*((--B)*(B-2)-1)+A},easeInStrong:function(B,A,D,C){return D*(B/=C)*B*B*B+A},easeOutStrong:function(B,A,D,C){return-D*((B=B/C-1)*B*B*B-1)+A},easeBothStrong:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B*B*B+A}return-D/2*((B-=2)*B*B*B-2)+A},elasticIn:function(C,A,G,F,B,E){if(C==0){return A}if((C/=F)==1){return A+G}if(!E){E=F*0.3}if(!B||B<Math.abs(G)){B=G;var D=E/4}else{var D=E/(2*Math.PI)*Math.asin(G/B)}return-(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A},elasticOut:function(C,A,G,F,B,E){if(C==0){return A}if((C/=F)==1){return A+G}if(!E){E=F*0.3}if(!B||B<Math.abs(G)){B=G;var D=E/4}else{var D=E/(2*Math.PI)*Math.asin(G/B)}return B*Math.pow(2,-10*C)*Math.sin((C*F-D)*(2*Math.PI)/E)+G+A},elasticBoth:function(C,A,G,F,B,E){if(C==0){return A}if((C/=F/2)==2){return A+G}if(!E){E=F*(0.3*1.5)}if(!B||B<Math.abs(G)){B=G;var D=E/4}else{var D=E/(2*Math.PI)*Math.asin(G/B)}if(C<1){return-0.5*(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A}return B*Math.pow(2,-10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E)*0.5+G+A},backIn:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158}return E*(B/=D)*B*((C+1)*B-C)+A},backOut:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158}return E*((B=B/D-1)*B*((C+1)*B+C)+1)+A},backBoth:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158}if((B/=D/2)<1){return E/2*(B*B*(((C*=(1.525))+1)*B-C))+A}return E/2*((B-=2)*B*(((C*=(1.525))+1)*B+C)+2)+A},bounceIn:function(B,A,D,C){return D-YAHOO.util.Easing.bounceOut(C-B,0,D,C)+A},bounceOut:function(B,A,D,C){if((B/=C)<(1/2.75)){return D*(7.5625*B*B)+A}else{if(B<(2/2.75)){return D*(7.5625*(B-=(1.5/2.75))*B+0.75)+A}else{if(B<(2.5/2.75)){return D*(7.5625*(B-=(2.25/2.75))*B+0.9375)+A}}}return D*(7.5625*(B-=(2.625/2.75))*B+0.984375)+A},bounceBoth:function(B,A,D,C){if(B<C/2){return YAHOO.util.Easing.bounceIn(B*2,0,D,C)*0.5+A}return YAHOO.util.Easing.bounceOut(B*2-C,0,D,C)*0.5+D*0.5+A}};(function(){var A=function(H,G,I,J){if(H){A.superclass.constructor.call(this,H,G,I,J)}};A.NAME="Motion";var E=YAHOO.util;YAHOO.extend(A,E.ColorAnim);var F=A.superclass;var C=A.prototype;C.patterns.points=/^points$/i;C.setAttribute=function(G,I,H){if(this.patterns.points.test(G)){H=H||"px";F.setAttribute.call(this,"left",I[0],H);F.setAttribute.call(this,"top",I[1],H)}else{F.setAttribute.call(this,G,I,H)}};C.getAttribute=function(G){if(this.patterns.points.test(G)){var H=[F.getAttribute.call(this,"left"),F.getAttribute.call(this,"top")]}else{H=F.getAttribute.call(this,G)}return H};C.doMethod=function(G,K,H){var J=null;if(this.patterns.points.test(G)){var I=this.method(this.currentFrame,0,100,this.totalFrames)/100;J=E.Bezier.getPosition(this.runtimeAttributes[G],I)}else{J=F.doMethod.call(this,G,K,H)}return J};C.setRuntimeAttribute=function(P){if(this.patterns.points.test(P)){var H=this.getEl();var J=this.attributes;var G;var L=J["points"]["control"]||[];var I;var M,O;if(L.length>0&&!(L[0]instanceof Array)){L=[L]}else{var K=[];for(M=0,O=L.length;M<O;++M){K[M]=L[M]}L=K}if(E.Dom.getStyle(H,"position")=="static"){E.Dom.setStyle(H,"position","relative")}if(D(J["points"]["from"])){E.Dom.setXY(H,J["points"]["from"])}else{E.Dom.setXY(H,E.Dom.getXY(H))}G=this.getAttribute("points");if(D(J["points"]["to"])){I=B.call(this,J["points"]["to"],G);var N=E.Dom.getXY(this.getEl());for(M=0,O=L.length;M<O;++M){L[M]=B.call(this,L[M],G)}}else{if(D(J["points"]["by"])){I=[G[0]+J["points"]["by"][0],G[1]+J["points"]["by"][1]];for(M=0,O=L.length;M<O;++M){L[M]=[G[0]+L[M][0],G[1]+L[M][1]]}}}this.runtimeAttributes[P]=[G];if(L.length>0){this.runtimeAttributes[P]=this.runtimeAttributes[P].concat(L)}this.runtimeAttributes[P][this.runtimeAttributes[P].length]=I}else{F.setRuntimeAttribute.call(this,P)}};var B=function(G,I){var H=E.Dom.getXY(this.getEl());G=[G[0]-H[0]+I[0],G[1]-H[1]+I[1]];return G};var D=function(G){return(typeof G!=="undefined")};E.Motion=A})();(function(){var D=function(F,E,G,H){if(F){D.superclass.constructor.call(this,F,E,G,H)}};D.NAME="Scroll";var B=YAHOO.util;YAHOO.extend(D,B.ColorAnim);var C=D.superclass;var A=D.prototype;A.doMethod=function(E,H,F){var G=null;if(E=="scroll"){G=[this.method(this.currentFrame,H[0],F[0]-H[0],this.totalFrames),this.method(this.currentFrame,H[1],F[1]-H[1],this.totalFrames)]}else{G=C.doMethod.call(this,E,H,F)}return G};A.getAttribute=function(E){var G=null;var F=this.getEl();if(E=="scroll"){G=[F.scrollLeft,F.scrollTop]}else{G=C.getAttribute.call(this,E)}return G};A.setAttribute=function(E,H,G){var F=this.getEl();if(E=="scroll"){F.scrollLeft=H[0];F.scrollTop=H[1]}else{C.setAttribute.call(this,E,H,G)}};B.Scroll=D})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.7.0",build:"1799"});if(!YAHOO.util.DragDropMgr){YAHOO.util.DragDropMgr=function(){var A=YAHOO.util.Event,B=YAHOO.util.Dom;return{useShim:false,_shimActive:false,_shimState:false,_debugShim:false,_createShim:function(){var C=document.createElement("div");C.id="yui-ddm-shim";if(document.body.firstChild){document.body.insertBefore(C,document.body.firstChild)}else{document.body.appendChild(C)}C.style.display="none";C.style.backgroundColor="red";C.style.position="absolute";C.style.zIndex="99999";B.setStyle(C,"opacity","0");this._shim=C;A.on(C,"mouseup",this.handleMouseUp,this,true);A.on(C,"mousemove",this.handleMouseMove,this,true);A.on(window,"scroll",this._sizeShim,this,true)},_sizeShim:function(){if(this._shimActive){var C=this._shim;C.style.height=B.getDocumentHeight()+"px";C.style.width=B.getDocumentWidth()+"px";C.style.top="0";C.style.left="0"}},_activateShim:function(){if(this.useShim){if(!this._shim){this._createShim()}this._shimActive=true;var C=this._shim,D="0";if(this._debugShim){D=".5"}B.setStyle(C,"opacity",D);this._sizeShim();C.style.display="block"}},_deactivateShim:function(){this._shim.style.display="none";this._shimActive=false},_shim:null,ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,interactionInfo:null,init:function(){this.initialized=true},POINT:0,INTERSECT:1,STRICT_INTERSECT:2,mode:0,_execOnAll:function(E,D){for(var F in this.ids){for(var C in this.ids[F]){var G=this.ids[F][C];if(!this.isTypeOfDD(G)){continue}G[E].apply(G,D)}}},_onLoad:function(){this.init();A.on(document,"mouseup",this.handleMouseUp,this,true);A.on(document,"mousemove",this.handleMouseMove,this,true);A.on(window,"unload",this._onUnload,this,true);A.on(window,"resize",this._onResize,this,true)},_onResize:function(C){this._execOnAll("resetConstraints",[])},lock:function(){this.locked=true},unlock:function(){this.locked=false},isLocked:function(){return this.locked},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:1000,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,fromTimeout:false,regDragDrop:function(D,C){if(!this.initialized){this.init()}if(!this.ids[C]){this.ids[C]={}}this.ids[C][D.id]=D},removeDDFromGroup:function(E,C){if(!this.ids[C]){this.ids[C]={}}var D=this.ids[C];if(D&&D[E.id]){delete D[E.id]}},_remove:function(E){for(var D in E.groups){if(D){var C=this.ids[D];if(C&&C[E.id]){delete C[E.id]}}}delete this.handleIds[E.id]},regHandle:function(D,C){if(!this.handleIds[D]){this.handleIds[D]={}}this.handleIds[D][C]=C},isDragDrop:function(C){return(this.getDDById(C))?true:false},getRelated:function(H,D){var G=[];for(var F in H.groups){for(var E in this.ids[F]){var C=this.ids[F][E];if(!this.isTypeOfDD(C)){continue}if(!D||C.isTarget){G[G.length]=C}}}return G},isLegalTarget:function(G,F){var D=this.getRelated(G,true);for(var E=0,C=D.length;E<C;++E){if(D[E].id==F.id){return true}}return false},isTypeOfDD:function(C){return(C&&C.__ygDragDrop)},isHandle:function(D,C){return(this.handleIds[D]&&this.handleIds[D][C])},getDDById:function(D){for(var C in this.ids){if(this.ids[C][D]){return this.ids[C][D]}}return null},handleMouseDown:function(E,D){this.currentTarget=YAHOO.util.Event.getTarget(E);this.dragCurrent=D;var C=D.getEl();this.startX=YAHOO.util.Event.getPageX(E);this.startY=YAHOO.util.Event.getPageY(E);this.deltaX=this.startX-C.offsetLeft;this.deltaY=this.startY-C.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var F=YAHOO.util.DDM;F.startDrag(F.startX,F.startY);F.fromTimeout=true},this.clickTimeThresh)},startDrag:function(C,E){if(this.dragCurrent&&this.dragCurrent.useShim){this._shimState=this.useShim;this.useShim=true}this._activateShim();clearTimeout(this.clickTimeout);var D=this.dragCurrent;if(D&&D.events.b4StartDrag){D.b4StartDrag(C,E);D.fireEvent("b4StartDragEvent",{x:C,y:E})}if(D&&D.events.startDrag){D.startDrag(C,E);D.fireEvent("startDragEvent",{x:C,y:E})}this.dragThreshMet=true},handleMouseUp:function(C){if(this.dragCurrent){clearTimeout(this.clickTimeout);if(this.dragThreshMet){if(this.fromTimeout){this.fromTimeout=false;this.handleMouseMove(C)}this.fromTimeout=false;this.fireEvents(C,true)}else{}this.stopDrag(C);this.stopEvent(C)}},stopEvent:function(C){if(this.stopPropagation){YAHOO.util.Event.stopPropagation(C)}if(this.preventDefault){YAHOO.util.Event.preventDefault(C)}},stopDrag:function(E,D){var C=this.dragCurrent;if(C&&!D){if(this.dragThreshMet){if(C.events.b4EndDrag){C.b4EndDrag(E);C.fireEvent("b4EndDragEvent",{e:E})}if(C.events.endDrag){C.endDrag(E);C.fireEvent("endDragEvent",{e:E})}}if(C.events.mouseUp){C.onMouseUp(E);C.fireEvent("mouseUpEvent",{e:E})}}if(this._shimActive){this._deactivateShim();if(this.dragCurrent&&this.dragCurrent.useShim){this.useShim=this._shimState;this._shimState=false}}this.dragCurrent=null;this.dragOvers={}},handleMouseMove:function(F){var C=this.dragCurrent;if(C){if(YAHOO.util.Event.isIE&&!F.button){this.stopEvent(F);return this.handleMouseUp(F)}else{if(F.clientX<0||F.clientY<0){}}if(!this.dragThreshMet){var E=Math.abs(this.startX-YAHOO.util.Event.getPageX(F));var D=Math.abs(this.startY-YAHOO.util.Event.getPageY(F));if(E>this.clickPixelThresh||D>this.clickPixelThresh){this.startDrag(this.startX,this.startY)}}if(this.dragThreshMet){if(C&&C.events.b4Drag){C.b4Drag(F);C.fireEvent("b4DragEvent",{e:F})}if(C&&C.events.drag){C.onDrag(F);C.fireEvent("dragEvent",{e:F})}if(C){this.fireEvents(F,false)}}this.stopEvent(F)}},fireEvents:function(V,L){var a=this.dragCurrent;if(!a||a.isLocked()||a.dragOnly){return}var N=YAHOO.util.Event.getPageX(V),M=YAHOO.util.Event.getPageY(V),P=new YAHOO.util.Point(N,M),K=a.getTargetCoord(P.x,P.y),F=a.getDragEl(),E=["out","over","drop","enter"],U=new YAHOO.util.Region(K.y,K.x+F.offsetWidth,K.y+F.offsetHeight,K.x),I=[],D={},Q=[],c={outEvts:[],overEvts:[],dropEvts:[],enterEvts:[]};for(var S in this.dragOvers){var d=this.dragOvers[S];if(!this.isTypeOfDD(d)){continue}if(!this.isOverTarget(P,d,this.mode,U)){c.outEvts.push(d)}I[S]=true;delete this.dragOvers[S]}for(var R in a.groups){if("string"!=typeof R){continue}for(S in this.ids[R]){var G=this.ids[R][S];if(!this.isTypeOfDD(G)){continue}if(G.isTarget&&!G.isLocked()&&G!=a){if(this.isOverTarget(P,G,this.mode,U)){D[R]=true;if(L){c.dropEvts.push(G)}else{if(!I[G.id]){c.enterEvts.push(G)}else{c.overEvts.push(G)}this.dragOvers[G.id]=G}}}}}this.interactionInfo={out:c.outEvts,enter:c.enterEvts,over:c.overEvts,drop:c.dropEvts,point:P,draggedRegion:U,sourceRegion:this.locationCache[a.id],validDrop:L};for(var C in D){Q.push(C)}if(L&&!c.dropEvts.length){this.interactionInfo.validDrop=false;if(a.events.invalidDrop){a.onInvalidDrop(V);a.fireEvent("invalidDropEvent",{e:V})}}for(S=0;S<E.length;S++){var Y=null;if(c[E[S]+"Evts"]){Y=c[E[S]+"Evts"]}if(Y&&Y.length){var H=E[S].charAt(0).toUpperCase()+E[S].substr(1),X="onDrag"+H,J="b4Drag"+H,O="drag"+H+"Event",W="drag"+H;if(this.mode){if(a.events[J]){a[J](V,Y,Q);a.fireEvent(J+"Event",{event:V,info:Y,group:Q})}if(a.events[W]){a[X](V,Y,Q);a.fireEvent(O,{event:V,info:Y,group:Q})}}else{for(var Z=0,T=Y.length;Z<T;++Z){if(a.events[J]){a[J](V,Y[Z].id,Q[0]);a.fireEvent(J+"Event",{event:V,info:Y[Z].id,group:Q[0]})}if(a.events[W]){a[X](V,Y[Z].id,Q[0]);a.fireEvent(O,{event:V,info:Y[Z].id,group:Q[0]})}}}}}},getBestMatch:function(E){var G=null;var D=E.length;if(D==1){G=E[0]}else{for(var F=0;F<D;++F){var C=E[F];if(this.mode==this.INTERSECT&&C.cursorIsOver){G=C;break}else{if(!G||!G.overlap||(C.overlap&&G.overlap.getArea()<C.overlap.getArea())){G=C}}}}return G},refreshCache:function(D){var F=D||this.ids;for(var C in F){if("string"!=typeof C){continue}for(var E in this.ids[C]){var G=this.ids[C][E];if(this.isTypeOfDD(G)){var H=this.getLocation(G);if(H){this.locationCache[G.id]=H}else{delete this.locationCache[G.id]}}}}},verifyEl:function(D){try{if(D){var C=D.offsetParent;if(C){return true}}}catch(E){}return false},getLocation:function(H){if(!this.isTypeOfDD(H)){return null}var F=H.getEl(),K,E,D,M,L,N,C,J,G;try{K=YAHOO.util.Dom.getXY(F)}catch(I){}if(!K){return null}E=K[0];D=E+F.offsetWidth;M=K[1];L=M+F.offsetHeight;N=M-H.padding[0];C=D+H.padding[1];J=L+H.padding[2];G=E-H.padding[3];return new YAHOO.util.Region(N,C,J,G)},isOverTarget:function(K,C,E,F){var G=this.locationCache[C.id];if(!G||!this.useCache){G=this.getLocation(C);this.locationCache[C.id]=G}if(!G){return false}C.cursorIsOver=G.contains(K);var J=this.dragCurrent;if(!J||(!E&&!J.constrainX&&!J.constrainY)){return C.cursorIsOver}C.overlap=null;if(!F){var H=J.getTargetCoord(K.x,K.y);var D=J.getDragEl();F=new YAHOO.util.Region(H.y,H.x+D.offsetWidth,H.y+D.offsetHeight,H.x)}var I=F.intersect(G);if(I){C.overlap=I;return(E)?true:C.cursorIsOver}else{return false}},_onUnload:function(D,C){this.unregAll()},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null}this._execOnAll("unreg",[]);this.ids={}},elementCache:{},getElWrapper:function(D){var C=this.elementCache[D];if(!C||!C.el){C=this.elementCache[D]=new this.ElementWrapper(YAHOO.util.Dom.get(D))}return C},getElement:function(C){return YAHOO.util.Dom.get(C)},getCss:function(D){var C=YAHOO.util.Dom.get(D);return(C)?C.style:null},ElementWrapper:function(C){this.el=C||null;this.id=this.el&&C.id;this.css=this.el&&C.style},getPosX:function(C){return YAHOO.util.Dom.getX(C)},getPosY:function(C){return YAHOO.util.Dom.getY(C)},swapNode:function(E,C){if(E.swapNode){E.swapNode(C)}else{var F=C.parentNode;var D=C.nextSibling;if(D==E){F.insertBefore(E,C)}else{if(C==E.nextSibling){F.insertBefore(C,E)}else{E.parentNode.replaceChild(C,E);F.insertBefore(E,D)}}}},getScroll:function(){var E,C,F=document.documentElement,D=document.body;if(F&&(F.scrollTop||F.scrollLeft)){E=F.scrollTop;C=F.scrollLeft}else{if(D){E=D.scrollTop;C=D.scrollLeft}else{}}return{top:E,left:C}},getStyle:function(D,C){return YAHOO.util.Dom.getStyle(D,C)},getScrollTop:function(){return this.getScroll().top},getScrollLeft:function(){return this.getScroll().left},moveToEl:function(C,E){var D=YAHOO.util.Dom.getXY(E);YAHOO.util.Dom.setXY(C,D)},getClientHeight:function(){return YAHOO.util.Dom.getViewportHeight()},getClientWidth:function(){return YAHOO.util.Dom.getViewportWidth()},numericSort:function(D,C){return(D-C)},_timeoutCount:0,_addListeners:function(){var C=YAHOO.util.DDM;if(YAHOO.util.Event&&document){C._onLoad()}else{if(C._timeoutCount>2000){}else{setTimeout(C._addListeners,10);if(document&&document.body){C._timeoutCount+=1}}}},handleWasClicked:function(C,E){if(this.isHandle(E,C.id)){return true}else{var D=C.parentNode;while(D){if(this.isHandle(E,D.id)){return true}else{D=D.parentNode}}}return false}}}();YAHOO.util.DDM=YAHOO.util.DragDropMgr;YAHOO.util.DDM._addListeners()}(function(){var A=YAHOO.util.Event;var B=YAHOO.util.Dom;YAHOO.util.DragDrop=function(E,C,D){if(E){this.init(E,C,D)}};YAHOO.util.DragDrop.prototype={events:null,on:function(){this.subscribe.apply(this,arguments)},id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true},unlock:function(){this.locked=false},isTarget:true,padding:null,dragOnly:false,useShim:false,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,deltaX:0,deltaY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,cursorIsOver:false,overlap:null,b4StartDrag:function(C,D){},startDrag:function(C,D){},b4Drag:function(C){},onDrag:function(C){},onDragEnter:function(C,D){},b4DragOver:function(C){},onDragOver:function(C,D){},b4DragOut:function(C){},onDragOut:function(C,D){},b4DragDrop:function(C){},onDragDrop:function(C,D){},onInvalidDrop:function(C){},b4EndDrag:function(C){},endDrag:function(C){},b4MouseDown:function(C){},onMouseDown:function(C){},onMouseUp:function(C){},onAvailable:function(){},getEl:function(){if(!this._domRef){this._domRef=B.get(this.id)}return this._domRef},getDragEl:function(){return B.get(this.dragElId)},init:function(F,C,D){this.initTarget(F,C,D);A.on(this._domRef||this.id,"mousedown",this.handleMouseDown,this,true);for(var E in this.events){this.createEvent(E+"Event")}},initTarget:function(E,C,D){this.config=D||{};this.events={};this.DDM=YAHOO.util.DDM;this.groups={};if(typeof E!=="string"){this._domRef=E;E=B.generateId(E)}this.id=E;this.addToGroup((C)?C:"default");this.handleElId=E;A.onAvailable(E,this.handleOnAvailable,this,true);this.setDragElId(E);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig()},applyConfig:function(){this.events={mouseDown:true,b4MouseDown:true,mouseUp:true,b4StartDrag:true,startDrag:true,b4EndDrag:true,endDrag:true,drag:true,b4Drag:true,invalidDrop:true,b4DragOut:true,dragOut:true,dragEnter:true,b4DragOver:true,dragOver:true,b4DragDrop:true,dragDrop:true};if(this.config.events){for(var C in this.config.events){if(this.config.events[C]===false){this.events[C]=false}}}this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false);this.dragOnly=((this.config.dragOnly===true)?true:false);this.useShim=((this.config.useShim===true)?true:false)},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable()},setPadding:function(E,C,F,D){if(!C&&0!==C){this.padding=[E,E,E,E]}else{if(!F&&0!==F){this.padding=[E,C,E,C]}else{this.padding=[E,C,F,D]}}},setInitPosition:function(F,E){var G=this.getEl();if(!this.DDM.verifyEl(G)){if(G&&G.style&&(G.style.display=="none")){}else{}return}var D=F||0;var C=E||0;var H=B.getXY(G);this.initPageX=H[0]-D;this.initPageY=H[1]-C;this.lastPageX=H[0];this.lastPageY=H[1];this.setStartPosition(H)},setStartPosition:function(D){var C=D||B.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=C[0];this.startPageY=C[1]},addToGroup:function(C){this.groups[C]=true;this.DDM.regDragDrop(this,C)},removeFromGroup:function(C){if(this.groups[C]){delete this.groups[C]}this.DDM.removeDDFromGroup(this,C)},setDragElId:function(C){this.dragElId=C},setHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C)}this.handleElId=C;this.DDM.regHandle(this.id,C)},setOuterHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C)}A.on(C,"mousedown",this.handleMouseDown,this,true);this.setHandleElId(C);this.hasOuterHandles=true},unreg:function(){A.removeListener(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this)},isLocked:function(){return(this.DDM.isLocked()||this.locked)},handleMouseDown:function(J,I){var D=J.which||J.button;if(this.primaryButtonOnly&&D>1){return}if(this.isLocked()){return}var C=this.b4MouseDown(J),F=true;if(this.events.b4MouseDown){F=this.fireEvent("b4MouseDownEvent",J)}var E=this.onMouseDown(J),H=true;if(this.events.mouseDown){H=this.fireEvent("mouseDownEvent",J)}if((C===false)||(E===false)||(F===false)||(H===false)){return}this.DDM.refreshCache(this.groups);var G=new YAHOO.util.Point(A.getPageX(J),A.getPageY(J));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(G,this)){}else{if(this.clickValidator(J)){this.setStartPosition();this.DDM.handleMouseDown(J,this);this.DDM.stopEvent(J)}else{}}},clickValidator:function(D){var C=YAHOO.util.Event.getTarget(D);return(this.isValidHandleChild(C)&&(this.id==this.handleElId||this.DDM.handleWasClicked(C,this.id)))},getTargetCoord:function(E,D){var C=E-this.deltaX;var F=D-this.deltaY;if(this.constrainX){if(C<this.minX){C=this.minX}if(C>this.maxX){C=this.maxX}}if(this.constrainY){if(F<this.minY){F=this.minY}if(F>this.maxY){F=this.maxY}}C=this.getTick(C,this.xTicks);F=this.getTick(F,this.yTicks);return{x:C,y:F}},addInvalidHandleType:function(C){var D=C.toUpperCase();this.invalidHandleTypes[D]=D},addInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C)}this.invalidHandleIds[C]=C},addInvalidHandleClass:function(C){this.invalidHandleClasses.push(C)},removeInvalidHandleType:function(C){var D=C.toUpperCase();delete this.invalidHandleTypes[D]},removeInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C)}delete this.invalidHandleIds[C]},removeInvalidHandleClass:function(D){for(var E=0,C=this.invalidHandleClasses.length;E<C;++E){if(this.invalidHandleClasses[E]==D){delete this.invalidHandleClasses[E]}}},isValidHandleChild:function(F){var E=true;var H;try{H=F.nodeName.toUpperCase()}catch(G){H=F.nodeName}E=E&&!this.invalidHandleTypes[H];E=E&&!this.invalidHandleIds[F.id];for(var D=0,C=this.invalidHandleClasses.length;E&&D<C;++D){E=!B.hasClass(F,this.invalidHandleClasses[D])}return E},setXTicks:function(F,C){this.xTicks=[];this.xTickSize=C;var E={};for(var D=this.initPageX;D>=this.minX;D=D-C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true}}for(D=this.initPageX;D<=this.maxX;D=D+C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true}}this.xTicks.sort(this.DDM.numericSort)},setYTicks:function(F,C){this.yTicks=[];this.yTickSize=C;var E={};for(var D=this.initPageY;D>=this.minY;D=D-C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true}}for(D=this.initPageY;D<=this.maxY;D=D+C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true}}this.yTicks.sort(this.DDM.numericSort)},setXConstraint:function(E,D,C){this.leftConstraint=parseInt(E,10);this.rightConstraint=parseInt(D,10);this.minX=this.initPageX-this.leftConstraint;this.maxX=this.initPageX+this.rightConstraint;if(C){this.setXTicks(this.initPageX,C)}this.constrainX=true},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks()},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0},setYConstraint:function(C,E,D){this.topConstraint=parseInt(C,10);this.bottomConstraint=parseInt(E,10);this.minY=this.initPageY-this.topConstraint;this.maxY=this.initPageY+this.bottomConstraint;if(D){this.setYTicks(this.initPageY,D)}this.constrainY=true},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var D=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var C=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(D,C)}else{this.setInitPosition()}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize)}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize)}},getTick:function(I,F){if(!F){return I}else{if(F[0]>=I){return F[0]}else{for(var D=0,C=F.length;D<C;++D){var E=D+1;if(F[E]&&F[E]>=I){var H=I-F[D];var G=F[E]-I;return(G>H)?F[D]:F[E]}}return F[F.length-1]}}},toString:function(){return("DragDrop "+this.id)}};YAHOO.augment(YAHOO.util.DragDrop,YAHOO.util.EventProvider)})();YAHOO.util.DD=function(C,A,B){if(C){this.init(C,A,B)}};YAHOO.extend(YAHOO.util.DD,YAHOO.util.DragDrop,{scroll:true,autoOffset:function(C,B){var A=C-this.startPageX;var D=B-this.startPageY;this.setDelta(A,D)},setDelta:function(B,A){this.deltaX=B;this.deltaY=A},setDragElPos:function(C,B){var A=this.getDragEl();this.alignElWithMouse(A,C,B)},alignElWithMouse:function(C,G,F){var E=this.getTargetCoord(G,F);if(!this.deltaSetXY){var H=[E.x,E.y];YAHOO.util.Dom.setXY(C,H);var D=parseInt(YAHOO.util.Dom.getStyle(C,"left"),10);var B=parseInt(YAHOO.util.Dom.getStyle(C,"top"),10);this.deltaSetXY=[D-E.x,B-E.y]}else{YAHOO.util.Dom.setStyle(C,"left",(E.x+this.deltaSetXY[0])+"px");YAHOO.util.Dom.setStyle(C,"top",(E.y+this.deltaSetXY[1])+"px")}this.cachePosition(E.x,E.y);var A=this;setTimeout(function(){A.autoScroll.call(A,E.x,E.y,C.offsetHeight,C.offsetWidth)},0)},cachePosition:function(B,A){if(B){this.lastPageX=B;this.lastPageY=A}else{var C=YAHOO.util.Dom.getXY(this.getEl());this.lastPageX=C[0];this.lastPageY=C[1]}},autoScroll:function(J,I,E,K){if(this.scroll){var L=this.DDM.getClientHeight();var B=this.DDM.getClientWidth();var N=this.DDM.getScrollTop();var D=this.DDM.getScrollLeft();var H=E+I;var M=K+J;var G=(L+N-I-this.deltaY);var F=(B+D-J-this.deltaX);var C=40;var A=(document.all)?80:30;if(H>L&&G<C){window.scrollTo(D,N+A)}if(I<N&&N>0&&I-N<C){window.scrollTo(D,N-A)}if(M>B&&F<C){window.scrollTo(D+A,N)}if(J<D&&D>0&&J-D<C){window.scrollTo(D-A,N)}}},applyConfig:function(){YAHOO.util.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false)},b4MouseDown:function(A){this.setStartPosition();this.autoOffset(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A))},b4Drag:function(A){this.setDragElPos(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A))},toString:function(){return("DD "+this.id)}});YAHOO.util.DDProxy=function(C,A,B){if(C){this.init(C,A,B);this.initFrame()}};YAHOO.util.DDProxy.dragElId="ygddfdiv";YAHOO.extend(YAHOO.util.DDProxy,YAHOO.util.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var B=this,A=document.body;if(!A||!A.firstChild){setTimeout(function(){B.createFrame()},50);return}var F=this.getDragEl(),E=YAHOO.util.Dom;if(!F){F=document.createElement("div");F.id=this.dragElId;var D=F.style;D.position="absolute";D.visibility="hidden";D.cursor="move";D.border="2px solid #aaa";D.zIndex=999;D.height="25px";D.width="25px";var C=document.createElement("div");E.setStyle(C,"height","100%");E.setStyle(C,"width","100%");E.setStyle(C,"background-color","#ccc");E.setStyle(C,"opacity","0");F.appendChild(C);A.insertBefore(F,A.firstChild)}},initFrame:function(){this.createFrame()},applyConfig:function(){YAHOO.util.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||YAHOO.util.DDProxy.dragElId)},showFrame:function(E,D){var C=this.getEl();var A=this.getDragEl();var B=A.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(B.width,10)/2),Math.round(parseInt(B.height,10)/2))}this.setDragElPos(E,D);YAHOO.util.Dom.setStyle(A,"visibility","visible")},_resizeProxy:function(){if(this.resizeFrame){var H=YAHOO.util.Dom;var B=this.getEl();var C=this.getDragEl();var G=parseInt(H.getStyle(C,"borderTopWidth"),10);var I=parseInt(H.getStyle(C,"borderRightWidth"),10);var F=parseInt(H.getStyle(C,"borderBottomWidth"),10);var D=parseInt(H.getStyle(C,"borderLeftWidth"),10);if(isNaN(G)){G=0}if(isNaN(I)){I=0}if(isNaN(F)){F=0}if(isNaN(D)){D=0}var E=Math.max(0,B.offsetWidth-I-D);var A=Math.max(0,B.offsetHeight-G-F);H.setStyle(C,"width",E+"px");H.setStyle(C,"height",A+"px")}},b4MouseDown:function(B){this.setStartPosition();var A=YAHOO.util.Event.getPageX(B);var C=YAHOO.util.Event.getPageY(B);this.autoOffset(A,C)},b4StartDrag:function(A,B){this.showFrame(A,B)},b4EndDrag:function(A){YAHOO.util.Dom.setStyle(this.getDragEl(),"visibility","hidden")},endDrag:function(D){var C=YAHOO.util.Dom;var B=this.getEl();var A=this.getDragEl();C.setStyle(A,"visibility","");C.setStyle(B,"visibility","hidden");YAHOO.util.DDM.moveToEl(B,A);C.setStyle(A,"visibility","hidden");C.setStyle(B,"visibility","")},toString:function(){return("DDProxy "+this.id)}});YAHOO.util.DDTarget=function(C,A,B){if(C){this.initTarget(C,A,B)}};YAHOO.extend(YAHOO.util.DDTarget,YAHOO.util.DragDrop,{toString:function(){return("DDTarget "+this.id)}});YAHOO.register("dragdrop",YAHOO.util.DragDropMgr,{version:"2.7.0",build:"1799"});YAHOO.util.Attribute=function(B,A){if(A){this.owner=A;this.configure(B,true)}};YAHOO.util.Attribute.prototype={name:undefined,value:null,owner:null,readOnly:false,writeOnce:false,_initialConfig:null,_written:false,method:null,setter:null,getter:null,validator:null,getValue:function(){var A=this.value;if(this.getter){A=this.getter.call(this.owner,this.name)}return A},setValue:function(F,B){var E,A=this.owner,C=this.name;var D={type:C,prevValue:this.getValue(),newValue:F};if(this.readOnly||(this.writeOnce&&this._written)){return false}if(this.validator&&!this.validator.call(A,F)){return false}if(!B){E=A.fireBeforeChangeEvent(D);if(E===false){return false}}if(this.setter){F=this.setter.call(A,F,this.name);if(F===undefined){}}if(this.method){this.method.call(A,F,this.name)}this.value=F;this._written=true;D.type=C;if(!B){this.owner.fireChangeEvent(D)}return true},configure:function(B,C){B=B||{};if(C){this._written=false}this._initialConfig=this._initialConfig||{};for(var A in B){if(B.hasOwnProperty(A)){this[A]=B[A];if(C){this._initialConfig[A]=B[A]}}}},resetValue:function(){return this.setValue(this._initialConfig.value)},resetConfig:function(){this.configure(this._initialConfig,true)},refresh:function(A){this.setValue(this.value,A)}};(function(){var A=YAHOO.util.Lang;YAHOO.util.AttributeProvider=function(){};YAHOO.util.AttributeProvider.prototype={_configs:null,get:function(C){this._configs=this._configs||{};var B=this._configs[C];if(!B||!this._configs.hasOwnProperty(C)){return null}return B.getValue()},set:function(D,E,B){this._configs=this._configs||{};var C=this._configs[D];if(!C){return false}return C.setValue(E,B)},getAttributeKeys:function(){this._configs=this._configs;var C=[],B;for(B in this._configs){if(A.hasOwnProperty(this._configs,B)&&!A.isUndefined(this._configs[B])){C[C.length]=B}}return C},setAttributes:function(D,B){for(var C in D){if(A.hasOwnProperty(D,C)){this.set(C,D[C],B)}}},resetValue:function(C,B){this._configs=this._configs||{};if(this._configs[C]){this.set(C,this._configs[C]._initialConfig.value,B);return true}return false},refresh:function(E,C){this._configs=this._configs||{};var F=this._configs;E=((A.isString(E))?[E]:E)||this.getAttributeKeys();for(var D=0,B=E.length;D<B;++D){if(F.hasOwnProperty(E[D])){this._configs[E[D]].refresh(C)}}},register:function(B,C){this.setAttributeConfig(B,C)},getAttributeConfig:function(C){this._configs=this._configs||{};var B=this._configs[C]||{};var D={};for(C in B){if(A.hasOwnProperty(B,C)){D[C]=B[C]}}return D},setAttributeConfig:function(B,C,D){this._configs=this._configs||{};C=C||{};if(!this._configs[B]){C.name=B;this._configs[B]=this.createAttribute(C)}else{this._configs[B].configure(C,D)}},configureAttribute:function(B,C,D){this.setAttributeConfig(B,C,D)},resetAttributeConfig:function(B){this._configs=this._configs||{};this._configs[B].resetConfig()},subscribe:function(B,C){this._events=this._events||{};if(!(B in this._events)){this._events[B]=this.createEvent(B)}YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments)},on:function(){this.subscribe.apply(this,arguments)},addListener:function(){this.subscribe.apply(this,arguments)},fireBeforeChangeEvent:function(C){var B="before";B+=C.type.charAt(0).toUpperCase()+C.type.substr(1)+"Change";C.type=B;return this.fireEvent(C.type,C)},fireChangeEvent:function(B){B.type+="Change";return this.fireEvent(B.type,B)},createAttribute:function(B){return new YAHOO.util.Attribute(B,this)}};YAHOO.augment(YAHOO.util.AttributeProvider,YAHOO.util.EventProvider)})();(function(){var B=YAHOO.util.Dom,C=YAHOO.util.AttributeProvider;var A=function(D,E){this.init.apply(this,arguments)};A.DOM_EVENTS={"click":true,"dblclick":true,"keydown":true,"keypress":true,"keyup":true,"mousedown":true,"mousemove":true,"mouseout":true,"mouseover":true,"mouseup":true,"focus":true,"blur":true,"submit":true,"change":true};A.prototype={DOM_EVENTS:null,DEFAULT_HTML_SETTER:function(F,D){var E=this.get("element");if(E){E[D]=F}},DEFAULT_HTML_GETTER:function(D){var E=this.get("element"),F;if(E){F=E[D]}return F},appendChild:function(D){D=D.get?D.get("element"):D;return this.get("element").appendChild(D)},getElementsByTagName:function(D){return this.get("element").getElementsByTagName(D)},hasChildNodes:function(){return this.get("element").hasChildNodes()},insertBefore:function(D,E){D=D.get?D.get("element"):D;E=(E&&E.get)?E.get("element"):E;return this.get("element").insertBefore(D,E)},removeChild:function(D){D=D.get?D.get("element"):D;return this.get("element").removeChild(D)},replaceChild:function(D,E){D=D.get?D.get("element"):D;E=E.get?E.get("element"):E;return this.get("element").replaceChild(D,E)},initAttributes:function(D){},addListener:function(H,G,I,F){var E=this.get("element")||this.get("id");F=F||this;var D=this;if(!this._events[H]){if(E&&this.DOM_EVENTS[H]){YAHOO.util.Event.addListener(E,H,function(J){if(J.srcElement&&!J.target){J.target=J.srcElement}D.fireEvent(H,J)},I,F)}this.createEvent(H,this)}return YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments)},on:function(){return this.addListener.apply(this,arguments)},subscribe:function(){return this.addListener.apply(this,arguments)},removeListener:function(E,D){return this.unsubscribe.apply(this,arguments)},addClass:function(D){B.addClass(this.get("element"),D)},getElementsByClassName:function(E,D){return B.getElementsByClassName(E,D,this.get("element"))},hasClass:function(D){return B.hasClass(this.get("element"),D)},removeClass:function(D){return B.removeClass(this.get("element"),D)},replaceClass:function(E,D){return B.replaceClass(this.get("element"),E,D)},setStyle:function(E,D){return B.setStyle(this.get("element"),E,D)},getStyle:function(D){return B.getStyle(this.get("element"),D)},fireQueue:function(){var E=this._queue;for(var F=0,D=E.length;F<D;++F){this[E[F][0]].apply(this,E[F][1])}},appendTo:function(E,F){E=(E.get)?E.get("element"):B.get(E);this.fireEvent("beforeAppendTo",{type:"beforeAppendTo",target:E});F=(F&&F.get)?F.get("element"):B.get(F);var D=this.get("element");if(!D){return false}if(!E){return false}if(D.parent!=E){if(F){E.insertBefore(D,F)}else{E.appendChild(D)}}this.fireEvent("appendTo",{type:"appendTo",target:E});return D},get:function(D){var F=this._configs||{},E=F.element;if(E&&!F[D]&&!YAHOO.lang.isUndefined(E.value[D])){this._setHTMLAttrConfig(D)}return C.prototype.get.call(this,D)},setAttributes:function(J,G){var E={},H=this._configOrder;for(var I=0,D=H.length;I<D;++I){if(J[H[I]]!==undefined){E[H[I]]=true;this.set(H[I],J[H[I]],G)}}for(var F in J){if(J.hasOwnProperty(F)&&!E[F]){this.set(F,J[F],G)}}},set:function(E,G,D){var F=this.get("element");if(!F){this._queue[this._queue.length]=["set",arguments];if(this._configs[E]){this._configs[E].value=G}return}if(!this._configs[E]&&!YAHOO.lang.isUndefined(F[E])){this._setHTMLAttrConfig(E)}return C.prototype.set.apply(this,arguments)},setAttributeConfig:function(D,E,F){this._configOrder.push(D);C.prototype.setAttributeConfig.apply(this,arguments)},createEvent:function(E,D){this._events[E]=true;return C.prototype.createEvent.apply(this,arguments)},init:function(E,D){this._initElement(E,D)},destroy:function(){var D=this.get("element");YAHOO.util.Event.purgeElement(D,true);this.unsubscribeAll();if(D&&D.parentNode){D.parentNode.removeChild(D)}this._queue=[];this._events={};this._configs={};this._configOrder=[]},_initElement:function(F,E){this._queue=this._queue||[];this._events=this._events||{};this._configs=this._configs||{};this._configOrder=[];E=E||{};E.element=E.element||F||null;var H=false;var D=A.DOM_EVENTS;this.DOM_EVENTS=this.DOM_EVENTS||{};for(var G in D){if(D.hasOwnProperty(G)){this.DOM_EVENTS[G]=D[G]}}if(typeof E.element==="string"){this._setHTMLAttrConfig("id",{value:E.element})}if(B.get(E.element)){H=true;this._initHTMLElement(E);this._initContent(E)}YAHOO.util.Event.onAvailable(E.element,function(){if(!H){this._initHTMLElement(E)}this.fireEvent("available",{type:"available",target:B.get(E.element)})},this,true);YAHOO.util.Event.onContentReady(E.element,function(){if(!H){this._initContent(E)}this.fireEvent("contentReady",{type:"contentReady",target:B.get(E.element)})},this,true)},_initHTMLElement:function(D){this.setAttributeConfig("element",{value:B.get(D.element),readOnly:true})},_initContent:function(D){this.initAttributes(D);this.setAttributes(D,true);this.fireQueue()},_setHTMLAttrConfig:function(D,F){var E=this.get("element");F=F||{};F.name=D;F.setter=F.setter||this.DEFAULT_HTML_SETTER;F.getter=F.getter||this.DEFAULT_HTML_GETTER;F.value=F.value||E[D];this._configs[D]=new YAHOO.util.Attribute(F,this)}};YAHOO.augment(A,C);YAHOO.util.Element=A})();YAHOO.register("element",YAHOO.util.Element,{version:"2.7.0",build:"1799"});YAHOO.register("utilities",YAHOO,{version:"2.7.0",build:"1799"});(function(){YAHOO.util.Config=function(owner){if(owner){this.init(owner)}};var Lang=YAHOO.lang,CustomEvent=YAHOO.util.CustomEvent,Config=YAHOO.util.Config;Config.CONFIG_CHANGED_EVENT="configChanged";Config.BOOLEAN_TYPE="boolean";Config.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(owner){this.owner=owner;this.configChangedEvent=this.createEvent(Config.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=CustomEvent.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[]},checkBoolean:function(val){return(typeof val==Config.BOOLEAN_TYPE)},checkNumber:function(val){return(!isNaN(val))},fireEvent:function(key,value){var property=this.config[key];if(property&&property.event){property.event.fire(value)}},addProperty:function(key,propertyObject){key=key.toLowerCase();this.config[key]=propertyObject;propertyObject.event=this.createEvent(key,{scope:this.owner});propertyObject.event.signature=CustomEvent.LIST;propertyObject.key=key;if(propertyObject.handler){propertyObject.event.subscribe(propertyObject.handler,this.owner)}this.setProperty(key,propertyObject.value,true);if(!propertyObject.suppressEvent){this.queueProperty(key,propertyObject.value)}},getConfig:function(){var cfg={},currCfg=this.config,prop,property;for(prop in currCfg){if(Lang.hasOwnProperty(currCfg,prop)){property=currCfg[prop];if(property&&property.event){cfg[prop]=property.value}}}return cfg},getProperty:function(key){var property=this.config[key.toLowerCase()];if(property&&property.event){return property.value}else{return undefined}},resetProperty:function(key){key=key.toLowerCase();var property=this.config[key];if(property&&property.event){if(this.initialConfig[key]&&!Lang.isUndefined(this.initialConfig[key])){this.setProperty(key,this.initialConfig[key]);return true}}else{return false}},setProperty:function(key,value,silent){var property;key=key.toLowerCase();if(this.queueInProgress&&!silent){this.queueProperty(key,value);return true}else{property=this.config[key];if(property&&property.event){if(property.validator&&!property.validator(value)){return false}else{property.value=value;if(!silent){this.fireEvent(key,value);this.configChangedEvent.fire([key,value])}return true}}else{return false}}},queueProperty:function(key,value){key=key.toLowerCase();var property=this.config[key],foundDuplicate=false,iLen,queueItem,queueItemKey,queueItemValue,sLen,supercedesCheck,qLen,queueItemCheck,queueItemCheckKey,queueItemCheckValue,i,s,q;if(property&&property.event){if(!Lang.isUndefined(value)&&property.validator&&!property.validator(value)){return false}else{if(!Lang.isUndefined(value)){property.value=value}else{value=property.value}foundDuplicate=false;iLen=this.eventQueue.length;for(i=0;i<iLen;i++){queueItem=this.eventQueue[i];if(queueItem){queueItemKey=queueItem[0];queueItemValue=queueItem[1];if(queueItemKey==key){this.eventQueue[i]=null;this.eventQueue.push([key,(!Lang.isUndefined(value)?value:queueItemValue)]);foundDuplicate=true;break}}}if(!foundDuplicate&&!Lang.isUndefined(value)){this.eventQueue.push([key,value])}}if(property.supercedes){sLen=property.supercedes.length;for(s=0;s<sLen;s++){supercedesCheck=property.supercedes[s];qLen=this.eventQueue.length;for(q=0;q<qLen;q++){queueItemCheck=this.eventQueue[q];if(queueItemCheck){queueItemCheckKey=queueItemCheck[0];queueItemCheckValue=queueItemCheck[1];if(queueItemCheckKey==supercedesCheck.toLowerCase()){this.eventQueue.push([queueItemCheckKey,queueItemCheckValue]);this.eventQueue[q]=null;break}}}}}return true}else{return false}},refireEvent:function(key){key=key.toLowerCase();var property=this.config[key];if(property&&property.event&&!Lang.isUndefined(property.value)){if(this.queueInProgress){this.queueProperty(key)}else{this.fireEvent(key,property.value)}}},applyConfig:function(userConfig,init){var sKey,oConfig;if(init){oConfig={};for(sKey in userConfig){if(Lang.hasOwnProperty(userConfig,sKey)){oConfig[sKey.toLowerCase()]=userConfig[sKey]}}this.initialConfig=oConfig}for(sKey in userConfig){if(Lang.hasOwnProperty(userConfig,sKey)){this.queueProperty(sKey,userConfig[sKey])}}},refresh:function(){var prop;for(prop in this.config){if(Lang.hasOwnProperty(this.config,prop)){this.refireEvent(prop)}}},fireQueue:function(){var i,queueItem,key,value,property;this.queueInProgress=true;for(i=0;i<this.eventQueue.length;i++){queueItem=this.eventQueue[i];if(queueItem){key=queueItem[0];value=queueItem[1];property=this.config[key];property.value=value;this.eventQueue[i]=null;this.fireEvent(key,value)}}this.queueInProgress=false;this.eventQueue=[]},subscribeToConfigEvent:function(key,handler,obj,override){var property=this.config[key.toLowerCase()];if(property&&property.event){if(!Config.alreadySubscribed(property.event,handler,obj)){property.event.subscribe(handler,obj,override)}return true}else{return false}},unsubscribeFromConfigEvent:function(key,handler,obj){var property=this.config[key.toLowerCase()];if(property&&property.event){return property.event.unsubscribe(handler,obj)}else{return false}},toString:function(){var output="Config";if(this.owner){output+=" ["+this.owner.toString()+"]"}return output},outputEventQueue:function(){var output="",queueItem,q,nQueue=this.eventQueue.length;for(q=0;q<nQueue;q++){queueItem=this.eventQueue[q];if(queueItem){output+=queueItem[0]+"="+queueItem[1]+", "}}return output},destroy:function(){var oConfig=this.config,sProperty,oProperty;for(sProperty in oConfig){if(Lang.hasOwnProperty(oConfig,sProperty)){oProperty=oConfig[sProperty];oProperty.event.unsubscribeAll();oProperty.event=null}}this.configChangedEvent.unsubscribeAll();this.configChangedEvent=null;this.owner=null;this.config=null;this.initialConfig=null;this.eventQueue=null}};Config.alreadySubscribed=function(evt,fn,obj){var nSubscribers=evt.subscribers.length,subsc,i;if(nSubscribers>0){i=nSubscribers-1;do{subsc=evt.subscribers[i];if(subsc&&subsc.obj==obj&&subsc.fn==fn){return true}}while(i--)}return false};YAHOO.lang.augmentProto(Config,YAHOO.util.EventProvider)}());(function(){YAHOO.widget.Module=function(el,userConfig){if(el){this.init(el,userConfig)}else{}};var Dom=YAHOO.util.Dom,Config=YAHOO.util.Config,Event=YAHOO.util.Event,CustomEvent=YAHOO.util.CustomEvent,Module=YAHOO.widget.Module,UA=YAHOO.env.ua,m_oModuleTemplate,m_oHeaderTemplate,m_oBodyTemplate,m_oFooterTemplate,EVENT_TYPES={"BEFORE_INIT":"beforeInit","INIT":"init","APPEND":"append","BEFORE_RENDER":"beforeRender","RENDER":"render","CHANGE_HEADER":"changeHeader","CHANGE_BODY":"changeBody","CHANGE_FOOTER":"changeFooter","CHANGE_CONTENT":"changeContent","DESTORY":"destroy","BEFORE_SHOW":"beforeShow","SHOW":"show","BEFORE_HIDE":"beforeHide","HIDE":"hide"},DEFAULT_CONFIG={"VISIBLE":{key:"visible",value:true,validator:YAHOO.lang.isBoolean},"EFFECT":{key:"effect",suppressEvent:true,supercedes:["visible"]},"MONITOR_RESIZE":{key:"monitorresize",value:true},"APPEND_TO_DOCUMENT_BODY":{key:"appendtodocumentbody",value:false}};Module.IMG_ROOT=null;Module.IMG_ROOT_SSL=null;Module.CSS_MODULE="yui-module";Module.CSS_HEADER="hd";Module.CSS_BODY="bd";Module.CSS_FOOTER="ft";Module.RESIZE_MONITOR_SECURE_URL="javascript:false;";Module.RESIZE_MONITOR_BUFFER=1;Module.textResizeEvent=new CustomEvent("textResize");Module.forceDocumentRedraw=function(){var docEl=document.documentElement;if(docEl){docEl.className+=" ";docEl.className=YAHOO.lang.trim(docEl.className)}};function createModuleTemplate(){if(!m_oModuleTemplate){m_oModuleTemplate=document.createElement("div");m_oModuleTemplate.innerHTML=("<div class=\""+Module.CSS_HEADER+"\"></div>"+"<div class=\""+Module.CSS_BODY+"\"></div><div class=\""+Module.CSS_FOOTER+"\"></div>");m_oHeaderTemplate=m_oModuleTemplate.firstChild;m_oBodyTemplate=m_oHeaderTemplate.nextSibling;m_oFooterTemplate=m_oBodyTemplate.nextSibling}return m_oModuleTemplate}function createHeader(){if(!m_oHeaderTemplate){createModuleTemplate()}return(m_oHeaderTemplate.cloneNode(false))}function createBody(){if(!m_oBodyTemplate){createModuleTemplate()}return(m_oBodyTemplate.cloneNode(false))}function createFooter(){if(!m_oFooterTemplate){createModuleTemplate()}return(m_oFooterTemplate.cloneNode(false))}Module.prototype={constructor:Module,element:null,header:null,body:null,footer:null,id:null,imageRoot:Module.IMG_ROOT,initEvents:function(){var SIGNATURE=CustomEvent.LIST;this.beforeInitEvent=this.createEvent(EVENT_TYPES.BEFORE_INIT);this.beforeInitEvent.signature=SIGNATURE;this.initEvent=this.createEvent(EVENT_TYPES.INIT);this.initEvent.signature=SIGNATURE;this.appendEvent=this.createEvent(EVENT_TYPES.APPEND);this.appendEvent.signature=SIGNATURE;this.beforeRenderEvent=this.createEvent(EVENT_TYPES.BEFORE_RENDER);this.beforeRenderEvent.signature=SIGNATURE;this.renderEvent=this.createEvent(EVENT_TYPES.RENDER);this.renderEvent.signature=SIGNATURE;this.changeHeaderEvent=this.createEvent(EVENT_TYPES.CHANGE_HEADER);this.changeHeaderEvent.signature=SIGNATURE;this.changeBodyEvent=this.createEvent(EVENT_TYPES.CHANGE_BODY);this.changeBodyEvent.signature=SIGNATURE;this.changeFooterEvent=this.createEvent(EVENT_TYPES.CHANGE_FOOTER);this.changeFooterEvent.signature=SIGNATURE;this.changeContentEvent=this.createEvent(EVENT_TYPES.CHANGE_CONTENT);this.changeContentEvent.signature=SIGNATURE;this.destroyEvent=this.createEvent(EVENT_TYPES.DESTORY);this.destroyEvent.signature=SIGNATURE;this.beforeShowEvent=this.createEvent(EVENT_TYPES.BEFORE_SHOW);this.beforeShowEvent.signature=SIGNATURE;this.showEvent=this.createEvent(EVENT_TYPES.SHOW);this.showEvent.signature=SIGNATURE;this.beforeHideEvent=this.createEvent(EVENT_TYPES.BEFORE_HIDE);this.beforeHideEvent.signature=SIGNATURE;this.hideEvent=this.createEvent(EVENT_TYPES.HIDE);this.hideEvent.signature=SIGNATURE},platform:function(){var ua=navigator.userAgent.toLowerCase();if(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1){return"windows"}else if(ua.indexOf("macintosh")!=-1){return"mac"}else{return false}}(),browser:function(){var ua=navigator.userAgent.toLowerCase();if(ua.indexOf('opera')!=-1){return'opera'}else if(ua.indexOf('msie 7')!=-1){return'ie7'}else if(ua.indexOf('msie')!=-1){return'ie'}else if(ua.indexOf('safari')!=-1){return'safari'}else if(ua.indexOf('gecko')!=-1){return'gecko'}else{return false}}(),isSecure:function(){if(window.location.href.toLowerCase().indexOf("https")===0){return true}else{return false}}(),initDefaultConfig:function(){this.cfg.addProperty(DEFAULT_CONFIG.VISIBLE.key,{handler:this.configVisible,value:DEFAULT_CONFIG.VISIBLE.value,validator:DEFAULT_CONFIG.VISIBLE.validator});this.cfg.addProperty(DEFAULT_CONFIG.EFFECT.key,{suppressEvent:DEFAULT_CONFIG.EFFECT.suppressEvent,supercedes:DEFAULT_CONFIG.EFFECT.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.MONITOR_RESIZE.key,{handler:this.configMonitorResize,value:DEFAULT_CONFIG.MONITOR_RESIZE.value});this.cfg.addProperty(DEFAULT_CONFIG.APPEND_TO_DOCUMENT_BODY.key,{value:DEFAULT_CONFIG.APPEND_TO_DOCUMENT_BODY.value})},init:function(el,userConfig){var elId,child;this.initEvents();this.beforeInitEvent.fire(Module);this.cfg=new Config(this);if(this.isSecure){this.imageRoot=Module.IMG_ROOT_SSL}if(typeof el=="string"){elId=el;el=document.getElementById(el);if(!el){el=(createModuleTemplate()).cloneNode(false);el.id=elId}}this.id=Dom.generateId(el);this.element=el;child=this.element.firstChild;if(child){var fndHd=false,fndBd=false,fndFt=false;do{if(1==child.nodeType){if(!fndHd&&Dom.hasClass(child,Module.CSS_HEADER)){this.header=child;fndHd=true}else if(!fndBd&&Dom.hasClass(child,Module.CSS_BODY)){this.body=child;fndBd=true}else if(!fndFt&&Dom.hasClass(child,Module.CSS_FOOTER)){this.footer=child;fndFt=true}}}while((child=child.nextSibling))}this.initDefaultConfig();Dom.addClass(this.element,Module.CSS_MODULE);if(userConfig){this.cfg.applyConfig(userConfig,true)}if(!Config.alreadySubscribed(this.renderEvent,this.cfg.fireQueue,this.cfg)){this.renderEvent.subscribe(this.cfg.fireQueue,this.cfg,true)}this.initEvent.fire(Module)},initResizeMonitor:function(){var isGeckoWin=(UA.gecko&&this.platform=="windows");if(isGeckoWin){var self=this;setTimeout(function(){self._initResizeMonitor()},0)}else{this._initResizeMonitor()}},_initResizeMonitor:function(){return;var oDoc,oIFrame,sHTML;function fireTextResize(){Module.textResizeEvent.fire()}if(!UA.opera){oIFrame=Dom.get("_yuiResizeMonitor");var supportsCWResize=this._supportsCWResize();if(!oIFrame){oIFrame=document.createElement("iframe");if(this.isSecure&&Module.RESIZE_MONITOR_SECURE_URL&&UA.ie){oIFrame.src=Module.RESIZE_MONITOR_SECURE_URL}if(!supportsCWResize){sHTML=["<html><head><script ","type=\"text/javascript\">","window.onresize=function(){window.parent.","YAHOO.widget.Module.textResizeEvent.","fire();};<","\/script></head>","<body></body></html>"].join('');oIFrame.src="data:text/html;charset=utf-8,"+encodeURIComponent(sHTML)}oIFrame.id="_yuiResizeMonitor";oIFrame.title="Text Resize Monitor";oIFrame.style.position="absolute";oIFrame.style.visibility="hidden";var db=document.body,fc=db.firstChild;if(fc){db.insertBefore(oIFrame,fc)}else{db.appendChild(oIFrame)}oIFrame.style.width="2em";oIFrame.style.height="2em";oIFrame.style.top=(-1*(oIFrame.offsetHeight+Module.RESIZE_MONITOR_BUFFER))+"px";oIFrame.style.left="0";oIFrame.style.borderWidth="0";oIFrame.style.visibility="visible";if(UA.webkit){oDoc=oIFrame.contentWindow.document;oDoc.open();oDoc.close()}}if(oIFrame&&oIFrame.contentWindow){Module.textResizeEvent.subscribe(this.onDomResize,this,true);if(!Module.textResizeInitialized){if(supportsCWResize){if(!Event.on(oIFrame.contentWindow,"resize",fireTextResize)){Event.on(oIFrame,"resize",fireTextResize)}}Module.textResizeInitialized=true}this.resizeMonitor=oIFrame}}},_supportsCWResize:function(){var bSupported=true;if(UA.gecko&&UA.gecko<=1.8){bSupported=false}return bSupported},onDomResize:function(e,obj){var nTop=-1*(this.resizeMonitor.offsetHeight+Module.RESIZE_MONITOR_BUFFER);this.resizeMonitor.style.top=nTop+"px";this.resizeMonitor.style.left="0"},setHeader:function(headerContent){var oHeader=this.header||(this.header=createHeader());if(headerContent.nodeName){oHeader.innerHTML="";oHeader.appendChild(headerContent)}else{oHeader.innerHTML=headerContent}this.changeHeaderEvent.fire(headerContent);this.changeContentEvent.fire()},appendToHeader:function(element){var oHeader=this.header||(this.header=createHeader());oHeader.appendChild(element);this.changeHeaderEvent.fire(element);this.changeContentEvent.fire()},setBody:function(bodyContent){var oBody=this.body||(this.body=createBody());if(bodyContent.nodeName){oBody.innerHTML="";oBody.appendChild(bodyContent)}else{oBody.innerHTML=bodyContent}this.changeBodyEvent.fire(bodyContent);this.changeContentEvent.fire()},appendToBody:function(element){var oBody=this.body||(this.body=createBody());oBody.appendChild(element);this.changeBodyEvent.fire(element);this.changeContentEvent.fire()},setFooter:function(footerContent){var oFooter=this.footer||(this.footer=createFooter());if(footerContent.nodeName){oFooter.innerHTML="";oFooter.appendChild(footerContent)}else{oFooter.innerHTML=footerContent}this.changeFooterEvent.fire(footerContent);this.changeContentEvent.fire()},appendToFooter:function(element){var oFooter=this.footer||(this.footer=createFooter());oFooter.appendChild(element);this.changeFooterEvent.fire(element);this.changeContentEvent.fire()},render:function(appendToNode,moduleElement){var me=this,firstChild;function appendTo(parentNode){if(typeof parentNode=="string"){parentNode=document.getElementById(parentNode)}if(parentNode){me._addToParent(parentNode,me.element);me.appendEvent.fire()}}this.beforeRenderEvent.fire();if(!moduleElement){moduleElement=this.element}if(appendToNode){appendTo(appendToNode)}else{if(!Dom.inDocument(this.element)){return false}}if(this.header&&!Dom.inDocument(this.header)){firstChild=moduleElement.firstChild;if(firstChild){moduleElement.insertBefore(this.header,firstChild)}else{moduleElement.appendChild(this.header)}}if(this.body&&!Dom.inDocument(this.body)){if(this.footer&&Dom.isAncestor(this.moduleElement,this.footer)){moduleElement.insertBefore(this.body,this.footer)}else{moduleElement.appendChild(this.body)}}if(this.footer&&!Dom.inDocument(this.footer)){moduleElement.appendChild(this.footer)}this.renderEvent.fire();return true},destroy:function(){var parent;if(this.element){Event.purgeElement(this.element,true);parent=this.element.parentNode}if(parent){parent.removeChild(this.element)}this.element=null;this.header=null;this.body=null;this.footer=null;Module.textResizeEvent.unsubscribe(this.onDomResize,this);this.cfg.destroy();this.cfg=null;this.destroyEvent.fire()},show:function(){this.cfg.setProperty("visible",true)},hide:function(){this.cfg.setProperty("visible",false)},configVisible:function(type,args,obj){var visible=args[0];if(visible){this.beforeShowEvent.fire();Dom.setStyle(this.element,"display","block");this.showEvent.fire()}else{this.beforeHideEvent.fire();Dom.setStyle(this.element,"display","none");this.hideEvent.fire()}},configMonitorResize:function(type,args,obj){var monitor=args[0];if(monitor){this.initResizeMonitor()}else{Module.textResizeEvent.unsubscribe(this.onDomResize,this,true);this.resizeMonitor=null}},_addToParent:function(parentNode,element){if(!this.cfg.getProperty("appendtodocumentbody")&&parentNode===document.body&&parentNode.firstChild){parentNode.insertBefore(element,parentNode.firstChild)}else{parentNode.appendChild(element)}},toString:function(){return"Module "+this.id}};YAHOO.lang.augmentProto(Module,YAHOO.util.EventProvider)}());(function(){YAHOO.widget.Overlay=function(el,userConfig){YAHOO.widget.Overlay.superclass.constructor.call(this,el,userConfig)};var Lang=YAHOO.lang,CustomEvent=YAHOO.util.CustomEvent,Module=YAHOO.widget.Module,Event=YAHOO.util.Event,Dom=YAHOO.util.Dom,Config=YAHOO.util.Config,UA=YAHOO.env.ua,Overlay=YAHOO.widget.Overlay,_SUBSCRIBE="subscribe",_UNSUBSCRIBE="unsubscribe",_CONTAINED="contained",m_oIFrameTemplate,EVENT_TYPES={"BEFORE_MOVE":"beforeMove","MOVE":"move"},DEFAULT_CONFIG={"X":{key:"x",validator:Lang.isNumber,suppressEvent:true,supercedes:["iframe"]},"Y":{key:"y",validator:Lang.isNumber,suppressEvent:true,supercedes:["iframe"]},"XY":{key:"xy",suppressEvent:true,supercedes:["iframe"]},"CONTEXT":{key:"context",suppressEvent:true,supercedes:["iframe"]},"FIXED_CENTER":{key:"fixedcenter",value:false,supercedes:["iframe","visible"]},"WIDTH":{key:"width",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"HEIGHT":{key:"height",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"AUTO_FILL_HEIGHT":{key:"autofillheight",supercedes:["height"],value:"body"},"ZINDEX":{key:"zindex",value:null},"CONSTRAIN_TO_VIEWPORT":{key:"constraintoviewport",value:false,validator:Lang.isBoolean,supercedes:["iframe","x","y","xy"]},"IFRAME":{key:"iframe",value:(UA.ie==6?true:false),validator:Lang.isBoolean,supercedes:["zindex"]},"PREVENT_CONTEXT_OVERLAP":{key:"preventcontextoverlap",value:false,validator:Lang.isBoolean,supercedes:["constraintoviewport"]}};Overlay.IFRAME_SRC="javascript:false;";Overlay.IFRAME_OFFSET=3;Overlay.VIEWPORT_OFFSET=10;Overlay.TOP_LEFT="tl";Overlay.TOP_RIGHT="tr";Overlay.BOTTOM_LEFT="bl";Overlay.BOTTOM_RIGHT="br";Overlay.CSS_OVERLAY="yui-overlay";Overlay.STD_MOD_RE=/^\s*?(body|footer|header)\s*?$/i;Overlay.windowScrollEvent=new CustomEvent("windowScroll");Overlay.windowResizeEvent=new CustomEvent("windowResize");Overlay.windowScrollHandler=function(e){var t=Event.getTarget(e);if(!t||t===window||t===window.document){if(UA.ie){if(!window.scrollEnd){window.scrollEnd=-1}clearTimeout(window.scrollEnd);window.scrollEnd=setTimeout(function(){Overlay.windowScrollEvent.fire()},1)}else{Overlay.windowScrollEvent.fire()}}};Overlay.windowResizeHandler=function(e){if(UA.ie){if(!window.resizeEnd){window.resizeEnd=-1}clearTimeout(window.resizeEnd);window.resizeEnd=setTimeout(function(){Overlay.windowResizeEvent.fire()},100)}else{Overlay.windowResizeEvent.fire()}};Overlay._initialized=null;if(Overlay._initialized===null){Event.on(window,"scroll",Overlay.windowScrollHandler);Event.on(window,"resize",Overlay.windowResizeHandler);Overlay._initialized=true}Overlay._TRIGGER_MAP={"windowScroll":Overlay.windowScrollEvent,"windowResize":Overlay.windowResizeEvent,"textResize":Module.textResizeEvent};YAHOO.extend(Overlay,Module,{CONTEXT_TRIGGERS:[],init:function(el,userConfig){Overlay.superclass.init.call(this,el);this.beforeInitEvent.fire(Overlay);Dom.addClass(this.element,Overlay.CSS_OVERLAY);if(userConfig){this.cfg.applyConfig(userConfig,true)}if(this.platform=="mac"&&UA.gecko){if(!Config.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this)){this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true)}if(!Config.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this)){this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true)}}this.initEvent.fire(Overlay)},initEvents:function(){Overlay.superclass.initEvents.call(this);var SIGNATURE=CustomEvent.LIST;this.beforeMoveEvent=this.createEvent(EVENT_TYPES.BEFORE_MOVE);this.beforeMoveEvent.signature=SIGNATURE;this.moveEvent=this.createEvent(EVENT_TYPES.MOVE);this.moveEvent.signature=SIGNATURE},initDefaultConfig:function(){Overlay.superclass.initDefaultConfig.call(this);var cfg=this.cfg;cfg.addProperty(DEFAULT_CONFIG.X.key,{handler:this.configX,validator:DEFAULT_CONFIG.X.validator,suppressEvent:DEFAULT_CONFIG.X.suppressEvent,supercedes:DEFAULT_CONFIG.X.supercedes});cfg.addProperty(DEFAULT_CONFIG.Y.key,{handler:this.configY,validator:DEFAULT_CONFIG.Y.validator,suppressEvent:DEFAULT_CONFIG.Y.suppressEvent,supercedes:DEFAULT_CONFIG.Y.supercedes});cfg.addProperty(DEFAULT_CONFIG.XY.key,{handler:this.configXY,suppressEvent:DEFAULT_CONFIG.XY.suppressEvent,supercedes:DEFAULT_CONFIG.XY.supercedes});cfg.addProperty(DEFAULT_CONFIG.CONTEXT.key,{handler:this.configContext,suppressEvent:DEFAULT_CONFIG.CONTEXT.suppressEvent,supercedes:DEFAULT_CONFIG.CONTEXT.supercedes});cfg.addProperty(DEFAULT_CONFIG.FIXED_CENTER.key,{handler:this.configFixedCenter,value:DEFAULT_CONFIG.FIXED_CENTER.value,validator:DEFAULT_CONFIG.FIXED_CENTER.validator,supercedes:DEFAULT_CONFIG.FIXED_CENTER.supercedes});cfg.addProperty(DEFAULT_CONFIG.WIDTH.key,{handler:this.configWidth,suppressEvent:DEFAULT_CONFIG.WIDTH.suppressEvent,supercedes:DEFAULT_CONFIG.WIDTH.supercedes});cfg.addProperty(DEFAULT_CONFIG.HEIGHT.key,{handler:this.configHeight,suppressEvent:DEFAULT_CONFIG.HEIGHT.suppressEvent,supercedes:DEFAULT_CONFIG.HEIGHT.supercedes});cfg.addProperty(DEFAULT_CONFIG.AUTO_FILL_HEIGHT.key,{handler:this.configAutoFillHeight,value:DEFAULT_CONFIG.AUTO_FILL_HEIGHT.value,validator:this._validateAutoFill,supercedes:DEFAULT_CONFIG.AUTO_FILL_HEIGHT.supercedes});cfg.addProperty(DEFAULT_CONFIG.ZINDEX.key,{handler:this.configzIndex,value:DEFAULT_CONFIG.ZINDEX.value});cfg.addProperty(DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.key,{handler:this.configConstrainToViewport,value:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.value,validator:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.validator,supercedes:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.supercedes});cfg.addProperty(DEFAULT_CONFIG.IFRAME.key,{handler:this.configIframe,value:DEFAULT_CONFIG.IFRAME.value,validator:DEFAULT_CONFIG.IFRAME.validator,supercedes:DEFAULT_CONFIG.IFRAME.supercedes});cfg.addProperty(DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.key,{value:DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.value,validator:DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.validator,supercedes:DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.supercedes})},moveTo:function(x,y){this.cfg.setProperty("xy",[x,y])},hideMacGeckoScrollbars:function(){Dom.replaceClass(this.element,"show-scrollbars","hide-scrollbars")},showMacGeckoScrollbars:function(){Dom.replaceClass(this.element,"hide-scrollbars","show-scrollbars")},_setDomVisibility:function(show){Dom.setStyle(this.element,"visibility",(show)?"visible":"hidden");if(show){Dom.removeClass(this.element,"yui-overlay-hidden")}else{Dom.addClass(this.element,"yui-overlay-hidden")}},configVisible:function(type,args,obj){var visible=args[0],currentVis=Dom.getStyle(this.element,"visibility"),effect=this.cfg.getProperty("effect"),effectInstances=[],isMacGecko=(this.platform=="mac"&&UA.gecko),alreadySubscribed=Config.alreadySubscribed,eff,ei,e,i,j,k,h,nEffects,nEffectInstances;if(currentVis=="inherit"){e=this.element.parentNode;while(e.nodeType!=9&&e.nodeType!=11){currentVis=Dom.getStyle(e,"visibility");if(currentVis!="inherit"){break}e=e.parentNode}if(currentVis=="inherit"){currentVis="visible"}}if(effect){if(effect instanceof Array){nEffects=effect.length;for(i=0;i<nEffects;i++){eff=effect[i];effectInstances[effectInstances.length]=eff.effect(this,eff.duration)}}else{effectInstances[effectInstances.length]=effect.effect(this,effect.duration)}}if(visible){if(isMacGecko){this.showMacGeckoScrollbars()}if(effect){if(visible){if(currentVis!="visible"||currentVis===""){this.beforeShowEvent.fire();nEffectInstances=effectInstances.length;for(j=0;j<nEffectInstances;j++){ei=effectInstances[j];if(j===0&&!alreadySubscribed(ei.animateInCompleteEvent,this.showEvent.fire,this.showEvent)){ei.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,true)}ei.animateIn()}}}}else{if(currentVis!="visible"||currentVis===""){this.beforeShowEvent.fire();this._setDomVisibility(true);this.cfg.refireEvent("iframe");this.showEvent.fire()}else{this._setDomVisibility(true)}}}else{if(isMacGecko){this.hideMacGeckoScrollbars()}if(effect){if(currentVis=="visible"){this.beforeHideEvent.fire();nEffectInstances=effectInstances.length;for(k=0;k<nEffectInstances;k++){h=effectInstances[k];if(k===0&&!alreadySubscribed(h.animateOutCompleteEvent,this.hideEvent.fire,this.hideEvent)){h.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,true)}h.animateOut()}}else if(currentVis===""){this._setDomVisibility(false)}}else{if(currentVis=="visible"||currentVis===""){this.beforeHideEvent.fire();this._setDomVisibility(false);this.hideEvent.fire()}else{this._setDomVisibility(false)}}}},doCenterOnDOMEvent:function(){var cfg=this.cfg,fc=cfg.getProperty("fixedcenter");if(cfg.getProperty("visible")){if(fc&&(fc!==_CONTAINED||this.fitsInViewport())){this.center()}}},fitsInViewport:function(){var nViewportOffset=Overlay.VIEWPORT_OFFSET,element=this.element,elementWidth=element.offsetWidth,elementHeight=element.offsetHeight,viewportWidth=Dom.getViewportWidth(),viewportHeight=Dom.getViewportHeight();return((elementWidth+nViewportOffset<viewportWidth)&&(elementHeight+nViewportOffset<viewportHeight))},configFixedCenter:function(type,args,obj){var val=args[0],alreadySubscribed=Config.alreadySubscribed,windowResizeEvent=Overlay.windowResizeEvent,windowScrollEvent=Overlay.windowScrollEvent;if(val){this.center();if(!alreadySubscribed(this.beforeShowEvent,this.center)){this.beforeShowEvent.subscribe(this.center)}if(!alreadySubscribed(windowResizeEvent,this.doCenterOnDOMEvent,this)){windowResizeEvent.subscribe(this.doCenterOnDOMEvent,this,true)}if(!alreadySubscribed(windowScrollEvent,this.doCenterOnDOMEvent,this)){windowScrollEvent.subscribe(this.doCenterOnDOMEvent,this,true)}}else{this.beforeShowEvent.unsubscribe(this.center);windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this)}},configHeight:function(type,args,obj){var height=args[0],el=this.element;Dom.setStyle(el,"height",height);this.cfg.refireEvent("iframe")},configAutoFillHeight:function(type,args,obj){var fillEl=args[0],cfg=this.cfg,autoFillHeight="autofillheight",height="height",currEl=cfg.getProperty(autoFillHeight),autoFill=this._autoFillOnHeightChange;cfg.unsubscribeFromConfigEvent(height,autoFill);Module.textResizeEvent.unsubscribe(autoFill);this.changeContentEvent.unsubscribe(autoFill);if(currEl&&fillEl!==currEl&&this[currEl]){Dom.setStyle(this[currEl],height,"")}if(fillEl){fillEl=Lang.trim(fillEl.toLowerCase());cfg.subscribeToConfigEvent(height,autoFill,this[fillEl],this);Module.textResizeEvent.subscribe(autoFill,this[fillEl],this);this.changeContentEvent.subscribe(autoFill,this[fillEl],this);cfg.setProperty(autoFillHeight,fillEl,true)}},configWidth:function(type,args,obj){var width=args[0],el=this.element;Dom.setStyle(el,"width",width);this.cfg.refireEvent("iframe")},configzIndex:function(type,args,obj){var zIndex=args[0],el=this.element;if(!zIndex){zIndex=Dom.getStyle(el,"zIndex");if(!zIndex||isNaN(zIndex)){zIndex=0}}if(this.iframe||this.cfg.getProperty("iframe")===true){if(zIndex<=0){zIndex=1}}Dom.setStyle(el,"zIndex",zIndex);this.cfg.setProperty("zIndex",zIndex,true);if(this.iframe){this.stackIframe()}},configXY:function(type,args,obj){var pos=args[0],x=pos[0],y=pos[1];this.cfg.setProperty("x",x);this.cfg.setProperty("y",y);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y])},configX:function(type,args,obj){var x=args[0],y=this.cfg.getProperty("y");this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");Dom.setX(this.element,x,true);this.cfg.setProperty("xy",[x,y],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y])},configY:function(type,args,obj){var x=this.cfg.getProperty("x"),y=args[0];this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");Dom.setY(this.element,y,true);this.cfg.setProperty("xy",[x,y],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y])},showIframe:function(){var oIFrame=this.iframe,oParentNode;if(oIFrame){oParentNode=this.element.parentNode;if(oParentNode!=oIFrame.parentNode){this._addToParent(oParentNode,oIFrame)}oIFrame.style.display="block"}},hideIframe:function(){if(this.iframe){this.iframe.style.display="none"}},syncIframe:function(){var oIFrame=this.iframe,oElement=this.element,nOffset=Overlay.IFRAME_OFFSET,nDimensionOffset=(nOffset*2),aXY;if(oIFrame){oIFrame.style.width=(oElement.offsetWidth+nDimensionOffset+"px");oIFrame.style.height=(oElement.offsetHeight+nDimensionOffset+"px");aXY=this.cfg.getProperty("xy");if(!Lang.isArray(aXY)||(isNaN(aXY[0])||isNaN(aXY[1]))){this.syncPosition();aXY=this.cfg.getProperty("xy")}Dom.setXY(oIFrame,[(aXY[0]-nOffset),(aXY[1]-nOffset)])}},stackIframe:function(){if(this.iframe){var overlayZ=Dom.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(overlayZ)&&!isNaN(overlayZ)){Dom.setStyle(this.iframe,"zIndex",(overlayZ-1))}}},configIframe:function(type,args,obj){var bIFrame=args[0];function createIFrame(){var oIFrame=this.iframe,oElement=this.element,oParent;if(!oIFrame){if(!m_oIFrameTemplate){m_oIFrameTemplate=document.createElement("iframe");if(this.isSecure){m_oIFrameTemplate.src=Overlay.IFRAME_SRC}if(UA.ie){m_oIFrameTemplate.style.filter="alpha(opacity=0)";m_oIFrameTemplate.frameBorder=0}else{m_oIFrameTemplate.style.opacity="0"}m_oIFrameTemplate.style.position="absolute";m_oIFrameTemplate.style.border="none";m_oIFrameTemplate.style.margin="0";m_oIFrameTemplate.style.padding="0";m_oIFrameTemplate.style.display="none";m_oIFrameTemplate.tabIndex=-1}oIFrame=m_oIFrameTemplate.cloneNode(false);oParent=oElement.parentNode;var parentNode=oParent||document.body;this._addToParent(parentNode,oIFrame);this.iframe=oIFrame}this.showIframe();this.syncIframe();this.stackIframe();if(!this._hasIframeEventListeners){this.showEvent.subscribe(this.showIframe);this.hideEvent.subscribe(this.hideIframe);this.changeContentEvent.subscribe(this.syncIframe);this._hasIframeEventListeners=true}}function onBeforeShow(){createIFrame.call(this);this.beforeShowEvent.unsubscribe(onBeforeShow);this._iframeDeferred=false}if(bIFrame){if(this.cfg.getProperty("visible")){createIFrame.call(this)}else{if(!this._iframeDeferred){this.beforeShowEvent.subscribe(onBeforeShow);this._iframeDeferred=true}}}else{this.hideIframe();if(this._hasIframeEventListeners){this.showEvent.unsubscribe(this.showIframe);this.hideEvent.unsubscribe(this.hideIframe);this.changeContentEvent.unsubscribe(this.syncIframe);this._hasIframeEventListeners=false}}},_primeXYFromDOM:function(){if(YAHOO.lang.isUndefined(this.cfg.getProperty("xy"))){this.syncPosition();this.cfg.refireEvent("xy");this.beforeShowEvent.unsubscribe(this._primeXYFromDOM)}},configConstrainToViewport:function(type,args,obj){var val=args[0];if(val){if(!Config.alreadySubscribed(this.beforeMoveEvent,this.enforceConstraints,this)){this.beforeMoveEvent.subscribe(this.enforceConstraints,this,true)}if(!Config.alreadySubscribed(this.beforeShowEvent,this._primeXYFromDOM)){this.beforeShowEvent.subscribe(this._primeXYFromDOM)}}else{this.beforeShowEvent.unsubscribe(this._primeXYFromDOM);this.beforeMoveEvent.unsubscribe(this.enforceConstraints,this)}},configContext:function(type,args,obj){var contextArgs=args[0],contextEl,elementMagnetCorner,contextMagnetCorner,triggers,defTriggers=this.CONTEXT_TRIGGERS;if(contextArgs){contextEl=contextArgs[0];elementMagnetCorner=contextArgs[1];contextMagnetCorner=contextArgs[2];triggers=contextArgs[3];if(defTriggers&&defTriggers.length>0){triggers=(triggers||[]).concat(defTriggers)}if(contextEl){if(typeof contextEl=="string"){this.cfg.setProperty("context",[document.getElementById(contextEl),elementMagnetCorner,contextMagnetCorner,triggers],true)}if(elementMagnetCorner&&contextMagnetCorner){this.align(elementMagnetCorner,contextMagnetCorner)}if(this._contextTriggers){this._processTriggers(this._contextTriggers,_UNSUBSCRIBE,this._alignOnTrigger)}if(triggers){this._processTriggers(triggers,_SUBSCRIBE,this._alignOnTrigger);this._contextTriggers=triggers}}}},_alignOnTrigger:function(type,args){this.align()},_findTriggerCE:function(t){var tce=null;if(t instanceof CustomEvent){tce=t}else if(Overlay._TRIGGER_MAP[t]){tce=Overlay._TRIGGER_MAP[t]}return tce},_processTriggers:function(triggers,mode,fn){var t,tce;for(var i=0,l=triggers.length;i<l;++i){t=triggers[i];tce=this._findTriggerCE(t);if(tce){tce[mode](fn,this,true)}else{this[mode](t,fn)}}},align:function(elementAlign,contextAlign){var contextArgs=this.cfg.getProperty("context"),me=this,context,element,contextRegion;function doAlign(v,h){switch(elementAlign){case Overlay.TOP_LEFT:me.moveTo(h,v);break;case Overlay.TOP_RIGHT:me.moveTo((h-element.offsetWidth),v);break;case Overlay.BOTTOM_LEFT:me.moveTo(h,(v-element.offsetHeight));break;case Overlay.BOTTOM_RIGHT:me.moveTo((h-element.offsetWidth),(v-element.offsetHeight));break}}if(contextArgs){context=contextArgs[0];element=this.element;me=this;if(!elementAlign){elementAlign=contextArgs[1]}if(!contextAlign){contextAlign=contextArgs[2]}if(element&&context){contextRegion=Dom.getRegion(context);switch(contextAlign){case Overlay.TOP_LEFT:doAlign(contextRegion.top,contextRegion.left);break;case Overlay.TOP_RIGHT:doAlign(contextRegion.top,contextRegion.right);break;case Overlay.BOTTOM_LEFT:doAlign(contextRegion.bottom,contextRegion.left);break;case Overlay.BOTTOM_RIGHT:doAlign(contextRegion.bottom,contextRegion.right);break}}}},enforceConstraints:function(type,args,obj){var pos=args[0];var cXY=this.getConstrainedXY(pos[0],pos[1]);this.cfg.setProperty("x",cXY[0],true);this.cfg.setProperty("y",cXY[1],true);this.cfg.setProperty("xy",cXY,true)},getConstrainedX:function(x){var oOverlay=this,oOverlayEl=oOverlay.element,nOverlayOffsetWidth=oOverlayEl.offsetWidth,nViewportOffset=Overlay.VIEWPORT_OFFSET,viewPortWidth=Dom.getViewportWidth(),scrollX=Dom.getDocumentScrollLeft(),bCanConstrain=(nOverlayOffsetWidth+nViewportOffset<viewPortWidth),aContext=this.cfg.getProperty("context"),oContextEl,nContextElX,nContextElWidth,bFlipped=false,nLeftRegionWidth,nRightRegionWidth,leftConstraint=scrollX+nViewportOffset,rightConstraint=scrollX+viewPortWidth-nOverlayOffsetWidth-nViewportOffset,xNew=x,oOverlapPositions={"tltr":true,"blbr":true,"brbl":true,"trtl":true};var flipHorizontal=function(){var nNewX;if((oOverlay.cfg.getProperty("x")-scrollX)>nContextElX){nNewX=(nContextElX-nOverlayOffsetWidth)}else{nNewX=(nContextElX+nContextElWidth)}oOverlay.cfg.setProperty("x",(nNewX+scrollX),true);return nNewX};var getDisplayRegionWidth=function(){if((oOverlay.cfg.getProperty("x")-scrollX)>nContextElX){return(nRightRegionWidth-nViewportOffset)}else{return(nLeftRegionWidth-nViewportOffset)}};var setHorizontalPosition=function(){var nDisplayRegionWidth=getDisplayRegionWidth(),fnReturnVal;if(nOverlayOffsetWidth>nDisplayRegionWidth){if(bFlipped){flipHorizontal()}else{flipHorizontal();bFlipped=true;fnReturnVal=setHorizontalPosition()}}return fnReturnVal};if(x<leftConstraint||x>rightConstraint){if(bCanConstrain){if(this.cfg.getProperty("preventcontextoverlap")&&aContext&&oOverlapPositions[(aContext[1]+aContext[2])]){oContextEl=aContext[0];nContextElX=Dom.getX(oContextEl)-scrollX;nContextElWidth=oContextEl.offsetWidth;nLeftRegionWidth=nContextElX;nRightRegionWidth=(viewPortWidth-(nContextElX+nContextElWidth));setHorizontalPosition();xNew=this.cfg.getProperty("x")}else{if(x<leftConstraint){xNew=leftConstraint}else if(x>rightConstraint){xNew=rightConstraint}}}else{xNew=nViewportOffset+scrollX}}return xNew},getConstrainedY:function(y){var oOverlay=this,oOverlayEl=oOverlay.element,nOverlayOffsetHeight=oOverlayEl.offsetHeight,nViewportOffset=Overlay.VIEWPORT_OFFSET,viewPortHeight=Dom.getViewportHeight(),scrollY=Dom.getDocumentScrollTop(),bCanConstrain=(nOverlayOffsetHeight+nViewportOffset<viewPortHeight),aContext=this.cfg.getProperty("context"),oContextEl,nContextElY,nContextElHeight,bFlipped=false,nTopRegionHeight,nBottomRegionHeight,topConstraint=scrollY+nViewportOffset,bottomConstraint=scrollY+viewPortHeight-nOverlayOffsetHeight-nViewportOffset,yNew=y,oOverlapPositions={"trbr":true,"tlbl":true,"bltl":true,"brtr":true};var flipVertical=function(){var nNewY;if((oOverlay.cfg.getProperty("y")-scrollY)>nContextElY){nNewY=(nContextElY-nOverlayOffsetHeight)}else{nNewY=(nContextElY+nContextElHeight)}oOverlay.cfg.setProperty("y",(nNewY+scrollY),true);return nNewY};var getDisplayRegionHeight=function(){if((oOverlay.cfg.getProperty("y")-scrollY)>nContextElY){return(nBottomRegionHeight-nViewportOffset)}else{return(nTopRegionHeight-nViewportOffset)}};var setVerticalPosition=function(){var nDisplayRegionHeight=getDisplayRegionHeight(),fnReturnVal;if(nOverlayOffsetHeight>nDisplayRegionHeight){if(bFlipped){flipVertical()}else{flipVertical();bFlipped=true;fnReturnVal=setVerticalPosition()}}return fnReturnVal};if(y<topConstraint||y>bottomConstraint){if(bCanConstrain){if(this.cfg.getProperty("preventcontextoverlap")&&aContext&&oOverlapPositions[(aContext[1]+aContext[2])]){oContextEl=aContext[0];nContextElHeight=oContextEl.offsetHeight;nContextElY=(Dom.getY(oContextEl)-scrollY);nTopRegionHeight=nContextElY;nBottomRegionHeight=(viewPortHeight-(nContextElY+nContextElHeight));setVerticalPosition();yNew=oOverlay.cfg.getProperty("y")}else{if(y<topConstraint){yNew=topConstraint}else if(y>bottomConstraint){yNew=bottomConstraint}}}else{yNew=nViewportOffset+scrollY}}return yNew},getConstrainedXY:function(x,y){return[this.getConstrainedX(x),this.getConstrainedY(y)]},center:function(){var nViewportOffset=Overlay.VIEWPORT_OFFSET,elementWidth=this.element.offsetWidth,elementHeight=this.element.offsetHeight,viewPortWidth=Dom.getViewportWidth(),viewPortHeight=Dom.getViewportHeight(),x,y;if(elementWidth<viewPortWidth){x=(viewPortWidth/2)-(elementWidth/2)+Dom.getDocumentScrollLeft()}else{x=nViewportOffset+Dom.getDocumentScrollLeft()}if(elementHeight<viewPortHeight){y=(viewPortHeight/2)-(elementHeight/2)+Dom.getDocumentScrollTop()}else{y=nViewportOffset+Dom.getDocumentScrollTop()}this.cfg.setProperty("xy",[parseInt(x,10),parseInt(y,10)]);this.cfg.refireEvent("iframe");if(UA.webkit){this.forceContainerRedraw()}},syncPosition:function(){var pos=Dom.getXY(this.element);this.cfg.setProperty("x",pos[0],true);this.cfg.setProperty("y",pos[1],true);this.cfg.setProperty("xy",pos,true)},onDomResize:function(e,obj){var me=this;Overlay.superclass.onDomResize.call(this,e,obj);setTimeout(function(){me.syncPosition();me.cfg.refireEvent("iframe");me.cfg.refireEvent("context")},0)},_getComputedHeight:(function(){if(document.defaultView&&document.defaultView.getComputedStyle){return function(el){var height=null;if(el.ownerDocument&&el.ownerDocument.defaultView){var computed=el.ownerDocument.defaultView.getComputedStyle(el,'');if(computed){height=parseInt(computed.height,10)}}return(Lang.isNumber(height))?height:null}}else{return function(el){var height=null;if(el.style.pixelHeight){height=el.style.pixelHeight}return(Lang.isNumber(height))?height:null}}})(),_validateAutoFillHeight:function(val){return(!val)||(Lang.isString(val)&&Overlay.STD_MOD_RE.test(val))},_autoFillOnHeightChange:function(type,args,el){var height=this.cfg.getProperty("height");if((height&&height!=="auto")||(height===0)){this.fillHeight(el)}},_getPreciseHeight:function(el){var height=el.offsetHeight;if(el.getBoundingClientRect){var rect=el.getBoundingClientRect();height=rect.bottom-rect.top}return height},fillHeight:function(el){if(el){var container=this.innerElement||this.element,containerEls=[this.header,this.body,this.footer],containerEl,total=0,filled=0,remaining=0,validEl=false;for(var i=0,l=containerEls.length;i<l;i++){containerEl=containerEls[i];if(containerEl){if(el!==containerEl){filled+=this._getPreciseHeight(containerEl)}else{validEl=true}}}if(validEl){if(UA.ie||UA.opera){Dom.setStyle(el,'height',0+'px')}total=this._getComputedHeight(container);if(total===null){Dom.addClass(container,"yui-override-padding");total=container.clientHeight;Dom.removeClass(container,"yui-override-padding")}remaining=Math.max(total-filled,0);Dom.setStyle(el,"height",remaining+"px");if(el.offsetHeight!=remaining){remaining=Math.max(remaining-(el.offsetHeight-remaining),0)}Dom.setStyle(el,"height",remaining+"px")}}},bringToTop:function(){var aOverlays=[],oElement=this.element;function compareZIndexDesc(p_oOverlay1,p_oOverlay2){var sZIndex1=Dom.getStyle(p_oOverlay1,"zIndex"),sZIndex2=Dom.getStyle(p_oOverlay2,"zIndex"),nZIndex1=(!sZIndex1||isNaN(sZIndex1))?0:parseInt(sZIndex1,10),nZIndex2=(!sZIndex2||isNaN(sZIndex2))?0:parseInt(sZIndex2,10);if(nZIndex1>nZIndex2){return-1}else if(nZIndex1<nZIndex2){return 1}else{return 0}}function isOverlayElement(p_oElement){var isOverlay=Dom.hasClass(p_oElement,Overlay.CSS_OVERLAY),Panel=YAHOO.widget.Panel;if(isOverlay&&!Dom.isAncestor(oElement,p_oElement)){if(Panel&&Dom.hasClass(p_oElement,Panel.CSS_PANEL)){aOverlays[aOverlays.length]=p_oElement.parentNode}else{aOverlays[aOverlays.length]=p_oElement}}}Dom.getElementsBy(isOverlayElement,"DIV",document.body);aOverlays.sort(compareZIndexDesc);var oTopOverlay=aOverlays[0],nTopZIndex;if(oTopOverlay){nTopZIndex=Dom.getStyle(oTopOverlay,"zIndex");if(!isNaN(nTopZIndex)){var bRequiresBump=false;if(oTopOverlay!=oElement){bRequiresBump=true}else if(aOverlays.length>1){var nNextZIndex=Dom.getStyle(aOverlays[1],"zIndex");if(!isNaN(nNextZIndex)&&(nTopZIndex==nNextZIndex)){bRequiresBump=true}}if(bRequiresBump){this.cfg.setProperty("zindex",(parseInt(nTopZIndex,10)+2))}}}},destroy:function(){if(this.iframe){this.iframe.parentNode.removeChild(this.iframe)}this.iframe=null;Overlay.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);Overlay.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this);Module.textResizeEvent.unsubscribe(this._autoFillOnHeightChange);Overlay.superclass.destroy.call(this)},forceContainerRedraw:function(){var c=this;Dom.addClass(c.element,"yui-force-redraw");setTimeout(function(){Dom.removeClass(c.element,"yui-force-redraw")},0)},toString:function(){return"Overlay "+this.id}})}());(function(){YAHOO.widget.OverlayManager=function(userConfig){this.init(userConfig)};var Overlay=YAHOO.widget.Overlay,Event=YAHOO.util.Event,Dom=YAHOO.util.Dom,Config=YAHOO.util.Config,CustomEvent=YAHOO.util.CustomEvent,OverlayManager=YAHOO.widget.OverlayManager;OverlayManager.CSS_FOCUSED="focused";OverlayManager.prototype={constructor:OverlayManager,overlays:null,initDefaultConfig:function(){this.cfg.addProperty("overlays",{suppressEvent:true});this.cfg.addProperty("focusevent",{value:"mousedown"})},init:function(userConfig){this.cfg=new Config(this);this.initDefaultConfig();if(userConfig){this.cfg.applyConfig(userConfig,true)}this.cfg.fireQueue();var activeOverlay=null;this.getActive=function(){return activeOverlay};this.focus=function(overlay){var o=this.find(overlay);if(o){o.focus()}};this.remove=function(overlay){var o=this.find(overlay),originalZ;if(o){if(activeOverlay==o){activeOverlay=null}var bDestroyed=(o.element===null&&o.cfg===null)?true:false;if(!bDestroyed){originalZ=Dom.getStyle(o.element,"zIndex");o.cfg.setProperty("zIndex",-1000,true)}this.overlays.sort(this.compareZIndexDesc);this.overlays=this.overlays.slice(0,(this.overlays.length-1));o.hideEvent.unsubscribe(o.blur);o.destroyEvent.unsubscribe(this._onOverlayDestroy,o);o.focusEvent.unsubscribe(this._onOverlayFocusHandler,o);o.blurEvent.unsubscribe(this._onOverlayBlurHandler,o);if(!bDestroyed){Event.removeListener(o.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus);o.cfg.setProperty("zIndex",originalZ,true);o.cfg.setProperty("manager",null)}if(o.focusEvent._managed){o.focusEvent=null}if(o.blurEvent._managed){o.blurEvent=null}if(o.focus._managed){o.focus=null}if(o.blur._managed){o.blur=null}}};this.blurAll=function(){var nOverlays=this.overlays.length,i;if(nOverlays>0){i=nOverlays-1;do{this.overlays[i].blur()}while(i--)}};this._manageBlur=function(overlay){var changed=false;if(activeOverlay==overlay){Dom.removeClass(activeOverlay.element,OverlayManager.CSS_FOCUSED);activeOverlay=null;changed=true}return changed};this._manageFocus=function(overlay){var changed=false;if(activeOverlay!=overlay){if(activeOverlay){activeOverlay.blur()}activeOverlay=overlay;this.bringToTop(activeOverlay);Dom.addClass(activeOverlay.element,OverlayManager.CSS_FOCUSED);changed=true}return changed};var overlays=this.cfg.getProperty("overlays");if(!this.overlays){this.overlays=[]}if(overlays){this.register(overlays);this.overlays.sort(this.compareZIndexDesc)}},_onOverlayElementFocus:function(p_oEvent){var oTarget=Event.getTarget(p_oEvent),oClose=this.close;if(oClose&&(oTarget==oClose||Dom.isAncestor(oClose,oTarget))){this.blur()}else{this.focus()}},_onOverlayDestroy:function(p_sType,p_aArgs,p_oOverlay){this.remove(p_oOverlay)},_onOverlayFocusHandler:function(p_sType,p_aArgs,p_oOverlay){this._manageFocus(p_oOverlay)},_onOverlayBlurHandler:function(p_sType,p_aArgs,p_oOverlay){this._manageBlur(p_oOverlay)},_bindFocus:function(overlay){var mgr=this;if(!overlay.focusEvent){overlay.focusEvent=overlay.createEvent("focus");overlay.focusEvent.signature=CustomEvent.LIST;overlay.focusEvent._managed=true}else{overlay.focusEvent.subscribe(mgr._onOverlayFocusHandler,overlay,mgr)}if(!overlay.focus){Event.on(overlay.element,mgr.cfg.getProperty("focusevent"),mgr._onOverlayElementFocus,null,overlay);overlay.focus=function(){if(mgr._manageFocus(this)){if(this.cfg.getProperty("visible")&&this.focusFirst){this.focusFirst()}this.focusEvent.fire()}};overlay.focus._managed=true}},_bindBlur:function(overlay){var mgr=this;if(!overlay.blurEvent){overlay.blurEvent=overlay.createEvent("blur");overlay.blurEvent.signature=CustomEvent.LIST;overlay.focusEvent._managed=true}else{overlay.blurEvent.subscribe(mgr._onOverlayBlurHandler,overlay,mgr)}if(!overlay.blur){overlay.blur=function(){if(mgr._manageBlur(this)){this.blurEvent.fire()}};overlay.blur._managed=true}overlay.hideEvent.subscribe(overlay.blur)},_bindDestroy:function(overlay){var mgr=this;overlay.destroyEvent.subscribe(mgr._onOverlayDestroy,overlay,mgr)},_syncZIndex:function(overlay){var zIndex=Dom.getStyle(overlay.element,"zIndex");if(!isNaN(zIndex)){overlay.cfg.setProperty("zIndex",parseInt(zIndex,10))}else{overlay.cfg.setProperty("zIndex",0)}},register:function(overlay){var registered=false,i,n;if(overlay instanceof Overlay){overlay.cfg.addProperty("manager",{value:this});this._bindFocus(overlay);this._bindBlur(overlay);this._bindDestroy(overlay);this._syncZIndex(overlay);this.overlays.push(overlay);this.bringToTop(overlay);registered=true}else if(overlay instanceof Array){for(i=0,n=overlay.length;i<n;i++){registered=this.register(overlay[i])||registered}}return registered},bringToTop:function(p_oOverlay){var oOverlay=this.find(p_oOverlay),nTopZIndex,oTopOverlay,aOverlays;if(oOverlay){aOverlays=this.overlays;aOverlays.sort(this.compareZIndexDesc);oTopOverlay=aOverlays[0];if(oTopOverlay){nTopZIndex=Dom.getStyle(oTopOverlay.element,"zIndex");if(!isNaN(nTopZIndex)){var bRequiresBump=false;if(oTopOverlay!==oOverlay){bRequiresBump=true}else if(aOverlays.length>1){var nNextZIndex=Dom.getStyle(aOverlays[1].element,"zIndex");if(!isNaN(nNextZIndex)&&(nTopZIndex==nNextZIndex)){bRequiresBump=true}}if(bRequiresBump){oOverlay.cfg.setProperty("zindex",(parseInt(nTopZIndex,10)+2))}}aOverlays.sort(this.compareZIndexDesc)}}},find:function(overlay){var isInstance=overlay instanceof Overlay,overlays=this.overlays,n=overlays.length,found=null,o,i;if(isInstance||typeof overlay=="string"){for(i=n-1;i>=0;i--){o=overlays[i];if((isInstance&&(o===overlay))||(o.id==overlay)){found=o;break}}}return found},compareZIndexDesc:function(o1,o2){var zIndex1=(o1.cfg)?o1.cfg.getProperty("zIndex"):null,zIndex2=(o2.cfg)?o2.cfg.getProperty("zIndex"):null;if(zIndex1===null&&zIndex2===null){return 0}else if(zIndex1===null){return 1}else if(zIndex2===null){return-1}else if(zIndex1>zIndex2){return-1}else if(zIndex1<zIndex2){return 1}else{return 0}},showAll:function(){var overlays=this.overlays,n=overlays.length,i;for(i=n-1;i>=0;i--){overlays[i].show()}},hideAll:function(){var overlays=this.overlays,n=overlays.length,i;for(i=n-1;i>=0;i--){overlays[i].hide()}},toString:function(){return"OverlayManager"}}}());(function(){YAHOO.widget.ContainerEffect=function(overlay,attrIn,attrOut,targetElement,animClass){if(!animClass){animClass=YAHOO.util.Anim}this.overlay=overlay;this.attrIn=attrIn;this.attrOut=attrOut;this.targetElement=targetElement||overlay.element;this.animClass=animClass};var Dom=YAHOO.util.Dom,CustomEvent=YAHOO.util.CustomEvent,ContainerEffect=YAHOO.widget.ContainerEffect;ContainerEffect.FADE=function(overlay,dur){var Easing=YAHOO.util.Easing,fin={attributes:{opacity:{from:0,to:1}},duration:dur,method:Easing.easeIn},fout={attributes:{opacity:{to:0}},duration:dur,method:Easing.easeOut},fade=new ContainerEffect(overlay,fin,fout,overlay.element);fade.handleUnderlayStart=function(){var underlay=this.overlay.underlay;if(underlay&&YAHOO.env.ua.ie){var hasFilters=(underlay.filters&&underlay.filters.length>0);if(hasFilters){Dom.addClass(overlay.element,"yui-effect-fade")}}};fade.handleUnderlayComplete=function(){var underlay=this.overlay.underlay;if(underlay&&YAHOO.env.ua.ie){Dom.removeClass(overlay.element,"yui-effect-fade")}};fade.handleStartAnimateIn=function(type,args,obj){Dom.addClass(obj.overlay.element,"hide-select");if(!obj.overlay.underlay){obj.overlay.cfg.refireEvent("underlay")}obj.handleUnderlayStart();obj.overlay._setDomVisibility(true);Dom.setStyle(obj.overlay.element,"opacity",0)};fade.handleCompleteAnimateIn=function(type,args,obj){Dom.removeClass(obj.overlay.element,"hide-select");if(obj.overlay.element.style.filter){obj.overlay.element.style.filter=null}obj.handleUnderlayComplete();obj.overlay.cfg.refireEvent("iframe");obj.animateInCompleteEvent.fire()};fade.handleStartAnimateOut=function(type,args,obj){Dom.addClass(obj.overlay.element,"hide-select");obj.handleUnderlayStart()};fade.handleCompleteAnimateOut=function(type,args,obj){Dom.removeClass(obj.overlay.element,"hide-select");if(obj.overlay.element.style.filter){obj.overlay.element.style.filter=null}obj.overlay._setDomVisibility(false);Dom.setStyle(obj.overlay.element,"opacity",1);obj.handleUnderlayComplete();obj.overlay.cfg.refireEvent("iframe");obj.animateOutCompleteEvent.fire()};fade.init();return fade};ContainerEffect.SLIDE=function(overlay,dur){var Easing=YAHOO.util.Easing,x=overlay.cfg.getProperty("x")||Dom.getX(overlay.element),y=overlay.cfg.getProperty("y")||Dom.getY(overlay.element),clientWidth=Dom.getClientWidth(),offsetWidth=overlay.element.offsetWidth,sin={attributes:{points:{to:[x,y]}},duration:dur,method:Easing.easeIn},sout={attributes:{points:{to:[(clientWidth+25),y]}},duration:dur,method:Easing.easeOut},slide=new ContainerEffect(overlay,sin,sout,overlay.element,YAHOO.util.Motion);slide.handleStartAnimateIn=function(type,args,obj){obj.overlay.element.style.left=((-25)-offsetWidth)+"px";obj.overlay.element.style.top=y+"px"};slide.handleTweenAnimateIn=function(type,args,obj){var pos=Dom.getXY(obj.overlay.element),currentX=pos[0],currentY=pos[1];if(Dom.getStyle(obj.overlay.element,"visibility")=="hidden"&&currentX<x){obj.overlay._setDomVisibility(true)}obj.overlay.cfg.setProperty("xy",[currentX,currentY],true);obj.overlay.cfg.refireEvent("iframe")};slide.handleCompleteAnimateIn=function(type,args,obj){obj.overlay.cfg.setProperty("xy",[x,y],true);obj.startX=x;obj.startY=y;obj.overlay.cfg.refireEvent("iframe");obj.animateInCompleteEvent.fire()};slide.handleStartAnimateOut=function(type,args,obj){var vw=Dom.getViewportWidth(),pos=Dom.getXY(obj.overlay.element),yso=pos[1];obj.animOut.attributes.points.to=[(vw+25),yso]};slide.handleTweenAnimateOut=function(type,args,obj){var pos=Dom.getXY(obj.overlay.element),xto=pos[0],yto=pos[1];obj.overlay.cfg.setProperty("xy",[xto,yto],true);obj.overlay.cfg.refireEvent("iframe")};slide.handleCompleteAnimateOut=function(type,args,obj){obj.overlay._setDomVisibility(false);obj.overlay.cfg.setProperty("xy",[x,y]);obj.animateOutCompleteEvent.fire()};slide.init();return slide};ContainerEffect.prototype={init:function(){this.beforeAnimateInEvent=this.createEvent("beforeAnimateIn");this.beforeAnimateInEvent.signature=CustomEvent.LIST;this.beforeAnimateOutEvent=this.createEvent("beforeAnimateOut");this.beforeAnimateOutEvent.signature=CustomEvent.LIST;this.animateInCompleteEvent=this.createEvent("animateInComplete");this.animateInCompleteEvent.signature=CustomEvent.LIST;this.animateOutCompleteEvent=this.createEvent("animateOutComplete");this.animateOutCompleteEvent.signature=CustomEvent.LIST;this.animIn=new this.animClass(this.targetElement,this.attrIn.attributes,this.attrIn.duration,this.attrIn.method);this.animIn.onStart.subscribe(this.handleStartAnimateIn,this);this.animIn.onTween.subscribe(this.handleTweenAnimateIn,this);this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn,this);this.animOut=new this.animClass(this.targetElement,this.attrOut.attributes,this.attrOut.duration,this.attrOut.method);this.animOut.onStart.subscribe(this.handleStartAnimateOut,this);this.animOut.onTween.subscribe(this.handleTweenAnimateOut,this);this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut,this)},animateIn:function(){this.beforeAnimateInEvent.fire();this.animIn.animate()},animateOut:function(){this.beforeAnimateOutEvent.fire();this.animOut.animate()},handleStartAnimateIn:function(type,args,obj){},handleTweenAnimateIn:function(type,args,obj){},handleCompleteAnimateIn:function(type,args,obj){},handleStartAnimateOut:function(type,args,obj){},handleTweenAnimateOut:function(type,args,obj){},handleCompleteAnimateOut:function(type,args,obj){},toString:function(){var output="ContainerEffect";if(this.overlay){output+=" ["+this.overlay.toString()+"]"}return output}};YAHOO.lang.augmentProto(ContainerEffect,YAHOO.util.EventProvider)})();YAHOO.register("containercore",YAHOO.widget.Module,{version:"2.7.0",build:"1799"});/*
245 237 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
246 238 Code licensed under the BSD License:
247 239 http://developer.yahoo.net/yui/license.txt
... ... @@ -256,8 +248,7 @@ if(Aq.ie){AN.later(0,this,function(){A9.call(this);this.syncIframe();});this.cfg
256 248 A3.addProperty(Ad.key,{value:Ad.value,validator:Ad.validator,supercedes:Ad.supercedes,suppressEvent:Ad.suppressEvent});A3.addProperty(N.key,{value:N.value,validator:N.validator,supercedes:N.supercedes,suppressEvent:N.suppressEvent});A3.addProperty(X.key,{handler:this.configMaxHeight,value:X.value,validator:X.validator,suppressEvent:X.suppressEvent,supercedes:X.supercedes});A3.addProperty(W.key,{handler:this.configClassName,value:W.value,validator:W.validator,supercedes:W.supercedes});A3.addProperty(b.key,{handler:this.configDisabled,value:b.value,validator:b.validator,suppressEvent:b.suppressEvent});A3.addProperty(I.key,{handler:this.configShadow,value:I.value,validator:I.validator});A3.addProperty(Aj.key,{value:Aj.value,validator:Aj.validator});}});})();(function(){YAHOO.widget.MenuItem=function(AS,AR){if(AS){if(AR){this.parent=AR.parent;this.value=AR.value;this.id=AR.id;}this.init(AS,AR);}};var x=YAHOO.util.Dom,j=YAHOO.widget.Module,AB=YAHOO.widget.Menu,c=YAHOO.widget.MenuItem,AK=YAHOO.util.CustomEvent,k=YAHOO.env.ua,AQ=YAHOO.lang,AL="text",O="#",Q="-",L="helptext",n="url",AH="target",A="emphasis",N="strongemphasis",b="checked",w="submenu",H="disabled",B="selected",P="hassubmenu",U="checked-disabled",AI="hassubmenu-disabled",AD="hassubmenu-selected",T="checked-selected",q="onclick",J="classname",AJ="",i="OPTION",v="OPTGROUP",K="LI",AE="href",r="SELECT",X="DIV",AN='<em class="helptext">',a="<em>",I="</em>",W="<strong>",y="</strong>",Y="preventcontextoverlap",h="obj",AG="scope",t="none",V="visible",E=" ",m="MenuItem",AA="click",D="show",M="hide",S="li",AF='<a href="#"></a>',p=[["mouseOverEvent","mouseover"],["mouseOutEvent","mouseout"],["mouseDownEvent","mousedown"],["mouseUpEvent","mouseup"],["clickEvent",AA],["keyPressEvent","keypress"],["keyDownEvent","keydown"],["keyUpEvent","keyup"],["focusEvent","focus"],["blurEvent","blur"],["destroyEvent","destroy"]],o={key:AL,value:AJ,validator:AQ.isString,suppressEvent:true},s={key:L,supercedes:[AL],suppressEvent:true},G={key:n,value:O,suppressEvent:true},AO={key:AH,suppressEvent:true},AP={key:A,value:false,validator:AQ.isBoolean,suppressEvent:true,supercedes:[AL]},d={key:N,value:false,validator:AQ.isBoolean,suppressEvent:true,supercedes:[AL]},l={key:b,value:false,validator:AQ.isBoolean,suppressEvent:true,supercedes:[H,B]},F={key:w,suppressEvent:true,supercedes:[H,B]},AM={key:H,value:false,validator:AQ.isBoolean,suppressEvent:true,supercedes:[AL,B]},f={key:B,value:false,validator:AQ.isBoolean,suppressEvent:true},u={key:q,suppressEvent:true},AC={key:J,value:null,validator:AQ.isString,suppressEvent:true},z={key:"keylistener",value:null,suppressEvent:true},C=null,e={};var Z=function(AU,AT){var AR=e[AU];if(!AR){e[AU]={};AR=e[AU];}var AS=AR[AT];if(!AS){AS=AU+Q+AT;AR[AT]=AS;}return AS;};var g=function(AR){x.addClass(this.element,Z(this.CSS_CLASS_NAME,AR));x.addClass(this._oAnchor,Z(this.CSS_LABEL_CLASS_NAME,AR));};var R=function(AR){x.removeClass(this.element,Z(this.CSS_CLASS_NAME,AR));x.removeClass(this._oAnchor,Z(this.CSS_LABEL_CLASS_NAME,AR));};c.prototype={CSS_CLASS_NAME:"yuimenuitem",CSS_LABEL_CLASS_NAME:"yuimenuitemlabel",SUBMENU_TYPE:null,_oAnchor:null,_oHelpTextEM:null,_oSubmenu:null,_oOnclickAttributeValue:null,_sClassName:null,constructor:c,index:null,groupIndex:null,parent:null,element:null,srcElement:null,value:null,browser:j.prototype.browser,id:null,init:function(AR,Ab){if(!this.SUBMENU_TYPE){this.SUBMENU_TYPE=AB;}this.cfg=new YAHOO.util.Config(this);this.initDefaultConfig();var AX=this.cfg,AY=O,AT,Aa,AZ,AS,AV,AU,AW;if(AQ.isString(AR)){this._createRootNodeStructure();AX.queueProperty(AL,AR);}else{if(AR&&AR.tagName){switch(AR.tagName.toUpperCase()){case i:this._createRootNodeStructure();AX.queueProperty(AL,AR.text);AX.queueProperty(H,AR.disabled);this.value=AR.value;this.srcElement=AR;break;case v:this._createRootNodeStructure();AX.queueProperty(AL,AR.label);AX.queueProperty(H,AR.disabled);this.srcElement=AR;this._initSubTree();break;case K:AZ=x.getFirstChild(AR);if(AZ){AY=AZ.getAttribute(AE,2);AS=AZ.getAttribute(AH);AV=AZ.innerHTML;}this.srcElement=AR;this.element=AR;this._oAnchor=AZ;AX.setProperty(AL,AV,true);AX.setProperty(n,AY,true);AX.setProperty(AH,AS,true);this._initSubTree();break;}}}if(this.element){AU=(this.srcElement||this.element).id;if(!AU){AU=this.id||x.generateId();this.element.id=AU;}this.id=AU;x.addClass(this.element,this.CSS_CLASS_NAME);x.addClass(this._oAnchor,this.CSS_LABEL_CLASS_NAME);AW=p.length-1;do{Aa=p[AW];AT=this.createEvent(Aa[1]);AT.signature=AK.LIST;this[Aa[0]]=AT;}while(AW--);if(Ab){AX.applyConfig(Ab);}AX.fireQueue();}},_createRootNodeStructure:function(){var AR,AS;if(!C){C=document.createElement(S);C.innerHTML=AF;}AR=C.cloneNode(true);AR.className=this.CSS_CLASS_NAME;AS=AR.firstChild;AS.className=this.CSS_LABEL_CLASS_NAME;this.element=AR;this._oAnchor=AS;},_initSubTree:function(){var AX=this.srcElement,AT=this.cfg,AV,AU,AS,AR,AW;if(AX.childNodes.length>0){if(this.parent.lazyLoad&&this.parent.srcElement&&this.parent.srcElement.tagName.toUpperCase()==r){AT.setProperty(w,{id:x.generateId(),itemdata:AX.childNodes});}else{AV=AX.firstChild;AU=[];do{if(AV&&AV.tagName){switch(AV.tagName.toUpperCase()){case X:AT.setProperty(w,AV);break;case i:AU[AU.length]=AV;break;}}}while((AV=AV.nextSibling));AS=AU.length;if(AS>0){AR=new this.SUBMENU_TYPE(x.generateId());AT.setProperty(w,AR);for(AW=0;AW<AS;AW++){AR.addItem((new AR.ITEM_TYPE(AU[AW])));}}}}},configText:function(Aa,AT,AV){var AS=AT[0],AU=this.cfg,AY=this._oAnchor,AR=AU.getProperty(L),AZ=AJ,AW=AJ,AX=AJ;if(AS){if(AR){AZ=AN+AR+I;}if(AU.getProperty(A)){AW=a;AX=I;}if(AU.getProperty(N)){AW=W;AX=y;}AY.innerHTML=(AW+AS+AX+AZ);}},configHelpText:function(AT,AS,AR){this.cfg.refireEvent(AL);},configURL:function(AT,AS,AR){var AV=AS[0];if(!AV){AV=O;}var AU=this._oAnchor;if(k.opera){AU.removeAttribute(AE);}AU.setAttribute(AE,AV);},configTarget:function(AU,AT,AS){var AR=AT[0],AV=this._oAnchor;if(AR&&AR.length>0){AV.setAttribute(AH,AR);}else{AV.removeAttribute(AH);}},configEmphasis:function(AT,AS,AR){var AV=AS[0],AU=this.cfg;
257 249 if(AV&&AU.getProperty(N)){AU.setProperty(N,false);}AU.refireEvent(AL);},configStrongEmphasis:function(AU,AT,AS){var AR=AT[0],AV=this.cfg;if(AR&&AV.getProperty(A)){AV.setProperty(A,false);}AV.refireEvent(AL);},configChecked:function(AT,AS,AR){var AV=AS[0],AU=this.cfg;if(AV){g.call(this,b);}else{R.call(this,b);}AU.refireEvent(AL);if(AU.getProperty(H)){AU.refireEvent(H);}if(AU.getProperty(B)){AU.refireEvent(B);}},configDisabled:function(AT,AS,AR){var AV=AS[0],AW=this.cfg,AU=AW.getProperty(w),AX=AW.getProperty(b);if(AV){if(AW.getProperty(B)){AW.setProperty(B,false);}g.call(this,H);if(AU){g.call(this,AI);}if(AX){g.call(this,U);}}else{R.call(this,H);if(AU){R.call(this,AI);}if(AX){R.call(this,U);}}},configSelected:function(AT,AS,AR){var AX=this.cfg,AW=this._oAnchor,AV=AS[0],AY=AX.getProperty(b),AU=AX.getProperty(w);if(k.opera){AW.blur();}if(AV&&!AX.getProperty(H)){g.call(this,B);if(AU){g.call(this,AD);}if(AY){g.call(this,T);}}else{R.call(this,B);if(AU){R.call(this,AD);}if(AY){R.call(this,T);}}if(this.hasFocus()&&k.opera){AW.focus();}},_onSubmenuBeforeHide:function(AU,AT){var AV=this.parent,AR;function AS(){AV._oAnchor.blur();AR.beforeHideEvent.unsubscribe(AS);}if(AV.hasFocus()){AR=AV.parent;AR.beforeHideEvent.subscribe(AS);}},configSubmenu:function(AY,AT,AW){var AV=AT[0],AU=this.cfg,AS=this.parent&&this.parent.lazyLoad,AX,AZ,AR;if(AV){if(AV instanceof AB){AX=AV;AX.parent=this;AX.lazyLoad=AS;}else{if(AQ.isObject(AV)&&AV.id&&!AV.nodeType){AZ=AV.id;AR=AV;AR.lazyload=AS;AR.parent=this;AX=new this.SUBMENU_TYPE(AZ,AR);AU.setProperty(w,AX,true);}else{AX=new this.SUBMENU_TYPE(AV,{lazyload:AS,parent:this});AU.setProperty(w,AX,true);}}if(AX){AX.cfg.setProperty(Y,true);g.call(this,P);if(AU.getProperty(n)===O){AU.setProperty(n,(O+AX.id));}this._oSubmenu=AX;if(k.opera){AX.beforeHideEvent.subscribe(this._onSubmenuBeforeHide);}}}else{R.call(this,P);if(this._oSubmenu){this._oSubmenu.destroy();}}if(AU.getProperty(H)){AU.refireEvent(H);}if(AU.getProperty(B)){AU.refireEvent(B);}},configOnClick:function(AT,AS,AR){var AU=AS[0];if(this._oOnclickAttributeValue&&(this._oOnclickAttributeValue!=AU)){this.clickEvent.unsubscribe(this._oOnclickAttributeValue.fn,this._oOnclickAttributeValue.obj);this._oOnclickAttributeValue=null;}if(!this._oOnclickAttributeValue&&AQ.isObject(AU)&&AQ.isFunction(AU.fn)){this.clickEvent.subscribe(AU.fn,((h in AU)?AU.obj:this),((AG in AU)?AU.scope:null));this._oOnclickAttributeValue=AU;}},configClassName:function(AU,AT,AS){var AR=AT[0];if(this._sClassName){x.removeClass(this.element,this._sClassName);}x.addClass(this.element,AR);this._sClassName=AR;},_dispatchClickEvent:function(){var AT=this,AS,AR;if(!AT.cfg.getProperty(H)){AS=x.getFirstChild(AT.element);if(k.ie){AS.fireEvent(q);}else{if((k.gecko&&k.gecko>=1.9)||k.opera||k.webkit){AR=document.createEvent("HTMLEvents");AR.initEvent(AA,true,true);}else{AR=document.createEvent("MouseEvents");AR.initMouseEvent(AA,true,true,window,0,0,0,0,0,false,false,false,false,0,null);}AS.dispatchEvent(AR);}}},_createKeyListener:function(AU,AT,AW){var AV=this,AS=AV.parent;var AR=new YAHOO.util.KeyListener(AS.element.ownerDocument,AW,{fn:AV._dispatchClickEvent,scope:AV,correctScope:true});if(AS.cfg.getProperty(V)){AR.enable();}AS.subscribe(D,AR.enable,null,AR);AS.subscribe(M,AR.disable,null,AR);AV._keyListener=AR;AS.unsubscribe(D,AV._createKeyListener,AW);},configKeyListener:function(AT,AS){var AV=AS[0],AU=this,AR=AU.parent;if(AU._keyData){AR.unsubscribe(D,AU._createKeyListener,AU._keyData);AU._keyData=null;}if(AU._keyListener){AR.unsubscribe(D,AU._keyListener.enable);AR.unsubscribe(M,AU._keyListener.disable);AU._keyListener.disable();AU._keyListener=null;}if(AV){AU._keyData=AV;AR.subscribe(D,AU._createKeyListener,AV,AU);}},initDefaultConfig:function(){var AR=this.cfg;AR.addProperty(o.key,{handler:this.configText,value:o.value,validator:o.validator,suppressEvent:o.suppressEvent});AR.addProperty(s.key,{handler:this.configHelpText,supercedes:s.supercedes,suppressEvent:s.suppressEvent});AR.addProperty(G.key,{handler:this.configURL,value:G.value,suppressEvent:G.suppressEvent});AR.addProperty(AO.key,{handler:this.configTarget,suppressEvent:AO.suppressEvent});AR.addProperty(AP.key,{handler:this.configEmphasis,value:AP.value,validator:AP.validator,suppressEvent:AP.suppressEvent,supercedes:AP.supercedes});AR.addProperty(d.key,{handler:this.configStrongEmphasis,value:d.value,validator:d.validator,suppressEvent:d.suppressEvent,supercedes:d.supercedes});AR.addProperty(l.key,{handler:this.configChecked,value:l.value,validator:l.validator,suppressEvent:l.suppressEvent,supercedes:l.supercedes});AR.addProperty(AM.key,{handler:this.configDisabled,value:AM.value,validator:AM.validator,suppressEvent:AM.suppressEvent});AR.addProperty(f.key,{handler:this.configSelected,value:f.value,validator:f.validator,suppressEvent:f.suppressEvent});AR.addProperty(F.key,{handler:this.configSubmenu,supercedes:F.supercedes,suppressEvent:F.suppressEvent});AR.addProperty(u.key,{handler:this.configOnClick,suppressEvent:u.suppressEvent});AR.addProperty(AC.key,{handler:this.configClassName,value:AC.value,validator:AC.validator,suppressEvent:AC.suppressEvent});AR.addProperty(z.key,{handler:this.configKeyListener,value:z.value,suppressEvent:z.suppressEvent});},getNextEnabledSibling:function(){var AU,AX,AR,AW,AV,AS;function AT(AY,AZ){return AY[AZ]||AT(AY,(AZ+1));}if(this.parent instanceof AB){AU=this.groupIndex;AX=this.parent.getItemGroups();if(this.index<(AX[AU].length-1)){AR=AT(AX[AU],(this.index+1));}else{if(AU<(AX.length-1)){AW=AU+1;}else{AW=0;}AV=AT(AX,AW);AR=AT(AV,0);}AS=(AR.cfg.getProperty(H)||AR.element.style.display==t)?AR.getNextEnabledSibling():AR;}return AS;},getPreviousEnabledSibling:function(){var AW,AY,AS,AR,AV,AU;function AX(AZ,Aa){return AZ[Aa]||AX(AZ,(Aa-1));}function AT(AZ,Aa){return AZ[Aa]?Aa:AT(AZ,(Aa+1));}if(this.parent instanceof AB){AW=this.groupIndex;AY=this.parent.getItemGroups();if(this.index>AT(AY[AW],0)){AS=AX(AY[AW],(this.index-1));}else{if(AW>AT(AY,0)){AR=AW-1;}else{AR=AY.length-1;
258 250 }AV=AX(AY,AR);AS=AX(AV,(AV.length-1));}AU=(AS.cfg.getProperty(H)||AS.element.style.display==t)?AS.getPreviousEnabledSibling():AS;}return AU;},focus:function(){var AU=this.parent,AT=this._oAnchor,AR=AU.activeItem;function AS(){try{if(!(k.ie&&!document.hasFocus())){if(AR){AR.blurEvent.fire();}AT.focus();this.focusEvent.fire();}}catch(AV){}}if(!this.cfg.getProperty(H)&&AU&&AU.cfg.getProperty(V)&&this.element.style.display!=t){AQ.later(0,this,AS);}},blur:function(){var AR=this.parent;if(!this.cfg.getProperty(H)&&AR&&AR.cfg.getProperty(V)){AQ.later(0,this,function(){try{this._oAnchor.blur();this.blurEvent.fire();}catch(AS){}},0);}},hasFocus:function(){return(YAHOO.widget.MenuManager.getFocusedMenuItem()==this);},destroy:function(){var AT=this.element,AS,AR,AV,AU;if(AT){AS=this.cfg.getProperty(w);if(AS){AS.destroy();}AR=AT.parentNode;if(AR){AR.removeChild(AT);this.destroyEvent.fire();}AU=p.length-1;do{AV=p[AU];this[AV[0]].unsubscribeAll();}while(AU--);this.cfg.configChangedEvent.unsubscribeAll();}},toString:function(){var AS=m,AR=this.id;if(AR){AS+=(E+AR);}return AS;}};AQ.augmentProto(c,YAHOO.util.EventProvider);})();(function(){var B="xy",C="mousedown",F="ContextMenu",J=" ";YAHOO.widget.ContextMenu=function(L,K){YAHOO.widget.ContextMenu.superclass.constructor.call(this,L,K);};var I=YAHOO.util.Event,E=YAHOO.env.ua,G=YAHOO.widget.ContextMenu,A={"TRIGGER_CONTEXT_MENU":"triggerContextMenu","CONTEXT_MENU":(E.opera?C:"contextmenu"),"CLICK":"click"},H={key:"trigger",suppressEvent:true};function D(L,K,M){this.cfg.setProperty(B,M);this.beforeShowEvent.unsubscribe(D,M);}YAHOO.lang.extend(G,YAHOO.widget.Menu,{_oTrigger:null,_bCancelled:false,contextEventTarget:null,triggerContextMenuEvent:null,init:function(L,K){G.superclass.init.call(this,L);this.beforeInitEvent.fire(G);if(K){this.cfg.applyConfig(K,true);}this.initEvent.fire(G);},initEvents:function(){G.superclass.initEvents.call(this);this.triggerContextMenuEvent=this.createEvent(A.TRIGGER_CONTEXT_MENU);this.triggerContextMenuEvent.signature=YAHOO.util.CustomEvent.LIST;},cancel:function(){this._bCancelled=true;},_removeEventHandlers:function(){var K=this._oTrigger;if(K){I.removeListener(K,A.CONTEXT_MENU,this._onTriggerContextMenu);if(E.opera){I.removeListener(K,A.CLICK,this._onTriggerClick);}}},_onTriggerClick:function(L,K){if(L.ctrlKey){I.stopEvent(L);}},_onTriggerContextMenu:function(M,K){var L;if(!(M.type==C&&!M.ctrlKey)){this.contextEventTarget=I.getTarget(M);this.triggerContextMenuEvent.fire(M);if(!this._bCancelled){I.stopEvent(M);YAHOO.widget.MenuManager.hideVisible();L=I.getXY(M);if(!YAHOO.util.Dom.inDocument(this.element)){this.beforeShowEvent.subscribe(D,L);}else{this.cfg.setProperty(B,L);}this.show();}this._bCancelled=false;}},toString:function(){var L=F,K=this.id;if(K){L+=(J+K);}return L;},initDefaultConfig:function(){G.superclass.initDefaultConfig.call(this);this.cfg.addProperty(H.key,{handler:this.configTrigger,suppressEvent:H.suppressEvent});},destroy:function(){this._removeEventHandlers();G.superclass.destroy.call(this);},configTrigger:function(L,K,N){var M=K[0];if(M){if(this._oTrigger){this._removeEventHandlers();}this._oTrigger=M;I.on(M,A.CONTEXT_MENU,this._onTriggerContextMenu,this,true);if(E.opera){I.on(M,A.CLICK,this._onTriggerClick,this,true);}}else{this._removeEventHandlers();}}});}());YAHOO.widget.ContextMenuItem=YAHOO.widget.MenuItem;(function(){var D=YAHOO.lang,N="static",M="dynamic,"+N,A="disabled",F="selected",B="autosubmenudisplay",G="submenu",C="visible",Q=" ",H="submenutoggleregion",P="MenuBar";YAHOO.widget.MenuBar=function(T,S){YAHOO.widget.MenuBar.superclass.constructor.call(this,T,S);};function O(T){var S=false;if(D.isString(T)){S=(M.indexOf((T.toLowerCase()))!=-1);}return S;}var R=YAHOO.util.Event,L=YAHOO.widget.MenuBar,K={key:"position",value:N,validator:O,supercedes:[C]},E={key:"submenualignment",value:["tl","bl"]},J={key:B,value:false,validator:D.isBoolean,suppressEvent:true},I={key:H,value:false,validator:D.isBoolean};D.extend(L,YAHOO.widget.Menu,{init:function(T,S){if(!this.ITEM_TYPE){this.ITEM_TYPE=YAHOO.widget.MenuBarItem;}L.superclass.init.call(this,T);this.beforeInitEvent.fire(L);if(S){this.cfg.applyConfig(S,true);}this.initEvent.fire(L);},CSS_CLASS_NAME:"yuimenubar",SUBMENU_TOGGLE_REGION_WIDTH:20,_onKeyDown:function(U,T,Y){var S=T[0],Z=T[1],W,X,V;if(Z&&!Z.cfg.getProperty(A)){X=Z.cfg;switch(S.keyCode){case 37:case 39:if(Z==this.activeItem&&!X.getProperty(F)){X.setProperty(F,true);}else{V=(S.keyCode==37)?Z.getPreviousEnabledSibling():Z.getNextEnabledSibling();if(V){this.clearActiveItem();V.cfg.setProperty(F,true);W=V.cfg.getProperty(G);if(W){W.show();W.setInitialFocus();}else{V.focus();}}}R.preventDefault(S);break;case 40:if(this.activeItem!=Z){this.clearActiveItem();X.setProperty(F,true);Z.focus();}W=X.getProperty(G);if(W){if(W.cfg.getProperty(C)){W.setInitialSelection();W.setInitialFocus();}else{W.show();W.setInitialFocus();}}R.preventDefault(S);break;}}if(S.keyCode==27&&this.activeItem){W=this.activeItem.cfg.getProperty(G);if(W&&W.cfg.getProperty(C)){W.hide();this.activeItem.focus();}else{this.activeItem.cfg.setProperty(F,false);this.activeItem.blur();}R.preventDefault(S);}},_onClick:function(e,Y,b){L.superclass._onClick.call(this,e,Y,b);var d=Y[1],T=true,S,f,U,W,Z,a,c,V;var X=function(){if(a.cfg.getProperty(C)){a.hide();}else{a.show();}};if(d&&!d.cfg.getProperty(A)){f=Y[0];U=R.getTarget(f);W=this.activeItem;Z=this.cfg;if(W&&W!=d){this.clearActiveItem();}d.cfg.setProperty(F,true);a=d.cfg.getProperty(G);if(a){S=d.element;c=YAHOO.util.Dom.getX(S);V=c+(S.offsetWidth-this.SUBMENU_TOGGLE_REGION_WIDTH);if(Z.getProperty(H)){if(R.getPageX(f)>V){X();R.preventDefault(f);T=false;}}else{X();}}}return T;},configSubmenuToggle:function(U,T){var S=T[0];if(S){this.cfg.setProperty(B,false);}},toString:function(){var T=P,S=this.id;if(S){T+=(Q+S);}return T;},initDefaultConfig:function(){L.superclass.initDefaultConfig.call(this);var S=this.cfg;S.addProperty(K.key,{handler:this.configPosition,value:K.value,validator:K.validator,supercedes:K.supercedes});
259   -S.addProperty(E.key,{value:E.value,suppressEvent:E.suppressEvent});S.addProperty(J.key,{value:J.value,validator:J.validator,suppressEvent:J.suppressEvent});S.addProperty(I.key,{value:I.value,validator:I.validator,handler:this.configSubmenuToggle});}});}());YAHOO.widget.MenuBarItem=function(B,A){YAHOO.widget.MenuBarItem.superclass.constructor.call(this,B,A);};YAHOO.lang.extend(YAHOO.widget.MenuBarItem,YAHOO.widget.MenuItem,{init:function(B,A){if(!this.SUBMENU_TYPE){this.SUBMENU_TYPE=YAHOO.widget.Menu;}YAHOO.widget.MenuBarItem.superclass.init.call(this,B);var C=this.cfg;if(A){C.applyConfig(A,true);}C.fireQueue();},CSS_CLASS_NAME:"yuimenubaritem",CSS_LABEL_CLASS_NAME:"yuimenubaritemlabel",toString:function(){var A="MenuBarItem";if(this.cfg&&this.cfg.getProperty("text")){A+=(": "+this.cfg.getProperty("text"));}return A;}});YAHOO.register("menu",YAHOO.widget.Menu,{version:"2.7.0",build:"1799"});
260   -/*
  251 +S.addProperty(E.key,{value:E.value,suppressEvent:E.suppressEvent});S.addProperty(J.key,{value:J.value,validator:J.validator,suppressEvent:J.suppressEvent});S.addProperty(I.key,{value:I.value,validator:I.validator,handler:this.configSubmenuToggle});}});}());YAHOO.widget.MenuBarItem=function(B,A){YAHOO.widget.MenuBarItem.superclass.constructor.call(this,B,A);};YAHOO.lang.extend(YAHOO.widget.MenuBarItem,YAHOO.widget.MenuItem,{init:function(B,A){if(!this.SUBMENU_TYPE){this.SUBMENU_TYPE=YAHOO.widget.Menu;}YAHOO.widget.MenuBarItem.superclass.init.call(this,B);var C=this.cfg;if(A){C.applyConfig(A,true);}C.fireQueue();},CSS_CLASS_NAME:"yuimenubaritem",CSS_LABEL_CLASS_NAME:"yuimenubaritemlabel",toString:function(){var A="MenuBarItem";if(this.cfg&&this.cfg.getProperty("text")){A+=(": "+this.cfg.getProperty("text"));}return A;}});YAHOO.register("menu",YAHOO.widget.Menu,{version:"2.7.0",build:"1799"});/*
261 252 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
262 253 Code licensed under the BSD License:
263 254 http://developer.yahoo.net/yui/license.txt
... ... @@ -265,8 +256,7 @@ version: 2.7.0
265 256 */
266 257 YAHOO.widget.LogMsg=function(A){this.msg=this.time=this.category=this.source=this.sourceDetail=null;if(A&&(A.constructor==Object)){for(var B in A){if(A.hasOwnProperty(B)){this[B]=A[B];}}}};YAHOO.widget.LogWriter=function(A){if(!A){YAHOO.log("Could not instantiate LogWriter due to invalid source.","error","LogWriter");return;}this._source=A;};YAHOO.widget.LogWriter.prototype.toString=function(){return"LogWriter "+this._sSource;};YAHOO.widget.LogWriter.prototype.log=function(A,B){YAHOO.widget.Logger.log(A,B,this._source);};YAHOO.widget.LogWriter.prototype.getSource=function(){return this._source;};YAHOO.widget.LogWriter.prototype.setSource=function(A){if(!A){YAHOO.log("Could not set source due to invalid source.","error",this.toString());return;}else{this._source=A;}};YAHOO.widget.LogWriter.prototype._source=null;YAHOO.widget.LogReader=function(B,A){this._sName=YAHOO.widget.LogReader._index;YAHOO.widget.LogReader._index++;this._buffer=[];this._filterCheckboxes={};this._lastTime=YAHOO.widget.Logger.getStartTime();if(A&&(A.constructor==Object)){for(var C in A){if(A.hasOwnProperty(C)){this[C]=A[C];}}}this._initContainerEl(B);if(!this._elContainer){YAHOO.log("Could not instantiate LogReader due to an invalid container element "+B,"error",this.toString());return;}this._initHeaderEl();this._initConsoleEl();this._initFooterEl();this._initDragDrop();this._initCategories();this._initSources();YAHOO.widget.Logger.newLogEvent.subscribe(this._onNewLog,this);YAHOO.widget.Logger.logResetEvent.subscribe(this._onReset,this);YAHOO.widget.Logger.categoryCreateEvent.subscribe(this._onCategoryCreate,this);YAHOO.widget.Logger.sourceCreateEvent.subscribe(this._onSourceCreate,this);this._filterLogs();YAHOO.log("LogReader initialized",null,this.toString());};YAHOO.lang.augmentObject(YAHOO.widget.LogReader,{_index:0,ENTRY_TEMPLATE:(function(){var A=document.createElement("pre");YAHOO.util.Dom.addClass(A,"yui-log-entry");return A;})(),VERBOSE_TEMPLATE:"<p><span class='{category}'>{label}</span> {totalTime}ms (+{elapsedTime}) {localTime}:</p><p>{sourceAndDetail}</p><p>{message}</p>",BASIC_TEMPLATE:"<p><span class='{category}'>{label}</span> {totalTime}ms (+{elapsedTime}) {localTime}: {sourceAndDetail}: {message}</p>"});YAHOO.widget.LogReader.prototype={logReaderEnabled:true,width:null,height:null,top:null,left:null,right:null,bottom:null,fontSize:null,footerEnabled:true,verboseOutput:true,entryFormat:null,newestOnTop:true,outputBuffer:100,thresholdMax:500,thresholdMin:100,isCollapsed:false,isPaused:false,draggable:true,toString:function(){return"LogReader instance"+this._sName;},pause:function(){this.isPaused=true;this._timeout=null;this.logReaderEnabled=false;if(this._btnPause){this._btnPause.value="Resume";}},resume:function(){this.isPaused=false;this.logReaderEnabled=true;this._printBuffer();if(this._btnPause){this._btnPause.value="Pause";}},hide:function(){this._elContainer.style.display="none";},show:function(){this._elContainer.style.display="block";},collapse:function(){this._elConsole.style.display="none";if(this._elFt){this._elFt.style.display="none";}this._btnCollapse.value="Expand";this.isCollapsed=true;},expand:function(){this._elConsole.style.display="block";if(this._elFt){this._elFt.style.display="block";}this._btnCollapse.value="Collapse";this.isCollapsed=false;},getCheckbox:function(A){return this._filterCheckboxes[A];},getCategories:function(){return this._categoryFilters;},showCategory:function(B){var D=this._categoryFilters;if(D.indexOf){if(D.indexOf(B)>-1){return;}}else{for(var A=0;A<D.length;A++){if(D[A]===B){return;}}}this._categoryFilters.push(B);this._filterLogs();var C=this.getCheckbox(B);if(C){C.checked=true;}},hideCategory:function(B){var D=this._categoryFilters;for(var A=0;A<D.length;A++){if(B==D[A]){D.splice(A,1);break;}}this._filterLogs();var C=this.getCheckbox(B);if(C){C.checked=false;}},getSources:function(){return this._sourceFilters;},showSource:function(A){var D=this._sourceFilters;if(D.indexOf){if(D.indexOf(A)>-1){return;}}else{for(var B=0;B<D.length;B++){if(A==D[B]){return;}}}D.push(A);this._filterLogs();var C=this.getCheckbox(A);if(C){C.checked=true;}},hideSource:function(A){var D=this._sourceFilters;for(var B=0;B<D.length;B++){if(A==D[B]){D.splice(B,1);break;}}this._filterLogs();var C=this.getCheckbox(A);if(C){C.checked=false;}},clearConsole:function(){this._timeout=null;this._buffer=[];this._consoleMsgCount=0;var A=this._elConsole;A.innerHTML="";},setTitle:function(A){this._title.innerHTML=this.html2Text(A);},getLastTime:function(){return this._lastTime;},formatMsg:function(C){var B=YAHOO.widget.LogReader,A=this.entryFormat||(this.verboseOutput?B.VERBOSE_TEMPLATE:B.BASIC_TEMPLATE),D={category:C.category,label:C.category.substring(0,4).toUpperCase(),sourceAndDetail:C.sourceDetail?C.source+" "+C.sourceDetail:C.source,message:this.html2Text(C.msg||C.message||"")};if(C.time&&C.time.getTime){D.localTime=C.time.toLocaleTimeString?C.time.toLocaleTimeString():C.time.toString();D.elapsedTime=C.time.getTime()-this.getLastTime();D.totalTime=C.time.getTime()-YAHOO.widget.Logger.getStartTime();}var E=B.ENTRY_TEMPLATE.cloneNode(true);if(this.verboseOutput){E.className+=" yui-log-verbose";}E.innerHTML=A.replace(/\{(\w+)\}/g,function(F,G){return(G in D)?D[G]:"";});return E;},html2Text:function(A){if(A){A+="";return A.replace(/&/g,"&#38;").replace(/</g,"&#60;").replace(/>/g,"&#62;");}return"";},_sName:null,_buffer:null,_consoleMsgCount:0,_lastTime:null,_timeout:null,_filterCheckboxes:null,_categoryFilters:null,_sourceFilters:null,_elContainer:null,_elHd:null,_elCollapse:null,_btnCollapse:null,_title:null,_elConsole:null,_elFt:null,_elBtns:null,_elCategoryFilters:null,_elSourceFilters:null,_btnPause:null,_btnClear:null,_initContainerEl:function(B){B=YAHOO.util.Dom.get(B);if(B&&B.tagName&&(B.tagName.toLowerCase()=="div")){this._elContainer=B;YAHOO.util.Dom.addClass(this._elContainer,"yui-log");}else{this._elContainer=document.body.appendChild(document.createElement("div"));YAHOO.util.Dom.addClass(this._elContainer,"yui-log");
267 258 YAHOO.util.Dom.addClass(this._elContainer,"yui-log-container");var A=this._elContainer.style;if(this.width){A.width=this.width;}if(this.right){A.right=this.right;}if(this.top){A.top=this.top;}if(this.left){A.left=this.left;A.right="auto";}if(this.bottom){A.bottom=this.bottom;A.top="auto";}if(this.fontSize){A.fontSize=this.fontSize;}if(navigator.userAgent.toLowerCase().indexOf("opera")!=-1){document.body.style+="";}}},_initHeaderEl:function(){var A=this;if(this._elHd){YAHOO.util.Event.purgeElement(this._elHd,true);this._elHd.innerHTML="";}this._elHd=this._elContainer.appendChild(document.createElement("div"));this._elHd.id="yui-log-hd"+this._sName;this._elHd.className="yui-log-hd";this._elCollapse=this._elHd.appendChild(document.createElement("div"));this._elCollapse.className="yui-log-btns";this._btnCollapse=document.createElement("input");this._btnCollapse.type="button";this._btnCollapse.className="yui-log-button";this._btnCollapse.value="Collapse";this._btnCollapse=this._elCollapse.appendChild(this._btnCollapse);YAHOO.util.Event.addListener(A._btnCollapse,"click",A._onClickCollapseBtn,A);this._title=this._elHd.appendChild(document.createElement("h4"));this._title.innerHTML="Logger Console";},_initConsoleEl:function(){if(this._elConsole){YAHOO.util.Event.purgeElement(this._elConsole,true);this._elConsole.innerHTML="";}this._elConsole=this._elContainer.appendChild(document.createElement("div"));this._elConsole.className="yui-log-bd";if(this.height){this._elConsole.style.height=this.height;}},_initFooterEl:function(){var A=this;if(this.footerEnabled){if(this._elFt){YAHOO.util.Event.purgeElement(this._elFt,true);this._elFt.innerHTML="";}this._elFt=this._elContainer.appendChild(document.createElement("div"));this._elFt.className="yui-log-ft";this._elBtns=this._elFt.appendChild(document.createElement("div"));this._elBtns.className="yui-log-btns";this._btnPause=document.createElement("input");this._btnPause.type="button";this._btnPause.className="yui-log-button";this._btnPause.value="Pause";this._btnPause=this._elBtns.appendChild(this._btnPause);YAHOO.util.Event.addListener(A._btnPause,"click",A._onClickPauseBtn,A);this._btnClear=document.createElement("input");this._btnClear.type="button";this._btnClear.className="yui-log-button";this._btnClear.value="Clear";this._btnClear=this._elBtns.appendChild(this._btnClear);YAHOO.util.Event.addListener(A._btnClear,"click",A._onClickClearBtn,A);this._elCategoryFilters=this._elFt.appendChild(document.createElement("div"));this._elCategoryFilters.className="yui-log-categoryfilters";this._elSourceFilters=this._elFt.appendChild(document.createElement("div"));this._elSourceFilters.className="yui-log-sourcefilters";}},_initDragDrop:function(){if(YAHOO.util.DD&&this.draggable&&this._elHd){var A=new YAHOO.util.DD(this._elContainer);A.setHandleElId(this._elHd.id);this._elHd.style.cursor="move";}},_initCategories:function(){this._categoryFilters=[];var C=YAHOO.widget.Logger.categories;for(var A=0;A<C.length;A++){var B=C[A];this._categoryFilters.push(B);if(this._elCategoryFilters){this._createCategoryCheckbox(B);}}},_initSources:function(){this._sourceFilters=[];var C=YAHOO.widget.Logger.sources;for(var B=0;B<C.length;B++){var A=C[B];this._sourceFilters.push(A);if(this._elSourceFilters){this._createSourceCheckbox(A);}}},_createCategoryCheckbox:function(B){var A=this;if(this._elFt){var E=this._elCategoryFilters;var D=E.appendChild(document.createElement("span"));D.className="yui-log-filtergrp";var C=document.createElement("input");C.id="yui-log-filter-"+B+this._sName;C.className="yui-log-filter-"+B;C.type="checkbox";C.category=B;C=D.appendChild(C);C.checked=true;YAHOO.util.Event.addListener(C,"click",A._onCheckCategory,A);var F=D.appendChild(document.createElement("label"));F.htmlFor=C.id;F.className=B;F.innerHTML=B;this._filterCheckboxes[B]=C;}},_createSourceCheckbox:function(A){var D=this;if(this._elFt){var F=this._elSourceFilters;var E=F.appendChild(document.createElement("span"));E.className="yui-log-filtergrp";var C=document.createElement("input");C.id="yui-log-filter"+A+this._sName;C.className="yui-log-filter"+A;C.type="checkbox";C.source=A;C=E.appendChild(C);C.checked=true;YAHOO.util.Event.addListener(C,"click",D._onCheckSource,D);var B=E.appendChild(document.createElement("label"));B.htmlFor=C.id;B.className=A;B.innerHTML=A;this._filterCheckboxes[A]=C;}},_filterLogs:function(){if(this._elConsole!==null){this.clearConsole();this._printToConsole(YAHOO.widget.Logger.getStack());}},_printBuffer:function(){this._timeout=null;if(this._elConsole!==null){var B=this.thresholdMax;B=(B&&!isNaN(B))?B:500;if(this._consoleMsgCount<B){var A=[];for(var C=0;C<this._buffer.length;C++){A[C]=this._buffer[C];}this._buffer=[];this._printToConsole(A);}else{this._filterLogs();}if(!this.newestOnTop){this._elConsole.scrollTop=this._elConsole.scrollHeight;}}},_printToConsole:function(I){var B=I.length,M=document.createDocumentFragment(),P=[],Q=this.thresholdMin,C=this._sourceFilters.length,N=this._categoryFilters.length,K,H,G,F,L;if(isNaN(Q)||(Q>this.thresholdMax)){Q=0;}K=(B>Q)?(B-Q):0;for(H=K;H<B;H++){var E=false;var J=false;var O=I[H];var A=O.source;var D=O.category;for(G=0;G<C;G++){if(A==this._sourceFilters[G]){J=true;break;}}if(J){for(G=0;G<N;G++){if(D==this._categoryFilters[G]){E=true;break;}}}if(E){F=this.formatMsg(O);if(typeof F==="string"){P[P.length]=F;}else{M.insertBefore(F,this.newestOnTop?M.firstChild||null:null);}this._consoleMsgCount++;this._lastTime=O.time.getTime();}}if(P.length){P.splice(0,0,this._elConsole.innerHTML);this._elConsole.innerHTML=this.newestOnTop?P.reverse().join(""):P.join("");}else{if(M.firstChild){this._elConsole.insertBefore(M,this.newestOnTop?this._elConsole.firstChild||null:null);}}},_onCategoryCreate:function(D,C,A){var B=C[0];A._categoryFilters.push(B);if(A._elFt){A._createCategoryCheckbox(B);}},_onSourceCreate:function(D,C,A){var B=C[0];A._sourceFilters.push(B);if(A._elFt){A._createSourceCheckbox(B);}},_onCheckCategory:function(A,B){var C=this.category;
268   -if(!this.checked){B.hideCategory(C);}else{B.showCategory(C);}},_onCheckSource:function(A,B){var C=this.source;if(!this.checked){B.hideSource(C);}else{B.showSource(C);}},_onClickCollapseBtn:function(A,B){if(!B.isCollapsed){B.collapse();}else{B.expand();}},_onClickPauseBtn:function(A,B){if(!B.isPaused){B.pause();}else{B.resume();}},_onClickClearBtn:function(A,B){B.clearConsole();},_onNewLog:function(D,C,A){var B=C[0];A._buffer.push(B);if(A.logReaderEnabled===true&&A._timeout===null){A._timeout=setTimeout(function(){A._printBuffer();},A.outputBuffer);}},_onReset:function(C,B,A){A._filterLogs();}};if(!YAHOO.widget.Logger){YAHOO.widget.Logger={loggerEnabled:true,_browserConsoleEnabled:false,categories:["info","warn","error","time","window"],sources:["global"],_stack:[],maxStackEntries:2500,_startTime:new Date().getTime(),_lastTime:null,_windowErrorsHandled:false,_origOnWindowError:null};YAHOO.widget.Logger.log=function(B,F,G){if(this.loggerEnabled){if(!F){F="info";}else{F=F.toLocaleLowerCase();if(this._isNewCategory(F)){this._createNewCategory(F);}}var C="global";var A=null;if(G){var D=G.indexOf(" ");if(D>0){C=G.substring(0,D);A=G.substring(D,G.length);}else{C=G;}if(this._isNewSource(C)){this._createNewSource(C);}}var H=new Date();var J=new YAHOO.widget.LogMsg({msg:B,time:H,category:F,source:C,sourceDetail:A});var I=this._stack;var E=this.maxStackEntries;if(E&&!isNaN(E)&&(I.length>=E)){I.shift();}I.push(J);this.newLogEvent.fire(J);if(this._browserConsoleEnabled){this._printToBrowserConsole(J);}return true;}else{return false;}};YAHOO.widget.Logger.reset=function(){this._stack=[];this._startTime=new Date().getTime();this.loggerEnabled=true;this.log("Logger reset");this.logResetEvent.fire();};YAHOO.widget.Logger.getStack=function(){return this._stack;};YAHOO.widget.Logger.getStartTime=function(){return this._startTime;};YAHOO.widget.Logger.disableBrowserConsole=function(){YAHOO.log("Logger output to the function console.log() has been disabled.");this._browserConsoleEnabled=false;};YAHOO.widget.Logger.enableBrowserConsole=function(){this._browserConsoleEnabled=true;YAHOO.log("Logger output to the function console.log() has been enabled.");};YAHOO.widget.Logger.handleWindowErrors=function(){if(!YAHOO.widget.Logger._windowErrorsHandled){if(window.error){YAHOO.widget.Logger._origOnWindowError=window.onerror;}window.onerror=YAHOO.widget.Logger._onWindowError;YAHOO.widget.Logger._windowErrorsHandled=true;YAHOO.log("Logger handling of window.onerror has been enabled.");}else{YAHOO.log("Logger handling of window.onerror had already been enabled.");}};YAHOO.widget.Logger.unhandleWindowErrors=function(){if(YAHOO.widget.Logger._windowErrorsHandled){if(YAHOO.widget.Logger._origOnWindowError){window.onerror=YAHOO.widget.Logger._origOnWindowError;YAHOO.widget.Logger._origOnWindowError=null;}else{window.onerror=null;}YAHOO.widget.Logger._windowErrorsHandled=false;YAHOO.log("Logger handling of window.onerror has been disabled.");}else{YAHOO.log("Logger handling of window.onerror had already been disabled.");}};YAHOO.widget.Logger.categoryCreateEvent=new YAHOO.util.CustomEvent("categoryCreate",this,true);YAHOO.widget.Logger.sourceCreateEvent=new YAHOO.util.CustomEvent("sourceCreate",this,true);YAHOO.widget.Logger.newLogEvent=new YAHOO.util.CustomEvent("newLog",this,true);YAHOO.widget.Logger.logResetEvent=new YAHOO.util.CustomEvent("logReset",this,true);YAHOO.widget.Logger._createNewCategory=function(A){this.categories.push(A);this.categoryCreateEvent.fire(A);};YAHOO.widget.Logger._isNewCategory=function(B){for(var A=0;A<this.categories.length;A++){if(B==this.categories[A]){return false;}}return true;};YAHOO.widget.Logger._createNewSource=function(A){this.sources.push(A);this.sourceCreateEvent.fire(A);};YAHOO.widget.Logger._isNewSource=function(A){if(A){for(var B=0;B<this.sources.length;B++){if(A==this.sources[B]){return false;}}return true;}};YAHOO.widget.Logger._printToBrowserConsole=function(C){if(window.console&&console.log){var E=C.category;var D=C.category.substring(0,4).toUpperCase();var G=C.time;var F;if(G.toLocaleTimeString){F=G.toLocaleTimeString();}else{F=G.toString();}var H=G.getTime();var B=(YAHOO.widget.Logger._lastTime)?(H-YAHOO.widget.Logger._lastTime):0;YAHOO.widget.Logger._lastTime=H;var A=F+" ("+B+"ms): "+C.source+": ";if(YAHOO.env.ua.webkit){A+=C.msg;}console.log(A,C.msg);}};YAHOO.widget.Logger._onWindowError=function(A,C,B){try{YAHOO.widget.Logger.log(A+" ("+C+", line "+B+")","window");if(YAHOO.widget.Logger._origOnWindowError){YAHOO.widget.Logger._origOnWindowError();}}catch(D){return false;}};YAHOO.widget.Logger.log("Logger initialized");}YAHOO.register("logger",YAHOO.widget.Logger,{version:"2.7.0",build:"1799"});
269   -/*
  259 +if(!this.checked){B.hideCategory(C);}else{B.showCategory(C);}},_onCheckSource:function(A,B){var C=this.source;if(!this.checked){B.hideSource(C);}else{B.showSource(C);}},_onClickCollapseBtn:function(A,B){if(!B.isCollapsed){B.collapse();}else{B.expand();}},_onClickPauseBtn:function(A,B){if(!B.isPaused){B.pause();}else{B.resume();}},_onClickClearBtn:function(A,B){B.clearConsole();},_onNewLog:function(D,C,A){var B=C[0];A._buffer.push(B);if(A.logReaderEnabled===true&&A._timeout===null){A._timeout=setTimeout(function(){A._printBuffer();},A.outputBuffer);}},_onReset:function(C,B,A){A._filterLogs();}};if(!YAHOO.widget.Logger){YAHOO.widget.Logger={loggerEnabled:true,_browserConsoleEnabled:false,categories:["info","warn","error","time","window"],sources:["global"],_stack:[],maxStackEntries:2500,_startTime:new Date().getTime(),_lastTime:null,_windowErrorsHandled:false,_origOnWindowError:null};YAHOO.widget.Logger.log=function(B,F,G){if(this.loggerEnabled){if(!F){F="info";}else{F=F.toLocaleLowerCase();if(this._isNewCategory(F)){this._createNewCategory(F);}}var C="global";var A=null;if(G){var D=G.indexOf(" ");if(D>0){C=G.substring(0,D);A=G.substring(D,G.length);}else{C=G;}if(this._isNewSource(C)){this._createNewSource(C);}}var H=new Date();var J=new YAHOO.widget.LogMsg({msg:B,time:H,category:F,source:C,sourceDetail:A});var I=this._stack;var E=this.maxStackEntries;if(E&&!isNaN(E)&&(I.length>=E)){I.shift();}I.push(J);this.newLogEvent.fire(J);if(this._browserConsoleEnabled){this._printToBrowserConsole(J);}return true;}else{return false;}};YAHOO.widget.Logger.reset=function(){this._stack=[];this._startTime=new Date().getTime();this.loggerEnabled=true;this.log("Logger reset");this.logResetEvent.fire();};YAHOO.widget.Logger.getStack=function(){return this._stack;};YAHOO.widget.Logger.getStartTime=function(){return this._startTime;};YAHOO.widget.Logger.disableBrowserConsole=function(){YAHOO.log("Logger output to the function console.log() has been disabled.");this._browserConsoleEnabled=false;};YAHOO.widget.Logger.enableBrowserConsole=function(){this._browserConsoleEnabled=true;YAHOO.log("Logger output to the function console.log() has been enabled.");};YAHOO.widget.Logger.handleWindowErrors=function(){if(!YAHOO.widget.Logger._windowErrorsHandled){if(window.error){YAHOO.widget.Logger._origOnWindowError=window.onerror;}window.onerror=YAHOO.widget.Logger._onWindowError;YAHOO.widget.Logger._windowErrorsHandled=true;YAHOO.log("Logger handling of window.onerror has been enabled.");}else{YAHOO.log("Logger handling of window.onerror had already been enabled.");}};YAHOO.widget.Logger.unhandleWindowErrors=function(){if(YAHOO.widget.Logger._windowErrorsHandled){if(YAHOO.widget.Logger._origOnWindowError){window.onerror=YAHOO.widget.Logger._origOnWindowError;YAHOO.widget.Logger._origOnWindowError=null;}else{window.onerror=null;}YAHOO.widget.Logger._windowErrorsHandled=false;YAHOO.log("Logger handling of window.onerror has been disabled.");}else{YAHOO.log("Logger handling of window.onerror had already been disabled.");}};YAHOO.widget.Logger.categoryCreateEvent=new YAHOO.util.CustomEvent("categoryCreate",this,true);YAHOO.widget.Logger.sourceCreateEvent=new YAHOO.util.CustomEvent("sourceCreate",this,true);YAHOO.widget.Logger.newLogEvent=new YAHOO.util.CustomEvent("newLog",this,true);YAHOO.widget.Logger.logResetEvent=new YAHOO.util.CustomEvent("logReset",this,true);YAHOO.widget.Logger._createNewCategory=function(A){this.categories.push(A);this.categoryCreateEvent.fire(A);};YAHOO.widget.Logger._isNewCategory=function(B){for(var A=0;A<this.categories.length;A++){if(B==this.categories[A]){return false;}}return true;};YAHOO.widget.Logger._createNewSource=function(A){this.sources.push(A);this.sourceCreateEvent.fire(A);};YAHOO.widget.Logger._isNewSource=function(A){if(A){for(var B=0;B<this.sources.length;B++){if(A==this.sources[B]){return false;}}return true;}};YAHOO.widget.Logger._printToBrowserConsole=function(C){if(window.console&&console.log){var E=C.category;var D=C.category.substring(0,4).toUpperCase();var G=C.time;var F;if(G.toLocaleTimeString){F=G.toLocaleTimeString();}else{F=G.toString();}var H=G.getTime();var B=(YAHOO.widget.Logger._lastTime)?(H-YAHOO.widget.Logger._lastTime):0;YAHOO.widget.Logger._lastTime=H;var A=F+" ("+B+"ms): "+C.source+": ";if(YAHOO.env.ua.webkit){A+=C.msg;}console.log(A,C.msg);}};YAHOO.widget.Logger._onWindowError=function(A,C,B){try{YAHOO.widget.Logger.log(A+" ("+C+", line "+B+")","window");if(YAHOO.widget.Logger._origOnWindowError){YAHOO.widget.Logger._origOnWindowError();}}catch(D){return false;}};YAHOO.widget.Logger.log("Logger initialized");}YAHOO.register("logger",YAHOO.widget.Logger,{version:"2.7.0",build:"1799"});/*
270 260 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
271 261 Code licensed under the BSD License:
272 262 http://developer.yahoo.net/yui/license.txt
... ... @@ -275,8 +265,7 @@ version: 2.7.0
275 265 if(!YAHOO.util.DragDropMgr){YAHOO.util.DragDropMgr=function(){var A=YAHOO.util.Event,B=YAHOO.util.Dom;return{useShim:false,_shimActive:false,_shimState:false,_debugShim:false,_createShim:function(){var C=document.createElement("div");C.id="yui-ddm-shim";if(document.body.firstChild){document.body.insertBefore(C,document.body.firstChild);}else{document.body.appendChild(C);}C.style.display="none";C.style.backgroundColor="red";C.style.position="absolute";C.style.zIndex="99999";B.setStyle(C,"opacity","0");this._shim=C;A.on(C,"mouseup",this.handleMouseUp,this,true);A.on(C,"mousemove",this.handleMouseMove,this,true);A.on(window,"scroll",this._sizeShim,this,true);},_sizeShim:function(){if(this._shimActive){var C=this._shim;C.style.height=B.getDocumentHeight()+"px";C.style.width=B.getDocumentWidth()+"px";C.style.top="0";C.style.left="0";}},_activateShim:function(){if(this.useShim){if(!this._shim){this._createShim();}this._shimActive=true;var C=this._shim,D="0";if(this._debugShim){D=".5";}B.setStyle(C,"opacity",D);this._sizeShim();C.style.display="block";}},_deactivateShim:function(){this._shim.style.display="none";this._shimActive=false;},_shim:null,ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,interactionInfo:null,init:function(){this.initialized=true;},POINT:0,INTERSECT:1,STRICT_INTERSECT:2,mode:0,_execOnAll:function(E,D){for(var F in this.ids){for(var C in this.ids[F]){var G=this.ids[F][C];if(!this.isTypeOfDD(G)){continue;}G[E].apply(G,D);}}},_onLoad:function(){this.init();A.on(document,"mouseup",this.handleMouseUp,this,true);A.on(document,"mousemove",this.handleMouseMove,this,true);A.on(window,"unload",this._onUnload,this,true);A.on(window,"resize",this._onResize,this,true);},_onResize:function(C){this._execOnAll("resetConstraints",[]);},lock:function(){this.locked=true;},unlock:function(){this.locked=false;},isLocked:function(){return this.locked;},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:1000,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,fromTimeout:false,regDragDrop:function(D,C){if(!this.initialized){this.init();}if(!this.ids[C]){this.ids[C]={};}this.ids[C][D.id]=D;},removeDDFromGroup:function(E,C){if(!this.ids[C]){this.ids[C]={};}var D=this.ids[C];if(D&&D[E.id]){delete D[E.id];}},_remove:function(E){for(var D in E.groups){if(D){var C=this.ids[D];if(C&&C[E.id]){delete C[E.id];}}}delete this.handleIds[E.id];},regHandle:function(D,C){if(!this.handleIds[D]){this.handleIds[D]={};}this.handleIds[D][C]=C;},isDragDrop:function(C){return(this.getDDById(C))?true:false;},getRelated:function(H,D){var G=[];for(var F in H.groups){for(var E in this.ids[F]){var C=this.ids[F][E];if(!this.isTypeOfDD(C)){continue;}if(!D||C.isTarget){G[G.length]=C;}}}return G;},isLegalTarget:function(G,F){var D=this.getRelated(G,true);for(var E=0,C=D.length;E<C;++E){if(D[E].id==F.id){return true;}}return false;},isTypeOfDD:function(C){return(C&&C.__ygDragDrop);},isHandle:function(D,C){return(this.handleIds[D]&&this.handleIds[D][C]);},getDDById:function(D){for(var C in this.ids){if(this.ids[C][D]){return this.ids[C][D];}}return null;},handleMouseDown:function(E,D){this.currentTarget=YAHOO.util.Event.getTarget(E);this.dragCurrent=D;var C=D.getEl();this.startX=YAHOO.util.Event.getPageX(E);this.startY=YAHOO.util.Event.getPageY(E);this.deltaX=this.startX-C.offsetLeft;this.deltaY=this.startY-C.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var F=YAHOO.util.DDM;F.startDrag(F.startX,F.startY);F.fromTimeout=true;},this.clickTimeThresh);},startDrag:function(C,E){if(this.dragCurrent&&this.dragCurrent.useShim){this._shimState=this.useShim;this.useShim=true;}this._activateShim();clearTimeout(this.clickTimeout);var D=this.dragCurrent;if(D&&D.events.b4StartDrag){D.b4StartDrag(C,E);D.fireEvent("b4StartDragEvent",{x:C,y:E});}if(D&&D.events.startDrag){D.startDrag(C,E);D.fireEvent("startDragEvent",{x:C,y:E});}this.dragThreshMet=true;},handleMouseUp:function(C){if(this.dragCurrent){clearTimeout(this.clickTimeout);if(this.dragThreshMet){if(this.fromTimeout){this.fromTimeout=false;this.handleMouseMove(C);}this.fromTimeout=false;this.fireEvents(C,true);}else{}this.stopDrag(C);this.stopEvent(C);}},stopEvent:function(C){if(this.stopPropagation){YAHOO.util.Event.stopPropagation(C);}if(this.preventDefault){YAHOO.util.Event.preventDefault(C);}},stopDrag:function(E,D){var C=this.dragCurrent;if(C&&!D){if(this.dragThreshMet){if(C.events.b4EndDrag){C.b4EndDrag(E);C.fireEvent("b4EndDragEvent",{e:E});}if(C.events.endDrag){C.endDrag(E);C.fireEvent("endDragEvent",{e:E});}}if(C.events.mouseUp){C.onMouseUp(E);C.fireEvent("mouseUpEvent",{e:E});}}if(this._shimActive){this._deactivateShim();if(this.dragCurrent&&this.dragCurrent.useShim){this.useShim=this._shimState;this._shimState=false;}}this.dragCurrent=null;this.dragOvers={};},handleMouseMove:function(F){var C=this.dragCurrent;if(C){if(YAHOO.util.Event.isIE&&!F.button){this.stopEvent(F);return this.handleMouseUp(F);}else{if(F.clientX<0||F.clientY<0){}}if(!this.dragThreshMet){var E=Math.abs(this.startX-YAHOO.util.Event.getPageX(F));var D=Math.abs(this.startY-YAHOO.util.Event.getPageY(F));if(E>this.clickPixelThresh||D>this.clickPixelThresh){this.startDrag(this.startX,this.startY);}}if(this.dragThreshMet){if(C&&C.events.b4Drag){C.b4Drag(F);C.fireEvent("b4DragEvent",{e:F});}if(C&&C.events.drag){C.onDrag(F);C.fireEvent("dragEvent",{e:F});}if(C){this.fireEvents(F,false);}}this.stopEvent(F);}},fireEvents:function(V,L){var a=this.dragCurrent;if(!a||a.isLocked()||a.dragOnly){return;}var N=YAHOO.util.Event.getPageX(V),M=YAHOO.util.Event.getPageY(V),P=new YAHOO.util.Point(N,M),K=a.getTargetCoord(P.x,P.y),F=a.getDragEl(),E=["out","over","drop","enter"],U=new YAHOO.util.Region(K.y,K.x+F.offsetWidth,K.y+F.offsetHeight,K.x),I=[],D={},Q=[],c={outEvts:[],overEvts:[],dropEvts:[],enterEvts:[]};for(var S in this.dragOvers){var d=this.dragOvers[S];if(!this.isTypeOfDD(d)){continue;
276 266 }if(!this.isOverTarget(P,d,this.mode,U)){c.outEvts.push(d);}I[S]=true;delete this.dragOvers[S];}for(var R in a.groups){if("string"!=typeof R){continue;}for(S in this.ids[R]){var G=this.ids[R][S];if(!this.isTypeOfDD(G)){continue;}if(G.isTarget&&!G.isLocked()&&G!=a){if(this.isOverTarget(P,G,this.mode,U)){D[R]=true;if(L){c.dropEvts.push(G);}else{if(!I[G.id]){c.enterEvts.push(G);}else{c.overEvts.push(G);}this.dragOvers[G.id]=G;}}}}}this.interactionInfo={out:c.outEvts,enter:c.enterEvts,over:c.overEvts,drop:c.dropEvts,point:P,draggedRegion:U,sourceRegion:this.locationCache[a.id],validDrop:L};for(var C in D){Q.push(C);}if(L&&!c.dropEvts.length){this.interactionInfo.validDrop=false;if(a.events.invalidDrop){a.onInvalidDrop(V);a.fireEvent("invalidDropEvent",{e:V});}}for(S=0;S<E.length;S++){var Y=null;if(c[E[S]+"Evts"]){Y=c[E[S]+"Evts"];}if(Y&&Y.length){var H=E[S].charAt(0).toUpperCase()+E[S].substr(1),X="onDrag"+H,J="b4Drag"+H,O="drag"+H+"Event",W="drag"+H;if(this.mode){if(a.events[J]){a[J](V,Y,Q);a.fireEvent(J+"Event",{event:V,info:Y,group:Q});}if(a.events[W]){a[X](V,Y,Q);a.fireEvent(O,{event:V,info:Y,group:Q});}}else{for(var Z=0,T=Y.length;Z<T;++Z){if(a.events[J]){a[J](V,Y[Z].id,Q[0]);a.fireEvent(J+"Event",{event:V,info:Y[Z].id,group:Q[0]});}if(a.events[W]){a[X](V,Y[Z].id,Q[0]);a.fireEvent(O,{event:V,info:Y[Z].id,group:Q[0]});}}}}}},getBestMatch:function(E){var G=null;var D=E.length;if(D==1){G=E[0];}else{for(var F=0;F<D;++F){var C=E[F];if(this.mode==this.INTERSECT&&C.cursorIsOver){G=C;break;}else{if(!G||!G.overlap||(C.overlap&&G.overlap.getArea()<C.overlap.getArea())){G=C;}}}}return G;},refreshCache:function(D){var F=D||this.ids;for(var C in F){if("string"!=typeof C){continue;}for(var E in this.ids[C]){var G=this.ids[C][E];if(this.isTypeOfDD(G)){var H=this.getLocation(G);if(H){this.locationCache[G.id]=H;}else{delete this.locationCache[G.id];}}}}},verifyEl:function(D){try{if(D){var C=D.offsetParent;if(C){return true;}}}catch(E){}return false;},getLocation:function(H){if(!this.isTypeOfDD(H)){return null;}var F=H.getEl(),K,E,D,M,L,N,C,J,G;try{K=YAHOO.util.Dom.getXY(F);}catch(I){}if(!K){return null;}E=K[0];D=E+F.offsetWidth;M=K[1];L=M+F.offsetHeight;N=M-H.padding[0];C=D+H.padding[1];J=L+H.padding[2];G=E-H.padding[3];return new YAHOO.util.Region(N,C,J,G);},isOverTarget:function(K,C,E,F){var G=this.locationCache[C.id];if(!G||!this.useCache){G=this.getLocation(C);this.locationCache[C.id]=G;}if(!G){return false;}C.cursorIsOver=G.contains(K);var J=this.dragCurrent;if(!J||(!E&&!J.constrainX&&!J.constrainY)){return C.cursorIsOver;}C.overlap=null;if(!F){var H=J.getTargetCoord(K.x,K.y);var D=J.getDragEl();F=new YAHOO.util.Region(H.y,H.x+D.offsetWidth,H.y+D.offsetHeight,H.x);}var I=F.intersect(G);if(I){C.overlap=I;return(E)?true:C.cursorIsOver;}else{return false;}},_onUnload:function(D,C){this.unregAll();},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null;}this._execOnAll("unreg",[]);this.ids={};},elementCache:{},getElWrapper:function(D){var C=this.elementCache[D];if(!C||!C.el){C=this.elementCache[D]=new this.ElementWrapper(YAHOO.util.Dom.get(D));}return C;},getElement:function(C){return YAHOO.util.Dom.get(C);},getCss:function(D){var C=YAHOO.util.Dom.get(D);return(C)?C.style:null;},ElementWrapper:function(C){this.el=C||null;this.id=this.el&&C.id;this.css=this.el&&C.style;},getPosX:function(C){return YAHOO.util.Dom.getX(C);},getPosY:function(C){return YAHOO.util.Dom.getY(C);},swapNode:function(E,C){if(E.swapNode){E.swapNode(C);}else{var F=C.parentNode;var D=C.nextSibling;if(D==E){F.insertBefore(E,C);}else{if(C==E.nextSibling){F.insertBefore(C,E);}else{E.parentNode.replaceChild(C,E);F.insertBefore(E,D);}}}},getScroll:function(){var E,C,F=document.documentElement,D=document.body;if(F&&(F.scrollTop||F.scrollLeft)){E=F.scrollTop;C=F.scrollLeft;}else{if(D){E=D.scrollTop;C=D.scrollLeft;}else{}}return{top:E,left:C};},getStyle:function(D,C){return YAHOO.util.Dom.getStyle(D,C);},getScrollTop:function(){return this.getScroll().top;},getScrollLeft:function(){return this.getScroll().left;},moveToEl:function(C,E){var D=YAHOO.util.Dom.getXY(E);YAHOO.util.Dom.setXY(C,D);},getClientHeight:function(){return YAHOO.util.Dom.getViewportHeight();},getClientWidth:function(){return YAHOO.util.Dom.getViewportWidth();},numericSort:function(D,C){return(D-C);},_timeoutCount:0,_addListeners:function(){var C=YAHOO.util.DDM;if(YAHOO.util.Event&&document){C._onLoad();}else{if(C._timeoutCount>2000){}else{setTimeout(C._addListeners,10);if(document&&document.body){C._timeoutCount+=1;}}}},handleWasClicked:function(C,E){if(this.isHandle(E,C.id)){return true;}else{var D=C.parentNode;while(D){if(this.isHandle(E,D.id)){return true;}else{D=D.parentNode;}}}return false;}};}();YAHOO.util.DDM=YAHOO.util.DragDropMgr;YAHOO.util.DDM._addListeners();}(function(){var A=YAHOO.util.Event;var B=YAHOO.util.Dom;YAHOO.util.DragDrop=function(E,C,D){if(E){this.init(E,C,D);}};YAHOO.util.DragDrop.prototype={events:null,on:function(){this.subscribe.apply(this,arguments);},id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true;},unlock:function(){this.locked=false;},isTarget:true,padding:null,dragOnly:false,useShim:false,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,deltaX:0,deltaY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,cursorIsOver:false,overlap:null,b4StartDrag:function(C,D){},startDrag:function(C,D){},b4Drag:function(C){},onDrag:function(C){},onDragEnter:function(C,D){},b4DragOver:function(C){},onDragOver:function(C,D){},b4DragOut:function(C){},onDragOut:function(C,D){},b4DragDrop:function(C){},onDragDrop:function(C,D){},onInvalidDrop:function(C){},b4EndDrag:function(C){},endDrag:function(C){},b4MouseDown:function(C){},onMouseDown:function(C){},onMouseUp:function(C){},onAvailable:function(){},getEl:function(){if(!this._domRef){this._domRef=B.get(this.id);
277 267 }return this._domRef;},getDragEl:function(){return B.get(this.dragElId);},init:function(F,C,D){this.initTarget(F,C,D);A.on(this._domRef||this.id,"mousedown",this.handleMouseDown,this,true);for(var E in this.events){this.createEvent(E+"Event");}},initTarget:function(E,C,D){this.config=D||{};this.events={};this.DDM=YAHOO.util.DDM;this.groups={};if(typeof E!=="string"){this._domRef=E;E=B.generateId(E);}this.id=E;this.addToGroup((C)?C:"default");this.handleElId=E;A.onAvailable(E,this.handleOnAvailable,this,true);this.setDragElId(E);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();},applyConfig:function(){this.events={mouseDown:true,b4MouseDown:true,mouseUp:true,b4StartDrag:true,startDrag:true,b4EndDrag:true,endDrag:true,drag:true,b4Drag:true,invalidDrop:true,b4DragOut:true,dragOut:true,dragEnter:true,b4DragOver:true,dragOver:true,b4DragDrop:true,dragDrop:true};if(this.config.events){for(var C in this.config.events){if(this.config.events[C]===false){this.events[C]=false;}}}this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false);this.dragOnly=((this.config.dragOnly===true)?true:false);this.useShim=((this.config.useShim===true)?true:false);},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable();},setPadding:function(E,C,F,D){if(!C&&0!==C){this.padding=[E,E,E,E];}else{if(!F&&0!==F){this.padding=[E,C,E,C];}else{this.padding=[E,C,F,D];}}},setInitPosition:function(F,E){var G=this.getEl();if(!this.DDM.verifyEl(G)){if(G&&G.style&&(G.style.display=="none")){}else{}return;}var D=F||0;var C=E||0;var H=B.getXY(G);this.initPageX=H[0]-D;this.initPageY=H[1]-C;this.lastPageX=H[0];this.lastPageY=H[1];this.setStartPosition(H);},setStartPosition:function(D){var C=D||B.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=C[0];this.startPageY=C[1];},addToGroup:function(C){this.groups[C]=true;this.DDM.regDragDrop(this,C);},removeFromGroup:function(C){if(this.groups[C]){delete this.groups[C];}this.DDM.removeDDFromGroup(this,C);},setDragElId:function(C){this.dragElId=C;},setHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C);}this.handleElId=C;this.DDM.regHandle(this.id,C);},setOuterHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C);}A.on(C,"mousedown",this.handleMouseDown,this,true);this.setHandleElId(C);this.hasOuterHandles=true;},unreg:function(){A.removeListener(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this);},isLocked:function(){return(this.DDM.isLocked()||this.locked);},handleMouseDown:function(J,I){var D=J.which||J.button;if(this.primaryButtonOnly&&D>1){return;}if(this.isLocked()){return;}var C=this.b4MouseDown(J),F=true;if(this.events.b4MouseDown){F=this.fireEvent("b4MouseDownEvent",J);}var E=this.onMouseDown(J),H=true;if(this.events.mouseDown){H=this.fireEvent("mouseDownEvent",J);}if((C===false)||(E===false)||(F===false)||(H===false)){return;}this.DDM.refreshCache(this.groups);var G=new YAHOO.util.Point(A.getPageX(J),A.getPageY(J));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(G,this)){}else{if(this.clickValidator(J)){this.setStartPosition();this.DDM.handleMouseDown(J,this);this.DDM.stopEvent(J);}else{}}},clickValidator:function(D){var C=YAHOO.util.Event.getTarget(D);return(this.isValidHandleChild(C)&&(this.id==this.handleElId||this.DDM.handleWasClicked(C,this.id)));},getTargetCoord:function(E,D){var C=E-this.deltaX;var F=D-this.deltaY;if(this.constrainX){if(C<this.minX){C=this.minX;}if(C>this.maxX){C=this.maxX;}}if(this.constrainY){if(F<this.minY){F=this.minY;}if(F>this.maxY){F=this.maxY;}}C=this.getTick(C,this.xTicks);F=this.getTick(F,this.yTicks);return{x:C,y:F};},addInvalidHandleType:function(C){var D=C.toUpperCase();this.invalidHandleTypes[D]=D;},addInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C);}this.invalidHandleIds[C]=C;},addInvalidHandleClass:function(C){this.invalidHandleClasses.push(C);},removeInvalidHandleType:function(C){var D=C.toUpperCase();delete this.invalidHandleTypes[D];},removeInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C);}delete this.invalidHandleIds[C];},removeInvalidHandleClass:function(D){for(var E=0,C=this.invalidHandleClasses.length;E<C;++E){if(this.invalidHandleClasses[E]==D){delete this.invalidHandleClasses[E];}}},isValidHandleChild:function(F){var E=true;var H;try{H=F.nodeName.toUpperCase();}catch(G){H=F.nodeName;}E=E&&!this.invalidHandleTypes[H];E=E&&!this.invalidHandleIds[F.id];for(var D=0,C=this.invalidHandleClasses.length;E&&D<C;++D){E=!B.hasClass(F,this.invalidHandleClasses[D]);}return E;},setXTicks:function(F,C){this.xTicks=[];this.xTickSize=C;var E={};for(var D=this.initPageX;D>=this.minX;D=D-C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true;}}for(D=this.initPageX;D<=this.maxX;D=D+C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true;}}this.xTicks.sort(this.DDM.numericSort);},setYTicks:function(F,C){this.yTicks=[];this.yTickSize=C;var E={};for(var D=this.initPageY;D>=this.minY;D=D-C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true;}}for(D=this.initPageY;D<=this.maxY;D=D+C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true;}}this.yTicks.sort(this.DDM.numericSort);},setXConstraint:function(E,D,C){this.leftConstraint=parseInt(E,10);this.rightConstraint=parseInt(D,10);this.minX=this.initPageX-this.leftConstraint;this.maxX=this.initPageX+this.rightConstraint;if(C){this.setXTicks(this.initPageX,C);}this.constrainX=true;},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks();},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0;},setYConstraint:function(C,E,D){this.topConstraint=parseInt(C,10);this.bottomConstraint=parseInt(E,10);this.minY=this.initPageY-this.topConstraint;this.maxY=this.initPageY+this.bottomConstraint;if(D){this.setYTicks(this.initPageY,D);
278   -}this.constrainY=true;},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var D=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var C=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(D,C);}else{this.setInitPosition();}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize);}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize);}},getTick:function(I,F){if(!F){return I;}else{if(F[0]>=I){return F[0];}else{for(var D=0,C=F.length;D<C;++D){var E=D+1;if(F[E]&&F[E]>=I){var H=I-F[D];var G=F[E]-I;return(G>H)?F[D]:F[E];}}return F[F.length-1];}}},toString:function(){return("DragDrop "+this.id);}};YAHOO.augment(YAHOO.util.DragDrop,YAHOO.util.EventProvider);})();YAHOO.util.DD=function(C,A,B){if(C){this.init(C,A,B);}};YAHOO.extend(YAHOO.util.DD,YAHOO.util.DragDrop,{scroll:true,autoOffset:function(C,B){var A=C-this.startPageX;var D=B-this.startPageY;this.setDelta(A,D);},setDelta:function(B,A){this.deltaX=B;this.deltaY=A;},setDragElPos:function(C,B){var A=this.getDragEl();this.alignElWithMouse(A,C,B);},alignElWithMouse:function(C,G,F){var E=this.getTargetCoord(G,F);if(!this.deltaSetXY){var H=[E.x,E.y];YAHOO.util.Dom.setXY(C,H);var D=parseInt(YAHOO.util.Dom.getStyle(C,"left"),10);var B=parseInt(YAHOO.util.Dom.getStyle(C,"top"),10);this.deltaSetXY=[D-E.x,B-E.y];}else{YAHOO.util.Dom.setStyle(C,"left",(E.x+this.deltaSetXY[0])+"px");YAHOO.util.Dom.setStyle(C,"top",(E.y+this.deltaSetXY[1])+"px");}this.cachePosition(E.x,E.y);var A=this;setTimeout(function(){A.autoScroll.call(A,E.x,E.y,C.offsetHeight,C.offsetWidth);},0);},cachePosition:function(B,A){if(B){this.lastPageX=B;this.lastPageY=A;}else{var C=YAHOO.util.Dom.getXY(this.getEl());this.lastPageX=C[0];this.lastPageY=C[1];}},autoScroll:function(J,I,E,K){if(this.scroll){var L=this.DDM.getClientHeight();var B=this.DDM.getClientWidth();var N=this.DDM.getScrollTop();var D=this.DDM.getScrollLeft();var H=E+I;var M=K+J;var G=(L+N-I-this.deltaY);var F=(B+D-J-this.deltaX);var C=40;var A=(document.all)?80:30;if(H>L&&G<C){window.scrollTo(D,N+A);}if(I<N&&N>0&&I-N<C){window.scrollTo(D,N-A);}if(M>B&&F<C){window.scrollTo(D+A,N);}if(J<D&&D>0&&J-D<C){window.scrollTo(D-A,N);}}},applyConfig:function(){YAHOO.util.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false);},b4MouseDown:function(A){this.setStartPosition();this.autoOffset(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A));},b4Drag:function(A){this.setDragElPos(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A));},toString:function(){return("DD "+this.id);}});YAHOO.util.DDProxy=function(C,A,B){if(C){this.init(C,A,B);this.initFrame();}};YAHOO.util.DDProxy.dragElId="ygddfdiv";YAHOO.extend(YAHOO.util.DDProxy,YAHOO.util.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var B=this,A=document.body;if(!A||!A.firstChild){setTimeout(function(){B.createFrame();},50);return;}var F=this.getDragEl(),E=YAHOO.util.Dom;if(!F){F=document.createElement("div");F.id=this.dragElId;var D=F.style;D.position="absolute";D.visibility="hidden";D.cursor="move";D.border="2px solid #aaa";D.zIndex=999;D.height="25px";D.width="25px";var C=document.createElement("div");E.setStyle(C,"height","100%");E.setStyle(C,"width","100%");E.setStyle(C,"background-color","#ccc");E.setStyle(C,"opacity","0");F.appendChild(C);A.insertBefore(F,A.firstChild);}},initFrame:function(){this.createFrame();},applyConfig:function(){YAHOO.util.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||YAHOO.util.DDProxy.dragElId);},showFrame:function(E,D){var C=this.getEl();var A=this.getDragEl();var B=A.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(B.width,10)/2),Math.round(parseInt(B.height,10)/2));}this.setDragElPos(E,D);YAHOO.util.Dom.setStyle(A,"visibility","visible");},_resizeProxy:function(){if(this.resizeFrame){var H=YAHOO.util.Dom;var B=this.getEl();var C=this.getDragEl();var G=parseInt(H.getStyle(C,"borderTopWidth"),10);var I=parseInt(H.getStyle(C,"borderRightWidth"),10);var F=parseInt(H.getStyle(C,"borderBottomWidth"),10);var D=parseInt(H.getStyle(C,"borderLeftWidth"),10);if(isNaN(G)){G=0;}if(isNaN(I)){I=0;}if(isNaN(F)){F=0;}if(isNaN(D)){D=0;}var E=Math.max(0,B.offsetWidth-I-D);var A=Math.max(0,B.offsetHeight-G-F);H.setStyle(C,"width",E+"px");H.setStyle(C,"height",A+"px");}},b4MouseDown:function(B){this.setStartPosition();var A=YAHOO.util.Event.getPageX(B);var C=YAHOO.util.Event.getPageY(B);this.autoOffset(A,C);},b4StartDrag:function(A,B){this.showFrame(A,B);},b4EndDrag:function(A){YAHOO.util.Dom.setStyle(this.getDragEl(),"visibility","hidden");},endDrag:function(D){var C=YAHOO.util.Dom;var B=this.getEl();var A=this.getDragEl();C.setStyle(A,"visibility","");C.setStyle(B,"visibility","hidden");YAHOO.util.DDM.moveToEl(B,A);C.setStyle(A,"visibility","hidden");C.setStyle(B,"visibility","");},toString:function(){return("DDProxy "+this.id);}});YAHOO.util.DDTarget=function(C,A,B){if(C){this.initTarget(C,A,B);}};YAHOO.extend(YAHOO.util.DDTarget,YAHOO.util.DragDrop,{toString:function(){return("DDTarget "+this.id);}});YAHOO.register("dragdrop",YAHOO.util.DragDropMgr,{version:"2.7.0",build:"1799"});
279   -/*
  268 +}this.constrainY=true;},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var D=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var C=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(D,C);}else{this.setInitPosition();}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize);}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize);}},getTick:function(I,F){if(!F){return I;}else{if(F[0]>=I){return F[0];}else{for(var D=0,C=F.length;D<C;++D){var E=D+1;if(F[E]&&F[E]>=I){var H=I-F[D];var G=F[E]-I;return(G>H)?F[D]:F[E];}}return F[F.length-1];}}},toString:function(){return("DragDrop "+this.id);}};YAHOO.augment(YAHOO.util.DragDrop,YAHOO.util.EventProvider);})();YAHOO.util.DD=function(C,A,B){if(C){this.init(C,A,B);}};YAHOO.extend(YAHOO.util.DD,YAHOO.util.DragDrop,{scroll:true,autoOffset:function(C,B){var A=C-this.startPageX;var D=B-this.startPageY;this.setDelta(A,D);},setDelta:function(B,A){this.deltaX=B;this.deltaY=A;},setDragElPos:function(C,B){var A=this.getDragEl();this.alignElWithMouse(A,C,B);},alignElWithMouse:function(C,G,F){var E=this.getTargetCoord(G,F);if(!this.deltaSetXY){var H=[E.x,E.y];YAHOO.util.Dom.setXY(C,H);var D=parseInt(YAHOO.util.Dom.getStyle(C,"left"),10);var B=parseInt(YAHOO.util.Dom.getStyle(C,"top"),10);this.deltaSetXY=[D-E.x,B-E.y];}else{YAHOO.util.Dom.setStyle(C,"left",(E.x+this.deltaSetXY[0])+"px");YAHOO.util.Dom.setStyle(C,"top",(E.y+this.deltaSetXY[1])+"px");}this.cachePosition(E.x,E.y);var A=this;setTimeout(function(){A.autoScroll.call(A,E.x,E.y,C.offsetHeight,C.offsetWidth);},0);},cachePosition:function(B,A){if(B){this.lastPageX=B;this.lastPageY=A;}else{var C=YAHOO.util.Dom.getXY(this.getEl());this.lastPageX=C[0];this.lastPageY=C[1];}},autoScroll:function(J,I,E,K){if(this.scroll){var L=this.DDM.getClientHeight();var B=this.DDM.getClientWidth();var N=this.DDM.getScrollTop();var D=this.DDM.getScrollLeft();var H=E+I;var M=K+J;var G=(L+N-I-this.deltaY);var F=(B+D-J-this.deltaX);var C=40;var A=(document.all)?80:30;if(H>L&&G<C){window.scrollTo(D,N+A);}if(I<N&&N>0&&I-N<C){window.scrollTo(D,N-A);}if(M>B&&F<C){window.scrollTo(D+A,N);}if(J<D&&D>0&&J-D<C){window.scrollTo(D-A,N);}}},applyConfig:function(){YAHOO.util.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false);},b4MouseDown:function(A){this.setStartPosition();this.autoOffset(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A));},b4Drag:function(A){this.setDragElPos(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A));},toString:function(){return("DD "+this.id);}});YAHOO.util.DDProxy=function(C,A,B){if(C){this.init(C,A,B);this.initFrame();}};YAHOO.util.DDProxy.dragElId="ygddfdiv";YAHOO.extend(YAHOO.util.DDProxy,YAHOO.util.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var B=this,A=document.body;if(!A||!A.firstChild){setTimeout(function(){B.createFrame();},50);return;}var F=this.getDragEl(),E=YAHOO.util.Dom;if(!F){F=document.createElement("div");F.id=this.dragElId;var D=F.style;D.position="absolute";D.visibility="hidden";D.cursor="move";D.border="2px solid #aaa";D.zIndex=999;D.height="25px";D.width="25px";var C=document.createElement("div");E.setStyle(C,"height","100%");E.setStyle(C,"width","100%");E.setStyle(C,"background-color","#ccc");E.setStyle(C,"opacity","0");F.appendChild(C);A.insertBefore(F,A.firstChild);}},initFrame:function(){this.createFrame();},applyConfig:function(){YAHOO.util.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||YAHOO.util.DDProxy.dragElId);},showFrame:function(E,D){var C=this.getEl();var A=this.getDragEl();var B=A.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(B.width,10)/2),Math.round(parseInt(B.height,10)/2));}this.setDragElPos(E,D);YAHOO.util.Dom.setStyle(A,"visibility","visible");},_resizeProxy:function(){if(this.resizeFrame){var H=YAHOO.util.Dom;var B=this.getEl();var C=this.getDragEl();var G=parseInt(H.getStyle(C,"borderTopWidth"),10);var I=parseInt(H.getStyle(C,"borderRightWidth"),10);var F=parseInt(H.getStyle(C,"borderBottomWidth"),10);var D=parseInt(H.getStyle(C,"borderLeftWidth"),10);if(isNaN(G)){G=0;}if(isNaN(I)){I=0;}if(isNaN(F)){F=0;}if(isNaN(D)){D=0;}var E=Math.max(0,B.offsetWidth-I-D);var A=Math.max(0,B.offsetHeight-G-F);H.setStyle(C,"width",E+"px");H.setStyle(C,"height",A+"px");}},b4MouseDown:function(B){this.setStartPosition();var A=YAHOO.util.Event.getPageX(B);var C=YAHOO.util.Event.getPageY(B);this.autoOffset(A,C);},b4StartDrag:function(A,B){this.showFrame(A,B);},b4EndDrag:function(A){YAHOO.util.Dom.setStyle(this.getDragEl(),"visibility","hidden");},endDrag:function(D){var C=YAHOO.util.Dom;var B=this.getEl();var A=this.getDragEl();C.setStyle(A,"visibility","");C.setStyle(B,"visibility","hidden");YAHOO.util.DDM.moveToEl(B,A);C.setStyle(A,"visibility","hidden");C.setStyle(B,"visibility","");},toString:function(){return("DDProxy "+this.id);}});YAHOO.util.DDTarget=function(C,A,B){if(C){this.initTarget(C,A,B);}};YAHOO.extend(YAHOO.util.DDTarget,YAHOO.util.DragDrop,{toString:function(){return("DDTarget "+this.id);}});YAHOO.register("dragdrop",YAHOO.util.DragDropMgr,{version:"2.7.0",build:"1799"});/*
280 269 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
281 270 Code licensed under the BSD License:
282 271 http://developer.yahoo.net/yui/license.txt
... ... @@ -284,8 +273,7 @@ version: 2.7.0
284 273 */
285 274 (function(){var B=YAHOO.util.Dom.getXY,A=YAHOO.util.Event,D=Array.prototype.slice;function C(G,E,F,H){C.ANIM_AVAIL=(!YAHOO.lang.isUndefined(YAHOO.util.Anim));if(G){this.init(G,E,true);this.initSlider(H);this.initThumb(F);}}YAHOO.lang.augmentObject(C,{getHorizSlider:function(F,G,I,H,E){return new C(F,F,new YAHOO.widget.SliderThumb(G,F,I,H,0,0,E),"horiz");},getVertSlider:function(G,H,E,I,F){return new C(G,G,new YAHOO.widget.SliderThumb(H,G,0,0,E,I,F),"vert");},getSliderRegion:function(G,H,J,I,E,K,F){return new C(G,G,new YAHOO.widget.SliderThumb(H,G,J,I,E,K,F),"region");},SOURCE_UI_EVENT:1,SOURCE_SET_VALUE:2,SOURCE_KEY_EVENT:3,ANIM_AVAIL:false},true);YAHOO.extend(C,YAHOO.util.DragDrop,{_mouseDown:false,dragOnly:true,initSlider:function(E){this.type=E;this.createEvent("change",this);this.createEvent("slideStart",this);this.createEvent("slideEnd",this);this.isTarget=false;this.animate=C.ANIM_AVAIL;this.backgroundEnabled=true;this.tickPause=40;this.enableKeys=true;this.keyIncrement=20;this.moveComplete=true;this.animationDuration=0.2;this.SOURCE_UI_EVENT=1;this.SOURCE_SET_VALUE=2;this.valueChangeSource=0;this._silent=false;this.lastOffset=[0,0];},initThumb:function(F){var E=this;this.thumb=F;F.cacheBetweenDrags=true;if(F._isHoriz&&F.xTicks&&F.xTicks.length){this.tickPause=Math.round(360/F.xTicks.length);}else{if(F.yTicks&&F.yTicks.length){this.tickPause=Math.round(360/F.yTicks.length);}}F.onAvailable=function(){return E.setStartSliderState();};F.onMouseDown=function(){E._mouseDown=true;return E.focus();};F.startDrag=function(){E._slideStart();};F.onDrag=function(){E.fireEvents(true);};F.onMouseUp=function(){E.thumbMouseUp();};},onAvailable:function(){this._bindKeyEvents();},_bindKeyEvents:function(){A.on(this.id,"keydown",this.handleKeyDown,this,true);A.on(this.id,"keypress",this.handleKeyPress,this,true);},handleKeyPress:function(F){if(this.enableKeys){var E=A.getCharCode(F);switch(E){case 37:case 38:case 39:case 40:case 36:case 35:A.preventDefault(F);break;default:}}},handleKeyDown:function(J){if(this.enableKeys){var G=A.getCharCode(J),F=this.thumb,H=this.getXValue(),E=this.getYValue(),I=true;switch(G){case 37:H-=this.keyIncrement;break;case 38:E-=this.keyIncrement;break;case 39:H+=this.keyIncrement;break;case 40:E+=this.keyIncrement;break;case 36:H=F.leftConstraint;E=F.topConstraint;break;case 35:H=F.rightConstraint;E=F.bottomConstraint;break;default:I=false;}if(I){if(F._isRegion){this._setRegionValue(C.SOURCE_KEY_EVENT,H,E,true);}else{this._setValue(C.SOURCE_KEY_EVENT,(F._isHoriz?H:E),true);}A.stopEvent(J);}}},setStartSliderState:function(){this.setThumbCenterPoint();this.baselinePos=B(this.getEl());this.thumb.startOffset=this.thumb.getOffsetFromParent(this.baselinePos);if(this.thumb._isRegion){if(this.deferredSetRegionValue){this._setRegionValue.apply(this,this.deferredSetRegionValue);this.deferredSetRegionValue=null;}else{this.setRegionValue(0,0,true,true,true);}}else{if(this.deferredSetValue){this._setValue.apply(this,this.deferredSetValue);this.deferredSetValue=null;}else{this.setValue(0,true,true,true);}}},setThumbCenterPoint:function(){var E=this.thumb.getEl();if(E){this.thumbCenterPoint={x:parseInt(E.offsetWidth/2,10),y:parseInt(E.offsetHeight/2,10)};}},lock:function(){this.thumb.lock();this.locked=true;},unlock:function(){this.thumb.unlock();this.locked=false;},thumbMouseUp:function(){this._mouseDown=false;if(!this.isLocked()&&!this.moveComplete){this.endMove();}},onMouseUp:function(){this._mouseDown=false;if(this.backgroundEnabled&&!this.isLocked()&&!this.moveComplete){this.endMove();}},getThumb:function(){return this.thumb;},focus:function(){this.valueChangeSource=C.SOURCE_UI_EVENT;var E=this.getEl();if(E.focus){try{E.focus();}catch(F){}}this.verifyOffset();return !this.isLocked();},onChange:function(E,F){},onSlideStart:function(){},onSlideEnd:function(){},getValue:function(){return this.thumb.getValue();},getXValue:function(){return this.thumb.getXValue();},getYValue:function(){return this.thumb.getYValue();},setValue:function(){var E=D.call(arguments);E.unshift(C.SOURCE_SET_VALUE);return this._setValue.apply(this,E);},_setValue:function(I,L,G,H,E){var F=this.thumb,K,J;if(!F.available){this.deferredSetValue=arguments;return false;}if(this.isLocked()&&!H){return false;}if(isNaN(L)){return false;}if(F._isRegion){return false;}this._silent=E;this.valueChangeSource=I||C.SOURCE_SET_VALUE;F.lastOffset=[L,L];this.verifyOffset(true);this._slideStart();if(F._isHoriz){K=F.initPageX+L+this.thumbCenterPoint.x;this.moveThumb(K,F.initPageY,G);}else{J=F.initPageY+L+this.thumbCenterPoint.y;this.moveThumb(F.initPageX,J,G);}return true;},setRegionValue:function(){var E=D.call(arguments);E.unshift(C.SOURCE_SET_VALUE);return this._setRegionValue.apply(this,E);},_setRegionValue:function(F,J,H,I,G,K){var L=this.thumb,E,M;if(!L.available){this.deferredSetRegionValue=arguments;return false;}if(this.isLocked()&&!G){return false;}if(isNaN(J)){return false;}if(!L._isRegion){return false;}this._silent=K;this.valueChangeSource=F||C.SOURCE_SET_VALUE;L.lastOffset=[J,H];this.verifyOffset(true);this._slideStart();E=L.initPageX+J+this.thumbCenterPoint.x;M=L.initPageY+H+this.thumbCenterPoint.y;this.moveThumb(E,M,I);return true;},verifyOffset:function(F){var G=B(this.getEl()),E=this.thumb;if(!this.thumbCenterPoint||!this.thumbCenterPoint.x){this.setThumbCenterPoint();}if(G){if(G[0]!=this.baselinePos[0]||G[1]!=this.baselinePos[1]){this.setInitPosition();this.baselinePos=G;E.initPageX=this.initPageX+E.startOffset[0];E.initPageY=this.initPageY+E.startOffset[1];E.deltaSetXY=null;this.resetThumbConstraints();return false;}}return true;},moveThumb:function(K,J,I,G){var L=this.thumb,M=this,F,E,H;if(!L.available){return;}L.setDelta(this.thumbCenterPoint.x,this.thumbCenterPoint.y);E=L.getTargetCoord(K,J);F=[Math.round(E.x),Math.round(E.y)];if(this.animate&&L._graduated&&!I){this.lock();this.curCoord=B(this.thumb.getEl());this.curCoord=[Math.round(this.curCoord[0]),Math.round(this.curCoord[1])];setTimeout(function(){M.moveOneTick(F);
286 275 },this.tickPause);}else{if(this.animate&&C.ANIM_AVAIL&&!I){this.lock();H=new YAHOO.util.Motion(L.id,{points:{to:F}},this.animationDuration,YAHOO.util.Easing.easeOut);H.onComplete.subscribe(function(){M.unlock();if(!M._mouseDown){M.endMove();}});H.animate();}else{L.setDragElPos(K,J);if(!G&&!this._mouseDown){this.endMove();}}}},_slideStart:function(){if(!this._sliding){if(!this._silent){this.onSlideStart();this.fireEvent("slideStart");}this._sliding=true;}},_slideEnd:function(){if(this._sliding&&this.moveComplete){var E=this._silent;this._sliding=false;this._silent=false;this.moveComplete=false;if(!E){this.onSlideEnd();this.fireEvent("slideEnd");}}},moveOneTick:function(F){var H=this.thumb,G=this,I=null,E,J;if(H._isRegion){I=this._getNextX(this.curCoord,F);E=(I!==null)?I[0]:this.curCoord[0];I=this._getNextY(this.curCoord,F);J=(I!==null)?I[1]:this.curCoord[1];I=E!==this.curCoord[0]||J!==this.curCoord[1]?[E,J]:null;}else{if(H._isHoriz){I=this._getNextX(this.curCoord,F);}else{I=this._getNextY(this.curCoord,F);}}if(I){this.curCoord=I;this.thumb.alignElWithMouse(H.getEl(),I[0]+this.thumbCenterPoint.x,I[1]+this.thumbCenterPoint.y);if(!(I[0]==F[0]&&I[1]==F[1])){setTimeout(function(){G.moveOneTick(F);},this.tickPause);}else{this.unlock();if(!this._mouseDown){this.endMove();}}}else{this.unlock();if(!this._mouseDown){this.endMove();}}},_getNextX:function(E,F){var H=this.thumb,J,G=[],I=null;if(E[0]>F[0]){J=H.tickSize-this.thumbCenterPoint.x;G=H.getTargetCoord(E[0]-J,E[1]);I=[G.x,G.y];}else{if(E[0]<F[0]){J=H.tickSize+this.thumbCenterPoint.x;G=H.getTargetCoord(E[0]+J,E[1]);I=[G.x,G.y];}else{}}return I;},_getNextY:function(E,F){var H=this.thumb,J,G=[],I=null;if(E[1]>F[1]){J=H.tickSize-this.thumbCenterPoint.y;G=H.getTargetCoord(E[0],E[1]-J);I=[G.x,G.y];}else{if(E[1]<F[1]){J=H.tickSize+this.thumbCenterPoint.y;G=H.getTargetCoord(E[0],E[1]+J);I=[G.x,G.y];}else{}}return I;},b4MouseDown:function(E){if(!this.backgroundEnabled){return false;}this.thumb.autoOffset();this.resetThumbConstraints();},onMouseDown:function(F){if(!this.backgroundEnabled||this.isLocked()){return false;}this._mouseDown=true;var E=A.getPageX(F),G=A.getPageY(F);this.focus();this._slideStart();this.moveThumb(E,G);},onDrag:function(F){if(this.backgroundEnabled&&!this.isLocked()){var E=A.getPageX(F),G=A.getPageY(F);this.moveThumb(E,G,true,true);this.fireEvents();}},endMove:function(){this.unlock();this.fireEvents();this.moveComplete=true;this._slideEnd();},resetThumbConstraints:function(){var E=this.thumb;E.setXConstraint(E.leftConstraint,E.rightConstraint,E.xTickSize);E.setYConstraint(E.topConstraint,E.bottomConstraint,E.xTickSize);},fireEvents:function(G){var F=this.thumb,I,H,E;if(!G){F.cachePosition();}if(!this.isLocked()){if(F._isRegion){I=F.getXValue();H=F.getYValue();if(I!=this.previousX||H!=this.previousY){if(!this._silent){this.onChange(I,H);this.fireEvent("change",{x:I,y:H});}}this.previousX=I;this.previousY=H;}else{E=F.getValue();if(E!=this.previousVal){if(!this._silent){this.onChange(E);this.fireEvent("change",E);}}this.previousVal=E;}}},toString:function(){return("Slider ("+this.type+") "+this.id);}});YAHOO.lang.augmentProto(C,YAHOO.util.EventProvider);YAHOO.widget.Slider=C;})();YAHOO.widget.SliderThumb=function(G,B,E,D,A,F,C){if(G){YAHOO.widget.SliderThumb.superclass.constructor.call(this,G,B);this.parentElId=B;}this.isTarget=false;this.tickSize=C;this.maintainOffset=true;this.initSlider(E,D,A,F,C);this.scroll=false;};YAHOO.extend(YAHOO.widget.SliderThumb,YAHOO.util.DD,{startOffset:null,dragOnly:true,_isHoriz:false,_prevVal:0,_graduated:false,getOffsetFromParent0:function(C){var A=YAHOO.util.Dom.getXY(this.getEl()),B=C||YAHOO.util.Dom.getXY(this.parentElId);return[(A[0]-B[0]),(A[1]-B[1])];},getOffsetFromParent:function(H){var A=this.getEl(),E,I,F,B,K,D,C,J,G;if(!this.deltaOffset){I=YAHOO.util.Dom.getXY(A);F=H||YAHOO.util.Dom.getXY(this.parentElId);E=[(I[0]-F[0]),(I[1]-F[1])];B=parseInt(YAHOO.util.Dom.getStyle(A,"left"),10);K=parseInt(YAHOO.util.Dom.getStyle(A,"top"),10);D=B-E[0];C=K-E[1];if(isNaN(D)||isNaN(C)){}else{this.deltaOffset=[D,C];}}else{J=parseInt(YAHOO.util.Dom.getStyle(A,"left"),10);G=parseInt(YAHOO.util.Dom.getStyle(A,"top"),10);E=[J+this.deltaOffset[0],G+this.deltaOffset[1]];}return E;},initSlider:function(D,C,A,E,B){this.initLeft=D;this.initRight=C;this.initUp=A;this.initDown=E;this.setXConstraint(D,C,B);this.setYConstraint(A,E,B);if(B&&B>1){this._graduated=true;}this._isHoriz=(D||C);this._isVert=(A||E);this._isRegion=(this._isHoriz&&this._isVert);},clearTicks:function(){YAHOO.widget.SliderThumb.superclass.clearTicks.call(this);this.tickSize=0;this._graduated=false;},getValue:function(){return(this._isHoriz)?this.getXValue():this.getYValue();},getXValue:function(){if(!this.available){return 0;}var A=this.getOffsetFromParent();if(YAHOO.lang.isNumber(A[0])){this.lastOffset=A;return(A[0]-this.startOffset[0]);}else{return(this.lastOffset[0]-this.startOffset[0]);}},getYValue:function(){if(!this.available){return 0;}var A=this.getOffsetFromParent();if(YAHOO.lang.isNumber(A[1])){this.lastOffset=A;return(A[1]-this.startOffset[1]);}else{return(this.lastOffset[1]-this.startOffset[1]);}},toString:function(){return"SliderThumb "+this.id;},onChange:function(A,B){}});(function(){var A=YAHOO.util.Event,B=YAHOO.widget;function C(I,F,H,D){var G=this,J={min:false,max:false},E,K;this.minSlider=I;this.maxSlider=F;this.activeSlider=I;this.isHoriz=I.thumb._isHoriz;E=this.minSlider.thumb.onMouseDown;K=this.maxSlider.thumb.onMouseDown;this.minSlider.thumb.onMouseDown=function(){G.activeSlider=G.minSlider;E.apply(this,arguments);};this.maxSlider.thumb.onMouseDown=function(){G.activeSlider=G.maxSlider;K.apply(this,arguments);};this.minSlider.thumb.onAvailable=function(){I.setStartSliderState();J.min=true;if(J.max){G.fireEvent("ready",G);}};this.maxSlider.thumb.onAvailable=function(){F.setStartSliderState();J.max=true;if(J.min){G.fireEvent("ready",G);}};I.onMouseDown=F.onMouseDown=function(L){return this.backgroundEnabled&&G._handleMouseDown(L);
287   -};I.onDrag=F.onDrag=function(L){G._handleDrag(L);};I.onMouseUp=F.onMouseUp=function(L){G._handleMouseUp(L);};I._bindKeyEvents=function(){G._bindKeyEvents(this);};F._bindKeyEvents=function(){};I.subscribe("change",this._handleMinChange,I,this);I.subscribe("slideStart",this._handleSlideStart,I,this);I.subscribe("slideEnd",this._handleSlideEnd,I,this);F.subscribe("change",this._handleMaxChange,F,this);F.subscribe("slideStart",this._handleSlideStart,F,this);F.subscribe("slideEnd",this._handleSlideEnd,F,this);this.createEvent("ready",this);this.createEvent("change",this);this.createEvent("slideStart",this);this.createEvent("slideEnd",this);D=YAHOO.lang.isArray(D)?D:[0,H];D[0]=Math.min(Math.max(parseInt(D[0],10)|0,0),H);D[1]=Math.max(Math.min(parseInt(D[1],10)|0,H),0);if(D[0]>D[1]){D.splice(0,2,D[1],D[0]);}this.minVal=D[0];this.maxVal=D[1];this.minSlider.setValue(this.minVal,true,true,true);this.maxSlider.setValue(this.maxVal,true,true,true);}C.prototype={minVal:-1,maxVal:-1,minRange:0,_handleSlideStart:function(E,D){this.fireEvent("slideStart",D);},_handleSlideEnd:function(E,D){this.fireEvent("slideEnd",D);},_handleDrag:function(D){B.Slider.prototype.onDrag.call(this.activeSlider,D);},_handleMinChange:function(){this.activeSlider=this.minSlider;this.updateValue();},_handleMaxChange:function(){this.activeSlider=this.maxSlider;this.updateValue();},_bindKeyEvents:function(D){A.on(D.id,"keydown",this._handleKeyDown,this,true);A.on(D.id,"keypress",this._handleKeyPress,this,true);},_handleKeyDown:function(D){this.activeSlider.handleKeyDown.apply(this.activeSlider,arguments);},_handleKeyPress:function(D){this.activeSlider.handleKeyPress.apply(this.activeSlider,arguments);},setValues:function(H,K,I,E,J){var F=this.minSlider,M=this.maxSlider,D=F.thumb,L=M.thumb,N=this,G={min:false,max:false};if(D._isHoriz){D.setXConstraint(D.leftConstraint,L.rightConstraint,D.tickSize);L.setXConstraint(D.leftConstraint,L.rightConstraint,L.tickSize);}else{D.setYConstraint(D.topConstraint,L.bottomConstraint,D.tickSize);L.setYConstraint(D.topConstraint,L.bottomConstraint,L.tickSize);}this._oneTimeCallback(F,"slideEnd",function(){G.min=true;if(G.max){N.updateValue(J);setTimeout(function(){N._cleanEvent(F,"slideEnd");N._cleanEvent(M,"slideEnd");},0);}});this._oneTimeCallback(M,"slideEnd",function(){G.max=true;if(G.min){N.updateValue(J);setTimeout(function(){N._cleanEvent(F,"slideEnd");N._cleanEvent(M,"slideEnd");},0);}});F.setValue(H,I,E,false);M.setValue(K,I,E,false);},setMinValue:function(F,H,I,E){var G=this.minSlider,D=this;this.activeSlider=G;D=this;this._oneTimeCallback(G,"slideEnd",function(){D.updateValue(E);setTimeout(function(){D._cleanEvent(G,"slideEnd");},0);});G.setValue(F,H,I);},setMaxValue:function(D,H,I,F){var G=this.maxSlider,E=this;this.activeSlider=G;this._oneTimeCallback(G,"slideEnd",function(){E.updateValue(F);setTimeout(function(){E._cleanEvent(G,"slideEnd");},0);});G.setValue(D,H,I);},updateValue:function(J){var E=this.minSlider.getValue(),K=this.maxSlider.getValue(),F=false,D,M,H,I,L,G;if(E!=this.minVal||K!=this.maxVal){F=true;D=this.minSlider.thumb;M=this.maxSlider.thumb;H=this.isHoriz?"x":"y";G=this.minSlider.thumbCenterPoint[H]+this.maxSlider.thumbCenterPoint[H];I=Math.max(K-G-this.minRange,0);L=Math.min(-E-G-this.minRange,0);if(this.isHoriz){I=Math.min(I,M.rightConstraint);D.setXConstraint(D.leftConstraint,I,D.tickSize);M.setXConstraint(L,M.rightConstraint,M.tickSize);}else{I=Math.min(I,M.bottomConstraint);D.setYConstraint(D.leftConstraint,I,D.tickSize);M.setYConstraint(L,M.bottomConstraint,M.tickSize);}}this.minVal=E;this.maxVal=K;if(F&&!J){this.fireEvent("change",this);}},selectActiveSlider:function(H){var E=this.minSlider,D=this.maxSlider,J=E.isLocked()||!E.backgroundEnabled,G=D.isLocked()||!E.backgroundEnabled,F=YAHOO.util.Event,I;if(J||G){this.activeSlider=J?D:E;}else{if(this.isHoriz){I=F.getPageX(H)-E.thumb.initPageX-E.thumbCenterPoint.x;}else{I=F.getPageY(H)-E.thumb.initPageY-E.thumbCenterPoint.y;}this.activeSlider=I*2>D.getValue()+E.getValue()?D:E;}},_handleMouseDown:function(D){if(!D._handled){D._handled=true;this.selectActiveSlider(D);return B.Slider.prototype.onMouseDown.call(this.activeSlider,D);}else{return false;}},_handleMouseUp:function(D){B.Slider.prototype.onMouseUp.apply(this.activeSlider,arguments);},_oneTimeCallback:function(F,D,E){F.subscribe(D,function(){F.unsubscribe(D,arguments.callee);E.apply({},[].slice.apply(arguments));});},_cleanEvent:function(K,E){var J,I,D,G,H,F;if(K.__yui_events&&K.events[E]){for(I=K.__yui_events.length;I>=0;--I){if(K.__yui_events[I].type===E){J=K.__yui_events[I];break;}}if(J){H=J.subscribers;F=[];G=0;for(I=0,D=H.length;I<D;++I){if(H[I]){F[G++]=H[I];}}J.subscribers=F;}}}};YAHOO.lang.augmentProto(C,YAHOO.util.EventProvider);B.Slider.getHorizDualSlider=function(H,J,K,G,F,D){var I=new B.SliderThumb(J,H,0,G,0,0,F),E=new B.SliderThumb(K,H,0,G,0,0,F);return new C(new B.Slider(H,H,I,"horiz"),new B.Slider(H,H,E,"horiz"),G,D);};B.Slider.getVertDualSlider=function(H,J,K,G,F,D){var I=new B.SliderThumb(J,H,0,0,0,G,F),E=new B.SliderThumb(K,H,0,0,0,G,F);return new B.DualSlider(new B.Slider(H,H,I,"vert"),new B.Slider(H,H,E,"vert"),G,D);};YAHOO.widget.DualSlider=C;})();YAHOO.register("slider",YAHOO.widget.Slider,{version:"2.7.0",build:"1799"});
288   -/*
  276 +};I.onDrag=F.onDrag=function(L){G._handleDrag(L);};I.onMouseUp=F.onMouseUp=function(L){G._handleMouseUp(L);};I._bindKeyEvents=function(){G._bindKeyEvents(this);};F._bindKeyEvents=function(){};I.subscribe("change",this._handleMinChange,I,this);I.subscribe("slideStart",this._handleSlideStart,I,this);I.subscribe("slideEnd",this._handleSlideEnd,I,this);F.subscribe("change",this._handleMaxChange,F,this);F.subscribe("slideStart",this._handleSlideStart,F,this);F.subscribe("slideEnd",this._handleSlideEnd,F,this);this.createEvent("ready",this);this.createEvent("change",this);this.createEvent("slideStart",this);this.createEvent("slideEnd",this);D=YAHOO.lang.isArray(D)?D:[0,H];D[0]=Math.min(Math.max(parseInt(D[0],10)|0,0),H);D[1]=Math.max(Math.min(parseInt(D[1],10)|0,H),0);if(D[0]>D[1]){D.splice(0,2,D[1],D[0]);}this.minVal=D[0];this.maxVal=D[1];this.minSlider.setValue(this.minVal,true,true,true);this.maxSlider.setValue(this.maxVal,true,true,true);}C.prototype={minVal:-1,maxVal:-1,minRange:0,_handleSlideStart:function(E,D){this.fireEvent("slideStart",D);},_handleSlideEnd:function(E,D){this.fireEvent("slideEnd",D);},_handleDrag:function(D){B.Slider.prototype.onDrag.call(this.activeSlider,D);},_handleMinChange:function(){this.activeSlider=this.minSlider;this.updateValue();},_handleMaxChange:function(){this.activeSlider=this.maxSlider;this.updateValue();},_bindKeyEvents:function(D){A.on(D.id,"keydown",this._handleKeyDown,this,true);A.on(D.id,"keypress",this._handleKeyPress,this,true);},_handleKeyDown:function(D){this.activeSlider.handleKeyDown.apply(this.activeSlider,arguments);},_handleKeyPress:function(D){this.activeSlider.handleKeyPress.apply(this.activeSlider,arguments);},setValues:function(H,K,I,E,J){var F=this.minSlider,M=this.maxSlider,D=F.thumb,L=M.thumb,N=this,G={min:false,max:false};if(D._isHoriz){D.setXConstraint(D.leftConstraint,L.rightConstraint,D.tickSize);L.setXConstraint(D.leftConstraint,L.rightConstraint,L.tickSize);}else{D.setYConstraint(D.topConstraint,L.bottomConstraint,D.tickSize);L.setYConstraint(D.topConstraint,L.bottomConstraint,L.tickSize);}this._oneTimeCallback(F,"slideEnd",function(){G.min=true;if(G.max){N.updateValue(J);setTimeout(function(){N._cleanEvent(F,"slideEnd");N._cleanEvent(M,"slideEnd");},0);}});this._oneTimeCallback(M,"slideEnd",function(){G.max=true;if(G.min){N.updateValue(J);setTimeout(function(){N._cleanEvent(F,"slideEnd");N._cleanEvent(M,"slideEnd");},0);}});F.setValue(H,I,E,false);M.setValue(K,I,E,false);},setMinValue:function(F,H,I,E){var G=this.minSlider,D=this;this.activeSlider=G;D=this;this._oneTimeCallback(G,"slideEnd",function(){D.updateValue(E);setTimeout(function(){D._cleanEvent(G,"slideEnd");},0);});G.setValue(F,H,I);},setMaxValue:function(D,H,I,F){var G=this.maxSlider,E=this;this.activeSlider=G;this._oneTimeCallback(G,"slideEnd",function(){E.updateValue(F);setTimeout(function(){E._cleanEvent(G,"slideEnd");},0);});G.setValue(D,H,I);},updateValue:function(J){var E=this.minSlider.getValue(),K=this.maxSlider.getValue(),F=false,D,M,H,I,L,G;if(E!=this.minVal||K!=this.maxVal){F=true;D=this.minSlider.thumb;M=this.maxSlider.thumb;H=this.isHoriz?"x":"y";G=this.minSlider.thumbCenterPoint[H]+this.maxSlider.thumbCenterPoint[H];I=Math.max(K-G-this.minRange,0);L=Math.min(-E-G-this.minRange,0);if(this.isHoriz){I=Math.min(I,M.rightConstraint);D.setXConstraint(D.leftConstraint,I,D.tickSize);M.setXConstraint(L,M.rightConstraint,M.tickSize);}else{I=Math.min(I,M.bottomConstraint);D.setYConstraint(D.leftConstraint,I,D.tickSize);M.setYConstraint(L,M.bottomConstraint,M.tickSize);}}this.minVal=E;this.maxVal=K;if(F&&!J){this.fireEvent("change",this);}},selectActiveSlider:function(H){var E=this.minSlider,D=this.maxSlider,J=E.isLocked()||!E.backgroundEnabled,G=D.isLocked()||!E.backgroundEnabled,F=YAHOO.util.Event,I;if(J||G){this.activeSlider=J?D:E;}else{if(this.isHoriz){I=F.getPageX(H)-E.thumb.initPageX-E.thumbCenterPoint.x;}else{I=F.getPageY(H)-E.thumb.initPageY-E.thumbCenterPoint.y;}this.activeSlider=I*2>D.getValue()+E.getValue()?D:E;}},_handleMouseDown:function(D){if(!D._handled){D._handled=true;this.selectActiveSlider(D);return B.Slider.prototype.onMouseDown.call(this.activeSlider,D);}else{return false;}},_handleMouseUp:function(D){B.Slider.prototype.onMouseUp.apply(this.activeSlider,arguments);},_oneTimeCallback:function(F,D,E){F.subscribe(D,function(){F.unsubscribe(D,arguments.callee);E.apply({},[].slice.apply(arguments));});},_cleanEvent:function(K,E){var J,I,D,G,H,F;if(K.__yui_events&&K.events[E]){for(I=K.__yui_events.length;I>=0;--I){if(K.__yui_events[I].type===E){J=K.__yui_events[I];break;}}if(J){H=J.subscribers;F=[];G=0;for(I=0,D=H.length;I<D;++I){if(H[I]){F[G++]=H[I];}}J.subscribers=F;}}}};YAHOO.lang.augmentProto(C,YAHOO.util.EventProvider);B.Slider.getHorizDualSlider=function(H,J,K,G,F,D){var I=new B.SliderThumb(J,H,0,G,0,0,F),E=new B.SliderThumb(K,H,0,G,0,0,F);return new C(new B.Slider(H,H,I,"horiz"),new B.Slider(H,H,E,"horiz"),G,D);};B.Slider.getVertDualSlider=function(H,J,K,G,F,D){var I=new B.SliderThumb(J,H,0,0,0,G,F),E=new B.SliderThumb(K,H,0,0,0,G,F);return new B.DualSlider(new B.Slider(H,H,I,"vert"),new B.Slider(H,H,E,"vert"),G,D);};YAHOO.widget.DualSlider=C;})();YAHOO.register("slider",YAHOO.widget.Slider,{version:"2.7.0",build:"1799"});/*
289 277 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
290 278 Code licensed under the BSD License:
291 279 http://developer.yahoo.net/yui/license.txt
... ... @@ -307,26 +295,21 @@ Redistribution and use in source and binary forms, with or without modification,
307 295 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
308 296 */
309 297 YAHOO.util.Easing={easeNone:function(B,A,D,C){return D*B/C+A;},easeIn:function(B,A,D,C){return D*(B/=C)*B+A;},easeOut:function(B,A,D,C){return -D*(B/=C)*(B-2)+A;},easeBoth:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B+A;}return -D/2*((--B)*(B-2)-1)+A;},easeInStrong:function(B,A,D,C){return D*(B/=C)*B*B*B+A;},easeOutStrong:function(B,A,D,C){return -D*((B=B/C-1)*B*B*B-1)+A;},easeBothStrong:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B*B*B+A;}return -D/2*((B-=2)*B*B*B-2)+A;},elasticIn:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F)==1){return A+G;}if(!E){E=F*0.3;}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}return -(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A;},elasticOut:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F)==1){return A+G;}if(!E){E=F*0.3;}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}return B*Math.pow(2,-10*C)*Math.sin((C*F-D)*(2*Math.PI)/E)+G+A;},elasticBoth:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F/2)==2){return A+G;}if(!E){E=F*(0.3*1.5);}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}if(C<1){return -0.5*(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A;}return B*Math.pow(2,-10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E)*0.5+G+A;},backIn:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}return E*(B/=D)*B*((C+1)*B-C)+A;},backOut:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}return E*((B=B/D-1)*B*((C+1)*B+C)+1)+A;},backBoth:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}if((B/=D/2)<1){return E/2*(B*B*(((C*=(1.525))+1)*B-C))+A;}return E/2*((B-=2)*B*(((C*=(1.525))+1)*B+C)+2)+A;},bounceIn:function(B,A,D,C){return D-YAHOO.util.Easing.bounceOut(C-B,0,D,C)+A;},bounceOut:function(B,A,D,C){if((B/=C)<(1/2.75)){return D*(7.5625*B*B)+A;}else{if(B<(2/2.75)){return D*(7.5625*(B-=(1.5/2.75))*B+0.75)+A;}else{if(B<(2.5/2.75)){return D*(7.5625*(B-=(2.25/2.75))*B+0.9375)+A;}}}return D*(7.5625*(B-=(2.625/2.75))*B+0.984375)+A;},bounceBoth:function(B,A,D,C){if(B<C/2){return YAHOO.util.Easing.bounceIn(B*2,0,D,C)*0.5+A;}return YAHOO.util.Easing.bounceOut(B*2-C,0,D,C)*0.5+D*0.5+A;}};(function(){var A=function(H,G,I,J){if(H){A.superclass.constructor.call(this,H,G,I,J);}};A.NAME="Motion";var E=YAHOO.util;YAHOO.extend(A,E.ColorAnim);var F=A.superclass;var C=A.prototype;C.patterns.points=/^points$/i;C.setAttribute=function(G,I,H){if(this.patterns.points.test(G)){H=H||"px";F.setAttribute.call(this,"left",I[0],H);F.setAttribute.call(this,"top",I[1],H);}else{F.setAttribute.call(this,G,I,H);}};C.getAttribute=function(G){if(this.patterns.points.test(G)){var H=[F.getAttribute.call(this,"left"),F.getAttribute.call(this,"top")];}else{H=F.getAttribute.call(this,G);}return H;};C.doMethod=function(G,K,H){var J=null;if(this.patterns.points.test(G)){var I=this.method(this.currentFrame,0,100,this.totalFrames)/100;J=E.Bezier.getPosition(this.runtimeAttributes[G],I);}else{J=F.doMethod.call(this,G,K,H);}return J;};C.setRuntimeAttribute=function(P){if(this.patterns.points.test(P)){var H=this.getEl();var J=this.attributes;var G;var L=J["points"]["control"]||[];var I;var M,O;if(L.length>0&&!(L[0] instanceof Array)){L=[L];}else{var K=[];for(M=0,O=L.length;M<O;++M){K[M]=L[M];}L=K;}if(E.Dom.getStyle(H,"position")=="static"){E.Dom.setStyle(H,"position","relative");}if(D(J["points"]["from"])){E.Dom.setXY(H,J["points"]["from"]);
310   -}else{E.Dom.setXY(H,E.Dom.getXY(H));}G=this.getAttribute("points");if(D(J["points"]["to"])){I=B.call(this,J["points"]["to"],G);var N=E.Dom.getXY(this.getEl());for(M=0,O=L.length;M<O;++M){L[M]=B.call(this,L[M],G);}}else{if(D(J["points"]["by"])){I=[G[0]+J["points"]["by"][0],G[1]+J["points"]["by"][1]];for(M=0,O=L.length;M<O;++M){L[M]=[G[0]+L[M][0],G[1]+L[M][1]];}}}this.runtimeAttributes[P]=[G];if(L.length>0){this.runtimeAttributes[P]=this.runtimeAttributes[P].concat(L);}this.runtimeAttributes[P][this.runtimeAttributes[P].length]=I;}else{F.setRuntimeAttribute.call(this,P);}};var B=function(G,I){var H=E.Dom.getXY(this.getEl());G=[G[0]-H[0]+I[0],G[1]-H[1]+I[1]];return G;};var D=function(G){return(typeof G!=="undefined");};E.Motion=A;})();(function(){var D=function(F,E,G,H){if(F){D.superclass.constructor.call(this,F,E,G,H);}};D.NAME="Scroll";var B=YAHOO.util;YAHOO.extend(D,B.ColorAnim);var C=D.superclass;var A=D.prototype;A.doMethod=function(E,H,F){var G=null;if(E=="scroll"){G=[this.method(this.currentFrame,H[0],F[0]-H[0],this.totalFrames),this.method(this.currentFrame,H[1],F[1]-H[1],this.totalFrames)];}else{G=C.doMethod.call(this,E,H,F);}return G;};A.getAttribute=function(E){var G=null;var F=this.getEl();if(E=="scroll"){G=[F.scrollLeft,F.scrollTop];}else{G=C.getAttribute.call(this,E);}return G;};A.setAttribute=function(E,H,G){var F=this.getEl();if(E=="scroll"){F.scrollLeft=H[0];F.scrollTop=H[1];}else{C.setAttribute.call(this,E,H,G);}};B.Scroll=D;})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.7.0",build:"1799"});
311   -(function(){YAHOO.util.Config=function(owner){if(owner){this.init(owner)}};var Lang=YAHOO.lang,CustomEvent=YAHOO.util.CustomEvent,Config=YAHOO.util.Config;Config.CONFIG_CHANGED_EVENT="configChanged";Config.BOOLEAN_TYPE="boolean";Config.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(owner){this.owner=owner;this.configChangedEvent=this.createEvent(Config.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=CustomEvent.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[]},checkBoolean:function(val){return(typeof val==Config.BOOLEAN_TYPE)},checkNumber:function(val){return(!isNaN(val))},fireEvent:function(key,value){var property=this.config[key];if(property&&property.event){property.event.fire(value)}},addProperty:function(key,propertyObject){key=key.toLowerCase();this.config[key]=propertyObject;propertyObject.event=this.createEvent(key,{scope:this.owner});propertyObject.event.signature=CustomEvent.LIST;propertyObject.key=key;if(propertyObject.handler){propertyObject.event.subscribe(propertyObject.handler,this.owner)}this.setProperty(key,propertyObject.value,true);if(!propertyObject.suppressEvent){this.queueProperty(key,propertyObject.value)}},getConfig:function(){var cfg={},currCfg=this.config,prop,property;for(prop in currCfg){if(Lang.hasOwnProperty(currCfg,prop)){property=currCfg[prop];if(property&&property.event){cfg[prop]=property.value}}}return cfg},getProperty:function(key){var property=this.config[key.toLowerCase()];if(property&&property.event){return property.value}else{return undefined}},resetProperty:function(key){key=key.toLowerCase();var property=this.config[key];if(property&&property.event){if(this.initialConfig[key]&&!Lang.isUndefined(this.initialConfig[key])){this.setProperty(key,this.initialConfig[key]);return true}}else{return false}},setProperty:function(key,value,silent){var property;key=key.toLowerCase();if(this.queueInProgress&&!silent){this.queueProperty(key,value);return true}else{property=this.config[key];if(property&&property.event){if(property.validator&&!property.validator(value)){return false}else{property.value=value;if(!silent){this.fireEvent(key,value);this.configChangedEvent.fire([key,value])}return true}}else{return false}}},queueProperty:function(key,value){key=key.toLowerCase();var property=this.config[key],foundDuplicate=false,iLen,queueItem,queueItemKey,queueItemValue,sLen,supercedesCheck,qLen,queueItemCheck,queueItemCheckKey,queueItemCheckValue,i,s,q;if(property&&property.event){if(!Lang.isUndefined(value)&&property.validator&&!property.validator(value)){return false}else{if(!Lang.isUndefined(value)){property.value=value}else{value=property.value}foundDuplicate=false;iLen=this.eventQueue.length;for(i=0;i<iLen;i++){queueItem=this.eventQueue[i];if(queueItem){queueItemKey=queueItem[0];queueItemValue=queueItem[1];if(queueItemKey==key){this.eventQueue[i]=null;this.eventQueue.push([key,(!Lang.isUndefined(value)?value:queueItemValue)]);foundDuplicate=true;break}}}if(!foundDuplicate&&!Lang.isUndefined(value)){this.eventQueue.push([key,value])}}if(property.supercedes){sLen=property.supercedes.length;for(s=0;s<sLen;s++){supercedesCheck=property.supercedes[s];qLen=this.eventQueue.length;for(q=0;q<qLen;q++){queueItemCheck=this.eventQueue[q];if(queueItemCheck){queueItemCheckKey=queueItemCheck[0];queueItemCheckValue=queueItemCheck[1];if(queueItemCheckKey==supercedesCheck.toLowerCase()){this.eventQueue.push([queueItemCheckKey,queueItemCheckValue]);this.eventQueue[q]=null;break}}}}}return true}else{return false}},refireEvent:function(key){key=key.toLowerCase();var property=this.config[key];if(property&&property.event&&!Lang.isUndefined(property.value)){if(this.queueInProgress){this.queueProperty(key)}else{this.fireEvent(key,property.value)}}},applyConfig:function(userConfig,init){var sKey,oConfig;if(init){oConfig={};for(sKey in userConfig){if(Lang.hasOwnProperty(userConfig,sKey)){oConfig[sKey.toLowerCase()]=userConfig[sKey]}}this.initialConfig=oConfig}for(sKey in userConfig){if(Lang.hasOwnProperty(userConfig,sKey)){this.queueProperty(sKey,userConfig[sKey])}}},refresh:function(){var prop;for(prop in this.config){if(Lang.hasOwnProperty(this.config,prop)){this.refireEvent(prop)}}},fireQueue:function(){var i,queueItem,key,value,property;this.queueInProgress=true;for(i=0;i<this.eventQueue.length;i++){queueItem=this.eventQueue[i];if(queueItem){key=queueItem[0];value=queueItem[1];property=this.config[key];property.value=value;this.eventQueue[i]=null;this.fireEvent(key,value)}}this.queueInProgress=false;this.eventQueue=[]},subscribeToConfigEvent:function(key,handler,obj,override){var property=this.config[key.toLowerCase()];if(property&&property.event){if(!Config.alreadySubscribed(property.event,handler,obj)){property.event.subscribe(handler,obj,override)}return true}else{return false}},unsubscribeFromConfigEvent:function(key,handler,obj){var property=this.config[key.toLowerCase()];if(property&&property.event){return property.event.unsubscribe(handler,obj)}else{return false}},toString:function(){var output="Config";if(this.owner){output+=" ["+this.owner.toString()+"]"}return output},outputEventQueue:function(){var output="",queueItem,q,nQueue=this.eventQueue.length;for(q=0;q<nQueue;q++){queueItem=this.eventQueue[q];if(queueItem){output+=queueItem[0]+"="+queueItem[1]+", "}}return output},destroy:function(){var oConfig=this.config,sProperty,oProperty;for(sProperty in oConfig){if(Lang.hasOwnProperty(oConfig,sProperty)){oProperty=oConfig[sProperty];oProperty.event.unsubscribeAll();oProperty.event=null}}this.configChangedEvent.unsubscribeAll();this.configChangedEvent=null;this.owner=null;this.config=null;this.initialConfig=null;this.eventQueue=null}};Config.alreadySubscribed=function(evt,fn,obj){var nSubscribers=evt.subscribers.length,subsc,i;if(nSubscribers>0){i=nSubscribers-1;do{subsc=evt.subscribers[i];if(subsc&&subsc.obj==obj&&subsc.fn==fn){return true}}while(i--)}return false};YAHOO.lang.augmentProto(Config,YAHOO.util.EventProvider)}());(function(){YAHOO.widget.Module=function(el,userConfig){if(el){this.init(el,userConfig)}else{}};var Dom=YAHOO.util.Dom,Config=YAHOO.util.Config,Event=YAHOO.util.Event,CustomEvent=YAHOO.util.CustomEvent,Module=YAHOO.widget.Module,UA=YAHOO.env.ua,m_oModuleTemplate,m_oHeaderTemplate,m_oBodyTemplate,m_oFooterTemplate,EVENT_TYPES={"BEFORE_INIT":"beforeInit","INIT":"init","APPEND":"append","BEFORE_RENDER":"beforeRender","RENDER":"render","CHANGE_HEADER":"changeHeader","CHANGE_BODY":"changeBody","CHANGE_FOOTER":"changeFooter","CHANGE_CONTENT":"changeContent","DESTORY":"destroy","BEFORE_SHOW":"beforeShow","SHOW":"show","BEFORE_HIDE":"beforeHide","HIDE":"hide"},DEFAULT_CONFIG={"VISIBLE":{key:"visible",value:true,validator:YAHOO.lang.isBoolean},"EFFECT":{key:"effect",suppressEvent:true,supercedes:["visible"]},"MONITOR_RESIZE":{key:"monitorresize",value:true},"APPEND_TO_DOCUMENT_BODY":{key:"appendtodocumentbody",value:false}};Module.IMG_ROOT=null;Module.IMG_ROOT_SSL=null;Module.CSS_MODULE="yui-module";Module.CSS_HEADER="hd";Module.CSS_BODY="bd";Module.CSS_FOOTER="ft";Module.RESIZE_MONITOR_SECURE_URL="javascript:false;";Module.RESIZE_MONITOR_BUFFER=1;Module.textResizeEvent=new CustomEvent("textResize");Module.forceDocumentRedraw=function(){var docEl=document.documentElement;if(docEl){docEl.className+=" ";docEl.className=YAHOO.lang.trim(docEl.className)}};function createModuleTemplate(){if(!m_oModuleTemplate){m_oModuleTemplate=document.createElement("div");m_oModuleTemplate.innerHTML=("<div class=\""+Module.CSS_HEADER+"\"></div>"+"<div class=\""+Module.CSS_BODY+"\"></div><div class=\""+Module.CSS_FOOTER+"\"></div>");m_oHeaderTemplate=m_oModuleTemplate.firstChild;m_oBodyTemplate=m_oHeaderTemplate.nextSibling;m_oFooterTemplate=m_oBodyTemplate.nextSibling}return m_oModuleTemplate}function createHeader(){if(!m_oHeaderTemplate){createModuleTemplate()}return(m_oHeaderTemplate.cloneNode(false))}function createBody(){if(!m_oBodyTemplate){createModuleTemplate()}return(m_oBodyTemplate.cloneNode(false))}function createFooter(){if(!m_oFooterTemplate){createModuleTemplate()}return(m_oFooterTemplate.cloneNode(false))}Module.prototype={constructor:Module,element:null,header:null,body:null,footer:null,id:null,imageRoot:Module.IMG_ROOT,initEvents:function(){var SIGNATURE=CustomEvent.LIST;this.beforeInitEvent=this.createEvent(EVENT_TYPES.BEFORE_INIT);this.beforeInitEvent.signature=SIGNATURE;this.initEvent=this.createEvent(EVENT_TYPES.INIT);this.initEvent.signature=SIGNATURE;this.appendEvent=this.createEvent(EVENT_TYPES.APPEND);this.appendEvent.signature=SIGNATURE;this.beforeRenderEvent=this.createEvent(EVENT_TYPES.BEFORE_RENDER);this.beforeRenderEvent.signature=SIGNATURE;this.renderEvent=this.createEvent(EVENT_TYPES.RENDER);this.renderEvent.signature=SIGNATURE;this.changeHeaderEvent=this.createEvent(EVENT_TYPES.CHANGE_HEADER);this.changeHeaderEvent.signature=SIGNATURE;this.changeBodyEvent=this.createEvent(EVENT_TYPES.CHANGE_BODY);this.changeBodyEvent.signature=SIGNATURE;this.changeFooterEvent=this.createEvent(EVENT_TYPES.CHANGE_FOOTER);this.changeFooterEvent.signature=SIGNATURE;this.changeContentEvent=this.createEvent(EVENT_TYPES.CHANGE_CONTENT);this.changeContentEvent.signature=SIGNATURE;this.destroyEvent=this.createEvent(EVENT_TYPES.DESTORY);this.destroyEvent.signature=SIGNATURE;this.beforeShowEvent=this.createEvent(EVENT_TYPES.BEFORE_SHOW);this.beforeShowEvent.signature=SIGNATURE;this.showEvent=this.createEvent(EVENT_TYPES.SHOW);this.showEvent.signature=SIGNATURE;this.beforeHideEvent=this.createEvent(EVENT_TYPES.BEFORE_HIDE);this.beforeHideEvent.signature=SIGNATURE;this.hideEvent=this.createEvent(EVENT_TYPES.HIDE);this.hideEvent.signature=SIGNATURE},platform:function(){var ua=navigator.userAgent.toLowerCase();if(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1){return"windows"}else if(ua.indexOf("macintosh")!=-1){return"mac"}else{return false}}(),browser:function(){var ua=navigator.userAgent.toLowerCase();if(ua.indexOf('opera')!=-1){return'opera'}else if(ua.indexOf('msie 7')!=-1){return'ie7'}else if(ua.indexOf('msie')!=-1){return'ie'}else if(ua.indexOf('safari')!=-1){return'safari'}else if(ua.indexOf('gecko')!=-1){return'gecko'}else{return false}}(),isSecure:function(){if(window.location.href.toLowerCase().indexOf("https")===0){return true}else{return false}}(),initDefaultConfig:function(){this.cfg.addProperty(DEFAULT_CONFIG.VISIBLE.key,{handler:this.configVisible,value:DEFAULT_CONFIG.VISIBLE.value,validator:DEFAULT_CONFIG.VISIBLE.validator});this.cfg.addProperty(DEFAULT_CONFIG.EFFECT.key,{suppressEvent:DEFAULT_CONFIG.EFFECT.suppressEvent,supercedes:DEFAULT_CONFIG.EFFECT.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.MONITOR_RESIZE.key,{handler:this.configMonitorResize,value:DEFAULT_CONFIG.MONITOR_RESIZE.value});this.cfg.addProperty(DEFAULT_CONFIG.APPEND_TO_DOCUMENT_BODY.key,{value:DEFAULT_CONFIG.APPEND_TO_DOCUMENT_BODY.value})},init:function(el,userConfig){var elId,child;this.initEvents();this.beforeInitEvent.fire(Module);this.cfg=new Config(this);if(this.isSecure){this.imageRoot=Module.IMG_ROOT_SSL}if(typeof el=="string"){elId=el;el=document.getElementById(el);if(!el){el=(createModuleTemplate()).cloneNode(false);el.id=elId}}this.id=Dom.generateId(el);this.element=el;child=this.element.firstChild;if(child){var fndHd=false,fndBd=false,fndFt=false;do{if(1==child.nodeType){if(!fndHd&&Dom.hasClass(child,Module.CSS_HEADER)){this.header=child;fndHd=true}else if(!fndBd&&Dom.hasClass(child,Module.CSS_BODY)){this.body=child;fndBd=true}else if(!fndFt&&Dom.hasClass(child,Module.CSS_FOOTER)){this.footer=child;fndFt=true}}}while((child=child.nextSibling))}this.initDefaultConfig();Dom.addClass(this.element,Module.CSS_MODULE);if(userConfig){this.cfg.applyConfig(userConfig,true)}if(!Config.alreadySubscribed(this.renderEvent,this.cfg.fireQueue,this.cfg)){this.renderEvent.subscribe(this.cfg.fireQueue,this.cfg,true)}this.initEvent.fire(Module)},initResizeMonitor:function(){var isGeckoWin=(UA.gecko&&this.platform=="windows");if(isGeckoWin){var self=this;setTimeout(function(){self._initResizeMonitor()},0)}else{this._initResizeMonitor()}},_initResizeMonitor:function(){return;var oDoc,oIFrame,sHTML;function fireTextResize(){Module.textResizeEvent.fire()}if(!UA.opera){oIFrame=Dom.get("_yuiResizeMonitor");var supportsCWResize=this._supportsCWResize();if(!oIFrame){oIFrame=document.createElement("iframe");if(this.isSecure&&Module.RESIZE_MONITOR_SECURE_URL&&UA.ie){oIFrame.src=Module.RESIZE_MONITOR_SECURE_URL}if(!supportsCWResize){sHTML=["<html><head><script ","type=\"text/javascript\">","window.onresize=function(){window.parent.","YAHOO.widget.Module.textResizeEvent.","fire();};<","\/script></head>","<body></body></html>"].join('');oIFrame.src="data:text/html;charset=utf-8,"+encodeURIComponent(sHTML)}oIFrame.id="_yuiResizeMonitor";oIFrame.title="Text Resize Monitor";oIFrame.style.position="absolute";oIFrame.style.visibility="hidden";var db=document.body,fc=db.firstChild;if(fc){db.insertBefore(oIFrame,fc)}else{db.appendChild(oIFrame)}oIFrame.style.width="2em";oIFrame.style.height="2em";oIFrame.style.top=(-1*(oIFrame.offsetHeight+Module.RESIZE_MONITOR_BUFFER))+"px";oIFrame.style.left="0";oIFrame.style.borderWidth="0";oIFrame.style.visibility="visible";if(UA.webkit){oDoc=oIFrame.contentWindow.document;oDoc.open();oDoc.close()}}if(oIFrame&&oIFrame.contentWindow){Module.textResizeEvent.subscribe(this.onDomResize,this,true);if(!Module.textResizeInitialized){if(supportsCWResize){if(!Event.on(oIFrame.contentWindow,"resize",fireTextResize)){Event.on(oIFrame,"resize",fireTextResize)}}Module.textResizeInitialized=true}this.resizeMonitor=oIFrame}}},_supportsCWResize:function(){var bSupported=true;if(UA.gecko&&UA.gecko<=1.8){bSupported=false}return bSupported},onDomResize:function(e,obj){var nTop=-1*(this.resizeMonitor.offsetHeight+Module.RESIZE_MONITOR_BUFFER);this.resizeMonitor.style.top=nTop+"px";this.resizeMonitor.style.left="0"},setHeader:function(headerContent){var oHeader=this.header||(this.header=createHeader());if(headerContent.nodeName){oHeader.innerHTML="";oHeader.appendChild(headerContent)}else{oHeader.innerHTML=headerContent}this.changeHeaderEvent.fire(headerContent);this.changeContentEvent.fire()},appendToHeader:function(element){var oHeader=this.header||(this.header=createHeader());oHeader.appendChild(element);this.changeHeaderEvent.fire(element);this.changeContentEvent.fire()},setBody:function(bodyContent){var oBody=this.body||(this.body=createBody());if(bodyContent.nodeName){oBody.innerHTML="";oBody.appendChild(bodyContent)}else{oBody.innerHTML=bodyContent}this.changeBodyEvent.fire(bodyContent);this.changeContentEvent.fire()},appendToBody:function(element){var oBody=this.body||(this.body=createBody());oBody.appendChild(element);this.changeBodyEvent.fire(element);this.changeContentEvent.fire()},setFooter:function(footerContent){var oFooter=this.footer||(this.footer=createFooter());if(footerContent.nodeName){oFooter.innerHTML="";oFooter.appendChild(footerContent)}else{oFooter.innerHTML=footerContent}this.changeFooterEvent.fire(footerContent);this.changeContentEvent.fire()},appendToFooter:function(element){var oFooter=this.footer||(this.footer=createFooter());oFooter.appendChild(element);this.changeFooterEvent.fire(element);this.changeContentEvent.fire()},render:function(appendToNode,moduleElement){var me=this,firstChild;function appendTo(parentNode){if(typeof parentNode=="string"){parentNode=document.getElementById(parentNode)}if(parentNode){me._addToParent(parentNode,me.element);me.appendEvent.fire()}}this.beforeRenderEvent.fire();if(!moduleElement){moduleElement=this.element}if(appendToNode){appendTo(appendToNode)}else{if(!Dom.inDocument(this.element)){return false}}if(this.header&&!Dom.inDocument(this.header)){firstChild=moduleElement.firstChild;if(firstChild){moduleElement.insertBefore(this.header,firstChild)}else{moduleElement.appendChild(this.header)}}if(this.body&&!Dom.inDocument(this.body)){if(this.footer&&Dom.isAncestor(this.moduleElement,this.footer)){moduleElement.insertBefore(this.body,this.footer)}else{moduleElement.appendChild(this.body)}}if(this.footer&&!Dom.inDocument(this.footer)){moduleElement.appendChild(this.footer)}this.renderEvent.fire();return true},destroy:function(){var parent;if(this.element){Event.purgeElement(this.element,true);parent=this.element.parentNode}if(parent){parent.removeChild(this.element)}this.element=null;this.header=null;this.body=null;this.footer=null;Module.textResizeEvent.unsubscribe(this.onDomResize,this);if(this.cfg){this.cfg.destroy();this.cfg=null}this.destroyEvent.fire()},show:function(){this.cfg.setProperty("visible",true)},hide:function(){if(this.cfg)this.cfg.setProperty("visible",false)},configVisible:function(type,args,obj){var visible=args[0];if(visible){this.beforeShowEvent.fire();Dom.setStyle(this.element,"display","block");this.showEvent.fire()}else{this.beforeHideEvent.fire();Dom.setStyle(this.element,"display","none");this.hideEvent.fire()}},configMonitorResize:function(type,args,obj){var monitor=args[0];if(monitor){this.initResizeMonitor()}else{Module.textResizeEvent.unsubscribe(this.onDomResize,this,true);this.resizeMonitor=null}},_addToParent:function(parentNode,element){if(!this.cfg.getProperty("appendtodocumentbody")&&parentNode===document.body&&parentNode.firstChild){parentNode.insertBefore(element,parentNode.firstChild)}else{parentNode.appendChild(element)}},toString:function(){return"Module "+this.id}};YAHOO.lang.augmentProto(Module,YAHOO.util.EventProvider)}());(function(){YAHOO.widget.Overlay=function(el,userConfig){YAHOO.widget.Overlay.superclass.constructor.call(this,el,userConfig)};var Lang=YAHOO.lang,CustomEvent=YAHOO.util.CustomEvent,Module=YAHOO.widget.Module,Event=YAHOO.util.Event,Dom=YAHOO.util.Dom,Config=YAHOO.util.Config,UA=YAHOO.env.ua,Overlay=YAHOO.widget.Overlay,_SUBSCRIBE="subscribe",_UNSUBSCRIBE="unsubscribe",_CONTAINED="contained",m_oIFrameTemplate,EVENT_TYPES={"BEFORE_MOVE":"beforeMove","MOVE":"move"},DEFAULT_CONFIG={"X":{key:"x",validator:Lang.isNumber,suppressEvent:true,supercedes:["iframe"]},"Y":{key:"y",validator:Lang.isNumber,suppressEvent:true,supercedes:["iframe"]},"XY":{key:"xy",suppressEvent:true,supercedes:["iframe"]},"CONTEXT":{key:"context",suppressEvent:true,supercedes:["iframe"]},"FIXED_CENTER":{key:"fixedcenter",value:false,supercedes:["iframe","visible"]},"WIDTH":{key:"width",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"HEIGHT":{key:"height",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"AUTO_FILL_HEIGHT":{key:"autofillheight",supercedes:["height"],value:"body"},"ZINDEX":{key:"zindex",value:null},"CONSTRAIN_TO_VIEWPORT":{key:"constraintoviewport",value:false,validator:Lang.isBoolean,supercedes:["iframe","x","y","xy"]},"IFRAME":{key:"iframe",value:(UA.ie==6?true:false),validator:Lang.isBoolean,supercedes:["zindex"]},"PREVENT_CONTEXT_OVERLAP":{key:"preventcontextoverlap",value:false,validator:Lang.isBoolean,supercedes:["constraintoviewport"]}};Overlay.IFRAME_SRC="javascript:false;";Overlay.IFRAME_OFFSET=3;Overlay.VIEWPORT_OFFSET=10;Overlay.TOP_LEFT="tl";Overlay.TOP_RIGHT="tr";Overlay.BOTTOM_LEFT="bl";Overlay.BOTTOM_RIGHT="br";Overlay.CSS_OVERLAY="yui-overlay";Overlay.STD_MOD_RE=/^\s*?(body|footer|header)\s*?$/i;Overlay.windowScrollEvent=new CustomEvent("windowScroll");Overlay.windowResizeEvent=new CustomEvent("windowResize");Overlay.windowScrollHandler=function(e){var t=Event.getTarget(e);if(!t||t===window||t===window.document){if(UA.ie){if(!window.scrollEnd){window.scrollEnd=-1}clearTimeout(window.scrollEnd);window.scrollEnd=setTimeout(function(){Overlay.windowScrollEvent.fire()},1)}else{Overlay.windowScrollEvent.fire()}}};Overlay.windowResizeHandler=function(e){if(UA.ie){if(!window.resizeEnd){window.resizeEnd=-1}clearTimeout(window.resizeEnd);window.resizeEnd=setTimeout(function(){Overlay.windowResizeEvent.fire()},100)}else{Overlay.windowResizeEvent.fire()}};Overlay._initialized=null;if(Overlay._initialized===null){Event.on(window,"scroll",Overlay.windowScrollHandler);Event.on(window,"resize",Overlay.windowResizeHandler);Overlay._initialized=true}Overlay._TRIGGER_MAP={"windowScroll":Overlay.windowScrollEvent,"windowResize":Overlay.windowResizeEvent,"textResize":Module.textResizeEvent};YAHOO.extend(Overlay,Module,{CONTEXT_TRIGGERS:[],init:function(el,userConfig){Overlay.superclass.init.call(this,el);this.beforeInitEvent.fire(Overlay);Dom.addClass(this.element,Overlay.CSS_OVERLAY);if(userConfig){this.cfg.applyConfig(userConfig,true)}if(this.platform=="mac"&&UA.gecko){if(!Config.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this)){this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true)}if(!Config.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this)){this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true)}}this.initEvent.fire(Overlay)},initEvents:function(){Overlay.superclass.initEvents.call(this);var SIGNATURE=CustomEvent.LIST;this.beforeMoveEvent=this.createEvent(EVENT_TYPES.BEFORE_MOVE);this.beforeMoveEvent.signature=SIGNATURE;this.moveEvent=this.createEvent(EVENT_TYPES.MOVE);this.moveEvent.signature=SIGNATURE},initDefaultConfig:function(){Overlay.superclass.initDefaultConfig.call(this);var cfg=this.cfg;cfg.addProperty(DEFAULT_CONFIG.X.key,{handler:this.configX,validator:DEFAULT_CONFIG.X.validator,suppressEvent:DEFAULT_CONFIG.X.suppressEvent,supercedes:DEFAULT_CONFIG.X.supercedes});cfg.addProperty(DEFAULT_CONFIG.Y.key,{handler:this.configY,validator:DEFAULT_CONFIG.Y.validator,suppressEvent:DEFAULT_CONFIG.Y.suppressEvent,supercedes:DEFAULT_CONFIG.Y.supercedes});cfg.addProperty(DEFAULT_CONFIG.XY.key,{handler:this.configXY,suppressEvent:DEFAULT_CONFIG.XY.suppressEvent,supercedes:DEFAULT_CONFIG.XY.supercedes});cfg.addProperty(DEFAULT_CONFIG.CONTEXT.key,{handler:this.configContext,suppressEvent:DEFAULT_CONFIG.CONTEXT.suppressEvent,supercedes:DEFAULT_CONFIG.CONTEXT.supercedes});cfg.addProperty(DEFAULT_CONFIG.FIXED_CENTER.key,{handler:this.configFixedCenter,value:DEFAULT_CONFIG.FIXED_CENTER.value,validator:DEFAULT_CONFIG.FIXED_CENTER.validator,supercedes:DEFAULT_CONFIG.FIXED_CENTER.supercedes});cfg.addProperty(DEFAULT_CONFIG.WIDTH.key,{handler:this.configWidth,suppressEvent:DEFAULT_CONFIG.WIDTH.suppressEvent,supercedes:DEFAULT_CONFIG.WIDTH.supercedes});cfg.addProperty(DEFAULT_CONFIG.HEIGHT.key,{handler:this.configHeight,suppressEvent:DEFAULT_CONFIG.HEIGHT.suppressEvent,supercedes:DEFAULT_CONFIG.HEIGHT.supercedes});cfg.addProperty(DEFAULT_CONFIG.AUTO_FILL_HEIGHT.key,{handler:this.configAutoFillHeight,value:DEFAULT_CONFIG.AUTO_FILL_HEIGHT.value,validator:this._validateAutoFill,supercedes:DEFAULT_CONFIG.AUTO_FILL_HEIGHT.supercedes});cfg.addProperty(DEFAULT_CONFIG.ZINDEX.key,{handler:this.configzIndex,value:DEFAULT_CONFIG.ZINDEX.value});cfg.addProperty(DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.key,{handler:this.configConstrainToViewport,value:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.value,validator:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.validator,supercedes:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.supercedes});cfg.addProperty(DEFAULT_CONFIG.IFRAME.key,{handler:this.configIframe,value:DEFAULT_CONFIG.IFRAME.value,validator:DEFAULT_CONFIG.IFRAME.validator,supercedes:DEFAULT_CONFIG.IFRAME.supercedes});cfg.addProperty(DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.key,{value:DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.value,validator:DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.validator,supercedes:DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.supercedes})},moveTo:function(x,y){this.cfg.setProperty("xy",[x,y])},hideMacGeckoScrollbars:function(){Dom.replaceClass(this.element,"show-scrollbars","hide-scrollbars")},showMacGeckoScrollbars:function(){Dom.replaceClass(this.element,"hide-scrollbars","show-scrollbars")},_setDomVisibility:function(show){Dom.setStyle(this.element,"visibility",(show)?"visible":"hidden");if(show){Dom.removeClass(this.element,"yui-overlay-hidden")}else{Dom.addClass(this.element,"yui-overlay-hidden")}},configVisible:function(type,args,obj){var visible=args[0],currentVis=Dom.getStyle(this.element,"visibility"),effect=this.cfg.getProperty("effect"),effectInstances=[],isMacGecko=(this.platform=="mac"&&UA.gecko),alreadySubscribed=Config.alreadySubscribed,eff,ei,e,i,j,k,h,nEffects,nEffectInstances;if(currentVis=="inherit"){e=this.element.parentNode;while(e.nodeType!=9&&e.nodeType!=11){currentVis=Dom.getStyle(e,"visibility");if(currentVis!="inherit"){break}e=e.parentNode}if(currentVis=="inherit"){currentVis="visible"}}if(effect){if(effect instanceof Array){nEffects=effect.length;for(i=0;i<nEffects;i++){eff=effect[i];effectInstances[effectInstances.length]=eff.effect(this,eff.duration)}}else{effectInstances[effectInstances.length]=effect.effect(this,effect.duration)}}if(visible){if(isMacGecko){this.showMacGeckoScrollbars()}if(effect){if(visible){if(currentVis!="visible"||currentVis===""){this.beforeShowEvent.fire();nEffectInstances=effectInstances.length;for(j=0;j<nEffectInstances;j++){ei=effectInstances[j];if(j===0&&!alreadySubscribed(ei.animateInCompleteEvent,this.showEvent.fire,this.showEvent)){ei.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,true)}ei.animateIn()}}}}else{if(currentVis!="visible"||currentVis===""){this.beforeShowEvent.fire();this._setDomVisibility(true);this.cfg.refireEvent("iframe");this.showEvent.fire()}else{this._setDomVisibility(true)}}}else{if(isMacGecko){this.hideMacGeckoScrollbars()}if(effect){if(currentVis=="visible"){this.beforeHideEvent.fire();nEffectInstances=effectInstances.length;for(k=0;k<nEffectInstances;k++){h=effectInstances[k];if(k===0&&!alreadySubscribed(h.animateOutCompleteEvent,this.hideEvent.fire,this.hideEvent)){h.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,true)}h.animateOut()}}else if(currentVis===""){this._setDomVisibility(false)}}else{if(currentVis=="visible"||currentVis===""){this.beforeHideEvent.fire();this._setDomVisibility(false);this.hideEvent.fire()}else{this._setDomVisibility(false)}}}},doCenterOnDOMEvent:function(){var cfg=this.cfg,fc=cfg.getProperty("fixedcenter");if(cfg.getProperty("visible")){if(fc&&(fc!==_CONTAINED||this.fitsInViewport())){this.center()}}},fitsInViewport:function(){var nViewportOffset=Overlay.VIEWPORT_OFFSET,element=this.element,elementWidth=element.offsetWidth,elementHeight=element.offsetHeight,viewportWidth=Dom.getViewportWidth(),viewportHeight=Dom.getViewportHeight();return((elementWidth+nViewportOffset<viewportWidth)&&(elementHeight+nViewportOffset<viewportHeight))},configFixedCenter:function(type,args,obj){var val=args[0],alreadySubscribed=Config.alreadySubscribed,windowResizeEvent=Overlay.windowResizeEvent,windowScrollEvent=Overlay.windowScrollEvent;if(val){this.center();if(!alreadySubscribed(this.beforeShowEvent,this.center)){this.beforeShowEvent.subscribe(this.center)}if(!alreadySubscribed(windowResizeEvent,this.doCenterOnDOMEvent,this)){windowResizeEvent.subscribe(this.doCenterOnDOMEvent,this,true)}if(!alreadySubscribed(windowScrollEvent,this.doCenterOnDOMEvent,this)){windowScrollEvent.subscribe(this.doCenterOnDOMEvent,this,true)}}else{this.beforeShowEvent.unsubscribe(this.center);windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this)}},configHeight:function(type,args,obj){var height=args[0],el=this.element;Dom.setStyle(el,"height",height);this.cfg.refireEvent("iframe")},configAutoFillHeight:function(type,args,obj){var fillEl=args[0],cfg=this.cfg,autoFillHeight="autofillheight",height="height",currEl=cfg.getProperty(autoFillHeight),autoFill=this._autoFillOnHeightChange;cfg.unsubscribeFromConfigEvent(height,autoFill);Module.textResizeEvent.unsubscribe(autoFill);this.changeContentEvent.unsubscribe(autoFill);if(currEl&&fillEl!==currEl&&this[currEl]){Dom.setStyle(this[currEl],height,"")}if(fillEl){fillEl=Lang.trim(fillEl.toLowerCase());cfg.subscribeToConfigEvent(height,autoFill,this[fillEl],this);Module.textResizeEvent.subscribe(autoFill,this[fillEl],this);this.changeContentEvent.subscribe(autoFill,this[fillEl],this);cfg.setProperty(autoFillHeight,fillEl,true)}},configWidth:function(type,args,obj){var width=args[0],el=this.element;Dom.setStyle(el,"width",width);this.cfg.refireEvent("iframe")},configzIndex:function(type,args,obj){var zIndex=args[0],el=this.element;if(!zIndex){zIndex=Dom.getStyle(el,"zIndex");if(!zIndex||isNaN(zIndex)){zIndex=0}}if(this.iframe||this.cfg.getProperty("iframe")===true){if(zIndex<=0){zIndex=1}}Dom.setStyle(el,"zIndex",zIndex);this.cfg.setProperty("zIndex",zIndex,true);if(this.iframe){this.stackIframe()}},configXY:function(type,args,obj){var pos=args[0],x=pos[0],y=pos[1];this.cfg.setProperty("x",x);this.cfg.setProperty("y",y);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y])},configX:function(type,args,obj){var x=args[0],y=this.cfg.getProperty("y");this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");Dom.setX(this.element,x,true);this.cfg.setProperty("xy",[x,y],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y])},configY:function(type,args,obj){var x=this.cfg.getProperty("x"),y=args[0];this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");Dom.setY(this.element,y,true);this.cfg.setProperty("xy",[x,y],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y])},showIframe:function(){var oIFrame=this.iframe,oParentNode;if(oIFrame){oParentNode=this.element.parentNode;if(oParentNode!=oIFrame.parentNode){this._addToParent(oParentNode,oIFrame)}oIFrame.style.display="block"}},hideIframe:function(){if(this.iframe){this.iframe.style.display="none"}},syncIframe:function(){var oIFrame=this.iframe,oElement=this.element,nOffset=Overlay.IFRAME_OFFSET,nDimensionOffset=(nOffset*2),aXY;if(oIFrame){oIFrame.style.width=(oElement.offsetWidth+nDimensionOffset+"px");oIFrame.style.height=(oElement.offsetHeight+nDimensionOffset+"px");aXY=this.cfg.getProperty("xy");if(!Lang.isArray(aXY)||(isNaN(aXY[0])||isNaN(aXY[1]))){this.syncPosition();aXY=this.cfg.getProperty("xy")}Dom.setXY(oIFrame,[(aXY[0]-nOffset),(aXY[1]-nOffset)])}},stackIframe:function(){if(this.iframe){var overlayZ=Dom.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(overlayZ)&&!isNaN(overlayZ)){Dom.setStyle(this.iframe,"zIndex",(overlayZ-1))}}},configIframe:function(type,args,obj){var bIFrame=args[0];function createIFrame(){var oIFrame=this.iframe,oElement=this.element,oParent;if(!oIFrame){if(!m_oIFrameTemplate){m_oIFrameTemplate=document.createElement("iframe");if(this.isSecure){m_oIFrameTemplate.src=Overlay.IFRAME_SRC}if(UA.ie){m_oIFrameTemplate.style.filter="alpha(opacity=0)";m_oIFrameTemplate.frameBorder=0}else{m_oIFrameTemplate.style.opacity="0"}m_oIFrameTemplate.style.position="absolute";m_oIFrameTemplate.style.border="none";m_oIFrameTemplate.style.margin="0";m_oIFrameTemplate.style.padding="0";m_oIFrameTemplate.style.display="none";m_oIFrameTemplate.tabIndex=-1}oIFrame=m_oIFrameTemplate.cloneNode(false);oParent=oElement.parentNode;var parentNode=oParent||document.body;this._addToParent(parentNode,oIFrame);this.iframe=oIFrame}this.showIframe();this.syncIframe();this.stackIframe();if(!this._hasIframeEventListeners){this.showEvent.subscribe(this.showIframe);this.hideEvent.subscribe(this.hideIframe);this.changeContentEvent.subscribe(this.syncIframe);this._hasIframeEventListeners=true}}function onBeforeShow(){createIFrame.call(this);this.beforeShowEvent.unsubscribe(onBeforeShow);this._iframeDeferred=false}if(bIFrame){if(this.cfg.getProperty("visible")){createIFrame.call(this)}else{if(!this._iframeDeferred){this.beforeShowEvent.subscribe(onBeforeShow);this._iframeDeferred=true}}}else{this.hideIframe();if(this._hasIframeEventListeners){this.showEvent.unsubscribe(this.showIframe);this.hideEvent.unsubscribe(this.hideIframe);this.changeContentEvent.unsubscribe(this.syncIframe);this._hasIframeEventListeners=false}}},_primeXYFromDOM:function(){if(YAHOO.lang.isUndefined(this.cfg.getProperty("xy"))){this.syncPosition();this.cfg.refireEvent("xy");this.beforeShowEvent.unsubscribe(this._primeXYFromDOM)}},configConstrainToViewport:function(type,args,obj){var val=args[0];if(val){if(!Config.alreadySubscribed(this.beforeMoveEvent,this.enforceConstraints,this)){this.beforeMoveEvent.subscribe(this.enforceConstraints,this,true)}if(!Config.alreadySubscribed(this.beforeShowEvent,this._primeXYFromDOM)){this.beforeShowEvent.subscribe(this._primeXYFromDOM)}}else{this.beforeShowEvent.unsubscribe(this._primeXYFromDOM);this.beforeMoveEvent.unsubscribe(this.enforceConstraints,this)}},configContext:function(type,args,obj){var contextArgs=args[0],contextEl,elementMagnetCorner,contextMagnetCorner,triggers,defTriggers=this.CONTEXT_TRIGGERS;if(contextArgs){contextEl=contextArgs[0];elementMagnetCorner=contextArgs[1];contextMagnetCorner=contextArgs[2];triggers=contextArgs[3];if(defTriggers&&defTriggers.length>0){triggers=(triggers||[]).concat(defTriggers)}if(contextEl){if(typeof contextEl=="string"){this.cfg.setProperty("context",[document.getElementById(contextEl),elementMagnetCorner,contextMagnetCorner,triggers],true)}if(elementMagnetCorner&&contextMagnetCorner){this.align(elementMagnetCorner,contextMagnetCorner)}if(this._contextTriggers){this._processTriggers(this._contextTriggers,_UNSUBSCRIBE,this._alignOnTrigger)}if(triggers){this._processTriggers(triggers,_SUBSCRIBE,this._alignOnTrigger);this._contextTriggers=triggers}}}},_alignOnTrigger:function(type,args){this.align()},_findTriggerCE:function(t){var tce=null;if(t instanceof CustomEvent){tce=t}else if(Overlay._TRIGGER_MAP[t]){tce=Overlay._TRIGGER_MAP[t]}return tce},_processTriggers:function(triggers,mode,fn){var t,tce;for(var i=0,l=triggers.length;i<l;++i){t=triggers[i];tce=this._findTriggerCE(t);if(tce){tce[mode](fn,this,true)}else{this[mode](t,fn)}}},align:function(elementAlign,contextAlign){var contextArgs=this.cfg.getProperty("context"),me=this,context,element,contextRegion;function doAlign(v,h){switch(elementAlign){case Overlay.TOP_LEFT:me.moveTo(h,v);break;case Overlay.TOP_RIGHT:me.moveTo((h-element.offsetWidth),v);break;case Overlay.BOTTOM_LEFT:me.moveTo(h,(v-element.offsetHeight));break;case Overlay.BOTTOM_RIGHT:me.moveTo((h-element.offsetWidth),(v-element.offsetHeight));break}}if(contextArgs){context=contextArgs[0];element=this.element;me=this;if(!elementAlign){elementAlign=contextArgs[1]}if(!contextAlign){contextAlign=contextArgs[2]}if(element&&context){contextRegion=Dom.getRegion(context);switch(contextAlign){case Overlay.TOP_LEFT:doAlign(contextRegion.top,contextRegion.left);break;case Overlay.TOP_RIGHT:doAlign(contextRegion.top,contextRegion.right);break;case Overlay.BOTTOM_LEFT:doAlign(contextRegion.bottom,contextRegion.left);break;case Overlay.BOTTOM_RIGHT:doAlign(contextRegion.bottom,contextRegion.right);break}}}},enforceConstraints:function(type,args,obj){var pos=args[0];var cXY=this.getConstrainedXY(pos[0],pos[1]);this.cfg.setProperty("x",cXY[0],true);this.cfg.setProperty("y",cXY[1],true);this.cfg.setProperty("xy",cXY,true)},getConstrainedX:function(x){var oOverlay=this,oOverlayEl=oOverlay.element,nOverlayOffsetWidth=oOverlayEl.offsetWidth,nViewportOffset=Overlay.VIEWPORT_OFFSET,viewPortWidth=Dom.getViewportWidth(),scrollX=Dom.getDocumentScrollLeft(),bCanConstrain=(nOverlayOffsetWidth+nViewportOffset<viewPortWidth),aContext=this.cfg.getProperty("context"),oContextEl,nContextElX,nContextElWidth,bFlipped=false,nLeftRegionWidth,nRightRegionWidth,leftConstraint=scrollX+nViewportOffset,rightConstraint=scrollX+viewPortWidth-nOverlayOffsetWidth-nViewportOffset,xNew=x,oOverlapPositions={"tltr":true,"blbr":true,"brbl":true,"trtl":true};var flipHorizontal=function(){var nNewX;if((oOverlay.cfg.getProperty("x")-scrollX)>nContextElX){nNewX=(nContextElX-nOverlayOffsetWidth)}else{nNewX=(nContextElX+nContextElWidth)}oOverlay.cfg.setProperty("x",(nNewX+scrollX),true);return nNewX};var getDisplayRegionWidth=function(){if((oOverlay.cfg.getProperty("x")-scrollX)>nContextElX){return(nRightRegionWidth-nViewportOffset)}else{return(nLeftRegionWidth-nViewportOffset)}};var setHorizontalPosition=function(){var nDisplayRegionWidth=getDisplayRegionWidth(),fnReturnVal;if(nOverlayOffsetWidth>nDisplayRegionWidth){if(bFlipped){flipHorizontal()}else{flipHorizontal();bFlipped=true;fnReturnVal=setHorizontalPosition()}}return fnReturnVal};if(x<leftConstraint||x>rightConstraint){if(bCanConstrain){if(this.cfg.getProperty("preventcontextoverlap")&&aContext&&oOverlapPositions[(aContext[1]+aContext[2])]){oContextEl=aContext[0];nContextElX=Dom.getX(oContextEl)-scrollX;nContextElWidth=oContextEl.offsetWidth;nLeftRegionWidth=nContextElX;nRightRegionWidth=(viewPortWidth-(nContextElX+nContextElWidth));setHorizontalPosition();xNew=this.cfg.getProperty("x")}else{if(x<leftConstraint){xNew=leftConstraint}else if(x>rightConstraint){xNew=rightConstraint}}}else{xNew=nViewportOffset+scrollX}}return xNew},getConstrainedY:function(y){var oOverlay=this,oOverlayEl=oOverlay.element,nOverlayOffsetHeight=oOverlayEl.offsetHeight,nViewportOffset=Overlay.VIEWPORT_OFFSET,viewPortHeight=Dom.getViewportHeight(),scrollY=Dom.getDocumentScrollTop(),bCanConstrain=(nOverlayOffsetHeight+nViewportOffset<viewPortHeight),aContext=this.cfg.getProperty("context"),oContextEl,nContextElY,nContextElHeight,bFlipped=false,nTopRegionHeight,nBottomRegionHeight,topConstraint=scrollY+nViewportOffset,bottomConstraint=scrollY+viewPortHeight-nOverlayOffsetHeight-nViewportOffset,yNew=y,oOverlapPositions={"trbr":true,"tlbl":true,"bltl":true,"brtr":true};var flipVertical=function(){var nNewY;if((oOverlay.cfg.getProperty("y")-scrollY)>nContextElY){nNewY=(nContextElY-nOverlayOffsetHeight)}else{nNewY=(nContextElY+nContextElHeight)}oOverlay.cfg.setProperty("y",(nNewY+scrollY),true);return nNewY};var getDisplayRegionHeight=function(){if((oOverlay.cfg.getProperty("y")-scrollY)>nContextElY){return(nBottomRegionHeight-nViewportOffset)}else{return(nTopRegionHeight-nViewportOffset)}};var setVerticalPosition=function(){var nDisplayRegionHeight=getDisplayRegionHeight(),fnReturnVal;if(nOverlayOffsetHeight>nDisplayRegionHeight){if(bFlipped){flipVertical()}else{flipVertical();bFlipped=true;fnReturnVal=setVerticalPosition()}}return fnReturnVal};if(y<topConstraint||y>bottomConstraint){if(bCanConstrain){if(this.cfg.getProperty("preventcontextoverlap")&&aContext&&oOverlapPositions[(aContext[1]+aContext[2])]){oContextEl=aContext[0];nContextElHeight=oContextEl.offsetHeight;nContextElY=(Dom.getY(oContextEl)-scrollY);nTopRegionHeight=nContextElY;nBottomRegionHeight=(viewPortHeight-(nContextElY+nContextElHeight));setVerticalPosition();yNew=oOverlay.cfg.getProperty("y")}else{if(y<topConstraint){yNew=topConstraint}else if(y>bottomConstraint){yNew=bottomConstraint}}}else{yNew=nViewportOffset+scrollY}}return yNew},getConstrainedXY:function(x,y){return[this.getConstrainedX(x),this.getConstrainedY(y)]},center:function(){var nViewportOffset=Overlay.VIEWPORT_OFFSET,elementWidth=this.element.offsetWidth,elementHeight=this.element.offsetHeight,viewPortWidth=Dom.getViewportWidth(),viewPortHeight=Dom.getViewportHeight(),x,y;if(elementWidth<viewPortWidth){x=(viewPortWidth/2)-(elementWidth/2)+Dom.getDocumentScrollLeft()}else{x=nViewportOffset+Dom.getDocumentScrollLeft()}if(elementHeight<viewPortHeight){y=(viewPortHeight/2)-(elementHeight/2)+Dom.getDocumentScrollTop()}else{y=nViewportOffset+Dom.getDocumentScrollTop()}this.cfg.setProperty("xy",[parseInt(x,10),parseInt(y,10)]);this.cfg.refireEvent("iframe");if(UA.webkit){this.forceContainerRedraw()}},syncPosition:function(){var pos=Dom.getXY(this.element);this.cfg.setProperty("x",pos[0],true);this.cfg.setProperty("y",pos[1],true);this.cfg.setProperty("xy",pos,true)},onDomResize:function(e,obj){var me=this;Overlay.superclass.onDomResize.call(this,e,obj);setTimeout(function(){me.syncPosition();me.cfg.refireEvent("iframe");me.cfg.refireEvent("context")},0)},_getComputedHeight:(function(){if(document.defaultView&&document.defaultView.getComputedStyle){return function(el){var height=null;if(el.ownerDocument&&el.ownerDocument.defaultView){var computed=el.ownerDocument.defaultView.getComputedStyle(el,'');if(computed){height=parseInt(computed.height,10)}}return(Lang.isNumber(height))?height:null}}else{return function(el){var height=null;if(el.style.pixelHeight){height=el.style.pixelHeight}return(Lang.isNumber(height))?height:null}}})(),_validateAutoFillHeight:function(val){return(!val)||(Lang.isString(val)&&Overlay.STD_MOD_RE.test(val))},_autoFillOnHeightChange:function(type,args,el){var height=this.cfg.getProperty("height");if((height&&height!=="auto")||(height===0)){this.fillHeight(el)}},_getPreciseHeight:function(el){var height=el.offsetHeight;if(el.getBoundingClientRect){var rect=el.getBoundingClientRect();height=rect.bottom-rect.top}return height},fillHeight:function(el){if(el){var container=this.innerElement||this.element,containerEls=[this.header,this.body,this.footer],containerEl,total=0,filled=0,remaining=0,validEl=false;for(var i=0,l=containerEls.length;i<l;i++){containerEl=containerEls[i];if(containerEl){if(el!==containerEl){filled+=this._getPreciseHeight(containerEl)}else{validEl=true}}}if(validEl){if(UA.ie||UA.opera){Dom.setStyle(el,'height',0+'px')}total=this._getComputedHeight(container);if(total===null){Dom.addClass(container,"yui-override-padding");total=container.clientHeight;Dom.removeClass(container,"yui-override-padding")}remaining=Math.max(total-filled,0);Dom.setStyle(el,"height",remaining+"px");if(el.offsetHeight!=remaining){remaining=Math.max(remaining-(el.offsetHeight-remaining),0)}Dom.setStyle(el,"height",remaining+"px")}}},bringToTop:function(){var aOverlays=[],oElement=this.element;function compareZIndexDesc(p_oOverlay1,p_oOverlay2){var sZIndex1=Dom.getStyle(p_oOverlay1,"zIndex"),sZIndex2=Dom.getStyle(p_oOverlay2,"zIndex"),nZIndex1=(!sZIndex1||isNaN(sZIndex1))?0:parseInt(sZIndex1,10),nZIndex2=(!sZIndex2||isNaN(sZIndex2))?0:parseInt(sZIndex2,10);if(nZIndex1>nZIndex2){return-1}else if(nZIndex1<nZIndex2){return 1}else{return 0}}function isOverlayElement(p_oElement){var isOverlay=Dom.hasClass(p_oElement,Overlay.CSS_OVERLAY),Panel=YAHOO.widget.Panel;if(isOverlay&&!Dom.isAncestor(oElement,p_oElement)){if(Panel&&Dom.hasClass(p_oElement,Panel.CSS_PANEL)){aOverlays[aOverlays.length]=p_oElement.parentNode}else{aOverlays[aOverlays.length]=p_oElement}}}Dom.getElementsBy(isOverlayElement,"DIV",document.body);aOverlays.sort(compareZIndexDesc);var oTopOverlay=aOverlays[0],nTopZIndex;if(oTopOverlay){nTopZIndex=Dom.getStyle(oTopOverlay,"zIndex");if(!isNaN(nTopZIndex)){var bRequiresBump=false;if(oTopOverlay!=oElement){bRequiresBump=true}else if(aOverlays.length>1){var nNextZIndex=Dom.getStyle(aOverlays[1],"zIndex");if(!isNaN(nNextZIndex)&&(nTopZIndex==nNextZIndex)){bRequiresBump=true}}if(bRequiresBump){this.cfg.setProperty("zindex",(parseInt(nTopZIndex,10)+2))}}}},destroy:function(){if(this.iframe){this.iframe.parentNode.removeChild(this.iframe)}this.iframe=null;Overlay.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);Overlay.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this);Module.textResizeEvent.unsubscribe(this._autoFillOnHeightChange);Overlay.superclass.destroy.call(this)},forceContainerRedraw:function(){var c=this;Dom.addClass(c.element,"yui-force-redraw");setTimeout(function(){Dom.removeClass(c.element,"yui-force-redraw")},0)},toString:function(){return"Overlay "+this.id}})}());(function(){YAHOO.widget.OverlayManager=function(userConfig){this.init(userConfig)};var Overlay=YAHOO.widget.Overlay,Event=YAHOO.util.Event,Dom=YAHOO.util.Dom,Config=YAHOO.util.Config,CustomEvent=YAHOO.util.CustomEvent,OverlayManager=YAHOO.widget.OverlayManager;OverlayManager.CSS_FOCUSED="focused";OverlayManager.prototype={constructor:OverlayManager,overlays:null,initDefaultConfig:function(){this.cfg.addProperty("overlays",{suppressEvent:true});this.cfg.addProperty("focusevent",{value:"mousedown"})},init:function(userConfig){this.cfg=new Config(this);this.initDefaultConfig();if(userConfig){this.cfg.applyConfig(userConfig,true)}this.cfg.fireQueue();var activeOverlay=null;this.getActive=function(){return activeOverlay};this.focus=function(overlay){var o=this.find(overlay);if(o){o.focus()}};this.remove=function(overlay){var o=this.find(overlay),originalZ;if(o){if(activeOverlay==o){activeOverlay=null}var bDestroyed=(o.element===null&&o.cfg===null)?true:false;if(!bDestroyed){originalZ=Dom.getStyle(o.element,"zIndex");o.cfg.setProperty("zIndex",-1000,true)}this.overlays.sort(this.compareZIndexDesc);this.overlays=this.overlays.slice(0,(this.overlays.length-1));o.hideEvent.unsubscribe(o.blur);o.destroyEvent.unsubscribe(this._onOverlayDestroy,o);o.focusEvent.unsubscribe(this._onOverlayFocusHandler,o);o.blurEvent.unsubscribe(this._onOverlayBlurHandler,o);if(!bDestroyed){Event.removeListener(o.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus);o.cfg.setProperty("zIndex",originalZ,true);o.cfg.setProperty("manager",null)}if(o.focusEvent._managed){o.focusEvent=null}if(o.blurEvent._managed){o.blurEvent=null}if(o.focus._managed){o.focus=null}if(o.blur._managed){o.blur=null}}};this.blurAll=function(){var nOverlays=this.overlays.length,i;if(nOverlays>0){i=nOverlays-1;do{this.overlays[i].blur()}while(i--)}};this._manageBlur=function(overlay){var changed=false;if(activeOverlay==overlay){Dom.removeClass(activeOverlay.element,OverlayManager.CSS_FOCUSED);activeOverlay=null;changed=true}return changed};this._manageFocus=function(overlay){var changed=false;if(activeOverlay!=overlay){if(activeOverlay){activeOverlay.blur()}activeOverlay=overlay;this.bringToTop(activeOverlay);Dom.addClass(activeOverlay.element,OverlayManager.CSS_FOCUSED);changed=true}return changed};var overlays=this.cfg.getProperty("overlays");if(!this.overlays){this.overlays=[]}if(overlays){this.register(overlays);this.overlays.sort(this.compareZIndexDesc)}},_onOverlayElementFocus:function(p_oEvent){var oTarget=Event.getTarget(p_oEvent),oClose=this.close;if(oClose&&(oTarget==oClose||Dom.isAncestor(oClose,oTarget))){this.blur()}else{this.focus()}},_onOverlayDestroy:function(p_sType,p_aArgs,p_oOverlay){this.remove(p_oOverlay)},_onOverlayFocusHandler:function(p_sType,p_aArgs,p_oOverlay){this._manageFocus(p_oOverlay)},_onOverlayBlurHandler:function(p_sType,p_aArgs,p_oOverlay){this._manageBlur(p_oOverlay)},_bindFocus:function(overlay){var mgr=this;if(!overlay.focusEvent){overlay.focusEvent=overlay.createEvent("focus");overlay.focusEvent.signature=CustomEvent.LIST;overlay.focusEvent._managed=true}else{overlay.focusEvent.subscribe(mgr._onOverlayFocusHandler,overlay,mgr)}if(!overlay.focus){Event.on(overlay.element,mgr.cfg.getProperty("focusevent"),mgr._onOverlayElementFocus,null,overlay);overlay.focus=function(){if(mgr._manageFocus(this)){if(this.cfg.getProperty("visible")&&this.focusFirst){this.focusFirst()}this.focusEvent.fire()}};overlay.focus._managed=true}},_bindBlur:function(overlay){var mgr=this;if(!overlay.blurEvent){overlay.blurEvent=overlay.createEvent("blur");overlay.blurEvent.signature=CustomEvent.LIST;overlay.focusEvent._managed=true}else{overlay.blurEvent.subscribe(mgr._onOverlayBlurHandler,overlay,mgr)}if(!overlay.blur){overlay.blur=function(){if(mgr._manageBlur(this)){this.blurEvent.fire()}};overlay.blur._managed=true}overlay.hideEvent.subscribe(overlay.blur)},_bindDestroy:function(overlay){var mgr=this;overlay.destroyEvent.subscribe(mgr._onOverlayDestroy,overlay,mgr)},_syncZIndex:function(overlay){var zIndex=Dom.getStyle(overlay.element,"zIndex");if(!isNaN(zIndex)){overlay.cfg.setProperty("zIndex",parseInt(zIndex,10))}else{overlay.cfg.setProperty("zIndex",0)}},register:function(overlay){var registered=false,i,n;if(overlay instanceof Overlay){overlay.cfg.addProperty("manager",{value:this});this._bindFocus(overlay);this._bindBlur(overlay);this._bindDestroy(overlay);this._syncZIndex(overlay);this.overlays.push(overlay);this.bringToTop(overlay);registered=true}else if(overlay instanceof Array){for(i=0,n=overlay.length;i<n;i++){registered=this.register(overlay[i])||registered}}return registered},bringToTop:function(p_oOverlay){var oOverlay=this.find(p_oOverlay),nTopZIndex,oTopOverlay,aOverlays;if(oOverlay){aOverlays=this.overlays;aOverlays.sort(this.compareZIndexDesc);oTopOverlay=aOverlays[0];if(oTopOverlay){nTopZIndex=Dom.getStyle(oTopOverlay.element,"zIndex");if(!isNaN(nTopZIndex)){var bRequiresBump=false;if(oTopOverlay!==oOverlay){bRequiresBump=true}else if(aOverlays.length>1){var nNextZIndex=Dom.getStyle(aOverlays[1].element,"zIndex");if(!isNaN(nNextZIndex)&&(nTopZIndex==nNextZIndex)){bRequiresBump=true}}if(bRequiresBump){oOverlay.cfg.setProperty("zindex",(parseInt(nTopZIndex,10)+2))}}aOverlays.sort(this.compareZIndexDesc)}}},find:function(overlay){var isInstance=overlay instanceof Overlay,overlays=this.overlays,n=overlays.length,found=null,o,i;if(isInstance||typeof overlay=="string"){for(i=n-1;i>=0;i--){o=overlays[i];if((isInstance&&(o===overlay))||(o.id==overlay)){found=o;break}}}return found},compareZIndexDesc:function(o1,o2){var zIndex1=(o1.cfg)?o1.cfg.getProperty("zIndex"):null,zIndex2=(o2.cfg)?o2.cfg.getProperty("zIndex"):null;if(zIndex1===null&&zIndex2===null){return 0}else if(zIndex1===null){return 1}else if(zIndex2===null){return-1}else if(zIndex1>zIndex2){return-1}else if(zIndex1<zIndex2){return 1}else{return 0}},showAll:function(){var overlays=this.overlays,n=overlays.length,i;for(i=n-1;i>=0;i--){overlays[i].show()}},hideAll:function(){var overlays=this.overlays,n=overlays.length,i;for(i=n-1;i>=0;i--){overlays[i].hide()}},toString:function(){return"OverlayManager"}}}());(function(){YAHOO.widget.Tooltip=function(el,userConfig){YAHOO.widget.Tooltip.superclass.constructor.call(this,el,userConfig)};var Lang=YAHOO.lang,Event=YAHOO.util.Event,CustomEvent=YAHOO.util.CustomEvent,Dom=YAHOO.util.Dom,Tooltip=YAHOO.widget.Tooltip,UA=YAHOO.env.ua,bIEQuirks=(UA.ie&&(UA.ie<=6||document.compatMode=="BackCompat")),m_oShadowTemplate,DEFAULT_CONFIG={"PREVENT_OVERLAP":{key:"preventoverlap",value:true,validator:Lang.isBoolean,supercedes:["x","y","xy"]},"SHOW_DELAY":{key:"showdelay",value:200,validator:Lang.isNumber},"AUTO_DISMISS_DELAY":{key:"autodismissdelay",value:5000,validator:Lang.isNumber},"HIDE_DELAY":{key:"hidedelay",value:250,validator:Lang.isNumber},"TEXT":{key:"text",suppressEvent:true},"CONTAINER":{key:"container"},"DISABLED":{key:"disabled",value:false,suppressEvent:true}},EVENT_TYPES={"CONTEXT_MOUSE_OVER":"contextMouseOver","CONTEXT_MOUSE_OUT":"contextMouseOut","CONTEXT_TRIGGER":"contextTrigger"};Tooltip.CSS_TOOLTIP="yui-tt";function restoreOriginalWidth(sOriginalWidth,sForcedWidth){var oConfig=this.cfg,sCurrentWidth=oConfig.getProperty("width");if(sCurrentWidth==sForcedWidth){oConfig.setProperty("width",sOriginalWidth)}}function setWidthToOffsetWidth(p_sType,p_aArgs){if("_originalWidth"in this){restoreOriginalWidth.call(this,this._originalWidth,this._forcedWidth)}var oBody=document.body,oConfig=this.cfg,sOriginalWidth=oConfig.getProperty("width"),sNewWidth,oClone;if((!sOriginalWidth||sOriginalWidth=="auto")&&(oConfig.getProperty("container")!=oBody||oConfig.getProperty("x")>=Dom.getViewportWidth()||oConfig.getProperty("y")>=Dom.getViewportHeight())){oClone=this.element.cloneNode(true);oClone.style.visibility="hidden";oClone.style.top="0px";oClone.style.left="0px";oBody.appendChild(oClone);sNewWidth=(oClone.offsetWidth+"px");oBody.removeChild(oClone);oClone=null;oConfig.setProperty("width",sNewWidth);oConfig.refireEvent("xy");this._originalWidth=sOriginalWidth||"";this._forcedWidth=sNewWidth}}function onDOMReady(p_sType,p_aArgs,p_oObject){this.render(p_oObject)}function onInit(){Event.onDOMReady(onDOMReady,this.cfg.getProperty("container"),this)}YAHOO.extend(Tooltip,YAHOO.widget.Overlay,{init:function(el,userConfig){Tooltip.superclass.init.call(this,el);this.beforeInitEvent.fire(Tooltip);Dom.addClass(this.element,Tooltip.CSS_TOOLTIP);if(userConfig){this.cfg.applyConfig(userConfig,true)}this.cfg.queueProperty("visible",false);this.cfg.queueProperty("constraintoviewport",true);this.setBody("");this.subscribe("changeContent",setWidthToOffsetWidth);this.subscribe("init",onInit);this.subscribe("render",this.onRender);this.initEvent.fire(Tooltip)},initEvents:function(){Tooltip.superclass.initEvents.call(this);var SIGNATURE=CustomEvent.LIST;this.contextMouseOverEvent=this.createEvent(EVENT_TYPES.CONTEXT_MOUSE_OVER);this.contextMouseOverEvent.signature=SIGNATURE;this.contextMouseOutEvent=this.createEvent(EVENT_TYPES.CONTEXT_MOUSE_OUT);this.contextMouseOutEvent.signature=SIGNATURE;this.contextTriggerEvent=this.createEvent(EVENT_TYPES.CONTEXT_TRIGGER);this.contextTriggerEvent.signature=SIGNATURE},initDefaultConfig:function(){Tooltip.superclass.initDefaultConfig.call(this);this.cfg.addProperty(DEFAULT_CONFIG.PREVENT_OVERLAP.key,{value:DEFAULT_CONFIG.PREVENT_OVERLAP.value,validator:DEFAULT_CONFIG.PREVENT_OVERLAP.validator,supercedes:DEFAULT_CONFIG.PREVENT_OVERLAP.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.SHOW_DELAY.key,{handler:this.configShowDelay,value:200,validator:DEFAULT_CONFIG.SHOW_DELAY.validator});this.cfg.addProperty(DEFAULT_CONFIG.AUTO_DISMISS_DELAY.key,{handler:this.configAutoDismissDelay,value:DEFAULT_CONFIG.AUTO_DISMISS_DELAY.value,validator:DEFAULT_CONFIG.AUTO_DISMISS_DELAY.validator});this.cfg.addProperty(DEFAULT_CONFIG.HIDE_DELAY.key,{handler:this.configHideDelay,value:DEFAULT_CONFIG.HIDE_DELAY.value,validator:DEFAULT_CONFIG.HIDE_DELAY.validator});this.cfg.addProperty(DEFAULT_CONFIG.TEXT.key,{handler:this.configText,suppressEvent:DEFAULT_CONFIG.TEXT.suppressEvent});this.cfg.addProperty(DEFAULT_CONFIG.CONTAINER.key,{handler:this.configContainer,value:document.body});this.cfg.addProperty(DEFAULT_CONFIG.DISABLED.key,{handler:this.configContainer,value:DEFAULT_CONFIG.DISABLED.value,supressEvent:DEFAULT_CONFIG.DISABLED.suppressEvent})},configText:function(type,args,obj){var text=args[0];if(text){this.setBody(text)}},configContainer:function(type,args,obj){var container=args[0];if(typeof container=='string'){this.cfg.setProperty("container",document.getElementById(container),true)}},_removeEventListeners:function(){var aElements=this._context,nElements,oElement,i;if(aElements){nElements=aElements.length;if(nElements>0){i=nElements-1;do{oElement=aElements[i];Event.removeListener(oElement,"mouseover",this.onContextMouseOver);Event.removeListener(oElement,"mousemove",this.onContextMouseMove);Event.removeListener(oElement,"mouseout",this.onContextMouseOut)}while(i--)}}},configContext:function(type,args,obj){var context=args[0],aElements,nElements,oElement,i;if(context){if(!(context instanceof Array)){if(typeof context=="string"){this.cfg.setProperty("context",[document.getElementById(context)],true)}else{this.cfg.setProperty("context",[context],true)}context=this.cfg.getProperty("context")}this._removeEventListeners();this._context=context;aElements=this._context;if(aElements){nElements=aElements.length;if(nElements>0){i=nElements-1;do{oElement=aElements[i];Event.on(oElement,"mouseover",this.onContextMouseOver,this);Event.on(oElement,"mousemove",this.onContextMouseMove,this);Event.on(oElement,"mouseout",this.onContextMouseOut,this)}while(i--)}}}},onContextMouseMove:function(e,obj){obj.pageX=Event.getPageX(e);obj.pageY=Event.getPageY(e)},onContextMouseOver:function(e,obj){var context=this;if(context.title){obj._tempTitle=context.title;context.title=""}if(obj.fireEvent("contextMouseOver",context,e)!==false&&!obj.cfg.getProperty("disabled")){if(obj.hideProcId){clearTimeout(obj.hideProcId);obj.hideProcId=null}Event.on(context,"mousemove",obj.onContextMouseMove,obj);obj.showProcId=obj.doShow(e,context)}},onContextMouseOut:function(e,obj){var el=this;if(obj._tempTitle){el.title=obj._tempTitle;obj._tempTitle=null}if(obj.showProcId){clearTimeout(obj.showProcId);obj.showProcId=null}if(obj.hideProcId){clearTimeout(obj.hideProcId);obj.hideProcId=null}obj.fireEvent("contextMouseOut",el,e);obj.hideProcId=setTimeout(function(){obj.hide()},obj.cfg.getProperty("hidedelay"))},doShow:function(e,context){var yOffset=25,me=this;if(UA.opera&&context.tagName&&context.tagName.toUpperCase()=="A"){yOffset+=12}return setTimeout(function(){var txt=me.cfg.getProperty("text");if(me._tempTitle&&(txt===""||YAHOO.lang.isUndefined(txt)||YAHOO.lang.isNull(txt))){me.setBody(me._tempTitle)}else{me.cfg.refireEvent("text")}me.moveTo(me.pageX,me.pageY+yOffset);if(me.cfg.getProperty("preventoverlap")){me.preventOverlap(me.pageX,me.pageY)}Event.removeListener(context,"mousemove",me.onContextMouseMove);me.contextTriggerEvent.fire(context);me.show();me.hideProcId=me.doHide()},this.cfg.getProperty("showdelay"))},doHide:function(){var me=this;return setTimeout(function(){me.hide()},this.cfg.getProperty("autodismissdelay"))},preventOverlap:function(pageX,pageY){var height=this.element.offsetHeight,mousePoint=new YAHOO.util.Point(pageX,pageY),elementRegion=Dom.getRegion(this.element);elementRegion.top-=5;elementRegion.left-=5;elementRegion.right+=5;elementRegion.bottom+=5;if(elementRegion.contains(mousePoint)){this.cfg.setProperty("y",(pageY-height-5))}},onRender:function(p_sType,p_aArgs){function sizeShadow(){var oElement=this.element,oShadow=this.underlay;if(oShadow){oShadow.style.width=(oElement.offsetWidth+6)+"px";oShadow.style.height=(oElement.offsetHeight+1)+"px"}}function addShadowVisibleClass(){Dom.addClass(this.underlay,"yui-tt-shadow-visible");if(UA.ie){this.forceUnderlayRedraw()}}function removeShadowVisibleClass(){Dom.removeClass(this.underlay,"yui-tt-shadow-visible")}function createShadow(){var oShadow=this.underlay,oElement,Module,nIE,me;if(!oShadow){oElement=this.element;Module=YAHOO.widget.Module;nIE=UA.ie;me=this;if(!m_oShadowTemplate){m_oShadowTemplate=document.createElement("div");m_oShadowTemplate.className="yui-tt-shadow"}oShadow=m_oShadowTemplate.cloneNode(false);oElement.appendChild(oShadow);this.underlay=oShadow;this._shadow=this.underlay;addShadowVisibleClass.call(this);this.subscribe("beforeShow",addShadowVisibleClass);this.subscribe("hide",removeShadowVisibleClass);if(bIEQuirks){window.setTimeout(function(){sizeShadow.call(me)},0);this.cfg.subscribeToConfigEvent("width",sizeShadow);this.cfg.subscribeToConfigEvent("height",sizeShadow);this.subscribe("changeContent",sizeShadow);Module.textResizeEvent.subscribe(sizeShadow,this,true);this.subscribe("destroy",function(){Module.textResizeEvent.unsubscribe(sizeShadow,this)})}}}function onBeforeShow(){createShadow.call(this);this.unsubscribe("beforeShow",onBeforeShow)}if(this.cfg.getProperty("visible")){createShadow.call(this)}else{this.subscribe("beforeShow",onBeforeShow)}},forceUnderlayRedraw:function(){var tt=this;Dom.addClass(tt.underlay,"yui-force-redraw");setTimeout(function(){Dom.removeClass(tt.underlay,"yui-force-redraw")},0)},destroy:function(){this._removeEventListeners();Tooltip.superclass.destroy.call(this)},toString:function(){return"Tooltip "+this.id}})}());(function(){YAHOO.widget.Panel=function(el,userConfig){YAHOO.widget.Panel.superclass.constructor.call(this,el,userConfig)};var _currentModal=null;var Lang=YAHOO.lang,Util=YAHOO.util,Dom=Util.Dom,Event=Util.Event,CustomEvent=Util.CustomEvent,KeyListener=YAHOO.util.KeyListener,Config=Util.Config,Overlay=YAHOO.widget.Overlay,Panel=YAHOO.widget.Panel,UA=YAHOO.env.ua,bIEQuirks=(UA.ie&&(UA.ie<=6||document.compatMode=="BackCompat")),m_oMaskTemplate,m_oUnderlayTemplate,m_oCloseIconTemplate,EVENT_TYPES={"SHOW_MASK":"showMask","HIDE_MASK":"hideMask","DRAG":"drag"},DEFAULT_CONFIG={"CLOSE":{key:"close",value:true,validator:Lang.isBoolean,supercedes:["visible"]},"DRAGGABLE":{key:"draggable",value:(Util.DD?true:false),validator:Lang.isBoolean,supercedes:["visible"]},"DRAG_ONLY":{key:"dragonly",value:false,validator:Lang.isBoolean,supercedes:["draggable"]},"UNDERLAY":{key:"underlay",value:"shadow",supercedes:["visible"]},"MODAL":{key:"modal",value:false,validator:Lang.isBoolean,supercedes:["visible","zindex"]},"KEY_LISTENERS":{key:"keylisteners",suppressEvent:true,supercedes:["visible"]},"STRINGS":{key:"strings",supercedes:["close"],validator:Lang.isObject,value:{close:"Close"}}};Panel.CSS_PANEL="yui-panel";Panel.CSS_PANEL_CONTAINER="yui-panel-container";Panel.FOCUSABLE=["a","button","select","textarea","input","iframe"];function createHeader(p_sType,p_aArgs){if(!this.header&&this.cfg.getProperty("draggable")){this.setHeader("&#160;")}}function restoreOriginalWidth(p_sType,p_aArgs,p_oObject){var sOriginalWidth=p_oObject[0],sNewWidth=p_oObject[1],oConfig=this.cfg,sCurrentWidth=oConfig.getProperty("width");if(sCurrentWidth==sNewWidth){oConfig.setProperty("width",sOriginalWidth)}this.unsubscribe("hide",restoreOriginalWidth,p_oObject)}function setWidthToOffsetWidth(p_sType,p_aArgs){var oConfig,sOriginalWidth,sNewWidth;if(bIEQuirks){oConfig=this.cfg;sOriginalWidth=oConfig.getProperty("width");if(!sOriginalWidth||sOriginalWidth=="auto"){sNewWidth=(this.element.offsetWidth+"px");oConfig.setProperty("width",sNewWidth);this.subscribe("hide",restoreOriginalWidth,[(sOriginalWidth||""),sNewWidth])}}}YAHOO.extend(Panel,Overlay,{init:function(el,userConfig){Panel.superclass.init.call(this,el);this.beforeInitEvent.fire(Panel);Dom.addClass(this.element,Panel.CSS_PANEL);this.buildWrapper();if(userConfig){this.cfg.applyConfig(userConfig,true)}this.subscribe("showMask",this._addFocusHandlers);this.subscribe("hideMask",this._removeFocusHandlers);this.subscribe("beforeRender",createHeader);this.subscribe("render",function(){this.setFirstLastFocusable();this.subscribe("changeContent",this.setFirstLastFocusable)});this.subscribe("show",this.focusFirst);this.initEvent.fire(Panel)},_onElementFocus:function(e){if(_currentModal===this){var target=Event.getTarget(e),doc=document.documentElement,insideDoc=(target!==doc&&target!==window);if(insideDoc&&target!==this.element&&target!==this.mask&&!Dom.isAncestor(this.element,target)){try{if(this.firstElement){this.firstElement.focus()}else{if(this._modalFocus){this._modalFocus.focus()}else{this.innerElement.focus()}}}catch(err){try{if(insideDoc&&target!==document.body){target.blur()}}catch(err2){}}}}},_addFocusHandlers:function(p_sType,p_aArgs){if(!this.firstElement){if(UA.webkit||UA.opera){if(!this._modalFocus){this._createHiddenFocusElement()}}else{this.innerElement.tabIndex=0}}this.setTabLoop(this.firstElement,this.lastElement);Event.onFocus(document.documentElement,this._onElementFocus,this,true);_currentModal=this},_createHiddenFocusElement:function(){var e=document.createElement("button");e.style.height="1px";e.style.width="1px";e.style.position="absolute";e.style.left="-10000em";e.style.opacity=0;e.tabIndex=-1;this.innerElement.appendChild(e);this._modalFocus=e},_removeFocusHandlers:function(p_sType,p_aArgs){Event.removeFocusListener(document.documentElement,this._onElementFocus,this);if(_currentModal==this){_currentModal=null}},focusFirst:function(type,args,obj){var el=this.firstElement;if(args&&args[1]){Event.stopEvent(args[1])}if(el){try{el.focus()}catch(err){}}},focusLast:function(type,args,obj){var el=this.lastElement;if(args&&args[1]){Event.stopEvent(args[1])}if(el){try{el.focus()}catch(err){}}},setTabLoop:function(firstElement,lastElement){var backTab=this.preventBackTab,tab=this.preventTabOut,showEvent=this.showEvent,hideEvent=this.hideEvent;if(backTab){backTab.disable();showEvent.unsubscribe(backTab.enable,backTab);hideEvent.unsubscribe(backTab.disable,backTab);backTab=this.preventBackTab=null}if(tab){tab.disable();showEvent.unsubscribe(tab.enable,tab);hideEvent.unsubscribe(tab.disable,tab);tab=this.preventTabOut=null}if(firstElement){this.preventBackTab=new KeyListener(firstElement,{shift:true,keys:9},{fn:this.focusLast,scope:this,correctScope:true});backTab=this.preventBackTab;showEvent.subscribe(backTab.enable,backTab,true);hideEvent.subscribe(backTab.disable,backTab,true)}if(lastElement){this.preventTabOut=new KeyListener(lastElement,{shift:false,keys:9},{fn:this.focusFirst,scope:this,correctScope:true});tab=this.preventTabOut;showEvent.subscribe(tab.enable,tab,true);hideEvent.subscribe(tab.disable,tab,true)}},getFocusableElements:function(root){root=root||this.innerElement;var focusable={};for(var i=0;i<Panel.FOCUSABLE.length;i++){focusable[Panel.FOCUSABLE[i]]=true}function isFocusable(el){if(el.focus&&el.type!=="hidden"&&!el.disabled&&focusable[el.tagName.toLowerCase()]){return true}return false}return Dom.getElementsBy(isFocusable,null,root)},setFirstLastFocusable:function(){this.firstElement=null;this.lastElement=null;var elements=this.getFocusableElements();this.focusableElements=elements;if(elements.length>0){this.firstElement=elements[0];this.lastElement=elements[elements.length-1]}if(this.cfg.getProperty("modal")){this.setTabLoop(this.firstElement,this.lastElement)}},initEvents:function(){Panel.superclass.initEvents.call(this);var SIGNATURE=CustomEvent.LIST;this.showMaskEvent=this.createEvent(EVENT_TYPES.SHOW_MASK);this.showMaskEvent.signature=SIGNATURE;this.hideMaskEvent=this.createEvent(EVENT_TYPES.HIDE_MASK);this.hideMaskEvent.signature=SIGNATURE;this.dragEvent=this.createEvent(EVENT_TYPES.DRAG);this.dragEvent.signature=SIGNATURE},initDefaultConfig:function(){Panel.superclass.initDefaultConfig.call(this);this.cfg.addProperty(DEFAULT_CONFIG.CLOSE.key,{handler:this.configClose,value:DEFAULT_CONFIG.CLOSE.value,validator:DEFAULT_CONFIG.CLOSE.validator,supercedes:DEFAULT_CONFIG.CLOSE.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.DRAGGABLE.key,{handler:this.configDraggable,value:(Util.DD)?true:false,validator:DEFAULT_CONFIG.DRAGGABLE.validator,supercedes:DEFAULT_CONFIG.DRAGGABLE.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.DRAG_ONLY.key,{value:DEFAULT_CONFIG.DRAG_ONLY.value,validator:DEFAULT_CONFIG.DRAG_ONLY.validator,supercedes:DEFAULT_CONFIG.DRAG_ONLY.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.UNDERLAY.key,{handler:this.configUnderlay,value:DEFAULT_CONFIG.UNDERLAY.value,supercedes:DEFAULT_CONFIG.UNDERLAY.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.MODAL.key,{handler:this.configModal,value:DEFAULT_CONFIG.MODAL.value,validator:DEFAULT_CONFIG.MODAL.validator,supercedes:DEFAULT_CONFIG.MODAL.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.KEY_LISTENERS.key,{handler:this.configKeyListeners,suppressEvent:DEFAULT_CONFIG.KEY_LISTENERS.suppressEvent,supercedes:DEFAULT_CONFIG.KEY_LISTENERS.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.STRINGS.key,{value:DEFAULT_CONFIG.STRINGS.value,handler:this.configStrings,validator:DEFAULT_CONFIG.STRINGS.validator,supercedes:DEFAULT_CONFIG.STRINGS.supercedes})},configClose:function(type,args,obj){var val=args[0],oClose=this.close,strings=this.cfg.getProperty("strings");if(val){if(!oClose){if(!m_oCloseIconTemplate){m_oCloseIconTemplate=document.createElement("a");m_oCloseIconTemplate.className="container-close";m_oCloseIconTemplate.href="#"}oClose=m_oCloseIconTemplate.cloneNode(true);this.innerElement.appendChild(oClose);oClose.innerHTML=(strings&&strings.close)?strings.close:"&#160;";Event.on(oClose,"click",this._doClose,this,true);this.close=oClose}else{oClose.style.display="block"}}else{if(oClose){oClose.style.display="none"}}},_doClose:function(e){Event.preventDefault(e);this.hide()},configDraggable:function(type,args,obj){var val=args[0];if(val){if(!Util.DD){this.cfg.setProperty("draggable",false);return}if(this.header){Dom.setStyle(this.header,"cursor","move");this.registerDragDrop()}this.subscribe("beforeShow",setWidthToOffsetWidth)}else{if(this.dd){this.dd.unreg()}if(this.header){Dom.setStyle(this.header,"cursor","auto")}this.unsubscribe("beforeShow",setWidthToOffsetWidth)}},configUnderlay:function(type,args,obj){var bMacGecko=(this.platform=="mac"&&UA.gecko),sUnderlay=args[0].toLowerCase(),oUnderlay=this.underlay,oElement=this.element;function createUnderlay(){var bNew=false;if(!oUnderlay){if(!m_oUnderlayTemplate){m_oUnderlayTemplate=document.createElement("div");m_oUnderlayTemplate.className="underlay"}oUnderlay=m_oUnderlayTemplate.cloneNode(false);this.element.appendChild(oUnderlay);this.underlay=oUnderlay;if(bIEQuirks){this.sizeUnderlay();this.cfg.subscribeToConfigEvent("width",this.sizeUnderlay);this.cfg.subscribeToConfigEvent("height",this.sizeUnderlay);this.changeContentEvent.subscribe(this.sizeUnderlay);YAHOO.widget.Module.textResizeEvent.subscribe(this.sizeUnderlay,this,true)}if(UA.webkit&&UA.webkit<420){this.changeContentEvent.subscribe(this.forceUnderlayRedraw)}bNew=true}}function onBeforeShow(){var bNew=createUnderlay.call(this);if(!bNew&&bIEQuirks){this.sizeUnderlay()}this._underlayDeferred=false;this.beforeShowEvent.unsubscribe(onBeforeShow)}function destroyUnderlay(){if(this._underlayDeferred){this.beforeShowEvent.unsubscribe(onBeforeShow);this._underlayDeferred=false}if(oUnderlay){this.cfg.unsubscribeFromConfigEvent("width",this.sizeUnderlay);this.cfg.unsubscribeFromConfigEvent("height",this.sizeUnderlay);this.changeContentEvent.unsubscribe(this.sizeUnderlay);this.changeContentEvent.unsubscribe(this.forceUnderlayRedraw);YAHOO.widget.Module.textResizeEvent.unsubscribe(this.sizeUnderlay,this,true);this.element.removeChild(oUnderlay);this.underlay=null}}switch(sUnderlay){case"shadow":Dom.removeClass(oElement,"matte");Dom.addClass(oElement,"shadow");break;case"matte":if(!bMacGecko){destroyUnderlay.call(this)}Dom.removeClass(oElement,"shadow");Dom.addClass(oElement,"matte");break;default:if(!bMacGecko){destroyUnderlay.call(this)}Dom.removeClass(oElement,"shadow");Dom.removeClass(oElement,"matte");break}if((sUnderlay=="shadow")||(bMacGecko&&!oUnderlay)){if(this.cfg.getProperty("visible")){var bNew=createUnderlay.call(this);if(!bNew&&bIEQuirks){this.sizeUnderlay()}}else{if(!this._underlayDeferred){this.beforeShowEvent.subscribe(onBeforeShow);this._underlayDeferred=true}}}},configModal:function(type,args,obj){var modal=args[0];if(modal){if(!this._hasModalityEventListeners){this.subscribe("beforeShow",this.buildMask);this.subscribe("beforeShow",this.bringToTop);this.subscribe("beforeShow",this.showMask);this.subscribe("hide",this.hideMask);Overlay.windowResizeEvent.subscribe(this.sizeMask,this,true);this._hasModalityEventListeners=true}}else{if(this._hasModalityEventListeners){if(this.cfg.getProperty("visible")){this.hideMask();this.removeMask()}this.unsubscribe("beforeShow",this.buildMask);this.unsubscribe("beforeShow",this.bringToTop);this.unsubscribe("beforeShow",this.showMask);this.unsubscribe("hide",this.hideMask);Overlay.windowResizeEvent.unsubscribe(this.sizeMask,this);this._hasModalityEventListeners=false}}},removeMask:function(){var oMask=this.mask,oParentNode;if(oMask){this.hideMask();oParentNode=oMask.parentNode;if(oParentNode){oParentNode.removeChild(oMask)}this.mask=null}},configKeyListeners:function(type,args,obj){var listeners=args[0],listener,nListeners,i;if(listeners){if(listeners instanceof Array){nListeners=listeners.length;for(i=0;i<nListeners;i++){listener=listeners[i];if(!Config.alreadySubscribed(this.showEvent,listener.enable,listener)){this.showEvent.subscribe(listener.enable,listener,true)}if(!Config.alreadySubscribed(this.hideEvent,listener.disable,listener)){this.hideEvent.subscribe(listener.disable,listener,true);this.destroyEvent.subscribe(listener.disable,listener,true)}}}else{if(!Config.alreadySubscribed(this.showEvent,listeners.enable,listeners)){this.showEvent.subscribe(listeners.enable,listeners,true)}if(!Config.alreadySubscribed(this.hideEvent,listeners.disable,listeners)){this.hideEvent.subscribe(listeners.disable,listeners,true);this.destroyEvent.subscribe(listeners.disable,listeners,true)}}}},configStrings:function(type,args,obj){var val=Lang.merge(DEFAULT_CONFIG.STRINGS.value,args[0]);this.cfg.setProperty(DEFAULT_CONFIG.STRINGS.key,val,true)},configHeight:function(type,args,obj){var height=args[0],el=this.innerElement;Dom.setStyle(el,"height",height);this.cfg.refireEvent("iframe")},_autoFillOnHeightChange:function(type,args,el){Panel.superclass._autoFillOnHeightChange.apply(this,arguments);if(bIEQuirks){var panel=this;setTimeout(function(){panel.sizeUnderlay()},0)}},configWidth:function(type,args,obj){var width=args[0],el=this.innerElement;Dom.setStyle(el,"width",width);this.cfg.refireEvent("iframe")},configzIndex:function(type,args,obj){Panel.superclass.configzIndex.call(this,type,args,obj);if(this.mask||this.cfg.getProperty("modal")===true){var panelZ=Dom.getStyle(this.element,"zIndex");if(!panelZ||isNaN(panelZ)){panelZ=0}if(panelZ===0){this.cfg.setProperty("zIndex",1)}else{this.stackMask()}}},buildWrapper:function(){var elementParent=this.element.parentNode,originalElement=this.element,wrapper=document.createElement("div");wrapper.className=Panel.CSS_PANEL_CONTAINER;wrapper.id=originalElement.id+"_c";if(elementParent){elementParent.insertBefore(wrapper,originalElement)}wrapper.appendChild(originalElement);this.element=wrapper;this.innerElement=originalElement;Dom.setStyle(this.innerElement,"visibility","inherit")},sizeUnderlay:function(){var oUnderlay=this.underlay,oElement;if(oUnderlay){oElement=this.element;oUnderlay.style.width=oElement.offsetWidth+"px";oUnderlay.style.height=oElement.offsetHeight+"px"}},registerDragDrop:function(){var me=this;if(this.header){if(!Util.DD){return}var bDragOnly=(this.cfg.getProperty("dragonly")===true);this.dd=new Util.DD(this.element.id,this.id,{dragOnly:bDragOnly});if(!this.header.id){this.header.id=this.id+"_h"}this.dd.startDrag=function(){var offsetHeight,offsetWidth,viewPortWidth,viewPortHeight,scrollX,scrollY;if(YAHOO.env.ua.ie==6){Dom.addClass(me.element,"drag")}if(me.cfg.getProperty("constraintoviewport")){var nViewportOffset=Overlay.VIEWPORT_OFFSET;offsetHeight=me.element.offsetHeight;offsetWidth=me.element.offsetWidth;viewPortWidth=Dom.getViewportWidth();viewPortHeight=Dom.getViewportHeight();scrollX=Dom.getDocumentScrollLeft();scrollY=Dom.getDocumentScrollTop();if(offsetHeight+nViewportOffset<viewPortHeight){this.minY=scrollY+nViewportOffset;this.maxY=scrollY+viewPortHeight-offsetHeight-nViewportOffset}else{this.minY=scrollY+nViewportOffset;this.maxY=scrollY+nViewportOffset}if(offsetWidth+nViewportOffset<viewPortWidth){this.minX=scrollX+nViewportOffset;this.maxX=scrollX+viewPortWidth-offsetWidth-nViewportOffset}else{this.minX=scrollX+nViewportOffset;this.maxX=scrollX+nViewportOffset}this.constrainX=true;this.constrainY=true}else{this.constrainX=false;this.constrainY=false}me.dragEvent.fire("startDrag",arguments)};this.dd.onDrag=function(){me.syncPosition();me.cfg.refireEvent("iframe");if(this.platform=="mac"&&YAHOO.env.ua.gecko){this.showMacGeckoScrollbars()}me.dragEvent.fire("onDrag",arguments)};this.dd.endDrag=function(){if(YAHOO.env.ua.ie==6){Dom.removeClass(me.element,"drag")}me.dragEvent.fire("endDrag",arguments);me.moveEvent.fire(me.cfg.getProperty("xy"))};this.dd.setHandleElId(this.header.id);this.dd.addInvalidHandleType("INPUT");this.dd.addInvalidHandleType("SELECT");this.dd.addInvalidHandleType("TEXTAREA")}},buildMask:function(){var oMask=this.mask;if(!oMask){if(!m_oMaskTemplate){m_oMaskTemplate=document.createElement("div");m_oMaskTemplate.className="mask";m_oMaskTemplate.innerHTML="&#160;"}oMask=m_oMaskTemplate.cloneNode(true);oMask.id=this.id+"_mask";document.body.insertBefore(oMask,document.body.firstChild);this.mask=oMask;if(YAHOO.env.ua.gecko&&this.platform=="mac"){Dom.addClass(this.mask,"block-scrollbars")}this.stackMask()}},hideMask:function(){if(this.cfg.getProperty("modal")&&this.mask){this.mask.style.display="none";Dom.removeClass(document.body,"masked");this.hideMaskEvent.fire()}},showMask:function(){if(this.cfg.getProperty("modal")&&this.mask){Dom.addClass(document.body,"masked");this.sizeMask();this.mask.style.display="block";this.showMaskEvent.fire()}},sizeMask:function(){if(this.mask){var mask=this.mask,viewWidth=Dom.getViewportWidth(),viewHeight=Dom.getViewportHeight();if(mask.offsetHeight>viewHeight){mask.style.height=viewHeight+"px"}if(mask.offsetWidth>viewWidth){mask.style.width=viewWidth+"px"}mask.style.height=Dom.getDocumentHeight()+"px";mask.style.width=Dom.getDocumentWidth()+"px"}},stackMask:function(){if(this.mask){var panelZ=Dom.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(panelZ)&&!isNaN(panelZ)){Dom.setStyle(this.mask,"zIndex",panelZ-1)}}},render:function(appendToNode){return Panel.superclass.render.call(this,appendToNode,this.innerElement)},destroy:function(){Overlay.windowResizeEvent.unsubscribe(this.sizeMask,this);this.removeMask();if(this.close){Event.purgeElement(this.close)}Panel.superclass.destroy.call(this)},forceUnderlayRedraw:function(){var u=this.underlay;Dom.addClass(u,"yui-force-redraw");setTimeout(function(){Dom.removeClass(u,"yui-force-redraw")},0)},toString:function(){return"Panel "+this.id}})}());(function(){YAHOO.widget.Dialog=function(el,userConfig){YAHOO.widget.Dialog.superclass.constructor.call(this,el,userConfig)};var Event=YAHOO.util.Event,CustomEvent=YAHOO.util.CustomEvent,Dom=YAHOO.util.Dom,Dialog=YAHOO.widget.Dialog,Lang=YAHOO.lang,EVENT_TYPES={"BEFORE_SUBMIT":"beforeSubmit","SUBMIT":"submit","MANUAL_SUBMIT":"manualSubmit","ASYNC_SUBMIT":"asyncSubmit","FORM_SUBMIT":"formSubmit","CANCEL":"cancel"},DEFAULT_CONFIG={"POST_METHOD":{key:"postmethod",value:"async"},"POST_DATA":{key:"postdata",value:null},"BUTTONS":{key:"buttons",value:"none",supercedes:["visible"]},"HIDEAFTERSUBMIT":{key:"hideaftersubmit",value:true}};Dialog.CSS_DIALOG="yui-dialog";function removeButtonEventHandlers(){var aButtons=this._aButtons,nButtons,oButton,i;if(Lang.isArray(aButtons)){nButtons=aButtons.length;if(nButtons>0){i=nButtons-1;do{oButton=aButtons[i];if(YAHOO.widget.Button&&oButton instanceof YAHOO.widget.Button){oButton.destroy()}else if(oButton.tagName.toUpperCase()=="BUTTON"){Event.purgeElement(oButton);Event.purgeElement(oButton,false)}}while(i--)}}}YAHOO.extend(Dialog,YAHOO.widget.Panel,{form:null,initDefaultConfig:function(){Dialog.superclass.initDefaultConfig.call(this);this.callback={success:null,failure:null,argument:null};this.cfg.addProperty(DEFAULT_CONFIG.POST_METHOD.key,{handler:this.configPostMethod,value:DEFAULT_CONFIG.POST_METHOD.value,validator:function(val){if(val!="form"&&val!="async"&&val!="none"&&val!="manual"){return false}else{return true}}});this.cfg.addProperty(DEFAULT_CONFIG.POST_DATA.key,{value:DEFAULT_CONFIG.POST_DATA.value});this.cfg.addProperty(DEFAULT_CONFIG.HIDEAFTERSUBMIT.key,{value:DEFAULT_CONFIG.HIDEAFTERSUBMIT.value});this.cfg.addProperty(DEFAULT_CONFIG.BUTTONS.key,{handler:this.configButtons,value:DEFAULT_CONFIG.BUTTONS.value,supercedes:DEFAULT_CONFIG.BUTTONS.supercedes})},initEvents:function(){Dialog.superclass.initEvents.call(this);var SIGNATURE=CustomEvent.LIST;this.beforeSubmitEvent=this.createEvent(EVENT_TYPES.BEFORE_SUBMIT);this.beforeSubmitEvent.signature=SIGNATURE;this.submitEvent=this.createEvent(EVENT_TYPES.SUBMIT);this.submitEvent.signature=SIGNATURE;this.manualSubmitEvent=this.createEvent(EVENT_TYPES.MANUAL_SUBMIT);this.manualSubmitEvent.signature=SIGNATURE;this.asyncSubmitEvent=this.createEvent(EVENT_TYPES.ASYNC_SUBMIT);this.asyncSubmitEvent.signature=SIGNATURE;this.formSubmitEvent=this.createEvent(EVENT_TYPES.FORM_SUBMIT);this.formSubmitEvent.signature=SIGNATURE;this.cancelEvent=this.createEvent(EVENT_TYPES.CANCEL);this.cancelEvent.signature=SIGNATURE},init:function(el,userConfig){Dialog.superclass.init.call(this,el);this.beforeInitEvent.fire(Dialog);Dom.addClass(this.element,Dialog.CSS_DIALOG);this.cfg.setProperty("visible",false);if(userConfig){this.cfg.applyConfig(userConfig,true)}this.showEvent.subscribe(this.focusFirst,this,true);this.beforeHideEvent.subscribe(this.blurButtons,this,true);this.subscribe("changeBody",this.registerForm);this.initEvent.fire(Dialog)},doSubmit:function(){var Connect=YAHOO.util.Connect,oForm=this.form,bUseFileUpload=false,bUseSecureFileUpload=false,aElements,nElements,i,formAttrs;switch(this.cfg.getProperty("postmethod")){case"async":aElements=oForm.elements;nElements=aElements.length;if(nElements>0){i=nElements-1;do{if(aElements[i].type=="file"){bUseFileUpload=true;break}}while(i--)}if(bUseFileUpload&&YAHOO.env.ua.ie&&this.isSecure){bUseSecureFileUpload=true}formAttrs=this._getFormAttributes(oForm);Connect.setForm(oForm,bUseFileUpload,bUseSecureFileUpload);var postData=this.cfg.getProperty("postdata");var c=Connect.asyncRequest(formAttrs.method,formAttrs.action,this.callback,postData);this.asyncSubmitEvent.fire(c);break;case"form":oForm.submit();this.formSubmitEvent.fire();break;case"none":case"manual":this.manualSubmitEvent.fire();break}},_getFormAttributes:function(oForm){var attrs={method:null,action:null};if(oForm){if(oForm.getAttributeNode){var action=oForm.getAttributeNode("action");var method=oForm.getAttributeNode("method");if(action){attrs.action=action.value}if(method){attrs.method=method.value}}else{attrs.action=oForm.getAttribute("action");attrs.method=oForm.getAttribute("method")}}attrs.method=(Lang.isString(attrs.method)?attrs.method:"POST").toUpperCase();attrs.action=Lang.isString(attrs.action)?attrs.action:"";return attrs},registerForm:function(){var form=this.element.getElementsByTagName("form")[0];if(this.form){if(this.form==form&&Dom.isAncestor(this.element,this.form)){return}else{Event.purgeElement(this.form);this.form=null}}if(!form){form=document.createElement("form");form.name="frm_"+this.id;this.body.appendChild(form)}if(form){this.form=form;Event.on(form,"submit",this._submitHandler,this,true)}},_submitHandler:function(e){Event.stopEvent(e);this.submit();this.form.blur()},setTabLoop:function(firstElement,lastElement){firstElement=firstElement||this.firstButton;lastElement=this.lastButton||lastElement;Dialog.superclass.setTabLoop.call(this,firstElement,lastElement)},setFirstLastFocusable:function(){Dialog.superclass.setFirstLastFocusable.call(this);var i,l,el,elements=this.focusableElements;this.firstFormElement=null;this.lastFormElement=null;if(this.form&&elements&&elements.length>0){l=elements.length;for(i=0;i<l;++i){el=elements[i];if(this.form===el.form){this.firstFormElement=el;break}}for(i=l-1;i>=0;--i){el=elements[i];if(this.form===el.form){this.lastFormElement=el;break}}}},configClose:function(type,args,obj){Dialog.superclass.configClose.apply(this,arguments)},_doClose:function(e){Event.preventDefault(e);this.cancel()},configButtons:function(type,args,obj){var Button=YAHOO.widget.Button,aButtons=args[0],oInnerElement=this.innerElement,oButton,oButtonEl,oYUIButton,nButtons,oSpan,oFooter,i;removeButtonEventHandlers.call(this);this._aButtons=null;if(Lang.isArray(aButtons)){oSpan=document.createElement("span");oSpan.className="button-group";nButtons=aButtons.length;this._aButtons=[];this.defaultHtmlButton=null;for(i=0;i<nButtons;i++){oButton=aButtons[i];if(Button){oYUIButton=new Button({label:oButton.text});oYUIButton.appendTo(oSpan);oButtonEl=oYUIButton.get("element");if(oButton.isDefault){oYUIButton.addClass("default");this.defaultHtmlButton=oButtonEl}if(Lang.isFunction(oButton.handler)){oYUIButton.set("onclick",{fn:oButton.handler,obj:this,scope:this})}else if(Lang.isObject(oButton.handler)&&Lang.isFunction(oButton.handler.fn)){oYUIButton.set("onclick",{fn:oButton.handler.fn,obj:((!Lang.isUndefined(oButton.handler.obj))?oButton.handler.obj:this),scope:(oButton.handler.scope||this)})}this._aButtons[this._aButtons.length]=oYUIButton}else{oButtonEl=document.createElement("button");oButtonEl.setAttribute("type","button");if(oButton.isDefault){oButtonEl.className="default";this.defaultHtmlButton=oButtonEl}oButtonEl.innerHTML=oButton.text;if(Lang.isFunction(oButton.handler)){Event.on(oButtonEl,"click",oButton.handler,this,true)}else if(Lang.isObject(oButton.handler)&&Lang.isFunction(oButton.handler.fn)){Event.on(oButtonEl,"click",oButton.handler.fn,((!Lang.isUndefined(oButton.handler.obj))?oButton.handler.obj:this),(oButton.handler.scope||this))}oSpan.appendChild(oButtonEl);this._aButtons[this._aButtons.length]=oButtonEl}oButton.htmlButton=oButtonEl;if(i===0){this.firstButton=oButtonEl}if(i==(nButtons-1)){this.lastButton=oButtonEl}}this.setFooter(oSpan);oFooter=this.footer;if(Dom.inDocument(this.element)&&!Dom.isAncestor(oInnerElement,oFooter)){oInnerElement.appendChild(oFooter)}this.buttonSpan=oSpan}else{oSpan=this.buttonSpan;oFooter=this.footer;if(oSpan&&oFooter){oFooter.removeChild(oSpan);this.buttonSpan=null;this.firstButton=null;this.lastButton=null;this.defaultHtmlButton=null}}this.changeContentEvent.fire()},getButtons:function(){return this._aButtons||null},focusFirst:function(type,args,obj){var el=this.firstFormElement;if(args&&args[1]){Event.stopEvent(args[1])}if(el){try{el.focus()}catch(oException){}}else{if(this.defaultHtmlButton){this.focusDefaultButton()}else{this.focusFirstButton()}}},focusLast:function(type,args,obj){var aButtons=this.cfg.getProperty("buttons"),el=this.lastFormElement;if(args&&args[1]){Event.stopEvent(args[1])}if(aButtons&&Lang.isArray(aButtons)){this.focusLastButton()}else{if(el){try{el.focus()}catch(oException){}}}},_getButton:function(button){var Button=YAHOO.widget.Button;if(Button&&button&&button.nodeName&&button.id){button=Button.getButton(button.id)||button}return button},focusDefaultButton:function(){var button=this._getButton(this.defaultHtmlButton);if(button){try{button.focus()}catch(oException){}}},blurButtons:function(){var aButtons=this.cfg.getProperty("buttons"),nButtons,oButton,oElement,i;if(aButtons&&Lang.isArray(aButtons)){nButtons=aButtons.length;if(nButtons>0){i=(nButtons-1);do{oButton=aButtons[i];if(oButton){oElement=this._getButton(oButton.htmlButton);if(oElement){try{oElement.blur()}catch(oException){}}}}while(i--)}}},focusFirstButton:function(){var aButtons=this.cfg.getProperty("buttons"),oButton,oElement;if(aButtons&&Lang.isArray(aButtons)){oButton=aButtons[0];if(oButton){oElement=this._getButton(oButton.htmlButton);if(oElement){try{oElement.focus()}catch(oException){}}}}},focusLastButton:function(){var aButtons=this.cfg.getProperty("buttons"),nButtons,oButton,oElement;if(aButtons&&Lang.isArray(aButtons)){nButtons=aButtons.length;if(nButtons>0){oButton=aButtons[(nButtons-1)];if(oButton){oElement=this._getButton(oButton.htmlButton);if(oElement){try{oElement.focus()}catch(oException){}}}}}},configPostMethod:function(type,args,obj){this.registerForm()},validate:function(){return true},submit:function(){if(this.validate()){this.beforeSubmitEvent.fire();this.doSubmit();this.submitEvent.fire();if(this.cfg.getProperty("hideaftersubmit")){this.hide()}return true}else{return false}},cancel:function(){this.cancelEvent.fire();this.hide()},getData:function(){var oForm=this.form,aElements,nTotalElements,oData,sName,oElement,nElements,sType,sTagName,aOptions,nOptions,aValues,oOption,sValue,oRadio,oCheckbox,i,n;function isFormElement(p_oElement){var sTag=p_oElement.tagName.toUpperCase();return((sTag=="INPUT"||sTag=="TEXTAREA"||sTag=="SELECT")&&p_oElement.name==sName)}if(oForm){aElements=oForm.elements;nTotalElements=aElements.length;oData={};for(i=0;i<nTotalElements;i++){sName=aElements[i].name;oElement=Dom.getElementsBy(isFormElement,"*",oForm);nElements=oElement.length;if(nElements>0){if(nElements==1){oElement=oElement[0];sType=oElement.type;sTagName=oElement.tagName.toUpperCase();switch(sTagName){case"INPUT":if(sType=="checkbox"){oData[sName]=oElement.checked}else if(sType!="radio"){oData[sName]=oElement.value}break;case"TEXTAREA":oData[sName]=oElement.value;break;case"SELECT":aOptions=oElement.options;nOptions=aOptions.length;aValues=[];for(n=0;n<nOptions;n++){oOption=aOptions[n];if(oOption.selected){sValue=oOption.value;if(!sValue||sValue===""){sValue=oOption.text}aValues[aValues.length]=sValue}}oData[sName]=aValues;break}}else{sType=oElement[0].type;switch(sType){case"radio":for(n=0;n<nElements;n++){oRadio=oElement[n];if(oRadio.checked){oData[sName]=oRadio.value;break}}break;case"checkbox":aValues=[];for(n=0;n<nElements;n++){oCheckbox=oElement[n];if(oCheckbox.checked){aValues[aValues.length]=oCheckbox.value}}oData[sName]=aValues;break}}}}}return oData},destroy:function(){removeButtonEventHandlers.call(this);this._aButtons=null;var aForms=this.element.getElementsByTagName("form"),oForm;if(aForms.length>0){oForm=aForms[0];if(oForm){Event.purgeElement(oForm);if(oForm.parentNode){oForm.parentNode.removeChild(oForm)}this.form=null}}Dialog.superclass.destroy.call(this)},toString:function(){return"Dialog "+this.id}})}());(function(){YAHOO.widget.SimpleDialog=function(el,userConfig){YAHOO.widget.SimpleDialog.superclass.constructor.call(this,el,userConfig)};var Dom=YAHOO.util.Dom,SimpleDialog=YAHOO.widget.SimpleDialog,DEFAULT_CONFIG={"ICON":{key:"icon",value:"none",suppressEvent:true},"TEXT":{key:"text",value:"",suppressEvent:true,supercedes:["icon"]}};SimpleDialog.ICON_BLOCK="blckicon";SimpleDialog.ICON_ALARM="alrticon";SimpleDialog.ICON_HELP="hlpicon";SimpleDialog.ICON_INFO="infoicon";SimpleDialog.ICON_WARN="warnicon";SimpleDialog.ICON_TIP="tipicon";SimpleDialog.ICON_CSS_CLASSNAME="yui-icon";SimpleDialog.CSS_SIMPLEDIALOG="yui-simple-dialog";YAHOO.extend(SimpleDialog,YAHOO.widget.Dialog,{initDefaultConfig:function(){SimpleDialog.superclass.initDefaultConfig.call(this);this.cfg.addProperty(DEFAULT_CONFIG.ICON.key,{handler:this.configIcon,value:DEFAULT_CONFIG.ICON.value,suppressEvent:DEFAULT_CONFIG.ICON.suppressEvent});this.cfg.addProperty(DEFAULT_CONFIG.TEXT.key,{handler:this.configText,value:DEFAULT_CONFIG.TEXT.value,suppressEvent:DEFAULT_CONFIG.TEXT.suppressEvent,supercedes:DEFAULT_CONFIG.TEXT.supercedes})},init:function(el,userConfig){SimpleDialog.superclass.init.call(this,el);this.beforeInitEvent.fire(SimpleDialog);Dom.addClass(this.element,SimpleDialog.CSS_SIMPLEDIALOG);this.cfg.queueProperty("postmethod","manual");if(userConfig){this.cfg.applyConfig(userConfig,true)}this.beforeRenderEvent.subscribe(function(){if(!this.body){this.setBody("")}},this,true);this.initEvent.fire(SimpleDialog)},registerForm:function(){SimpleDialog.superclass.registerForm.call(this);this.form.innerHTML+="<input type=\"hidden\" name=\""+this.id+"\" value=\"\"/>"},configIcon:function(type,args,obj){var sIcon=args[0],oBody=this.body,sCSSClass=SimpleDialog.ICON_CSS_CLASSNAME,oIcon,oIconParent;if(sIcon&&sIcon!="none"){oIcon=Dom.getElementsByClassName(sCSSClass,"*",oBody);if(oIcon){oIconParent=oIcon.parentNode;if(oIconParent){oIconParent.removeChild(oIcon);oIcon=null}}if(sIcon.indexOf(".")==-1){oIcon=document.createElement("span");oIcon.className=(sCSSClass+" "+sIcon);oIcon.innerHTML="&#160;"}else{oIcon=document.createElement("img");oIcon.src=(this.imageRoot+sIcon);oIcon.className=sCSSClass}if(oIcon){oBody.insertBefore(oIcon,oBody.firstChild)}}},configText:function(type,args,obj){var text=args[0];if(text){this.setBody(text);this.cfg.refireEvent("icon")}},toString:function(){return"SimpleDialog "+this.id}})}());(function(){YAHOO.widget.ContainerEffect=function(overlay,attrIn,attrOut,targetElement,animClass){if(!animClass){animClass=YAHOO.util.Anim}this.overlay=overlay;this.attrIn=attrIn;this.attrOut=attrOut;this.targetElement=targetElement||overlay.element;this.animClass=animClass};var Dom=YAHOO.util.Dom,CustomEvent=YAHOO.util.CustomEvent,ContainerEffect=YAHOO.widget.ContainerEffect;ContainerEffect.FADE=function(overlay,dur){var Easing=YAHOO.util.Easing,fin={attributes:{opacity:{from:0,to:1}},duration:dur,method:Easing.easeIn},fout={attributes:{opacity:{to:0}},duration:dur,method:Easing.easeOut},fade=new ContainerEffect(overlay,fin,fout,overlay.element);fade.handleUnderlayStart=function(){var underlay=this.overlay.underlay;if(underlay&&YAHOO.env.ua.ie){var hasFilters=(underlay.filters&&underlay.filters.length>0);if(hasFilters){Dom.addClass(overlay.element,"yui-effect-fade")}}};fade.handleUnderlayComplete=function(){var underlay=this.overlay.underlay;if(underlay&&YAHOO.env.ua.ie){Dom.removeClass(overlay.element,"yui-effect-fade")}};fade.handleStartAnimateIn=function(type,args,obj){Dom.addClass(obj.overlay.element,"hide-select");if(!obj.overlay.underlay){obj.overlay.cfg.refireEvent("underlay")}obj.handleUnderlayStart();obj.overlay._setDomVisibility(true);Dom.setStyle(obj.overlay.element,"opacity",0)};fade.handleCompleteAnimateIn=function(type,args,obj){Dom.removeClass(obj.overlay.element,"hide-select");if(obj.overlay.element.style.filter){obj.overlay.element.style.filter=null}obj.handleUnderlayComplete();obj.overlay.cfg.refireEvent("iframe");obj.animateInCompleteEvent.fire()};fade.handleStartAnimateOut=function(type,args,obj){Dom.addClass(obj.overlay.element,"hide-select");obj.handleUnderlayStart()};fade.handleCompleteAnimateOut=function(type,args,obj){Dom.removeClass(obj.overlay.element,"hide-select");if(obj.overlay.element.style.filter){obj.overlay.element.style.filter=null}obj.overlay._setDomVisibility(false);Dom.setStyle(obj.overlay.element,"opacity",1);obj.handleUnderlayComplete();obj.overlay.cfg.refireEvent("iframe");obj.animateOutCompleteEvent.fire()};fade.init();return fade};ContainerEffect.SLIDE=function(overlay,dur){var Easing=YAHOO.util.Easing,x=overlay.cfg.getProperty("x")||Dom.getX(overlay.element),y=overlay.cfg.getProperty("y")||Dom.getY(overlay.element),clientWidth=Dom.getClientWidth(),offsetWidth=overlay.element.offsetWidth,sin={attributes:{points:{to:[x,y]}},duration:dur,method:Easing.easeIn},sout={attributes:{points:{to:[(clientWidth+25),y]}},duration:dur,method:Easing.easeOut},slide=new ContainerEffect(overlay,sin,sout,overlay.element,YAHOO.util.Motion);slide.handleStartAnimateIn=function(type,args,obj){obj.overlay.element.style.left=((-25)-offsetWidth)+"px";obj.overlay.element.style.top=y+"px"};slide.handleTweenAnimateIn=function(type,args,obj){var pos=Dom.getXY(obj.overlay.element),currentX=pos[0],currentY=pos[1];if(Dom.getStyle(obj.overlay.element,"visibility")=="hidden"&&currentX<x){obj.overlay._setDomVisibility(true)}obj.overlay.cfg.setProperty("xy",[currentX,currentY],true);obj.overlay.cfg.refireEvent("iframe")};slide.handleCompleteAnimateIn=function(type,args,obj){obj.overlay.cfg.setProperty("xy",[x,y],true);obj.startX=x;obj.startY=y;obj.overlay.cfg.refireEvent("iframe");obj.animateInCompleteEvent.fire()};slide.handleStartAnimateOut=function(type,args,obj){var vw=Dom.getViewportWidth(),pos=Dom.getXY(obj.overlay.element),yso=pos[1];obj.animOut.attributes.points.to=[(vw+25),yso]};slide.handleTweenAnimateOut=function(type,args,obj){var pos=Dom.getXY(obj.overlay.element),xto=pos[0],yto=pos[1];obj.overlay.cfg.setProperty("xy",[xto,yto],true);obj.overlay.cfg.refireEvent("iframe")};slide.handleCompleteAnimateOut=function(type,args,obj){obj.overlay._setDomVisibility(false);obj.overlay.cfg.setProperty("xy",[x,y]);obj.animateOutCompleteEvent.fire()};slide.init();return slide};ContainerEffect.prototype={init:function(){this.beforeAnimateInEvent=this.createEvent("beforeAnimateIn");this.beforeAnimateInEvent.signature=CustomEvent.LIST;this.beforeAnimateOutEvent=this.createEvent("beforeAnimateOut");this.beforeAnimateOutEvent.signature=CustomEvent.LIST;this.animateInCompleteEvent=this.createEvent("animateInComplete");this.animateInCompleteEvent.signature=CustomEvent.LIST;this.animateOutCompleteEvent=this.createEvent("animateOutComplete");this.animateOutCompleteEvent.signature=CustomEvent.LIST;this.animIn=new this.animClass(this.targetElement,this.attrIn.attributes,this.attrIn.duration,this.attrIn.method);this.animIn.onStart.subscribe(this.handleStartAnimateIn,this);this.animIn.onTween.subscribe(this.handleTweenAnimateIn,this);this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn,this);this.animOut=new this.animClass(this.targetElement,this.attrOut.attributes,this.attrOut.duration,this.attrOut.method);this.animOut.onStart.subscribe(this.handleStartAnimateOut,this);this.animOut.onTween.subscribe(this.handleTweenAnimateOut,this);this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut,this)},animateIn:function(){this.beforeAnimateInEvent.fire();this.animIn.animate()},animateOut:function(){this.beforeAnimateOutEvent.fire();this.animOut.animate()},handleStartAnimateIn:function(type,args,obj){},handleTweenAnimateIn:function(type,args,obj){},handleCompleteAnimateIn:function(type,args,obj){},handleStartAnimateOut:function(type,args,obj){},handleTweenAnimateOut:function(type,args,obj){},handleCompleteAnimateOut:function(type,args,obj){},toString:function(){var output="ContainerEffect";if(this.overlay){output+=" ["+this.overlay.toString()+"]"}return output}};YAHOO.lang.augmentProto(ContainerEffect,YAHOO.util.EventProvider)})();YAHOO.register("container",YAHOO.widget.Module,{version:"2.7.0",build:"1799"});
312   -/*
  298 +}else{E.Dom.setXY(H,E.Dom.getXY(H));}G=this.getAttribute("points");if(D(J["points"]["to"])){I=B.call(this,J["points"]["to"],G);var N=E.Dom.getXY(this.getEl());for(M=0,O=L.length;M<O;++M){L[M]=B.call(this,L[M],G);}}else{if(D(J["points"]["by"])){I=[G[0]+J["points"]["by"][0],G[1]+J["points"]["by"][1]];for(M=0,O=L.length;M<O;++M){L[M]=[G[0]+L[M][0],G[1]+L[M][1]];}}}this.runtimeAttributes[P]=[G];if(L.length>0){this.runtimeAttributes[P]=this.runtimeAttributes[P].concat(L);}this.runtimeAttributes[P][this.runtimeAttributes[P].length]=I;}else{F.setRuntimeAttribute.call(this,P);}};var B=function(G,I){var H=E.Dom.getXY(this.getEl());G=[G[0]-H[0]+I[0],G[1]-H[1]+I[1]];return G;};var D=function(G){return(typeof G!=="undefined");};E.Motion=A;})();(function(){var D=function(F,E,G,H){if(F){D.superclass.constructor.call(this,F,E,G,H);}};D.NAME="Scroll";var B=YAHOO.util;YAHOO.extend(D,B.ColorAnim);var C=D.superclass;var A=D.prototype;A.doMethod=function(E,H,F){var G=null;if(E=="scroll"){G=[this.method(this.currentFrame,H[0],F[0]-H[0],this.totalFrames),this.method(this.currentFrame,H[1],F[1]-H[1],this.totalFrames)];}else{G=C.doMethod.call(this,E,H,F);}return G;};A.getAttribute=function(E){var G=null;var F=this.getEl();if(E=="scroll"){G=[F.scrollLeft,F.scrollTop];}else{G=C.getAttribute.call(this,E);}return G;};A.setAttribute=function(E,H,G){var F=this.getEl();if(E=="scroll"){F.scrollLeft=H[0];F.scrollTop=H[1];}else{C.setAttribute.call(this,E,H,G);}};B.Scroll=D;})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.7.0",build:"1799"});(function(){YAHOO.util.Config=function(owner){if(owner){this.init(owner)}};var Lang=YAHOO.lang,CustomEvent=YAHOO.util.CustomEvent,Config=YAHOO.util.Config;Config.CONFIG_CHANGED_EVENT="configChanged";Config.BOOLEAN_TYPE="boolean";Config.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(owner){this.owner=owner;this.configChangedEvent=this.createEvent(Config.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=CustomEvent.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[]},checkBoolean:function(val){return(typeof val==Config.BOOLEAN_TYPE)},checkNumber:function(val){return(!isNaN(val))},fireEvent:function(key,value){var property=this.config[key];if(property&&property.event){property.event.fire(value)}},addProperty:function(key,propertyObject){key=key.toLowerCase();this.config[key]=propertyObject;propertyObject.event=this.createEvent(key,{scope:this.owner});propertyObject.event.signature=CustomEvent.LIST;propertyObject.key=key;if(propertyObject.handler){propertyObject.event.subscribe(propertyObject.handler,this.owner)}this.setProperty(key,propertyObject.value,true);if(!propertyObject.suppressEvent){this.queueProperty(key,propertyObject.value)}},getConfig:function(){var cfg={},currCfg=this.config,prop,property;for(prop in currCfg){if(Lang.hasOwnProperty(currCfg,prop)){property=currCfg[prop];if(property&&property.event){cfg[prop]=property.value}}}return cfg},getProperty:function(key){var property=this.config[key.toLowerCase()];if(property&&property.event){return property.value}else{return undefined}},resetProperty:function(key){key=key.toLowerCase();var property=this.config[key];if(property&&property.event){if(this.initialConfig[key]&&!Lang.isUndefined(this.initialConfig[key])){this.setProperty(key,this.initialConfig[key]);return true}}else{return false}},setProperty:function(key,value,silent){var property;key=key.toLowerCase();if(this.queueInProgress&&!silent){this.queueProperty(key,value);return true}else{property=this.config[key];if(property&&property.event){if(property.validator&&!property.validator(value)){return false}else{property.value=value;if(!silent){this.fireEvent(key,value);this.configChangedEvent.fire([key,value])}return true}}else{return false}}},queueProperty:function(key,value){key=key.toLowerCase();var property=this.config[key],foundDuplicate=false,iLen,queueItem,queueItemKey,queueItemValue,sLen,supercedesCheck,qLen,queueItemCheck,queueItemCheckKey,queueItemCheckValue,i,s,q;if(property&&property.event){if(!Lang.isUndefined(value)&&property.validator&&!property.validator(value)){return false}else{if(!Lang.isUndefined(value)){property.value=value}else{value=property.value}foundDuplicate=false;iLen=this.eventQueue.length;for(i=0;i<iLen;i++){queueItem=this.eventQueue[i];if(queueItem){queueItemKey=queueItem[0];queueItemValue=queueItem[1];if(queueItemKey==key){this.eventQueue[i]=null;this.eventQueue.push([key,(!Lang.isUndefined(value)?value:queueItemValue)]);foundDuplicate=true;break}}}if(!foundDuplicate&&!Lang.isUndefined(value)){this.eventQueue.push([key,value])}}if(property.supercedes){sLen=property.supercedes.length;for(s=0;s<sLen;s++){supercedesCheck=property.supercedes[s];qLen=this.eventQueue.length;for(q=0;q<qLen;q++){queueItemCheck=this.eventQueue[q];if(queueItemCheck){queueItemCheckKey=queueItemCheck[0];queueItemCheckValue=queueItemCheck[1];if(queueItemCheckKey==supercedesCheck.toLowerCase()){this.eventQueue.push([queueItemCheckKey,queueItemCheckValue]);this.eventQueue[q]=null;break}}}}}return true}else{return false}},refireEvent:function(key){key=key.toLowerCase();var property=this.config[key];if(property&&property.event&&!Lang.isUndefined(property.value)){if(this.queueInProgress){this.queueProperty(key)}else{this.fireEvent(key,property.value)}}},applyConfig:function(userConfig,init){var sKey,oConfig;if(init){oConfig={};for(sKey in userConfig){if(Lang.hasOwnProperty(userConfig,sKey)){oConfig[sKey.toLowerCase()]=userConfig[sKey]}}this.initialConfig=oConfig}for(sKey in userConfig){if(Lang.hasOwnProperty(userConfig,sKey)){this.queueProperty(sKey,userConfig[sKey])}}},refresh:function(){var prop;for(prop in this.config){if(Lang.hasOwnProperty(this.config,prop)){this.refireEvent(prop)}}},fireQueue:function(){var i,queueItem,key,value,property;this.queueInProgress=true;for(i=0;i<this.eventQueue.length;i++){queueItem=this.eventQueue[i];if(queueItem){key=queueItem[0];value=queueItem[1];property=this.config[key];property.value=value;this.eventQueue[i]=null;this.fireEvent(key,value)}}this.queueInProgress=false;this.eventQueue=[]},subscribeToConfigEvent:function(key,handler,obj,override){var property=this.config[key.toLowerCase()];if(property&&property.event){if(!Config.alreadySubscribed(property.event,handler,obj)){property.event.subscribe(handler,obj,override)}return true}else{return false}},unsubscribeFromConfigEvent:function(key,handler,obj){var property=this.config[key.toLowerCase()];if(property&&property.event){return property.event.unsubscribe(handler,obj)}else{return false}},toString:function(){var output="Config";if(this.owner){output+=" ["+this.owner.toString()+"]"}return output},outputEventQueue:function(){var output="",queueItem,q,nQueue=this.eventQueue.length;for(q=0;q<nQueue;q++){queueItem=this.eventQueue[q];if(queueItem){output+=queueItem[0]+"="+queueItem[1]+", "}}return output},destroy:function(){var oConfig=this.config,sProperty,oProperty;for(sProperty in oConfig){if(Lang.hasOwnProperty(oConfig,sProperty)){oProperty=oConfig[sProperty];oProperty.event.unsubscribeAll();oProperty.event=null}}this.configChangedEvent.unsubscribeAll();this.configChangedEvent=null;this.owner=null;this.config=null;this.initialConfig=null;this.eventQueue=null}};Config.alreadySubscribed=function(evt,fn,obj){var nSubscribers=evt.subscribers.length,subsc,i;if(nSubscribers>0){i=nSubscribers-1;do{subsc=evt.subscribers[i];if(subsc&&subsc.obj==obj&&subsc.fn==fn){return true}}while(i--)}return false};YAHOO.lang.augmentProto(Config,YAHOO.util.EventProvider)}());(function(){YAHOO.widget.Module=function(el,userConfig){if(el){this.init(el,userConfig)}else{}};var Dom=YAHOO.util.Dom,Config=YAHOO.util.Config,Event=YAHOO.util.Event,CustomEvent=YAHOO.util.CustomEvent,Module=YAHOO.widget.Module,UA=YAHOO.env.ua,m_oModuleTemplate,m_oHeaderTemplate,m_oBodyTemplate,m_oFooterTemplate,EVENT_TYPES={"BEFORE_INIT":"beforeInit","INIT":"init","APPEND":"append","BEFORE_RENDER":"beforeRender","RENDER":"render","CHANGE_HEADER":"changeHeader","CHANGE_BODY":"changeBody","CHANGE_FOOTER":"changeFooter","CHANGE_CONTENT":"changeContent","DESTORY":"destroy","BEFORE_SHOW":"beforeShow","SHOW":"show","BEFORE_HIDE":"beforeHide","HIDE":"hide"},DEFAULT_CONFIG={"VISIBLE":{key:"visible",value:true,validator:YAHOO.lang.isBoolean},"EFFECT":{key:"effect",suppressEvent:true,supercedes:["visible"]},"MONITOR_RESIZE":{key:"monitorresize",value:true},"APPEND_TO_DOCUMENT_BODY":{key:"appendtodocumentbody",value:false}};Module.IMG_ROOT=null;Module.IMG_ROOT_SSL=null;Module.CSS_MODULE="yui-module";Module.CSS_HEADER="hd";Module.CSS_BODY="bd";Module.CSS_FOOTER="ft";Module.RESIZE_MONITOR_SECURE_URL="javascript:false;";Module.RESIZE_MONITOR_BUFFER=1;Module.textResizeEvent=new CustomEvent("textResize");Module.forceDocumentRedraw=function(){var docEl=document.documentElement;if(docEl){docEl.className+=" ";docEl.className=YAHOO.lang.trim(docEl.className)}};function createModuleTemplate(){if(!m_oModuleTemplate){m_oModuleTemplate=document.createElement("div");m_oModuleTemplate.innerHTML=("<div class=\""+Module.CSS_HEADER+"\"></div>"+"<div class=\""+Module.CSS_BODY+"\"></div><div class=\""+Module.CSS_FOOTER+"\"></div>");m_oHeaderTemplate=m_oModuleTemplate.firstChild;m_oBodyTemplate=m_oHeaderTemplate.nextSibling;m_oFooterTemplate=m_oBodyTemplate.nextSibling}return m_oModuleTemplate}function createHeader(){if(!m_oHeaderTemplate){createModuleTemplate()}return(m_oHeaderTemplate.cloneNode(false))}function createBody(){if(!m_oBodyTemplate){createModuleTemplate()}return(m_oBodyTemplate.cloneNode(false))}function createFooter(){if(!m_oFooterTemplate){createModuleTemplate()}return(m_oFooterTemplate.cloneNode(false))}Module.prototype={constructor:Module,element:null,header:null,body:null,footer:null,id:null,imageRoot:Module.IMG_ROOT,initEvents:function(){var SIGNATURE=CustomEvent.LIST;this.beforeInitEvent=this.createEvent(EVENT_TYPES.BEFORE_INIT);this.beforeInitEvent.signature=SIGNATURE;this.initEvent=this.createEvent(EVENT_TYPES.INIT);this.initEvent.signature=SIGNATURE;this.appendEvent=this.createEvent(EVENT_TYPES.APPEND);this.appendEvent.signature=SIGNATURE;this.beforeRenderEvent=this.createEvent(EVENT_TYPES.BEFORE_RENDER);this.beforeRenderEvent.signature=SIGNATURE;this.renderEvent=this.createEvent(EVENT_TYPES.RENDER);this.renderEvent.signature=SIGNATURE;this.changeHeaderEvent=this.createEvent(EVENT_TYPES.CHANGE_HEADER);this.changeHeaderEvent.signature=SIGNATURE;this.changeBodyEvent=this.createEvent(EVENT_TYPES.CHANGE_BODY);this.changeBodyEvent.signature=SIGNATURE;this.changeFooterEvent=this.createEvent(EVENT_TYPES.CHANGE_FOOTER);this.changeFooterEvent.signature=SIGNATURE;this.changeContentEvent=this.createEvent(EVENT_TYPES.CHANGE_CONTENT);this.changeContentEvent.signature=SIGNATURE;this.destroyEvent=this.createEvent(EVENT_TYPES.DESTORY);this.destroyEvent.signature=SIGNATURE;this.beforeShowEvent=this.createEvent(EVENT_TYPES.BEFORE_SHOW);this.beforeShowEvent.signature=SIGNATURE;this.showEvent=this.createEvent(EVENT_TYPES.SHOW);this.showEvent.signature=SIGNATURE;this.beforeHideEvent=this.createEvent(EVENT_TYPES.BEFORE_HIDE);this.beforeHideEvent.signature=SIGNATURE;this.hideEvent=this.createEvent(EVENT_TYPES.HIDE);this.hideEvent.signature=SIGNATURE},platform:function(){var ua=navigator.userAgent.toLowerCase();if(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1){return"windows"}else if(ua.indexOf("macintosh")!=-1){return"mac"}else{return false}}(),browser:function(){var ua=navigator.userAgent.toLowerCase();if(ua.indexOf('opera')!=-1){return'opera'}else if(ua.indexOf('msie 7')!=-1){return'ie7'}else if(ua.indexOf('msie')!=-1){return'ie'}else if(ua.indexOf('safari')!=-1){return'safari'}else if(ua.indexOf('gecko')!=-1){return'gecko'}else{return false}}(),isSecure:function(){if(window.location.href.toLowerCase().indexOf("https")===0){return true}else{return false}}(),initDefaultConfig:function(){this.cfg.addProperty(DEFAULT_CONFIG.VISIBLE.key,{handler:this.configVisible,value:DEFAULT_CONFIG.VISIBLE.value,validator:DEFAULT_CONFIG.VISIBLE.validator});this.cfg.addProperty(DEFAULT_CONFIG.EFFECT.key,{suppressEvent:DEFAULT_CONFIG.EFFECT.suppressEvent,supercedes:DEFAULT_CONFIG.EFFECT.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.MONITOR_RESIZE.key,{handler:this.configMonitorResize,value:DEFAULT_CONFIG.MONITOR_RESIZE.value});this.cfg.addProperty(DEFAULT_CONFIG.APPEND_TO_DOCUMENT_BODY.key,{value:DEFAULT_CONFIG.APPEND_TO_DOCUMENT_BODY.value})},init:function(el,userConfig){var elId,child;this.initEvents();this.beforeInitEvent.fire(Module);this.cfg=new Config(this);if(this.isSecure){this.imageRoot=Module.IMG_ROOT_SSL}if(typeof el=="string"){elId=el;el=document.getElementById(el);if(!el){el=(createModuleTemplate()).cloneNode(false);el.id=elId}}this.id=Dom.generateId(el);this.element=el;child=this.element.firstChild;if(child){var fndHd=false,fndBd=false,fndFt=false;do{if(1==child.nodeType){if(!fndHd&&Dom.hasClass(child,Module.CSS_HEADER)){this.header=child;fndHd=true}else if(!fndBd&&Dom.hasClass(child,Module.CSS_BODY)){this.body=child;fndBd=true}else if(!fndFt&&Dom.hasClass(child,Module.CSS_FOOTER)){this.footer=child;fndFt=true}}}while((child=child.nextSibling))}this.initDefaultConfig();Dom.addClass(this.element,Module.CSS_MODULE);if(userConfig){this.cfg.applyConfig(userConfig,true)}if(!Config.alreadySubscribed(this.renderEvent,this.cfg.fireQueue,this.cfg)){this.renderEvent.subscribe(this.cfg.fireQueue,this.cfg,true)}this.initEvent.fire(Module)},initResizeMonitor:function(){var isGeckoWin=(UA.gecko&&this.platform=="windows");if(isGeckoWin){var self=this;setTimeout(function(){self._initResizeMonitor()},0)}else{this._initResizeMonitor()}},_initResizeMonitor:function(){return;var oDoc,oIFrame,sHTML;function fireTextResize(){Module.textResizeEvent.fire()}if(!UA.opera){oIFrame=Dom.get("_yuiResizeMonitor");var supportsCWResize=this._supportsCWResize();if(!oIFrame){oIFrame=document.createElement("iframe");if(this.isSecure&&Module.RESIZE_MONITOR_SECURE_URL&&UA.ie){oIFrame.src=Module.RESIZE_MONITOR_SECURE_URL}if(!supportsCWResize){sHTML=["<html><head><script ","type=\"text/javascript\">","window.onresize=function(){window.parent.","YAHOO.widget.Module.textResizeEvent.","fire();};<","\/script></head>","<body></body></html>"].join('');oIFrame.src="data:text/html;charset=utf-8,"+encodeURIComponent(sHTML)}oIFrame.id="_yuiResizeMonitor";oIFrame.title="Text Resize Monitor";oIFrame.style.position="absolute";oIFrame.style.visibility="hidden";var db=document.body,fc=db.firstChild;if(fc){db.insertBefore(oIFrame,fc)}else{db.appendChild(oIFrame)}oIFrame.style.width="2em";oIFrame.style.height="2em";oIFrame.style.top=(-1*(oIFrame.offsetHeight+Module.RESIZE_MONITOR_BUFFER))+"px";oIFrame.style.left="0";oIFrame.style.borderWidth="0";oIFrame.style.visibility="visible";if(UA.webkit){oDoc=oIFrame.contentWindow.document;oDoc.open();oDoc.close()}}if(oIFrame&&oIFrame.contentWindow){Module.textResizeEvent.subscribe(this.onDomResize,this,true);if(!Module.textResizeInitialized){if(supportsCWResize){if(!Event.on(oIFrame.contentWindow,"resize",fireTextResize)){Event.on(oIFrame,"resize",fireTextResize)}}Module.textResizeInitialized=true}this.resizeMonitor=oIFrame}}},_supportsCWResize:function(){var bSupported=true;if(UA.gecko&&UA.gecko<=1.8){bSupported=false}return bSupported},onDomResize:function(e,obj){var nTop=-1*(this.resizeMonitor.offsetHeight+Module.RESIZE_MONITOR_BUFFER);this.resizeMonitor.style.top=nTop+"px";this.resizeMonitor.style.left="0"},setHeader:function(headerContent){var oHeader=this.header||(this.header=createHeader());if(headerContent.nodeName){oHeader.innerHTML="";oHeader.appendChild(headerContent)}else{oHeader.innerHTML=headerContent}this.changeHeaderEvent.fire(headerContent);this.changeContentEvent.fire()},appendToHeader:function(element){var oHeader=this.header||(this.header=createHeader());oHeader.appendChild(element);this.changeHeaderEvent.fire(element);this.changeContentEvent.fire()},setBody:function(bodyContent){var oBody=this.body||(this.body=createBody());if(bodyContent.nodeName){oBody.innerHTML="";oBody.appendChild(bodyContent)}else{oBody.innerHTML=bodyContent}this.changeBodyEvent.fire(bodyContent);this.changeContentEvent.fire()},appendToBody:function(element){var oBody=this.body||(this.body=createBody());oBody.appendChild(element);this.changeBodyEvent.fire(element);this.changeContentEvent.fire()},setFooter:function(footerContent){var oFooter=this.footer||(this.footer=createFooter());if(footerContent.nodeName){oFooter.innerHTML="";oFooter.appendChild(footerContent)}else{oFooter.innerHTML=footerContent}this.changeFooterEvent.fire(footerContent);this.changeContentEvent.fire()},appendToFooter:function(element){var oFooter=this.footer||(this.footer=createFooter());oFooter.appendChild(element);this.changeFooterEvent.fire(element);this.changeContentEvent.fire()},render:function(appendToNode,moduleElement){var me=this,firstChild;function appendTo(parentNode){if(typeof parentNode=="string"){parentNode=document.getElementById(parentNode)}if(parentNode){me._addToParent(parentNode,me.element);me.appendEvent.fire()}}this.beforeRenderEvent.fire();if(!moduleElement){moduleElement=this.element}if(appendToNode){appendTo(appendToNode)}else{if(!Dom.inDocument(this.element)){return false}}if(this.header&&!Dom.inDocument(this.header)){firstChild=moduleElement.firstChild;if(firstChild){moduleElement.insertBefore(this.header,firstChild)}else{moduleElement.appendChild(this.header)}}if(this.body&&!Dom.inDocument(this.body)){if(this.footer&&Dom.isAncestor(this.moduleElement,this.footer)){moduleElement.insertBefore(this.body,this.footer)}else{moduleElement.appendChild(this.body)}}if(this.footer&&!Dom.inDocument(this.footer)){moduleElement.appendChild(this.footer)}this.renderEvent.fire();return true},destroy:function(){var parent;if(this.element){Event.purgeElement(this.element,true);parent=this.element.parentNode}if(parent){parent.removeChild(this.element)}this.element=null;this.header=null;this.body=null;this.footer=null;Module.textResizeEvent.unsubscribe(this.onDomResize,this);if(this.cfg){this.cfg.destroy();this.cfg=null}this.destroyEvent.fire()},show:function(){this.cfg.setProperty("visible",true)},hide:function(){if(this.cfg)this.cfg.setProperty("visible",false)},configVisible:function(type,args,obj){var visible=args[0];if(visible){this.beforeShowEvent.fire();Dom.setStyle(this.element,"display","block");this.showEvent.fire()}else{this.beforeHideEvent.fire();Dom.setStyle(this.element,"display","none");this.hideEvent.fire()}},configMonitorResize:function(type,args,obj){var monitor=args[0];if(monitor){this.initResizeMonitor()}else{Module.textResizeEvent.unsubscribe(this.onDomResize,this,true);this.resizeMonitor=null}},_addToParent:function(parentNode,element){if(!this.cfg.getProperty("appendtodocumentbody")&&parentNode===document.body&&parentNode.firstChild){parentNode.insertBefore(element,parentNode.firstChild)}else{parentNode.appendChild(element)}},toString:function(){return"Module "+this.id}};YAHOO.lang.augmentProto(Module,YAHOO.util.EventProvider)}());(function(){YAHOO.widget.Overlay=function(el,userConfig){YAHOO.widget.Overlay.superclass.constructor.call(this,el,userConfig)};var Lang=YAHOO.lang,CustomEvent=YAHOO.util.CustomEvent,Module=YAHOO.widget.Module,Event=YAHOO.util.Event,Dom=YAHOO.util.Dom,Config=YAHOO.util.Config,UA=YAHOO.env.ua,Overlay=YAHOO.widget.Overlay,_SUBSCRIBE="subscribe",_UNSUBSCRIBE="unsubscribe",_CONTAINED="contained",m_oIFrameTemplate,EVENT_TYPES={"BEFORE_MOVE":"beforeMove","MOVE":"move"},DEFAULT_CONFIG={"X":{key:"x",validator:Lang.isNumber,suppressEvent:true,supercedes:["iframe"]},"Y":{key:"y",validator:Lang.isNumber,suppressEvent:true,supercedes:["iframe"]},"XY":{key:"xy",suppressEvent:true,supercedes:["iframe"]},"CONTEXT":{key:"context",suppressEvent:true,supercedes:["iframe"]},"FIXED_CENTER":{key:"fixedcenter",value:false,supercedes:["iframe","visible"]},"WIDTH":{key:"width",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"HEIGHT":{key:"height",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"AUTO_FILL_HEIGHT":{key:"autofillheight",supercedes:["height"],value:"body"},"ZINDEX":{key:"zindex",value:null},"CONSTRAIN_TO_VIEWPORT":{key:"constraintoviewport",value:false,validator:Lang.isBoolean,supercedes:["iframe","x","y","xy"]},"IFRAME":{key:"iframe",value:(UA.ie==6?true:false),validator:Lang.isBoolean,supercedes:["zindex"]},"PREVENT_CONTEXT_OVERLAP":{key:"preventcontextoverlap",value:false,validator:Lang.isBoolean,supercedes:["constraintoviewport"]}};Overlay.IFRAME_SRC="javascript:false;";Overlay.IFRAME_OFFSET=3;Overlay.VIEWPORT_OFFSET=10;Overlay.TOP_LEFT="tl";Overlay.TOP_RIGHT="tr";Overlay.BOTTOM_LEFT="bl";Overlay.BOTTOM_RIGHT="br";Overlay.CSS_OVERLAY="yui-overlay";Overlay.STD_MOD_RE=/^\s*?(body|footer|header)\s*?$/i;Overlay.windowScrollEvent=new CustomEvent("windowScroll");Overlay.windowResizeEvent=new CustomEvent("windowResize");Overlay.windowScrollHandler=function(e){var t=Event.getTarget(e);if(!t||t===window||t===window.document){if(UA.ie){if(!window.scrollEnd){window.scrollEnd=-1}clearTimeout(window.scrollEnd);window.scrollEnd=setTimeout(function(){Overlay.windowScrollEvent.fire()},1)}else{Overlay.windowScrollEvent.fire()}}};Overlay.windowResizeHandler=function(e){if(UA.ie){if(!window.resizeEnd){window.resizeEnd=-1}clearTimeout(window.resizeEnd);window.resizeEnd=setTimeout(function(){Overlay.windowResizeEvent.fire()},100)}else{Overlay.windowResizeEvent.fire()}};Overlay._initialized=null;if(Overlay._initialized===null){Event.on(window,"scroll",Overlay.windowScrollHandler);Event.on(window,"resize",Overlay.windowResizeHandler);Overlay._initialized=true}Overlay._TRIGGER_MAP={"windowScroll":Overlay.windowScrollEvent,"windowResize":Overlay.windowResizeEvent,"textResize":Module.textResizeEvent};YAHOO.extend(Overlay,Module,{CONTEXT_TRIGGERS:[],init:function(el,userConfig){Overlay.superclass.init.call(this,el);this.beforeInitEvent.fire(Overlay);Dom.addClass(this.element,Overlay.CSS_OVERLAY);if(userConfig){this.cfg.applyConfig(userConfig,true)}if(this.platform=="mac"&&UA.gecko){if(!Config.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this)){this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true)}if(!Config.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this)){this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true)}}this.initEvent.fire(Overlay)},initEvents:function(){Overlay.superclass.initEvents.call(this);var SIGNATURE=CustomEvent.LIST;this.beforeMoveEvent=this.createEvent(EVENT_TYPES.BEFORE_MOVE);this.beforeMoveEvent.signature=SIGNATURE;this.moveEvent=this.createEvent(EVENT_TYPES.MOVE);this.moveEvent.signature=SIGNATURE},initDefaultConfig:function(){Overlay.superclass.initDefaultConfig.call(this);var cfg=this.cfg;cfg.addProperty(DEFAULT_CONFIG.X.key,{handler:this.configX,validator:DEFAULT_CONFIG.X.validator,suppressEvent:DEFAULT_CONFIG.X.suppressEvent,supercedes:DEFAULT_CONFIG.X.supercedes});cfg.addProperty(DEFAULT_CONFIG.Y.key,{handler:this.configY,validator:DEFAULT_CONFIG.Y.validator,suppressEvent:DEFAULT_CONFIG.Y.suppressEvent,supercedes:DEFAULT_CONFIG.Y.supercedes});cfg.addProperty(DEFAULT_CONFIG.XY.key,{handler:this.configXY,suppressEvent:DEFAULT_CONFIG.XY.suppressEvent,supercedes:DEFAULT_CONFIG.XY.supercedes});cfg.addProperty(DEFAULT_CONFIG.CONTEXT.key,{handler:this.configContext,suppressEvent:DEFAULT_CONFIG.CONTEXT.suppressEvent,supercedes:DEFAULT_CONFIG.CONTEXT.supercedes});cfg.addProperty(DEFAULT_CONFIG.FIXED_CENTER.key,{handler:this.configFixedCenter,value:DEFAULT_CONFIG.FIXED_CENTER.value,validator:DEFAULT_CONFIG.FIXED_CENTER.validator,supercedes:DEFAULT_CONFIG.FIXED_CENTER.supercedes});cfg.addProperty(DEFAULT_CONFIG.WIDTH.key,{handler:this.configWidth,suppressEvent:DEFAULT_CONFIG.WIDTH.suppressEvent,supercedes:DEFAULT_CONFIG.WIDTH.supercedes});cfg.addProperty(DEFAULT_CONFIG.HEIGHT.key,{handler:this.configHeight,suppressEvent:DEFAULT_CONFIG.HEIGHT.suppressEvent,supercedes:DEFAULT_CONFIG.HEIGHT.supercedes});cfg.addProperty(DEFAULT_CONFIG.AUTO_FILL_HEIGHT.key,{handler:this.configAutoFillHeight,value:DEFAULT_CONFIG.AUTO_FILL_HEIGHT.value,validator:this._validateAutoFill,supercedes:DEFAULT_CONFIG.AUTO_FILL_HEIGHT.supercedes});cfg.addProperty(DEFAULT_CONFIG.ZINDEX.key,{handler:this.configzIndex,value:DEFAULT_CONFIG.ZINDEX.value});cfg.addProperty(DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.key,{handler:this.configConstrainToViewport,value:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.value,validator:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.validator,supercedes:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.supercedes});cfg.addProperty(DEFAULT_CONFIG.IFRAME.key,{handler:this.configIframe,value:DEFAULT_CONFIG.IFRAME.value,validator:DEFAULT_CONFIG.IFRAME.validator,supercedes:DEFAULT_CONFIG.IFRAME.supercedes});cfg.addProperty(DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.key,{value:DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.value,validator:DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.validator,supercedes:DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.supercedes})},moveTo:function(x,y){this.cfg.setProperty("xy",[x,y])},hideMacGeckoScrollbars:function(){Dom.replaceClass(this.element,"show-scrollbars","hide-scrollbars")},showMacGeckoScrollbars:function(){Dom.replaceClass(this.element,"hide-scrollbars","show-scrollbars")},_setDomVisibility:function(show){Dom.setStyle(this.element,"visibility",(show)?"visible":"hidden");if(show){Dom.removeClass(this.element,"yui-overlay-hidden")}else{Dom.addClass(this.element,"yui-overlay-hidden")}},configVisible:function(type,args,obj){var visible=args[0],currentVis=Dom.getStyle(this.element,"visibility"),effect=this.cfg.getProperty("effect"),effectInstances=[],isMacGecko=(this.platform=="mac"&&UA.gecko),alreadySubscribed=Config.alreadySubscribed,eff,ei,e,i,j,k,h,nEffects,nEffectInstances;if(currentVis=="inherit"){e=this.element.parentNode;while(e.nodeType!=9&&e.nodeType!=11){currentVis=Dom.getStyle(e,"visibility");if(currentVis!="inherit"){break}e=e.parentNode}if(currentVis=="inherit"){currentVis="visible"}}if(effect){if(effect instanceof Array){nEffects=effect.length;for(i=0;i<nEffects;i++){eff=effect[i];effectInstances[effectInstances.length]=eff.effect(this,eff.duration)}}else{effectInstances[effectInstances.length]=effect.effect(this,effect.duration)}}if(visible){if(isMacGecko){this.showMacGeckoScrollbars()}if(effect){if(visible){if(currentVis!="visible"||currentVis===""){this.beforeShowEvent.fire();nEffectInstances=effectInstances.length;for(j=0;j<nEffectInstances;j++){ei=effectInstances[j];if(j===0&&!alreadySubscribed(ei.animateInCompleteEvent,this.showEvent.fire,this.showEvent)){ei.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,true)}ei.animateIn()}}}}else{if(currentVis!="visible"||currentVis===""){this.beforeShowEvent.fire();this._setDomVisibility(true);this.cfg.refireEvent("iframe");this.showEvent.fire()}else{this._setDomVisibility(true)}}}else{if(isMacGecko){this.hideMacGeckoScrollbars()}if(effect){if(currentVis=="visible"){this.beforeHideEvent.fire();nEffectInstances=effectInstances.length;for(k=0;k<nEffectInstances;k++){h=effectInstances[k];if(k===0&&!alreadySubscribed(h.animateOutCompleteEvent,this.hideEvent.fire,this.hideEvent)){h.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,true)}h.animateOut()}}else if(currentVis===""){this._setDomVisibility(false)}}else{if(currentVis=="visible"||currentVis===""){this.beforeHideEvent.fire();this._setDomVisibility(false);this.hideEvent.fire()}else{this._setDomVisibility(false)}}}},doCenterOnDOMEvent:function(){var cfg=this.cfg,fc=cfg.getProperty("fixedcenter");if(cfg.getProperty("visible")){if(fc&&(fc!==_CONTAINED||this.fitsInViewport())){this.center()}}},fitsInViewport:function(){var nViewportOffset=Overlay.VIEWPORT_OFFSET,element=this.element,elementWidth=element.offsetWidth,elementHeight=element.offsetHeight,viewportWidth=Dom.getViewportWidth(),viewportHeight=Dom.getViewportHeight();return((elementWidth+nViewportOffset<viewportWidth)&&(elementHeight+nViewportOffset<viewportHeight))},configFixedCenter:function(type,args,obj){var val=args[0],alreadySubscribed=Config.alreadySubscribed,windowResizeEvent=Overlay.windowResizeEvent,windowScrollEvent=Overlay.windowScrollEvent;if(val){this.center();if(!alreadySubscribed(this.beforeShowEvent,this.center)){this.beforeShowEvent.subscribe(this.center)}if(!alreadySubscribed(windowResizeEvent,this.doCenterOnDOMEvent,this)){windowResizeEvent.subscribe(this.doCenterOnDOMEvent,this,true)}if(!alreadySubscribed(windowScrollEvent,this.doCenterOnDOMEvent,this)){windowScrollEvent.subscribe(this.doCenterOnDOMEvent,this,true)}}else{this.beforeShowEvent.unsubscribe(this.center);windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this)}},configHeight:function(type,args,obj){var height=args[0],el=this.element;Dom.setStyle(el,"height",height);this.cfg.refireEvent("iframe")},configAutoFillHeight:function(type,args,obj){var fillEl=args[0],cfg=this.cfg,autoFillHeight="autofillheight",height="height",currEl=cfg.getProperty(autoFillHeight),autoFill=this._autoFillOnHeightChange;cfg.unsubscribeFromConfigEvent(height,autoFill);Module.textResizeEvent.unsubscribe(autoFill);this.changeContentEvent.unsubscribe(autoFill);if(currEl&&fillEl!==currEl&&this[currEl]){Dom.setStyle(this[currEl],height,"")}if(fillEl){fillEl=Lang.trim(fillEl.toLowerCase());cfg.subscribeToConfigEvent(height,autoFill,this[fillEl],this);Module.textResizeEvent.subscribe(autoFill,this[fillEl],this);this.changeContentEvent.subscribe(autoFill,this[fillEl],this);cfg.setProperty(autoFillHeight,fillEl,true)}},configWidth:function(type,args,obj){var width=args[0],el=this.element;Dom.setStyle(el,"width",width);this.cfg.refireEvent("iframe")},configzIndex:function(type,args,obj){var zIndex=args[0],el=this.element;if(!zIndex){zIndex=Dom.getStyle(el,"zIndex");if(!zIndex||isNaN(zIndex)){zIndex=0}}if(this.iframe||this.cfg.getProperty("iframe")===true){if(zIndex<=0){zIndex=1}}Dom.setStyle(el,"zIndex",zIndex);this.cfg.setProperty("zIndex",zIndex,true);if(this.iframe){this.stackIframe()}},configXY:function(type,args,obj){var pos=args[0],x=pos[0],y=pos[1];this.cfg.setProperty("x",x);this.cfg.setProperty("y",y);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y])},configX:function(type,args,obj){var x=args[0],y=this.cfg.getProperty("y");this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");Dom.setX(this.element,x,true);this.cfg.setProperty("xy",[x,y],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y])},configY:function(type,args,obj){var x=this.cfg.getProperty("x"),y=args[0];this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");Dom.setY(this.element,y,true);this.cfg.setProperty("xy",[x,y],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y])},showIframe:function(){var oIFrame=this.iframe,oParentNode;if(oIFrame){oParentNode=this.element.parentNode;if(oParentNode!=oIFrame.parentNode){this._addToParent(oParentNode,oIFrame)}oIFrame.style.display="block"}},hideIframe:function(){if(this.iframe){this.iframe.style.display="none"}},syncIframe:function(){var oIFrame=this.iframe,oElement=this.element,nOffset=Overlay.IFRAME_OFFSET,nDimensionOffset=(nOffset*2),aXY;if(oIFrame){oIFrame.style.width=(oElement.offsetWidth+nDimensionOffset+"px");oIFrame.style.height=(oElement.offsetHeight+nDimensionOffset+"px");aXY=this.cfg.getProperty("xy");if(!Lang.isArray(aXY)||(isNaN(aXY[0])||isNaN(aXY[1]))){this.syncPosition();aXY=this.cfg.getProperty("xy")}Dom.setXY(oIFrame,[(aXY[0]-nOffset),(aXY[1]-nOffset)])}},stackIframe:function(){if(this.iframe){var overlayZ=Dom.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(overlayZ)&&!isNaN(overlayZ)){Dom.setStyle(this.iframe,"zIndex",(overlayZ-1))}}},configIframe:function(type,args,obj){var bIFrame=args[0];function createIFrame(){var oIFrame=this.iframe,oElement=this.element,oParent;if(!oIFrame){if(!m_oIFrameTemplate){m_oIFrameTemplate=document.createElement("iframe");if(this.isSecure){m_oIFrameTemplate.src=Overlay.IFRAME_SRC}if(UA.ie){m_oIFrameTemplate.style.filter="alpha(opacity=0)";m_oIFrameTemplate.frameBorder=0}else{m_oIFrameTemplate.style.opacity="0"}m_oIFrameTemplate.style.position="absolute";m_oIFrameTemplate.style.border="none";m_oIFrameTemplate.style.margin="0";m_oIFrameTemplate.style.padding="0";m_oIFrameTemplate.style.display="none";m_oIFrameTemplate.tabIndex=-1}oIFrame=m_oIFrameTemplate.cloneNode(false);oParent=oElement.parentNode;var parentNode=oParent||document.body;this._addToParent(parentNode,oIFrame);this.iframe=oIFrame}this.showIframe();this.syncIframe();this.stackIframe();if(!this._hasIframeEventListeners){this.showEvent.subscribe(this.showIframe);this.hideEvent.subscribe(this.hideIframe);this.changeContentEvent.subscribe(this.syncIframe);this._hasIframeEventListeners=true}}function onBeforeShow(){createIFrame.call(this);this.beforeShowEvent.unsubscribe(onBeforeShow);this._iframeDeferred=false}if(bIFrame){if(this.cfg.getProperty("visible")){createIFrame.call(this)}else{if(!this._iframeDeferred){this.beforeShowEvent.subscribe(onBeforeShow);this._iframeDeferred=true}}}else{this.hideIframe();if(this._hasIframeEventListeners){this.showEvent.unsubscribe(this.showIframe);this.hideEvent.unsubscribe(this.hideIframe);this.changeContentEvent.unsubscribe(this.syncIframe);this._hasIframeEventListeners=false}}},_primeXYFromDOM:function(){if(YAHOO.lang.isUndefined(this.cfg.getProperty("xy"))){this.syncPosition();this.cfg.refireEvent("xy");this.beforeShowEvent.unsubscribe(this._primeXYFromDOM)}},configConstrainToViewport:function(type,args,obj){var val=args[0];if(val){if(!Config.alreadySubscribed(this.beforeMoveEvent,this.enforceConstraints,this)){this.beforeMoveEvent.subscribe(this.enforceConstraints,this,true)}if(!Config.alreadySubscribed(this.beforeShowEvent,this._primeXYFromDOM)){this.beforeShowEvent.subscribe(this._primeXYFromDOM)}}else{this.beforeShowEvent.unsubscribe(this._primeXYFromDOM);this.beforeMoveEvent.unsubscribe(this.enforceConstraints,this)}},configContext:function(type,args,obj){var contextArgs=args[0],contextEl,elementMagnetCorner,contextMagnetCorner,triggers,defTriggers=this.CONTEXT_TRIGGERS;if(contextArgs){contextEl=contextArgs[0];elementMagnetCorner=contextArgs[1];contextMagnetCorner=contextArgs[2];triggers=contextArgs[3];if(defTriggers&&defTriggers.length>0){triggers=(triggers||[]).concat(defTriggers)}if(contextEl){if(typeof contextEl=="string"){this.cfg.setProperty("context",[document.getElementById(contextEl),elementMagnetCorner,contextMagnetCorner,triggers],true)}if(elementMagnetCorner&&contextMagnetCorner){this.align(elementMagnetCorner,contextMagnetCorner)}if(this._contextTriggers){this._processTriggers(this._contextTriggers,_UNSUBSCRIBE,this._alignOnTrigger)}if(triggers){this._processTriggers(triggers,_SUBSCRIBE,this._alignOnTrigger);this._contextTriggers=triggers}}}},_alignOnTrigger:function(type,args){this.align()},_findTriggerCE:function(t){var tce=null;if(t instanceof CustomEvent){tce=t}else if(Overlay._TRIGGER_MAP[t]){tce=Overlay._TRIGGER_MAP[t]}return tce},_processTriggers:function(triggers,mode,fn){var t,tce;for(var i=0,l=triggers.length;i<l;++i){t=triggers[i];tce=this._findTriggerCE(t);if(tce){tce[mode](fn,this,true)}else{this[mode](t,fn)}}},align:function(elementAlign,contextAlign){var contextArgs=this.cfg.getProperty("context"),me=this,context,element,contextRegion;function doAlign(v,h){switch(elementAlign){case Overlay.TOP_LEFT:me.moveTo(h,v);break;case Overlay.TOP_RIGHT:me.moveTo((h-element.offsetWidth),v);break;case Overlay.BOTTOM_LEFT:me.moveTo(h,(v-element.offsetHeight));break;case Overlay.BOTTOM_RIGHT:me.moveTo((h-element.offsetWidth),(v-element.offsetHeight));break}}if(contextArgs){context=contextArgs[0];element=this.element;me=this;if(!elementAlign){elementAlign=contextArgs[1]}if(!contextAlign){contextAlign=contextArgs[2]}if(element&&context){contextRegion=Dom.getRegion(context);switch(contextAlign){case Overlay.TOP_LEFT:doAlign(contextRegion.top,contextRegion.left);break;case Overlay.TOP_RIGHT:doAlign(contextRegion.top,contextRegion.right);break;case Overlay.BOTTOM_LEFT:doAlign(contextRegion.bottom,contextRegion.left);break;case Overlay.BOTTOM_RIGHT:doAlign(contextRegion.bottom,contextRegion.right);break}}}},enforceConstraints:function(type,args,obj){var pos=args[0];var cXY=this.getConstrainedXY(pos[0],pos[1]);this.cfg.setProperty("x",cXY[0],true);this.cfg.setProperty("y",cXY[1],true);this.cfg.setProperty("xy",cXY,true)},getConstrainedX:function(x){var oOverlay=this,oOverlayEl=oOverlay.element,nOverlayOffsetWidth=oOverlayEl.offsetWidth,nViewportOffset=Overlay.VIEWPORT_OFFSET,viewPortWidth=Dom.getViewportWidth(),scrollX=Dom.getDocumentScrollLeft(),bCanConstrain=(nOverlayOffsetWidth+nViewportOffset<viewPortWidth),aContext=this.cfg.getProperty("context"),oContextEl,nContextElX,nContextElWidth,bFlipped=false,nLeftRegionWidth,nRightRegionWidth,leftConstraint=scrollX+nViewportOffset,rightConstraint=scrollX+viewPortWidth-nOverlayOffsetWidth-nViewportOffset,xNew=x,oOverlapPositions={"tltr":true,"blbr":true,"brbl":true,"trtl":true};var flipHorizontal=function(){var nNewX;if((oOverlay.cfg.getProperty("x")-scrollX)>nContextElX){nNewX=(nContextElX-nOverlayOffsetWidth)}else{nNewX=(nContextElX+nContextElWidth)}oOverlay.cfg.setProperty("x",(nNewX+scrollX),true);return nNewX};var getDisplayRegionWidth=function(){if((oOverlay.cfg.getProperty("x")-scrollX)>nContextElX){return(nRightRegionWidth-nViewportOffset)}else{return(nLeftRegionWidth-nViewportOffset)}};var setHorizontalPosition=function(){var nDisplayRegionWidth=getDisplayRegionWidth(),fnReturnVal;if(nOverlayOffsetWidth>nDisplayRegionWidth){if(bFlipped){flipHorizontal()}else{flipHorizontal();bFlipped=true;fnReturnVal=setHorizontalPosition()}}return fnReturnVal};if(x<leftConstraint||x>rightConstraint){if(bCanConstrain){if(this.cfg.getProperty("preventcontextoverlap")&&aContext&&oOverlapPositions[(aContext[1]+aContext[2])]){oContextEl=aContext[0];nContextElX=Dom.getX(oContextEl)-scrollX;nContextElWidth=oContextEl.offsetWidth;nLeftRegionWidth=nContextElX;nRightRegionWidth=(viewPortWidth-(nContextElX+nContextElWidth));setHorizontalPosition();xNew=this.cfg.getProperty("x")}else{if(x<leftConstraint){xNew=leftConstraint}else if(x>rightConstraint){xNew=rightConstraint}}}else{xNew=nViewportOffset+scrollX}}return xNew},getConstrainedY:function(y){var oOverlay=this,oOverlayEl=oOverlay.element,nOverlayOffsetHeight=oOverlayEl.offsetHeight,nViewportOffset=Overlay.VIEWPORT_OFFSET,viewPortHeight=Dom.getViewportHeight(),scrollY=Dom.getDocumentScrollTop(),bCanConstrain=(nOverlayOffsetHeight+nViewportOffset<viewPortHeight),aContext=this.cfg.getProperty("context"),oContextEl,nContextElY,nContextElHeight,bFlipped=false,nTopRegionHeight,nBottomRegionHeight,topConstraint=scrollY+nViewportOffset,bottomConstraint=scrollY+viewPortHeight-nOverlayOffsetHeight-nViewportOffset,yNew=y,oOverlapPositions={"trbr":true,"tlbl":true,"bltl":true,"brtr":true};var flipVertical=function(){var nNewY;if((oOverlay.cfg.getProperty("y")-scrollY)>nContextElY){nNewY=(nContextElY-nOverlayOffsetHeight)}else{nNewY=(nContextElY+nContextElHeight)}oOverlay.cfg.setProperty("y",(nNewY+scrollY),true);return nNewY};var getDisplayRegionHeight=function(){if((oOverlay.cfg.getProperty("y")-scrollY)>nContextElY){return(nBottomRegionHeight-nViewportOffset)}else{return(nTopRegionHeight-nViewportOffset)}};var setVerticalPosition=function(){var nDisplayRegionHeight=getDisplayRegionHeight(),fnReturnVal;if(nOverlayOffsetHeight>nDisplayRegionHeight){if(bFlipped){flipVertical()}else{flipVertical();bFlipped=true;fnReturnVal=setVerticalPosition()}}return fnReturnVal};if(y<topConstraint||y>bottomConstraint){if(bCanConstrain){if(this.cfg.getProperty("preventcontextoverlap")&&aContext&&oOverlapPositions[(aContext[1]+aContext[2])]){oContextEl=aContext[0];nContextElHeight=oContextEl.offsetHeight;nContextElY=(Dom.getY(oContextEl)-scrollY);nTopRegionHeight=nContextElY;nBottomRegionHeight=(viewPortHeight-(nContextElY+nContextElHeight));setVerticalPosition();yNew=oOverlay.cfg.getProperty("y")}else{if(y<topConstraint){yNew=topConstraint}else if(y>bottomConstraint){yNew=bottomConstraint}}}else{yNew=nViewportOffset+scrollY}}return yNew},getConstrainedXY:function(x,y){return[this.getConstrainedX(x),this.getConstrainedY(y)]},center:function(){var nViewportOffset=Overlay.VIEWPORT_OFFSET,elementWidth=this.element.offsetWidth,elementHeight=this.element.offsetHeight,viewPortWidth=Dom.getViewportWidth(),viewPortHeight=Dom.getViewportHeight(),x,y;if(elementWidth<viewPortWidth){x=(viewPortWidth/2)-(elementWidth/2)+Dom.getDocumentScrollLeft()}else{x=nViewportOffset+Dom.getDocumentScrollLeft()}if(elementHeight<viewPortHeight){y=(viewPortHeight/2)-(elementHeight/2)+Dom.getDocumentScrollTop()}else{y=nViewportOffset+Dom.getDocumentScrollTop()}this.cfg.setProperty("xy",[parseInt(x,10),parseInt(y,10)]);this.cfg.refireEvent("iframe");if(UA.webkit){this.forceContainerRedraw()}},syncPosition:function(){var pos=Dom.getXY(this.element);this.cfg.setProperty("x",pos[0],true);this.cfg.setProperty("y",pos[1],true);this.cfg.setProperty("xy",pos,true)},onDomResize:function(e,obj){var me=this;Overlay.superclass.onDomResize.call(this,e,obj);setTimeout(function(){me.syncPosition();me.cfg.refireEvent("iframe");me.cfg.refireEvent("context")},0)},_getComputedHeight:(function(){if(document.defaultView&&document.defaultView.getComputedStyle){return function(el){var height=null;if(el.ownerDocument&&el.ownerDocument.defaultView){var computed=el.ownerDocument.defaultView.getComputedStyle(el,'');if(computed){height=parseInt(computed.height,10)}}return(Lang.isNumber(height))?height:null}}else{return function(el){var height=null;if(el.style.pixelHeight){height=el.style.pixelHeight}return(Lang.isNumber(height))?height:null}}})(),_validateAutoFillHeight:function(val){return(!val)||(Lang.isString(val)&&Overlay.STD_MOD_RE.test(val))},_autoFillOnHeightChange:function(type,args,el){var height=this.cfg.getProperty("height");if((height&&height!=="auto")||(height===0)){this.fillHeight(el)}},_getPreciseHeight:function(el){var height=el.offsetHeight;if(el.getBoundingClientRect){var rect=el.getBoundingClientRect();height=rect.bottom-rect.top}return height},fillHeight:function(el){if(el){var container=this.innerElement||this.element,containerEls=[this.header,this.body,this.footer],containerEl,total=0,filled=0,remaining=0,validEl=false;for(var i=0,l=containerEls.length;i<l;i++){containerEl=containerEls[i];if(containerEl){if(el!==containerEl){filled+=this._getPreciseHeight(containerEl)}else{validEl=true}}}if(validEl){if(UA.ie||UA.opera){Dom.setStyle(el,'height',0+'px')}total=this._getComputedHeight(container);if(total===null){Dom.addClass(container,"yui-override-padding");total=container.clientHeight;Dom.removeClass(container,"yui-override-padding")}remaining=Math.max(total-filled,0);Dom.setStyle(el,"height",remaining+"px");if(el.offsetHeight!=remaining){remaining=Math.max(remaining-(el.offsetHeight-remaining),0)}Dom.setStyle(el,"height",remaining+"px")}}},bringToTop:function(){var aOverlays=[],oElement=this.element;function compareZIndexDesc(p_oOverlay1,p_oOverlay2){var sZIndex1=Dom.getStyle(p_oOverlay1,"zIndex"),sZIndex2=Dom.getStyle(p_oOverlay2,"zIndex"),nZIndex1=(!sZIndex1||isNaN(sZIndex1))?0:parseInt(sZIndex1,10),nZIndex2=(!sZIndex2||isNaN(sZIndex2))?0:parseInt(sZIndex2,10);if(nZIndex1>nZIndex2){return-1}else if(nZIndex1<nZIndex2){return 1}else{return 0}}function isOverlayElement(p_oElement){var isOverlay=Dom.hasClass(p_oElement,Overlay.CSS_OVERLAY),Panel=YAHOO.widget.Panel;if(isOverlay&&!Dom.isAncestor(oElement,p_oElement)){if(Panel&&Dom.hasClass(p_oElement,Panel.CSS_PANEL)){aOverlays[aOverlays.length]=p_oElement.parentNode}else{aOverlays[aOverlays.length]=p_oElement}}}Dom.getElementsBy(isOverlayElement,"DIV",document.body);aOverlays.sort(compareZIndexDesc);var oTopOverlay=aOverlays[0],nTopZIndex;if(oTopOverlay){nTopZIndex=Dom.getStyle(oTopOverlay,"zIndex");if(!isNaN(nTopZIndex)){var bRequiresBump=false;if(oTopOverlay!=oElement){bRequiresBump=true}else if(aOverlays.length>1){var nNextZIndex=Dom.getStyle(aOverlays[1],"zIndex");if(!isNaN(nNextZIndex)&&(nTopZIndex==nNextZIndex)){bRequiresBump=true}}if(bRequiresBump){this.cfg.setProperty("zindex",(parseInt(nTopZIndex,10)+2))}}}},destroy:function(){if(this.iframe){this.iframe.parentNode.removeChild(this.iframe)}this.iframe=null;Overlay.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);Overlay.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this);Module.textResizeEvent.unsubscribe(this._autoFillOnHeightChange);Overlay.superclass.destroy.call(this)},forceContainerRedraw:function(){var c=this;Dom.addClass(c.element,"yui-force-redraw");setTimeout(function(){Dom.removeClass(c.element,"yui-force-redraw")},0)},toString:function(){return"Overlay "+this.id}})}());(function(){YAHOO.widget.OverlayManager=function(userConfig){this.init(userConfig)};var Overlay=YAHOO.widget.Overlay,Event=YAHOO.util.Event,Dom=YAHOO.util.Dom,Config=YAHOO.util.Config,CustomEvent=YAHOO.util.CustomEvent,OverlayManager=YAHOO.widget.OverlayManager;OverlayManager.CSS_FOCUSED="focused";OverlayManager.prototype={constructor:OverlayManager,overlays:null,initDefaultConfig:function(){this.cfg.addProperty("overlays",{suppressEvent:true});this.cfg.addProperty("focusevent",{value:"mousedown"})},init:function(userConfig){this.cfg=new Config(this);this.initDefaultConfig();if(userConfig){this.cfg.applyConfig(userConfig,true)}this.cfg.fireQueue();var activeOverlay=null;this.getActive=function(){return activeOverlay};this.focus=function(overlay){var o=this.find(overlay);if(o){o.focus()}};this.remove=function(overlay){var o=this.find(overlay),originalZ;if(o){if(activeOverlay==o){activeOverlay=null}var bDestroyed=(o.element===null&&o.cfg===null)?true:false;if(!bDestroyed){originalZ=Dom.getStyle(o.element,"zIndex");o.cfg.setProperty("zIndex",-1000,true)}this.overlays.sort(this.compareZIndexDesc);this.overlays=this.overlays.slice(0,(this.overlays.length-1));o.hideEvent.unsubscribe(o.blur);o.destroyEvent.unsubscribe(this._onOverlayDestroy,o);o.focusEvent.unsubscribe(this._onOverlayFocusHandler,o);o.blurEvent.unsubscribe(this._onOverlayBlurHandler,o);if(!bDestroyed){Event.removeListener(o.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus);o.cfg.setProperty("zIndex",originalZ,true);o.cfg.setProperty("manager",null)}if(o.focusEvent._managed){o.focusEvent=null}if(o.blurEvent._managed){o.blurEvent=null}if(o.focus._managed){o.focus=null}if(o.blur._managed){o.blur=null}}};this.blurAll=function(){var nOverlays=this.overlays.length,i;if(nOverlays>0){i=nOverlays-1;do{this.overlays[i].blur()}while(i--)}};this._manageBlur=function(overlay){var changed=false;if(activeOverlay==overlay){Dom.removeClass(activeOverlay.element,OverlayManager.CSS_FOCUSED);activeOverlay=null;changed=true}return changed};this._manageFocus=function(overlay){var changed=false;if(activeOverlay!=overlay){if(activeOverlay){activeOverlay.blur()}activeOverlay=overlay;this.bringToTop(activeOverlay);Dom.addClass(activeOverlay.element,OverlayManager.CSS_FOCUSED);changed=true}return changed};var overlays=this.cfg.getProperty("overlays");if(!this.overlays){this.overlays=[]}if(overlays){this.register(overlays);this.overlays.sort(this.compareZIndexDesc)}},_onOverlayElementFocus:function(p_oEvent){var oTarget=Event.getTarget(p_oEvent),oClose=this.close;if(oClose&&(oTarget==oClose||Dom.isAncestor(oClose,oTarget))){this.blur()}else{this.focus()}},_onOverlayDestroy:function(p_sType,p_aArgs,p_oOverlay){this.remove(p_oOverlay)},_onOverlayFocusHandler:function(p_sType,p_aArgs,p_oOverlay){this._manageFocus(p_oOverlay)},_onOverlayBlurHandler:function(p_sType,p_aArgs,p_oOverlay){this._manageBlur(p_oOverlay)},_bindFocus:function(overlay){var mgr=this;if(!overlay.focusEvent){overlay.focusEvent=overlay.createEvent("focus");overlay.focusEvent.signature=CustomEvent.LIST;overlay.focusEvent._managed=true}else{overlay.focusEvent.subscribe(mgr._onOverlayFocusHandler,overlay,mgr)}if(!overlay.focus){Event.on(overlay.element,mgr.cfg.getProperty("focusevent"),mgr._onOverlayElementFocus,null,overlay);overlay.focus=function(){if(mgr._manageFocus(this)){if(this.cfg.getProperty("visible")&&this.focusFirst){this.focusFirst()}this.focusEvent.fire()}};overlay.focus._managed=true}},_bindBlur:function(overlay){var mgr=this;if(!overlay.blurEvent){overlay.blurEvent=overlay.createEvent("blur");overlay.blurEvent.signature=CustomEvent.LIST;overlay.focusEvent._managed=true}else{overlay.blurEvent.subscribe(mgr._onOverlayBlurHandler,overlay,mgr)}if(!overlay.blur){overlay.blur=function(){if(mgr._manageBlur(this)){this.blurEvent.fire()}};overlay.blur._managed=true}overlay.hideEvent.subscribe(overlay.blur)},_bindDestroy:function(overlay){var mgr=this;overlay.destroyEvent.subscribe(mgr._onOverlayDestroy,overlay,mgr)},_syncZIndex:function(overlay){var zIndex=Dom.getStyle(overlay.element,"zIndex");if(!isNaN(zIndex)){overlay.cfg.setProperty("zIndex",parseInt(zIndex,10))}else{overlay.cfg.setProperty("zIndex",0)}},register:function(overlay){var registered=false,i,n;if(overlay instanceof Overlay){overlay.cfg.addProperty("manager",{value:this});this._bindFocus(overlay);this._bindBlur(overlay);this._bindDestroy(overlay);this._syncZIndex(overlay);this.overlays.push(overlay);this.bringToTop(overlay);registered=true}else if(overlay instanceof Array){for(i=0,n=overlay.length;i<n;i++){registered=this.register(overlay[i])||registered}}return registered},bringToTop:function(p_oOverlay){var oOverlay=this.find(p_oOverlay),nTopZIndex,oTopOverlay,aOverlays;if(oOverlay){aOverlays=this.overlays;aOverlays.sort(this.compareZIndexDesc);oTopOverlay=aOverlays[0];if(oTopOverlay){nTopZIndex=Dom.getStyle(oTopOverlay.element,"zIndex");if(!isNaN(nTopZIndex)){var bRequiresBump=false;if(oTopOverlay!==oOverlay){bRequiresBump=true}else if(aOverlays.length>1){var nNextZIndex=Dom.getStyle(aOverlays[1].element,"zIndex");if(!isNaN(nNextZIndex)&&(nTopZIndex==nNextZIndex)){bRequiresBump=true}}if(bRequiresBump){oOverlay.cfg.setProperty("zindex",(parseInt(nTopZIndex,10)+2))}}aOverlays.sort(this.compareZIndexDesc)}}},find:function(overlay){var isInstance=overlay instanceof Overlay,overlays=this.overlays,n=overlays.length,found=null,o,i;if(isInstance||typeof overlay=="string"){for(i=n-1;i>=0;i--){o=overlays[i];if((isInstance&&(o===overlay))||(o.id==overlay)){found=o;break}}}return found},compareZIndexDesc:function(o1,o2){var zIndex1=(o1.cfg)?o1.cfg.getProperty("zIndex"):null,zIndex2=(o2.cfg)?o2.cfg.getProperty("zIndex"):null;if(zIndex1===null&&zIndex2===null){return 0}else if(zIndex1===null){return 1}else if(zIndex2===null){return-1}else if(zIndex1>zIndex2){return-1}else if(zIndex1<zIndex2){return 1}else{return 0}},showAll:function(){var overlays=this.overlays,n=overlays.length,i;for(i=n-1;i>=0;i--){overlays[i].show()}},hideAll:function(){var overlays=this.overlays,n=overlays.length,i;for(i=n-1;i>=0;i--){overlays[i].hide()}},toString:function(){return"OverlayManager"}}}());(function(){YAHOO.widget.Tooltip=function(el,userConfig){YAHOO.widget.Tooltip.superclass.constructor.call(this,el,userConfig)};var Lang=YAHOO.lang,Event=YAHOO.util.Event,CustomEvent=YAHOO.util.CustomEvent,Dom=YAHOO.util.Dom,Tooltip=YAHOO.widget.Tooltip,UA=YAHOO.env.ua,bIEQuirks=(UA.ie&&(UA.ie<=6||document.compatMode=="BackCompat")),m_oShadowTemplate,DEFAULT_CONFIG={"PREVENT_OVERLAP":{key:"preventoverlap",value:true,validator:Lang.isBoolean,supercedes:["x","y","xy"]},"SHOW_DELAY":{key:"showdelay",value:200,validator:Lang.isNumber},"AUTO_DISMISS_DELAY":{key:"autodismissdelay",value:5000,validator:Lang.isNumber},"HIDE_DELAY":{key:"hidedelay",value:250,validator:Lang.isNumber},"TEXT":{key:"text",suppressEvent:true},"CONTAINER":{key:"container"},"DISABLED":{key:"disabled",value:false,suppressEvent:true}},EVENT_TYPES={"CONTEXT_MOUSE_OVER":"contextMouseOver","CONTEXT_MOUSE_OUT":"contextMouseOut","CONTEXT_TRIGGER":"contextTrigger"};Tooltip.CSS_TOOLTIP="yui-tt";function restoreOriginalWidth(sOriginalWidth,sForcedWidth){var oConfig=this.cfg,sCurrentWidth=oConfig.getProperty("width");if(sCurrentWidth==sForcedWidth){oConfig.setProperty("width",sOriginalWidth)}}function setWidthToOffsetWidth(p_sType,p_aArgs){if("_originalWidth"in this){restoreOriginalWidth.call(this,this._originalWidth,this._forcedWidth)}var oBody=document.body,oConfig=this.cfg,sOriginalWidth=oConfig.getProperty("width"),sNewWidth,oClone;if((!sOriginalWidth||sOriginalWidth=="auto")&&(oConfig.getProperty("container")!=oBody||oConfig.getProperty("x")>=Dom.getViewportWidth()||oConfig.getProperty("y")>=Dom.getViewportHeight())){oClone=this.element.cloneNode(true);oClone.style.visibility="hidden";oClone.style.top="0px";oClone.style.left="0px";oBody.appendChild(oClone);sNewWidth=(oClone.offsetWidth+"px");oBody.removeChild(oClone);oClone=null;oConfig.setProperty("width",sNewWidth);oConfig.refireEvent("xy");this._originalWidth=sOriginalWidth||"";this._forcedWidth=sNewWidth}}function onDOMReady(p_sType,p_aArgs,p_oObject){this.render(p_oObject)}function onInit(){Event.onDOMReady(onDOMReady,this.cfg.getProperty("container"),this)}YAHOO.extend(Tooltip,YAHOO.widget.Overlay,{init:function(el,userConfig){Tooltip.superclass.init.call(this,el);this.beforeInitEvent.fire(Tooltip);Dom.addClass(this.element,Tooltip.CSS_TOOLTIP);if(userConfig){this.cfg.applyConfig(userConfig,true)}this.cfg.queueProperty("visible",false);this.cfg.queueProperty("constraintoviewport",true);this.setBody("");this.subscribe("changeContent",setWidthToOffsetWidth);this.subscribe("init",onInit);this.subscribe("render",this.onRender);this.initEvent.fire(Tooltip)},initEvents:function(){Tooltip.superclass.initEvents.call(this);var SIGNATURE=CustomEvent.LIST;this.contextMouseOverEvent=this.createEvent(EVENT_TYPES.CONTEXT_MOUSE_OVER);this.contextMouseOverEvent.signature=SIGNATURE;this.contextMouseOutEvent=this.createEvent(EVENT_TYPES.CONTEXT_MOUSE_OUT);this.contextMouseOutEvent.signature=SIGNATURE;this.contextTriggerEvent=this.createEvent(EVENT_TYPES.CONTEXT_TRIGGER);this.contextTriggerEvent.signature=SIGNATURE},initDefaultConfig:function(){Tooltip.superclass.initDefaultConfig.call(this);this.cfg.addProperty(DEFAULT_CONFIG.PREVENT_OVERLAP.key,{value:DEFAULT_CONFIG.PREVENT_OVERLAP.value,validator:DEFAULT_CONFIG.PREVENT_OVERLAP.validator,supercedes:DEFAULT_CONFIG.PREVENT_OVERLAP.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.SHOW_DELAY.key,{handler:this.configShowDelay,value:200,validator:DEFAULT_CONFIG.SHOW_DELAY.validator});this.cfg.addProperty(DEFAULT_CONFIG.AUTO_DISMISS_DELAY.key,{handler:this.configAutoDismissDelay,value:DEFAULT_CONFIG.AUTO_DISMISS_DELAY.value,validator:DEFAULT_CONFIG.AUTO_DISMISS_DELAY.validator});this.cfg.addProperty(DEFAULT_CONFIG.HIDE_DELAY.key,{handler:this.configHideDelay,value:DEFAULT_CONFIG.HIDE_DELAY.value,validator:DEFAULT_CONFIG.HIDE_DELAY.validator});this.cfg.addProperty(DEFAULT_CONFIG.TEXT.key,{handler:this.configText,suppressEvent:DEFAULT_CONFIG.TEXT.suppressEvent});this.cfg.addProperty(DEFAULT_CONFIG.CONTAINER.key,{handler:this.configContainer,value:document.body});this.cfg.addProperty(DEFAULT_CONFIG.DISABLED.key,{handler:this.configContainer,value:DEFAULT_CONFIG.DISABLED.value,supressEvent:DEFAULT_CONFIG.DISABLED.suppressEvent})},configText:function(type,args,obj){var text=args[0];if(text){this.setBody(text)}},configContainer:function(type,args,obj){var container=args[0];if(typeof container=='string'){this.cfg.setProperty("container",document.getElementById(container),true)}},_removeEventListeners:function(){var aElements=this._context,nElements,oElement,i;if(aElements){nElements=aElements.length;if(nElements>0){i=nElements-1;do{oElement=aElements[i];Event.removeListener(oElement,"mouseover",this.onContextMouseOver);Event.removeListener(oElement,"mousemove",this.onContextMouseMove);Event.removeListener(oElement,"mouseout",this.onContextMouseOut)}while(i--)}}},configContext:function(type,args,obj){var context=args[0],aElements,nElements,oElement,i;if(context){if(!(context instanceof Array)){if(typeof context=="string"){this.cfg.setProperty("context",[document.getElementById(context)],true)}else{this.cfg.setProperty("context",[context],true)}context=this.cfg.getProperty("context")}this._removeEventListeners();this._context=context;aElements=this._context;if(aElements){nElements=aElements.length;if(nElements>0){i=nElements-1;do{oElement=aElements[i];Event.on(oElement,"mouseover",this.onContextMouseOver,this);Event.on(oElement,"mousemove",this.onContextMouseMove,this);Event.on(oElement,"mouseout",this.onContextMouseOut,this)}while(i--)}}}},onContextMouseMove:function(e,obj){obj.pageX=Event.getPageX(e);obj.pageY=Event.getPageY(e)},onContextMouseOver:function(e,obj){var context=this;if(context.title){obj._tempTitle=context.title;context.title=""}if(obj.fireEvent("contextMouseOver",context,e)!==false&&!obj.cfg.getProperty("disabled")){if(obj.hideProcId){clearTimeout(obj.hideProcId);obj.hideProcId=null}Event.on(context,"mousemove",obj.onContextMouseMove,obj);obj.showProcId=obj.doShow(e,context)}},onContextMouseOut:function(e,obj){var el=this;if(obj._tempTitle){el.title=obj._tempTitle;obj._tempTitle=null}if(obj.showProcId){clearTimeout(obj.showProcId);obj.showProcId=null}if(obj.hideProcId){clearTimeout(obj.hideProcId);obj.hideProcId=null}obj.fireEvent("contextMouseOut",el,e);obj.hideProcId=setTimeout(function(){obj.hide()},obj.cfg.getProperty("hidedelay"))},doShow:function(e,context){var yOffset=25,me=this;if(UA.opera&&context.tagName&&context.tagName.toUpperCase()=="A"){yOffset+=12}return setTimeout(function(){var txt=me.cfg.getProperty("text");if(me._tempTitle&&(txt===""||YAHOO.lang.isUndefined(txt)||YAHOO.lang.isNull(txt))){me.setBody(me._tempTitle)}else{me.cfg.refireEvent("text")}me.moveTo(me.pageX,me.pageY+yOffset);if(me.cfg.getProperty("preventoverlap")){me.preventOverlap(me.pageX,me.pageY)}Event.removeListener(context,"mousemove",me.onContextMouseMove);me.contextTriggerEvent.fire(context);me.show();me.hideProcId=me.doHide()},this.cfg.getProperty("showdelay"))},doHide:function(){var me=this;return setTimeout(function(){me.hide()},this.cfg.getProperty("autodismissdelay"))},preventOverlap:function(pageX,pageY){var height=this.element.offsetHeight,mousePoint=new YAHOO.util.Point(pageX,pageY),elementRegion=Dom.getRegion(this.element);elementRegion.top-=5;elementRegion.left-=5;elementRegion.right+=5;elementRegion.bottom+=5;if(elementRegion.contains(mousePoint)){this.cfg.setProperty("y",(pageY-height-5))}},onRender:function(p_sType,p_aArgs){function sizeShadow(){var oElement=this.element,oShadow=this.underlay;if(oShadow){oShadow.style.width=(oElement.offsetWidth+6)+"px";oShadow.style.height=(oElement.offsetHeight+1)+"px"}}function addShadowVisibleClass(){Dom.addClass(this.underlay,"yui-tt-shadow-visible");if(UA.ie){this.forceUnderlayRedraw()}}function removeShadowVisibleClass(){Dom.removeClass(this.underlay,"yui-tt-shadow-visible")}function createShadow(){var oShadow=this.underlay,oElement,Module,nIE,me;if(!oShadow){oElement=this.element;Module=YAHOO.widget.Module;nIE=UA.ie;me=this;if(!m_oShadowTemplate){m_oShadowTemplate=document.createElement("div");m_oShadowTemplate.className="yui-tt-shadow"}oShadow=m_oShadowTemplate.cloneNode(false);oElement.appendChild(oShadow);this.underlay=oShadow;this._shadow=this.underlay;addShadowVisibleClass.call(this);this.subscribe("beforeShow",addShadowVisibleClass);this.subscribe("hide",removeShadowVisibleClass);if(bIEQuirks){window.setTimeout(function(){sizeShadow.call(me)},0);this.cfg.subscribeToConfigEvent("width",sizeShadow);this.cfg.subscribeToConfigEvent("height",sizeShadow);this.subscribe("changeContent",sizeShadow);Module.textResizeEvent.subscribe(sizeShadow,this,true);this.subscribe("destroy",function(){Module.textResizeEvent.unsubscribe(sizeShadow,this)})}}}function onBeforeShow(){createShadow.call(this);this.unsubscribe("beforeShow",onBeforeShow)}if(this.cfg.getProperty("visible")){createShadow.call(this)}else{this.subscribe("beforeShow",onBeforeShow)}},forceUnderlayRedraw:function(){var tt=this;Dom.addClass(tt.underlay,"yui-force-redraw");setTimeout(function(){Dom.removeClass(tt.underlay,"yui-force-redraw")},0)},destroy:function(){this._removeEventListeners();Tooltip.superclass.destroy.call(this)},toString:function(){return"Tooltip "+this.id}})}());(function(){YAHOO.widget.Panel=function(el,userConfig){YAHOO.widget.Panel.superclass.constructor.call(this,el,userConfig)};var _currentModal=null;var Lang=YAHOO.lang,Util=YAHOO.util,Dom=Util.Dom,Event=Util.Event,CustomEvent=Util.CustomEvent,KeyListener=YAHOO.util.KeyListener,Config=Util.Config,Overlay=YAHOO.widget.Overlay,Panel=YAHOO.widget.Panel,UA=YAHOO.env.ua,bIEQuirks=(UA.ie&&(UA.ie<=6||document.compatMode=="BackCompat")),m_oMaskTemplate,m_oUnderlayTemplate,m_oCloseIconTemplate,EVENT_TYPES={"SHOW_MASK":"showMask","HIDE_MASK":"hideMask","DRAG":"drag"},DEFAULT_CONFIG={"CLOSE":{key:"close",value:true,validator:Lang.isBoolean,supercedes:["visible"]},"DRAGGABLE":{key:"draggable",value:(Util.DD?true:false),validator:Lang.isBoolean,supercedes:["visible"]},"DRAG_ONLY":{key:"dragonly",value:false,validator:Lang.isBoolean,supercedes:["draggable"]},"UNDERLAY":{key:"underlay",value:"shadow",supercedes:["visible"]},"MODAL":{key:"modal",value:false,validator:Lang.isBoolean,supercedes:["visible","zindex"]},"KEY_LISTENERS":{key:"keylisteners",suppressEvent:true,supercedes:["visible"]},"STRINGS":{key:"strings",supercedes:["close"],validator:Lang.isObject,value:{close:"Close"}}};Panel.CSS_PANEL="yui-panel";Panel.CSS_PANEL_CONTAINER="yui-panel-container";Panel.FOCUSABLE=["a","button","select","textarea","input","iframe"];function createHeader(p_sType,p_aArgs){if(!this.header&&this.cfg.getProperty("draggable")){this.setHeader("&#160;")}}function restoreOriginalWidth(p_sType,p_aArgs,p_oObject){var sOriginalWidth=p_oObject[0],sNewWidth=p_oObject[1],oConfig=this.cfg,sCurrentWidth=oConfig.getProperty("width");if(sCurrentWidth==sNewWidth){oConfig.setProperty("width",sOriginalWidth)}this.unsubscribe("hide",restoreOriginalWidth,p_oObject)}function setWidthToOffsetWidth(p_sType,p_aArgs){var oConfig,sOriginalWidth,sNewWidth;if(bIEQuirks){oConfig=this.cfg;sOriginalWidth=oConfig.getProperty("width");if(!sOriginalWidth||sOriginalWidth=="auto"){sNewWidth=(this.element.offsetWidth+"px");oConfig.setProperty("width",sNewWidth);this.subscribe("hide",restoreOriginalWidth,[(sOriginalWidth||""),sNewWidth])}}}YAHOO.extend(Panel,Overlay,{init:function(el,userConfig){Panel.superclass.init.call(this,el);this.beforeInitEvent.fire(Panel);Dom.addClass(this.element,Panel.CSS_PANEL);this.buildWrapper();if(userConfig){this.cfg.applyConfig(userConfig,true)}this.subscribe("showMask",this._addFocusHandlers);this.subscribe("hideMask",this._removeFocusHandlers);this.subscribe("beforeRender",createHeader);this.subscribe("render",function(){this.setFirstLastFocusable();this.subscribe("changeContent",this.setFirstLastFocusable)});this.subscribe("show",this.focusFirst);this.initEvent.fire(Panel)},_onElementFocus:function(e){if(_currentModal===this){var target=Event.getTarget(e),doc=document.documentElement,insideDoc=(target!==doc&&target!==window);if(insideDoc&&target!==this.element&&target!==this.mask&&!Dom.isAncestor(this.element,target)){try{if(this.firstElement){this.firstElement.focus()}else{if(this._modalFocus){this._modalFocus.focus()}else{this.innerElement.focus()}}}catch(err){try{if(insideDoc&&target!==document.body){target.blur()}}catch(err2){}}}}},_addFocusHandlers:function(p_sType,p_aArgs){if(!this.firstElement){if(UA.webkit||UA.opera){if(!this._modalFocus){this._createHiddenFocusElement()}}else{this.innerElement.tabIndex=0}}this.setTabLoop(this.firstElement,this.lastElement);Event.onFocus(document.documentElement,this._onElementFocus,this,true);_currentModal=this},_createHiddenFocusElement:function(){var e=document.createElement("button");e.style.height="1px";e.style.width="1px";e.style.position="absolute";e.style.left="-10000em";e.style.opacity=0;e.tabIndex=-1;this.innerElement.appendChild(e);this._modalFocus=e},_removeFocusHandlers:function(p_sType,p_aArgs){Event.removeFocusListener(document.documentElement,this._onElementFocus,this);if(_currentModal==this){_currentModal=null}},focusFirst:function(type,args,obj){var el=this.firstElement;if(args&&args[1]){Event.stopEvent(args[1])}if(el){try{el.focus()}catch(err){}}},focusLast:function(type,args,obj){var el=this.lastElement;if(args&&args[1]){Event.stopEvent(args[1])}if(el){try{el.focus()}catch(err){}}},setTabLoop:function(firstElement,lastElement){var backTab=this.preventBackTab,tab=this.preventTabOut,showEvent=this.showEvent,hideEvent=this.hideEvent;if(backTab){backTab.disable();showEvent.unsubscribe(backTab.enable,backTab);hideEvent.unsubscribe(backTab.disable,backTab);backTab=this.preventBackTab=null}if(tab){tab.disable();showEvent.unsubscribe(tab.enable,tab);hideEvent.unsubscribe(tab.disable,tab);tab=this.preventTabOut=null}if(firstElement){this.preventBackTab=new KeyListener(firstElement,{shift:true,keys:9},{fn:this.focusLast,scope:this,correctScope:true});backTab=this.preventBackTab;showEvent.subscribe(backTab.enable,backTab,true);hideEvent.subscribe(backTab.disable,backTab,true)}if(lastElement){this.preventTabOut=new KeyListener(lastElement,{shift:false,keys:9},{fn:this.focusFirst,scope:this,correctScope:true});tab=this.preventTabOut;showEvent.subscribe(tab.enable,tab,true);hideEvent.subscribe(tab.disable,tab,true)}},getFocusableElements:function(root){root=root||this.innerElement;var focusable={};for(var i=0;i<Panel.FOCUSABLE.length;i++){focusable[Panel.FOCUSABLE[i]]=true}function isFocusable(el){if(el.focus&&el.type!=="hidden"&&!el.disabled&&focusable[el.tagName.toLowerCase()]){return true}return false}return Dom.getElementsBy(isFocusable,null,root)},setFirstLastFocusable:function(){this.firstElement=null;this.lastElement=null;var elements=this.getFocusableElements();this.focusableElements=elements;if(elements.length>0){this.firstElement=elements[0];this.lastElement=elements[elements.length-1]}if(this.cfg.getProperty("modal")){this.setTabLoop(this.firstElement,this.lastElement)}},initEvents:function(){Panel.superclass.initEvents.call(this);var SIGNATURE=CustomEvent.LIST;this.showMaskEvent=this.createEvent(EVENT_TYPES.SHOW_MASK);this.showMaskEvent.signature=SIGNATURE;this.hideMaskEvent=this.createEvent(EVENT_TYPES.HIDE_MASK);this.hideMaskEvent.signature=SIGNATURE;this.dragEvent=this.createEvent(EVENT_TYPES.DRAG);this.dragEvent.signature=SIGNATURE},initDefaultConfig:function(){Panel.superclass.initDefaultConfig.call(this);this.cfg.addProperty(DEFAULT_CONFIG.CLOSE.key,{handler:this.configClose,value:DEFAULT_CONFIG.CLOSE.value,validator:DEFAULT_CONFIG.CLOSE.validator,supercedes:DEFAULT_CONFIG.CLOSE.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.DRAGGABLE.key,{handler:this.configDraggable,value:(Util.DD)?true:false,validator:DEFAULT_CONFIG.DRAGGABLE.validator,supercedes:DEFAULT_CONFIG.DRAGGABLE.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.DRAG_ONLY.key,{value:DEFAULT_CONFIG.DRAG_ONLY.value,validator:DEFAULT_CONFIG.DRAG_ONLY.validator,supercedes:DEFAULT_CONFIG.DRAG_ONLY.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.UNDERLAY.key,{handler:this.configUnderlay,value:DEFAULT_CONFIG.UNDERLAY.value,supercedes:DEFAULT_CONFIG.UNDERLAY.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.MODAL.key,{handler:this.configModal,value:DEFAULT_CONFIG.MODAL.value,validator:DEFAULT_CONFIG.MODAL.validator,supercedes:DEFAULT_CONFIG.MODAL.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.KEY_LISTENERS.key,{handler:this.configKeyListeners,suppressEvent:DEFAULT_CONFIG.KEY_LISTENERS.suppressEvent,supercedes:DEFAULT_CONFIG.KEY_LISTENERS.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.STRINGS.key,{value:DEFAULT_CONFIG.STRINGS.value,handler:this.configStrings,validator:DEFAULT_CONFIG.STRINGS.validator,supercedes:DEFAULT_CONFIG.STRINGS.supercedes})},configClose:function(type,args,obj){var val=args[0],oClose=this.close,strings=this.cfg.getProperty("strings");if(val){if(!oClose){if(!m_oCloseIconTemplate){m_oCloseIconTemplate=document.createElement("a");m_oCloseIconTemplate.className="container-close";m_oCloseIconTemplate.href="#"}oClose=m_oCloseIconTemplate.cloneNode(true);this.innerElement.appendChild(oClose);oClose.innerHTML=(strings&&strings.close)?strings.close:"&#160;";Event.on(oClose,"click",this._doClose,this,true);this.close=oClose}else{oClose.style.display="block"}}else{if(oClose){oClose.style.display="none"}}},_doClose:function(e){Event.preventDefault(e);this.hide()},configDraggable:function(type,args,obj){var val=args[0];if(val){if(!Util.DD){this.cfg.setProperty("draggable",false);return}if(this.header){Dom.setStyle(this.header,"cursor","move");this.registerDragDrop()}this.subscribe("beforeShow",setWidthToOffsetWidth)}else{if(this.dd){this.dd.unreg()}if(this.header){Dom.setStyle(this.header,"cursor","auto")}this.unsubscribe("beforeShow",setWidthToOffsetWidth)}},configUnderlay:function(type,args,obj){var bMacGecko=(this.platform=="mac"&&UA.gecko),sUnderlay=args[0].toLowerCase(),oUnderlay=this.underlay,oElement=this.element;function createUnderlay(){var bNew=false;if(!oUnderlay){if(!m_oUnderlayTemplate){m_oUnderlayTemplate=document.createElement("div");m_oUnderlayTemplate.className="underlay"}oUnderlay=m_oUnderlayTemplate.cloneNode(false);this.element.appendChild(oUnderlay);this.underlay=oUnderlay;if(bIEQuirks){this.sizeUnderlay();this.cfg.subscribeToConfigEvent("width",this.sizeUnderlay);this.cfg.subscribeToConfigEvent("height",this.sizeUnderlay);this.changeContentEvent.subscribe(this.sizeUnderlay);YAHOO.widget.Module.textResizeEvent.subscribe(this.sizeUnderlay,this,true)}if(UA.webkit&&UA.webkit<420){this.changeContentEvent.subscribe(this.forceUnderlayRedraw)}bNew=true}}function onBeforeShow(){var bNew=createUnderlay.call(this);if(!bNew&&bIEQuirks){this.sizeUnderlay()}this._underlayDeferred=false;this.beforeShowEvent.unsubscribe(onBeforeShow)}function destroyUnderlay(){if(this._underlayDeferred){this.beforeShowEvent.unsubscribe(onBeforeShow);this._underlayDeferred=false}if(oUnderlay){this.cfg.unsubscribeFromConfigEvent("width",this.sizeUnderlay);this.cfg.unsubscribeFromConfigEvent("height",this.sizeUnderlay);this.changeContentEvent.unsubscribe(this.sizeUnderlay);this.changeContentEvent.unsubscribe(this.forceUnderlayRedraw);YAHOO.widget.Module.textResizeEvent.unsubscribe(this.sizeUnderlay,this,true);this.element.removeChild(oUnderlay);this.underlay=null}}switch(sUnderlay){case"shadow":Dom.removeClass(oElement,"matte");Dom.addClass(oElement,"shadow");break;case"matte":if(!bMacGecko){destroyUnderlay.call(this)}Dom.removeClass(oElement,"shadow");Dom.addClass(oElement,"matte");break;default:if(!bMacGecko){destroyUnderlay.call(this)}Dom.removeClass(oElement,"shadow");Dom.removeClass(oElement,"matte");break}if((sUnderlay=="shadow")||(bMacGecko&&!oUnderlay)){if(this.cfg.getProperty("visible")){var bNew=createUnderlay.call(this);if(!bNew&&bIEQuirks){this.sizeUnderlay()}}else{if(!this._underlayDeferred){this.beforeShowEvent.subscribe(onBeforeShow);this._underlayDeferred=true}}}},configModal:function(type,args,obj){var modal=args[0];if(modal){if(!this._hasModalityEventListeners){this.subscribe("beforeShow",this.buildMask);this.subscribe("beforeShow",this.bringToTop);this.subscribe("beforeShow",this.showMask);this.subscribe("hide",this.hideMask);Overlay.windowResizeEvent.subscribe(this.sizeMask,this,true);this._hasModalityEventListeners=true}}else{if(this._hasModalityEventListeners){if(this.cfg.getProperty("visible")){this.hideMask();this.removeMask()}this.unsubscribe("beforeShow",this.buildMask);this.unsubscribe("beforeShow",this.bringToTop);this.unsubscribe("beforeShow",this.showMask);this.unsubscribe("hide",this.hideMask);Overlay.windowResizeEvent.unsubscribe(this.sizeMask,this);this._hasModalityEventListeners=false}}},removeMask:function(){var oMask=this.mask,oParentNode;if(oMask){this.hideMask();oParentNode=oMask.parentNode;if(oParentNode){oParentNode.removeChild(oMask)}this.mask=null}},configKeyListeners:function(type,args,obj){var listeners=args[0],listener,nListeners,i;if(listeners){if(listeners instanceof Array){nListeners=listeners.length;for(i=0;i<nListeners;i++){listener=listeners[i];if(!Config.alreadySubscribed(this.showEvent,listener.enable,listener)){this.showEvent.subscribe(listener.enable,listener,true)}if(!Config.alreadySubscribed(this.hideEvent,listener.disable,listener)){this.hideEvent.subscribe(listener.disable,listener,true);this.destroyEvent.subscribe(listener.disable,listener,true)}}}else{if(!Config.alreadySubscribed(this.showEvent,listeners.enable,listeners)){this.showEvent.subscribe(listeners.enable,listeners,true)}if(!Config.alreadySubscribed(this.hideEvent,listeners.disable,listeners)){this.hideEvent.subscribe(listeners.disable,listeners,true);this.destroyEvent.subscribe(listeners.disable,listeners,true)}}}},configStrings:function(type,args,obj){var val=Lang.merge(DEFAULT_CONFIG.STRINGS.value,args[0]);this.cfg.setProperty(DEFAULT_CONFIG.STRINGS.key,val,true)},configHeight:function(type,args,obj){var height=args[0],el=this.innerElement;Dom.setStyle(el,"height",height);this.cfg.refireEvent("iframe")},_autoFillOnHeightChange:function(type,args,el){Panel.superclass._autoFillOnHeightChange.apply(this,arguments);if(bIEQuirks){var panel=this;setTimeout(function(){panel.sizeUnderlay()},0)}},configWidth:function(type,args,obj){var width=args[0],el=this.innerElement;Dom.setStyle(el,"width",width);this.cfg.refireEvent("iframe")},configzIndex:function(type,args,obj){Panel.superclass.configzIndex.call(this,type,args,obj);if(this.mask||this.cfg.getProperty("modal")===true){var panelZ=Dom.getStyle(this.element,"zIndex");if(!panelZ||isNaN(panelZ)){panelZ=0}if(panelZ===0){this.cfg.setProperty("zIndex",1)}else{this.stackMask()}}},buildWrapper:function(){var elementParent=this.element.parentNode,originalElement=this.element,wrapper=document.createElement("div");wrapper.className=Panel.CSS_PANEL_CONTAINER;wrapper.id=originalElement.id+"_c";if(elementParent){elementParent.insertBefore(wrapper,originalElement)}wrapper.appendChild(originalElement);this.element=wrapper;this.innerElement=originalElement;Dom.setStyle(this.innerElement,"visibility","inherit")},sizeUnderlay:function(){var oUnderlay=this.underlay,oElement;if(oUnderlay){oElement=this.element;oUnderlay.style.width=oElement.offsetWidth+"px";oUnderlay.style.height=oElement.offsetHeight+"px"}},registerDragDrop:function(){var me=this;if(this.header){if(!Util.DD){return}var bDragOnly=(this.cfg.getProperty("dragonly")===true);this.dd=new Util.DD(this.element.id,this.id,{dragOnly:bDragOnly});if(!this.header.id){this.header.id=this.id+"_h"}this.dd.startDrag=function(){var offsetHeight,offsetWidth,viewPortWidth,viewPortHeight,scrollX,scrollY;if(YAHOO.env.ua.ie==6){Dom.addClass(me.element,"drag")}if(me.cfg.getProperty("constraintoviewport")){var nViewportOffset=Overlay.VIEWPORT_OFFSET;offsetHeight=me.element.offsetHeight;offsetWidth=me.element.offsetWidth;viewPortWidth=Dom.getViewportWidth();viewPortHeight=Dom.getViewportHeight();scrollX=Dom.getDocumentScrollLeft();scrollY=Dom.getDocumentScrollTop();if(offsetHeight+nViewportOffset<viewPortHeight){this.minY=scrollY+nViewportOffset;this.maxY=scrollY+viewPortHeight-offsetHeight-nViewportOffset}else{this.minY=scrollY+nViewportOffset;this.maxY=scrollY+nViewportOffset}if(offsetWidth+nViewportOffset<viewPortWidth){this.minX=scrollX+nViewportOffset;this.maxX=scrollX+viewPortWidth-offsetWidth-nViewportOffset}else{this.minX=scrollX+nViewportOffset;this.maxX=scrollX+nViewportOffset}this.constrainX=true;this.constrainY=true}else{this.constrainX=false;this.constrainY=false}me.dragEvent.fire("startDrag",arguments)};this.dd.onDrag=function(){me.syncPosition();me.cfg.refireEvent("iframe");if(this.platform=="mac"&&YAHOO.env.ua.gecko){this.showMacGeckoScrollbars()}me.dragEvent.fire("onDrag",arguments)};this.dd.endDrag=function(){if(YAHOO.env.ua.ie==6){Dom.removeClass(me.element,"drag")}me.dragEvent.fire("endDrag",arguments);me.moveEvent.fire(me.cfg.getProperty("xy"))};this.dd.setHandleElId(this.header.id);this.dd.addInvalidHandleType("INPUT");this.dd.addInvalidHandleType("SELECT");this.dd.addInvalidHandleType("TEXTAREA")}},buildMask:function(){var oMask=this.mask;if(!oMask){if(!m_oMaskTemplate){m_oMaskTemplate=document.createElement("div");m_oMaskTemplate.className="mask";m_oMaskTemplate.innerHTML="&#160;"}oMask=m_oMaskTemplate.cloneNode(true);oMask.id=this.id+"_mask";document.body.insertBefore(oMask,document.body.firstChild);this.mask=oMask;if(YAHOO.env.ua.gecko&&this.platform=="mac"){Dom.addClass(this.mask,"block-scrollbars")}this.stackMask()}},hideMask:function(){if(this.cfg.getProperty("modal")&&this.mask){this.mask.style.display="none";Dom.removeClass(document.body,"masked");this.hideMaskEvent.fire()}},showMask:function(){if(this.cfg.getProperty("modal")&&this.mask){Dom.addClass(document.body,"masked");this.sizeMask();this.mask.style.display="block";this.showMaskEvent.fire()}},sizeMask:function(){if(this.mask){var mask=this.mask,viewWidth=Dom.getViewportWidth(),viewHeight=Dom.getViewportHeight();if(mask.offsetHeight>viewHeight){mask.style.height=viewHeight+"px"}if(mask.offsetWidth>viewWidth){mask.style.width=viewWidth+"px"}mask.style.height=Dom.getDocumentHeight()+"px";mask.style.width=Dom.getDocumentWidth()+"px"}},stackMask:function(){if(this.mask){var panelZ=Dom.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(panelZ)&&!isNaN(panelZ)){Dom.setStyle(this.mask,"zIndex",panelZ-1)}}},render:function(appendToNode){return Panel.superclass.render.call(this,appendToNode,this.innerElement)},destroy:function(){Overlay.windowResizeEvent.unsubscribe(this.sizeMask,this);this.removeMask();if(this.close){Event.purgeElement(this.close)}Panel.superclass.destroy.call(this)},forceUnderlayRedraw:function(){var u=this.underlay;Dom.addClass(u,"yui-force-redraw");setTimeout(function(){Dom.removeClass(u,"yui-force-redraw")},0)},toString:function(){return"Panel "+this.id}})}());(function(){YAHOO.widget.Dialog=function(el,userConfig){YAHOO.widget.Dialog.superclass.constructor.call(this,el,userConfig)};var Event=YAHOO.util.Event,CustomEvent=YAHOO.util.CustomEvent,Dom=YAHOO.util.Dom,Dialog=YAHOO.widget.Dialog,Lang=YAHOO.lang,EVENT_TYPES={"BEFORE_SUBMIT":"beforeSubmit","SUBMIT":"submit","MANUAL_SUBMIT":"manualSubmit","ASYNC_SUBMIT":"asyncSubmit","FORM_SUBMIT":"formSubmit","CANCEL":"cancel"},DEFAULT_CONFIG={"POST_METHOD":{key:"postmethod",value:"async"},"POST_DATA":{key:"postdata",value:null},"BUTTONS":{key:"buttons",value:"none",supercedes:["visible"]},"HIDEAFTERSUBMIT":{key:"hideaftersubmit",value:true}};Dialog.CSS_DIALOG="yui-dialog";function removeButtonEventHandlers(){var aButtons=this._aButtons,nButtons,oButton,i;if(Lang.isArray(aButtons)){nButtons=aButtons.length;if(nButtons>0){i=nButtons-1;do{oButton=aButtons[i];if(YAHOO.widget.Button&&oButton instanceof YAHOO.widget.Button){oButton.destroy()}else if(oButton.tagName.toUpperCase()=="BUTTON"){Event.purgeElement(oButton);Event.purgeElement(oButton,false)}}while(i--)}}}YAHOO.extend(Dialog,YAHOO.widget.Panel,{form:null,initDefaultConfig:function(){Dialog.superclass.initDefaultConfig.call(this);this.callback={success:null,failure:null,argument:null};this.cfg.addProperty(DEFAULT_CONFIG.POST_METHOD.key,{handler:this.configPostMethod,value:DEFAULT_CONFIG.POST_METHOD.value,validator:function(val){if(val!="form"&&val!="async"&&val!="none"&&val!="manual"){return false}else{return true}}});this.cfg.addProperty(DEFAULT_CONFIG.POST_DATA.key,{value:DEFAULT_CONFIG.POST_DATA.value});this.cfg.addProperty(DEFAULT_CONFIG.HIDEAFTERSUBMIT.key,{value:DEFAULT_CONFIG.HIDEAFTERSUBMIT.value});this.cfg.addProperty(DEFAULT_CONFIG.BUTTONS.key,{handler:this.configButtons,value:DEFAULT_CONFIG.BUTTONS.value,supercedes:DEFAULT_CONFIG.BUTTONS.supercedes})},initEvents:function(){Dialog.superclass.initEvents.call(this);var SIGNATURE=CustomEvent.LIST;this.beforeSubmitEvent=this.createEvent(EVENT_TYPES.BEFORE_SUBMIT);this.beforeSubmitEvent.signature=SIGNATURE;this.submitEvent=this.createEvent(EVENT_TYPES.SUBMIT);this.submitEvent.signature=SIGNATURE;this.manualSubmitEvent=this.createEvent(EVENT_TYPES.MANUAL_SUBMIT);this.manualSubmitEvent.signature=SIGNATURE;this.asyncSubmitEvent=this.createEvent(EVENT_TYPES.ASYNC_SUBMIT);this.asyncSubmitEvent.signature=SIGNATURE;this.formSubmitEvent=this.createEvent(EVENT_TYPES.FORM_SUBMIT);this.formSubmitEvent.signature=SIGNATURE;this.cancelEvent=this.createEvent(EVENT_TYPES.CANCEL);this.cancelEvent.signature=SIGNATURE},init:function(el,userConfig){Dialog.superclass.init.call(this,el);this.beforeInitEvent.fire(Dialog);Dom.addClass(this.element,Dialog.CSS_DIALOG);this.cfg.setProperty("visible",false);if(userConfig){this.cfg.applyConfig(userConfig,true)}this.showEvent.subscribe(this.focusFirst,this,true);this.beforeHideEvent.subscribe(this.blurButtons,this,true);this.subscribe("changeBody",this.registerForm);this.initEvent.fire(Dialog)},doSubmit:function(){var Connect=YAHOO.util.Connect,oForm=this.form,bUseFileUpload=false,bUseSecureFileUpload=false,aElements,nElements,i,formAttrs;switch(this.cfg.getProperty("postmethod")){case"async":aElements=oForm.elements;nElements=aElements.length;if(nElements>0){i=nElements-1;do{if(aElements[i].type=="file"){bUseFileUpload=true;break}}while(i--)}if(bUseFileUpload&&YAHOO.env.ua.ie&&this.isSecure){bUseSecureFileUpload=true}formAttrs=this._getFormAttributes(oForm);Connect.setForm(oForm,bUseFileUpload,bUseSecureFileUpload);var postData=this.cfg.getProperty("postdata");var c=Connect.asyncRequest(formAttrs.method,formAttrs.action,this.callback,postData);this.asyncSubmitEvent.fire(c);break;case"form":oForm.submit();this.formSubmitEvent.fire();break;case"none":case"manual":this.manualSubmitEvent.fire();break}},_getFormAttributes:function(oForm){var attrs={method:null,action:null};if(oForm){if(oForm.getAttributeNode){var action=oForm.getAttributeNode("action");var method=oForm.getAttributeNode("method");if(action){attrs.action=action.value}if(method){attrs.method=method.value}}else{attrs.action=oForm.getAttribute("action");attrs.method=oForm.getAttribute("method")}}attrs.method=(Lang.isString(attrs.method)?attrs.method:"POST").toUpperCase();attrs.action=Lang.isString(attrs.action)?attrs.action:"";return attrs},registerForm:function(){var form=this.element.getElementsByTagName("form")[0];if(this.form){if(this.form==form&&Dom.isAncestor(this.element,this.form)){return}else{Event.purgeElement(this.form);this.form=null}}if(!form){form=document.createElement("form");form.name="frm_"+this.id;this.body.appendChild(form)}if(form){this.form=form;Event.on(form,"submit",this._submitHandler,this,true)}},_submitHandler:function(e){Event.stopEvent(e);this.submit();this.form.blur()},setTabLoop:function(firstElement,lastElement){firstElement=firstElement||this.firstButton;lastElement=this.lastButton||lastElement;Dialog.superclass.setTabLoop.call(this,firstElement,lastElement)},setFirstLastFocusable:function(){Dialog.superclass.setFirstLastFocusable.call(this);var i,l,el,elements=this.focusableElements;this.firstFormElement=null;this.lastFormElement=null;if(this.form&&elements&&elements.length>0){l=elements.length;for(i=0;i<l;++i){el=elements[i];if(this.form===el.form){this.firstFormElement=el;break}}for(i=l-1;i>=0;--i){el=elements[i];if(this.form===el.form){this.lastFormElement=el;break}}}},configClose:function(type,args,obj){Dialog.superclass.configClose.apply(this,arguments)},_doClose:function(e){Event.preventDefault(e);this.cancel()},configButtons:function(type,args,obj){var Button=YAHOO.widget.Button,aButtons=args[0],oInnerElement=this.innerElement,oButton,oButtonEl,oYUIButton,nButtons,oSpan,oFooter,i;removeButtonEventHandlers.call(this);this._aButtons=null;if(Lang.isArray(aButtons)){oSpan=document.createElement("span");oSpan.className="button-group";nButtons=aButtons.length;this._aButtons=[];this.defaultHtmlButton=null;for(i=0;i<nButtons;i++){oButton=aButtons[i];if(Button){oYUIButton=new Button({label:oButton.text});oYUIButton.appendTo(oSpan);oButtonEl=oYUIButton.get("element");if(oButton.isDefault){oYUIButton.addClass("default");this.defaultHtmlButton=oButtonEl}if(Lang.isFunction(oButton.handler)){oYUIButton.set("onclick",{fn:oButton.handler,obj:this,scope:this})}else if(Lang.isObject(oButton.handler)&&Lang.isFunction(oButton.handler.fn)){oYUIButton.set("onclick",{fn:oButton.handler.fn,obj:((!Lang.isUndefined(oButton.handler.obj))?oButton.handler.obj:this),scope:(oButton.handler.scope||this)})}this._aButtons[this._aButtons.length]=oYUIButton}else{oButtonEl=document.createElement("button");oButtonEl.setAttribute("type","button");if(oButton.isDefault){oButtonEl.className="default";this.defaultHtmlButton=oButtonEl}oButtonEl.innerHTML=oButton.text;if(Lang.isFunction(oButton.handler)){Event.on(oButtonEl,"click",oButton.handler,this,true)}else if(Lang.isObject(oButton.handler)&&Lang.isFunction(oButton.handler.fn)){Event.on(oButtonEl,"click",oButton.handler.fn,((!Lang.isUndefined(oButton.handler.obj))?oButton.handler.obj:this),(oButton.handler.scope||this))}oSpan.appendChild(oButtonEl);this._aButtons[this._aButtons.length]=oButtonEl}oButton.htmlButton=oButtonEl;if(i===0){this.firstButton=oButtonEl}if(i==(nButtons-1)){this.lastButton=oButtonEl}}this.setFooter(oSpan);oFooter=this.footer;if(Dom.inDocument(this.element)&&!Dom.isAncestor(oInnerElement,oFooter)){oInnerElement.appendChild(oFooter)}this.buttonSpan=oSpan}else{oSpan=this.buttonSpan;oFooter=this.footer;if(oSpan&&oFooter){oFooter.removeChild(oSpan);this.buttonSpan=null;this.firstButton=null;this.lastButton=null;this.defaultHtmlButton=null}}this.changeContentEvent.fire()},getButtons:function(){return this._aButtons||null},focusFirst:function(type,args,obj){var el=this.firstFormElement;if(args&&args[1]){Event.stopEvent(args[1])}if(el){try{el.focus()}catch(oException){}}else{if(this.defaultHtmlButton){this.focusDefaultButton()}else{this.focusFirstButton()}}},focusLast:function(type,args,obj){var aButtons=this.cfg.getProperty("buttons"),el=this.lastFormElement;if(args&&args[1]){Event.stopEvent(args[1])}if(aButtons&&Lang.isArray(aButtons)){this.focusLastButton()}else{if(el){try{el.focus()}catch(oException){}}}},_getButton:function(button){var Button=YAHOO.widget.Button;if(Button&&button&&button.nodeName&&button.id){button=Button.getButton(button.id)||button}return button},focusDefaultButton:function(){var button=this._getButton(this.defaultHtmlButton);if(button){try{button.focus()}catch(oException){}}},blurButtons:function(){var aButtons=this.cfg.getProperty("buttons"),nButtons,oButton,oElement,i;if(aButtons&&Lang.isArray(aButtons)){nButtons=aButtons.length;if(nButtons>0){i=(nButtons-1);do{oButton=aButtons[i];if(oButton){oElement=this._getButton(oButton.htmlButton);if(oElement){try{oElement.blur()}catch(oException){}}}}while(i--)}}},focusFirstButton:function(){var aButtons=this.cfg.getProperty("buttons"),oButton,oElement;if(aButtons&&Lang.isArray(aButtons)){oButton=aButtons[0];if(oButton){oElement=this._getButton(oButton.htmlButton);if(oElement){try{oElement.focus()}catch(oException){}}}}},focusLastButton:function(){var aButtons=this.cfg.getProperty("buttons"),nButtons,oButton,oElement;if(aButtons&&Lang.isArray(aButtons)){nButtons=aButtons.length;if(nButtons>0){oButton=aButtons[(nButtons-1)];if(oButton){oElement=this._getButton(oButton.htmlButton);if(oElement){try{oElement.focus()}catch(oException){}}}}}},configPostMethod:function(type,args,obj){this.registerForm()},validate:function(){return true},submit:function(){if(this.validate()){this.beforeSubmitEvent.fire();this.doSubmit();this.submitEvent.fire();if(this.cfg.getProperty("hideaftersubmit")){this.hide()}return true}else{return false}},cancel:function(){this.cancelEvent.fire();this.hide()},getData:function(){var oForm=this.form,aElements,nTotalElements,oData,sName,oElement,nElements,sType,sTagName,aOptions,nOptions,aValues,oOption,sValue,oRadio,oCheckbox,i,n;function isFormElement(p_oElement){var sTag=p_oElement.tagName.toUpperCase();return((sTag=="INPUT"||sTag=="TEXTAREA"||sTag=="SELECT")&&p_oElement.name==sName)}if(oForm){aElements=oForm.elements;nTotalElements=aElements.length;oData={};for(i=0;i<nTotalElements;i++){sName=aElements[i].name;oElement=Dom.getElementsBy(isFormElement,"*",oForm);nElements=oElement.length;if(nElements>0){if(nElements==1){oElement=oElement[0];sType=oElement.type;sTagName=oElement.tagName.toUpperCase();switch(sTagName){case"INPUT":if(sType=="checkbox"){oData[sName]=oElement.checked}else if(sType!="radio"){oData[sName]=oElement.value}break;case"TEXTAREA":oData[sName]=oElement.value;break;case"SELECT":aOptions=oElement.options;nOptions=aOptions.length;aValues=[];for(n=0;n<nOptions;n++){oOption=aOptions[n];if(oOption.selected){sValue=oOption.value;if(!sValue||sValue===""){sValue=oOption.text}aValues[aValues.length]=sValue}}oData[sName]=aValues;break}}else{sType=oElement[0].type;switch(sType){case"radio":for(n=0;n<nElements;n++){oRadio=oElement[n];if(oRadio.checked){oData[sName]=oRadio.value;break}}break;case"checkbox":aValues=[];for(n=0;n<nElements;n++){oCheckbox=oElement[n];if(oCheckbox.checked){aValues[aValues.length]=oCheckbox.value}}oData[sName]=aValues;break}}}}}return oData},destroy:function(){removeButtonEventHandlers.call(this);this._aButtons=null;var aForms=this.element.getElementsByTagName("form"),oForm;if(aForms.length>0){oForm=aForms[0];if(oForm){Event.purgeElement(oForm);if(oForm.parentNode){oForm.parentNode.removeChild(oForm)}this.form=null}}Dialog.superclass.destroy.call(this)},toString:function(){return"Dialog "+this.id}})}());(function(){YAHOO.widget.SimpleDialog=function(el,userConfig){YAHOO.widget.SimpleDialog.superclass.constructor.call(this,el,userConfig)};var Dom=YAHOO.util.Dom,SimpleDialog=YAHOO.widget.SimpleDialog,DEFAULT_CONFIG={"ICON":{key:"icon",value:"none",suppressEvent:true},"TEXT":{key:"text",value:"",suppressEvent:true,supercedes:["icon"]}};SimpleDialog.ICON_BLOCK="blckicon";SimpleDialog.ICON_ALARM="alrticon";SimpleDialog.ICON_HELP="hlpicon";SimpleDialog.ICON_INFO="infoicon";SimpleDialog.ICON_WARN="warnicon";SimpleDialog.ICON_TIP="tipicon";SimpleDialog.ICON_CSS_CLASSNAME="yui-icon";SimpleDialog.CSS_SIMPLEDIALOG="yui-simple-dialog";YAHOO.extend(SimpleDialog,YAHOO.widget.Dialog,{initDefaultConfig:function(){SimpleDialog.superclass.initDefaultConfig.call(this);this.cfg.addProperty(DEFAULT_CONFIG.ICON.key,{handler:this.configIcon,value:DEFAULT_CONFIG.ICON.value,suppressEvent:DEFAULT_CONFIG.ICON.suppressEvent});this.cfg.addProperty(DEFAULT_CONFIG.TEXT.key,{handler:this.configText,value:DEFAULT_CONFIG.TEXT.value,suppressEvent:DEFAULT_CONFIG.TEXT.suppressEvent,supercedes:DEFAULT_CONFIG.TEXT.supercedes})},init:function(el,userConfig){SimpleDialog.superclass.init.call(this,el);this.beforeInitEvent.fire(SimpleDialog);Dom.addClass(this.element,SimpleDialog.CSS_SIMPLEDIALOG);this.cfg.queueProperty("postmethod","manual");if(userConfig){this.cfg.applyConfig(userConfig,true)}this.beforeRenderEvent.subscribe(function(){if(!this.body){this.setBody("")}},this,true);this.initEvent.fire(SimpleDialog)},registerForm:function(){SimpleDialog.superclass.registerForm.call(this);this.form.innerHTML+="<input type=\"hidden\" name=\""+this.id+"\" value=\"\"/>"},configIcon:function(type,args,obj){var sIcon=args[0],oBody=this.body,sCSSClass=SimpleDialog.ICON_CSS_CLASSNAME,oIcon,oIconParent;if(sIcon&&sIcon!="none"){oIcon=Dom.getElementsByClassName(sCSSClass,"*",oBody);if(oIcon){oIconParent=oIcon.parentNode;if(oIconParent){oIconParent.removeChild(oIcon);oIcon=null}}if(sIcon.indexOf(".")==-1){oIcon=document.createElement("span");oIcon.className=(sCSSClass+" "+sIcon);oIcon.innerHTML="&#160;"}else{oIcon=document.createElement("img");oIcon.src=(this.imageRoot+sIcon);oIcon.className=sCSSClass}if(oIcon){oBody.insertBefore(oIcon,oBody.firstChild)}}},configText:function(type,args,obj){var text=args[0];if(text){this.setBody(text);this.cfg.refireEvent("icon")}},toString:function(){return"SimpleDialog "+this.id}})}());(function(){YAHOO.widget.ContainerEffect=function(overlay,attrIn,attrOut,targetElement,animClass){if(!animClass){animClass=YAHOO.util.Anim}this.overlay=overlay;this.attrIn=attrIn;this.attrOut=attrOut;this.targetElement=targetElement||overlay.element;this.animClass=animClass};var Dom=YAHOO.util.Dom,CustomEvent=YAHOO.util.CustomEvent,ContainerEffect=YAHOO.widget.ContainerEffect;ContainerEffect.FADE=function(overlay,dur){var Easing=YAHOO.util.Easing,fin={attributes:{opacity:{from:0,to:1}},duration:dur,method:Easing.easeIn},fout={attributes:{opacity:{to:0}},duration:dur,method:Easing.easeOut},fade=new ContainerEffect(overlay,fin,fout,overlay.element);fade.handleUnderlayStart=function(){var underlay=this.overlay.underlay;if(underlay&&YAHOO.env.ua.ie){var hasFilters=(underlay.filters&&underlay.filters.length>0);if(hasFilters){Dom.addClass(overlay.element,"yui-effect-fade")}}};fade.handleUnderlayComplete=function(){var underlay=this.overlay.underlay;if(underlay&&YAHOO.env.ua.ie){Dom.removeClass(overlay.element,"yui-effect-fade")}};fade.handleStartAnimateIn=function(type,args,obj){Dom.addClass(obj.overlay.element,"hide-select");if(!obj.overlay.underlay){obj.overlay.cfg.refireEvent("underlay")}obj.handleUnderlayStart();obj.overlay._setDomVisibility(true);Dom.setStyle(obj.overlay.element,"opacity",0)};fade.handleCompleteAnimateIn=function(type,args,obj){Dom.removeClass(obj.overlay.element,"hide-select");if(obj.overlay.element.style.filter){obj.overlay.element.style.filter=null}obj.handleUnderlayComplete();obj.overlay.cfg.refireEvent("iframe");obj.animateInCompleteEvent.fire()};fade.handleStartAnimateOut=function(type,args,obj){Dom.addClass(obj.overlay.element,"hide-select");obj.handleUnderlayStart()};fade.handleCompleteAnimateOut=function(type,args,obj){Dom.removeClass(obj.overlay.element,"hide-select");if(obj.overlay.element.style.filter){obj.overlay.element.style.filter=null}obj.overlay._setDomVisibility(false);Dom.setStyle(obj.overlay.element,"opacity",1);obj.handleUnderlayComplete();obj.overlay.cfg.refireEvent("iframe");obj.animateOutCompleteEvent.fire()};fade.init();return fade};ContainerEffect.SLIDE=function(overlay,dur){var Easing=YAHOO.util.Easing,x=overlay.cfg.getProperty("x")||Dom.getX(overlay.element),y=overlay.cfg.getProperty("y")||Dom.getY(overlay.element),clientWidth=Dom.getClientWidth(),offsetWidth=overlay.element.offsetWidth,sin={attributes:{points:{to:[x,y]}},duration:dur,method:Easing.easeIn},sout={attributes:{points:{to:[(clientWidth+25),y]}},duration:dur,method:Easing.easeOut},slide=new ContainerEffect(overlay,sin,sout,overlay.element,YAHOO.util.Motion);slide.handleStartAnimateIn=function(type,args,obj){obj.overlay.element.style.left=((-25)-offsetWidth)+"px";obj.overlay.element.style.top=y+"px"};slide.handleTweenAnimateIn=function(type,args,obj){var pos=Dom.getXY(obj.overlay.element),currentX=pos[0],currentY=pos[1];if(Dom.getStyle(obj.overlay.element,"visibility")=="hidden"&&currentX<x){obj.overlay._setDomVisibility(true)}obj.overlay.cfg.setProperty("xy",[currentX,currentY],true);obj.overlay.cfg.refireEvent("iframe")};slide.handleCompleteAnimateIn=function(type,args,obj){obj.overlay.cfg.setProperty("xy",[x,y],true);obj.startX=x;obj.startY=y;obj.overlay.cfg.refireEvent("iframe");obj.animateInCompleteEvent.fire()};slide.handleStartAnimateOut=function(type,args,obj){var vw=Dom.getViewportWidth(),pos=Dom.getXY(obj.overlay.element),yso=pos[1];obj.animOut.attributes.points.to=[(vw+25),yso]};slide.handleTweenAnimateOut=function(type,args,obj){var pos=Dom.getXY(obj.overlay.element),xto=pos[0],yto=pos[1];obj.overlay.cfg.setProperty("xy",[xto,yto],true);obj.overlay.cfg.refireEvent("iframe")};slide.handleCompleteAnimateOut=function(type,args,obj){obj.overlay._setDomVisibility(false);obj.overlay.cfg.setProperty("xy",[x,y]);obj.animateOutCompleteEvent.fire()};slide.init();return slide};ContainerEffect.prototype={init:function(){this.beforeAnimateInEvent=this.createEvent("beforeAnimateIn");this.beforeAnimateInEvent.signature=CustomEvent.LIST;this.beforeAnimateOutEvent=this.createEvent("beforeAnimateOut");this.beforeAnimateOutEvent.signature=CustomEvent.LIST;this.animateInCompleteEvent=this.createEvent("animateInComplete");this.animateInCompleteEvent.signature=CustomEvent.LIST;this.animateOutCompleteEvent=this.createEvent("animateOutComplete");this.animateOutCompleteEvent.signature=CustomEvent.LIST;this.animIn=new this.animClass(this.targetElement,this.attrIn.attributes,this.attrIn.duration,this.attrIn.method);this.animIn.onStart.subscribe(this.handleStartAnimateIn,this);this.animIn.onTween.subscribe(this.handleTweenAnimateIn,this);this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn,this);this.animOut=new this.animClass(this.targetElement,this.attrOut.attributes,this.attrOut.duration,this.attrOut.method);this.animOut.onStart.subscribe(this.handleStartAnimateOut,this);this.animOut.onTween.subscribe(this.handleTweenAnimateOut,this);this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut,this)},animateIn:function(){this.beforeAnimateInEvent.fire();this.animIn.animate()},animateOut:function(){this.beforeAnimateOutEvent.fire();this.animOut.animate()},handleStartAnimateIn:function(type,args,obj){},handleTweenAnimateIn:function(type,args,obj){},handleCompleteAnimateIn:function(type,args,obj){},handleStartAnimateOut:function(type,args,obj){},handleTweenAnimateOut:function(type,args,obj){},handleCompleteAnimateOut:function(type,args,obj){},toString:function(){var output="ContainerEffect";if(this.overlay){output+=" ["+this.overlay.toString()+"]"}return output}};YAHOO.lang.augmentProto(ContainerEffect,YAHOO.util.EventProvider)})();YAHOO.register("container",YAHOO.widget.Module,{version:"2.7.0",build:"1799"});/*
313 299 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
314 300 Code licensed under the BSD License:
315 301 http://developer.yahoo.net/yui/license.txt
316 302 version: 2.7.0
317 303 */
318 304 YAHOO.util.Attribute=function(B,A){if(A){this.owner=A;this.configure(B,true);}};YAHOO.util.Attribute.prototype={name:undefined,value:null,owner:null,readOnly:false,writeOnce:false,_initialConfig:null,_written:false,method:null,setter:null,getter:null,validator:null,getValue:function(){var A=this.value;if(this.getter){A=this.getter.call(this.owner,this.name);}return A;},setValue:function(F,B){var E,A=this.owner,C=this.name;var D={type:C,prevValue:this.getValue(),newValue:F};if(this.readOnly||(this.writeOnce&&this._written)){return false;}if(this.validator&&!this.validator.call(A,F)){return false;}if(!B){E=A.fireBeforeChangeEvent(D);if(E===false){return false;}}if(this.setter){F=this.setter.call(A,F,this.name);if(F===undefined){}}if(this.method){this.method.call(A,F,this.name);}this.value=F;this._written=true;D.type=C;if(!B){this.owner.fireChangeEvent(D);}return true;},configure:function(B,C){B=B||{};if(C){this._written=false;}this._initialConfig=this._initialConfig||{};for(var A in B){if(B.hasOwnProperty(A)){this[A]=B[A];if(C){this._initialConfig[A]=B[A];}}}},resetValue:function(){return this.setValue(this._initialConfig.value);},resetConfig:function(){this.configure(this._initialConfig,true);},refresh:function(A){this.setValue(this.value,A);}};(function(){var A=YAHOO.util.Lang;YAHOO.util.AttributeProvider=function(){};YAHOO.util.AttributeProvider.prototype={_configs:null,get:function(C){this._configs=this._configs||{};var B=this._configs[C];if(!B||!this._configs.hasOwnProperty(C)){return null;}return B.getValue();},set:function(D,E,B){this._configs=this._configs||{};var C=this._configs[D];if(!C){return false;}return C.setValue(E,B);},getAttributeKeys:function(){this._configs=this._configs;var C=[],B;for(B in this._configs){if(A.hasOwnProperty(this._configs,B)&&!A.isUndefined(this._configs[B])){C[C.length]=B;}}return C;},setAttributes:function(D,B){for(var C in D){if(A.hasOwnProperty(D,C)){this.set(C,D[C],B);}}},resetValue:function(C,B){this._configs=this._configs||{};if(this._configs[C]){this.set(C,this._configs[C]._initialConfig.value,B);return true;}return false;},refresh:function(E,C){this._configs=this._configs||{};var F=this._configs;E=((A.isString(E))?[E]:E)||this.getAttributeKeys();for(var D=0,B=E.length;D<B;++D){if(F.hasOwnProperty(E[D])){this._configs[E[D]].refresh(C);}}},register:function(B,C){this.setAttributeConfig(B,C);},getAttributeConfig:function(C){this._configs=this._configs||{};var B=this._configs[C]||{};var D={};for(C in B){if(A.hasOwnProperty(B,C)){D[C]=B[C];}}return D;},setAttributeConfig:function(B,C,D){this._configs=this._configs||{};C=C||{};if(!this._configs[B]){C.name=B;this._configs[B]=this.createAttribute(C);}else{this._configs[B].configure(C,D);}},configureAttribute:function(B,C,D){this.setAttributeConfig(B,C,D);},resetAttributeConfig:function(B){this._configs=this._configs||{};this._configs[B].resetConfig();},subscribe:function(B,C){this._events=this._events||{};if(!(B in this._events)){this._events[B]=this.createEvent(B);}YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments);},on:function(){this.subscribe.apply(this,arguments);},addListener:function(){this.subscribe.apply(this,arguments);},fireBeforeChangeEvent:function(C){var B="before";B+=C.type.charAt(0).toUpperCase()+C.type.substr(1)+"Change";C.type=B;return this.fireEvent(C.type,C);},fireChangeEvent:function(B){B.type+="Change";return this.fireEvent(B.type,B);},createAttribute:function(B){return new YAHOO.util.Attribute(B,this);}};YAHOO.augment(YAHOO.util.AttributeProvider,YAHOO.util.EventProvider);})();(function(){var B=YAHOO.util.Dom,C=YAHOO.util.AttributeProvider;var A=function(D,E){this.init.apply(this,arguments);};A.DOM_EVENTS={"click":true,"dblclick":true,"keydown":true,"keypress":true,"keyup":true,"mousedown":true,"mousemove":true,"mouseout":true,"mouseover":true,"mouseup":true,"focus":true,"blur":true,"submit":true,"change":true};A.prototype={DOM_EVENTS:null,DEFAULT_HTML_SETTER:function(F,D){var E=this.get("element");if(E){E[D]=F;}},DEFAULT_HTML_GETTER:function(D){var E=this.get("element"),F;if(E){F=E[D];}return F;},appendChild:function(D){D=D.get?D.get("element"):D;return this.get("element").appendChild(D);},getElementsByTagName:function(D){return this.get("element").getElementsByTagName(D);},hasChildNodes:function(){return this.get("element").hasChildNodes();},insertBefore:function(D,E){D=D.get?D.get("element"):D;E=(E&&E.get)?E.get("element"):E;return this.get("element").insertBefore(D,E);},removeChild:function(D){D=D.get?D.get("element"):D;return this.get("element").removeChild(D);},replaceChild:function(D,E){D=D.get?D.get("element"):D;E=E.get?E.get("element"):E;return this.get("element").replaceChild(D,E);},initAttributes:function(D){},addListener:function(H,G,I,F){var E=this.get("element")||this.get("id");F=F||this;var D=this;if(!this._events[H]){if(E&&this.DOM_EVENTS[H]){YAHOO.util.Event.addListener(E,H,function(J){if(J.srcElement&&!J.target){J.target=J.srcElement;}D.fireEvent(H,J);},I,F);}this.createEvent(H,this);}return YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments);},on:function(){return this.addListener.apply(this,arguments);},subscribe:function(){return this.addListener.apply(this,arguments);},removeListener:function(E,D){return this.unsubscribe.apply(this,arguments);},addClass:function(D){B.addClass(this.get("element"),D);},getElementsByClassName:function(E,D){return B.getElementsByClassName(E,D,this.get("element"));},hasClass:function(D){return B.hasClass(this.get("element"),D);},removeClass:function(D){return B.removeClass(this.get("element"),D);},replaceClass:function(E,D){return B.replaceClass(this.get("element"),E,D);},setStyle:function(E,D){return B.setStyle(this.get("element"),E,D);},getStyle:function(D){return B.getStyle(this.get("element"),D);},fireQueue:function(){var E=this._queue;for(var F=0,D=E.length;F<D;++F){this[E[F][0]].apply(this,E[F][1]);}},appendTo:function(E,F){E=(E.get)?E.get("element"):B.get(E);this.fireEvent("beforeAppendTo",{type:"beforeAppendTo",target:E});
319   -F=(F&&F.get)?F.get("element"):B.get(F);var D=this.get("element");if(!D){return false;}if(!E){return false;}if(D.parent!=E){if(F){E.insertBefore(D,F);}else{E.appendChild(D);}}this.fireEvent("appendTo",{type:"appendTo",target:E});return D;},get:function(D){var F=this._configs||{},E=F.element;if(E&&!F[D]&&!YAHOO.lang.isUndefined(E.value[D])){this._setHTMLAttrConfig(D);}return C.prototype.get.call(this,D);},setAttributes:function(J,G){var E={},H=this._configOrder;for(var I=0,D=H.length;I<D;++I){if(J[H[I]]!==undefined){E[H[I]]=true;this.set(H[I],J[H[I]],G);}}for(var F in J){if(J.hasOwnProperty(F)&&!E[F]){this.set(F,J[F],G);}}},set:function(E,G,D){var F=this.get("element");if(!F){this._queue[this._queue.length]=["set",arguments];if(this._configs[E]){this._configs[E].value=G;}return;}if(!this._configs[E]&&!YAHOO.lang.isUndefined(F[E])){this._setHTMLAttrConfig(E);}return C.prototype.set.apply(this,arguments);},setAttributeConfig:function(D,E,F){this._configOrder.push(D);C.prototype.setAttributeConfig.apply(this,arguments);},createEvent:function(E,D){this._events[E]=true;return C.prototype.createEvent.apply(this,arguments);},init:function(E,D){this._initElement(E,D);},destroy:function(){var D=this.get("element");YAHOO.util.Event.purgeElement(D,true);this.unsubscribeAll();if(D&&D.parentNode){D.parentNode.removeChild(D);}this._queue=[];this._events={};this._configs={};this._configOrder=[];},_initElement:function(F,E){this._queue=this._queue||[];this._events=this._events||{};this._configs=this._configs||{};this._configOrder=[];E=E||{};E.element=E.element||F||null;var H=false;var D=A.DOM_EVENTS;this.DOM_EVENTS=this.DOM_EVENTS||{};for(var G in D){if(D.hasOwnProperty(G)){this.DOM_EVENTS[G]=D[G];}}if(typeof E.element==="string"){this._setHTMLAttrConfig("id",{value:E.element});}if(B.get(E.element)){H=true;this._initHTMLElement(E);this._initContent(E);}YAHOO.util.Event.onAvailable(E.element,function(){if(!H){this._initHTMLElement(E);}this.fireEvent("available",{type:"available",target:B.get(E.element)});},this,true);YAHOO.util.Event.onContentReady(E.element,function(){if(!H){this._initContent(E);}this.fireEvent("contentReady",{type:"contentReady",target:B.get(E.element)});},this,true);},_initHTMLElement:function(D){this.setAttributeConfig("element",{value:B.get(D.element),readOnly:true});},_initContent:function(D){this.initAttributes(D);this.setAttributes(D,true);this.fireQueue();},_setHTMLAttrConfig:function(D,F){var E=this.get("element");F=F||{};F.name=D;F.setter=F.setter||this.DEFAULT_HTML_SETTER;F.getter=F.getter||this.DEFAULT_HTML_GETTER;F.value=F.value||E[D];this._configs[D]=new YAHOO.util.Attribute(F,this);}};YAHOO.augment(A,C);YAHOO.util.Element=A;})();YAHOO.register("element",YAHOO.util.Element,{version:"2.7.0",build:"1799"});
320   -/*
  305 +F=(F&&F.get)?F.get("element"):B.get(F);var D=this.get("element");if(!D){return false;}if(!E){return false;}if(D.parent!=E){if(F){E.insertBefore(D,F);}else{E.appendChild(D);}}this.fireEvent("appendTo",{type:"appendTo",target:E});return D;},get:function(D){var F=this._configs||{},E=F.element;if(E&&!F[D]&&!YAHOO.lang.isUndefined(E.value[D])){this._setHTMLAttrConfig(D);}return C.prototype.get.call(this,D);},setAttributes:function(J,G){var E={},H=this._configOrder;for(var I=0,D=H.length;I<D;++I){if(J[H[I]]!==undefined){E[H[I]]=true;this.set(H[I],J[H[I]],G);}}for(var F in J){if(J.hasOwnProperty(F)&&!E[F]){this.set(F,J[F],G);}}},set:function(E,G,D){var F=this.get("element");if(!F){this._queue[this._queue.length]=["set",arguments];if(this._configs[E]){this._configs[E].value=G;}return;}if(!this._configs[E]&&!YAHOO.lang.isUndefined(F[E])){this._setHTMLAttrConfig(E);}return C.prototype.set.apply(this,arguments);},setAttributeConfig:function(D,E,F){this._configOrder.push(D);C.prototype.setAttributeConfig.apply(this,arguments);},createEvent:function(E,D){this._events[E]=true;return C.prototype.createEvent.apply(this,arguments);},init:function(E,D){this._initElement(E,D);},destroy:function(){var D=this.get("element");YAHOO.util.Event.purgeElement(D,true);this.unsubscribeAll();if(D&&D.parentNode){D.parentNode.removeChild(D);}this._queue=[];this._events={};this._configs={};this._configOrder=[];},_initElement:function(F,E){this._queue=this._queue||[];this._events=this._events||{};this._configs=this._configs||{};this._configOrder=[];E=E||{};E.element=E.element||F||null;var H=false;var D=A.DOM_EVENTS;this.DOM_EVENTS=this.DOM_EVENTS||{};for(var G in D){if(D.hasOwnProperty(G)){this.DOM_EVENTS[G]=D[G];}}if(typeof E.element==="string"){this._setHTMLAttrConfig("id",{value:E.element});}if(B.get(E.element)){H=true;this._initHTMLElement(E);this._initContent(E);}YAHOO.util.Event.onAvailable(E.element,function(){if(!H){this._initHTMLElement(E);}this.fireEvent("available",{type:"available",target:B.get(E.element)});},this,true);YAHOO.util.Event.onContentReady(E.element,function(){if(!H){this._initContent(E);}this.fireEvent("contentReady",{type:"contentReady",target:B.get(E.element)});},this,true);},_initHTMLElement:function(D){this.setAttributeConfig("element",{value:B.get(D.element),readOnly:true});},_initContent:function(D){this.initAttributes(D);this.setAttributes(D,true);this.fireQueue();},_setHTMLAttrConfig:function(D,F){var E=this.get("element");F=F||{};F.name=D;F.setter=F.setter||this.DEFAULT_HTML_SETTER;F.getter=F.getter||this.DEFAULT_HTML_GETTER;F.value=F.value||E[D];this._configs[D]=new YAHOO.util.Attribute(F,this);}};YAHOO.augment(A,C);YAHOO.util.Element=A;})();YAHOO.register("element",YAHOO.util.Element,{version:"2.7.0",build:"1799"});/*
321 306 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
322 307 Code licensed under the BSD License:
323 308 http://developer.yahoo.net/yui/license.txt
324 309 version: 2.7.0
325 310 */
326 311 (function(){var B=YAHOO.util,C=B.Dom,H=B.Event,F=window.document,J="active",D="activeIndex",E="activeTab",A="contentEl",G="element",I=function(L,K){K=K||{};if(arguments.length==1&&!YAHOO.lang.isString(L)&&!L.nodeName){K=L;L=K.element||null;}if(!L&&!K.element){L=this._createTabViewElement(K);}I.superclass.constructor.call(this,L,K);};YAHOO.extend(I,B.Element,{CLASSNAME:"yui-navset",TAB_PARENT_CLASSNAME:"yui-nav",CONTENT_PARENT_CLASSNAME:"yui-content",_tabParent:null,_contentParent:null,addTab:function(P,L){var N=this.get("tabs"),Q=this.getTab(L),R=this._tabParent,K=this._contentParent,M=P.get(G),O=P.get(A);if(!N){this._queue[this._queue.length]=["addTab",arguments];return false;}L=(L===undefined)?N.length:L;if(Q){R.insertBefore(M,Q.get(G));}else{R.appendChild(M);}if(O&&!C.isAncestor(K,O)){K.appendChild(O);}if(!P.get(J)){P.set("contentVisible",false,true);}else{this.set(E,P,true);}this._initTabEvents(P);N.splice(L,0,P);},_initTabEvents:function(K){K.addListener(K.get("activationEvent"),K._onActivate,this,K);K.addListener("activationEventChange",function(L){if(L.prevValue!=L.newValue){K.removeListener(L.prevValue,K._onActivate);K.addListener(L.newValue,K._onActivate,this,K);}});},DOMEventHandler:function(P){var Q=H.getTarget(P),S=this._tabParent,R=this.get("tabs"),M,L,K;if(C.isAncestor(S,Q)){for(var N=0,O=R.length;N<O;N++){L=R[N].get(G);K=R[N].get(A);if(Q==L||C.isAncestor(L,Q)){M=R[N];break;}}if(M){M.fireEvent(P.type,P);}}},getTab:function(K){return this.get("tabs")[K];},getTabIndex:function(O){var L=null,N=this.get("tabs");for(var M=0,K=N.length;M<K;++M){if(O==N[M]){L=M;break;}}return L;},removeTab:function(M){var L=this.get("tabs").length,K=this.getTabIndex(M);if(M===this.get(E)){if(L>1){if(K+1===L){this.set(D,K-1);}else{this.set(D,K+1);}}else{this.set(E,null);}}this._tabParent.removeChild(M.get(G));this._contentParent.removeChild(M.get(A));this._configs.tabs.value.splice(K,1);M.fireEvent("remove",{type:"remove",tabview:this});},toString:function(){var K=this.get("id")||this.get("tagName");return"TabView "+K;},contentTransition:function(L,K){if(L){L.set("contentVisible",true);}if(K){K.set("contentVisible",false);}},initAttributes:function(K){I.superclass.initAttributes.call(this,K);if(!K.orientation){K.orientation="top";}var M=this.get(G);if(!C.hasClass(M,this.CLASSNAME)){C.addClass(M,this.CLASSNAME);}this.setAttributeConfig("tabs",{value:[],readOnly:true});this._tabParent=this.getElementsByClassName(this.TAB_PARENT_CLASSNAME,"ul")[0]||this._createTabParent();this._contentParent=this.getElementsByClassName(this.CONTENT_PARENT_CLASSNAME,"div")[0]||this._createContentParent();this.setAttributeConfig("orientation",{value:K.orientation,method:function(N){var O=this.get("orientation");this.addClass("yui-navset-"+N);if(O!=N){this.removeClass("yui-navset-"+O);}if(N==="bottom"){this.appendChild(this._tabParent);}}});this.setAttributeConfig(D,{value:K.activeIndex,method:function(N){},validator:function(O){var N=true;if(O&&this.getTab(O).get("disabled")){N=false;}return N;}});this.setAttributeConfig(E,{value:K.activeTab,method:function(O){var N=this.get(E);if(O){O.set(J,true);}if(N&&N!==O){N.set(J,false);}if(N&&O!==N){this.contentTransition(O,N);}else{if(O){O.set("contentVisible",true);}}},validator:function(O){var N=true;if(O&&O.get("disabled")){N=false;}return N;}});this.on("activeTabChange",this._onActiveTabChange);this.on("activeIndexChange",this._onActiveIndexChange);if(this._tabParent){this._initTabs();}this.DOM_EVENTS.submit=false;this.DOM_EVENTS.focus=false;this.DOM_EVENTS.blur=false;for(var L in this.DOM_EVENTS){if(YAHOO.lang.hasOwnProperty(this.DOM_EVENTS,L)){this.addListener.call(this,L,this.DOMEventHandler);}}},deselectTab:function(K){if(this.getTab(K)===this.get("activeTab")){this.set("activeTab",null);}},selectTab:function(K){this.set("activeTab",this.getTab(K));},_onActiveTabChange:function(M){var K=this.get(D),L=this.getTabIndex(M.newValue);if(K!==L){if(!(this.set(D,L))){this.set(E,M.prevValue);}}},_onActiveIndexChange:function(K){if(K.newValue!==this.getTabIndex(this.get(E))){if(!(this.set(E,this.getTab(K.newValue)))){this.set(D,K.prevValue);}}},_initTabs:function(){var P=C.getChildren(this._tabParent),N=C.getChildren(this._contentParent),M=this.get(D),Q,L,R;for(var O=0,K=P.length;O<K;++O){L={};if(N[O]){L.contentEl=N[O];}Q=new YAHOO.widget.Tab(P[O],L);this.addTab(Q);if(Q.hasClass(Q.ACTIVE_CLASSNAME)){R=Q;}}if(M){this.set(E,this.getTab(M));}else{this._configs.activeTab.value=R;this._configs.activeIndex.value=this.getTabIndex(R);}},_createTabViewElement:function(K){var L=F.createElement("div");if(this.CLASSNAME){L.className=this.CLASSNAME;}return L;},_createTabParent:function(K){var L=F.createElement("ul");if(this.TAB_PARENT_CLASSNAME){L.className=this.TAB_PARENT_CLASSNAME;}this.get(G).appendChild(L);return L;},_createContentParent:function(K){var L=F.createElement("div");if(this.CONTENT_PARENT_CLASSNAME){L.className=this.CONTENT_PARENT_CLASSNAME;}this.get(G).appendChild(L);return L;}});YAHOO.widget.TabView=I;})();(function(){var D=YAHOO.util,I=D.Dom,L=YAHOO.lang,M="activeTab",J="label",G="labelEl",Q="content",C="contentEl",O="element",P="cacheData",B="dataSrc",H="dataLoaded",A="dataTimeout",N="loadMethod",F="postData",K="disabled",E=function(S,R){R=R||{};if(arguments.length==1&&!L.isString(S)&&!S.nodeName){R=S;S=R.element;}if(!S&&!R.element){S=this._createTabElement(R);}this.loadHandler={success:function(T){this.set(Q,T.responseText);},failure:function(T){}};E.superclass.constructor.call(this,S,R);this.DOM_EVENTS={};};YAHOO.extend(E,YAHOO.util.Element,{LABEL_TAGNAME:"em",ACTIVE_CLASSNAME:"selected",HIDDEN_CLASSNAME:"yui-hidden",ACTIVE_TITLE:"active",DISABLED_CLASSNAME:K,LOADING_CLASSNAME:"loading",dataConnection:null,loadHandler:null,_loading:false,toString:function(){var R=this.get(O),S=R.id||R.tagName;return"Tab "+S;},initAttributes:function(R){R=R||{};E.superclass.initAttributes.call(this,R);this.setAttributeConfig("activationEvent",{value:R.activationEvent||"click"});this.setAttributeConfig(G,{value:R[G]||this._getLabelEl(),method:function(S){S=I.get(S);
327   -var T=this.get(G);if(T){if(T==S){return false;}T.parentNode.replaceChild(S,T);this.set(J,S.innerHTML);}}});this.setAttributeConfig(J,{value:R.label||this._getLabel(),method:function(T){var S=this.get(G);if(!S){this.set(G,this._createLabelEl());}S.innerHTML=T;}});this.setAttributeConfig(C,{value:R[C]||document.createElement("div"),method:function(S){S=I.get(S);var T=this.get(C);if(T){if(T===S){return false;}if(!this.get("selected")){I.addClass(S,"yui-hidden");}T.parentNode.replaceChild(S,T);this.set(Q,S.innerHTML);}}});this.setAttributeConfig(Q,{value:R[Q],method:function(S){this.get(C).innerHTML=S;}});this.setAttributeConfig(B,{value:R.dataSrc});this.setAttributeConfig(P,{value:R.cacheData||false,validator:L.isBoolean});this.setAttributeConfig(N,{value:R.loadMethod||"GET",validator:L.isString});this.setAttributeConfig(H,{value:false,validator:L.isBoolean,writeOnce:true});this.setAttributeConfig(A,{value:R.dataTimeout||null,validator:L.isNumber});this.setAttributeConfig(F,{value:R.postData||null});this.setAttributeConfig("active",{value:R.active||this.hasClass(this.ACTIVE_CLASSNAME),method:function(S){if(S===true){this.addClass(this.ACTIVE_CLASSNAME);this.set("title",this.ACTIVE_TITLE);}else{this.removeClass(this.ACTIVE_CLASSNAME);this.set("title","");}},validator:function(S){return L.isBoolean(S)&&!this.get(K);}});this.setAttributeConfig(K,{value:R.disabled||this.hasClass(this.DISABLED_CLASSNAME),method:function(S){if(S===true){I.addClass(this.get(O),this.DISABLED_CLASSNAME);}else{I.removeClass(this.get(O),this.DISABLED_CLASSNAME);}},validator:L.isBoolean});this.setAttributeConfig("href",{value:R.href||this.getElementsByTagName("a")[0].getAttribute("href",2)||"#",method:function(S){this.getElementsByTagName("a")[0].href=S;},validator:L.isString});this.setAttributeConfig("contentVisible",{value:R.contentVisible,method:function(S){if(S){I.removeClass(this.get(C),this.HIDDEN_CLASSNAME);if(this.get(B)){if(!this._loading&&!(this.get(H)&&this.get(P))){this._dataConnect();}}}else{I.addClass(this.get(C),this.HIDDEN_CLASSNAME);}},validator:L.isBoolean});},_dataConnect:function(){if(!D.Connect){return false;}I.addClass(this.get(C).parentNode,this.LOADING_CLASSNAME);this._loading=true;this.dataConnection=D.Connect.asyncRequest(this.get(N),this.get(B),{success:function(R){this.loadHandler.success.call(this,R);this.set(H,true);this.dataConnection=null;I.removeClass(this.get(C).parentNode,this.LOADING_CLASSNAME);this._loading=false;},failure:function(R){this.loadHandler.failure.call(this,R);this.dataConnection=null;I.removeClass(this.get(C).parentNode,this.LOADING_CLASSNAME);this._loading=false;},scope:this,timeout:this.get(A)},this.get(F));},_createTabElement:function(R){var V=document.createElement("li"),S=document.createElement("a"),U=R.label||null,T=R.labelEl||null;S.href=R.href||"#";V.appendChild(S);if(T){if(!U){U=this._getLabel();}}else{T=this._createLabelEl();}S.appendChild(T);return V;},_getLabelEl:function(){return this.getElementsByTagName(this.LABEL_TAGNAME)[0];},_createLabelEl:function(){var R=document.createElement(this.LABEL_TAGNAME);return R;},_getLabel:function(){var R=this.get(G);if(!R){return undefined;}return R.innerHTML;},_onActivate:function(U,T){var S=this,R=false;D.Event.preventDefault(U);if(S===T.get(M)){R=true;}T.set(M,S,R);}});YAHOO.widget.Tab=E;})();YAHOO.register("tabview",YAHOO.widget.TabView,{version:"2.7.0",build:"1799"});
328   -(function(){var Dom=YAHOO.util.Dom,Event=YAHOO.util.Event,Lang=YAHOO.lang,Widget=YAHOO.widget;YAHOO.widget.TreeView=function(id,oConfig){if(id){this.init(id)}if(oConfig){if(!Lang.isArray(oConfig)){oConfig=[oConfig]}this.buildTreeFromObject(oConfig)}else if(Lang.trim(this._el.innerHTML)){this.buildTreeFromMarkup(id)}};var TV=Widget.TreeView;TV.prototype={id:null,_el:null,_nodes:null,locked:false,_expandAnim:null,_collapseAnim:null,_animCount:0,maxAnim:2,_hasDblClickSubscriber:false,_dblClickTimer:null,currentFocus:null,singleNodeHighlight:false,_currentlyHighlighted:null,setExpandAnim:function(type){this._expandAnim=(Widget.TVAnim.isValid(type))?type:null},setCollapseAnim:function(type){this._collapseAnim=(Widget.TVAnim.isValid(type))?type:null},animateExpand:function(el,node){if(this._expandAnim&&this._animCount<this.maxAnim){var tree=this;var a=Widget.TVAnim.getAnim(this._expandAnim,el,function(){tree.expandComplete(node)});if(a){++this._animCount;this.fireEvent("animStart",{"node":node,"type":"expand"});a.animate()}return true}return false},animateCollapse:function(el,node){if(this._collapseAnim&&this._animCount<this.maxAnim){var tree=this;var a=Widget.TVAnim.getAnim(this._collapseAnim,el,function(){tree.collapseComplete(node)});if(a){++this._animCount;this.fireEvent("animStart",{"node":node,"type":"collapse"});a.animate()}return true}return false},expandComplete:function(node){--this._animCount;this.fireEvent("animComplete",{"node":node,"type":"expand"})},collapseComplete:function(node){--this._animCount;this.fireEvent("animComplete",{"node":node,"type":"collapse"})},init:function(id){this._el=Dom.get(id);this.id=Dom.generateId(this._el,"yui-tv-auto-id-");this.createEvent("animStart",this);this.createEvent("animComplete",this);this.createEvent("collapse",this);this.createEvent("collapseComplete",this);this.createEvent("expand",this);this.createEvent("expandComplete",this);this.createEvent("enterKeyPressed",this);this.createEvent("clickEvent",this);this.createEvent('focusChanged',this);var self=this;this.createEvent("dblClickEvent",{scope:this,onSubscribeCallback:function(){self._hasDblClickSubscriber=true}});this.createEvent("labelClick",this);this.createEvent("highlightEvent",this);this._nodes=[];TV.trees[this.id]=this;this.root=new Widget.RootNode(this);var LW=Widget.LogWriter},buildTreeFromObject:function(oConfig){var build=function(parent,oConfig){var i,item,node,children,type,NodeType,ThisType;for(i=0;i<oConfig.length;i++){item=oConfig[i];if(Lang.isString(item)){node=new Widget.TextNode(item,parent)}else if(Lang.isObject(item)){children=item.children;delete item.children;type=item.type||'text';delete item.type;switch(Lang.isString(type)&&type.toLowerCase()){case'text':node=new Widget.TextNode(item,parent);break;case'menu':node=new Widget.MenuNode(item,parent);break;case'html':node=new Widget.HTMLNode(item,parent);break;default:if(Lang.isString(type)){NodeType=Widget[type]}else{NodeType=type}if(Lang.isObject(NodeType)){for(ThisType=NodeType;ThisType&&ThisType!==Widget.Node;ThisType=ThisType.superclass.constructor){}if(ThisType){node=new NodeType(item,parent)}else{}}else{}}if(children){build(node,children)}}else{}}};build(this.root,oConfig)},buildTreeFromMarkup:function(id){var build=function(markup){var el,child,branch=[],config={},label,yuiConfig;for(el=Dom.getFirstChild(markup);el;el=Dom.getNextSibling(el)){switch(el.tagName.toUpperCase()){case'LI':label='';config={expanded:Dom.hasClass(el,'expanded'),title:el.title||el.alt||null,className:Lang.trim(el.className.replace(/\bexpanded\b/,''))||null};child=el.firstChild;if(child.nodeType==3){label=Lang.trim(child.nodeValue.replace(/[\n\t\r]*/g,''));if(label){config.type='text';config.label=label}else{child=Dom.getNextSibling(child)}}if(!label){if(child.tagName.toUpperCase()=='A'){config.type='text';config.label=child.innerHTML;config.href=child.href;config.target=child.target;config.title=child.title||child.alt||config.title}else{config.type='html';var d=document.createElement('div');d.appendChild(child.cloneNode(true));config.html=d.innerHTML;config.hasIcon=true}}child=Dom.getNextSibling(child);switch(child&&child.tagName.toUpperCase()){case'UL':case'OL':config.children=build(child);break}if(YAHOO.lang.JSON){yuiConfig=el.getAttribute('yuiConfig');if(yuiConfig){yuiConfig=YAHOO.lang.JSON.parse(yuiConfig);config=YAHOO.lang.merge(config,yuiConfig)}}branch.push(config);break;case'UL':case'OL':config={type:'text',label:'',children:build(child)};branch.push(config);break}}return branch};var markup=Dom.getChildrenBy(Dom.get(id),function(el){var tag=el.tagName.toUpperCase();return tag=='UL'||tag=='OL'});if(markup.length){this.buildTreeFromObject(build(markup[0]))}else{}},_getEventTargetTdEl:function(ev){var target=Event.getTarget(ev);while(target&&!(target.tagName.toUpperCase()=='TD'&&Dom.hasClass(target.parentNode,'ygtvrow'))){target=Dom.getAncestorByTagName(target,'td')}if(Lang.isNull(target)){return null}if(/\bygtv(blank)?depthcell/.test(target.className)){return null}if(target.id){var m=target.id.match(/\bygtv([^\d]*)(.*)/);if(m&&m[2]&&this._nodes[m[2]]){return target}}return null},_onClickEvent:function(ev){var self=this,td=this._getEventTargetTdEl(ev),node,target,toggle=function(){node.toggle();node.focus();try{Event.preventDefault(ev)}catch(e){}};if(!td){return}node=this.getNodeByElement(td);if(!node){return}target=Event.getTarget(ev);if(Dom.hasClass(target,node.labelStyle)||Dom.getAncestorByClassName(target,node.labelStyle)){this.fireEvent('labelClick',node)}if(/\bygtv[tl][mp]h?h?/.test(td.className)){toggle()}else{if(this._dblClickTimer){window.clearTimeout(this._dblClickTimer);this._dblClickTimer=null}else{if(this._hasDblClickSubscriber){this._dblClickTimer=window.setTimeout(function(){self._dblClickTimer=null;if(self.fireEvent('clickEvent',{event:ev,node:node})!==false){toggle()}},200)}else{if(self.fireEvent('clickEvent',{event:ev,node:node})!==false){}}}}},_onDblClickEvent:function(ev){if(!this._hasDblClickSubscriber){return}var td=this._getEventTargetTdEl(ev);if(!td){return}if(!(/\bygtv[tl][mp]h?h?/.test(td.className))){this.fireEvent('dblClickEvent',{event:ev,node:this.getNodeByElement(td)});if(this._dblClickTimer){window.clearTimeout(this._dblClickTimer);this._dblClickTimer=null}}},_onMouseOverEvent:function(ev){var target;if((target=this._getEventTargetTdEl(ev))&&(target=this.getNodeByElement(target))&&(target=target.getToggleEl())){target.className=target.className.replace(/\bygtv([lt])([mp])\b/gi,'ygtv$1$2h')}},_onMouseOutEvent:function(ev){var target;if((target=this._getEventTargetTdEl(ev))&&(target=this.getNodeByElement(target))&&(target=target.getToggleEl())){target.className=target.className.replace(/\bygtv([lt])([mp])h\b/gi,'ygtv$1$2')}},_onKeyDownEvent:function(ev){var target=Event.getTarget(ev),node=this.getNodeByElement(target),newNode=node,KEY=YAHOO.util.KeyListener.KEY;switch(ev.keyCode){case KEY.UP:do{if(newNode.previousSibling){newNode=newNode.previousSibling}else{newNode=newNode.parent}}while(newNode&&!newNode._canHaveFocus());if(newNode){newNode.focus()}Event.preventDefault(ev);break;case KEY.DOWN:do{if(newNode.nextSibling){newNode=newNode.nextSibling}else{newNode.expand();newNode=(newNode.children.length||null)&&newNode.children[0]}}while(newNode&&!newNode._canHaveFocus);if(newNode){newNode.focus()}Event.preventDefault(ev);break;case KEY.LEFT:do{if(newNode.parent){newNode=newNode.parent}else{newNode=newNode.previousSibling}}while(newNode&&!newNode._canHaveFocus());if(newNode){newNode.focus()}Event.preventDefault(ev);break;case KEY.RIGHT:do{newNode.expand();if(newNode.children.length){newNode=newNode.children[0]}else{newNode=newNode.nextSibling}}while(newNode&&!newNode._canHaveFocus());if(newNode){newNode.focus()}Event.preventDefault(ev);break;case KEY.ENTER:if(node.href){if(node.target){window.open(node.href,node.target)}else{window.location(node.href)}}else{node.toggle()}this.fireEvent('enterKeyPressed',node);Event.preventDefault(ev);break;case KEY.HOME:newNode=this.getRoot();if(newNode.children.length){newNode=newNode.children[0]}if(newNode._canHaveFocus()){newNode.focus()}Event.preventDefault(ev);break;case KEY.END:newNode=newNode.parent.children;newNode=newNode[newNode.length-1];if(newNode._canHaveFocus()){newNode.focus()}Event.preventDefault(ev);break;case 107:if(ev.shiftKey){node.parent.expandAll()}else{node.expand()}break;case 109:if(ev.shiftKey){node.parent.collapseAll()}else{node.collapse()}break;default:break}},render:function(){var html=this.root.getHtml(),el=this.getEl();el.innerHTML=html;if(!this._hasEvents){Event.on(el,'click',this._onClickEvent,this,true);Event.on(el,'dblclick',this._onDblClickEvent,this,true);Event.on(el,'mouseover',this._onMouseOverEvent,this,true);Event.on(el,'mouseout',this._onMouseOutEvent,this,true);Event.on(el,'keydown',this._onKeyDownEvent,this,true)}this._hasEvents=true},getEl:function(){if(!this._el){this._el=Dom.get(this.id)}return this._el},regNode:function(node){this._nodes[node.index]=node},getRoot:function(){return this.root},setDynamicLoad:function(fnDataLoader,iconMode){this.root.setDynamicLoad(fnDataLoader,iconMode)},expandAll:function(){if(!this.locked){this.root.expandAll()}},collapseAll:function(){if(!this.locked){this.root.collapseAll()}},getNodeByIndex:function(nodeIndex){var n=this._nodes[nodeIndex];return(n)?n:null},getNodeByProperty:function(property,value){for(var i in this._nodes){if(this._nodes.hasOwnProperty(i)){var n=this._nodes[i];if((property in n&&n[property]==value)||(n.data&&value==n.data[property])){return n}}}return null},getNodesByProperty:function(property,value){var values=[];for(var i in this._nodes){if(this._nodes.hasOwnProperty(i)){var n=this._nodes[i];if((property in n&&n[property]==value)||(n.data&&value==n.data[property])){values.push(n)}}}return(values.length)?values:null},getNodeByElement:function(el){var p=el,m,re=/ygtv([^\d]*)(.*)/;do{if(p&&p.id){m=p.id.match(re);if(m&&m[2]){return this.getNodeByIndex(m[2])}}p=p.parentNode;if(!p||!p.tagName){break}}while(p.id!==this.id&&p.tagName.toLowerCase()!=="body");return null},removeNode:function(node,autoRefresh){if(node.isRoot()){return false}var p=node.parent;if(p.parent){p=p.parent}this._deleteNode(node);if(autoRefresh&&p&&p.childrenRendered){p.refresh()}return true},_removeChildren_animComplete:function(o){this.unsubscribe(this._removeChildren_animComplete);this.removeChildren(o.node)},removeChildren:function(node){if(node.expanded){if(this._collapseAnim){this.subscribe("animComplete",this._removeChildren_animComplete,this,true);Widget.Node.prototype.collapse.call(node);return}node.collapse()}while(node.children.length){this._deleteNode(node.children[0])}if(node.isRoot()){Widget.Node.prototype.expand.call(node)}node.childrenRendered=false;node.dynamicLoadComplete=false;node.updateIcon()},_deleteNode:function(node){this.removeChildren(node);this.popNode(node)},popNode:function(node){var p=node.parent;var a=[];for(var i=0,len=p.children.length;i<len;++i){if(p.children[i]!=node){a[a.length]=p.children[i]}}p.children=a;p.childrenRendered=false;if(node.previousSibling){node.previousSibling.nextSibling=node.nextSibling}if(node.nextSibling){node.nextSibling.previousSibling=node.previousSibling}node.parent=null;node.previousSibling=null;node.nextSibling=null;node.tree=null;delete this._nodes[node.index]},destroy:function(){if(this._destroyEditor){this._destroyEditor()}var el=this.getEl();Event.removeListener(el,'click');Event.removeListener(el,'dblclick');Event.removeListener(el,'mouseover');Event.removeListener(el,'mouseout');Event.removeListener(el,'keydown');for(var i=0;i<this._nodes.length;i++){var node=this._nodes[i];if(node&&node.destroy){node.destroy()}}el.innerHTML='';this._hasEvents=false},toString:function(){return"TreeView "+this.id},getNodeCount:function(){return this.getRoot().getNodeCount()},getTreeDefinition:function(){return this.getRoot().getNodeDefinition()},onExpand:function(node){},onCollapse:function(node){},setNodesProperty:function(name,value,refresh){this.root.setNodesProperty(name,value);if(refresh){this.root.refresh()}},onEventToggleHighlight:function(oArgs){var node;if('node'in oArgs&&oArgs.node instanceof Widget.Node){node=oArgs.node}else if(oArgs instanceof Widget.Node){node=oArgs}else{return false}node.toggleHighlight();return false}};var PROT=TV.prototype;PROT.draw=PROT.render;YAHOO.augment(TV,YAHOO.util.EventProvider);TV.nodeCount=0;TV.trees=[];TV.getTree=function(treeId){var t=TV.trees[treeId];return(t)?t:null};TV.getNode=function(treeId,nodeIndex){var t=TV.getTree(treeId);return(t)?t.getNodeByIndex(nodeIndex):null};TV.FOCUS_CLASS_NAME='ygtvfocus';TV.preload=function(e,prefix){prefix=prefix||"ygtv";var styles=["tn","tm","tmh","tp","tph","ln","lm","lmh","lp","lph","loading"];var sb=[];for(var i=1;i<styles.length;i=i+1){sb[sb.length]='<span class="'+prefix+styles[i]+'">&#160;</span>'}var f=document.createElement("div");var s=f.style;s.className=prefix+styles[0];s.position="absolute";s.height="1px";s.width="1px";s.top="-1000px";s.left="-1000px";f.innerHTML=sb.join("");document.body.appendChild(f);Event.removeListener(window,"load",TV.preload)};Event.addListener(window,"load",TV.preload)})();(function(){var Dom=YAHOO.util.Dom,Lang=YAHOO.lang,Event=YAHOO.util.Event;YAHOO.widget.Node=function(oData,oParent,expanded){if(oData){this.init(oData,oParent,expanded)}};YAHOO.widget.Node.prototype={index:0,children:null,tree:null,data:null,parent:null,depth:-1,expanded:false,multiExpand:true,renderHidden:false,childrenRendered:false,dynamicLoadComplete:false,previousSibling:null,nextSibling:null,_dynLoad:false,dataLoader:null,isLoading:false,hasIcon:true,iconMode:0,nowrap:false,isLeaf:false,contentStyle:"",contentElId:null,enableHighlight:false,highlightState:0,propagateHighlightUp:false,propagateHighlightDown:false,className:null,_type:"Node",init:function(oData,oParent,expanded){this.data={};this.children=[];this.index=YAHOO.widget.TreeView.nodeCount;++YAHOO.widget.TreeView.nodeCount;this.contentElId="ygtvcontentel"+this.index;if(Lang.isObject(oData)){for(var property in oData){if(oData.hasOwnProperty(property)){if(property.charAt(0)!='_'&&!Lang.isUndefined(this[property])&&!Lang.isFunction(this[property])){this[property]=oData[property]}else{this.data[property]=oData[property]}}}}if(!Lang.isUndefined(expanded)){this.expanded=expanded}this.createEvent("parentChange",this);if(oParent){oParent.appendChild(this)}},applyParent:function(parentNode){if(!parentNode){return false}this.tree=parentNode.tree;this.parent=parentNode;this.depth=parentNode.depth+1;this.tree.regNode(this);parentNode.childrenRendered=false;for(var i=0,len=this.children.length;i<len;++i){this.children[i].applyParent(this)}this.fireEvent("parentChange");return true},appendChild:function(childNode){if(this.hasChildren()){var sib=this.children[this.children.length-1];sib.nextSibling=childNode;childNode.previousSibling=sib}this.children[this.children.length]=childNode;childNode.applyParent(this);if(this.childrenRendered&&this.expanded){this.getChildrenEl().style.display=""}return childNode},appendTo:function(parentNode){return parentNode.appendChild(this)},insertBefore:function(node){var p=node.parent;if(p){if(this.tree){this.tree.popNode(this)}var refIndex=node.isChildOf(p);p.children.splice(refIndex,0,this);if(node.previousSibling){node.previousSibling.nextSibling=this}this.previousSibling=node.previousSibling;this.nextSibling=node;node.previousSibling=this;this.applyParent(p)}return this},insertAfter:function(node){var p=node.parent;if(p){if(this.tree){this.tree.popNode(this)}var refIndex=node.isChildOf(p);if(!node.nextSibling){this.nextSibling=null;return this.appendTo(p)}p.children.splice(refIndex+1,0,this);node.nextSibling.previousSibling=this;this.previousSibling=node;this.nextSibling=node.nextSibling;node.nextSibling=this;this.applyParent(p)}return this},isChildOf:function(parentNode){if(parentNode&&parentNode.children){for(var i=0,len=parentNode.children.length;i<len;++i){if(parentNode.children[i]===this){return i}}}return-1},getSiblings:function(){var sib=this.parent.children.slice(0);for(var i=0;i<sib.length&&sib[i]!=this;i++){}sib.splice(i,1);if(sib.length){return sib}return null},showChildren:function(){if(!this.tree.animateExpand(this.getChildrenEl(),this)){if(this.hasChildren()){this.getChildrenEl().style.display=""}}},hideChildren:function(){if(!this.tree.animateCollapse(this.getChildrenEl(),this)){this.getChildrenEl().style.display="none"}},getElId:function(){return"ygtv"+this.index},getChildrenElId:function(){return"ygtvc"+this.index},getToggleElId:function(){return"ygtvt"+this.index},getEl:function(){return Dom.get(this.getElId())},getChildrenEl:function(){return Dom.get(this.getChildrenElId())},getToggleEl:function(){return Dom.get(this.getToggleElId())},getContentEl:function(){return Dom.get(this.contentElId)},collapse:function(){if(!this.expanded){return}var ret=this.tree.onCollapse(this);if(false===ret){return}ret=this.tree.fireEvent("collapse",this);if(false===ret){return}if(!this.getEl()){this.expanded=false}else{this.hideChildren();this.expanded=false;this.updateIcon()}ret=this.tree.fireEvent("collapseComplete",this)},expand:function(lazySource){if(this.expanded&&!lazySource){return}var ret=true;if(!lazySource){ret=this.tree.onExpand(this);if(false===ret){return}ret=this.tree.fireEvent("expand",this)}if(false===ret){return}if(!this.getEl()){this.expanded=true;return}if(!this.childrenRendered){this.getChildrenEl().innerHTML=this.renderChildren()}else{}this.expanded=true;this.updateIcon();if(this.isLoading){this.expanded=false;return}if(!this.multiExpand){var sibs=this.getSiblings();for(var i=0;sibs&&i<sibs.length;++i){if(sibs[i]!=this&&sibs[i].expanded){sibs[i].collapse()}}}this.showChildren();ret=this.tree.fireEvent("expandComplete",this)},updateIcon:function(){if(this.hasIcon){var el=this.getToggleEl();if(el){el.className=el.className.replace(/\bygtv(([tl][pmn]h?)|(loading))\b/gi,this.getStyle())}}},getStyle:function(){if(this.isLoading){return"ygtvloading"}else{var loc=(this.nextSibling)?"t":"l";var type="n";if(this.hasChildren(true)||(this.isDynamic()&&!this.getIconMode())){type=(this.expanded)?"m":"p"}return"ygtv"+loc+type}},getHoverStyle:function(){var s=this.getStyle();if(this.hasChildren(true)&&!this.isLoading){s+="h"}return s},expandAll:function(){var l=this.children.length;for(var i=0;i<l;++i){var c=this.children[i];if(c.isDynamic()){break}else if(!c.multiExpand){break}else{c.expand();c.expandAll()}}},collapseAll:function(){for(var i=0;i<this.children.length;++i){this.children[i].collapse();this.children[i].collapseAll()}},setDynamicLoad:function(fnDataLoader,iconMode){if(fnDataLoader){this.dataLoader=fnDataLoader;this._dynLoad=true}else{this.dataLoader=null;this._dynLoad=false}if(iconMode){this.iconMode=iconMode}},isRoot:function(){return(this==this.tree.root)},isDynamic:function(){if(this.isLeaf){return false}else{return(!this.isRoot()&&(this._dynLoad||this.tree.root._dynLoad))}},getIconMode:function(){return(this.iconMode||this.tree.root.iconMode)},hasChildren:function(checkForLazyLoad){if(this.isLeaf){return false}else{return(this.children.length>0||(checkForLazyLoad&&this.isDynamic()&&!this.dynamicLoadComplete))}},toggle:function(){if(!this.tree.locked&&(this.hasChildren(true)||this.isDynamic())){if(this.expanded){this.collapse()}else{this.expand()}}},getHtml:function(){this.childrenRendered=false;return['<div class="ygtvitem" id="',this.getElId(),'">',this.getNodeHtml(),this.getChildrenHtml(),'</div>'].join("")},getChildrenHtml:function(){var sb=[];sb[sb.length]='<div class="ygtvchildren" id="'+this.getChildrenElId()+'"';if(!this.expanded||!this.hasChildren()){sb[sb.length]=' style="display:none;"'}sb[sb.length]='>';if((this.hasChildren(true)&&this.expanded)||(this.renderHidden&&!this.isDynamic())){sb[sb.length]=this.renderChildren()}sb[sb.length]='</div>';return sb.join("")},renderChildren:function(){var node=this;if(this.isDynamic()&&!this.dynamicLoadComplete){this.isLoading=true;this.tree.locked=true;if(this.dataLoader){setTimeout(function(){node.dataLoader(node,function(){node.loadComplete()})},10)}else if(this.tree.root.dataLoader){setTimeout(function(){node.tree.root.dataLoader(node,function(){node.loadComplete()})},10)}else{return"Error: data loader not found or not specified."}return""}else{return this.completeRender()}},completeRender:function(){var sb=[];for(var i=0;i<this.children.length;++i){sb[sb.length]=this.children[i].getHtml()}this.childrenRendered=true;return sb.join("")},loadComplete:function(){this.getChildrenEl().innerHTML=this.completeRender();this.dynamicLoadComplete=true;this.isLoading=false;this.expand(true);this.tree.locked=false},getAncestor:function(depth){if(depth>=this.depth||depth<0){return null}var p=this.parent;while(p.depth>depth){p=p.parent}return p},getDepthStyle:function(depth){return(this.getAncestor(depth).nextSibling)?"ygtvdepthcell":"ygtvblankdepthcell"},getNodeHtml:function(){var sb=[];sb[sb.length]='<table id="ygtvtableel'+this.index+'"border="0" cellpadding="0" cellspacing="0" class="ygtvtable ygtvdepth'+this.depth;if(this.enableHighlight){}if(this.className){sb[sb.length]=' '+this.className}sb[sb.length]='"><tr class="ygtvrow">';for(var i=0;i<this.depth;++i){sb[sb.length]='<td class="ygtvcell '+this.getDepthStyle(i)+'"><div class="ygtvspacer"></div></td>'}if(this.hasIcon){sb[sb.length]='<td id="'+this.getToggleElId();sb[sb.length]='" class="ygtvcell ';sb[sb.length]=this.getStyle();sb[sb.length]='"><a href="#" class="ygtvspacer">&nbsp;</a></td>'}sb[sb.length]='<td id="'+this.contentElId;sb[sb.length]='" class="ygtvcell ';sb[sb.length]=this.contentStyle+' ygtvcontent" ';sb[sb.length]=(this.nowrap)?' nowrap="nowrap" ':'';sb[sb.length]=' >';sb[sb.length]=this.getContentHtml();sb[sb.length]='</td></tr></table>';return sb.join("")},getContentHtml:function(){return""},refresh:function(){this.getChildrenEl().innerHTML=this.completeRender();if(this.hasIcon){var el=this.getToggleEl();if(el){el.className=el.className.replace(/\bygtv[lt][nmp]h*\b/gi,this.getStyle())}}},toString:function(){return this._type+" ("+this.index+")"},_focusHighlightedItems:[],_focusedItem:null,_canHaveFocus:function(){return this.getEl().getElementsByTagName('a').length>0},_removeFocus:function(){if(this._focusedItem){Event.removeListener(this._focusedItem,'blur');this._focusedItem=null}var el;while((el=this._focusHighlightedItems.shift())){Dom.removeClass(el,YAHOO.widget.TreeView.FOCUS_CLASS_NAME)}},focus:function(){var focused=false,self=this;if(this.tree.currentFocus){this.tree.currentFocus._removeFocus()}var expandParent=function(node){if(node.parent){expandParent(node.parent);node.parent.expand()}};expandParent(this);Dom.getElementsBy(function(el){return/ygtv(([tl][pmn]h?)|(content))/.test(el.className)},'td',self.getEl().firstChild,function(el){Dom.addClass(el,YAHOO.widget.TreeView.FOCUS_CLASS_NAME);if(!focused){var aEl=el.getElementsByTagName('a');if(aEl.length){aEl=aEl[0];aEl.focus();self._focusedItem=aEl;Event.on(aEl,'blur',function(){self.tree.fireEvent('focusChanged',{oldNode:self.tree.currentFocus,newNode:null});self.tree.currentFocus=null;self._removeFocus()});focused=true}}self._focusHighlightedItems.push(el)});if(focused){this.tree.fireEvent('focusChanged',{oldNode:this.tree.currentFocus,newNode:this});this.tree.currentFocus=this}else{this.tree.fireEvent('focusChanged',{oldNode:self.tree.currentFocus,newNode:null});this.tree.currentFocus=null;this._removeFocus()}return focused},getNodeCount:function(){for(var i=0,count=0;i<this.children.length;i++){count+=this.children[i].getNodeCount()}return count+1},getNodeDefinition:function(){if(this.isDynamic()){return false}var def,defs=Lang.merge(this.data),children=[];if(this.expanded){defs.expanded=this.expanded}if(!this.multiExpand){defs.multiExpand=this.multiExpand}if(!this.renderHidden){defs.renderHidden=this.renderHidden}if(!this.hasIcon){defs.hasIcon=this.hasIcon}if(this.nowrap){defs.nowrap=this.nowrap}if(this.className){defs.className=this.className}if(this.editable){defs.editable=this.editable}if(this.enableHighlight){defs.enableHighlight=this.enableHighlight}if(this.highlightState){defs.highlightState=this.highlightState}if(this.propagateHighlightUp){defs.propagateHighlightUp=this.propagateHighlightUp}if(this.propagateHighlightDown){defs.propagateHighlightDown=this.propagateHighlightDown}defs.type=this._type;for(var i=0;i<this.children.length;i++){def=this.children[i].getNodeDefinition();if(def===false){return false}children.push(def)}if(children.length){defs.children=children}return defs},getToggleLink:function(){return'return false;'},setNodesProperty:function(name,value,refresh){if(name.charAt(0)!='_'&&!Lang.isUndefined(this[name])&&!Lang.isFunction(this[name])){this[name]=value}else{this.data[name]=value}for(var i=0;i<this.children.length;i++){this.children[i].setNodesProperty(name,value)}if(refresh){this.refresh()}},toggleHighlight:function(){if(this.enableHighlight){if(this.highlightState==1){this.unhighlight()}else{this.highlight()}}},highlight:function(_silent){return;if(this.enableHighlight){if(this.tree.singleNodeHighlight){if(this.tree._currentlyHighlighted){this.tree._currentlyHighlighted.unhighlight()}this.tree._currentlyHighlighted=this}this.highlightState=1;this._setHighlightClassName();if(this.propagateHighlightDown){for(var i=0;i<this.children.length;i++){this.children[i].highlight(true)}}if(this.propagateHighlightUp){if(this.parent){this.parent._childrenHighlighted()}}if(!_silent){this.tree.fireEvent('highlightEvent',this)}}},unhighlight:function(_silent){if(this.enableHighlight){this.highlightState=0;this._setHighlightClassName();if(this.propagateHighlightDown){for(var i=0;i<this.children.length;i++){this.children[i].unhighlight(true)}}if(this.propagateHighlightUp){if(this.parent){this.parent._childrenHighlighted()}}if(!_silent){this.tree.fireEvent('highlightEvent',this)}}},_childrenHighlighted:function(){var yes=false,no=false;if(this.enableHighlight){for(var i=0;i<this.children.length;i++){switch(this.children[i].highlightState){case 0:no=true;break;case 1:yes=true;break;case 2:yes=no=true;break}}if(yes&&no){this.highlightState=2}else if(yes){this.highlightState=1}else{this.highlightState=0}this._setHighlightClassName();if(this.propagateHighlightUp){if(this.parent){this.parent._childrenHighlighted()}}}},_setHighlightClassName:function(){var el=Dom.get('ygtvtableel'+this.index);if(el){el.className=el.className.replace(/\bygtv-highlight\d\b/gi,'ygtv-highlight'+this.highlightState)}}};YAHOO.augment(YAHOO.widget.Node,YAHOO.util.EventProvider)})();YAHOO.widget.RootNode=function(oTree){this.init(null,null,true);this.tree=oTree};YAHOO.extend(YAHOO.widget.RootNode,YAHOO.widget.Node,{_type:"RootNode",getNodeHtml:function(){return""},toString:function(){return this._type},loadComplete:function(){this.tree.draw()},getNodeCount:function(){for(var i=0,count=0;i<this.children.length;i++){count+=this.children[i].getNodeCount()}return count},getNodeDefinition:function(){for(var def,defs=[],i=0;i<this.children.length;i++){def=this.children[i].getNodeDefinition();if(def===false){return false}defs.push(def)}return defs},collapse:function(){},expand:function(){},getSiblings:function(){return null},focus:function(){}});(function(){var Dom=YAHOO.util.Dom,Lang=YAHOO.lang,Event=YAHOO.util.Event;YAHOO.widget.TextNode=function(oData,oParent,expanded){if(oData){if(Lang.isString(oData)){oData={label:oData}}this.init(oData,oParent,expanded);this.setUpLabel(oData)}};YAHOO.extend(YAHOO.widget.TextNode,YAHOO.widget.Node,{labelStyle:"ygtvlabel",labelElId:null,label:null,title:null,href:null,target:"_self",_type:"TextNode",setUpLabel:function(oData){if(Lang.isString(oData)){oData={label:oData}}else{if(oData.style){this.labelStyle=oData.style}}this.label=oData.label;this.labelElId="ygtvlabelel"+this.index},getLabelEl:function(){return Dom.get(this.labelElId)},getContentHtml:function(){var sb=[];sb[sb.length]=this.href?'<a':'<span';sb[sb.length]=' id="'+this.labelElId+'"';sb[sb.length]=' class="'+this.labelStyle+'"';if(this.href){sb[sb.length]=' href="'+this.href+'"';sb[sb.length]=' target="'+this.target+'"'}if(this.title){sb[sb.length]=' title="'+this.title+'"'}sb[sb.length]=' >';sb[sb.length]=this.label;sb[sb.length]=this.href?'</a>':'</span>';return sb.join("")},getNodeDefinition:function(){var def=YAHOO.widget.TextNode.superclass.getNodeDefinition.call(this);if(def===false){return false}def.label=this.label;if(this.labelStyle!='ygtvlabel'){def.style=this.labelStyle}if(this.title){def.title=this.title}if(this.href){def.href=this.href}if(this.target!='_self'){def.target=this.target}return def},toString:function(){return YAHOO.widget.TextNode.superclass.toString.call(this)+": "+this.label},onLabelClick:function(){return false},refresh:function(){YAHOO.widget.TextNode.superclass.refresh.call(this);var label=this.getLabelEl();label.innerHTML=this.label;if(label.tagName.toUpperCase()=='A'){label.href=this.href;label.target=this.target}}})})();YAHOO.widget.MenuNode=function(oData,oParent,expanded){YAHOO.widget.MenuNode.superclass.constructor.call(this,oData,oParent,expanded);this.multiExpand=false};YAHOO.extend(YAHOO.widget.MenuNode,YAHOO.widget.TextNode,{_type:"MenuNode"});(function(){var Dom=YAHOO.util.Dom,Lang=YAHOO.lang,Event=YAHOO.util.Event;YAHOO.widget.HTMLNode=function(oData,oParent,expanded,hasIcon){if(oData){this.init(oData,oParent,expanded);this.initContent(oData,hasIcon)}};YAHOO.extend(YAHOO.widget.HTMLNode,YAHOO.widget.Node,{contentStyle:"ygtvhtml",html:null,_type:"HTMLNode",initContent:function(oData,hasIcon){this.setHtml(oData);this.contentElId="ygtvcontentel"+this.index;if(!Lang.isUndefined(hasIcon)){this.hasIcon=hasIcon}},setHtml:function(o){this.html=(typeof o==="string")?o:o.html;var el=this.getContentEl();if(el){el.innerHTML=this.html}},getContentHtml:function(){return this.html},getNodeDefinition:function(){var def=YAHOO.widget.HTMLNode.superclass.getNodeDefinition.call(this);if(def===false){return false}def.html=this.html;return def}})})();(function(){var Dom=YAHOO.util.Dom,Lang=YAHOO.lang,Event=YAHOO.util.Event,Calendar=YAHOO.widget.Calendar;YAHOO.widget.DateNode=function(oData,oParent,expanded){YAHOO.widget.DateNode.superclass.constructor.call(this,oData,oParent,expanded)};YAHOO.extend(YAHOO.widget.DateNode,YAHOO.widget.TextNode,{_type:"DateNode",calendarConfig:null,fillEditorContainer:function(editorData){var cal,container=editorData.inputContainer;if(Lang.isUndefined(Calendar)){Dom.replaceClass(editorData.editorPanel,'ygtv-edit-DateNode','ygtv-edit-TextNode');YAHOO.widget.DateNode.superclass.fillEditorContainer.call(this,editorData);return}if(editorData.nodeType!=this._type){editorData.nodeType=this._type;editorData.saveOnEnter=false;editorData.node.destroyEditorContents(editorData);editorData.inputObject=cal=new Calendar(container.appendChild(document.createElement('div')));if(this.calendarConfig){cal.cfg.applyConfig(this.calendarConfig,true);cal.cfg.fireQueue()}cal.selectEvent.subscribe(function(){this.tree._closeEditor(true)},this,true)}else{cal=editorData.inputObject}cal.cfg.setProperty("selected",this.label,false);var delim=cal.cfg.getProperty('DATE_FIELD_DELIMITER');var pageDate=this.label.split(delim);cal.cfg.setProperty('pagedate',pageDate[cal.cfg.getProperty('MDY_MONTH_POSITION')-1]+delim+pageDate[cal.cfg.getProperty('MDY_YEAR_POSITION')-1]);cal.cfg.fireQueue();cal.render();cal.oDomContainer.focus()},saveEditorValue:function(editorData){var node=editorData.node,validator=node.tree.validator,value;if(Lang.isUndefined(Calendar)){value=editorData.inputElement.value}else{var cal=editorData.inputObject,date=cal.getSelectedDates()[0],dd=[];dd[cal.cfg.getProperty('MDY_DAY_POSITION')-1]=date.getDate();dd[cal.cfg.getProperty('MDY_MONTH_POSITION')-1]=date.getMonth()+1;dd[cal.cfg.getProperty('MDY_YEAR_POSITION')-1]=date.getFullYear();value=dd.join(cal.cfg.getProperty('DATE_FIELD_DELIMITER'))}if(Lang.isFunction(validator)){value=validator(value,node.label,node);if(Lang.isUndefined(value)){return false}}node.label=value;node.getLabelEl().innerHTML=value},getNodeDefinition:function(){var def=YAHOO.widget.DateNode.superclass.getNodeDefinition.call(this);if(def===false){return false}if(this.calendarConfig){def.calendarConfig=this.calendarConfig}return def}})})();(function(){var Dom=YAHOO.util.Dom,Lang=YAHOO.lang,Event=YAHOO.util.Event,TV=YAHOO.widget.TreeView,TVproto=TV.prototype;TV.editorData={active:false,whoHasIt:null,nodeType:null,editorPanel:null,inputContainer:null,buttonsContainer:null,node:null,saveOnEnter:true};TVproto.validator=null;TVproto._nodeEditing=function(node){if(node.fillEditorContainer&&node.editable){var ed,topLeft,buttons,button,editorData=TV.editorData;editorData.active=true;editorData.whoHasIt=this;if(!editorData.nodeType){editorData.editorPanel=ed=document.body.appendChild(document.createElement('div'));Dom.addClass(ed,'ygtv-label-editor');buttons=editorData.buttonsContainer=ed.appendChild(document.createElement('div'));Dom.addClass(buttons,'ygtv-button-container');button=buttons.appendChild(document.createElement('button'));Dom.addClass(button,'ygtvok');button.innerHTML=' ';button=buttons.appendChild(document.createElement('button'));Dom.addClass(button,'ygtvcancel');button.innerHTML=' ';Event.on(buttons,'click',function(ev){var target=Event.getTarget(ev);var node=TV.editorData.node;if(Dom.hasClass(target,'ygtvok')){Event.stopEvent(ev);this._closeEditor(true)}if(Dom.hasClass(target,'ygtvcancel')){Event.stopEvent(ev);this._closeEditor(false)}},this,true);editorData.inputContainer=ed.appendChild(document.createElement('div'));Dom.addClass(editorData.inputContainer,'ygtv-input');Event.on(ed,'keydown',function(ev){var editorData=TV.editorData,KEY=YAHOO.util.KeyListener.KEY;switch(ev.keyCode){case KEY.ENTER:Event.stopEvent(ev);if(editorData.saveOnEnter){this._closeEditor(true)}break;case KEY.ESCAPE:Event.stopEvent(ev);this._closeEditor(false);break}},this,true)}else{ed=editorData.editorPanel}editorData.node=node;if(editorData.nodeType){Dom.removeClass(ed,'ygtv-edit-'+editorData.nodeType)}Dom.addClass(ed,' ygtv-edit-'+node._type);topLeft=Dom.getXY(node.getContentEl());Dom.setStyle(ed,'left',topLeft[0]+'px');Dom.setStyle(ed,'top',topLeft[1]+'px');Dom.setStyle(ed,'display','block');ed.focus();node.fillEditorContainer(editorData);return true}};TVproto.onEventEditNode=function(oArgs){if(oArgs instanceof YAHOO.widget.Node){oArgs.editNode()}else if(oArgs.node instanceof YAHOO.widget.Node){oArgs.node.editNode()}};TVproto._closeEditor=function(save){var ed=TV.editorData,node=ed.node,close=true;if(save){close=ed.node.saveEditorValue(ed)!==false}if(close){Dom.setStyle(ed.editorPanel,'display','none');ed.active=false;node.focus()}};TVproto._destroyEditor=function(){var ed=TV.editorData;if(ed&&ed.nodeType&&(!ed.active||ed.whoHasIt===this)){Event.removeListener(ed.editorPanel,'keydown');Event.removeListener(ed.buttonContainer,'click');ed.node.destroyEditorContents(ed);document.body.removeChild(ed.editorPanel);ed.nodeType=ed.editorPanel=ed.inputContainer=ed.buttonsContainer=ed.whoHasIt=ed.node=null;ed.active=false}};var Nproto=YAHOO.widget.Node.prototype;Nproto.editable=false;Nproto.editNode=function(){this.tree._nodeEditing(this)};Nproto.fillEditorContainer=null;Nproto.destroyEditorContents=function(editorData){Event.purgeElement(editorData.inputContainer,true);editorData.inputContainer.innerHTML=''};Nproto.saveEditorValue=function(editorData){};var TNproto=YAHOO.widget.TextNode.prototype;TNproto.fillEditorContainer=function(editorData){var input;if(editorData.nodeType!=this._type){editorData.nodeType=this._type;editorData.saveOnEnter=true;editorData.node.destroyEditorContents(editorData);editorData.inputElement=input=editorData.inputContainer.appendChild(document.createElement('input'))}else{input=editorData.inputElement}input.value=this.label;input.focus();input.select()};TNproto.saveEditorValue=function(editorData){var node=editorData.node,value=editorData.inputElement.value,validator=node.tree.validator;if(Lang.isFunction(validator)){value=validator(value,node.label,node);if(Lang.isUndefined(value)){return false}}node.label=value;node.getLabelEl().innerHTML=value};TNproto.destroyEditorContents=function(editorData){editorData.inputContainer.innerHTML=''}})();YAHOO.register("treeview",YAHOO.widget.TreeView,{version:"2.7.0",build:"1799"});
329   -/*
  312 +var T=this.get(G);if(T){if(T==S){return false;}T.parentNode.replaceChild(S,T);this.set(J,S.innerHTML);}}});this.setAttributeConfig(J,{value:R.label||this._getLabel(),method:function(T){var S=this.get(G);if(!S){this.set(G,this._createLabelEl());}S.innerHTML=T;}});this.setAttributeConfig(C,{value:R[C]||document.createElement("div"),method:function(S){S=I.get(S);var T=this.get(C);if(T){if(T===S){return false;}if(!this.get("selected")){I.addClass(S,"yui-hidden");}T.parentNode.replaceChild(S,T);this.set(Q,S.innerHTML);}}});this.setAttributeConfig(Q,{value:R[Q],method:function(S){this.get(C).innerHTML=S;}});this.setAttributeConfig(B,{value:R.dataSrc});this.setAttributeConfig(P,{value:R.cacheData||false,validator:L.isBoolean});this.setAttributeConfig(N,{value:R.loadMethod||"GET",validator:L.isString});this.setAttributeConfig(H,{value:false,validator:L.isBoolean,writeOnce:true});this.setAttributeConfig(A,{value:R.dataTimeout||null,validator:L.isNumber});this.setAttributeConfig(F,{value:R.postData||null});this.setAttributeConfig("active",{value:R.active||this.hasClass(this.ACTIVE_CLASSNAME),method:function(S){if(S===true){this.addClass(this.ACTIVE_CLASSNAME);this.set("title",this.ACTIVE_TITLE);}else{this.removeClass(this.ACTIVE_CLASSNAME);this.set("title","");}},validator:function(S){return L.isBoolean(S)&&!this.get(K);}});this.setAttributeConfig(K,{value:R.disabled||this.hasClass(this.DISABLED_CLASSNAME),method:function(S){if(S===true){I.addClass(this.get(O),this.DISABLED_CLASSNAME);}else{I.removeClass(this.get(O),this.DISABLED_CLASSNAME);}},validator:L.isBoolean});this.setAttributeConfig("href",{value:R.href||this.getElementsByTagName("a")[0].getAttribute("href",2)||"#",method:function(S){this.getElementsByTagName("a")[0].href=S;},validator:L.isString});this.setAttributeConfig("contentVisible",{value:R.contentVisible,method:function(S){if(S){I.removeClass(this.get(C),this.HIDDEN_CLASSNAME);if(this.get(B)){if(!this._loading&&!(this.get(H)&&this.get(P))){this._dataConnect();}}}else{I.addClass(this.get(C),this.HIDDEN_CLASSNAME);}},validator:L.isBoolean});},_dataConnect:function(){if(!D.Connect){return false;}I.addClass(this.get(C).parentNode,this.LOADING_CLASSNAME);this._loading=true;this.dataConnection=D.Connect.asyncRequest(this.get(N),this.get(B),{success:function(R){this.loadHandler.success.call(this,R);this.set(H,true);this.dataConnection=null;I.removeClass(this.get(C).parentNode,this.LOADING_CLASSNAME);this._loading=false;},failure:function(R){this.loadHandler.failure.call(this,R);this.dataConnection=null;I.removeClass(this.get(C).parentNode,this.LOADING_CLASSNAME);this._loading=false;},scope:this,timeout:this.get(A)},this.get(F));},_createTabElement:function(R){var V=document.createElement("li"),S=document.createElement("a"),U=R.label||null,T=R.labelEl||null;S.href=R.href||"#";V.appendChild(S);if(T){if(!U){U=this._getLabel();}}else{T=this._createLabelEl();}S.appendChild(T);return V;},_getLabelEl:function(){return this.getElementsByTagName(this.LABEL_TAGNAME)[0];},_createLabelEl:function(){var R=document.createElement(this.LABEL_TAGNAME);return R;},_getLabel:function(){var R=this.get(G);if(!R){return undefined;}return R.innerHTML;},_onActivate:function(U,T){var S=this,R=false;D.Event.preventDefault(U);if(S===T.get(M)){R=true;}T.set(M,S,R);}});YAHOO.widget.Tab=E;})();YAHOO.register("tabview",YAHOO.widget.TabView,{version:"2.7.0",build:"1799"});(function(){var Dom=YAHOO.util.Dom,Event=YAHOO.util.Event,Lang=YAHOO.lang,Widget=YAHOO.widget;YAHOO.widget.TreeView=function(id,oConfig){if(id){this.init(id)}if(oConfig){if(!Lang.isArray(oConfig)){oConfig=[oConfig]}this.buildTreeFromObject(oConfig)}else if(Lang.trim(this._el.innerHTML)){this.buildTreeFromMarkup(id)}};var TV=Widget.TreeView;TV.prototype={id:null,_el:null,_nodes:null,locked:false,_expandAnim:null,_collapseAnim:null,_animCount:0,maxAnim:2,_hasDblClickSubscriber:false,_dblClickTimer:null,currentFocus:null,singleNodeHighlight:false,_currentlyHighlighted:null,setExpandAnim:function(type){this._expandAnim=(Widget.TVAnim.isValid(type))?type:null},setCollapseAnim:function(type){this._collapseAnim=(Widget.TVAnim.isValid(type))?type:null},animateExpand:function(el,node){if(this._expandAnim&&this._animCount<this.maxAnim){var tree=this;var a=Widget.TVAnim.getAnim(this._expandAnim,el,function(){tree.expandComplete(node)});if(a){++this._animCount;this.fireEvent("animStart",{"node":node,"type":"expand"});a.animate()}return true}return false},animateCollapse:function(el,node){if(this._collapseAnim&&this._animCount<this.maxAnim){var tree=this;var a=Widget.TVAnim.getAnim(this._collapseAnim,el,function(){tree.collapseComplete(node)});if(a){++this._animCount;this.fireEvent("animStart",{"node":node,"type":"collapse"});a.animate()}return true}return false},expandComplete:function(node){--this._animCount;this.fireEvent("animComplete",{"node":node,"type":"expand"})},collapseComplete:function(node){--this._animCount;this.fireEvent("animComplete",{"node":node,"type":"collapse"})},init:function(id){this._el=Dom.get(id);this.id=Dom.generateId(this._el,"yui-tv-auto-id-");this.createEvent("animStart",this);this.createEvent("animComplete",this);this.createEvent("collapse",this);this.createEvent("collapseComplete",this);this.createEvent("expand",this);this.createEvent("expandComplete",this);this.createEvent("enterKeyPressed",this);this.createEvent("clickEvent",this);this.createEvent('focusChanged',this);var self=this;this.createEvent("dblClickEvent",{scope:this,onSubscribeCallback:function(){self._hasDblClickSubscriber=true}});this.createEvent("labelClick",this);this.createEvent("highlightEvent",this);this._nodes=[];TV.trees[this.id]=this;this.root=new Widget.RootNode(this);var LW=Widget.LogWriter},buildTreeFromObject:function(oConfig){var build=function(parent,oConfig){var i,item,node,children,type,NodeType,ThisType;for(i=0;i<oConfig.length;i++){item=oConfig[i];if(Lang.isString(item)){node=new Widget.TextNode(item,parent)}else if(Lang.isObject(item)){children=item.children;delete item.children;type=item.type||'text';delete item.type;switch(Lang.isString(type)&&type.toLowerCase()){case'text':node=new Widget.TextNode(item,parent);break;case'menu':node=new Widget.MenuNode(item,parent);break;case'html':node=new Widget.HTMLNode(item,parent);break;default:if(Lang.isString(type)){NodeType=Widget[type]}else{NodeType=type}if(Lang.isObject(NodeType)){for(ThisType=NodeType;ThisType&&ThisType!==Widget.Node;ThisType=ThisType.superclass.constructor){}if(ThisType){node=new NodeType(item,parent)}else{}}else{}}if(children){build(node,children)}}else{}}};build(this.root,oConfig)},buildTreeFromMarkup:function(id){var build=function(markup){var el,child,branch=[],config={},label,yuiConfig;for(el=Dom.getFirstChild(markup);el;el=Dom.getNextSibling(el)){switch(el.tagName.toUpperCase()){case'LI':label='';config={expanded:Dom.hasClass(el,'expanded'),title:el.title||el.alt||null,className:Lang.trim(el.className.replace(/\bexpanded\b/,''))||null};child=el.firstChild;if(child.nodeType==3){label=Lang.trim(child.nodeValue.replace(/[\n\t\r]*/g,''));if(label){config.type='text';config.label=label}else{child=Dom.getNextSibling(child)}}if(!label){if(child.tagName.toUpperCase()=='A'){config.type='text';config.label=child.innerHTML;config.href=child.href;config.target=child.target;config.title=child.title||child.alt||config.title}else{config.type='html';var d=document.createElement('div');d.appendChild(child.cloneNode(true));config.html=d.innerHTML;config.hasIcon=true}}child=Dom.getNextSibling(child);switch(child&&child.tagName.toUpperCase()){case'UL':case'OL':config.children=build(child);break}if(YAHOO.lang.JSON){yuiConfig=el.getAttribute('yuiConfig');if(yuiConfig){yuiConfig=YAHOO.lang.JSON.parse(yuiConfig);config=YAHOO.lang.merge(config,yuiConfig)}}branch.push(config);break;case'UL':case'OL':config={type:'text',label:'',children:build(child)};branch.push(config);break}}return branch};var markup=Dom.getChildrenBy(Dom.get(id),function(el){var tag=el.tagName.toUpperCase();return tag=='UL'||tag=='OL'});if(markup.length){this.buildTreeFromObject(build(markup[0]))}else{}},_getEventTargetTdEl:function(ev){var target=Event.getTarget(ev);while(target&&!(target.tagName.toUpperCase()=='TD'&&Dom.hasClass(target.parentNode,'ygtvrow'))){target=Dom.getAncestorByTagName(target,'td')}if(Lang.isNull(target)){return null}if(/\bygtv(blank)?depthcell/.test(target.className)){return null}if(target.id){var m=target.id.match(/\bygtv([^\d]*)(.*)/);if(m&&m[2]&&this._nodes[m[2]]){return target}}return null},_onClickEvent:function(ev){var self=this,td=this._getEventTargetTdEl(ev),node,target,toggle=function(){node.toggle();node.focus();try{Event.preventDefault(ev)}catch(e){}};if(!td){return}node=this.getNodeByElement(td);if(!node){return}target=Event.getTarget(ev);if(Dom.hasClass(target,node.labelStyle)||Dom.getAncestorByClassName(target,node.labelStyle)){this.fireEvent('labelClick',node)}if(/\bygtv[tl][mp]h?h?/.test(td.className)){toggle()}else{if(this._dblClickTimer){window.clearTimeout(this._dblClickTimer);this._dblClickTimer=null}else{if(this._hasDblClickSubscriber){this._dblClickTimer=window.setTimeout(function(){self._dblClickTimer=null;if(self.fireEvent('clickEvent',{event:ev,node:node})!==false){toggle()}},200)}else{if(self.fireEvent('clickEvent',{event:ev,node:node})!==false){}}}}},_onDblClickEvent:function(ev){if(!this._hasDblClickSubscriber){return}var td=this._getEventTargetTdEl(ev);if(!td){return}if(!(/\bygtv[tl][mp]h?h?/.test(td.className))){this.fireEvent('dblClickEvent',{event:ev,node:this.getNodeByElement(td)});if(this._dblClickTimer){window.clearTimeout(this._dblClickTimer);this._dblClickTimer=null}}},_onMouseOverEvent:function(ev){var target;if((target=this._getEventTargetTdEl(ev))&&(target=this.getNodeByElement(target))&&(target=target.getToggleEl())){target.className=target.className.replace(/\bygtv([lt])([mp])\b/gi,'ygtv$1$2h')}},_onMouseOutEvent:function(ev){var target;if((target=this._getEventTargetTdEl(ev))&&(target=this.getNodeByElement(target))&&(target=target.getToggleEl())){target.className=target.className.replace(/\bygtv([lt])([mp])h\b/gi,'ygtv$1$2')}},_onKeyDownEvent:function(ev){var target=Event.getTarget(ev),node=this.getNodeByElement(target),newNode=node,KEY=YAHOO.util.KeyListener.KEY;switch(ev.keyCode){case KEY.UP:do{if(newNode.previousSibling){newNode=newNode.previousSibling}else{newNode=newNode.parent}}while(newNode&&!newNode._canHaveFocus());if(newNode){newNode.focus()}Event.preventDefault(ev);break;case KEY.DOWN:do{if(newNode.nextSibling){newNode=newNode.nextSibling}else{newNode.expand();newNode=(newNode.children.length||null)&&newNode.children[0]}}while(newNode&&!newNode._canHaveFocus);if(newNode){newNode.focus()}Event.preventDefault(ev);break;case KEY.LEFT:do{if(newNode.parent){newNode=newNode.parent}else{newNode=newNode.previousSibling}}while(newNode&&!newNode._canHaveFocus());if(newNode){newNode.focus()}Event.preventDefault(ev);break;case KEY.RIGHT:do{newNode.expand();if(newNode.children.length){newNode=newNode.children[0]}else{newNode=newNode.nextSibling}}while(newNode&&!newNode._canHaveFocus());if(newNode){newNode.focus()}Event.preventDefault(ev);break;case KEY.ENTER:if(node.href){if(node.target){window.open(node.href,node.target)}else{window.location(node.href)}}else{node.toggle()}this.fireEvent('enterKeyPressed',node);Event.preventDefault(ev);break;case KEY.HOME:newNode=this.getRoot();if(newNode.children.length){newNode=newNode.children[0]}if(newNode._canHaveFocus()){newNode.focus()}Event.preventDefault(ev);break;case KEY.END:newNode=newNode.parent.children;newNode=newNode[newNode.length-1];if(newNode._canHaveFocus()){newNode.focus()}Event.preventDefault(ev);break;case 107:if(ev.shiftKey){node.parent.expandAll()}else{node.expand()}break;case 109:if(ev.shiftKey){node.parent.collapseAll()}else{node.collapse()}break;default:break}},render:function(){var html=this.root.getHtml(),el=this.getEl();el.innerHTML=html;if(!this._hasEvents){Event.on(el,'click',this._onClickEvent,this,true);Event.on(el,'dblclick',this._onDblClickEvent,this,true);Event.on(el,'mouseover',this._onMouseOverEvent,this,true);Event.on(el,'mouseout',this._onMouseOutEvent,this,true);Event.on(el,'keydown',this._onKeyDownEvent,this,true)}this._hasEvents=true},getEl:function(){if(!this._el){this._el=Dom.get(this.id)}return this._el},regNode:function(node){this._nodes[node.index]=node},getRoot:function(){return this.root},setDynamicLoad:function(fnDataLoader,iconMode){this.root.setDynamicLoad(fnDataLoader,iconMode)},expandAll:function(){if(!this.locked){this.root.expandAll()}},collapseAll:function(){if(!this.locked){this.root.collapseAll()}},getNodeByIndex:function(nodeIndex){var n=this._nodes[nodeIndex];return(n)?n:null},getNodeByProperty:function(property,value){for(var i in this._nodes){if(this._nodes.hasOwnProperty(i)){var n=this._nodes[i];if((property in n&&n[property]==value)||(n.data&&value==n.data[property])){return n}}}return null},getNodesByProperty:function(property,value){var values=[];for(var i in this._nodes){if(this._nodes.hasOwnProperty(i)){var n=this._nodes[i];if((property in n&&n[property]==value)||(n.data&&value==n.data[property])){values.push(n)}}}return(values.length)?values:null},getNodeByElement:function(el){var p=el,m,re=/ygtv([^\d]*)(.*)/;do{if(p&&p.id){m=p.id.match(re);if(m&&m[2]){return this.getNodeByIndex(m[2])}}p=p.parentNode;if(!p||!p.tagName){break}}while(p.id!==this.id&&p.tagName.toLowerCase()!=="body");return null},removeNode:function(node,autoRefresh){if(node.isRoot()){return false}var p=node.parent;if(p.parent){p=p.parent}this._deleteNode(node);if(autoRefresh&&p&&p.childrenRendered){p.refresh()}return true},_removeChildren_animComplete:function(o){this.unsubscribe(this._removeChildren_animComplete);this.removeChildren(o.node)},removeChildren:function(node){if(node.expanded){if(this._collapseAnim){this.subscribe("animComplete",this._removeChildren_animComplete,this,true);Widget.Node.prototype.collapse.call(node);return}node.collapse()}while(node.children.length){this._deleteNode(node.children[0])}if(node.isRoot()){Widget.Node.prototype.expand.call(node)}node.childrenRendered=false;node.dynamicLoadComplete=false;node.updateIcon()},_deleteNode:function(node){this.removeChildren(node);this.popNode(node)},popNode:function(node){var p=node.parent;var a=[];for(var i=0,len=p.children.length;i<len;++i){if(p.children[i]!=node){a[a.length]=p.children[i]}}p.children=a;p.childrenRendered=false;if(node.previousSibling){node.previousSibling.nextSibling=node.nextSibling}if(node.nextSibling){node.nextSibling.previousSibling=node.previousSibling}node.parent=null;node.previousSibling=null;node.nextSibling=null;node.tree=null;delete this._nodes[node.index]},destroy:function(){if(this._destroyEditor){this._destroyEditor()}var el=this.getEl();Event.removeListener(el,'click');Event.removeListener(el,'dblclick');Event.removeListener(el,'mouseover');Event.removeListener(el,'mouseout');Event.removeListener(el,'keydown');for(var i=0;i<this._nodes.length;i++){var node=this._nodes[i];if(node&&node.destroy){node.destroy()}}el.innerHTML='';this._hasEvents=false},toString:function(){return"TreeView "+this.id},getNodeCount:function(){return this.getRoot().getNodeCount()},getTreeDefinition:function(){return this.getRoot().getNodeDefinition()},onExpand:function(node){},onCollapse:function(node){},setNodesProperty:function(name,value,refresh){this.root.setNodesProperty(name,value);if(refresh){this.root.refresh()}},onEventToggleHighlight:function(oArgs){var node;if('node'in oArgs&&oArgs.node instanceof Widget.Node){node=oArgs.node}else if(oArgs instanceof Widget.Node){node=oArgs}else{return false}node.toggleHighlight();return false}};var PROT=TV.prototype;PROT.draw=PROT.render;YAHOO.augment(TV,YAHOO.util.EventProvider);TV.nodeCount=0;TV.trees=[];TV.getTree=function(treeId){var t=TV.trees[treeId];return(t)?t:null};TV.getNode=function(treeId,nodeIndex){var t=TV.getTree(treeId);return(t)?t.getNodeByIndex(nodeIndex):null};TV.FOCUS_CLASS_NAME='ygtvfocus';TV.preload=function(e,prefix){prefix=prefix||"ygtv";var styles=["tn","tm","tmh","tp","tph","ln","lm","lmh","lp","lph","loading"];var sb=[];for(var i=1;i<styles.length;i=i+1){sb[sb.length]='<span class="'+prefix+styles[i]+'">&#160;</span>'}var f=document.createElement("div");var s=f.style;s.className=prefix+styles[0];s.position="absolute";s.height="1px";s.width="1px";s.top="-1000px";s.left="-1000px";f.innerHTML=sb.join("");document.body.appendChild(f);Event.removeListener(window,"load",TV.preload)};Event.addListener(window,"load",TV.preload)})();(function(){var Dom=YAHOO.util.Dom,Lang=YAHOO.lang,Event=YAHOO.util.Event;YAHOO.widget.Node=function(oData,oParent,expanded){if(oData){this.init(oData,oParent,expanded)}};YAHOO.widget.Node.prototype={index:0,children:null,tree:null,data:null,parent:null,depth:-1,expanded:false,multiExpand:true,renderHidden:false,childrenRendered:false,dynamicLoadComplete:false,previousSibling:null,nextSibling:null,_dynLoad:false,dataLoader:null,isLoading:false,hasIcon:true,iconMode:0,nowrap:false,isLeaf:false,contentStyle:"",contentElId:null,enableHighlight:false,highlightState:0,propagateHighlightUp:false,propagateHighlightDown:false,className:null,_type:"Node",init:function(oData,oParent,expanded){this.data={};this.children=[];this.index=YAHOO.widget.TreeView.nodeCount;++YAHOO.widget.TreeView.nodeCount;this.contentElId="ygtvcontentel"+this.index;if(Lang.isObject(oData)){for(var property in oData){if(oData.hasOwnProperty(property)){if(property.charAt(0)!='_'&&!Lang.isUndefined(this[property])&&!Lang.isFunction(this[property])){this[property]=oData[property]}else{this.data[property]=oData[property]}}}}if(!Lang.isUndefined(expanded)){this.expanded=expanded}this.createEvent("parentChange",this);if(oParent){oParent.appendChild(this)}},applyParent:function(parentNode){if(!parentNode){return false}this.tree=parentNode.tree;this.parent=parentNode;this.depth=parentNode.depth+1;this.tree.regNode(this);parentNode.childrenRendered=false;for(var i=0,len=this.children.length;i<len;++i){this.children[i].applyParent(this)}this.fireEvent("parentChange");return true},appendChild:function(childNode){if(this.hasChildren()){var sib=this.children[this.children.length-1];sib.nextSibling=childNode;childNode.previousSibling=sib}this.children[this.children.length]=childNode;childNode.applyParent(this);if(this.childrenRendered&&this.expanded){this.getChildrenEl().style.display=""}return childNode},appendTo:function(parentNode){return parentNode.appendChild(this)},insertBefore:function(node){var p=node.parent;if(p){if(this.tree){this.tree.popNode(this)}var refIndex=node.isChildOf(p);p.children.splice(refIndex,0,this);if(node.previousSibling){node.previousSibling.nextSibling=this}this.previousSibling=node.previousSibling;this.nextSibling=node;node.previousSibling=this;this.applyParent(p)}return this},insertAfter:function(node){var p=node.parent;if(p){if(this.tree){this.tree.popNode(this)}var refIndex=node.isChildOf(p);if(!node.nextSibling){this.nextSibling=null;return this.appendTo(p)}p.children.splice(refIndex+1,0,this);node.nextSibling.previousSibling=this;this.previousSibling=node;this.nextSibling=node.nextSibling;node.nextSibling=this;this.applyParent(p)}return this},isChildOf:function(parentNode){if(parentNode&&parentNode.children){for(var i=0,len=parentNode.children.length;i<len;++i){if(parentNode.children[i]===this){return i}}}return-1},getSiblings:function(){var sib=this.parent.children.slice(0);for(var i=0;i<sib.length&&sib[i]!=this;i++){}sib.splice(i,1);if(sib.length){return sib}return null},showChildren:function(){if(!this.tree.animateExpand(this.getChildrenEl(),this)){if(this.hasChildren()){this.getChildrenEl().style.display=""}}},hideChildren:function(){if(!this.tree.animateCollapse(this.getChildrenEl(),this)){this.getChildrenEl().style.display="none"}},getElId:function(){return"ygtv"+this.index},getChildrenElId:function(){return"ygtvc"+this.index},getToggleElId:function(){return"ygtvt"+this.index},getEl:function(){return Dom.get(this.getElId())},getChildrenEl:function(){return Dom.get(this.getChildrenElId())},getToggleEl:function(){return Dom.get(this.getToggleElId())},getContentEl:function(){return Dom.get(this.contentElId)},collapse:function(){if(!this.expanded){return}var ret=this.tree.onCollapse(this);if(false===ret){return}ret=this.tree.fireEvent("collapse",this);if(false===ret){return}if(!this.getEl()){this.expanded=false}else{this.hideChildren();this.expanded=false;this.updateIcon()}ret=this.tree.fireEvent("collapseComplete",this)},expand:function(lazySource){if(this.expanded&&!lazySource){return}var ret=true;if(!lazySource){ret=this.tree.onExpand(this);if(false===ret){return}ret=this.tree.fireEvent("expand",this)}if(false===ret){return}if(!this.getEl()){this.expanded=true;return}if(!this.childrenRendered){this.getChildrenEl().innerHTML=this.renderChildren()}else{}this.expanded=true;this.updateIcon();if(this.isLoading){this.expanded=false;return}if(!this.multiExpand){var sibs=this.getSiblings();for(var i=0;sibs&&i<sibs.length;++i){if(sibs[i]!=this&&sibs[i].expanded){sibs[i].collapse()}}}this.showChildren();ret=this.tree.fireEvent("expandComplete",this)},updateIcon:function(){if(this.hasIcon){var el=this.getToggleEl();if(el){el.className=el.className.replace(/\bygtv(([tl][pmn]h?)|(loading))\b/gi,this.getStyle())}}},getStyle:function(){if(this.isLoading){return"ygtvloading"}else{var loc=(this.nextSibling)?"t":"l";var type="n";if(this.hasChildren(true)||(this.isDynamic()&&!this.getIconMode())){type=(this.expanded)?"m":"p"}return"ygtv"+loc+type}},getHoverStyle:function(){var s=this.getStyle();if(this.hasChildren(true)&&!this.isLoading){s+="h"}return s},expandAll:function(){var l=this.children.length;for(var i=0;i<l;++i){var c=this.children[i];if(c.isDynamic()){break}else if(!c.multiExpand){break}else{c.expand();c.expandAll()}}},collapseAll:function(){for(var i=0;i<this.children.length;++i){this.children[i].collapse();this.children[i].collapseAll()}},setDynamicLoad:function(fnDataLoader,iconMode){if(fnDataLoader){this.dataLoader=fnDataLoader;this._dynLoad=true}else{this.dataLoader=null;this._dynLoad=false}if(iconMode){this.iconMode=iconMode}},isRoot:function(){return(this==this.tree.root)},isDynamic:function(){if(this.isLeaf){return false}else{return(!this.isRoot()&&(this._dynLoad||this.tree.root._dynLoad))}},getIconMode:function(){return(this.iconMode||this.tree.root.iconMode)},hasChildren:function(checkForLazyLoad){if(this.isLeaf){return false}else{return(this.children.length>0||(checkForLazyLoad&&this.isDynamic()&&!this.dynamicLoadComplete))}},toggle:function(){if(!this.tree.locked&&(this.hasChildren(true)||this.isDynamic())){if(this.expanded){this.collapse()}else{this.expand()}}},getHtml:function(){this.childrenRendered=false;return['<div class="ygtvitem" id="',this.getElId(),'">',this.getNodeHtml(),this.getChildrenHtml(),'</div>'].join("")},getChildrenHtml:function(){var sb=[];sb[sb.length]='<div class="ygtvchildren" id="'+this.getChildrenElId()+'"';if(!this.expanded||!this.hasChildren()){sb[sb.length]=' style="display:none;"'}sb[sb.length]='>';if((this.hasChildren(true)&&this.expanded)||(this.renderHidden&&!this.isDynamic())){sb[sb.length]=this.renderChildren()}sb[sb.length]='</div>';return sb.join("")},renderChildren:function(){var node=this;if(this.isDynamic()&&!this.dynamicLoadComplete){this.isLoading=true;this.tree.locked=true;if(this.dataLoader){setTimeout(function(){node.dataLoader(node,function(){node.loadComplete()})},10)}else if(this.tree.root.dataLoader){setTimeout(function(){node.tree.root.dataLoader(node,function(){node.loadComplete()})},10)}else{return"Error: data loader not found or not specified."}return""}else{return this.completeRender()}},completeRender:function(){var sb=[];for(var i=0;i<this.children.length;++i){sb[sb.length]=this.children[i].getHtml()}this.childrenRendered=true;return sb.join("")},loadComplete:function(){this.getChildrenEl().innerHTML=this.completeRender();this.dynamicLoadComplete=true;this.isLoading=false;this.expand(true);this.tree.locked=false},getAncestor:function(depth){if(depth>=this.depth||depth<0){return null}var p=this.parent;while(p.depth>depth){p=p.parent}return p},getDepthStyle:function(depth){return(this.getAncestor(depth).nextSibling)?"ygtvdepthcell":"ygtvblankdepthcell"},getNodeHtml:function(){var sb=[];sb[sb.length]='<table id="ygtvtableel'+this.index+'"border="0" cellpadding="0" cellspacing="0" class="ygtvtable ygtvdepth'+this.depth;if(this.enableHighlight){}if(this.className){sb[sb.length]=' '+this.className}sb[sb.length]='"><tr class="ygtvrow">';for(var i=0;i<this.depth;++i){sb[sb.length]='<td class="ygtvcell '+this.getDepthStyle(i)+'"><div class="ygtvspacer"></div></td>'}if(this.hasIcon){sb[sb.length]='<td id="'+this.getToggleElId();sb[sb.length]='" class="ygtvcell ';sb[sb.length]=this.getStyle();sb[sb.length]='"><a href="#" class="ygtvspacer">&nbsp;</a></td>'}sb[sb.length]='<td id="'+this.contentElId;sb[sb.length]='" class="ygtvcell ';sb[sb.length]=this.contentStyle+' ygtvcontent" ';sb[sb.length]=(this.nowrap)?' nowrap="nowrap" ':'';sb[sb.length]=' >';sb[sb.length]=this.getContentHtml();sb[sb.length]='</td></tr></table>';return sb.join("")},getContentHtml:function(){return""},refresh:function(){this.getChildrenEl().innerHTML=this.completeRender();if(this.hasIcon){var el=this.getToggleEl();if(el){el.className=el.className.replace(/\bygtv[lt][nmp]h*\b/gi,this.getStyle())}}},toString:function(){return this._type+" ("+this.index+")"},_focusHighlightedItems:[],_focusedItem:null,_canHaveFocus:function(){return this.getEl().getElementsByTagName('a').length>0},_removeFocus:function(){if(this._focusedItem){Event.removeListener(this._focusedItem,'blur');this._focusedItem=null}var el;while((el=this._focusHighlightedItems.shift())){Dom.removeClass(el,YAHOO.widget.TreeView.FOCUS_CLASS_NAME)}},focus:function(){var focused=false,self=this;if(this.tree.currentFocus){this.tree.currentFocus._removeFocus()}var expandParent=function(node){if(node.parent){expandParent(node.parent);node.parent.expand()}};expandParent(this);Dom.getElementsBy(function(el){return/ygtv(([tl][pmn]h?)|(content))/.test(el.className)},'td',self.getEl().firstChild,function(el){Dom.addClass(el,YAHOO.widget.TreeView.FOCUS_CLASS_NAME);if(!focused){var aEl=el.getElementsByTagName('a');if(aEl.length){aEl=aEl[0];aEl.focus();self._focusedItem=aEl;Event.on(aEl,'blur',function(){self.tree.fireEvent('focusChanged',{oldNode:self.tree.currentFocus,newNode:null});self.tree.currentFocus=null;self._removeFocus()});focused=true}}self._focusHighlightedItems.push(el)});if(focused){this.tree.fireEvent('focusChanged',{oldNode:this.tree.currentFocus,newNode:this});this.tree.currentFocus=this}else{this.tree.fireEvent('focusChanged',{oldNode:self.tree.currentFocus,newNode:null});this.tree.currentFocus=null;this._removeFocus()}return focused},getNodeCount:function(){for(var i=0,count=0;i<this.children.length;i++){count+=this.children[i].getNodeCount()}return count+1},getNodeDefinition:function(){if(this.isDynamic()){return false}var def,defs=Lang.merge(this.data),children=[];if(this.expanded){defs.expanded=this.expanded}if(!this.multiExpand){defs.multiExpand=this.multiExpand}if(!this.renderHidden){defs.renderHidden=this.renderHidden}if(!this.hasIcon){defs.hasIcon=this.hasIcon}if(this.nowrap){defs.nowrap=this.nowrap}if(this.className){defs.className=this.className}if(this.editable){defs.editable=this.editable}if(this.enableHighlight){defs.enableHighlight=this.enableHighlight}if(this.highlightState){defs.highlightState=this.highlightState}if(this.propagateHighlightUp){defs.propagateHighlightUp=this.propagateHighlightUp}if(this.propagateHighlightDown){defs.propagateHighlightDown=this.propagateHighlightDown}defs.type=this._type;for(var i=0;i<this.children.length;i++){def=this.children[i].getNodeDefinition();if(def===false){return false}children.push(def)}if(children.length){defs.children=children}return defs},getToggleLink:function(){return'return false;'},setNodesProperty:function(name,value,refresh){if(name.charAt(0)!='_'&&!Lang.isUndefined(this[name])&&!Lang.isFunction(this[name])){this[name]=value}else{this.data[name]=value}for(var i=0;i<this.children.length;i++){this.children[i].setNodesProperty(name,value)}if(refresh){this.refresh()}},toggleHighlight:function(){if(this.enableHighlight){if(this.highlightState==1){this.unhighlight()}else{this.highlight()}}},highlight:function(_silent){return;if(this.enableHighlight){if(this.tree.singleNodeHighlight){if(this.tree._currentlyHighlighted){this.tree._currentlyHighlighted.unhighlight()}this.tree._currentlyHighlighted=this}this.highlightState=1;this._setHighlightClassName();if(this.propagateHighlightDown){for(var i=0;i<this.children.length;i++){this.children[i].highlight(true)}}if(this.propagateHighlightUp){if(this.parent){this.parent._childrenHighlighted()}}if(!_silent){this.tree.fireEvent('highlightEvent',this)}}},unhighlight:function(_silent){if(this.enableHighlight){this.highlightState=0;this._setHighlightClassName();if(this.propagateHighlightDown){for(var i=0;i<this.children.length;i++){this.children[i].unhighlight(true)}}if(this.propagateHighlightUp){if(this.parent){this.parent._childrenHighlighted()}}if(!_silent){this.tree.fireEvent('highlightEvent',this)}}},_childrenHighlighted:function(){var yes=false,no=false;if(this.enableHighlight){for(var i=0;i<this.children.length;i++){switch(this.children[i].highlightState){case 0:no=true;break;case 1:yes=true;break;case 2:yes=no=true;break}}if(yes&&no){this.highlightState=2}else if(yes){this.highlightState=1}else{this.highlightState=0}this._setHighlightClassName();if(this.propagateHighlightUp){if(this.parent){this.parent._childrenHighlighted()}}}},_setHighlightClassName:function(){var el=Dom.get('ygtvtableel'+this.index);if(el){el.className=el.className.replace(/\bygtv-highlight\d\b/gi,'ygtv-highlight'+this.highlightState)}}};YAHOO.augment(YAHOO.widget.Node,YAHOO.util.EventProvider)})();YAHOO.widget.RootNode=function(oTree){this.init(null,null,true);this.tree=oTree};YAHOO.extend(YAHOO.widget.RootNode,YAHOO.widget.Node,{_type:"RootNode",getNodeHtml:function(){return""},toString:function(){return this._type},loadComplete:function(){this.tree.draw()},getNodeCount:function(){for(var i=0,count=0;i<this.children.length;i++){count+=this.children[i].getNodeCount()}return count},getNodeDefinition:function(){for(var def,defs=[],i=0;i<this.children.length;i++){def=this.children[i].getNodeDefinition();if(def===false){return false}defs.push(def)}return defs},collapse:function(){},expand:function(){},getSiblings:function(){return null},focus:function(){}});(function(){var Dom=YAHOO.util.Dom,Lang=YAHOO.lang,Event=YAHOO.util.Event;YAHOO.widget.TextNode=function(oData,oParent,expanded){if(oData){if(Lang.isString(oData)){oData={label:oData}}this.init(oData,oParent,expanded);this.setUpLabel(oData)}};YAHOO.extend(YAHOO.widget.TextNode,YAHOO.widget.Node,{labelStyle:"ygtvlabel",labelElId:null,label:null,title:null,href:null,target:"_self",_type:"TextNode",setUpLabel:function(oData){if(Lang.isString(oData)){oData={label:oData}}else{if(oData.style){this.labelStyle=oData.style}}this.label=oData.label;this.labelElId="ygtvlabelel"+this.index},getLabelEl:function(){return Dom.get(this.labelElId)},getContentHtml:function(){var sb=[];sb[sb.length]=this.href?'<a':'<span';sb[sb.length]=' id="'+this.labelElId+'"';sb[sb.length]=' class="'+this.labelStyle+'"';if(this.href){sb[sb.length]=' href="'+this.href+'"';sb[sb.length]=' target="'+this.target+'"'}if(this.title){sb[sb.length]=' title="'+this.title+'"'}sb[sb.length]=' >';sb[sb.length]=this.label;sb[sb.length]=this.href?'</a>':'</span>';return sb.join("")},getNodeDefinition:function(){var def=YAHOO.widget.TextNode.superclass.getNodeDefinition.call(this);if(def===false){return false}def.label=this.label;if(this.labelStyle!='ygtvlabel'){def.style=this.labelStyle}if(this.title){def.title=this.title}if(this.href){def.href=this.href}if(this.target!='_self'){def.target=this.target}return def},toString:function(){return YAHOO.widget.TextNode.superclass.toString.call(this)+": "+this.label},onLabelClick:function(){return false},refresh:function(){YAHOO.widget.TextNode.superclass.refresh.call(this);var label=this.getLabelEl();label.innerHTML=this.label;if(label.tagName.toUpperCase()=='A'){label.href=this.href;label.target=this.target}}})})();YAHOO.widget.MenuNode=function(oData,oParent,expanded){YAHOO.widget.MenuNode.superclass.constructor.call(this,oData,oParent,expanded);this.multiExpand=false};YAHOO.extend(YAHOO.widget.MenuNode,YAHOO.widget.TextNode,{_type:"MenuNode"});(function(){var Dom=YAHOO.util.Dom,Lang=YAHOO.lang,Event=YAHOO.util.Event;YAHOO.widget.HTMLNode=function(oData,oParent,expanded,hasIcon){if(oData){this.init(oData,oParent,expanded);this.initContent(oData,hasIcon)}};YAHOO.extend(YAHOO.widget.HTMLNode,YAHOO.widget.Node,{contentStyle:"ygtvhtml",html:null,_type:"HTMLNode",initContent:function(oData,hasIcon){this.setHtml(oData);this.contentElId="ygtvcontentel"+this.index;if(!Lang.isUndefined(hasIcon)){this.hasIcon=hasIcon}},setHtml:function(o){this.html=(typeof o==="string")?o:o.html;var el=this.getContentEl();if(el){el.innerHTML=this.html}},getContentHtml:function(){return this.html},getNodeDefinition:function(){var def=YAHOO.widget.HTMLNode.superclass.getNodeDefinition.call(this);if(def===false){return false}def.html=this.html;return def}})})();(function(){var Dom=YAHOO.util.Dom,Lang=YAHOO.lang,Event=YAHOO.util.Event,Calendar=YAHOO.widget.Calendar;YAHOO.widget.DateNode=function(oData,oParent,expanded){YAHOO.widget.DateNode.superclass.constructor.call(this,oData,oParent,expanded)};YAHOO.extend(YAHOO.widget.DateNode,YAHOO.widget.TextNode,{_type:"DateNode",calendarConfig:null,fillEditorContainer:function(editorData){var cal,container=editorData.inputContainer;if(Lang.isUndefined(Calendar)){Dom.replaceClass(editorData.editorPanel,'ygtv-edit-DateNode','ygtv-edit-TextNode');YAHOO.widget.DateNode.superclass.fillEditorContainer.call(this,editorData);return}if(editorData.nodeType!=this._type){editorData.nodeType=this._type;editorData.saveOnEnter=false;editorData.node.destroyEditorContents(editorData);editorData.inputObject=cal=new Calendar(container.appendChild(document.createElement('div')));if(this.calendarConfig){cal.cfg.applyConfig(this.calendarConfig,true);cal.cfg.fireQueue()}cal.selectEvent.subscribe(function(){this.tree._closeEditor(true)},this,true)}else{cal=editorData.inputObject}cal.cfg.setProperty("selected",this.label,false);var delim=cal.cfg.getProperty('DATE_FIELD_DELIMITER');var pageDate=this.label.split(delim);cal.cfg.setProperty('pagedate',pageDate[cal.cfg.getProperty('MDY_MONTH_POSITION')-1]+delim+pageDate[cal.cfg.getProperty('MDY_YEAR_POSITION')-1]);cal.cfg.fireQueue();cal.render();cal.oDomContainer.focus()},saveEditorValue:function(editorData){var node=editorData.node,validator=node.tree.validator,value;if(Lang.isUndefined(Calendar)){value=editorData.inputElement.value}else{var cal=editorData.inputObject,date=cal.getSelectedDates()[0],dd=[];dd[cal.cfg.getProperty('MDY_DAY_POSITION')-1]=date.getDate();dd[cal.cfg.getProperty('MDY_MONTH_POSITION')-1]=date.getMonth()+1;dd[cal.cfg.getProperty('MDY_YEAR_POSITION')-1]=date.getFullYear();value=dd.join(cal.cfg.getProperty('DATE_FIELD_DELIMITER'))}if(Lang.isFunction(validator)){value=validator(value,node.label,node);if(Lang.isUndefined(value)){return false}}node.label=value;node.getLabelEl().innerHTML=value},getNodeDefinition:function(){var def=YAHOO.widget.DateNode.superclass.getNodeDefinition.call(this);if(def===false){return false}if(this.calendarConfig){def.calendarConfig=this.calendarConfig}return def}})})();(function(){var Dom=YAHOO.util.Dom,Lang=YAHOO.lang,Event=YAHOO.util.Event,TV=YAHOO.widget.TreeView,TVproto=TV.prototype;TV.editorData={active:false,whoHasIt:null,nodeType:null,editorPanel:null,inputContainer:null,buttonsContainer:null,node:null,saveOnEnter:true};TVproto.validator=null;TVproto._nodeEditing=function(node){if(node.fillEditorContainer&&node.editable){var ed,topLeft,buttons,button,editorData=TV.editorData;editorData.active=true;editorData.whoHasIt=this;if(!editorData.nodeType){editorData.editorPanel=ed=document.body.appendChild(document.createElement('div'));Dom.addClass(ed,'ygtv-label-editor');buttons=editorData.buttonsContainer=ed.appendChild(document.createElement('div'));Dom.addClass(buttons,'ygtv-button-container');button=buttons.appendChild(document.createElement('button'));Dom.addClass(button,'ygtvok');button.innerHTML=' ';button=buttons.appendChild(document.createElement('button'));Dom.addClass(button,'ygtvcancel');button.innerHTML=' ';Event.on(buttons,'click',function(ev){var target=Event.getTarget(ev);var node=TV.editorData.node;if(Dom.hasClass(target,'ygtvok')){Event.stopEvent(ev);this._closeEditor(true)}if(Dom.hasClass(target,'ygtvcancel')){Event.stopEvent(ev);this._closeEditor(false)}},this,true);editorData.inputContainer=ed.appendChild(document.createElement('div'));Dom.addClass(editorData.inputContainer,'ygtv-input');Event.on(ed,'keydown',function(ev){var editorData=TV.editorData,KEY=YAHOO.util.KeyListener.KEY;switch(ev.keyCode){case KEY.ENTER:Event.stopEvent(ev);if(editorData.saveOnEnter){this._closeEditor(true)}break;case KEY.ESCAPE:Event.stopEvent(ev);this._closeEditor(false);break}},this,true)}else{ed=editorData.editorPanel}editorData.node=node;if(editorData.nodeType){Dom.removeClass(ed,'ygtv-edit-'+editorData.nodeType)}Dom.addClass(ed,' ygtv-edit-'+node._type);topLeft=Dom.getXY(node.getContentEl());Dom.setStyle(ed,'left',topLeft[0]+'px');Dom.setStyle(ed,'top',topLeft[1]+'px');Dom.setStyle(ed,'display','block');ed.focus();node.fillEditorContainer(editorData);return true}};TVproto.onEventEditNode=function(oArgs){if(oArgs instanceof YAHOO.widget.Node){oArgs.editNode()}else if(oArgs.node instanceof YAHOO.widget.Node){oArgs.node.editNode()}};TVproto._closeEditor=function(save){var ed=TV.editorData,node=ed.node,close=true;if(save){close=ed.node.saveEditorValue(ed)!==false}if(close){Dom.setStyle(ed.editorPanel,'display','none');ed.active=false;node.focus()}};TVproto._destroyEditor=function(){var ed=TV.editorData;if(ed&&ed.nodeType&&(!ed.active||ed.whoHasIt===this)){Event.removeListener(ed.editorPanel,'keydown');Event.removeListener(ed.buttonContainer,'click');ed.node.destroyEditorContents(ed);document.body.removeChild(ed.editorPanel);ed.nodeType=ed.editorPanel=ed.inputContainer=ed.buttonsContainer=ed.whoHasIt=ed.node=null;ed.active=false}};var Nproto=YAHOO.widget.Node.prototype;Nproto.editable=false;Nproto.editNode=function(){this.tree._nodeEditing(this)};Nproto.fillEditorContainer=null;Nproto.destroyEditorContents=function(editorData){Event.purgeElement(editorData.inputContainer,true);editorData.inputContainer.innerHTML=''};Nproto.saveEditorValue=function(editorData){};var TNproto=YAHOO.widget.TextNode.prototype;TNproto.fillEditorContainer=function(editorData){var input;if(editorData.nodeType!=this._type){editorData.nodeType=this._type;editorData.saveOnEnter=true;editorData.node.destroyEditorContents(editorData);editorData.inputElement=input=editorData.inputContainer.appendChild(document.createElement('input'))}else{input=editorData.inputElement}input.value=this.label;input.focus();input.select()};TNproto.saveEditorValue=function(editorData){var node=editorData.node,value=editorData.inputElement.value,validator=node.tree.validator;if(Lang.isFunction(validator)){value=validator(value,node.label,node);if(Lang.isUndefined(value)){return false}}node.label=value;node.getLabelEl().innerHTML=value};TNproto.destroyEditorContents=function(editorData){editorData.inputContainer.innerHTML=''}})();YAHOO.register("treeview",YAHOO.widget.TreeView,{version:"2.7.0",build:"1799"});/*
330 313 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
331 314 Code licensed under the BSD License:
332 315 http://developer.yahoo.net/yui/license.txt
... ... @@ -336,46 +319,1439 @@ version: 2.7.0
336 319 }K.register(X);}}this._menu=X;if(!W&&!P){if(G.inDocument(R)){X.render(R.parentNode);}else{this.on("appendTo",V);}}}}if(B){if(J){N=J.prototype.CSS_CLASS_NAME;}if(U&&J&&(U instanceof J)){X=U;W=true;S.call(this);}else{if(B&&U&&(U instanceof B)){X=U;W=true;X.cfg.queueProperty("visible",false);S.call(this);}else{if(J&&I.isArray(U)){X=new J(G.generateId(),{lazyload:P,itemdata:U});this._menu=X;this.on("appendTo",S);}else{if(I.isString(U)){O=G.get(U);if(O){if(J&&G.hasClass(O,N)||O.nodeName.toUpperCase()=="SELECT"){X=new J(U,{lazyload:P});S.call(this);}else{if(B){X=new B(U,{visible:false});S.call(this);}}}}else{if(U&&U.nodeName){if(J&&G.hasClass(U,N)||U.nodeName.toUpperCase()=="SELECT"){X=new J(U,{lazyload:P});S.call(this);}else{if(B){if(!U.id){G.generateId(U);}X=new B(U,{visible:false});S.call(this);}}}}}}}}},_setOnClick:function(N){if(this._onclickAttributeValue&&(this._onclickAttributeValue!=N)){this.removeListener("click",this._onclickAttributeValue.fn);this._onclickAttributeValue=null;}if(!this._onclickAttributeValue&&I.isObject(N)&&I.isFunction(N.fn)){this.on("click",N.fn,N.obj,N.scope);this._onclickAttributeValue=N;}},_isActivationKey:function(N){var S=this.get("type"),O=(S=="checkbox"||S=="radio")?this.CHECK_ACTIVATION_KEYS:this.ACTIVATION_KEYS,Q=O.length,R=false,P;if(Q>0){P=Q-1;do{if(N==O[P]){R=true;break;}}while(P--);}return R;},_isSplitButtonOptionKey:function(P){var O=(M.getCharCode(P)==40);var N=function(Q){M.preventDefault(Q);this.removeListener("keypress",N);};if(O){if(L.opera){this.on("keypress",N);}M.preventDefault(P);}return O;},_addListenersToForm:function(){var T=this.getForm(),S=YAHOO.widget.Button.onFormKeyPress,R,N,Q,P,O;if(T){M.on(T,"reset",this._onFormReset,null,this);M.on(T,"submit",this._onFormSubmit,null,this);N=this.get("srcelement");if(this.get("type")=="submit"||(N&&N.type=="submit")){Q=M.getListeners(T,"keypress");R=false;if(Q){P=Q.length;if(P>0){O=P-1;do{if(Q[O].fn==S){R=true;break;}}while(O--);}}if(!R){M.on(T,"keypress",S);}}}},_showMenu:function(R){if(YAHOO.widget.MenuManager){YAHOO.widget.MenuManager.hideVisible();}if(K){K.hideAll();}var N=this._menu,Q=this.get("menualignment"),P=this.get("focusmenu"),O;if(this._renderedMenu){N.cfg.setProperty("context",[this.get("element"),Q[0],Q[1]]);N.cfg.setProperty("preventcontextoverlap",true);N.cfg.setProperty("constraintoviewport",true);}else{N.cfg.queueProperty("context",[this.get("element"),Q[0],Q[1]]);N.cfg.queueProperty("preventcontextoverlap",true);N.cfg.queueProperty("constraintoviewport",true);}this.focus();if(J&&N&&(N instanceof J)){O=N.focus;N.focus=function(){};if(this._renderedMenu){N.cfg.setProperty("minscrollheight",this.get("menuminscrollheight"));N.cfg.setProperty("maxheight",this.get("menumaxheight"));}else{N.cfg.queueProperty("minscrollheight",this.get("menuminscrollheight"));N.cfg.queueProperty("maxheight",this.get("menumaxheight"));}N.show();N.focus=O;N.align();if(R.type=="mousedown"){M.stopPropagation(R);}if(P){N.focus();}}else{if(B&&N&&(N instanceof B)){if(!this._renderedMenu){N.render(this.get("element").parentNode);}N.show();N.align();}}},_hideMenu:function(){var N=this._menu;if(N){N.hide();}},_onMouseOver:function(O){var Q=this.get("type"),N,P;if(Q==="split"){N=this.get("element");P=(G.getX(N)+(N.offsetWidth-this.OPTION_AREA_WIDTH));this._nOptionRegionX=P;}if(!this._hasMouseEventHandlers){if(Q==="split"){this.on("mousemove",this._onMouseMove);}this.on("mouseout",this._onMouseOut);this._hasMouseEventHandlers=true;}this.addStateCSSClasses("hover");if(Q==="split"&&(M.getPageX(O)>P)){this.addStateCSSClasses("hoveroption");}if(this._activationButtonPressed){this.addStateCSSClasses("active");}if(this._bOptionPressed){this.addStateCSSClasses("activeoption");}if(this._activationButtonPressed||this._bOptionPressed){M.removeListener(document,"mouseup",this._onDocumentMouseUp);}},_onMouseMove:function(N){var O=this._nOptionRegionX;if(O){if(M.getPageX(N)>O){this.addStateCSSClasses("hoveroption");}else{this.removeStateCSSClasses("hoveroption");}}},_onMouseOut:function(N){var O=this.get("type");this.removeStateCSSClasses("hover");if(O!="menu"){this.removeStateCSSClasses("active");}if(this._activationButtonPressed||this._bOptionPressed){M.on(document,"mouseup",this._onDocumentMouseUp,null,this);}if(O==="split"&&(M.getPageX(N)>this._nOptionRegionX)){this.removeStateCSSClasses("hoveroption");}},_onDocumentMouseUp:function(P){this._activationButtonPressed=false;this._bOptionPressed=false;var Q=this.get("type"),N,O;if(Q=="menu"||Q=="split"){N=M.getTarget(P);O=this._menu.element;if(N!=O&&!G.isAncestor(O,N)){this.removeStateCSSClasses((Q=="menu"?"active":"activeoption"));this._hideMenu();}}M.removeListener(document,"mouseup",this._onDocumentMouseUp);},_onMouseDown:function(P){var Q,O=true;function N(){this._hideMenu();this.removeListener("mouseup",N);}if((P.which||P.button)==1){if(!this.hasFocus()){this.focus();}Q=this.get("type");if(Q=="split"){if(M.getPageX(P)>this._nOptionRegionX){this.fireEvent("option",P);O=false;}else{this.addStateCSSClasses("active");this._activationButtonPressed=true;}}else{if(Q=="menu"){if(this.isActive()){this._hideMenu();this._activationButtonPressed=false;}else{this._showMenu(P);this._activationButtonPressed=true;}}else{this.addStateCSSClasses("active");this._activationButtonPressed=true;}}if(Q=="split"||Q=="menu"){this._hideMenuTimer=I.later(250,this,this.on,["mouseup",N]);}}return O;},_onMouseUp:function(P){var Q=this.get("type"),N=this._hideMenuTimer,O=true;if(N){N.cancel();}if(Q=="checkbox"||Q=="radio"){this.set("checked",!(this.get("checked")));}this._activationButtonPressed=false;if(Q!="menu"){this.removeStateCSSClasses("active");}if(Q=="split"&&M.getPageX(P)>this._nOptionRegionX){O=false;}return O;},_onFocus:function(O){var N;this.addStateCSSClasses("focus");if(this._activationKeyPressed){this.addStateCSSClasses("active");}C=this;if(!this._hasKeyEventHandlers){N=this._button;M.on(N,"blur",this._onBlur,null,this);M.on(N,"keydown",this._onKeyDown,null,this);M.on(N,"keyup",this._onKeyUp,null,this);
337 320 this._hasKeyEventHandlers=true;}this.fireEvent("focus",O);},_onBlur:function(N){this.removeStateCSSClasses("focus");if(this.get("type")!="menu"){this.removeStateCSSClasses("active");}if(this._activationKeyPressed){M.on(document,"keyup",this._onDocumentKeyUp,null,this);}C=null;this.fireEvent("blur",N);},_onDocumentKeyUp:function(N){if(this._isActivationKey(M.getCharCode(N))){this._activationKeyPressed=false;M.removeListener(document,"keyup",this._onDocumentKeyUp);}},_onKeyDown:function(O){var N=this._menu;if(this.get("type")=="split"&&this._isSplitButtonOptionKey(O)){this.fireEvent("option",O);}else{if(this._isActivationKey(M.getCharCode(O))){if(this.get("type")=="menu"){this._showMenu(O);}else{this._activationKeyPressed=true;this.addStateCSSClasses("active");}}}if(N&&N.cfg.getProperty("visible")&&M.getCharCode(O)==27){N.hide();this.focus();}},_onKeyUp:function(N){var O;if(this._isActivationKey(M.getCharCode(N))){O=this.get("type");if(O=="checkbox"||O=="radio"){this.set("checked",!(this.get("checked")));}this._activationKeyPressed=false;if(this.get("type")!="menu"){this.removeStateCSSClasses("active");}}},_onClick:function(Q){var S=this.get("type"),N,R,O,P;switch(S){case"radio":case"checkbox":if(!this._hasDefaultTitle){if(this.get("checked")){N=(S=="radio")?this.RADIO_CHECKED_TITLE:this.CHECKBOX_CHECKED_TITLE;}else{N=(S=="radio")?this.RADIO_DEFAULT_TITLE:this.CHECKBOX_DEFAULT_TITLE;}this.set("title",N);}break;case"submit":if(Q.returnValue!==false){this.submitForm();}break;case"reset":R=this.getForm();if(R){R.reset();}break;case"menu":N=this._menu.cfg.getProperty("visible")?this.MENUBUTTON_MENU_VISIBLE_TITLE:this.MENUBUTTON_DEFAULT_TITLE;this.set("title",N);break;case"split":if(this._nOptionRegionX>0&&(M.getPageX(Q)>this._nOptionRegionX)){P=false;}else{this._hideMenu();O=this.get("srcelement");if(O&&O.type=="submit"&&Q.returnValue!==false){this.submitForm();}}N=this._menu.cfg.getProperty("visible")?this.SPLITBUTTON_OPTION_VISIBLE_TITLE:this.SPLITBUTTON_DEFAULT_TITLE;this.set("title",N);break;}return P;},_onDblClick:function(O){var N=true;if(this.get("type")=="split"&&M.getPageX(O)>this._nOptionRegionX){N=false;}return N;},_onAppendTo:function(N){I.later(0,this,this._addListenersToForm);},_onFormReset:function(O){var P=this.get("type"),N=this._menu;if(P=="checkbox"||P=="radio"){this.resetValue("checked");}if(J&&N&&(N instanceof J)){this.resetValue("selectedMenuItem");}},_onFormSubmit:function(N){this.createHiddenFields();},_onDocumentMouseDown:function(Q){var N=M.getTarget(Q),P=this.get("element"),O=this._menu.element;if(N!=P&&!G.isAncestor(P,N)&&N!=O&&!G.isAncestor(O,N)){this._hideMenu();M.removeListener(document,"mousedown",this._onDocumentMouseDown);}},_onOption:function(N){if(this.hasClass("yui-split-button-activeoption")){this._hideMenu();this._bOptionPressed=false;}else{this._showMenu(N);this._bOptionPressed=true;}},_onMenuShow:function(O){M.on(document,"mousedown",this._onDocumentMouseDown,null,this);var N,P;if(this.get("type")=="split"){N=this.SPLITBUTTON_OPTION_VISIBLE_TITLE;P="activeoption";}else{N=this.MENUBUTTON_MENU_VISIBLE_TITLE;P="active";}this.addStateCSSClasses(P);this.set("title",N);},_onMenuHide:function(P){var O=this._menu,N,Q;if(this.get("type")=="split"){N=this.SPLITBUTTON_DEFAULT_TITLE;Q="activeoption";}else{N=this.MENUBUTTON_DEFAULT_TITLE;Q="active";}this.removeStateCSSClasses(Q);this.set("title",N);if(this.get("type")=="split"){this._bOptionPressed=false;}},_onMenuKeyDown:function(P,O){var N=O[0];if(M.getCharCode(N)==27){this.focus();if(this.get("type")=="split"){this._bOptionPressed=false;}}},_onMenuRender:function(P){var S=this.get("element"),O=S.parentNode,N=this._menu,R=N.element,Q=N.srcElement;if(O!=R.parentNode){O.appendChild(R);}this._renderedMenu=true;if(Q&&Q.nodeName.toLowerCase()==="select"&&Q.value){this.set("selectedMenuItem",N.getItem(Q.selectedIndex));}},_onMenuClick:function(O,N){var Q=N[1],P;if(Q){this.set("selectedMenuItem",Q);P=this.get("srcelement");if(P&&P.type=="submit"){this.submitForm();}this._hideMenu();}},_onSelectedMenuItemChange:function(N){var O=N.prevValue,P=N.newValue;if(O){G.removeClass(O.element,"yui-button-selectedmenuitem");}if(P){G.addClass(P.element,"yui-button-selectedmenuitem");}},createButtonElement:function(N){var P=this.NODE_NAME,O=document.createElement(P);O.innerHTML="<"+P+' class="first-child">'+(N=="link"?"<a></a>":'<button type="button"></button>')+"</"+P+">";return O;},addStateCSSClasses:function(N){var O=this.get("type");if(I.isString(N)){if(N!="activeoption"&&N!="hoveroption"){this.addClass(this.CSS_CLASS_NAME+("-"+N));}this.addClass("yui-"+O+("-button-"+N));}},removeStateCSSClasses:function(N){var O=this.get("type");if(I.isString(N)){this.removeClass(this.CSS_CLASS_NAME+("-"+N));this.removeClass("yui-"+O+("-button-"+N));}},createHiddenFields:function(){this.removeHiddenFields();var V=this.getForm(),Z,O,S,X,Y,T,U,N,R,W,P,Q=false;if(V&&!this.get("disabled")){O=this.get("type");S=(O=="checkbox"||O=="radio");if((S&&this.get("checked"))||(E==this)){Z=F((S?O:"hidden"),this.get("name"),this.get("value"),this.get("checked"));if(Z){if(S){Z.style.display="none";}V.appendChild(Z);}}X=this._menu;if(J&&X&&(X instanceof J)){Y=this.get("selectedMenuItem");P=X.srcElement;Q=(P&&P.nodeName.toUpperCase()=="SELECT");if(Y){U=(Y.value===null||Y.value==="")?Y.cfg.getProperty("text"):Y.value;T=this.get("name");if(Q){W=P.name;}else{if(T){W=(T+"_options");}}if(U&&W){N=F("hidden",W,U);V.appendChild(N);}}else{if(Q){V.appendChild(P);}}}if(Z&&N){this._hiddenFields=[Z,N];}else{if(!Z&&N){this._hiddenFields=N;}else{if(Z&&!N){this._hiddenFields=Z;}}}R=this._hiddenFields;}return R;},removeHiddenFields:function(){var Q=this._hiddenFields,O,P;function N(R){if(G.inDocument(R)){R.parentNode.removeChild(R);}}if(Q){if(I.isArray(Q)){O=Q.length;if(O>0){P=O-1;do{N(Q[P]);}while(P--);}}else{N(Q);}this._hiddenFields=null;}},submitForm:function(){var Q=this.getForm(),P=this.get("srcelement"),O=false,N;if(Q){if(this.get("type")=="submit"||(P&&P.type=="submit")){E=this;
338 321 }if(L.ie){O=Q.fireEvent("onsubmit");}else{N=document.createEvent("HTMLEvents");N.initEvent("submit",true,true);O=Q.dispatchEvent(N);}if((L.ie||L.webkit)&&O){Q.submit();}}return O;},init:function(O,a){var Q=a.type=="link"?"a":"button",V=a.srcelement,Z=O.getElementsByTagName(Q)[0],X;if(!Z){X=O.getElementsByTagName("input")[0];if(X){Z=document.createElement("button");Z.setAttribute("type","button");X.parentNode.replaceChild(Z,X);}}this._button=Z;this._hasDefaultTitle=(a.title&&a.title.length>0);YAHOO.widget.Button.superclass.init.call(this,O,a);var T=this.get("id"),N=T+"-button";Z.id=N;var U,W;var d=function(e){return(e.htmlFor===T);};var S=function(){W.setAttribute((L.ie?"htmlFor":"for"),N);};if(V&&this.get("type")!="link"){U=G.getElementsBy(d,"label");if(I.isArray(U)&&U.length>0){W=U[0];}}D[T]=this;this.addClass(this.CSS_CLASS_NAME);this.addClass("yui-"+this.get("type")+"-button");M.on(this._button,"focus",this._onFocus,null,this);this.on("mouseover",this._onMouseOver);this.on("mousedown",this._onMouseDown);this.on("mouseup",this._onMouseUp);this.on("click",this._onClick);var Y=this.get("onclick");this.set("onclick",null);this.set("onclick",Y);this.on("dblclick",this._onDblClick);if(W){this.on("appendTo",S);}this.on("appendTo",this._onAppendTo);var c=this.get("container"),P=this.get("element"),b=G.inDocument(P),R;if(c){if(V&&V!=P){R=V.parentNode;if(R){R.removeChild(V);}}if(I.isString(c)){M.onContentReady(c,this.appendTo,c,this);}else{this.on("init",function(){I.later(0,this,this.appendTo,c);});}}else{if(!b&&V&&V!=P){R=V.parentNode;if(R){this.fireEvent("beforeAppendTo",{type:"beforeAppendTo",target:R});R.replaceChild(P,V);this.fireEvent("appendTo",{type:"appendTo",target:R});}}else{if(this.get("type")!="link"&&b&&V&&V==P){this._addListenersToForm();}}}this.fireEvent("init",{type:"init",target:this});},initAttributes:function(O){var N=O||{};YAHOO.widget.Button.superclass.initAttributes.call(this,N);this.setAttributeConfig("type",{value:(N.type||"push"),validator:I.isString,writeOnce:true,method:this._setType});this.setAttributeConfig("label",{value:N.label,validator:I.isString,method:this._setLabel});this.setAttributeConfig("value",{value:N.value});this.setAttributeConfig("name",{value:N.name,validator:I.isString});this.setAttributeConfig("tabindex",{value:N.tabindex,validator:I.isNumber,method:this._setTabIndex});this.configureAttribute("title",{value:N.title,validator:I.isString,method:this._setTitle});this.setAttributeConfig("disabled",{value:(N.disabled||false),validator:I.isBoolean,method:this._setDisabled});this.setAttributeConfig("href",{value:N.href,validator:I.isString,method:this._setHref});this.setAttributeConfig("target",{value:N.target,validator:I.isString,method:this._setTarget});this.setAttributeConfig("checked",{value:(N.checked||false),validator:I.isBoolean,method:this._setChecked});this.setAttributeConfig("container",{value:N.container,writeOnce:true});this.setAttributeConfig("srcelement",{value:N.srcelement,writeOnce:true});this.setAttributeConfig("menu",{value:null,method:this._setMenu,writeOnce:true});this.setAttributeConfig("lazyloadmenu",{value:(N.lazyloadmenu===false?false:true),validator:I.isBoolean,writeOnce:true});this.setAttributeConfig("menuclassname",{value:(N.menuclassname||"yui-button-menu"),validator:I.isString,method:this._setMenuClassName,writeOnce:true});this.setAttributeConfig("menuminscrollheight",{value:(N.menuminscrollheight||90),validator:I.isNumber});this.setAttributeConfig("menumaxheight",{value:(N.menumaxheight||0),validator:I.isNumber});this.setAttributeConfig("menualignment",{value:(N.menualignment||["tl","bl"]),validator:I.isArray});this.setAttributeConfig("selectedMenuItem",{value:null});this.setAttributeConfig("onclick",{value:N.onclick,method:this._setOnClick});this.setAttributeConfig("focusmenu",{value:(N.focusmenu===false?false:true),validator:I.isBoolean});},focus:function(){if(!this.get("disabled")){this._button.focus();}},blur:function(){if(!this.get("disabled")){this._button.blur();}},hasFocus:function(){return(C==this);},isActive:function(){return this.hasClass(this.CSS_CLASS_NAME+"-active");},getMenu:function(){return this._menu;},getForm:function(){var N=this._button,O;if(N){O=N.form;}return O;},getHiddenFields:function(){return this._hiddenFields;},destroy:function(){var P=this.get("element"),O=P.parentNode,N=this._menu,R;if(N){if(K&&K.find(N)){K.remove(N);}N.destroy();}M.purgeElement(P);M.purgeElement(this._button);M.removeListener(document,"mouseup",this._onDocumentMouseUp);M.removeListener(document,"keyup",this._onDocumentKeyUp);M.removeListener(document,"mousedown",this._onDocumentMouseDown);var Q=this.getForm();if(Q){M.removeListener(Q,"reset",this._onFormReset);M.removeListener(Q,"submit",this._onFormSubmit);}this.unsubscribeAll();if(O){O.removeChild(P);}delete D[this.get("id")];R=G.getElementsByClassName(this.CSS_CLASS_NAME,this.NODE_NAME,Q);if(I.isArray(R)&&R.length===0){M.removeListener(Q,"keypress",YAHOO.widget.Button.onFormKeyPress);}},fireEvent:function(O,N){var P=arguments[0];if(this.DOM_EVENTS[P]&&this.get("disabled")){return false;}return YAHOO.widget.Button.superclass.fireEvent.apply(this,arguments);},toString:function(){return("Button "+this.get("id"));}});YAHOO.widget.Button.onFormKeyPress=function(R){var P=M.getTarget(R),S=M.getCharCode(R),Q=P.nodeName&&P.nodeName.toUpperCase(),N=P.type,T=false,V,X,O,W;function U(a){var Z,Y;switch(a.nodeName.toUpperCase()){case"INPUT":case"BUTTON":if(a.type=="submit"&&!a.disabled){if(!T&&!O){O=a;}}break;default:Z=a.id;if(Z){V=D[Z];if(V){T=true;if(!V.get("disabled")){Y=V.get("srcelement");if(!X&&(V.get("type")=="submit"||(Y&&Y.type=="submit"))){X=V;}}}}break;}}if(S==13&&((Q=="INPUT"&&(N=="text"||N=="password"||N=="checkbox"||N=="radio"||N=="file"))||Q=="SELECT")){G.getElementsBy(U,"*",this);if(O){O.focus();}else{if(!O&&X){M.preventDefault(R);if(L.ie){X.get("element").fireEvent("onclick");}else{W=document.createEvent("HTMLEvents");W.initEvent("click",true,true);if(L.gecko<1.9){X.fireEvent("click",W);
339   -}else{X.get("element").dispatchEvent(W);}}}}}};YAHOO.widget.Button.addHiddenFieldsToForm=function(N){var S=G.getElementsByClassName(YAHOO.widget.Button.prototype.CSS_CLASS_NAME,"*",N),Q=S.length,R,O,P;if(Q>0){for(P=0;P<Q;P++){O=S[P].id;if(O){R=D[O];if(R){R.createHiddenFields();}}}}};YAHOO.widget.Button.getButton=function(N){return D[N];};})();(function(){var C=YAHOO.util.Dom,B=YAHOO.util.Event,D=YAHOO.lang,A=YAHOO.widget.Button,E={};YAHOO.widget.ButtonGroup=function(J,H){var I=YAHOO.widget.ButtonGroup.superclass.constructor,K,G,F;if(arguments.length==1&&!D.isString(J)&&!J.nodeName){if(!J.id){F=C.generateId();J.id=F;}I.call(this,(this._createGroupElement()),J);}else{if(D.isString(J)){G=C.get(J);if(G){if(G.nodeName.toUpperCase()==this.NODE_NAME){I.call(this,G,H);}}}else{K=J.nodeName.toUpperCase();if(K&&K==this.NODE_NAME){if(!J.id){J.id=C.generateId();}I.call(this,J,H);}}}};YAHOO.extend(YAHOO.widget.ButtonGroup,YAHOO.util.Element,{_buttons:null,NODE_NAME:"DIV",CSS_CLASS_NAME:"yui-buttongroup",_createGroupElement:function(){var F=document.createElement(this.NODE_NAME);return F;},_setDisabled:function(G){var H=this.getCount(),F;if(H>0){F=H-1;do{this._buttons[F].set("disabled",G);}while(F--);}},_onKeyDown:function(K){var G=B.getTarget(K),I=B.getCharCode(K),H=G.parentNode.parentNode.id,J=E[H],F=-1;if(I==37||I==38){F=(J.index===0)?(this._buttons.length-1):(J.index-1);}else{if(I==39||I==40){F=(J.index===(this._buttons.length-1))?0:(J.index+1);}}if(F>-1){this.check(F);this.getButton(F).focus();}},_onAppendTo:function(H){var I=this._buttons,G=I.length,F;for(F=0;F<G;F++){I[F].appendTo(this.get("element"));}},_onButtonCheckedChange:function(G,F){var I=G.newValue,H=this.get("checkedButton");if(I&&H!=F){if(H){H.set("checked",false,true);}this.set("checkedButton",F);this.set("value",F.get("value"));}else{if(H&&!H.set("checked")){H.set("checked",true,true);}}},init:function(I,H){this._buttons=[];YAHOO.widget.ButtonGroup.superclass.init.call(this,I,H);this.addClass(this.CSS_CLASS_NAME);var J=this.getElementsByClassName("yui-radio-button");if(J.length>0){this.addButtons(J);}function F(K){return(K.type=="radio");}J=C.getElementsBy(F,"input",this.get("element"));if(J.length>0){this.addButtons(J);}this.on("keydown",this._onKeyDown);this.on("appendTo",this._onAppendTo);var G=this.get("container");if(G){if(D.isString(G)){B.onContentReady(G,function(){this.appendTo(G);},null,this);}else{this.appendTo(G);}}},initAttributes:function(G){var F=G||{};YAHOO.widget.ButtonGroup.superclass.initAttributes.call(this,F);this.setAttributeConfig("name",{value:F.name,validator:D.isString});this.setAttributeConfig("disabled",{value:(F.disabled||false),validator:D.isBoolean,method:this._setDisabled});this.setAttributeConfig("value",{value:F.value});this.setAttributeConfig("container",{value:F.container,writeOnce:true});this.setAttributeConfig("checkedButton",{value:null});},addButton:function(J){var L,K,G,F,H,I;if(J instanceof A&&J.get("type")=="radio"){L=J;}else{if(!D.isString(J)&&!J.nodeName){J.type="radio";L=new A(J);}else{L=new A(J,{type:"radio"});}}if(L){F=this._buttons.length;H=L.get("name");I=this.get("name");L.index=F;this._buttons[F]=L;E[L.get("id")]=L;if(H!=I){L.set("name",I);}if(this.get("disabled")){L.set("disabled",true);}if(L.get("checked")){this.set("checkedButton",L);}K=L.get("element");G=this.get("element");if(K.parentNode!=G){G.appendChild(K);}L.on("checkedChange",this._onButtonCheckedChange,L,this);}return L;},addButtons:function(G){var H,I,J,F;if(D.isArray(G)){H=G.length;J=[];if(H>0){for(F=0;F<H;F++){I=this.addButton(G[F]);if(I){J[J.length]=I;}}}}return J;},removeButton:function(H){var I=this.getButton(H),G,F;if(I){this._buttons.splice(H,1);delete E[I.get("id")];I.removeListener("checkedChange",this._onButtonCheckedChange);I.destroy();G=this._buttons.length;if(G>0){F=this._buttons.length-1;do{this._buttons[F].index=F;}while(F--);}}},getButton:function(F){return this._buttons[F];},getButtons:function(){return this._buttons;},getCount:function(){return this._buttons.length;},focus:function(H){var I,G,F;if(D.isNumber(H)){I=this._buttons[H];if(I){I.focus();}}else{G=this.getCount();for(F=0;F<G;F++){I=this._buttons[F];if(!I.get("disabled")){I.focus();break;}}}},check:function(F){var G=this.getButton(F);if(G){G.set("checked",true);}},destroy:function(){var I=this._buttons.length,H=this.get("element"),F=H.parentNode,G;if(I>0){G=this._buttons.length-1;do{this._buttons[G].destroy();}while(G--);}B.purgeElement(H);F.removeChild(H);},toString:function(){return("ButtonGroup "+this.get("id"));}});})();YAHOO.register("button",YAHOO.widget.Button,{version:"2.7.0",build:"1799"});
340   -(function(){var M;YAHOO.widget.Carousel=function(n,m){YAHOO.widget.Carousel.superclass.constructor.call(this,n,m)};var Q=YAHOO.widget.Carousel,a=YAHOO.util.Dom,Y=YAHOO.util.Event,k=YAHOO.lang;M="Carousel";var P={},F="afterScroll",b="allItemsRemoved",X="beforeHide",I="beforePageChange",e="beforeScroll",U="beforeShow",B="blur",T="focus",W="hide",O="itemAdded",j="itemRemoved",C="itemSelected",K="loadItems",H="navigationStateChange",c="pageChange",G="render",R="show",V="startAutoPlay",l="stopAutoPlay",J="uiUpdate";function S(n,m){var o=document.createElement(n);m=m||{};if(m.className){a.addClass(o,m.className)}if(m.parent){m.parent.appendChild(o)}if(m.id){o.setAttribute("id",m.id)}if(m.content){if(m.content.nodeName){o.appendChild(m.content)}else{o.innerHTML=m.content}}return o}function Z(o,n,m){var q;if(!o){return 0}function p(t,s){var u;if(s=="marginRight"&&YAHOO.env.ua.webkit){u=parseInt(a.getStyle(t,"marginLeft"),10)}else{u=parseInt(a.getStyle(t,s),10)}return k.isNumber(u)?u:0}function r(t,s){var u;if(s=="marginRight"&&YAHOO.env.ua.webkit){u=parseFloat(a.getStyle(t,"marginLeft"))}else{u=parseFloat(a.getStyle(t,s))}return k.isNumber(u)?u:0}if(typeof m=="undefined"){m="int"}switch(n){case"height":q=o.offsetHeight;if(q>0){q+=p(o,"marginTop")+p(o,"marginBottom")}else{q=r(o,"height")+p(o,"marginTop")+p(o,"marginBottom")+p(o,"borderTopWidth")+p(o,"borderBottomWidth")+p(o,"paddingTop")+p(o,"paddingBottom")}break;case"width":q=o.offsetWidth;if(q>0){q+=p(o,"marginLeft")+p(o,"marginRight")}else{q=r(o,"width")+p(o,"marginLeft")+p(o,"marginRight")+p(o,"borderLeftWidth")+p(o,"borderRightWidth")+p(o,"paddingLeft")+p(o,"paddingRight")}break;default:if(m=="int"){q=p(o,n)}else{if(m=="float"){q=r(o,n)}else{q=a.getStyle(o,n)}}break}return q}function L(p){var o=this,q,n=0,m=false;if(o._itemsTable.numItems===0){return 0}if(typeof p=="undefined"){if(o._itemsTable.size>0){return o._itemsTable.size}}if(k.isUndefined(o._itemsTable.items[0])){return 0}q=a.get(o._itemsTable.items[0].id);if(typeof p=="undefined"){m=o.get("isVertical")}else{m=p=="height"}if(m){n=Z(q,"height")}else{n=Z(q,"width")}if(typeof p=="undefined"){o._itemsTable.size=n}return n}function D(n){var m=this.get("numVisible");return Math.floor(n/m)*m}function f(o){var n=0,m=0;n=L.call(this);m=n*o;if(this.get("isVertical")){m-=o}return m}function d(m,n){n.scrollPageBackward();Y.preventDefault(m)}function g(m,n){n.scrollPageForward();Y.preventDefault(m)}function i(r,n){var v=this,w=v.CLASSES,m,t=v._firstItem,o=v.get("isCircular"),s=v.get("numItems"),u=v.get("numVisible"),q=n,p=t+u-1;if(q>=0&&q<s){if(!k.isUndefined(v._itemsTable.items[q])){m=a.get(v._itemsTable.items[q].id);if(m){a.removeClass(m,w.SELECTED_ITEM)}}}if(k.isNumber(r)){r=parseInt(r,10);r=k.isNumber(r)?r:0}else{r=t}if(k.isUndefined(v._itemsTable.items[r])){r=D.call(v,r);v.scrollTo(r)}if(!k.isUndefined(v._itemsTable.items[r])){m=a.get(v._itemsTable.items[r].id);if(m){a.addClass(m,w.SELECTED_ITEM)}}if(r<t||r>p){r=D.call(v,r);v.scrollTo(r)}}function h(){var o=false,r=this,n=r.CLASSES,q,m,p;if(!r._hasRendered){return}m=r.get("navigation");p=r._firstItem+r.get("numVisible");if(m.prev){if(r.get("numItems")===0||r._firstItem===0){if(r.get("numItems")===0||!r.get("isCircular")){Y.removeListener(m.prev,"click",d);a.addClass(m.prev,n.FIRST_NAV_DISABLED);for(q=0;q<r._navBtns.prev.length;q++){r._navBtns.prev[q].setAttribute("disabled","true")}r._prevEnabled=false}else{o=!r._prevEnabled}}else{o=!r._prevEnabled}if(o){Y.on(m.prev,"click",d,r);a.removeClass(m.prev,n.FIRST_NAV_DISABLED);for(q=0;q<r._navBtns.prev.length;q++){r._navBtns.prev[q].removeAttribute("disabled")}r._prevEnabled=true}}o=false;if(m.next){if(p>=r.get("numItems")){if(!r.get("isCircular")){Y.removeListener(m.next,"click",g);a.addClass(m.next,n.DISABLED);for(q=0;q<r._navBtns.next.length;q++){r._navBtns.next[q].setAttribute("disabled","true")}r._nextEnabled=false}else{o=!r._nextEnabled}}else{o=!r._nextEnabled}if(o){Y.on(m.next,"click",g,r);a.removeClass(m.next,n.DISABLED);for(q=0;q<r._navBtns.next.length;q++){r._navBtns.next[q].removeAttribute("disabled")}r._nextEnabled=true}}r.fireEvent(H,{next:r._nextEnabled,prev:r._prevEnabled})}function N(o){var p=this,m,n;if(!p._hasRendered){return}n=p.get("numVisible");if(!k.isNumber(o)){o=Math.ceil(p.get("selectedItem")/n)}m=Math.ceil(p.get("numItems")/n);p._pages.num=m;p._pages.cur=o;if(m>p.CONFIG.MAX_PAGER_BUTTONS){p._updatePagerMenu()}else{p._updatePagerButtons()}}function A(n){var m=this;if(!k.isObject(n)){return}switch(n.ev){case O:m._syncUiForItemAdd(n);break;case j:m._syncUiForItemRemove(n);break;case K:m._syncUiForLazyLoading(n);break}m.fireEvent(J)}function E(p,n){var r=this,q=r.get("currentPage"),o,m=r.get("numVisible");o=parseInt(r._firstItem/m,10);if(o!=q){r.setAttributeConfig("currentPage",{value:o});r.fireEvent(c,o)}if(r.get("selectOnScroll")){if(r.get("selectedItem")!=r._selectedItem){r.set("selectedItem",r._selectedItem)}}clearTimeout(r._autoPlayTimer);delete r._autoPlayTimer;if(r.isAutoPlayOn()){r.startAutoPlay()}r.fireEvent(F,{first:r._firstItem,last:n},r)}Q.getById=function(m){return P[m]?P[m].object:false};YAHOO.extend(Q,YAHOO.util.Element,{_animObj:null,_carouselEl:null,_clipEl:null,_firstItem:0,_hasFocus:false,_hasRendered:false,_isAnimationInProgress:false,_isAutoPlayInProgress:false,_itemsTable:null,_navBtns:null,_navEl:null,_nextEnabled:true,_pages:null,_prevEnabled:true,_recomputeSize:true,CLASSES:{BUTTON:"yui-carousel-button",CAROUSEL:"yui-carousel",CAROUSEL_EL:"yui-carousel-element",CONTAINER:"yui-carousel-container",CONTENT:"yui-carousel-content",DISABLED:"yui-carousel-button-disabled",FIRST_NAV:" yui-carousel-first-button",FIRST_NAV_DISABLED:"yui-carousel-first-button-disabled",FIRST_PAGE:"yui-carousel-nav-first-page",FOCUSSED_BUTTON:"yui-carousel-button-focus",HORIZONTAL:"yui-carousel-horizontal",ITEM_LOADING:"yui-carousel-item-loading",MIN_WIDTH:"yui-carousel-min-width",NAVIGATION:"yui-carousel-nav",NEXT_NAV:" yui-carousel-next-button",NEXT_PAGE:"yui-carousel-next",NAV_CONTAINER:"yui-carousel-buttons",PAGE_FOCUS:"yui-carousel-nav-page-focus",PREV_PAGE:"yui-carousel-prev",SELECTED_ITEM:"yui-carousel-item-selected",SELECTED_NAV:"yui-carousel-nav-page-selected",VERTICAL:"yui-carousel-vertical",VERTICAL_CONTAINER:"yui-carousel-vertical-container",VISIBLE:"yui-carousel-visible"},CONFIG:{FIRST_VISIBLE:0,HORZ_MIN_WIDTH:180,MAX_PAGER_BUTTONS:5,VERT_MIN_WIDTH:99,NUM_VISIBLE:3},STRINGS:{ITEM_LOADING_CONTENT:"Loading",NEXT_BUTTON_TEXT:"Next Page",PAGER_PREFIX_TEXT:"Go to page ",PREVIOUS_BUTTON_TEXT:"Previous Page"},addItem:function(r,n){var s=this,p,q,m,o=s.get("numItems");if(!r){return false}if(k.isString(r)||r.nodeName){q=r.nodeName?r.innerHTML:r}else{if(k.isObject(r)){q=r.content}else{return false}}p=r.className||"";m=r.id?r.id:a.generateId();if(k.isUndefined(n)){s._itemsTable.items.push({item:q,className:p,id:m})}else{if(n<0||n>=o){return false}s._itemsTable.items.splice(n,0,{item:q,className:p,id:m})}s._itemsTable.numItems++;if(o<s._itemsTable.items.length){s.set("numItems",s._itemsTable.items.length)}s.fireEvent(O,{pos:n,ev:O});return true},addItems:function(m){var o,q,p=true;if(!k.isArray(m)){return false}for(o=0,q=m.length;o<q;o++){if(this.addItem(m[o][0],m[o][1])===false){p=false}}return p},blur:function(){this._carouselEl.blur();this.fireEvent(B)},clearItems:function(){var m=this,o=m.get("numItems");while(o>0){if(!m.removeItem(0)){}if(m._itemsTable.numItems===0){m.set("numItems",0);break}o--}m.fireEvent(b)},focus:function(){var v=this,q,r,s,p,u,w,n,o,m;if(!v._hasRendered){return}if(v.isAnimating()){return}m=v.get("selectedItem");w=v.get("numVisible");n=v.get("selectOnScroll");o=(m>=0)?v.getItem(m):null;q=v.get("firstVisible");u=q+w-1;s=(m<q||m>u);r=(o&&o.id)?a.get(o.id):null;p=v._itemsTable;if(!n&&s){r=(p&&p.items&&p.items[q])?a.get(p.items[q].id):null}if(r){try{r.focus()}catch(t){}}v.fireEvent(T)},hide:function(){var m=this;if(m.fireEvent(X)!==false){m.removeClass(m.CLASSES.VISIBLE);m.fireEvent(W)}},init:function(o,n){var p=this,m=o,q=false;if(!o){return}p._hasRendered=false;p._navBtns={prev:[],next:[]};p._pages={el:null,num:0,cur:0};p._itemsTable={loading:{},numItems:0,items:[],size:0};if(k.isString(o)){o=a.get(o)}else{if(!o.nodeName){return}}Q.superclass.init.call(p,o,n);if(o){if(!o.id){o.setAttribute("id",a.generateId())}q=p._parseCarousel(o);if(!q){p._createCarousel(m)}}else{o=p._createCarousel(m)}m=o.id;p.initEvents();if(q){p._parseCarouselItems()}if(!n||typeof n.isVertical=="undefined"){p.set("isVertical",false)}p._parseCarouselNavigation(o);p._navEl=p._setupCarouselNavigation();P[m]={object:p};p._loadItems()},initAttributes:function(m){var n=this;m=m||{};Q.superclass.initAttributes.call(n,m);n.setAttributeConfig("carouselEl",{validator:k.isString,value:m.carouselEl||"OL"});n.setAttributeConfig("carouselItemEl",{validator:k.isString,value:m.carouselItemEl||"LI"});n.setAttributeConfig("currentPage",{readOnly:true,value:0});n.setAttributeConfig("firstVisible",{method:n._setFirstVisible,validator:n._validateFirstVisible,value:m.firstVisible||n.CONFIG.FIRST_VISIBLE});n.setAttributeConfig("selectOnScroll",{validator:k.isBoolean,value:m.selectOnScroll||true});n.setAttributeConfig("numVisible",{method:n._setNumVisible,validator:n._validateNumVisible,value:m.numVisible||n.CONFIG.NUM_VISIBLE});n.setAttributeConfig("numItems",{method:n._setNumItems,validator:n._validateNumItems,value:n._itemsTable.numItems});n.setAttributeConfig("scrollIncrement",{validator:n._validateScrollIncrement,value:m.scrollIncrement||1});n.setAttributeConfig("selectedItem",{method:n._setSelectedItem,validator:k.isNumber,value:-1});n.setAttributeConfig("revealAmount",{method:n._setRevealAmount,validator:n._validateRevealAmount,value:m.revealAmount||0});n.setAttributeConfig("isCircular",{validator:k.isBoolean,value:m.isCircular||false});n.setAttributeConfig("isVertical",{method:n._setOrientation,validator:k.isBoolean,value:m.isVertical||false});n.setAttributeConfig("navigation",{method:n._setNavigation,validator:n._validateNavigation,value:m.navigation||{prev:null,next:null,page:null}});n.setAttributeConfig("animation",{validator:n._validateAnimation,value:m.animation||{speed:0,effect:null}});n.setAttributeConfig("autoPlay",{validator:k.isNumber,value:m.autoPlay||0});n.setAttributeConfig("autoPlayInterval",{validator:k.isNumber,value:m.autoPlayInterval||0})},initEvents:function(){var o=this,n=o.CLASSES,m;o.on("keydown",o._keyboardEventHandler);o.on(F,h);o.on(O,A);o.on(j,A);o.on(C,function(){if(o._hasFocus){o.focus()}});o.on(K,A);o.on(b,function(p){o.scrollTo(0);h.call(o);N.call(o)});o.on(c,N,o);o.on(G,function(p){o.set("selectedItem",o.get("firstVisible"));h.call(o,p);N.call(o,p);o._setClipContainerSize()});o.on("selectedItemChange",function(p){i.call(o,p.newValue,p.prevValue);if(p.newValue>=0){o._updateTabIndex(o.getElementForItem(p.newValue))}o.fireEvent(C,p.newValue)});o.on(J,function(p){h.call(o,p);N.call(o,p)});o.on("firstVisibleChange",function(p){if(!o.get("selectOnScroll")){if(p.newValue>=0){o._updateTabIndex(o.getElementForItem(p.newValue))}}});o.on("click",function(p){if(o.isAutoPlayOn()){o.stopAutoPlay()}o._itemClickHandler(p);o._pagerClickHandler(p)});Y.onFocus(o.get("element"),function(p,r){var q=Y.getTarget(p);if(q&&q.nodeName.toUpperCase()=="A"&&a.getAncestorByClassName(q,n.NAVIGATION)){if(m){a.removeClass(m,n.PAGE_FOCUS)}m=q.parentNode;a.addClass(m,n.PAGE_FOCUS)}else{if(m){a.removeClass(m,n.PAGE_FOCUS)}}r._hasFocus=true;r._updateNavButtons(Y.getTarget(p),true)},o);Y.onBlur(o.get("element"),function(p,q){q._hasFocus=false;q._updateNavButtons(Y.getTarget(p),false)},o)},isAnimating:function(){return this._isAnimationInProgress},isAutoPlayOn:function(){return this._isAutoPlayInProgress},getElementForItem:function(m){var n=this;if(m<0||m>=n.get("numItems")){return null}if(n._itemsTable.numItems>m){if(!k.isUndefined(n._itemsTable.items[m])){return a.get(n._itemsTable.items[m].id)}}return null},getElementForItems:function(){var o=this,n=[],m;for(m=0;m<o._itemsTable.numItems;m++){n.push(o.getElementForItem(m))}return n},getItem:function(m){var n=this;if(m<0||m>=n.get("numItems")){return null}if(n._itemsTable.numItems>m){if(!k.isUndefined(n._itemsTable.items[m])){return n._itemsTable.items[m]}}return null},getItems:function(m){return this._itemsTable.items},getItemPositionById:function(q){var o=this,m=0,p=o._itemsTable.numItems;while(m<p){if(!k.isUndefined(o._itemsTable.items[m])){if(o._itemsTable.items[m].id==q){return m}}m++}return-1},getVisibleItems:function(){var p=this,m=p.get("firstVisible"),q=m+p.get("numVisible"),o=[];while(m<q){o.push(p.getElementForItem(m));m++}return o},removeItem:function(n){var p=this,o,m=p.get("numItems");if(n<0||n>=m){return false}o=p._itemsTable.items.splice(n,1);if(o&&o.length==1){p._itemsTable.numItems--;p.set("numItems",m-1);p.fireEvent(j,{item:o[0],pos:n,ev:j});return true}return false},render:function(n){var o=this,m=o.CLASSES;o.addClass(m.CAROUSEL);if(!o._clipEl){o._clipEl=o._createCarouselClip();o._clipEl.appendChild(o._carouselEl)}if(n){o.appendChild(o._clipEl);o.appendTo(n)}else{if(!a.inDocument(o.get("element"))){return false}o.appendChild(o._clipEl)}if(o.get("isVertical")){o.addClass(m.VERTICAL)}else{o.addClass(m.HORIZONTAL)}if(o.get("numItems")<1){return false}o._refreshUi();return true},scrollBackward:function(){var m=this;m.scrollTo(m._firstItem-m.get("scrollIncrement"))},scrollForward:function(){var m=this;m.scrollTo(m._firstItem+m.get("scrollIncrement"))},scrollPageBackward:function(){var n=this,m=n._firstItem-n.get("numVisible");if(n.get("selectOnScroll")){n._selectedItem=n._getSelectedItem(m)}else{m=n._getValidIndex(m)}n.scrollTo(m)},scrollPageForward:function(){var n=this,m=n._firstItem+n.get("numVisible");if(n.get("selectOnScroll")){n._selectedItem=n._getSelectedItem(m)}else{m=n._getValidIndex(m)}n.scrollTo(m)},scrollTo:function(AB,n){var AA=this,m,r,p,z,x,w,u,v,q,t,o,s,y;if(k.isUndefined(AB)||AB==AA._firstItem||AA.isAnimating()){return}r=AA.get("animation");p=AA.get("isCircular");w=AA._firstItem;u=AA.get("numItems");v=AA.get("numVisible");t=AA.get("currentPage");y=function(){if(AA.isAutoPlayOn()){AA.stopAutoPlay()}};if(AB<0){if(p){AB=u+AB}else{y.call(AA);return}}else{if(u>0&&AB>u-1){if(AA.get("isCircular")){AB=u-AB}else{y.call(AA);return}}}x=(AA._firstItem>AB)?"backward":"forward";s=w+v;s=(s>u-1)?u-1:s;o=AA.fireEvent(e,{dir:x,first:w,last:s});if(o===false){return}AA.fireEvent(I,{page:t});z=w-AB;AA._firstItem=AB;AA.set("firstVisible",AB);AA._loadItems();s=AB+v;s=(s>u-1)?u-1:s;q=f.call(AA,z);m=r.speed>0;if(m){AA._animateAndSetCarouselOffset(q,AB,s,n)}else{AA._setCarouselOffset(q);E.call(AA,AB,s)}},selectPreviousItem:function(){var o=this,n=0,m=o.get("selectedItem");if(m==this._firstItem){n=m-o.get("numVisible");o._selectedItem=o._getSelectedItem(m-1);o.scrollTo(n)}else{n=o.get("selectedItem")-o.get("scrollIncrement");o.set("selectedItem",o._getSelectedItem(n))}},selectNextItem:function(){var n=this,m=0;m=n.get("selectedItem")+n.get("scrollIncrement");n.set("selectedItem",n._getSelectedItem(m))},show:function(){var n=this,m=n.CLASSES;if(n.fireEvent(U)!==false){n.addClass(m.VISIBLE);n.fireEvent(R)}},startAutoPlay:function(){var m=this,n;if(k.isUndefined(m._autoPlayTimer)){n=m.get("autoPlayInterval");if(n<=0){return}m._isAutoPlayInProgress=true;m.fireEvent(V);m._autoPlayTimer=setTimeout(function(){m._autoScroll()},n)}},stopAutoPlay:function(){var m=this;if(!k.isUndefined(m._autoPlayTimer)){clearTimeout(m._autoPlayTimer);delete m._autoPlayTimer;m._isAutoPlayInProgress=false;m.fireEvent(l)}},toString:function(){return M+(this.get?" (#"+this.get("id")+")":"")},_animateAndSetCarouselOffset:function(r,p,n){var q=this,o=q.get("animation"),m=null;if(q.get("isVertical")){m=new YAHOO.util.Motion(q._carouselEl,{points:{by:[0,r]}},o.speed,o.effect)}else{m=new YAHOO.util.Motion(q._carouselEl,{points:{by:[r,0]}},o.speed,o.effect)}q._isAnimationInProgress=true;m.onComplete.subscribe(q._animationCompleteHandler,{scope:q,item:p,last:n});m.animate()},_animationCompleteHandler:function(m,n,q){q.scope._isAnimationInProgress=false;E.call(q.scope,q.item,q.last)},_autoScroll:function(){var n=this,o=n._firstItem,m;if(o>=n.get("numItems")-1){if(n.get("isCircular")){m=0}else{n.stopAutoPlay()}}else{m=o+n.get("numVisible")}n._selectedItem=n._getSelectedItem(m);n.scrollTo.call(n,m)},_createCarousel:function(n){var p=this,m=p.CLASSES,o=a.get(n);if(!o){o=S("DIV",{className:m.CAROUSEL,id:n})}if(!p._carouselEl){p._carouselEl=S(p.get("carouselEl"),{className:m.CAROUSEL_EL})}return o},_createCarouselClip:function(){return S("DIV",{className:this.CLASSES.CONTENT})},_createCarouselItem:function(m){return S(this.get("carouselItemEl"),{className:m.className,content:m.content,id:m.id})},_getValidIndex:function(o){var q=this,m=q.get("isCircular"),p=q.get("numItems"),n=p-1;if(o<0){o=m?p+o:0}else{if(o>n){o=m?o-p:n}}return o},_getSelectedItem:function(q){var p=this,m=p.get("isCircular"),o=p.get("numItems"),n=o-1;if(q<0){if(m){q=o+q}else{q=p.get("selectedItem")}}else{if(q>n){if(m){q=q-o}else{q=p.get("selectedItem")}}}return q},_itemClickHandler:function(p){var r=this,m=r.get("element"),n,o,q=YAHOO.util.Event.getTarget(p);while(q&&q!=m&&q.id!=r._carouselEl){n=q.nodeName;if(n.toUpperCase()==r.get("carouselItemEl")){break}q=q.parentNode}if((o=r.getItemPositionById(q.id))>=0){r.set("selectedItem",r._getSelectedItem(o));r.focus()}},_keyboardEventHandler:function(o){var p=this,n=Y.getCharCode(o),m=false;if(p.isAnimating()){return}switch(n){case 37:case 38:p.selectPreviousItem();m=true;break;case 39:case 40:p.selectNextItem();m=true;break;case 33:p.scrollPageBackward();m=true;break;case 34:p.scrollPageForward();m=true;break}if(m){if(p.isAutoPlayOn()){p.stopAutoPlay()}Y.preventDefault(o)}},_loadItems:function(){var q=this,r=q.get("firstVisible"),n=0,m=q.get("numItems"),o=q.get("numVisible"),p=q.get("revealAmount");n=r+o-1+(p?1:0);n=n>m-1?m-1:n;if(!q.getItem(r)||!q.getItem(n)){q.fireEvent(K,{ev:K,first:r,last:n,num:n-r})}},_pagerClickHandler:function(n){var p=this,r,o=Y.getTarget(n),q;function m(t){var s=p.get("carouselItemEl");if(t.nodeName.toUpperCase()==s.toUpperCase()){t=a.getChildrenBy(t,function(u){return u.href||u.value});if(t&&t[0]){return t[0]}}else{if(t.href||t.value){return t}}return null}if(o){o=m(o);if(!o){return}q=o.href||o.value;if(k.isString(q)&&q){r=q.lastIndexOf("#");if(r!=-1){q=p.getItemPositionById(q.substring(r+1));p._selectedItem=q;p.scrollTo(q);if(!o.value){p.focus()}Y.preventDefault(n)}}}},_parseCarousel:function(o){var r=this,s,m,n,q,p;m=r.CLASSES;n=r.get("carouselEl");q=false;for(s=o.firstChild;s;s=s.nextSibling){if(s.nodeType==1){p=s.nodeName;if(p.toUpperCase()==n){r._carouselEl=s;a.addClass(r._carouselEl,r.CLASSES.CAROUSEL_EL);q=true}}}return q},_parseCarouselItems:function(){var q=this,r,m,n,p,o=q._carouselEl;m=q.get("carouselItemEl");for(r=o.firstChild;r;r=r.nextSibling){if(r.nodeType==1){p=r.nodeName;if(p.toUpperCase()==m){if(r.id){n=r.id}else{n=a.generateId();r.setAttribute("id",n)}q.addItem(r)}}}},_parseCarouselNavigation:function(s){var t=this,r,u=t.CLASSES,n,q,p,m,o=false;m=a.getElementsByClassName(u.PREV_PAGE,"*",s);if(m.length>0){for(q in m){if(m.hasOwnProperty(q)){n=m[q];if(n.nodeName=="INPUT"||n.nodeName=="BUTTON"){t._navBtns.prev.push(n)}else{p=n.getElementsByTagName("INPUT");if(k.isArray(p)&&p.length>0){t._navBtns.prev.push(p[0])}else{p=n.getElementsByTagName("BUTTON");if(k.isArray(p)&&p.length>0){t._navBtns.prev.push(p[0])}}}}}r={prev:m}}m=a.getElementsByClassName(u.NEXT_PAGE,"*",s);if(m.length>0){for(q in m){if(m.hasOwnProperty(q)){n=m[q];if(n.nodeName=="INPUT"||n.nodeName=="BUTTON"){t._navBtns.next.push(n)}else{p=n.getElementsByTagName("INPUT");if(k.isArray(p)&&p.length>0){t._navBtns.next.push(p[0])}else{p=n.getElementsByTagName("BUTTON");if(k.isArray(p)&&p.length>0){t._navBtns.next.push(p[0])}}}}}if(r){r.next=m}else{r={next:m}}}if(r){t.set("navigation",r);o=true}return o},_refreshUi:function(){var m=this;m._hasRendered=true;m.fireEvent(G)},_setCarouselOffset:function(o){var m=this,n;n=m.get("isVertical")?"top":"left";o+=o!==0?Z(m._carouselEl,n):0;a.setStyle(m._carouselEl,n,o+"px")},_setupCarouselNavigation:function(){var r=this,p,n,m,t,q,s,o;m=r.CLASSES;q=a.getElementsByClassName(m.NAVIGATION,"DIV",r.get("element"));if(q.length===0){q=S("DIV",{className:m.NAVIGATION});r.insertBefore(q,a.getFirstChild(r.get("element")))}else{q=q[0]}r._pages.el=S("UL");q.appendChild(r._pages.el);t=r.get("navigation");if(k.isString(t.prev)||k.isArray(t.prev)){if(k.isString(t.prev)){t.prev=[t.prev]}for(p in t.prev){if(t.prev.hasOwnProperty(p)){r._navBtns.prev.push(a.get(t.prev[p]))}}}else{o=S("SPAN",{className:m.BUTTON+m.FIRST_NAV});a.setStyle(o,"visibility","visible");p=a.generateId();o.innerHTML='<button type="button" '+'id="'+p+'" name="'+r.STRINGS.PREVIOUS_BUTTON_TEXT+'">'+r.STRINGS.PREVIOUS_BUTTON_TEXT+"</button>";q.appendChild(o);p=a.get(p);r._navBtns.prev=[p];n={prev:[o]}}if(k.isString(t.next)||k.isArray(t.next)){if(k.isString(t.next)){t.next=[t.next]}for(p in t.next){if(t.next.hasOwnProperty(p)){r._navBtns.next.push(a.get(t.next[p]))}}}else{s=S("SPAN",{className:m.BUTTON+m.NEXT_NAV});a.setStyle(s,"visibility","visible");p=a.generateId();s.innerHTML='<button type="button" '+'id="'+p+'" name="'+r.STRINGS.NEXT_BUTTON_TEXT+'">'+r.STRINGS.NEXT_BUTTON_TEXT+"</button>";q.appendChild(s);p=a.get(p);r._navBtns.next=[p];if(n){n.next=[s]}else{n={next:[s]}}}if(n){r.set("navigation",n)}return q},_setClipContainerSize:function(n,p){var u=this,q,m,r,s,t,v,o;r=u.get("isVertical");t=u.get("revealAmount");o=r?"height":"width";q=r?"top":"left";n=n||u._clipEl;if(!n){return}p=p||u.get("numVisible");s=L.call(u,o);v=s*p;u._recomputeSize=(v===0);if(u._recomputeSize){u._hasRendered=false;return}if(t>0){t=s*(t/100)*2;v+=t;m=parseFloat(a.getStyle(u._carouselEl,q));m=k.isNumber(m)?m:0;a.setStyle(u._carouselEl,q,m+(t/2)+"px")}if(r){v+=Z(u._carouselEl,"marginTop")+Z(u._carouselEl,"marginBottom")+Z(u._carouselEl,"paddingTop")+Z(u._carouselEl,"paddingBottom")+Z(u._carouselEl,"borderTopWidth")+Z(u._carouselEl,"borderBottomWidth");a.setStyle(n,o,(v-(p-1))+"px")}else{v+=Z(u._carouselEl,"marginLeft")+Z(u._carouselEl,"marginRight")+Z(u._carouselEl,"paddingLeft")+Z(u._carouselEl,"paddingRight")+Z(u._carouselEl,"borderLeftWidth")+Z(u._carouselEl,"borderRightWidth");a.setStyle(n,o,v+"px")}u._setContainerSize(n)},_setContainerSize:function(q,m){var r=this,o=r.CONFIG,n=r.CLASSES,s,p;s=r.get("isVertical");q=q||r._clipEl;m=m||(s?"height":"width");p=parseFloat(a.getStyle(q,m),10);p=k.isNumber(p)?p:0;if(s){p+=Z(r._carouselEl,"marginTop")+Z(r._carouselEl,"marginBottom")+Z(r._carouselEl,"paddingTop")+Z(r._carouselEl,"paddingBottom")+Z(r._carouselEl,"borderTopWidth")+Z(r._carouselEl,"borderBottomWidth")+Z(r._navEl,"height")}else{p+=Z(q,"marginLeft")+Z(q,"marginRight")+Z(q,"paddingLeft")+Z(q,"paddingRight")+Z(q,"borderLeftWidth")+Z(q,"borderRightWidth")}if(!s){if(p<o.HORZ_MIN_WIDTH){p=o.HORZ_MIN_WIDTH;r.addClass(n.MIN_WIDTH)}}r.setStyle(m,p+"px");if(s){p=L.call(r,"width");if(p<o.VERT_MIN_WIDTH){p=o.VERT_MIN_WIDTH;r.addClass(n.MIN_WIDTH)}r.setStyle("width",p+"px")}},_setFirstVisible:function(n){var m=this;if(n>=0&&n<m.get("numItems")){m.scrollTo(n)}else{n=m.get("firstVisible")}return n},_setNavigation:function(m){var n=this;if(m.prev){Y.on(m.prev,"click",d,n)}if(m.next){Y.on(m.next,"click",g,n)}},_setNumVisible:function(n){var m=this;m._setClipContainerSize(m._clipEl,n)},_setNumItems:function(o){var n=this,m=n._itemsTable.numItems;if(k.isArray(n._itemsTable.items)){if(n._itemsTable.items.length!=m){m=n._itemsTable.items.length;n._itemsTable.numItems=m}}if(o<m){while(m>o){n.removeItem(m-1);m--}}return o},_setOrientation:function(o){var n=this,m=n.CLASSES;if(o){n.replaceClass(m.HORIZONTAL,m.VERTICAL)}else{n.replaceClass(m.VERTICAL,m.HORIZONTAL)}n._itemsTable.size=0;return o},_setRevealAmount:function(n){var m=this;if(n>=0&&n<=100){n=parseInt(n,10);n=k.isNumber(n)?n:0;m._setClipContainerSize()}else{n=m.get("revealAmount")}return n},_setSelectedItem:function(m){this._selectedItem=m},_syncUiForItemAdd:function(p){var t=this,r=t._carouselEl,m,u,o=t._itemsTable,n,q,s;q=k.isUndefined(p.pos)?o.numItems-1:p.pos;if(!k.isUndefined(o.items[q])){u=o.items[q];if(u&&!k.isUndefined(u.id)){n=a.get(u.id)}}if(!n){m=t._createCarouselItem({className:u.className,content:u.item,id:u.id});if(k.isUndefined(p.pos)){if(!k.isUndefined(o.loading[q])){n=o.loading[q]}if(n){r.replaceChild(m,n);delete o.loading[q]}else{r.appendChild(m)}}else{if(!k.isUndefined(o.items[p.pos+1])){s=a.get(o.items[p.pos+1].id)}if(s){r.insertBefore(m,s)}else{}}}else{if(k.isUndefined(p.pos)){if(!a.isAncestor(t._carouselEl,n)){r.appendChild(n)}}else{if(!a.isAncestor(r,n)){if(!k.isUndefined(o.items[p.pos+1])){r.insertBefore(n,a.get(o.items[p.pos+1].id))}}}}if(!t._hasRendered){t._refreshUi()}if(t.get("selectedItem")<0){t.set("selectedItem",t.get("firstVisible"))}},_syncUiForItemRemove:function(r){var q=this,m=q._carouselEl,o,p,n,s;n=q.get("numItems");p=r.item;s=r.pos;if(p&&(o=a.get(p.id))){if(o&&a.isAncestor(m,o)){Y.purgeElement(o,true);m.removeChild(o)}if(q.get("selectedItem")==s){s=s>=n?n-1:s;q.set("selectedItem",s)}}else{}},_syncUiForLazyLoading:function(s){var r=this,n=r._carouselEl,q,o,m=r._itemsTable,p;for(o=s.first;o<=s.last;o++){q=r._createCarouselItem({className:r.CLASSES.ITEM_LOADING,content:r.STRINGS.ITEM_LOADING_CONTENT,id:a.generateId()});if(q){if(!k.isUndefined(m.items[s.last+1])){p=a.get(m.items[s.last+1].id);if(p){n.insertBefore(q,p)}else{}}else{n.appendChild(q)}}m.loading[o]=q}},_updateNavButtons:function(q,n){var o,m=this.CLASSES,r,p=q.parentNode;if(!p){return}r=p.parentNode;if(q.nodeName.toUpperCase()=="BUTTON"&&a.hasClass(p,m.BUTTON)){if(n){if(r){o=a.getChildren(r);if(o){a.removeClass(o,m.FOCUSSED_BUTTON)}}a.addClass(p,m.FOCUSSED_BUTTON)}else{a.removeClass(p,m.FOCUSSED_BUTTON)}}},_updatePagerButtons:function(){var v=this,t=v.CLASSES,u=v._pages.cur,m,s,q,w,o=v.get("numVisible"),r=v._pages.num,p=v._pages.el;if(r===0||!p){return}a.setStyle(p,"visibility","hidden");while(p.firstChild){p.removeChild(p.firstChild)}for(q=0;q<r;q++){if(k.isUndefined(v._itemsTable.items[q*o])){a.setStyle(p,"visibility","visible");break}w=v._itemsTable.items[q*o].id;m=document.createElement("LI");if(!m){a.setStyle(p,"visibility","visible");break}if(q===0){a.addClass(m,t.FIRST_PAGE)}if(q==u){a.addClass(m,t.SELECTED_NAV)}s='<a href="#'+w+'" tabindex="0"><em>'+v.STRINGS.PAGER_PREFIX_TEXT+" "+(q+1)+"</em></a>";m.innerHTML=s;p.appendChild(m)}a.setStyle(p,"visibility","visible")},_updatePagerMenu:function(){var u=this,t=u._pages.cur,o,r,v,p=u.get("numVisible"),s=u._pages.num,q=u._pages.el,m;if(s===0){return}m=document.createElement("SELECT");if(!m){return}a.setStyle(q,"visibility","hidden");while(q.firstChild){q.removeChild(q.firstChild)}for(r=0;r<s;r++){if(k.isUndefined(u._itemsTable.items[r*p])){a.setStyle(q,"visibility","visible");break}v=u._itemsTable.items[r*p].id;o=document.createElement("OPTION");if(!o){a.setStyle(q,"visibility","visible");break}o.value="#"+v;o.innerHTML=u.STRINGS.PAGER_PREFIX_TEXT+" "+(r+1);if(r==t){o.setAttribute("selected","selected")}m.appendChild(o)}o=document.createElement("FORM");if(!o){}else{o.appendChild(m);q.appendChild(o)}a.setStyle(q,"visibility","visible")},_updateTabIndex:function(m){var n=this;if(m){if(n._focusableItemEl){n._focusableItemEl.tabIndex=-1}n._focusableItemEl=m;m.tabIndex=0}},_validateAnimation:function(m){var n=true;if(k.isObject(m)){if(m.speed){n=n&&k.isNumber(m.speed)}if(m.effect){n=n&&k.isFunction(m.effect)}else{if(!k.isUndefined(YAHOO.util.Easing)){m.effect=YAHOO.util.Easing.easeOut}}}else{n=false}return n},_validateFirstVisible:function(o){var n=this,m=n.get("numItems");if(k.isNumber(o)){if(m===0&&o==m){return true}else{return(o>=0&&o<m)}}return false},_validateNavigation:function(m){var n;if(!k.isObject(m)){return false}if(m.prev){if(!k.isArray(m.prev)){return false}for(n in m.prev){if(m.prev.hasOwnProperty(n)){if(!k.isString(m.prev[n].nodeName)){return false}}}}if(m.next){if(!k.isArray(m.next)){return false}for(n in m.next){if(m.next.hasOwnProperty(n)){if(!k.isString(m.next[n].nodeName)){return false}}}}return true},_validateNumItems:function(m){return k.isNumber(m)&&(m>=0)},_validateNumVisible:function(m){var n=false;if(k.isNumber(m)){n=m>0&&m<=this.get("numItems")}return n},_validateRevealAmount:function(m){var n=false;if(k.isNumber(m)){n=m>=0&&m<100}return n},_validateScrollIncrement:function(m){var n=false;if(k.isNumber(m)){n=(m>0&&m<this.get("numItems"))}return n}})})();YAHOO.register("carousel",YAHOO.widget.Carousel,{version:"2.7.0",build:"1799"});
341   -/*
  322 +}else{X.get("element").dispatchEvent(W);}}}}}};YAHOO.widget.Button.addHiddenFieldsToForm=function(N){var S=G.getElementsByClassName(YAHOO.widget.Button.prototype.CSS_CLASS_NAME,"*",N),Q=S.length,R,O,P;if(Q>0){for(P=0;P<Q;P++){O=S[P].id;if(O){R=D[O];if(R){R.createHiddenFields();}}}}};YAHOO.widget.Button.getButton=function(N){return D[N];};})();(function(){var C=YAHOO.util.Dom,B=YAHOO.util.Event,D=YAHOO.lang,A=YAHOO.widget.Button,E={};YAHOO.widget.ButtonGroup=function(J,H){var I=YAHOO.widget.ButtonGroup.superclass.constructor,K,G,F;if(arguments.length==1&&!D.isString(J)&&!J.nodeName){if(!J.id){F=C.generateId();J.id=F;}I.call(this,(this._createGroupElement()),J);}else{if(D.isString(J)){G=C.get(J);if(G){if(G.nodeName.toUpperCase()==this.NODE_NAME){I.call(this,G,H);}}}else{K=J.nodeName.toUpperCase();if(K&&K==this.NODE_NAME){if(!J.id){J.id=C.generateId();}I.call(this,J,H);}}}};YAHOO.extend(YAHOO.widget.ButtonGroup,YAHOO.util.Element,{_buttons:null,NODE_NAME:"DIV",CSS_CLASS_NAME:"yui-buttongroup",_createGroupElement:function(){var F=document.createElement(this.NODE_NAME);return F;},_setDisabled:function(G){var H=this.getCount(),F;if(H>0){F=H-1;do{this._buttons[F].set("disabled",G);}while(F--);}},_onKeyDown:function(K){var G=B.getTarget(K),I=B.getCharCode(K),H=G.parentNode.parentNode.id,J=E[H],F=-1;if(I==37||I==38){F=(J.index===0)?(this._buttons.length-1):(J.index-1);}else{if(I==39||I==40){F=(J.index===(this._buttons.length-1))?0:(J.index+1);}}if(F>-1){this.check(F);this.getButton(F).focus();}},_onAppendTo:function(H){var I=this._buttons,G=I.length,F;for(F=0;F<G;F++){I[F].appendTo(this.get("element"));}},_onButtonCheckedChange:function(G,F){var I=G.newValue,H=this.get("checkedButton");if(I&&H!=F){if(H){H.set("checked",false,true);}this.set("checkedButton",F);this.set("value",F.get("value"));}else{if(H&&!H.set("checked")){H.set("checked",true,true);}}},init:function(I,H){this._buttons=[];YAHOO.widget.ButtonGroup.superclass.init.call(this,I,H);this.addClass(this.CSS_CLASS_NAME);var J=this.getElementsByClassName("yui-radio-button");if(J.length>0){this.addButtons(J);}function F(K){return(K.type=="radio");}J=C.getElementsBy(F,"input",this.get("element"));if(J.length>0){this.addButtons(J);}this.on("keydown",this._onKeyDown);this.on("appendTo",this._onAppendTo);var G=this.get("container");if(G){if(D.isString(G)){B.onContentReady(G,function(){this.appendTo(G);},null,this);}else{this.appendTo(G);}}},initAttributes:function(G){var F=G||{};YAHOO.widget.ButtonGroup.superclass.initAttributes.call(this,F);this.setAttributeConfig("name",{value:F.name,validator:D.isString});this.setAttributeConfig("disabled",{value:(F.disabled||false),validator:D.isBoolean,method:this._setDisabled});this.setAttributeConfig("value",{value:F.value});this.setAttributeConfig("container",{value:F.container,writeOnce:true});this.setAttributeConfig("checkedButton",{value:null});},addButton:function(J){var L,K,G,F,H,I;if(J instanceof A&&J.get("type")=="radio"){L=J;}else{if(!D.isString(J)&&!J.nodeName){J.type="radio";L=new A(J);}else{L=new A(J,{type:"radio"});}}if(L){F=this._buttons.length;H=L.get("name");I=this.get("name");L.index=F;this._buttons[F]=L;E[L.get("id")]=L;if(H!=I){L.set("name",I);}if(this.get("disabled")){L.set("disabled",true);}if(L.get("checked")){this.set("checkedButton",L);}K=L.get("element");G=this.get("element");if(K.parentNode!=G){G.appendChild(K);}L.on("checkedChange",this._onButtonCheckedChange,L,this);}return L;},addButtons:function(G){var H,I,J,F;if(D.isArray(G)){H=G.length;J=[];if(H>0){for(F=0;F<H;F++){I=this.addButton(G[F]);if(I){J[J.length]=I;}}}}return J;},removeButton:function(H){var I=this.getButton(H),G,F;if(I){this._buttons.splice(H,1);delete E[I.get("id")];I.removeListener("checkedChange",this._onButtonCheckedChange);I.destroy();G=this._buttons.length;if(G>0){F=this._buttons.length-1;do{this._buttons[F].index=F;}while(F--);}}},getButton:function(F){return this._buttons[F];},getButtons:function(){return this._buttons;},getCount:function(){return this._buttons.length;},focus:function(H){var I,G,F;if(D.isNumber(H)){I=this._buttons[H];if(I){I.focus();}}else{G=this.getCount();for(F=0;F<G;F++){I=this._buttons[F];if(!I.get("disabled")){I.focus();break;}}}},check:function(F){var G=this.getButton(F);if(G){G.set("checked",true);}},destroy:function(){var I=this._buttons.length,H=this.get("element"),F=H.parentNode,G;if(I>0){G=this._buttons.length-1;do{this._buttons[G].destroy();}while(G--);}B.purgeElement(H);F.removeChild(H);},toString:function(){return("ButtonGroup "+this.get("id"));}});})();YAHOO.register("button",YAHOO.widget.Button,{version:"2.7.0",build:"1799"});(function(){var M;YAHOO.widget.Carousel=function(n,m){YAHOO.widget.Carousel.superclass.constructor.call(this,n,m)};var Q=YAHOO.widget.Carousel,a=YAHOO.util.Dom,Y=YAHOO.util.Event,k=YAHOO.lang;M="Carousel";var P={},F="afterScroll",b="allItemsRemoved",X="beforeHide",I="beforePageChange",e="beforeScroll",U="beforeShow",B="blur",T="focus",W="hide",O="itemAdded",j="itemRemoved",C="itemSelected",K="loadItems",H="navigationStateChange",c="pageChange",G="render",R="show",V="startAutoPlay",l="stopAutoPlay",J="uiUpdate";function S(n,m){var o=document.createElement(n);m=m||{};if(m.className){a.addClass(o,m.className)}if(m.parent){m.parent.appendChild(o)}if(m.id){o.setAttribute("id",m.id)}if(m.content){if(m.content.nodeName){o.appendChild(m.content)}else{o.innerHTML=m.content}}return o}function Z(o,n,m){var q;if(!o){return 0}function p(t,s){var u;if(s=="marginRight"&&YAHOO.env.ua.webkit){u=parseInt(a.getStyle(t,"marginLeft"),10)}else{u=parseInt(a.getStyle(t,s),10)}return k.isNumber(u)?u:0}function r(t,s){var u;if(s=="marginRight"&&YAHOO.env.ua.webkit){u=parseFloat(a.getStyle(t,"marginLeft"))}else{u=parseFloat(a.getStyle(t,s))}return k.isNumber(u)?u:0}if(typeof m=="undefined"){m="int"}switch(n){case"height":q=o.offsetHeight;if(q>0){q+=p(o,"marginTop")+p(o,"marginBottom")}else{q=r(o,"height")+p(o,"marginTop")+p(o,"marginBottom")+p(o,"borderTopWidth")+p(o,"borderBottomWidth")+p(o,"paddingTop")+p(o,"paddingBottom")}break;case"width":q=o.offsetWidth;if(q>0){q+=p(o,"marginLeft")+p(o,"marginRight")}else{q=r(o,"width")+p(o,"marginLeft")+p(o,"marginRight")+p(o,"borderLeftWidth")+p(o,"borderRightWidth")+p(o,"paddingLeft")+p(o,"paddingRight")}break;default:if(m=="int"){q=p(o,n)}else{if(m=="float"){q=r(o,n)}else{q=a.getStyle(o,n)}}break}return q}function L(p){var o=this,q,n=0,m=false;if(o._itemsTable.numItems===0){return 0}if(typeof p=="undefined"){if(o._itemsTable.size>0){return o._itemsTable.size}}if(k.isUndefined(o._itemsTable.items[0])){return 0}q=a.get(o._itemsTable.items[0].id);if(typeof p=="undefined"){m=o.get("isVertical")}else{m=p=="height"}if(m){n=Z(q,"height")}else{n=Z(q,"width")}if(typeof p=="undefined"){o._itemsTable.size=n}return n}function D(n){var m=this.get("numVisible");return Math.floor(n/m)*m}function f(o){var n=0,m=0;n=L.call(this);m=n*o;if(this.get("isVertical")){m-=o}return m}function d(m,n){n.scrollPageBackward();Y.preventDefault(m)}function g(m,n){n.scrollPageForward();Y.preventDefault(m)}function i(r,n){var v=this,w=v.CLASSES,m,t=v._firstItem,o=v.get("isCircular"),s=v.get("numItems"),u=v.get("numVisible"),q=n,p=t+u-1;if(q>=0&&q<s){if(!k.isUndefined(v._itemsTable.items[q])){m=a.get(v._itemsTable.items[q].id);if(m){a.removeClass(m,w.SELECTED_ITEM)}}}if(k.isNumber(r)){r=parseInt(r,10);r=k.isNumber(r)?r:0}else{r=t}if(k.isUndefined(v._itemsTable.items[r])){r=D.call(v,r);v.scrollTo(r)}if(!k.isUndefined(v._itemsTable.items[r])){m=a.get(v._itemsTable.items[r].id);if(m){a.addClass(m,w.SELECTED_ITEM)}}if(r<t||r>p){r=D.call(v,r);v.scrollTo(r)}}function h(){var o=false,r=this,n=r.CLASSES,q,m,p;if(!r._hasRendered){return}m=r.get("navigation");p=r._firstItem+r.get("numVisible");if(m.prev){if(r.get("numItems")===0||r._firstItem===0){if(r.get("numItems")===0||!r.get("isCircular")){Y.removeListener(m.prev,"click",d);a.addClass(m.prev,n.FIRST_NAV_DISABLED);for(q=0;q<r._navBtns.prev.length;q++){r._navBtns.prev[q].setAttribute("disabled","true")}r._prevEnabled=false}else{o=!r._prevEnabled}}else{o=!r._prevEnabled}if(o){Y.on(m.prev,"click",d,r);a.removeClass(m.prev,n.FIRST_NAV_DISABLED);for(q=0;q<r._navBtns.prev.length;q++){r._navBtns.prev[q].removeAttribute("disabled")}r._prevEnabled=true}}o=false;if(m.next){if(p>=r.get("numItems")){if(!r.get("isCircular")){Y.removeListener(m.next,"click",g);a.addClass(m.next,n.DISABLED);for(q=0;q<r._navBtns.next.length;q++){r._navBtns.next[q].setAttribute("disabled","true")}r._nextEnabled=false}else{o=!r._nextEnabled}}else{o=!r._nextEnabled}if(o){Y.on(m.next,"click",g,r);a.removeClass(m.next,n.DISABLED);for(q=0;q<r._navBtns.next.length;q++){r._navBtns.next[q].removeAttribute("disabled")}r._nextEnabled=true}}r.fireEvent(H,{next:r._nextEnabled,prev:r._prevEnabled})}function N(o){var p=this,m,n;if(!p._hasRendered){return}n=p.get("numVisible");if(!k.isNumber(o)){o=Math.ceil(p.get("selectedItem")/n)}m=Math.ceil(p.get("numItems")/n);p._pages.num=m;p._pages.cur=o;if(m>p.CONFIG.MAX_PAGER_BUTTONS){p._updatePagerMenu()}else{p._updatePagerButtons()}}function A(n){var m=this;if(!k.isObject(n)){return}switch(n.ev){case O:m._syncUiForItemAdd(n);break;case j:m._syncUiForItemRemove(n);break;case K:m._syncUiForLazyLoading(n);break}m.fireEvent(J)}function E(p,n){var r=this,q=r.get("currentPage"),o,m=r.get("numVisible");o=parseInt(r._firstItem/m,10);if(o!=q){r.setAttributeConfig("currentPage",{value:o});r.fireEvent(c,o)}if(r.get("selectOnScroll")){if(r.get("selectedItem")!=r._selectedItem){r.set("selectedItem",r._selectedItem)}}clearTimeout(r._autoPlayTimer);delete r._autoPlayTimer;if(r.isAutoPlayOn()){r.startAutoPlay()}r.fireEvent(F,{first:r._firstItem,last:n},r)}Q.getById=function(m){return P[m]?P[m].object:false};YAHOO.extend(Q,YAHOO.util.Element,{_animObj:null,_carouselEl:null,_clipEl:null,_firstItem:0,_hasFocus:false,_hasRendered:false,_isAnimationInProgress:false,_isAutoPlayInProgress:false,_itemsTable:null,_navBtns:null,_navEl:null,_nextEnabled:true,_pages:null,_prevEnabled:true,_recomputeSize:true,CLASSES:{BUTTON:"yui-carousel-button",CAROUSEL:"yui-carousel",CAROUSEL_EL:"yui-carousel-element",CONTAINER:"yui-carousel-container",CONTENT:"yui-carousel-content",DISABLED:"yui-carousel-button-disabled",FIRST_NAV:" yui-carousel-first-button",FIRST_NAV_DISABLED:"yui-carousel-first-button-disabled",FIRST_PAGE:"yui-carousel-nav-first-page",FOCUSSED_BUTTON:"yui-carousel-button-focus",HORIZONTAL:"yui-carousel-horizontal",ITEM_LOADING:"yui-carousel-item-loading",MIN_WIDTH:"yui-carousel-min-width",NAVIGATION:"yui-carousel-nav",NEXT_NAV:" yui-carousel-next-button",NEXT_PAGE:"yui-carousel-next",NAV_CONTAINER:"yui-carousel-buttons",PAGE_FOCUS:"yui-carousel-nav-page-focus",PREV_PAGE:"yui-carousel-prev",SELECTED_ITEM:"yui-carousel-item-selected",SELECTED_NAV:"yui-carousel-nav-page-selected",VERTICAL:"yui-carousel-vertical",VERTICAL_CONTAINER:"yui-carousel-vertical-container",VISIBLE:"yui-carousel-visible"},CONFIG:{FIRST_VISIBLE:0,HORZ_MIN_WIDTH:180,MAX_PAGER_BUTTONS:5,VERT_MIN_WIDTH:99,NUM_VISIBLE:3},STRINGS:{ITEM_LOADING_CONTENT:"Loading",NEXT_BUTTON_TEXT:"Next Page",PAGER_PREFIX_TEXT:"Go to page ",PREVIOUS_BUTTON_TEXT:"Previous Page"},addItem:function(r,n){var s=this,p,q,m,o=s.get("numItems");if(!r){return false}if(k.isString(r)||r.nodeName){q=r.nodeName?r.innerHTML:r}else{if(k.isObject(r)){q=r.content}else{return false}}p=r.className||"";m=r.id?r.id:a.generateId();if(k.isUndefined(n)){s._itemsTable.items.push({item:q,className:p,id:m})}else{if(n<0||n>=o){return false}s._itemsTable.items.splice(n,0,{item:q,className:p,id:m})}s._itemsTable.numItems++;if(o<s._itemsTable.items.length){s.set("numItems",s._itemsTable.items.length)}s.fireEvent(O,{pos:n,ev:O});return true},addItems:function(m){var o,q,p=true;if(!k.isArray(m)){return false}for(o=0,q=m.length;o<q;o++){if(this.addItem(m[o][0],m[o][1])===false){p=false}}return p},blur:function(){this._carouselEl.blur();this.fireEvent(B)},clearItems:function(){var m=this,o=m.get("numItems");while(o>0){if(!m.removeItem(0)){}if(m._itemsTable.numItems===0){m.set("numItems",0);break}o--}m.fireEvent(b)},focus:function(){var v=this,q,r,s,p,u,w,n,o,m;if(!v._hasRendered){return}if(v.isAnimating()){return}m=v.get("selectedItem");w=v.get("numVisible");n=v.get("selectOnScroll");o=(m>=0)?v.getItem(m):null;q=v.get("firstVisible");u=q+w-1;s=(m<q||m>u);r=(o&&o.id)?a.get(o.id):null;p=v._itemsTable;if(!n&&s){r=(p&&p.items&&p.items[q])?a.get(p.items[q].id):null}if(r){try{r.focus()}catch(t){}}v.fireEvent(T)},hide:function(){var m=this;if(m.fireEvent(X)!==false){m.removeClass(m.CLASSES.VISIBLE);m.fireEvent(W)}},init:function(o,n){var p=this,m=o,q=false;if(!o){return}p._hasRendered=false;p._navBtns={prev:[],next:[]};p._pages={el:null,num:0,cur:0};p._itemsTable={loading:{},numItems:0,items:[],size:0};if(k.isString(o)){o=a.get(o)}else{if(!o.nodeName){return}}Q.superclass.init.call(p,o,n);if(o){if(!o.id){o.setAttribute("id",a.generateId())}q=p._parseCarousel(o);if(!q){p._createCarousel(m)}}else{o=p._createCarousel(m)}m=o.id;p.initEvents();if(q){p._parseCarouselItems()}if(!n||typeof n.isVertical=="undefined"){p.set("isVertical",false)}p._parseCarouselNavigation(o);p._navEl=p._setupCarouselNavigation();P[m]={object:p};p._loadItems()},initAttributes:function(m){var n=this;m=m||{};Q.superclass.initAttributes.call(n,m);n.setAttributeConfig("carouselEl",{validator:k.isString,value:m.carouselEl||"OL"});n.setAttributeConfig("carouselItemEl",{validator:k.isString,value:m.carouselItemEl||"LI"});n.setAttributeConfig("currentPage",{readOnly:true,value:0});n.setAttributeConfig("firstVisible",{method:n._setFirstVisible,validator:n._validateFirstVisible,value:m.firstVisible||n.CONFIG.FIRST_VISIBLE});n.setAttributeConfig("selectOnScroll",{validator:k.isBoolean,value:m.selectOnScroll||true});n.setAttributeConfig("numVisible",{method:n._setNumVisible,validator:n._validateNumVisible,value:m.numVisible||n.CONFIG.NUM_VISIBLE});n.setAttributeConfig("numItems",{method:n._setNumItems,validator:n._validateNumItems,value:n._itemsTable.numItems});n.setAttributeConfig("scrollIncrement",{validator:n._validateScrollIncrement,value:m.scrollIncrement||1});n.setAttributeConfig("selectedItem",{method:n._setSelectedItem,validator:k.isNumber,value:-1});n.setAttributeConfig("revealAmount",{method:n._setRevealAmount,validator:n._validateRevealAmount,value:m.revealAmount||0});n.setAttributeConfig("isCircular",{validator:k.isBoolean,value:m.isCircular||false});n.setAttributeConfig("isVertical",{method:n._setOrientation,validator:k.isBoolean,value:m.isVertical||false});n.setAttributeConfig("navigation",{method:n._setNavigation,validator:n._validateNavigation,value:m.navigation||{prev:null,next:null,page:null}});n.setAttributeConfig("animation",{validator:n._validateAnimation,value:m.animation||{speed:0,effect:null}});n.setAttributeConfig("autoPlay",{validator:k.isNumber,value:m.autoPlay||0});n.setAttributeConfig("autoPlayInterval",{validator:k.isNumber,value:m.autoPlayInterval||0})},initEvents:function(){var o=this,n=o.CLASSES,m;o.on("keydown",o._keyboardEventHandler);o.on(F,h);o.on(O,A);o.on(j,A);o.on(C,function(){if(o._hasFocus){o.focus()}});o.on(K,A);o.on(b,function(p){o.scrollTo(0);h.call(o);N.call(o)});o.on(c,N,o);o.on(G,function(p){o.set("selectedItem",o.get("firstVisible"));h.call(o,p);N.call(o,p);o._setClipContainerSize()});o.on("selectedItemChange",function(p){i.call(o,p.newValue,p.prevValue);if(p.newValue>=0){o._updateTabIndex(o.getElementForItem(p.newValue))}o.fireEvent(C,p.newValue)});o.on(J,function(p){h.call(o,p);N.call(o,p)});o.on("firstVisibleChange",function(p){if(!o.get("selectOnScroll")){if(p.newValue>=0){o._updateTabIndex(o.getElementForItem(p.newValue))}}});o.on("click",function(p){if(o.isAutoPlayOn()){o.stopAutoPlay()}o._itemClickHandler(p);o._pagerClickHandler(p)});Y.onFocus(o.get("element"),function(p,r){var q=Y.getTarget(p);if(q&&q.nodeName.toUpperCase()=="A"&&a.getAncestorByClassName(q,n.NAVIGATION)){if(m){a.removeClass(m,n.PAGE_FOCUS)}m=q.parentNode;a.addClass(m,n.PAGE_FOCUS)}else{if(m){a.removeClass(m,n.PAGE_FOCUS)}}r._hasFocus=true;r._updateNavButtons(Y.getTarget(p),true)},o);Y.onBlur(o.get("element"),function(p,q){q._hasFocus=false;q._updateNavButtons(Y.getTarget(p),false)},o)},isAnimating:function(){return this._isAnimationInProgress},isAutoPlayOn:function(){return this._isAutoPlayInProgress},getElementForItem:function(m){var n=this;if(m<0||m>=n.get("numItems")){return null}if(n._itemsTable.numItems>m){if(!k.isUndefined(n._itemsTable.items[m])){return a.get(n._itemsTable.items[m].id)}}return null},getElementForItems:function(){var o=this,n=[],m;for(m=0;m<o._itemsTable.numItems;m++){n.push(o.getElementForItem(m))}return n},getItem:function(m){var n=this;if(m<0||m>=n.get("numItems")){return null}if(n._itemsTable.numItems>m){if(!k.isUndefined(n._itemsTable.items[m])){return n._itemsTable.items[m]}}return null},getItems:function(m){return this._itemsTable.items},getItemPositionById:function(q){var o=this,m=0,p=o._itemsTable.numItems;while(m<p){if(!k.isUndefined(o._itemsTable.items[m])){if(o._itemsTable.items[m].id==q){return m}}m++}return-1},getVisibleItems:function(){var p=this,m=p.get("firstVisible"),q=m+p.get("numVisible"),o=[];while(m<q){o.push(p.getElementForItem(m));m++}return o},removeItem:function(n){var p=this,o,m=p.get("numItems");if(n<0||n>=m){return false}o=p._itemsTable.items.splice(n,1);if(o&&o.length==1){p._itemsTable.numItems--;p.set("numItems",m-1);p.fireEvent(j,{item:o[0],pos:n,ev:j});return true}return false},render:function(n){var o=this,m=o.CLASSES;o.addClass(m.CAROUSEL);if(!o._clipEl){o._clipEl=o._createCarouselClip();o._clipEl.appendChild(o._carouselEl)}if(n){o.appendChild(o._clipEl);o.appendTo(n)}else{if(!a.inDocument(o.get("element"))){return false}o.appendChild(o._clipEl)}if(o.get("isVertical")){o.addClass(m.VERTICAL)}else{o.addClass(m.HORIZONTAL)}if(o.get("numItems")<1){return false}o._refreshUi();return true},scrollBackward:function(){var m=this;m.scrollTo(m._firstItem-m.get("scrollIncrement"))},scrollForward:function(){var m=this;m.scrollTo(m._firstItem+m.get("scrollIncrement"))},scrollPageBackward:function(){var n=this,m=n._firstItem-n.get("numVisible");if(n.get("selectOnScroll")){n._selectedItem=n._getSelectedItem(m)}else{m=n._getValidIndex(m)}n.scrollTo(m)},scrollPageForward:function(){var n=this,m=n._firstItem+n.get("numVisible");if(n.get("selectOnScroll")){n._selectedItem=n._getSelectedItem(m)}else{m=n._getValidIndex(m)}n.scrollTo(m)},scrollTo:function(AB,n){var AA=this,m,r,p,z,x,w,u,v,q,t,o,s,y;if(k.isUndefined(AB)||AB==AA._firstItem||AA.isAnimating()){return}r=AA.get("animation");p=AA.get("isCircular");w=AA._firstItem;u=AA.get("numItems");v=AA.get("numVisible");t=AA.get("currentPage");y=function(){if(AA.isAutoPlayOn()){AA.stopAutoPlay()}};if(AB<0){if(p){AB=u+AB}else{y.call(AA);return}}else{if(u>0&&AB>u-1){if(AA.get("isCircular")){AB=u-AB}else{y.call(AA);return}}}x=(AA._firstItem>AB)?"backward":"forward";s=w+v;s=(s>u-1)?u-1:s;o=AA.fireEvent(e,{dir:x,first:w,last:s});if(o===false){return}AA.fireEvent(I,{page:t});z=w-AB;AA._firstItem=AB;AA.set("firstVisible",AB);AA._loadItems();s=AB+v;s=(s>u-1)?u-1:s;q=f.call(AA,z);m=r.speed>0;if(m){AA._animateAndSetCarouselOffset(q,AB,s,n)}else{AA._setCarouselOffset(q);E.call(AA,AB,s)}},selectPreviousItem:function(){var o=this,n=0,m=o.get("selectedItem");if(m==this._firstItem){n=m-o.get("numVisible");o._selectedItem=o._getSelectedItem(m-1);o.scrollTo(n)}else{n=o.get("selectedItem")-o.get("scrollIncrement");o.set("selectedItem",o._getSelectedItem(n))}},selectNextItem:function(){var n=this,m=0;m=n.get("selectedItem")+n.get("scrollIncrement");n.set("selectedItem",n._getSelectedItem(m))},show:function(){var n=this,m=n.CLASSES;if(n.fireEvent(U)!==false){n.addClass(m.VISIBLE);n.fireEvent(R)}},startAutoPlay:function(){var m=this,n;if(k.isUndefined(m._autoPlayTimer)){n=m.get("autoPlayInterval");if(n<=0){return}m._isAutoPlayInProgress=true;m.fireEvent(V);m._autoPlayTimer=setTimeout(function(){m._autoScroll()},n)}},stopAutoPlay:function(){var m=this;if(!k.isUndefined(m._autoPlayTimer)){clearTimeout(m._autoPlayTimer);delete m._autoPlayTimer;m._isAutoPlayInProgress=false;m.fireEvent(l)}},toString:function(){return M+(this.get?" (#"+this.get("id")+")":"")},_animateAndSetCarouselOffset:function(r,p,n){var q=this,o=q.get("animation"),m=null;if(q.get("isVertical")){m=new YAHOO.util.Motion(q._carouselEl,{points:{by:[0,r]}},o.speed,o.effect)}else{m=new YAHOO.util.Motion(q._carouselEl,{points:{by:[r,0]}},o.speed,o.effect)}q._isAnimationInProgress=true;m.onComplete.subscribe(q._animationCompleteHandler,{scope:q,item:p,last:n});m.animate()},_animationCompleteHandler:function(m,n,q){q.scope._isAnimationInProgress=false;E.call(q.scope,q.item,q.last)},_autoScroll:function(){var n=this,o=n._firstItem,m;if(o>=n.get("numItems")-1){if(n.get("isCircular")){m=0}else{n.stopAutoPlay()}}else{m=o+n.get("numVisible")}n._selectedItem=n._getSelectedItem(m);n.scrollTo.call(n,m)},_createCarousel:function(n){var p=this,m=p.CLASSES,o=a.get(n);if(!o){o=S("DIV",{className:m.CAROUSEL,id:n})}if(!p._carouselEl){p._carouselEl=S(p.get("carouselEl"),{className:m.CAROUSEL_EL})}return o},_createCarouselClip:function(){return S("DIV",{className:this.CLASSES.CONTENT})},_createCarouselItem:function(m){return S(this.get("carouselItemEl"),{className:m.className,content:m.content,id:m.id})},_getValidIndex:function(o){var q=this,m=q.get("isCircular"),p=q.get("numItems"),n=p-1;if(o<0){o=m?p+o:0}else{if(o>n){o=m?o-p:n}}return o},_getSelectedItem:function(q){var p=this,m=p.get("isCircular"),o=p.get("numItems"),n=o-1;if(q<0){if(m){q=o+q}else{q=p.get("selectedItem")}}else{if(q>n){if(m){q=q-o}else{q=p.get("selectedItem")}}}return q},_itemClickHandler:function(p){var r=this,m=r.get("element"),n,o,q=YAHOO.util.Event.getTarget(p);while(q&&q!=m&&q.id!=r._carouselEl){n=q.nodeName;if(n.toUpperCase()==r.get("carouselItemEl")){break}q=q.parentNode}if((o=r.getItemPositionById(q.id))>=0){r.set("selectedItem",r._getSelectedItem(o));r.focus()}},_keyboardEventHandler:function(o){var p=this,n=Y.getCharCode(o),m=false;if(p.isAnimating()){return}switch(n){case 37:case 38:p.selectPreviousItem();m=true;break;case 39:case 40:p.selectNextItem();m=true;break;case 33:p.scrollPageBackward();m=true;break;case 34:p.scrollPageForward();m=true;break}if(m){if(p.isAutoPlayOn()){p.stopAutoPlay()}Y.preventDefault(o)}},_loadItems:function(){var q=this,r=q.get("firstVisible"),n=0,m=q.get("numItems"),o=q.get("numVisible"),p=q.get("revealAmount");n=r+o-1+(p?1:0);n=n>m-1?m-1:n;if(!q.getItem(r)||!q.getItem(n)){q.fireEvent(K,{ev:K,first:r,last:n,num:n-r})}},_pagerClickHandler:function(n){var p=this,r,o=Y.getTarget(n),q;function m(t){var s=p.get("carouselItemEl");if(t.nodeName.toUpperCase()==s.toUpperCase()){t=a.getChildrenBy(t,function(u){return u.href||u.value});if(t&&t[0]){return t[0]}}else{if(t.href||t.value){return t}}return null}if(o){o=m(o);if(!o){return}q=o.href||o.value;if(k.isString(q)&&q){r=q.lastIndexOf("#");if(r!=-1){q=p.getItemPositionById(q.substring(r+1));p._selectedItem=q;p.scrollTo(q);if(!o.value){p.focus()}Y.preventDefault(n)}}}},_parseCarousel:function(o){var r=this,s,m,n,q,p;m=r.CLASSES;n=r.get("carouselEl");q=false;for(s=o.firstChild;s;s=s.nextSibling){if(s.nodeType==1){p=s.nodeName;if(p.toUpperCase()==n){r._carouselEl=s;a.addClass(r._carouselEl,r.CLASSES.CAROUSEL_EL);q=true}}}return q},_parseCarouselItems:function(){var q=this,r,m,n,p,o=q._carouselEl;m=q.get("carouselItemEl");for(r=o.firstChild;r;r=r.nextSibling){if(r.nodeType==1){p=r.nodeName;if(p.toUpperCase()==m){if(r.id){n=r.id}else{n=a.generateId();r.setAttribute("id",n)}q.addItem(r)}}}},_parseCarouselNavigation:function(s){var t=this,r,u=t.CLASSES,n,q,p,m,o=false;m=a.getElementsByClassName(u.PREV_PAGE,"*",s);if(m.length>0){for(q in m){if(m.hasOwnProperty(q)){n=m[q];if(n.nodeName=="INPUT"||n.nodeName=="BUTTON"){t._navBtns.prev.push(n)}else{p=n.getElementsByTagName("INPUT");if(k.isArray(p)&&p.length>0){t._navBtns.prev.push(p[0])}else{p=n.getElementsByTagName("BUTTON");if(k.isArray(p)&&p.length>0){t._navBtns.prev.push(p[0])}}}}}r={prev:m}}m=a.getElementsByClassName(u.NEXT_PAGE,"*",s);if(m.length>0){for(q in m){if(m.hasOwnProperty(q)){n=m[q];if(n.nodeName=="INPUT"||n.nodeName=="BUTTON"){t._navBtns.next.push(n)}else{p=n.getElementsByTagName("INPUT");if(k.isArray(p)&&p.length>0){t._navBtns.next.push(p[0])}else{p=n.getElementsByTagName("BUTTON");if(k.isArray(p)&&p.length>0){t._navBtns.next.push(p[0])}}}}}if(r){r.next=m}else{r={next:m}}}if(r){t.set("navigation",r);o=true}return o},_refreshUi:function(){var m=this;m._hasRendered=true;m.fireEvent(G)},_setCarouselOffset:function(o){var m=this,n;n=m.get("isVertical")?"top":"left";o+=o!==0?Z(m._carouselEl,n):0;a.setStyle(m._carouselEl,n,o+"px")},_setupCarouselNavigation:function(){var r=this,p,n,m,t,q,s,o;m=r.CLASSES;q=a.getElementsByClassName(m.NAVIGATION,"DIV",r.get("element"));if(q.length===0){q=S("DIV",{className:m.NAVIGATION});r.insertBefore(q,a.getFirstChild(r.get("element")))}else{q=q[0]}r._pages.el=S("UL");q.appendChild(r._pages.el);t=r.get("navigation");if(k.isString(t.prev)||k.isArray(t.prev)){if(k.isString(t.prev)){t.prev=[t.prev]}for(p in t.prev){if(t.prev.hasOwnProperty(p)){r._navBtns.prev.push(a.get(t.prev[p]))}}}else{o=S("SPAN",{className:m.BUTTON+m.FIRST_NAV});a.setStyle(o,"visibility","visible");p=a.generateId();o.innerHTML='<button type="button" '+'id="'+p+'" name="'+r.STRINGS.PREVIOUS_BUTTON_TEXT+'">'+r.STRINGS.PREVIOUS_BUTTON_TEXT+"</button>";q.appendChild(o);p=a.get(p);r._navBtns.prev=[p];n={prev:[o]}}if(k.isString(t.next)||k.isArray(t.next)){if(k.isString(t.next)){t.next=[t.next]}for(p in t.next){if(t.next.hasOwnProperty(p)){r._navBtns.next.push(a.get(t.next[p]))}}}else{s=S("SPAN",{className:m.BUTTON+m.NEXT_NAV});a.setStyle(s,"visibility","visible");p=a.generateId();s.innerHTML='<button type="button" '+'id="'+p+'" name="'+r.STRINGS.NEXT_BUTTON_TEXT+'">'+r.STRINGS.NEXT_BUTTON_TEXT+"</button>";q.appendChild(s);p=a.get(p);r._navBtns.next=[p];if(n){n.next=[s]}else{n={next:[s]}}}if(n){r.set("navigation",n)}return q},_setClipContainerSize:function(n,p){var u=this,q,m,r,s,t,v,o;r=u.get("isVertical");t=u.get("revealAmount");o=r?"height":"width";q=r?"top":"left";n=n||u._clipEl;if(!n){return}p=p||u.get("numVisible");s=L.call(u,o);v=s*p;u._recomputeSize=(v===0);if(u._recomputeSize){u._hasRendered=false;return}if(t>0){t=s*(t/100)*2;v+=t;m=parseFloat(a.getStyle(u._carouselEl,q));m=k.isNumber(m)?m:0;a.setStyle(u._carouselEl,q,m+(t/2)+"px")}if(r){v+=Z(u._carouselEl,"marginTop")+Z(u._carouselEl,"marginBottom")+Z(u._carouselEl,"paddingTop")+Z(u._carouselEl,"paddingBottom")+Z(u._carouselEl,"borderTopWidth")+Z(u._carouselEl,"borderBottomWidth");a.setStyle(n,o,(v-(p-1))+"px")}else{v+=Z(u._carouselEl,"marginLeft")+Z(u._carouselEl,"marginRight")+Z(u._carouselEl,"paddingLeft")+Z(u._carouselEl,"paddingRight")+Z(u._carouselEl,"borderLeftWidth")+Z(u._carouselEl,"borderRightWidth");a.setStyle(n,o,v+"px")}u._setContainerSize(n)},_setContainerSize:function(q,m){var r=this,o=r.CONFIG,n=r.CLASSES,s,p;s=r.get("isVertical");q=q||r._clipEl;m=m||(s?"height":"width");p=parseFloat(a.getStyle(q,m),10);p=k.isNumber(p)?p:0;if(s){p+=Z(r._carouselEl,"marginTop")+Z(r._carouselEl,"marginBottom")+Z(r._carouselEl,"paddingTop")+Z(r._carouselEl,"paddingBottom")+Z(r._carouselEl,"borderTopWidth")+Z(r._carouselEl,"borderBottomWidth")+Z(r._navEl,"height")}else{p+=Z(q,"marginLeft")+Z(q,"marginRight")+Z(q,"paddingLeft")+Z(q,"paddingRight")+Z(q,"borderLeftWidth")+Z(q,"borderRightWidth")}if(!s){if(p<o.HORZ_MIN_WIDTH){p=o.HORZ_MIN_WIDTH;r.addClass(n.MIN_WIDTH)}}r.setStyle(m,p+"px");if(s){p=L.call(r,"width");if(p<o.VERT_MIN_WIDTH){p=o.VERT_MIN_WIDTH;r.addClass(n.MIN_WIDTH)}r.setStyle("width",p+"px")}},_setFirstVisible:function(n){var m=this;if(n>=0&&n<m.get("numItems")){m.scrollTo(n)}else{n=m.get("firstVisible")}return n},_setNavigation:function(m){var n=this;if(m.prev){Y.on(m.prev,"click",d,n)}if(m.next){Y.on(m.next,"click",g,n)}},_setNumVisible:function(n){var m=this;m._setClipContainerSize(m._clipEl,n)},_setNumItems:function(o){var n=this,m=n._itemsTable.numItems;if(k.isArray(n._itemsTable.items)){if(n._itemsTable.items.length!=m){m=n._itemsTable.items.length;n._itemsTable.numItems=m}}if(o<m){while(m>o){n.removeItem(m-1);m--}}return o},_setOrientation:function(o){var n=this,m=n.CLASSES;if(o){n.replaceClass(m.HORIZONTAL,m.VERTICAL)}else{n.replaceClass(m.VERTICAL,m.HORIZONTAL)}n._itemsTable.size=0;return o},_setRevealAmount:function(n){var m=this;if(n>=0&&n<=100){n=parseInt(n,10);n=k.isNumber(n)?n:0;m._setClipContainerSize()}else{n=m.get("revealAmount")}return n},_setSelectedItem:function(m){this._selectedItem=m},_syncUiForItemAdd:function(p){var t=this,r=t._carouselEl,m,u,o=t._itemsTable,n,q,s;q=k.isUndefined(p.pos)?o.numItems-1:p.pos;if(!k.isUndefined(o.items[q])){u=o.items[q];if(u&&!k.isUndefined(u.id)){n=a.get(u.id)}}if(!n){m=t._createCarouselItem({className:u.className,content:u.item,id:u.id});if(k.isUndefined(p.pos)){if(!k.isUndefined(o.loading[q])){n=o.loading[q]}if(n){r.replaceChild(m,n);delete o.loading[q]}else{r.appendChild(m)}}else{if(!k.isUndefined(o.items[p.pos+1])){s=a.get(o.items[p.pos+1].id)}if(s){r.insertBefore(m,s)}else{}}}else{if(k.isUndefined(p.pos)){if(!a.isAncestor(t._carouselEl,n)){r.appendChild(n)}}else{if(!a.isAncestor(r,n)){if(!k.isUndefined(o.items[p.pos+1])){r.insertBefore(n,a.get(o.items[p.pos+1].id))}}}}if(!t._hasRendered){t._refreshUi()}if(t.get("selectedItem")<0){t.set("selectedItem",t.get("firstVisible"))}},_syncUiForItemRemove:function(r){var q=this,m=q._carouselEl,o,p,n,s;n=q.get("numItems");p=r.item;s=r.pos;if(p&&(o=a.get(p.id))){if(o&&a.isAncestor(m,o)){Y.purgeElement(o,true);m.removeChild(o)}if(q.get("selectedItem")==s){s=s>=n?n-1:s;q.set("selectedItem",s)}}else{}},_syncUiForLazyLoading:function(s){var r=this,n=r._carouselEl,q,o,m=r._itemsTable,p;for(o=s.first;o<=s.last;o++){q=r._createCarouselItem({className:r.CLASSES.ITEM_LOADING,content:r.STRINGS.ITEM_LOADING_CONTENT,id:a.generateId()});if(q){if(!k.isUndefined(m.items[s.last+1])){p=a.get(m.items[s.last+1].id);if(p){n.insertBefore(q,p)}else{}}else{n.appendChild(q)}}m.loading[o]=q}},_updateNavButtons:function(q,n){var o,m=this.CLASSES,r,p=q.parentNode;if(!p){return}r=p.parentNode;if(q.nodeName.toUpperCase()=="BUTTON"&&a.hasClass(p,m.BUTTON)){if(n){if(r){o=a.getChildren(r);if(o){a.removeClass(o,m.FOCUSSED_BUTTON)}}a.addClass(p,m.FOCUSSED_BUTTON)}else{a.removeClass(p,m.FOCUSSED_BUTTON)}}},_updatePagerButtons:function(){var v=this,t=v.CLASSES,u=v._pages.cur,m,s,q,w,o=v.get("numVisible"),r=v._pages.num,p=v._pages.el;if(r===0||!p){return}a.setStyle(p,"visibility","hidden");while(p.firstChild){p.removeChild(p.firstChild)}for(q=0;q<r;q++){if(k.isUndefined(v._itemsTable.items[q*o])){a.setStyle(p,"visibility","visible");break}w=v._itemsTable.items[q*o].id;m=document.createElement("LI");if(!m){a.setStyle(p,"visibility","visible");break}if(q===0){a.addClass(m,t.FIRST_PAGE)}if(q==u){a.addClass(m,t.SELECTED_NAV)}s='<a href="#'+w+'" tabindex="0"><em>'+v.STRINGS.PAGER_PREFIX_TEXT+" "+(q+1)+"</em></a>";m.innerHTML=s;p.appendChild(m)}a.setStyle(p,"visibility","visible")},_updatePagerMenu:function(){var u=this,t=u._pages.cur,o,r,v,p=u.get("numVisible"),s=u._pages.num,q=u._pages.el,m;if(s===0){return}m=document.createElement("SELECT");if(!m){return}a.setStyle(q,"visibility","hidden");while(q.firstChild){q.removeChild(q.firstChild)}for(r=0;r<s;r++){if(k.isUndefined(u._itemsTable.items[r*p])){a.setStyle(q,"visibility","visible");break}v=u._itemsTable.items[r*p].id;o=document.createElement("OPTION");if(!o){a.setStyle(q,"visibility","visible");break}o.value="#"+v;o.innerHTML=u.STRINGS.PAGER_PREFIX_TEXT+" "+(r+1);if(r==t){o.setAttribute("selected","selected")}m.appendChild(o)}o=document.createElement("FORM");if(!o){}else{o.appendChild(m);q.appendChild(o)}a.setStyle(q,"visibility","visible")},_updateTabIndex:function(m){var n=this;if(m){if(n._focusableItemEl){n._focusableItemEl.tabIndex=-1}n._focusableItemEl=m;m.tabIndex=0}},_validateAnimation:function(m){var n=true;if(k.isObject(m)){if(m.speed){n=n&&k.isNumber(m.speed)}if(m.effect){n=n&&k.isFunction(m.effect)}else{if(!k.isUndefined(YAHOO.util.Easing)){m.effect=YAHOO.util.Easing.easeOut}}}else{n=false}return n},_validateFirstVisible:function(o){var n=this,m=n.get("numItems");if(k.isNumber(o)){if(m===0&&o==m){return true}else{return(o>=0&&o<m)}}return false},_validateNavigation:function(m){var n;if(!k.isObject(m)){return false}if(m.prev){if(!k.isArray(m.prev)){return false}for(n in m.prev){if(m.prev.hasOwnProperty(n)){if(!k.isString(m.prev[n].nodeName)){return false}}}}if(m.next){if(!k.isArray(m.next)){return false}for(n in m.next){if(m.next.hasOwnProperty(n)){if(!k.isString(m.next[n].nodeName)){return false}}}}return true},_validateNumItems:function(m){return k.isNumber(m)&&(m>=0)},_validateNumVisible:function(m){var n=false;if(k.isNumber(m)){n=m>0&&m<=this.get("numItems")}return n},_validateRevealAmount:function(m){var n=false;if(k.isNumber(m)){n=m>=0&&m<100}return n},_validateScrollIncrement:function(m){var n=false;if(k.isNumber(m)){n=(m>0&&m<this.get("numItems"))}return n}})})();YAHOO.register("carousel",YAHOO.widget.Carousel,{version:"2.7.0",build:"1799"});/*
342 323 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
343 324 Code licensed under the BSD License:
344 325 http://developer.yahoo.net/yui/license.txt
345 326 version: 2.7.0
346 327 */
347   -YAHOO.lang.JSON=(function(){var l=YAHOO.lang,_UNICODE_EXCEPTIONS=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,_ESCAPES=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,_VALUES=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,_BRACKETS=/(?:^|:|,)(?:\s*\[)+/g,_INVALID=/^[\],:{}\s]*$/,_SPECIAL_CHARS=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,_CHARS={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function _revive(data,reviver){var walk=function(o,key){var k,v,value=o[key];if(value&&typeof value==="object"){for(k in value){if(l.hasOwnProperty(value,k)){v=walk(value,k);if(v===undefined){delete value[k];}else{value[k]=v;}}}}return reviver.call(o,key,value);};return typeof reviver==="function"?walk({"":data},""):data;}function _char(c){if(!_CHARS[c]){_CHARS[c]="\\u"+("0000"+(+(c.charCodeAt(0))).toString(16)).slice(-4);}return _CHARS[c];}function _prepare(s){return s.replace(_UNICODE_EXCEPTIONS,_char);}function _isValid(str){return l.isString(str)&&_INVALID.test(str.replace(_ESCAPES,"@").replace(_VALUES,"]").replace(_BRACKETS,""));}function _string(s){return'"'+s.replace(_SPECIAL_CHARS,_char)+'"';}function _stringify(h,key,d,w,pstack){var o=typeof w==="function"?w.call(h,key,h[key]):h[key],i,len,j,k,v,isArray,a;if(o instanceof Date){o=l.JSON.dateToString(o);}else{if(o instanceof String||o instanceof Boolean||o instanceof Number){o=o.valueOf();}}switch(typeof o){case"string":return _string(o);case"number":return isFinite(o)?String(o):"null";case"boolean":return String(o);case"object":if(o===null){return"null";}for(i=pstack.length-1;i>=0;--i){if(pstack[i]===o){return"null";}}pstack[pstack.length]=o;a=[];isArray=l.isArray(o);if(d>0){if(isArray){for(i=o.length-1;i>=0;--i){a[i]=_stringify(o,i,d-1,w,pstack)||"null";}}else{j=0;if(l.isArray(w)){for(i=0,len=w.length;i<len;++i){k=w[i];v=_stringify(o,k,d-1,w,pstack);if(v){a[j++]=_string(k)+":"+v;}}}else{for(k in o){if(typeof k==="string"&&l.hasOwnProperty(o,k)){v=_stringify(o,k,d-1,w,pstack);if(v){a[j++]=_string(k)+":"+v;}}}}a.sort();}}pstack.pop();return isArray?"["+a.join(",")+"]":"{"+a.join(",")+"}";}return undefined;}return{isValid:function(s){return _isValid(_prepare(s));},parse:function(s,reviver){s=_prepare(s);if(_isValid(s)){return _revive(eval("("+s+")"),reviver);}throw new SyntaxError("parseJSON");},stringify:function(o,w,d){if(o!==undefined){if(l.isArray(w)){w=(function(a){var uniq=[],map={},v,i,j,len;for(i=0,j=0,len=a.length;i<len;++i){v=a[i];if(typeof v==="string"&&map[v]===undefined){uniq[(map[v]=j++)]=v;}}return uniq;})(w);}d=d>=0?d:1/0;return _stringify({"":o},"",d,w,[]);}return undefined;},dateToString:function(d){function _zeroPad(v){return v<10?"0"+v:v;}return d.getUTCFullYear()+"-"+_zeroPad(d.getUTCMonth()+1)+"-"+_zeroPad(d.getUTCDate())+"T"+_zeroPad(d.getUTCHours())+":"+_zeroPad(d.getUTCMinutes())+":"+_zeroPad(d.getUTCSeconds())+"Z";},stringToDate:function(str){if(/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})Z$/.test(str)){var d=new Date();d.setUTCFullYear(RegExp.$1,(RegExp.$2|0)-1,RegExp.$3);d.setUTCHours(RegExp.$4,RegExp.$5,RegExp.$6);return d;}return str;}};})();YAHOO.register("json",YAHOO.lang.JSON,{version:"2.7.0",build:"1799"});
348   -(function(){var E=YAHOO.util.Dom,A=YAHOO.util.Event,C=YAHOO.lang;var B=function(F,D){var G={element:F,attributes:D||{}};B.superclass.constructor.call(this,G.element,G.attributes)};B._instances={};B.getResizeById=function(D){if(B._instances[D]){return B._instances[D]}return false};YAHOO.extend(B,YAHOO.util.Element,{CSS_RESIZE:"yui-resize",CSS_DRAG:"yui-draggable",CSS_HOVER:"yui-resize-hover",CSS_PROXY:"yui-resize-proxy",CSS_WRAP:"yui-resize-wrap",CSS_KNOB:"yui-resize-knob",CSS_HIDDEN:"yui-resize-hidden",CSS_HANDLE:"yui-resize-handle",CSS_STATUS:"yui-resize-status",CSS_GHOST:"yui-resize-ghost",CSS_RESIZING:"yui-resize-resizing",_resizeEvent:null,dd:null,browser:YAHOO.env.ua,_locked:null,_positioned:null,_dds:null,_wrap:null,_proxy:null,_handles:null,_currentHandle:null,_currentDD:null,_cache:null,_active:null,_createProxy:function(){if(this.get("proxy")){this._proxy=document.createElement("div");this._proxy.className=this.CSS_PROXY;this._proxy.style.height=this.get("element").clientHeight+"px";this._proxy.style.width=this.get("element").clientWidth+"px";this._wrap.parentNode.appendChild(this._proxy)}else{this.set("animate",false)}},_createWrap:function(){this._positioned=false;if(this.get("wrap")===false){switch(this.get("element").tagName.toLowerCase()){case"img":case"textarea":case"input":case"iframe":case"select":this.set("wrap",true);break}}if(this.get("wrap")===true){this._wrap=document.createElement("div");this._wrap.id=this.get("element").id+"_wrap";this._wrap.className=this.CSS_WRAP;if(this.get("element").tagName.toLowerCase()=="textarea"){E.addClass(this._wrap,"yui-resize-textarea")}E.setStyle(this._wrap,"width",this.get("width")+"px");E.setStyle(this._wrap,"height",this.get("height")+"px");E.setStyle(this._wrap,"z-index",this.getStyle("z-index"));this.setStyle("z-index",0);var F=E.getStyle(this.get("element"),"position");E.setStyle(this._wrap,"position",((F=="static")?"relative":F));E.setStyle(this._wrap,"top",E.getStyle(this.get("element"),"top"));E.setStyle(this._wrap,"left",E.getStyle(this.get("element"),"left"));if(E.getStyle(this.get("element"),"position")=="absolute"){this._positioned=true;E.setStyle(this.get("element"),"position","relative");E.setStyle(this.get("element"),"top","0");E.setStyle(this.get("element"),"left","0")}var D=this.get("element").parentNode;D.replaceChild(this._wrap,this.get("element"));this._wrap.appendChild(this.get("element"))}else{this._wrap=this.get("element");if(E.getStyle(this._wrap,"position")=="absolute"){this._positioned=true}}if(this.get("draggable")){this._setupDragDrop()}if(this.get("hover")){E.addClass(this._wrap,this.CSS_HOVER)}if(this.get("knobHandles")){E.addClass(this._wrap,this.CSS_KNOB)}if(this.get("hiddenHandles")){E.addClass(this._wrap,this.CSS_HIDDEN)}E.addClass(this._wrap,this.CSS_RESIZE)},_setupDragDrop:function(){E.addClass(this._wrap,this.CSS_DRAG);this.dd=new YAHOO.util.DD(this._wrap,this.get("id")+"-resize",{dragOnly:true,useShim:this.get("useShim")});this.dd.on("dragEvent",function(){this.fireEvent("dragEvent",arguments)},this,true)},_createHandles:function(){this._handles={};this._dds={};var G=this.get("handles");for(var F=0;F<G.length;F++){this._handles[G[F]]=document.createElement("div");this._handles[G[F]].id=E.generateId(this._handles[G[F]]);this._handles[G[F]].className=this.CSS_HANDLE+" "+this.CSS_HANDLE+"-"+G[F];var D=document.createElement("div");D.className=this.CSS_HANDLE+"-inner-"+G[F];this._handles[G[F]].appendChild(D);this._wrap.appendChild(this._handles[G[F]]);A.on(this._handles[G[F]],"mouseover",this._handleMouseOver,this,true);A.on(this._handles[G[F]],"mouseout",this._handleMouseOut,this,true);this._dds[G[F]]=new YAHOO.util.DragDrop(this._handles[G[F]],this.get("id")+"-handle-"+G,{useShim:this.get("useShim")});this._dds[G[F]].setPadding(15,15,15,15);this._dds[G[F]].on("startDragEvent",this._handleStartDrag,this._dds[G[F]],this);this._dds[G[F]].on("mouseDownEvent",this._handleMouseDown,this._dds[G[F]],this)}this._status=document.createElement("span");this._status.className=this.CSS_STATUS;document.body.insertBefore(this._status,document.body.firstChild)},_ieSelectFix:function(){return false},_ieSelectBack:null,_setAutoRatio:function(D){if(this.get("autoRatio")){if(D&&D.shiftKey){this.set("ratio",true)}else{this.set("ratio",this._configs.ratio._initialConfig.value)}}},_handleMouseDown:function(D){if(this._locked){return false}if(E.getStyle(this._wrap,"position")=="absolute"){this._positioned=true}if(D){this._setAutoRatio(D)}if(this.browser.ie){this._ieSelectBack=document.body.onselectstart;document.body.onselectstart=this._ieSelectFix}},_handleMouseOver:function(G){if(this._locked){return false}E.removeClass(this._wrap,this.CSS_RESIZE);if(this.get("hover")){E.removeClass(this._wrap,this.CSS_HOVER)}var D=A.getTarget(G);if(!E.hasClass(D,this.CSS_HANDLE)){D=D.parentNode}if(E.hasClass(D,this.CSS_HANDLE)&&!this._active){E.addClass(D,this.CSS_HANDLE+"-active");for(var F in this._handles){if(C.hasOwnProperty(this._handles,F)){if(this._handles[F]==D){E.addClass(D,this.CSS_HANDLE+"-"+F+"-active");break}}}}E.addClass(this._wrap,this.CSS_RESIZE)},_handleMouseOut:function(G){E.removeClass(this._wrap,this.CSS_RESIZE);if(this.get("hover")&&!this._active){E.addClass(this._wrap,this.CSS_HOVER)}var D=A.getTarget(G);if(!E.hasClass(D,this.CSS_HANDLE)){D=D.parentNode}if(E.hasClass(D,this.CSS_HANDLE)&&!this._active){E.removeClass(D,this.CSS_HANDLE+"-active");for(var F in this._handles){if(C.hasOwnProperty(this._handles,F)){if(this._handles[F]==D){E.removeClass(D,this.CSS_HANDLE+"-"+F+"-active");break}}}}E.addClass(this._wrap,this.CSS_RESIZE)},_handleStartDrag:function(G,F){var D=F.getDragEl();if(E.hasClass(D,this.CSS_HANDLE)){if(E.getStyle(this._wrap,"position")=="absolute"){this._positioned=true}this._active=true;this._currentDD=F;if(this._proxy){this._proxy.style.visibility="visible";this._proxy.style.zIndex="1000";this._proxy.style.height=this.get("element").clientHeight+"px";this._proxy.style.width=this.get("element").clientWidth+"px"}for(var H in this._handles){if(C.hasOwnProperty(this._handles,H)){if(this._handles[H]==D){this._currentHandle=H;var I="_handle_for_"+H;E.addClass(D,this.CSS_HANDLE+"-"+H+"-active");F.on("dragEvent",this[I],this,true);F.on("mouseUpEvent",this._handleMouseUp,this,true);break}}}E.addClass(D,this.CSS_HANDLE+"-active");if(this.get("proxy")){var J=E.getXY(this.get("element"));E.setXY(this._proxy,J);if(this.get("ghost")){this.addClass(this.CSS_GHOST)}}E.addClass(this._wrap,this.CSS_RESIZING);this._setCache();this._updateStatus(this._cache.height,this._cache.width,this._cache.top,this._cache.left);this.fireEvent("startResize",{type:"startresize",target:this})}},_setCache:function(){this._cache.xy=E.getXY(this._wrap);E.setXY(this._wrap,this._cache.xy);this._cache.height=this.get("clientHeight");this._cache.width=this.get("clientWidth");this._cache.start.height=this._cache.height;this._cache.start.width=this._cache.width;this._cache.start.top=this._cache.xy[1];this._cache.start.left=this._cache.xy[0];this._cache.top=this._cache.xy[1];this._cache.left=this._cache.xy[0];this.set("height",this._cache.height,true);this.set("width",this._cache.width,true)},_handleMouseUp:function(F){this._active=false;var G="_handle_for_"+this._currentHandle;this._currentDD.unsubscribe("dragEvent",this[G],this,true);this._currentDD.unsubscribe("mouseUpEvent",this._handleMouseUp,this,true);if(this._proxy){this._proxy.style.visibility="hidden";this._proxy.style.zIndex="-1";if(this.get("setSize")){this.resize(F,this._cache.height,this._cache.width,this._cache.top,this._cache.left,true)}else{this.fireEvent("resize",{ev:"resize",target:this,height:this._cache.height,width:this._cache.width,top:this._cache.top,left:this._cache.left})}if(this.get("ghost")){this.removeClass(this.CSS_GHOST)}}if(this.get("hover")){E.addClass(this._wrap,this.CSS_HOVER)}if(this._status){E.setStyle(this._status,"display","none")}if(this.browser.ie){document.body.onselectstart=this._ieSelectBack}if(this.browser.ie){E.removeClass(this._wrap,this.CSS_RESIZE)}for(var D in this._handles){if(C.hasOwnProperty(this._handles,D)){E.removeClass(this._handles[D],this.CSS_HANDLE+"-active")}}if(this.get("hover")&&!this._active){E.addClass(this._wrap,this.CSS_HOVER)}E.removeClass(this._wrap,this.CSS_RESIZING);E.removeClass(this._handles[this._currentHandle],this.CSS_HANDLE+"-"+this._currentHandle+"-active");E.removeClass(this._handles[this._currentHandle],this.CSS_HANDLE+"-active");if(this.browser.ie){E.addClass(this._wrap,this.CSS_RESIZE)}this._resizeEvent=null;this._currentHandle=null;if(!this.get("animate")){this.set("height",this._cache.height,true);this.set("width",this._cache.width,true)}this.fireEvent("endResize",{ev:"endResize",target:this,height:this._cache.height,width:this._cache.width,top:this._cache.top,left:this._cache.left})},_setRatio:function(K,N,Q,I){var O=K,G=N;if(this.get("ratio")){var P=this._cache.height,H=this._cache.width,F=parseInt(this.get("height"),10),L=parseInt(this.get("width"),10),M=this.get("maxHeight"),R=this.get("minHeight"),D=this.get("maxWidth"),J=this.get("minWidth");switch(this._currentHandle){case"l":K=F*(N/L);K=Math.min(Math.max(R,K),M);N=L*(K/F);Q=(this._cache.start.top-(-((F-K)/2)));I=(this._cache.start.left-(-((L-N))));break;case"r":K=F*(N/L);K=Math.min(Math.max(R,K),M);N=L*(K/F);Q=(this._cache.start.top-(-((F-K)/2)));break;case"t":N=L*(K/F);K=F*(N/L);I=(this._cache.start.left-(-((L-N)/2)));Q=(this._cache.start.top-(-((F-K))));break;case"b":N=L*(K/F);K=F*(N/L);I=(this._cache.start.left-(-((L-N)/2)));break;case"bl":K=F*(N/L);N=L*(K/F);I=(this._cache.start.left-(-((L-N))));break;case"br":K=F*(N/L);N=L*(K/F);break;case"tl":K=F*(N/L);N=L*(K/F);I=(this._cache.start.left-(-((L-N))));Q=(this._cache.start.top-(-((F-K))));break;case"tr":K=F*(N/L);N=L*(K/F);I=(this._cache.start.left);Q=(this._cache.start.top-(-((F-K))));break}O=this._checkHeight(K);G=this._checkWidth(N);if((O!=K)||(G!=N)){Q=0;I=0;if(O!=K){G=this._cache.width}if(G!=N){O=this._cache.height}}}return[O,G,Q,I]},_updateStatus:function(K,G,J,F){if(this._resizeEvent&&(!C.isString(this._resizeEvent))){K=((K===0)?this._cache.start.height:K);G=((G===0)?this._cache.start.width:G);var I=parseInt(this.get("height"),10),D=parseInt(this.get("width"),10);if(isNaN(I)){I=parseInt(K,10)}if(isNaN(D)){D=parseInt(G,10)}var L=(parseInt(K,10)-I);var H=(parseInt(G,10)-D);this._cache.offsetHeight=L;this._cache.offsetWidth=H;if(this.get("status")){E.setStyle(this._status,"display","inline");this._status.innerHTML="<strong>"+parseInt(K,10)+" x "+parseInt(G,10)+"</strong><em>"+((L>0)?"+":"")+L+" x "+((H>0)?"+":"")+H+"</em>";E.setXY(this._status,[A.getPageX(this._resizeEvent)+12,A.getPageY(this._resizeEvent)+12])}}},lock:function(D){this._locked=true;if(D&&this.dd){E.removeClass(this._wrap,"yui-draggable");this.dd.lock()}return this},unlock:function(D){this._locked=false;if(D&&this.dd){E.addClass(this._wrap,"yui-draggable");this.dd.unlock()}return this},isLocked:function(){return this._locked},reset:function(){this.resize(null,this._cache.start.height,this._cache.start.width,this._cache.start.top,this._cache.start.left,true);return this},resize:function(M,J,P,Q,H,F,K){if(this._locked){return false}this._resizeEvent=M;var G=this._wrap,I=this.get("animate"),O=true;if(this._proxy&&!F){G=this._proxy;I=false}this._setAutoRatio(M);if(this._positioned){if(this._proxy){Q=this._cache.top-Q;H=this._cache.left-H}}var L=this._setRatio(J,P,Q,H);J=parseInt(L[0],10);P=parseInt(L[1],10);Q=parseInt(L[2],10);H=parseInt(L[3],10);if(Q==0){Q=E.getY(G)}if(H==0){H=E.getX(G)}if(this._positioned){if(this._proxy&&F){if(!I){G.style.top=this._proxy.style.top;G.style.left=this._proxy.style.left}else{Q=this._proxy.style.top;H=this._proxy.style.left}}else{if(!this.get("ratio")&&!this._proxy){Q=this._cache.top+-(Q);H=this._cache.left+-(H)}if(Q){if(this.get("minY")){if(Q<this.get("minY")){Q=this.get("minY")}}if(this.get("maxY")){if(Q>this.get("maxY")){Q=this.get("maxY")}}}if(H){if(this.get("minX")){if(H<this.get("minX")){H=this.get("minX")}}if(this.get("maxX")){if((H+P)>this.get("maxX")){H=(this.get("maxX")-P)}}}}}if(!K){var N=this.fireEvent("beforeResize",{ev:"beforeResize",target:this,height:J,width:P,top:Q,left:H});if(N===false){return false}}this._updateStatus(J,P,Q,H);if(this._positioned){if(this._proxy&&F){}else{if(Q){E.setY(G,Q);this._cache.top=Q}if(H){E.setX(G,H);this._cache.left=H}}}if(J){if(!I){O=true;if(this._proxy&&F){if(!this.get("setSize")){O=false}}if(O){G.style.height=J+"px"}if((this._proxy&&F)||!this._proxy){if(this._wrap!=this.get("element")){this.get("element").style.height=J+"px"}}}this._cache.height=J}if(P){this._cache.width=P;if(!I){O=true;if(this._proxy&&F){if(!this.get("setSize")){O=false}}if(O){G.style.width=P+"px"}if((this._proxy&&F)||!this._proxy){if(this._wrap!=this.get("element")){this.get("element").style.width=P+"px"}}}}if(I){if(YAHOO.util.Anim){var D=new YAHOO.util.Anim(G,{height:{to:this._cache.height},width:{to:this._cache.width}},this.get("animateDuration"),this.get("animateEasing"));if(this._positioned){if(Q){D.attributes.top={to:parseInt(Q,10)}}if(H){D.attributes.left={to:parseInt(H,10)}}}if(this._wrap!=this.get("element")){D.onTween.subscribe(function(){this.get("element").style.height=G.style.height;this.get("element").style.width=G.style.width},this,true)}D.onComplete.subscribe(function(){this.set("height",J);this.set("width",P);this.fireEvent("resize",{ev:"resize",target:this,height:J,width:P,top:Q,left:H})},this,true);D.animate()}}else{if(this._proxy&&!F){this.fireEvent("proxyResize",{ev:"proxyresize",target:this,height:J,width:P,top:Q,left:H})}else{this.fireEvent("resize",{ev:"resize",target:this,height:J,width:P,top:Q,left:H})}}return this},_handle_for_br:function(F){var G=this._setWidth(F.e);var D=this._setHeight(F.e);this.resize(F.e,D,G,0,0)},_handle_for_bl:function(G){var H=this._setWidth(G.e,true);var F=this._setHeight(G.e);var D=(H-this._cache.width);this.resize(G.e,F,H,0,D)},_handle_for_tl:function(G){var I=this._setWidth(G.e,true);var F=this._setHeight(G.e,true);var H=(F-this._cache.height);var D=(I-this._cache.width);this.resize(G.e,F,I,H,D)},_handle_for_tr:function(F){var H=this._setWidth(F.e);var D=this._setHeight(F.e,true);var G=(D-this._cache.height);this.resize(F.e,D,H,G,0)},_handle_for_r:function(D){this._dds.r.setYConstraint(0,0);var F=this._setWidth(D.e);this.resize(D.e,0,F,0,0)},_handle_for_l:function(F){this._dds.l.setYConstraint(0,0);var G=this._setWidth(F.e,true);var D=(G-this._cache.width);this.resize(F.e,0,G,0,D)},_handle_for_b:function(F){this._dds.b.setXConstraint(0,0);var D=this._setHeight(F.e);this.resize(F.e,D,0,0,0)},_handle_for_t:function(F){this._dds.t.setXConstraint(0,0);var D=this._setHeight(F.e,true);var G=(D-this._cache.height);this.resize(F.e,D,0,G,0)},_setWidth:function(H,J){var I=this._cache.xy[0],G=this._cache.width,D=A.getPageX(H),F=(D-I);if(J){F=(I-D)+parseInt(this.get("width"),10)}F=this._snapTick(F,this.get("xTicks"));F=this._checkWidth(F);return F},_checkWidth:function(D){if(this.get("minWidth")){if(D<=this.get("minWidth")){D=this.get("minWidth")}}if(this.get("maxWidth")){if(D>=this.get("maxWidth")){D=this.get("maxWidth")}}return D},_checkHeight:function(D){if(this.get("minHeight")){if(D<=this.get("minHeight")){D=this.get("minHeight")}}if(this.get("maxHeight")){if(D>=this.get("maxHeight")){D=this.get("maxHeight")}}return D},_setHeight:function(G,I){var H=this._cache.xy[1],F=this._cache.height,J=A.getPageY(G),D=(J-H);if(I){D=(H-J)+parseInt(this.get("height"),10)}D=this._snapTick(D,this.get("yTicks"));D=this._checkHeight(D);return D},_snapTick:function(G,F){if(!G||!F){return G}var H=G;var D=G%F;if(D>0){if(D>(F/2)){H=G+(F-D)}else{H=G-D}}return H},init:function(H,F){this._locked=false;this._cache={xy:[],height:0,width:0,top:0,left:0,offsetHeight:0,offsetWidth:0,start:{height:0,width:0,top:0,left:0}};B.superclass.init.call(this,H,F);this.set("setSize",this.get("setSize"));if(F.height){this.set("height",parseInt(F.height,10))}else{var G=this.getStyle("height");if(G=="auto"){this.set("height",parseInt(this.get("element").offsetHeight,10))}}if(F.width){this.set("width",parseInt(F.width,10))}else{var D=this.getStyle("width");if(D=="auto"){this.set("width",parseInt(this.get("element").offsetWidth,10))}}var I=H;if(!C.isString(I)){I=E.generateId(I)}B._instances[I]=this;this._active=false;this._createWrap();this._createProxy();this._createHandles()},getProxyEl:function(){return this._proxy},getWrapEl:function(){return this._wrap},getStatusEl:function(){return this._status},getActiveHandleEl:function(){return this._handles[this._currentHandle]},isActive:function(){return((this._active)?true:false)},initAttributes:function(D){B.superclass.initAttributes.call(this,D);this.setAttributeConfig("useShim",{value:((D.useShim===true)?true:false),validator:YAHOO.lang.isBoolean,method:function(F){for(var G in this._dds){if(C.hasOwnProperty(this._dds,G)){this._dds[G].useShim=F}}if(this.dd){this.dd.useShim=F}}});this.setAttributeConfig("setSize",{value:((D.setSize===false)?false:true),validator:YAHOO.lang.isBoolean});this.setAttributeConfig("wrap",{writeOnce:true,validator:YAHOO.lang.isBoolean,value:D.wrap||false});this.setAttributeConfig("handles",{writeOnce:true,value:D.handles||["r","b","br"],validator:function(F){if(C.isString(F)&&F.toLowerCase()=="all"){F=["t","b","r","l","bl","br","tl","tr"]}if(!C.isArray(F)){F=F.replace(/, /g,",");F=F.split(",")}this._configs.handles.value=F}});this.setAttributeConfig("width",{value:D.width||parseInt(this.getStyle("width"),10),validator:YAHOO.lang.isNumber,method:function(F){F=parseInt(F,10);if(F>0){if(this.get("setSize")){this.setStyle("width",F+"px")}this._cache.width=F;this._configs.width.value=F}}});this.setAttributeConfig("height",{value:D.height||parseInt(this.getStyle("height"),10),validator:YAHOO.lang.isNumber,method:function(F){F=parseInt(F,10);if(F>0){if(this.get("setSize")){this.setStyle("height",F+"px")}this._cache.height=F;this._configs.height.value=F}}});this.setAttributeConfig("minWidth",{value:D.minWidth||15,validator:YAHOO.lang.isNumber});this.setAttributeConfig("minHeight",{value:D.minHeight||15,validator:YAHOO.lang.isNumber});this.setAttributeConfig("maxWidth",{value:D.maxWidth||10000,validator:YAHOO.lang.isNumber});this.setAttributeConfig("maxHeight",{value:D.maxHeight||10000,validator:YAHOO.lang.isNumber});this.setAttributeConfig("minY",{value:D.minY||false});this.setAttributeConfig("minX",{value:D.minX||false});this.setAttributeConfig("maxY",{value:D.maxY||false});this.setAttributeConfig("maxX",{value:D.maxX||false});this.setAttributeConfig("animate",{value:D.animate||false,validator:function(G){var F=true;if(!YAHOO.util.Anim){F=false}return F}});this.setAttributeConfig("animateEasing",{value:D.animateEasing||function(){var F=false;if(YAHOO.util.Easing&&YAHOO.util.Easing.easeOut){F=YAHOO.util.Easing.easeOut}return F}()});this.setAttributeConfig("animateDuration",{value:D.animateDuration||0.5});this.setAttributeConfig("proxy",{value:D.proxy||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("ratio",{value:D.ratio||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("ghost",{value:D.ghost||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("draggable",{value:D.draggable||false,validator:YAHOO.lang.isBoolean,method:function(F){if(F&&this._wrap){this._setupDragDrop()}else{if(this.dd){E.removeClass(this._wrap,this.CSS_DRAG);this.dd.unreg()}}}});this.setAttributeConfig("hover",{value:D.hover||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("hiddenHandles",{value:D.hiddenHandles||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("knobHandles",{value:D.knobHandles||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("xTicks",{value:D.xTicks||false});this.setAttributeConfig("yTicks",{value:D.yTicks||false});this.setAttributeConfig("status",{value:D.status||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("autoRatio",{value:D.autoRatio||false,validator:YAHOO.lang.isBoolean})},destroy:function(){for(var F in this._handles){if(C.hasOwnProperty(this._handles,F)){A.purgeElement(this._handles[F]);this._handles[F].parentNode.removeChild(this._handles[F])}}if(this._proxy){this._proxy.parentNode.removeChild(this._proxy)}if(this._status){this._status.parentNode.removeChild(this._status)}if(this.dd){this.dd.unreg();E.removeClass(this._wrap,this.CSS_DRAG)}if(this._wrap!=this.get("element")){this.setStyle("position","");this.setStyle("top","");this.setStyle("left","");this._wrap.parentNode.replaceChild(this.get("element"),this._wrap)}this.removeClass(this.CSS_RESIZE);delete YAHOO.util.Resize._instances[this.get("id")];for(var D in this){if(C.hasOwnProperty(this,D)){this[D]=null;delete this[D]}}},toString:function(){if(this.get){return"Resize (#"+this.get("id")+")"}return"Resize Utility"}});YAHOO.util.Resize=B})();YAHOO.register("resize",YAHOO.util.Resize,{version:"2.7.0",build:"1799"});
349   -BalloonConfig=function(balloon,set){set=set||'';if(!balloon.configured||set=='GBubble'||set=='GBox'){balloon.fontColor='black';balloon.fontFamily='Arial, sans-serif';balloon.fontSize='12pt';balloon.minWidth=100;balloon.maxWidth=400;balloon.delayTime=750;balloon.vOffset=10;balloon.hOffset=10;balloon.stem=true;balloon.images=i3GEO.configura.locaplic+'/pacotes/balloon-tooltips/htdocs/images/GBubble';balloon.ieImage='balloon_ie.png';balloon.balloonImage='balloon.png';balloon.upLeftStem='up_left.png';balloon.downLeftStem='down_left.png';balloon.upRightStem='up_right.png';balloon.downRightStem='down_right.png';balloon.closeButton='close.png';balloon.closeButtonWidth=16;balloon.allowAJAX=true;balloon.allowIframes=true;balloon.trackCursor=true;balloon.shadow=20;balloon.padding=10;balloon.stemHeight=32;balloon.stemOverlap=3;balloon.vOffset=1;balloon.hOffset=1;balloon.opacity=0.9;balloon.configured=set||true}switch(set){case('GBoxxxx'):balloon.bgColor='whitesmoke';balloon.borderStyle='2px solid gray';balloon.padding=5;balloon.shadow=0;balloon.stem=true;balloon.opacity=0.8;balloon.hOffset=1;balloon.vOffset=1;balloon.allowFade=false;break;case('GPlain'):balloon.padding=5;balloon.images=i3GEO.configura.locaplic+'/pacotes/balloon-tooltips/htdocs/images/GPlain';balloon.ieImage=null;balloon.shadow=0;balloon.stemHeight=15;balloon.stemOverlap=1;balloon.opacity=0.85;break;case('GFade'):balloon.allowFade=true;balloon.fadeIn=1000;balloon.faedOut=200;break}};
350   -var currentBalloonClass;var balloonIsVisible;var balloonIsSticky;var balloonInvisibleSelects;var balloonIsSuppressed;var tooltipIsSuppressed;var Balloon=function(){this.trackCursor=true;document.onmousemove=this.setActiveCoordinates;var myObject=this.isIE()?window:document;myObject.onscroll=function(){Balloon.prototype.nukeTooltip()};window.onbeforeunload=function(){Balloon.prototype.nukeTooltip();balloonIsSuppressed=true};if(this.isIE()){this.suppress=true}return this};Balloon.prototype.showTooltip=function(evt,caption,sticky,width,height,x,y){if(!this.configured){BalloonConfig(this,'GBubble')}this.stopTrackingX=this.trackCursor?100:10;this.stopTrackingY=this.trackCursor?50:10;if(this.isIE()&&document.readyState.match(/complete/i)){this.suppress=false}if(this.suppress||balloonIsSuppressed){return false}if(tooltipIsSuppressed&&!sticky){return false}if(this.opacity&&this.opacity<1){this.opacity=parseInt(parseFloat(this.opacity)*100)}else if(this.opacity&&this.opacity==1){this.opacity=100}else if(!this.opacity){this.opacity==100}if(this.isKonqueror()){this.allowFade=false;this.opacity=100}if(this.isIE()&&this.allowFade){this.opacity=100}var mouseOver=true;try{var mouseOver=evt.type.match('mouseover','i')}catch(e){}if(!mouseOver){sticky=true;this.fadeOK=false;if(balloonIsVisible){this.hideTooltip()}}else{this.fadeOK=this.allowFade}if(balloonIsVisible&&!balloonIsSticky&&mouseOver){return false}if(balloonIsVisible&&balloonIsSticky&&!sticky){return false}try{var el=this.getEventTarget(evt)}catch(e){var el=evt}if(sticky&&mouseOver&&this.isSameElement(el,this.currentElement)){return false}this.currentElement=el;this.elCoords=this.getLoc(el,'region');if(!sticky){var mouseoutFunc=el.onmouseout;var closeBalloon=function(){Balloon.prototype.hideTooltip();if(mouseoutFunc){mouseoutFunc()}};if(!mouseOver){el.onmouseup=function(){return false}}}balloonIsSticky=sticky;this.hideTooltip();this.currentHelpText=this.getAndCheckContents(caption);if(!this.currentHelpText){return false}this.width=width;this.height=height;this.actualWidth=null;this.x=x;this.y=y;this.hideTooltip();this.container=document.createElement('div');this.container.id='balloonPreloadContainer';document.body.appendChild(this.container);this.setStyle(this.container,'position','absolute');this.setStyle(this.container,'top',-8888);this.setStyle(this.container,'font-family',this.fontFamily);this.setStyle(this.container,'font-size',this.fontSize);this.currentHelpText=this.currentHelpText.replace(/\&amp;/g,'&amp;amp');this.container.innerHTML=unescape(this.currentHelpText);if(this.images){this.balloonImage=this.balloonImage?this.images+'/'+this.balloonImage:false;this.ieImage=this.ieImage?this.images+'/'+this.ieImage:false;this.upLeftStem=this.upLeftStem?this.images+'/'+this.upLeftStem:false;this.upRightStem=this.upRightStem?this.images+'/'+this.upRightStem:false;this.downLeftStem=this.downLeftStem?this.images+'/'+this.downLeftStem:false;this.downRightStem=this.downRightStem?this.images+'/'+this.downRightStem:false;this.closeButton=this.closeButton?this.images+'/'+this.closeButton:false;this.images=false}if(this.ieImage&&(this.isIE()||this.isChrome())){if(this.isOldIE()||this.opacity||this.allowFade){this.balloonImage=this.ieImage}}if(!this.preloadedImages){var images=[this.balloonImage,this.closeButton];if(this.ieImage){images.push(this.ieImage)}if(this.stem){images.push(this.upLeftStem,this.upRightStem,this.downLeftStem,this.downRightStem)}var len=images.length;for(var i=0;i<len;i++){if(images[i]){this.preload(images[i])}}this.preloadedImages=true}currentBalloonClass=this;if(!mouseOver)el.onmouseup=function(){return false};this.currentEvent=evt;evt.cancelBubble=true;this.setActiveCoordinates([]);this.doShowTooltip();this.pending=true};Balloon.prototype.preload=function(src){var i=new Image;i.src=src;this.setStyle(i,'position','absolute');this.setStyle(i,'top',-8000);document.body.appendChild(i);document.body.removeChild(i)};Balloon.prototype.doShowTooltip=function(){var self=currentBalloonClass;if(balloonIsVisible){return false}if(!self.parent){if(self.parentID){self.parent=document.getElementById(self.parentID)}else{self.parent=document.body}self.xOffset=self.getLoc(self.parent,'x1');self.yOffset=self.getLoc(self.parent,'y1')}window.clearTimeout(self.timeoutFade);if(!balloonIsSticky){self.setStyle('visibleBalloonElement','display','none')}self.parseIntAll();var balloon=self.makeBalloon();var pageWidth=YAHOO.util.Dom.getViewportWidth();var pageCen=Math.round(pageWidth/2);var pageHeight=YAHOO.util.Dom.getViewportHeight();var pageLeft=YAHOO.util.Dom.getDocumentScrollLeft();var pageTop=YAHOO.util.Dom.getDocumentScrollTop();var pageMid=pageTop+Math.round(pageHeight/2);self.pageBottom=pageTop+pageHeight;self.pageTop=pageTop;self.pageLeft=pageLeft;self.pageRight=pageLeft+pageWidth;var vOrient=self.activeTop>pageMid?'up':'down';var hOrient=self.activeRight>pageCen?'left':'right';var helpText=self.container.innerHTML;self.actualWidth=self.getLoc(self.container,'width');if(!isNaN(self.actualWidth)){self.actualWidth+=10}self.parent.removeChild(self.container);var wrapper=document.createElement('div');wrapper.id='contentWrapper';self.contents.appendChild(wrapper);wrapper.innerHTML=helpText;self.setBalloonStyle(vOrient,hOrient,pageWidth,pageLeft);if(balloonIsSticky){self.addCloseButton()}balloonIsVisible=true;self.pending=false;self.showHide();self.startX=self.activeLeft;self.startY=self.activeTop;self.fade(0,self.opacity,self.fadeIn)};Balloon.prototype.addCloseButton=function(){var self=currentBalloonClass;var margin=Math.round(self.padding/2);var closeWidth=self.closeButtonWidth||16;var balloonTop=self.getLoc('visibleBalloonElement','y1')+margin+self.shadow;var BalloonLeft=self.getLoc('topRight','x2')-self.closeButtonWidth-self.shadow-margin;var closeButton=document.getElementById('closeButton');if(!closeButton){closeButton=new Image;closeButton.setAttribute('id','closeButton');closeButton.setAttribute('src',self.closeButton);closeButton.onclick=function(){Balloon.prototype.nukeTooltip();var temp=$i('marcaIdentifica');if(temp){temp.parentNode.removeChild(temp)}};self.setStyle(closeButton,'position','absolute');document.body.appendChild(closeButton)}if(self.isIE()){BalloonLeft=BalloonLeft-5}self.setStyle(closeButton,'top',balloonTop);self.setStyle(closeButton,'left',BalloonLeft);self.setStyle(closeButton,'display','inline');self.setStyle(closeButton,'cursor','pointer');self.setStyle(closeButton,'z-index',999999999)};Balloon.prototype.makeBalloon=function(){var self=currentBalloonClass;var balloon=document.getElementById('visibleBalloonElement');if(balloon){self.hideTooltip()}balloon=document.createElement('div');balloon.setAttribute('id','visibleBalloonElement');self.parent.appendChild(balloon);self.activeBalloon=balloon;self.parts=new Array();var parts=new Array('contents','topRight','bottomRight','bottomLeft');for(var i=0;i<parts.length;i++){var child=document.createElement('div');child.setAttribute('id',parts[i]);balloon.appendChild(child);if(parts[i]=='contents')self.contents=child;self.parts.push(child)}if(self.displayTime){self.timeoutAutoClose=window.setTimeout(this.hideTooltip,self.displayTime)}return balloon};Balloon.prototype.setBalloonStyle=function(vOrient,hOrient,pageWidth,pageLeft){var self=currentBalloonClass;var balloon=self.activeBalloon;if(typeof(self.shadow)!='number')self.shadow=0;if(!self.stem)self.stemHeight=0;var fullPadding=self.padding+self.shadow;var insidePadding=self.padding;var outerWidth=self.actualWidth+fullPadding;var innerWidth=self.actualWidth;self.setStyle(balloon,'position','absolute');self.setStyle(balloon,'top',-9999);self.setStyle(balloon,'z-index',1000000);if(self.height){self.setStyle('contentWrapper','height',self.height-fullPadding)}if(self.width){self.setStyle(balloon,'width',self.width);innerWidth=self.width-fullPadding;if(balloonIsSticky){innerWidth-=self.closeButtonWidth}self.setStyle('contentWrapper','width',innerWidth)}else{self.setStyle(balloon,'width',outerWidth);self.setStyle('contentWrapper','width',innerWidth)}if(!self.width&&self.maxWidth&&outerWidth>self.maxWidth){self.setStyle(balloon,'width',self.maxWidth);self.setStyle('contentWrapper','width',self.maxWidth-fullPadding)}if(!self.width&&self.minWidth&&outerWidth<self.minWidth){self.setStyle(balloon,'width',self.minWidth);self.setStyle('contentWrapper','width',self.minWidth-fullPadding)}self.setStyle('contents','z-index',2);self.setStyle('contents','color',self.fontColor);self.setStyle('contents','font-family',self.fontFamily);self.setStyle('contents','font-size',self.fontSize);self.setStyle('contents','background','url('+self.balloonImage+') top left no-repeat');self.setStyle('contents','padding-top',fullPadding);self.setStyle('contents','padding-left',fullPadding);self.setStyle('bottomRight','background','url('+self.balloonImage+') bottom right no-repeat');self.setStyle('bottomRight','position','absolute');self.setStyle('bottomRight','right',0-fullPadding);self.setStyle('bottomRight','bottom',0-fullPadding);self.setStyle('bottomRight','height',fullPadding);self.setStyle('bottomRight','width',fullPadding);self.setStyle('bottomRight','z-index',-1);self.setStyle('topRight','background','url('+self.balloonImage+') top right no-repeat');self.setStyle('topRight','position','absolute');self.setStyle('topRight','right',0-fullPadding);self.setStyle('topRight','top',0);self.setStyle('topRight','width',fullPadding);self.setStyle('bottomLeft','background','url('+self.balloonImage+') bottom left no-repeat');self.setStyle('bottomLeft','position','absolute');self.setStyle('bottomLeft','left',0);self.setStyle('bottomLeft','bottom',0-fullPadding);self.setStyle('bottomLeft','height',fullPadding);self.setStyle('bottomLeft','z-index',-1);if(this.stem){var stem=document.createElement('img');stem.style.zIndex=50000;self.setStyle(stem,'position','absolute');balloon.appendChild(stem);if(vOrient=='up'&&hOrient=='left'){stem.src=self.upLeftStem;var height=self.stemHeight+insidePadding-self.stemOverlap;self.setStyle(stem,'bottom',0-height);self.setStyle(stem,'right',0)}else if(vOrient=='down'&&hOrient=='left'){stem.src=self.downLeftStem;var height=self.stemHeight-(self.shadow+self.stemOverlap);self.setStyle(stem,'top',0-height);self.setStyle(stem,'right',0)}else if(vOrient=='up'&&hOrient=='right'){stem.src=self.upRightStem;var height=self.stemHeight+insidePadding-self.stemOverlap;self.setStyle(stem,'bottom',0-height);self.setStyle(stem,'left',self.shadow)}else if(vOrient=='down'&&hOrient=='right'){stem.src=self.downRightStem;var height=self.stemHeight-(self.shadow+self.stemOverlap);self.setStyle(stem,'top',0-height);self.setStyle(stem,'left',self.shadow)}if(self.fadeOK&&self.isIE()){self.parts.push(stem)}}if(self.allowFade){self.setOpacity(1)}else if(self.opacity){self.setOpacity(self.opacity)}if(hOrient=='left'){var pageWidth=self.pageRight-self.pageLeft;var activeRight=pageWidth-self.activeLeft;self.setStyle(balloon,'right',activeRight)}else{var activeLeft=self.activeRight-self.xOffset;self.setStyle(balloon,'left',activeLeft)}var overflow=balloonIsSticky?'auto':'hidden';self.setStyle('contentWrapper','overflow',overflow);if(balloonIsSticky){self.setStyle('contentWrapper','margin-right',self.closeButtonWidth)}var balloonLeft=self.getLoc(balloon,'x1');var balloonRight=self.getLoc(balloon,'x2');var scrollBar=20;if(hOrient=='right'&&balloonRight>(self.pageRight-fullPadding)){var width=(self.pageRight-balloonLeft)-fullPadding-scrollBar;self.setStyle(balloon,'width',width);self.setStyle('contentWrapper','width',width-fullPadding)}else if(hOrient=='left'&&balloonLeft<(self.pageLeft+fullPadding)){var width=(balloonRight-self.pageLeft)-fullPadding;self.setStyle(balloon,'width',width);self.setStyle('contentWrapper','width',width-fullPadding)}var balloonWidth=self.getLoc(balloon,'width');var balloonHeight=self.getLoc(balloon,'height');var vOverlap=self.isOverlap('topRight','bottomRight');var hOverlap=self.isOverlap('bottomLeft','bottomRight');if(vOverlap){self.setStyle('topRight','height',balloonHeight-vOverlap[1])}if(hOverlap){self.setStyle('bottomLeft','width',balloonWidth-hOverlap[0])}if(vOrient=='up'){var activeTop=self.activeTop-balloonHeight;self.setStyle(balloon,'top',activeTop)}else{var activeTop=self.activeBottom;self.setStyle(balloon,'top',activeTop)}var balloonTop=self.getLoc(balloon,'y1');var balloonBottom=self.height?balloonTop+self.height:self.getLoc(balloon,'y2');var deltaTop=balloonTop<self.pageTop?self.pageTop-balloonTop:0;var deltaBottom=balloonBottom>self.pageBottom?balloonBottom-self.pageBottom:0;if(vOrient=='up'&&deltaTop){var newHeight=balloonHeight-deltaTop;if(newHeight>(self.padding*2)){self.setStyle('contentWrapper','height',newHeight-fullPadding);self.setStyle(balloon,'top',self.pageTop+self.padding);self.setStyle(balloon,'height',newHeight)}}if(vOrient=='down'&&deltaBottom){var newHeight=balloonHeight-deltaBottom-scrollBar;if(newHeight>(self.padding*2)+scrollBar){self.setStyle('contentWrapper','height',newHeight-fullPadding);self.setStyle(balloon,'height',newHeight)}}var iframe=balloon.getElementsByTagName('iframe');if(iframe[0]){iframe=iframe[0];var w=self.getLoc('contentWrapper','width');if(balloonIsSticky&&!this.isIE()){w-=self.closeButtonWidth}var h=self.getLoc('contentWrapper','height');self.setStyle(iframe,'width',w);self.setStyle(iframe,'height',h);self.setStyle('contentWrapper','overflow','hidden')}self.setStyle('topRight','height',self.getLoc(balloon,'height'));self.setStyle('bottomLeft','width',self.getLoc(balloon,'width'));self.hOrient=hOrient;self.vOrient=vOrient};Balloon.prototype.fade=function(opacStart,opacEnd,millisec){var self=currentBalloonClass||new Balloon;if(!millisec||!self.allowFade){return false}opacEnd=opacEnd||100;var speed=Math.round(millisec/100);var timer=0;for(o=opacStart;o<=opacEnd;o++){self.timeoutFade=setTimeout('Balloon.prototype.setOpacity('+o+')',(timer*speed));timer++}};Balloon.prototype.setOpacity=function(opc){var self=currentBalloonClass;if(!self||!opc)return false;var o=parseFloat(opc/100);var parts=self.isIE()?self.parts:[self.activeBalloon];var len=parts.length;for(var i=0;i<len;i++){self.doOpacity(o,opc,parts[i])}};Balloon.prototype.doOpacity=function(op,opc,el){var self=currentBalloonClass;if(!el)return false;self.setStyle(el,'opacity',op);self.setStyle(el,'filter','alpha(opacity='+opc+')');self.setStyle(el,'MozOpacity',op);self.setStyle(el,'KhtmlOpacity',op)};Balloon.prototype.nukeTooltip=function(){this.hideTooltip(1)};Balloon.prototype.hideTooltip=function(override){if(override&&typeof override=='object')override=false;if(balloonIsSticky&&!override)return false;var self=currentBalloonClass;Balloon.prototype.showHide(1);Balloon.prototype.cleanup();if(self){window.clearTimeout(self.timeoutTooltip);window.clearTimeout(self.timeoutFade);window.clearTimeout(self.timeoutAutoClose);if(balloonIsSticky){self.currentElement=null}self.startX=0;self.startY=0}balloonIsVisible=false;balloonIsSticky=false};Balloon.prototype.cleanup=function(){var self=currentBalloonClass;var body;if(self){body=self.parent?self.parent:self.parentID?document.getElementById(self.parentID)||document.body:document.body}else{body=document.body}var bubble=document.getElementById('visibleBalloonElement');var close=document.getElementById('closeButton');var cont=document.getElementById('balloonPreloadContainer');if(bubble){body.removeChild(bubble)}if(close){body.removeChild(close)}if(cont){body.removeChild(cont)}};hideAllTooltips=function(){var self=currentBalloonClass;if(!self)return;window.clearTimeout(self.timeoutTooltip);if(self.activeBalloon)self.setStyle(self.activeBalloon,'display','none');balloonIsVisible=false;balloonIsSticky=false;currentBalloonClass=null};Balloon.prototype.setActiveCoordinates=function(evt){var self=currentBalloonClass;if(!self){return true}var evt=evt||window.event||self.currentEvent;if(!evt){return true}self.currentEvent={};for(var i in evt){self.currentEvent[i]=evt[i]}self.hOffset=self.hOffset||1;self.vOffset=self.vOffset||1;self.stemHeight=self.stem&&self.stemHeight?(self.stemHeight||0):0;var scrollTop=0;var scrollLeft=0;var XY=[self.x,self.y];adjustment=self.hOffset<20?10:0;self.activeTop=scrollTop+XY[1]-adjustment-self.vOffset-self.stemHeight;self.activeLeft=scrollLeft+XY[0]-adjustment-self.hOffset;self.activeRight=scrollLeft+XY[0];self.activeBottom=scrollTop+XY[1]+self.vOffset+2*adjustment;if(balloonIsVisible&&!balloonIsSticky){var deltaX=Math.abs(self.activeLeft-self.startX);var deltaY=Math.abs(self.activeTop-self.startY);if(XY[0]<self.elCoords.left||XY[0]>self.elCoords.right||XY[1]<self.elCoords.top||XY[1]>self.elCoords.bottom){}if(deltaX>self.stopTrackingX||deltaY>self.stopTrackingY){}else if(self.trackCursor){var b=self.activeBalloon;var bwidth=self.getLoc(b,'width');var bheight=self.getLoc(b,'height');var btop=self.getLoc(b,'y1');var bleft=self.getLoc(b,'x1');if(self.hOrient=='right'){self.setStyle(b,'left',self.activeRight)}else if(self.hOrient=='left'){self.setStyle(b,'right',null);var newLeft=self.activeLeft-bwidth;self.setStyle(b,'left',newLeft)}if(self.vOrient=='up'){self.setStyle(b,'top',self.activeTop-bheight)}else if(self.vOrient=='down'){self.setStyle(b,'top',self.activeBottom)}}}return true};Balloon.prototype.eventXY=function(event){var XY=new Array(2);var e=event||window.event;if(!e){return false}if(e.pageX||e.pageY){XY[0]=e.pageX;XY[1]=e.pageY;return XY}else if(e.clientX||e.clientY){XY[0]=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;XY[1]=e.clientY+document.body.scrollTop+document.documentElement.scrollTop;return XY}};Balloon.prototype.getEventTarget=function(event){var targ;var e=event||window.event;if(e.target)targ=e.target;else if(e.srcElement)targ=e.srcElement;if(targ.nodeType==3)targ=targ.parentNode;return targ};Balloon.prototype.setStyle=function(el,att,val){if(!el){return false}if(typeof(el)!='object'){el=document.getElementById(el)}if(!el){return false}var v=val;if(val&&att.match(/left|top|bottom|right|width|height|padding|margin/)){val=new String(val);if(!val.match(/auto/)){val+='px'}}if(att=='z-index'){if(el.style){el.style.zIndex=parseInt(val)}}else{if(this.isIE()&&att.match(/^left|right|top|bottom$/)&&!parseInt(val)&&val!=0){val=null}YAHOO.util.Dom.setStyle(el,att,val)}};Balloon.prototype.getLoc=function(el,request){var region=YAHOO.util.Dom.getRegion(el);switch(request){case('y1'):return parseInt(region.top);case('y2'):return parseInt(region.bottom);case('x1'):return parseInt(region.left);case('x2'):return parseInt(region.right);case('width'):return(parseInt(region.right)-parseInt(region.left));case('height'):return(parseInt(region.bottom)-parseInt(region.top));case('region'):return region}return region};Balloon.prototype.parseIntAll=function(){this.padding=parseInt(this.padding);this.shadow=parseInt(this.shadow);this.stemHeight=parseInt(this.stemHeight);this.stemOverlap=parseInt(this.stemOverlap);this.vOffset=parseInt(this.vOffset);this.delayTime=parseInt(this.delayTime);this.width=parseInt(this.width);this.maxWidth=parseInt(this.maxWidth);this.minWidth=parseInt(this.minWidth);this.fadeIn=parseInt(this.fadeIn)||1000};Balloon.prototype.showHide=function(visible){var self=currentBalloonClass||new Balloon;if(self.isOldIE()){var balloonContents=document.getElementById('contentWrapper');if(!visible&&balloonContents){var balloonSelects=balloonContents.getElementsByTagName('select');var myHash=new Object();for(var i=0;i<balloonSelects.length;i++){var id=balloonSelects[i].id||balloonSelects[i].name;myHash[id]=1}balloonInvisibleSelects=new Array();var allSelects=document.getElementsByTagName('select');for(var i=0;i<allSelects.length;i++){var id=allSelects[i].id||allSelects[i].name;if(self.isOverlap(allSelects[i],self.activeBalloon)&&!myHash[id]){balloonInvisibleSelects.push(allSelects[i]);self.setStyle(allSelects[i],'visibility','hidden')}}}else if(balloonInvisibleSelects){for(var i=0;i<balloonInvisibleSelects.length;i++){var id=balloonInvisibleSelects[i].id||balloonInvisibleSelects[i].name;self.setStyle(balloonInvisibleSelects[i],'visibility','visible')}balloonInvisibleSelects=null}}if(self.hide){var display=visible?'inline':'none';for(var n=0;n<self.hide.length;n++){if(self.isOverlap(self.activeBalloon,self.hide[n])){self.setStyle(self.hide[n],'display',display)}}}};Balloon.prototype.isOverlap=function(el1,el2){if(!el1||!el2)return false;var R1=this.getLoc(el1,'region');var R2=this.getLoc(el2,'region');if(!R1||!R2)return false;var intersect=R1.intersect(R2);if(intersect){intersect=new Array((intersect.right-intersect.left),(intersect.bottom-intersect.top))}return intersect};Balloon.prototype.isSameElement=function(el1,el2){if(!el1||!el2)return false;var R1=this.getLoc(el1,'region');var R2=this.getLoc(el2,'region');var same=R1.contains(R2)&&R2.contains(R1);return same?true:false};Balloon.prototype.getAndCheckContents=function(caption){this.currentHelpText=this.getContents(caption);this.loadedFromElement=false;return this.currentHelpText};Balloon.prototype.getContents=function(section){if(!this.helpUrl&&!this.activeUrl)return section;if(this.loadedFromElement)return section;var url=this.activeUrl||this.helpUrl;url+=this.activeUrl?'':'?section='+section;this.activeUrl=null;var ajax;if(window.XMLHttpRequest){ajax=new XMLHttpRequest()}else{ajax=new ActiveXObject("Microsoft.XMLHTTP")}if(ajax){ajax.open("GET",url,false);ajax.onreadystatechange=function(){};try{ajax.send(null)}catch(e){}var txt=this.escapeHTML?escape(ajax.responseText):ajax.responseText;return txt||section}else{return section}};Balloon.prototype.isIE=function(){return document.all&&!window.opera};Balloon.prototype.isOldIE=function(){if(navigator.appVersion.indexOf("MSIE")==-1)return false;var temp=navigator.appVersion.split("MSIE");return parseFloat(temp[1])<7};Balloon.prototype.isKonqueror=function(){return navigator.userAgent.toLowerCase().indexOf('konqueror')!=-1};Balloon.prototype.isChrome=function(){return navigator.userAgent.toLowerCase().indexOf('chrome')>-1};
351   -if(!euEnv)var euEnv=new Array();euEnv.Kost=new Array();euEnv.Kost.num=0;euEnv.Kost.next=function(){return this.num++}euEnv.euDockArray=new Array();euEnv.refreshTime=35;euEnv.exeThread=true;euEnv.exeThreadWhiteLoop=0;euEnv.x=0;euEnv.y=0;euEnv.mouseMoved=false;var euUP=1;var euDOWN=2;var euLEFT=3;var euRIGHT=4;var euICON=5;var euMOUSE=6;var euSCREEN=7;var euOBJECT=8;var euABSOLUTE=9;var euRELATIVE=10;var euHORIZONTAL=11;var euVERTICAL=12;var euCENTER=13;var euTRANSPARENT=14;var euFIXED=15;var euOPAQUE=16;function euIdObjTop(euObj){var ret=euObj.offsetTop;while((euObj=euObj.offsetParent)!=null)ret+=euObj.offsetTop;return ret};function euIdObjLeft(euObj){var ret=euObj.offsetLeft;while((euObj=euObj.offsetParent)!=null)ret+=euObj.offsetLeft;return ret};function isEuInside(euObj,x,y){var euTop=euIdObjTop(euObj);var euLeft=euIdObjLeft(euObj);return((euTop<=y&&(euTop+euObj.offsetHeight)>=y)&&(euLeft<=x&&(euLeft+euObj.offsetWidth)>=x))};function euDimensioni(){if(typeof(window.innerWidth)=='number'){euEnv.euFrameWidth=window.innerWidth-16;euEnv.euFrameHeight=window.innerHeight}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){euEnv.euFrameWidth=document.documentElement.clientWidth-16;euEnv.euFrameHeight=document.documentElement.clientHeight}else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){euEnv.euFrameWidth=document.body.clientWidth;euEnv.euFrameHeight=document.body.clientHeight}};function offsEut(){euEnv.euScrOfY=0;euEnv.euScrOfX=0;if(typeof(window.pageYoffsEut)=='number'){euEnv.euScrOfY=window.pageYoffsEut;euEnv.euScrOfX=window.pageXoffsEut}else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){euEnv.euScrOfY=document.body.scrollTop;euEnv.euScrOfX=document.body.scrollLeft}else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){euEnv.euScrOfY=document.documentElement.scrollTop;euEnv.euScrOfX=document.documentElement.scrollLeft}};function euKostFunc30(x){return 0.3};function euKostFunc100(x){return 1};function euLinear(x){return x};function euLinear30(x){var r=1*(x+(1-x)*0.3);return r};function euLinear20(x){return x+(1-x)*0.2};function euExp30(x){return euLinear30(x*x*x)};function euLinear50(x){return x+(1-x)*0.5};function euHarmonic(x){return euLinear30((1-Math.cos(Math.PI*x))/2)};function euSemiHarmonic(x){return euLinear30(Math.cos(Math.PI*(1-x)/2))};function euDock(){this.id='euDock_'+euEnv.Kost.next();var novoel=document.createElement("div");novoel.style.position="absolute";novoel.innerHTML="<div id='"+this.id+"_bar' style='z-index:1000;position:absolute;border:0px solid black;'></div>"+"<div onMouseOut='euEnv.euDockArray."+this.id+".mouseOut();' onMouseOver='euEnv.euDockArray."+this.id+".mouseOver();' id='"+this.id+"' style='z-index:1000;position:absolute;border:0px solid black; cursor: pointer;'></div>";document.body.appendChild(novoel);this.div=document.getElementById(this.id);this.divBar=document.getElementById(this.id+"_bar");this.iconsArray=new Array();this.isInside=false;euEnv.euDockArray[this.id]=this;this.bar=null;this.mouseX=0;this.mouseY=0;this.centerPosX=0;this.centerPosY=0;this.offset=0;this.iconOffset=0;this.venusHillSize=3;this.venusHillTrans=euLinear;this.position=euUP;this.align=euSCREEN;this.objectAlign=euDOWN;this.idObjectHook;this.animaition=euICON;this.animFading=euABSOLUTE;this.setIconsOffset=function(offset){this.iconOffset=offset};this.setAnimation=function(anim,size){this.animaition=anim;this.venusHillSize=size};this.setPointAlign=function(x,y,pos){this.offset=0;this.align=euABSOLUTE;this.position=pos;this.setCenterPos(x,y)}this.setObjectAlign=function(idObj,align,offset,pos){this.offset=offset;this.align=euOBJECT;this.objectAlign=align;this.position=pos;this.idObjectHook=document.getElementById(idObj);this.setObjectCoord()};this.setObjectCoord=function(){if(this.objectAlign==euDOWN)this.setCenterPos(euIdObjLeft(this.idObjectHook)+(this.idObjectHook.offsetWidth/2),euIdObjTop(this.idObjectHook)+this.idObjectHook.offsetHeight+this.offset);else if(this.objectAlign==euUP)this.setCenterPos(euIdObjLeft(this.idObjectHook)+(this.idObjectHook.offsetWidth/2),euIdObjTop(this.idObjectHook)-this.offset);else if(this.objectAlign==euLEFT)this.setCenterPos(euIdObjLeft(this.idObjectHook)-this.offset,euIdObjTop(this.idObjectHook)+(this.idObjectHook.offsetHeight/2));else if(this.objectAlign==euRIGHT)this.setCenterPos(euIdObjLeft(this.idObjectHook)+this.idObjectHook.offsetWidth+this.offset,euIdObjTop(this.idObjectHook)+(this.idObjectHook.offsetHeight/2));else if(this.objectAlign==euCENTER){if(this.position==euUP||this.position==euDOWN||this.position==euHORIZONTAL)this.setCenterPos(euIdObjLeft(this.idObjectHook)+(this.idObjectHook.offsetWidth/2),euIdObjTop(this.idObjectHook)+(this.idObjectHook.offsetHeight/2)-this.offset);else this.setCenterPos(euIdObjLeft(this.idObjectHook)+(this.idObjectHook.offsetWidth/2)+this.offset,euIdObjTop(this.idObjectHook)+(this.idObjectHook.offsetHeight/2))}};this.setScreenAlign=function(align,offset){this.offset=offset;this.align=euSCREEN;if(align==euUP)this.position=euDOWN;else if(align==euDOWN)this.position=euUP;else if(align==euLEFT)this.position=euRIGHT;else if(align==euRIGHT)this.position=euLEFT;this.setScreenCoord()};this.setScreenCoord=function(){euDimensioni();offsEut();if(this.position==euDOWN)this.setCenterPos(euEnv.euScrOfX+euEnv.euFrameWidth/2,euEnv.euScrOfY+this.offset);else if(this.position==euUP)this.setCenterPos(euEnv.euScrOfX+euEnv.euFrameWidth/2,euEnv.euScrOfY+euEnv.euFrameHeight-this.offset);else if(this.position==euRIGHT)this.setCenterPos(euEnv.euScrOfX+this.offset,euEnv.euScrOfY+euEnv.euFrameHeight/2);else if(this.position==euLEFT)this.setCenterPos(euEnv.euScrOfX+euEnv.euFrameWidth-this.offset,euEnv.euScrOfY+euEnv.euFrameHeight/2)};this.refreshDiv=function(){if(this.position==euDOWN){this.setPos(this.centerPosX-this.getWidth()/2,this.centerPosY+this.iconOffset)}else if(this.position==euUP){this.setPos(this.centerPosX-this.getWidth()/2,this.centerPosY-this.getHeight()-this.iconOffset)}else if(this.position==euRIGHT){this.setPos(this.centerPosX+this.iconOffset,this.centerPosY-this.getHeight()/2)}else if(this.position==euLEFT){this.setPos(this.centerPosX-this.getWidth()-this.iconOffset,this.centerPosY-this.getHeight()/2)}else if(this.position==euHORIZONTAL){this.setPos(this.centerPosX-this.getWidth()/2,this.centerPosY-this.getHeight()/2+this.iconOffset)}else if(this.position==euVERTICAL){this.setPos(this.centerPosX-this.getWidth()/2+this.iconOffset,this.centerPosY-this.getHeight()/2)}if(this.bar){if(this.position==euDOWN){this.setBarPos(this.centerPosX-this.getWidth()/2,this.centerPosY)}else if(this.position==euUP){this.setBarPos(this.centerPosX-this.getWidth()/2,this.centerPosY-this.bar.getSize())}else if(this.position==euRIGHT){this.setBarPos(this.centerPosX,this.centerPosY-this.getHeight()/2)}else if(this.position==euLEFT){this.setBarPos(this.centerPosX-this.bar.getSize(),this.centerPosY-this.getHeight()/2)}else if(this.position==euHORIZONTAL){this.setBarPos(this.centerPosX-this.getWidth()/2,this.centerPosY-this.bar.getSize()/2)}else if(this.position==euVERTICAL){this.setBarPos(this.centerPosX-this.bar.getSize()/2,this.centerPosY-this.getHeight()/2)}}}this.riposition=function(){if(this.align==euSCREEN)this.setScreenCoord();else if(this.align==euOBJECT)this.setObjectCoord()};this.setCenterPos=function(x,y){this.centerPosX=x;this.centerPosY=y;this.refreshDiv()};this.setPos=function(x,y){this.setPosX(x);this.setPosY(y)};this.setBarPos=function(x,y){this.setBarPosX(x);this.setBarPosY(y)};this.setDim=function(w,h){this.setWidth(w);this.setHeight(h)};this.setBarPosX=function(x){document.getElementById(this.id+"_bar").style.left=x+'px'};this.setBarPosY=function(y){document.getElementById(this.id+"_bar").style.top=y+'px'};this.getPosX=function(){return document.getElementById(this.id).style.left.replace(/[^0-9]/g,"")};this.setPosX=function(x){document.getElementById(this.id).style.left=x+'px'};this.getPosY=function(){return document.getElementById(this.id).style.top.replace(/[^0-9]/g,"")};this.setPosY=function(y){document.getElementById(this.id).style.top=y+'px'};this.getWidth=function(){return document.getElementById(this.id).style.width.replace(/[^0-9]/g,"")};this.setWidth=function(w){document.getElementById(this.id).style.width=Math.round(w)+'px'};this.getHeight=function(){return document.getElementById(this.id).style.height.replace(/[^0-9]/g,"")};this.setHeight=function(h){document.getElementById(this.id).style.height=Math.round(h)+'px'};this.getVenusWidth=function(){return this.venusHillSize*this.getWidth()};this.getVenusHeight=function(){return this.venusHillSize*this.getHeight()};this.getMouseRelativeX=function(){return this.mouseX-euIdObjLeft(this.div)};this.getMouseRelativeY=function(){return this.mouseY-euIdObjTop(this.div)};this.updateDims=function(){var bakWidth=0;var bakHeight=0;for(var i in this.iconsArray)if(this.iconsArray[i].id){if(this.position==euUP||this.position==euDOWN||this.position==euHORIZONTAL){bakWidth+=this.iconsArray[i].getWidth();bakHeight=(this.iconsArray[i].getHeight()>bakHeight)?this.iconsArray[i].getHeight():bakHeight;bakHeight=Math.round(bakHeight)}else{bakHeight+=this.iconsArray[i].getHeight();bakWidth=(this.iconsArray[i].getWidth()>bakWidth)?this.iconsArray[i].getWidth():bakWidth;bakWidth=Math.round(bakWidth)}}if(this.bar){if(this.position==euUP||this.position==euDOWN||this.position==euHORIZONTAL)this.bar.setProperties(bakWidth,this.position)else this.bar.setProperties(bakHeight,this.position)this.bar.refresh()}var posx=0;var posy=0;var updPosX=0;var updPosY=0;for(var i in this.iconsArray)if(this.iconsArray[i].id){if(this.position==euDOWN){updPosX=posx;updPosY=posy;posx+=this.iconsArray[i].getWidth()}else if(this.position==euUP){updPosX=posx;updPosY=bakHeight-this.iconsArray[i].getHeight();posx+=this.iconsArray[i].getWidth()}else if(this.position==euRIGHT){updPosX=posx;updPosY=posy;posy+=this.iconsArray[i].getHeight()}else if(this.position==euLEFT){updPosX=bakWidth-this.iconsArray[i].getWidth();updPosY=posy;posy+=this.iconsArray[i].getHeight()}else if(this.position==euHORIZONTAL){updPosX=posx;updPosY=(bakHeight-this.iconsArray[i].getHeight())/2;posx+=this.iconsArray[i].getWidth()}else if(this.position==euVERTICAL){updPosX=(bakWidth-this.iconsArray[i].getWidth())/2;updPosY=posy;posy+=this.iconsArray[i].getHeight()}this.iconsArray[i].setPos(updPosX,updPosY);this.iconsArray[i].refresh()}this.setDim(bakWidth,bakHeight);this.refreshDiv()};this.kernel=function(){if(this.isInside)return this.kernelMouseOver();else return this.kernelMouseOut()};this.kernelMouseOver=function(){var ret=false;var overI=-1;var mouseRelX=this.getMouseRelativeX();var mouseRelY=this.getMouseRelativeY();var mediana;var border;var frameTo;var venusWidth;var venusHeight;var overIcon;if(this.position==euUP||this.position==euDOWN||this.position==euHORIZONTAL){venusWidth=this.getVenusWidth();for(var i in this.iconsArray)if(this.iconsArray[i].id)if(this.iconsArray[i].isInsideX(mouseRelX)){overIcon=i;border=this.iconsArray[i].getWidth()/2;if(this.animaition==euICON){mouseRelX=this.iconsArray[i].posX+border;border=0}}for(var i in this.iconsArray)if(this.iconsArray[i].id){mediana=this.iconsArray[i].posX+this.iconsArray[i].getWidth()/2;if(Math.abs(mediana-mouseRelX)<=border)mediana=mouseRelX;else if(mediana<mouseRelX)mediana+=this.iconsArray[i].getWidth()/2;else if(mediana>mouseRelX)mediana-=this.iconsArray[i].getWidth()/2;if(this.animaition==euICON&&Math.abs(i-overIcon)<=this.venusHillSize)frameTo=this.venusHillTrans(1-Math.abs(i-overIcon)/this.venusHillSize);else if(this.animaition==euMOUSE&&Math.abs(mediana-mouseRelX)<=venusWidth)frameTo=this.venusHillTrans(1-Math.abs(mediana-mouseRelX)/venusWidth);else frameTo=0;if(frameTo==0||frameTo==1||Math.abs(frameTo-this.iconsArray[i].frame)>0.01)ret|=this.iconsArray[i].setFrameTo(frameTo);if(this.animFading==euABSOLUTE)if(this.iconsArray[i].isInsideX(mouseRelX))ret|=this.iconsArray[i].setFadingTo(1);else ret|=this.iconsArray[i].setFadingTo(0);else ret|=this.iconsArray[i].setFadingTo(frameTo)}}else{venusHeight=this.getVenusHeight();for(var i in this.iconsArray)if(this.iconsArray[i].id)if(this.iconsArray[i].isInsideY(mouseRelY)){overIcon=i;border=this.iconsArray[i].getHeight()/2;if(this.animaition==euICON){mouseRelY=this.iconsArray[i].posY+border;border=0}}for(var i in this.iconsArray)if(this.iconsArray[i].id){mediana=this.iconsArray[i].posY+this.iconsArray[i].getHeight()/2;if(Math.abs(mediana-mouseRelY)<=border)mediana=mouseRelY;else if(mediana<mouseRelY)mediana+=this.iconsArray[i].getHeight()/2;else if(mediana>mouseRelY)mediana-=this.iconsArray[i].getHeight()/2;if(this.animaition==euICON&&Math.abs(i-overIcon)<=this.venusHillSize)frameTo=this.venusHillTrans(1-Math.abs(i-overIcon)/this.venusHillSize);else if(this.animaition==euMOUSE&&Math.abs(mediana-mouseRelY)<=venusHeight)frameTo=this.venusHillTrans(1-Math.abs(mediana-mouseRelY)/venusHeight);else frameTo=0;if(frameTo==0||frameTo==1||Math.abs(frameTo-this.iconsArray[i].frame)>0.01)ret|=this.iconsArray[i].setFrameTo(frameTo);if(this.animFading==euABSOLUTE)if(this.iconsArray[i].isInsideY(mouseRelY))ret|=this.iconsArray[i].setFadingTo(1);else ret|=this.iconsArray[i].setFadingTo(0);else ret|=this.iconsArray[i].setFadingTo(frameTo)}}if(ret)this.updateDims();return ret};this.kernelMouseOut=function(){var ret=false;for(var i in this.iconsArray)if(this.iconsArray[i].id)ret|=this.iconsArray[i].setAllFrameTo(0);if(ret)this.updateDims();return ret};this.mouseOut=function(){this.isInside=false;euEnv.exeThreadWhiteLoop=5};this.mouseOver=function(){this.isInside=true;euEnv.exeThreadWhiteLoop=5};this.mouseMove=function(x,y){var inside=isEuInside(this.div,x,y);var ret=(this.mouseX!=x||this.mouseY!=y)&&inside;this.mouseX=x;this.mouseY=y;if(inside!=this.isInside){this.isInside=inside;ret=true}for(var i in this.iconsArray)if(this.iconsArray[i].id)ret|=this.iconsArray[i].isRunning();return ret};this.iconParams=new Array();this.setAllFrameStep=function(step){this.iconParams.frameStep=step;for(var i in this.iconsArray)if(this.iconsArray[i].id)this.iconsArray[i].frameStep=step};this.setAllZoomFunc=function(func){this.setAllZoomFuncW(func);this.setAllZoomFuncH(func)};this.setAllZoomFuncW=function(func){this.iconParams.zoomFuncW=func;for(var i in this.iconsArray)if(this.iconsArray[i].id)this.iconsArray[i].zoomFuncW=func};this.setAllZoomFuncH=function(func){this.iconParams.zoomFuncH=func;for(var i in this.iconsArray)if(this.iconsArray[i].id)this.iconsArray[i].zoomFuncH=func};this.setBar=function(args){var id='euDock_bar_'+euEnv.Kost.next();euEnv.euDockArray[id]=new euDockBar(id,this);euEnv.euDockArray[id].setElements(args);this.bar=euEnv.euDockArray[id];return euEnv.euDockArray[id]};this.addIcon=function(args,params){var id=params.id;var id='euDock_icon_'+euEnv.Kost.next();euEnv.euDockArray[id]=new euDockIcon(id,this);euEnv.euDockArray[id].addElement(args);this.iconsArray.push(euEnv.euDockArray[id]);for(i in this.iconParams)euEnv.euDockArray[id][i]=this.iconParams[i];for(i in params)euEnv.euDockArray[id][i]=params[i];return euEnv.euDockArray[id]};this.delIcon=function(elem){euEnv.euDockArray.splice(elem);euEnv.euDockArray[elem.id]=0;for(var i in this.iconsArray)if(this.iconsArray[i]==elem)this.iconsArray.splice(i,1);elem.destroy();elem=null;this.updateDims()}};function euDockIcon(id,dock){this.id=id;this.parentDock=dock;this.elementsArray;this.zoomFuncW=euLinear30;this.zoomFuncH=euLinear30;this.posX=0;this.posY=0;this.width=0;this.height=0;this.frame=0;this.frameStep=0.5;this.fadingFrame=0;this.fadingStep=1;this.fadingType=euTRANSPARENT;this.loaded=false;this.runningFrame=false;this.runningFading=false;this.updateDims=function(){if(!this.loaded)return;for(var i=0;i<this.elementsArray.length;i++)this.elementsArray[i].setProperties(this.posX,this.posY,this.getWidth(),this.getHeight())};this.updateFading=function(){if(!this.loaded)return;var stato=this.fadingFrame*(this.elementsArray.length-1);var prev=Math.floor(stato);var next=Math.ceil(stato);var fading=0;for(var i=0;i<this.elementsArray.length;i++){if(this.fadingType==euFIXED){if(i==next)fading=100-100*(i-stato);else if(i<next)fading=100;else fading=0}else{if(i==next)fading=100-100*(i-stato);else if(i==prev){if(this.fadingType==euTRANSPARENT)fading=100-100*(stato-i);else fading=100}else fading=0}this.elementsArray[i].setFading(fading)}};this.refresh=function(){this.updateDims();this.updateFading()};this.isAbsoluteInside=function(x,y){x-=this.getAbsolutePosX();y-=this.getAbsolutePosY();return x>0&&y>0&&x<this.getWidth()&&y<this.getHeight()};this.isInside=function(x,y){return this.isInsideX(x)&&this.isInsideY(y)};this.isInsideX=function(x){return(this.loaded&&(this.posX<=x)&&((this.posX+this.getWidth())>=x))};this.isInsideY=function(y){return(this.loaded&&(this.posY<=y)&&((this.posY+this.getHeight())>=y))};this.retrieveLoadingDims=function(elem,num){if(elem.onLoadPrev)elem.onLoadPrev();if(num==0&&!this.loaded)this.setDim(elem.getWidth(),elem.getHeight());elem.loaded=true;var ret=true;for(var i in this.elementsArray)if(this.elementsArray[i].id)ret&=this.elementsArray[i].loaded this.loaded=ret;if(this.loaded){this.parentDock.updateDims();for(var i in this.elementsArray)if(this.elementsArray[i].id)this.elementsArray[i].show()}if(elem.onLoadNext)elem.onLoadNext()};this.setPos=function(x,y){this.posX=x;this.posY=y};this.setDim=function(w,h){if(this.width==0)this.width=w;if(this.height==0)this.height=h};this.getAbsolutePosX=function(){return euIdObjLeft(this.parentDock.div)+this.posX};this.getAbsolutePosY=function(){return euIdObjTop(this.parentDock.div)+this.posY};this.setPosX=function(x){this.posX=x};this.setPosY=function(y){this.posY=y};this.getWidth=function(){if(!this.loaded)return 0;var calc=this.width*this.zoomFuncW(this.frame);if(calc<38){calc=38}return calc};this.getHeight=function(){if(!this.loaded)return 0;var calc=this.height*this.zoomFuncH(this.frame);if(calc<38){calc=38}return calc};this.isRunning=function(){return this.runningFrame||this.runningFading};this.setAllFrameTo=function(to){this.setFadingTo(to);this.setFrameTo(to);return this.isRunning()};this.setFadingTo=function(fadingTo){if(this.fadingFrame==fadingTo)this.runningFading=false;else{if(this.fadingFrame>fadingTo)this.fadingFrame-=this.fadingStep;else this.fadingFrame+=this.fadingStep;this.runningFading=true;if(Math.abs(this.fadingFrame-fadingTo)<this.fadingStep)this.fadingFrame=fadingTo;if(this.fadingFrame<0)this.fadingFrame=0;if(this.fadingFrame>1)this.fadingFrame=1}return this.runningFading};this.setFrameTo=function(frameTo){if(this.frame==frameTo)this.runningFrame=false;else{this.runningFrame=true;this.frame+=(frameTo-this.frame)*this.frameStep;if(Math.abs(this.frame-frameTo)<0.01)this.frame=frameTo;if(this.frame<0)this.frame=0;if(this.frame>1)this.frame=1}return this.runningFrame};this.addElement=function(args){if(typeof(args)!="undefined"&&args!=null){this.elementsArray=new Array();this.fadingStep=0.5/args.length;for(var i=0;i<args.length;i++)for(var ii in args[i]){var id="euDock_"+ii+"_"+euEnv.Kost.next();euEnv.euDockArray[id]=new window[ii](id,args[i][ii],this.parentDock.div,"euEnv.euDockArray."+this.id+".retrieveLoadingDims(euEnv.euDockArray."+id+","+i+");");this.elementsArray.push(euEnv.euDockArray[id]);euEnv.euDockArray[id].loaded=false}}};this.destroy=function(){for(var i in this.elementsArray)if(this.elementsArray[i].id){euEnv.euDockArray[this.elementsArray[i].id]=0;euEnv.euDockArray.splice(this.elementsArray[i],1);this.elementsArray[i].destroy()}this.elementsArray.splice(0,this.elementsArray.length)};this.mouseClick=function(x,y){if(this.isAbsoluteInside(x,y)){if(this.link)if(this.target){if(top.frames[this.target])top.frames[this.target].location.href=this.link;else top.frames[this.target]=window.open(this.link,this.target,"")}else document.location.href=this.link;else if(this.mouseInsideClick)this.mouseInsideClick(x,y,this.id)}}};function euDockBar(id,dock){this.id=id;this.parentDock=dock;this.elementsArray=new Array();this.len=0;this.align=euUP;this.loaded=false;this.getSize=function(){if(!this.loaded)return 0;if(this.align==euUP||this.align==euDOWN||this.align==euHORIZONTAL)return this.elementsArray.left.getHeight();else return this.elementsArray.top.getWidth()};this.refresh=function(){if(!this.loaded)return;if(this.align==euUP||this.align==euDOWN||this.align==euHORIZONTAL){this.elementsArray.left.setPos(-this.elementsArray.left.getWidth(),0);this.elementsArray.horizontal.setProperties(0,0,Math.round(this.len),this.getSize());this.elementsArray.right.setPos(Math.round(this.len),0);this.elementsArray.left.show();this.elementsArray.horizontal.show();this.elementsArray.right.show();if(this.elementsArray.top)this.elementsArray.top.hide();if(this.elementsArray.bottom)this.elementsArray.bottom.hide();if(this.elementsArray.vertical){this.elementsArray.vertical.setProperties(0,0,0,0);this.elementsArray.vertical.hide()}}else{this.elementsArray.top.setPos(0,-this.elementsArray.top.getHeight());this.elementsArray.vertical.setProperties(0,0,this.getSize(),Math.round(this.len));this.elementsArray.bottom.setPos(0,Math.round(this.len));this.elementsArray.top.show();this.elementsArray.vertical.show();this.elementsArray.bottom.show();if(this.elementsArray.left)this.elementsArray.left.hide();if(this.elementsArray.right)this.elementsArray.right.hide();if(this.elementsArray.horizontal){this.elementsArray.horizontal.setProperties(0,0,0,0);this.elementsArray.horizontal.hide()}}};this.setProperties=function(len,align){this.len=len+1;this.align=align;this.refresh()};this.retrieveLoadingDims=function(elem){if(elem.onLoadPrev)elem.onLoadPrev();elem.loaded=true;var ret=true;for(var i in this.elementsArray)if(this.elementsArray[i].id)ret&=this.elementsArray[i].loaded this.loaded=ret;if(this.loaded){this.parentDock.updateDims();for(var i in this.elementsArray)if(this.elementsArray[i].id)this.elementsArray[i].show()}if(elem.onLoadNext)elem.onLoadNext()};this.setElements=function(args){if(typeof(args)!="undefined"&&args!=null){for(var i in args)for(var ii in args[i]){var id="euDock_"+ii+"_"+euEnv.Kost.next();euEnv.euDockArray[id]=new window[ii](id,args[i][ii],this.parentDock.divBar,"euEnv.euDockArray."+this.id+".retrieveLoadingDims(euEnv.euDockArray."+id+");");this.elementsArray[i]=euEnv.euDockArray[id];euEnv.euDockArray[id].loaded=false}}}};function euThread(){euDimensioni();offsEut();euEnv.timeout=window.setTimeout("euThread();",euEnv.refreshTime);euEnv.exeThread=false;if(euEnv.mouseMoved)for(var i in euEnv.euDockArray)if(euEnv.euDockArray[i].mouseMove)euEnv.exeThread|=euEnv.euDockArray[i].mouseMove(euEnv.euScrOfX+euEnv.x,euEnv.euScrOfY+euEnv.y);euEnv.mouseMoved=false;if(euEnv.exeThread)euEnv.exeThreadWhiteLoop=5;if(euEnv.exeThreadWhiteLoop>0)euKernel();for(var i in euEnv.euDockArray)if(euEnv.euDockArray[i].riposition)euEnv.euDockArray[i].riposition()};function euKernel(){euEnv.exeThread=false;for(var i in euEnv.euDockArray)if(euEnv.euDockArray[i].kernel)euEnv.exeThread|=euEnv.euDockArray[i].kernel();if(euEnv.exeThread)euEnv.exeThreadWhiteLoop=5;else euEnv.exeThreadWhiteLoop--};function on_MouseMove(e){if(!e)var e=window.event;euEnv.x=e.clientX;euEnv.y=e.clientY;euEnv.mouseMoved=true;if(euEnv.onmousemoveBK)return euEnv.onmousemoveBK(e);return true};function on_MouseDown(e){if(!e)var e=window.event;for(var i in euEnv.euDockArray)if(euEnv.euDockArray[i].mouseDown)euEnv.exeThread|=euEnv.euDockArray[i].mouseDown(euEnv.euScrOfX+e.clientX,euEnv.euScrOfY+e.clientY);if(euEnv.onmousedownBK)return euEnv.onmousedownBK(e);return true};function on_MouseUp(e){if(!e)var e=window.event;for(var i in euEnv.euDockArray)if(euEnv.euDockArray[i].mouseUp)euEnv.exeThread|=euEnv.euDockArray[i].mouseUp(euEnv.euScrOfX+e.clientX,euEnv.euScrOfY+e.clientY);if(euEnv.onmouseupBK)return euEnv.onmouseupBK(e);return true};function on_MouseClick(e){if(!e)var e=window.event;for(var i in euEnv.euDockArray)if(euEnv.euDockArray[i].mouseClick)euEnv.exeThread|=euEnv.euDockArray[i].mouseClick(euEnv.euScrOfX+e.clientX,euEnv.euScrOfY+e.clientY);if(euEnv.onclickBK)return euEnv.onclickBK(e);return true};if(document.onmousemove)euEnv.onmousemoveBK=document.onmousemove;document.onmousemove=on_MouseMove;if(document.onmousedown)euEnv.onmousedownBK=document.onmousedown;document.onmousedown=on_MouseDown;if(document.onmouseup)euEnv.onmouseupBK=document.onmouseup;document.onmouseup=on_MouseUp;if(document.onclick)euEnv.onclickBK=document.onclick;document.onclick=on_MouseClick;euDimensioni();offsEut();euThread();
352   -function euPreloadImage(a){var d=document;if(d.images){if(!d.p)d.p=new Array();d.p.push(new Image());d.p[d.p.length-1].src=a}};if(!euEnv.imageBasePath)euEnv.imageBasePath="./";function euImage(id,args,container,onLoadFunc){if(!args.PngObjIE)args.PngObjIE=euImageIE_PNG;if(typeof(window.innerWidth)!='number'&&args.image.toLowerCase().indexOf("png")!=-1)return new args.PngObjIE(id,args,container,onLoadFunc);this.id=id;this.container=container;euPreloadImage(args.image);this.setProperties=function(x,y,w,h){this.setPos(x,y);this.setDim(w,h)};this.setPos=function(x,y){this.setPosX(x);this.setPosY(y)};this.setDim=function(w,h){this.setWidth(w);this.setHeight(h)};this.getPosX=function(){return document.getElementById(this.id).style.left.replace(/[^0-9]/g,"")};this.setPosX=function(x){document.getElementById(this.id).style.left=x+'px'};this.getPosY=function(){return document.getElementById(this.id).style.top.replace(/[^0-9]/g,"")};this.setPosY=function(y){document.getElementById(this.id).style.top=y+'px'};this.getWidth=function(){return document.getElementById(this.id).width};this.setWidth=function(w){document.getElementById(this.id).width=Math.round(w)};this.getHeight=function(){return document.getElementById(this.id).height};this.setHeight=function(h){document.getElementById(this.id).height=Math.round(h)};this.hide=function(){document.getElementById(this.id).style.visibility='hidden'};this.show=function(){document.getElementById(this.id).style.visibility='visible'};this.setFading=function(fad){fad=Math.round(fad);if(fad<0)fad=0;if(fad>100)fad=100;document.getElementById(this.id).style.opacity=(fad/100);document.getElementById(this.id).style.filter="alpha(opacity="+(fad)+");"};this.container.innerHTML+="<img onLoad='"+onLoadFunc+";' id='"+this.id+"' src='"+args.image+"' style='position:absolute;visibility:hidden;'>";this.destroy=function(){this.container.removeChild(document.getElementById(this.id))}};function euImageIE_PNG(id,args,container,onLoadFunc){this.id=id;this.container=container;euPreloadImage(args.image);this.setProperties=function(x,y,w,h){this.setPos(x,y);this.setDim(w,h)};this.setPos=function(x,y){this.setPosX(x);this.setPosY(y)};this.setDim=function(w,h){this.setWidth(w);this.setHeight(h)};this.getPosX=function(){return document.getElementById(this.id).style.left.replace(/[^0-9]/g,"")};this.setPosX=function(x){document.getElementById(this.id).style.left=x+'px'};this.getPosY=function(){return document.getElementById(this.id).style.top.replace(/[^0-9]/g,"")};this.setPosY=function(y){document.getElementById(this.id).style.top=y+'px'};this.getWidth=function(){if(!this.width)return 0;return this.width};this.setWidth=function(w){if(!this.width)return;this.width=Math.round(w);document.getElementById(this.id).style.width=Math.round(w)+'px';document.getElementById(this.id+"_IMG").style.width=Math.round(w)+'px'};this.getHeight=function(){if(!this.height)return 0;return this.height};this.setHeight=function(h){if(!this.height)return;this.height=Math.round(h);document.getElementById(this.id).style.height=Math.round(h)+'px';document.getElementById(this.id+"_IMG").style.height=Math.round(h)+'px'};this.onLoadPrev=function(){if(this.width&&this.height)return;this.width=document.getElementById(this.id+"_IMG_BAK").width;this.height=document.getElementById(this.id+"_IMG_BAK").height;document.getElementById(this.id+"_IMG_BAK").width=0;document.getElementById(this.id+"_IMG_BAK").height=0;this.setDim(this.width,this.height)};this.hide=function(){document.getElementById(this.id).style.visibility='hidden'};this.show=function(){document.getElementById(this.id).style.visibility='visible';if(this.width&&this.height)this.setDim(this.width,this.height)};this.setFading=function(fad){fad=Math.round(fad);if(fad<0)fad=0;if(fad>100)fad=100;document.getElementById(this.id).style.opacity=(fad/100);document.getElementById(this.id).style.filter="alpha(opacity="+(fad)+");"};this.container.innerHTML+="<div id='"+this.id+"' style='position:absolute;'></div>";document.getElementById(this.id).innerHTML="<img src='"+euEnv.imageBasePath+"blank.gif' id='"+this.id+"_IMG' style=\"top:0px;left:0px;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+args.image+"',sizingMethod='scale');position:absolute;\">";this.container.innerHTML+="<img onLoad='"+onLoadFunc+";' id='"+this.id+"_IMG_BAK' src='"+args.image+"' style='visibility:hidden;position:absolute;'>";this.destroy=function(){this.container.removeChild(document.getElementById(this.id));this.container.removeChild(document.getElementById(this.id+"_IMG_BAK"))}};function euImageNoFadingIE_PNG(id,args,container,onLoadFunc){this.id=id;this.container=container;euPreloadImage(args.image);this.setProperties=function(x,y,w,h){this.setPos(x,y);this.setDim(w,h)};this.setPos=function(x,y){this.setPosX(x);this.setPosY(y)};this.setDim=function(w,h){this.setWidth(w);this.setHeight(h)};this.getPosX=function(){return document.getElementById(this.id).style.left.replace(/[^0-9]/g,"")};this.setPosX=function(x){document.getElementById(this.id).style.left=x+'px'};this.getPosY=function(){return document.getElementById(this.id).style.top.replace(/[^0-9]/g,"")};this.setPosY=function(y){document.getElementById(this.id).style.top=y+'px'};this.getWidth=function(){if(!this.width)return 0;return this.width};this.setWidth=function(w){if(!this.width)return;this.width=Math.round(w);document.getElementById(this.id).style.width=Math.round(w)+'px'};this.getHeight=function(){if(!this.height)return 0;return this.height};this.setHeight=function(h){if(!this.height)return;this.height=Math.round(h);document.getElementById(this.id).style.height=Math.round(h)+'px'};this.hide=function(){document.getElementById(this.id).style.visibility='hidden'};this.show=function(){document.getElementById(this.id).style.visibility='visible'};this.onLoadPrev=function(){if(this.width&&this.height)return;this.width=document.getElementById(this.id+"_IMG_BAK").width;this.height=document.getElementById(this.id+"_IMG_BAK").height;document.getElementById(this.id+"_IMG_BAK").width=0;document.getElementById(this.id+"_IMG_BAK").height=0;this.setDim(this.width,this.height)};this.setFading=function(fad){};this.container.innerHTML+="<img src='"+euEnv.imageBasePath+"blank.gif' id='"+this.id+"' style='position:absolute;visibility:hidden;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\""+args.image+"\",sizingMethod=\"scale\");' >";this.container.innerHTML+="<img onLoad='"+onLoadFunc+";' id='"+this.id+"_IMG_BAK' src='"+args.image+"' style='position:absolute;visibility:hidden;'>";this.destroy=function(){this.container.removeChild(document.getElementById(this.id));this.container.removeChild(document.getElementById(this.id+"_IMG_BAK"))}};
353   -i3GEO={parametros:{mapexten:"",mapscale:"",mapres:"",pixelsize:"",mapfile:"",cgi:"",extentTotal:"",mapimagem:"",geoip:"",listavisual:"",utilizacgi:"",versaoms:"",versaomscompleta:"",mensagens:"",w:"",h:"",locsistemas:"",locidentifica:"",r:"",locmapas:"",celularef:"",kmlurl:"",mensageminicia:"",interfacePadrao:"geral.htm",embedLegenda:"nao",autenticadoopenid:"nao"},finaliza:"",temaAtivo:"",contadorAtualiza:0,cria:function(){var temp,i,tamanho;if(window.location.href.split("?")[1]){i3GEO.configura.sid=window.location.href.split("?")[1];if(i3GEO.configura.sid.split("#")[0]){i3GEO.configura.sid=i3GEO.configura.sid.split("#")[0]}}else{i3GEO.configura.sid=""}if(i3GEO.Interface.ALTTABLET!=""){if(i3GEO.util.detectaTablet()){return}}if(!i3GEO.configura.locaplic||i3GEO.configura.locaplic===""){i3GEO.util.localizai3GEO()}tamanho=i3GEO.calculaTamanho();i3GEO.Interface.cria(tamanho[0],tamanho[1]);if(tamanho[0]<550){i=$i(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml);if(i){i.style.display="none"}}},inicia:function(retorno){var montaMapa,mashup,tamanho;if(typeof("i3GEOmantemCompatibilidade")==='function'){i3GEOmantemCompatibilidade()}montaMapa=function(retorno){try{var tempo,titulo,temp,abreJM;if(retorno===""){alert("Ocorreu um erro no mapa - montaMapa");retorno={data:{erro:"erro"}}}if(retorno.data.erro){document.body.style.backgroundColor="white";document.body.innerHTML="<br>Para abrir o i3Geo utilize o link:<br><a href="+i3GEO.configura.locaplic+"/ms_criamapa.php >"+i3GEO.configura.locaplic+"/ms_criamapa.php</a>";return("linkquebrado")}else{if(retorno.data.variaveis){i3GEO.parametros=retorno.data.variaveis;i3GEO.parametros.mapscale=i3GEO.parametros.mapscale*1;i3GEO.parametros.mapres=i3GEO.parametros.mapres*1;i3GEO.parametros.pixelsize=i3GEO.parametros.pixelsize*1;i3GEO.parametros.w=i3GEO.parametros.w*1;i3GEO.parametros.h=i3GEO.parametros.h*1;i3GEO.arvoreDeCamadas.CAMADAS=retorno.data.temas;if(retorno.data.variaveis.navegacaoDir.toLowerCase()==="sim"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir=true}if(i3GEO.Interface.ATUAL==="padrao"){i3GEO.atualiza(retorno)}temp=0;if($i("contemFerramentas")){temp=temp+parseInt($i("contemFerramentas").style.width,10)}if($i("ferramentas")){temp=temp+parseInt($i("ferramentas").style.width,10)}if($i("mst")){$i("mst").style.width=i3GEO.parametros.w+temp+"px"}i3GEO.Interface.inicia()}else{alert("Erro. Impossivel criar o mapa "+retorno.data);return}if($i("ajuda")){i3GEO.ajuda.DIVAJUDA="ajuda"}abreJM="sim";if(i3GEO.util.pegaCookie("botoesAjuda")){abreJM=i3GEO.util.pegaCookie("botoesAjuda");i3GEO.barraDeBotoes.AJUDA=(abreJM==="sim")?true:false}abreJM="sim";if(i3GEO.util.pegaCookie("g_janelaMen")){abreJM=i3GEO.util.pegaCookie("g_janelaMen");i3GEO.configura.iniciaJanelaMensagens=(abreJM==="sim")?true:false}if(i3GEO.configura.iniciaJanelaMensagens===true){i3GEO.ajuda.abreJanela()}if(i3GEO.configura.liberaGuias.toLowerCase()==="sim"){i3GEO.guias.libera()}}if($i("mst")){$i("mst").style.visibility="visible"}}catch(e){alert(e)}};if(!$i("i3geo")){document.body.id="i3geo"}$i("i3geo").className="yui-skin-sam";if(i3GEO.configura.sid===""){mashup=function(retorno){i3GEO.configura.sid=retorno.data;i3GEO.inicia(retorno)};if(i3GEO.Interface.ATUAL!=="padrao"){i3GEO.configura.mashuppar+="&interface="+i3GEO.Interface.ATUAL}i3GEO.php.criamapa(mashup,i3GEO.configura.mashuppar)}else{if(i3GEO.parametros.w===""||i3GEO.parametros.h===""){tamanho=i3GEO.calculaTamanho();i3GEO.parametros.w=tamanho[0];i3GEO.parametros.h=tamanho[1]}i3GEO.php.inicia(montaMapa,i3GEO.configura.embedLegenda,i3GEO.parametros.w,i3GEO.parametros.h)}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.janela.fechaAguarde()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.janela.fechaAguarde()")}if(i3GEO.mapa.AUTORESIZE===true){i3GEO.mapa.ativaAutoResize()}eval(i3GEO.finaliza)},atualiza:function(retorno){var corpoMapa,erro,tempo,mapscale,mapexten,temp;if(i3GEO.contadorAtualiza>1){i3GEO.contadorAtualiza--;return}if(i3GEO.contadorAtualiza>0){i3GEO.contadorAtualiza--}i3GEO.contadorAtualiza++;corpoMapa=function(){if($i("ajaxCorpoMapa")){return}i3GEO.janela.abreAguarde("ajaxCorpoMapa",$trad("o1")+" atualizando...");i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem)};if(arguments.length===0){i3GEO.janela.fechaAguarde("ajaxCorpoMapa");corpoMapa.call();return}if(retorno===""){corpoMapa.call();return}if(!retorno.data){alert(retorno);i3GEO.mapa.recupera.inicia();return}try{if(retorno.data==="erro"){alert("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia();return}else if(retorno.data==="ok"||retorno.data===""){corpoMapa.call();return}}catch(e){}erro=function(){var legimagem,c;legimagem="";c=confirm("Ocorreu um erro, quer tentar novamente?");if(c){corpoMapa.call()}else{i3GEO.janela.fechaAguarde()}return};if(arguments.length===0||retorno===""||retorno.data.variaveis===undefined){erro.call();return}else{if(arguments.length===0){return}i3GEO.mapa.verifica(retorno);tempo="";if(i3GEO.desenho.richdraw){i3GEO.desenho.richdraw.clearWorkspace()}mapscale=i3GEO.parametros.mapscale;i3GEO.atualizaParametros(retorno.data.variaveis);if(retorno.data.variaveis.erro!==""){alert(retorno.data.variaveis.erro)}try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas);if(i3GEO.parametros.mapscale!==mapscale){i3GEO.arvoreDeCamadas.atualizaFarol(i3GEO.parametros.mapscale)}}catch(e){}i3GEO.arvoreDeCamadas.CAMADAS=retorno.data.temas;i3GEO.Interface.redesenha();if($i("i3GEOidentificalistaTemas")){g_tipoacao="identifica";g_operacao='identifica'}else{g_operacao=""}if($i("mensagemt")){$i("mensagemt").value=i3GEO.parametros.mapexten}i3GEO.eventos.navegaMapa();if(i3GEO.configura.entorno.toLowerCase()==="sim"){i3GEO.navega.entorno.geraURL();i3GEO.navega.entorno.ajustaPosicao()}i3GEO.ajuda.mostraJanela("Tempo de redesenho em segundos: "+retorno.data.variaveis.tempo,"");temp=i3GEO.arvoreDeCamadas.verificaAplicaExtensao();if(temp!==""){i3GEO.tema.zoom(temp)}}},calculaTamanho:function(){var diminuix,diminuiy,menos,novow,novoh,w,h,temp;diminuix=(navm)?i3GEO.configura.diminuixM:i3GEO.configura.diminuixN;diminuiy=(navm)?i3GEO.configura.diminuiyM:i3GEO.configura.diminuiyN;menos=0;temp=$i("contemFerramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("contemFerramentas").style.width,10)}temp=$i("ferramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("ferramentas").style.width,10)}if(i3GEO.configura.autotamanho===true){if(window.top===window.self){window.resizeTo(screen.availWidth,screen.availHeight);window.moveTo(0,0)}}novow=YAHOO.util.Dom.getDocumentWidth()-i3GEO.util.getScrollerWidth();novoh=YAHOO.util.Dom.getDocumentHeight();document.body.style.width=novow;document.body.style.height=novoh;w=novow-menos-diminuix;h=novoh-diminuiy;temp=$i("corpoMapa");if(temp){if(temp.style){if(temp.style.width){w=parseInt(temp.style.width,10);h=parseInt(temp.style.width,10);i3GEO.parametros.w=w}if(temp.style.height){h=parseInt(temp.style.height,10);i3GEO.parametros.h=h}}}temp=$i("contemImg");if(temp){temp.style.height=h+"px";temp.style.width=w+"px"}return[w,h]},reCalculaTamanho:function(){var diminuix,diminuiy,menos,novow,novoh,w,h,temp,temp1,antigoh=i3GEO.parametros.h,antigow=i3GEO.parametros.w;diminuix=(navm)?i3GEO.configura.diminuixM:i3GEO.configura.diminuixN;diminuiy=(navm)?i3GEO.configura.diminuiyM:i3GEO.configura.diminuiyN;menos=0;temp=$i("contemFerramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("contemFerramentas").style.width,10)}temp=$i("ferramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("ferramentas").style.width,10)}document.body.style.width="100%";temp=i3GEO.util.tamanhoBrowser();novow=temp[0];novoh=temp[1];temp=(antigoh-(novoh-diminuiy));temp1=(antigow-(novow-diminuix));document.body.style.height=novoh;w=novow-menos-diminuix;h=novoh-diminuiy;temp=$i(i3GEO.Interface.IDMAPA);if(temp){temp.style.height=h+"px";temp.style.width=w+"px";YAHOO.util.Event.addListener(temp,"click",YAHOO.util.Event.stopEvent);YAHOO.util.Event.addFocusListener(temp,YAHOO.util.Event.preventDefault)}temp=$i(i3GEO.Interface.IDCORPO);if(temp){temp.style.height=h+"px";temp.style.width=w+"px";YAHOO.util.Event.addListener(temp,"click",YAHOO.util.Event.stopEvent);YAHOO.util.Event.addFocusListener(temp,YAHOO.util.Event.preventDefault)}temp=$i("mst");if(temp){temp.style.width="100%"}i3GEO.parametros.w=w;i3GEO.parametros.h=h;i3GEO.php.mudatamanho(i3GEO.atualiza,h,w);switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);break;case"googleearth":i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);break;case"openlayers":i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);i3geoOL.updateSize();break}if(i3GEO.guias.TIPO==="sanfona"){i3GEO.guias.ALTURACORPOGUIAS=h-(antigoh-i3GEO.guias.ALTURACORPOGUIAS)}else{i3GEO.guias.ALTURACORPOGUIAS=h}return[w,h]},atualizaParametros:function(variaveis){i3GEO.parametros.mapscale=variaveis.mapscale*1;i3GEO.parametros.mapres=variaveis.mapres*1;i3GEO.parametros.pixelsize=variaveis.pixelsize*1;i3GEO.parametros.mapexten=variaveis.mapexten;i3GEO.parametros.mapimagem=variaveis.mapimagem;i3GEO.parametros.w=variaveis.w*1;i3GEO.parametros.h=variaveis.h*1;i3GEO.parametros.mappath=variaveis.mappath;i3GEO.parametros.mapurl=variaveis.mapurl}};i3GEOF=[];
354   -if(typeof(i3GEO)==='undefined'){i3GEO=[]}navm=false;navn=false;chro=navigator.userAgent.toLowerCase().indexOf('chrome')>-1;opera=navigator.userAgent.toLowerCase().indexOf('opera')>-1;if(navigator.appName.substring(0,1)==='N'){navn=true}if(navigator.appName.substring(0,1)==='M'){navm=true}if(opera===true){navn=true}g_operacao="";g_tipoacao="zoomli";$i=function(id){return document.getElementById(id)};Array.prototype.remove=function(s){try{var n=this.length,i;for(i=0;i<n;i++){if(this[i]==s){this.splice(i,1)}}}catch(e){}};i3GEO.util={PINS:[],BOXES:[],escapeURL:function(sUrl){var re;sUrl=escape(sUrl);re=new RegExp("%3F","g");sUrl=sUrl.replace(re,'?');re=new RegExp("%3D","g");sUrl=sUrl.replace(re,'=');re=new RegExp("%26","g");sUrl=sUrl.replace(re,'&');return sUrl},insereCookie:function(nome,valor){var exdate=new Date();exdate.setDate(exdate.getDate()+10);document.cookie=nome+"="+valor+"; expires="+exdate.toUTCString()+";path=/"},pegaCookie:function(nome){var cookies,i,fim;cookies=document.cookie;i=cookies.indexOf(nome);if(i===-1){return null}fim=cookies.indexOf(";",i);if(fim===-1){fim=cookies.length}return(unescape(cookies.substring(i,fim))).split("=")[1]},listaChaves:function(obj){var keys,key;keys=[];for(key in obj){if(obj[key]){keys.push(key)}}return keys},criaBotaoAplicar:function(nomeFuncao,titulo,classe,obj){try{if(typeof(tempoBotaoAplicar)!=='undefined'){clearTimeout(tempoBotaoAplicar)}}catch(e){}var executar=new Function(nomeFuncao+"().call;clearTimeout(tempoBotaoAplicar);"),novoel,xy;tempoBotaoAplicar=setTimeout(executar,(i3GEO.configura.tempoAplicar));if(arguments.length===1){titulo="Aplicar"}if(arguments.length===1||arguments.length===2){classe="i3geoBotaoAplicar"}if(!document.getElementById("i3geo_aplicar")){novoel=document.createElement("input");novoel.id='i3geo_aplicar';novoel.type='button';novoel.value=titulo;novoel.style.cursor="pointer";novoel.style.fontSize="10px";novoel.style.zIndex=15000;novoel.style.position="absolute";novoel.style.display="none";novoel.onmouseover=function(){this.style.display="block"};novoel.onmouseout=function(){this.style.display="none"};novoel.className=classe;document.body.appendChild(novoel)}else{novoel=document.getElementById("i3geo_aplicar")}novoel.onclick=function(){clearTimeout(i3GEO.parametros.tempo);i3GEO.parametros.tempo="";this.style.display='none';eval(nomeFuncao+"\(\)")};if(arguments.length===4){novoel.style.display="block";xy=YAHOO.util.Dom.getXY(obj);YAHOO.util.Dom.setXY(novoel,xy)}return(novoel)},arvore:function(titulo,onde,obj){var arvore,root,tempNode,currentIconMode,d,c,i,linha,conteudo,j,temaNode;if(!$i(onde)){return}try{arvore=new YAHOO.widget.TreeView(onde);root=arvore.getRoot();tempNode=new YAHOO.widget.TextNode('',root,false);tempNode.isLeaf=false;tempNode.enableHighlight=false}catch(e){}titulo="<table><tr><td><b>"+titulo+"</b></td><td></td></tr></table>";d={html:titulo};tempNode=new YAHOO.widget.HTMLNode(d,root,true,true);tempNode.enableHighlight=false;c=obj.propriedades.length;for(i=0,j=c;i<j;i++){linha=obj.propriedades[i];if(linha.url!==""){conteudo="<a href='#' onclick='"+linha.url+"'>"+$trad(linha.text)+"</a>"}else{conteudo=linha.text}d={html:conteudo};temaNode=new YAHOO.widget.HTMLNode(d,tempNode,false,true);temaNode.enableHighlight=false}arvore.collapseAll();arvore.draw()},removeAcentos:function(palavra){var re;re=/ã|á|à|â/gi;palavra=palavra.replace(re,"a");re=/é|ê/gi;palavra=palavra.replace(re,"e");re=/í/gi;palavra=palavra.replace(re,"i");re=/ó|õ|ô/gi;palavra=palavra.replace(re,"o");re=/ç/gi;palavra=palavra.replace(re,"c");re=/ú/gi;palavra=palavra.replace(re,"u");return(palavra)},protocolo:function(){var u=window.location.href;u=u.split(":");return(u[0])},pegaPosicaoObjeto:function(obj){if(obj){if(!obj.style){return[0,0]}var curleft=0,curtop=0,teste;if(obj){if(obj.offsetParent){do{curleft+=obj.offsetLeft-obj.scrollLeft;curtop+=obj.offsetTop-obj.scrollTop;obj=obj.offsetParent}while(obj)}}return[curleft+document.body.scrollLeft,curtop+document.body.scrollTop]}else{return[0,0]}},pegaElementoPai:function(e){var targ;if(!e){e=window.event}if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}if(targ.nodeType===3){targ=targ.parentNode}tparent=targ.parentNode;return(tparent)},mudaCursor:function(cursores,tipo,idobjeto,locaplic){var os=[],o,i,c,n,layers,cursor="",ext=".ff";try{if(navm){ext=".ie"}os.push(document.getElementById(idobjeto));if(i3GEO.Interface.ATUAL==="openlayers"){os=YAHOO.util.Dom.getElementsByClassName('olTileImage','img')}if(i3GEO.Interface.ATUAL==="googlemaps"){os=document.getElementById(idobjeto).firstChild;os=os.getElementsByTagName("div")}n=os.length;if(tipo==="default"||tipo==="pointer"||tipo==="crosshair"||tipo==="help"||tipo==="move"||tipo==="text"){cursor=tipo}else{c=eval("cursores."+tipo+ext)}if(c==="default"||c==="pointer"||c==="crosshair"||c==="help"||c==="move"||c==="text"){cursor=c}if(cursor===""){cursor="URL(\""+locaplic+eval("cursores."+tipo+ext)+"\"),auto"}for(i=0;i<n;i++){o=os[i];if(o){o.style.cursor=cursor}}}catch(e){}},criaBox:function(id){if(arguments.length===0){id="boxg"}if(!$i(id)){var novoel=document.createElement("div");novoel.id=id;novoel.style.zIndex=1;novoel.innerHTML='<font face="Arial" size=0></font>';document.body.appendChild(novoel);novoel.onmouseover=function(){novoel.style.display='none'};novoel.onmouseout=function(){novoel.style.display='block'};i3GEO.util.BOXES.push(id)}else{$i(id).style.display="block"}},escondeBox:function(){var l,i;l=i3GEO.util.BOXES.length;for(i=0;i<l;i++){if($i(i3GEO.util.BOXES[i])){$i(i3GEO.util.BOXES[i]).style.display="none"}}},criaPin:function(id,imagem,w,h,mouseover){if(arguments.length<1||id===""){id="boxpin"}if(arguments.length<2||imagem===""){imagem=i3GEO.configura.locaplic+'/imagens/marker.png'}if(arguments.length<3||w===""){w="21px"}if(arguments.length<4||h===""){h="25px"}if(!$i(id)){var novoel=document.createElement("img");novoel.id=id;novoel.style.zIndex=10000;novoel.style.position="absolute";novoel.style.width=w;novoel.style.height=h;novoel.src=imagem;if(id==="boxpin"){novoel.onmouseover=function(){$i("boxpin").style.display="none"}}else if(mouseover){novoel.onmouseover=mouseover}document.body.appendChild(novoel);i3GEO.util.PINS.push(id)}},posicionaImagemNoMapa:function(id){var i,mx,my;i=$i(id);mx=parseInt(i.style.width,10)/2;my=parseInt(i.style.height,10)/2;i.style.position="absolute";i.style.top=objposicaocursor.telay-my;i.style.left=objposicaocursor.telax-mx;return[objposicaocursor.telay-my,objposicaocursor.telax-mx]},escondePin:function(){var l,i;l=i3GEO.util.PINS.length;for(i=0;i<l;i++){if($i(i3GEO.util.PINS[i])){$i(i3GEO.util.PINS[i]).style.display="none"}}},$im:function(g){return i3GEO.configura.locaplic+"/imagens/visual/"+i3GEO.configura.visual+"/"+g},$inputText:function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome){if(arguments.length===6){nome=""}if(idPai!==""){if(larguraIdPai!==""){$i(idPai).style.width=larguraIdPai+"px"}$i(idPai).style.padding="3";$i(idPai).style.textAlign="center";$i(idPai).onmouseover=function(){this.className="digitarMouseover"};$i(idPai).onmouseout=function(){this.className=""}}return"<input tabindex='0' onmouseover='javascript:this.className=\"digitarOver\";' onmouseout='javascript:this.className=\"digitar\";' onclick='javascript:this.select();this.className=\"digitarMouseclick\";' id='"+idInput+"' title='"+titulo+"' type='text' size='"+digitos+"' class='digitar' value='"+valor+"' name='"+nome+"' />"},$inputTextMudaCor:function(obj){var n=obj.value.split(" ");obj.style.color="rgb("+n[0]+","+n[1]+","+n[2]+")"},$top:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelTop){document.getElementById(id).style.pixelTop=valor}else{document.getElementById(id).style.top=valor+"px"}}},$left:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelLeft){document.getElementById(id).style.pixelLeft=valor}else{document.getElementById(id).style.left=valor+"px"}}},insereMarca:{CONTAINER:[],cria:function(xi,yi,funcaoOnclick,container,texto,srci){if(!srci){srci=i3GEO.configura.locaplic+"/imagens/dot2.gif"}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereMarca(texto,xi,yi,container);return}try{var novoel,i,novoimg,temp;if(i3GEO.util.insereMarca.CONTAINER.toString().search(container)<0){i3GEO.util.insereMarca.CONTAINER.push(container)}if(!$i(container)){novoel=document.createElement("div");novoel.id=container;i=novoel.style;i.position="absolute";if($i(i3GEO.Interface.IDCORPO)){i.top=parseInt($i(i3GEO.Interface.IDCORPO).style.top,10);i.left=parseInt($i(i3GEO.Interface.IDCORPO).style.left,10)}else{i.top=parseInt($i(i3GEO.Interface.IDMAPA).style.top,10);i.left=parseInt($i(i3GEO.Interface.IDMAPA).style.left,10)}document.body.appendChild(novoel)}container=$i(container);novoel=document.createElement("div");i=novoel.style;i.position="absolute";i.zIndex=2000;i.top=(yi-2)+"px";i.left=(xi-2)+"px";i.width="5px";i.height="5px";novoimg=document.createElement("img");if(funcaoOnclick!==""){novoimg.onclick=funcaoOnclick}else{novoimg.onclick=function(){i3GEO.util.insereMarca.limpa()}}novoimg.src=srci;temp=novoimg.style;temp.width="5px";temp.height="5px";temp.zIndex=2000;novoel.appendChild(novoimg);container.appendChild(novoel);if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.util.insereMarca.limpa()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.util.insereMarca.limpa()")}}catch(e){alert("Ocorreu um erro. inseremarca"+e)}},limpa:function(){try{var n,i;n=i3GEO.util.insereMarca.CONTAINER.length;for(i=0;i<n;i++){if($i(i3GEO.util.insereMarca.CONTAINER[i])){$i(i3GEO.util.insereMarca.CONTAINER[i]).innerHTML=""}}i3GEO.util.insereMarca.CONTAINER=[];i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.util.insereMarca.limpa()")}catch(e){}}},adicionaSHP:function(path){i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));var temp=path.split(".");if((temp[1]==="SHP")||(temp[1]==="shp")){i3GEO.php.adicionaTemaSHP(i3GEO.atualiza,path)}else{i3GEO.php.adicionaTemaIMG(i3GEO.atualiza,path)}},abreCor:function(janela,elemento,tipo){if(!i3GEO.configura){i3GEO.configura={locaplic:"../"}}if(arguments.length===2){tipo="rgb"}var ins,temp,novoel,wdocaiframe,fix=false,wlargura="300",waltura="250",wsrc=i3GEO.configura.locaplic+"/ferramentas/colorpicker/index.htm?doc="+janela+"&elemento="+elemento+"&tipo="+tipo,nx="",ny="",texto="Cor",id="i3geo_janelaCor",modal=true,classe="hd";YAHOO.namespace("janelaCor.xp");if($i(id)){YAHOO.janelaCor.xp.panel.destroy()}ins='<div id="'+id+'_cabecalho" class="hd">';ins+="<span><img id='i3geo_janelaCor_imagemCabecalho' style='visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span>";ins+=texto;ins+='</div><div id="i3geo_janelaCor_corpo" class="bd" style="padding:5px">';if(wsrc!==""){ins+='<iframe name="'+id+'i" id="i3geo_janelaCori" valign="top" style="height:230px,border:0px white solid"></iframe>'}ins+='</div>';novoel=document.createElement("div");novoel.id="i3geo_janelaCor";novoel.style.display="block";novoel.innerHTML=ins;if($i("i3geo")){$i("i3geo").appendChild(novoel)}else{document.body.appendChild(novoel)}wdocaiframe=$i("i3geo_janelaCori");if(wdocaiframe){wdocaiframe.style.display="block";wdocaiframe.src=wsrc;wdocaiframe.style.height="250px";wdocaiframe.style.width="325px";wdocaiframe.style.border="0px solid white"}if(nx===""||nx==="center"){fix=true}YAHOO.janelaCor.xp.panel=new YAHOO.widget.ResizePanel(id,{height:"300px",zIndex:5000,modal:modal,width:"350px",fixedcenter:fix,constraintoviewport:false,visible:true,iframe:false});YAHOO.janelaCor.xp.panel.render();$i(id+'_cabecalho').className=classe},ajaxhttp:function(){var objhttp1;try{objhttp1=new XMLHttpRequest()}catch(ee){try{objhttp1=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{objhttp1=new ActiveXObject("Microsoft.XMLHTTP")}catch(E){objhttp1=false}}}return(objhttp1)},ajaxexecASXml:function(programa,funcao){var h,ohttp,retorno;if(programa.search("http")===0){h=window.location.host;if(programa.search(h)<0){alert("OOps! Nao e possivel chamar um XML de outro host.\nContacte o administrador do sistema.\nConfigure corretamente o ms_configura.php");return}}ohttp=i3GEO.util.ajaxhttp();ohttp.open("GET",programa,true);retorno="";ohttp.onreadystatechange=function(){var retorno,parser,dom;if(ohttp.readyState===4){retorno=ohttp.responseText;if(retorno!==undefined){if(document.implementation.createDocument){parser=new DOMParser();dom=parser.parseFromString(retorno,"text/xml")}else{dom=new ActiveXObject("Microsoft.XMLDOM");dom.async="false";dom.load(programa)}}else{dom="erro"}if(funcao!=="volta"){eval(funcao+'(dom)')}else{return dom}}};ohttp.send(null)},aparece:function(id,tempo,intervalo){var n,obj,opacidade,fadei,tempoFadei;n=parseInt(tempo/intervalo,10);obj=$i(id);if(n===1){obj.style.display="block";if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}}tempo=n*intervalo;intervalo=(intervalo*100)/tempo;opacidade=0;if(navm){obj.style.filter='alpha(opacity=0)'}else{obj.style.opacity=0}obj.style.display="block";fadei=function(){opacidade+=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade<100){tempoFadei=setTimeout(fadei,tempo)}else{clearTimeout(tempoFadei);if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}}};tempoFadei=setTimeout(fadei,tempo)},desaparece:function(id,tempo,intervalo,removeobj){var n,obj,opacidade,fade,p,tempoFade;n=parseInt(tempo/intervalo,10);obj=$i(id);if(n===1){obj.style.display="none";if(removeobj){p=obj.parentNode;if(p){p.removeChild(obj)}}return}tempo=n*intervalo;intervalo=(intervalo*100)/tempo;opacidade=100;if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}obj.style.display="block";fade=function(){opacidade-=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade>0){tempoFade=setTimeout(fade,tempo)}else{clearTimeout(tempoFade);obj.style.display="none";if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}if(removeobj){p=obj.parentNode;if(p){p.removeChild(obj)}}}};tempoFade=setTimeout(fade,tempo)},wkt2ext:function(wkt,tipo){var re,x,y,w,xMin,xMax,yMin,yMax,temp;tipo=tipo.toLowerCase();ext=false;if(tipo==="polygon"){try{re=new RegExp("POLYGON","g");wkt=wkt.replace(re,"");wkt=wkt.split("(")[2].split(")")[0];wkt=wkt.split(",");x=[];y=[];for(w=0;w<wkt.length;w++){temp=wkt[w].split(" ");x.push(temp[0]);y.push(temp[1])}x.sort(i3GEO.util.sortNumber);xMin=x[0];xMax=x[(x.length)-1];y.sort(i3GEO.util.sortNumber);yMin=y[0];yMax=y[(y.length)-1];return xMin+" "+yMin+" "+xMax+" "+yMax}catch(e){}}if(tipo==="point"){try{re=new RegExp("POINT","g");wkt=wkt.replace(re,"");wkt=wkt.split("(")[1].split(")")[0];wkt=wkt.split(" ");return(wkt[0]*1-0.01)+" "+(wkt[1]*1-0.01)+" "+(wkt[0]*1+0.01)+" "+(wkt[1]*1+0.01)}catch(e){}}return ext},sortNumber:function(a,b){return a-b},getScrollerWidth:function(){var scr=null,inn=null,wNoScroll=0,wScroll=0;scr=document.createElement('div');scr.style.position='absolute';scr.style.top='-1000px';scr.style.left='-1000px';scr.style.width='100px';scr.style.height='50px';scr.style.overflow='hidden';inn=document.createElement('div');inn.style.width='100%';inn.style.height='200px';scr.appendChild(inn);document.body.appendChild(scr);wNoScroll=inn.offsetWidth;scr.style.overflow='auto';wScroll=inn.offsetWidth;document.body.removeChild(document.body.lastChild);return(wNoScroll-wScroll)},scriptTag:function(js,ini,id,aguarde){if(!aguarde){aguarde=true}var head,script,tipojanela=i3GEO.janela.ESTILOAGUARDE;if(!$i(id)||id===""){head=document.getElementsByTagName('head')[0];script=document.createElement('script');script.type='text/javascript';if(ini!==""){if(navm){script.onreadystatechange=function(){if(this.readyState==='loaded'||this.readyState==='complete'){i3GEO.janela.fechaAguarde(id+"aguarde");i3GEO.janela.ESTILOAGUARDE=tipojanela;eval(ini)}}}else{script.onload=function(){i3GEO.janela.fechaAguarde(id+"aguarde");i3GEO.janela.ESTILOAGUARDE=tipojanela;eval(ini)}}}script.src=js;if(id!==""){script.id=id}head.appendChild(script)}else{if(ini!==""){eval(ini)}}},removeScriptTag:function(id){try{old=$i("loadscriptI3GEO");if(old!==null){old.parentNode.removeChild(old);old=null;eval(id+" = null;")}old=$i(id);if(old!==null){old.parentNode.removeChild(old)}}catch(erro){}},verificaScriptTag:function(texto){var s=document.getElementsByTagName("script"),n=s.length,i,t;for(i=0;i<n;i++){t=s[i].id;t=t.split(".");if(t[0]===texto){return true}}return false},mensagemAjuda:function(onde,texto){var ins="<table style='width:100%;padding:2;vertical-align:top;background-color:#ffffff;' ><tr><th style='background-color: #cedff2; font-family:Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; border: 1px solid #B1CDEB; text-align: left; padding-left: 7px;padding-right: 11px;'>";ins+='<div style="float:right"><img src="'+i3GEO.configura.locaplic+'/imagens/question.gif" /></div>';ins+='<div style="text-align:left;">';if(texto===""){texto=$i(onde).innerHTML}ins+=texto;ins+='</div></th></tr></table>';if(onde!==""){$i(onde).innerHTML=ins}else{return(ins)}},randomRGB:function(){var v=Math.random(),r=parseInt(255*v,10),g;v=Math.random();g=parseInt(255*v,10);v=Math.random();b=parseInt(255*v,10);return(r+","+g+","+b)},rgb2hex:function(str){var re=new RegExp(" ","g"),s=str.replace(re,','),rgb=s.split(",");function hex(x){var hexDigits=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"];return hexDigits[(x-x%16)/16]+hexDigits[x%16]}return"#"+hex(rgb[0])+hex(rgb[1])+hex(rgb[2])},comboTemas:function(id,funcao,onde,nome,multiplo,tipoCombo){if(arguments.length>2){i3GEO.util.defineValor(onde,"innerHTML","<span style=color:red;font-size:10px; >buscando temas...</span>")}if(arguments.length===3){nome=""}if(arguments.length<5){multiplo=false}var monta,lista,temp;monta=function(retorno){var i,comboTemas,temp,n,nome;if(retorno!==undefined){if(retorno.data){retorno=retorno.data}n=retorno.length;if(n>0){if(multiplo){comboTemas="<select style='font-size:12px;' id='"+id+"' size='4' multiple='multiple' name='"+nome+"'>"}else{comboTemas="<select style='font-size:12px;' id='"+id+"' name='"+nome+"'>"}comboTemas+="<option value=''>----</option>";for(i=0;i<n;i++){if(retorno[i].nome){nome=retorno[i].nome;tema=retorno[i].tema}else{nome=retorno[i].tema;tema=retorno[i].name}if(retorno[i].escondido!=="sim"){comboTemas+="<option value="+tema+" >"+nome+"</option>"}}comboTemas+="</select>";temp={dados:comboTemas,tipo:"dados"}}else{if(tipoCombo==="poligonosSelecionados"||tipoCombo==="selecionados"||tipoCombo==="pontosSelecionados"){temp={dados:'<div class=alerta >Nenhum tema encontrado. <span style=cursor:pointer;color:blue onclick="i3GEO.mapa.dialogo.selecao()" > Selecionar...</span></div>',tipo:"mensagem"}}else{temp={dados:'<div class=alerta >Nenhum tema encontrado. </div>',tipo:"mensagem"}}}}else{temp={dados:"<p style=color:red >Ocorreu um erro<br>",tipo:"erro"}}eval("funcao(temp);")};if(tipoCombo==="ligados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="editaveis"){i3GEO.php.listaTemasEditaveis(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}if(tipoCombo==="selecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemasComSel(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="raster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listatemasTipo(monta,"raster",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="pontosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert("Arvore de camadas não encontrada")}}if(tipoCombo==="pontos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert("Arvore de camadas não encontrada")}}if(tipoCombo==="poligonos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert("Arvore de camadas não encontrada")}}if(tipoCombo==="poligonosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert("Arvore de camadas não encontrada")}}if(tipoCombo==="naolinearSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",1,"diferente",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert("Arvore de camadas não encontrada")}}if(tipoCombo==="linhaDoTempo"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("linhadotempo","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert("Arvore de camadas não encontrada")}}if(tipoCombo===""){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type","","diferente",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert("Arvore de camadas não encontrada")}}},checkTemas:function(id,funcao,onde,nome,tipoLista,prefixo,size){if(arguments.length>2){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando temas...</span>"}if(arguments.length===3){nome=""}var monta,lista,temp,temp1,n,i;monta=function(retorno){try{var i,comboTemas,temp,n,nome;if(retorno!==undefined){if(retorno.data){retorno=retorno.data}n=retorno.length;if(n>0){comboTemas="<table class=lista3 >";for(i=0;i<n;i++){if(retorno[i].nome){nome=retorno[i].nome;tema=retorno[i].tema}else{nome=retorno[i].tema;tema=retorno[i].name}comboTemas+="<tr><td><input size=2 style='cursor:pointer' type=checkbox name='"+tema+"' /></td>";comboTemas+="<td>&nbsp;<input style='text-align:left; cursor:text;' onclick='javascript:this.select();' id='"+prefixo+tema+"' type=text size='"+size+"' value='"+nome+"' /></td></tr>"}comboTemas+="</table>";temp={dados:comboTemas,tipo:"dados"}}else{temp={dados:'<div class=alerta >Nenhum tema encontrado.</div>',tipo:"mensagem"}}}else{temp={dados:"<p style=color:red >Ocorreu um erro<br>",tipo:"erro"}}eval("funcao(temp);")}catch(e){}};if(tipoLista==="ligados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="selecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemasComSel(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="raster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listatemasTipo(monta,"raster",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="polraster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS);temp1=i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);n=temp1.length;for(i=0;i<n;i++){temp.push(temp1[i])}monta(temp)}else{alert("Arvore de camadas não encontrada")}}if(tipoLista==="pontosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert("Arvore de camadas não encontrada")}}if(tipoLista==="pontos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert("Arvore de camadas não encontrada")}}},comboItens:function(id,tema,funcao,onde,nome){if(arguments.length>3){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando itens...</span>"}if(arguments.length!==5){nome=""}var monta=function(retorno){var ins,temp,i;if(retorno.data!==undefined){ins=[];ins.push("<select id='"+id+"' name='"+nome+"'>");ins.push("<option value='' >---</option>");temp=retorno.data.valores.length;for(i=0;i<temp;i++){if(retorno.data.valores[i].tema===tema){ins.push("<option value='"+retorno.data.valores[i].item+"' >"+retorno.data.valores[i].item+"</option>")}}ins.push("</select>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</div>',tipo:"erro"}}eval("funcao(temp)")};i3GEO.php.listaItensTema(monta,tema)},comboValoresItem:function(id,tema,itemTema,funcao,onde){if(arguments.length===5){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando valores...</span>"}var monta=function(retorno){var ins=[],i,pares,j,temp;if(retorno.data!==undefined){ins.push("<select id="+id+" >");ins.push("<option value='' >---</option>");for(i=0;i<retorno.data[1].registros.length;i++){pares=retorno.data[1].registros[i].valores;for(j=0;j<pares.length;j++){ins.push("<option value='"+pares[j].valor+"' >"+pares[j].valor+"</option>")}}ins.push("</select>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</erro>',tipo:"erro"}}eval("funcao(temp)")};i3GEO.php.listaValoresItensTema(monta,tema,itemTema)},comboFontes:function(id,onde){$i(onde).innerHTML="<span style=color:red >buscando fontes...</span>";var monta=function(retorno){var ins="",temp,i,dados;if(retorno.data!==undefined){ins+="<select id='"+id+"'>";ins+="<option value='bitmap' >bitmap</option>";dados=retorno.data.split(",");temp=dados.length;for(i=0;i<temp;i++){ins+="<option value='"+dados[i]+"' >"+dados[i]+"</option>"}ins+="</select>"}$i(onde).innerHTML=ins};i3GEO.php.listaFontesTexto(monta)},comboSimNao:function(id,selecionado){var combo="<select name="+id+" id="+id+" >";combo+="<option value='' >---</option>";if(selecionado.toLowerCase()==="sim"){combo+="<option value=TRUE selected >sim</option>"}else{combo+="<option value=TRUE >sim</option>"}if(selecionado==="nao"){combo+="<option value=FALSE selected >não</option>"}else{combo+="<option value=FALSE >não</option>"}combo+="</select>";return(combo)},checkItensEditaveis:function(tema,funcao,onde,size,prefixo){if(onde!==""){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando itens...</span>"}var monta=function(retorno){var ins=[],i,temp,n;if(retorno.data!==undefined){ins.push("<table class=lista3 >");n=retorno.data.valores.length;for(i=0;i<n;i++){ins.push("<tr><td><input size=2 style='cursor:pointer' name='"+retorno.data.valores[i].tema+"' type=checkbox id='"+prefixo+retorno.data.valores[i].item+"' /></td>");ins.push("<td><input style='text-align:left; cursor:text;' onclick='javascript:this.select();' id='"+prefixo+retorno.data.valores[i].item+retorno.data.valores[i].tema+"' type=text size='"+size+"' value='"+retorno.data.valores[i].item+"' /></td></tr>")}ins.push("</table>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</div>',tipo:"erro"}}eval("funcao(temp)")};i3GEO.php.listaItensTema(monta,tema)},radioEpsg:function(funcao,onde,prefixo){if(arguments.length===2){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando...</span>"}var cp,monta=function(retorno){var ins=[],i,n,temp;if(retorno.data!==undefined){ins.push("<table class=lista2 >");ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio checked value='' /></td>");ins.push("<td>"+retorno.data[0].nome+"</td></tr>");ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio value='' /></td>");ins.push("<td>"+retorno.data[1].nome+"</td></tr>");n=retorno.data.length;for(i=2;i<n;i++){ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio value='"+retorno.data[i].codigo+"' /></td>");ins.push("<td>"+retorno.data[i].nome+"</td></tr>")}ins.push("</table>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</erro>',tipo:"erro"}}eval("funcao(temp)")};i3GEO.php.listaEpsg(monta)},proximoAnterior:function(anterior,proxima,texto,idatual,container){var temp=$i(idatual),ndiv=document.createElement("div"),nids,i,fundo,b;if(temp){$i(container).removeChild(temp)}if(!document.getElementById(idatual)){fundo=$i(container).style.backgroundColor;ndiv.id=idatual;texto+="<br><br><table style='width:100%;background-color:"+fundo+";' ><tr style='width:100%'>";if(anterior!==""){texto+="<td style='border:0px solid white;text-align:left;cursor:pointer;background-color:"+fundo+";'><input id='"+idatual+"anterior_' onclick='"+anterior+"' type='button' value='&nbsp;&nbsp;' /></td>"}if(proxima!==""){texto+="<td style='border:0px solid white;text-align:right;cursor:pointer;background-color:"+fundo+";'><input id='"+idatual+"proxima_' onclick='"+proxima+"' type='button' value='&nbsp;&nbsp;' /></td>"}ndiv.innerHTML=texto+"</tr></table>";$i(container).appendChild(ndiv);b=new YAHOO.widget.Button(idatual+"anterior_",{onclick:{fn:function(){eval(anterior+"()")},lazyloadmenu:true}});b=new YAHOO.widget.Button(idatual+"proxima_",{onclick:{fn:function(){eval(proxima+"()")},lazyloadmenu:true}});i=$i(idatual+"proxima_-button");if(i){i.style.backgroundImage="url('"+i3GEO.configura.locaplic+"/imagens/player_avanca.png')";i.style.backgroundRepeat="no-repeat";i.style.backgroundPosition="center center"}i=$i(idatual+"anterior_-button");if(i){i.style.backgroundImage="url('"+i3GEO.configura.locaplic+"/imagens/player_volta.png')";i.style.backgroundRepeat="no-repeat";i.style.backgroundPosition="center center"}}temp=$i(container).getElementsByTagName("div");nids=temp.length;for(i=0;i<nids;i++){temp[i].style.display="none"}$i(idatual).style.display="block"},dialogoFerramenta:function(mensagem,dir,nome){var js=i3GEO.configura.locaplic+"/ferramentas/"+dir+"/index.js.php";if(!$i("i3GEOF."+nome+"_script")){i3GEO.janela.ESTILOAGUARDE="reduzida";i3GEO.util.multiStep([i3GEO.janela.abreAguarde,i3GEO.util.scriptTag],[["i3GEOF."+nome+"_script"+"aguarde","Carregando JS"],[js,"i3GEOF."+nome+".criaJanelaFlutuante()","i3GEOF."+nome+"_script"]],function(){})}else{i3GEO.util.scriptTag(js,"i3GEOF."+nome+".criaJanelaFlutuante()","i3GEOF."+nome+"_script")}},intersectaBox:function(box1,box2){box1=box1.split(" ");box2=box2.split(" ");var box1i=box2,box2i=box1,coordx,coordy,i;coordx=box1[0]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true;coordx=box1[0]*1;coordy=box1[3]*1}if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[3]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}box1=box1i;box2=box2i;coordx=box1[0]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true;coordx=box1[0]*1;coordy=box1[3]*1}if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[3]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}return false},abreColourRamp:function(janela,elemento,ncores){var ins,temp,novoel,wdocaiframe,fix=false,wlargura="300",waltura="480",wsrc=i3GEO.configura.locaplic+"/ferramentas/colourramp/index.php?ncores="+ncores+"&doc="+janela+"&elemento="+elemento,nx="",ny="",texto="Cor",id="i3geo_janelaCorRamp",modal=true,classe="hd";YAHOO.namespace("janelaCorRamp.xp");if($i(id)){YAHOO.janelaCorRamp.xp.panel.destroy()}ins='<div id="'+id+'_cabecalho" class="hd">';ins+="<span><img id='i3geo_janelaCorRamp_imagemCabecalho' style='visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span>";ins+=texto;ins+='</div><div id="i3geo_janelaCorRamp_corpo" class="bd" style="padding:5px">';ins+='<iframe name="'+id+'i" id="i3geo_janelaCorRampi" valign="top" ></iframe>';ins+='</div>';novoel=document.createElement("div");novoel.id="i3geo_janelaCorRamp";novoel.style.display="block";novoel.innerHTML=ins;if($i("i3geo")){$i("i3geo").appendChild(novoel)}else{document.body.appendChild(novoel)}wdocaiframe=$i("i3geo_janelaCorRampi");wdocaiframe.style.display="block";wdocaiframe.src=wsrc;wdocaiframe.style.height="430px";wdocaiframe.style.width="340px";wdocaiframe.style.border="0px solid white";if(nx===""||nx==="center"){fix=true}YAHOO.janelaCorRamp.xp.panel=new YAHOO.widget.ResizePanel(id,{height:"480px",zIndex:5000,modal:modal,width:"350px",fixedcenter:fix,constraintoviewport:false,visible:true,iframe:false});YAHOO.janelaCorRamp.xp.panel.render();$i(id+'_cabecalho').className=classe},localizai3GEO:function(){var scriptLocation="",scripts=document.getElementsByTagName('script'),i=0,index,ns=scripts.length,src;for(i=0;i<ns;i++){src=scripts[i].getAttribute('src');if(src){index=src.lastIndexOf("/classesjs/i3geo.js");if((index>-1)&&(index+"/classesjs/i3geo.js".length===src.length)){scriptLocation=src.slice(0,-"/classesjs/i3geo.js".length);break}index=src.lastIndexOf("/classesjs/i3geonaocompacto.js");if((index>-1)&&(index+"/classesjs/i3geonaocompacto.js".length===src.length)){scriptLocation=src.slice(0,-"/classesjs/i3geonaocompacto.js".length);break}}}if(i3GEO.configura){i3GEO.configura.locaplic=scriptLocation}return scriptLocation},removeChild:function(id,el){var j=$i(id);if(j){if(!el){el=j.parentNode}el.removeChild(j)}},defineValor:function(id,prop,valor){try{eval("$i('"+id+"')."+prop+"='"+valor+"';")}catch(e){}},in_array:function(x,matriz){var txt="¬"+matriz.join("¬")+"¬";var er=new RegExp("¬"+x+"¬","gim");return((txt.match(er))?true:false)},timedProcessArray:function(items,process,callback){var todo=items.concat();setTimeout(function(){var start=+new Date();do{process(todo.shift())}while(todo.length>0&&(+new date()-start<50));if(todo.length>0){setTimeout(arguments.callee,25)}else{callback(items)}},25)},multiStep:function(steps,args,callback){var tasks=steps.concat();setTimeout(function(){var task=tasks.shift(),a=args.shift();task.apply(null,a||[]);if(tasks.length>0){setTimeout(arguments.callee,25)}else{callback()}},25)},tamanhoBrowser:function(){var viewportwidth,viewportheight;if(typeof window.innerWidth!='undefined'){viewportwidth=window.innerWidth,viewportheight=window.innerHeight}else if(typeof document.documentElement!='undefined'&&typeof document.documentElement.clientWidth!='undefined'&&document.documentElement.clientWidth!=0){viewportwidth=document.documentElement.clientWidth,viewportheight=document.documentElement.clientHeight}else{viewportwidth=document.getElementsByTagName('body')[0].clientWidth,viewportheight=document.getElementsByTagName('body')[0].clientHeight}viewportwidth=viewportwidth-i3GEO.util.getScrollerWidth();return[viewportwidth,viewportheight]},detectaTablet:function(){var p,c=DetectaMobile("DetectMobileLong");if(c===false){return false}p=confirm("Direciona para a versão adaptada para tablets?");if(p){window.location=i3GEO.configura.locaplic+'/interface/'+i3GEO.Interface.ALTTABLET+'?'+i3GEO.configura.sid;return true}}};try{YAHOO.namespace("lutsr");YAHOO.lutsr.accordion={properties:{animation:true,animationDuration:10,multipleOpen:false,Id:"sanfona",altura:200,ativa:0},init:function(animation,animationDuration,multipleOpen,Id,altura,ativa){if(animation){this.properties.animation=animation}if(animationDuration){this.properties.animationDuration=animationDuration}if(multipleOpen){this.properties.multipleOpen=multipleOpen}if(Id){this.properties.Id=Id}if(altura){this.properties.altura=altura}if(ativa){this.properties.ativa=ativa}var accordionObject=document.getElementById(this.properties.Id),headers,bodies;if(accordionObject){if(accordionObject.nodeName==="DL"){headers=accordionObject.getElementsByTagName("dt");bodies=headers[0].parentNode.getElementsByTagName("dd")}this.attachEvents(headers,0)}},attachEvents:function(headers,nr){var i,headerProperties,parentObj,header;for(i=0;i<headers.length;i++){headerProperties={objRef:headers[i],nr:i,jsObj:this};YAHOO.util.Event.addListener(headers[i],"click",this.clickHeader,headerProperties)}parentObj=headers[this.properties.ativa].parentNode;headers=parentObj.getElementsByTagName("dd");header=headers[this.properties.ativa];this.expand(header)},clickHeader:function(e,headerProperties){var parentObj=headerProperties.objRef.parentNode,headers=parentObj.getElementsByTagName("dd"),header=headers[headerProperties.nr],i;if(YAHOO.util.Dom.hasClass(header,"open")){headerProperties.jsObj.collapse(header)}else{if(headerProperties.jsObj.properties.multipleOpen){headerProperties.jsObj.expand(header)}else{for(i=0;i<headers.length;i++){if(YAHOO.util.Dom.hasClass(headers[i],"open")){headerProperties.jsObj.collapse(headers[i])}}headerProperties.jsObj.expand(header)}}},collapse:function(header){YAHOO.util.Dom.removeClass(YAHOO.util.Dom.getPreviousSibling(header),"selected");if(!this.properties.animation){YAHOO.util.Dom.removeClass(header,"open")}else{this.initAnimation(header,"close")}},expand:function(header){YAHOO.util.Dom.addClass(YAHOO.util.Dom.getPreviousSibling(header),"selected");if(!this.properties.animation){YAHOO.util.Dom.addClass(header,"open")}else{this.initAnimation(header,"open")}},initAnimation:function(header,dir){var attributes,animation,animationEnd;if(dir==="open"){YAHOO.util.Dom.setStyle(header,"visibility","hidden");YAHOO.util.Dom.setStyle(header,"height",this.properties.altura);YAHOO.util.Dom.addClass(header,"open");attributes={height:{from:0,to:this.properties.altura}};YAHOO.util.Dom.setStyle(header,"height",0);YAHOO.util.Dom.setStyle(header,"visibility","visible");animation=new YAHOO.util.Anim(header,attributes);animationEnd=function(){header.style.height=this.properties.altura+"px"};animation.duration=this.properties.animationDuration;animation.useSeconds=false;animation.onComplete.subscribe(animationEnd);animation.animate()}else if("close"){attributes={height:{to:0}};animationEnd=function(){YAHOO.util.Dom.removeClass(header,"open")};animation=new YAHOO.util.Anim(header,attributes);animation.duration=this.properties.animationDuration;animation.useSeconds=false;animation.onComplete.subscribe(animationEnd);animation.animate()}}}}catch(e){}$im=function(g){return i3GEO.util.$im(g)};$inputText=function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome){if(arguments.length===6){nome=""}return i3GEO.util.$inputText(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome)};$top=function(id,valor){i3GEO.util.$top(id,valor)};$left=function(id,valor){i3GEO.util.$left(id,valor)};
355   -g_traducao={"p1":[{pt:"O i3Geo &eacute; software livre! Para download clique <a href='http://mapas.mma.gov.br/download' target=blank >aqui</a>. <b><a href='http://"+window.location.host+"/i3geo/mobile/qrcode.htm' target=blank >Qrcode mobile</a></b>",en:"I3geo is a open source software! <a href='http://mapas.mma.gov.br/download' target=blank >Click</a> to download.",es:"I3Geo es software libre. <a href='http://mapas.mma.gov.br/download' target=blank > Download</a>",it:"I3geo è un software libero! <a href='http://mapas.mma.gov.br/download' target=blank >clicca qui </a> per il download."}],"p2":[{pt:"Filtro de cores",en:"Image type",es:"Tipo de imagen",it:"Tipo di immagine"}],"p3":[{pt:"Legenda",en:"Legend",es:"Subt&iacute;tulo",it:"Legenda"}],"p4":[{pt:"Escala",en:"Scale",es:"Escala",it:"Scala"}],"p5":[{pt:"Tamanho",en:"Size",es:"Tama&ntilde;o",it:"Dimensione"}],"p6":[{pt:"Ativa/desativa entorno",en:"Enable/Disable surrounding",es:"Activar/desactivar entorno",it:"Attiva / Disattiva campo"}],"p7":[{pt:"Ativa/desativa logo",en:"Enable/Disable logo",es:"Activar/desactivar logomarca",it:"Attiva / disattiva logo"}],"p8":[{pt:"Cor da selecao",en:"Selection color",es:"Color de la selecci&oacute;n",it:"Colore della selezione"}],"p9":[{pt:"Cor do fundo",en:"Background color",es:"Color del fondo",it:"Colore dello sfondo"}],"p10":[{pt:"Grade de coordenadas",en:"Graticule",es:"Grado de coordenadas",it:"Reticolo"}],"p11":[{pt:"Template",en:"Template",es:"Template",it:"Template"}],"p12":[{pt:"Temporizador",en:"Timer",es:"Temporizador",it:"Temporizzazione"}],"p13":[{pt:"Propriedades",en:"Properties",es:"Propiedades",it:"Proprietà"}],"p14":[{pt:"Aplicar",en:"Apply",es:"Aplicar",it:"Applica"}],"p15":[{pt:"Formato da imagem do mapa",en:"Image map format",es:"Formato de la imagen del mapa",it:"Image map format"}],"p16":[{pt:"Camadas de fundo",en:"Base layers",es:"Base layers",it:"Base layers"}],"p17":[{pt:"Imprime legenda",en:"Enable legend",es:"Activar Subtitulo",it:"Attiva legenda"}],"p18":[{pt:"Não imprime a legenda",en:"Disable legend",es:"Desactivar Subtitulo",it:"Disattiva legenda"}],"p19":[{pt:"Ativa ou desativa a legenda de um tema na opção de impressão do mapa",en:"Ativa ou desativa a legenda de um tema na opção de impressão do mapa",es:"Ativa ou desativa a legenda de um tema na opção de impressão do mapa",it:"Ativa ou desativa a legenda de um tema na opção de impressão do mapa"}],"p20":[{pt:"Tela remota",en:"Tela remota",es:"Tela remota",it:"Tela remota"}],"s1":[{pt:"Ajuda",en:"Help",es:"Ayuda",it:"Aiuto?"}],"s2":[{pt:"An&aacute;lise",en:"Analysis",es:"An&aacute;lisis",it:"Analisi"}],"s3":[{pt:"Janelas",en:"Windows",es:"Ventanas",it:"Finestra"}],"s4":[{pt:"Arquivo",en:"Files",es:"Archivo",it:"Archivio"}],"s5":[{pt:"Propriedades",en:"Properties",es:"Propiedades",it:"Proprietà"}],"u1":[{pt:"Sobre o i3Geo",en:"About",es:"Sobre I3Geo",it:"Informazioni WebGis"}],"u2":[{pt:"Doc. dos c&oacute;digos",en:"Doc. of the codes",es:"Doc. de los c&oacute;digos",it:"Doc. dei codici"}],"u3":[{pt:"WikiBook",en:"WikiBook",es:"WikiBook",it:"WikiBook"}],"u4":[{pt:"Tutoriais",en:"Tutorials",es:"Tutoriales",it:"Guida"}],"u5":[{pt:"Blog",en:"Blog",es:"Blog",it:"Blog"}],"u5a":[{pt:"Software p&uacute;blico",en:"Software p&uacute;blico",es:"Software p&uacute;blico",it:"Software pubblico"}],"u5b":[{pt:"Lista de fun&ccedil;&otilde;es",en:"Function list",es:"Lista de funciones",it:"Lista delle funzioni"}],"u5c":[{pt:"Redes sociais",en:"Social networks",es:"Redes sociales",it:"Reti sociali"}],"u6":[{pt:"Geometrias",en:"Geometries",es:"Geometr&iacute;as",it:"Geometrie"}],"u7":[{pt:"Grade de poligonos",en:"Polygon grid",es:"Grado de pol&iacute;gonos",it:"Reticolo poligonale"}],"u8":[{pt:"Grade de pontos",en:"Grid of Points",es:"Grado de puntos",it:"Reticolo puntuale"}],"u9":[{pt:"Grade de hex&aacute;gonos",en:"Grid of Hexagons",es:"Grado de hex&aacute;gonos",it:"Reticolo Esagonale"}],"u10":[{pt:"Entorno(Buffer)",en:"Buffer",es:"Entorno (Buffer)",it:"Buffer"}],"u11":[{pt:"Centr&oacute;ide",en:"Centroid",es:"Centro geométrico",it:"Baricentro"}],"u11a":[{pt:"Dist&acirc;ncia entre pontos",en:"Point distance",es:"Distancia de puntos",it:"Distanza tra i punti"}],"u12":[{pt:"N pontos em poligono",en:"N point in polygon",es:"N puntos en pol&iacute;gono",it:"N punti nel Poligono"}],"u13":[{pt:"Ponto em poligono/raster",en:"Point in polygon/raster",es:"Punto en pol&iacute;gono/matriz",it:"Punto nel Poligono / raster"}],"u14":[{pt:"Distribui&ccedil;&atilde;o de pontos",en:"Point distribution",es:"Distribuci&oacute;n de puntos",it:"Distribuzione di punti"}],"u15":[{pt:"Barras de ferramentas",en:"Toolbars",es:"Barras de herramientas",it:"Barre Strumenti"}],"u16":[{pt:"Janela de mensagens",en:"Message window",es:"Ventana de mensajes",it:"Finestra messaggi"}],"u17":[{pt:"Salvar mapa",en:"Save map",es:"Guardar mapa",it:"Salva mappa"}],"u18":[{pt:"Carregar mapa",en:"Load map",es:"Cargar mapa",it:"Apri mappa"}],"u19":[{pt:"Pegar imagens",en:"Get pictures",es:"Tomar im&aacute;genes",it:"Apri immagine"}],"u20":[{pt:"Converter em WMS e WMC",en:"Convert to WMS and WMC",es:"Convertir en WMS y WMC",it:"Converti in WMS e WMC"}],"u20a":[{pt:"Converter em KML",en:"Convert to KML",es:"Convertir en KML",it:"Converti in KML"}],"u21":[{pt:"Gerador de links",en:"Link generator",es:"Generador de enlaces",it:"Genera collegamento"}],"u22":[{pt:"Grade",en:"Graticule",es:"Grado",it:"Reticolo"}],"u23":[{pt:"Ponto",en:"Point",es:"Punto",it:"Punto"}],"u24":[{pt:"Pol&iacute;gono",en:"Polygon",es:"Poligonos",it:"Poligono"}],"u25":[{pt:"Dissolve",en:"Dissolv",es:"Dissolve",it:"Dissolvi"}],"u26":[{pt:"Agrupa",en:"Group",es:"Agrupa",it:"Aggrega"}],"u27":[{pt:"Outros",en:"Others",es:"Otros",it:"Altri"}],"u28":[{pt:"Centro médio",en:"Centro médio",es:"Centro médio",it:"Centro médio"}],"u29":[{pt:"Editor vetorial",en:"Editor vetorial",es:"Editor vetorial",it:"Editor vetorial"}],"t1":[{pt:"Camadas",en:"Layers",es:"Capas",it:"Strati"}],"t2":[{pt:"Arraste o tema aqui para excluir",en:"Drag the layer here to remove",es:"Arrastre el tema aqui para excluirlo",it:"Trascina qui per rimuovere"}],"t2a":[{pt:"Filtra a lista de camadas",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&atilde;o no mapa. Ap&oacute;s alterar o estado do tema, aguarde alguns instantes para o mapa ser redesenhado, ou clique no bot&atilde;o aplicar que ser&aacute; mostrado.",en:"Turn the layer on/off on the map. Wait a few moments to get the map redesigned or press the button to apply it.",es:"Haga clic para conectar o desconectar este tema, mostr&aacute;ndolo o no en el mapa. Despu&eacute;s de alterar el estado del tema, espere algunos instantes para que el mapa sea redise&ntilde;ado, o haga clic en el bot&oacute;n aplicar que se mostrar&aacute;.",it:"Fare clic per attivare o disattivare questo tema. Dopo aver modificato lo stato del tema, La mappa aggiornata sarà visualizzata dopo qualche istante. Per visualizzare subito cliccare su Applica"}],"t3a":[{pt:"Clique para ligar todos os temas",en:"Turn all layers layer on",es:"Haga clic para conectar los temas",it:"Turn all layers on"}],"t3b":[{pt:"Clique para desligar todos os temas",en:"Turn all layers layer off",es:"Haga clic para desconectar los temas",it:"Turn all layers off"}],"t4":[{pt:"limpa sele&ccedil;&atilde;o",en:"Clear selection",es:"Limpia la selecci&oacute;n",it:"Pulizia della selezione"}],"t4a":[{pt:"zoom para a sele&ccedil;&atilde;o",en:"Zoom to selection",es:"Zoom a la selecci&oacute;n",it:"Zoom della selezione"}],"t5":[{pt:"Limpa sele&ccedil;&atilde;o existente nesse tema",en:"Clear selection",es:"Limpia la selecci&oacute;n existente en este tema",it:"Pulizia della selezione esistente in questo strato"}],"t6":[{pt:"Clique para fazer o download desse tema no formato shapefile",en:"Click to download in shapefile format",es:"Haga clic para hacer el download",it:"Clicca per il download di questo tema nel formato Shapefile"}],"t7":[{pt:"clique e arraste",en:"dragging",es:"Haga clic y arrastre",it:"Clicca e trascina"}],"t7a":[{pt:"Clique e arraste para mudar a ordem. Arraste e solte na lixeira para remover. Aguarde para ver a legenda.",en:"dragging or wait",es:"Haga clic y arrastre",it:"Clicca e trascina"}],"t8":[{pt:"arraste para mudar a ordem",en:"drag to change the draw order",es:"Arrastre para cambiar la orden",it:"Trascina per modificare l'ordine"}],"t9":[{pt:"A escala do tema &eacute; compat&iacute;vel com a escala do mapa",en:"The scale of the layer is compatible with the scale of the map",es:"La escala del tema es compatible con la escala del mapa",it:"La scala del tema è compatibile con la scala della mappa"}],"t10":[{pt:"A escala do tema &eacute incompat&iacute;vel com a escala do mapa",en:"The scale of the layer is incompatible with the scale of the map",es:"La escala del tema es incompatible con la escala del mapa",it:"La scala del tema è incompatibile con la scala della mappa"}],"t11":[{pt:"A escala do tema n&atilde;o &eacute conhecida",en:"The scale of the layer is not known",es:"La escala del tema no es conocida",it:"La scala del tema non è conosciuta"}],"t12":[{pt:"excluir",en:"delete",es:"Excluir",it:"Eliminare"}],"t12a":[{pt:"Clique para excluir esse tema do mapa.",en:"Delete layer of the map.",es:"Haga clic para excluir este tema del mapa",it:"Clicca per rimuovere questo strato della mappa"}],"t13":[{pt:"sobe",en:"up",es:"Sube",it:"Mettere sopra "}],"t14":[{pt:"Clique para subir esse tema na ordem de desenho",en:"Drag the layer up",es:"Haga clic para subir ese tema en la orden de dise&ntilde;o",it:"Clicca per sollevare questo tema nell’ordine di progettazione"}],"t15":[{pt:"desce",en:"down",es:"Baja",it:"scendere"}],"t16":[{pt:"Clique para descer esse tema na ordem de desenho",en:"Drag the layer down",es:"Haga clic para bajar este tema en la orden de dise&ntilde;o",it:"Clicca per scendere questo tema nell’ordine di progettazione."}],"t17":[{pt:"zoom para o tema",en:"zoom to a layer",es:"Zoom para el tema",it:"Zoom al tema"}],"t18":[{pt:"Clique para ajustar o mapa de forma a mostrar todo o tema",en:"Click to adjust the map in order to show the whole layer",es:"Haga clic para ajustar el mapa de forma para que muestre todo el tema",it:"Clicca per regolare la mappa per visualizzare tutto lo strato"}],"t18a":[{pt:"Op&ccedil;&otilde;es e propriedades",en:"Options",es:"Opciones",it:"Opzioni"}],"t18b":[{pt:"Legenda",en:"Legend",es:"Subtitulo",it:"Legenda"}],"t19":[{pt:"Altera a transparência do tema, possibilitando que as camadas inferiores possam ser vistas.",en:"Change the layer transparency.",es:"Altera la transparencia del tema, haciendo posible que las capas inferiores puedan verse",it:"Modifica la trasparenza del tema, consentendo che gli strati più bassi siano visti"}],"t20":[{pt:"Opacidade:",en:"Opacity",es:"Opacidad",it:"Opacità"}],"t21a":[{pt:"Muda o nome atual do tema. Utilize para melhorar a legenda do mapa.",en:"Change layer name.",es:"Cambia el nombre actual del tema. Utilice para mejorar el subtitulo del mapa.",it:"Cambia il nome del tema corrente. Utilizzare per migliorare la legenda della mappa."}],"t21":[{pt:"Novo nome:",en:"New name",es:"Nuevo nombre",it:"Nuovo nome"}],"t22":[{pt:"Localize elementos no tema com base em seus atributos descritivos.",en:"Find elements on the layer based on their descriptive attributes.",es:"Ubique elementos en el tema con base en sus atributos descriptivos",it:"Trova gli elementi nel tema secondo i suoi attributi descrittivi."}],"t23":[{pt:"Procurar",en:"Search...",es:"Buscar...",it:"Cerca..."}],"t24":[{pt:"Crie uma nova camada no mapa para apresentar textos descritivos sobre esse tema, tendo como base a tabela de atributos.",en:"Create a new layer to display descriptive texts on the subject, based on table of attributes.",es:"Crear una nueva capa en el mapa para presentar textos descriptivos sobre este tema, teniendo como base la tabla de atributos",it:"Creare un nuovo strato sulla mappa per visualizzare testi descrittivi sul tema, secondo la tabella di attributi."}],"t25":[{pt:"Texto (nomes ou valores)",en:"Label...",es:"Texto...",it:"Testo..."}],"t26":[{pt:"Defina as etiquetas que ser&atilde;o mostradas quando o mouse &eacute; estacionado sobre um elemento desse tema.",en:"Set the tooltips that will be shown when the mouse is over the element of that layer.",es:"Defina las etiquetas que se mostrar&aacute;n cuando el rat&oacute;n se estaciona sobre un elemento de este tema",it:"Definire le etichette da visualizzare quando il mouse si ferma su un elemento di questo tema."}],"t27":[{pt:"Ativar etiquetas",en:"Tooltip...",es:"Etiquetas...",it:"Descrizioni..."}],"t28":[{pt:"Insira um filtro nesse tema para mostrar apenas determinadas informa&ccedil;&otilde;es, com base na tabela de atributos.",en:"Filter based on the table of attributes.",es:"Inserte un filtro en este tema para mostrar solo determinadas informaciones, con base en la tabla de atributos",it:"Inserisci un filtro in questo tema per mostrare solo determinate informazioni, con base nella tabella di attributi"}],"t29":[{pt:"Filtrar",en:"Filter...",es:"Filtro...",it:"Filtro..."}],"t30":[{pt:"Veja a tabela de atributos relacionada a esse tema.",en:"See the table of attributes related to that layer.",es:"Vea la tabla de atributos relacionada con este tema",it:"Vedi la tabella degli attributi di questo tema."}],"t31":[{pt:"Tabela com os dados",en:"Table...",es:"Tabla...",it:"Tabella..."}],"t32":[{pt:"Abre o editor de legenda, permitindo a alteração da forma de representação desse tema.",en:"Opens the editor of legend, allowing the modification of the form of representation of this theme.",es:"Abre el editor de subtítulo, permitiendo la alteraci&oacute;n de la forma de representaci&oacute;n de este tema",it:"Aprire l'editor di legenda, che consente la modifica della forma di rappresentazione di questo tema "}],"t33":[{pt:"Editar legenda",en:"Legend edit...",es:"Editar subtítulo...",it:"Modifica la legenda"}],"t34":[{pt:"Mostra os dados desse tema em uma janela que acompanha o mouse.",en:"The data shows that layer in a window that tracks the mouse.",es:"Muestra los datos de este tema en una ventana que acompa&ntilde;a el rat&oacute;n",it:"Mostra i dati di questo tema in una finestra che accompagna il mouse."}],"t35":[{pt:"Mostra em janela",en:"Show in window",es:"Muestra en la ventana...",it:"Mostra nella finestra..."}],"t36":[{pt:"tema vis&iacute;vel apenas em determinadas escalas",en:"the layer is visible in specific scales",es:"capa visible en ciertas escalas",it:"Tema visibile solo a determinate scale"}],"t37":[{pt:"Gráfico",en:"Graphic",es:"Gr&aacute;fico",it:"Grafico"}],"t38":[{pt:"Exporta a legenda para o padrão SLD.",en:"Export the legend to SLD.",es:"Exporta a legenda para o padrão SLD.",it:"Exporta a legenda para o padrão SLD."}],"t39":[{pt:"Exportar SLD",en:"SLD...",es:"SLD...",it:"SLD..."}],"t40":[{pt:"Abre a ferramenta que permite alterar o SQL de acesso aos dados",en:"Abre a ferramenta que permite alterar o SQL de acesso aos dados",es:"Abre a ferramenta que permite alterar o SQL de acesso aos dados",it:"Abre a ferramenta que permite alterar o SQL de acesso aos dados"}],"t41":[{pt:"Editar SQL",en:"SQL...",es:"SQL...",it:"SQL..."}],"t42":[{pt:"Efeito cortina",en:"Curtain...",es:"Cortina...",it:"Tenda..."}],"t43":[{pt:"Aplicar SLD",en:"Aplicar SLD...",es:"Aplicar SLD...",it:"Aplicar SLD..."}],"t44":[{pt:"Salvar mapfile",en:"Save mapfile",es:"Guardar mapfile",it:"Salva mapfile"}],"t45":[{pt:"Comentar",en:"Comentar",es:"Comentar",it:"Comentar"}],"t46":[{pt:"Mais populares",en:"Mais populares",es:"Mais populares",it:"Mais populares"}],"t47":[{pt:"Intervalo em segundos após o qual a camada será atualizada. Para ignorar, deixe em branco",en:"Intervalo em segundos após o qual a camada será atualizada. Para ignorar, deixe em branco",es:"Intervalo em segundos após o qual a camada será atualizada. Para ignorar, deixe em branco",it:"Intervalo em segundos após o qual a camada será atualizada. Para ignorar, deixe em branco"}],"t48":[{pt:"Temporizador",en:"Temporizador",es:"Temporizador",it:"Temporizador"}],"a1":[{pt:"procurar tema:",en:"search layer:",es:"Buscar datos:",it:"Ricerca il tema:"}],"a2":[{pt:"Upload de shape file",en:"Upload shape file",es:"Upload de shape file",it:"Upload del shape file"}],"a2b":[{pt:"Upload de arquivo dbf ou CSV",en:"Upload dbf or CSV file",es:"Upload de archivo dbf o CSV",it:"Upload del file dbf o CSV"}],"a3":[{pt:"Download de dados",en:"Data download",es:"Download de datos",it:"Download dei dati"}],"a3a":[{pt:"Importar Web Map Context (WMC)",en:"Importar Web Map Context (WMC)",es:"Importar Web Map Context (WMC)",it:"Importar Web Map Context (WMC)"}],"a4":[{pt:"Conectar com servidor WMS",en:"WMS server connection",es:"Conectar con el servidor WMS",it:"Connetti con il server WMS"}],"a4b":[{pt:"Conectar com servidor WMS-T",en:"WMS-T server connection",es:"Conectar con el servidor WMS-T",it:"Connetti con il server WMS-T"}],"a5":[{pt:"Conectar com GeoRss",en:"GeoRss connection",es:"Conectar con GeoRss",it:"Connetti con il GeoRss"}],"a5a":[{pt:"Nuvem de tags",en:"Tags cloud",es:"Tags",it:"Tag"}],"a6":[{pt:"Acesso aos arquivos do servidor",en:"Access files in server directory",es:"Acceso a los archivos del servidor",it:"Accesso agli archivi del server"}],"a7":[{pt:"Temas",en:"Layers",es:"Temas",it:"Temi"}],"a8":[{pt:"Clique no box ao lado do tema para ligar ou desligar, mostrando-o ou nã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.",en:"Click to connect or disconnect layer, showing it or not on the map. After changing the layer status, wait a few moments to be redesigned the map, or click in the button apply that will be shown.",es:"Haga clic para conectar o desconectar este tema, mostr&aacute;ndolo o no en el mapa. Despu&eacute;s de alterar el estado del tema, espere algunos instantes para que el mapa sea redise&ntilde;ado, o haga clic en el bot&oacute;n aplicar que aparecer&aacute;",it:"Clicca sulla casella accanto al tema per attivare o disattivare, mostrandolo o meno sulla mappa. Dopo aver modificato lo stato del tema, attendere qualche istante per vedere ridisegnata la mappa, oppure fare clic sul pulsante Applica, che verrà visualizzato."}],"a9":[{pt:"fonte",en:"font",es:"Fuente",it:"Fonte"}],"a10":[{pt:"c&oacute;digo:",en:"code",es:"C&oacute;digo",it:"Codice"}],"a11":[{pt:"Sistemas",en:"Systems",es:"Sistemas",it:"Sistemi"}],"a12":[{pt:"Abrir sistema",en:"Open system",es:"Abrir sistema",it:"Aprire il sistema"}],"a13":[{pt:"Abrir no Google Earth",en:"Open in Google Earth",es:"Abrir no Google Earth",it:"Abrir no Google Earth"}],"a14":[{pt:"Upload SHP, CSV, DBF, GPX, KML",en:"Upload SHP, CSV, DBF, GPX, KML",es:"Upload SHP, CSV, DBF, GPX, KML",it:"Upload SHP, CSV, DBF, GPX, KML"}],"g1":[{pt:"Temas",en:"Layer",es:"Temas",it:"Temi"}],"g1a":[{pt:"Catálogo",en:"Catalog",es:"Catalogo",it:"Catalog"}],"g2":[{pt:"Adiciona",en:"Add",es:"Agrega",it:"Aggiunge"}],"g3":[{pt:"Legenda",en:"Legend",es:"Subtítulo",it:"Legenda"}],"g4":[{pt:"Mapas",en:"Maps",es:"Mapas",it:"Mappa"}],"g4a":[{pt:"Mapa",en:"Map",es:"Mapa",it:"Mappe"}],"o1":[{pt:"Aguarde...",en:"Wait...",es:"Espere...",it:"Attendere..."}],"o2":[{pt:"Busca r&aacute;pida...",en:"Quick search...",es:"B&uacute;squeda r&aacute;pida...",it:"Ricerca rapida ..."}],"o3":[{pt:"Lendo imagem...",en:"Loading images...",es:"Leyendo imagen...",it:"Lettura di immagini..."}],"o4":[{pt:"Aguarde...abrindo lente",en:"Wait...Opening lens...",es:"Espere...abriendo lente",it:"Attendere...apertura della lente"}],"o5":[{pt:"Aguarde...iniciando",en:"Wait...initializing",es:"Espere...iniciando",it:"Attendere...partenza"}],"o6":[{pt:"din&acirc;mico",en:"dynamic",es:"Din&aacute;mico",it:"Dinamico"}],"d1":[{pt:"Digite as coordenadas de um ponto (X=longitude e Y=latitude) para localiz&acute;-lo no mapa. O centro do mapa ser&acute; deslocado para o ponto digitado.",en:"Enter the coordinates of a point (X=longitude and Y=latitude) to localize it on the map. The center of the map is move to the point entered.",es:"Digite las coordenadas de un punto (X=longitud e Y=latitud) para ubicarlas en el mapa. El centro del mapa se desplazar&aacute; para el punto digitado.",it:"Inserisci le coordinate di un punto (X=longitudine e Y=latitudine) per individuarlo sulla mappa. Il centro della mappa viene spostato al punto digitato"}],"d2":[{pt:"Altera a escala do mapa ajustando-a para mostrar a mesma abrang&ecirc;ncia geogr&aacute;fica da inicializa&ccedil;&atilde;o.",en:"Change the scale of the map adjusting it to show the same initial geographical cover.",es:"Modifica la escala del mapa ajust&aacute;ndola para mostrar la misma &aacute;rea geogr&aacute;fica inicial",it:"Modificare la scala della mappa adeguandola per mostrare la stessa copertura geografica sin dall'inizializzazione"}],"d3":[{pt:"Amplia o mapa - desloca o ponto clicado para centro da tela ou amplia a regi&atilde;o indicada por um ret&acirc;ngulo. Ap&oacute;s ativada, clique e arraste o mouse sobre o mapa na &aacute;rea de zoom desejada.",en:"Extends the map - place the clicked point in the center of the screen or extends the region indicated by a rectangular.After enabled, click and drag the mouse over the map in the area of zoom desired.",es:"Ampl&iacute;a el mapa - coloca el punto donde se hizo clic en el centro de la pantalla o ampl&iacute;a la regi&oacute;n indicada por un rect&aacute;ngulo. Despu&eacute;s de activarla, haga clic y arrastre el rat&oacute;n sobre el mapa en el &aacute;rea de zoom deseada",it:"Ampliare la mappa - pone il punto cliccato nel centro dello schermo o ingrandisce la regione indicata con un rettangolo. Dopo aver attivata, cliccare e trascinare il mouse sopra la mappa nell’area di zoom desiderata."}],"d4":[{pt:"Desloca a regi&atilde;o vis&iacute;vel no mapa. Ap&oacute;s ativada, clique e arraste o mouse sobre o mapa para deslocar a regi&atilde;o vis&iacute;vel.",en:"Shifts the region visible on the map. Once activated, click and drag the mouse over the map to move the visible region.",es:"Desloca la regi&oacute;n visible en el mapa",it:"Sposta la regione visibile sulla mappa. Dopo averla attivata, cliccare e trascinare il mouse sulla mappa per spostare la regione visibile "}],"d5":[{pt:"Amplia o mapa tendo como refer&ecirc;ncia o centro atual.",en:"Magnify the map with the reference the current center.",es:"Ampl&iacute;a el mapa teniendo como referencia el centro actual",it:"Estendi la mappa tenendo come riferimento il centro corrente."}],"d6":[{pt:"Reduz o mapa tendo como refer&ecircncia o centro atual.",en:"Reduces the map as having reference the current center.",es:"Reduce el mapa teniendo como referencia el centro actual",it:"Riduci la mappa tenendo come referimento il centro corrente"}],"d7":[{pt:"Mostra informa&ccedil;&otilde;es sobre um ponto no mapa. Ap&oacute;s ativada, clique sobre o mapa.",en:"Displays information about a point on the map. Once activated, click on it.",es:"Muestra informaci&oacute;n sobre un punto en el mapa. Despu&eacute;s de activarla haga clic sobre el mismo.",it:"Mostra gli informazioni su un punto sulla mappa. Dopo averla attivata, fare clic su di esso."}],"d7a":[{pt:"Mostra informa&ccedil;&otilde;es sobre um ponto no mapa. Ap&oacute;s ativada, pare o mouse por alguns instantes no ponto desejado ou clique sobre o mesmo.",en:"Displays information about a point on the map. Once activated, stop the mouse for a few moments at the desired point or click on it.",es:"Muestra informaci&oacute;n sobre un punto en el mapa. Despu&eacute;s de activarla, pare el rat&oacute;n por algunos instantes en el punto deseado o haga clic sobre el mismo.",it:"Mostra gli informazioni su un punto sulla mappa. Dopo averla attivata, fermare il mouse per qualche istante nel punto desiderato o fare clic su di esso."}],"d8":[{pt:"Mostra a extens&atilde;o geogr&aacute;fica atual em coordenadas geogr&aacute;ficas",en:"It shows the extent of current geographic coordinates",es:"Muestra la extensi&oacute;n geográfica actual en coordenadas geogr&aacute;ficas",it:"Mostra la estensione geografica corrente in coordinate geografiche"}],"d9":[{pt:"Abre/fecha o mapa de refer&ecirc;ncia",en:"Open/close the reference map ",es:"Abre/cierra el mapa de referencia",it:"Apertura/chiusura della mappa di riferimento"}],"d10":[{pt:"Digite o novo valor de escala e clique no bot&atilde;o aplicar para alterar a escala do mapa",en:"Enter the new value of scale and click the button Apply to change the scale of the map",es:"Digite el nuevo valor de escala y haga clic en el bot&oacute;n aplicar para modificar la escala del mapa",it:"Immettere il nuovo valore di scala e clicca sul pulsante Applica per cambiare la scala della mappa"}],"d11":[{pt:"Busca dados na Wikipedia na abrang&ecirc;ncia atual do mapa. Fa&ccedil;a um zoom no mapa antes de abrir essa op&ccedil;&atilde;o. Regi&ocirc;es muito extensas podem tornar a busca muito demorada",en:"Search data on Wikipedia in the current scope of the map. Make a zoom on the map before opening this option. Regions very extensive can make a very long search ",es:"Busca datos en Wikipedia en el alcance actual del mapa. Haga zoom en el mapa antes de abrir esta opci&oacute;n. Regiones muy extensas pueden ocasionar una b&uacute;squeda muy lenta",it:"Ricerca dati su Wikipedia nell'ambito corrente della mappa. Fare uno zoom sulla mappa prima dell’apertura di questa opzione. Regioni molto ampie potrebbero causare una ricerca troppo lenta."}],"d12":[{pt:"Imprime o mapa",en:"Print the map",es:"Imprime el mapa",it:"Stampa la mappa"}],"d13":[{pt:"Localiza o IP do usu&aacute;rio no mapa",en:"Locates the user's IP on the map",es:"Ubica el IP del usuario en el mapa",it:"Trova IP dell'utente nella mappa"}],"d14":[{pt:"Gera arquivo para 3d",en:"Generates file for 3d",es:"Genera archivo para 3d",it:"Genera file per 3d"}],"d15":[{pt:"Abre o Google Maps, mostrando uma imagem de sat&eacute;lite da regi&atilde;o vista no mapa principal",en:"Open Google Maps, showing a satellite image of the region's main views on the map",es:"Abre Google Maps, mostrando una imagen de sat&eacute;lite de la regi&oacute;n en el mapa principal",it:"Apri Google Maps, mostrando un'immagine satellitare della regione vista sulla mappa principale."}],"d16":[{pt:"Pesquisa documentos na base de dados Scielo (dados preliminares)",en:"Search documents in the database Scielo (preliminary data)",es:"Busca documentos en la base de datos Scielo (datos preliminares)",it:"Ricerca dei documenti nella base di dati Scielo (dati preliminari)"}],"d17":[{pt:"Projeto Confluence. Pontos de intersec&ccedil;&atilde;o de coordenadas observadas em campo",en:"Confluence Project. Points of intersection of coordinates observed in field",es:"Proyecto Confluence. Puntos de intersecci&oacute;n de coordenadas observadas en campo",it:"Progetto di confluenza. Punti di intersezione delle coordinate osservate in campo"}],"d18":[{pt:"Abre lente de amplia&ccedil;&atilde;o",en:"Opens lens to expansion",es:"Abre lente de ampliaci&oacute;n",it:"Apri lente di ingrandimento"}],"d19":[{pt:"Coloca as guias em uma janela m&oacute;vel",en:"Open the tabs in a window mobile",es:"Coloca las gu&iacute;as en una ventana m&oacute;vil",it:"Aprire le schede in una finestra mobile."}],"d20":[{pt:"Redesenha o mapa com as configura&ccedil;&ocirc;es iniciais.",en:"Reload the map with the initial configurations.",es:"Redise&ntilde;a el mapa con las configuraciones iniciales",it:"Ricarica la mappa con la configurazione iniziale."}],"d21":[{pt:"Mede a dist&acirc;ncia entre dois ou mais pontos clicados no mapa (menor dist&acirc;ncia). O c&aacute;lculo de dist&acirc;ncia &eacute; aproximado e sua precis&atilde;o depende da escala do mapa.",en:"It measures the distance between two or more clicked points on the map (less distance). The calculation of distance is approximate and their accuracy depends on the scale of the map.",es:"Mide la distancia entre dos o m&aacute;s puntos marcados en el mapa (menor distancia). El c&aacute;lculo de distancia es aproximado y su precisi&oacute;n depende de la escala del mapa",it:"Misura la distanza tra due o più punti cliccati sulla mappa (minore distanza). Il calcolo della distanza è approssimativo e la sua precisione dipende dalla scala della mappa."}],"d21a":[{pt:"Mede a &aacute;rea de um pol&iacute;gono desenhado na tela. O c&aacute;lculo de &aacute;rea &eacute; aproximado e sua precis&atilde;o depende da escala do mapa.",en:"It measures the area on the map. The calculation of area is approximate and their accuracy depends on the scale of the map.",es:"Mede a &aacute;rea de um pol&iacute;gono desenhado na tela. O c&aacute;lculo de &aacute;rea &eacute; aproximado e sua precis&atilde;o depende da escala do mapa.",it:"Misura l'area di un poligono tracciato sullo schermo. Il calcolo della superficie è approssimativo e la sua precisione dipende dalla scala della mappa."}],"d22":[{pt:"Insere pontos no mapa em coordenadas geogr&aacute;ficas. Ospontos inclu&iacute;dos podem ser transformados em linhas ou pol&iacute;gonos. Os pontos s&atilde;o armazenados em um tema tempor&aacute;rio, podendo-se fazer o download do arquivo shapefile.",en:"Insert points on the map in geographical coordinates. Items included can be converted into lines or polygons. Items are stored in a temporary layer, can be to download shapefile.",es:"Inserte puntos en el mapa en coordenadas geogr&aacute;ficas. Los puntos incluidos pueden transformarse en l&iacute;neas o pol&iacute;gonos. Los puntos se almacenan en un tema temporal, pudiendo hacerse el download del archivo shapefile.",it:"Inserire punti sulla mappa in coordinate geografiche. I punti inseriti possono essere trasformati in linee o poligoni. I punti vengono memorizzati in un tema temporaneo, con la possibilità di effettuare il download del file Shapefile."}],"d23":[{pt:"Insere um gr&aacute;fico no ponto clicado conforme os atributos existentes no tema escolhido. O tema deve possuir itens com valores num&eacute;ricos na tabela de atributos.",en:"Insert a graphic in the clicked point as the exist attributes in the chosen layer. The layer must have items with numerical values in the table of attributes.",es:"Inserte un gr&aacute;fico en el punto marcado seg&uacute;n los atributos existentes en el tema elejido. El tema debe tener puntos con valores num&eacute;ricos en la tabla de atributos",it:"Inserire un grafico nel punto cliccato con gli attributi che esistono nel tema scelto. Il tema deve avere gli oggetti con valori numerici contenute nella tabella di attributi."}],"d24":[{pt:"Abre as ferramentas para sele&ccedil;&atilde;o de elementos de um tema. Os elementos selecionados podem ser utilizados em outras opera&ccedil;&ocirc;es, como buffer e sele&ccedil;&atilde;o por tema.",en:"Opens the tools to select elements of a layer. The elements selected can be used in other buffer or selection operation by layer .",es:"Abre las herramientas para selecci&oacute;n de elementos de un tema. Los elementos seleccionados pueden utilizarse en otras ",it:"Aprire gli strumenti per selezionare gli elementi di un tema. Gli elementi selezionati possono essere utilizzati in altre operazioni, come ad esempio buffer e selezione per tema."}],"d25":[{pt:"Insere texto no mapa clicando em um ponto. Utilize essa op&ccedil;&atilde;o para adicionar informa&ccedil;&ocirc;es ao mapa.",en:"Insert text on the map by clicking on a point. Use this option to add information on the map.",es:"Inserte texto en el mapa haciendo clic en un punto. Utilice esta opci&oacute;n para agregar informaci&oacute;n al mapa",it:"Inserisci il testo sulla mappa cliccando su un punto. Utilizzare questa opzione per aggiungere informazioni alla mappa."}],"d26":[{pt:"Escolha o visual para os botões e outras caracter&iacute;sticas visuais do mapa",en:"Choose look for the buttons and other map's visual characteristics",es:"Elija la vista para los botones y otras caracter&iacute;sticas visuales del mapa",it:"Scegli il visuale (??) per i pulsanti e le altre caratteristiche visive della mappa."}],"d27":[{pt:"Interface",en:"Interface",es:"Interface",it:"Interface"}],"d28":[{pt:"Aguarde...gerando os arquivos",en:"Wait...",es:"Espere...",it:"Attendere..."}],"d29":[{pt:"Estações metar",en:"Estações metar",es:"Estações metar",it:"Estações metar"}],"d30":[{pt:"Linha do tempo",en:"Time line",es:"Linha do tempo",it:"Linha do tempo"}],"d31":[{pt:"Não existe nenhuma camada com etiquetas ativas",en:"Não existe nenhuma camada com etiquetas ativas",es:"Não existe nenhuma camada com etiquetas ativas",it:"Não existe nenhuma camada com etiquetas ativas"}],"d32":[{pt:"Aplicativos",en:"Applications",es:"Aplicaciones",it:"Applicazioni"}],"ge1":[{pt:"Navegação com o mouse",en:"Navegação com o mouse",es:"Navegação com o mouse",it:"Navegação com o mouse"}],"ge2":[{pt:"Barra de status",en:"Barra de status",es:"Barra de status",it:"Barra de status"}],"ge3":[{pt:"Mapa de referência",en:"Mapa de referência",es:"Mapa de referência",it:"Mapa de referência"}],"ge4":[{pt:"Escala e legenda",en:"Escala e legenda",es:"Escala e legenda",it:"Escala e legenda"}],"ge5":[{pt:"Atmosfera",en:"Atmosfera",es:"Atmosfera",it:"Atmosfera"}],"ge6":[{pt:"Grade de coordenadas",en:"Grade de coordenadas",es:"Grade de coordenadas",it:"Grade de coordenadas"}],"ge7":[{pt:"Luz do sol",en:"Luz do sol",es:"Luz do sol",it:"Luz do sol"}],"ge8":[{pt:"Limites políticos",en:"Limites políticos",es:"Limites políticos",it:"Limites políticos"}],"ge9":[{pt:"Construções em 3d",en:"Construções em 3d",es:"Construções em 3d",it:"Construções em 3d"}],"ge10":[{pt:"Estradas",en:"Estradas",es:"Estradas",it:"Estradas"}],"ge11":[{pt:"Terreno",en:"Terreno",es:"Terreno",it:"Terreno"}]};
356   -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.idioma={MOSTRASELETOR:true,IDSELETOR:"",SELETORES:["pt","en","es"],DICIONARIO:g_traducao,define:function(codigo){i3GEO.idioma.ATUAL=codigo;i3GEO.util.insereCookie("i3geolingua",codigo)},retornaAtual:function(){return(i3GEO.idioma.ATUAL)},defineDicionario:function(obj){i3GEO.idioma.DICIONARIO=obj},alteraDicionario:function(id,novo){i3GEO.idioma.DICIONARIO[id][0][i3GEO.idioma.ATUAL]=novo},traduzir:function(id){if(i3GEO.idioma.DICIONARIO[id]){var t=i3GEO.idioma.DICIONARIO[id][0];return t[i3GEO.idioma.ATUAL]}else{return}},adicionaDicionario:function(novodic){for(var k in novodic){if(novodic.hasOwnProperty(k)){i3GEO.idioma.DICIONARIO[k]=novodic[k]}}},mostraDicionario:function(){var w,k;w=window.open();for(k in i3GEO.idioma.DICIONARIO){if(i3GEO.idioma.DICIONARIO.hasOwnProperty(k)){w.document.write(k+" = "+i3GEO.idioma.traduzir(k)+"<br>")}}},trocaIdioma:function(codigo){i3GEO.util.insereCookie("i3geolingua",codigo);window.location.reload(true)},listaIdiomas:function(){for(var k in i3GEO.idioma.DICIONARIO){if(i3GEO.idioma.DICIONARIO.hasOwnProperty(k)){return(i3GEO.util.listaChaves(i3GEO.idioma.DICIONARIO[k][0]))}}},mostraSeletor:function(){if(!i3GEO.idioma.MOSTRASELETOR){return}var ins,n,w,i,pos,novoel,temp,iu=i3GEO.util;ins="";n=i3GEO.idioma.SELETORES.length;if($i("i3geo")&&i3GEO.parametros.w<550){w="width:12px;"}else{w=""}for(i=0;i<n;i++){temp=i3GEO.idioma.SELETORES[i];ins+='<img style="'+w+'padding:0 0px;top:-7px;padding-right:0px;border: 1px solid white;" src="'+iu.$im("branco.gif")+'" onclick="i3GEO.idioma.trocaIdioma(\''+temp+'\')" ';if(temp==="en"){ins+='alt="Ingles" id="uk" />'}if(temp==="pt"){ins+='alt="Portugues" id="brasil" />'}if(temp==="es"){ins+='alt="Espanhol" id="espanhol" />'}if(temp==="it"){ins+='alt="Italiano" id="italiano" />'}}if(i3GEO.idioma.IDSELETOR!==""&&$i(i3GEO.idioma.IDSELETOR)){$i(i3GEO.idioma.IDSELETOR).innerHTML=ins}else{pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if(!$i("i3geoseletoridiomas")){novoel=document.createElement("div");novoel.innerHTML=ins;novoel.id="i3geoseletoridiomas";document.body.appendChild(novoel)}else{novoel=$i("i3geoseletoridiomas")}novoel.style.position="absolute";novoel.style.top=pos[1]-17+"px";novoel.style.left=pos[0]+"px";novoel.style.zIndex=5000}}};var $trad=function(id){return(i3GEO.idioma.traduzir(id))};(function(){try{var c=i3GEO.util.pegaCookie("i3geolingua");if(c){i3GEO.idioma.define(c);g_linguagem=c}else{if(typeof(g_linguagem)!=="undefined"){i3GEO.idioma.define(g_linguagem)}else{g_linguagem="pt";i3GEO.idioma.define("pt")}}if(typeof('g_traducao')!=="undefined"){i3GEO.idioma.defineDicionario(g_traducao)}}catch(e){alert("Problemas com idiomas "+e)}})();
357   -if(typeof(i3GEO)==='undefined'){i3GEO=[]}cpJSON=new cpaint();cpJSON.set_response_type("JSON");i3GEO.php={verifica:function(){if(i3GEO.configura.locaplic===undefined){alert("i3GEO.php diz: variavel i3GEO.configura.locaplic não esta definida")}if(i3GEO.configura.sid===undefined){alert("i3GEO.php diz: variavel i3GEO.configura.sid não esta definida")}},insereSHPgrafico:function(funcao,tema,x,y,itens,shadow_height,width,inclinacao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=insereSHPgrafico&tipo=pizza&tema="+tema+"&x="+x+"&y="+y+"&itens="+itens+"&shadow_height="+shadow_height+"&width="+width+"&inclinacao="+inclinacao+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"insereSHPgrafico",funcao)},insereSHP:function(funcao,tema,item,valoritem,xy,projecao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=insereSHP&item="+item+"&valor="+valoritem+"&tema="+tema+"&xy="+xy+"&projecao="+projecao+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"insereSHP",funcao)},pegaMensagens:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegaMensagens&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaMensagem",funcao)},areaPixel:function(funcao,g_celula){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=areaPixel&celsize="+g_celula+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"areaPixel",funcao)},excluitema:function(funcao,temas){var layer,retorno,p,n,i;i3GEO.php.verifica();retorno=function(retorno){n=temas.length;for(i=0;i<n;i++){if(i3GEO.Interface.ATUAL==="openlayers"){layer=i3geoOL.getLayersByName(temas[i]);if(layer.length>0){i3geoOL.removeLayer(layer[0])}}if(i3GEO.Interface.ATUAL==="googlemaps"){indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(temas[i]);if(indice!==false){i3GeoMap.overlayMapTypes.removeAt(indice)}}if(i3GEO.Interface.ATUAL==="googleearth"){indice=i3GEO.Interface.googleearth.retornaObjetoLayer(temas[i]);i3GeoMap.getFeatures().removeChild(indice)}}funcao.call(retorno)};p=i3GEO.arvoreDeCamadas.LOCAPLIC+"/classesphp/mapa_controle.php?funcao=excluitema&temas="+temas+"&g_sid="+i3GEO.arvoreDeCamadas.SID;cpJSON.call(p,"excluitema",retorno)},reordenatemas:function(funcao,lista){i3GEO.php.verifica();var p=i3GEO.arvoreDeCamadas.LOCAPLIC+"/classesphp/mapa_controle.php?funcao=reordenatemas&lista="+lista+"&g_sid="+i3GEO.arvoreDeCamadas.SID;cpJSON.call(p,"reordenatemas",funcao)},criaLegendaHTML:function(funcao,tema,template){i3GEO.php.verifica();if(arguments.length===1){tema="";template="legenda2.htm"}if(arguments.length===2){template="legenda2.htm"}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=criaLegendaHTML&tema="+tema+"&templateLegenda="+template+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"criaLegendaHTML",funcao)},inverteStatusClasse:function(funcao,tema,classe){i3GEO.php.verifica();var p=i3GEO.arvoreDeCamadas.LOCAPLIC+"/classesphp/mapa_controle.php?funcao=inverteStatusClasse&g_sid="+i3GEO.arvoreDeCamadas.SID+"&tema="+tema+"&classe="+classe;cpJSON.call(p,"inverteStatusClasse",funcao)},ligatemas:function(funcao,desligar,ligar,adicionar){i3GEO.php.verifica();if(arguments.length===3){adicionar="nao"}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=ligatemas&desligar="+desligar+"&ligar="+ligar+"&adicionar="+adicionar+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"ligaDesligaTemas",funcao)},pegalistademenus:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegalistademenus&g_sid="+i3GEO.configura.sid+"&map_file=&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistademenus",funcao)},pegalistadegrupos:function(funcao,id_menu,listasgrupos){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegalistadegrupos&map_file=&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&listasistemas=nao&listasgrupos="+listasgrupos+"&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistadegrupos",funcao)},pegalistadeSubgrupos:function(funcao,id_menu,id_grupo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegalistadeSubgrupos&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&grupo="+id_grupo+"&map_file=&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistadeSubgrupos",funcao)},pegalistadetemas:function(funcao,id_menu,id_grupo,id_subgrupo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegalistadetemas&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&grupo="+id_grupo+"&subgrupo="+id_subgrupo+"&map_file=&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistadetemas",funcao)},listaTemas:function(funcao,tipo,locaplic,sid){if(arguments.length===2){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php?funcao=listatemas&g_sid="+sid+"&tipo="+tipo;cpJSON.call(p,"listaTemas",funcao)},listaTemasEditaveis:function(funcao,locaplic,sid){if(arguments.length===1){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php?funcao=listatemaslocais&g_sid="+sid;cpJSON.call(p,"listatemaslocais",funcao)},listaTemasComSel:function(funcao,locaplic,sid){if(arguments.length===1){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php?funcao=listatemascomsel&g_sid="+sid;cpJSON.call(p,"listaTemasComSel",funcao)},listatemasTipo:function(funcao,tipo,locaplic,sid){if(arguments.length===2){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php?funcao=&funcao=listatemasTipo&tipo="+tipo+"&g_sid="+sid;cpJSON.call(p,"listatemasTipo",funcao)},pegaSistemas:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegaSistemas&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaSistemas",funcao)},listadrives:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=listaDrives&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"listaDrives",funcao)},listaarquivos:function(funcao,caminho){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=listaArquivos&diretorio="+caminho;cpJSON.call(p,"listaArquivos",funcao)},geo2utm:function(funcao,x,y){i3GEO.php.verifica();if($i("aguardeGifAberto")||x<-180){return}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=geo2utm&x="+x+"&y="+y+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"geo2utm",funcao)},desativacgi:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=desativacgi&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"desativacgi",funcao)},pegaMapas:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegaMapas&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaSistemas",funcao)},mudatamanho:function(funcao,altura,largura){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=mudatamanho&altura="+altura+"&largura="+largura+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaSistemas",funcao)},ativalogo:function(funcao,altura,largura){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=ativalogo&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"ativalogo",funcao)},insereAnnotation:function(funcao,pin,xy,texto,position,partials,offsetx,offsety,minfeaturesize,mindistance,force,shadowcolor,shadowsizex,shadowsizey,outlinecolor,cor,sombray,sombrax,sombra,fundo,angulo,tamanho,fonte){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=inserefeature&pin="+pin+"&tipo=ANNOTATION&xy="+xy+"&texto="+texto+"&position="+position+"&partials="+partials+"&offsetx="+offsetx+"&offsety="+offsety+"&minfeaturesize="+minfeaturesize+"&mindistance="+mindistance+"&force="+force+"&shadowcolor="+shadowcolor+"&shadowsizex="+shadowsizex+"&shadowsizey="+shadowsizey+"&outlinecolor="+outlinecolor+"&cor="+cor+"&sombray="+sombray+"&sombrax="+sombrax+"&sombra="+sombra+"&fundo="+fundo+"&angulo="+angulo+"&tamanho="+tamanho+"&fonte="+fonte+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"inserefeature",funcao)},identificaunico:function(funcao,xy,tema,item){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=identificaunico&xy="+xy+"&resolucao=5&tema="+tema+"&item="+item+"&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"identificaunico",funcao)},recuperamapa:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=recuperamapa&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"recuperamapa",funcao)},criaLegendaImagem:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=criaLegendaImagem&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"criaLegendaImagem",funcao)},referenciadinamica:function(funcao,zoom,tipo){i3GEO.php.verifica();if(arguments.length===2){tipo="dinamico"}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=referenciadinamica&g_sid="+i3GEO.configura.sid+"&zoom="+zoom+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"retornaReferenciaDinamica",funcao)},referencia:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=referencia&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"retornaReferencia",funcao)},pan:function(funcao,escala,tipo,x,y){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pan&escala="+escala+"&tipo="+tipo+"&x="+x+"&y="+y+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pan",funcao)},aproxima:function(funcao,nivel){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=aproxima&nivel="+nivel+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"aproxima",funcao)},afasta:function(funcao,nivel){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=afasta&nivel="+nivel+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"afasta",funcao)},zoomponto:function(funcao,x,y,tamanho,simbolo,cor){i3GEO.php.verifica();if(!simbolo){simbolo="ponto"}if(!tamanho){tamanho=15}if(!cor){cor="255 0 0"}var retorno=function(retorno){if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.pan2ponto(x,y);i3GEO.janela.fechaAguarde()}if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.pan2ponto(x,y);i3GEO.janela.fechaAguarde()}funcao.call(retorno)},p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=zoomponto&pin=pin&xy="+x+" "+y+"&g_sid="+i3GEO.configura.sid+"&marca="+simbolo+"&tamanho="+tamanho+"&cor="+cor;cpJSON.call(p,"zoomponto",retorno)},localizaIP:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=localizaIP&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"localizaIP",funcao)},mudaext:function(funcao,tipoimagem,ext,locaplic,sid,atualiza,geo){var retorno,p;if(arguments.length===3){i3GEO.php.verifica();locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid;atualiza=true;geo=false}if(geo===undefined){geo=false}if(atualiza===undefined){atualiza=true}if(ext===undefined){alert("extensao nao definida");return}retorno=function(retorno){switch(i3GEO.Interface.ATUAL){case"googlemaps":if(atualiza===true){i3GEO.Interface.googlemaps.zoom2extent(ext)}break;case"googleearth":if(atualiza===true){i3GEO.Interface.googleearth.zoom2extent(ext)}break;case"openlayers":i3GEO.Interface.openlayers.zoom2ext(ext);break}i3GEO.janela.fechaAguarde();try{funcao.call(retorno)}catch(e){}};p=locaplic+"/classesphp/mapa_controle.php?funcao=mudaext&tipoimagem="+tipoimagem+"&ext="+ext+"&g_sid="+sid+"&geo="+geo;cpJSON.call(p,"mudaext",retorno)},mudaescala:function(funcao,escala){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=mudaescala&escala="+escala+"&g_sid="+i3GEO.configura.sid+"&tipoimagem="+i3GEO.configura.tipoimagem;cpJSON.call(p,"mudaescala",funcao)},aplicaResolucao:function(funcao,resolucao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=crialente&resolucao="+resolucao+"&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"crialente",funcao)},geradestaque:function(funcao,tema,ext){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=geradestaque&tema="+tema+"&g_sid="+i3GEO.configura.sid+"&ext="+ext;cpJSON.call(p,"geradestaque",funcao)},selecaopt:function(funcao,tema,xy,tipo,tolerancia){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=selecaopt&tema="+tema+"&tipo="+tipo+"&xy="+xy+"&tolerancia="+tolerancia+"&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaoPT",funcao)},selecaobox:function(funcao,tema,tipo,box){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=selecaobox&ext="+box+"&g_sid="+i3GEO.configura.sid+"&tipo="+tipo+"&tema="+tema+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaobox",funcao)},selecaoext:function(funcao,tema,tipo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=selecaoext&tema="+tema+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaobox",funcao)},selecaoatrib2:function(funcao,tema,filtro,tipo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=selecaoatrib2&tema="+tema+"&filtro="+filtro+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaoatrib2",funcao)},selecaotema:function(funcao,temao,tema,tipo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=selecaotema&temao="+temao+"&tema="+tema+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaotema",funcao)},sobetema:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=sobetema&tema="+tema+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"sobetema",funcao)},descetema:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?&funcao=descetema&tema="+tema+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"descetema",funcao)},fontetema:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=fontetema&tema="+tema+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"fontetema",funcao)},zoomtema:function(funcao,tema){i3GEO.php.verifica();var retorno,p;retorno=function(retorno){switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde();break;case"googleearth":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde();break;case"openlayers":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde();break;case"padrao":i3GEO.atualiza(retorno);break}};p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=zoomtema&tema="+tema+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"zoomtema",retorno)},zoomsel:function(funcao,tema){i3GEO.php.verifica();var retorno,p;retorno=function(retorno){switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde();break;case"googleearth":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde();break;case"openlayers":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde();break;case"padrao":i3GEO.atualiza(retorno);break}};p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=zoomsel&tema="+tema+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"zoomsel",retorno)},limpasel:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=limpasel&tema="+tema+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"limpasel",funcao)},invertestatuslegenda:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=invertestatuslegenda&tema="+tema+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"invertestatuslegenda",funcao)},aplicaCorClasseTema:function(funcao,idtema,idclasse,rgb){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=alteraclasse&opcao=alteracor&tema="+idtema+"&idclasse="+idclasse+"&cor="+rgb+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"aplicaCorClasseTema",funcao)},mudatransp:function(funcao,tema,valor){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=mudatransp&tema="+tema+"&valor="+valor+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"mudatransp",funcao)},mudanome:function(funcao,tema,valor){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=mudanome&tema="+tema+"&valor="+valor+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"mudanome",funcao)},adicionaTemaWMS:function(funcao,servico,tema,nome,proj,formato,versao,nomecamada,tiporep,suportasld,formatosinfo,locaplic,sid){if(arguments.length===11){i3GEO.php.verifica();locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php?g_sid="+sid+"&funcao=adicionatemawms&servico="+servico+"&tema="+tema+"&nome="+nome+"&proj="+proj+"&formato="+formato+"&versao="+versao+"&nomecamada="+nomecamada+"&tiporep="+tiporep+"&suportasld="+suportasld+"&formatosinfo="+formatosinfo;cpJSON.call(p,"adicionatemawms",funcao)},adicionaTemaSHP:function(funcao,path){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=adicionaTemaSHP&arq="+path;cpJSON.call(p,"adicionaTemaSHP",funcao)},adicionaTemaIMG:function(funcao,path){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=adicionaTemaIMG&arq="+path;cpJSON.call(p,"adicionaTemaIMG",funcao)},identifica:function(funcao,x,y,resolucao,locaplic,sid){var p=locaplic+"/classesphp/mapa_controle.php?funcao=identifica&opcao=tip&xy="+x+","+y+"&resolucao=5&g_sid="+sid;cpJSON.call(p,"identifica",funcao)},identifica2:function(funcao,x,y,resolucao,opcao,locaplic,sid,tema,ext,listaDeTemas){if(arguments.length===4){opcao="tip";locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid;ext="";listaDeTemas=""}if(arguments.length===5){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid;ext="";listaDeTemas=""}if(listaDeTemas===undefined){listaDeTemas=""}var p=locaplic+"/classesphp/mapa_controle.php?funcao=identifica2&opcao="+opcao+"&xy="+x+","+y+"&resolucao=5&g_sid="+sid+"&ext="+ext+"&listaDeTemas="+listaDeTemas;if(opcao!=="tip"){p+="&tema="+tema}cpJSON.call(p,"identifica",funcao)},reiniciaMapa:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=reiniciaMapa&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"reiniciaMapa",funcao)},procurartemas:function(funcao,procurar,locaplic){if(arguments.length===2){locaplic=i3GEO.configura.locaplic}try{var p=locaplic+"/classesphp/mapa_controle.php?funcao=procurartemas&map_file=&procurar="+procurar+"&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"procurartemas",funcao)}catch(e){}},procurartemas2:function(funcao,procurar,locaplic){if(arguments.length===2){locaplic=i3GEO.configura.locaplic}try{var p=locaplic+"/classesphp/mapa_controle.php?funcao=procurartemas2&map_file=&procurar="+procurar+"&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"procurartemas",funcao)}catch(e){}},procurartemasestrela:function(funcao,nivel,fatorestrela,locaplic){if(arguments.length===3){locaplic=i3GEO.configura.locaplic}try{var p=locaplic+"/classesphp/mapa_controle.php?funcao=procurartemasestrela&map_file=&nivel="+nivel+"&fatorestrela="+fatorestrela+"&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"foo",funcao)}catch(e){}},adtema:function(funcao,temas,locaplic,sid){if(arguments.length===2){i3GEO.php.verifica();locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php?funcao=adtema&temas="+temas+"&g_sid="+sid;cpJSON.call(p,"adtema",funcao)},escalagrafica:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=escalagrafica&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"escalagrafica",funcao)},flamingo:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=montaFlamingo&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"montaFlamingo",funcao)},googlemaps:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=googlemaps&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"googlemaps",funcao)},googleearth:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=googleearth&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"googleearth",funcao)},openlayers:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=openlayers&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"openlayers",funcao)},corpo:function(funcao,tipoimagem){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=corpo&tipoimagem="+tipoimagem+"&g_sid="+i3GEO.configura.sid+"&interface="+i3GEO.Interface.ATUAL;if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.recalcPar();p+="&mapexten="+i3GEO.parametros.mapexten}cpJSON.call(p,"corpo",funcao)},criamapa:function(funcao,parametros){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=criaMapa&"+parametros;cpJSON.call(p,"criaMapa",funcao)},inicia:function(funcao,embedLegenda,w,h){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=inicia&embedLegenda="+embedLegenda+"&w="+w+"&h="+h+"&g_sid="+i3GEO.configura.sid+"&interface="+i3GEO.Interface.ATUAL;cpJSON.call(p,"iniciaMapa",funcao)},chaveGoogle:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=chavegoogle&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"chavegoogle",funcao)},listaRSSwsARRAY:function(funcao,tipo){var p=i3GEO.configura.locaplic+"/classesphp/wscliente.php?funcao=listaRSSwsARRAY&rss="+["|"]+"&tipo="+tipo;cpJSON.call(p,"listaRSSwsARRAY",funcao)},listaLayersWMS:function(funcao,servico,nivel,id_ws,nomelayer){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=listaLayersWMS&servico="+servico+"&nivel="+nivel+"&id_ws="+id_ws+"&nomelayer="+nomelayer;cpJSON.call(p,"listaLayersWMS",funcao)},buscaRapida:function(funcao,locaplic,servico,palavra){var p=locaplic+"/classesphp/mapa_controle.php?map_file=&funcao=buscaRapida&palavra="+palavra+"&servico="+servico;cpJSON.call(p,"buscaRapida",funcao)},listaItensTema:function(funcao,tema){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=listaitens&tema="+tema+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"listaItensTema",funcao)},listaValoresItensTema:function(funcao,tema,itemTema){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=listaregistros&unico=sim&tema="+tema+"&itemtema="+itemTema+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"listaRegistros",funcao)},extRegistros:function(funcao,tema,reg){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=extregistros&registro="+reg+"&tema="+tema;cpJSON.call(p,"listaItensTema",funcao)},listaFontesTexto:function(funcao){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=listatruetype";cpJSON.call(p,"listaTrueType",funcao)},listaEpsg:function(funcao){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=listaEpsg";cpJSON.call(p,"listaEpsg",funcao)},criatemaSel:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=criatemasel&tema="+tema+"&nome=Novo tema "+tema;cpJSON.call(p,"chavegoogle",funcao)},pegaData:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=pegadata&tema="+tema;cpJSON.call(p,"pegadata",funcao)},alteraData:function(funcao,tema,data){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=alteradata&tema="+tema+"&novodata="+data;cpJSON.call(p,"alteradata",funcao)},dadosPerfilRelevo:function(funcao,opcao,pontos,amostragem,item){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=dadosPerfilRelevo&opcao="+opcao,cp=new cpaint();cp.set_transfer_mode('POST');cp.set_response_type("JSON");cp.call(p,"foo",funcao,"&pontos="+pontos+"&amostragem="+amostragem+"&item="+item)},funcoesGeometriasWkt:function(funcao,listaWkt,operacao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=funcoesGeometriasWkt&operacao="+operacao,cp=new cpaint();cp.set_transfer_mode('POST');cp.set_response_type("JSON");cp.call(p,"foo",funcao,"&geometrias="+listaWkt)}};
358   -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.configura={grupoLayers:"",oMenuData:{menu:[{nome:$trad("s1"),id:"ajudaMenu"},{nome:$trad("s2"),id:"analise"},{nome:$trad("s3"),id:"janelas"},{nome:$trad("s4"),id:"arquivos"},{nome:$trad("d32"),id:"interface"}],submenus:{"ajudaMenu":[{id:"omenudataAjudamenu1",text:$trad("u1"),url:"http://www.softwarepublico.gov.br/spb/ver-comunidade?community_id=1444332",target:"_blank"},{id:"omenudataAjudamenu2",text:$trad("u2"),url:"javascript:i3GEO.ajuda.abreDoc()"},{id:"omenudataAjudamenu3",text:$trad("u3"),url:"http://pt.wikibooks.org/wiki/I3geo",target:"_blank"},{id:"omenudataAjudamenu4",text:$trad("u4"),url:"http://www.softwarepublico.gov.br/dotlrn/clubs/i3geo/file-storage/index?folder%5fid=22667525",target:"_blank"},{id:"omenudataAjudamenu5",text:$trad("u5a"),url:"http://www.softwarepublico.gov.br",target:"_blank"},{id:"omenudataAjudamenu7",text:$trad("u5b"),url:"../ajuda_usuario.php",target:"_blank"},{id:"omenudataAjudamenu8",text:$trad("u5c"),url:"javascript:i3GEO.ajuda.redesSociais()"}],"analise":[{id:"omenudataAnalise1",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u22")+'</b></span>',url:"#"},{id:"omenudataAnalise2",text:$trad("u7"),url:"javascript:i3GEO.analise.dialogo.gradePol()"},{id:"omenudataAnalise3",text:$trad("u8"),url:"javascript:i3GEO.analise.dialogo.gradePontos()"},{id:"omenudataAnalise4",text:$trad("u9"),url:"javascript:i3GEO.analise.dialogo.gradeHex()"},{id:"omenudataAnalise5",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u23")+'</b></span>',url:"#"},{id:"omenudataAnalise6",text:$trad("u11a"),url:"javascript:i3GEO.analise.dialogo.distanciaptpt()"},{id:"omenudataAnalise7",text:$trad("u12"),url:"javascript:i3GEO.analise.dialogo.nptPol()"},{id:"omenudataAnalise8",text:$trad("u13"),url:"javascript:i3GEO.analise.dialogo.pontoempoligono()"},{id:"omenudataAnalise9",text:$trad("u14"),url:"javascript:i3GEO.analise.dialogo.pontosdistri()"},{id:"omenudataAnalise9a",text:$trad("u28"),url:"javascript:i3GEO.analise.dialogo.centromassa()"},{id:"omenudataAnalise10",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u24")+'</b></span>',url:"#"},{id:"omenudataAnalise11",text:$trad("u25"),url:"javascript:i3GEO.analise.dialogo.dissolve()"},{id:"omenudataAnalise12",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u27")+'</b></span>',url:"#"},{id:"omenudataAnalise13",text:$trad("u6"),url:"javascript:i3GEO.analise.dialogo.analisaGeometrias()"},{id:"omenudataAnalise14",text:$trad("u10"),url:"javascript:i3GEO.analise.dialogo.buffer()"},{id:"omenudataAnalise15",text:$trad("u26"),url:"javascript:i3GEO.analise.dialogo.agrupaElementos()"},{id:"omenudataAnalise16",text:$trad("u11"),url:"javascript:i3GEO.analise.dialogo.centroide()"},{id:"omenudataAnalise17",text:$trad("t37"),url:"javascript:i3GEO.analise.dialogo.graficoInterativo()"},{id:"omenudataAnalise18",text:$trad("d30"),url:"javascript:i3GEO.analise.dialogo.linhaDoTempo()"}],"janelas":[{id:"omenudataJanelas1",text:$trad("u15"),url:"javascript:i3GEO.barraDeBotoes.reativa(0);i3GEO.barraDeBotoes.reativa(1)"},{id:"omenudataJanelas2",text:$trad("u16"),url:"javascript:i3GEO.ajuda.abreJanela()"},{id:"omenudataJanelas3",text:$trad("u29"),url:"javascript:i3GEO.barraDeBotoes.editor.inicia()"}],"arquivos":[{id:"omenudataArquivos1",text:$trad("u17"),url:"javascript:i3GEO.mapa.dialogo.salvaMapa()"},{id:"omenudataArquivos2",text:$trad("u18"),url:"javascript:i3GEO.mapa.dialogo.carregaMapa()"},{id:"omenudataArquivos3",text:$trad("u19"),url:"javascript:i3GEO.gadgets.quadros.listaImagens()"},{id:"omenudataArquivos4",text:$trad("u20"),url:"javascript:i3GEO.mapa.dialogo.convertews()"},{id:"omenudataArquivos5",text:$trad("u20a"),url:"javascript:i3GEO.mapa.dialogo.convertekml()"}],"interface":[{id:"omenudataInterface1",text:"Interface normal",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/geral.htm?'+i3GEO.configura.sid"},{id:"omenudataInterface2",text:"OpenLayers",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/openlayers.htm?'+i3GEO.configura.sid"},{id:"omenudataInterface10",text:"OpenLayers tablet",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/openlayers_t.htm?'+i3GEO.configura.sid"},{id:"omenudataInterface3",text:"Flash",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/flamingo.htm?'+i3GEO.configura.sid"},{id:"omenudataInterface4",text:"Google Maps",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/googlemaps.phtml?'+i3GEO.configura.sid"},{id:"omenudataInterface5",text:"Google Earth",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/googleearth.phtml?'+i3GEO.configura.sid"},{id:"omenudataInterface6",text:$trad("u21"),url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/geradordelinks.htm')"},{id:"omenudataInterface7",text:"Serviços WMS",url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/ogc.htm')"},{id:"omenudataInterface8",text:"Hiperbólica",url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/hiperbolica.html')"},{id:"omenudataInterface9",text:"Download de dados",url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/datadownload.htm')"},{id:"omenudataInterface11",text:$trad("p20"),url:"javascript:i3GEO.mapa.dialogo.telaRemota()"}]}},tipoimagem:"nenhum",tipotip:"balao",alturatip:"200px",larguratip:"200px",funcaoTip:"i3GEO.mapa.dialogo.verificaTipDefault()",funcaoIdentifica:"i3GEO.mapa.dialogo.cliqueIdentificaDefault()",diminuixM:0,diminuixN:0,diminuiyM:100,diminuiyN:70,autotamanho:false,map3d:"",embedLegenda:"nao",templateLegenda:"",mashuppar:"",sid:"",locaplic:"",mapaRefDisplay:"block",visual:"default",cursores:{"identifica":{ff:"pointer",ie:"pointer"},"pan":{ff:"/imagens/cursores/pan.png",ie:"/imagens/cursores/pan.cur"},"area":{ff:"crosshair",ie:"crosshair"},"distancia":{ff:"crosshair",ie:"crosshair"},"zoom":{ff:"/imagens/cursores/zoom.png",ie:"/imagens/cursores/zoom.cur"},"contexto":{ff:"/imagens/cursores/contexto.png",ie:"/imagens/cursores/contexto.cur"},"identifica_contexto":{ff:"pointer",ie:"pointer"},"pan_contexto":{ff:"/imagens/cursores/pan_contexto.png",ie:"/imagens/cursores/pan_contexto.cur"},"zoom_contexto":{ff:"/imagens/cursores/zoom_contexto.png",ie:"/imagens/cursores/zoom_contexto.cur"}},listaDePropriedadesDoMapa:{"propriedades":[{text:"p2",url:"javascript:i3GEO.mapa.dialogo.tipoimagem()"},{text:"p15",url:"javascript:i3GEO.mapa.dialogo.outputformat()"},{text:"p3",url:"javascript:i3GEO.mapa.dialogo.opcoesLegenda()"},{text:"p4",url:"javascript:i3GEO.mapa.dialogo.opcoesEscala()"},{text:"p5",url:"javascript:i3GEO.mapa.dialogo.tamanho()"},{text:"p6",url:"javascript:i3GEO.navega.entorno.ativaDesativa()"},{text:"p7",url:"javascript:i3GEO.mapa.ativaLogo()"},{text:"p8",url:"javascript:i3GEO.mapa.dialogo.queryMap()"},{text:"p9",url:"javascript:i3GEO.mapa.dialogo.corFundo()"},{text:"p10",url:"javascript:i3GEO.mapa.dialogo.gradeCoord()"},{text:"p12",url:"javascript:i3GEO.mapa.dialogo.autoredesenha()"}]},tempoAplicar:4000,tempoMouseParado:2500,iniciaJanelaMensagens:true,mostraRosaDosVentos:"nao",liberaGuias:"nao",entorno:"nao",funcoesBotoes:{"botoes":[{iddiv:"historicozoom",tipo:"",dica:$trad("d1"),constroiconteudo:'i3GEO.gadgets.mostraHistoricoZoom()'},{iddiv:"zoomtot",tipo:"",dica:$trad("d2"),funcaoonclick:function(){if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.extentTotal);return}if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.extentTotal);return}i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,i3GEO.configura.tipoimagem,i3GEO.parametros.extentTotal);marcadorZoom=""}},{iddiv:"zoomli",tipo:"dinamico",dica:$trad("d3"),funcaoonclick:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){alert("Pressione a tecla CTRL junto com o botão esquerdo do mouse");return}var temp;temp="zoom";if(i3GEO.Interface.ATIVAMENUCONTEXTO&&i3GEO.Interface.ATUAL==="padrao"){temp="zoom_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic);g_operacao='navega';g_tipoacao='zoomli';i3GEO.barraDeBotoes.ativaIcone("zoomli");marcadorZoom="";if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLzoom);return}if(!$i("i3geoboxZoom")){i3GEO.navega.zoomBox.criaBox()}if(i3GEO.eventos.MOUSEDOWN.toString().search("i3GEO.navega.zoomBox.inicia()")<0){i3GEO.eventos.MOUSEDOWN.push("i3GEO.navega.zoomBox.inicia()")}if(i3GEO.eventos.MOUSEUP.toString().search("i3GEO.navega.zoomBox.termina()")<0){i3GEO.eventos.MOUSEUP.push("i3GEO.navega.zoomBox.termina()")}i3GEO.barraDeBotoes.BOTAOPADRAO="zoomli"}},{iddiv:"pan",tipo:"dinamico",dica:$trad("d4"),funcaoonclick:function(){var temp;g_tipoacao='pan';g_operacao='navega';i3GEO.barraDeBotoes.ativaIcone("pan");i3GEO.barraDeBotoes.BOTAOPADRAO="pan";if(i3GEO.Interface.ATUAL==="googlemaps"){i3GeoMap.setOptions({draggable:true});i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pan",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic);return}if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="pan";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="pan_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}marcadorZoom="";if(i3GEO.Interface.ATUAL==="openlayers"){return}panMapaInicia=function(exy){var k;leftinicial=0;topinicial=0;if($i("img")&&(g_tipoacao==="pan")){try{if(arguments.length>0){if(navm){k=event.button}else{k=exy.button}if(k===2){return}}}catch(h){}g_panM="sim";if($i(i3GEO.Interface.IDCORPO)){leftinicial=parseInt($i(i3GEO.Interface.IDCORPO).style.left,10);topinicial=parseInt($i(i3GEO.Interface.IDCORPO).style.top,10)}clicinicialx=objposicaocursor.imgx;clicinicialy=objposicaocursor.imgy;ddinicialx=objposicaocursor.ddx;ddinicialy=objposicaocursor.ddy;boxrefObj=$i("boxref");if(boxrefObj){proporcaoBox=i3GEO.parametros.w/parseInt(boxrefObj.style.width,10);boxrefObjLeft=parseInt(boxrefObj.style.left,10);boxrefObjTop=parseInt(boxrefObj.style.top,10)}}};panMapaDesloca=function(){var nx,ny,l,t;if(typeof(g_panM)!=='undefined'&&$i(i3GEO.Interface.IDMAPA)&&(g_panM==="sim")){nx=objposicaocursor.telax-leftinicial-clicinicialx;ny=objposicaocursor.telay-topinicial-clicinicialy;if(i3GEO.configura.entorno==="nao"){l=0;if(parseInt($i("i3geo").style.left,10)){l=parseInt($i("i3geo").style.left,10)}$i(i3GEO.Interface.IDMAPA).style.left=nx-l;t=0;if(parseInt($i("i3geo").style.top,10)){t=parseInt($i("i3geo").style.top,10)}$i(i3GEO.Interface.IDMAPA).style.top=ny-t;if(boxrefObj){boxrefObj.style.left=boxrefObjLeft-(nx/proporcaoBox);boxrefObj.style.top=boxrefObjTop-(ny/proporcaoBox)}}else{$left("img",i3GEO.parametros.w*-1+nx);$left("imgS",i3GEO.parametros.w*-1+nx);$left("imgL",i3GEO.parametros.w+nx);$left("imgO",i3GEO.parametros.w*-3+nx);$left("imgN",i3GEO.parametros.w*-1+nx);$top("img",i3GEO.parametros.h*-1+ny);$top("imgS",i3GEO.parametros.h*-1+ny);$top("imgL",i3GEO.parametros.h*-1+ny);$top("imgN",i3GEO.parametros.h*-1+ny);$top("imgO",i3GEO.parametros.h*-1+ny)}}};panMapaTermina=function(){if(g_tipoacao==="pan"){marcadorZoom="";g_panM="nao";try{var f="i3GEO.navega.timerNavega = null;if("+"i3GEO.navega.xy2xy('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"',"+ddinicialx+","+ddinicialy+","+objposicaocursor.ddx+","+objposicaocursor.ddy+",'"+i3GEO.parametros.mapexten+"','"+i3GEO.configura.tipoimagem+"'"+") == false"+"){"+"i3GEO.navega.zoompontoIMG('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"',"+objposicaocursor.imgx+","+objposicaocursor.imgy+")"+"}";clearTimeout(i3GEO.navega.timerNavega);i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)}catch(e){}}};if(i3GEO.eventos.MOUSEDOWN.toString().search("panMapaInicia()")<0){i3GEO.eventos.MOUSEDOWN.push("panMapaInicia()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("panMapaDesloca()")<0){i3GEO.eventos.MOUSEMOVE.push("panMapaDesloca()")}if(i3GEO.eventos.MOUSEUP.toString().search("panMapaTermina()")<0){i3GEO.eventos.MOUSEUP.push("panMapaTermina()")}}},{iddiv:"zoomiauto",tipo:"",dica:$trad("d5"),funcaoonclick:function(){i3GEO.navega.zoomin(i3GEO.configura.locaplic,i3GEO.configura.sid);marcadorZoom=''}},{iddiv:"zoomoauto",tipo:"",dica:$trad("d6"),funcaoonclick:function(){i3GEO.navega.zoomout(i3GEO.configura.locaplic,i3GEO.configura.sid);marcadorZoom=""}},{iddiv:"identifica",tipo:"dinamico",dica:$trad("d7"),funcaoonclick:function(){var temp;if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO&&i3GEO.Interface.ATUAL!=="googlemaps"){temp="identifica_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}i3GEO.barraDeBotoes.ativaIcone("identifica");g_tipoacao='identifica';g_operacao='identifica';cliqueIdentifica=function(){if(g_operacao==="identifica"||i3GEO.barraDeBotoes.BOTAOPADRAO==="identifica"){g_operacao="identifica";eval(i3GEO.configura.funcaoIdentifica)}var temp=function(){$i("i3GEOmarcaIdentifica").style.display="none"},i;i3GEO.util.criaPin("i3GEOmarcaIdentifica",i3GEO.configura.locaplic+"/imagens/marcaidentify.png",48,48,temp);i3GEO.util.posicionaImagemNoMapa("i3GEOmarcaIdentifica");i=$i("i3GEOmarcaIdentifica");if(i){i.style.display="block"}};if(i3GEO.eventos.MOUSECLIQUE.toString().search("cliqueIdentifica()")<0){i3GEO.eventos.MOUSECLIQUE.push("cliqueIdentifica()")}if(i3GEO.eventos.MOUSECLIQUE.toString().search("verificaTip()")>0){i3GEO.eventos.MOUSECLIQUE.remove("verificaTip()")}if(i3GEO.eventos.MOUSEPARADO.toString().search("verificaTip()")>0){i3GEO.eventos.MOUSEPARADO.remove("verificaTip()")}}},{iddiv:"identificaBalao",tipo:"dinamico",dica:$trad("d7a"),funcaoonclick:function(){if(i3GEO.arvoreDeCamadas.filtraCamadas("etiquetas","","diferente",i3GEO.arvoreDeCamadas.CAMADAS)===""){alert($trad("d31"));return}var temp;if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}i3GEO.barraDeBotoes.ativaIcone("identificaBalao");g_tipoacao='identifica';g_operacao='identifica';verificaTip=function(){if(i3GEO.util.verificaScriptTag("i3GEOF")===true){return}if($i("marcaIdentifica")){return}if(g_operacao==="identifica"){eval(i3GEO.configura.funcaoTip)}};if(i3GEO.eventos.MOUSECLIQUE.toString().search("cliqueIdentifica()")>0){i3GEO.eventos.MOUSECLIQUE.remove("cliqueIdentifica()")}if(i3GEO.eventos.MOUSECLIQUE.toString().search("verificaTip()")<0){i3GEO.eventos.MOUSECLIQUE.push("verificaTip()")}if(i3GEO.eventos.MOUSEPARADO.toString().search("verificaTip()")<0){i3GEO.eventos.MOUSEPARADO.push("verificaTip()")}}},{iddiv:"exten",tipo:"",dica:$trad("d8"),funcaoonclick:function(){i3GEO.mapa.dialogo.mostraExten()}},{iddiv:"referencia",tipo:"",dica:$trad("d9"),funcaoonclick:function(){i3GEO.maparef.inicia()}},{iddiv:"wiki",tipo:"",dica:$trad("d11"),funcaoonclick:function(){i3GEO.navega.dialogo.wiki()}},{iddiv:"metar",tipo:"",dica:$trad("d29"),funcaoonclick:function(){i3GEO.navega.dialogo.metar()}},{iddiv:"buscafotos",tipo:"",dica:"Fotos",funcaoonclick:function(){i3GEO.navega.dialogo.buscaFotos()}},{iddiv:"imprimir",tipo:"",dica:$trad("d12"),funcaoonclick:function(){i3GEO.mapa.dialogo.imprimir()}},{iddiv:"ondeestou",tipo:"",dica:$trad("d13"),funcaoonclick:function(){i3GEO.navega.zoomIP(i3GEO.configura.locaplic,i3GEO.configura.sid)}},{iddiv:"v3d",tipo:"",dica:$trad("d14"),funcaoonclick:function(){i3GEO.mapa.dialogo.t3d()}},{iddiv:"google",tipo:"",dica:$trad("d15"),funcaoonclick:function(){i3GEO.navega.dialogo.google()}},{iddiv:"scielo",tipo:"",dica:$trad("d16"),funcaoonclick:function(){scieloAtivo=false;g_operacao="navega";i3GEO.janela.cria("450px","190px",i3GEO.configura.locaplic+"/ferramentas/scielo/index.htm","","","Scielo");atualizascielo=function(){var docel;try{docel=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;if(docel.getElementById("resultadoscielo")){$i("wdocai").src=i3GEO.configura.locaplic+"/ferramentas/scielo/index.htm"}else{i3GEO.eventos.NAVEGAMAPA.remove("atualizascielo()");if(i3GEO.Interface.ATUAL==="googlemaps"){GEvent.removeListener(scieloDragend);GEvent.removeListener(scieloZoomend)}}}catch(e){scieloAtivo=false;i3GEO.eventos.NAVEGAMAPA.remove("atualizascielo()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizascielo()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizascielo()");if(i3GEO.Interface.ATUAL==="googlemaps"){scieloDragend=GEvent.addListener(i3GeoMap,"dragend",function(){atualizascielo()});scieloZoomend=GEvent.addListener(i3GeoMap,"zoomend",function(){atualizascielo()})}}}},{iddiv:"confluence",tipo:"",dica:$trad("d17"),funcaoonclick:function(){i3GEO.navega.dialogo.confluence()}},{iddiv:"lentei",tipo:"",dica:$trad("d18"),funcaoonclick:function(){if(i3GEO.navega.lente.ESTAATIVA==="nao"){i3GEO.navega.lente.inicia()}else{i3GEO.navega.lente.desativa()}}},{iddiv:"encolheFerramentas",tipo:"",dica:$trad("d19"),funcaoonclick:function(){i3GEO.guias.libera()}},{iddiv:"reinicia",tipo:"",dica:$trad("d20"),funcaoonclick:function(){i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));var temp=function(){var url=(window.location.href.split("?"));window.location.href=url[0]+"?"+i3GEO.configura.sid};i3GEO.php.reiniciaMapa(temp)}},{iddiv:"mede",tipo:"dinamico",dica:$trad("d21"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("mede");if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";i3GEO.util.mudaCursor(i3GEO.configura.cursores,"distancia",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}g_tipoacao="";g_operacao="";i3GEO.analise.medeDistancia.inicia()}},{iddiv:"area",tipo:"dinamico",dica:$trad("d21a"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("area");if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";i3GEO.util.mudaCursor(i3GEO.configura.cursores,"area",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}g_tipoacao="";g_operacao="";i3GEO.analise.medeArea.inicia()}},{iddiv:"inserexy",tipo:"dinamico",dica:$trad("d22"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("inserexy");g_tipoacao="";i3GEO.mapa.dialogo.cliquePonto()}},{iddiv:"inseregrafico",tipo:"dinamico",dica:$trad("d23"),funcaoonclick:function(){g_tipoacao="";i3GEO.mapa.dialogo.cliqueGrafico();i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pointer",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}},{iddiv:"selecao",tipo:"dinamico",dica:$trad("d24"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("selecao");i3GEO.mapa.dialogo.selecao()}},{iddiv:"textofid",tipo:"dinamico",dica:$trad("d25"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("textofid");g_tipoacao="";i3GEO.mapa.dialogo.cliqueTexto()}},{iddiv:"rota",tipo:"",dica:"Rota",funcaoonclick:function(){if(i3GEO.Interface.ATUAL!=="googlemaps"){alert("Operacao disponivel apenas na interface Google Maps");return}counterClick=1;var parametrosRota=function(overlay,latlng){var temp,janela;if(counterClick===1){counterClick++;alert("Clique o ponto de destino da rota");pontoRota1=latlng;return}if(counterClick===2){pontoRota2=latlng;counterClick=0;GEvent.removeListener(rotaEvento);janela=i3GEO.janela.cria("300px","300px","","center","","Rota");janela[2].style.overflow="auto";janela[2].style.height="300px";directions=new GDirections(i3GeoMap,janela[2]);temp=function(){$i("wdoca_corpo").innerHTML="Não foi possível criar a rota"};GEvent.addListener(directions,"error",temp);directions.load("from: "+pontoRota1.lat()+","+pontoRota1.lng()+" to: "+pontoRota2.lat()+","+pontoRota2.lng())}};rotaEvento=GEvent.addListener(i3GeoMap,"click",parametrosRota);alert("Clique o ponto de origem da rota")}}]}};
359   -function i3GEOmantemCompatibilidade(){try{i3GEO.configura.oMenuData=oMenuData}catch(e){alert("funcao depreciada")}try{i3GEO.configura.tipoimagem=g_tipoimagem}catch(e){alert("funcao depreciada")}try{i3GEO.configura.tipotip=g_tipotip}catch(e){alert("funcao depreciada")}try{i3GEO.configura.funcaoTip=g_funcaoTip}catch(e){alert("funcao depreciada")}try{i3GEO.configura.map3d=g_3dmap}catch(e){alert("funcao depreciada")}try{i3GEO.configura.embedLegenda=g_embedLegenda}catch(e){alert("funcao depreciada")}try{i3GEO.configura.templateLegenda=g_templateLegenda}catch(e){alert("funcao depreciada")}try{if(objmapa.finaliza!="")i3GEO.finaliza=objmapa.finaliza}catch(e){alert("funcao depreciada")};g_arvoreClick="";g_arvoreClicks="";if($i("longlat")){atualizalonglat=function(){$i("longlat").innerHTML=objposicaocursor.dmsx+" "+objposicaocursor.dmsy};YAHOO.util.Event.addListener($i("img"),"mousemove",atualizalonglat)}try{if(g_opcoesTemas=="nao"){i3GEO.arvoreDeCamadas.OPCOESTEMAS=false}}catch(e){alert("funcao depreciada")};try{i3GEO.maparef.fatorZoomDinamico=g_zoomRefDinamico}catch(e){alert("funcao depreciada")};try{i3GEO.configura.mashuppar=g_mashuppar}catch(e){alert("funcao depreciada")};try{if(!$i("arvoreAdicionaTema")){i3GEO.arvoreDeTemas.IDHTML=objmapa.guiaMenu+"obj"}else{i3GEO.arvoreDeTemas.IDHTML="arvoreAdicionaTema"}}catch(e){alert("funcao depreciada")};try{if(g_uploaddbf=="nao"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.uploaddbf=false}}catch(e){alert("funcao depreciada")};try{if(g_uploadlocal=="nao"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.uploadlocal=false}}catch(e){alert("funcao depreciada")};try{if(g_downloadbase=="nao"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.downloadbase=false}}catch(e){alert("funcao depreciada")};try{if(g_conectarwms=="nao"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.conectarwms=false}}catch(e){alert("funcao depreciada")};try{if(g_conectargeorss=="nao"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.conectargeorss=false}}catch(e){alert("funcao depreciada")};try{if(g_nuvemTags=="nao"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.nuvemTags=false}}catch(e){alert("funcao depreciada")};try{if(g_kml=="nao"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.kml=false}}catch(e){alert("funcao depreciada")};try{if(g_qrcode=="nao"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.qrcode=false}}catch(e){alert("funcao depreciada")};try{if(g_tipoacao!=""){i3GEO.barraDeBotoes.BOTAOPADRAO=g_tipoacao}}catch(e){alert("funcao depreciada")}try{if(g_listaPropriedades){i3GEO.configura.listaDePropriedadesDoMapa=g_listaPropriedades}}catch(e){alert("funcao depreciada")};try{if(g_tempo_aplicar){i3GEO.configura.tempoAplicar=g_tempo_aplicar}}catch(e){alert("funcao depreciada")};try{if(g_janelaMen=="nao"){i3GEO.configura.iniciaJanelaMensagens=false}}catch(e){alert("funcao depreciada")};try{if(g_locaplic){i3GEO.configura.locaplic=g_locaplic}}catch(e){alert("funcao depreciada")};try{if(g_tempotip){i3GEO.configura.tempoMouseParado=g_tempotip}}catch(e){alert("funcao depreciada")};try{if(g_mostraRosa){i3GEO.configura.mostraRosaDosVentos=g_mostraRosa}}catch(e){alert("funcao depreciada")};try{if(g_visual){i3GEO.configura.visual=g_visual}}catch(e){alert("funcao depreciada")};try{if(g_mapaRefDisplay){i3GEO.configura.mapaRefDisplay=g_mapaRefDisplay}}catch(e){alert("funcao depreciada")};try{if(g_docaguias){i3GEO.configura.liberaGuias=g_docaguias}}catch(e){alert("funcao depreciada")};if(window.location.href.split("?")[1]){g_sid=window.location.href.split("?")[1];if(g_sid.split("#")[0]){g_sid=g_sid.split("#")[0]}}else{g_sid=""}i3GEO.configura.sid=g_sid;try{i3GEO.guias.ATUAL=g_guiaativa}catch(e){alert("funcao depreciada")}try{i3GEO.navega.autoRedesenho.INTERVALO=g_autoRedesenho}catch(e){alert("funcao depreciada")}try{i3GEO.eventos.NAVEGAMAPA=g_funcoesNavegaMapaDefault}catch(e){alert("funcao depreciada")}try{i3GEO.eventos.MOUSEMOVE=g_funcoesMousemoveMapaDefault}catch(e){alert("funcao depreciada")}try{i3GEO.eventos.MOUSECLIQUE=g_funcoesClickMapaDefault}catch(e){alert("funcao depreciada")}try{i3GEO.configura.entorno=g_entorno}catch(e){alert("funcao depreciada")}try{i3GEO.navega.lente.POSICAOX=g_posicaoLenteX=0}catch(e){alert("funcao depreciada")}try{i3GEO.navega.lente.POSICAOY=g_posicaoLenteY}catch(e){alert("funcao depreciada")}try{i3GEO.navega.destacaTema.TAMANHO=destacaTamanho}catch(e){alert("funcao depreciada")}if(!$i("tip")){var novoel=document.createElement("div");novoel.id="tip";novoel.style.position="absolute";novoel.style.zIndex=5000;if(navm){novoel.style.filter="alpha(opacity=90)"}document.body.appendChild(novoel)}try{objmapa.atualizaListaTemas=function(temas){alert("atualizaListaTemas foi depreciado. Utilize i3GEO.arvoreDeCamadas")}}catch(e){alert("funcao depreciada")}}if(typeof(i3GEO)=='undefined'){i3GEO=[]}cpObj=new cpaint();cpObj.set_async("true");cpObj.set_response_type("JSON");function Mapa(e,m){alert("Funcao Mapa foi depreciada. Utilize i3GEO.cria()");i3GEO.cria();this.inicializa=function(){i3GEO.finaliza=this.finaliza;i3GEO.inicia()}}objaguarde={abre:function(){alert("objaguarde foi depreciada. Utilize i3GEO.janela");i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"))},fecha:function(){alert("objaguarde foi depreciada. Utilize i3GEO.janela");i3GEO.janela.fechaAguarde("i3GEO.atualiza")}};function iCookie(nome,valor){alert("iCookie foi depreciado. Utilize i3GEO.util.insereCookie");i3GEO.util.insereCookie(nome,valor)}function pCookie(nome){alert("pCookie foi depreciado. Utilize i3GEO.util.pegaCookie");i3GEO.util.pegaCookie(nome)}function wdocaf(wlargura,waltura,wsrc,nx,ny,texto){var janela=i3GEO.janela.cria(wlargura,waltura,wsrc,nx,ny,texto)}function wdocaf2(wlargura,waltura,wsrc,nx,ny,texto){var id=YAHOO.util.Dom.generateId();i3GEO.janela.cria(wlargura,waltura,wsrc,nx,ny,texto,id,true)}function processevent1(exy1){alert("funcao depreciada")}function mensagemBanner(){alert("funcao depreciada")}function borra(){alert("funcao depreciada")}function movecursor(){alert("funcao depreciada");if($i("obj")){if($i("openlayers")||$i("flamingo")){$i("obj").style.display="none"}else{var obje=$i("obj").style;if($i("img")){eval("obje."+g_tipotop+"= objposicaocursor.telay + 9 + g_postpx");eval("obje."+g_tipoleft+"= objposicaocursor.telax + 9 + g_postpx")}else{eval("obje."+g_tipotop+"= objposicaocursor.telay - 15 + g_postpx");eval("obje."+g_tipoleft+"= objposicaocursor.telax + 15 + g_postpx")}}}if($i("box1")){var bx=$i("box1");if(bx.style.visibility!="visible"){bx.style.left=objposicaocursor.telax+g_postpx;bx.style.top=objposicaocursor.telay+g_postpx}}}function buscaRapida(){alert("funcao depreciada");i3geo_buscarapida()}function initJanelaZoom(qual){alert("funcao depreciada");i3GEO.barraDeBotoes.reativa(qual-1)}function sobeferramentas(){alert("funcao depreciada")}function desceferramentas(){alert("funcao depreciada")}function arvoreclick(itemID){alert("funcao depreciada");if(itemID.search("tema")==0){if($i(itemID).checked==true){$i(itemID).checked=false}else{$i(itemID).checked=true}}}function pegaTema(celula){alert("funcao depreciada");var nos=celula.parentNode.childNodes;var tempi=nos.length;for(var no=0;no<tempi;no++){if(nos[no].type=="checkbox"){return nos[no].value}}}function gerafilmef(qs){alert("funcao depreciada")}function gravaQuadro(variavel,valor){alert("funcao depreciada");i3GEO.gadgets.quadros.grava(variavel,valor)}function avancaQuadro(){alert("funcao depreciada");i3GEO.gadgets.quadros.avanca()}function zoomAnterior(){alert("funcao depreciada")}function zoomProximo(){alert("funcao depreciada")}function opcoesQuadros(){alert("funcao depreciada")}function filmef(o){alert("funcao depreciada")}function rebobinaf(){alert("funcao depreciada")}function filmezf(o){alert("funcao depreciada")}function quadrofilme(){alert("funcao depreciada")}function filmeanimaf(){alert("funcao depreciada")}function filmeanimarodaf(janima){alert("funcao depreciada")}function pegaimagens(){alert("funcao depreciada")}function calculaArea(pontos,pixel){alert("funcao depreciada");return(i3GEO.calculo.area(pontos,pixel))}function calculadistancia(lga,lta,lgb,ltb){alert("funcao depreciada");return(i3GEO.calculo.distancia(lga,lta,lgb,ltb))}function initJanelaRef(){alert("funcao depreciada");i3GEO.maparef.inicia()}function ajaxReferencia(retorno){alert("funcao depreciada");i3GEO.maparef.processaImagem(retorno)}function clicouRef(){alert("funcao depreciada")}function movimentoRef(obj){alert("funcao depreciada")}function mostraTip(retorno){alert("funcao depreciada");if(!$i("tip")){var novoel=document.createElement("div");novoel.id="tip";novoel.style.position="absolute";novoel.style.zIndex=5000;if(navm){novoel.style.filter="alpha(opacity=90)"}document.body.appendChild(novoel)}var i=$i("i3geo_rosa");if(i)i.style.display="none";var mostra=false;var retorno=retorno.data;if((retorno!="erro")&&(retorno!=undefined)){if($i("img")){$i("img").title=""}if(retorno!=""){var res="<div id='cabecatip' style='text-align:left;background-color:rgb(240,240,240)'><span style='color:navy;cursor:pointer;text-align:left' onclick='javascript:objmapaparado=\"cancela\"'>parar&nbsp;&nbsp;</span>";res+="<span style='color:navy;cursor:pointer;text-align:left' onclick='javascript:i3GEO.janela.TIPS.push($i(\"tip\"));$i(\"tip\").id=\"\";$i(\"cabecatip\").innerHTML =\"\";$i(\"cabecatip\").id =\"\"' >fixar</span></div>";var temas=retorno.split("!");var tema=temas.length-1;if(tema>=0){do{var titulo=temas[tema].split("@");if(g_tipotip=="completo"){res+="<span style='text-align:left;font-size:9pt'><b>"+titulo[0]+"</b></span><br>"}var ocorrencias=titulo[1].split("*");var ocorrencia=ocorrencias.length-1;if(ocorrencia>=0){do{if(ocorrencias[ocorrencia]!=""){var pares=ocorrencias[ocorrencia].split("##");var paresi=pares.length;for(var par=0;par<paresi;par++){var valores=pares[par].split("#");if(g_tipotip=="completo"){res=res+"<span class='tiptexto' style='text-align:left;font-size:9pt'>"+valores[0]+" <i>"+valores[1]+"</i></span><br>";var mostra=true}else{res=res+"<span class='tiptexto' style='text-align:left;font-size:9pt'><i>"+valores[1]+"</i></span><br>";var mostra=true}}}}while(ocorrencia--)}}while(tema--)}if(!mostra){$i("tip").style.display="none";return}if($i("janelaMen")){$i("janelaMenTexto").innerHTML=res}else{var i=$i("tip");i.innerHTML="<table style='text-align:left'><tr><td style='text-align:left'>"+res+"</td></tr></table>";ist=i.style;ist.top=objposicaocursor.telay-10;ist.left=objposicaocursor.telax-20;ist.display="block"}}}}function trataErro(){alert("funcao depreciada");i3GEO.janela.fechaAguarde()}function mostraguiaf(guia){alert("funcao depreciada");i3GEO.guias.mostra(guia)}function ativaGuias(){alert("funcao depreciada");for(var g=0;g<12;g++){if($i("guia"+g))var gpai=$i("guia"+g).parentNode}if(gpai){gpai.id="guiasYUI";gpai.className="yui-navset";var ins='<ul class="yui-nav" style="border-width:0pt 0pt 0px;border-color:rgb(240,240,240);border-bottom-color:white;">';try{if($i(objmapa.guiaTemas)){$i(objmapa.guiaTemas).innerHTML=$trad("g1")}if($i(objmapa.guiaMenu)){$i(objmapa.guiaMenu).innerHTML=$trad("g2")}if($i(objmapa.guiaLegenda)){$i(objmapa.guiaLegenda).innerHTML=$trad("g3")}if($i(objmapa.guiaListaMapas)){$i(objmapa.guiaListaMapas).innerHTML=$trad("g4")}}catch(e){alert("funcao depreciada")};for(var g=0;g<12;g++){if($i("guia"+g)){var tituloguia=$i("guia"+g).innerHTML;var re=new RegExp("&nbsp;","g");var tituloguia=tituloguia.replace(re,'');ins+='<li><a href="#"><em><div id="guia'+g+'" >'+tituloguia+'</div></em></a></li>'}}ins+="</ul>";gpai.innerHTML=ins;for(var g=0;g<12;g++){if($i("guia"+g)){eval('$i("guia'+g+'").onclick = function(){g_guiaativa = "guia'+g+'";mostraguiaf('+g+');}');$i("guia"+g).onmouseover=function(){var bcg=this.parentNode.parentNode.style;var cor=bcg.background.split(" ")[0];if(cor!="white")bcg.background="#bfdaff"};$i("guia"+g).onmouseout=function(){var bcg=this.parentNode.parentNode.style;var cor=bcg.background.split(" ")[0];if(cor!="white")bcg.background="transparent"};if($i("guia"+g+"obj")){$i("guia"+g+"obj").style.overflow="auto";$i("guia"+g+"obj").style.height=i3GEO.parametros.h}}}}if($i(objmapa.guiaTemas)){$i(objmapa.guiaTemas).onclick=function(){g_guiaativa=objmapa.guiaTemas;mostraguiaf(1)}}if($i(objmapa.guiaMenu)){$i(objmapa.guiaMenu).onclick=function(){g_guiaativa=objmapa.guiaMenu;mostraguiaf(2);if(!$i("arvoreAdicionaTema")){var ondeArvore=objmapa.guiaMenu+"obj"}else{var ondeArvore="arvoreAdicionaTema"}if(document.getElementById("outrasOpcoesAdiciona")){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde="outrasOpcoesAdiciona";i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore=false}i3GEO.arvoreDeTemas.cria(i3GEO.configura.sid,i3GEO.configura.locaplic,ondeArvore)}}if($i(objmapa.guiaLegenda)){$i(objmapa.guiaLegenda).onclick=function(){g_guiaativa=objmapa.guiaLegenda;mostraguiaf(4);objmapa.atualizaLegendaHTML()}}if($i(objmapa.guiaListaMapas)){$i(objmapa.guiaListaMapas).onclick=function(){g_guiaativa=objmapa.guiaListaMapas;mostraguiaf(5);if($i("banners")){$i("banners").innerHTML==$trad("o1");var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegaMapas&g_sid="+i3GEO.configura.sid;cpObj.call(p,"pegaMapas",pegaMapas)}else{alert("id banners nao encontrado")}}}}function docaguias(){alert("funcao depreciada");i3GEO.guias.libera()}function autoRedesenho(opcao){alert("funcao depreciada")}function selecao(){alert("funcao depreciada")}function cliqueSelecao(){alert("funcao depreciada")}function zoomboxf(tipo){alert("funcao depreciada")}function i3geo_comboGruposMenu(funcaoOnchange,idDestino,idCombo,largura,altura){alert("funcao depreciada")}function i3geo_comboSubGruposMenu(funcaoOnchange,idDestino,idCombo,idGrupo,largura,altura){alert("funcao depreciada")}function i3geo_comboTemasMenu(funcaoOnchange,idDestino,idCombo,idGrupo,idSubGrupo,largura,altura){alert("funcao depreciada")}function remapaf(){i3GEO.atualiza("");alert("funcao depreciada")}function limpacontainerf(){alert("funcao depreciada")}function inseremarcaf(xi,yi,funcaoOnclick,container){alert("funcao depreciada");i3GEO.utl.insereMarca.cria(xi,yi,funcaoOnclick,container)}function moveSelecaoPoli(){alert("funcao depreciada")}function cliqueSelecaoPoli(){alert("funcao depreciada")}function ativaEntorno(){alert("funcao depreciada")}function geraURLentorno(){alert("funcao depreciada")}function ajustaEntorno(){alert("funcao depreciada")}function ajaxabrelente(retorno){alert("funcao depreciada")}function movelentef(){alert("funcao depreciada")}function ativaClicks(docMapa){alert("funcao depreciada")}function incluir(path){i3GEO.util.adicionaSHP(path);alert("funcao depreciada")}function pontosdist(){this.xpt=[];this.ypt=[];this.dist=[];this.xtela=[];this.ytela=[];this.ximg=[];this.yimg=[];this.linhas=[];alert("funcao depreciada")}function mudaiconf(i){i3GEO.barraDeBotoes.ativaIcone(i);alert("funcao depreciada")}function calcposf(){i3GEO.mapa.ajustaPosicao();alert("funcao depreciada")}function recuperamapa(){alert("funcao depreciada")}function desenhoRichdraw(tipo,objeto,n){alert("funcao depreciada")}function ajaxhttp(){alert("funcao depreciada");try{var objhttp1=new XMLHttpRequest()}catch(ee){try{var objhttp1=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{var objhttp1=new ActiveXObject("Microsoft.XMLHTTP")}catch(E){var objhttp1=false}}}return(objhttp1)}function ajaxexecAS(programa,funcao){alert("funcao depreciada");var ohttp=ajaxhttp();ohttp.open("POST",programa,true);var retorno="";ohttp.onreadystatechange=function(){if(ohttp.readyState==4){retorno=ohttp.responseText;var reg=/Warning/gi;if(retorno.search(reg)!=-1){alert("OOps! Ocorreu um erro\n"+retorno);return}var reg=/erro/gi;if(retorno.search(reg)!=-1){alert("OOps! Ocorreu um erro\n"+retorno);return}if(funcao!="volta"){eval(funcao+'("'+retorno+'")')}}};ohttp.send(null)}function ajaxexec(programa,funcao){alert("funcao depreciada");var objhttp=ajaxhttp();objhttp.open('GET',programa,false);objhttp.send(null);if(objhttp.status==200){if(funcao!="volta"){eval(funcao+'("'+objhttp.responseText+'")')}else{return objhttp.responseText}}}function ajaxLegendaHTML(retorno){alert("funcao depreciada")}function ajaxLegendaImagem(retorno){alert("funcao depreciada")}function mede(){alert("funcao depreciada")}function cliqueMede(){alert("funcao depreciada")}function moveMede(){alert("funcao depreciada")}function area(){alert("funcao depreciada")}function cliqueArea(){alert("funcao depreciada")}function moveArea(){alert("funcao depreciada")}function textofid(){alert("funcao depreciada")}function inserexy(){alert("funcao depreciada")}function cliqueInseretoponimo(){alert("funcao depreciada")}function cliqueInserexy(){alert("funcao depreciada")}function inseregrafico(){alert("funcao depreciada")}function cliqueInseregrafico(){alert("funcao depreciada")}function ativaHistoricoZoom(iddiv){alert("funcao depreciada")}function ajaxhttp(){alert("funcao depreciada");return i3GEO.util.ajaxhttp()}function ajaxCorpoMapa(retorno){i3GEO.mapa.corpo.veirifca(retorno);alert("funcao depreciada")}function ajaxredesenha(retorno){i3GEO.atualiza(retorno);alert("funcao depreciada")}function ajaxIniciaParametros(retorno){i3GEO.atualiza(retorno);alert("funcao depreciada")}function montaMenuSuspenso(iddiv){i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.idhtml=iddiv;i3GEO.gadgets.mostraMenuSuspenso();alert("funcao depreciada")}
360   -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]]}};
361   -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);if($i("localizarxygeoProjxg")){var temp=function(){i3GEO.coordenadas.atualizaGeo(objposicaocursor.dmsx,objposicaocursor.dmsy,"localizarxygeoProj")};YAHOO.util.Event.addListener(divgeo,"mousemove",temp)}}catch(men){alert("Erro ao tentar criar container richdraw "+men)}},criaDivContainer:function(){desenhoUltimaLinha="";desenhoUltimaLinhaPol="";if(!$i("divGeometriasTemp")){var pos,novoel,ne;pos=[0,0];pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));novoel=document.createElement("div");novoel.id="divGeometriasTemp";ne=novoel.style;ne.cursor="crosshair";ne.zIndex=0;if(i3GEO.Interface.TABLET===true){ne.zIndex=5000}ne.position="absolute";ne.width=i3GEO.parametros.w;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=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);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="<select onchange='i3GEO.desenho.definePadrao(this.value)'>";for(i=0;i<n;i+=1){sel="";if(lista[i]===i3GEO.desenho.estiloPadrao){sel="select"}caixa+="<option value='"+lista[i]+"' sel >"+lista[i]+"</option>"}caixa+="</select>";return caixa}};
362   -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.Interface={TABLET:false,ALTTABLET:"openlayers_t.htm",OUTPUTFORMAT:"AGG_Q",BARRABOTOESTOP:12,BARRABOTOESLEFT:3,BARRADEZOOMTOP:7,BARRADEZOOMLEFT: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")}if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.adicionaKml("foo")}},cria:function(w,h){i3GEO.Interface[i3GEO.Interface.ATUAL].cria(w,h)},inicia:function(w,h){var temp=window.location.href.split("?")[0],gadgets=i3GEO.gadgets;if($i("i3GEOcompartilhar")){i3GEO.social.compartilhar("i3GEOcompartilhar",temp,temp,"semtotal")}gadgets.quadros.inicia(10);gadgets.quadros.grava("extensao",i3GEO.parametros.extentTotal);gadgets.mostraBuscaRapida();gadgets.mostraVersao();gadgets.mostraEmail();i3GEO.guias.cria();if($i("mst")){$i("mst").style.display="block"}if(i3GEO.configura.entorno.toLowerCase()==="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(){if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){i3GEO.barraDeBotoes.inicializaBarra()}else{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="<input style='position:relative;top:0px;left:0px;' type=image src='' id='img' />";$i(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:"&nbsp;<span class='container-close'></span>"},{text:"<img class='rosamais' style='height:18px;' src='"+$im("branco.gif")+"'><span style='position:relative;top:-4px;'> Aproxima</span>",onclick:{fn:i3GEO.navega.zoomin}},{text:"<img class='rosamenos' style='height:18px;' src='"+$im("branco.gif")+"'><span style='position:relative;top:-4px;'> Afasta</span>",onclick:{fn:i3GEO.navega.zoomout}},{text:"<img class='rosanorte' style='height:18px;' src='"+$im("branco.gif")+"'><span style='position:relative;top:-7px;'> Norte</span>",onclick:{fn:i3GEO.navega.panFixoNorte}},{text:"<img class='rosasul' style='height:18px;' src='"+$im("branco.gif")+"'><span style='position:relative;top:-7px;'> Sul</span>",onclick:{fn:i3GEO.navega.panFixoSul}},{text:"<img class='rosaleste' style='height:18px;' src='"+$im("branco.gif")+"'><span style='position:relative;top:-7px;'> Leste</span>",onclick:{fn:i3GEO.navega.panFixoLeste}},{text:"<img class='rosaoeste' style='height:18px;' src='"+$im("branco.gif")+"'><span style='position:relative;top:-7px;'> Oeste</span>",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();gadgets.mostraMenuLista();i3GEO.eventos.ativa(i);i3GEO.coordenadas.mostraCoordenadas();gadgets.mostraEscalaNumerica();gadgets.mostraEscalaGrafica();gadgets.visual.inicia();iu.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",configura.listaDePropriedadesDoMapa);i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,configura.sid,configura.locaplic);i3GEO.ajuda.ativaLetreiro(parametros.mensagens);i3GEO.Interface.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(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='<div id=flamingo style="width:0px;height:0px;text-align:left;background-image:url(/"'+i3GEO.configura.locaplic+'/imagens/i3geo1bw.jpg/")"></div>';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("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa)},ativaBotoes:function(){}},openlayers:{FUNDOTEMA:"yellow",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();openlayers.sobeLayersGraficos()},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='<div id=openlayers style="width:0px;height:0px;text-align:left;background-image:url('+i3GEO.configura.locaplic+'/imagens/i3geo1bw.jpg)"></div>';i.innerHTML=ins}f=$i("openlayers");f.style.width=w;f.style.height=h}i3GEO.Interface.IDMAPA="openlayers";if(i3GEO.Interface.TABLET===true){i3geoOL=new OpenLayers.Map({div:"openlayers",theme:null,controls:[new OpenLayers.Control.Attribution(),new OpenLayers.Control.TouchNavigation({dragPanOptions:{interval:100,enableKinetic:true}}),new OpenLayers.Control.ZoomPanel()]})}else{bb.INCLUIBOTAO.zoomli=true;bb.INCLUIBOTAO.pan=true;bb.INCLUIBOTAO.zoomtot=true;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,layersn,openlayers=i3GEO.Interface.openlayers;i3GEO.util.multiStep([openlayers.registraEventos,openlayers.zoom2ext],[null,[i3GEO.parametros.mapexten]],function(){});openlayers.criaLayers();if(openlayers.GADGETS.PanZoomBar===true){i3GEO.Interface.openlayers.OLpanzoombar=new OpenLayers.Control.PanZoomBar();i3geoOL.addControl(i3GEO.Interface.openlayers.OLpanzoombar);i3GEO.Interface.openlayers.OLpanzoombar.div.style.zIndex=5000;i3GEO.Interface.openlayers.OLpanzoombar.div.style.top=i3GEO.Interface.BARRADEZOOMTOP+"px";i3GEO.Interface.openlayers.OLpanzoombar.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+"px"}if(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<layersn;i++){texto="<input type=radio style='"+estilo+"' onclick='i3GEO.Interface.openlayers.ativaFundo(this.value)' name=i3GEObaseLayer value='"+layers[i].id+"' />"+layers[i].name;temp.propriedades.push({text:texto,url:""})}i3GEO.util.arvore("<b>"+$trad("p16")+"</b>","listaLayersBase",temp)}else{if(openlayers.GADGETS.LayerSwitcher===true){i3geoOL.addControl(new OpenLayers.Control.LayerSwitcher())}}if(openlayers.GADGETS.ScaleLine===true){pz=new OpenLayers.Control.ScaleLine();i3geoOL.addControl(pz);pz.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+5+"px"}if(openlayers.GADGETS.OverviewMap===true){i3geoOL.addControl(new OpenLayers.Control.OverviewMap())}if(i3GEO.Interface.TABLET===false){i3GEO.Interface.openlayers.OLpan=new OpenLayers.Control.Navigation();i3GEO.Interface.openlayers.OLzoom=new OpenLayers.Control.ZoomBox();i3GEO.Interface.openlayers.OLpanel=new OpenLayers.Control.Panel();i3GEO.Interface.openlayers.OLpanel.addControls([i3GEO.Interface.openlayers.OLpan,i3GEO.Interface.openlayers.OLzoom]);i3geoOL.addControl(i3GEO.Interface.openlayers.OLpanel)}if(i3GEO.configura.mapaRefDisplay!=="none"){if(i3GEO.util.pegaCookie("i3GEO.configura.mapaRefDisplay")){i3GEO.configura.mapaRefDisplay=i3GEO.util.pegaCookie("i3GEO.configura.mapaRefDisplay")}if(i3GEO.configura.mapaRefDisplay==="block"){i3GEO.maparef.inicia()}}if(i3GEO.Interface.TABLET===false){i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLpan)}};i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.openlayers.ligaDesliga(this);i3GEO.eventos.executaEventos(i3GEO.eventos.ATUALIZAARVORECAMADAS);";i3GEO.util.multiStep([i3GEO.coordenadas.mostraCoordenadas,montaMapa,i3GEO.gadgets.mostraMenuSuspenso,i3GEO.ajuda.ativaLetreiro,i3GEO.idioma.mostraSeletor,i3GEO.gadgets.mostraEscalaNumerica,i3GEO.util.arvore,i3GEO.gadgets.mostraMenuLista,i3GEO.Interface.ativaBotoes],[null,null,null,[i3GEO.parametros.mensagens],null,null,["<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa],null,null],function(){});i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===true){i3GEO.Interface.openlayers.adicionaListaKml()}if(i3GEO.parametros.kmlurl!==""){i3GEO.Interface.openlayers.adicionaKml(true,i3GEO.parametros.kmlurl)}},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.openlayers.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i,zoom;if(!$i("arvoreCamadasKml")){i3GEO.Interface.openlayers.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=true}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===false){i3GEO.arvoreDeCamadas.MOSTRALISTAKML=true;i3GEO.Interface.openlayers.criaArvoreKML()}i3GEO.Interface.openlayers.adicionaNoArvoreKml(url,titulo,ativo,ngeoxml)},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.openlayers.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.openlayers.ARVORE.getRoot();titulo="<table><tr><td><b>Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false;if(i3GEO.parametros.editor==="sim"){d=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/webservices.html' target=blank >Editar cadastro</a>",idmenu:"",enableHighlight:false,expanded:false},node)}},adicionaNoArvoreKml:function(url,nomeOverlay,ativo,id){var root,node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.openlayers.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}root=i3GEO.Interface.openlayers.ARVORE.getRoot();node=i3GEO.Interface.openlayers.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.openlayers.ativaDesativaCamadaKml(this,\""+url+"\")' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";if(navm){estilo="cursor:default;vertical-align:35%;padding-top:0px;"}else{estilo="cursor:default;vertical-align:top;"}html+="&nbsp;<span style='"+estilo+"'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.openlayers.ARVORE.draw();i3GEO.Interface.openlayers.ARVORE.collapseAll();node.expand();if(ativo===true){i3GEO.Interface.openlayers.insereLayerKml(id,url)}},insereLayerKml:function(id,url){var temp;eval(id+" = new OpenLayers.Layer.Vector('"+id+"', {displayOutsideMaxExtent:true,displayInLayerSwitcher:false,visibility:true, strategies: [new OpenLayers.Strategy.Fixed()],protocol: new OpenLayers.Protocol.HTTP({url: '"+url+"',format: new OpenLayers.Format.KML({extractStyles: true,extractAttributes: true,maxDepth: 5})})})");eval("i3geoOL.addLayer("+id+");");eval("temp = "+id+".div;");temp.onclick=function(e){var targ,id,temp,features,n,i,j,html="";if(!e){e=window.event}if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}temp=targ.id.split("_");if(temp[0]==="OpenLayers.Geometry.Point"){id=targ.id;temp=i3geoOL.getLayer(this.id);features=temp.features;n=features.length;for(i=0;i<n;i++){if(features[i].geometry.id===id){for(j in features[i].attributes){html+=j+": "+features[i].attributes[j]}g=features[i].geometry;i3geoOL.addPopup(new OpenLayers.Popup.FramedCloud("kml",new OpenLayers.LonLat(g.x,g.y),null,html,null,true))}}}}},ativaDesativaCamadaKml:function(obj,url){if(!obj.checked){eval(obj.value+".setVisibility(false);")}else{if(!(i3geoOL.getLayersByName(obj.value)[0])){i3GEO.Interface.openlayers.insereLayerKml(obj.value,url)}else{eval(obj.value+".setVisibility(true);")}}},criaLayers:function(){var configura=i3GEO.configura,url=configura.locaplic+"/classesphp/mapa_openlayers.php?g_sid="+i3GEO.configura.sid+"&TIPOIMAGEM="+configura.tipoimagem,urlfundo=configura.locaplic+"/classesphp/mapa_openlayers.php?g_sid="+i3GEO.configura.sid+"&layer=&tipolayer=fundo&TIPOIMAGEM="+configura.tipoimagem,nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,layer,layers,camada,urllayer,opcoes,i,n,temp,fundoIsBase=true;try{temp=i3GEO.Interface.openlayers.LAYERSADICIONAIS;n=temp.length;for(i=0;i<n;i++){if(temp[i].isBaseLayer===true&&temp[i].visibility===true){fundoIsBase=false}}}catch(e){}if(i3geoOL.getLayersByName("Nenhum").length===0&&fundoIsBase===true){layer=new OpenLayers.Layer.WMS("Nenhum",urlfundo,{map_imagetype:i3GEO.Interface.OUTPUTFORMAT},{ratio:1,singleTile:true,isBaseLayer:true,opacity:1,visibility:true});i3geoOL.addLayer(layer)}opcoes={gutter:0,isBaseLayer:false,displayInLayerSwitcher:false,opacity:1,singleTile:!(i3GEO.Interface.openlayers.TILES),ratio:1,buffer:i3GEO.Interface.openlayers.BUFFER,wrapDateLine:true,transitionEffect:"resize",eventListeners:{"loadstart":i3GEO.Interface.openlayers.loadStartLayer,"loadend":i3GEO.Interface.openlayers.loadStopLayer}};for(i=nlayers-1;i>=0;i--){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];if(i3geoOL.getLayersByName(camada.name).length===0){urllayer=url+"&layer="+camada.name+"&r="+Math.random();try{temp=camada.type===0?opcoes.gutter=20:opcoes.gutter=0;temp=camada.transitioneffect==="nao"?opcoes.transitionEffect="null":opcoes.transitionEffect="resize";if(camada.connectiontype===7&&camada.wmsurl!==""&&camada.usasld.toLowerCase()!="sim"){urllayer=camada.wmsurl+"&r="+Math.random();layer=new OpenLayers.Layer.WMS(camada.name,urllayer,{LAYERS:camada.name,format:camada.wmsformat,transparent:true},opcoes);if(camada.wmssrs!=""){layer.url=layer.url+"&SRS="+camada.wmssrs+"&CRS="+camada.wmssrs}}else{if(camada.tiles==="nao"||camada.escondido.toLowerCase()==="sim"||camada.connectiontype===10||camada.type===0||camada.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,{LAYERS:camada.name,map_imagetype:i3GEO.Interface.OUTPUTFORMAT},opcoes)}}catch(e){}if(camada.escondido.toLowerCase()==="sim"){layer.transitionEffect="null"}i3geoOL.addLayer(layer)}else{layer=i3geoOL.getLayersByName(camada.name)[0]}temp=camada.status==0?layer.setVisibility(false):layer.setVisibility(true)}try{i3geoOL.addLayers(i3GEO.Interface.openlayers.LAYERSADICIONAIS)}catch(e){}},sobeLayersGraficos:function(){var nlayers=i3geoOL.getNumLayers(),layers=i3geoOL.layers,i;for(i=0;i<nlayers;i++){if(layers[i].CLASS_NAME=="OpenLayers.Layer.Vector"){i3geoOL.raiseLayer(i3geoOL.layers[i],nlayers)}}},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}i3GEO.Interface.openlayers.removeTodosOsLayers();i3GEO.Interface.openlayers.criaLayers()},removeTodosOsLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,layer,i,camada;for(i=nlayers-1;i>=0;i--){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];layer=i3geoOL.getLayersByName(camada.name)[0];i3geoOL.removeLayer(layer,false)}},alteraParametroLayers:function(parametro,valor){var layers=i3geoOL.layers,nlayers=layers.length,i,url,reg;for(i=0;i<nlayers;i+=1){url=layers[i].url;reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");layers[i].url=url.replace(reg,"");eval("layers[i].mergeNewParams({"+parametro+":valor})");layers[i].redraw()}},loadStartLayer:function(event){i3GEO.Interface.STATUS.atualizando.push(event.object.name);YAHOO.util.Dom.setStyle("ArvoreTituloTema"+event.object.name,"background",i3GEO.Interface.openlayers.FUNDOTEMA)},loadStopLayer:function(event){i3GEO.Interface.STATUS.atualizando.remove(event.object.name);YAHOO.util.Dom.setStyle("ArvoreTituloTema"+event.object.name,"background","")},ordenaLayers:function(){var ordem=i3GEO.arvoreDeCamadas.CAMADAS,nordem=ordem.length,layer,layers,i,maiorindice;layers=i3geoOL.layers;maiorindice=i3geoOL.getLayerIndex(layers[(layers.length)-1]);for(i=nordem-1;i>=0;i--){layers=i3geoOL.getLayersByName(ordem[i].name);layer=layers[0];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));i3GEO.Interface.openlayers.OLpanzoombar.div.style.top=i3GEO.Interface.BARRADEZOOMTOP+"px";i3GEO.Interface.openlayers.OLpanzoombar.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+"px"},atualizaMapa:function(){var layers=i3geoOL.layers,nlayers=layers.length,i;for(i=0;i<nlayers;i++){layers[i].mergeNewParams({r:Math.random()});layers[i].url=layers[i].url.replace("&&&&&&&&&&&&&&","");layers[i].url=layers[i].url+"&&";if(layers[i].visibility===true){layers[i].redraw()}}},atualizaTema:function(retorno,tema){var layer=i3geoOL.getLayersByName(tema)[0];if(layer&&layer!=undefined){layer.mergeNewParams({r:Math.random()});layer.url=layer.url.replace("&&&&&&&&&&&&&&","");layer.url=layer.url+"&&";layer.redraw()}if(retorno===""){return}i3GEO.Interface.openlayers.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},registraEventos:function(){i3GEO.eventos.ativa($i("openlayers"));i3geoOL.events.register("moveend",i3geoOL,function(e){i3GEO.Interface.openlayers.recalcPar();i3GEO.eventos.navegaMapa()});i3geoOL.events.register("mousemove",i3geoOL,function(e){var p,lonlat,d,dc,imgp,targ,pos,mousex,mousey;p=e.xy;lonlat=i3geoOL.getLonLatFromPixel(p);if(!lonlat){return}d=i3GEO.calculo.dd2dms(lonlat.lon,lonlat.lat);try{objposicaocursor.ddx=lonlat.lon;objposicaocursor.ddy=lonlat.lat;objposicaocursor.dmsx=d[0];objposicaocursor.dmsy=d[1];objposicaocursor.imgx=p.x;objposicaocursor.imgy=p.y;pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));objposicaocursor.telax=p.x+pos[0];objposicaocursor.telay=p.y+pos[1]}catch(e){}})},ativaBotoes:function(){var imagemxy,x1,y1,x2,y2;imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){x2=imagemxy[0]+i3GEO.Interface.BARRABOTOESLEFT;y2=imagemxy[1]+i3GEO.Interface.BARRABOTOESTOP}if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","i3geo_barra2",false,x2,y2)}if(i3GEO.configura.visual!=="default"){i3GEO.gadgets.visual.troca(i3GEO.configura.visual)}i3GEO.barraDeBotoes.ativaBotoes()},recalcPar:function(){var bounds=i3geoOL.getExtent().toBBOX().split(","),escalaAtual=i3geoOL.getScale();if(i3GEO.parametros.mapscale!==escalaAtual){i3GEO.arvoreDeCamadas.atualizaFarol(escalaAtual)}i3GEO.parametros.mapexten=bounds[0]+" "+bounds[1]+" "+bounds[2]+" "+bounds[3];i3GEO.parametros.mapscale=escalaAtual;i3GEO.parametros.pixelsize=i3geoOL.getResolution();try{atualizaEscalaNumerica(parseInt(escalaAtual,10))}catch(e){}},zoom2ext:function(ext){var m,b;m=ext.split(" ");b=new OpenLayers.Bounds(m[0],m[1],m[2],m[3]);i3geoOL.zoomToExtent(b)},pan2ponto:function(x,y){i3geoOL.panTo(new OpenLayers.LonLat(x,y))}},googlemaps:{OPACIDADE:0.8,TIPOMAPA:"terrain",ZOOMSCALE:[591657550,295828775,147914387,73957193,36978596,18489298,9244649,4622324,2311162,1155581,577790,288895,144447,72223,36111,18055,9027,4513,2256,1128],PARAMETROSLAYER:"&TIPOIMAGEM="+i3GEO.configura.tipoimagem,posfixo:0,atualizaTema:function(retorno,tema){var indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(tema);i3GeoMap.overlayMapTypes.removeAt(indice);i3GEO.Interface.googlemaps.posfixo+=1;i3GEO.Interface.googlemaps.insereLayer(tema,indice);if(retorno===""){return}i3GEO.Interface.googlemaps.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},redesenha:function(){i3GEO.Interface.googlemaps.posfixo+=1;var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(camada.name);if(indice!==false){try{i3GeoMap.overlayMapTypes.removeAt(indice)}catch(e){}}}i3GEO.Interface.googlemaps.criaLayers()},cria:function(w,h){var i,f,ins,js;posfixo="&nd=0";i=$i(i3GEO.Interface.IDCORPO);if(i){f=$i("googlemapsdiv");if(!f){ins='<div id=googlemapsdiv style="width:0px;height:0px;text-align:left;background-image:url('+i3GEO.configura.locaplic+'/imagens/i3geo1bw.jpg)"></div>';i.innerHTML=ins}f=$i("googlemapsdiv");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.ativaBotoes();i3GEO.eventos.ativa($i(i3GEO.Interface.IDMAPA));i3GEO.coordenadas.mostraCoordenadas();i3GEO.gadgets.mostraEscalaNumerica();i3GEO.gadgets.mostraMenuSuspenso();i3GEO.gadgets.mostraMenuLista();i3GEO.idioma.mostraSeletor();g_operacao="";g_tipoacao="";i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.googlemaps.ligaDesliga(this)";i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);i3GEO.util.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===true){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<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(camada.name);if(!indice){if(camada.status!=0){i3GEO.Interface.googlemaps.insereLayer(camada.name,0)}}}},criaImageMap:function(nomeLayer){var i3GEOTileO,s;s="i3GEOTileO = new google.maps.ImageMapType({ "+"getTileUrl: function(coord, zoom) {"+" var url = '"+i3GEO.configura.locaplic+"/classesphp/mapa_googlemaps.php?g_sid="+i3GEO.configura.sid+"&Z=' + zoom + '&X=' + coord.x + '&Y=' + coord.y + '&layer="+nomeLayer+i3GEO.Interface.googlemaps.PARAMETROSLAYER+'&r='+Math.random()+"';"+" return url+'&nd='+i3GEO.Interface.googlemaps.posfixo; "+"}, "+"tileSize: new google.maps.Size(256, 256),"+"isPng: true,"+"name: '"+nomeLayer+"'"+"});";eval(s);return i3GEOTileO},insereLayer:function(nomeLayer,indice){var i=i3GEO.Interface.googlemaps.criaImageMap(nomeLayer);i3GeoMap.overlayMapTypes.insertAt(indice,i)},registraEventos:function(){var pos;google.maps.event.addListener(i3GeoMap,"dragstart",function(){g_operacao="";g_tipoacao=""});google.maps.event.addListener(i3GeoMap,"dragend",function(){i3GEO.Interface.googlemaps.recalcPar();i3GEO.eventos.navegaMapa()});google.maps.event.addListener(i3GeoMap,"tilesloaded",function(){i3GEO.Interface.googlemaps.recalcPar()});google.maps.event.addListener(i3GeoMap,"bounds_changed",function(){i3GEO.Interface.googlemaps.recalcPar();g_operacao="";g_tipoacao="";i3GEO.eventos.navegaMapa()});pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));google.maps.event.addListener(i3GeoMap,"mousemove",function(ponto){var teladms,tela;ponto=ponto.latLng;teladms=i3GEO.calculo.dd2dms(ponto.lng(),ponto.lat());tela=i3GeoMapOverlay.getProjection().fromLatLngToContainerPixel(ponto);objposicaocursor={ddx:ponto.lng(),ddy:ponto.lat(),dmsx:teladms[0],dmsy:teladms[1],imgx:tela.x,imgy:tela.y,telax:tela.x+pos[0],telay:tela.y+pos[1]}})},retornaIndiceLayer:function(nomeLayer){var i=false;try{i3GeoMap.overlayMapTypes.forEach(function(elemento,number){if(elemento.name===nomeLayer){i=number}});return i}catch(e){return false}},retornaObjetoLayer:function(nomeLayer){var i=false;try{i3GeoMap.overlayMapTypes.forEach(function(elemento,number){if(elemento.name===nomeLayer){i=elemento}});return i}catch(e){return false}},retornaDivLayer:function(nomeLayer){var i=false,divmapa=$i("googlemapsdiv"),divlayer=divmapa.firstChild.firstChild.firstChild.getElementsByTagName("div"),divs,divimg,j,ndivs=divlayer.length;for(j=0;j<ndivs;j++){divimg=divlayer[j].getElementsByTagName("img");if(divimg.length>0){if(divimg[0].src.search("&layer="+nomeLayer+"&")>0){return divimg[0].parentNode.parentNode.parentNode}}}},ligaDesliga:function(obj){var indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(obj.value),temp=function(){i3GEO.mapa.legendaHTML.atualiza()},desligar="",ligar="";if(obj.checked&&!indice){ligar=obj.value;i3GEO.Interface.googlemaps.insereLayer(obj.value,0);i3GEO.arvoreDeCamadas.alteraPropCamadas("status","2",obj.value)}else{if(indice!==false){desligar=obj.value;i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value);i3GeoMap.overlayMapTypes.removeAt(indice)}}if(desligar!==""||ligar!==""){i3GEO.php.ligatemas(temp,desligar,ligar)}},bbox:function(){var bd,so,ne,bbox;bd=i3GeoMap.getBounds();so=bd.getSouthWest();ne=bd.getNorthEast();bbox=so.lng()+" "+so.lat()+" "+ne.lng()+" "+ne.lat();return(bbox)},ativaBotoes:function(){var imagemxy,x1,y1,x2,y2;imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){x2=imagemxy[0]+i3GEO.Interface.BARRABOTOESLEFT;y2=imagemxy[1]+i3GEO.Interface.BARRABOTOESTOP}if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","i3geo_barra2",false,x2,y2)}if(i3GEO.configura.visual!=="default"){i3GEO.gadgets.visual.troca(i3GEO.configura.visual)}i3GEO.barraDeBotoes.ativaBotoes()},mudaOpacidade:function(valor){i3GEO.Interface.googlemaps.OPACIDADE=valor/200;i3GEO.Interface.googlemaps.redesenha()},recalcPar:function(){try{var bounds,sw,ne,escalaAtual=i3GEO.parametros.mapscale;sw=i3GeoMap.getBounds().getSouthWest();ne=i3GeoMap.getBounds().getNorthEast();i3GEO.parametros.mapexten=sw.lng()+" "+sw.lat()+" "+ne.lng()+" "+ne.lat();i3GEO.parametros.mapscale=i3GEO.Interface.googlemaps.calcescala();sw=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(0,1));ne=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(1,0));i3GEO.parametros.pixelsize=sw.lng()-ne.lng();if(i3GEO.parametros.pixelsize<0){i3GEO.parametros.pixelsize=i3GEO.parametros.pixelsize*-1}if(i3GEO.parametros.mapscale!==escalaAtual&&escalaAtual!==0){i3GEO.arvoreDeCamadas.atualizaFarol(i3GEO.parametros.mapscale)}}catch(e){i3GEO.parametros.mapexten="0 0 0 0";i3GEO.parametros.mapscale=0}},calcescala:function(){var zoom=i3GeoMap.getZoom();return(i3GEO.Interface.googlemaps.ZOOMSCALE[zoom])},escala2nzoom:function(escala){var n,i;n=i3GEO.Interface.googlemaps.ZOOMSCALE.length;for(i=0;i<n;i++){if(i3GEO.Interface.googlemaps.ZOOMSCALE[i]<escala){return(i)}}},zoom2extent:function(mapexten){var pol,ret,pt1,pt2,sw,ne,z;pol=mapexten;ret=pol.split(" ");pt1=(((ret[0]*-1)-(ret[2]*-1))/2)+ret[0]*1;pt2=(((ret[1]-ret[3])/2)*-1)+ret[1]*1;sw=new google.maps.LatLng(ret[1],ret[0]);ne=new google.maps.LatLng(ret[3],ret[2]);i3GeoMap.fitBounds(new google.maps.LatLngBounds(sw,ne))},pan2ponto:function(x,y){i3GeoMap.panTo(new google.maps.LatLng(y,x))},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i,zoom;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googlemaps.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=true}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===false){i3GEO.arvoreDeCamadas.MOSTRALISTAKML=true;i3GEO.Interface.googlemaps.criaArvoreKML()}i3GEO.Interface.googlemaps.adicionaNoArvoreGoogle(url,titulo,ativo,ngeoxml)},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.googlemaps.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaNoArvoreGoogle:function(url,nomeOverlay,ativo,id){var root,node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googlemaps.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}root=i3GEO.Interface.googlemaps.ARVORE.getRoot();node=i3GEO.Interface.googlemaps.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.googlemaps.ativaDesativaCamadaKml(this,\""+url+"\")' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";if(navm){estilo="cursor:default;vertical-align:35%;padding-top:0px;"}else{estilo="cursor:default;vertical-align:top;"}html+="&nbsp;<span style='"+estilo+"'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.googlemaps.ARVORE.draw();i3GEO.Interface.googlemaps.ARVORE.collapseAll();node.expand();if(ativo===true){eval(id+" = new google.maps.KmlLayer('"+url+"',{map:i3GeoMap,preserveViewport:true});")}},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.googlemaps.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.googlemaps.ARVORE.getRoot();titulo="<table><tr><td><b>Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false;if(i3GEO.parametros.editor==="sim"){d=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/webservices.html' target=blank >Editar cadastro</a>",idmenu:"",enableHighlight:false,expanded:false},node)}},ativaDesativaCamadaKml:function(obj,url){if(!obj.checked){eval(obj.value+".setMap(null);")}else{eval(obj.value+" = new google.maps.KmlLayer(url,{map:i3GeoMap,preserveViewport:true});")}},alteraParametroLayers:function(parametro,valor){parametro=parametro.toUpperCase();var reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");i3GEO.Interface.googlemaps.PARAMETROSLAYER=i3GEO.Interface.googlemaps.PARAMETROSLAYER.replace(reg,"");i3GEO.Interface.googlemaps.PARAMETROSLAYER+="&"+parametro+"="+valor;i3GEO.Interface.googlemaps.redesenha()}},googleearth:{PARAMETROSLAYER:"&TIPOIMAGEM="+i3GEO.configura.tipoimagem,posfixo:"",GADGETS:{setMouseNavigationEnabled:true,setStatusBarVisibility:true,setOverviewMapVisibility:true,setScaleLegendVisibility:true,setAtmosphereVisibility:true,setGridVisibility:false,getSun:false,LAYER_BORDERS:true,LAYER_BUILDINGS:false,LAYER_ROADS:false,LAYER_TERRAIN:true},POSICAOTELA:[0,0],aguarde:"",ligaDesliga:function(obj){var layer=i3GEO.Interface.googleearth.retornaObjetoLayer(obj.value),temp=function(){i3GEO.mapa.legendaHTML.atualiza()},desligar="",ligar="";if(obj.checked){i3GEO.arvoreDeCamadas.alteraPropCamadas("status","2",obj.value);ligar=obj.value}else{i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value);desligar=obj.value}layer.setVisibility(obj.checked);if(desligar!==""||ligar!==""){i3GEO.php.ligatemas(temp,desligar,ligar)}},atualizaTema:function(retorno,tema){var layer=i3GEO.Interface.googleearth.retornaObjetoLayer(tema),hr=layer.getLink().getHref();hr=hr.replace("&&&&&","");layer.getLink().setHref(hr+"&");if(retorno===""){return}i3GEO.Interface.googleearth.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},redesenha:function(){i3GEO.Interface.googleearth.posfixo+="&";var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googleearth.retornaObjetoLayer(camada.name);if(indice!==false){try{i3GeoMap.getFeatures().removeChild(indice)}catch(e){}}}i3GEO.Interface.googleearth.criaLayers()},cria:function(w,h){var i,i3GeoMap3d,i3GeoMap,texto;i3GEO.configura.listaDePropriedadesDoMapa={"propriedades":[{text:"p2",url:"javascript:i3GEO.mapa.dialogo.tipoimagem()"},{text:"p3",url:"javascript:i3GEO.mapa.dialogo.opcoesLegenda()"},{text:"p4",url:"javascript:i3GEO.mapa.dialogo.opcoesEscala()"},{text:"p8",url:"javascript:i3GEO.mapa.dialogo.queryMap()"},{text:"p9",url:"javascript:i3GEO.mapa.dialogo.corFundo()"},{text:"p10",url:"javascript:i3GEO.mapa.dialogo.gradeCoord()"}]};texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setMouseNavigationEnabled===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setMouseNavigationEnabled(this.checked)'";texto+="> "+$trad("ge1");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setStatusBarVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setStatusBarVisibility(this.checked)'";texto+="> "+$trad("ge2");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setOverviewMapVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setOverviewMapVisibility(this.checked)'";texto+="> "+$trad("ge3");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setScaleLegendVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setScaleLegendVisibility(this.checked)'";texto+="> "+$trad("ge4");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setAtmosphereVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setAtmosphereVisibility(this.checked)'";texto+="> "+$trad("ge5");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setGridVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setGridVisibility(this.checked)'";texto+="> "+$trad("ge6");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.getSun===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getSun().setVisibility(this.checked)'";texto+="> "+$trad("ge7");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_BORDERS===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_BORDERS, i3GEO.Interface.checked)'";texto+="> "+$trad("ge8");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_BUILDINGS===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_BUILDINGS, i3GEO.Interface.checked)'";texto+="> "+$trad("ge9");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_ROADS===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_ROADS, i3GEO.Interface.checked)'";texto+="> "+$trad("ge10");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_TERRAIN===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_TERRAIN, i3GEO.Interface.checked)'";texto+="> "+$trad("ge11");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});i3GEO.util.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa);i3GEO.barraDeBotoes.INCLUIBOTAO.zoomli=false;i3GEO.barraDeBotoes.INCLUIBOTAO.pan=false;i3GEO.barraDeBotoes.INCLUIBOTAO.zoomtot=false;i3GEO.Interface.IDMAPA="i3GeoMap3d";i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.googleearth.ligaDesliga(this)";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)}i3GeoMap=null;google.load("earth","1")},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.gadgets.mostraMenuLista();i3GEO.Interface.googleearth.ativaBotoes();i3GEO.gadgets.mostraInserirKml("inserirKml");if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===true){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<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googleearth.retornaIndiceLayer(camada.name);layer=i3GEO.Interface.googleearth.retornaObjetoLayer(camada.name);if(indice===false){layer=i3GEO.Interface.googleearth.insereLayer(camada.name)}try{if(camada.status!=0){layer.setVisibility(true)}else{layer.setVisibility(false)}}catch(e){}}},insereLayer:function(nomeLayer){var kmlUrl=i3GEO.configura.locaplic+"/classesphp/mapa_googleearth.php?REQUEST=GetKml&g_sid="+i3GEO.configura.sid+"&layer="+nomeLayer+i3GEO.Interface.googleearth.PARAMETROSLAYER+"&r="+Math.random(),linki3geo=i3GeoMap.createLink(''),nl=i3GeoMap.createNetworkLink('');linki3geo.setHref(kmlUrl+i3GEO.Interface.googleearth.posfixo);nl.setLink(linki3geo);nl.setFlyToView(false);nl.setName(nomeLayer);i3GeoMap.getFeatures().appendChild(nl);return nl},retornaIndiceLayer:function(nomeLayer){var n=i3GeoMap.getFeatures().getChildNodes().getLength(),indice=false;for(i=0;i<n;i++){if(i3GeoMap.getFeatures().getChildNodes().item(i).getName()===nomeLayer){indice=i}}return indice},retornaObjetoLayer:function(nomeLayer){var n=i3GeoMap.getFeatures().getChildNodes().getLength(),indice=false,i;for(i=0;i<n;i++){if(i3GeoMap.getFeatures().getChildNodes().item(i).getName()===nomeLayer){indice=i3GeoMap.getFeatures().getChildNodes().item(i)}}return indice},registraEventos:function(){google.earth.addEventListener(i3GeoMap.getView(),"viewchangeend",function(e){i3GEO.Interface.googleearth.recalcPar()});google.earth.addEventListener(i3GeoMap.getGlobe(),'mousemove',function(event){d=i3GEO.calculo.dd2dms(event.getLongitude(),event.getLatitude());objposicaocursor={ddx:event.getLongitude(),ddy:event.getLatitude(),dmsx:d[0],dmsy:d[1],imgx:event.getClientX(),imgy:event.getClientY(),telax:event.getClientX()+i3GEO.Interface.googleearth.POSICAOTELA[0],telay:event.getClientY()+i3GEO.Interface.googleearth.POSICAOTELA[1]};i3GEO.eventos.mousemoveMapa()});google.earth.addEventListener(i3GeoMap.getGlobe(),'click',function(event){if(i3GEO.Interface.googleearth.aguarde.visibility==="hidden"){i3GEO.eventos.mousecliqueMapa()}else{i3GEO.Interface.googleearth.aguarde.visibility="hidden"}})},recalcPar:function(){var bounds;bounds=i3GeoMap.getView().getViewportGlobeBounds();i3GEO.parametros.mapexten=bounds.getWest()+" "+bounds.getSouth()+" "+bounds.getEast()+" "+bounds.getNorth()},falha:function(){alert("Falhou. Vc precisa do plugin instalado")},ativaBotoes:function(){var cabecalho=function(){i3GEO.barraDeBotoes.ativaIcone("")},minimiza=function(){i3GEO.janela.minimiza("i3GEOF.ferramentasGE")},janela=i3GEO.janela.cria("230px","110px","","","","Ferramentas","i3GEOF.ferramentasGE",false,"hd",cabecalho,minimiza);i3GEO.barraDeBotoes.TEMPLATEBOTAO='<div style="display:inline;background-color:rgb(250,250,250);"><img src="'+i3GEO.configura.locaplic+'/imagens/branco.gif" id="$$"/></div>&nbsp;';i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","",false,"200","200",janela[2].id);i3GEO.barraDeBotoes.ativaBotoes();i3GEO.Interface.googleearth.aguarde=$i("i3GEOF.ferramentasGE_imagemCabecalho").style;$i("i3GEOF.ferramentasGE_minimizaCabecalho").style.right="0px";$i("i3GEOF.ferramentasGE").lastChild.style.display="none";i3GEO.ajuda.abreJanela()},balao:function(texto,ddx,ddy){var placemark=i3GeoMap.createPlacemark(''),point=i3GeoMap.createPoint(''),b;point.setLatitude(ddy);point.setLongitude(ddx);placemark.setGeometry(point);b=i3GeoMap.createHtmlStringBalloon('');b.setContentString("<div style=text-align:left >"+texto+"</div>");b.setFeature(placemark);i3GeoMap.setBalloon(b)},insereMarca:function(description,ddx,ddy,name,snippet){var placemark=i3GeoMap.createPlacemark(''),point=i3GeoMap.createPoint('');placemark.setName(name);point.setLatitude(ddy);point.setLongitude(ddx);placemark.setGeometry(point);if(description!==""){placemark.setDescription(description)}placemark.setSnippet(snippet);i3GeoMap.getFeatures().appendChild(placemark)},insereCirculo:function(centerLng,centerLat,radius,name,snippet){function makeCircle(centerLat,centerLng,radius){var ring=i3GeoMap.createLinearRing(''),steps=25,i,pi2=Math.PI*2,lat,lng;for(i=0;i<steps;i++){lat=centerLat+radius*Math.cos(i/steps*pi2);lng=centerLng+radius*Math.sin(i/steps*pi2);ring.getCoordinates().pushLatLngAlt(lat,lng,0)}return ring}var polygonPlacemark=i3GeoMap.createPlacemark(''),poly=i3GeoMap.createPolygon(''),outer,polyStyle;poly.setAltitudeMode(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND);polygonPlacemark.setGeometry(poly);outer=i3GeoMap.createLinearRing('');polygonPlacemark.getGeometry().setOuterBoundary(makeCircle(centerLat,centerLng,radius));polygonPlacemark.setName(name);polygonPlacemark.setSnippet(snippet);polygonPlacemark.setStyleSelector(i3GeoMap.createStyle(''));polyStyle=polygonPlacemark.getStyleSelector().getPolyStyle();polyStyle.setFill(0);i3GeoMap.getFeatures().appendChild(polygonPlacemark)},insereLinha:function(xi,yi,xf,yf,name,snippet){var lineStringPlacemark=i3GeoMap.createPlacemark(''),lineString,lineStyle;lineStringPlacemark.setName(name);lineString=i3GeoMap.createLineString('');lineString.setAltitudeMode(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND);lineStringPlacemark.setGeometry(lineString);lineString.getCoordinates().pushLatLngAlt(yi,xi,0);lineString.getCoordinates().pushLatLngAlt(yf,xf,0);lineStringPlacemark.setStyleSelector(i3GeoMap.createStyle(''));lineStringPlacemark.setSnippet(snippet);lineStyle=lineStringPlacemark.getStyleSelector().getLineStyle();lineStyle.setWidth(3);i3GeoMap.getFeatures().appendChild(lineStringPlacemark)},removePlacemark:function(nome){var features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i,nfeatures=[];for(i=0;i<n;i++){try{if(features.getChildNodes().item(i).getName()===nome||features.getChildNodes().item(i).getDescription()===nome||features.getChildNodes().item(i).getSnippet()===nome){nfeatures.push(features.getChildNodes().item(i))}}catch(e){}}n=nfeatures.length;for(i=0;i<n;i++){features.removeChild(nfeatures[i])}},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i,zoom;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googleearth.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=false}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(arguments.length===2){ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);linki3geokml=i3GeoMap.createLink('');if(url.split("http").length===1){url=i3GEO.util.protocolo()+"://"+window.location.host+url}linki3geokml.setHref(url);eval(ngeoxml+" = i3GeoMap.createNetworkLink('')");eval(ngeoxml+".setLink(linki3geokml)");if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===false){i3GEO.arvoreDeCamadas.MOSTRALISTAKML=true;i3GEO.Interface.googleearth.criaArvoreKML()}i3GEO.Interface.googleearth.adicionaNoArvoreGoogle(url,titulo,ativo,ngeoxml)},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.googleearth.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaNoArvoreGoogle:function(url,nomeOverlay,ativo,id){var root,node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googleearth.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}root=i3GEO.Interface.googleearth.ARVORE.getRoot();node=i3GEO.Interface.googleearth.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.googleearth.ativaDesativaCamadaKml(this)' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";html+="&nbsp;<span style='cursor:move'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.googleearth.ARVORE.draw();i3GEO.Interface.googleearth.ARVORE.collapseAll();node.expand()},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.googleearth.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.googleearth.ARVORE.getRoot();titulo="<table><tr><td><b>Google Earth Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false;if(i3GEO.parametros.editor==="sim"){d=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/webservices.html' target=blank >Editar cadastro</a>",idmenu:"",enableHighlight:false,expanded:false},node)}},existeLink:function(url){var existe=false,features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i;for(i=0;i<n;i++){try{if(features.getChildNodes().item(i).getLink().getHref()===url){existe=true}}catch(e){}}return(existe)},ativaDesativaLink:function(url,valor){var features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i;for(i=0;i<n;i++){try{if(features.getChildNodes().item(i).getLink().getHref()===url){features.getChildNodes().item(i).setVisibility(valor)}}catch(e){}}},ativaDesativaCamadaKml:function(obj){var url=eval(obj.value+".getLink().getHref()"),existe=i3GEO.Interface.googleearth.existeLink(url);if(!obj.checked){i3GEO.Interface.googleearth.ativaDesativaLink(url,false)}else{if(existe===false){eval("i3GeoMap.getFeatures().appendChild("+obj.value+")")}else{i3GEO.Interface.googleearth.ativaDesativaLink(url,true)}}},zoom2extent:function(mapexten){var r=6378700,lng2,lng1,lat1,lat2,ret=mapexten.split(" "),fov=32,camera=i3GeoMap.getView().copyAsCamera(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND),dy,dx,d,dist,alt;lng2=(ret[0]*1);lng1=(ret[2]*1);lat1=(ret[1]*1);lat2=(ret[3]*1);camera.setLatitude((lat1+lat2)/2.0);camera.setLongitude((lng1+lng2)/2.0);camera.setHeading(0.0);camera.setTilt(0.0);dy=Math.max(lat1,lat2)-Math.min(lat1,lat2);dx=Math.max(lng1,lng2)-Math.min(lng1,lng2);d=Math.max(dy,dx);d=d*Math.PI/180.0;dist=r*Math.tan(d/2);alt=dist/(Math.tan(fov*Math.PI/180.0));camera.setAltitude(alt);i3GeoMap.getView().setAbstractView(camera)},alteraParametroLayers:function(parametro,valor){parametro=parametro.toUpperCase();var reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");i3GEO.Interface.googleearth.PARAMETROSLAYER=i3GEO.Interface.googleearth.PARAMETROSLAYER.replace(reg,"");i3GEO.Interface.googleearth.PARAMETROSLAYER+="&"+parametro+"="+valor;i3GEO.Interface.googleearth.redesenha()}}};
363   -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.mapa={AUTORESIZE:false,GEOXML:[],ativaAutoResize:function(){window.onresize=function(){var temp=setTimeout(function(){i3GEO.reCalculaTamanho();i3GEO.barraDeBotoes.recria("i3geo_barra2");if(i3GEO.Interface.TABLET===true){i3GEO.guias.escondeGuias()}else{i3GEO.guias.ajustaAltura()}},2000)}},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+='<div style="cursor: pointer; text-align: left; font-size: 10px; display: block; height: 35px;" onclick="i3GEO.mapa.legendaHTML.libera()"><img id="soltaLeg" src="../imagens/branco.gif" title="clique para liberar" style="margin: 5px; position: relative;"> <p style="position: relative; left: -30px; top: -22px;">Mostra a legenda em uma janela</p></div>'}ins+="<div id='corpoLegi' >"+retorno.data.legenda+"</div>";$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<elementos.length;i+=1){elementos[i].style.display="none"}}};if(i3GEO.mapa.legendaHTML.ID!==""){idleg=$i(i3GEO.mapa.legendaHTML.ID);if(idleg&&idleg.style.display==="block"){i3GEO.mapa.legendaHTML.obtem(temp)}}idleg=$i("wlegenda");if(idleg&&idleg.style.display==="block"){i3GEO.mapa.legendaHTML.obtem(temp)}},obtem:function(funcao){i3GEO.php.criaLegendaHTML(funcao,"",i3GEO.configura.templateLegenda)},ativaDesativaTema:function(inputbox){var temp=function(){i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem);i3GEO.arvoreDeCamadas.atualiza("");i3GEO.janela.fechaAguarde("redesenha")};i3GEO.janela.abreAguarde("redesenha",$trad("o1"));if(!inputbox.checked){i3GEO.php.ligatemas(temp,inputbox.value,"")}else{i3GEO.php.ligatemas(temp,"",inputbox.value)}},libera:function(){var temp=function(retorno){var novoel,temp,n,i;if(!$i("moveLegi")){novoel=document.createElement("div");novoel.id="moveLegi";novoel.style.display="block";temp='<div class="hd" style=background:white >Legenda</div>';temp+='<div id="wlegenda" style="display:block;text-align:left;background-color:white;height:300px;width:300px;overflow:auto" ></div>';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:true});YAHOO.moveLegi.xp.panel.render()}$i("wlegenda").innerHTML=retorno.data.legenda;temp=$i("wlegenda").getElementsByTagName("input");n=temp.length;for(i=0;i<n;i+=1){temp[i].style.display="none"}YAHOO.moveLegi.xp.panel.show();$i("moveLegi_c").style.zIndex=100000;$i("moveLegi").style.border="1px solid gray"};i3GEO.mapa.legendaHTML.obtem(temp)}},legendaIMAGEM:{obtem:function(funcao){i3GEO.php.criaLegendaImagem(funcao)}},dialogo:{telaRemota:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.telaremota()","telaremota","telaremota")},t3d:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.t3d()","3d","t3d")},imprimir:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.imprimir()","imprimir","imprimir")},mostraExten:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.mostraExten()","mostraexten","mostraExten")},outputformat:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.outputformat()","outputformat","outputformat")},autoredesenha:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.autoredesenha()","opcoes_autoredesenha","opcoesTempo")},salvaMapa:function(){if(i3GEO.parametros===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.salvaMapa()","salvamapa","salvaMapa")},carregaMapa:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.carregaMapa()","carregamapa","carregaMapa")},convertews:function(){if(i3GEO.parametros.mapfile===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.convertews()","convertews","converteMapaWS")},convertekml:function(){if(i3GEO.parametros.mapfile===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.convertekml()","convertemapakml","converteMapaKml")},queryMap:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.queryMap()","opcoes_querymap","opcoesQuery")},template:function(){i3GEO.janela.cria("300px","400px",i3GEO.configura.locaplic+"/ferramentas/template/index.htm","","","Template <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=1&idajuda=8' >&nbsp;&nbsp;&nbsp;</a>")},tamanho:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tamanho()","opcoes_tamanho","opcoesTamanho")},tipoimagem:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tipoimagem()","tipoimagem","tipoimagem")},corFundo:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.corFundo()","opcoes_fundo","opcoesFundo")},opcoesEscala:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesEscala()","opcoes_escala","opcoesEscala")},opcoesLegenda:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesLegenda()","opcoes_legenda","opcoesLegenda")},gradeCoord:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.gradeCoord()","gradecoord","gradeCoord")},cliqueTexto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueTexto()","inseretxt","inseretxt")},selecao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.selecao()","selecao","selecao")},cliquePonto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliquePonto()","inserexy2","inserexy")},cliqueGrafico:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueGrafico()","inseregrafico","insereGrafico")},cliqueIdentificaDefault:function(){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<ntemas;j+=1){if(i3GEO.arvoreDeCamadas.CAMADAS[j].etiquetas!==""){etiquetas=true}}if(etiquetas===false){return}if(i3GEO.Interface.ATUAL==="padrao"){$i("img").style.cursor="wait"}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.aguarde.visibility="visible"}retorna=function(retorno){var pos,temp,rfes,n,i,mostra,res,temas,ntemas,titulo,tips,j,ntips,ins,r,ds,nds,s,balloon,configura=i3GEO.configura,tipotip=configura.tipotip;i=$i("i3geo_rosa");if(i){i.style.display="none"}mostra=false;retorno=retorno.data;if(retorno!==""){res="";temas=retorno;if(!temas){return}ntemas=temas.length;for(j=0;j<ntemas;j+=1){titulo=temas[j].nome;if(tipotip==="completo"||tipotip==="balao"){titulo="<span style='text-decoration:underline;text-align:left;font-size:9pt'><b>"+titulo+"</b></span><br>"}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<nds;s+=1){for(r=0;r<ntips;r+=1){try{eval("var alias = ds[s]."+tips[r]+".alias");eval("var valor = ds[s]."+tips[r]+".valor");eval("var link = ds[s]."+tips[r]+".link");eval("var img = ds[s]."+tips[r]+".img");if(tipotip==="completo"||tipotip==="balao"){if(valor!==""&&link===""){ins+="<span class='tiptexto' style='text-align:left;font-size:8pt'>"+alias+" :"+valor+"</span><br>"}if(valor!==""&&link!==""){ins+="<span class='tiptexto' style='text-align:left;font-size:8pt'>"+alias+" : <a style='color:blue;cursor:pointer' target=_blanck href='"+link+"' >"+valor+"</a></span><br>"}if(img!==""){ins+=img+"<br>"}ins+="<nl>";mostra=true}else{ins+="<span class='tiptexto' style='text-align:left;font-size:8pt'>"+valor+"</span><br>";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.janela.TIPS.push('marcaIdentifica');pos=i3GEO.util.posicionaImagemNoMapa("marcaIdentifica");balloon=new Balloon();BalloonConfig(balloon,'GBox');balloon.delayTime=0;res="<div style=text-align:left;overflow:auto;height:"+configura.alturatip+";width:"+configura.larguratip+"; >"+res+"</div>";temp=$i('marcaIdentifica');if(temp){balloon.showTooltip(temp,res,null,null,null,pos[1],pos[0]);balloon.addCloseButton();temp.onclick=function(e){if(!e){e=window.event}document.body.removeChild(balloon.getEventTarget(e));balloon.hideTooltip()}}}}}}if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(configura.cursores,temp,i3GEO.Interface.IDMAPA,configura.locaplic)}};i3GEO.php.identifica2(retorna,objposicaocursor.ddx,objposicaocursor.ddy,"5","tip",i3GEO.configura.locaplic,i3GEO.configura.sid,"ligados",i3GEO.parametros.mapexten)}}};
364   -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.tema={TEMPORIZADORESID:{},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"));i3GEO.php.excluitema(i3GEO.atualiza,[tema]);i3GEO.mapa.ativaTema("")},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)}},temporizador:function(idtema,tempo){if(!tempo){tempo=$i("temporizador"+idtema).value}if(tempo!=""&&parseInt(tempo,10)>0){eval('i3GEO.tema.TEMPORIZADORESID.'+idtema+' = {tempo: '+tempo+',idtemporizador: setInterval(function('+idtema+'){if(!$i("arrastar_'+idtema+'")){delete(i3GEO.tema.TEMPORIZADORESID.'+idtema+');return;}i3GEO.Interface.atualizaTema("",idtema);},parseInt('+tempo+',10)*1000)};')}else{try{window.clearInterval(i3GEO.tema.TEMPORIZADORESID[idtema].idtemporizador);delete(i3GEO.tema.TEMPORIZADORESID[idtema])}catch(e){}}},dialogo:{mostraWms:function(tema){i3GEO.janela.mensagemSimples(i3GEO.configura.locaplic+"/ogc.php?tema="+tema,"Endereço do WMS")},comentario:function(tema){i3GEO.janela.cria("530px","330px",i3GEO.configura.locaplic+"/ferramentas/comentarios/index.php?tema="+tema+"&g_sid="+i3GEO.configura.sid+"&locaplic="+i3GEO.configura.locaplic,"","","<img src='"+i3GEO.configura.locaplic+"/imagens/player_volta.png' style=cursor:pointer onclick='javascript:history.go(-1)'><span style=position:relative;top:-2px; > Comentários de "+tema+" </span><a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=7&idajuda=68' >&nbsp;&nbsp;&nbsp;</a>","comentario"+Math.random())},cortina:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.cortina()","cortina","cortina")},abreKml:function(tema,tipo){if(arguments.lenght===1){tipo="kml"}if(typeof(i3GEOF.converteKml)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/convertekml/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.converteKml.criaJanelaFlutuante('"+tema+"','"+tipo+"')","i3GEOF.converteKml_script")}else{i3GEOF.converteKml.criaJanelaFlutuante(tema,tipo)}},salvaMapfile:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.salvamapfile()","salvamapfile","salvamapfile")},graficotema:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.graficotema()","graficotema","graficoTema")},toponimia:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.toponimia()","toponimia","toponimia")},filtro:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.filtro()","filtro","filtro")},procuraratrib:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.procuraratrib()","busca","busca")},tabela:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.tabela()","tabela","tabela")},etiquetas:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.etiquetas()","etiqueta","etiqueta")},editaLegenda:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.editaLegenda()","legenda","legenda")},download:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.download()","download","download")},sld:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.janela.cria("500px","350px",i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=tema2sld&tema="+idtema+"&g_sid="+i3GEO.configura.sid,"","","SLD <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=41' >&nbsp;&nbsp;&nbsp;</a>")},aplicarsld:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.aplicarsld()","aplicarsld","aplicarsld")},editorsql:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.editorsql()","editorsql","editorsql")}}};
365   -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 <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=3&idajuda=88' >&nbsp;&nbsp;&nbsp;</a>");atualizaLinhaDoTempo=function(){var doc,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:{inicia:function(){pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[],linhastemp:[]};i3GEO.analise.medeDistancia.criaJanela();if(g_tipoacao!=="mede"){if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.analise.medeDistancia.clique()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.analise.medeDistancia.clique()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.analise.medeDistancia.movimento()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.analise.medeDistancia.movimento()")}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.analise.medeDistancia.fechaJanela()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.analise.medeDistancia.fechaJanela()")}$i("mostradistancia").style.display="block";if(i3GEO.Interface.ATUAL!=="googleearth"){i3GEO.desenho.criaContainerRichdraw();i3GEO.desenho.richdraw.lineColor="black";i3GEO.desenho.richdraw.lineWidth="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='<div class="hd" style="font-size:11px">&nbsp;Dist&acirc;ncia aproximada <a class=ajuda_usuario target=_blank href="'+i3GEO.configura.locaplic+'/ajuda_usuario.php?idcategoria=6&idajuda=50" >&nbsp;&nbsp;&nbsp;</a></div>'+'<div class="bd" style="text-align:left;padding:3px;" >'+'<div style="text-align:left;padding:3px;" id="mostradistancia_calculo" ></div>'+'<div style="text-align:left;font-size:10px" >'+'<span style="color:navy;cursor:pointer;text-align:left;" >'+'<table class=lista7 ><tr><td><input style="cursor:pointer" type="checkbox" id="pararraios" checked /></td><td>Raios</td><td>&nbsp;</td>'+'<td>'+'<input style="cursor:pointer" type="checkbox" id="parartextos" checked />'+'</td><td>Textos<td>'+'<td>&nbsp;Estilo:</td><td>'+i3GEO.desenho.caixaEstilos()+'</td>'+'<td>&nbsp;<input id=i3GEObotaoPerfil size="22" type="button" value="perfil"></td>'+'</tr></table></span>'+'</div>'+'</div>';novoel.innerHTML=ins;novoel.style.borderColor="gray";document.body.appendChild(novoel)}else{i3GEO.util.defineValor("mostradistancia_calculo","innerHTML","")}YAHOO.namespace("janelaDocamede.xp");YAHOO.janelaDocamede.xp.panel=new YAHOO.widget.Panel("mostradistancia",{iframe:true,width:330,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]);if(navm&&i3GEO.Interface.ATUAL==="googleearth"){YAHOO.janelaDocamede.xp.panel.moveTo(0,0);alert("Essa opção não funciona bem no Internet Explorer")}temp=$i("mostradistancia_c").style;i3GEO.janela.ULTIMOZINDEX++;temp.zIndex=21000+i3GEO.janela.ULTIMOZINDEX;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(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;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,calculo=i3GEO.calculo;if(g_tipoacao==="mede"){YAHOO.util.Dom.setStyle("mostradistancia","display","block");n=pontosdistobj.xpt.length;try{if(n>0){d=calculo.distancia(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);r=calculo.direcao(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);r=calculo.dd2dms(r,r);r=r[0];d=d+"";d=d.split(".");decimal=d[1].substr(0,5);d=d[0]+"."+decimal;d=d*1;da=d+pontosdistobj.dist[n-1];da=da+"";da=da.split(".");decimal=da[1].substr(0,5);da=da[0]+"."+decimal;da=da*1;mostra=$i("mostradistancia_calculo");if(mostra){texto=" Dist acum.= "+da+" km <br>atual= "+d+" km <br> Direção (DMS)= "+r;texto+="<br>Método cálculo de distâncias: "+calculo.metododistancia;mostra.innerHTML=texto}if(i3GEO.Interface.ATUAL!=="googleearth"&&navn){i3GEO.desenho.aplica("resizeLinha",pontosdistobj.linhas[n-1],n)}}}catch(e){}}}},medeArea:{inicia:function(){pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[],linhastemp:[]};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,temp;if(!$i("mostraarea")){novoel=document.createElement("div");novoel.id="mostraarea";ins='<div class="hd" >&Aacute;rea aproximada <a class=ajuda_usuario target=_blank href="'+i3GEO.configura.locaplic+'"/ajuda_usuario.php?idcategoria=6&idajuda=51" >&nbsp;&nbsp;&nbsp;</a></div>'+'<div class="bd" style="text-align:left;padding:3px;font-size:10px" >'+'Estilo: '+i3GEO.desenho.caixaEstilos()+'<br>'+'<div style="text-align:left;padding:3px;font-size:10px" id="mostraarea_calculo" ></div>'+'</div>';novoel.innerHTML=ins;novoel.style.borderColor="gray";document.body.appendChild(novoel)}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);temp=$i("mostraarea_c").style;i3GEO.janela.ULTIMOZINDEX++;temp.zIndex=21000+i3GEO.janela.ULTIMOZINDEX},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;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","<br>m2</b>= "+m.toFixed(2)+"<br><b>km2</b>= "+(m/1000000).toFixed(2)+"<br><b>ha</b>= "+(m/10000).toFixed(2));if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["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;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)}}}}};
366   -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.maparef={fatorZoomDinamico:-3,SELETORTIPO:true,PERMITEFECHAR:true,PERMITEDESLOCAR:true,TRANSICAOSUAVE:true,OPACIDADE:85,TOP:4,RIGHT:0,inicia:function(){var r,pos,novoel,ins,temp,moveX,moveY,escondeRef;if(navm){i3GEO.maparef.TRANSICAOSUAVE=false}if(!$i("i3geo_winRef")){novoel=document.createElement("div");novoel.id="i3geo_winRef";novoel.style.display="none";novoel.style.borderColor="gray";ins="";if(this.PERMITEDESLOCAR){ins+='<div class="hd" style="text-align:left;z-index:20;padding-left: 0px;padding-bottom: 3px;padding-top: 1px;">';ins+='<span id=maparefmaismenosZoom style=display:none > ';temp="javascript:if(i3GEO.maparef.fatorZoomDinamico == -1){i3GEO.maparef.fatorZoomDinamico = 1};i3GEO.maparef.fatorZoomDinamico = i3GEO.maparef.fatorZoomDinamico + 1 ;$i(\"refDinamico\").checked = true;i3GEO.maparef.atualiza();";ins+="<img class=mais onclick='"+temp+"' src="+i3GEO.util.$im("branco.gif")+" />";temp="javascript:if(i3GEO.maparef.fatorZoomDinamico == 1){i3GEO.maparef.fatorZoomDinamico = -1};i3GEO.maparef.fatorZoomDinamico = i3GEO.maparef.fatorZoomDinamico - 1 ;$i(\"refDinamico\").checked = true;i3GEO.maparef.atualiza();";ins+="<img class=menos onclick='"+temp+"' src="+i3GEO.util.$im("branco.gif")+" /></span>&nbsp;";if(this.SELETORTIPO){ins+="<select style='font-size:9px;' id='refDinamico' onchange='javascript:i3GEO.parametros.celularef=\"\";i3GEO.maparef.atualiza()'>";ins+="<option value='fixo' select >fixo</option>";ins+="<option value='mapa' >mapa</option>";ins+="<option value='dinamico' >dinâmico</option>";ins+="</select>"}ins+="</div>"}ins+='<div class="bd" style="text-align:left;padding:3px;height: 150px;" id="mapaReferencia" onmouseover="this.onmousemove=function(exy){i3GEO.eventos.posicaoMouseMapa(exy)}" >';ins+='<img style="cursor:pointer;display:none" onload="javascript:this.style.display = \'block\'" id="imagemReferencia" src="" onclick="javascript:i3GEO.maparef.click()">';ins+='</div>';novoel.innerHTML=ins;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.maparef.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($i("localizarxygeoProjxg")){var temp=function(){i3GEO.coordenadas.atualizaGeo(objposicaocursor.dmsx,objposicaocursor.dmsy,"localizarxygeoProj")};YAHOO.util.Event.addListener($i("imagemReferencia"),"mousemove",temp)}}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.maparef.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.maparef.atualiza()")}this.atualiza(true);$i("i3geo_winRef_h").className="hd2";if(navm){$i("i3geo_winRef_h").style.width="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.toLowerCase()!=="sim"){if(i3GEO.parametros.celularef===""||$i("imagemReferencia").src===""||forca===true){i3GEO.php.referencia(i3GEO.maparef.processaImagem)}else{i3GEO.maparef.atualizaBox()}if(temp){temp.style.display="none"}}else{re=new RegExp("&mode=map","g");$i("imagemReferencia").src=$i(i3GEO.Interface.IDMAPA).src.replace(re,'&mode=reference');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")}}};
367   -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.ajuda={ATIVAJANELA:true,DIVAJUDA:"i3geo_ajuda",DIVLETREIRO:"i3geo_letreiro",MENSAGEMPADRAO:$trad("p1"),TRANSICAOSUAVE:true,OPACIDADE:20,abreDoc:function(){window.open(i3GEO.configura.locaplic+"/documentacao/index.html")},abreJanela:function(){try{var nx,ny,pos,corpo,texto,janela,temp,largura=262,YU=YAHOO.util;if(this.ATIVAJANELA===false){return}temp=$i("contemFerramentas");if(temp){largura=parseInt(temp.style.width,10)-5}if(!$i("janelaMenTexto")){corpo=$i(i3GEO.Interface.IDCORPO);if(corpo){pos=YU.Dom.getXY(corpo);nx=pos[0]-largura-3;ny=i3GEO.parametros.h-78}texto='<div id="janelaMenTexto" style="text-align:left;font-size:10px;color:rgb(80,80,80)">'+i3GEO.ajuda.MENSAGEMPADRAO+'</div>';janela=i3GEO.janela.cria(largura-3,"auto","",nx,ny,"&nbsp;","i3geo_janelaMensagens",false,"hd","","",true);janela[2].innerHTML=texto;YU.Event.addListener(janela[0].close,"click",i3GEO.ajuda.fechaJanela);this.ativaCookie()}}catch(e){}},ativaCookie:function(){var i=i3GEO.util.insereCookie;i("g_janelaMen","sim");i("botoesAjuda","sim")},ativaLetreiro:function(mensagem){var l;if($i(i3GEO.ajuda.DIVLETREIRO)){if(arguments.length===0){mensagem=i3GEO.parametros.mensagens}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.ajuda.ativaLetreiro()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.ajuda.ativaLetreiro()")}try{clearTimeout(i3GEO.ajuda.tempoLetreiro)}catch(e){i3GEO.ajuda.tempoLetreiro=""}l=$i(i3GEO.ajuda.DIVLETREIRO);if(l.style.display==="none"){return}l.style.cursor="pointer";if(mensagem===""){l.value="";return}if(l.size===1){l.size=i3GEO.parametros.w/8}BMessage=mensagem+" ---Clique para parar--- ";l.onclick=function(){l.style.display="none"};if(BMessage!==" ---Clique para parar--- "){BQuantas=0;BSize=l.size;BPos=BSize;BSpeed=1;BSpaces="";i3GEO.ajuda.mostraLetreiro()}i3GEO.ajuda.mostraLetreiro(mensagem)}},desativaCookie:function(){i3GEO.util.insereCookie("g_janelaMen","nao")},fechaJanela:function(){i3GEO.ajuda.desativaCookie();i3GEO.util.removeChild("i3geo_janelaMensagens_c",document.body)},mostraJanela:function(texto){var j=$i(this.DIVAJUDA),k=$i("janelaMenTexto"),jm=$i("i3geo_janelaMensagens"),Dom=YAHOO.util.Dom,h=parseInt(Dom.getStyle(jm,"height"),10),temp;if(j){j.innerHTML=texto===""?"-":texto}else{if(h){Dom.setY("i3geo_janelaMensagens",Dom.getY(jm)+h)}if(k){k.innerHTML=texto}if(this.TRANSICAOSUAVE){temp=texto!==""?Dom.setStyle(jm,"opacity","1"):Dom.setStyle(jm,"opacity",(this.OPACIDADE/100))}h=parseInt(Dom.getStyle(jm,"height"),10);if(h){Dom.setY(jm,Dom.getY(jm)-h)}}},mostraLetreiro:function(){for(count=0;count<BPos;count+=1){BSpaces+=" "}if(BPos<1){$i(i3GEO.ajuda.DIVLETREIRO).value=BMessage.substring(Math.abs(BPos),BMessage.length);if(BPos+BMessage.length<1){BPos=BSize;BQuantas=BQuantas+1}}else{$i(i3GEO.ajuda.DIVLETREIRO).value=BSpaces+BMessage}BPos-=BSpeed;if(BQuantas<2){i3GEO.ajuda.tempoLetreiro=setTimeout(function(){i3GEO.ajuda.mostraLetreiro()},140)}},redesSociais:function(){i3GEO.janela.cria("400px","400px",i3GEO.configura.locaplic+"/ferramentas/redessociais/index.php","","",$trad("u5c"),YAHOO.util.Dom.generateId(null,"redes"))}};
368   -if(typeof(i3GEO)==='undefined'){i3GEO=[]}YAHOO.namespace("janelaDoca.xp");YAHOO.janelaDoca.xp.manager=new YAHOO.widget.OverlayManager();i3GEO.janela={ESTILOBD:"display:block;padding:5px 0px 5px 2px;",ESTILOAGUARDE:"normal",AGUARDEMODAL:false,ANTESCRIA:["i3GEO.janela.prepara()"],ANTESFECHA:[],TRANSICAOSUAVE:true,OPACIDADE:65,TIPS:[],ULTIMOZINDEX:0,JANELASAGUARDE:[],prepara:function(){var iu=i3GEO.util;iu.escondePin();iu.escondeBox()},cria:function(wlargura,waltura,wsrc,nx,ny,texto,id,modal,classe,funcaoCabecalho,funcaoMinimiza){var i,wlargurA,ins,novoel,wdocaiframe,pos,temp,fix,underlay,ifr;if(navm&&!chro){this.TRANSICAOSUAVE=false}if(this.ANTESCRIA){for(i=0;i<this.ANTESCRIA.length;i++){eval(this.ANTESCRIA[i])}}if(arguments.length<7||id===""){id="wdoca";modal=false;classe="hd";funcaoCabecalho=null;funcaoMinimiza=null}if(arguments.length===7){modal=false;classe="hd";funcaoCabecalho=null;funcaoMinimiza=null}if(arguments.length===8){classe="hd";funcaoCabecalho=null;funcaoMinimiza=null}if(arguments.length===9){funcaoCabecalho=null;funcaoMinimiza=null}if(arguments.length===10){funcaoMinimiza=null}if(i3GEO.Interface.ATUAL==="googleearth"){classe="hd";i3GEO.janela.TRANSICAOSUAVE=false}wlargurA=parseInt(wlargura,10)+2+"px";if($i(id)){YAHOO.janelaDoca.xp.panel.destroy()}i3GEO.util.removeChild(id+"_c");i3GEO.util.removeChild(id);ins='<div id="'+id+'_cabecalho" class="'+classe+'" style="background-color:white;">';if(i3GEO.configura!==undefined){ins+="<img id='"+id+"_imagemCabecalho' style='position:absolute;left:3px;top:2px;visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' />"}ins+=texto;if(funcaoMinimiza){ins+="<div id='"+id+"_minimizaCabecalho' class='container-minimiza'></div>"}ins+='</div><div id="'+id+'_corpo" class="bd" style="'+this.ESTILOBD+'">';if(wsrc!==""){ins+='<iframe name="'+id+'i" id="'+id+'i" valign="top" style="border:0px white solid"></iframe>'}ins+='</div>';novoel=document.createElement("div");novoel.id=id;novoel.style.display="block";novoel.style.border="1px solid rgb(120 120 120)";novoel.innerHTML=ins;if(this.TRANSICAOSUAVE){novoel.onmouseover=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",1)};novoel.onmouseout=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.janela.OPACIDADE/100)};YAHOO.util.Dom.setStyle(novoel,"opacity",1)}document.body.appendChild(novoel);wdocaiframe=$i(id+"i");if(wdocaiframe){temp=wdocaiframe.style;temp.width=parseInt(wlargura,10)-12;temp.height=waltura;temp.display="block";wdocaiframe.src=wsrc}else{if(waltura!=="auto"){$i(id+'_corpo').style.height=parseInt(waltura,10)}$i(id+'_corpo').style.width=parseInt(wlargura,10)}fix=false;if(nx===""||nx==="center"){fix=true}if(modal===true){underlay="none"}else{underlay="shadow"}if(i3GEO.Interface.ATUAL==="googleearth"||i3GEO.Interface.ATUAL==="flamingo"){ifr=true}else{ifr=false}if(waltura==="auto"){YAHOO.janelaDoca.xp.panel=new YAHOO.widget.Panel(id,{iframe:ifr,modal:modal,width:wlargurA,underlay:"none",fixedcenter:fix,constraintoviewport:false,visible:true,monitorresize:false,dragOnly:true,keylisteners:null})}else{YAHOO.janelaDoca.xp.panel=new YAHOO.widget.ResizePanel(id,{iframe:ifr,underlay:underlay,modal:modal,width:wlargurA,fixedcenter:fix,constraintoviewport:false,visible:true,monitorresize:false,dragOnly:true,keylisteners:null})}if(nx!==""&&nx!=="center"){YAHOO.janelaDoca.xp.panel.moveTo(nx,ny+50)}YAHOO.janelaDoca.xp.manager.register(YAHOO.janelaDoca.xp.panel);if(this.TRANSICAOSUAVE){YAHOO.janelaDoca.xp.panel.cfg.setProperty("effect",[{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.5}])}YAHOO.janelaDoca.xp.panel.render();if(navm&&id!=="i3geo_janelaMensagens"&&i3GEO.Interface.ATUAL==="googleearth"){YAHOO.janelaDoca.xp.panel.moveTo(0,0)}if(ifr===true){YAHOO.janelaDoca.xp.panel.iframe.style.zIndex=0}if(modal===true){if($i(id+"_mask")){$i(id+"_mask").style.zIndex=9000+i3GEO.janela.ULTIMOZINDEX+1;i3GEO.janela.ULTIMOZINDEX=9000+i3GEO.janela.ULTIMOZINDEX+1}}if($i(id+"_c")){$i(id+"_c").style.zIndex=23000+i3GEO.janela.ULTIMOZINDEX+1;i3GEO.janela.ULTIMOZINDEX=23000+i3GEO.janela.ULTIMOZINDEX+1}if(funcaoCabecalho){$i(id+'_cabecalho').onclick=funcaoCabecalho}if(funcaoMinimiza){$i(id+"_minimizaCabecalho").onclick=funcaoMinimiza}YAHOO.util.Event.addListener(YAHOO.janelaDoca.xp.panel.close,"click",i3GEO.janela.fecha,YAHOO.janelaDoca.xp.panel,{id:id},true);i3GEO.janela.ULTIMOZINDEX++;return([YAHOO.janelaDoca.xp.panel,$i(id+"_cabecalho"),$i(id+"_corpo")])},minimiza:function(id){var temp=$i(id+"_corpo"),n,i,m=YAHOO.janelaDoca.xp.manager.find(id);if(temp){if(temp.style.display==="block"){temp.style.display="none";if(m){m.hideIframe}}else{temp.style.display="block";if(m){m.showIframe}}}temp=$i(id+"_resizehandle");if(temp){if(temp.style.display==="none"){temp.style.display="block"}else{temp.style.display="none"}}temp=$i(id+"_c");if(temp){temp=temp.getElementsByTagName("div");n=temp.length;for(i=0;i<n;i++){if(temp[i].className==="underlay"||temp[i].className==="bd"){if(temp[i].style.display==="none"){temp[i].style.display="block"}else{temp[i].style.display="none"}}}}temp=$i(id+"_corpo");if(temp){if(temp.style.display==="none"){temp.style.display="block"}else{temp.style.display="none"}}},fecha:function(event){var i,old,id,iu=i3GEO.util;iu.escondePin();iu.escondeBox();if(this.ANTESFECHA){for(i=0;i<this.ANTESFECHA.length;i++){eval(this.ANTESFECHA[i])}}if(this.id){id=this.id}else{id=event.id}iu.removeChild(id+"_c");iu.removeChild(id);iu.removeChild(id+"_mask");iu.removeScriptTag(id+"_script");YAHOO.janelaDoca.xp.manager.remove(YAHOO.janelaDoca.xp.manager.find(id))},alteraTamanho:function(w,h,id){var i;if(arguments.length===3){i=$i(id)}else{i=$i("wdoca")}if(i){i.style.width=w;i.style.height=h}},abreAguarde:function(id,texto){var pos,index,contador,temp;document.body.style.cursor="wait";i3GEO.util.removeChild(id+"_mask");i3GEO.util.removeChild(id+"_c");YAHOO.namespace("aguarde."+id);pos=[0,0];if($i(i3GEO.Interface.IDCORPO)){pos=YAHOO.util.Dom.getXY($i(i3GEO.Interface.IDCORPO))}else if($i("contemImg")){pos=YAHOO.util.Dom.getXY($i("contemImg"))}texto+="<br><span style='color:navy;cursor:pointer;font-size:9px;' onclick='javascript:if(i3GEO.janela.AGUARDEMODAL == true){i3GEO.janela.AGUARDEMODAL = false;}else{i3GEO.janela.AGUARDEMODAL = true;}'>bloquear/desbloquear</span>";contador="";for(index=0;index<i3GEO.contadorAtualiza;index++){contador=contador+"."}eval('YAHOO.aguarde.'+id+' = new YAHOO.widget.Panel("'+id+'",{width:"240px",fixedcenter:false,underlay:"none",close:true,draggable:false,modal:'+i3GEO.janela.AGUARDEMODAL.toString()+',monitorresize:false})');i3GEO.janela.JANELASAGUARDE.push(id);if(i3GEO.janela.ESTILOAGUARDE==="normal"||i3GEO.janela.ESTILOAGUARDE==="reduzida"){eval('YAHOO.aguarde.'+id+'.setBody(texto)');eval('YAHOO.aguarde.'+id+'.body.style.padding="5px"')}if(i3GEO.janela.ESTILOAGUARDE==="normal"||i3GEO.janela.ESTILOAGUARDE==="minima"){eval('YAHOO.aguarde.'+id+'.setHeader("<span><img id=aguardeGifAberto src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span>&nbsp;<span style=font-size:8px >'+contador+'</span>")')}eval('YAHOO.aguarde.'+id+'.render(document.body)');if(i3GEO.parametros.w>0){eval('YAHOO.aguarde.'+id+'.moveTo('+(pos[0]+(i3GEO.parametros.w/2)-120)+','+pos[1]+')')}else{eval('YAHOO.aguarde.'+id+'.moveTo('+pos[0]+','+pos[1]+')')}eval('YAHOO.aguarde.'+id+'.show()');if($i(id+"_mask")){$i(id+"_mask").style.zIndex=25000}temp=$i(id+"_c");if(temp){temp.style.zIndex=26000;temp.style.backgroundColor=""}},ativaAlerta:function(){YAHOO.namespace("dialogInfo");YAHOO.dialogInfo=new YAHOO.widget.SimpleDialog("simpledialog1",{width:"300px",fixedcenter:true,visible:false,draggable:false,zIndex:100000,textAlign:"left",close:true,modal:true,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25},constraintoviewport:true,buttons:[{text:"fecha",handler:function(){this.hide()},isDefault:true}],icon:YAHOO.widget.SimpleDialog.ICON_WARN,text:""});YAHOO.dialogInfo.setHeader("Alerta");YAHOO.dialogInfo.render(document.body);window.alert=function(texto){YAHOO.dialogInfo.cfg.setProperty("text",texto);YAHOO.dialogInfo.show()}},mensagemSimples:function(texto,cabecalho){if(!$i("mensagemSimples1")){YAHOO.namespace("mensagemSimples");YAHOO.mensagemSimples=new YAHOO.widget.SimpleDialog("mensagemSimples1",{width:"300px",fixedcenter:true,visible:true,draggable:true,zIndex:100000,textAlign:"left",close:true,modal:false,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25},constraintoviewport:true,text:""})}YAHOO.mensagemSimples.setHeader(cabecalho);YAHOO.mensagemSimples.render(document.body);YAHOO.mensagemSimples.cfg.setProperty("text",texto);YAHOO.mensagemSimples.show()},tip:function(cabecalho){var Nid,i,novoel,res;if(arguments.length===0){cabecalho="fixar"}Nid=YAHOO.util.Dom.generateId();i=$i("i3geo_rosa");if(i){i.style.display="none"}if($i(i3GEO.Interface.IDCORPO)){$i("img").title=""}novoel=document.createElement("div");novoel.id=Nid;novoel.style.position="absolute";novoel.style.zIndex=5000;novoel.style.textAlign="left";novoel.style.background="white";if(navm){novoel.style.filter="alpha(opacity=90)"}else{novoel.style.opacity=".9"}document.body.appendChild(novoel);i3GEO.janela.TIPS.push($i(Nid));res="<div id='"+Nid+"cabecatip' style='text-align:left;background-color:rgb(240,240,240)'>";res+="<span style='color:navy;cursor:pointer;text-align:left' onclick='javascript:$i(\""+Nid+"cabecatip\").innerHTML =\"\";' >"+cabecalho+"</span></div>";novoel.innerHTML="<table style='text-align:left'><tr><td style='text-align:left'>"+res+"</td></tr></table>";ist=novoel.style;ist.top=objposicaocursor.telay-9;ist.left=objposicaocursor.telax-5;ist.display="block";if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.janela.excluiTips('todos')")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.janela.excluiTips('todos')")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.janela.excluiTips('naofixos')")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.janela.excluiTips('naofixos')")}return(Nid)},excluiTips:function(tipo){var ot,i;if(arguments.length===0){tipo="todos"}if(i3GEO.janela.TIPS.length>0){ot=i3GEO.janela.TIPS.length-1;if(ot>=0){do{if(tipo==='todos'){if(i3GEO.janela.TIPS[ot]){i=$i(i3GEO.janela.TIPS[ot].id);document.body.removeChild(i)}}if(tipo==='naofixos'){if($i(i3GEO.janela.TIPS[ot])){if($i(i3GEO.janela.TIPS[ot].id+"cabecatip").innerHTML!==""){document.body.removeChild($i(i3GEO.janela.TIPS[ot].id))}}}}while(ot--);if(tipo==="todos"){i3GEO.janela.TIPS=[]}}}},slider:function(funcao,inicial){var tickSize,keyIncrement,scaleFactor,bottomConstraint,topConstraint,janela,novoel,Event,Dom,lang,slider,bg,thumb,valuearea,textfield;janela=i3GEO.janela.cria(230,200,"","","","Opacidade","opacidadeG");novoel=document.createElement("div");novoel.id="slider-bg";novoel.tabindex="-1";novoel.innerHTML='<div style="cursor:default;position:absolute;top:4px" id="slider-thumb"><img src="'+i3GEO.configura.locaplic+'/imagens/thumb-n.gif"></div>';janela[2].appendChild(novoel);Event=YAHOO.util.Event;Dom=YAHOO.util.Dom;lang=YAHOO.lang;bg="slider-bg";thumb="slider-thumb";valuearea="slider-value";textfield="slider-converted-value";novoel.style.position="relative";novoel.style.background='url('+i3GEO.configura.locaplic+'/imagens/bg-fader.gif) 5px 0 no-repeat';novoel.style.height="28px";novoel.style.width="228px";topConstraint=0;bottomConstraint=200;scaleFactor=1;keyIncrement=20;tickSize=20;Event.onDOMReady(function(){slider=YAHOO.widget.Slider.getHorizSlider(bg,thumb,topConstraint,bottomConstraint,20);slider.setValue(parseInt(inicial,10));slider.getRealValue=function(){return Math.round(this.getValue()*scaleFactor)};slider.subscribe("slideEnd",function(offsetFromStart){var actualValue=slider.getRealValue();eval(funcao+"("+actualValue+")")})});Event.on("putval","click",function(e){slider.setValue(100,false)})},fechaAguarde:function(id){document.body.style.cursor="default";if(arguments.length>0&&typeof(id)!=='undefined'){try{if($i(id+"_c")){eval('YAHOO.aguarde.'+id+'.destroy()')}if($i(id+"_c")){$i("i3geo").removeChild($i(id+"_c"))}if($i(id+"_mask")){$i("i3geo").removeChild($i(id+"_mask"))}}catch(e){}}else{try{var id,i,n=this.JANELASAGUARDE.length,iu=i3GEO.util;for(i=0;i<n;i+=1){id=this.JANELASAGUARDE[i];if($i(id+"_c")){eval('YAHOO.aguarde.'+id+'.destroy()')}iu.removeChild(id+"_c");iu.removeChild(id+"_mask")}this.JANELASAGUARDE=[]}catch(e){}}}};try{YAHOO.widget.ResizePanel=function(el,userConfig){if(arguments.length>0){YAHOO.widget.ResizePanel.superclass.constructor.call(this,el,userConfig)}};YAHOO.widget.ResizePanel.CSS_PANEL_RESIZE="yui-resizepanel";YAHOO.widget.ResizePanel.CSS_RESIZE_HANDLE="resizehandle";YAHOO.extend(YAHOO.widget.ResizePanel,YAHOO.widget.Panel,{init:function(el,userConfig){YAHOO.widget.ResizePanel.superclass.init.call(this,el);this.beforeInitEvent.fire(YAHOO.widget.ResizePanel);var Dom=YAHOO.util.Dom,Event=YAHOO.util.Event,oInnerElement=this.innerElement,oResizeHandle=document.createElement("DIV"),sResizeHandleId=this.id+"_resizehandle";oResizeHandle.id=sResizeHandleId;oResizeHandle.className=YAHOO.widget.ResizePanel.CSS_RESIZE_HANDLE;Dom.addClass(oInnerElement,YAHOO.widget.ResizePanel.CSS_PANEL_RESIZE);this.resizeHandle=oResizeHandle;function initResizeFunctionality(){var me=this,oHeader=this.header,oBody=this.body,oFooter=this.footer,nStartWidth,nStartHeight,aStartPos,nBodyBorderTopWidth,nBodyBorderBottomWidth,nBodyTopPadding,nBodyBottomPadding,nBodyOffset;oInnerElement.appendChild(oResizeHandle);this.ddResize=new YAHOO.util.DragDrop(sResizeHandleId,this.id);this.ddResize.setHandleElId(sResizeHandleId);this.ddResize.onMouseDown=function(e){nStartWidth=oInnerElement.offsetWidth;nStartHeight=oInnerElement.offsetHeight;if(YAHOO.env.ua.ie&&document.compatMode==="BackCompat"){nBodyOffset=0}else{nBodyBorderTopWidth=parseInt(Dom.getStyle(oBody,"borderTopWidth"),10);nBodyBorderBottomWidth=parseInt(Dom.getStyle(oBody,"borderBottomWidth"),10);nBodyTopPadding=parseInt(Dom.getStyle(oBody,"paddingTop"),10);nBodyBottomPadding=parseInt(Dom.getStyle(oBody,"paddingBottom"),10);nBodyOffset=nBodyBorderTopWidth+nBodyBorderBottomWidth+nBodyTopPadding+nBodyBottomPadding}me.cfg.setProperty("width",nStartWidth+"px");aStartPos=[Event.getPageX(e),Event.getPageY(e)]};this.ddResize.onDrag=function(e){var aNewPos=[Event.getPageX(e),Event.getPageY(e)],nOffsetX=aNewPos[0]-aStartPos[0],nOffsetY=aNewPos[1]-aStartPos[1],nNewWidth=Math.max(nStartWidth+nOffsetX,10),nNewHeight=Math.max(nStartHeight+nOffsetY,10),nBodyHeight=(nNewHeight-(oFooter.offsetHeight+oHeader.offsetHeight+nBodyOffset));me.cfg.setProperty("width",nNewWidth+"px");if(navm){nNewWidth=nNewWidth-2}oBody.style.width=nNewWidth-2+"px";if(nBodyHeight<0){nBodyHeight=0}oBody.style.height=nBodyHeight+"px";if($i("wdocai")){$i("wdocai").style.height=nBodyHeight;$i("wdocai").style.width=oBody.style.width}};this.ddResize.onMouseUp=this.ddResize.onDrag.call()}function onBeforeShow(){initResizeFunctionality.call(this);this.unsubscribe("beforeShow",onBeforeShow)}function onBeforeRender(){if(!this.footer){this.setFooter("")}if(this.cfg.getProperty("visible")){initResizeFunctionality.call(this)}else{this.subscribe("beforeShow",onBeforeShow)}this.unsubscribe("beforeRender",onBeforeRender)}this.subscribe("beforeRender",onBeforeRender);if(userConfig){this.cfg.applyConfig(userConfig,true)}this.initEvent.fire(YAHOO.widget.ResizePanel)},toString:function(){return"ResizePanel "+this.id}})}catch(e){}
369   -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.guias={ATUAL:"temas",ALTURACORPOGUIAS:0,CONFIGURA:{"temas":{titulo:$trad("g4a"),id:"guia1",idconteudo:"guia1obj",click:""},"adiciona":{titulo:$trad("g1a"),id:"guia2",idconteudo:"guia2obj",click:function(){var ondeArvore;i3GEO.guias.mostra("adiciona");if(!$i("arvoreAdicionaTema")){try{ondeArvore=objmapa.guiaMenu+"obj"}catch(e){ondeArvore="guia2obj"}}else{ondeArvore="arvoreAdicionaTema"}if(document.getElementById("outrasOpcoesAdiciona")){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde="outrasOpcoesAdiciona";i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore=false}i3GEO.arvoreDeTemas.cria(i3GEO.configura.sid,i3GEO.configura.locaplic,ondeArvore)}},"legenda":{titulo:$trad("g3"),id:"guia4",idconteudo:"guia4obj",click:function(){i3GEO.guias.mostra("legenda");i3GEO.mapa.legendaHTML.cria("guia4obj")}},"mapas":{titulo:"Links",id:"guia5",idconteudo:"guia5obj",click:function(){var pegaMapas=function(retorno){var ins,mapa,ig1lt,ig1,nome,lkd,link,temp;ins="<br><div id='banners' style='overflow:auto;text-align:left'>";mapa=retorno.data.mapas;ig1lt=mapa.length;ig1=0;if(ig1lt>0){do{temp=mapa[ig1];nome=temp.NOME;if(temp.PUBLICADO){if(temp.PUBLICADO.toLowerCase()==="nao"){nome="<s>"+nome+"</s>"}}lkd=temp.LINK;link=i3GEO.configura.locaplic+"/ms_criamapa.php?temasa="+temp.TEMAS+"&layers="+temp.LIGADOS;if(temp.EXTENSAO!==""){link+="&mapext="+temp.EXTENSAO}if(temp.OUTROS!==""){link+="&"+temp.OUTROS}if(lkd!==""){link=lkd}ins+="<div><a href='"+link+"'><img src='"+temp.IMAGEM+"'></a></div><br>";ins+="<div><p style=text-align:center >"+nome+"</p></div><br>";ig1++}while(ig1<ig1lt)}$i(i3GEO.guias.CONFIGURA.mapas.idconteudo).innerHTML=ins+"</div>"};$i(i3GEO.guias.CONFIGURA.mapas.idconteudo).innerHTML="Aguarde...";i3GEO.guias.mostra("mapas");i3GEO.php.pegaMapas(pegaMapas)}}},ORDEM:"",TIPO:"guia",IDGUIAS:"guiasYUI",cria:function(onde){var nguiasreal=0,onf,outf,guiaconteudo,id,guia,guias,nguias,g,re,ng,tituloguia,i,ins,largura,altura,temp,CONFIGURA=i3GEO.guias.CONFIGURA,guias=i3GEO.util.listaChaves(CONFIGURA);try{nguias=guias.length;for(g=0;g<12;g++){tituloguia="";if($i("guia"+g)){tituloguia=$i("guia"+g).innerHTML;re=new RegExp("&nbsp;","g");tituloguia=tituloguia.replace(re,'');for(ng=0;ng<nguias;ng++){if(CONFIGURA[guias[ng]].id==="guia"+g){tituloguia=""}}if(tituloguia!==""){i3GEO.guias.CONFIGURA["guia"+g]=[];i3GEO.guias.CONFIGURA["guia"+g].titulo=tituloguia;i3GEO.guias.CONFIGURA["guia"+g].id="guia"+g;i3GEO.guias.CONFIGURA["guia"+g].idconteudo="guia"+g+"obj";if($i('guia'+g).onclick){i3GEO.guias.CONFIGURA["guia"+g].click=$i("guia"+g).onclick}}}}if(i3GEO.guias.ORDEM===""){guias=i3GEO.util.listaChaves(CONFIGURA)}else{guias=i3GEO.guias.ORDEM}nguias=guias.length;if(arguments.length===0){for(ng=0;ng<nguias;ng++){i=$i(i3GEO.guias.CONFIGURA[guias[ng]].id);if(i){onde=i.parentNode}}}else{onde=$i(onde)}if(!onde){return}onde.id=i3GEO.guias.IDGUIAS;onde.className="yui-navset";if(i3GEO.guias.TIPO==="guia"||i3GEO.guias.TIPO==="tablet"){ins='<ul class="yui-nav" style="border-width:0pt 0pt 0px;border-color:rgb(240,240,240);border-bottom-color:white;text-align:center;">';for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){if($i(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo)){ins+='<li><a alt="" title=""><em><div id="'+i3GEO.guias.CONFIGURA[guias[ng]].id+'" >'+i3GEO.guias.CONFIGURA[guias[ng]].titulo+'</div></em></a></li>'}}}ins+="</ul>";onde.innerHTML=ins;onf=function(event){var bcg,cor;YAHOO.util.Event.stopEvent(event);bcg=this.parentNode.parentNode.style;cor=bcg.background.split(" ")[0];if(cor!=="white"&&bcg.backgroundColor!=="white"){bcg.background="#bfdaff"}};outf=function(event){var bcg,cor;YAHOO.util.Event.stopEvent(event);bcg=this.parentNode.parentNode.style;cor=bcg.background.split(" ")[0];if(cor!=="white"&&bcg.backgroundColor!=="white"){bcg.background="transparent"}}}if(i3GEO.guias.TIPO==="sanfona"){ins='<dl id=sanfona'+onde.id+' class="accordion" >';if(i3GEO.guias.ORDEM===""){for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){nguiasreal++}}}else{nguiasreal=i3GEO.guias.ORDEM.length}if(navn){altura=i3GEO.parametros.h-(nguiasreal*25)-1}else{altura=i3GEO.parametros.h-(nguiasreal*23)+1}for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){id=i3GEO.guias.CONFIGURA[guias[ng]].idconteudo;temp=$i(id);if(temp){guiaconteudo=temp.innerHTML;temp.innerHTML="";temp.style.display="none";temp.id="";ins+='<dt style=height:17px id="'+i3GEO.guias.CONFIGURA[guias[ng]].id+'" >'+'<table class=accordiontable ><tr><td width="98%" >'+i3GEO.guias.CONFIGURA[guias[ng]].titulo+'</td><td width="2%" ><img id="" src="'+i3GEO.configura.locaplic+'/imagens/branco.gif" style="width:10px;" /></td></tr></table>'+'<dd clas=close >'+'<div class=bd >'+'<div id="'+id+'" >'+guiaconteudo+'</div></div></dd>'}}}ins+="</dl>";onde.innerHTML=ins;onde.style.height=altura+"px";onf=function(){};outf=function(){};YAHOO.lutsr.accordion.init(true,5,false,"sanfona"+onde.id,altura);i3GEO.guias.ALTURACORPOGUIAS=altura}for(g=0;g<nguias;g++){guia=i3GEO.guias.CONFIGURA[guias[g]];id=guia.id;guiaconteudo=$i(id);if(guiaconteudo){if(guia.click===""||guia.click===undefined){eval('$i("'+id+'").onclick = function(event){i3GEO.guias.mostra("'+guias[g]+'");}')}else{guiaconteudo.onclick=guia.click}YAHOO.util.Event.addListener($i(id),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addListener($i(id),"click",YAHOO.util.Event.stopPropagation);YAHOO.util.Event.addFocusListener($i(id),YAHOO.util.Event.preventDefault);guiaconteudo.onmouseover=onf;guiaconteudo.onmouseout=outf;temp=$i(guia.idconteudo);if(temp){temp.style.overflow="auto";if(i3GEO.guias.TIPO==="guia"){if(i3GEO.guias.ALTURACORPOGUIAS===0){temp.style.height=i3GEO.parametros.h}else{temp.style.height=i3GEO.guias.ALTURACORPOGUIAS}}else{temp.style.height=onde.style.height}}}}}catch(e){}if(i3GEO.guias.TIPO!=="tablet"){i3GEO.guias.mostra(i3GEO.guias.ATUAL);i3GEO.guias.ativa(i3GEO.guias.ATUAL)}else{i3GEO.guias.escondeGuias()}},ajustaAltura:function(){var guia,guias,nguias,temp,temps,n,i,altura=0;if(i3GEO.guias.ALTURACORPOGUIAS!=0){altura=i3GEO.guias.ALTURACORPOGUIAS}guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){guia=$i(this.CONFIGURA[guias[g]].idconteudo);if(guia){guia.style.overflow="auto";if(this.TIPO==="guia"){guia.style.height=altura}if(this.TIPO==="sanfona"){guia.style.height=altura;temp=$i("guiasYUI");if(temp){temp.style.height=altura;temps=temp.getElementsByTagName("dd");n=temps.length;for(i=0;i<n;i++){if(temps[i].style.visibility=="visible"){temps[i].style.height=altura}}}YAHOO.lutsr.accordion.properties.altura=altura}}}},escondeGuias:function(){var guias,nguias,g,temp,attributes,anim;guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){temp=$i(this.CONFIGURA[guias[g]].idconteudo);if(temp){if(i3GEO.guias.TIPO==="tablet"&&temp.style.display==="block"){temp.style.overflow="hidden";attributes={height:{to:0},id:this.CONFIGURA[guias[g]].idconteudo};anim=new YAHOO.util.Anim(temp,attributes,1,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){var temp=$i(anim.attributes.id);temp.style.overflow="auto";temp.style.display="none";i3GEO.barraDeBotoes.BARRAS[0].show()});anim.animate()}else{temp.style.display="none"}}if($i(this.CONFIGURA[guias[g]].id)){$i(this.CONFIGURA[guias[g]].id).parentNode.parentNode.style.background="transparent"}}},mostra:function(guia){var guias,nguias,g,temp,temp1,attributes,anim;guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;if($i(this.CONFIGURA[guia].idconteudo).style.display==="block"&&i3GEO.guias.TIPO==="tablet"){i3GEO.guias.escondeGuias();return}for(g=0;g<nguias;g++){if($i(this.CONFIGURA[guias[g]].idconteudo)){$i(this.CONFIGURA[guias[g]].idconteudo).style.display="none"}if($i(this.CONFIGURA[guias[g]].id)){$i(this.CONFIGURA[guias[g]].id).parentNode.parentNode.style.background="transparent"}}if(this.CONFIGURA.toString().search(guia)<0){for(g=0;g<nguias;g++){if(this.CONFIGURA[guias[g]].id===guia){guia=guias[g]}}}if(this.CONFIGURA[guia]){temp=$i(this.CONFIGURA[guia].idconteudo);if(temp){if(i3GEO.guias.TIPO==="tablet"){i3GEO.barraDeBotoes.BARRAS[0].hide();temp.style.left=(i3GEO.parametros.w/2)-150+"px";temp.style.height=0;temp.style.display="block";temp.style.zIndex=9000;temp.style.overflow="hidden";attributes={height:{to:i3GEO.parametros.h-10}};anim=new YAHOO.util.Anim(temp,attributes,1,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){temp.style.overflow="auto";temp.style.display="block"});if(DetectaMobile("DetectAndroid")===true){temp.style.height="";temp.style.overflow="auto"}else{anim.animate()}}else{temp.style.display="block"}$i(this.CONFIGURA[guia].id).parentNode.parentNode.style.backgroundColor="white";this.ATUAL=guia}}},ativa:function(guia){try{if(this.CONFIGURA[this.ATUAL].click!==""){this.CONFIGURA[this.ATUAL].click.call()}}catch(e){}},libera:function(){if(!$i("conteudojanelaguias")){var i,w,pos,a,l,letras,temp;$i(i3GEO.Interface.IDCORPO).style.left="0px";if($i(this.IDGUIAS)){$i(this.IDGUIAS).style.display="none"}i=$i("contemFerramentas");w=parseInt($i("contemFerramentas").style.width,10);$i("contemFerramentas").style.width="0px";i=$i("visual");if(i){i.style.width="0px";i.innerHTML=""}pos="px";a=i3GEO.parametros.h;l=i3GEO.parametros.w+w;i3GEO.parametros.h=a;i3GEO.parametros.w=l;if(navm){pos=""}i=$i(i3GEO.Interface.IDCORPO);if(i){i.style.width=l+pos;i.style.height=a+pos}i=$i(i3GEO.Interface.IDMAPA);if(i){i.style.width=l+pos;i.style.height=a+pos;i.style.clip='rect('+0+" "+(l*1+2)+" "+(a*1+2)+" "+0+')'}i=$i("mst");if(i){i.style.width=l+1+pos}if(i3GEO.configura.entorno.toLowerCase()==="sim"){letras=["L","O"];for(l=0;l<2;l++){if($i("img"+letras[l])){$i("img"+letras[l]).style.width=i3GEO.parametros.w+pos;$i("img"+letras[l]).style.height=i3GEO.parametros.h+pos;$i("corpoMapa"+letras[l]).style.width=i3GEO.parametros.w+pos;$i("corpoMapa"+letras[l]).style.height=i3GEO.parametros.h+pos+pos;$i("corpoMapa"+letras[l]).style.clip='rect(0 0 0 0)'}}letras=["N","S"];for(l=0;l<2;l++){if($i("img"+letras[l])){$i("img"+letras[l]).style.width=i3GEO.parametros.w*2+pos;$i("img"+letras[l]).style.height=i3GEO.parametros.h*2+pos;$i("corpoMapa"+letras[l]).style.width=i3GEO.parametros.w*3+pos;$i("corpoMapa"+letras[l]).style.height=i3GEO.parametros.h+pos;$i("corpoMapa"+letras[l]).style.clip='rect(0 0 0 0)'}}}i3GEO.mapa.ajustaPosicao();temp=function(retorno){var novoel,temp,i,g,guias,nguias;novoel=document.createElement("div");novoel.id="janelaguias";novoel.style.display="block";novoel.innerHTML='<div class="hd">Guias <div onclick ="i3GEO.janela.minimiza(\'conteudojanelaguias\')" id="janelaguias_minimizaCabecalho" class="container-minimiza" ></div></div><div class="bd" id="conteudojanelaguias_corpo" style=padding:0px ></div>';temp=$i("i3geo")?$i("i3geo").appendChild(novoel):document.body.appendChild(novoel);YAHOO.namespace("janelaguias.xp");YAHOO.janelaguias.xp.panel=new YAHOO.widget.Panel("janelaguias",{width:"270px",fixedcenter:true,constraintoviewport:false,underlay:"none",close:false,visible:true,draggable:true,modal:false,iframe:true});YAHOO.janelaguias.xp.panel.render();YAHOO.janelaguias.xp.panel.cfg.setProperty("y",0);YAHOO.janelaDoca.xp.manager.register(YAHOO.janelaDoca.xp.panel);i=$i(i3GEO.guias.IDGUIAS);$i("conteudojanelaguias_corpo").appendChild(i);i.style.borderLeft="1px solid black";i.style.borderRight="1px solid black";guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){if($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo)){$i("conteudojanelaguias_corpo").appendChild($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo));temp=$i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo).style;temp.background="white";temp.border="1px solid black";temp.borderTop="0px solid black";temp.width="270px";temp.left="-1px";temp.height=i3GEO.parametros.h-90}}i3GEO.atualiza("");i.style.display="block";i.style.left="-1px";i.style.width="270px"};i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.mudatamanho(temp,a,l)}else{YAHOO.janelaguias.xp.panel.render();YAHOO.janelaguias.xp.panel.show()}},mostraGuiaFerramenta:function(guia,namespace){var g,Dom=YAHOO.util.Dom;if(!namespace){namespace="guia"}for(g=0;g<12;g++){Dom.setStyle(namespace+g+"obj","display","none")}Dom.setStyle(guia+"obj","display","block")}};
370   -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.arvoreDeCamadas={MOSTRALISTAKML:false,FILTRO:"",VERIFICAABRANGENCIATEMAS:true,finaliza:"",EXPANDESOLEGENDA:false,PERMITEEXPANDIRTEMAS:true,ARRASTARORDEM:true,ARRASTARLIXEIRA:true,LIGARDESLIGARTODOS:true,FILTRAR:true,ABRELEGENDA:true,EXPANDIDA:false,LEGENDAEXPANDIDA:false,OPCOESICONES:true,OPCOESTEMAS:true,OPCOESLEGENDA:true,AGUARDALEGENDA:false,ICONETEMA:true,FUNCOES:{farolescala:true,excluir:true,sobe:true,desce:true,fonte:true,zoomtema:true,compartilhar:true,opacidade:true,mudanome:true,procurar:true,toponimia:true,etiquetas:true,filtrar:true,tabela:true,grafico:true,editorlegenda:true,destacar:true,cortina:true,sql:true,comentar:true,temporizador:true,wms:true},CAMADAS:"",ARVORE:null,IDHTML:"listaTemas",SID:null,LOCAPLIC:null,ATIVATEMA:"",cria:function(onde,temas,g_sid,g_locaplic,funcaoTema){if(!YAHOO.lang.isUndefined(funcaoTema)){i3GEO.arvoreDeCamadas.ATIVATEMA=funcaoTema}i3GEO.arvoreDeCamadas.SID=typeof(g_sid)!=='undefined'?g_sid:i3GEO.configura.sid;i3GEO.arvoreDeCamadas.LOCAPLIC=typeof(g_locaplic)!=='undefined'?g_locaplic:i3GEO.configura.locaplic;if(onde!==""){i3GEO.arvoreDeCamadas.IDHTML=onde}if(i3GEO.arvoreDeCamadas.IDHTML===""){return}if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return}if(YAHOO.lang.isUndefined(temas)||temas===""){temas=i3GEO.arvoreDeCamadas.CAMADAS}i3GEO.arvoreDeCamadas.atualiza(temas);if(i3GEO.arvoreDeCamadas.finaliza!==""){eval(i3GEO.arvoreDeCamadas.finaliza)}},atualiza:function(temas,forca){if(arguments.length===0){temas=i3GEO.arvoreDeCamadas.CAMADAS;i3GEO.arvoreDeCamadas.CAMADAS="";forca=false}var estilo,temp,currentIconMode,newVal,root,tempNode,titulo,d,c,ltema,temaNode,grupoNode,i,j,n,nk,k,incluidos=[],grupoLayers=i3GEO.configura.grupoLayers,textoTema="";temp=$i(i3GEO.arvoreDeCamadas.IDHTML);if(temp){if(forca===true){temp.innerHTML=""}if(temp.innerHTML!==""){if(i3GEO.arvoreDeCamadas.comparaTemas(temas,i3GEO.arvoreDeCamadas.CAMADAS)){return}}}else{return}i3GEO.util.defineValor(i3GEO.arvoreDeCamadas.IDHTML,"innerHTML","");i3GEO.arvoreDeCamadas.CAMADAS=temas;(function(){function changeIconMode(){newVal=parseInt(this.value,10);if(newVal!==currentIconMode){currentIconMode=newVal}buildTree()}function buildTree(){i3GEO.arvoreDeCamadas.ARVORE=new YAHOO.widget.TreeView(i3GEO.arvoreDeCamadas.IDHTML)}buildTree()})();root=i3GEO.arvoreDeCamadas.ARVORE.getRoot();titulo="<table><tr><td><b>"+$trad("a7")+"</b></td><td>";if(this.ARRASTARLIXEIRA===true){titulo+="<img id='i3geo_lixeira' title='"+$trad("t2")+"' src='"+i3GEO.util.$im("branco.gif")+"' />"}if(this.FILTRAR===true){titulo+="<img onclick='i3GEO.arvoreDeCamadas.dialogo.filtro();' id='i3geo_filtro' title='"+$trad("t2a")+"' src='"+i3GEO.util.$im("branco.gif")+"' />"}if(this.ABRELEGENDA===true){titulo+="<img onclick='i3GEO.mapa.legendaHTML.libera();' id='soltaleg2' title='"+$trad("t2b")+"' src='"+i3GEO.util.$im("branco.gif")+"' />"}if(this.LIGARDESLIGARTODOS===true){titulo+="&nbsp;<img onclick='i3GEO.arvoreDeCamadas.aplicaTemas(\"ligartodos\");' id='olhoAberto' title='"+$trad("t3a")+"' src='"+i3GEO.util.$im("branco.gif")+"' />";titulo+="&nbsp;<img onclick='i3GEO.arvoreDeCamadas.aplicaTemas(\"desligartodos\");' id='olhoFechado' title='"+$trad("t3b")+"' src='"+i3GEO.util.$im("branco.gif")+"' />"}titulo+="</td></tr></table>";tempNode=new YAHOO.widget.HTMLNode({expanded:true,html:titulo,hasIcon:true,enableHighlight:false},root);estilo=navm?"text-align:left;font-size:11px;vertical-align:middle;display:table-cell;":"text-align:left;font-size:11px;vertical-align:vertical-align:top;padding-top:4px;";if(grupoLayers===""){c=temas.length;for(i=0,j=c;i<j;i+=1){ltema=temas[i];try{if((ltema.escondido).toLowerCase()!=="sim"){textoTema=i3GEO.arvoreDeCamadas.montaTextoTema(ltema);if(textoTema!==""){temaNode=new YAHOO.widget.HTMLNode({expanded:this.EXPANDIDA,html:textoTema,id:ltema.name,tipo:"tema",enableHighlight:false},tempNode);if(this.PERMITEEXPANDIRTEMAS===true){if(this.EXPANDESOLEGENDA===false){temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1)}else{if(ltema.classe!=="NAO"){temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraLegenda,1)}}}}YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault)}}catch(e){}}}else{nk=temas.length;c=grupoLayers.length;for(i=0;i<c;i+=1){temp="";if(grupoLayers[i].icone&&grupoLayers[i].icone===true){temp+="<p style="+estilo+" ><input class=inputsb style=cursor:pointer onclick='i3GEO.arvoreDeCamadas.ligaDesligaTemas(\""+i3GEO.configura.grupoLayers[i].layers+"\",this.checked)' type=checkbox title='Ligar/desligar temas do grupo' />&nbsp;"}temp+="<span style="+estilo+";vertical-align:top ><b>"+grupoLayers[i].nome+"</b></span></p>";d=this.EXPANDIDA;if(grupoLayers[i].expandido&&grupoLayers[i].expandido===true){d=true}grupoNode=new YAHOO.widget.HTMLNode({enableHighlight:false,html:temp,expanded:d},tempNode);n=grupoLayers[i].layers.length;for(j=0;j<n;j+=1){for(k=0;k<nk;k+=1){ltema=temas[k];if(ltema.name===grupoLayers[i].layers[j]&&ltema.escondido==="nao"){textoTema=i3GEO.arvoreDeCamadas.montaTextoTema(ltema);if(textoTema!==""){d={enableHighlight:false,expanded:i3GEO.arvoreDeCamadas.EXPANDIDA,html:textoTema,id:ltema.name,tipo:"tema"};if(grupoLayers[i].dinamico&&grupoLayers[i].dinamico===true){temaNode=new YAHOO.widget.HTMLNode(d,grupoNode)}else{temaNode=new YAHOO.widget.HTMLNode(d,tempNode)}temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1);YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault);incluidos.push(ltema.name)}}}}}grupoNode=new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,html:"<b>Outros</b>"},tempNode);c=incluidos.length;for(k=0;k<nk;k+=1){ltema=temas[k];n=false;for(j=0;j<c;j+=1){if(incluidos[j]===ltema.name||ltema.escondido.toLowerCase()==="sim"){n=true}}if(n===false){temaNode=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:i3GEO.arvoreDeCamadas.montaTextoTema(ltema),id:ltema.name,tipo:"tema"},grupoNode,i3GEO.arvoreDeCamadas.EXPANDIDA,true);temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1);YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault)}}}document.getElementById(i3GEO.arvoreDeCamadas.IDHTML).style.textAlign="left";i3GEO.arvoreDeCamadas.ARVORE.draw();if(i3GEO.arvoreDeCamadas.ARRASTARORDEM===true||i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){i3GEO.arvoreDeCamadas.ativaDragDrop()}i3GEO.mapa.ativaTema(i3GEO.temaAtivo);i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas();if(i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS===true&&i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()")}i3GEO.eventos.executaEventos(i3GEO.eventos.ATUALIZAARVORECAMADAS)},ligaDesligaTemas:function(lista,status){var c,n,i,aplica=false;lista=lista.split(",");n=lista.length;for(i=0;i<n;i+=1){c=i3GEO.arvoreDeCamadas.capturaCheckBox(lista[i]);if(c.checked!==status){aplica=true}c.checked=status;if(aplica===true&&i3GEO.Interface.ATUAL!=="padrao"){c.onclick.call()}}if(aplica===true&&i3GEO.Interface.ATUAL==="padrao"){i3GEO.arvoreDeCamadas.aplicaTemas()}},ativaDragDrop:function(){var Dom=YAHOO.util.Dom,Event=YAHOO.util.Event,DDM=YAHOO.util.DragDropMgr;YAHOO.example.DDList="";YAHOO.example.DDApp={init:function(){var ddtarget,i,ltema,ddlist;if($i("i3geo_lixeira")&&i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){ddtarget=new YAHOO.util.DDTarget("i3geo_lixeira")}i=i3GEO.arvoreDeCamadas.CAMADAS.length-1;if(i3GEO.arvoreDeCamadas.CAMADAS.length-1>=0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if($i("arrastar_"+ltema.name)){ddlist=new YAHOO.example.DDList("arrastar_"+ltema.name)}}while(i--)}}};YAHOO.example.DDList=function(id,sGroup,config){YAHOO.example.DDList.superclass.constructor.call(this,id,sGroup,config);this.logger=this.logger||YAHOO;YAHOO.util.Dom.setStyle(this.getDragEl(),"opacity",0.67);this.goingUp=false;this.lastY=0};YAHOO.extend(YAHOO.example.DDList,YAHOO.util.DDProxy,{startDrag:function(x,y){var dragEl,clickEl,Dom=YAHOO.util.Dom;this.logger.log(this.id+" startDrag");dragEl=this.getDragEl();clickEl=this.getEl();Dom.setStyle(clickEl,"visibility","hidden");dragEl.innerHTML=clickEl.innerHTML;Dom.setStyle(dragEl,"color",Dom.getStyle(clickEl,"color"));Dom.setStyle(dragEl,"backgroundColor",Dom.getStyle(clickEl,"backgroundColor"));Dom.setStyle(dragEl,"border","4px solid gray");Dom.setStyle(dragEl,"z-index","5000")},endDrag:function(e){var srcEl,proxy,a,thisid,proxyid;srcEl=this.getEl();proxy=this.getDragEl();Dom.setStyle(proxy,"visibility","");a=new YAHOO.util.Motion(proxy,{points:{to:Dom.getXY(srcEl)}},0.2,YAHOO.util.Easing.easeOut);proxyid=proxy.id;thisid=this.id;a.onComplete.subscribe(function(){var Dom=YAHOO.util.Dom;Dom.setStyle(proxyid,"visibility","hidden");Dom.setStyle(thisid,"visibility","")});a.animate();YAHOO.util.Dom.setStyle('i3geo_lixeira','border','0px solid blue')},onDragDrop:function(e,id){var pt,region,tema,destEl,els,lista,noid,temp,DDM=YAHOO.util.DragDropMgr,Dom=YAHOO.util.Dom;if(DDM.interactionInfo.drop.length===1){pt=DDM.interactionInfo.point;region=DDM.interactionInfo.sourceRegion;if(!region.intersect(pt)){DDM.refreshCache();if(DDM.getDDById(id).id==="i3geo_lixeira"){if(i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){(new YAHOO.util.Anim("i3geo_lixeira",{opacity:{from:0,to:1}},3,YAHOO.util.Easing.easeOutStrong)).animate();tema=(this.getEl()).id.split("arrastar_")[1];i3GEO.tema.exclui(tema)}}else{if(i3GEO.arvoreDeCamadas.ARRASTARORDEM===true){i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));destEl=Dom.get(id);noid=id.split("arrastar_")[1];destEl.appendChild(this.getEl());els=i3GEO.arvoreDeCamadas.listaLigadosDesligados();lista=els[2].join(",");temp=function(retorno){i3GEO.atualiza(retorno);if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ordenaLayers()}};i3GEO.php.reordenatemas(temp,lista)}}}}},onDrag:function(e){var y;y=Event.getPageY(e);if(y<this.lastY){this.goingUp=true}else if(y>this.lastY){this.goingUp=false}this.lastY=y},onDragOver:function(e,id){var srcEl,destEl;srcEl=this.getEl();destEl=YAHOO.util.Dom.get(id);if($i("i3geo_lixeira")&&id==="i3geo_lixeira"){$i("i3geo_lixeira").style.border="1px solid red"}else{destEl.style.textDecoration="underline"}},onDragOut:function(e,id){$i(id).style.textDecoration="none"}});Event.onDOMReady(YAHOO.example.DDApp.init,YAHOO.example.DDApp,true)},montaOpcoes:function(node){var d,conteudo,opcoesNode,idtema,ltema,farol,mfarol,tnome="",iconesNode,imb=i3GEO.util.$im("branco.gif"),funcoes=i3GEO.arvoreDeCamadas.FUNCOES;idtema=node.data.id;ltema=i3GEO.arvoreDeCamadas.pegaTema(idtema);if(i3GEO.arvoreDeCamadas.OPCOESICONES===true){if(funcoes.farolescala===true){farol="maisamarelo.png";mfarol="";if(ltema.escala*1<i3GEO.parametros.mapscale*1){farol="maisverde.png";mfarol=$trad("t9")}if(ltema.escala*1>i3GEO.parametros.mapscale*1){farol="maisvermelho.png";mfarol=$trad("t10")}if(ltema.escala===0){farol="maisamarelo.png";mfarol=$trad("t11")}tnome+="&nbsp;<img id='farol"+ltema.name+"' src='"+i3GEO.util.$im(farol)+"' title='"+mfarol+"' />"}if(funcoes.excluir===true){tnome+="&nbsp;<img id='idx"+ltema.name+"' class='x' src='"+imb+"' title='"+$trad("t12")+"' onclick='i3GEO.tema.exclui(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t12a")+"','exclui')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(funcoes.sobe===true){tnome+="&nbsp;<img class='sobe' src='"+imb+"' title='"+$trad("t13")+"' onclick='i3GEO.tema.sobe(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t14")+"','sobe')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(funcoes.desce===true){tnome+="&nbsp;<img class='desce' src='"+imb+"' title='"+$trad("t15")+"' onclick='i3GEO.tema.desce(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t16")+"','desce')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(funcoes.fonte===true){tnome+="&nbsp;<img class='fonte' src='"+imb+"' title='"+$trad("a9")+"' onclick='i3GEO.tema.fonte(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("a9")+"','fonte')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if((ltema.zoomtema.toLowerCase()==="sim")&&(i3GEO.Interface.ATUAL!=="flamingo")&&(funcoes.zoomtema===true)){tnome+="&nbsp;<img class='extent' src='"+imb+"' title='"+$trad("t17")+"' onclick='i3GEO.tema.zoom(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t18")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}iconesNode=new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node);if(funcoes.compartilhar===true&&ltema.permitecomentario.toLowerCase()!=="nao"){temp=i3GEO.configura.locaplic+"/ms_criamapa.php?layers="+ltema.name+"&amp;temasa="+ltema.name;tnome=i3GEO.social.compartilhar("",temp,temp,"semtotal");iconesNode=new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node)}}if(i3GEO.arvoreDeCamadas.OPCOESTEMAS===true){opcoesNode=new YAHOO.widget.HTMLNode({html:$trad("t18a"),idopcoes:ltema.name,identifica:ltema.identifica,enableHighlight:false,expanded:false},node);opcoesNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraOpcoes,1)}if(i3GEO.arvoreDeCamadas.OPCOESLEGENDA===true&&ltema.classe!=="NAO"){opcoesNode=new YAHOO.widget.HTMLNode({html:$trad("p3"),idlegenda:ltema.name,enableHighlight:false,expanded:i3GEO.arvoreDeCamadas.LEGENDAEXPANDIDA},node);opcoesNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraLegenda,1)}node.loadComplete()},mostraOpcoes:function(node){var tnome,d,n,temp,idtema=node.data.idopcoes,ltema=i3GEO.arvoreDeCamadas.pegaTema(idtema),funcoes=i3GEO.arvoreDeCamadas.FUNCOES;if(funcoes.opacidade===true){if(navm){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t19")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t20")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=42' >&nbsp;&nbsp;&nbsp;</a>"+$inputText("","","tr"+ltema.name,"","3",ltema.transparency)+"&nbsp;<a class='tic' onclick='i3GEO.tema.mudatransp(\""+ltema.name+"\")' href='#' /a>"}else{tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t19")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t20")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=42' >&nbsp;&nbsp;&nbsp;</a>"+$inputText("","","tr"+ltema.name,"","3",ltema.transparency)+"<img class='tic' style='position:relative;top:3px;' onclick='i3GEO.tema.mudatransp(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />"}n=new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if(funcoes.temporizador===true&&i3GEO.Interface.ATUAL!="padrao"&&i3GEO.Interface.ATUAL!="flamingo"){if(navm){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t47")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t48")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=101' >&nbsp;&nbsp;&nbsp;</a>"+$inputText("","","temporizador"+ltema.name,"","3",ltema.temporizador)+"&nbsp;<a class='tic' onclick='i3GEO.tema.temporizador(\""+ltema.name+"\")' href='#' /a>"}else{tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t47")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t48")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=101' >&nbsp;&nbsp;&nbsp;</a>"+$inputText("","","temporizador"+ltema.name,"","3",ltema.temporizador)+"<img class='tic' style='position:relative;top:3px;' onclick='i3GEO.tema.temporizador(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />"}n=new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if(funcoes.mudanome===true){if(navm){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t21a")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"+$trad("t21")+" </span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=43' >&nbsp;&nbsp;&nbsp;</a>"+$inputText("","","nn"+ltema.name,"","8","")+"&nbsp;<a class='tic' onclick='i3GEO.tema.mudanome(\""+ltema.name+"\")' href='#' />"}else{tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t21a")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"+$trad("t21")+" </span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=43' >&nbsp;&nbsp;&nbsp;</a>"+$inputText("","","nn"+ltema.name,"","10","")+"<img class='tic' style='position:relative;top:3px;' onclick='i3GEO.tema.mudanome(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />"}n=new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if((ltema.type<3)&&(ltema.connectiontype!==7)){if(i3GEO.Interface.ATUAL!=="flamingo"&&funcoes.procurar===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t22"),$trad("t23"),'i3GEO.tema.dialogo.procuraratrib(\"'+ltema.name+'\")',node)}if(funcoes.toponimia===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t24"),$trad("t25"),'i3GEO.tema.dialogo.toponimia(\"'+ltema.name+'\")',node)}if(funcoes.etiquetas===true&&(ltema.identifica.toLowerCase()==="sim"||ltema.identifica==="")){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t26"),$trad("t27"),'i3GEO.tema.dialogo.etiquetas(\"'+ltema.name+'\")',node)}if(funcoes.filtrar===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t28"),$trad("t29"),'i3GEO.tema.dialogo.filtro(\"'+ltema.name+'\")',node)}if(funcoes.tabela===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t30"),$trad("t31"),'i3GEO.tema.dialogo.tabela(\"'+ltema.name+'\")',node)}if(i3GEO.parametros.versaoms>4&&funcoes.grafico===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t37"),$trad("t37"),'i3GEO.tema.dialogo.graficotema(\"'+ltema.name+'\")',node)}}if(ltema.type<4&&funcoes.editorlegenda===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t32"),$trad("t33"),'i3GEO.tema.dialogo.editaLegenda(\"'+ltema.name+'\")',node)}if(funcoes.destacar===true&&i3GEO.Interface.ATUAL!=="googlemaps"&&i3GEO.Interface.ATUAL!=="googleearth"&&i3GEO.Interface.ATUAL!=="flamingo"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t34"),$trad("t35"),'i3GEO.navega.destacaTema.inicia(\"'+ltema.name+'\")',node)}if(funcoes.cortina===true&&i3GEO.Interface.ATUAL!=="padrao"&&i3GEO.Interface.ATUAL!=="googleearth"&&i3GEO.Interface.ATUAL!=="flamingo"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t42"),$trad("t42"),'i3GEO.tema.dialogo.cortina(\"'+ltema.name+'\")',node)}if(funcoes.sql===true&&ltema.editorsql.toLowerCase()==="sim"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t40"),$trad("t41"),'i3GEO.tema.dialogo.editorsql(\"'+ltema.name+'\")',node)}if(funcoes.comentar===true&&ltema.permitecomentario.toLowerCase()!=="nao"&&i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t45"),$trad("t45"),'i3GEO.tema.dialogo.comentario(\"'+ltema.name+'\")',node)}if(funcoes.wms===true&&ltema.permiteogc.toLowerCase()!=="nao"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema("Getcapabilities",'WMS-OGC','i3GEO.tema.dialogo.mostraWms(\"'+ltema.name+'\")',node)}if(i3GEO.parametros.editor.toLowerCase()==="sim"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t44"),"<span style=color:red title='Apenas usuários editores podem ver essa opção' >"+$trad("t44")+"</span>",'i3GEO.tema.dialogo.salvaMapfile(\"'+ltema.name+'\")',node)}node.loadComplete()},adicionaOpcaoTema:function(dica,titulo,onclick,node){var tnome="<a href='#' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+dica+"','');\" onclick="+onclick+">"+titulo+" </a>",temp=new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node)},mostraLegenda:function(node){var retorna,idtema=node.data.idlegenda,ltema=i3GEO.arvoreDeCamadas.pegaTema(idtema);retorna=function(retorno){var original,i,re,tabela,linhas,linha,colunas,id,exp,incluir,d,nodeLeg,elementos,nelementos,inputs,desativar,nindices;if(retorno.data.legenda){original=retorno;retorno=retorno.data.legenda;if(retorno[0]){if((navn)&&(!retorno[0].imagem)){tabela=retorno}else{i=retorno[0].imagem;re=new RegExp("tiff","g");i=i.replace(re,'png');tabela="<img src='"+i+"' />"}retorno=""}else{linhas=retorno.split("#");if(linhas.length>1){linhas=retorno.split("|");tabela="<table>";linha=linhas.length-1;if(linha>=0){do{colunas=linhas[linha].split("#");id=colunas[0]+"-"+colunas[1];re=new RegExp("'","g");exp=colunas[3].replace(re,'"');tabela+="<tr style='border-top:1px solid rgb(240,240,240);'><td><img src='"+colunas[4]+"' </td><td style='text-align:left'>"+colunas[2]+"</td></tr>"}while(linha--)}tabela+="</table><br>"}else{tabela=retorno}}}else{tabela="<img src='"+retorno.data[0].imagem+"' />"}incluir="<div style='text-align:left' id='"+idtema+"verdiv"+"'>"+tabela+"</div>";nodeLeg=new YAHOO.widget.HTMLNode({html:incluir,enableHighlight:false,expanded:false},node);node.loadComplete();elementos=document.getElementById(idtema+"verdiv").getElementsByTagName("input");nelementos=elementos.length;inputs=[];i=0;if(nelementos>0){do{if(elementos[i].type==="checkbox"){inputs.push(elementos[i])}i++}while(i<nelementos)}if(original.data.desativar){desativar=original.data.desativar;nindices=desativar.length;i=0;if(nindices>0){do{inputs[desativar[i]].checked=false;i++}while(i<nindices)}}};if(i3GEO.configura.templateLegenda!==""){i3GEO.php.criaLegendaHTML(retorna,idtema,i3GEO.configura.templateLegenda)}else{i3GEO.php.criaLegendaHTML(retorna,idtema)}},atualizaLegenda:function(idtema){var node;if(document.getElementById(idtema+"verdiv")){node=i3GEO.arvoreDeCamadas.ARVORE.getNodeByProperty("idlegenda",idtema);if(node){i3GEO.arvoreDeCamadas.ARVORE.removeChildren(node);this.mostraLegenda(node);if($i("janelaLegenda"+idtema+"_corpo")){i3GEO.tema.mostralegendajanela(idtema,"","abrejanela")}}}},escolheCorClasse:function(leg){var obj,novoel;leg=leg.parentNode.getElementsByTagName("input")[0];if(!$i("tempinputcorclasse")){novoel=document.createElement("input");novoel.id="tempinputcorclasse";novoel.style.display="none";novoel.alt="objeto criado para guardar dados da funcao escolohercorclasse";novoel.onchange="";document.body.appendChild(novoel)}obj=$i("tempinputcorclasse");obj.value="";obj.tema=leg.name;obj.idclasse=leg.value;obj.onchange=function(){var obj=$i("tempinputcorclasse");i3GEO.tema.alteracorclasse(obj.tema,obj.idclasse,obj.value)};i3GEO.util.abreCor("","tempinputcorclasse")},inverteStatusClasse:function(leg){var temp=function(retorno){i3GEO.atualiza();i3GEO.Interface.atualizaTema(retorno,leg.name)};i3GEO.php.inverteStatusClasse(temp,leg.name,leg.value)},montaTextoTema:function(tema){var ck,html,display="none",estilo,iu=i3GEO.util;if(tema.status*1===2){ck=' CHECKED '}else{ck=""}if(this.FILTRO!==""){if(this.FILTRO==="desligados"&&ck!==""){return""}if(this.FILTRO==="ligados"&&ck===""){return""}if(this.FILTRO==="selecionados"&&tema.sel.toLowerCase()!=="sim"){return""}if(this.FILTRO==="download"&&tema.download.toLowerCase()!=="sim"){return""}if(this.FILTRO==="wms"&&tema.connectiontype*1!==7){return""}if(this.FILTRO==="raster"&&tema.type*1!==3){return""}if(this.FILTRO==="toponimia"&&tema.type*1!==4){return""}}estilo=navm?"text-align:left;font-size:11px;vertical-align:middle;display:table-cell;":"text-align:left;font-size:11px;vertical-align:vertical-align:top;padding-top:4px;";html="<p onclick='i3GEO.mapa.ativaTema(\""+tema.name+"\")' id='arrastar_"+tema.name+"' style='"+estilo+"' ><input class=inputsb style='cursor:pointer;' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t3")+"','ligadesliga')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" type='checkbox' name=\"layer\" value='"+tema.name+"' "+ck;if(i3GEO.arvoreDeCamadas.ATIVATEMA!==""){html+="onclick=\""+i3GEO.arvoreDeCamadas.ATIVATEMA+"\""}else{html+="onclick='i3GEO.util.criaBotaoAplicar(\"i3GEO.arvoreDeCamadas.aplicaTemas\",\""+$trad("p14")+"\",\"i3geoBotaoAplicarCamadas\",this)'"}html+=" />";estilo=navm?"cursor:pointer;vertical-align:35%;padding-top:0px;":"cursor:pointer;vertical-align:top;";if(tema.iconetema!==""&&i3GEO.arvoreDeCamadas.ICONETEMA===true){html+="&nbsp;<img style='"+estilo+"' src='"+tema.iconetema+"' />"}if(tema.contextoescala.toLowerCase()==="sim"){html+="&nbsp;<img style='"+estilo+"' src="+iu.$im("contextoescala.png")+" title='"+$trad("t36")+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t36")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(tema.sel.toLowerCase()==="sim"){html+="&nbsp;<img style='"+estilo+"' src="+iu.$im("estasel.png")+" title='"+$trad("t4")+"' onclick='i3GEO.tema.limpasel(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t5")+"','limpasel')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />";html+="&nbsp;<img style='"+estilo+"' src="+iu.$im("zoomsel.gif")+" title='"+$trad("t4a")+"' onclick='i3GEO.tema.zoomsel(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t5")+"','zoomsel')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(tema.download.toLowerCase()==="sim"){html+="&nbsp;<img style='"+estilo+"' src="+iu.$im("down1.gif")+" title='download' onclick='i3GEO.tema.dialogo.download(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t6")+"','download')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}estilo=navm?"cursor:move;vertical-align:35%;padding-top:0px;color:black;":"cursor:move;vertical-align:top;color:black;";if(i3GEO.arvoreDeCamadas.AGUARDALEGENDA){html+="&nbsp;<span id='ArvoreTituloTema"+tema.name+"' style='"+estilo+"' onclick=\"i3GEO.tema.mostralegendajanela('"+tema.name+"','"+tema.tema+"','abrejanela');\" onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t7a")+"','');i3GEO.tema.mostralegendajanela('"+tema.name+"','"+tema.tema+"','ativatimer');\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('');i3GEO.tema.mostralegendajanela('"+tema.name+"','','desativatimer');\" >"+tema.tema+"</span>"}else{html+="&nbsp;<span id='ArvoreTituloTema"+tema.name+"' style='"+estilo+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t7")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+tema.tema+"</span>"}html+="</p>";if(i3GEO.tema.TEMPORIZADORESID[tema.name]==undefined&&tema.temporizador!=""){i3GEO.tema.temporizador(tema.name,tema.temporizador)}return(html)},atualizaFarol:function(mapscale){var farol,l,ltema,escala,iu=i3GEO.util,im=i3GEO.configura.locaplic+"/imagens/",camadas=i3GEO.arvoreDeCamadas.CAMADAS;farol="maisamarelo.png";l=camadas.length-1;if(l>=0){do{ltema=camadas[l];escala=ltema.escala;if(escala*1<mapscale*1){farol="maisverde.png"}if(escala*1>mapscale*1){farol="maisvermelho.png"}if(escala*1===0){farol="maisamarelo.png"}iu.defineValor("farol"+ltema.name,"src",im+farol)}while(l--)}},aplicaTemas:function(tipo){if(arguments.length===0){tipo="normal"}var t,temp,ligar,desligar;if(tipo==="normal"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("mantem")}if(tipo==="ligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("marca");if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googleearth","openlayers","googlemaps"])){return}}if(tipo==="desligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("desmarca");if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googleearth","openlayers","googlemaps"])){return}}temp=function(){i3GEO.atualiza();i3GEO.janela.fechaAguarde("redesenha")};try{clearTimeout(tempoBotaoAplicar)}catch(erro){}tempoBotaoAplicar="";i3GEO.janela.abreAguarde("redesenha",$trad("o1"));if(tipo==="normal"){i3GEO.php.ligatemas(temp,t[1].toString(),t[0].toString());return}if(tipo==="ligartodos"){i3GEO.php.ligatemas(temp,"",t[2].toString());return}if(tipo==="desligartodos"){i3GEO.php.ligatemas(temp,t[2].toString(),"")}},listaLigadosDesligados:function(tipo){if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return[[],[],[]]}if(arguments.length===0){tipo="manter"}var no,cs,csn,j,c,temp,nos=i3GEO.arvoreDeCamadas.ARVORE.getNodesByProperty("tipo","tema"),ligados=[],desligados=[],todos=[],n=nos.length,i=0,ATUAL=i3GEO.Interface.ATUAL;do{try{no=nos[i].getEl();cs=no.getElementsByTagName("input");csn=cs.length;for(j=0;j<csn;j+=1){c=cs[j];if(c.name==="layer"){temp=c.checked===true?ligados.push(c.value):desligados.push(c.value);todos.push(c.value);if(tipo==="marca"){c.checked=true;if(i3GEO.util.in_array(ATUAL,["googleearth","openlayers","googlemaps"])){i3GEO.Interface[ATUAL].ligaDesliga(c)}}if(tipo==="desmarca"){c.checked=false;if(i3GEO.util.in_array(ATUAL,["googleearth","openlayers","googlemaps"])){i3GEO.Interface[ATUAL].ligaDesliga(c)}}}}i++}catch(e){i+=1}}while(i<n);return([ligados,desligados,todos])},capturaCheckBox:function(tema){if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return}var nos,ligados,desligados,todos,n,i,no,cs,csn,j,c;nos=i3GEO.arvoreDeCamadas.ARVORE.getNodesByProperty("tipo","tema");n=nos.length;i=0;do{try{no=nos[i].getEl();cs=no.getElementsByTagName("input");csn=cs.length;for(j=0;j<csn;j+=1){c=cs[j];if(c.name==="layer"&&c.value===tema){return c}}i+=1}catch(e){i+=1}}while(i<n);return(null)},comparaTemas:function(novo,atual){try{var novon=novo.length,i;if(novon!==atual.length){return(false)}for(i=0;i<novon;i+=1){if(novo[i].name!==atual[i].name){return(false)}if(novo[i].tema!==atual[i].tema){return(false)}if(novo[i].sel!==atual[i].sel){return(false)}if(novo[i].status!==atual[i].status){return(false)}}return(true)}catch(e){return true}},pegaTema:function(idtema){var i,v="",c=i3GEO.arvoreDeCamadas.CAMADAS.length;for(i=0;i<c;i+=1){if(i3GEO.arvoreDeCamadas.CAMADAS[i].name===idtema){v=i3GEO.arvoreDeCamadas.CAMADAS[i]}}return v},filtraCamadas:function(propriedade,valor,operador,camadas){var resultado=[],i=0,temp,nelementos=camadas.length,ltema;if(nelementos>0){do{ltema=camadas[i];if(ltema.escondido.toLowerCase()!=="sim"){temp=ltema[propriedade];if(operador==="igual"){if(temp==valor){resultado.push(ltema)}}if(operador==="diferente"){if(temp!=valor){resultado.push(ltema)}}}i+=1}while(i<nelementos)}return resultado},alteraPropCamadas:function(propriedade,valor,camada){var resultado=[],i=0,temp,nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if(ltema.name===camada){ltema[propriedade]=valor}i+=1}while(i<nelementos)}},verificaAbrangenciaTemas:function(){if(i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS===false){return}try{var resultado=[],i=0,temp,nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema,intersec,node;if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];temp=ltema.exttema;if(temp!==""){if(i3GEO.util.intersectaBox(temp,i3GEO.parametros.mapexten)===false){$i("ArvoreTituloTema"+ltema.name).style.color="gray"}else{$i("ArvoreTituloTema"+ltema.name).style.color="black"}}i+=1}while(i<nelementos)}}catch(e){}},verificaAplicaExtensao:function(){var i=0,temp="",nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;try{if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if(ltema.aplicaextensao.toLowerCase()==="sim"){temp=ltema.name}i+=1}while(i<nelementos)}}catch(e){return""}return temp},dialogo:{filtro:function(){i3GEO.util.dialogoFerramenta("i3GEO.arvoreDeCamadas.dialogo.filtro()","filtroarvore","filtroarvore")}}};
371   -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="<table id='rosaV' >";setas+="<tr onclick=\"javascript:i3GEO.configura.mostraRosaDosVentos='nao'\"><td></td><td></td><td style=cursor:pointer >x</td></tr><tr>";setas+="<td><img class='rosanoroeste' title='noroeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','noroeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosanorte' title='norte' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','norte','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosanordeste' title='nordeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','nordeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td></tr>";setas+="<tr><td><img class='rosaoeste' title='oeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','oeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><table><tr>";setas+="<td><img class='rosamais' title='aproxima' onclick=\"i3GEO.navega.zoomin('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"')\" src='"+$im("branco.gif")+"' </td>";setas+="<td><img class='rosamenos' title='afasta' onclick=\"i3GEO.navega.zoomout('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"')\" src='"+$im("branco.gif")+"' </td>";setas+="</tr></table></td>";setas+="<td><img class='rosaleste' title='leste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','leste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td></tr>";setas+="<tr><td><img class='rosasudoeste' title='sudoeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','sudoeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosasul' title='sul' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','sul','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosasudeste' title='sudeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','sudeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td></tr></table>";i=$i("i3geo_rosa");i.innerHTML=setas;i.style.top=objposicaocursor.telay-27;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(ppx<boxxini){bxs.left=ppx;bxs.width=boxxini-ppx+2}if(py<boxyini){bxs.top=py;bxs.height=boxyini-py+2}}else{if(ppx>boxxini){bxs.width=ppx-boxxini+"px"}if(py>boxyini){bxs.height=py-boxyini+"px"}if(ppx<boxxini){bxs.left=ppx+"px";bxs.width=boxxini-ppx+"px"}if(py<boxyini){bxs.top=py+"px";bxs.height=boxyini-py+"px"}}},termina:function(){var valor,v,x1,y1,x2,y2,limpa,f;if(g_tipoacao!=='zoomli'){i3GEO.eventos.MOUSEDOWN.remove("i3GEO.navega.zoomBox.inicia()");i3GEO.eventos.MOUSEUP.remove("i3GEO.navega.zoomBox.termina()");return}try{if(i3GEO.navega.timerNavega!==null){return}valor=i3GEO.calculo.rect2ext("i3geoboxZoom",i3GEO.parametros.mapexten,i3GEO.parametros.pixelsize);v=valor[0];x1=valor[1];y1=valor[2];x2=valor[3];y2=valor[4];limpa=function(){var bxs=$i("i3geoboxZoom").style;bxs.display="none";bxs.visibility="hidden";bxs.width=0;bxs.height=0};if((x1===x2)||(y1===y2)){limpa.call();return}i3GEO.parametros.mapexten=v;limpa.call();i3GEO.eventos.MOUSEMOVE.remove("i3GEO.navega.zoomBox.desloca()");i3GEO.eventos.MOUSEUP.remove("i3GEO.navega.zoomBox.termina()");if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.zoom2extent(v);return}f="i3GEO.navega.timerNavega = null;i3GEO.navega.zoomExt('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','"+i3GEO.configura.tipoimagem+"','"+v+"')";if(i3GEO.navega.timerNavega!==undefined){clearTimeout(i3GEO.navega.timerNavega)}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)}catch(e){limpa.call();return}}},entorno:{ativaDesativa:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){alert("Essa operação não funciona nessa interface");return}if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.inverteModoTile();return}var letras,l;if(i3GEO.parametros.mapfile===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}if(i3GEO.configura.entorno.toLowerCase()==="sim"){letras=["L","O","N","S"];for(l=0;l<4;l++){if($i("img"+letras[l])){$i("img"+letras[l]).style.display="none";$i("img"+letras[l]).src=""}}$left("img",0);$top("img",0);i3GEO.configura.entorno="nao";alert("Entorno desativado");$i("img").style.visibility="visible";$i("img").style.display="block"}else{i3GEO.navega.entorno.geraURL();letras=["L","O","N","S"];for(l=0;l<4;l++){if($i("img"+letras[l])){$i("img"+letras[l]).style.width=i3GEO.parametros.w;$i("img"+letras[l]).style.height=i3GEO.parametros.h;$i("img"+letras[l]).style.display="block"}}i3GEO.configura.entorno.toLowerCase()="sim";i3GEO.navega.entorno.ajustaPosicao();alert("Entorno ativado. o desenho do mapa pode demorar mais.")}},geraURL:function(){var nny,nnx,sy,sx,lx,ly,ox,oy,u,sul,norte,leste,oeste;nny=(i3GEO.parametros.h/2)*-1;nnx=i3GEO.parametros.w/2;sy=i3GEO.parametros.h+(i3GEO.parametros.h/2);sx=i3GEO.parametros.w/2;lx=i3GEO.parametros.w+(i3GEO.parametros.w/2);ly=i3GEO.parametros.h/2;ox=(parseInt(i3GEO.parametros.w/2,10))*-1;oy=i3GEO.parametros.h/2;u=window.location.protocol+"\/\/"+window.location.host+i3GEO.parametros.cgi+"?map="+i3GEO.parametros.mapfile;u+="&mode=map&imgext="+i3GEO.parametros.mapexten+"&mapsize="+nnx+" "+oy;sul=u+"&imgxy="+sx/2+" "+sy/2;norte=u+"&imgxy="+nnx/2+" "+nny/2;leste=u+"&imgxy="+lx/2+" "+ly/2;oeste=u+"&imgxy="+ox/2+" "+oy/2;$i("imgS").src=sul;$i("imgN").src=norte;$i("imgL").src=leste;$i("imgO").src=oeste},ajustaPosicao:function(){$left("img",i3GEO.parametros.w*-1);$left("imgS",i3GEO.parametros.w*-1);$left("imgL",i3GEO.parametros.w);$left("imgO",i3GEO.parametros.w*-3);$left("imgN",i3GEO.parametros.w*-1);$top("img",i3GEO.parametros.h*-1);$top("imgS",i3GEO.parametros.h*-1);$top("imgL",i3GEO.parametros.h*-1);$top("imgN",i3GEO.parametros.h*-1);$top("imgO",i3GEO.parametros.h*-1)}},lente:{POSICAOX:0,POSICAOY:0,ESTAATIVA:"nao",inicia:function(){var novoel,novoimg,temp;if(!$i("lente")){novoel=document.createElement("div");novoel.id='lente';novoel.style.clip='rect(0px,0px,0px,0px)';novoimg=document.createElement("img");novoimg.src="";novoimg.id='lenteimg';novoel.appendChild(novoimg);document.body.appendChild(novoel);novoel=document.createElement("div");novoel.id='boxlente';document.body.appendChild(novoel)}temp=$i('boxlente').style;temp.borderWidth='1';temp.borderColor="red";temp.display="block";$i("lente").style.display="block";i3GEO.navega.lente.ESTAATIVA="sim";i3GEO.navega.lente.atualiza();if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.navega.lente.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.navega.lente.atualiza()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.navega.lente.movimenta()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.navega.lente.movimenta()")}},atualiza:function(){var temp=function(retorno){try{var pos,volta,nimg,olente,oboxlente,olenteimg;retorno=retorno.data;if(retorno==="erro"){alert("A lente nao pode ser criada");return}volta=retorno.split(",");nimg=volta[2];olente=$i('lente');oboxlente=$i('boxlente');olenteimg=$i('lenteimg');olenteimg.src=nimg;olenteimg.style.width=volta[0]*1.5;olenteimg.style.height=volta[1]*1.5;olente.style.zIndex=1000;olenteimg.style.zIndex=1000;oboxlente.style.zIndex=1000;pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));olente.style.left=pos[0]+i3GEO.navega.lente.POSICAOX+"px";olente.style.top=pos[1]+i3GEO.navega.lente.POSICAOY+"px";oboxlente.style.left=pos[0]+i3GEO.navega.lente.POSICAOX+"px";oboxlente.style.top=pos[1]+i3GEO.navega.lente.POSICAOY+"px";oboxlente.style.display='block';oboxlente.style.visibility='visible';olente.style.display='block';olente.style.visibility='visible';i3GEO.janela.fechaAguarde("ajaxabrelente")}catch(e){i3GEO.janela.fechaAguarde()}};if(i3GEO.navega.lente.ESTAATIVA==="sim"){i3GEO.janela.abreAguarde("ajaxabrelente",$trad("o1"));i3GEO.php.aplicaResolucao(temp,1.5)}else{i3GEO.navega.lente.desativa()}},desativa:function(){$i("lente").style.display="none";$i("boxlente").style.display="none";$i('boxlente').style.borderWidth=0;i3GEO.navega.lente.ESTAATIVA="nao";i3GEO.eventos.MOUSEMOVE.remove("i3GEO.navega.lente.movimenta()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.navega.lente.atualiza()")},movimenta:function(){try{if(i3GEO.navega.lente.ESTAATIVA==="sim"){var pos,esq,topo,clipt,i;if($i("lente").style.visibility==="visible"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA))}esq=(objposicaocursor.telax-pos[0])*2.25;topo=(objposicaocursor.telay-pos[1])*2.25;clipt="rect("+(topo-120)+" "+(esq+120)+" "+(topo+120)+" "+(esq-120)+")";i=$i("lente").style;i.clip=clipt;i.top=pos[1]-(topo-120);i.left=pos[0]-(esq-120)}}catch(e){}}},destacaTema:{TAMANHO:75,ESTAATIVO:"nao",TEMA:"",inicia:function(tema){var novoel,novoeli,janela,pos;if(!$i("img_d")){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));novoel=document.createElement("div");novoel.id="div_d";novoel.style.zIndex=5000;document.body.appendChild(novoel);$i("div_d").innerHTML="<input style='position:relative;top:0px;left:0px'' type=image src='' id='img_d' />";$i("div_d").style.left=parseInt(pos[0],10);$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="<p style='position:absolute;top:0px;left:0px'>+-</p>"}i3GEO.navega.destacaTema.TEMA=tema;i3GEO.navega.destacaTema.ESTAATIVO="sim";i3GEO.navega.destacaTema.atualiza();janela=i3GEO.janela.cria(160,0,"","center","center","Feche para parar destaque&nbsp;&nbsp;","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+='<div style="text-align:center;position:relative;left:9px" >'}estilo="top:4px;";if(navm){estilo="top:4px;left:-2px;"}temp+='<div id="vertMaisZoom" style="'+estilo+'"></div><div id="vertBGDiv" name="vertBGDiv" tabindex="0" x2:role="role:slider" state:valuenow="0" state:valuemin="0" state:valuemax="200" title="Zoom" >';temp+='<div id="vertHandleDivZoom" ><img alt="" class="slider" src="'+i3GEO.util.$im("branco.gif")+'" /></div></div>';if(navm){temp+='<div id=vertMenosZoom style="left:-1px;" ></div>'}else{temp+='<div id=vertMenosZoom ></div>'}if(navn){temp+='</div>'}return temp},ativa:function(){var temp;$i("vertMaisZoom").onmouseover=function(){i3GEO.ajuda.mostraJanela('Amplia o mapa mantendo o centro atual.')};$i("vertMaisZoom").onclick=function(){if(!$i("imgtemp")){$i("vertHandleDivZoom").onmousedown.call();g_fatordezoom=0;$i("vertHandleDivZoom").onmousemove.call();g_fatordezoom=-1}$i("vertHandleDivZoom").onmousemove.call();i3GEO.barraDeBotoes.BOTAOCLICADO='zoomin';try{clearTimeout(i3GEO.navega.timerNavega)}catch(e){}i3GEO.navega.timerNavega=setTimeout("$i('vertBGDiv').onmouseup.call();",i3GEO.navega.TEMPONAVEGAR);if(g_fatordezoom<-6){$i("vertBGDiv").onmouseup.call()}};$i("vertMenosZoom").onmouseover=function(){i3GEO.ajuda.mostraJanela('Reduz o mapa mantendo o centro atual.')};$i("vertMenosZoom").onclick=function(){if(!$i("imgtemp")){$i("vertHandleDivZoom").onmousedown.call();g_fatordezoom=0;$i("vertHandleDivZoom").onmousemove.call();g_fatordezoom=1}$i("vertHandleDivZoom").onmousemove.call();i3GEO.barraDeBotoes.BOTAOCLICADO='zoomout';try{clearTimeout(i3GEO.navega.timerNavega)}catch(e){}i3GEO.navega.timerNavega=setTimeout("$i('vertBGDiv').onmouseup.call();",i3GEO.navega.TEMPONAVEGAR);if(g_fatordezoom>6){$i("vertBGDiv").onmouseup.call()}};verticalSlider=YAHOO.widget.Slider.getVertSlider("vertBGDiv","vertHandleDivZoom",0,70);verticalSlider.onChange=function(offsetFromStart){g_fatordezoom=(offsetFromStart-35)/5};verticalSlider.setValue(35,true);if($i("vertBGDiv")){$i("vertBGDiv").onmouseup=function(){verticalSlider.setValue(35,true);if(g_fatordezoom!==0){temp=i3GEO.navega.TEMPONAVEGAR;i3GEO.navega.TEMPONAVEGAR=0;i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,i3geo_ns);i3GEO.navega.TEMPONAVEGAR=temp}g_fatordezoom=0}}if($i("vertHandleDivZoom")){$i("vertHandleDivZoom").onmousedown=function(){var iclone,corpo;$i("vertHandleDivZoom").onmouseout=function(e){if(!e){e=window.event}if(g_fatordezoom!==0){$i("vertBGDiv").onmouseup.call()}e.onmouseup.returnValue=false;e.onmouseout.returnValue=false};i3GEO.barraDeBotoes.BOTAOCLICADO='slidezoom';if(!$i("imgtemp")){iclone=document.createElement('IMG');iclone.style.position="absolute";iclone.id="imgtemp";iclone.style.border="1px solid blue";$i("img").parentNode.appendChild(iclone);iclone=$i("imgtemp");corpo=$i("img");if(!corpo){return}iclone.src=corpo.src;iclone.style.width=i3GEO.parametros.w;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(coordenadas){i3GEO.navega.dialogo.google.coordenadas=coordenadas;if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizagoogle()")>0){i3GEO.eventos.NAVEGAMAPA.remove("atualizagoogle()")}i3GEO.util.criaBox();g_operacao="navega";var idgoogle="googlemaps"+Math.random();i3GEO.janela.cria((i3GEO.parametros.w/2)+25+"px",(i3GEO.parametros.h/2)+18+"px",i3GEO.configura.locaplic+"/ferramentas/googlemaps/index.php","","","Google maps <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=7&idajuda=68' >&nbsp;&nbsp;&nbsp;</a>",idgoogle);atualizagoogle=function(){try{parent.frames[idgoogle+"i"].panTogoogle()}catch(e){i3GEO.eventos.NAVEGAMAPA.remove("atualizagoogle()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizagoogle()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizagoogle()")}},confluence:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.confluence()","confluence","confluence")}}};
372   -if(typeof(i3GEO)==='undefined'){i3GEO=[]}objposicaocursor={ddx:"",ddy:"",dmsx:"",dmsy:"",telax:"",telay:"",imgx:"",imgy:"",refx:"",refy:""};i3GEO.eventos={ATUALIZAARVORECAMADAS:[],ATIVATEMA:[],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.toLowerCase()==="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){}}}};
373   -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.arvoreDeTemas={OPCOESADICIONAIS:{idonde:"",incluiArvore:true,uploaddbf:false,uploadlocal:false,uploadarquivo: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:false,comentarios:true,bookmark:true,importarwmc:true,googleearth:true,carregaKml:true},FATORESTRELA:"10",INCLUISISTEMAS:true,INCLUIWMS:true,INCLUIESTRELAS:true,FILTRADOWNLOAD:false,FILTRAOGC:false,TIPOBOTAO:"checkbox",ATIVATEMA:"",ATIVATEMAIMEDIATO:false,IDSMENUS:[],RETORNAGUIA:"",IDHTML:"arvoreAdicionaTema",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<nraiz;i+=1){html="<span title='"+raiz[i].description+"'> "+raiz[i].title;if(raiz[i].nacessos>0){html+=" ("+((raiz[i].nacessosok*100)/(raiz[i].nacessos*1))+"%)</span>"}else{html+=" (% de acessos não definido)</span>"}html+="<hr>";tempNode=new YAHOO.widget.HTMLNode({html:html,id_ws:raiz[i].id_ws,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<n;i+=1){temp=retorno.data[i];cabeca=temp.nome+" - "+temp.titulo;if(cabeca!=="undefined - undefined"){tempNode=new YAHOO.widget.HTMLNode({html:"<span style='color:"+cor+"' >"+cabeca,url:node.data.url,nivel:(node.data.nivel*1+1),id_ws:"",layer:temp.nome,enableHighlight:false,expanded:false},node);if(!temp.estilos){tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS,1)}if(temp.estilos){ns=temp.estilos.length;for(j=0;j<ns;j+=1){tempNodeS=new YAHOO.widget.HTMLNode({html:i3GEO.arvoreDeTemas.montaTextoTemaWMS(node.data.url,temp.nome,temp.estilos[j].nome,temp.estilos[j].titulo,temp.srs.toString(),temp.formatsinfo.toString(),temp.version.toString(),temp.formats.toString(),cor),enableHighlight:false,expanded:false},tempNode);tempNode.isleaf=true}}cor=(cor==="rgb(51, 102, 102)")?"rgb(47, 70, 50)":"rgb(51, 102, 102)"}}node.loadComplete()};i3GEO.php.listaLayersWMS(monta,node.data.url,(node.data.nivel*1+1),node.data.id_ws,node.data.layer)},montaTextoTemaWMS:function(servico,layer,estilo,titulo,proj,formatoinfo,versao,formatoimg,cor){var html,temp,adiciona;html="<td style='vertical-align:top;padding-top:5px;'><span ><input style='cursor:pointer;border:solid 0 white;' ";temp=function(){i3GEO.janela.fechaAguarde("ajaxredesenha");i3GEO.atualiza()};adiciona="i3GEO.janela.abreAguarde(\"ajaxredesenha\",\""+$trad("o1")+"\");i3GEO.arvoreDeTemas.checked=false;i3GEO.php.adicionaTemaWMS("+temp+","+"\""+servico+"\","+"\""+layer+"\","+"\""+estilo+"\","+"\""+proj+"\","+"\""+formatoimg+"\","+"\""+versao+"\","+"\""+titulo+"\","+"\"\","+"\"nao\","+"\""+formatoinfo+"\")";html+="onclick='javascript:"+adiciona+"' "+" type='radio' /></td><td style='padding-top:4px;vertical-align:top;text-align:left;padding-left:3px;color:"+cor+";' >"+layer+" - "+titulo+"</td></span>";return(html)},listaMenus:function(g_sid,g_locaplic,funcao){var retorno=function(retorno){var c,m,i,k,jj,j;if(i3GEO.arvoreDeTemas.IDSMENUS.length===0){i3GEO.arvoreDeTemas.MENUS=retorno.data}else{i3GEO.arvoreDeTemas.MENUS=[];c=retorno.data.length;m=i3GEO.arvoreDeTemas.IDSMENUS.length;for(i=0,j=c;i<j;i+=1){for(k=0,jj=m;k<jj;k+=1){if(retorno.data[i].idmenu===i3GEO.arvoreDeTemas.IDSMENUS[k]){i3GEO.arvoreDeTemas.MENUS.push(retorno.data[i])}}}}if(funcao!==""){eval(funcao+"(retorno)")}};i3GEO.php.pegalistademenus(retorno)},listaGrupos:function(g_sid,g_locaplic,id_menu,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.GRUPOS=retorno.data;if(funcao!==""){funcao.call()}};if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD||i3GEO.arvoreDeTemas.FILTRAOGC){i3GEO.php.pegalistadegrupos(retorno,id_menu,"sim")}else{i3GEO.php.pegalistadegrupos(retorno,id_menu,"nao")}},listaSubGrupos:function(g_sid,g_locaplic,id_menu,id_grupo,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.SUBGRUPOS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegalistadeSubgrupos(retorno,id_menu,id_grupo)},listaTemas:function(g_sid,g_locaplic,id_menu,id_grupo,id_subgrupo,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.TEMAS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegalistadetemas(retorno,id_menu,id_grupo,id_subgrupo)},listaSistemas:function(g_sid,g_locaplic,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.SISTEMAS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegaSistemas(retorno)},listaDrives:function(g_sid,g_locaplic,funcao){var retorno=function(retorno){try{i3GEO.arvoreDeTemas.DRIVES=retorno.data[0];if(i3GEO.arvoreDeTemas.DRIVES==""){return}if(funcao!==""){funcao.call()}}catch(e){i3GEO.arvoreDeTemas.DRIVES=""}};i3GEO.php.listadrives(retorno)},listaEstrelas:function(node){var busca,root,montanos;montanos=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<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;try{if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}}catch(e){}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'>&nbsp;fonte</a>"}if(ngSgrupo[sg].subgrupo){d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>"}else{d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].grupo)+")"+lk+"</td>"}tempNode=new YAHOO.widget.HTMLNode({html:d,expanded:false,isLeaf:true,enableHighlight: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:"<span style='color:red'>Nada encontrado<br><br></span>",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(i3GEO.arvoreDeTemas.ARVORE){return}if(!idhtml){idhtml=""}if(idhtml!==""){i3GEO.arvoreDeTemas.IDHTML=idhtml}if(!funcaoTema){funcaoTema=""}if(funcaoTema!==""){i3GEO.arvoreDeTemas.ATIVATEMA=funcaoTema}if(!objOpcoes){objOpcoes=""}if(objOpcoes!==""){i3GEO.arvoreDeTemas.OPCOESADICIONAIS=objOpcoes}if(!tipoBotao){tipoBotao=""}if(tipoBotao!==""){i3GEO.arvoreDeTemas.TIPOBOTAO=tipoBotao}i3GEO.arvoreDeTemas.LOCAPLIC=g_locaplic;i3GEO.arvoreDeTemas.SID=g_sid;if(i3GEO.arvoreDeTemas.IDHTML===""){return}i3GEO.arvoreDeTemas.listaMenus(g_sid,g_locaplic,"i3GEO.arvoreDeTemas.montaArvore")},atualiza:function(){i3GEO.arvoreDeTemas.ARVORE=null;i3GEO.arvoreDeTemas.cria(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,i3GEO.arvoreDeTemas.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(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluibusca===true){insp="<br><br><table><tr>"+"<td><span style='font-size:12px'>&nbsp;"+$trad("a1")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=31' >&nbsp;&nbsp;&nbsp;</a></span></td>"+"<td><input onclick='javascript:i3GEO.arvoreDeTemas.select();' class='digitar' type='text' id='i3geo_buscatema' size='15' value='' /></td>"+"<td><img class='tic' ";if(navm){insp+="style='top:0px;'"}else{insp+="style='top:4px;'"}insp+=" src='"+i3GEO.util.$im("branco.gif")+"' onclick='i3GEO.arvoreDeTemas.buscaTema2(document.getElementById(\"i3geo_buscatema\").value)' /></td>";insp+="</tr></table>&nbsp;";tempNode=new YAHOO.widget.HTMLNode({html:insp,enableHighlight:false,expanded:false,hasIcon:false},root)}outrasOpcoes=i3GEO.arvoreDeTemas.outrasOpcoesHTML();if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde!==""){document.getElementById(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde).innerHTML=outrasOpcoes}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore===true){tempNode=new YAHOO.widget.HTMLNode({html:outrasOpcoes+"&nbsp;<br>",isLeaf:true,enableHighlight:false,expanded:false,hasIcon:false},root);if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir===true){retorno=function(){var drives,iglt,ig,drive;tempNode=new YAHOO.widget.HTMLNode({html:"&nbsp;"+$trad("a6")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=32' >&nbsp;&nbsp;&nbsp;</a>",enableHighlight: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(ig<iglt)};i3GEO.arvoreDeTemas.listaDrives(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,retorno)}}if(i3GEO.parametros.editor==="sim"){tempNode=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin' target=blank >Sistema de administração</a>",idmenu:"",enableHighlight:false,expanded:false},root);tempNode=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/arvore.html' target=blank >Editar árvore</a>",idmenu:"",enableHighlight:false,expanded:false},root);tempNode=new YAHOO.widget.HTMLNode({html:"<span style='color:red;cursor:pointer' title='opção visível apenas para editores' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/menus.html\")' target=blank >Editar menus</span>",idmenu:"",enableHighlight:false,expanded:false},root)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.googleearth===true){tempNode=new YAHOO.widget.HTMLNode({html:"<a href='"+i3GEO.configura.locaplic+"/kml.php' target=blank > <img src='"+i3GEO.configura.locaplic+"/imagens/visual/default/branco.gif' class='abregoogleearth'> "+$trad("a13")+"</a>",idmenu:"",enableHighlight:false,expanded:false},root)}if(i3GEO.arvoreDeTemas.INCLUIWMS===true){if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar lista' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/webservices.html?tipo=WMS\")' style='width:11px;position:relative;left:3px' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}tempNode=new YAHOO.widget.HTMLNode({html:"<b>&nbsp;OGC-WMS</b>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=33' >&nbsp;&nbsp;&nbsp;</a>"+editor,idwms:"raiz",expanded:false,enableHighlight:false},root);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaWMS,1)}if(i3GEO.arvoreDeTemas.INCLUIESTRELAS===true){tempNode=new YAHOO.widget.HTMLNode({expanded:false,html:"<b>&nbsp;"+$trad("t46")+"</b> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=95' >&nbsp;&nbsp;&nbsp;</a>",enableHighlight:false},root);ig=5;do{tempNode1=new YAHOO.widget.HTMLNode({expanded:false,html:"<img src='"+$im("e"+ig+".png")+"' />",enableHighlight:false,nivel:ig},tempNode);tempNode1.setDynamicLoad(i3GEO.arvoreDeTemas.listaEstrelas,1);ig-=1}while(ig>0)}dados=i3GEO.arvoreDeTemas.MENUS;c=dados.length;for(i=0,j=c;i<j;i+=1){if(!dados[i].nomemenu){dados[i].nomemenu=dados[i].idmenu}if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar grupos' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+dados[i].idmenu+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}if(!dados[i].publicado){dados[i].publicado="sim"}if(dados[i].publicado.toLowerCase()!=="nao"){conteudo="<b>&nbsp;<span title='"+(dados[i].desc)+"'>"+dados[i].nomemenu+"</span>"+editor}else{conteudo="<b>&nbsp;<span title='nao publicado' ><s>"+dados[i].nomemenu+"</s></span>"+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(i3GEO.arvoreDeTemas.INCLUISISTEMAS){retorno=function(){var sis,iglt,tempNode,ig,nomeSis,sisNode,funcoes,tempf,ig2,abre,nomeFunc,funcNode;try{sis=i3GEO.arvoreDeTemas.SISTEMAS;iglt=sis.length;tempNode=new YAHOO.widget.HTMLNode({html:"<b>Sistemas</b>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=34' >&nbsp;&nbsp;&nbsp;</a>",expanded:false,enableHighlight:false},root)}catch(e){i3GEO.arvoreDeTemas.ARVORE.draw();return}ig=0;do{nomeSis=sis[ig].NOME;if(sis[ig].PUBLICADO){if(sis[ig].PUBLICADO.toLowerCase()==="nao"){nomeSis="<s>"+sis[ig].NOME+"</s>"}}sisNode=new YAHOO.widget.HTMLNode({html:nomeSis,expanded:false,enableHighlight:false},tempNode);funcoes=sis[ig].FUNCOES;tempf=funcoes.length;for(ig2=0;ig2<tempf;ig2+=1){abre="i3GEO.janela.cria('"+(funcoes[ig2].W)+"px','"+(funcoes[ig2].H)+"px','"+(funcoes[ig2].ABRIR)+"','','','Sistemas')";nomeFunc="<a href='#' onclick=\""+abre+"\">"+funcoes[ig2].NOME+"</a>";funcNode=new YAHOO.widget.HTMLNode({html:nomeFunc,expanded:false,enableHighlight:false,isLeaf:true},sisNode)}ig+=1}while(ig<iglt);i3GEO.arvoreDeTemas.ARVORE.draw()};i3GEO.arvoreDeTemas.listaSistemas(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,retorno)}document.getElementById(i3GEO.arvoreDeTemas.IDHTML).style.textAlign="left";if(!i3GEO.arvoreDeTemas.INCLUISISTEMAS){i3GEO.arvoreDeTemas.ARVORE.draw()}},montaGrupos:function(node){var temp=function(){var grupos,c,raiz,nraiz,mostra,html,i,d,editor;grupos=i3GEO.arvoreDeTemas.GRUPOS.grupos;c=grupos.length-3;raiz=grupos[c].temasraiz;nraiz=raiz.length;for(i=0;i<nraiz;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&raiz[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&raiz[i].ogc==="nao"){mostra=false}if(mostra){tempNode=new YAHOO.widget.HTMLNode({isLeaf:false,enableHighlight:false,expanded:false,html:i3GEO.arvoreDeTemas.montaTextoTema("gray",raiz[i])},node)}}for(i=0;i<c;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&grupos[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&grupos[i].ogc==="nao"){mostra=false}if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar subgrupos' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+node.data.idmenu+"&id_grupo="+grupos[i].id_n1+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}if(mostra){if(grupos[i].publicado){if(grupos[i].publicado==="NAO"){grupos[i].nome="<span title='nao publicado' ><s>"+grupos[i].nome+"</s></span>"}}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(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,temp)},montaSubGrupos:function(node){var temp=function(){var i,c,mostra,d,html,tempNode,nraiz,subgrupos,raiz;subgrupos=i3GEO.arvoreDeTemas.SUBGRUPOS.subgrupo;c=subgrupos.length;raiz=i3GEO.arvoreDeTemas.SUBGRUPOS.temasgrupo;nraiz=raiz.length;for(i=0;i<nraiz;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&raiz[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&raiz[i].ogc==="nao"){mostra=false}if(mostra){tempNode=new YAHOO.widget.HTMLNode({nacessos:raiz[i].nacessos,html:i3GEO.arvoreDeTemas.montaTextoTema("gray",raiz[i]),idtema:raiz[i].tid,fonte:raiz[i].link,ogc:raiz[i].ogc,kmz:raiz[i].kmz,permitecomentario:raiz[i].permitecomentario,download:raiz[i].download,expanded:false,enableHighlight:false,isLeaf:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.propTemas,1)}}for(i=0;i<c;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&subgrupos[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&subgrupos[i].ogc==="nao"){mostra=false}if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar temas' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+node.data.idmenu+"&id_grupo="+node.data.idgrupo+"&id_subgrupo="+subgrupos[i].id_n2+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}if(mostra){if(subgrupos[i].publicado){if(subgrupos[i].publicado==="NAO"){subgrupos[i].nome="<span title='nao publicado' ><s>"+subgrupos[i].nome+"</s></span>"}}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(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,node.data.idgrupo,temp)},montaTemas:function(node){var temp=function(){var i,cor,temas,c,mostra,tempNode;temas=i3GEO.arvoreDeTemas.TEMAS.temas;c=temas.length;cor="rgb(51, 102, 102)";for(i=0;i<c;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&temas[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&temas[i].ogc==="nao"){mostra=false}if(mostra){if(temas[i].publicado){if(temas[i].publicado==="NAO"){temas[i].nome="<span title='nao publicado' ><s>"+temas[i].nome+"</s></span>"}}tempNode=new YAHOO.widget.HTMLNode({nacessos:temas[i].nacessos,html:i3GEO.arvoreDeTemas.montaTextoTema(cor,temas[i]),idtema:temas[i].tid,fonte:temas[i].link,ogc:temas[i].ogc,kmz:temas[i].kmz,download:temas[i].download,permitecomentario:temas[i].permitecomentario,bookmark:"sim",expanded:false,isLeaf:false,enableHighlight:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.propTemas,1);cor=(cor==="rgb(51, 102, 102)")?"rgb(47, 70, 50)":"rgb(51, 102, 102)"}}node.loadComplete()};i3GEO.arvoreDeTemas.listaTemas(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,node.data.idgrupo,node.data.idsubgrupo,temp)},montaDir:function(node){var montaLista=function(retorno){var ig,d,conteudo,dirs,tempNode,arquivos,nodeSHP;dirs=retorno.data.diretorios;for(ig=0;ig<dirs.length;ig+=1){tempNode=new YAHOO.widget.HTMLNode({html:dirs[ig],caminho:node.data.caminho+"/"+dirs[ig],expanded:false,enableHighlight:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaDir,1)}arquivos=retorno.data.arquivos;for(ig=0;ig<arquivos.length;ig+=1){conteudo=arquivos[ig];if(conteudo.search(".img")>1||conteudo.search(".tif")>1||conteudo.search(".TIF")>1||conteudo.search(".shp")>1||conteudo.search(".SHP")>1){conteudo="<a href='#' title='"+$trad("g2")+"' onclick='i3GEO.util.adicionaSHP(\""+node.data.caminho+"/"+conteudo+"\")' >"+conteudo+"</a>";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="<td style='"+estilo+"'><span>";if(i3GEO.arvoreDeTemas.TIPOBOTAO!=="download"){html+="<input title='"+tema.tid+"' style='width:12px;height:12px;cursor:pointer;border:solid 0 white;' "}else{html+="<img title='"+tema.tid+"' src='"+$im("down1.gif")+"'"}if(i3GEO.arvoreDeTemas.ATIVATEMA!==""){clique="onclick=\""+i3GEO.arvoreDeTemas.ATIVATEMA+"\""}else{if(i3GEO.arvoreDeTemas.ATIVATEMAIMEDIATO===false){clique="onclick='i3GEO.util.criaBotaoAplicar(\"i3GEO.arvoreDeTemas.adicionaTemas\",\""+$trad("p14")+"\",\"i3geoBotaoAplicar\",this)'"}else{clique="onclick='i3GEO.arvoreDeTemas.adicionaTemas([\""+tema.tid+"\"])'"}}html+=clique;if(i3GEO.arvoreDeTemas.TIPOBOTAO!=="download"){html+=" type='"+i3GEO.arvoreDeTemas.TIPOBOTAO+"' value='"+tema.tid+"' />"}else{html+=" /> "}html+="</td><td title='"+tema.tid+"' onmouseout='javascript:this.style.color=\""+cor+"\";' onmouseover='javascript:this.style.color=\"blue\";' style='cursor:pointer;font-size:11px;text-align:left;color:"+cor+";padding-left:0px;' "+clique+">";html+=tema.nome;html+="</td></span>";return(html)},propTemas:function(node){var d,tempNode,html,lkmini,lkmini1,lkgrcode,lkgrcode1,n,ogc;if(node.data.fonte&&node.data.fonte!==""&&node.data.fonte!==" "){tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' href='"+node.data.fonte+"' target='_blank' >Fonte</a>"},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.mini===true){lkmini=i3GEO.arvoreDeTemas.LOCAPLIC+"/testamapfile.php?map="+node.data.idtema+".map&tipo=mini";lkmini1=i3GEO.arvoreDeTemas.LOCAPLIC+"/testamapfile.php?map="+node.data.idtema+".map&tipo=grande";tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' onmouseover='i3GEO.ajuda.mostraJanela(\"<img src="+lkmini+" />\")' href='"+lkmini1+"' target='blank' >Miniatura</a>"},node)}if(node.data.ogc&&node.data.ogc!=="nao"){if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.kml===true){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.abreKml(\""+node.data.idtema+"\",\"kml\")' >Kml</a>";if(node.data.kmz.toLowerCase()==="sim"){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.abreKml(\""+node.data.idtema+"\",\"kmz\")' >Kml</a>"}tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}ogc=i3GEO.arvoreDeTemas.LOCAPLIC+"/ogc.php?tema="+node.data.idtema+"&service=wms&request=getcapabilities";tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='getcapabilities' href='"+ogc+"' target='blank' >WMS - OGC</a>"},node)}if(node.data.download&&node.data.download.toLowerCase()!=="nao"&&i3GEO.arvoreDeTemas.TIPOBOTAO!=="download"){html="<a href='"+i3GEO.configura.locaplic+"/datadownload.htm?"+node.data.idtema+"' target='_blank'>Download</a>";tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(node.data.permitecomentario&&node.data.permitecomentario!=="nao"&&i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios===true){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.comentario(\""+node.data.idtema+"\",\"comentario\")' >Comentário</a>";tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.qrcode===true){lkgrcode=i3GEO.arvoreDeTemas.LOCAPLIC+"/pacotes/qrcode/php/qr_html.php?d="+i3GEO.arvoreDeTemas.LOCAPLIC+"/mobile/index.php?temasa="+node.data.idtema;lkgrcode1=i3GEO.arvoreDeTemas.LOCAPLIC+"/pacotes/qrcode/php/qr_img.php?d="+i3GEO.arvoreDeTemas.LOCAPLIC+"/mobile/index.php?temasa="+node.data.idtema;tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' onmouseover='i3GEO.ajuda.mostraJanela(\"<img src="+lkgrcode1+" />\")' href='"+lkgrcode+"' target='blank' >Qrcode</a>"},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.estrelas===true){n=parseInt(node.data.nacessos/(i3GEO.arvoreDeTemas.FATORESTRELA*1),10);if(n>=5){n=5}html=(n>0)?"<img src='"+i3GEO.util.$im("e"+n+".png")+"'/>":"<img src='"+i3GEO.util.$im("e0.png")+"'/>";tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.bookmark===true){html=i3GEO.social.bookmark(i3GEO.configura.locaplic+"/ms_criamapa.php?layers="+node.data.idtema);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"),OPCOESADICIONAIS=i3GEO.arvoreDeTemas.OPCOESADICIONAIS;if(OPCOESADICIONAIS.refresh===true){ins+="<td><img class='refresh' onclick='i3GEO.arvoreDeTemas.atualiza()' src='"+imb+"' style='cursor:pointer;text-align:left' title='Refresh'/><td>";t+=20}if(OPCOESADICIONAIS.uploadgpx===true){ins+="<td><img class='uploadgpx' onclick='i3GEO.arvoreDeTemas.dialogo.uploadgpx()' src='"+imb+"' style='cursor:pointer;text-align:left' title='upload GPX'/><td>";t+=20}if(OPCOESADICIONAIS.uploaddbf===true){ins+="<td><img class='uploaddbf' onclick='i3GEO.arvoreDeTemas.dialogo.uploaddbf()' src='"+imb+"' style='cursor:pointer;text-align:left' title='"+$trad("a2b")+"'/><td>";t+=20}if(OPCOESADICIONAIS.uploadlocal===true){ins+="<td><img class='upload' onclick='i3GEO.arvoreDeTemas.dialogo.upload()' src='"+imb+"' style='cursor:pointer;text-align:left' title='"+$trad("a2")+"'/><td>";t+=20}if(OPCOESADICIONAIS.uploadarquivo===true){ins+="<td><img class='upload' onclick='i3GEO.arvoreDeTemas.dialogo.uploadarquivo()' src='"+imb+"' style='cursor:pointer;text-align:left' title='"+$trad("a14")+"'/><td>";t+=20}if(OPCOESADICIONAIS.downloadbase===true){ins+="<td><img onclick='i3GEO.arvoreDeTemas.dialogo.downloadbase()' class='download' src='"+imb+"' style='cursor:pointer;text-align:left' title='"+$trad("a3")+"'/><td>";t+=20}if(OPCOESADICIONAIS.importarwmc===true){ins+="<td><img onclick='i3GEO.arvoreDeTemas.dialogo.importarwmc()' class='importarwmc' src='"+imb+"' style='cursor:pointer;text-align:left' title='"+$trad("a3a")+"'/><td>";t+=20}if(OPCOESADICIONAIS.conectarwms===true){ins+="<td><img class='conectarwms' onclick='i3GEO.arvoreDeTemas.dialogo.conectarwms()' src='"+imb+"' style='cursor:pointer;text-align:left' title='"+$trad("a4")+"'/><td>";t+=20}if(OPCOESADICIONAIS.conectarwmst===true){ins+="<td><img class='conectarwmst' onclick='i3GEO.arvoreDeTemas.dialogo.conectarwmst()' src='"+imb+"' style='cursor:pointer;text-align:left' title='"+$trad("a4b")+"'/><td>";t+=20}if(OPCOESADICIONAIS.conectargeorss===true){ins+="<td><img class='conectargeorss' onclick='i3GEO.arvoreDeTemas.dialogo.conectargeorss()' src='"+imb+"' style='cursor:pointer;text-align:left' title='"+$trad("a5")+"'/><td>";t+=20}if(OPCOESADICIONAIS.nuvemTags===true){ins+="<td><img class='nuvemtags' onclick='i3GEO.arvoreDeTemas.dialogo.nuvemTags()' src='"+imb+"' style='cursor:pointer;text-align:left' title='"+$trad("a5a")+"'/><td>";t+=20}if(OPCOESADICIONAIS.nuvemTagsFlash===true){ins+="<td><img class='nuvemtags' onclick='i3GEO.arvoreDeTemas.dialogo.nuvemTagsFlash()' src='"+imb+"' style='cursor:pointer;text-align:left' title='"+$trad("a5a")+"'/><td>";t+=20}if(OPCOESADICIONAIS.carousel===true){ins+="<td><img class='carouselTemas' onclick='i3GEO.arvoreDeTemas.dialogo.carouselTemas()' src='"+imb+"' style='cursor:pointer;text-align:left' title='Miniaturas'/><td>";t+=20}if(OPCOESADICIONAIS.carregaKml===true){ins+="<td><img class='carregarKml' onclick='i3GEO.arvoreDeTemas.dialogo.carregaKml()' src='"+imb+"' style='cursor:pointer;text-align:left' title='Kml'/><td>";t+=20}return("<table width='"+t+"px' ><tr>"+ins+"</tr></table>")},desativaCheckbox:function(){var o,inputs,n,i;o=document.getElementById(i3GEO.arvoreDeTemas.ARVORE.id);inputs=o.getElementsByTagName("input");n=inputs.length;i=0;do{inputs[i].checked=false;i+=1}while(i<n)},listaTemasAtivos:function(){var o,inputs,n,i,lista;o=document.getElementById(i3GEO.arvoreDeTemas.ARVORE.id);inputs=o.getElementsByTagName("input");n=inputs.length;i=0;lista=[];do{if(inputs[i].checked===true){lista.push(inputs[i].value)}i+=1}while(i<n);return(lista)},buscaTema:function(palavra){if(palavra===""){return}var busca,root,nodePalavra;resultadoProcurar=function(retorno){var mostra,tempNode,d,conta,ig,ngSgrupo,tempn,sg,ngTema,tempng,st,lk;if(!retorno.data){alert("Ocorreu um erro")}else{retorno=retorno.data;conta=0;if((retorno!=="erro")&&(typeof(retorno)!=='undefined')){ig=retorno.length-1;if(ig>=0){do{ngSgrupo=retorno[ig].subgrupos;tempn=ngSgrupo.length;for(sg=0;sg<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'>&nbsp;fonte</a>"}d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>";tempNode=new YAHOO.widget.HTMLNode(d,nodePalavra,false,true);tempNode.isLeaf=true;tempNode.enableHighlight=false}conta+=1}}}while(ig--)}else{d="<span style='color:red'>Nada encontrado<br><br></span>";tempNode=new YAHOO.widget.HTMLNode(d,nodePalavra,false,true);tempNode.isLeaf=true;tempNode.enableHighlight=false}}}nodePalavra.loadComplete()};busca=function(){i3GEO.php.procurartemas2(resultadoProcurar,i3GEO.util.removeAcentos(palavra))};i3GEO.arvoreDeTemas.ARVORE.collapseAll();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(!i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")){tempNode=new YAHOO.widget.HTMLNode({html:"Temas encontrados",id:"temasEncontrados"},root,false,true);tempNode.enableHighlight=false}else{tempNode=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")}nodePalavra=new YAHOO.widget.HTMLNode({html:palavra},tempNode,false,true);nodePalavra.enableHighlight=false;i3GEO.arvoreDeTemas.ARVORE.draw();tempNode.expand();nodePalavra.setDynamicLoad(busca,1);nodePalavra.expand()},buscaTema2:function(palavra){if(palavra===""){return}var busca,root,nodePalavra;resultadoProcurar=function(retorno){var mostra,tempNode,d,ig,montaTexto=function(ngSgrupo){var tempn,ngTema,tempng,mostra,d,lk,tempNode,st,sg;tempn=ngSgrupo.length;for(sg=0;sg<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;try{if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}}catch(e){}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'>&nbsp;fonte</a>"}if(ngSgrupo[sg].subgrupo){d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>"}else{d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].grupo)+")"+lk+"</td>"}tempNode=new YAHOO.widget.HTMLNode({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:"<span style='color:red'>Nada encontrado<br><br></span>"},nodePalavra)}}}nodePalavra.loadComplete()};busca=function(){i3GEO.php.procurartemas2(resultadoProcurar,i3GEO.util.removeAcentos(palavra))};i3GEO.arvoreDeTemas.ARVORE.collapseAll();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(!i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")){tempNode=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:"Temas encontrados",id:"temasEncontrados"},root)}else{tempNode=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")}nodePalavra=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:palavra},tempNode);i3GEO.arvoreDeTemas.ARVORE.draw();tempNode.expand();nodePalavra.setDynamicLoad(busca,1);nodePalavra.expand()},adicionaTemas:function(tsl){var temp;try{clearTimeout(tempoBotaoAplicar)}catch(e){}tempoBotaoAplicar="";i3GEO.mapa.ativaTema("");if(arguments.length!==1){tsl=i3GEO.arvoreDeTemas.listaTemasAtivos()}if(tsl.length===1&&i3GEO.arvoreDeCamadas.pegaTema(tsl[0])!==""){temp=window.confirm("O tema já existe no mapa. Adiciona novamente?");if(!temp){return}}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="<select id='"+idCombo+"' SIZE="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(this.value)' ><option value='' >Escolha um menu:</option>";for(ig=0;ig<ob.length;ig+=1){if(ob[ig].publicado!=="nao"&&ob[ig].publicado!=="NAO"){if(ob[ig].nomemenu){ins+="<option value="+ob[ig].idmenu+" >"+ob[ig].nomemenu+"</option>"}}}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistademenus(combo)},comboGruposMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura,id_menu){i3GEO.configura.locaplic=locaplic;i3GEO.arvoreDeTemas.temasRaizGrupos=[];var combo=function(retorno){var ins,ig,obGrupos=retorno.data;ins="<select id='"+idCombo+"' SIZE="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(this.value)' ><option value='' >Escolha um grupo:</option>";for(ig=0;ig<obGrupos.grupos.length;ig+=1){if(obGrupos.grupos[ig].nome){ins+="<option value="+obGrupos.grupos[ig].id_n1+" >"+obGrupos.grupos[ig].nome+"</option>"}i3GEO.arvoreDeTemas.temasRaizGrupos[obGrupos.grupos[ig].id_n1]=obGrupos.grupos[ig].temasgrupo}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistadegrupos(combo,id_menu,"nao")},comboSubGruposMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,idGrupo,largura,altura){if(idGrupo!==""){var combo=function(retorno){var ins,sg,ig;ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(\""+idGrupo+"\",this.value)' ><option value='' >Escolha um sub-grupo:</option>";if(retorno.data.subgrupo){sg=retorno.data.subgrupo;for(ig=0;ig<sg.length;ig+=1){ins+="<option value="+sg[ig].id_n2+" >"+sg[ig].nome+"</option>"}}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistadeSubgrupos(combo,"",idGrupo)}},comboTemasMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,idGrupo,idSubGrupo,largura,altura,id_menu,temas){var combo=function(retorno){var ins,sg,ig,temas;if(idSubGrupo!=""){ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"("+idGrupo+","+idSubGrupo+",this.value)' ><option value='' >Escolha um tema:</option>"}else{ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"("+idGrupo+",\"\",this.value)' ><option value='' >Escolha um tema:</option>"}if(typeof(retorno.data)!=='undefined'){retorno=retorno.data.temas}sg=retorno.length;for(ig=0;ig<sg;ig+=1){ins+="<option value="+retorno[ig].tid+" >"+retorno[ig].nome+"</option>"}$i(idDestino).innerHTML=ins+"</select>"};if(typeof(temas)==='undefined'||temas===""){i3GEO.php.pegalistadetemas(combo,id_menu,idGrupo,idSubGrupo)}else{combo(temas)}},dialogo:{uploadarquivo:function(){var janela,ins,temp,titulo,cabecalho,minimiza;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOFuploadarquivo")};titulo="Upload de arquivo</a>";janela=i3GEO.janela.cria("250px","150px","","","",titulo,"i3GEOFuploadarquivo",false,"hd",cabecalho,minimiza);$i("i3GEOFuploadarquivo_corpo").style.backgroundColor="white";ins=""+" <p class=paragrafo style='width:90%' ><b>Tipo de arquivo</b><br><br>"+" <table class=lista6 style=left:20px;position:relative >"+" <tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.upload()' /></td>"+" <td>Shape file</td>"+" </tr>"+" <tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.uploaddbf()' /></td>"+" <td>DBF ou CSV</td>"+" </tr>"+" <tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.uploadgpx()' /></td>"+" <td>GPX</td>"+" </tr>"+" <tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.uploadkml()' /></td>"+" <td>KML ou KMZ</td>"+" </tr>"+" </table>";$i(janela[2].id).innerHTML=ins},carregaKml:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/carregakml/index.js.php","i3GEOF.carregakml.criaJanelaFlutuante()","i3GEOF.carregakml_script")},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&oacute;rios")},importarwmc:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/importarwmc/index.js.php","i3GEOF.importarwmc.criaJanelaFlutuante()","i3GEOF.importarwmc_script")},conectarwms:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwms/index.htm","","","Conexão WMS <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=28' >&nbsp;&nbsp;&nbsp;</a>")},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 <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=76' >&nbsp;&nbsp;&nbsp;</a>")},conectarwfs:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwfs/index.htm","","","WFS")},conectargeorss:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectargeorss/index.htm","","","Conexão GeoRSS <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=29' >&nbsp;&nbsp;&nbsp;</a>")},upload:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/upload/index.js.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")},uploadkml:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/uploadkml/index.js.php","i3GEOF.uploadkml.criaJanelaFlutuante()","i3GEOF.uploadkml_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)}};
374   -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.barraDeBotoes={TIPO:"yui",OFFSET:-205,AJUDA:true,ORIENTACAO:"vertical",HORIZONTALW:350,TIPOAJUDA:"balao",SOICONES:false,AUTOALTURA:false,TRANSICAOSUAVE:true,OPACIDADE:65,PERMITEFECHAR:true,PERMITEDESLOCAR:true,ATIVAMENUCONTEXTO:false,AUTO:false,LISTABOTOES:i3GEO.configura.funcoesBotoes.botoes,INCLUIBOTAO:{zoomli:true,pan:true,zoomtot:true,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},ICONEBOTAO:{zoomli:"/imagens/gisicons/eudock/zoom-region.png",pan:"/imagens/gisicons/eudock/pan.png",zoomtot:"/imagens/gisicons/eudock/zoom-extent.png",identifica:"/imagens/gisicons/eudock/identify.png",identificaBalao:"/imagens/gisicons/eudock/tips.png",mede:"/imagens/gisicons/eudock/length-measure.png",area:"/imagens/gisicons/eudock/area-measure.png",imprimir:"/imagens/gisicons/eudock/print.png",reinicia:"/imagens/gisicons/eudock/redraw.png",exten:"/imagens/gisicons/eudock/map-extent-info.png",referencia:"/imagens/gisicons/eudock/map-reference.png",inserexy:"/imagens/gisicons/eudock/point-create.png",textofid:"/imagens/gisicons/eudock/text-add.png",selecao:"/imagens/gisicons/eudock/select.png",google:"/imagens/gisicons/eudock/google-map.png",buscafotos:"/imagens/gisicons/eudock/fotos.png",wiki:"/imagens/gisicons/eudock/wiki.png",metar:"/imagens/gisicons/eudock/metar.png",lentei:"/imagens/gisicons/eudock/lente.png",confluence:"/imagens/gisicons/eudock/confluence.png",inseregrafico:"/imagens/gisicons/eudock/grafico.png",v3d:"/imagens/gisicons/eudock/v3d.png"},TEMPLATEBOTAO:"",BOTAOPADRAO:"pan",COMPORTAMENTO:"padrao",BARRAS:[],BOTAOCLICADO:"",ativaPadrao:function(){try{$i(i3GEO.barraDeBotoes.BOTAOPADRAO).onclick.apply()}catch(e){}},ativaIcone:function(icone){if(i3GEO.Interface.ATUAL==="openlayers"){try{i3GEO.Interface.openlayers.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"}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(e){i3GEO.barraDeBotoes.mostraJanela(this,"'+l[b].dica+'",e);}');eval('$i("'+l[b].iddiv+'").onmouseout = function(e){i3GEO.barraDeBotoes.mostraJanela(this,"",e);};')}if(l[b].funcaoonclick){temp.onclick=l[b].funcaoonclick;if(l[b].iddiv==padrao){l[b].funcaoonclick()}}if(l[b].constroiconteudo){eval(l[b].constroiconteudo)}}YAHOO.util.Event.addListener($i(l[b].iddiv),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addListener($i(l[b].iddiv),"click",YAHOO.util.Event.stopPropagation);YAHOO.util.Event.addFocusListener($i(l[b].iddiv),YAHOO.util.Event.preventDefault)}while(b--)}if(padrao===""){this.ativaIcone("")}},execBotao:function(id,x,y){var l,b,d,temp,n=38;i3GEO.barraDeBotoes.BOTAOCLICADO=id;l=i3GEO.barraDeBotoes.LISTABOTOES;b=l.length-1;if(b>=0){do{temp=l[b].iddiv;if(temp===id){try{if(l[b].tipo==="dinamico"){i3GEO.util.criaPin("i3geoMarcaIcone",i3GEO.configura.locaplic+"/imagens/gisicons/eudock/sobe1.png","10px","10px");temp=$i("i3geoMarcaIcone");temp.style.display="block"temp.style.top=(parseInt(y/n,10)*n)+40;temp.style.left=(parseInt(x/n,10)*n)+25}if(l[b].funcaoonclick){l[b].funcaoonclick.call();return}}catch(e){}}}while(b--)}},inicializaBarraOP:function(){euEnv.imageBasePath=i3GEO.configura.locaplic+"/pacotes/eudock/";var i,dock=new euDock(),temp="",chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length;dock.setObjectAlign(i3GEO.Interface.IDCORPO,euDOWN,(parseInt(document.body.style.height,10))*-1+i3GEO.barraDeBotoes.OFFSET,euUP);dock.setBar({left:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-l.png"}},horizontal:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-c-o.gif"}},right:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-r.png"}}});dock.setIconsOffset(5);for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]}}),{mouseInsideClick:function(x,y,id){i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao,x,y)},idBotao:chaves[i]})}}},inicializaBarra:function(idconteudo,idconteudonovo,barraZoom,x,y,onde){if(i3GEO.configura.map3d===""){i3GEO.barraDeBotoes.INCLUIBOTAO.v3d=false}if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){i3GEO.barraDeBotoes.inicializaBarraOP()}else{if(this.TEMPLATEBOTAO===""&&i3GEO.Interface.TABLET===false){this.TEMPLATEBOTAO="<div style='display:inline;background-color:rgb(250,250,250);'><img style='border:0px solid white;' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='$$'/></div>"}if(this.TEMPLATEBOTAO===""&&i3GEO.Interface.TABLET===true){this.TEMPLATEBOTAO="<div style='display:inline;background-color:rgb(250,250,250);'><img style='margin:4px;border:0px solid white;' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='$$'/></div>"}var ticone,tipo,mostra,i,temp,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(navm){i3GEO.barraDeBotoes.TRANSICAOSUAVE=false}if(this.AUTO===true){if(idconteudo==="barraDeBotoes1"){novoel=document.createElement("div");novoel.id="barraDeBotoes1";temp='<table style="width:100%"><tr><td style="background-color:rgb(250,250,250);"><div ID="historicozoom" ></div></td></tr><tr><td style=height:5px ></td></tr></table>'+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="zoom" alt="zoom" src="'+branco+'" id="zoomli"/>'+"</div>"+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="desloca" alt="desloca" src="'+branco+'" id="pan"/>'+"</div>"+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="geral" alt="geral" src="'+branco+'" id="zoomtot"/>'+"</div>";novoel.innerHTML=temp;document.body.appendChild(novoel)}if(idconteudo==="barraDeBotoes2"){temp="";chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO);n=chaves.length;for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){temp+=i3GEO.barraDeBotoes.TEMPLATEBOTAO.replace("$$",chaves[i])}}if(typeof(onde)==='undefined'){novoel=document.createElement("div");novoel.id="barraDeBotoes2";estilo="font-size:2px;";if(this.SOICONES===true){estilo="font-size:0px;"}novoel.innerHTML="<table style='width:100%'>"+"<tr><td style='background-color:rgb(250,250,250);'><img title='' alt='sobe' src='"+branco+"' id='sobeferramentas'/></td></tr>"+"</table>"+temp+"<table style='width:100%;'><tr><td style='background-color:rgb(250,250,250);'><img title='desce' alt='' src='"+branco+"' id='desceferramentas'/></td></tr></table>";document.body.appendChild(novoel)}else{$i(onde).innerHTML=temp;return}}}else{if(idconteudo==="barraDeBotoes2"&&onde!==undefined){$i(onde).innerHTML=$i(idconteudo)}}wj="36px";recuo="0px";novoel=document.createElement("div");novoel.id=idconteudonovo;novoel.style.display="block";if(this.SOICONES===false){novoel.style.border="1px solid gray";novoel.style.background="white"}else{novoel.style.border="0px solid white"}if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){Dom.setStyle(novoel,"opacity",this.OPACIDADE/100)}temp="";if(barraZoom===true){temp+=i3GEO.navega.barraDeZoom.cria()}temp+='<div id="'+idconteudonovo+'_" style="left:'+recuo+';top:0px;" ></div>';novoel.innerHTML=temp;novoel.onmouseover=function(){YAHOO.util.Dom.setStyle("i3geo_rosa","display","none");if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",1)}if(i3GEO.Interface.TABLET===true){}};novoel.onmouseout=function(){if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.barraDeBotoes.OPACIDADE/100)}if(i3GEO.Interface.TABLET===true){}};document.body.appendChild(novoel);if(this.ATIVAMENUCONTEXTO){i3GEO.util.mudaCursor(i3GEO.configura.cursores,"contexto",idconteudonovo,i3GEO.configura.locaplic)}ticone=28;alturadisponivel=i3GEO.parametros.h-i3GEO.Interface.BARRABOTOESTOP-ticone-38-38;if(this.AUTOALTURA===true){alturadisponivel+=28}numerobotoes=parseInt(alturadisponivel/ticone,10);if($i(idconteudo)){$i(idconteudonovo+"_").innerHTML=$i(idconteudo).innerHTML;$i(idconteudo).innerHTML="";elementos=$i(idconteudonovo+"_").getElementsByTagName("img");nelementos=elementos.length;if(i3GEO.barraDeBotoes.ORIENTACAO==="horizontal"){numerobotoes=100}if(this.AUTOALTURA===true||(numerobotoes<nelementos)){if(elementos[0].id==="sobeferramentas"){try{elementos=$i(idconteudonovo+"_").getElementsByTagName("div");nelementos=elementos.length;i=0;do{elementos[i].style.display="none";i=i+1}while(i<nelementos);i=0;do{if(elementos[i]!=undefined){elementos[i].style.display="inline"}i=i+1}while(i<numerobotoes-1)}catch(men){}}}if(elementos.length<=numerobotoes){Dom.setStyle(["sobeferramentas","desceferramentas"],"display","none")}}YAHOO.namespace("janelaBotoes.xp");if(i3GEO.barraDeBotoes.ORIENTACAO==="horizontal"){YAHOO.janelaBotoes.xp.panel=new YAHOO.widget.Panel(idconteudonovo,{zIndex:20000,height:40,width:i3GEO.barraDeBotoes.HORIZONTALW,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}else{if(this.AUTOALTURA===false||barraZoom===true||(elementos.length>numerobotoes)){YAHOO.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<nelementos);mostra.style.display="inline";i=nelementos+1;mostra=elementos[i];do{if(elementos[i]){if(elementos[i].style){if(elementos[i].style.display==="inline"){mostra=elementos[i];break}}}i=i-1}while(i>=0);mostra.style.display="none"}}}if($i("desceferramentas")){$i("desceferramentas").onclick=function(){tipo="inline";if($i(idconteudonovo+"_")){elementos=$i(idconteudonovo+"_").getElementsByTagName("div");if(elementos[elementos.length-1].style.display===tipo){return}nelementos=elementos.length;if(nelementos>0){i=0;do{e=elementos[i];if(e.style){if((e.style.display==="block")||(e.style.display==="inline")||(e.style.display==="")){if(e.id===""){e.style.display="none";break}}}i=i+1}while(i<nelementos);i=nelementos-1;var mostra=elementos[i];do{e=elementos[i];if(e.style){if(e.style.display===tipo){break}if(e.style.display==="none"){mostra=e}}i=i-1}while(i>=0);mostra.style.display=tipo}}}}this.BARRAS.push(YAHOO.janelaBotoes.xp.panel);YAHOO.janelaBotoes.xp.panel.show();if(i3GEO.Interface.TABLET===true){YAHOO.janelaBotoes.xp.panel.moveTo((i3GEO.parametros.w/2)-(i3GEO.barraDeBotoes.HORIZONTALW/2),"")}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:"&nbsp;<span class='container-close'></span>"},{text:"Fechar barra",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.fecha('"+idbarra+"')"}},{text:"Barra normal",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.AUTOALTURA=false;i3GEO.barraDeBotoes.PERMITEFECHAR=true;i3GEO.barraDeBotoes.PERMITEDESLOCAR=true;i3GEO.barraDeBotoes.recria('"+idbarra+"')"}},{text:"Barra fixa",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.AUTOALTURA=true;i3GEO.barraDeBotoes.PERMITEFECHAR=false;i3GEO.barraDeBotoes.PERMITEDESLOCAR=false;i3GEO.barraDeBotoes.recria('"+idbarra+"')"}},{text:"Remove transiçã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;i<n;i+=1){i3GEO.barraDeBotoes.BARRAS[i].show()}};try{if(arguments.length===1){i3GEO.barraDeBotoes.BARRAS[indice].show()}else{abre.call()}}catch(e){abre.call()}},recria:function(id){var n,temp,novoel,barraZoom,x,y,BARRAS=i3GEO.barraDeBotoes.BARRAS,iu=i3GEO.util;i3GEO.barraDeBotoes.BARRAS=[];n=BARRAS.length;for(i=0;i<n;i+=1){if(BARRAS[i].id===id){iu.removeChild("contexto_"+id);if(!$i("barraTemporaria"+i)){novoel=document.createElement("div");novoel.id="barraTemporaria"+i;document.body.appendChild(novoel)}novoel=$i("barraTemporaria"+i);novoel.innerHTML=$i(BARRAS[i].id+"_").innerHTML;barraZoom=false;temp=$i("vertMaisZoom");if(temp){temp=navm?temp.parentNode:temp.parentNode.parentNode;if(temp.id===id){barraZoom=true}}x=parseInt($i(BARRAS[i].id+"_c").style.left,10);y=parseInt($i(BARRAS[i].id+"_c").style.top,10);if(i3GEO.barraDeBotoes.PERMITEFECHAR===true){y=y-10}BARRAS[i].destroy();i3GEO.barraDeBotoes.inicializaBarra(novoel.id,BARRAS[i].id,barraZoom,x,y)}}i3GEO.barraDeBotoes.ativaBotoes()},fecha:function(id){var n=this.BARRAS.length;for(i=0;i<n;i+=1){if(this.BARRAS[i].id===id){$i(id+"_c").style.visibility="hidden"}}},mostraJanela:function(objeto,mensagem,evt){if(mensagem===""){try{clearTimeout(timeMostraAjudaBotoes)}catch(e){};return}var divmensagem=$i("divMensagemBarraDeBotoes"),balloonAjuda,pos=YAHOO.util.Dom.getXY(objeto);if(this.AJUDA===false||$i("janelaMenTexto")){i3GEO.ajuda.mostraJanela(mensagem);i3GEO.barraDeBotoes.escondeJanelaAjuda();return}if(i3GEO.Interface.ATUAL==="googleearth"){objeto.title=mensagem;return}if(!divmensagem&&this.TIPOAJUDA!=="balao"){divmensagem=document.createElement("div");divmensagem.id="divMensagemBarraDeBotoes";divmensagem.style.border="0px solid rgb(120 120 120)";divmensagem.style.position="absolute";divmensagem.style.zIndex=20000;if($i("i3geo")){$i("i3geo").appendChild(divmensagem)}else{document.body.appendChild(divmensagem)}if(this.TIPOAJUDA==="horizontal"){divmensagem.innerHTML="<table style='z-index:20000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='"+$im("left.png")+"' ></td><td style='text-align:left;border-left:1px solid rgb(210,210,210)'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'></div></td></tr></table>"}if(this.TIPOAJUDA==="vertical"){divmensagem.innerHTML="<table style='z-index:20000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='"+$im("top.png")+"' ></td><td style='text-align:left;border-left:1px solid rgb(210,210,210)'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'></div></td></tr></table>"}}if(mensagem!==""){if(this.TIPOAJUDA!=="balao"){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none");if(this.TIPOAJUDA==="horizontal"){divmensagem.style.left=parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)+pos[0]+10+"px";divmensagem.style.top=pos[1]-2+(parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)/2)+"px"}if(this.TIPOAJUDA==="vertical"){divmensagem.style.left=(parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)/2)+pos[0]-5+"px";divmensagem.style.top=pos[1]+5+parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)+"px"}try{clearTimeout(timeAjudaBotoes)}catch(e){}timeMostraAjudaBotoes=setTimeout("i3GEO.barraDeBotoes.mostraJanelaAjuda('"+mensagem+"');",5000)}else{hideAllTooltips();balloonAjuda=new Balloon();BalloonConfig(balloonAjuda,'GBubble');balloonAjuda.delayTime=0;balloonAjuda.stem=false;balloonAjuda.stemHeight=0;balloonAjuda.vOffset=-24;balloonAjuda.images=i3GEO.configura.locaplic+'/pacotes/balloon-tooltips/htdocs/images/GBubblec';mensagem="<table style='z-index:20000' ><tr><td style='text-align:left;'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'>"+mensagem+"</div></td></tr></table>";try{clearTimeout(timeAjudaBotoes)}catch(e){}timeMostraAjudaBotoes=setTimeout(function(){balloonAjuda.cleanup();balloonIsVisible=false;balloonAjuda.showTooltip(objeto,mensagem,null,null,null,pos[0]+12,pos[1]);try{clearTimeout(timeMostraAjudaBotoes)}catch(e){}timeAjudaBotoes=setTimeout(function(){balloonAjuda.cleanup()},4000)},4000)}}},mostraJanelaAjuda:function(mensagem){$i("divMensagemBarraDeBotoesCorpo").innerHTML=mensagem;YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","block");try{clearTimeout(timeMostraAjudaBotoes)}catch(e){}timeAjudaBotoes=setTimeout(function(){i3GEO.barraDeBotoes.escondeJanelaAjuda()},3000)},escondeJanelaAjuda:function(){try{clearTimeout(timeAjudaBotoes)}catch(e){}if($i("divMensagemBarraDeBotoes")){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none")}},editor:{inicia:function(){if(navm){alert("O editor não funciona corretamente nesse navegador.")}i3GEO.barraDeBotoes.editor.carregaJs()},carregaJs:function(idjanela){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/mashups/openlayers.js.php","i3GEO.barraDeBotoes.editor.ativaPainel('"+idjanela+"')","openlayers.js.php",true)},criaJanela:function(){if($i("i3GEOjanelaEditor")){return"i3GEOjanelaEditor"}var janela,divid,temp,titulo,cabecalho,minimiza;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOjanelaEditor")};titulo="Editor vetorial";janela=i3GEO.janela.cria("300px","200px","","","",titulo,"i3GEOjanelaEditor",false,"hd",cabecalho,minimiza);divid=janela[2].id;$i("i3GEOjanelaEditor_corpo").style.backgroundColor="white";$i("i3GEOjanelaEditor_corpo").style.textAlign="left";return divid},ativaPainel:function(idjanela){OpenLayers.ImgPath=i3GEO.configura.locaplic+"/pacotes/openlayers/img/";i3GEO.editorOL.fundo="";i3GEO.editorOL.mapa=i3geoOL;i3GEO.editorOL.maxext="";i3GEO.editorOL.controles=[];i3GEO.editorOL.botoes={'pan':false,'zoombox':false,'zoomtot':false,'legenda':false,'distancia':false,'area':false,'identifica':true,'linha':true,'ponto':true,'poligono':true,'texto':true,'edita':true,'selecao':true,'apaga':true,'procura':false,'propriedades':true,'salva':true,'ajuda':true,'fecha':true,'tools':true,'undo':true,'frente':true};var sketchSymbolizers={"Point":{fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}",strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",label:"${texto}",pointRadius:"${pointRadius}",graphicName:"${graphicName}",fontSize:"${fontSize}",fontColor:"rgb(${fontColor})",fontFamily:"Arial",fontWeight:"normal",labelAlign:"lb",labelXOffset:"3",labelYOffset:"3"},"Line":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})"},"Polygon":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}"}},style=new OpenLayers.Style(),styleMap1=new OpenLayers.StyleMap({"default":style});style.addRules([new OpenLayers.Rule({symbolizer:sketchSymbolizers})]);i3GEO.editorOL.layergrafico=new OpenLayers.Layer.Vector("Edição",{styleMap:styleMap1,displayInLayerSwitcher:false,visibility:true});i3GEO.editorOL.mapa.addLayers([i3GEO.editorOL.layergrafico]);i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}}};
375   -function RichDrawEditor(elem,renderer){this.container=elem;this.gridX=10;this.gridY=10;this.mouseDownX=0;this.mouseDownY=0;this.mode='';this.fillColor='';this.lineColor='';this.lineWidth='';this.circColor='';this.textColor='';this.selected=null;this.selectedBounds={x:0,y:0,width:0,height:0};this.onselect=function(){};this.onunselect=function(){};this.renderer=renderer;this.renderer.init(this.container);this.fecha=function(){elem.innerHTML="";elem.style.display="none"}}RichDrawEditor.prototype.clearWorkspace=function(){this.container.innerHTML=''};RichDrawEditor.prototype.deleteSelection=function(){if(this.selected){this.renderer.remove(this.container.ownerDocument.getElementById('tracker'));this.renderer.remove(this.selected);this.selected=null}};RichDrawEditor.prototype.select=function(elem){if(elem==this.selected)return;this.selected=elem;this.renderer.showTracker(this.selected);this.onselect(this)};RichDrawEditor.prototype.unselect=function(){if(this.selected){this.renderer.remove(this.container.ownerDocument.getElementById('tracker'));this.selected=null;this.onunselect(this)}};RichDrawEditor.prototype.getSelectedElement=function(){return this.selected};RichDrawEditor.prototype.setGrid=function(horizontal,vertical){this.gridX=horizontal;this.gridY=vertical};RichDrawEditor.prototype.editCommand=function(cmd,value){if(cmd=='mode'){this.mode=value}else if(this.selected==null){if(cmd=='fillcolor'){this.fillColor=value}else if(cmd=='linecolor'){this.lineColor=value}else if(cmd=='textcolor'){this.textColor=value}else if(cmd=='circcolor'){this.circColor=value}else if(cmd=='linewidth'){this.lineWidth=parseInt(value)+'px'}}else{this.renderer.editCommand(this.selected,cmd,value)}};RichDrawEditor.prototype.queryCommand=function(cmd){if(cmd=='mode'){return this.mode}else if(this.selected==null){if(cmd=='fillcolor'){return this.fillColor}else if(cmd=='linecolor'){return this.lineColor}else if(cmd=='textcolor'){return this.textColor}else if(cmd=='circcolor'){return this.circColor}else if(cmd=='linewidth'){return this.lineWidth}}else{return this.renderer.queryCommand(this.selected,cmd)}};RichDrawEditor.prototype.onSelectStart=function(event){return false};RichDrawEditor.prototype.onClick=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;if(this.mode!='select'){this.unselect();this.mouseDownX=snappedX;this.mouseDownY=snappedY;this.selected=this.renderer.create(this.mode,this.fillColor,this.lineColor,this.lineWidth,this.mouseDownX,this.mouseDownY,1,1);this.selected.id='shape:'+createUUID();Event.observe(this.selected,"mousemove",this.onHitListener);Event.observe(this.container,"mousemove",this.onDrawListener)}else{if(this.mouseDownX!=snappedX||this.mouseDownY!=snappedY)this.unselect()}return false};RichDrawEditor.prototype.onMouseDown=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;if(this.mode!='select'){this.unselect();this.mouseDownX=snappedX;this.mouseDownY=snappedY;this.selected=this.renderer.create(this.mode,this.fillColor,this.lineColor,this.lineWidth,this.mouseDownX,this.mouseDownY,1,1);this.selected.id='shape:'+createUUID();Event.observe(this.selected,"mousedown",this.onHitListener);Event.observe(this.container,"mousemove",this.onDrawListener)}else{if(this.mouseDownX!=snappedX||this.mouseDownY!=snappedY)this.unselect()}return false};RichDrawEditor.prototype.onMouseUp=function(event){Event.stopObserving(this.container,"mouseup",this.onDrawListener);Event.stopObserving(this.container,"mouseup",this.onDragListener);if(this.mode!='select'){this.selected=null}};RichDrawEditor.prototype.onDrag=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;var deltaX=snappedX-this.mouseDownX;var deltaY=snappedY-this.mouseDownY;this.renderer.move(this.selected,this.selectedBounds.x+deltaX,this.selectedBounds.y+deltaY);this.renderer.showTracker(this.selected)};RichDrawEditor.prototype.onResize=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;var deltaX=snappedX-this.mouseDownX;var deltaY=snappedY-this.mouseDownY;this.renderer.track(handle,deltaX,deltaY);show_tracker()};RichDrawEditor.prototype.onDraw=function(event){if(this.selected==null)return;var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;this.renderer.resize(this.selected,this.mouseDownX,this.mouseDownY,snappedX,snappedY)};RichDrawEditor.prototype.onHit=function(event){if(this.mode=='select'){this.select(Event.element(event));this.selectedBounds=this.renderer.bounds(this.selected);var offset=Position.cumulativeOffset(this.container);this.mouseDownX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;this.mouseDownY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;Event.observe(this.container,"mousemove",this.onDragListener)}};function createUUID(){return[4,2,2,2,6].map(function(length){var uuidpart="";for(var i=0;i<length;i++){var uuidchar=parseInt((Math.random()*256)).toString(16);if(uuidchar.length==1)uuidchar="0"+uuidchar;uuidpart+=uuidchar}return uuidpart}).join('-')}function AbstractRenderer(){};AbstractRenderer.prototype.init=function(elem){};AbstractRenderer.prototype.bounds=function(shape){return{x:0,y:0,width:0,height:0}};AbstractRenderer.prototype.create=function(shape,fillColor,lineColor,lineWidth,left,top,width,height,texto){};AbstractRenderer.prototype.remove=function(shape){};AbstractRenderer.prototype.move=function(shape,left,top){};AbstractRenderer.prototype.track=function(shape){};AbstractRenderer.prototype.resize=function(shape,fromX,fromY,toX,toY){};AbstractRenderer.prototype.editCommand=function(shape,cmd,value){};AbstractRenderer.prototype.queryCommand=function(shape,cmd){};AbstractRenderer.prototype.showTracker=function(shape){};AbstractRenderer.prototype.getMarkup=function(){return null};
376   -function SVGRenderer(){this.base=AbstractRenderer;this.svgRoot=null}SVGRenderer.prototype=new AbstractRenderer;SVGRenderer.prototype.init=function(elem){this.container=elem;this.container.style.MozUserSelect='none';var svgNamespace='http://www.w3.org/2000/svg';this.svgRoot=this.container.ownerDocument.createElementNS(svgNamespace,"svg");this.container.appendChild(this.svgRoot)};SVGRenderer.prototype.bounds=function(shape){var rect=new Object();var box=shape.getBBox();rect['x']=box.x;rect['y']=box.y;rect['width']=box.width;rect['height']=box.height;return rect};SVGRenderer.prototype.create=function(shape,fillColor,lineColor,lineWidth,left,top,width,height,texto){var svgNamespace='http://www.w3.org/2000/svg';var svg;if(shape=='rect'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'rect');svg.setAttributeNS(null,'x',left+'px');svg.setAttributeNS(null,'y',top+'px');svg.setAttributeNS(null,'width',width+'px');svg.setAttributeNS(null,'height',height+'px')}else if(shape=='ellipse'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'ellipse');svg.setAttributeNS(null,'cx',(left+width/2)+'px');svg.setAttributeNS(null,'cy',(top+height/2)+'px');svg.setAttributeNS(null,'rx',(width/2)+'px');svg.setAttributeNS(null,'ry',(height/2)+'px')}else if(shape=='circ'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'ellipse');svg.setAttributeNS(null,'cx',left+'px');svg.setAttributeNS(null,'cy',top+'px');svg.setAttributeNS(null,'rx',width+'px');svg.setAttributeNS(null,'ry',width+'px')}else if(shape=='roundrect'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'rect');svg.setAttributeNS(null,'x',left+'px');svg.setAttributeNS(null,'y',top+'px');svg.setAttributeNS(null,'rx','20px');svg.setAttributeNS(null,'ry','20px');svg.setAttributeNS(null,'width',width+'px');svg.setAttributeNS(null,'height',height+'px')}else if(shape=='line'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'line');svg.setAttributeNS(null,'x1',left+'px');svg.setAttributeNS(null,'y1',top+'px');svg.setAttributeNS(null,'x2',width+'px');svg.setAttributeNS(null,'y2',height+'px')}else if(shape=='text'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'text');var n=this.container.ownerDocument.createTextNode(texto);svg.appendChild(n);svg.setAttributeNS(null,'x',left+'px');svg.setAttributeNS(null,'y',top+'px');svg.setAttributeNS(null,'font-size','12px')}svg.style.position='absolute';if(fillColor.length==0)fillColor='none';svg.setAttributeNS(null,'fill',fillColor);if(lineColor.length==0)lineColor='none';svg.setAttributeNS(null,'stroke',lineColor);svg.setAttributeNS(null,'stroke-width',lineWidth);this.svgRoot.appendChild(svg);return svg};SVGRenderer.prototype.remove=function(shape){shape.parentNode.removeChild(shape)};SVGRenderer.prototype.move=function(shape,left,top){if(shape.tagName=='line'){var deltaX=shape.getBBox().width;var deltaY=shape.getBBox().height;shape.setAttributeNS(null,'x1',left);shape.setAttributeNS(null,'y1',top);shape.setAttributeNS(null,'x2',left+deltaX);shape.setAttributeNS(null,'y2',top+deltaY)}else if(shape.tagName=='ellipse'){shape.setAttributeNS(null,'cx',left+(shape.getBBox().width/2));shape.setAttributeNS(null,'cy',top+(shape.getBBox().height/2))}else{shape.setAttributeNS(null,'x',left);shape.setAttributeNS(null,'y',top)}};SVGRenderer.prototype.track=function(shape){};SVGRenderer.prototype.resize=function(shape,fromX,fromY,toX,toY){var deltaX=toX-fromX;var deltaY=toY-fromY;if(shape.tagName=='line'){shape.setAttributeNS(null,'x2',toX);shape.setAttributeNS(null,'y2',toY)}else if(shape.tagName=='ellipse'){if(deltaX<0){shape.setAttributeNS(null,'cx',(fromX+deltaX/2)+'px');shape.setAttributeNS(null,'rx',(-deltaX/2)+'px')}else{shape.setAttributeNS(null,'cx',(fromX+deltaX/2)+'px');shape.setAttributeNS(null,'rx',(deltaX/2)+'px')}if(deltaY<0){shape.setAttributeNS(null,'cy',(fromY+deltaY/2)+'px');shape.setAttributeNS(null,'ry',(-deltaY/2)+'px')}else{shape.setAttributeNS(null,'cy',(fromY+deltaY/2)+'px');shape.setAttributeNS(null,'ry',(deltaY/2)+'px')}}else{if(deltaX<0){shape.setAttributeNS(null,'x',toX+'px');shape.setAttributeNS(null,'width',-deltaX+'px')}else{shape.setAttributeNS(null,'width',deltaX+'px')}if(deltaY<0){shape.setAttributeNS(null,'y',toY+'px');shape.setAttributeNS(null,'height',-deltaY+'px')}else{shape.setAttributeNS(null,'height',deltaY+'px')}}};SVGRenderer.prototype.editCommand=function(shape,cmd,value){if(shape!=null){if(cmd=='fillcolor'){if(value!='')shape.setAttributeNS(null,'fill',value);else shape.setAttributeNS(null,'fill','none')}else if(cmd=='linecolor'){if(value!='')shape.setAttributeNS(null,'stroke',value);else shape.setAttributeNS(null,'stroke','none')}else if(cmd=='linewidth'){shape.setAttributeNS(null,'stroke-width',parseInt(value)+'px')}}};SVGRenderer.prototype.queryCommand=function(shape,cmd){var result='';if(shape!=null){if(cmd=='fillcolor'){result=shape.getAttributeNS(null,'fill');if(result=='none')result=''}else if(cmd=='linecolor'){result=shape.getAttributeNS(null,'stroke');if(result=='none')result=''}else if(cmd=='linewidth'){result=shape.getAttributeNS(null,'stroke');if(result=='none')result='';else result=shape.getAttributeNS(null,'stroke-width')}}return result};SVGRenderer.prototype.showTracker=function(shape){var box=shape.getBBox();var tracker=document.getElementById('tracker');if(tracker){this.remove(tracker)}var svgNamespace='http://www.w3.org/2000/svg';tracker=document.createElementNS(svgNamespace,'rect');tracker.setAttributeNS(null,'id','tracker');tracker.setAttributeNS(null,'x',box.x-10);tracker.setAttributeNS(null,'y',box.y-10);tracker.setAttributeNS(null,'width',box.width+20);tracker.setAttributeNS(null,'height',box.height+20);tracker.setAttributeNS(null,'fill','none');tracker.setAttributeNS(null,'stroke','blue');tracker.setAttributeNS(null,'stroke-width','1');this.svgRoot.appendChild(tracker)};SVGRenderer.prototype.getMarkup=function(){return this.container.innerHTML};
377   -function VMLRenderer(){this.base=AbstractRenderer}VMLRenderer.prototype=new AbstractRenderer;VMLRenderer.prototype.init=function(elem){this.container=elem;this.container.style.overflow='hidden';elem.ownerDocument.namespaces.add("v","urn:schemas-microsoft-com:vml");var style=elem.ownerDocument.createStyleSheet();style.addRule('v\\:*',"behavior: url(#default#VML);")};VMLRenderer.prototype.bounds=function(shape){var rect=new Object();rect['x']=shape.offsetLeft;rect['y']=shape.offsetTop;rect['width']=shape.offsetWidth;rect['height']=shape.offsetHeight;return rect};VMLRenderer.prototype.create=function(shape,fillColor,lineColor,lineWidth,left,top,width,height,texto){var vml;if(shape=='rect'){vml=this.container.ownerDocument.createElement('v:rect')}else if(shape=='roundrect'){vml=this.container.ownerDocument.createElement('v:roundrect')}else if(shape=='ellipse'){vml=this.container.ownerDocument.createElement('v:oval')}else if(shape=='circ'){vml=this.container.ownerDocument.createElement('v:oval')}else if(shape=='line'){vml=this.container.ownerDocument.createElement('v:line')}else if(shape=='text'){vml=this.container.ownerDocument.createElement('v:textbox');vml.innerHTML=texto}if(shape!='line'){vml.style.position='absolute';vml.style.left=left;vml.style.top=top;vml.style.width=width;vml.style.height=height;if(fillColor!=''){vml.setAttribute('filled','true');vml.setAttribute('fillcolor',fillColor)}else{vml.setAttribute('filled','false')}}else{vml.style.position='absolute';vml.setAttribute('from',left+'px,'+top+'px');vml.setAttribute('to',width+'px,'+height+'px')}if(lineColor!=''){vml.setAttribute('stroked','true');vml.setAttribute('strokecolor',lineColor);vml.setAttribute('strokeweight',lineWidth)}else{vml.setAttribute('stroked','false')}this.container.appendChild(vml);return vml};VMLRenderer.prototype.remove=function(shape){shape.removeNode(true)};VMLRenderer.prototype.move=function(shape,left,top){if(shape.tagName=='line'){shape.style.marginLeft=left;shape.style.marginTop=top}else{shape.style.left=left;shape.style.top=top}};VMLRenderer.prototype.track=function(shape){};VMLRenderer.prototype.resize=function(shape,fromX,fromY,toX,toY){shape.setAttribute('to',toX+'px,'+toY+'px')};VMLRenderer.prototype.editCommand=function(shape,cmd,value){if(shape!=null){if(cmd=='fillcolor'){if(value!=''){shape.filled='true';shape.fillcolor=value}else{shape.filled='false';shape.fillcolor=''}}else if(cmd=='linecolor'){if(value!=''){shape.stroked='true';shape.strokecolor=value}else{shape.stroked='false';shape.strokecolor=''}}else if(cmd=='linewidth'){shape.strokeweight=parseInt(value)+'px'}}};VMLRenderer.prototype.queryCommand=function(shape,cmd){if(shape!=null){if(cmd=='fillcolor'){if(shape.filled=='false')return'';else return shape.fillcolor}else if(cmd=='linecolor'){if(shape.stroked=='false')return'';else return shape.strokecolor}else if(cmd=='linewidth'){if(shape.stroked=='false'){return''}else{return(parseFloat(shape.strokeweight)*(screen.logicalXDPI/72))+'px'}}}};VMLRenderer.prototype.showTracker=function(shape){var box=this.bounds(shape);var tracker=document.getElementById('tracker');if(tracker){this.remove(tracker)}tracker=this.container.ownerDocument.createElement('v:rect');tracker.id='tracker';tracker.style.position='absolute';tracker.style.left=box.x-10;tracker.style.top=box.y-10;tracker.style.width=box.width+20;tracker.style.height=box.height+20;tracker.setAttribute('filled','false');tracker.setAttribute('stroked','true');tracker.setAttribute('strokecolor','blue');tracker.setAttribute('strokeweight','1px');this.container.appendChild(tracker)};VMLRenderer.prototype.getMarkup=function(){return this.container.innerHTML};
378   -
379   -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.coordenadas={formato:"bloco",padrao:"geoProj",defOrigem:"+proj=longlat +ellps=GRS67 +no_defs",config:{"geoProj":{idhtml:"localizarxy",tipo:"geo",titulo:"Geo",ativo:true,defepsg:""},"dd":{idhtml:"localizarxy",tipo:"metrica",titulo:"Déc. de grau",ativo:true,defepsg:""},"policonicaSad69":{idhtml:"localizarxy",tipo:"metrica",titulo:"Polic SAD-69",ativo:true,defepsg:"+proj=poly +lat_0=0 +lon_0=-54 +x_0=5000000 +y_0=10000000 +ellps=aust_SA +units=m +no_defs"},"utmSad69Proj":{idhtml:"localizarxy",tipo:"utm",titulo:"UTM Sad-69",ativo:true,defepsg:"",zona:{"19N":"+proj=utm +zone=19 +ellps=aust_SA +units=m +no_defs","20N":"+proj=utm +zone=20 +ellps=aust_SA +units=m +no_defs","21N":"+proj=utm +zone=21 +ellps=aust_SA +units=m +no_defs","22N":"+proj=utm +zone=22 +ellps=aust_SA +units=m +no_defs","17S":"+proj=utm +zone=17 +south +ellps=aust_SA +units=m +no_defs","18S":"+proj=utm +zone=18 +south +ellps=aust_SA +units=m +no_defs","19S":"+proj=utm +zone=19 +south +ellps=aust_SA +units=m +no_defs","20S":"+proj=utm +zone=20 +south +ellps=aust_SA +units=m +no_defs","21S":"+proj=utm +zone=21 +south +ellps=aust_SA +units=m +no_defs","22S":"+proj=utm +zone=22 +south +ellps=aust_SA +units=m +no_defs","23S":"+proj=utm +zone=23 +south +ellps=aust_SA +units=m +no_defs","24S":"+proj=utm +zone=24 +south +ellps=aust_SA +units=m +no_defs","25S":"+proj=utm +zone=25 +south +ellps=aust_SA +units=m +no_defs"}},"utmSirgas2000Proj":{idhtml:"localizarxy",tipo:"utm",titulo:"UTM Sirgas",ativo:true,defepsg:"",zona:{"11N":"+proj=utm +zone=11 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","12N":"+proj=utm +zone=12 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","13N":"+proj=utm +zone=13 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","14N":"+proj=utm +zone=14 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","15N":"+proj=utm +zone=15 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","16N":"+proj=utm +zone=16 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","17N":"+proj=utm +zone=17 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","18N":"+proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","19N":"+proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","20N":"+proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","21N":"+proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","22N":"+proj=utm +zone=22 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","17S":"+proj=utm +zone=17 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","18S":"+proj=utm +zone=18 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","19S":"+proj=utm +zone=19 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","20S":"+proj=utm +zone=20 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","21S":"+proj=utm +zone=21 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","22S":"+proj=utm +zone=22 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","23S":"+proj=utm +zone=23 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","24S":"+proj=utm +zone=24 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","25S":"+proj=utm +zone=25 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}}},PARAMETROS:{"mostraCoordenadasUTM":{idhtml:"localizarxy"},"mostraCoordenadasGEO":{idhtml:"localizarxy"}},MODOTEXTO:"",mostraCoordenadasUTM:function(id){try{if(arguments.length===0||id===""||typeof(id)==='undefined'){id=this.PARAMETROS.mostraCoordenadasUTM.idhtml}else{this.PARAMETROS.mostraCoordenadasUTM.idhtml=id}if(!$i(id)||this.PARAMETROS.mostraCoordenadasUTM.idhtml===""){if(i3GEO.eventos.MOUSEPARADO.toString().search("atualizaCoordenadasUTM()")>=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="<div onclick='javascript:clearTimeout(idSetTimeoutMostraUTM);i3GEO.coordenadas.PARAMETROS.mostraCoordenadasUTM.idhtml = \"\";i3GEO.coordenadas.mostraCoordenadasGEO();' style='width:300px;font-size:10px;' >UTM: x="+retorno.data.x+" y="+retorno.data.y+" zn="+retorno.data.zona+" "+retorno.data.datum+" &nbsp;<img class='x' src='"+i3GEO.util.$im("branco.gif")+"' /></div>";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.Interface.TABLET===true){if(i3GEO.eventos.MOUSECLIQUE.toString().search("atualizaLocalizarGeo()")<0){i3GEO.eventos.MOUSECLIQUE.push("atualizaLocalizarGeo()")}}else{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='<table id='+prefixo+' style=display:block;text-align:center;width:410px ><tr style="border-bottom:2px solid white" >'+'<td style=width:10px;text-align:right > X:</td>'+'<td>'+$inputText('','',prefixo+'xg','grau','2','-00')+'</td>'+'<td>'+$inputText('','',prefixo+'xm','minuto','2','00')+'</td>'+'<td>'+$inputText('','',prefixo+'xs','segundo','4','00.00')+'</td>'+'<td>Y:'+$inputText('','',prefixo+'yg','grau','2','-00')+'</td>'+'<td>'+$inputText('','',prefixo+'ym','minuto','2','00')+'</td>'+'<td>'+$inputText('','',prefixo+'ys','segundo','4','00.00')+'</td>',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+='<td><img class=tic title=zoom onclick="'+temp+'" src="'+i3GEO.util.$im("branco.gif")+'" /></td>'+"<td>"+caixa+"</td>"+"</tr></table>";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]+"<br>"},criaMascaraMetrica:function(prefixo,titulo,caixa){var ins="<table id="+prefixo+" style=display:block;text-align:center;;width:410px ><tr style='border-bottom:2px solid white' >"+"<td style=width:120px;text-align:right >"+titulo+" X:&nbsp;</td>"+"<td>"+$inputText("","",prefixo+"X","X","12","00")+"&nbsp;</td>"+"<td>Y:"+$inputText("","",prefixo+"Y","Y","12","00")+"&nbsp;</td>"+"<td>Zn:"+$inputText("","",prefixo+"ZN","Zona","2","--")+"&nbsp;</td>"+"<td>"+caixa+"<td>"+"</tr></table>";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+"<br>"},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<n;i++){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){if(tipos[i]===this.padrao){$i(prefixo+tipos[i]).style.display="block"}else{$i(prefixo+tipos[i]).style.display="none"}}}},mudaTipo:function(obj,onde){if(obj.value==="janela"){this.formato="janela";this.mostraCoordenadas();return}this.padrao=obj.value;obj.selectedIndex=0;i3GEO.coordenadas.ativaBloco(onde)},mostraCoordenadas:function(ativaMovimento,onde,x,y){try{var tipos=i3GEO.util.listaChaves(i3GEO.coordenadas.config),n=tipos.length,temp,ins="",i=0,caixa,janela;i3GEO.coordenadas.MODOTEXTO="";if(arguments.length===0){ativaMovimento=true;onde=""}if(onde===""){onde=i3GEO.coordenadas.config[tipos[0]].idhtml}caixa="<select onchange='javascript:i3GEO.coordenadas.mudaTipo(this,\""+onde+"\");' style='margin-left:3px;font-size:10px;height:16px;width:40px;' ><option>---</option><option value='janela' >janela</option>";for(i=0;i<n;i+=1){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){caixa+="<option value='"+tipos[i]+"'>"+temp.titulo+"</option>"}}caixa+="</select>";if(i3GEO.coordenadas.formato!=="bloco"){caixa=""}for(i=0;i<n;i+=1){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){if(temp.tipo==="geo"){ins+=i3GEO.coordenadas.criaMascaraDMS(onde+tipos[i],temp.titulo,caixa);if(i3GEO.coordenadas.formato==="separado"){try{$i(temp.idhtml).innerHTML=ins}catch(e){}ins=""}}else{ins+=i3GEO.coordenadas.criaMascaraMetrica(onde+tipos[i],temp.titulo,caixa)}}}if(this.formato==="janela"){janela=i3GEO.janela.cria("450px","120px","","","","Coordenadas aproximadas","i3GEOJanelaCoordenadas",false,"hd","","");YAHOO.util.Event.addListener(janela[0].close,"click",function(){i3GEO.coordenadas.formato="bloco",i3GEO.coordenadas.mostraCoordenadas()});temp=$i("i3GEOJanelaCoordenadas_corpo");temp.style.backgroundColor="white";temp.style.textAlign="left";temp=$i("i3GEOJanelaCoordenadas");temp.onmouseover="";temp.onmouseout="";if($i(onde)){$i(onde).innerHTML=""}onde="i3GEOJanelaCoordenadas_corpo";ins+="<br><a href='#' style='cursor:pointer;color:blue' onclick='new YAHOO.util.KeyListener(document.body,{alt:true,keys:67},{fn: function(type, args, obj){alert(i3GEO.coordenadas.MODOTEXTO);}}).enable();' >"+"Clique aqui para ativar Alt+C para poder capturar as coordenadas</a>"}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<n;i+=1){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){if(temp.tipo==="geo"){if(ativaMovimento===true){if(i3GEO.Interface.TABLET===true){if(i3GEO.eventos.MOUSECLIQUE.toString().search("atualizaLocalizarGeo('"+onde+tipos[i]+"')")<0){i3GEO.eventos.MOUSECLIQUE.push("atualizaLocalizarGeo('"+onde+tipos[i]+"')")}}else{if(i3GEO.eventos.MOUSEMOVE.toString().search("atualizaLocalizarGeo('"+onde+tipos[i]+"')")<0){i3GEO.eventos.MOUSEMOVE.push("atualizaLocalizarGeo('"+onde+tipos[i]+"')")}}}if(typeof(x)!=='undefined'){atualizaLocalizarGeo(onde+tipos[i],i3GEO.calculo.dd2dms(x)[0],i3GEO.calculo.dd2dms(y)[0])}}else{if(ativaMovimento===true){if(i3GEO.Interface.TABLET===true){if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')")}}else{if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')")}}}if(typeof(x)!=='undefined'){i3GEO.coordenadas.atualizaProj4(onde,tipos[i],x,y)}}}}if(ativaMovimento===true){if(i3GEO.Interface.TABLET===true){if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.coordenadas.limpaModoTexto()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.coordenadas.limpaModoTexto()")}}else{if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.coordenadas.limpaModoTexto()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.coordenadas.limpaModoTexto()")}}}if(i3GEO.coordenadas.formato==="bloco"){i3GEO.coordenadas.ativaBloco(onde)}}catch(men){}},limpaModoTexto:function(){i3GEO.coordenadas.MODOTEXTO=""}};
380   -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.gadgets={PARAMETROS:{"mostraInserirKml":{idhtml:"inserirKml"},"mostraEscalaNumerica":{idhtml:"escala"},"mostraEscalaGrafica":{idhtml:"escalaGrafica"},"mostraBuscaRapida":{idhtml:"buscaRapida",servicosexternos:true,temasmapa:false},"mostraVisual":{idhtml:"visual"},"mostraQuadros":{idhtml:"lugarquadros"},"mostraHistoricoZoom":{idhtml:"historicozoom"},"mostraMenuSuspenso":{idhtml:"menus",deslocaEsquerda:0},"mostraMenuLista":{idhtml:"menuLista"},"mostraVersao":{idhtml:"versaoi3geo"},"mostraEmail":{idhtml:"emailInstituicao"}},mostraEmail:function(id){if(arguments.length===0||id===""){id=i3GEO.gadgets.PARAMETROS.mostraEmail.idhtml}else{i3GEO.gadgets.PARAMETROS.mostraEmail.idhtml=id}i3GEO.util.defineValor(id,"innerHTML",i3GEO.parametros.emailInstituicao)},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,"290","i3geo_urlkml","kml url","40","");ins="<table><tr><td>Kml: "+i;temp='i3GEO.Interface.adicionaKml();';ins+="</td><td><img src='"+i3GEO.util.$im("branco.gif")+"' class='tic' onclick='"+temp+"' /></td></tr></table>";$i(id).innerHTML=ins}}},mostraEscalaNumerica:function(id){var i,ins,temp,onde;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraEscalaNumerica.idhtml}onde=$i(id);if(onde){if(onde.style.display=="none"){onde.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,"100","i3geo_escalanum",$trad("d10"),"9",parseInt(i3GEO.parametros.mapscale,10));ins="<table><tr><td>"+i;temp='var nova = document.getElementById("i3geo_escalanum").value;';temp+='i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,nova);';ins+="</td><td><img src='"+i3GEO.util.$im("branco.gif")+"' class='tic' onclick='"+temp+"' /></td></tr></table>";onde.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="<img class='menuarrow' src=\""+i3GEO.configura.locaplic+"/imagens/branco.gif\" title='op&ccedil;&otilde;es' onclick='i3GEO.mapa.dialogo.opcoesEscala()' style='cursor:pointer'/><img id=imagemEscalaGrafica src='' />";$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(){alert("i3geo_buscaRapida foi depreciada")};i=$inputText(id,"225","valorBuscaRapida","Município, cidade, UC, endereço...","30",$trad("o2"));ins="<table><tr><td><a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=8&idajuda=71' >&nbsp;&nbsp;&nbsp;</a></td><td>"+i+"</td>";ins+="<td><img src='"+i3GEO.util.$im("branco.gif")+"' title='"+$trad("p13")+"' class='ticPropriedades2' id=i3GEObotaoPropriedadesBuscaRapida /></td>";ins+="<td><img src='"+i3GEO.util.$im("branco.gif")+"' class='tic' id=i3GEObotaoBuscaRapida /></td></tr></table>";temp=$i(id);if(temp){temp.innerHTML=ins;$i("i3GEObotaoBuscaRapida").onclick=function(){if(i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.servicosexternos===false&&i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.temasmapa===false){alert("Escolha um tipo de busca nas propriedades");return}if($i("valorBuscaRapida").value===""){alert("Digite uma palavra para busca!");return}i3GEO.janela.cria("300px","280px",i3GEO.configura.locaplic+"/ferramentas/buscarapida/index.htm","","","Busca rapida")};$i("i3GEObotaoPropriedadesBuscaRapida").onclick=function(){var ins,interno="",externo="";i3GEO.janela.cria("300px","150px","","","","Propriedades","i3GEOpropriedadesBuscaRapida");if(i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.servicosexternos){externo="checked"}if(i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.temasmapa){interno="checked"}ins="<p class=paragrafo >Onde será feita a busca:</p>"+"<table class=lista3 >"+"<tr><td><input style=cursor:pointer onclick='i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.servicosexternos = this.checked' type=checkbox "+externo+" ></td><td>Serviços de busca externos (Google e MMA)</td></tr>"+"<tr><td><input style=cursor:pointer onclick='i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.temasmapa = this.checked' type=checkbox "+interno+" ></td><td>Temas existentes no mapa</td></tr>"+"</table><br>"+"<p class=paragrafo >Apenas os temas especialmente configurados pelo administrador do i3Geo podem receber operações de busca.</p>";$i("i3GEOpropriedadesBuscaRapida_corpo").innerHTML=ins}}}},mostraHistoricoZoom:function(id){if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraHistoricoZoom.idhtml}if($i(id)){marcadorZoom="";var ins="<table style='text-align:center;position:relative;left:";if(navm){ins+="0px;'>"}else{ins+="6px;'>"}ins+="<tr><td><img id='i3geo_zoomanterior' class='zoomAnterior' title='anterior' src='"+i3GEO.util.$im("branco.gif")+"' /></td>";ins+="<td>&nbsp;</td>";ins+="<td><img id='i3geo_zoomproximo' class='zoomProximo' title='proximo' src='"+i3GEO.util.$im("branco.gif")+"' /></td>";ins+="</tr></table>";$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<i3GEO.gadgets.quadros.quadrosfilme.length){marcadorZoom=marcadorZoom+1;if(marcadorZoom<i3GEO.gadgets.quadros.quadrosfilme.length){i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,"",i3GEO.gadgets.quadros.quadrosfilme[marcadorZoom].extensao)}}else{marcadorZoom=i3GEO.gadgets.quadros.quadrosfilme.length}}}},visual:{inicia:function(id){var l,visuais,li;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraVisual.idhtml}if($i(id)){if(i3GEO.parametros.listavisual!==""){l=i3GEO.parametros.listavisual.split(",");visuais="";li=l.length-1;if(li>=0){do{visuais+="<img title='"+l[li]+"' style=cursor:pointer onclick='i3GEO.gadgets.visual.troca(\""+l[li]+"\")' src='"+i3GEO.configura.locaplic+"/imagens/visual/"+l[li]+".png' />&nbsp;"}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<elt;i++){if((elementos[i].src.search("branco")>-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="<table class=tablefilme ><tr><td><div class='menuarrow' title='op&ccedil;&otilde;es' onclick='i3GEO.gadgets.quadros.opcoes(this)' style='cursor:pointer'></div></td>";for(i=0;i<qs;i++){q+="<td><img class='quadro' src=\""+i3GEO.configura.locaplic+"/imagens/branco.gif\" id='quadro"+i+"' ";q+="onmouseover='i3GEO.gadgets.quadros.trocaMapa(this.id);i3GEO.ajuda.mostraJanela(\"Clique para aplicar a extensão geográfica do quadro ao mapa\")' ";q+="onclick='i3GEO.gadgets.quadros.zoom(this.id)' /></td>";i3GEO.gadgets.quadros.quadrosfilme[i]=[]}q+="</tr></table>";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.toLowerCase()==="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.toLowerCase()==="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="<br><b>N&atilde;o existem imagens guardadas.";wi.document.write("<html><body><p style='font-size: 12px; font-family: verdana, arial, helvetica, sans-serif;'>Click com o bot&atilde;o da direita do mouse sobre a imagem para fazer o download<br>");i=i3GEO.gadgets.quadros.quadrosfilme.length-1;if(i>=0){do{if(i3GEO.gadgets.quadros.quadrosfilme[i].imagem){wi.document.write("<p style='font-size: 12px; font-family: verdana, arial, helvetica, sans-serif;'>Imagem: "+i+"<br>");wi.document.write("<p style='font-size: 12px; font-family: verdana, arial, helvetica, sans-serif;'>Abrangência: "+i3GEO.gadgets.quadros.quadrosfilme[i].extensao+"<br>");wi.document.write("<img src='"+i3GEO.gadgets.quadros.quadrosfilme[i].imagem+"' />");wi.document.write("<img src='"+i3GEO.gadgets.quadros.quadrosfilme[i].referencia+"' />");if(i3GEO.gadgets.quadros.geraLegenda===true){wi.document.write("<img src='"+i3GEO.gadgets.quadros.quadrosfilme[i].legenda+"' />")}}i--}while(i>=0)}wi.document.write("<br>Fim</body></html>");wi.document.close()}}},mostraMenuSuspenso:function(id){var objid,sobe,n,i,estilo,t,onMenuBarBeforeRender,temp,ifr,i3GEOoMenuBarLocal,ms=i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso,confm=i3GEO.configura.oMenuData,ins="",alinhamento="";i3GEOoMenuBar=YAHOO.widget.MenuManager;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+='<div class="bd" style="top:0px;'+alinhamento+'display:block;align:right;border: 0px solid white;z-index:6000;line-height:1.4" >'+'<ul class="first-of-type" style="display:block;border:0px solid white;top:10px;">';n=confm.menu.length;estilo="padding-bottom:3px;top:0px;border: 0px solid white;";for(i=0;i<n;i+=1){t="";if(confm.menu[i].target){t="target="+confm.menu[i].target}ins+='<li class="yuimenubaritem" style="padding-top:2px;"><a style="'+estilo+'" href="#" class="yuimenubaritemlabel" '+t+'id="menu'+confm.menu[i].id+'" >&nbsp;'+confm.menu[i].nome+'</a></li>'}ins+='</ul>';ins+='</div>';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!==""){i3GEOoMenuBarLocal.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}i3GEOoMenuBarLocal=new YAHOO.widget.MenuBar(id,{iframe:ifr,autosubmenudisplay:true,showdelay:100,hidedelay:500,lazyload:false});i3GEOoMenuBar.addMenu(i3GEOoMenuBarLocal);i3GEOoMenuBarLocal.beforeRenderEvent.subscribe(onMenuBarBeforeRender);i3GEOoMenuBarLocal.render();try{if(i3GEO.Interface.ATUAL==="padrao"){i3GEOoMenuBar.getMenuItem("omenudataInterface1").cfg.setProperty("checked",true)}if(i3GEO.Interface.ATUAL==="openlayers"){i3GEOoMenuBar.getMenuItem("omenudataInterface2").cfg.setProperty("checked",true)}if(i3GEO.Interface.ATUAL==="flamingo"){i3GEOoMenuBar.getMenuItem("omenudataInterface3").cfg.setProperty("checked",true)}if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEOoMenuBar.getMenuItem("omenudataInterface4").cfg.setProperty("checked",true)}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEOoMenuBar.getMenuItem("omenudataInterface5").cfg.setProperty("checked",true)}}catch(e){}if(i3GEO.Interface.ATUAL!=="padrao"&&$i("omenudataArquivos3")){i3GEOoMenuBar.getMenuItem("omenudataArquivos3").cfg.setProperty("disabled",true)}if(i3GEO.Interface.ATUAL==="googleearth"&&$i("omenudataJanelas1")){i3GEOoMenuBar.getMenuItem("omenudataJanelas1").cfg.setProperty("disabled",true)}if(i3GEO.Interface.ATUAL!=="openlayers"&&$i("omenudataJanelas3")){i3GEOoMenuBar.getMenuItem("omenudataJanelas3").cfg.setProperty("disabled",true)}temp=objid.style;temp.backgroundPosition="0px -1px";temp.border="0px solid white";if(navm){temp.borderBottom="2px solid white"}if(navm&&i3GEO.Interface.ATUAL==="googlemaps"){temp.border="2px dotted white"}if(ms.finaliza&&ms.finaliza!=""){eval(ms.finaliza)}}},mostraMenuLista:function(id){var objid,n,i,estilo,t,temp,nomeMenu,sub,ms=i3GEO.gadgets.PARAMETROS.mostraMenuLista,confm=i3GEO.configura.oMenuData,ins="",subs=i3GEO.configura.oMenuData.submenus;if(arguments.length===0){id=ms.idhtml}else{ms.idhtml=id}objid=$i(id);if(objid){n=confm.menu.length;for(i=0;i<n;i+=1){ins+='<div class="listaMenuTitulo" id=menulista_'+confm.menu[i].id+'>'+confm.menu[i].nome+'</div>'}objid.innerHTML=ins;for(nomeMenu in subs){if($i("menulista_"+nomeMenu)){sub=subs[nomeMenu];n=sub.length;ins="";for(i=0;i<n;i++){ins+="<p class='listaMenuItem' ><a href='"+sub[i].url+"' target='_blank'>"+sub[i].text+"</a>"}$i("menulista_"+nomeMenu).innerHTML+=ins}}}}};
381   -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.social={curtirFacebook:function(url,tipo){if(tipo==="comtotal"){return"<iframe src='http://www.facebook.com/plugins/like.php?href="+url+"&amp;layout=button_count&amp;show_faces=false&amp;width=160&amp;action=like&amp;colorscheme=light&amp;height=21' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:160px; height:21px;' allowTransparency='true'></iframe>"}if(tipo==="semtotal"){return"<iframe src='http://www.facebook.com/plugins/like.php?href="+url+"&amp;layout=button_count&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;height=21' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:100px; height:21px;' allowTransparency='true'></iframe>"}},publicarTwitter:function(url,tipo){var re=new RegExp("=","g");url=url.replace(re,'%3d');if(tipo==="comtotal"){return'<iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/tweet_button.html?count=horizontal&via=i3geo&url='+url+'" style="width:100px; height:21px;"></iframe>'}if(tipo==="semtotal"){return'<iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/tweet_button.html?count=none&via=i3geo&url='+url+'" style="width:55px; height:21px;"></iframe>'}},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+="<table style='width:250px' ><tr>"}if(tipo==="semtotal"){tabela+="<table style='width:115px' ><tr>"}if(onde||id===""){if(urlpt!==""){tabela+="<td>"+i3GEO.social.publicarTwitter(urlpt,tipo)+"</td>"}if(urlcf!==""){tabela+="<td>"+i3GEO.social.curtirFacebook(urlcf,tipo)+"</td>"}tabela+="</tr></table>";if(id!==""){onde.innerHTML=tabela}return tabela}else{return false}},bookmark:function(link,locaplic){if(!locaplic){locaplic=i3GEO.configura.locaplic}var ins="<img style='cursor:pointer' src='"+locaplic+"/imagens/delicious.gif' onclick='javascript:window.open(\"http://del.icio.us/post?url="+link+"\")' title='Delicious'/> ";ins+="<img style='cursor:pointer' src='"+locaplic+"/imagens/digg.gif' onclick='javascript:window.open(\"http://digg.com/submit/post?url="+link+"\")' title='Digg'/> ";ins+="<img style='cursor:pointer' src='"+locaplic+"/imagens/facebook.gif' onclick='javascript:window.open(\"http://www.facebook.com/sharer.php?u="+link+"\")' title='Facebook'/> ";ins+="<img style='cursor:pointer' src='"+locaplic+"/imagens/stumbleupon.gif' onclick='javascript:window.open(\"http://www.stumbleupon.com/submit?url="+link+"\")' title='StumbleUpon'/>";return ins}};
  328 +YAHOO.lang.JSON=(function(){var l=YAHOO.lang,_UNICODE_EXCEPTIONS=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,_ESCAPES=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,_VALUES=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,_BRACKETS=/(?:^|:|,)(?:\s*\[)+/g,_INVALID=/^[\],:{}\s]*$/,_SPECIAL_CHARS=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,_CHARS={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function _revive(data,reviver){var walk=function(o,key){var k,v,value=o[key];if(value&&typeof value==="object"){for(k in value){if(l.hasOwnProperty(value,k)){v=walk(value,k);if(v===undefined){delete value[k];}else{value[k]=v;}}}}return reviver.call(o,key,value);};return typeof reviver==="function"?walk({"":data},""):data;}function _char(c){if(!_CHARS[c]){_CHARS[c]="\\u"+("0000"+(+(c.charCodeAt(0))).toString(16)).slice(-4);}return _CHARS[c];}function _prepare(s){return s.replace(_UNICODE_EXCEPTIONS,_char);}function _isValid(str){return l.isString(str)&&_INVALID.test(str.replace(_ESCAPES,"@").replace(_VALUES,"]").replace(_BRACKETS,""));}function _string(s){return'"'+s.replace(_SPECIAL_CHARS,_char)+'"';}function _stringify(h,key,d,w,pstack){var o=typeof w==="function"?w.call(h,key,h[key]):h[key],i,len,j,k,v,isArray,a;if(o instanceof Date){o=l.JSON.dateToString(o);}else{if(o instanceof String||o instanceof Boolean||o instanceof Number){o=o.valueOf();}}switch(typeof o){case"string":return _string(o);case"number":return isFinite(o)?String(o):"null";case"boolean":return String(o);case"object":if(o===null){return"null";}for(i=pstack.length-1;i>=0;--i){if(pstack[i]===o){return"null";}}pstack[pstack.length]=o;a=[];isArray=l.isArray(o);if(d>0){if(isArray){for(i=o.length-1;i>=0;--i){a[i]=_stringify(o,i,d-1,w,pstack)||"null";}}else{j=0;if(l.isArray(w)){for(i=0,len=w.length;i<len;++i){k=w[i];v=_stringify(o,k,d-1,w,pstack);if(v){a[j++]=_string(k)+":"+v;}}}else{for(k in o){if(typeof k==="string"&&l.hasOwnProperty(o,k)){v=_stringify(o,k,d-1,w,pstack);if(v){a[j++]=_string(k)+":"+v;}}}}a.sort();}}pstack.pop();return isArray?"["+a.join(",")+"]":"{"+a.join(",")+"}";}return undefined;}return{isValid:function(s){return _isValid(_prepare(s));},parse:function(s,reviver){s=_prepare(s);if(_isValid(s)){return _revive(eval("("+s+")"),reviver);}throw new SyntaxError("parseJSON");},stringify:function(o,w,d){if(o!==undefined){if(l.isArray(w)){w=(function(a){var uniq=[],map={},v,i,j,len;for(i=0,j=0,len=a.length;i<len;++i){v=a[i];if(typeof v==="string"&&map[v]===undefined){uniq[(map[v]=j++)]=v;}}return uniq;})(w);}d=d>=0?d:1/0;return _stringify({"":o},"",d,w,[]);}return undefined;},dateToString:function(d){function _zeroPad(v){return v<10?"0"+v:v;}return d.getUTCFullYear()+"-"+_zeroPad(d.getUTCMonth()+1)+"-"+_zeroPad(d.getUTCDate())+"T"+_zeroPad(d.getUTCHours())+":"+_zeroPad(d.getUTCMinutes())+":"+_zeroPad(d.getUTCSeconds())+"Z";},stringToDate:function(str){if(/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})Z$/.test(str)){var d=new Date();d.setUTCFullYear(RegExp.$1,(RegExp.$2|0)-1,RegExp.$3);d.setUTCHours(RegExp.$4,RegExp.$5,RegExp.$6);return d;}return str;}};})();YAHOO.register("json",YAHOO.lang.JSON,{version:"2.7.0",build:"1799"});(function(){var E=YAHOO.util.Dom,A=YAHOO.util.Event,C=YAHOO.lang;var B=function(F,D){var G={element:F,attributes:D||{}};B.superclass.constructor.call(this,G.element,G.attributes)};B._instances={};B.getResizeById=function(D){if(B._instances[D]){return B._instances[D]}return false};YAHOO.extend(B,YAHOO.util.Element,{CSS_RESIZE:"yui-resize",CSS_DRAG:"yui-draggable",CSS_HOVER:"yui-resize-hover",CSS_PROXY:"yui-resize-proxy",CSS_WRAP:"yui-resize-wrap",CSS_KNOB:"yui-resize-knob",CSS_HIDDEN:"yui-resize-hidden",CSS_HANDLE:"yui-resize-handle",CSS_STATUS:"yui-resize-status",CSS_GHOST:"yui-resize-ghost",CSS_RESIZING:"yui-resize-resizing",_resizeEvent:null,dd:null,browser:YAHOO.env.ua,_locked:null,_positioned:null,_dds:null,_wrap:null,_proxy:null,_handles:null,_currentHandle:null,_currentDD:null,_cache:null,_active:null,_createProxy:function(){if(this.get("proxy")){this._proxy=document.createElement("div");this._proxy.className=this.CSS_PROXY;this._proxy.style.height=this.get("element").clientHeight+"px";this._proxy.style.width=this.get("element").clientWidth+"px";this._wrap.parentNode.appendChild(this._proxy)}else{this.set("animate",false)}},_createWrap:function(){this._positioned=false;if(this.get("wrap")===false){switch(this.get("element").tagName.toLowerCase()){case"img":case"textarea":case"input":case"iframe":case"select":this.set("wrap",true);break}}if(this.get("wrap")===true){this._wrap=document.createElement("div");this._wrap.id=this.get("element").id+"_wrap";this._wrap.className=this.CSS_WRAP;if(this.get("element").tagName.toLowerCase()=="textarea"){E.addClass(this._wrap,"yui-resize-textarea")}E.setStyle(this._wrap,"width",this.get("width")+"px");E.setStyle(this._wrap,"height",this.get("height")+"px");E.setStyle(this._wrap,"z-index",this.getStyle("z-index"));this.setStyle("z-index",0);var F=E.getStyle(this.get("element"),"position");E.setStyle(this._wrap,"position",((F=="static")?"relative":F));E.setStyle(this._wrap,"top",E.getStyle(this.get("element"),"top"));E.setStyle(this._wrap,"left",E.getStyle(this.get("element"),"left"));if(E.getStyle(this.get("element"),"position")=="absolute"){this._positioned=true;E.setStyle(this.get("element"),"position","relative");E.setStyle(this.get("element"),"top","0");E.setStyle(this.get("element"),"left","0")}var D=this.get("element").parentNode;D.replaceChild(this._wrap,this.get("element"));this._wrap.appendChild(this.get("element"))}else{this._wrap=this.get("element");if(E.getStyle(this._wrap,"position")=="absolute"){this._positioned=true}}if(this.get("draggable")){this._setupDragDrop()}if(this.get("hover")){E.addClass(this._wrap,this.CSS_HOVER)}if(this.get("knobHandles")){E.addClass(this._wrap,this.CSS_KNOB)}if(this.get("hiddenHandles")){E.addClass(this._wrap,this.CSS_HIDDEN)}E.addClass(this._wrap,this.CSS_RESIZE)},_setupDragDrop:function(){E.addClass(this._wrap,this.CSS_DRAG);this.dd=new YAHOO.util.DD(this._wrap,this.get("id")+"-resize",{dragOnly:true,useShim:this.get("useShim")});this.dd.on("dragEvent",function(){this.fireEvent("dragEvent",arguments)},this,true)},_createHandles:function(){this._handles={};this._dds={};var G=this.get("handles");for(var F=0;F<G.length;F++){this._handles[G[F]]=document.createElement("div");this._handles[G[F]].id=E.generateId(this._handles[G[F]]);this._handles[G[F]].className=this.CSS_HANDLE+" "+this.CSS_HANDLE+"-"+G[F];var D=document.createElement("div");D.className=this.CSS_HANDLE+"-inner-"+G[F];this._handles[G[F]].appendChild(D);this._wrap.appendChild(this._handles[G[F]]);A.on(this._handles[G[F]],"mouseover",this._handleMouseOver,this,true);A.on(this._handles[G[F]],"mouseout",this._handleMouseOut,this,true);this._dds[G[F]]=new YAHOO.util.DragDrop(this._handles[G[F]],this.get("id")+"-handle-"+G,{useShim:this.get("useShim")});this._dds[G[F]].setPadding(15,15,15,15);this._dds[G[F]].on("startDragEvent",this._handleStartDrag,this._dds[G[F]],this);this._dds[G[F]].on("mouseDownEvent",this._handleMouseDown,this._dds[G[F]],this)}this._status=document.createElement("span");this._status.className=this.CSS_STATUS;document.body.insertBefore(this._status,document.body.firstChild)},_ieSelectFix:function(){return false},_ieSelectBack:null,_setAutoRatio:function(D){if(this.get("autoRatio")){if(D&&D.shiftKey){this.set("ratio",true)}else{this.set("ratio",this._configs.ratio._initialConfig.value)}}},_handleMouseDown:function(D){if(this._locked){return false}if(E.getStyle(this._wrap,"position")=="absolute"){this._positioned=true}if(D){this._setAutoRatio(D)}if(this.browser.ie){this._ieSelectBack=document.body.onselectstart;document.body.onselectstart=this._ieSelectFix}},_handleMouseOver:function(G){if(this._locked){return false}E.removeClass(this._wrap,this.CSS_RESIZE);if(this.get("hover")){E.removeClass(this._wrap,this.CSS_HOVER)}var D=A.getTarget(G);if(!E.hasClass(D,this.CSS_HANDLE)){D=D.parentNode}if(E.hasClass(D,this.CSS_HANDLE)&&!this._active){E.addClass(D,this.CSS_HANDLE+"-active");for(var F in this._handles){if(C.hasOwnProperty(this._handles,F)){if(this._handles[F]==D){E.addClass(D,this.CSS_HANDLE+"-"+F+"-active");break}}}}E.addClass(this._wrap,this.CSS_RESIZE)},_handleMouseOut:function(G){E.removeClass(this._wrap,this.CSS_RESIZE);if(this.get("hover")&&!this._active){E.addClass(this._wrap,this.CSS_HOVER)}var D=A.getTarget(G);if(!E.hasClass(D,this.CSS_HANDLE)){D=D.parentNode}if(E.hasClass(D,this.CSS_HANDLE)&&!this._active){E.removeClass(D,this.CSS_HANDLE+"-active");for(var F in this._handles){if(C.hasOwnProperty(this._handles,F)){if(this._handles[F]==D){E.removeClass(D,this.CSS_HANDLE+"-"+F+"-active");break}}}}E.addClass(this._wrap,this.CSS_RESIZE)},_handleStartDrag:function(G,F){var D=F.getDragEl();if(E.hasClass(D,this.CSS_HANDLE)){if(E.getStyle(this._wrap,"position")=="absolute"){this._positioned=true}this._active=true;this._currentDD=F;if(this._proxy){this._proxy.style.visibility="visible";this._proxy.style.zIndex="1000";this._proxy.style.height=this.get("element").clientHeight+"px";this._proxy.style.width=this.get("element").clientWidth+"px"}for(var H in this._handles){if(C.hasOwnProperty(this._handles,H)){if(this._handles[H]==D){this._currentHandle=H;var I="_handle_for_"+H;E.addClass(D,this.CSS_HANDLE+"-"+H+"-active");F.on("dragEvent",this[I],this,true);F.on("mouseUpEvent",this._handleMouseUp,this,true);break}}}E.addClass(D,this.CSS_HANDLE+"-active");if(this.get("proxy")){var J=E.getXY(this.get("element"));E.setXY(this._proxy,J);if(this.get("ghost")){this.addClass(this.CSS_GHOST)}}E.addClass(this._wrap,this.CSS_RESIZING);this._setCache();this._updateStatus(this._cache.height,this._cache.width,this._cache.top,this._cache.left);this.fireEvent("startResize",{type:"startresize",target:this})}},_setCache:function(){this._cache.xy=E.getXY(this._wrap);E.setXY(this._wrap,this._cache.xy);this._cache.height=this.get("clientHeight");this._cache.width=this.get("clientWidth");this._cache.start.height=this._cache.height;this._cache.start.width=this._cache.width;this._cache.start.top=this._cache.xy[1];this._cache.start.left=this._cache.xy[0];this._cache.top=this._cache.xy[1];this._cache.left=this._cache.xy[0];this.set("height",this._cache.height,true);this.set("width",this._cache.width,true)},_handleMouseUp:function(F){this._active=false;var G="_handle_for_"+this._currentHandle;this._currentDD.unsubscribe("dragEvent",this[G],this,true);this._currentDD.unsubscribe("mouseUpEvent",this._handleMouseUp,this,true);if(this._proxy){this._proxy.style.visibility="hidden";this._proxy.style.zIndex="-1";if(this.get("setSize")){this.resize(F,this._cache.height,this._cache.width,this._cache.top,this._cache.left,true)}else{this.fireEvent("resize",{ev:"resize",target:this,height:this._cache.height,width:this._cache.width,top:this._cache.top,left:this._cache.left})}if(this.get("ghost")){this.removeClass(this.CSS_GHOST)}}if(this.get("hover")){E.addClass(this._wrap,this.CSS_HOVER)}if(this._status){E.setStyle(this._status,"display","none")}if(this.browser.ie){document.body.onselectstart=this._ieSelectBack}if(this.browser.ie){E.removeClass(this._wrap,this.CSS_RESIZE)}for(var D in this._handles){if(C.hasOwnProperty(this._handles,D)){E.removeClass(this._handles[D],this.CSS_HANDLE+"-active")}}if(this.get("hover")&&!this._active){E.addClass(this._wrap,this.CSS_HOVER)}E.removeClass(this._wrap,this.CSS_RESIZING);E.removeClass(this._handles[this._currentHandle],this.CSS_HANDLE+"-"+this._currentHandle+"-active");E.removeClass(this._handles[this._currentHandle],this.CSS_HANDLE+"-active");if(this.browser.ie){E.addClass(this._wrap,this.CSS_RESIZE)}this._resizeEvent=null;this._currentHandle=null;if(!this.get("animate")){this.set("height",this._cache.height,true);this.set("width",this._cache.width,true)}this.fireEvent("endResize",{ev:"endResize",target:this,height:this._cache.height,width:this._cache.width,top:this._cache.top,left:this._cache.left})},_setRatio:function(K,N,Q,I){var O=K,G=N;if(this.get("ratio")){var P=this._cache.height,H=this._cache.width,F=parseInt(this.get("height"),10),L=parseInt(this.get("width"),10),M=this.get("maxHeight"),R=this.get("minHeight"),D=this.get("maxWidth"),J=this.get("minWidth");switch(this._currentHandle){case"l":K=F*(N/L);K=Math.min(Math.max(R,K),M);N=L*(K/F);Q=(this._cache.start.top-(-((F-K)/2)));I=(this._cache.start.left-(-((L-N))));break;case"r":K=F*(N/L);K=Math.min(Math.max(R,K),M);N=L*(K/F);Q=(this._cache.start.top-(-((F-K)/2)));break;case"t":N=L*(K/F);K=F*(N/L);I=(this._cache.start.left-(-((L-N)/2)));Q=(this._cache.start.top-(-((F-K))));break;case"b":N=L*(K/F);K=F*(N/L);I=(this._cache.start.left-(-((L-N)/2)));break;case"bl":K=F*(N/L);N=L*(K/F);I=(this._cache.start.left-(-((L-N))));break;case"br":K=F*(N/L);N=L*(K/F);break;case"tl":K=F*(N/L);N=L*(K/F);I=(this._cache.start.left-(-((L-N))));Q=(this._cache.start.top-(-((F-K))));break;case"tr":K=F*(N/L);N=L*(K/F);I=(this._cache.start.left);Q=(this._cache.start.top-(-((F-K))));break}O=this._checkHeight(K);G=this._checkWidth(N);if((O!=K)||(G!=N)){Q=0;I=0;if(O!=K){G=this._cache.width}if(G!=N){O=this._cache.height}}}return[O,G,Q,I]},_updateStatus:function(K,G,J,F){if(this._resizeEvent&&(!C.isString(this._resizeEvent))){K=((K===0)?this._cache.start.height:K);G=((G===0)?this._cache.start.width:G);var I=parseInt(this.get("height"),10),D=parseInt(this.get("width"),10);if(isNaN(I)){I=parseInt(K,10)}if(isNaN(D)){D=parseInt(G,10)}var L=(parseInt(K,10)-I);var H=(parseInt(G,10)-D);this._cache.offsetHeight=L;this._cache.offsetWidth=H;if(this.get("status")){E.setStyle(this._status,"display","inline");this._status.innerHTML="<strong>"+parseInt(K,10)+" x "+parseInt(G,10)+"</strong><em>"+((L>0)?"+":"")+L+" x "+((H>0)?"+":"")+H+"</em>";E.setXY(this._status,[A.getPageX(this._resizeEvent)+12,A.getPageY(this._resizeEvent)+12])}}},lock:function(D){this._locked=true;if(D&&this.dd){E.removeClass(this._wrap,"yui-draggable");this.dd.lock()}return this},unlock:function(D){this._locked=false;if(D&&this.dd){E.addClass(this._wrap,"yui-draggable");this.dd.unlock()}return this},isLocked:function(){return this._locked},reset:function(){this.resize(null,this._cache.start.height,this._cache.start.width,this._cache.start.top,this._cache.start.left,true);return this},resize:function(M,J,P,Q,H,F,K){if(this._locked){return false}this._resizeEvent=M;var G=this._wrap,I=this.get("animate"),O=true;if(this._proxy&&!F){G=this._proxy;I=false}this._setAutoRatio(M);if(this._positioned){if(this._proxy){Q=this._cache.top-Q;H=this._cache.left-H}}var L=this._setRatio(J,P,Q,H);J=parseInt(L[0],10);P=parseInt(L[1],10);Q=parseInt(L[2],10);H=parseInt(L[3],10);if(Q==0){Q=E.getY(G)}if(H==0){H=E.getX(G)}if(this._positioned){if(this._proxy&&F){if(!I){G.style.top=this._proxy.style.top;G.style.left=this._proxy.style.left}else{Q=this._proxy.style.top;H=this._proxy.style.left}}else{if(!this.get("ratio")&&!this._proxy){Q=this._cache.top+-(Q);H=this._cache.left+-(H)}if(Q){if(this.get("minY")){if(Q<this.get("minY")){Q=this.get("minY")}}if(this.get("maxY")){if(Q>this.get("maxY")){Q=this.get("maxY")}}}if(H){if(this.get("minX")){if(H<this.get("minX")){H=this.get("minX")}}if(this.get("maxX")){if((H+P)>this.get("maxX")){H=(this.get("maxX")-P)}}}}}if(!K){var N=this.fireEvent("beforeResize",{ev:"beforeResize",target:this,height:J,width:P,top:Q,left:H});if(N===false){return false}}this._updateStatus(J,P,Q,H);if(this._positioned){if(this._proxy&&F){}else{if(Q){E.setY(G,Q);this._cache.top=Q}if(H){E.setX(G,H);this._cache.left=H}}}if(J){if(!I){O=true;if(this._proxy&&F){if(!this.get("setSize")){O=false}}if(O){G.style.height=J+"px"}if((this._proxy&&F)||!this._proxy){if(this._wrap!=this.get("element")){this.get("element").style.height=J+"px"}}}this._cache.height=J}if(P){this._cache.width=P;if(!I){O=true;if(this._proxy&&F){if(!this.get("setSize")){O=false}}if(O){G.style.width=P+"px"}if((this._proxy&&F)||!this._proxy){if(this._wrap!=this.get("element")){this.get("element").style.width=P+"px"}}}}if(I){if(YAHOO.util.Anim){var D=new YAHOO.util.Anim(G,{height:{to:this._cache.height},width:{to:this._cache.width}},this.get("animateDuration"),this.get("animateEasing"));if(this._positioned){if(Q){D.attributes.top={to:parseInt(Q,10)}}if(H){D.attributes.left={to:parseInt(H,10)}}}if(this._wrap!=this.get("element")){D.onTween.subscribe(function(){this.get("element").style.height=G.style.height;this.get("element").style.width=G.style.width},this,true)}D.onComplete.subscribe(function(){this.set("height",J);this.set("width",P);this.fireEvent("resize",{ev:"resize",target:this,height:J,width:P,top:Q,left:H})},this,true);D.animate()}}else{if(this._proxy&&!F){this.fireEvent("proxyResize",{ev:"proxyresize",target:this,height:J,width:P,top:Q,left:H})}else{this.fireEvent("resize",{ev:"resize",target:this,height:J,width:P,top:Q,left:H})}}return this},_handle_for_br:function(F){var G=this._setWidth(F.e);var D=this._setHeight(F.e);this.resize(F.e,D,G,0,0)},_handle_for_bl:function(G){var H=this._setWidth(G.e,true);var F=this._setHeight(G.e);var D=(H-this._cache.width);this.resize(G.e,F,H,0,D)},_handle_for_tl:function(G){var I=this._setWidth(G.e,true);var F=this._setHeight(G.e,true);var H=(F-this._cache.height);var D=(I-this._cache.width);this.resize(G.e,F,I,H,D)},_handle_for_tr:function(F){var H=this._setWidth(F.e);var D=this._setHeight(F.e,true);var G=(D-this._cache.height);this.resize(F.e,D,H,G,0)},_handle_for_r:function(D){this._dds.r.setYConstraint(0,0);var F=this._setWidth(D.e);this.resize(D.e,0,F,0,0)},_handle_for_l:function(F){this._dds.l.setYConstraint(0,0);var G=this._setWidth(F.e,true);var D=(G-this._cache.width);this.resize(F.e,0,G,0,D)},_handle_for_b:function(F){this._dds.b.setXConstraint(0,0);var D=this._setHeight(F.e);this.resize(F.e,D,0,0,0)},_handle_for_t:function(F){this._dds.t.setXConstraint(0,0);var D=this._setHeight(F.e,true);var G=(D-this._cache.height);this.resize(F.e,D,0,G,0)},_setWidth:function(H,J){var I=this._cache.xy[0],G=this._cache.width,D=A.getPageX(H),F=(D-I);if(J){F=(I-D)+parseInt(this.get("width"),10)}F=this._snapTick(F,this.get("xTicks"));F=this._checkWidth(F);return F},_checkWidth:function(D){if(this.get("minWidth")){if(D<=this.get("minWidth")){D=this.get("minWidth")}}if(this.get("maxWidth")){if(D>=this.get("maxWidth")){D=this.get("maxWidth")}}return D},_checkHeight:function(D){if(this.get("minHeight")){if(D<=this.get("minHeight")){D=this.get("minHeight")}}if(this.get("maxHeight")){if(D>=this.get("maxHeight")){D=this.get("maxHeight")}}return D},_setHeight:function(G,I){var H=this._cache.xy[1],F=this._cache.height,J=A.getPageY(G),D=(J-H);if(I){D=(H-J)+parseInt(this.get("height"),10)}D=this._snapTick(D,this.get("yTicks"));D=this._checkHeight(D);return D},_snapTick:function(G,F){if(!G||!F){return G}var H=G;var D=G%F;if(D>0){if(D>(F/2)){H=G+(F-D)}else{H=G-D}}return H},init:function(H,F){this._locked=false;this._cache={xy:[],height:0,width:0,top:0,left:0,offsetHeight:0,offsetWidth:0,start:{height:0,width:0,top:0,left:0}};B.superclass.init.call(this,H,F);this.set("setSize",this.get("setSize"));if(F.height){this.set("height",parseInt(F.height,10))}else{var G=this.getStyle("height");if(G=="auto"){this.set("height",parseInt(this.get("element").offsetHeight,10))}}if(F.width){this.set("width",parseInt(F.width,10))}else{var D=this.getStyle("width");if(D=="auto"){this.set("width",parseInt(this.get("element").offsetWidth,10))}}var I=H;if(!C.isString(I)){I=E.generateId(I)}B._instances[I]=this;this._active=false;this._createWrap();this._createProxy();this._createHandles()},getProxyEl:function(){return this._proxy},getWrapEl:function(){return this._wrap},getStatusEl:function(){return this._status},getActiveHandleEl:function(){return this._handles[this._currentHandle]},isActive:function(){return((this._active)?true:false)},initAttributes:function(D){B.superclass.initAttributes.call(this,D);this.setAttributeConfig("useShim",{value:((D.useShim===true)?true:false),validator:YAHOO.lang.isBoolean,method:function(F){for(var G in this._dds){if(C.hasOwnProperty(this._dds,G)){this._dds[G].useShim=F}}if(this.dd){this.dd.useShim=F}}});this.setAttributeConfig("setSize",{value:((D.setSize===false)?false:true),validator:YAHOO.lang.isBoolean});this.setAttributeConfig("wrap",{writeOnce:true,validator:YAHOO.lang.isBoolean,value:D.wrap||false});this.setAttributeConfig("handles",{writeOnce:true,value:D.handles||["r","b","br"],validator:function(F){if(C.isString(F)&&F.toLowerCase()=="all"){F=["t","b","r","l","bl","br","tl","tr"]}if(!C.isArray(F)){F=F.replace(/, /g,",");F=F.split(",")}this._configs.handles.value=F}});this.setAttributeConfig("width",{value:D.width||parseInt(this.getStyle("width"),10),validator:YAHOO.lang.isNumber,method:function(F){F=parseInt(F,10);if(F>0){if(this.get("setSize")){this.setStyle("width",F+"px")}this._cache.width=F;this._configs.width.value=F}}});this.setAttributeConfig("height",{value:D.height||parseInt(this.getStyle("height"),10),validator:YAHOO.lang.isNumber,method:function(F){F=parseInt(F,10);if(F>0){if(this.get("setSize")){this.setStyle("height",F+"px")}this._cache.height=F;this._configs.height.value=F}}});this.setAttributeConfig("minWidth",{value:D.minWidth||15,validator:YAHOO.lang.isNumber});this.setAttributeConfig("minHeight",{value:D.minHeight||15,validator:YAHOO.lang.isNumber});this.setAttributeConfig("maxWidth",{value:D.maxWidth||10000,validator:YAHOO.lang.isNumber});this.setAttributeConfig("maxHeight",{value:D.maxHeight||10000,validator:YAHOO.lang.isNumber});this.setAttributeConfig("minY",{value:D.minY||false});this.setAttributeConfig("minX",{value:D.minX||false});this.setAttributeConfig("maxY",{value:D.maxY||false});this.setAttributeConfig("maxX",{value:D.maxX||false});this.setAttributeConfig("animate",{value:D.animate||false,validator:function(G){var F=true;if(!YAHOO.util.Anim){F=false}return F}});this.setAttributeConfig("animateEasing",{value:D.animateEasing||function(){var F=false;if(YAHOO.util.Easing&&YAHOO.util.Easing.easeOut){F=YAHOO.util.Easing.easeOut}return F}()});this.setAttributeConfig("animateDuration",{value:D.animateDuration||0.5});this.setAttributeConfig("proxy",{value:D.proxy||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("ratio",{value:D.ratio||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("ghost",{value:D.ghost||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("draggable",{value:D.draggable||false,validator:YAHOO.lang.isBoolean,method:function(F){if(F&&this._wrap){this._setupDragDrop()}else{if(this.dd){E.removeClass(this._wrap,this.CSS_DRAG);this.dd.unreg()}}}});this.setAttributeConfig("hover",{value:D.hover||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("hiddenHandles",{value:D.hiddenHandles||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("knobHandles",{value:D.knobHandles||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("xTicks",{value:D.xTicks||false});this.setAttributeConfig("yTicks",{value:D.yTicks||false});this.setAttributeConfig("status",{value:D.status||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("autoRatio",{value:D.autoRatio||false,validator:YAHOO.lang.isBoolean})},destroy:function(){for(var F in this._handles){if(C.hasOwnProperty(this._handles,F)){A.purgeElement(this._handles[F]);this._handles[F].parentNode.removeChild(this._handles[F])}}if(this._proxy){this._proxy.parentNode.removeChild(this._proxy)}if(this._status){this._status.parentNode.removeChild(this._status)}if(this.dd){this.dd.unreg();E.removeClass(this._wrap,this.CSS_DRAG)}if(this._wrap!=this.get("element")){this.setStyle("position","");this.setStyle("top","");this.setStyle("left","");this._wrap.parentNode.replaceChild(this.get("element"),this._wrap)}this.removeClass(this.CSS_RESIZE);delete YAHOO.util.Resize._instances[this.get("id")];for(var D in this){if(C.hasOwnProperty(this,D)){this[D]=null;delete this[D]}}},toString:function(){if(this.get){return"Resize (#"+this.get("id")+")"}return"Resize Utility"}});YAHOO.util.Resize=B})();YAHOO.register("resize",YAHOO.util.Resize,{version:"2.7.0",build:"1799"});BalloonConfig=function(balloon,set){set=set||'';if(!balloon.configured||set=='GBubble'||set=='GBox'){balloon.fontColor='black';balloon.fontFamily='Arial, sans-serif';balloon.fontSize='12pt';balloon.minWidth=100;balloon.maxWidth=400;balloon.delayTime=750;balloon.vOffset=10;balloon.hOffset=10;balloon.stem=true;balloon.images=i3GEO.configura.locaplic+'/pacotes/balloon-tooltips/htdocs/images/GBubble';balloon.ieImage='balloon_ie.png';balloon.balloonImage='balloon.png';balloon.upLeftStem='up_left.png';balloon.downLeftStem='down_left.png';balloon.upRightStem='up_right.png';balloon.downRightStem='down_right.png';balloon.closeButton='close.png';balloon.closeButtonWidth=16;balloon.allowAJAX=true;balloon.allowIframes=true;balloon.trackCursor=true;balloon.shadow=20;balloon.padding=10;balloon.stemHeight=32;balloon.stemOverlap=3;balloon.vOffset=1;balloon.hOffset=1;balloon.opacity=0.9;balloon.configured=set||true}switch(set){case('GBoxxxx'):balloon.bgColor='whitesmoke';balloon.borderStyle='2px solid gray';balloon.padding=5;balloon.shadow=0;balloon.stem=true;balloon.opacity=0.8;balloon.hOffset=1;balloon.vOffset=1;balloon.allowFade=false;break;case('GPlain'):balloon.padding=5;balloon.images=i3GEO.configura.locaplic+'/pacotes/balloon-tooltips/htdocs/images/GPlain';balloon.ieImage=null;balloon.shadow=0;balloon.stemHeight=15;balloon.stemOverlap=1;balloon.opacity=0.85;break;case('GFade'):balloon.allowFade=true;balloon.fadeIn=1000;balloon.faedOut=200;break}};var currentBalloonClass;var balloonIsVisible;var balloonIsSticky;var balloonInvisibleSelects;var balloonIsSuppressed;var tooltipIsSuppressed;var Balloon=function(){this.trackCursor=true;document.onmousemove=this.setActiveCoordinates;var myObject=this.isIE()?window:document;myObject.onscroll=function(){Balloon.prototype.nukeTooltip()};window.onbeforeunload=function(){Balloon.prototype.nukeTooltip();balloonIsSuppressed=true};if(this.isIE()){this.suppress=true}return this};Balloon.prototype.showTooltip=function(evt,caption,sticky,width,height,x,y){if(!this.configured){BalloonConfig(this,'GBubble')}this.stopTrackingX=this.trackCursor?100:10;this.stopTrackingY=this.trackCursor?50:10;if(this.isIE()&&document.readyState.match(/complete/i)){this.suppress=false}if(this.suppress||balloonIsSuppressed){return false}if(tooltipIsSuppressed&&!sticky){return false}if(this.opacity&&this.opacity<1){this.opacity=parseInt(parseFloat(this.opacity)*100)}else if(this.opacity&&this.opacity==1){this.opacity=100}else if(!this.opacity){this.opacity==100}if(this.isKonqueror()){this.allowFade=false;this.opacity=100}if(this.isIE()&&this.allowFade){this.opacity=100}var mouseOver=true;try{var mouseOver=evt.type.match('mouseover','i')}catch(e){}if(!mouseOver){sticky=true;this.fadeOK=false;if(balloonIsVisible){this.hideTooltip()}}else{this.fadeOK=this.allowFade}if(balloonIsVisible&&!balloonIsSticky&&mouseOver){return false}if(balloonIsVisible&&balloonIsSticky&&!sticky){return false}try{var el=this.getEventTarget(evt)}catch(e){var el=evt}if(sticky&&mouseOver&&this.isSameElement(el,this.currentElement)){return false}this.currentElement=el;this.elCoords=this.getLoc(el,'region');if(!sticky){var mouseoutFunc=el.onmouseout;var closeBalloon=function(){Balloon.prototype.hideTooltip();if(mouseoutFunc){mouseoutFunc()}};if(!mouseOver){el.onmouseup=function(){return false}}}balloonIsSticky=sticky;this.hideTooltip();this.currentHelpText=this.getAndCheckContents(caption);if(!this.currentHelpText){return false}this.width=width;this.height=height;this.actualWidth=null;this.x=x;this.y=y;this.hideTooltip();this.container=document.createElement('div');this.container.id='balloonPreloadContainer';document.body.appendChild(this.container);this.setStyle(this.container,'position','absolute');this.setStyle(this.container,'top',-8888);this.setStyle(this.container,'font-family',this.fontFamily);this.setStyle(this.container,'font-size',this.fontSize);this.currentHelpText=this.currentHelpText.replace(/\&amp;/g,'&amp;amp');this.container.innerHTML=unescape(this.currentHelpText);if(this.images){this.balloonImage=this.balloonImage?this.images+'/'+this.balloonImage:false;this.ieImage=this.ieImage?this.images+'/'+this.ieImage:false;this.upLeftStem=this.upLeftStem?this.images+'/'+this.upLeftStem:false;this.upRightStem=this.upRightStem?this.images+'/'+this.upRightStem:false;this.downLeftStem=this.downLeftStem?this.images+'/'+this.downLeftStem:false;this.downRightStem=this.downRightStem?this.images+'/'+this.downRightStem:false;this.closeButton=this.closeButton?this.images+'/'+this.closeButton:false;this.images=false}if(this.ieImage&&(this.isIE()||this.isChrome())){if(this.isOldIE()||this.opacity||this.allowFade){this.balloonImage=this.ieImage}}if(!this.preloadedImages){var images=[this.balloonImage,this.closeButton];if(this.ieImage){images.push(this.ieImage)}if(this.stem){images.push(this.upLeftStem,this.upRightStem,this.downLeftStem,this.downRightStem)}var len=images.length;for(var i=0;i<len;i++){if(images[i]){this.preload(images[i])}}this.preloadedImages=true}currentBalloonClass=this;if(!mouseOver)el.onmouseup=function(){return false};this.currentEvent=evt;evt.cancelBubble=true;this.setActiveCoordinates([]);this.doShowTooltip();this.pending=true};Balloon.prototype.preload=function(src){var i=new Image;i.src=src;this.setStyle(i,'position','absolute');this.setStyle(i,'top',-8000);document.body.appendChild(i);document.body.removeChild(i)};Balloon.prototype.doShowTooltip=function(){var self=currentBalloonClass;if(balloonIsVisible){return false}if(!self.parent){if(self.parentID){self.parent=document.getElementById(self.parentID)}else{self.parent=document.body}self.xOffset=self.getLoc(self.parent,'x1');self.yOffset=self.getLoc(self.parent,'y1')}window.clearTimeout(self.timeoutFade);if(!balloonIsSticky){self.setStyle('visibleBalloonElement','display','none')}self.parseIntAll();var balloon=self.makeBalloon();var pageWidth=YAHOO.util.Dom.getViewportWidth();var pageCen=Math.round(pageWidth/2);var pageHeight=YAHOO.util.Dom.getViewportHeight();var pageLeft=YAHOO.util.Dom.getDocumentScrollLeft();var pageTop=YAHOO.util.Dom.getDocumentScrollTop();var pageMid=pageTop+Math.round(pageHeight/2);self.pageBottom=pageTop+pageHeight;self.pageTop=pageTop;self.pageLeft=pageLeft;self.pageRight=pageLeft+pageWidth;var vOrient=self.activeTop>pageMid?'up':'down';var hOrient=self.activeRight>pageCen?'left':'right';var helpText=self.container.innerHTML;self.actualWidth=self.getLoc(self.container,'width');if(!isNaN(self.actualWidth)){self.actualWidth+=10}self.parent.removeChild(self.container);var wrapper=document.createElement('div');wrapper.id='contentWrapper';self.contents.appendChild(wrapper);wrapper.innerHTML=helpText;self.setBalloonStyle(vOrient,hOrient,pageWidth,pageLeft);if(balloonIsSticky){self.addCloseButton()}balloonIsVisible=true;self.pending=false;self.showHide();self.startX=self.activeLeft;self.startY=self.activeTop;self.fade(0,self.opacity,self.fadeIn)};Balloon.prototype.addCloseButton=function(){var self=currentBalloonClass;var margin=Math.round(self.padding/2);var closeWidth=self.closeButtonWidth||16;var balloonTop=self.getLoc('visibleBalloonElement','y1')+margin+self.shadow;var BalloonLeft=self.getLoc('topRight','x2')-self.closeButtonWidth-self.shadow-margin;var closeButton=document.getElementById('closeButton');if(!closeButton){closeButton=new Image;closeButton.setAttribute('id','closeButton');closeButton.setAttribute('src',self.closeButton);closeButton.onclick=function(){Balloon.prototype.nukeTooltip();var temp=$i('marcaIdentifica');if(temp){temp.parentNode.removeChild(temp)}};self.setStyle(closeButton,'position','absolute');document.body.appendChild(closeButton)}if(self.isIE()){BalloonLeft=BalloonLeft-5}self.setStyle(closeButton,'top',balloonTop);self.setStyle(closeButton,'left',BalloonLeft);self.setStyle(closeButton,'display','inline');self.setStyle(closeButton,'cursor','pointer');self.setStyle(closeButton,'z-index',999999999)};Balloon.prototype.makeBalloon=function(){var self=currentBalloonClass;var balloon=document.getElementById('visibleBalloonElement');if(balloon){self.hideTooltip()}balloon=document.createElement('div');balloon.setAttribute('id','visibleBalloonElement');self.parent.appendChild(balloon);self.activeBalloon=balloon;self.parts=new Array();var parts=new Array('contents','topRight','bottomRight','bottomLeft');for(var i=0;i<parts.length;i++){var child=document.createElement('div');child.setAttribute('id',parts[i]);balloon.appendChild(child);if(parts[i]=='contents')self.contents=child;self.parts.push(child)}if(self.displayTime){self.timeoutAutoClose=window.setTimeout(this.hideTooltip,self.displayTime)}return balloon};Balloon.prototype.setBalloonStyle=function(vOrient,hOrient,pageWidth,pageLeft){var self=currentBalloonClass;var balloon=self.activeBalloon;if(typeof(self.shadow)!='number')self.shadow=0;if(!self.stem)self.stemHeight=0;var fullPadding=self.padding+self.shadow;var insidePadding=self.padding;var outerWidth=self.actualWidth+fullPadding;var innerWidth=self.actualWidth;self.setStyle(balloon,'position','absolute');self.setStyle(balloon,'top',-9999);self.setStyle(balloon,'z-index',1000000);if(self.height){self.setStyle('contentWrapper','height',self.height-fullPadding)}if(self.width){self.setStyle(balloon,'width',self.width);innerWidth=self.width-fullPadding;if(balloonIsSticky){innerWidth-=self.closeButtonWidth}self.setStyle('contentWrapper','width',innerWidth)}else{self.setStyle(balloon,'width',outerWidth);self.setStyle('contentWrapper','width',innerWidth)}if(!self.width&&self.maxWidth&&outerWidth>self.maxWidth){self.setStyle(balloon,'width',self.maxWidth);self.setStyle('contentWrapper','width',self.maxWidth-fullPadding)}if(!self.width&&self.minWidth&&outerWidth<self.minWidth){self.setStyle(balloon,'width',self.minWidth);self.setStyle('contentWrapper','width',self.minWidth-fullPadding)}self.setStyle('contents','z-index',2);self.setStyle('contents','color',self.fontColor);self.setStyle('contents','font-family',self.fontFamily);self.setStyle('contents','font-size',self.fontSize);self.setStyle('contents','background','url('+self.balloonImage+') top left no-repeat');self.setStyle('contents','padding-top',fullPadding);self.setStyle('contents','padding-left',fullPadding);self.setStyle('bottomRight','background','url('+self.balloonImage+') bottom right no-repeat');self.setStyle('bottomRight','position','absolute');self.setStyle('bottomRight','right',0-fullPadding);self.setStyle('bottomRight','bottom',0-fullPadding);self.setStyle('bottomRight','height',fullPadding);self.setStyle('bottomRight','width',fullPadding);self.setStyle('bottomRight','z-index',-1);self.setStyle('topRight','background','url('+self.balloonImage+') top right no-repeat');self.setStyle('topRight','position','absolute');self.setStyle('topRight','right',0-fullPadding);self.setStyle('topRight','top',0);self.setStyle('topRight','width',fullPadding);self.setStyle('bottomLeft','background','url('+self.balloonImage+') bottom left no-repeat');self.setStyle('bottomLeft','position','absolute');self.setStyle('bottomLeft','left',0);self.setStyle('bottomLeft','bottom',0-fullPadding);self.setStyle('bottomLeft','height',fullPadding);self.setStyle('bottomLeft','z-index',-1);if(this.stem){var stem=document.createElement('img');stem.style.zIndex=50000;self.setStyle(stem,'position','absolute');balloon.appendChild(stem);if(vOrient=='up'&&hOrient=='left'){stem.src=self.upLeftStem;var height=self.stemHeight+insidePadding-self.stemOverlap;self.setStyle(stem,'bottom',0-height);self.setStyle(stem,'right',0)}else if(vOrient=='down'&&hOrient=='left'){stem.src=self.downLeftStem;var height=self.stemHeight-(self.shadow+self.stemOverlap);self.setStyle(stem,'top',0-height);self.setStyle(stem,'right',0)}else if(vOrient=='up'&&hOrient=='right'){stem.src=self.upRightStem;var height=self.stemHeight+insidePadding-self.stemOverlap;self.setStyle(stem,'bottom',0-height);self.setStyle(stem,'left',self.shadow)}else if(vOrient=='down'&&hOrient=='right'){stem.src=self.downRightStem;var height=self.stemHeight-(self.shadow+self.stemOverlap);self.setStyle(stem,'top',0-height);self.setStyle(stem,'left',self.shadow)}if(self.fadeOK&&self.isIE()){self.parts.push(stem)}}if(self.allowFade){self.setOpacity(1)}else if(self.opacity){self.setOpacity(self.opacity)}if(hOrient=='left'){var pageWidth=self.pageRight-self.pageLeft;var activeRight=pageWidth-self.activeLeft;self.setStyle(balloon,'right',activeRight)}else{var activeLeft=self.activeRight-self.xOffset;self.setStyle(balloon,'left',activeLeft)}var overflow=balloonIsSticky?'auto':'hidden';self.setStyle('contentWrapper','overflow',overflow);if(balloonIsSticky){self.setStyle('contentWrapper','margin-right',self.closeButtonWidth)}var balloonLeft=self.getLoc(balloon,'x1');var balloonRight=self.getLoc(balloon,'x2');var scrollBar=20;if(hOrient=='right'&&balloonRight>(self.pageRight-fullPadding)){var width=(self.pageRight-balloonLeft)-fullPadding-scrollBar;self.setStyle(balloon,'width',width);self.setStyle('contentWrapper','width',width-fullPadding)}else if(hOrient=='left'&&balloonLeft<(self.pageLeft+fullPadding)){var width=(balloonRight-self.pageLeft)-fullPadding;self.setStyle(balloon,'width',width);self.setStyle('contentWrapper','width',width-fullPadding)}var balloonWidth=self.getLoc(balloon,'width');var balloonHeight=self.getLoc(balloon,'height');var vOverlap=self.isOverlap('topRight','bottomRight');var hOverlap=self.isOverlap('bottomLeft','bottomRight');if(vOverlap){self.setStyle('topRight','height',balloonHeight-vOverlap[1])}if(hOverlap){self.setStyle('bottomLeft','width',balloonWidth-hOverlap[0])}if(vOrient=='up'){var activeTop=self.activeTop-balloonHeight;self.setStyle(balloon,'top',activeTop)}else{var activeTop=self.activeBottom;self.setStyle(balloon,'top',activeTop)}var balloonTop=self.getLoc(balloon,'y1');var balloonBottom=self.height?balloonTop+self.height:self.getLoc(balloon,'y2');var deltaTop=balloonTop<self.pageTop?self.pageTop-balloonTop:0;var deltaBottom=balloonBottom>self.pageBottom?balloonBottom-self.pageBottom:0;if(vOrient=='up'&&deltaTop){var newHeight=balloonHeight-deltaTop;if(newHeight>(self.padding*2)){self.setStyle('contentWrapper','height',newHeight-fullPadding);self.setStyle(balloon,'top',self.pageTop+self.padding);self.setStyle(balloon,'height',newHeight)}}if(vOrient=='down'&&deltaBottom){var newHeight=balloonHeight-deltaBottom-scrollBar;if(newHeight>(self.padding*2)+scrollBar){self.setStyle('contentWrapper','height',newHeight-fullPadding);self.setStyle(balloon,'height',newHeight)}}var iframe=balloon.getElementsByTagName('iframe');if(iframe[0]){iframe=iframe[0];var w=self.getLoc('contentWrapper','width');if(balloonIsSticky&&!this.isIE()){w-=self.closeButtonWidth}var h=self.getLoc('contentWrapper','height');self.setStyle(iframe,'width',w);self.setStyle(iframe,'height',h);self.setStyle('contentWrapper','overflow','hidden')}self.setStyle('topRight','height',self.getLoc(balloon,'height'));self.setStyle('bottomLeft','width',self.getLoc(balloon,'width'));self.hOrient=hOrient;self.vOrient=vOrient};Balloon.prototype.fade=function(opacStart,opacEnd,millisec){var self=currentBalloonClass||new Balloon;if(!millisec||!self.allowFade){return false}opacEnd=opacEnd||100;var speed=Math.round(millisec/100);var timer=0;for(o=opacStart;o<=opacEnd;o++){self.timeoutFade=setTimeout('Balloon.prototype.setOpacity('+o+')',(timer*speed));timer++}};Balloon.prototype.setOpacity=function(opc){var self=currentBalloonClass;if(!self||!opc)return false;var o=parseFloat(opc/100);var parts=self.isIE()?self.parts:[self.activeBalloon];var len=parts.length;for(var i=0;i<len;i++){self.doOpacity(o,opc,parts[i])}};Balloon.prototype.doOpacity=function(op,opc,el){var self=currentBalloonClass;if(!el)return false;self.setStyle(el,'opacity',op);self.setStyle(el,'filter','alpha(opacity='+opc+')');self.setStyle(el,'MozOpacity',op);self.setStyle(el,'KhtmlOpacity',op)};Balloon.prototype.nukeTooltip=function(){this.hideTooltip(1)};Balloon.prototype.hideTooltip=function(override){if(override&&typeof override=='object')override=false;if(balloonIsSticky&&!override)return false;var self=currentBalloonClass;Balloon.prototype.showHide(1);Balloon.prototype.cleanup();if(self){window.clearTimeout(self.timeoutTooltip);window.clearTimeout(self.timeoutFade);window.clearTimeout(self.timeoutAutoClose);if(balloonIsSticky){self.currentElement=null}self.startX=0;self.startY=0}balloonIsVisible=false;balloonIsSticky=false};Balloon.prototype.cleanup=function(){var self=currentBalloonClass;var body;if(self){body=self.parent?self.parent:self.parentID?document.getElementById(self.parentID)||document.body:document.body}else{body=document.body}var bubble=document.getElementById('visibleBalloonElement');var close=document.getElementById('closeButton');var cont=document.getElementById('balloonPreloadContainer');if(bubble){body.removeChild(bubble)}if(close){body.removeChild(close)}if(cont){body.removeChild(cont)}};hideAllTooltips=function(){var self=currentBalloonClass;if(!self)return;window.clearTimeout(self.timeoutTooltip);if(self.activeBalloon)self.setStyle(self.activeBalloon,'display','none');balloonIsVisible=false;balloonIsSticky=false;currentBalloonClass=null};Balloon.prototype.setActiveCoordinates=function(evt){var self=currentBalloonClass;if(!self){return true}var evt=evt||window.event||self.currentEvent;if(!evt){return true}self.currentEvent={};for(var i in evt){self.currentEvent[i]=evt[i]}self.hOffset=self.hOffset||1;self.vOffset=self.vOffset||1;self.stemHeight=self.stem&&self.stemHeight?(self.stemHeight||0):0;var scrollTop=0;var scrollLeft=0;var XY=[self.x,self.y];adjustment=self.hOffset<20?10:0;self.activeTop=scrollTop+XY[1]-adjustment-self.vOffset-self.stemHeight;self.activeLeft=scrollLeft+XY[0]-adjustment-self.hOffset;self.activeRight=scrollLeft+XY[0];self.activeBottom=scrollTop+XY[1]+self.vOffset+2*adjustment;if(balloonIsVisible&&!balloonIsSticky){var deltaX=Math.abs(self.activeLeft-self.startX);var deltaY=Math.abs(self.activeTop-self.startY);if(XY[0]<self.elCoords.left||XY[0]>self.elCoords.right||XY[1]<self.elCoords.top||XY[1]>self.elCoords.bottom){}if(deltaX>self.stopTrackingX||deltaY>self.stopTrackingY){}else if(self.trackCursor){var b=self.activeBalloon;var bwidth=self.getLoc(b,'width');var bheight=self.getLoc(b,'height');var btop=self.getLoc(b,'y1');var bleft=self.getLoc(b,'x1');if(self.hOrient=='right'){self.setStyle(b,'left',self.activeRight)}else if(self.hOrient=='left'){self.setStyle(b,'right',null);var newLeft=self.activeLeft-bwidth;self.setStyle(b,'left',newLeft)}if(self.vOrient=='up'){self.setStyle(b,'top',self.activeTop-bheight)}else if(self.vOrient=='down'){self.setStyle(b,'top',self.activeBottom)}}}return true};Balloon.prototype.eventXY=function(event){var XY=new Array(2);var e=event||window.event;if(!e){return false}if(e.pageX||e.pageY){XY[0]=e.pageX;XY[1]=e.pageY;return XY}else if(e.clientX||e.clientY){XY[0]=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;XY[1]=e.clientY+document.body.scrollTop+document.documentElement.scrollTop;return XY}};Balloon.prototype.getEventTarget=function(event){var targ;var e=event||window.event;if(e.target)targ=e.target;else if(e.srcElement)targ=e.srcElement;if(targ.nodeType==3)targ=targ.parentNode;return targ};Balloon.prototype.setStyle=function(el,att,val){if(!el){return false}if(typeof(el)!='object'){el=document.getElementById(el)}if(!el){return false}var v=val;if(val&&att.match(/left|top|bottom|right|width|height|padding|margin/)){val=new String(val);if(!val.match(/auto/)){val+='px'}}if(att=='z-index'){if(el.style){el.style.zIndex=parseInt(val)}}else{if(this.isIE()&&att.match(/^left|right|top|bottom$/)&&!parseInt(val)&&val!=0){val=null}YAHOO.util.Dom.setStyle(el,att,val)}};Balloon.prototype.getLoc=function(el,request){var region=YAHOO.util.Dom.getRegion(el);switch(request){case('y1'):return parseInt(region.top);case('y2'):return parseInt(region.bottom);case('x1'):return parseInt(region.left);case('x2'):return parseInt(region.right);case('width'):return(parseInt(region.right)-parseInt(region.left));case('height'):return(parseInt(region.bottom)-parseInt(region.top));case('region'):return region}return region};Balloon.prototype.parseIntAll=function(){this.padding=parseInt(this.padding);this.shadow=parseInt(this.shadow);this.stemHeight=parseInt(this.stemHeight);this.stemOverlap=parseInt(this.stemOverlap);this.vOffset=parseInt(this.vOffset);this.delayTime=parseInt(this.delayTime);this.width=parseInt(this.width);this.maxWidth=parseInt(this.maxWidth);this.minWidth=parseInt(this.minWidth);this.fadeIn=parseInt(this.fadeIn)||1000};Balloon.prototype.showHide=function(visible){var self=currentBalloonClass||new Balloon;if(self.isOldIE()){var balloonContents=document.getElementById('contentWrapper');if(!visible&&balloonContents){var balloonSelects=balloonContents.getElementsByTagName('select');var myHash=new Object();for(var i=0;i<balloonSelects.length;i++){var id=balloonSelects[i].id||balloonSelects[i].name;myHash[id]=1}balloonInvisibleSelects=new Array();var allSelects=document.getElementsByTagName('select');for(var i=0;i<allSelects.length;i++){var id=allSelects[i].id||allSelects[i].name;if(self.isOverlap(allSelects[i],self.activeBalloon)&&!myHash[id]){balloonInvisibleSelects.push(allSelects[i]);self.setStyle(allSelects[i],'visibility','hidden')}}}else if(balloonInvisibleSelects){for(var i=0;i<balloonInvisibleSelects.length;i++){var id=balloonInvisibleSelects[i].id||balloonInvisibleSelects[i].name;self.setStyle(balloonInvisibleSelects[i],'visibility','visible')}balloonInvisibleSelects=null}}if(self.hide){var display=visible?'inline':'none';for(var n=0;n<self.hide.length;n++){if(self.isOverlap(self.activeBalloon,self.hide[n])){self.setStyle(self.hide[n],'display',display)}}}};Balloon.prototype.isOverlap=function(el1,el2){if(!el1||!el2)return false;var R1=this.getLoc(el1,'region');var R2=this.getLoc(el2,'region');if(!R1||!R2)return false;var intersect=R1.intersect(R2);if(intersect){intersect=new Array((intersect.right-intersect.left),(intersect.bottom-intersect.top))}return intersect};Balloon.prototype.isSameElement=function(el1,el2){if(!el1||!el2)return false;var R1=this.getLoc(el1,'region');var R2=this.getLoc(el2,'region');var same=R1.contains(R2)&&R2.contains(R1);return same?true:false};Balloon.prototype.getAndCheckContents=function(caption){this.currentHelpText=this.getContents(caption);this.loadedFromElement=false;return this.currentHelpText};Balloon.prototype.getContents=function(section){if(!this.helpUrl&&!this.activeUrl)return section;if(this.loadedFromElement)return section;var url=this.activeUrl||this.helpUrl;url+=this.activeUrl?'':'?section='+section;this.activeUrl=null;var ajax;if(window.XMLHttpRequest){ajax=new XMLHttpRequest()}else{ajax=new ActiveXObject("Microsoft.XMLHTTP")}if(ajax){ajax.open("GET",url,false);ajax.onreadystatechange=function(){};try{ajax.send(null)}catch(e){}var txt=this.escapeHTML?escape(ajax.responseText):ajax.responseText;return txt||section}else{return section}};Balloon.prototype.isIE=function(){return document.all&&!window.opera};Balloon.prototype.isOldIE=function(){if(navigator.appVersion.indexOf("MSIE")==-1)return false;var temp=navigator.appVersion.split("MSIE");return parseFloat(temp[1])<7};Balloon.prototype.isKonqueror=function(){return navigator.userAgent.toLowerCase().indexOf('konqueror')!=-1};Balloon.prototype.isChrome=function(){return navigator.userAgent.toLowerCase().indexOf('chrome')>-1};i3GEO={parametros:{mapexten:"",mapscale:"",mapres:"",pixelsize:"",mapfile:"",cgi:"",extentTotal:"",mapimagem:"",geoip:"",listavisual:"",utilizacgi:"",versaoms:"",versaomscompleta:"",mensagens:"",w:"",h:"",locsistemas:"",locidentifica:"",r:"",locmapas:"",celularef:"",kmlurl:"",mensageminicia:"",interfacePadrao:"geral.htm",embedLegenda:"nao",autenticadoopenid:"nao"},finaliza:"",temaAtivo:"",contadorAtualiza:0,cria:function(){var temp,i,tamanho;if(window.location.href.split("?")[1]){i3GEO.configura.sid=window.location.href.split("?")[1];if(i3GEO.configura.sid.split("#")[0]){i3GEO.configura.sid=i3GEO.configura.sid.split("#")[0]}}else{i3GEO.configura.sid=""}if(i3GEO.Interface.ALTTABLET!=""){if(i3GEO.util.detectaTablet()){return}}if(!i3GEO.configura.locaplic||i3GEO.configura.locaplic===""){i3GEO.util.localizai3GEO()}tamanho=i3GEO.calculaTamanho();i3GEO.Interface.cria(tamanho[0],tamanho[1]);if(tamanho[0]<550){i=$i(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml);if(i){i.style.display="none"}}},inicia:function(retorno){var montaMapa,mashup,tamanho;if(typeof("i3GEOmantemCompatibilidade")==='function'){i3GEOmantemCompatibilidade()}montaMapa=function(retorno){try{var tempo,titulo,temp,abreJM;if(retorno===""){alert("Ocorreu um erro no mapa - montaMapa");retorno={data:{erro:"erro"}}}if(retorno.data.erro){document.body.style.backgroundColor="white";document.body.innerHTML="<br>Para abrir o i3Geo utilize o link:<br><a href="+i3GEO.configura.locaplic+"/ms_criamapa.php >"+i3GEO.configura.locaplic+"/ms_criamapa.php</a>";return("linkquebrado")}else{if(retorno.data.variaveis){i3GEO.parametros=retorno.data.variaveis;i3GEO.parametros.mapscale=i3GEO.parametros.mapscale*1;i3GEO.parametros.mapres=i3GEO.parametros.mapres*1;i3GEO.parametros.pixelsize=i3GEO.parametros.pixelsize*1;i3GEO.parametros.w=i3GEO.parametros.w*1;i3GEO.parametros.h=i3GEO.parametros.h*1;i3GEO.arvoreDeCamadas.CAMADAS=retorno.data.temas;if(retorno.data.variaveis.navegacaoDir.toLowerCase()==="sim"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir=true}if(i3GEO.Interface.ATUAL==="padrao"){i3GEO.atualiza(retorno)}temp=0;if($i("contemFerramentas")){temp=temp+parseInt($i("contemFerramentas").style.width,10)}if($i("ferramentas")){temp=temp+parseInt($i("ferramentas").style.width,10)}if($i("mst")){$i("mst").style.width=i3GEO.parametros.w+temp+"px"}i3GEO.Interface.inicia()}else{alert("Erro. Impossivel criar o mapa "+retorno.data);return}if($i("ajuda")){i3GEO.ajuda.DIVAJUDA="ajuda"}abreJM="sim";if(i3GEO.util.pegaCookie("botoesAjuda")){abreJM=i3GEO.util.pegaCookie("botoesAjuda");i3GEO.barraDeBotoes.AJUDA=(abreJM==="sim")?true:false}abreJM="sim";if(i3GEO.util.pegaCookie("g_janelaMen")){abreJM=i3GEO.util.pegaCookie("g_janelaMen");i3GEO.configura.iniciaJanelaMensagens=(abreJM==="sim")?true:false}if(i3GEO.configura.iniciaJanelaMensagens===true){i3GEO.ajuda.abreJanela()}if(i3GEO.configura.liberaGuias.toLowerCase()==="sim"){i3GEO.guias.libera()}}if($i("mst")){$i("mst").style.visibility="visible"}}catch(e){alert(e)}};if(!$i("i3geo")){document.body.id="i3geo"}$i("i3geo").className="yui-skin-sam";if(i3GEO.configura.sid===""){mashup=function(retorno){i3GEO.configura.sid=retorno.data;i3GEO.inicia(retorno)};if(i3GEO.Interface.ATUAL!=="padrao"){i3GEO.configura.mashuppar+="&interface="+i3GEO.Interface.ATUAL}i3GEO.php.criamapa(mashup,i3GEO.configura.mashuppar)}else{if(i3GEO.parametros.w===""||i3GEO.parametros.h===""){tamanho=i3GEO.calculaTamanho();i3GEO.parametros.w=tamanho[0];i3GEO.parametros.h=tamanho[1]}i3GEO.php.inicia(montaMapa,i3GEO.configura.embedLegenda,i3GEO.parametros.w,i3GEO.parametros.h)}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.janela.fechaAguarde()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.janela.fechaAguarde()")}if(i3GEO.mapa.AUTORESIZE===true){i3GEO.mapa.ativaAutoResize()}eval(i3GEO.finaliza)},atualiza:function(retorno){var corpoMapa,erro,tempo,mapscale,mapexten,temp;if(i3GEO.contadorAtualiza>1){i3GEO.contadorAtualiza--;return}if(i3GEO.contadorAtualiza>0){i3GEO.contadorAtualiza--}i3GEO.contadorAtualiza++;corpoMapa=function(){if($i("ajaxCorpoMapa")){return}i3GEO.janela.abreAguarde("ajaxCorpoMapa",$trad("o1")+" atualizando...");i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem)};if(arguments.length===0){i3GEO.janela.fechaAguarde("ajaxCorpoMapa");corpoMapa.call();return}if(retorno===""){corpoMapa.call();return}if(!retorno.data){alert(retorno);i3GEO.mapa.recupera.inicia();return}try{if(retorno.data==="erro"){alert("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia();return}else if(retorno.data==="ok"||retorno.data===""){corpoMapa.call();return}}catch(e){}erro=function(){var legimagem,c;legimagem="";c=confirm("Ocorreu um erro, quer tentar novamente?");if(c){corpoMapa.call()}else{i3GEO.janela.fechaAguarde()}return};if(arguments.length===0||retorno===""||retorno.data.variaveis===undefined){erro.call();return}else{if(arguments.length===0){return}i3GEO.mapa.verifica(retorno);tempo="";if(i3GEO.desenho.richdraw){i3GEO.desenho.richdraw.clearWorkspace()}mapscale=i3GEO.parametros.mapscale;i3GEO.atualizaParametros(retorno.data.variaveis);if(retorno.data.variaveis.erro!==""){alert(retorno.data.variaveis.erro)}try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas);if(i3GEO.parametros.mapscale!==mapscale){i3GEO.arvoreDeCamadas.atualizaFarol(i3GEO.parametros.mapscale)}}catch(e){}i3GEO.arvoreDeCamadas.CAMADAS=retorno.data.temas;i3GEO.Interface.redesenha();if($i("i3GEOidentificalistaTemas")){g_tipoacao="identifica";g_operacao='identifica'}else{g_operacao=""}if($i("mensagemt")){$i("mensagemt").value=i3GEO.parametros.mapexten}i3GEO.eventos.navegaMapa();if(i3GEO.configura.entorno.toLowerCase()==="sim"){i3GEO.navega.entorno.geraURL();i3GEO.navega.entorno.ajustaPosicao()}i3GEO.ajuda.mostraJanela("Tempo de redesenho em segundos: "+retorno.data.variaveis.tempo,"");temp=i3GEO.arvoreDeCamadas.verificaAplicaExtensao();if(temp!==""){i3GEO.tema.zoom(temp)}}},calculaTamanho:function(){var diminuix,diminuiy,menos,novow,novoh,w,h,temp;diminuix=(navm)?i3GEO.configura.diminuixM:i3GEO.configura.diminuixN;diminuiy=(navm)?i3GEO.configura.diminuiyM:i3GEO.configura.diminuiyN;menos=0;temp=$i("contemFerramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("contemFerramentas").style.width,10)}temp=$i("ferramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("ferramentas").style.width,10)}if(i3GEO.configura.autotamanho===true){if(window.top===window.self){window.resizeTo(screen.availWidth,screen.availHeight);window.moveTo(0,0)}}novow=YAHOO.util.Dom.getDocumentWidth()-i3GEO.util.getScrollerWidth();novoh=YAHOO.util.Dom.getDocumentHeight();document.body.style.width=novow;document.body.style.height=novoh;w=novow-menos-diminuix;h=novoh-diminuiy;temp=$i("corpoMapa");if(temp){if(temp.style){if(temp.style.width){w=parseInt(temp.style.width,10);h=parseInt(temp.style.width,10);i3GEO.parametros.w=w}if(temp.style.height){h=parseInt(temp.style.height,10);i3GEO.parametros.h=h}}}temp=$i("contemImg");if(temp){temp.style.height=h+"px";temp.style.width=w+"px"}return[w,h]},reCalculaTamanho:function(){var diminuix,diminuiy,menos,novow,novoh,w,h,temp,temp1,antigoh=i3GEO.parametros.h,antigow=i3GEO.parametros.w;diminuix=(navm)?i3GEO.configura.diminuixM:i3GEO.configura.diminuixN;diminuiy=(navm)?i3GEO.configura.diminuiyM:i3GEO.configura.diminuiyN;menos=0;temp=$i("contemFerramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("contemFerramentas").style.width,10)}temp=$i("ferramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("ferramentas").style.width,10)}document.body.style.width="100%";temp=i3GEO.util.tamanhoBrowser();novow=temp[0];novoh=temp[1];temp=(antigoh-(novoh-diminuiy));temp1=(antigow-(novow-diminuix));document.body.style.height=novoh;w=novow-menos-diminuix;h=novoh-diminuiy;temp=$i(i3GEO.Interface.IDMAPA);if(temp){temp.style.height=h+"px";temp.style.width=w+"px";YAHOO.util.Event.addListener(temp,"click",YAHOO.util.Event.stopEvent);YAHOO.util.Event.addFocusListener(temp,YAHOO.util.Event.preventDefault)}temp=$i(i3GEO.Interface.IDCORPO);if(temp){temp.style.height=h+"px";temp.style.width=w+"px";YAHOO.util.Event.addListener(temp,"click",YAHOO.util.Event.stopEvent);YAHOO.util.Event.addFocusListener(temp,YAHOO.util.Event.preventDefault)}temp=$i("mst");if(temp){temp.style.width="100%"}i3GEO.parametros.w=w;i3GEO.parametros.h=h;i3GEO.php.mudatamanho(i3GEO.atualiza,h,w);switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);break;case"googleearth":i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);break;case"openlayers":i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);i3geoOL.updateSize();break}if(i3GEO.guias.TIPO==="sanfona"){i3GEO.guias.ALTURACORPOGUIAS=h-(antigoh-i3GEO.guias.ALTURACORPOGUIAS)}else{i3GEO.guias.ALTURACORPOGUIAS=h}return[w,h]},atualizaParametros:function(variaveis){i3GEO.parametros.mapscale=variaveis.mapscale*1;i3GEO.parametros.mapres=variaveis.mapres*1;i3GEO.parametros.pixelsize=variaveis.pixelsize*1;i3GEO.parametros.mapexten=variaveis.mapexten;i3GEO.parametros.mapimagem=variaveis.mapimagem;i3GEO.parametros.w=variaveis.w*1;i3GEO.parametros.h=variaveis.h*1;i3GEO.parametros.mappath=variaveis.mappath;i3GEO.parametros.mapurl=variaveis.mapurl}};i3GEOF=[];if(typeof(i3GEO)==='undefined'){i3GEO=[]}navm=false;navn=false;chro=navigator.userAgent.toLowerCase().indexOf('chrome')>-1;opera=navigator.userAgent.toLowerCase().indexOf('opera')>-1;if(navigator.appName.substring(0,1)==='N'){navn=true}if(navigator.appName.substring(0,1)==='M'){navm=true}if(opera===true){navn=true}g_operacao="";g_tipoacao="zoomli";$i=function(id){return document.getElementById(id)};Array.prototype.remove=function(s){try{var n=this.length,i;for(i=0;i<n;i++){if(this[i]==s){this.splice(i,1)}}}catch(e){}};i3GEO.util={PINS:[],BOXES:[],escapeURL:function(sUrl){var re;sUrl=escape(sUrl);re=new RegExp("%3F","g");sUrl=sUrl.replace(re,'?');re=new RegExp("%3D","g");sUrl=sUrl.replace(re,'=');re=new RegExp("%26","g");sUrl=sUrl.replace(re,'&');return sUrl},insereCookie:function(nome,valor){var exdate=new Date();exdate.setDate(exdate.getDate()+10);document.cookie=nome+"="+valor+"; expires="+exdate.toUTCString()+";path=/"},pegaCookie:function(nome){var cookies,i,fim;cookies=document.cookie;i=cookies.indexOf(nome);if(i===-1){return null}fim=cookies.indexOf(";",i);if(fim===-1){fim=cookies.length}return(unescape(cookies.substring(i,fim))).split("=")[1]},listaChaves:function(obj){var keys,key;keys=[];for(key in obj){if(obj[key]){keys.push(key)}}return keys},criaBotaoAplicar:function(nomeFuncao,titulo,classe,obj){try{if(typeof(tempoBotaoAplicar)!=='undefined'){clearTimeout(tempoBotaoAplicar)}}catch(e){}var executar=new Function(nomeFuncao+"().call;clearTimeout(tempoBotaoAplicar);"),novoel,xy;tempoBotaoAplicar=setTimeout(executar,(i3GEO.configura.tempoAplicar));if(arguments.length===1){titulo="Aplicar"}if(arguments.length===1||arguments.length===2){classe="i3geoBotaoAplicar"}if(!document.getElementById("i3geo_aplicar")){novoel=document.createElement("input");novoel.id='i3geo_aplicar';novoel.type='button';novoel.value=titulo;novoel.style.cursor="pointer";novoel.style.fontSize="10px";novoel.style.zIndex=15000;novoel.style.position="absolute";novoel.style.display="none";novoel.onmouseover=function(){this.style.display="block"};novoel.onmouseout=function(){this.style.display="none"};novoel.className=classe;document.body.appendChild(novoel)}else{novoel=document.getElementById("i3geo_aplicar")}novoel.onclick=function(){clearTimeout(i3GEO.parametros.tempo);i3GEO.parametros.tempo="";this.style.display='none';eval(nomeFuncao+"\(\)")};if(arguments.length===4){novoel.style.display="block";xy=YAHOO.util.Dom.getXY(obj);YAHOO.util.Dom.setXY(novoel,xy)}return(novoel)},arvore:function(titulo,onde,obj){var arvore,root,tempNode,currentIconMode,d,c,i,linha,conteudo,j,temaNode;if(!$i(onde)){return}try{arvore=new YAHOO.widget.TreeView(onde);root=arvore.getRoot();tempNode=new YAHOO.widget.TextNode('',root,false);tempNode.isLeaf=false;tempNode.enableHighlight=false}catch(e){}titulo="<table><tr><td><b>"+titulo+"</b></td><td></td></tr></table>";d={html:titulo};tempNode=new YAHOO.widget.HTMLNode(d,root,true,true);tempNode.enableHighlight=false;c=obj.propriedades.length;for(i=0,j=c;i<j;i++){linha=obj.propriedades[i];if(linha.url!==""){conteudo="<a href='#' onclick='"+linha.url+"'>"+$trad(linha.text)+"</a>"}else{conteudo=linha.text}d={html:conteudo};temaNode=new YAHOO.widget.HTMLNode(d,tempNode,false,true);temaNode.enableHighlight=false}arvore.collapseAll();arvore.draw()},removeAcentos:function(palavra){var re;re=/ã|á|à|â/gi;palavra=palavra.replace(re,"a");re=/é|ê/gi;palavra=palavra.replace(re,"e");re=/í/gi;palavra=palavra.replace(re,"i");re=/ó|õ|ô/gi;palavra=palavra.replace(re,"o");re=/ç/gi;palavra=palavra.replace(re,"c");re=/ú/gi;palavra=palavra.replace(re,"u");return(palavra)},protocolo:function(){var u=window.location.href;u=u.split(":");return(u[0])},pegaPosicaoObjeto:function(obj){if(obj){if(!obj.style){return[0,0]}var curleft=0,curtop=0,teste;if(obj){if(obj.offsetParent){do{curleft+=obj.offsetLeft-obj.scrollLeft;curtop+=obj.offsetTop-obj.scrollTop;obj=obj.offsetParent}while(obj)}}return[curleft+document.body.scrollLeft,curtop+document.body.scrollTop]}else{return[0,0]}},pegaElementoPai:function(e){var targ;if(!e){e=window.event}if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}if(targ.nodeType===3){targ=targ.parentNode}tparent=targ.parentNode;return(tparent)},mudaCursor:function(cursores,tipo,idobjeto,locaplic){var os=[],o,i,c,n,layers,cursor="",ext=".ff";try{if(navm){ext=".ie"}os.push(document.getElementById(idobjeto));if(i3GEO.Interface.ATUAL==="openlayers"){os=YAHOO.util.Dom.getElementsByClassName('olTileImage','img')}if(i3GEO.Interface.ATUAL==="googlemaps"){os=document.getElementById(idobjeto).firstChild;os=os.getElementsByTagName("div")}n=os.length;if(tipo==="default"||tipo==="pointer"||tipo==="crosshair"||tipo==="help"||tipo==="move"||tipo==="text"){cursor=tipo}else{c=eval("cursores."+tipo+ext)}if(c==="default"||c==="pointer"||c==="crosshair"||c==="help"||c==="move"||c==="text"){cursor=c}if(cursor===""){cursor="URL(\""+locaplic+eval("cursores."+tipo+ext)+"\"),auto"}for(i=0;i<n;i++){o=os[i];if(o){o.style.cursor=cursor}}}catch(e){}},criaBox:function(id){if(arguments.length===0){id="boxg"}if(!$i(id)){var novoel=document.createElement("div");novoel.id=id;novoel.style.zIndex=1;novoel.innerHTML='<font face="Arial" size=0></font>';document.body.appendChild(novoel);novoel.onmouseover=function(){novoel.style.display='none'};novoel.onmouseout=function(){novoel.style.display='block'};i3GEO.util.BOXES.push(id)}else{$i(id).style.display="block"}},escondeBox:function(){var l,i;l=i3GEO.util.BOXES.length;for(i=0;i<l;i++){if($i(i3GEO.util.BOXES[i])){$i(i3GEO.util.BOXES[i]).style.display="none"}}},criaPin:function(id,imagem,w,h,mouseover){if(arguments.length<1||id===""){id="boxpin"}if(arguments.length<2||imagem===""){imagem=i3GEO.configura.locaplic+'/imagens/marker.png'}if(arguments.length<3||w===""){w="21px"}if(arguments.length<4||h===""){h="25px"}if(!$i(id)){var novoel=document.createElement("img");novoel.id=id;novoel.style.zIndex=10000;novoel.style.position="absolute";novoel.style.width=w;novoel.style.height=h;novoel.src=imagem;if(id==="boxpin"){novoel.onmouseover=function(){$i("boxpin").style.display="none"}}else if(mouseover){novoel.onmouseover=mouseover}document.body.appendChild(novoel);i3GEO.util.PINS.push(id)}},posicionaImagemNoMapa:function(id){var i,mx,my;i=$i(id);mx=parseInt(i.style.width,10)/2;my=parseInt(i.style.height,10)/2;i.style.position="absolute";i.style.top=objposicaocursor.telay-my;i.style.left=objposicaocursor.telax-mx;return[objposicaocursor.telay-my,objposicaocursor.telax-mx]},escondePin:function(){var l,i;l=i3GEO.util.PINS.length;for(i=0;i<l;i++){if($i(i3GEO.util.PINS[i])){$i(i3GEO.util.PINS[i]).style.display="none"}}},$im:function(g){return i3GEO.configura.locaplic+"/imagens/visual/"+i3GEO.configura.visual+"/"+g},$inputText:function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome){if(arguments.length===6){nome=""}if(idPai!==""){if(larguraIdPai!==""){$i(idPai).style.width=larguraIdPai+"px"}$i(idPai).style.padding="3";$i(idPai).style.textAlign="center";$i(idPai).onmouseover=function(){this.className="digitarMouseover"};$i(idPai).onmouseout=function(){this.className=""}}return"<input tabindex='0' onmouseover='javascript:this.className=\"digitarOver\";' onmouseout='javascript:this.className=\"digitar\";' onclick='javascript:this.select();this.className=\"digitarMouseclick\";' id='"+idInput+"' title='"+titulo+"' type='text' size='"+digitos+"' class='digitar' value='"+valor+"' name='"+nome+"' />"},$inputTextMudaCor:function(obj){var n=obj.value.split(" ");obj.style.color="rgb("+n[0]+","+n[1]+","+n[2]+")"},$top:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelTop){document.getElementById(id).style.pixelTop=valor}else{document.getElementById(id).style.top=valor+"px"}}},$left:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelLeft){document.getElementById(id).style.pixelLeft=valor}else{document.getElementById(id).style.left=valor+"px"}}},insereMarca:{CONTAINER:[],cria:function(xi,yi,funcaoOnclick,container,texto,srci){if(!srci){srci=i3GEO.configura.locaplic+"/imagens/dot2.gif"}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereMarca(texto,xi,yi,container);return}try{var novoel,i,novoimg,temp;if(i3GEO.util.insereMarca.CONTAINER.toString().search(container)<0){i3GEO.util.insereMarca.CONTAINER.push(container)}if(!$i(container)){novoel=document.createElement("div");novoel.id=container;i=novoel.style;i.position="absolute";if($i(i3GEO.Interface.IDCORPO)){i.top=parseInt($i(i3GEO.Interface.IDCORPO).style.top,10);i.left=parseInt($i(i3GEO.Interface.IDCORPO).style.left,10)}else{i.top=parseInt($i(i3GEO.Interface.IDMAPA).style.top,10);i.left=parseInt($i(i3GEO.Interface.IDMAPA).style.left,10)}document.body.appendChild(novoel)}container=$i(container);novoel=document.createElement("div");i=novoel.style;i.position="absolute";i.zIndex=2000;i.top=(yi-2)+"px";i.left=(xi-2)+"px";i.width="5px";i.height="5px";novoimg=document.createElement("img");if(funcaoOnclick!==""){novoimg.onclick=funcaoOnclick}else{novoimg.onclick=function(){i3GEO.util.insereMarca.limpa()}}novoimg.src=srci;temp=novoimg.style;temp.width="5px";temp.height="5px";temp.zIndex=2000;novoel.appendChild(novoimg);container.appendChild(novoel);if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.util.insereMarca.limpa()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.util.insereMarca.limpa()")}}catch(e){alert("Ocorreu um erro. inseremarca"+e)}},limpa:function(){try{var n,i;n=i3GEO.util.insereMarca.CONTAINER.length;for(i=0;i<n;i++){if($i(i3GEO.util.insereMarca.CONTAINER[i])){$i(i3GEO.util.insereMarca.CONTAINER[i]).innerHTML=""}}i3GEO.util.insereMarca.CONTAINER=[];i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.util.insereMarca.limpa()")}catch(e){}}},adicionaSHP:function(path){i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));var temp=path.split(".");if((temp[1]==="SHP")||(temp[1]==="shp")){i3GEO.php.adicionaTemaSHP(i3GEO.atualiza,path)}else{i3GEO.php.adicionaTemaIMG(i3GEO.atualiza,path)}},abreCor:function(janela,elemento,tipo){if(!i3GEO.configura){i3GEO.configura={locaplic:"../"}}if(arguments.length===2){tipo="rgb"}var ins,temp,novoel,wdocaiframe,fix=false,wlargura="300",waltura="250",wsrc=i3GEO.configura.locaplic+"/ferramentas/colorpicker/index.htm?doc="+janela+"&elemento="+elemento+"&tipo="+tipo,nx="",ny="",texto="Cor",id="i3geo_janelaCor",modal=true,classe="hd";YAHOO.namespace("janelaCor.xp");if($i(id)){YAHOO.janelaCor.xp.panel.destroy()}ins='<div id="'+id+'_cabecalho" class="hd">';ins+="<span><img id='i3geo_janelaCor_imagemCabecalho' style='visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span>";ins+=texto;ins+='</div><div id="i3geo_janelaCor_corpo" class="bd" style="padding:5px">';if(wsrc!==""){ins+='<iframe name="'+id+'i" id="i3geo_janelaCori" valign="top" style="height:230px,border:0px white solid"></iframe>'}ins+='</div>';novoel=document.createElement("div");novoel.id="i3geo_janelaCor";novoel.style.display="block";novoel.innerHTML=ins;if($i("i3geo")){$i("i3geo").appendChild(novoel)}else{document.body.appendChild(novoel)}wdocaiframe=$i("i3geo_janelaCori");if(wdocaiframe){wdocaiframe.style.display="block";wdocaiframe.src=wsrc;wdocaiframe.style.height="250px";wdocaiframe.style.width="325px";wdocaiframe.style.border="0px solid white"}if(nx===""||nx==="center"){fix=true}YAHOO.janelaCor.xp.panel=new YAHOO.widget.ResizePanel(id,{height:"300px",zIndex:5000,modal:modal,width:"350px",fixedcenter:fix,constraintoviewport:false,visible:true,iframe:false});YAHOO.janelaCor.xp.panel.render();$i(id+'_cabecalho').className=classe},ajaxhttp:function(){var objhttp1;try{objhttp1=new XMLHttpRequest()}catch(ee){try{objhttp1=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{objhttp1=new ActiveXObject("Microsoft.XMLHTTP")}catch(E){objhttp1=false}}}return(objhttp1)},ajaxexecASXml:function(programa,funcao){var h,ohttp,retorno;if(programa.search("http")===0){h=window.location.host;if(programa.search(h)<0){alert("OOps! Nao e possivel chamar um XML de outro host.\nContacte o administrador do sistema.\nConfigure corretamente o ms_configura.php");return}}ohttp=i3GEO.util.ajaxhttp();ohttp.open("GET",programa,true);retorno="";ohttp.onreadystatechange=function(){var retorno,parser,dom;if(ohttp.readyState===4){retorno=ohttp.responseText;if(retorno!==undefined){if(document.implementation.createDocument){parser=new DOMParser();dom=parser.parseFromString(retorno,"text/xml")}else{dom=new ActiveXObject("Microsoft.XMLDOM");dom.async="false";dom.load(programa)}}else{dom="erro"}if(funcao!=="volta"){eval(funcao+'(dom)')}else{return dom}}};ohttp.send(null)},aparece:function(id,tempo,intervalo){var n,obj,opacidade,fadei,tempoFadei;n=parseInt(tempo/intervalo,10);obj=$i(id);if(n===1){obj.style.display="block";if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}}tempo=n*intervalo;intervalo=(intervalo*100)/tempo;opacidade=0;if(navm){obj.style.filter='alpha(opacity=0)'}else{obj.style.opacity=0}obj.style.display="block";fadei=function(){opacidade+=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade<100){tempoFadei=setTimeout(fadei,tempo)}else{clearTimeout(tempoFadei);if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}}};tempoFadei=setTimeout(fadei,tempo)},desaparece:function(id,tempo,intervalo,removeobj){var n,obj,opacidade,fade,p,tempoFade;n=parseInt(tempo/intervalo,10);obj=$i(id);if(n===1){obj.style.display="none";if(removeobj){p=obj.parentNode;if(p){p.removeChild(obj)}}return}tempo=n*intervalo;intervalo=(intervalo*100)/tempo;opacidade=100;if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}obj.style.display="block";fade=function(){opacidade-=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade>0){tempoFade=setTimeout(fade,tempo)}else{clearTimeout(tempoFade);obj.style.display="none";if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}if(removeobj){p=obj.parentNode;if(p){p.removeChild(obj)}}}};tempoFade=setTimeout(fade,tempo)},wkt2ext:function(wkt,tipo){var re,x,y,w,xMin,xMax,yMin,yMax,temp;tipo=tipo.toLowerCase();ext=false;if(tipo==="polygon"){try{re=new RegExp("POLYGON","g");wkt=wkt.replace(re,"");wkt=wkt.split("(")[2].split(")")[0];wkt=wkt.split(",");x=[];y=[];for(w=0;w<wkt.length;w++){temp=wkt[w].split(" ");x.push(temp[0]);y.push(temp[1])}x.sort(i3GEO.util.sortNumber);xMin=x[0];xMax=x[(x.length)-1];y.sort(i3GEO.util.sortNumber);yMin=y[0];yMax=y[(y.length)-1];return xMin+" "+yMin+" "+xMax+" "+yMax}catch(e){}}if(tipo==="point"){try{re=new RegExp("POINT","g");wkt=wkt.replace(re,"");wkt=wkt.split("(")[1].split(")")[0];wkt=wkt.split(" ");return(wkt[0]*1-0.01)+" "+(wkt[1]*1-0.01)+" "+(wkt[0]*1+0.01)+" "+(wkt[1]*1+0.01)}catch(e){}}return ext},sortNumber:function(a,b){return a-b},getScrollerWidth:function(){var scr=null,inn=null,wNoScroll=0,wScroll=0;scr=document.createElement('div');scr.style.position='absolute';scr.style.top='-1000px';scr.style.left='-1000px';scr.style.width='100px';scr.style.height='50px';scr.style.overflow='hidden';inn=document.createElement('div');inn.style.width='100%';inn.style.height='200px';scr.appendChild(inn);document.body.appendChild(scr);wNoScroll=inn.offsetWidth;scr.style.overflow='auto';wScroll=inn.offsetWidth;document.body.removeChild(document.body.lastChild);return(wNoScroll-wScroll)},scriptTag:function(js,ini,id,aguarde){if(!aguarde){aguarde=true}var head,script,tipojanela=i3GEO.janela.ESTILOAGUARDE;if(!$i(id)||id===""){head=document.getElementsByTagName('head')[0];script=document.createElement('script');script.type='text/javascript';if(ini!==""){if(navm){script.onreadystatechange=function(){if(this.readyState==='loaded'||this.readyState==='complete'){i3GEO.janela.fechaAguarde(id+"aguarde");i3GEO.janela.ESTILOAGUARDE=tipojanela;eval(ini)}}}else{script.onload=function(){i3GEO.janela.fechaAguarde(id+"aguarde");i3GEO.janela.ESTILOAGUARDE=tipojanela;eval(ini)}}}script.src=js;if(id!==""){script.id=id}head.appendChild(script)}else{if(ini!==""){eval(ini)}}},removeScriptTag:function(id){try{old=$i("loadscriptI3GEO");if(old!==null){old.parentNode.removeChild(old);old=null;eval(id+" = null;")}old=$i(id);if(old!==null){old.parentNode.removeChild(old)}}catch(erro){}},verificaScriptTag:function(texto){var s=document.getElementsByTagName("script"),n=s.length,i,t;for(i=0;i<n;i++){t=s[i].id;t=t.split(".");if(t[0]===texto){return true}}return false},mensagemAjuda:function(onde,texto){var ins="<table style='width:100%;padding:2;vertical-align:top;background-color:#ffffff;' ><tr><th style='background-color: #cedff2; font-family:Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; border: 1px solid #B1CDEB; text-align: left; padding-left: 7px;padding-right: 11px;'>";ins+='<div style="float:right"><img src="'+i3GEO.configura.locaplic+'/imagens/question.gif" /></div>';ins+='<div style="text-align:left;">';if(texto===""){texto=$i(onde).innerHTML}ins+=texto;ins+='</div></th></tr></table>';if(onde!==""){$i(onde).innerHTML=ins}else{return(ins)}},randomRGB:function(){var v=Math.random(),r=parseInt(255*v,10),g;v=Math.random();g=parseInt(255*v,10);v=Math.random();b=parseInt(255*v,10);return(r+","+g+","+b)},rgb2hex:function(str){var re=new RegExp(" ","g"),s=str.replace(re,','),rgb=s.split(",");function hex(x){var hexDigits=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"];return hexDigits[(x-x%16)/16]+hexDigits[x%16]}return"#"+hex(rgb[0])+hex(rgb[1])+hex(rgb[2])},comboTemas:function(id,funcao,onde,nome,multiplo,tipoCombo){if(arguments.length>2){i3GEO.util.defineValor(onde,"innerHTML","<span style=color:red;font-size:10px; >buscando temas...</span>")}if(arguments.length===3){nome=""}if(arguments.length<5){multiplo=false}var monta,lista,temp;monta=function(retorno){var i,comboTemas,temp,n,nome;if(retorno!==undefined){if(retorno.data){retorno=retorno.data}n=retorno.length;if(n>0){if(multiplo){comboTemas="<select style='font-size:12px;' id='"+id+"' size='4' multiple='multiple' name='"+nome+"'>"}else{comboTemas="<select style='font-size:12px;' id='"+id+"' name='"+nome+"'>"}comboTemas+="<option value=''>----</option>";for(i=0;i<n;i++){if(retorno[i].nome){nome=retorno[i].nome;tema=retorno[i].tema}else{nome=retorno[i].tema;tema=retorno[i].name}if(retorno[i].escondido!=="sim"){comboTemas+="<option value="+tema+" >"+nome+"</option>"}}comboTemas+="</select>";temp={dados:comboTemas,tipo:"dados"}}else{if(tipoCombo==="poligonosSelecionados"||tipoCombo==="selecionados"||tipoCombo==="pontosSelecionados"){temp={dados:'<div class=alerta >Nenhum tema encontrado. <span style=cursor:pointer;color:blue onclick="i3GEO.mapa.dialogo.selecao()" > Selecionar...</span></div>',tipo:"mensagem"}}else{temp={dados:'<div class=alerta >Nenhum tema encontrado. </div>',tipo:"mensagem"}}}}else{temp={dados:"<p style=color:red >Ocorreu um erro<br>",tipo:"erro"}}eval("funcao(temp);")};if(tipoCombo==="ligados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="editaveis"){i3GEO.php.listaTemasEditaveis(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}if(tipoCombo==="selecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemasComSel(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="raster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listatemasTipo(monta,"raster",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="pontosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert("Arvore de camadas não encontrada")}}if(tipoCombo==="pontos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert("Arvore de camadas não encontrada")}}if(tipoCombo==="poligonos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert("Arvore de camadas não encontrada")}}if(tipoCombo==="poligonosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert("Arvore de camadas não encontrada")}}if(tipoCombo==="naolinearSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",1,"diferente",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert("Arvore de camadas não encontrada")}}if(tipoCombo==="linhaDoTempo"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("linhadotempo","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert("Arvore de camadas não encontrada")}}if(tipoCombo===""){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type","","diferente",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert("Arvore de camadas não encontrada")}}},checkTemas:function(id,funcao,onde,nome,tipoLista,prefixo,size){if(arguments.length>2){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando temas...</span>"}if(arguments.length===3){nome=""}var monta,lista,temp,temp1,n,i;monta=function(retorno){try{var i,comboTemas,temp,n,nome;if(retorno!==undefined){if(retorno.data){retorno=retorno.data}n=retorno.length;if(n>0){comboTemas="<table class=lista3 >";for(i=0;i<n;i++){if(retorno[i].nome){nome=retorno[i].nome;tema=retorno[i].tema}else{nome=retorno[i].tema;tema=retorno[i].name}comboTemas+="<tr><td><input size=2 style='cursor:pointer' type=checkbox name='"+tema+"' /></td>";comboTemas+="<td>&nbsp;<input style='text-align:left; cursor:text;' onclick='javascript:this.select();' id='"+prefixo+tema+"' type=text size='"+size+"' value='"+nome+"' /></td></tr>"}comboTemas+="</table>";temp={dados:comboTemas,tipo:"dados"}}else{temp={dados:'<div class=alerta >Nenhum tema encontrado.</div>',tipo:"mensagem"}}}else{temp={dados:"<p style=color:red >Ocorreu um erro<br>",tipo:"erro"}}eval("funcao(temp);")}catch(e){}};if(tipoLista==="ligados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="selecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemasComSel(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="raster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listatemasTipo(monta,"raster",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="polraster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS);temp1=i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);n=temp1.length;for(i=0;i<n;i++){temp.push(temp1[i])}monta(temp)}else{alert("Arvore de camadas não encontrada")}}if(tipoLista==="pontosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert("Arvore de camadas não encontrada")}}if(tipoLista==="pontos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert("Arvore de camadas não encontrada")}}},comboItens:function(id,tema,funcao,onde,nome){if(arguments.length>3){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando itens...</span>"}if(arguments.length!==5){nome=""}var monta=function(retorno){var ins,temp,i;if(retorno.data!==undefined){ins=[];ins.push("<select id='"+id+"' name='"+nome+"'>");ins.push("<option value='' >---</option>");temp=retorno.data.valores.length;for(i=0;i<temp;i++){if(retorno.data.valores[i].tema===tema){ins.push("<option value='"+retorno.data.valores[i].item+"' >"+retorno.data.valores[i].item+"</option>")}}ins.push("</select>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</div>',tipo:"erro"}}eval("funcao(temp)")};i3GEO.php.listaItensTema(monta,tema)},comboValoresItem:function(id,tema,itemTema,funcao,onde){if(arguments.length===5){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando valores...</span>"}var monta=function(retorno){var ins=[],i,pares,j,temp;if(retorno.data!==undefined){ins.push("<select id="+id+" >");ins.push("<option value='' >---</option>");for(i=0;i<retorno.data[1].registros.length;i++){pares=retorno.data[1].registros[i].valores;for(j=0;j<pares.length;j++){ins.push("<option value='"+pares[j].valor+"' >"+pares[j].valor+"</option>")}}ins.push("</select>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</erro>',tipo:"erro"}}eval("funcao(temp)")};i3GEO.php.listaValoresItensTema(monta,tema,itemTema)},comboFontes:function(id,onde){$i(onde).innerHTML="<span style=color:red >buscando fontes...</span>";var monta=function(retorno){var ins="",temp,i,dados;if(retorno.data!==undefined){ins+="<select id='"+id+"'>";ins+="<option value='bitmap' >bitmap</option>";dados=retorno.data.split(",");temp=dados.length;for(i=0;i<temp;i++){ins+="<option value='"+dados[i]+"' >"+dados[i]+"</option>"}ins+="</select>"}$i(onde).innerHTML=ins};i3GEO.php.listaFontesTexto(monta)},comboSimNao:function(id,selecionado){var combo="<select name="+id+" id="+id+" >";combo+="<option value='' >---</option>";if(selecionado.toLowerCase()==="sim"){combo+="<option value=TRUE selected >sim</option>"}else{combo+="<option value=TRUE >sim</option>"}if(selecionado==="nao"){combo+="<option value=FALSE selected >não</option>"}else{combo+="<option value=FALSE >não</option>"}combo+="</select>";return(combo)},checkItensEditaveis:function(tema,funcao,onde,size,prefixo){if(onde!==""){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando itens...</span>"}var monta=function(retorno){var ins=[],i,temp,n;if(retorno.data!==undefined){ins.push("<table class=lista3 >");n=retorno.data.valores.length;for(i=0;i<n;i++){ins.push("<tr><td><input size=2 style='cursor:pointer' name='"+retorno.data.valores[i].tema+"' type=checkbox id='"+prefixo+retorno.data.valores[i].item+"' /></td>");ins.push("<td><input style='text-align:left; cursor:text;' onclick='javascript:this.select();' id='"+prefixo+retorno.data.valores[i].item+retorno.data.valores[i].tema+"' type=text size='"+size+"' value='"+retorno.data.valores[i].item+"' /></td></tr>")}ins.push("</table>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</div>',tipo:"erro"}}eval("funcao(temp)")};i3GEO.php.listaItensTema(monta,tema)},radioEpsg:function(funcao,onde,prefixo){if(arguments.length===2){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando...</span>"}var cp,monta=function(retorno){var ins=[],i,n,temp;if(retorno.data!==undefined){ins.push("<table class=lista2 >");ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio checked value='' /></td>");ins.push("<td>"+retorno.data[0].nome+"</td></tr>");ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio value='' /></td>");ins.push("<td>"+retorno.data[1].nome+"</td></tr>");n=retorno.data.length;for(i=2;i<n;i++){ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio value='"+retorno.data[i].codigo+"' /></td>");ins.push("<td>"+retorno.data[i].nome+"</td></tr>")}ins.push("</table>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</erro>',tipo:"erro"}}eval("funcao(temp)")};i3GEO.php.listaEpsg(monta)},proximoAnterior:function(anterior,proxima,texto,idatual,container){var temp=$i(idatual),ndiv=document.createElement("div"),nids,i,fundo,b;if(temp){$i(container).removeChild(temp)}if(!document.getElementById(idatual)){fundo=$i(container).style.backgroundColor;ndiv.id=idatual;texto+="<br><br><table style='width:100%;background-color:"+fundo+";' ><tr style='width:100%'>";if(anterior!==""){texto+="<td style='border:0px solid white;text-align:left;cursor:pointer;background-color:"+fundo+";'><input id='"+idatual+"anterior_' onclick='"+anterior+"' type='button' value='&nbsp;&nbsp;' /></td>"}if(proxima!==""){texto+="<td style='border:0px solid white;text-align:right;cursor:pointer;background-color:"+fundo+";'><input id='"+idatual+"proxima_' onclick='"+proxima+"' type='button' value='&nbsp;&nbsp;' /></td>"}ndiv.innerHTML=texto+"</tr></table>";$i(container).appendChild(ndiv);b=new YAHOO.widget.Button(idatual+"anterior_",{onclick:{fn:function(){eval(anterior+"()")},lazyloadmenu:true}});b=new YAHOO.widget.Button(idatual+"proxima_",{onclick:{fn:function(){eval(proxima+"()")},lazyloadmenu:true}});i=$i(idatual+"proxima_-button");if(i){i.style.backgroundImage="url('"+i3GEO.configura.locaplic+"/imagens/player_avanca.png')";i.style.backgroundRepeat="no-repeat";i.style.backgroundPosition="center center"}i=$i(idatual+"anterior_-button");if(i){i.style.backgroundImage="url('"+i3GEO.configura.locaplic+"/imagens/player_volta.png')";i.style.backgroundRepeat="no-repeat";i.style.backgroundPosition="center center"}}temp=$i(container).getElementsByTagName("div");nids=temp.length;for(i=0;i<nids;i++){temp[i].style.display="none"}$i(idatual).style.display="block"},dialogoFerramenta:function(mensagem,dir,nome){var js=i3GEO.configura.locaplic+"/ferramentas/"+dir+"/index.js.php";if(!$i("i3GEOF."+nome+"_script")){i3GEO.janela.ESTILOAGUARDE="reduzida";i3GEO.util.multiStep([i3GEO.janela.abreAguarde,i3GEO.util.scriptTag],[["i3GEOF."+nome+"_script"+"aguarde","Carregando JS"],[js,"i3GEOF."+nome+".criaJanelaFlutuante()","i3GEOF."+nome+"_script"]],function(){})}else{i3GEO.util.scriptTag(js,"i3GEOF."+nome+".criaJanelaFlutuante()","i3GEOF."+nome+"_script")}},intersectaBox:function(box1,box2){box1=box1.split(" ");box2=box2.split(" ");var box1i=box2,box2i=box1,coordx,coordy,i;coordx=box1[0]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true;coordx=box1[0]*1;coordy=box1[3]*1}if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[3]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}box1=box1i;box2=box2i;coordx=box1[0]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true;coordx=box1[0]*1;coordy=box1[3]*1}if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[3]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}return false},abreColourRamp:function(janela,elemento,ncores){var ins,temp,novoel,wdocaiframe,fix=false,wlargura="300",waltura="480",wsrc=i3GEO.configura.locaplic+"/ferramentas/colourramp/index.php?ncores="+ncores+"&doc="+janela+"&elemento="+elemento,nx="",ny="",texto="Cor",id="i3geo_janelaCorRamp",modal=true,classe="hd";YAHOO.namespace("janelaCorRamp.xp");if($i(id)){YAHOO.janelaCorRamp.xp.panel.destroy()}ins='<div id="'+id+'_cabecalho" class="hd">';ins+="<span><img id='i3geo_janelaCorRamp_imagemCabecalho' style='visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span>";ins+=texto;ins+='</div><div id="i3geo_janelaCorRamp_corpo" class="bd" style="padding:5px">';ins+='<iframe name="'+id+'i" id="i3geo_janelaCorRampi" valign="top" ></iframe>';ins+='</div>';novoel=document.createElement("div");novoel.id="i3geo_janelaCorRamp";novoel.style.display="block";novoel.innerHTML=ins;if($i("i3geo")){$i("i3geo").appendChild(novoel)}else{document.body.appendChild(novoel)}wdocaiframe=$i("i3geo_janelaCorRampi");wdocaiframe.style.display="block";wdocaiframe.src=wsrc;wdocaiframe.style.height="430px";wdocaiframe.style.width="340px";wdocaiframe.style.border="0px solid white";if(nx===""||nx==="center"){fix=true}YAHOO.janelaCorRamp.xp.panel=new YAHOO.widget.ResizePanel(id,{height:"480px",zIndex:5000,modal:modal,width:"350px",fixedcenter:fix,constraintoviewport:false,visible:true,iframe:false});YAHOO.janelaCorRamp.xp.panel.render();$i(id+'_cabecalho').className=classe},localizai3GEO:function(){var scriptLocation="",scripts=document.getElementsByTagName('script'),i=0,index,ns=scripts.length,src;for(i=0;i<ns;i++){src=scripts[i].getAttribute('src');if(src){index=src.lastIndexOf("/classesjs/i3geo.js");if((index>-1)&&(index+"/classesjs/i3geo.js".length===src.length)){scriptLocation=src.slice(0,-"/classesjs/i3geo.js".length);break}index=src.lastIndexOf("/classesjs/i3geonaocompacto.js");if((index>-1)&&(index+"/classesjs/i3geonaocompacto.js".length===src.length)){scriptLocation=src.slice(0,-"/classesjs/i3geonaocompacto.js".length);break}}}if(i3GEO.configura){i3GEO.configura.locaplic=scriptLocation}return scriptLocation},removeChild:function(id,el){var j=$i(id);if(j){if(!el){el=j.parentNode}el.removeChild(j)}},defineValor:function(id,prop,valor){try{eval("$i('"+id+"')."+prop+"='"+valor+"';")}catch(e){}},in_array:function(x,matriz){var txt="¬"+matriz.join("¬")+"¬";var er=new RegExp("¬"+x+"¬","gim");return((txt.match(er))?true:false)},timedProcessArray:function(items,process,callback){var todo=items.concat();setTimeout(function(){var start=+new Date();do{process(todo.shift())}while(todo.length>0&&(+new date()-start<50));if(todo.length>0){setTimeout(arguments.callee,25)}else{callback(items)}},25)},multiStep:function(steps,args,callback){var tasks=steps.concat();setTimeout(function(){var task=tasks.shift(),a=args.shift();task.apply(null,a||[]);if(tasks.length>0){setTimeout(arguments.callee,25)}else{callback()}},25)},tamanhoBrowser:function(){var viewportwidth,viewportheight;if(typeof window.innerWidth!='undefined'){viewportwidth=window.innerWidth,viewportheight=window.innerHeight}else if(typeof document.documentElement!='undefined'&&typeof document.documentElement.clientWidth!='undefined'&&document.documentElement.clientWidth!=0){viewportwidth=document.documentElement.clientWidth,viewportheight=document.documentElement.clientHeight}else{viewportwidth=document.getElementsByTagName('body')[0].clientWidth,viewportheight=document.getElementsByTagName('body')[0].clientHeight}viewportwidth=viewportwidth-i3GEO.util.getScrollerWidth();return[viewportwidth,viewportheight]},detectaTablet:function(){var p,c=DetectaMobile("DetectMobileLong");if(c===false){return false}p=confirm("Direciona para a versão adaptada para tablets?");if(p){window.location=i3GEO.configura.locaplic+'/interface/'+i3GEO.Interface.ALTTABLET+'?'+i3GEO.configura.sid;return true}}};try{YAHOO.namespace("lutsr");YAHOO.lutsr.accordion={properties:{animation:true,animationDuration:10,multipleOpen:false,Id:"sanfona",altura:200,ativa:0},init:function(animation,animationDuration,multipleOpen,Id,altura,ativa){if(animation){this.properties.animation=animation}if(animationDuration){this.properties.animationDuration=animationDuration}if(multipleOpen){this.properties.multipleOpen=multipleOpen}if(Id){this.properties.Id=Id}if(altura){this.properties.altura=altura}if(ativa){this.properties.ativa=ativa}var accordionObject=document.getElementById(this.properties.Id),headers,bodies;if(accordionObject){if(accordionObject.nodeName==="DL"){headers=accordionObject.getElementsByTagName("dt");bodies=headers[0].parentNode.getElementsByTagName("dd")}this.attachEvents(headers,0)}},attachEvents:function(headers,nr){var i,headerProperties,parentObj,header;for(i=0;i<headers.length;i++){headerProperties={objRef:headers[i],nr:i,jsObj:this};YAHOO.util.Event.addListener(headers[i],"click",this.clickHeader,headerProperties)}parentObj=headers[this.properties.ativa].parentNode;headers=parentObj.getElementsByTagName("dd");header=headers[this.properties.ativa];this.expand(header)},clickHeader:function(e,headerProperties){var parentObj=headerProperties.objRef.parentNode,headers=parentObj.getElementsByTagName("dd"),header=headers[headerProperties.nr],i;if(YAHOO.util.Dom.hasClass(header,"open")){headerProperties.jsObj.collapse(header)}else{if(headerProperties.jsObj.properties.multipleOpen){headerProperties.jsObj.expand(header)}else{for(i=0;i<headers.length;i++){if(YAHOO.util.Dom.hasClass(headers[i],"open")){headerProperties.jsObj.collapse(headers[i])}}headerProperties.jsObj.expand(header)}}},collapse:function(header){YAHOO.util.Dom.removeClass(YAHOO.util.Dom.getPreviousSibling(header),"selected");if(!this.properties.animation){YAHOO.util.Dom.removeClass(header,"open")}else{this.initAnimation(header,"close")}},expand:function(header){YAHOO.util.Dom.addClass(YAHOO.util.Dom.getPreviousSibling(header),"selected");if(!this.properties.animation){YAHOO.util.Dom.addClass(header,"open")}else{this.initAnimation(header,"open")}},initAnimation:function(header,dir){var attributes,animation,animationEnd;if(dir==="open"){YAHOO.util.Dom.setStyle(header,"visibility","hidden");YAHOO.util.Dom.setStyle(header,"height",this.properties.altura);YAHOO.util.Dom.addClass(header,"open");attributes={height:{from:0,to:this.properties.altura}};YAHOO.util.Dom.setStyle(header,"height",0);YAHOO.util.Dom.setStyle(header,"visibility","visible");animation=new YAHOO.util.Anim(header,attributes);animationEnd=function(){header.style.height=this.properties.altura+"px"};animation.duration=this.properties.animationDuration;animation.useSeconds=false;animation.onComplete.subscribe(animationEnd);animation.animate()}else if("close"){attributes={height:{to:0}};animationEnd=function(){YAHOO.util.Dom.removeClass(header,"open")};animation=new YAHOO.util.Anim(header,attributes);animation.duration=this.properties.animationDuration;animation.useSeconds=false;animation.onComplete.subscribe(animationEnd);animation.animate()}}}}catch(e){}$im=function(g){return i3GEO.util.$im(g)};$inputText=function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome){if(arguments.length===6){nome=""}return i3GEO.util.$inputText(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome)};$top=function(id,valor){i3GEO.util.$top(id,valor)};$left=function(id,valor){i3GEO.util.$left(id,valor)};g_traducao={"p1":[{pt:"O i3Geo &eacute; software livre! Para download clique <a href='http://mapas.mma.gov.br/download' target=blank >aqui</a>. <b><a href='http://"+window.location.host+"/i3geo/mobile/qrcode.htm' target=blank >Qrcode mobile</a></b>",en:"I3geo is a open source software! <a href='http://mapas.mma.gov.br/download' target=blank >Click</a> to download.",es:"I3Geo es software libre. <a href='http://mapas.mma.gov.br/download' target=blank > Download</a>",it:"I3geo è un software libero! <a href='http://mapas.mma.gov.br/download' target=blank >clicca qui </a> per il download."}],"p2":[{pt:"Filtro de cores",en:"Image type",es:"Tipo de imagen",it:"Tipo di immagine"}],"p3":[{pt:"Legenda",en:"Legend",es:"Subt&iacute;tulo",it:"Legenda"}],"p4":[{pt:"Escala",en:"Scale",es:"Escala",it:"Scala"}],"p5":[{pt:"Tamanho",en:"Size",es:"Tama&ntilde;o",it:"Dimensione"}],"p6":[{pt:"Ativa/desativa entorno",en:"Enable/Disable surrounding",es:"Activar/desactivar entorno",it:"Attiva / Disattiva campo"}],"p7":[{pt:"Ativa/desativa logo",en:"Enable/Disable logo",es:"Activar/desactivar logomarca",it:"Attiva / disattiva logo"}],"p8":[{pt:"Cor da selecao",en:"Selection color",es:"Color de la selecci&oacute;n",it:"Colore della selezione"}],"p9":[{pt:"Cor do fundo",en:"Background color",es:"Color del fondo",it:"Colore dello sfondo"}],"p10":[{pt:"Grade de coordenadas",en:"Graticule",es:"Grado de coordenadas",it:"Reticolo"}],"p11":[{pt:"Template",en:"Template",es:"Template",it:"Template"}],"p12":[{pt:"Temporizador",en:"Timer",es:"Temporizador",it:"Temporizzazione"}],"p13":[{pt:"Propriedades",en:"Properties",es:"Propiedades",it:"Proprietà"}],"p14":[{pt:"Aplicar",en:"Apply",es:"Aplicar",it:"Applica"}],"p15":[{pt:"Formato da imagem do mapa",en:"Image map format",es:"Formato de la imagen del mapa",it:"Image map format"}],"p16":[{pt:"Camadas de fundo",en:"Base layers",es:"Base layers",it:"Base layers"}],"p17":[{pt:"Imprime legenda",en:"Enable legend",es:"Activar Subtitulo",it:"Attiva legenda"}],"p18":[{pt:"Não imprime a legenda",en:"Disable legend",es:"Desactivar Subtitulo",it:"Disattiva legenda"}],"p19":[{pt:"Ativa ou desativa a legenda de um tema na opção de impressão do mapa",en:"Ativa ou desativa a legenda de um tema na opção de impressão do mapa",es:"Ativa ou desativa a legenda de um tema na opção de impressão do mapa",it:"Ativa ou desativa a legenda de um tema na opção de impressão do mapa"}],"p20":[{pt:"Tela remota",en:"Tela remota",es:"Tela remota",it:"Tela remota"}],"s1":[{pt:"Ajuda",en:"Help",es:"Ayuda",it:"Aiuto?"}],"s2":[{pt:"An&aacute;lise",en:"Analysis",es:"An&aacute;lisis",it:"Analisi"}],"s3":[{pt:"Janelas",en:"Windows",es:"Ventanas",it:"Finestra"}],"s4":[{pt:"Arquivo",en:"Files",es:"Archivo",it:"Archivio"}],"s5":[{pt:"Propriedades",en:"Properties",es:"Propiedades",it:"Proprietà"}],"u1":[{pt:"Sobre o i3Geo",en:"About",es:"Sobre I3Geo",it:"Informazioni WebGis"}],"u2":[{pt:"Doc. dos c&oacute;digos",en:"Doc. of the codes",es:"Doc. de los c&oacute;digos",it:"Doc. dei codici"}],"u3":[{pt:"WikiBook",en:"WikiBook",es:"WikiBook",it:"WikiBook"}],"u4":[{pt:"Tutoriais",en:"Tutorials",es:"Tutoriales",it:"Guida"}],"u5":[{pt:"Blog",en:"Blog",es:"Blog",it:"Blog"}],"u5a":[{pt:"Software p&uacute;blico",en:"Software p&uacute;blico",es:"Software p&uacute;blico",it:"Software pubblico"}],"u5b":[{pt:"Lista de fun&ccedil;&otilde;es",en:"Function list",es:"Lista de funciones",it:"Lista delle funzioni"}],"u5c":[{pt:"Redes sociais",en:"Social networks",es:"Redes sociales",it:"Reti sociali"}],"u6":[{pt:"Geometrias",en:"Geometries",es:"Geometr&iacute;as",it:"Geometrie"}],"u7":[{pt:"Grade de poligonos",en:"Polygon grid",es:"Grado de pol&iacute;gonos",it:"Reticolo poligonale"}],"u8":[{pt:"Grade de pontos",en:"Grid of Points",es:"Grado de puntos",it:"Reticolo puntuale"}],"u9":[{pt:"Grade de hex&aacute;gonos",en:"Grid of Hexagons",es:"Grado de hex&aacute;gonos",it:"Reticolo Esagonale"}],"u10":[{pt:"Entorno(Buffer)",en:"Buffer",es:"Entorno (Buffer)",it:"Buffer"}],"u11":[{pt:"Centr&oacute;ide",en:"Centroid",es:"Centro geométrico",it:"Baricentro"}],"u11a":[{pt:"Dist&acirc;ncia entre pontos",en:"Point distance",es:"Distancia de puntos",it:"Distanza tra i punti"}],"u12":[{pt:"N pontos em poligono",en:"N point in polygon",es:"N puntos en pol&iacute;gono",it:"N punti nel Poligono"}],"u13":[{pt:"Ponto em poligono/raster",en:"Point in polygon/raster",es:"Punto en pol&iacute;gono/matriz",it:"Punto nel Poligono / raster"}],"u14":[{pt:"Distribui&ccedil;&atilde;o de pontos",en:"Point distribution",es:"Distribuci&oacute;n de puntos",it:"Distribuzione di punti"}],"u15":[{pt:"Barras de ferramentas",en:"Toolbars",es:"Barras de herramientas",it:"Barre Strumenti"}],"u16":[{pt:"Janela de mensagens",en:"Message window",es:"Ventana de mensajes",it:"Finestra messaggi"}],"u17":[{pt:"Salvar mapa",en:"Save map",es:"Guardar mapa",it:"Salva mappa"}],"u18":[{pt:"Carregar mapa",en:"Load map",es:"Cargar mapa",it:"Apri mappa"}],"u19":[{pt:"Pegar imagens",en:"Get pictures",es:"Tomar im&aacute;genes",it:"Apri immagine"}],"u20":[{pt:"Converter em WMS e WMC",en:"Convert to WMS and WMC",es:"Convertir en WMS y WMC",it:"Converti in WMS e WMC"}],"u20a":[{pt:"Converter em KML",en:"Convert to KML",es:"Convertir en KML",it:"Converti in KML"}],"u21":[{pt:"Gerador de links",en:"Link generator",es:"Generador de enlaces",it:"Genera collegamento"}],"u22":[{pt:"Grade",en:"Graticule",es:"Grado",it:"Reticolo"}],"u23":[{pt:"Ponto",en:"Point",es:"Punto",it:"Punto"}],"u24":[{pt:"Pol&iacute;gono",en:"Polygon",es:"Poligonos",it:"Poligono"}],"u25":[{pt:"Dissolve",en:"Dissolv",es:"Dissolve",it:"Dissolvi"}],"u26":[{pt:"Agrupa",en:"Group",es:"Agrupa",it:"Aggrega"}],"u27":[{pt:"Outros",en:"Others",es:"Otros",it:"Altri"}],"u28":[{pt:"Centro médio",en:"Centro médio",es:"Centro médio",it:"Centro médio"}],"u29":[{pt:"Editor vetorial",en:"Editor vetorial",es:"Editor vetorial",it:"Editor vetorial"}],"t1":[{pt:"Camadas",en:"Layers",es:"Capas",it:"Strati"}],"t2":[{pt:"Arraste o tema aqui para excluir",en:"Drag the layer here to remove",es:"Arrastre el tema aqui para excluirlo",it:"Trascina qui per rimuovere"}],"t2a":[{pt:"Filtra a lista de camadas",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&atilde;o no mapa. Ap&oacute;s alterar o estado do tema, aguarde alguns instantes para o mapa ser redesenhado, ou clique no bot&atilde;o aplicar que ser&aacute; mostrado.",en:"Turn the layer on/off on the map. Wait a few moments to get the map redesigned or press the button to apply it.",es:"Haga clic para conectar o desconectar este tema, mostr&aacute;ndolo o no en el mapa. Despu&eacute;s de alterar el estado del tema, espere algunos instantes para que el mapa sea redise&ntilde;ado, o haga clic en el bot&oacute;n aplicar que se mostrar&aacute;.",it:"Fare clic per attivare o disattivare questo tema. Dopo aver modificato lo stato del tema, La mappa aggiornata sarà visualizzata dopo qualche istante. Per visualizzare subito cliccare su Applica"}],"t3a":[{pt:"Clique para ligar todos os temas",en:"Turn all layers layer on",es:"Haga clic para conectar los temas",it:"Turn all layers on"}],"t3b":[{pt:"Clique para desligar todos os temas",en:"Turn all layers layer off",es:"Haga clic para desconectar los temas",it:"Turn all layers off"}],"t4":[{pt:"limpa sele&ccedil;&atilde;o",en:"Clear selection",es:"Limpia la selecci&oacute;n",it:"Pulizia della selezione"}],"t4a":[{pt:"zoom para a sele&ccedil;&atilde;o",en:"Zoom to selection",es:"Zoom a la selecci&oacute;n",it:"Zoom della selezione"}],"t5":[{pt:"Limpa sele&ccedil;&atilde;o existente nesse tema",en:"Clear selection",es:"Limpia la selecci&oacute;n existente en este tema",it:"Pulizia della selezione esistente in questo strato"}],"t6":[{pt:"Clique para fazer o download desse tema no formato shapefile",en:"Click to download in shapefile format",es:"Haga clic para hacer el download",it:"Clicca per il download di questo tema nel formato Shapefile"}],"t7":[{pt:"clique e arraste",en:"dragging",es:"Haga clic y arrastre",it:"Clicca e trascina"}],"t7a":[{pt:"Clique e arraste para mudar a ordem. Arraste e solte na lixeira para remover. Aguarde para ver a legenda.",en:"dragging or wait",es:"Haga clic y arrastre",it:"Clicca e trascina"}],"t8":[{pt:"arraste para mudar a ordem",en:"drag to change the draw order",es:"Arrastre para cambiar la orden",it:"Trascina per modificare l'ordine"}],"t9":[{pt:"A escala do tema &eacute; compat&iacute;vel com a escala do mapa",en:"The scale of the layer is compatible with the scale of the map",es:"La escala del tema es compatible con la escala del mapa",it:"La scala del tema è compatibile con la scala della mappa"}],"t10":[{pt:"A escala do tema &eacute incompat&iacute;vel com a escala do mapa",en:"The scale of the layer is incompatible with the scale of the map",es:"La escala del tema es incompatible con la escala del mapa",it:"La scala del tema è incompatibile con la scala della mappa"}],"t11":[{pt:"A escala do tema n&atilde;o &eacute conhecida",en:"The scale of the layer is not known",es:"La escala del tema no es conocida",it:"La scala del tema non è conosciuta"}],"t12":[{pt:"excluir",en:"delete",es:"Excluir",it:"Eliminare"}],"t12a":[{pt:"Clique para excluir esse tema do mapa.",en:"Delete layer of the map.",es:"Haga clic para excluir este tema del mapa",it:"Clicca per rimuovere questo strato della mappa"}],"t13":[{pt:"sobe",en:"up",es:"Sube",it:"Mettere sopra "}],"t14":[{pt:"Clique para subir esse tema na ordem de desenho",en:"Drag the layer up",es:"Haga clic para subir ese tema en la orden de dise&ntilde;o",it:"Clicca per sollevare questo tema nell’ordine di progettazione"}],"t15":[{pt:"desce",en:"down",es:"Baja",it:"scendere"}],"t16":[{pt:"Clique para descer esse tema na ordem de desenho",en:"Drag the layer down",es:"Haga clic para bajar este tema en la orden de dise&ntilde;o",it:"Clicca per scendere questo tema nell’ordine di progettazione."}],"t17":[{pt:"zoom para o tema",en:"zoom to a layer",es:"Zoom para el tema",it:"Zoom al tema"}],"t18":[{pt:"Clique para ajustar o mapa de forma a mostrar todo o tema",en:"Click to adjust the map in order to show the whole layer",es:"Haga clic para ajustar el mapa de forma para que muestre todo el tema",it:"Clicca per regolare la mappa per visualizzare tutto lo strato"}],"t18a":[{pt:"Op&ccedil;&otilde;es e propriedades",en:"Options",es:"Opciones",it:"Opzioni"}],"t18b":[{pt:"Legenda",en:"Legend",es:"Subtitulo",it:"Legenda"}],"t19":[{pt:"Altera a transparência do tema, possibilitando que as camadas inferiores possam ser vistas.",en:"Change the layer transparency.",es:"Altera la transparencia del tema, haciendo posible que las capas inferiores puedan verse",it:"Modifica la trasparenza del tema, consentendo che gli strati più bassi siano visti"}],"t20":[{pt:"Opacidade:",en:"Opacity",es:"Opacidad",it:"Opacità"}],"t21a":[{pt:"Muda o nome atual do tema. Utilize para melhorar a legenda do mapa.",en:"Change layer name.",es:"Cambia el nombre actual del tema. Utilice para mejorar el subtitulo del mapa.",it:"Cambia il nome del tema corrente. Utilizzare per migliorare la legenda della mappa."}],"t21":[{pt:"Novo nome:",en:"New name",es:"Nuevo nombre",it:"Nuovo nome"}],"t22":[{pt:"Localize elementos no tema com base em seus atributos descritivos.",en:"Find elements on the layer based on their descriptive attributes.",es:"Ubique elementos en el tema con base en sus atributos descriptivos",it:"Trova gli elementi nel tema secondo i suoi attributi descrittivi."}],"t23":[{pt:"Procurar",en:"Search...",es:"Buscar...",it:"Cerca..."}],"t24":[{pt:"Crie uma nova camada no mapa para apresentar textos descritivos sobre esse tema, tendo como base a tabela de atributos.",en:"Create a new layer to display descriptive texts on the subject, based on table of attributes.",es:"Crear una nueva capa en el mapa para presentar textos descriptivos sobre este tema, teniendo como base la tabla de atributos",it:"Creare un nuovo strato sulla mappa per visualizzare testi descrittivi sul tema, secondo la tabella di attributi."}],"t25":[{pt:"Texto (nomes ou valores)",en:"Label...",es:"Texto...",it:"Testo..."}],"t26":[{pt:"Defina as etiquetas que ser&atilde;o mostradas quando o mouse &eacute; estacionado sobre um elemento desse tema.",en:"Set the tooltips that will be shown when the mouse is over the element of that layer.",es:"Defina las etiquetas que se mostrar&aacute;n cuando el rat&oacute;n se estaciona sobre un elemento de este tema",it:"Definire le etichette da visualizzare quando il mouse si ferma su un elemento di questo tema."}],"t27":[{pt:"Ativar etiquetas",en:"Tooltip...",es:"Etiquetas...",it:"Descrizioni..."}],"t28":[{pt:"Insira um filtro nesse tema para mostrar apenas determinadas informa&ccedil;&otilde;es, com base na tabela de atributos.",en:"Filter based on the table of attributes.",es:"Inserte un filtro en este tema para mostrar solo determinadas informaciones, con base en la tabla de atributos",it:"Inserisci un filtro in questo tema per mostrare solo determinate informazioni, con base nella tabella di attributi"}],"t29":[{pt:"Filtrar",en:"Filter...",es:"Filtro...",it:"Filtro..."}],"t30":[{pt:"Veja a tabela de atributos relacionada a esse tema.",en:"See the table of attributes related to that layer.",es:"Vea la tabla de atributos relacionada con este tema",it:"Vedi la tabella degli attributi di questo tema."}],"t31":[{pt:"Tabela com os dados",en:"Table...",es:"Tabla...",it:"Tabella..."}],"t32":[{pt:"Abre o editor de legenda, permitindo a alteração da forma de representação desse tema.",en:"Opens the editor of legend, allowing the modification of the form of representation of this theme.",es:"Abre el editor de subtítulo, permitiendo la alteraci&oacute;n de la forma de representaci&oacute;n de este tema",it:"Aprire l'editor di legenda, che consente la modifica della forma di rappresentazione di questo tema "}],"t33":[{pt:"Editar legenda",en:"Legend edit...",es:"Editar subtítulo...",it:"Modifica la legenda"}],"t34":[{pt:"Mostra os dados desse tema em uma janela que acompanha o mouse.",en:"The data shows that layer in a window that tracks the mouse.",es:"Muestra los datos de este tema en una ventana que acompa&ntilde;a el rat&oacute;n",it:"Mostra i dati di questo tema in una finestra che accompagna il mouse."}],"t35":[{pt:"Mostra em janela",en:"Show in window",es:"Muestra en la ventana...",it:"Mostra nella finestra..."}],"t36":[{pt:"tema vis&iacute;vel apenas em determinadas escalas",en:"the layer is visible in specific scales",es:"capa visible en ciertas escalas",it:"Tema visibile solo a determinate scale"}],"t37":[{pt:"Gráfico",en:"Graphic",es:"Gr&aacute;fico",it:"Grafico"}],"t38":[{pt:"Exporta a legenda para o padrão SLD.",en:"Export the legend to SLD.",es:"Exporta a legenda para o padrão SLD.",it:"Exporta a legenda para o padrão SLD."}],"t39":[{pt:"Exportar SLD",en:"SLD...",es:"SLD...",it:"SLD..."}],"t40":[{pt:"Abre a ferramenta que permite alterar o SQL de acesso aos dados",en:"Abre a ferramenta que permite alterar o SQL de acesso aos dados",es:"Abre a ferramenta que permite alterar o SQL de acesso aos dados",it:"Abre a ferramenta que permite alterar o SQL de acesso aos dados"}],"t41":[{pt:"Editar SQL",en:"SQL...",es:"SQL...",it:"SQL..."}],"t42":[{pt:"Efeito cortina",en:"Curtain...",es:"Cortina...",it:"Tenda..."}],"t43":[{pt:"Aplicar SLD",en:"Aplicar SLD...",es:"Aplicar SLD...",it:"Aplicar SLD..."}],"t44":[{pt:"Salvar mapfile",en:"Save mapfile",es:"Guardar mapfile",it:"Salva mapfile"}],"t45":[{pt:"Comentar",en:"Comentar",es:"Comentar",it:"Comentar"}],"t46":[{pt:"Mais populares",en:"Mais populares",es:"Mais populares",it:"Mais populares"}],"t47":[{pt:"Intervalo em segundos após o qual a camada será atualizada. Para ignorar, deixe em branco",en:"Intervalo em segundos após o qual a camada será atualizada. Para ignorar, deixe em branco",es:"Intervalo em segundos após o qual a camada será atualizada. Para ignorar, deixe em branco",it:"Intervalo em segundos após o qual a camada será atualizada. Para ignorar, deixe em branco"}],"t48":[{pt:"Temporizador",en:"Temporizador",es:"Temporizador",it:"Temporizador"}],"a1":[{pt:"procurar tema:",en:"search layer:",es:"Buscar datos:",it:"Ricerca il tema:"}],"a2":[{pt:"Upload de shape file",en:"Upload shape file",es:"Upload de shape file",it:"Upload del shape file"}],"a2b":[{pt:"Upload de arquivo dbf ou CSV",en:"Upload dbf or CSV file",es:"Upload de archivo dbf o CSV",it:"Upload del file dbf o CSV"}],"a3":[{pt:"Download de dados",en:"Data download",es:"Download de datos",it:"Download dei dati"}],"a3a":[{pt:"Importar Web Map Context (WMC)",en:"Importar Web Map Context (WMC)",es:"Importar Web Map Context (WMC)",it:"Importar Web Map Context (WMC)"}],"a4":[{pt:"Conectar com servidor WMS",en:"WMS server connection",es:"Conectar con el servidor WMS",it:"Connetti con il server WMS"}],"a4b":[{pt:"Conectar com servidor WMS-T",en:"WMS-T server connection",es:"Conectar con el servidor WMS-T",it:"Connetti con il server WMS-T"}],"a5":[{pt:"Conectar com GeoRss",en:"GeoRss connection",es:"Conectar con GeoRss",it:"Connetti con il GeoRss"}],"a5a":[{pt:"Nuvem de tags",en:"Tags cloud",es:"Tags",it:"Tag"}],"a6":[{pt:"Acesso aos arquivos do servidor",en:"Access files in server directory",es:"Acceso a los archivos del servidor",it:"Accesso agli archivi del server"}],"a7":[{pt:"Temas",en:"Layers",es:"Temas",it:"Temi"}],"a8":[{pt:"Clique no box ao lado do tema para ligar ou desligar, mostrando-o ou nã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.",en:"Click to connect or disconnect layer, showing it or not on the map. After changing the layer status, wait a few moments to be redesigned the map, or click in the button apply that will be shown.",es:"Haga clic para conectar o desconectar este tema, mostr&aacute;ndolo o no en el mapa. Despu&eacute;s de alterar el estado del tema, espere algunos instantes para que el mapa sea redise&ntilde;ado, o haga clic en el bot&oacute;n aplicar que aparecer&aacute;",it:"Clicca sulla casella accanto al tema per attivare o disattivare, mostrandolo o meno sulla mappa. Dopo aver modificato lo stato del tema, attendere qualche istante per vedere ridisegnata la mappa, oppure fare clic sul pulsante Applica, che verrà visualizzato."}],"a9":[{pt:"fonte",en:"font",es:"Fuente",it:"Fonte"}],"a10":[{pt:"c&oacute;digo:",en:"code",es:"C&oacute;digo",it:"Codice"}],"a11":[{pt:"Sistemas",en:"Systems",es:"Sistemas",it:"Sistemi"}],"a12":[{pt:"Abrir sistema",en:"Open system",es:"Abrir sistema",it:"Aprire il sistema"}],"a13":[{pt:"Abrir no Google Earth",en:"Open in Google Earth",es:"Abrir no Google Earth",it:"Abrir no Google Earth"}],"a14":[{pt:"Upload SHP, CSV, DBF, GPX, KML",en:"Upload SHP, CSV, DBF, GPX, KML",es:"Upload SHP, CSV, DBF, GPX, KML",it:"Upload SHP, CSV, DBF, GPX, KML"}],"g1":[{pt:"Temas",en:"Layer",es:"Temas",it:"Temi"}],"g1a":[{pt:"Catálogo",en:"Catalog",es:"Catalogo",it:"Catalog"}],"g2":[{pt:"Adiciona",en:"Add",es:"Agrega",it:"Aggiunge"}],"g3":[{pt:"Legenda",en:"Legend",es:"Subtítulo",it:"Legenda"}],"g4":[{pt:"Mapas",en:"Maps",es:"Mapas",it:"Mappa"}],"g4a":[{pt:"Mapa",en:"Map",es:"Mapa",it:"Mappe"}],"o1":[{pt:"Aguarde...",en:"Wait...",es:"Espere...",it:"Attendere..."}],"o2":[{pt:"Busca r&aacute;pida...",en:"Quick search...",es:"B&uacute;squeda r&aacute;pida...",it:"Ricerca rapida ..."}],"o3":[{pt:"Lendo imagem...",en:"Loading images...",es:"Leyendo imagen...",it:"Lettura di immagini..."}],"o4":[{pt:"Aguarde...abrindo lente",en:"Wait...Opening lens...",es:"Espere...abriendo lente",it:"Attendere...apertura della lente"}],"o5":[{pt:"Aguarde...iniciando",en:"Wait...initializing",es:"Espere...iniciando",it:"Attendere...partenza"}],"o6":[{pt:"din&acirc;mico",en:"dynamic",es:"Din&aacute;mico",it:"Dinamico"}],"d1":[{pt:"Digite as coordenadas de um ponto (X=longitude e Y=latitude) para localiz&acute;-lo no mapa. O centro do mapa ser&acute; deslocado para o ponto digitado.",en:"Enter the coordinates of a point (X=longitude and Y=latitude) to localize it on the map. The center of the map is move to the point entered.",es:"Digite las coordenadas de un punto (X=longitud e Y=latitud) para ubicarlas en el mapa. El centro del mapa se desplazar&aacute; para el punto digitado.",it:"Inserisci le coordinate di un punto (X=longitudine e Y=latitudine) per individuarlo sulla mappa. Il centro della mappa viene spostato al punto digitato"}],"d2":[{pt:"Altera a escala do mapa ajustando-a para mostrar a mesma abrang&ecirc;ncia geogr&aacute;fica da inicializa&ccedil;&atilde;o.",en:"Change the scale of the map adjusting it to show the same initial geographical cover.",es:"Modifica la escala del mapa ajust&aacute;ndola para mostrar la misma &aacute;rea geogr&aacute;fica inicial",it:"Modificare la scala della mappa adeguandola per mostrare la stessa copertura geografica sin dall'inizializzazione"}],"d3":[{pt:"Amplia o mapa - desloca o ponto clicado para centro da tela ou amplia a regi&atilde;o indicada por um ret&acirc;ngulo. Ap&oacute;s ativada, clique e arraste o mouse sobre o mapa na &aacute;rea de zoom desejada.",en:"Extends the map - place the clicked point in the center of the screen or extends the region indicated by a rectangular.After enabled, click and drag the mouse over the map in the area of zoom desired.",es:"Ampl&iacute;a el mapa - coloca el punto donde se hizo clic en el centro de la pantalla o ampl&iacute;a la regi&oacute;n indicada por un rect&aacute;ngulo. Despu&eacute;s de activarla, haga clic y arrastre el rat&oacute;n sobre el mapa en el &aacute;rea de zoom deseada",it:"Ampliare la mappa - pone il punto cliccato nel centro dello schermo o ingrandisce la regione indicata con un rettangolo. Dopo aver attivata, cliccare e trascinare il mouse sopra la mappa nell’area di zoom desiderata."}],"d4":[{pt:"Desloca a regi&atilde;o vis&iacute;vel no mapa. Ap&oacute;s ativada, clique e arraste o mouse sobre o mapa para deslocar a regi&atilde;o vis&iacute;vel.",en:"Shifts the region visible on the map. Once activated, click and drag the mouse over the map to move the visible region.",es:"Desloca la regi&oacute;n visible en el mapa",it:"Sposta la regione visibile sulla mappa. Dopo averla attivata, cliccare e trascinare il mouse sulla mappa per spostare la regione visibile "}],"d5":[{pt:"Amplia o mapa tendo como refer&ecirc;ncia o centro atual.",en:"Magnify the map with the reference the current center.",es:"Ampl&iacute;a el mapa teniendo como referencia el centro actual",it:"Estendi la mappa tenendo come riferimento il centro corrente."}],"d6":[{pt:"Reduz o mapa tendo como refer&ecircncia o centro atual.",en:"Reduces the map as having reference the current center.",es:"Reduce el mapa teniendo como referencia el centro actual",it:"Riduci la mappa tenendo come referimento il centro corrente"}],"d7":[{pt:"Mostra informa&ccedil;&otilde;es sobre um ponto no mapa. Ap&oacute;s ativada, clique sobre o mapa.",en:"Displays information about a point on the map. Once activated, click on it.",es:"Muestra informaci&oacute;n sobre un punto en el mapa. Despu&eacute;s de activarla haga clic sobre el mismo.",it:"Mostra gli informazioni su un punto sulla mappa. Dopo averla attivata, fare clic su di esso."}],"d7a":[{pt:"Mostra informa&ccedil;&otilde;es sobre um ponto no mapa. Ap&oacute;s ativada, pare o mouse por alguns instantes no ponto desejado ou clique sobre o mesmo.",en:"Displays information about a point on the map. Once activated, stop the mouse for a few moments at the desired point or click on it.",es:"Muestra informaci&oacute;n sobre un punto en el mapa. Despu&eacute;s de activarla, pare el rat&oacute;n por algunos instantes en el punto deseado o haga clic sobre el mismo.",it:"Mostra gli informazioni su un punto sulla mappa. Dopo averla attivata, fermare il mouse per qualche istante nel punto desiderato o fare clic su di esso."}],"d8":[{pt:"Mostra a extens&atilde;o geogr&aacute;fica atual em coordenadas geogr&aacute;ficas",en:"It shows the extent of current geographic coordinates",es:"Muestra la extensi&oacute;n geográfica actual en coordenadas geogr&aacute;ficas",it:"Mostra la estensione geografica corrente in coordinate geografiche"}],"d9":[{pt:"Abre/fecha o mapa de refer&ecirc;ncia",en:"Open/close the reference map ",es:"Abre/cierra el mapa de referencia",it:"Apertura/chiusura della mappa di riferimento"}],"d10":[{pt:"Digite o novo valor de escala e clique no bot&atilde;o aplicar para alterar a escala do mapa",en:"Enter the new value of scale and click the button Apply to change the scale of the map",es:"Digite el nuevo valor de escala y haga clic en el bot&oacute;n aplicar para modificar la escala del mapa",it:"Immettere il nuovo valore di scala e clicca sul pulsante Applica per cambiare la scala della mappa"}],"d11":[{pt:"Busca dados na Wikipedia na abrang&ecirc;ncia atual do mapa. Fa&ccedil;a um zoom no mapa antes de abrir essa op&ccedil;&atilde;o. Regi&ocirc;es muito extensas podem tornar a busca muito demorada",en:"Search data on Wikipedia in the current scope of the map. Make a zoom on the map before opening this option. Regions very extensive can make a very long search ",es:"Busca datos en Wikipedia en el alcance actual del mapa. Haga zoom en el mapa antes de abrir esta opci&oacute;n. Regiones muy extensas pueden ocasionar una b&uacute;squeda muy lenta",it:"Ricerca dati su Wikipedia nell'ambito corrente della mappa. Fare uno zoom sulla mappa prima dell’apertura di questa opzione. Regioni molto ampie potrebbero causare una ricerca troppo lenta."}],"d12":[{pt:"Imprime o mapa",en:"Print the map",es:"Imprime el mapa",it:"Stampa la mappa"}],"d13":[{pt:"Localiza o IP do usu&aacute;rio no mapa",en:"Locates the user's IP on the map",es:"Ubica el IP del usuario en el mapa",it:"Trova IP dell'utente nella mappa"}],"d14":[{pt:"Gera arquivo para 3d",en:"Generates file for 3d",es:"Genera archivo para 3d",it:"Genera file per 3d"}],"d15":[{pt:"Abre o Google Maps, mostrando uma imagem de sat&eacute;lite da regi&atilde;o vista no mapa principal",en:"Open Google Maps, showing a satellite image of the region's main views on the map",es:"Abre Google Maps, mostrando una imagen de sat&eacute;lite de la regi&oacute;n en el mapa principal",it:"Apri Google Maps, mostrando un'immagine satellitare della regione vista sulla mappa principale."}],"d16":[{pt:"Pesquisa documentos na base de dados Scielo (dados preliminares)",en:"Search documents in the database Scielo (preliminary data)",es:"Busca documentos en la base de datos Scielo (datos preliminares)",it:"Ricerca dei documenti nella base di dati Scielo (dati preliminari)"}],"d17":[{pt:"Projeto Confluence. Pontos de intersec&ccedil;&atilde;o de coordenadas observadas em campo",en:"Confluence Project. Points of intersection of coordinates observed in field",es:"Proyecto Confluence. Puntos de intersecci&oacute;n de coordenadas observadas en campo",it:"Progetto di confluenza. Punti di intersezione delle coordinate osservate in campo"}],"d18":[{pt:"Abre lente de amplia&ccedil;&atilde;o",en:"Opens lens to expansion",es:"Abre lente de ampliaci&oacute;n",it:"Apri lente di ingrandimento"}],"d19":[{pt:"Coloca as guias em uma janela m&oacute;vel",en:"Open the tabs in a window mobile",es:"Coloca las gu&iacute;as en una ventana m&oacute;vil",it:"Aprire le schede in una finestra mobile."}],"d20":[{pt:"Redesenha o mapa com as configura&ccedil;&ocirc;es iniciais.",en:"Reload the map with the initial configurations.",es:"Redise&ntilde;a el mapa con las configuraciones iniciales",it:"Ricarica la mappa con la configurazione iniziale."}],"d21":[{pt:"Mede a dist&acirc;ncia entre dois ou mais pontos clicados no mapa (menor dist&acirc;ncia). O c&aacute;lculo de dist&acirc;ncia &eacute; aproximado e sua precis&atilde;o depende da escala do mapa.",en:"It measures the distance between two or more clicked points on the map (less distance). The calculation of distance is approximate and their accuracy depends on the scale of the map.",es:"Mide la distancia entre dos o m&aacute;s puntos marcados en el mapa (menor distancia). El c&aacute;lculo de distancia es aproximado y su precisi&oacute;n depende de la escala del mapa",it:"Misura la distanza tra due o più punti cliccati sulla mappa (minore distanza). Il calcolo della distanza è approssimativo e la sua precisione dipende dalla scala della mappa."}],"d21a":[{pt:"Mede a &aacute;rea de um pol&iacute;gono desenhado na tela. O c&aacute;lculo de &aacute;rea &eacute; aproximado e sua precis&atilde;o depende da escala do mapa.",en:"It measures the area on the map. The calculation of area is approximate and their accuracy depends on the scale of the map.",es:"Mede a &aacute;rea de um pol&iacute;gono desenhado na tela. O c&aacute;lculo de &aacute;rea &eacute; aproximado e sua precis&atilde;o depende da escala do mapa.",it:"Misura l'area di un poligono tracciato sullo schermo. Il calcolo della superficie è approssimativo e la sua precisione dipende dalla scala della mappa."}],"d22":[{pt:"Insere pontos no mapa em coordenadas geogr&aacute;ficas. Ospontos inclu&iacute;dos podem ser transformados em linhas ou pol&iacute;gonos. Os pontos s&atilde;o armazenados em um tema tempor&aacute;rio, podendo-se fazer o download do arquivo shapefile.",en:"Insert points on the map in geographical coordinates. Items included can be converted into lines or polygons. Items are stored in a temporary layer, can be to download shapefile.",es:"Inserte puntos en el mapa en coordenadas geogr&aacute;ficas. Los puntos incluidos pueden transformarse en l&iacute;neas o pol&iacute;gonos. Los puntos se almacenan en un tema temporal, pudiendo hacerse el download del archivo shapefile.",it:"Inserire punti sulla mappa in coordinate geografiche. I punti inseriti possono essere trasformati in linee o poligoni. I punti vengono memorizzati in un tema temporaneo, con la possibilità di effettuare il download del file Shapefile."}],"d23":[{pt:"Insere um gr&aacute;fico no ponto clicado conforme os atributos existentes no tema escolhido. O tema deve possuir itens com valores num&eacute;ricos na tabela de atributos.",en:"Insert a graphic in the clicked point as the exist attributes in the chosen layer. The layer must have items with numerical values in the table of attributes.",es:"Inserte un gr&aacute;fico en el punto marcado seg&uacute;n los atributos existentes en el tema elejido. El tema debe tener puntos con valores num&eacute;ricos en la tabla de atributos",it:"Inserire un grafico nel punto cliccato con gli attributi che esistono nel tema scelto. Il tema deve avere gli oggetti con valori numerici contenute nella tabella di attributi."}],"d24":[{pt:"Abre as ferramentas para sele&ccedil;&atilde;o de elementos de um tema. Os elementos selecionados podem ser utilizados em outras opera&ccedil;&ocirc;es, como buffer e sele&ccedil;&atilde;o por tema.",en:"Opens the tools to select elements of a layer. The elements selected can be used in other buffer or selection operation by layer .",es:"Abre las herramientas para selecci&oacute;n de elementos de un tema. Los elementos seleccionados pueden utilizarse en otras ",it:"Aprire gli strumenti per selezionare gli elementi di un tema. Gli elementi selezionati possono essere utilizzati in altre operazioni, come ad esempio buffer e selezione per tema."}],"d25":[{pt:"Insere texto no mapa clicando em um ponto. Utilize essa op&ccedil;&atilde;o para adicionar informa&ccedil;&ocirc;es ao mapa.",en:"Insert text on the map by clicking on a point. Use this option to add information on the map.",es:"Inserte texto en el mapa haciendo clic en un punto. Utilice esta opci&oacute;n para agregar informaci&oacute;n al mapa",it:"Inserisci il testo sulla mappa cliccando su un punto. Utilizzare questa opzione per aggiungere informazioni alla mappa."}],"d26":[{pt:"Escolha o visual para os botões e outras caracter&iacute;sticas visuais do mapa",en:"Choose look for the buttons and other map's visual characteristics",es:"Elija la vista para los botones y otras caracter&iacute;sticas visuales del mapa",it:"Scegli il visuale (??) per i pulsanti e le altre caratteristiche visive della mappa."}],"d27":[{pt:"Interface",en:"Interface",es:"Interface",it:"Interface"}],"d28":[{pt:"Aguarde...gerando os arquivos",en:"Wait...",es:"Espere...",it:"Attendere..."}],"d29":[{pt:"Estações metar",en:"Estações metar",es:"Estações metar",it:"Estações metar"}],"d30":[{pt:"Linha do tempo",en:"Time line",es:"Linha do tempo",it:"Linha do tempo"}],"d31":[{pt:"Não existe nenhuma camada com etiquetas ativas",en:"Não existe nenhuma camada com etiquetas ativas",es:"Não existe nenhuma camada com etiquetas ativas",it:"Não existe nenhuma camada com etiquetas ativas"}],"d32":[{pt:"Aplicativos",en:"Applications",es:"Aplicaciones",it:"Applicazioni"}],"ge1":[{pt:"Navegação com o mouse",en:"Navegação com o mouse",es:"Navegação com o mouse",it:"Navegação com o mouse"}],"ge2":[{pt:"Barra de status",en:"Barra de status",es:"Barra de status",it:"Barra de status"}],"ge3":[{pt:"Mapa de referência",en:"Mapa de referência",es:"Mapa de referência",it:"Mapa de referência"}],"ge4":[{pt:"Escala e legenda",en:"Escala e legenda",es:"Escala e legenda",it:"Escala e legenda"}],"ge5":[{pt:"Atmosfera",en:"Atmosfera",es:"Atmosfera",it:"Atmosfera"}],"ge6":[{pt:"Grade de coordenadas",en:"Grade de coordenadas",es:"Grade de coordenadas",it:"Grade de coordenadas"}],"ge7":[{pt:"Luz do sol",en:"Luz do sol",es:"Luz do sol",it:"Luz do sol"}],"ge8":[{pt:"Limites políticos",en:"Limites políticos",es:"Limites políticos",it:"Limites políticos"}],"ge9":[{pt:"Construções em 3d",en:"Construções em 3d",es:"Construções em 3d",it:"Construções em 3d"}],"ge10":[{pt:"Estradas",en:"Estradas",es:"Estradas",it:"Estradas"}],"ge11":[{pt:"Terreno",en:"Terreno",es:"Terreno",it:"Terreno"}]};if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.idioma={MOSTRASELETOR:true,IDSELETOR:"",SELETORES:["pt","en","es"],DICIONARIO:g_traducao,define:function(codigo){i3GEO.idioma.ATUAL=codigo;i3GEO.util.insereCookie("i3geolingua",codigo)},retornaAtual:function(){return(i3GEO.idioma.ATUAL)},defineDicionario:function(obj){i3GEO.idioma.DICIONARIO=obj},alteraDicionario:function(id,novo){i3GEO.idioma.DICIONARIO[id][0][i3GEO.idioma.ATUAL]=novo},traduzir:function(id){if(i3GEO.idioma.DICIONARIO[id]){var t=i3GEO.idioma.DICIONARIO[id][0];return t[i3GEO.idioma.ATUAL]}else{return}},adicionaDicionario:function(novodic){for(var k in novodic){if(novodic.hasOwnProperty(k)){i3GEO.idioma.DICIONARIO[k]=novodic[k]}}},mostraDicionario:function(){var w,k;w=window.open();for(k in i3GEO.idioma.DICIONARIO){if(i3GEO.idioma.DICIONARIO.hasOwnProperty(k)){w.document.write(k+" = "+i3GEO.idioma.traduzir(k)+"<br>")}}},trocaIdioma:function(codigo){i3GEO.util.insereCookie("i3geolingua",codigo);window.location.reload(true)},listaIdiomas:function(){for(var k in i3GEO.idioma.DICIONARIO){if(i3GEO.idioma.DICIONARIO.hasOwnProperty(k)){return(i3GEO.util.listaChaves(i3GEO.idioma.DICIONARIO[k][0]))}}},mostraSeletor:function(){if(!i3GEO.idioma.MOSTRASELETOR){return}var ins,n,w,i,pos,novoel,temp,iu=i3GEO.util;ins="";n=i3GEO.idioma.SELETORES.length;if($i("i3geo")&&i3GEO.parametros.w<550){w="width:12px;"}else{w=""}for(i=0;i<n;i++){temp=i3GEO.idioma.SELETORES[i];ins+='<img style="'+w+'padding:0 0px;top:-7px;padding-right:0px;border: 1px solid white;" src="'+iu.$im("branco.gif")+'" onclick="i3GEO.idioma.trocaIdioma(\''+temp+'\')" ';if(temp==="en"){ins+='alt="Ingles" id="uk" />'}if(temp==="pt"){ins+='alt="Portugues" id="brasil" />'}if(temp==="es"){ins+='alt="Espanhol" id="espanhol" />'}if(temp==="it"){ins+='alt="Italiano" id="italiano" />'}}if(i3GEO.idioma.IDSELETOR!==""&&$i(i3GEO.idioma.IDSELETOR)){$i(i3GEO.idioma.IDSELETOR).innerHTML=ins}else{pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if(!$i("i3geoseletoridiomas")){novoel=document.createElement("div");novoel.innerHTML=ins;novoel.id="i3geoseletoridiomas";document.body.appendChild(novoel)}else{novoel=$i("i3geoseletoridiomas")}novoel.style.position="absolute";novoel.style.top=pos[1]-17+"px";novoel.style.left=pos[0]+"px";novoel.style.zIndex=5000}}};var $trad=function(id){return(i3GEO.idioma.traduzir(id))};(function(){try{var c=i3GEO.util.pegaCookie("i3geolingua");if(c){i3GEO.idioma.define(c);g_linguagem=c}else{if(typeof(g_linguagem)!=="undefined"){i3GEO.idioma.define(g_linguagem)}else{g_linguagem="pt";i3GEO.idioma.define("pt")}}if(typeof('g_traducao')!=="undefined"){i3GEO.idioma.defineDicionario(g_traducao)}}catch(e){alert("Problemas com idiomas "+e)}})();if(typeof(i3GEO)==='undefined'){i3GEO=[]}cpJSON=new cpaint();cpJSON.set_response_type("JSON");i3GEO.php={verifica:function(){if(i3GEO.configura.locaplic===undefined){alert("i3GEO.php diz: variavel i3GEO.configura.locaplic não esta definida")}if(i3GEO.configura.sid===undefined){alert("i3GEO.php diz: variavel i3GEO.configura.sid não esta definida")}},insereSHPgrafico:function(funcao,tema,x,y,itens,shadow_height,width,inclinacao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=insereSHPgrafico&tipo=pizza&tema="+tema+"&x="+x+"&y="+y+"&itens="+itens+"&shadow_height="+shadow_height+"&width="+width+"&inclinacao="+inclinacao+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"insereSHPgrafico",funcao)},insereSHP:function(funcao,tema,item,valoritem,xy,projecao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=insereSHP&item="+item+"&valor="+valoritem+"&tema="+tema+"&xy="+xy+"&projecao="+projecao+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"insereSHP",funcao)},pegaMensagens:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegaMensagens&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaMensagem",funcao)},areaPixel:function(funcao,g_celula){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=areaPixel&celsize="+g_celula+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"areaPixel",funcao)},excluitema:function(funcao,temas){var layer,retorno,p,n,i;i3GEO.php.verifica();retorno=function(retorno){n=temas.length;for(i=0;i<n;i++){if(i3GEO.Interface.ATUAL==="openlayers"){layer=i3geoOL.getLayersByName(temas[i]);if(layer.length>0){i3geoOL.removeLayer(layer[0])}}if(i3GEO.Interface.ATUAL==="googlemaps"){indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(temas[i]);if(indice!==false){i3GeoMap.overlayMapTypes.removeAt(indice)}}if(i3GEO.Interface.ATUAL==="googleearth"){indice=i3GEO.Interface.googleearth.retornaObjetoLayer(temas[i]);i3GeoMap.getFeatures().removeChild(indice)}}funcao.call(retorno)};p=i3GEO.arvoreDeCamadas.LOCAPLIC+"/classesphp/mapa_controle.php?funcao=excluitema&temas="+temas+"&g_sid="+i3GEO.arvoreDeCamadas.SID;cpJSON.call(p,"excluitema",retorno)},reordenatemas:function(funcao,lista){i3GEO.php.verifica();var p=i3GEO.arvoreDeCamadas.LOCAPLIC+"/classesphp/mapa_controle.php?funcao=reordenatemas&lista="+lista+"&g_sid="+i3GEO.arvoreDeCamadas.SID;cpJSON.call(p,"reordenatemas",funcao)},criaLegendaHTML:function(funcao,tema,template){i3GEO.php.verifica();if(arguments.length===1){tema="";template="legenda2.htm"}if(arguments.length===2){template="legenda2.htm"}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=criaLegendaHTML&tema="+tema+"&templateLegenda="+template+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"criaLegendaHTML",funcao)},inverteStatusClasse:function(funcao,tema,classe){i3GEO.php.verifica();var p=i3GEO.arvoreDeCamadas.LOCAPLIC+"/classesphp/mapa_controle.php?funcao=inverteStatusClasse&g_sid="+i3GEO.arvoreDeCamadas.SID+"&tema="+tema+"&classe="+classe;cpJSON.call(p,"inverteStatusClasse",funcao)},ligatemas:function(funcao,desligar,ligar,adicionar){i3GEO.php.verifica();if(arguments.length===3){adicionar="nao"}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=ligatemas&desligar="+desligar+"&ligar="+ligar+"&adicionar="+adicionar+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"ligaDesligaTemas",funcao)},pegalistademenus:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegalistademenus&g_sid="+i3GEO.configura.sid+"&map_file=&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistademenus",funcao)},pegalistadegrupos:function(funcao,id_menu,listasgrupos){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegalistadegrupos&map_file=&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&listasistemas=nao&listasgrupos="+listasgrupos+"&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistadegrupos",funcao)},pegalistadeSubgrupos:function(funcao,id_menu,id_grupo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegalistadeSubgrupos&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&grupo="+id_grupo+"&map_file=&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistadeSubgrupos",funcao)},pegalistadetemas:function(funcao,id_menu,id_grupo,id_subgrupo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegalistadetemas&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&grupo="+id_grupo+"&subgrupo="+id_subgrupo+"&map_file=&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistadetemas",funcao)},listaTemas:function(funcao,tipo,locaplic,sid){if(arguments.length===2){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php?funcao=listatemas&g_sid="+sid+"&tipo="+tipo;cpJSON.call(p,"listaTemas",funcao)},listaTemasEditaveis:function(funcao,locaplic,sid){if(arguments.length===1){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php?funcao=listatemaslocais&g_sid="+sid;cpJSON.call(p,"listatemaslocais",funcao)},listaTemasComSel:function(funcao,locaplic,sid){if(arguments.length===1){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php?funcao=listatemascomsel&g_sid="+sid;cpJSON.call(p,"listaTemasComSel",funcao)},listatemasTipo:function(funcao,tipo,locaplic,sid){if(arguments.length===2){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php?funcao=&funcao=listatemasTipo&tipo="+tipo+"&g_sid="+sid;cpJSON.call(p,"listatemasTipo",funcao)},pegaSistemas:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegaSistemas&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaSistemas",funcao)},listadrives:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=listaDrives&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"listaDrives",funcao)},listaarquivos:function(funcao,caminho){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=listaArquivos&diretorio="+caminho;cpJSON.call(p,"listaArquivos",funcao)},geo2utm:function(funcao,x,y){i3GEO.php.verifica();if($i("aguardeGifAberto")||x<-180){return}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=geo2utm&x="+x+"&y="+y+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"geo2utm",funcao)},desativacgi:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=desativacgi&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"desativacgi",funcao)},pegaMapas:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegaMapas&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaSistemas",funcao)},mudatamanho:function(funcao,altura,largura){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=mudatamanho&altura="+altura+"&largura="+largura+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaSistemas",funcao)},ativalogo:function(funcao,altura,largura){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=ativalogo&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"ativalogo",funcao)},insereAnnotation:function(funcao,pin,xy,texto,position,partials,offsetx,offsety,minfeaturesize,mindistance,force,shadowcolor,shadowsizex,shadowsizey,outlinecolor,cor,sombray,sombrax,sombra,fundo,angulo,tamanho,fonte){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=inserefeature&pin="+pin+"&tipo=ANNOTATION&xy="+xy+"&texto="+texto+"&position="+position+"&partials="+partials+"&offsetx="+offsetx+"&offsety="+offsety+"&minfeaturesize="+minfeaturesize+"&mindistance="+mindistance+"&force="+force+"&shadowcolor="+shadowcolor+"&shadowsizex="+shadowsizex+"&shadowsizey="+shadowsizey+"&outlinecolor="+outlinecolor+"&cor="+cor+"&sombray="+sombray+"&sombrax="+sombrax+"&sombra="+sombra+"&fundo="+fundo+"&angulo="+angulo+"&tamanho="+tamanho+"&fonte="+fonte+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"inserefeature",funcao)},identificaunico:function(funcao,xy,tema,item){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=identificaunico&xy="+xy+"&resolucao=5&tema="+tema+"&item="+item+"&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"identificaunico",funcao)},recuperamapa:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=recuperamapa&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"recuperamapa",funcao)},criaLegendaImagem:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=criaLegendaImagem&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"criaLegendaImagem",funcao)},referenciadinamica:function(funcao,zoom,tipo){i3GEO.php.verifica();if(arguments.length===2){tipo="dinamico"}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=referenciadinamica&g_sid="+i3GEO.configura.sid+"&zoom="+zoom+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"retornaReferenciaDinamica",funcao)},referencia:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=referencia&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"retornaReferencia",funcao)},pan:function(funcao,escala,tipo,x,y){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pan&escala="+escala+"&tipo="+tipo+"&x="+x+"&y="+y+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pan",funcao)},aproxima:function(funcao,nivel){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=aproxima&nivel="+nivel+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"aproxima",funcao)},afasta:function(funcao,nivel){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=afasta&nivel="+nivel+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"afasta",funcao)},zoomponto:function(funcao,x,y,tamanho,simbolo,cor){i3GEO.php.verifica();if(!simbolo){simbolo="ponto"}if(!tamanho){tamanho=15}if(!cor){cor="255 0 0"}var retorno=function(retorno){if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.pan2ponto(x,y);i3GEO.janela.fechaAguarde()}if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.pan2ponto(x,y);i3GEO.janela.fechaAguarde()}funcao.call(retorno)},p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=zoomponto&pin=pin&xy="+x+" "+y+"&g_sid="+i3GEO.configura.sid+"&marca="+simbolo+"&tamanho="+tamanho+"&cor="+cor;cpJSON.call(p,"zoomponto",retorno)},localizaIP:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=localizaIP&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"localizaIP",funcao)},mudaext:function(funcao,tipoimagem,ext,locaplic,sid,atualiza,geo){var retorno,p;if(arguments.length===3){i3GEO.php.verifica();locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid;atualiza=true;geo=false}if(geo===undefined){geo=false}if(atualiza===undefined){atualiza=true}if(ext===undefined){alert("extensao nao definida");return}retorno=function(retorno){switch(i3GEO.Interface.ATUAL){case"googlemaps":if(atualiza===true){i3GEO.Interface.googlemaps.zoom2extent(ext)}break;case"googleearth":if(atualiza===true){i3GEO.Interface.googleearth.zoom2extent(ext)}break;case"openlayers":i3GEO.Interface.openlayers.zoom2ext(ext);break}i3GEO.janela.fechaAguarde();try{funcao.call(retorno)}catch(e){}};p=locaplic+"/classesphp/mapa_controle.php?funcao=mudaext&tipoimagem="+tipoimagem+"&ext="+ext+"&g_sid="+sid+"&geo="+geo;cpJSON.call(p,"mudaext",retorno)},mudaescala:function(funcao,escala){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=mudaescala&escala="+escala+"&g_sid="+i3GEO.configura.sid+"&tipoimagem="+i3GEO.configura.tipoimagem;cpJSON.call(p,"mudaescala",funcao)},aplicaResolucao:function(funcao,resolucao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=crialente&resolucao="+resolucao+"&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"crialente",funcao)},geradestaque:function(funcao,tema,ext){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=geradestaque&tema="+tema+"&g_sid="+i3GEO.configura.sid+"&ext="+ext;cpJSON.call(p,"geradestaque",funcao)},selecaopt:function(funcao,tema,xy,tipo,tolerancia){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=selecaopt&tema="+tema+"&tipo="+tipo+"&xy="+xy+"&tolerancia="+tolerancia+"&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaoPT",funcao)},selecaobox:function(funcao,tema,tipo,box){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=selecaobox&ext="+box+"&g_sid="+i3GEO.configura.sid+"&tipo="+tipo+"&tema="+tema+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaobox",funcao)},selecaoext:function(funcao,tema,tipo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=selecaoext&tema="+tema+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaobox",funcao)},selecaoatrib2:function(funcao,tema,filtro,tipo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=selecaoatrib2&tema="+tema+"&filtro="+filtro+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaoatrib2",funcao)},selecaotema:function(funcao,temao,tema,tipo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=selecaotema&temao="+temao+"&tema="+tema+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaotema",funcao)},sobetema:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=sobetema&tema="+tema+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"sobetema",funcao)},descetema:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?&funcao=descetema&tema="+tema+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"descetema",funcao)},fontetema:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=fontetema&tema="+tema+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"fontetema",funcao)},zoomtema:function(funcao,tema){i3GEO.php.verifica();var retorno,p;retorno=function(retorno){switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde();break;case"googleearth":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde();break;case"openlayers":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde();break;case"padrao":i3GEO.atualiza(retorno);break}};p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=zoomtema&tema="+tema+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"zoomtema",retorno)},zoomsel:function(funcao,tema){i3GEO.php.verifica();var retorno,p;retorno=function(retorno){switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde();break;case"googleearth":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde();break;case"openlayers":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde();break;case"padrao":i3GEO.atualiza(retorno);break}};p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=zoomsel&tema="+tema+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"zoomsel",retorno)},limpasel:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=limpasel&tema="+tema+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"limpasel",funcao)},invertestatuslegenda:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=invertestatuslegenda&tema="+tema+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"invertestatuslegenda",funcao)},aplicaCorClasseTema:function(funcao,idtema,idclasse,rgb){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=alteraclasse&opcao=alteracor&tema="+idtema+"&idclasse="+idclasse+"&cor="+rgb+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"aplicaCorClasseTema",funcao)},mudatransp:function(funcao,tema,valor){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=mudatransp&tema="+tema+"&valor="+valor+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"mudatransp",funcao)},mudanome:function(funcao,tema,valor){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=mudanome&tema="+tema+"&valor="+valor+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"mudanome",funcao)},adicionaTemaWMS:function(funcao,servico,tema,nome,proj,formato,versao,nomecamada,tiporep,suportasld,formatosinfo,locaplic,sid){if(arguments.length===11){i3GEO.php.verifica();locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php?g_sid="+sid+"&funcao=adicionatemawms&servico="+servico+"&tema="+tema+"&nome="+nome+"&proj="+proj+"&formato="+formato+"&versao="+versao+"&nomecamada="+nomecamada+"&tiporep="+tiporep+"&suportasld="+suportasld+"&formatosinfo="+formatosinfo;cpJSON.call(p,"adicionatemawms",funcao)},adicionaTemaSHP:function(funcao,path){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=adicionaTemaSHP&arq="+path;cpJSON.call(p,"adicionaTemaSHP",funcao)},adicionaTemaIMG:function(funcao,path){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=adicionaTemaIMG&arq="+path;cpJSON.call(p,"adicionaTemaIMG",funcao)},identifica:function(funcao,x,y,resolucao,locaplic,sid){var p=locaplic+"/classesphp/mapa_controle.php?funcao=identifica&opcao=tip&xy="+x+","+y+"&resolucao=5&g_sid="+sid;cpJSON.call(p,"identifica",funcao)},identifica2:function(funcao,x,y,resolucao,opcao,locaplic,sid,tema,ext,listaDeTemas){if(arguments.length===4){opcao="tip";locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid;ext="";listaDeTemas=""}if(arguments.length===5){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid;ext="";listaDeTemas=""}if(listaDeTemas===undefined){listaDeTemas=""}var p=locaplic+"/classesphp/mapa_controle.php?funcao=identifica2&opcao="+opcao+"&xy="+x+","+y+"&resolucao=5&g_sid="+sid+"&ext="+ext+"&listaDeTemas="+listaDeTemas;if(opcao!=="tip"){p+="&tema="+tema}cpJSON.call(p,"identifica",funcao)},reiniciaMapa:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=reiniciaMapa&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"reiniciaMapa",funcao)},procurartemas:function(funcao,procurar,locaplic){if(arguments.length===2){locaplic=i3GEO.configura.locaplic}try{var p=locaplic+"/classesphp/mapa_controle.php?funcao=procurartemas&map_file=&procurar="+procurar+"&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"procurartemas",funcao)}catch(e){}},procurartemas2:function(funcao,procurar,locaplic){if(arguments.length===2){locaplic=i3GEO.configura.locaplic}try{var p=locaplic+"/classesphp/mapa_controle.php?funcao=procurartemas2&map_file=&procurar="+procurar+"&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"procurartemas",funcao)}catch(e){}},procurartemasestrela:function(funcao,nivel,fatorestrela,locaplic){if(arguments.length===3){locaplic=i3GEO.configura.locaplic}try{var p=locaplic+"/classesphp/mapa_controle.php?funcao=procurartemasestrela&map_file=&nivel="+nivel+"&fatorestrela="+fatorestrela+"&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"foo",funcao)}catch(e){}},adtema:function(funcao,temas,locaplic,sid){if(arguments.length===2){i3GEO.php.verifica();locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php?funcao=adtema&temas="+temas+"&g_sid="+sid;cpJSON.call(p,"adtema",funcao)},escalagrafica:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=escalagrafica&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"escalagrafica",funcao)},flamingo:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=montaFlamingo&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"montaFlamingo",funcao)},googlemaps:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=googlemaps&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"googlemaps",funcao)},googleearth:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=googleearth&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"googleearth",funcao)},openlayers:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=openlayers&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"openlayers",funcao)},corpo:function(funcao,tipoimagem){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=corpo&tipoimagem="+tipoimagem+"&g_sid="+i3GEO.configura.sid+"&interface="+i3GEO.Interface.ATUAL;if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.recalcPar();p+="&mapexten="+i3GEO.parametros.mapexten}cpJSON.call(p,"corpo",funcao)},criamapa:function(funcao,parametros){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=criaMapa&"+parametros;cpJSON.call(p,"criaMapa",funcao)},inicia:function(funcao,embedLegenda,w,h){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=inicia&embedLegenda="+embedLegenda+"&w="+w+"&h="+h+"&g_sid="+i3GEO.configura.sid+"&interface="+i3GEO.Interface.ATUAL;cpJSON.call(p,"iniciaMapa",funcao)},chaveGoogle:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=chavegoogle&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"chavegoogle",funcao)},listaRSSwsARRAY:function(funcao,tipo){var p=i3GEO.configura.locaplic+"/classesphp/wscliente.php?funcao=listaRSSwsARRAY&rss="+["|"]+"&tipo="+tipo;cpJSON.call(p,"listaRSSwsARRAY",funcao)},listaLayersWMS:function(funcao,servico,nivel,id_ws,nomelayer){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=listaLayersWMS&servico="+servico+"&nivel="+nivel+"&id_ws="+id_ws+"&nomelayer="+nomelayer;cpJSON.call(p,"listaLayersWMS",funcao)},buscaRapida:function(funcao,locaplic,servico,palavra){var p=locaplic+"/classesphp/mapa_controle.php?map_file=&funcao=buscaRapida&palavra="+palavra+"&servico="+servico;cpJSON.call(p,"buscaRapida",funcao)},listaItensTema:function(funcao,tema){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=listaitens&tema="+tema+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"listaItensTema",funcao)},listaValoresItensTema:function(funcao,tema,itemTema){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=listaregistros&unico=sim&tema="+tema+"&itemtema="+itemTema+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"listaRegistros",funcao)},extRegistros:function(funcao,tema,reg){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=extregistros&registro="+reg+"&tema="+tema;cpJSON.call(p,"listaItensTema",funcao)},listaFontesTexto:function(funcao){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=listatruetype";cpJSON.call(p,"listaTrueType",funcao)},listaEpsg:function(funcao){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=listaEpsg";cpJSON.call(p,"listaEpsg",funcao)},criatemaSel:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=criatemasel&tema="+tema+"&nome=Novo tema "+tema;cpJSON.call(p,"chavegoogle",funcao)},pegaData:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=pegadata&tema="+tema;cpJSON.call(p,"pegadata",funcao)},alteraData:function(funcao,tema,data){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=alteradata&tema="+tema+"&novodata="+data;cpJSON.call(p,"alteradata",funcao)},dadosPerfilRelevo:function(funcao,opcao,pontos,amostragem,item){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=dadosPerfilRelevo&opcao="+opcao,cp=new cpaint();cp.set_transfer_mode('POST');cp.set_response_type("JSON");cp.call(p,"foo",funcao,"&pontos="+pontos+"&amostragem="+amostragem+"&item="+item)},funcoesGeometriasWkt:function(funcao,listaWkt,operacao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=funcoesGeometriasWkt&operacao="+operacao,cp=new cpaint();cp.set_transfer_mode('POST');cp.set_response_type("JSON");cp.call(p,"foo",funcao,"&geometrias="+listaWkt)}};if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.configura={grupoLayers:"",oMenuData:{menu:[{nome:$trad("s1"),id:"ajudaMenu"},{nome:$trad("s2"),id:"analise"},{nome:$trad("s3"),id:"janelas"},{nome:$trad("s4"),id:"arquivos"},{nome:$trad("d32"),id:"interface"}],submenus:{"ajudaMenu":[{id:"omenudataAjudamenu1",text:$trad("u1"),url:"http://www.softwarepublico.gov.br/spb/ver-comunidade?community_id=1444332",target:"_blank"},{id:"omenudataAjudamenu2",text:$trad("u2"),url:"javascript:i3GEO.ajuda.abreDoc()"},{id:"omenudataAjudamenu3",text:$trad("u3"),url:"http://pt.wikibooks.org/wiki/I3geo",target:"_blank"},{id:"omenudataAjudamenu4",text:$trad("u4"),url:"http://www.softwarepublico.gov.br/dotlrn/clubs/i3geo/file-storage/index?folder%5fid=22667525",target:"_blank"},{id:"omenudataAjudamenu5",text:$trad("u5a"),url:"http://www.softwarepublico.gov.br",target:"_blank"},{id:"omenudataAjudamenu7",text:$trad("u5b"),url:"../ajuda_usuario.php",target:"_blank"},{id:"omenudataAjudamenu8",text:$trad("u5c"),url:"javascript:i3GEO.ajuda.redesSociais()"}],"analise":[{id:"omenudataAnalise1",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u22")+'</b></span>',url:"#"},{id:"omenudataAnalise2",text:$trad("u7"),url:"javascript:i3GEO.analise.dialogo.gradePol()"},{id:"omenudataAnalise3",text:$trad("u8"),url:"javascript:i3GEO.analise.dialogo.gradePontos()"},{id:"omenudataAnalise4",text:$trad("u9"),url:"javascript:i3GEO.analise.dialogo.gradeHex()"},{id:"omenudataAnalise5",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u23")+'</b></span>',url:"#"},{id:"omenudataAnalise6",text:$trad("u11a"),url:"javascript:i3GEO.analise.dialogo.distanciaptpt()"},{id:"omenudataAnalise7",text:$trad("u12"),url:"javascript:i3GEO.analise.dialogo.nptPol()"},{id:"omenudataAnalise8",text:$trad("u13"),url:"javascript:i3GEO.analise.dialogo.pontoempoligono()"},{id:"omenudataAnalise9",text:$trad("u14"),url:"javascript:i3GEO.analise.dialogo.pontosdistri()"},{id:"omenudataAnalise9a",text:$trad("u28"),url:"javascript:i3GEO.analise.dialogo.centromassa()"},{id:"omenudataAnalise10",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u24")+'</b></span>',url:"#"},{id:"omenudataAnalise11",text:$trad("u25"),url:"javascript:i3GEO.analise.dialogo.dissolve()"},{id:"omenudataAnalise12",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u27")+'</b></span>',url:"#"},{id:"omenudataAnalise13",text:$trad("u6"),url:"javascript:i3GEO.analise.dialogo.analisaGeometrias()"},{id:"omenudataAnalise14",text:$trad("u10"),url:"javascript:i3GEO.analise.dialogo.buffer()"},{id:"omenudataAnalise15",text:$trad("u26"),url:"javascript:i3GEO.analise.dialogo.agrupaElementos()"},{id:"omenudataAnalise16",text:$trad("u11"),url:"javascript:i3GEO.analise.dialogo.centroide()"},{id:"omenudataAnalise17",text:$trad("t37"),url:"javascript:i3GEO.analise.dialogo.graficoInterativo()"},{id:"omenudataAnalise18",text:$trad("d30"),url:"javascript:i3GEO.analise.dialogo.linhaDoTempo()"}],"janelas":[{id:"omenudataJanelas1",text:$trad("u15"),url:"javascript:i3GEO.barraDeBotoes.reativa(0);i3GEO.barraDeBotoes.reativa(1)"},{id:"omenudataJanelas2",text:$trad("u16"),url:"javascript:i3GEO.ajuda.abreJanela()"},{id:"omenudataJanelas3",text:$trad("u29"),url:"javascript:i3GEO.barraDeBotoes.editor.inicia()"}],"arquivos":[{id:"omenudataArquivos1",text:$trad("u17"),url:"javascript:i3GEO.mapa.dialogo.salvaMapa()"},{id:"omenudataArquivos2",text:$trad("u18"),url:"javascript:i3GEO.mapa.dialogo.carregaMapa()"},{id:"omenudataArquivos3",text:$trad("u19"),url:"javascript:i3GEO.gadgets.quadros.listaImagens()"},{id:"omenudataArquivos4",text:$trad("u20"),url:"javascript:i3GEO.mapa.dialogo.convertews()"},{id:"omenudataArquivos5",text:$trad("u20a"),url:"javascript:i3GEO.mapa.dialogo.convertekml()"}],"interface":[{id:"omenudataInterface1",text:"Interface normal",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/geral.htm?'+i3GEO.configura.sid"},{id:"omenudataInterface2",text:"OpenLayers",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/openlayers.htm?'+i3GEO.configura.sid"},{id:"omenudataInterface10",text:"OpenLayers tablet",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/openlayers_t.htm?'+i3GEO.configura.sid"},{id:"omenudataInterface3",text:"Flash",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/flamingo.htm?'+i3GEO.configura.sid"},{id:"omenudataInterface4",text:"Google Maps",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/googlemaps.phtml?'+i3GEO.configura.sid"},{id:"omenudataInterface5",text:"Google Earth",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/googleearth.phtml?'+i3GEO.configura.sid"},{id:"omenudataInterface6",text:$trad("u21"),url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/geradordelinks.htm')"},{id:"omenudataInterface7",text:"Serviços WMS",url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/ogc.htm')"},{id:"omenudataInterface8",text:"Hiperbólica",url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/hiperbolica.html')"},{id:"omenudataInterface9",text:"Download de dados",url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/datadownload.htm')"},{id:"omenudataInterface11",text:$trad("p20"),url:"javascript:i3GEO.mapa.dialogo.telaRemota()"}]}},tipoimagem:"nenhum",tipotip:"balao",alturatip:"200px",larguratip:"200px",funcaoTip:"i3GEO.mapa.dialogo.verificaTipDefault()",funcaoIdentifica:"i3GEO.mapa.dialogo.cliqueIdentificaDefault()",diminuixM:0,diminuixN:0,diminuiyM:100,diminuiyN:70,autotamanho:false,map3d:"",embedLegenda:"nao",templateLegenda:"",mashuppar:"",sid:"",locaplic:"",mapaRefDisplay:"block",visual:"default",cursores:{"identifica":{ff:"pointer",ie:"pointer"},"pan":{ff:"/imagens/cursores/pan.png",ie:"/imagens/cursores/pan.cur"},"area":{ff:"crosshair",ie:"crosshair"},"distancia":{ff:"crosshair",ie:"crosshair"},"zoom":{ff:"/imagens/cursores/zoom.png",ie:"/imagens/cursores/zoom.cur"},"contexto":{ff:"/imagens/cursores/contexto.png",ie:"/imagens/cursores/contexto.cur"},"identifica_contexto":{ff:"pointer",ie:"pointer"},"pan_contexto":{ff:"/imagens/cursores/pan_contexto.png",ie:"/imagens/cursores/pan_contexto.cur"},"zoom_contexto":{ff:"/imagens/cursores/zoom_contexto.png",ie:"/imagens/cursores/zoom_contexto.cur"}},listaDePropriedadesDoMapa:{"propriedades":[{text:"p2",url:"javascript:i3GEO.mapa.dialogo.tipoimagem()"},{text:"p15",url:"javascript:i3GEO.mapa.dialogo.outputformat()"},{text:"p3",url:"javascript:i3GEO.mapa.dialogo.opcoesLegenda()"},{text:"p4",url:"javascript:i3GEO.mapa.dialogo.opcoesEscala()"},{text:"p5",url:"javascript:i3GEO.mapa.dialogo.tamanho()"},{text:"p6",url:"javascript:i3GEO.navega.entorno.ativaDesativa()"},{text:"p7",url:"javascript:i3GEO.mapa.ativaLogo()"},{text:"p8",url:"javascript:i3GEO.mapa.dialogo.queryMap()"},{text:"p9",url:"javascript:i3GEO.mapa.dialogo.corFundo()"},{text:"p10",url:"javascript:i3GEO.mapa.dialogo.gradeCoord()"},{text:"p12",url:"javascript:i3GEO.mapa.dialogo.autoredesenha()"}]},tempoAplicar:4000,tempoMouseParado:2500,iniciaJanelaMensagens:true,mostraRosaDosVentos:"nao",liberaGuias:"nao",entorno:"nao",funcoesBotoes:{"botoes":[{iddiv:"historicozoom",tipo:"",dica:$trad("d1"),constroiconteudo:'i3GEO.gadgets.mostraHistoricoZoom()'},{iddiv:"zoomtot",tipo:"",dica:$trad("d2"),funcaoonclick:function(){if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.extentTotal);return}if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.extentTotal);return}i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,i3GEO.configura.tipoimagem,i3GEO.parametros.extentTotal);marcadorZoom=""}},{iddiv:"zoomli",tipo:"dinamico",dica:$trad("d3"),funcaoonclick:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.janela.mensagemSimples("Pressione a tecla CTRL junto com o botão esquerdo do mouse e arraste para definir a área de zoom","?");g_tipoacao='pan';g_operacao='navega';i3GEO.barraDeBotoes.ativaIcone("pan");i3GEO.barraDeBotoes.BOTAOPADRAO="pan";i3GeoMap.setOptions({draggable:true});i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pan",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic);return}var temp;temp="zoom";if(i3GEO.Interface.ATIVAMENUCONTEXTO&&i3GEO.Interface.ATUAL==="padrao"){temp="zoom_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic);g_operacao='navega';g_tipoacao='zoomli';i3GEO.barraDeBotoes.ativaIcone("zoomli");marcadorZoom="";if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLzoom);return}if(!$i("i3geoboxZoom")){i3GEO.navega.zoomBox.criaBox()}if(i3GEO.eventos.MOUSEDOWN.toString().search("i3GEO.navega.zoomBox.inicia()")<0){i3GEO.eventos.MOUSEDOWN.push("i3GEO.navega.zoomBox.inicia()")}if(i3GEO.eventos.MOUSEUP.toString().search("i3GEO.navega.zoomBox.termina()")<0){i3GEO.eventos.MOUSEUP.push("i3GEO.navega.zoomBox.termina()")}i3GEO.barraDeBotoes.BOTAOPADRAO="zoomli"}},{iddiv:"pan",tipo:"dinamico",dica:$trad("d4"),funcaoonclick:function(){var temp;g_tipoacao='pan';g_operacao='navega';i3GEO.barraDeBotoes.ativaIcone("pan");i3GEO.barraDeBotoes.BOTAOPADRAO="pan";if(i3GEO.Interface.ATUAL==="googlemaps"){i3GeoMap.setOptions({draggable:true});i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pan",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic);return}if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="pan";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="pan_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}marcadorZoom="";if(i3GEO.Interface.ATUAL==="openlayers"){return}panMapaInicia=function(exy){var k;leftinicial=0;topinicial=0;if($i("img")&&(g_tipoacao==="pan")){try{if(arguments.length>0){if(navm){k=event.button}else{k=exy.button}if(k===2){return}}}catch(h){}g_panM="sim";if($i(i3GEO.Interface.IDCORPO)){leftinicial=parseInt($i(i3GEO.Interface.IDCORPO).style.left,10);topinicial=parseInt($i(i3GEO.Interface.IDCORPO).style.top,10)}clicinicialx=objposicaocursor.imgx;clicinicialy=objposicaocursor.imgy;ddinicialx=objposicaocursor.ddx;ddinicialy=objposicaocursor.ddy;boxrefObj=$i("boxref");if(boxrefObj){proporcaoBox=i3GEO.parametros.w/parseInt(boxrefObj.style.width,10);boxrefObjLeft=parseInt(boxrefObj.style.left,10);boxrefObjTop=parseInt(boxrefObj.style.top,10)}}};panMapaDesloca=function(){var nx,ny,l,t;if(typeof(g_panM)!=='undefined'&&$i(i3GEO.Interface.IDMAPA)&&(g_panM==="sim")){nx=objposicaocursor.telax-leftinicial-clicinicialx;ny=objposicaocursor.telay-topinicial-clicinicialy;if(i3GEO.configura.entorno==="nao"){l=0;if(parseInt($i("i3geo").style.left,10)){l=parseInt($i("i3geo").style.left,10)}$i(i3GEO.Interface.IDMAPA).style.left=nx-l;t=0;if(parseInt($i("i3geo").style.top,10)){t=parseInt($i("i3geo").style.top,10)}$i(i3GEO.Interface.IDMAPA).style.top=ny-t;if(boxrefObj){boxrefObj.style.left=boxrefObjLeft-(nx/proporcaoBox);boxrefObj.style.top=boxrefObjTop-(ny/proporcaoBox)}}else{$left("img",i3GEO.parametros.w*-1+nx);$left("imgS",i3GEO.parametros.w*-1+nx);$left("imgL",i3GEO.parametros.w+nx);$left("imgO",i3GEO.parametros.w*-3+nx);$left("imgN",i3GEO.parametros.w*-1+nx);$top("img",i3GEO.parametros.h*-1+ny);$top("imgS",i3GEO.parametros.h*-1+ny);$top("imgL",i3GEO.parametros.h*-1+ny);$top("imgN",i3GEO.parametros.h*-1+ny);$top("imgO",i3GEO.parametros.h*-1+ny)}}};panMapaTermina=function(){if(g_tipoacao==="pan"){marcadorZoom="";g_panM="nao";try{var f="i3GEO.navega.timerNavega = null;if("+"i3GEO.navega.xy2xy('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"',"+ddinicialx+","+ddinicialy+","+objposicaocursor.ddx+","+objposicaocursor.ddy+",'"+i3GEO.parametros.mapexten+"','"+i3GEO.configura.tipoimagem+"'"+") == false"+"){"+"i3GEO.navega.zoompontoIMG('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"',"+objposicaocursor.imgx+","+objposicaocursor.imgy+")"+"}";clearTimeout(i3GEO.navega.timerNavega);i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)}catch(e){}}};if(i3GEO.eventos.MOUSEDOWN.toString().search("panMapaInicia()")<0){i3GEO.eventos.MOUSEDOWN.push("panMapaInicia()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("panMapaDesloca()")<0){i3GEO.eventos.MOUSEMOVE.push("panMapaDesloca()")}if(i3GEO.eventos.MOUSEUP.toString().search("panMapaTermina()")<0){i3GEO.eventos.MOUSEUP.push("panMapaTermina()")}}},{iddiv:"zoomiauto",tipo:"",dica:$trad("d5"),funcaoonclick:function(){i3GEO.navega.zoomin(i3GEO.configura.locaplic,i3GEO.configura.sid);marcadorZoom=''}},{iddiv:"zoomoauto",tipo:"",dica:$trad("d6"),funcaoonclick:function(){i3GEO.navega.zoomout(i3GEO.configura.locaplic,i3GEO.configura.sid);marcadorZoom=""}},{iddiv:"identifica",tipo:"dinamico",dica:$trad("d7"),funcaoonclick:function(){var temp;if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO&&i3GEO.Interface.ATUAL!=="googlemaps"){temp="identifica_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}i3GEO.barraDeBotoes.ativaIcone("identifica");g_tipoacao='identifica';g_operacao='identifica';cliqueIdentifica=function(){if(g_operacao==="identifica"||i3GEO.barraDeBotoes.BOTAOPADRAO==="identifica"){g_operacao="identifica";eval(i3GEO.configura.funcaoIdentifica)}var temp=function(){$i("i3GEOmarcaIdentifica").style.display="none"},i;i3GEO.util.criaPin("i3GEOmarcaIdentifica",i3GEO.configura.locaplic+"/imagens/marcaidentify.png",48,48,temp);i3GEO.util.posicionaImagemNoMapa("i3GEOmarcaIdentifica");i=$i("i3GEOmarcaIdentifica");if(i){i.style.display="block"}};if(i3GEO.eventos.MOUSECLIQUE.toString().search("cliqueIdentifica()")<0){i3GEO.eventos.MOUSECLIQUE.push("cliqueIdentifica()")}if(i3GEO.eventos.MOUSECLIQUE.toString().search("verificaTip()")>0){i3GEO.eventos.MOUSECLIQUE.remove("verificaTip()")}if(i3GEO.eventos.MOUSEPARADO.toString().search("verificaTip()")>0){i3GEO.eventos.MOUSEPARADO.remove("verificaTip()")}}},{iddiv:"identificaBalao",tipo:"dinamico",dica:$trad("d7a"),funcaoonclick:function(){if(i3GEO.arvoreDeCamadas.filtraCamadas("etiquetas","","diferente",i3GEO.arvoreDeCamadas.CAMADAS)===""){alert($trad("d31"));return}var temp;if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}i3GEO.barraDeBotoes.ativaIcone("identificaBalao");g_tipoacao='identifica';g_operacao='identifica';verificaTip=function(){if(i3GEO.util.verificaScriptTag("i3GEOF")===true){return}if($i("marcaIdentifica")){return}if(g_operacao==="identifica"){eval(i3GEO.configura.funcaoTip)}};if(i3GEO.eventos.MOUSECLIQUE.toString().search("cliqueIdentifica()")>0){i3GEO.eventos.MOUSECLIQUE.remove("cliqueIdentifica()")}if(i3GEO.eventos.MOUSECLIQUE.toString().search("verificaTip()")<0){i3GEO.eventos.MOUSECLIQUE.push("verificaTip()")}if(i3GEO.eventos.MOUSEPARADO.toString().search("verificaTip()")<0){i3GEO.eventos.MOUSEPARADO.push("verificaTip()")}}},{iddiv:"exten",tipo:"",dica:$trad("d8"),funcaoonclick:function(){i3GEO.mapa.dialogo.mostraExten()}},{iddiv:"referencia",tipo:"",dica:$trad("d9"),funcaoonclick:function(){i3GEO.maparef.inicia()}},{iddiv:"wiki",tipo:"",dica:$trad("d11"),funcaoonclick:function(){i3GEO.navega.dialogo.wiki()}},{iddiv:"metar",tipo:"",dica:$trad("d29"),funcaoonclick:function(){i3GEO.navega.dialogo.metar()}},{iddiv:"buscafotos",tipo:"",dica:"Fotos",funcaoonclick:function(){i3GEO.navega.dialogo.buscaFotos()}},{iddiv:"imprimir",tipo:"",dica:$trad("d12"),funcaoonclick:function(){i3GEO.mapa.dialogo.imprimir()}},{iddiv:"ondeestou",tipo:"",dica:$trad("d13"),funcaoonclick:function(){i3GEO.navega.zoomIP(i3GEO.configura.locaplic,i3GEO.configura.sid)}},{iddiv:"v3d",tipo:"",dica:$trad("d14"),funcaoonclick:function(){i3GEO.mapa.dialogo.t3d()}},{iddiv:"google",tipo:"",dica:$trad("d15"),funcaoonclick:function(){i3GEO.navega.dialogo.google()}},{iddiv:"scielo",tipo:"",dica:$trad("d16"),funcaoonclick:function(){scieloAtivo=false;g_operacao="navega";i3GEO.janela.cria("450px","190px",i3GEO.configura.locaplic+"/ferramentas/scielo/index.htm","","","Scielo");atualizascielo=function(){var docel;try{docel=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;if(docel.getElementById("resultadoscielo")){$i("wdocai").src=i3GEO.configura.locaplic+"/ferramentas/scielo/index.htm"}else{i3GEO.eventos.NAVEGAMAPA.remove("atualizascielo()");if(i3GEO.Interface.ATUAL==="googlemaps"){GEvent.removeListener(scieloDragend);GEvent.removeListener(scieloZoomend)}}}catch(e){scieloAtivo=false;i3GEO.eventos.NAVEGAMAPA.remove("atualizascielo()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizascielo()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizascielo()");if(i3GEO.Interface.ATUAL==="googlemaps"){scieloDragend=GEvent.addListener(i3GeoMap,"dragend",function(){atualizascielo()});scieloZoomend=GEvent.addListener(i3GeoMap,"zoomend",function(){atualizascielo()})}}}},{iddiv:"confluence",tipo:"",dica:$trad("d17"),funcaoonclick:function(){i3GEO.navega.dialogo.confluence()}},{iddiv:"lentei",tipo:"",dica:$trad("d18"),funcaoonclick:function(){if(i3GEO.navega.lente.ESTAATIVA==="nao"){i3GEO.navega.lente.inicia()}else{i3GEO.navega.lente.desativa()}}},{iddiv:"encolheFerramentas",tipo:"",dica:$trad("d19"),funcaoonclick:function(){i3GEO.guias.libera()}},{iddiv:"reinicia",tipo:"",dica:$trad("d20"),funcaoonclick:function(){i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));var temp=function(){var url=(window.location.href.split("?"));window.location.href=url[0]+"?"+i3GEO.configura.sid};i3GEO.php.reiniciaMapa(temp)}},{iddiv:"mede",tipo:"dinamico",dica:$trad("d21"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("mede");if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";i3GEO.util.mudaCursor(i3GEO.configura.cursores,"distancia",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}g_tipoacao="";g_operacao="";i3GEO.analise.medeDistancia.inicia()}},{iddiv:"area",tipo:"dinamico",dica:$trad("d21a"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("area");if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";i3GEO.util.mudaCursor(i3GEO.configura.cursores,"area",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}g_tipoacao="";g_operacao="";i3GEO.analise.medeArea.inicia()}},{iddiv:"inserexy",tipo:"dinamico",dica:$trad("d22"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("inserexy");g_tipoacao="";i3GEO.mapa.dialogo.cliquePonto()}},{iddiv:"inseregrafico",tipo:"dinamico",dica:$trad("d23"),funcaoonclick:function(){g_tipoacao="";i3GEO.mapa.dialogo.cliqueGrafico();i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pointer",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}},{iddiv:"selecao",tipo:"dinamico",dica:$trad("d24"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("selecao");i3GEO.mapa.dialogo.selecao()}},{iddiv:"textofid",tipo:"dinamico",dica:$trad("d25"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("textofid");g_tipoacao="";i3GEO.mapa.dialogo.cliqueTexto()}},{iddiv:"rota",tipo:"",dica:"Rota",funcaoonclick:function(){if(i3GEO.Interface.ATUAL!=="googlemaps"){alert("Operacao disponivel apenas na interface Google Maps");return}counterClick=1;var parametrosRota=function(overlay,latlng){var temp,janela;if(counterClick===1){counterClick++;alert("Clique o ponto de destino da rota");pontoRota1=latlng;return}if(counterClick===2){pontoRota2=latlng;counterClick=0;GEvent.removeListener(rotaEvento);janela=i3GEO.janela.cria("300px","300px","","center","","Rota");janela[2].style.overflow="auto";janela[2].style.height="300px";directions=new GDirections(i3GeoMap,janela[2]);temp=function(){$i("wdoca_corpo").innerHTML="Não foi possível criar a rota"};GEvent.addListener(directions,"error",temp);directions.load("from: "+pontoRota1.lat()+","+pontoRota1.lng()+" to: "+pontoRota2.lat()+","+pontoRota2.lng())}};rotaEvento=GEvent.addListener(i3GeoMap,"click",parametrosRota);alert("Clique o ponto de origem da rota")}}]}};function i3GEOmantemCompatibilidade(){try{i3GEO.configura.oMenuData=oMenuData}catch(e){alert("funcao depreciada")}try{i3GEO.configura.tipoimagem=g_tipoimagem}catch(e){alert("funcao depreciada")}try{i3GEO.configura.tipotip=g_tipotip}catch(e){alert("funcao depreciada")}try{i3GEO.configura.funcaoTip=g_funcaoTip}catch(e){alert("funcao depreciada")}try{i3GEO.configura.map3d=g_3dmap}catch(e){alert("funcao depreciada")}try{i3GEO.configura.embedLegenda=g_embedLegenda}catch(e){alert("funcao depreciada")}try{i3GEO.configura.templateLegenda=g_templateLegenda}catch(e){alert("funcao depreciada")}try{if(objmapa.finaliza!="")i3GEO.finaliza=objmapa.finaliza}catch(e){alert("funcao depreciada")};g_arvoreClick="";g_arvoreClicks="";if($i("longlat")){atualizalonglat=function(){$i("longlat").innerHTML=objposicaocursor.dmsx+" "+objposicaocursor.dmsy};YAHOO.util.Event.addListener($i("img"),"mousemove",atualizalonglat)}try{if(g_opcoesTemas=="nao"){i3GEO.arvoreDeCamadas.OPCOESTEMAS=false}}catch(e){alert("funcao depreciada")};try{i3GEO.maparef.fatorZoomDinamico=g_zoomRefDinamico}catch(e){alert("funcao depreciada")};try{i3GEO.configura.mashuppar=g_mashuppar}catch(e){alert("funcao depreciada")};try{if(!$i("arvoreAdicionaTema")){i3GEO.arvoreDeTemas.IDHTML=objmapa.guiaMenu+"obj"}else{i3GEO.arvoreDeTemas.IDHTML="arvoreAdicionaTema"}}catch(e){alert("funcao depreciada")};try{if(g_uploaddbf=="nao"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.uploaddbf=false}}catch(e){alert("funcao depreciada")};try{if(g_uploadlocal=="nao"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.uploadlocal=false}}catch(e){alert("funcao depreciada")};try{if(g_downloadbase=="nao"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.downloadbase=false}}catch(e){alert("funcao depreciada")};try{if(g_conectarwms=="nao"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.conectarwms=false}}catch(e){alert("funcao depreciada")};try{if(g_conectargeorss=="nao"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.conectargeorss=false}}catch(e){alert("funcao depreciada")};try{if(g_nuvemTags=="nao"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.nuvemTags=false}}catch(e){alert("funcao depreciada")};try{if(g_kml=="nao"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.kml=false}}catch(e){alert("funcao depreciada")};try{if(g_qrcode=="nao"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.qrcode=false}}catch(e){alert("funcao depreciada")};try{if(g_tipoacao!=""){i3GEO.barraDeBotoes.BOTAOPADRAO=g_tipoacao}}catch(e){alert("funcao depreciada")}try{if(g_listaPropriedades){i3GEO.configura.listaDePropriedadesDoMapa=g_listaPropriedades}}catch(e){alert("funcao depreciada")};try{if(g_tempo_aplicar){i3GEO.configura.tempoAplicar=g_tempo_aplicar}}catch(e){alert("funcao depreciada")};try{if(g_janelaMen=="nao"){i3GEO.configura.iniciaJanelaMensagens=false}}catch(e){alert("funcao depreciada")};try{if(g_locaplic){i3GEO.configura.locaplic=g_locaplic}}catch(e){alert("funcao depreciada")};try{if(g_tempotip){i3GEO.configura.tempoMouseParado=g_tempotip}}catch(e){alert("funcao depreciada")};try{if(g_mostraRosa){i3GEO.configura.mostraRosaDosVentos=g_mostraRosa}}catch(e){alert("funcao depreciada")};try{if(g_visual){i3GEO.configura.visual=g_visual}}catch(e){alert("funcao depreciada")};try{if(g_mapaRefDisplay){i3GEO.configura.mapaRefDisplay=g_mapaRefDisplay}}catch(e){alert("funcao depreciada")};try{if(g_docaguias){i3GEO.configura.liberaGuias=g_docaguias}}catch(e){alert("funcao depreciada")};if(window.location.href.split("?")[1]){g_sid=window.location.href.split("?")[1];if(g_sid.split("#")[0]){g_sid=g_sid.split("#")[0]}}else{g_sid=""}i3GEO.configura.sid=g_sid;try{i3GEO.guias.ATUAL=g_guiaativa}catch(e){alert("funcao depreciada")}try{i3GEO.navega.autoRedesenho.INTERVALO=g_autoRedesenho}catch(e){alert("funcao depreciada")}try{i3GEO.eventos.NAVEGAMAPA=g_funcoesNavegaMapaDefault}catch(e){alert("funcao depreciada")}try{i3GEO.eventos.MOUSEMOVE=g_funcoesMousemoveMapaDefault}catch(e){alert("funcao depreciada")}try{i3GEO.eventos.MOUSECLIQUE=g_funcoesClickMapaDefault}catch(e){alert("funcao depreciada")}try{i3GEO.configura.entorno=g_entorno}catch(e){alert("funcao depreciada")}try{i3GEO.navega.lente.POSICAOX=g_posicaoLenteX=0}catch(e){alert("funcao depreciada")}try{i3GEO.navega.lente.POSICAOY=g_posicaoLenteY}catch(e){alert("funcao depreciada")}try{i3GEO.navega.destacaTema.TAMANHO=destacaTamanho}catch(e){alert("funcao depreciada")}if(!$i("tip")){var novoel=document.createElement("div");novoel.id="tip";novoel.style.position="absolute";novoel.style.zIndex=5000;if(navm){novoel.style.filter="alpha(opacity=90)"}document.body.appendChild(novoel)}try{objmapa.atualizaListaTemas=function(temas){alert("atualizaListaTemas foi depreciado. Utilize i3GEO.arvoreDeCamadas")}}catch(e){alert("funcao depreciada")}}if(typeof(i3GEO)=='undefined'){i3GEO=[]}cpObj=new cpaint();cpObj.set_async("true");cpObj.set_response_type("JSON");function Mapa(e,m){alert("Funcao Mapa foi depreciada. Utilize i3GEO.cria()");i3GEO.cria();this.inicializa=function(){i3GEO.finaliza=this.finaliza;i3GEO.inicia()}}objaguarde={abre:function(){alert("objaguarde foi depreciada. Utilize i3GEO.janela");i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"))},fecha:function(){alert("objaguarde foi depreciada. Utilize i3GEO.janela");i3GEO.janela.fechaAguarde("i3GEO.atualiza")}};function iCookie(nome,valor){alert("iCookie foi depreciado. Utilize i3GEO.util.insereCookie");i3GEO.util.insereCookie(nome,valor)}function pCookie(nome){alert("pCookie foi depreciado. Utilize i3GEO.util.pegaCookie");i3GEO.util.pegaCookie(nome)}function wdocaf(wlargura,waltura,wsrc,nx,ny,texto){var janela=i3GEO.janela.cria(wlargura,waltura,wsrc,nx,ny,texto)}function wdocaf2(wlargura,waltura,wsrc,nx,ny,texto){var id=YAHOO.util.Dom.generateId();i3GEO.janela.cria(wlargura,waltura,wsrc,nx,ny,texto,id,true)}function processevent1(exy1){alert("funcao depreciada")}function mensagemBanner(){alert("funcao depreciada")}function borra(){alert("funcao depreciada")}function movecursor(){alert("funcao depreciada");if($i("obj")){if($i("openlayers")||$i("flamingo")){$i("obj").style.display="none"}else{var obje=$i("obj").style;if($i("img")){eval("obje."+g_tipotop+"= objposicaocursor.telay + 9 + g_postpx");eval("obje."+g_tipoleft+"= objposicaocursor.telax + 9 + g_postpx")}else{eval("obje."+g_tipotop+"= objposicaocursor.telay - 15 + g_postpx");eval("obje."+g_tipoleft+"= objposicaocursor.telax + 15 + g_postpx")}}}if($i("box1")){var bx=$i("box1");if(bx.style.visibility!="visible"){bx.style.left=objposicaocursor.telax+g_postpx;bx.style.top=objposicaocursor.telay+g_postpx}}}function buscaRapida(){alert("funcao depreciada");i3geo_buscarapida()}function initJanelaZoom(qual){alert("funcao depreciada");i3GEO.barraDeBotoes.reativa(qual-1)}function sobeferramentas(){alert("funcao depreciada")}function desceferramentas(){alert("funcao depreciada")}function arvoreclick(itemID){alert("funcao depreciada");if(itemID.search("tema")==0){if($i(itemID).checked==true){$i(itemID).checked=false}else{$i(itemID).checked=true}}}function pegaTema(celula){alert("funcao depreciada");var nos=celula.parentNode.childNodes;var tempi=nos.length;for(var no=0;no<tempi;no++){if(nos[no].type=="checkbox"){return nos[no].value}}}function gerafilmef(qs){alert("funcao depreciada")}function gravaQuadro(variavel,valor){alert("funcao depreciada");i3GEO.gadgets.quadros.grava(variavel,valor)}function avancaQuadro(){alert("funcao depreciada");i3GEO.gadgets.quadros.avanca()}function zoomAnterior(){alert("funcao depreciada")}function zoomProximo(){alert("funcao depreciada")}function opcoesQuadros(){alert("funcao depreciada")}function filmef(o){alert("funcao depreciada")}function rebobinaf(){alert("funcao depreciada")}function filmezf(o){alert("funcao depreciada")}function quadrofilme(){alert("funcao depreciada")}function filmeanimaf(){alert("funcao depreciada")}function filmeanimarodaf(janima){alert("funcao depreciada")}function pegaimagens(){alert("funcao depreciada")}function calculaArea(pontos,pixel){alert("funcao depreciada");return(i3GEO.calculo.area(pontos,pixel))}function calculadistancia(lga,lta,lgb,ltb){alert("funcao depreciada");return(i3GEO.calculo.distancia(lga,lta,lgb,ltb))}function initJanelaRef(){alert("funcao depreciada");i3GEO.maparef.inicia()}function ajaxReferencia(retorno){alert("funcao depreciada");i3GEO.maparef.processaImagem(retorno)}function clicouRef(){alert("funcao depreciada")}function movimentoRef(obj){alert("funcao depreciada")}function mostraTip(retorno){alert("funcao depreciada");if(!$i("tip")){var novoel=document.createElement("div");novoel.id="tip";novoel.style.position="absolute";novoel.style.zIndex=5000;if(navm){novoel.style.filter="alpha(opacity=90)"}document.body.appendChild(novoel)}var i=$i("i3geo_rosa");if(i)i.style.display="none";var mostra=false;var retorno=retorno.data;if((retorno!="erro")&&(retorno!=undefined)){if($i("img")){$i("img").title=""}if(retorno!=""){var res="<div id='cabecatip' style='text-align:left;background-color:rgb(240,240,240)'><span style='color:navy;cursor:pointer;text-align:left' onclick='javascript:objmapaparado=\"cancela\"'>parar&nbsp;&nbsp;</span>";res+="<span style='color:navy;cursor:pointer;text-align:left' onclick='javascript:i3GEO.janela.TIPS.push($i(\"tip\"));$i(\"tip\").id=\"\";$i(\"cabecatip\").innerHTML =\"\";$i(\"cabecatip\").id =\"\"' >fixar</span></div>";var temas=retorno.split("!");var tema=temas.length-1;if(tema>=0){do{var titulo=temas[tema].split("@");if(g_tipotip=="completo"){res+="<span style='text-align:left;font-size:9pt'><b>"+titulo[0]+"</b></span><br>"}var ocorrencias=titulo[1].split("*");var ocorrencia=ocorrencias.length-1;if(ocorrencia>=0){do{if(ocorrencias[ocorrencia]!=""){var pares=ocorrencias[ocorrencia].split("##");var paresi=pares.length;for(var par=0;par<paresi;par++){var valores=pares[par].split("#");if(g_tipotip=="completo"){res=res+"<span class='tiptexto' style='text-align:left;font-size:9pt'>"+valores[0]+" <i>"+valores[1]+"</i></span><br>";var mostra=true}else{res=res+"<span class='tiptexto' style='text-align:left;font-size:9pt'><i>"+valores[1]+"</i></span><br>";var mostra=true}}}}while(ocorrencia--)}}while(tema--)}if(!mostra){$i("tip").style.display="none";return}if($i("janelaMen")){$i("janelaMenTexto").innerHTML=res}else{var i=$i("tip");i.innerHTML="<table style='text-align:left'><tr><td style='text-align:left'>"+res+"</td></tr></table>";ist=i.style;ist.top=objposicaocursor.telay-10;ist.left=objposicaocursor.telax-20;ist.display="block"}}}}function trataErro(){alert("funcao depreciada");i3GEO.janela.fechaAguarde()}function mostraguiaf(guia){alert("funcao depreciada");i3GEO.guias.mostra(guia)}function ativaGuias(){alert("funcao depreciada");for(var g=0;g<12;g++){if($i("guia"+g))var gpai=$i("guia"+g).parentNode}if(gpai){gpai.id="guiasYUI";gpai.className="yui-navset";var ins='<ul class="yui-nav" style="border-width:0pt 0pt 0px;border-color:rgb(240,240,240);border-bottom-color:white;">';try{if($i(objmapa.guiaTemas)){$i(objmapa.guiaTemas).innerHTML=$trad("g1")}if($i(objmapa.guiaMenu)){$i(objmapa.guiaMenu).innerHTML=$trad("g2")}if($i(objmapa.guiaLegenda)){$i(objmapa.guiaLegenda).innerHTML=$trad("g3")}if($i(objmapa.guiaListaMapas)){$i(objmapa.guiaListaMapas).innerHTML=$trad("g4")}}catch(e){alert("funcao depreciada")};for(var g=0;g<12;g++){if($i("guia"+g)){var tituloguia=$i("guia"+g).innerHTML;var re=new RegExp("&nbsp;","g");var tituloguia=tituloguia.replace(re,'');ins+='<li><a href="#"><em><div id="guia'+g+'" >'+tituloguia+'</div></em></a></li>'}}ins+="</ul>";gpai.innerHTML=ins;for(var g=0;g<12;g++){if($i("guia"+g)){eval('$i("guia'+g+'").onclick = function(){g_guiaativa = "guia'+g+'";mostraguiaf('+g+');}');$i("guia"+g).onmouseover=function(){var bcg=this.parentNode.parentNode.style;var cor=bcg.background.split(" ")[0];if(cor!="white")bcg.background="#bfdaff"};$i("guia"+g).onmouseout=function(){var bcg=this.parentNode.parentNode.style;var cor=bcg.background.split(" ")[0];if(cor!="white")bcg.background="transparent"};if($i("guia"+g+"obj")){$i("guia"+g+"obj").style.overflow="auto";$i("guia"+g+"obj").style.height=i3GEO.parametros.h}}}}if($i(objmapa.guiaTemas)){$i(objmapa.guiaTemas).onclick=function(){g_guiaativa=objmapa.guiaTemas;mostraguiaf(1)}}if($i(objmapa.guiaMenu)){$i(objmapa.guiaMenu).onclick=function(){g_guiaativa=objmapa.guiaMenu;mostraguiaf(2);if(!$i("arvoreAdicionaTema")){var ondeArvore=objmapa.guiaMenu+"obj"}else{var ondeArvore="arvoreAdicionaTema"}if(document.getElementById("outrasOpcoesAdiciona")){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde="outrasOpcoesAdiciona";i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore=false}i3GEO.arvoreDeTemas.cria(i3GEO.configura.sid,i3GEO.configura.locaplic,ondeArvore)}}if($i(objmapa.guiaLegenda)){$i(objmapa.guiaLegenda).onclick=function(){g_guiaativa=objmapa.guiaLegenda;mostraguiaf(4);objmapa.atualizaLegendaHTML()}}if($i(objmapa.guiaListaMapas)){$i(objmapa.guiaListaMapas).onclick=function(){g_guiaativa=objmapa.guiaListaMapas;mostraguiaf(5);if($i("banners")){$i("banners").innerHTML==$trad("o1");var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegaMapas&g_sid="+i3GEO.configura.sid;cpObj.call(p,"pegaMapas",pegaMapas)}else{alert("id banners nao encontrado")}}}}function docaguias(){alert("funcao depreciada");i3GEO.guias.libera()}function autoRedesenho(opcao){alert("funcao depreciada")}function selecao(){alert("funcao depreciada")}function cliqueSelecao(){alert("funcao depreciada")}function zoomboxf(tipo){alert("funcao depreciada")}function i3geo_comboGruposMenu(funcaoOnchange,idDestino,idCombo,largura,altura){alert("funcao depreciada")}function i3geo_comboSubGruposMenu(funcaoOnchange,idDestino,idCombo,idGrupo,largura,altura){alert("funcao depreciada")}function i3geo_comboTemasMenu(funcaoOnchange,idDestino,idCombo,idGrupo,idSubGrupo,largura,altura){alert("funcao depreciada")}function remapaf(){i3GEO.atualiza("");alert("funcao depreciada")}function limpacontainerf(){alert("funcao depreciada")}function inseremarcaf(xi,yi,funcaoOnclick,container){alert("funcao depreciada");i3GEO.utl.insereMarca.cria(xi,yi,funcaoOnclick,container)}function moveSelecaoPoli(){alert("funcao depreciada")}function cliqueSelecaoPoli(){alert("funcao depreciada")}function ativaEntorno(){alert("funcao depreciada")}function geraURLentorno(){alert("funcao depreciada")}function ajustaEntorno(){alert("funcao depreciada")}function ajaxabrelente(retorno){alert("funcao depreciada")}function movelentef(){alert("funcao depreciada")}function ativaClicks(docMapa){alert("funcao depreciada")}function incluir(path){i3GEO.util.adicionaSHP(path);alert("funcao depreciada")}function pontosdist(){this.xpt=[];this.ypt=[];this.dist=[];this.xtela=[];this.ytela=[];this.ximg=[];this.yimg=[];this.linhas=[];alert("funcao depreciada")}function mudaiconf(i){i3GEO.barraDeBotoes.ativaIcone(i);alert("funcao depreciada")}function calcposf(){i3GEO.mapa.ajustaPosicao();alert("funcao depreciada")}function recuperamapa(){alert("funcao depreciada")}function desenhoRichdraw(tipo,objeto,n){alert("funcao depreciada")}function ajaxhttp(){alert("funcao depreciada");try{var objhttp1=new XMLHttpRequest()}catch(ee){try{var objhttp1=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{var objhttp1=new ActiveXObject("Microsoft.XMLHTTP")}catch(E){var objhttp1=false}}}return(objhttp1)}function ajaxexecAS(programa,funcao){alert("funcao depreciada");var ohttp=ajaxhttp();ohttp.open("POST",programa,true);var retorno="";ohttp.onreadystatechange=function(){if(ohttp.readyState==4){retorno=ohttp.responseText;var reg=/Warning/gi;if(retorno.search(reg)!=-1){alert("OOps! Ocorreu um erro\n"+retorno);return}var reg=/erro/gi;if(retorno.search(reg)!=-1){alert("OOps! Ocorreu um erro\n"+retorno);return}if(funcao!="volta"){eval(funcao+'("'+retorno+'")')}}};ohttp.send(null)}function ajaxexec(programa,funcao){alert("funcao depreciada");var objhttp=ajaxhttp();objhttp.open('GET',programa,false);objhttp.send(null);if(objhttp.status==200){if(funcao!="volta"){eval(funcao+'("'+objhttp.responseText+'")')}else{return objhttp.responseText}}}function ajaxLegendaHTML(retorno){alert("funcao depreciada")}function ajaxLegendaImagem(retorno){alert("funcao depreciada")}function mede(){alert("funcao depreciada")}function cliqueMede(){alert("funcao depreciada")}function moveMede(){alert("funcao depreciada")}function area(){alert("funcao depreciada")}function cliqueArea(){alert("funcao depreciada")}function moveArea(){alert("funcao depreciada")}function textofid(){alert("funcao depreciada")}function inserexy(){alert("funcao depreciada")}function cliqueInseretoponimo(){alert("funcao depreciada")}function cliqueInserexy(){alert("funcao depreciada")}function inseregrafico(){alert("funcao depreciada")}function cliqueInseregrafico(){alert("funcao depreciada")}function ativaHistoricoZoom(iddiv){alert("funcao depreciada")}function ajaxhttp(){alert("funcao depreciada");return i3GEO.util.ajaxhttp()}function ajaxCorpoMapa(retorno){i3GEO.mapa.corpo.veirifca(retorno);alert("funcao depreciada")}function ajaxredesenha(retorno){i3GEO.atualiza(retorno);alert("funcao depreciada")}function ajaxIniciaParametros(retorno){i3GEO.atualiza(retorno);alert("funcao depreciada")}function montaMenuSuspenso(iddiv){i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.idhtml=iddiv;i3GEO.gadgets.mostraMenuSuspenso();alert("funcao depreciada")}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);if($i("localizarxygeoProjxg")){var temp=function(){i3GEO.coordenadas.atualizaGeo(objposicaocursor.dmsx,objposicaocursor.dmsy,"localizarxygeoProj")};YAHOO.util.Event.addListener(divgeo,"mousemove",temp)}}catch(men){alert("Erro ao tentar criar container richdraw "+men)}},criaDivContainer:function(){desenhoUltimaLinha="";desenhoUltimaLinhaPol="";if(!$i("divGeometriasTemp")){var pos,novoel,ne;pos=[0,0];pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));novoel=document.createElement("div");novoel.id="divGeometriasTemp";ne=novoel.style;ne.cursor="crosshair";ne.zIndex=0;if(i3GEO.Interface.TABLET===true){ne.zIndex=5000}ne.position="absolute";ne.width=i3GEO.parametros.w;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=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);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="<select onchange='i3GEO.desenho.definePadrao(this.value)'>";for(i=0;i<n;i+=1){sel="";if(lista[i]===i3GEO.desenho.estiloPadrao){sel="select"}caixa+="<option value='"+lista[i]+"' sel >"+lista[i]+"</option>"}caixa+="</select>";return caixa}};if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.Interface={TABLET:false,ALTTABLET:"openlayers_t.htm",OUTPUTFORMAT:"AGG_Q",BARRABOTOESTOP:12,BARRABOTOESLEFT:3,BARRADEZOOMTOP:7,BARRADEZOOMLEFT: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")}if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.adicionaKml("foo")}},cria:function(w,h){i3GEO.Interface[i3GEO.Interface.ATUAL].cria(w,h)},inicia:function(w,h){var temp=window.location.href.split("?")[0],gadgets=i3GEO.gadgets;if($i("i3GEOcompartilhar")){i3GEO.social.compartilhar("i3GEOcompartilhar",temp,temp,"semtotal")}gadgets.quadros.inicia(10);gadgets.quadros.grava("extensao",i3GEO.parametros.extentTotal);gadgets.mostraBuscaRapida();gadgets.mostraVersao();gadgets.mostraEmail();i3GEO.guias.cria();if($i("mst")){$i("mst").style.display="block"}if(i3GEO.configura.entorno.toLowerCase()==="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(){if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){i3GEO.barraDeBotoes.inicializaBarra()}else{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="<input style='position:relative;top:0px;left:0px;' type=image src='' id='img' />";$i(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:"&nbsp;<span class='container-close'></span>"},{text:"<img class='rosamais' style='height:18px;' src='"+$im("branco.gif")+"'><span style='position:relative;top:-4px;'> Aproxima</span>",onclick:{fn:i3GEO.navega.zoomin}},{text:"<img class='rosamenos' style='height:18px;' src='"+$im("branco.gif")+"'><span style='position:relative;top:-4px;'> Afasta</span>",onclick:{fn:i3GEO.navega.zoomout}},{text:"<img class='rosanorte' style='height:18px;' src='"+$im("branco.gif")+"'><span style='position:relative;top:-7px;'> Norte</span>",onclick:{fn:i3GEO.navega.panFixoNorte}},{text:"<img class='rosasul' style='height:18px;' src='"+$im("branco.gif")+"'><span style='position:relative;top:-7px;'> Sul</span>",onclick:{fn:i3GEO.navega.panFixoSul}},{text:"<img class='rosaleste' style='height:18px;' src='"+$im("branco.gif")+"'><span style='position:relative;top:-7px;'> Leste</span>",onclick:{fn:i3GEO.navega.panFixoLeste}},{text:"<img class='rosaoeste' style='height:18px;' src='"+$im("branco.gif")+"'><span style='position:relative;top:-7px;'> Oeste</span>",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();gadgets.mostraMenuLista();i3GEO.eventos.ativa(i);i3GEO.coordenadas.mostraCoordenadas();gadgets.mostraEscalaNumerica();gadgets.mostraEscalaGrafica();gadgets.visual.inicia();iu.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",configura.listaDePropriedadesDoMapa);i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,configura.sid,configura.locaplic);i3GEO.ajuda.ativaLetreiro(parametros.mensagens);i3GEO.Interface.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(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='<div id=flamingo style="width:0px;height:0px;text-align:left;background-image:url(/"'+i3GEO.configura.locaplic+'/imagens/i3geo1bw.jpg/")"></div>';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("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa)},ativaBotoes:function(){}},openlayers:{FUNDOTEMA:"yellow",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();openlayers.sobeLayersGraficos()},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='<div id=openlayers style="width:0px;height:0px;text-align:left;background-image:url('+i3GEO.configura.locaplic+'/imagens/i3geo1bw.jpg)"></div>';i.innerHTML=ins}f=$i("openlayers");f.style.width=w;f.style.height=h}i3GEO.Interface.IDMAPA="openlayers";if(i3GEO.Interface.TABLET===true){i3geoOL=new OpenLayers.Map({div:"openlayers",theme:null,controls:[new OpenLayers.Control.Attribution(),new OpenLayers.Control.TouchNavigation({dragPanOptions:{interval:100,enableKinetic:true}}),new OpenLayers.Control.ZoomPanel()]})}else{bb.INCLUIBOTAO.zoomli=true;bb.INCLUIBOTAO.pan=true;bb.INCLUIBOTAO.zoomtot=true;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,layersn,openlayers=i3GEO.Interface.openlayers;i3GEO.util.multiStep([openlayers.registraEventos,openlayers.zoom2ext],[null,[i3GEO.parametros.mapexten]],function(){});openlayers.criaLayers();if(openlayers.GADGETS.PanZoomBar===true){i3GEO.Interface.openlayers.OLpanzoombar=new OpenLayers.Control.PanZoomBar();i3geoOL.addControl(i3GEO.Interface.openlayers.OLpanzoombar);i3GEO.Interface.openlayers.OLpanzoombar.div.style.zIndex=5000;i3GEO.Interface.openlayers.OLpanzoombar.div.style.top=i3GEO.Interface.BARRADEZOOMTOP+"px";i3GEO.Interface.openlayers.OLpanzoombar.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+"px"}if(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<layersn;i++){texto="<input type=radio style='"+estilo+"' onclick='i3GEO.Interface.openlayers.ativaFundo(this.value)' name=i3GEObaseLayer value='"+layers[i].id+"' />"+layers[i].name;temp.propriedades.push({text:texto,url:""})}i3GEO.util.arvore("<b>"+$trad("p16")+"</b>","listaLayersBase",temp)}else{if(openlayers.GADGETS.LayerSwitcher===true){i3geoOL.addControl(new OpenLayers.Control.LayerSwitcher())}}if(openlayers.GADGETS.ScaleLine===true){pz=new OpenLayers.Control.ScaleLine();i3geoOL.addControl(pz);pz.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+5+"px"}if(openlayers.GADGETS.OverviewMap===true){i3geoOL.addControl(new OpenLayers.Control.OverviewMap())}if(i3GEO.Interface.TABLET===false){i3GEO.Interface.openlayers.OLpan=new OpenLayers.Control.Navigation();i3GEO.Interface.openlayers.OLzoom=new OpenLayers.Control.ZoomBox();i3GEO.Interface.openlayers.OLpanel=new OpenLayers.Control.Panel();i3GEO.Interface.openlayers.OLpanel.addControls([i3GEO.Interface.openlayers.OLpan,i3GEO.Interface.openlayers.OLzoom]);i3geoOL.addControl(i3GEO.Interface.openlayers.OLpanel)}if(i3GEO.configura.mapaRefDisplay!=="none"){if(i3GEO.util.pegaCookie("i3GEO.configura.mapaRefDisplay")){i3GEO.configura.mapaRefDisplay=i3GEO.util.pegaCookie("i3GEO.configura.mapaRefDisplay")}if(i3GEO.configura.mapaRefDisplay==="block"){i3GEO.maparef.inicia()}}if(i3GEO.Interface.TABLET===false){i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLpan)}i3GEO.Interface.ativaBotoes()};i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.openlayers.ligaDesliga(this);i3GEO.eventos.executaEventos(i3GEO.eventos.ATUALIZAARVORECAMADAS);";i3GEO.util.multiStep([i3GEO.coordenadas.mostraCoordenadas,montaMapa,i3GEO.gadgets.mostraMenuSuspenso,i3GEO.ajuda.ativaLetreiro,i3GEO.idioma.mostraSeletor,i3GEO.gadgets.mostraEscalaNumerica,i3GEO.util.arvore,i3GEO.gadgets.mostraMenuLista],[null,null,null,[i3GEO.parametros.mensagens],null,null,["<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa],null],function(){});i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===true){i3GEO.Interface.openlayers.adicionaListaKml()}if(i3GEO.parametros.kmlurl!==""){i3GEO.Interface.openlayers.adicionaKml(true,i3GEO.parametros.kmlurl)}},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.openlayers.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i,zoom;if(!$i("arvoreCamadasKml")){i3GEO.Interface.openlayers.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=true}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===false){i3GEO.arvoreDeCamadas.MOSTRALISTAKML=true;i3GEO.Interface.openlayers.criaArvoreKML()}i3GEO.Interface.openlayers.adicionaNoArvoreKml(url,titulo,ativo,ngeoxml)},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.openlayers.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.openlayers.ARVORE.getRoot();titulo="<table><tr><td><b>Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false;if(i3GEO.parametros.editor==="sim"){d=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/webservices.html' target=blank >Editar cadastro</a>",idmenu:"",enableHighlight:false,expanded:false},node)}},adicionaNoArvoreKml:function(url,nomeOverlay,ativo,id){var root,node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.openlayers.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}root=i3GEO.Interface.openlayers.ARVORE.getRoot();node=i3GEO.Interface.openlayers.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.openlayers.ativaDesativaCamadaKml(this,\""+url+"\")' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";if(navm){estilo="cursor:default;vertical-align:35%;padding-top:0px;"}else{estilo="cursor:default;vertical-align:top;"}html+="&nbsp;<span style='"+estilo+"'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.openlayers.ARVORE.draw();i3GEO.Interface.openlayers.ARVORE.collapseAll();node.expand();if(ativo===true){i3GEO.Interface.openlayers.insereLayerKml(id,url)}},insereLayerKml:function(id,url){var temp;eval(id+" = new OpenLayers.Layer.Vector('"+id+"', {displayOutsideMaxExtent:true,displayInLayerSwitcher:false,visibility:true, strategies: [new OpenLayers.Strategy.Fixed()],protocol: new OpenLayers.Protocol.HTTP({url: '"+url+"',format: new OpenLayers.Format.KML({extractStyles: true,extractAttributes: true,maxDepth: 5})})})");eval("i3geoOL.addLayer("+id+");");eval("temp = "+id+".div;");temp.onclick=function(e){var targ,id,temp,features,n,i,j,html="";if(!e){e=window.event}if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}temp=targ.id.split("_");if(temp[0]==="OpenLayers.Geometry.Point"){id=targ.id;temp=i3geoOL.getLayer(this.id);features=temp.features;n=features.length;for(i=0;i<n;i++){if(features[i].geometry.id===id){for(j in features[i].attributes){html+=j+": "+features[i].attributes[j]}g=features[i].geometry;i3geoOL.addPopup(new OpenLayers.Popup.FramedCloud("kml",new OpenLayers.LonLat(g.x,g.y),null,html,null,true))}}}}},ativaDesativaCamadaKml:function(obj,url){if(!obj.checked){eval(obj.value+".setVisibility(false);")}else{if(!(i3geoOL.getLayersByName(obj.value)[0])){i3GEO.Interface.openlayers.insereLayerKml(obj.value,url)}else{eval(obj.value+".setVisibility(true);")}}},criaLayers:function(){var configura=i3GEO.configura,url=configura.locaplic+"/classesphp/mapa_openlayers.php?g_sid="+i3GEO.configura.sid+"&TIPOIMAGEM="+configura.tipoimagem,urlfundo=configura.locaplic+"/classesphp/mapa_openlayers.php?g_sid="+i3GEO.configura.sid+"&layer=&tipolayer=fundo&TIPOIMAGEM="+configura.tipoimagem,nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,layer,layers,camada,urllayer,opcoes,i,n,temp,fundoIsBase=true;try{temp=i3GEO.Interface.openlayers.LAYERSADICIONAIS;n=temp.length;for(i=0;i<n;i++){if(temp[i].isBaseLayer===true&&temp[i].visibility===true){fundoIsBase=false}}}catch(e){}if(i3geoOL.getLayersByName("Nenhum").length===0&&fundoIsBase===true){layer=new OpenLayers.Layer.WMS("Nenhum",urlfundo,{map_imagetype:i3GEO.Interface.OUTPUTFORMAT},{ratio:1,singleTile:true,isBaseLayer:true,opacity:1,visibility:true});i3geoOL.addLayer(layer)}opcoes={gutter:0,isBaseLayer:false,displayInLayerSwitcher:false,opacity:1,singleTile:!(i3GEO.Interface.openlayers.TILES),ratio:1,buffer:i3GEO.Interface.openlayers.BUFFER,wrapDateLine:true,transitionEffect:"resize",eventListeners:{"loadstart":i3GEO.Interface.openlayers.loadStartLayer,"loadend":i3GEO.Interface.openlayers.loadStopLayer}};for(i=nlayers-1;i>=0;i--){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];if(i3geoOL.getLayersByName(camada.name).length===0){urllayer=url+"&layer="+camada.name+"&r="+Math.random();try{temp=camada.type===0?opcoes.gutter=20:opcoes.gutter=0;temp=camada.transitioneffect==="nao"?opcoes.transitionEffect="null":opcoes.transitionEffect="resize";if(camada.connectiontype===7&&camada.wmsurl!==""&&camada.usasld.toLowerCase()!="sim"){urllayer=camada.wmsurl+"&r="+Math.random();layer=new OpenLayers.Layer.WMS(camada.name,urllayer,{LAYERS:camada.name,format:camada.wmsformat,transparent:true},opcoes);if(camada.wmssrs!=""){layer.url=layer.url+"&SRS="+camada.wmssrs+"&CRS="+camada.wmssrs}}else{if(camada.tiles==="nao"||camada.escondido.toLowerCase()==="sim"||camada.connectiontype===10||camada.type===0||camada.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,{LAYERS:camada.name,map_imagetype:i3GEO.Interface.OUTPUTFORMAT},opcoes)}}catch(e){}if(camada.escondido.toLowerCase()==="sim"){layer.transitionEffect="null"}i3geoOL.addLayer(layer)}else{layer=i3geoOL.getLayersByName(camada.name)[0]}temp=camada.status==0?layer.setVisibility(false):layer.setVisibility(true)}try{i3geoOL.addLayers(i3GEO.Interface.openlayers.LAYERSADICIONAIS)}catch(e){}},sobeLayersGraficos:function(){var nlayers=i3geoOL.getNumLayers(),layers=i3geoOL.layers,i;for(i=0;i<nlayers;i++){if(layers[i].CLASS_NAME=="OpenLayers.Layer.Vector"){i3geoOL.raiseLayer(i3geoOL.layers[i],nlayers)}}},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}i3GEO.Interface.openlayers.removeTodosOsLayers();i3GEO.Interface.openlayers.criaLayers()},removeTodosOsLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,layer,i,camada;for(i=nlayers-1;i>=0;i--){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];layer=i3geoOL.getLayersByName(camada.name)[0];i3geoOL.removeLayer(layer,false)}},alteraParametroLayers:function(parametro,valor){var layers=i3geoOL.layers,nlayers=layers.length,i,url,reg;for(i=0;i<nlayers;i+=1){url=layers[i].url;reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");layers[i].url=url.replace(reg,"");eval("layers[i].mergeNewParams({"+parametro+":valor})");layers[i].redraw()}},loadStartLayer:function(event){i3GEO.Interface.STATUS.atualizando.push(event.object.name);YAHOO.util.Dom.setStyle("ArvoreTituloTema"+event.object.name,"background",i3GEO.Interface.openlayers.FUNDOTEMA)},loadStopLayer:function(event){i3GEO.Interface.STATUS.atualizando.remove(event.object.name);YAHOO.util.Dom.setStyle("ArvoreTituloTema"+event.object.name,"background","")},ordenaLayers:function(){var ordem=i3GEO.arvoreDeCamadas.CAMADAS,nordem=ordem.length,layer,layers,i,maiorindice;layers=i3geoOL.layers;maiorindice=i3geoOL.getLayerIndex(layers[(layers.length)-1]);for(i=nordem-1;i>=0;i--){layers=i3geoOL.getLayersByName(ordem[i].name);layer=layers[0];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));i3GEO.Interface.openlayers.OLpanzoombar.div.style.top=i3GEO.Interface.BARRADEZOOMTOP+"px";i3GEO.Interface.openlayers.OLpanzoombar.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+"px"},atualizaMapa:function(){var layers=i3geoOL.layers,nlayers=layers.length,i;for(i=0;i<nlayers;i++){layers[i].mergeNewParams({r:Math.random()});layers[i].url=layers[i].url.replace("&&&&&&&&&&&&&&","");layers[i].url=layers[i].url+"&&";if(layers[i].visibility===true){layers[i].redraw()}}},atualizaTema:function(retorno,tema){var layer=i3geoOL.getLayersByName(tema)[0];if(layer&&layer!=undefined){layer.mergeNewParams({r:Math.random()});layer.url=layer.url.replace("&&&&&&&&&&&&&&","");layer.url=layer.url+"&&";layer.redraw()}if(retorno===""){return}i3GEO.Interface.openlayers.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},registraEventos:function(){i3GEO.eventos.ativa($i("openlayers"));i3geoOL.events.register("moveend",i3geoOL,function(e){i3GEO.Interface.openlayers.recalcPar();i3GEO.eventos.navegaMapa()});i3geoOL.events.register("mousemove",i3geoOL,function(e){var p,lonlat,d,dc,imgp,targ,pos,mousex,mousey;p=e.xy;lonlat=i3geoOL.getLonLatFromPixel(p);if(!lonlat){return}d=i3GEO.calculo.dd2dms(lonlat.lon,lonlat.lat);try{objposicaocursor.ddx=lonlat.lon;objposicaocursor.ddy=lonlat.lat;objposicaocursor.dmsx=d[0];objposicaocursor.dmsy=d[1];objposicaocursor.imgx=p.x;objposicaocursor.imgy=p.y;pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));objposicaocursor.telax=p.x+pos[0];objposicaocursor.telay=p.y+pos[1]}catch(e){}})},ativaBotoes:function(){var imagemxy,x1,y1,x2,y2;imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){x2=imagemxy[0]+i3GEO.Interface.BARRABOTOESLEFT;y2=imagemxy[1]+i3GEO.Interface.BARRABOTOESTOP}if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","i3geo_barra2",false,x2,y2)}if(i3GEO.configura.visual!=="default"){i3GEO.gadgets.visual.troca(i3GEO.configura.visual)}i3GEO.barraDeBotoes.ativaBotoes()},recalcPar:function(){var bounds=i3geoOL.getExtent().toBBOX().split(","),escalaAtual=i3geoOL.getScale();if(i3GEO.parametros.mapscale!==escalaAtual){i3GEO.arvoreDeCamadas.atualizaFarol(escalaAtual)}i3GEO.parametros.mapexten=bounds[0]+" "+bounds[1]+" "+bounds[2]+" "+bounds[3];i3GEO.parametros.mapscale=escalaAtual;i3GEO.parametros.pixelsize=i3geoOL.getResolution();try{atualizaEscalaNumerica(parseInt(escalaAtual,10))}catch(e){}},zoom2ext:function(ext){var m,b;m=ext.split(" ");b=new OpenLayers.Bounds(m[0],m[1],m[2],m[3]);i3geoOL.zoomToExtent(b)},pan2ponto:function(x,y){i3geoOL.panTo(new OpenLayers.LonLat(x,y))}},googlemaps:{OPACIDADE:0.8,TIPOMAPA:"terrain",ZOOMSCALE:[591657550,295828775,147914387,73957193,36978596,18489298,9244649,4622324,2311162,1155581,577790,288895,144447,72223,36111,18055,9027,4513,2256,1128],PARAMETROSLAYER:"&TIPOIMAGEM="+i3GEO.configura.tipoimagem,posfixo:0,atualizaTema:function(retorno,tema){var indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(tema);i3GeoMap.overlayMapTypes.removeAt(indice);i3GEO.Interface.googlemaps.posfixo+=1;i3GEO.Interface.googlemaps.insereLayer(tema,indice);if(retorno===""){return}i3GEO.Interface.googlemaps.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},redesenha:function(){i3GEO.Interface.googlemaps.posfixo+=1;var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(camada.name);if(indice!==false){try{i3GeoMap.overlayMapTypes.removeAt(indice)}catch(e){}}}i3GEO.Interface.googlemaps.criaLayers()},cria:function(w,h){var i,f,ins,js;posfixo="&nd=0";i=$i(i3GEO.Interface.IDCORPO);if(i){f=$i("googlemapsdiv");if(!f){ins='<div id=googlemapsdiv style="width:0px;height:0px;text-align:left;background-image:url('+i3GEO.configura.locaplic+'/imagens/i3geo1bw.jpg)"></div>';i.innerHTML=ins}f=$i("googlemapsdiv");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.ativaBotoes();i3GEO.eventos.ativa($i(i3GEO.Interface.IDMAPA));i3GEO.coordenadas.mostraCoordenadas();i3GEO.gadgets.mostraEscalaNumerica();i3GEO.gadgets.mostraMenuSuspenso();i3GEO.gadgets.mostraMenuLista();i3GEO.idioma.mostraSeletor();g_operacao="";g_tipoacao="";i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.googlemaps.ligaDesliga(this)";i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);i3GEO.util.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===true){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<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(camada.name);if(!indice){if(camada.status!=0){i3GEO.Interface.googlemaps.insereLayer(camada.name,0)}}}},criaImageMap:function(nomeLayer){var i3GEOTileO,s;s="i3GEOTileO = new google.maps.ImageMapType({ "+"getTileUrl: function(coord, zoom) {"+" var url = '"+i3GEO.configura.locaplic+"/classesphp/mapa_googlemaps.php?g_sid="+i3GEO.configura.sid+"&Z=' + zoom + '&X=' + coord.x + '&Y=' + coord.y + '&layer="+nomeLayer+i3GEO.Interface.googlemaps.PARAMETROSLAYER+'&r='+Math.random()+"';"+" return url+'&nd='+i3GEO.Interface.googlemaps.posfixo; "+"}, "+"tileSize: new google.maps.Size(256, 256),"+"isPng: true,"+"name: '"+nomeLayer+"'"+"});";eval(s);return i3GEOTileO},insereLayer:function(nomeLayer,indice){var i=i3GEO.Interface.googlemaps.criaImageMap(nomeLayer);i3GeoMap.overlayMapTypes.insertAt(indice,i)},registraEventos:function(){var pos;google.maps.event.addListener(i3GeoMap,"dragstart",function(){g_operacao="";g_tipoacao=""});google.maps.event.addListener(i3GeoMap,"dragend",function(){i3GEO.Interface.googlemaps.recalcPar();i3GEO.eventos.navegaMapa()});google.maps.event.addListener(i3GeoMap,"tilesloaded",function(){i3GEO.Interface.googlemaps.recalcPar()});google.maps.event.addListener(i3GeoMap,"bounds_changed",function(){i3GEO.Interface.googlemaps.recalcPar();g_operacao="";g_tipoacao="";i3GEO.eventos.navegaMapa()});pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));google.maps.event.addListener(i3GeoMap,"mousemove",function(ponto){var teladms,tela;ponto=ponto.latLng;teladms=i3GEO.calculo.dd2dms(ponto.lng(),ponto.lat());tela=i3GeoMapOverlay.getProjection().fromLatLngToContainerPixel(ponto);objposicaocursor={ddx:ponto.lng(),ddy:ponto.lat(),dmsx:teladms[0],dmsy:teladms[1],imgx:tela.x,imgy:tela.y,telax:tela.x+pos[0],telay:tela.y+pos[1]}})},retornaIndiceLayer:function(nomeLayer){var i=false;try{i3GeoMap.overlayMapTypes.forEach(function(elemento,number){if(elemento.name===nomeLayer){i=number}});return i}catch(e){return false}},retornaObjetoLayer:function(nomeLayer){var i=false;try{i3GeoMap.overlayMapTypes.forEach(function(elemento,number){if(elemento.name===nomeLayer){i=elemento}});return i}catch(e){return false}},retornaDivLayer:function(nomeLayer){var i=false,divmapa=$i("googlemapsdiv"),divlayer=divmapa.firstChild.firstChild.firstChild.getElementsByTagName("div"),divs,divimg,j,ndivs=divlayer.length;for(j=0;j<ndivs;j++){divimg=divlayer[j].getElementsByTagName("img");if(divimg.length>0){if(divimg[0].src.search("&layer="+nomeLayer+"&")>0){return divimg[0].parentNode.parentNode.parentNode}}}},ligaDesliga:function(obj){var indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(obj.value),temp=function(){i3GEO.mapa.legendaHTML.atualiza()},desligar="",ligar="";if(obj.checked&&!indice){ligar=obj.value;i3GEO.Interface.googlemaps.insereLayer(obj.value,0);i3GEO.arvoreDeCamadas.alteraPropCamadas("status","2",obj.value)}else{if(indice!==false){desligar=obj.value;i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value);i3GeoMap.overlayMapTypes.removeAt(indice)}}if(desligar!==""||ligar!==""){i3GEO.php.ligatemas(temp,desligar,ligar)}},bbox:function(){var bd,so,ne,bbox;bd=i3GeoMap.getBounds();so=bd.getSouthWest();ne=bd.getNorthEast();bbox=so.lng()+" "+so.lat()+" "+ne.lng()+" "+ne.lat();return(bbox)},ativaBotoes:function(){var imagemxy,x1,y1,x2,y2;imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){x2=imagemxy[0]+i3GEO.Interface.BARRABOTOESLEFT;y2=imagemxy[1]+i3GEO.Interface.BARRABOTOESTOP}if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","i3geo_barra2",false,x2,y2)}if(i3GEO.configura.visual!=="default"){i3GEO.gadgets.visual.troca(i3GEO.configura.visual)}i3GEO.barraDeBotoes.ativaBotoes()},mudaOpacidade:function(valor){i3GEO.Interface.googlemaps.OPACIDADE=valor/200;i3GEO.Interface.googlemaps.redesenha()},recalcPar:function(){try{var bounds,sw,ne,escalaAtual=i3GEO.parametros.mapscale;sw=i3GeoMap.getBounds().getSouthWest();ne=i3GeoMap.getBounds().getNorthEast();i3GEO.parametros.mapexten=sw.lng()+" "+sw.lat()+" "+ne.lng()+" "+ne.lat();i3GEO.parametros.mapscale=i3GEO.Interface.googlemaps.calcescala();sw=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(0,1));ne=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(1,0));i3GEO.parametros.pixelsize=sw.lng()-ne.lng();if(i3GEO.parametros.pixelsize<0){i3GEO.parametros.pixelsize=i3GEO.parametros.pixelsize*-1}if(i3GEO.parametros.mapscale!==escalaAtual&&escalaAtual!==0){i3GEO.arvoreDeCamadas.atualizaFarol(i3GEO.parametros.mapscale)}}catch(e){i3GEO.parametros.mapexten="0 0 0 0";i3GEO.parametros.mapscale=0}},calcescala:function(){var zoom=i3GeoMap.getZoom();return(i3GEO.Interface.googlemaps.ZOOMSCALE[zoom])},escala2nzoom:function(escala){var n,i;n=i3GEO.Interface.googlemaps.ZOOMSCALE.length;for(i=0;i<n;i++){if(i3GEO.Interface.googlemaps.ZOOMSCALE[i]<escala){return(i)}}},zoom2extent:function(mapexten){var pol,ret,pt1,pt2,sw,ne,z;pol=mapexten;ret=pol.split(" ");pt1=(((ret[0]*-1)-(ret[2]*-1))/2)+ret[0]*1;pt2=(((ret[1]-ret[3])/2)*-1)+ret[1]*1;sw=new google.maps.LatLng(ret[1],ret[0]);ne=new google.maps.LatLng(ret[3],ret[2]);i3GeoMap.fitBounds(new google.maps.LatLngBounds(sw,ne))},pan2ponto:function(x,y){i3GeoMap.panTo(new google.maps.LatLng(y,x))},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i,zoom;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googlemaps.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=true}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===false){i3GEO.arvoreDeCamadas.MOSTRALISTAKML=true;i3GEO.Interface.googlemaps.criaArvoreKML()}i3GEO.Interface.googlemaps.adicionaNoArvoreGoogle(url,titulo,ativo,ngeoxml)},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.googlemaps.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaNoArvoreGoogle:function(url,nomeOverlay,ativo,id){var root,node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googlemaps.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}root=i3GEO.Interface.googlemaps.ARVORE.getRoot();node=i3GEO.Interface.googlemaps.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.googlemaps.ativaDesativaCamadaKml(this,\""+url+"\")' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";if(navm){estilo="cursor:default;vertical-align:35%;padding-top:0px;"}else{estilo="cursor:default;vertical-align:top;"}html+="&nbsp;<span style='"+estilo+"'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.googlemaps.ARVORE.draw();i3GEO.Interface.googlemaps.ARVORE.collapseAll();node.expand();if(ativo===true){eval(id+" = new google.maps.KmlLayer('"+url+"',{map:i3GeoMap,preserveViewport:true});")}},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.googlemaps.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.googlemaps.ARVORE.getRoot();titulo="<table><tr><td><b>Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false;if(i3GEO.parametros.editor==="sim"){d=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/webservices.html' target=blank >Editar cadastro</a>",idmenu:"",enableHighlight:false,expanded:false},node)}},ativaDesativaCamadaKml:function(obj,url){if(!obj.checked){eval(obj.value+".setMap(null);")}else{eval(obj.value+" = new google.maps.KmlLayer(url,{map:i3GeoMap,preserveViewport:true});")}},alteraParametroLayers:function(parametro,valor){parametro=parametro.toUpperCase();var reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");i3GEO.Interface.googlemaps.PARAMETROSLAYER=i3GEO.Interface.googlemaps.PARAMETROSLAYER.replace(reg,"");i3GEO.Interface.googlemaps.PARAMETROSLAYER+="&"+parametro+"="+valor;i3GEO.Interface.googlemaps.redesenha()}},googleearth:{PARAMETROSLAYER:"&TIPOIMAGEM="+i3GEO.configura.tipoimagem,posfixo:"",GADGETS:{setMouseNavigationEnabled:true,setStatusBarVisibility:true,setOverviewMapVisibility:true,setScaleLegendVisibility:true,setAtmosphereVisibility:true,setGridVisibility:false,getSun:false,LAYER_BORDERS:true,LAYER_BUILDINGS:false,LAYER_ROADS:false,LAYER_TERRAIN:true},POSICAOTELA:[0,0],aguarde:"",ligaDesliga:function(obj){var layer=i3GEO.Interface.googleearth.retornaObjetoLayer(obj.value),temp=function(){i3GEO.mapa.legendaHTML.atualiza()},desligar="",ligar="";if(obj.checked){i3GEO.arvoreDeCamadas.alteraPropCamadas("status","2",obj.value);ligar=obj.value}else{i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value);desligar=obj.value}layer.setVisibility(obj.checked);if(desligar!==""||ligar!==""){i3GEO.php.ligatemas(temp,desligar,ligar)}},atualizaTema:function(retorno,tema){var layer=i3GEO.Interface.googleearth.retornaObjetoLayer(tema),hr=layer.getLink().getHref();hr=hr.replace("&&&&&","");layer.getLink().setHref(hr+"&");if(retorno===""){return}i3GEO.Interface.googleearth.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},redesenha:function(){i3GEO.Interface.googleearth.posfixo+="&";var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googleearth.retornaObjetoLayer(camada.name);if(indice!==false){try{i3GeoMap.getFeatures().removeChild(indice)}catch(e){}}}i3GEO.Interface.googleearth.criaLayers()},cria:function(w,h){var i,i3GeoMap3d,i3GeoMap,texto;i3GEO.configura.listaDePropriedadesDoMapa={"propriedades":[{text:"p2",url:"javascript:i3GEO.mapa.dialogo.tipoimagem()"},{text:"p3",url:"javascript:i3GEO.mapa.dialogo.opcoesLegenda()"},{text:"p4",url:"javascript:i3GEO.mapa.dialogo.opcoesEscala()"},{text:"p8",url:"javascript:i3GEO.mapa.dialogo.queryMap()"},{text:"p9",url:"javascript:i3GEO.mapa.dialogo.corFundo()"},{text:"p10",url:"javascript:i3GEO.mapa.dialogo.gradeCoord()"}]};texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setMouseNavigationEnabled===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setMouseNavigationEnabled(this.checked)'";texto+="> "+$trad("ge1");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setStatusBarVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setStatusBarVisibility(this.checked)'";texto+="> "+$trad("ge2");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setOverviewMapVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setOverviewMapVisibility(this.checked)'";texto+="> "+$trad("ge3");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setScaleLegendVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setScaleLegendVisibility(this.checked)'";texto+="> "+$trad("ge4");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setAtmosphereVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setAtmosphereVisibility(this.checked)'";texto+="> "+$trad("ge5");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setGridVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setGridVisibility(this.checked)'";texto+="> "+$trad("ge6");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.getSun===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getSun().setVisibility(this.checked)'";texto+="> "+$trad("ge7");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_BORDERS===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_BORDERS, i3GEO.Interface.checked)'";texto+="> "+$trad("ge8");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_BUILDINGS===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_BUILDINGS, i3GEO.Interface.checked)'";texto+="> "+$trad("ge9");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_ROADS===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_ROADS, i3GEO.Interface.checked)'";texto+="> "+$trad("ge10");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_TERRAIN===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_TERRAIN, i3GEO.Interface.checked)'";texto+="> "+$trad("ge11");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});i3GEO.util.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa);i3GEO.barraDeBotoes.INCLUIBOTAO.zoomli=false;i3GEO.barraDeBotoes.INCLUIBOTAO.pan=false;i3GEO.barraDeBotoes.INCLUIBOTAO.zoomtot=false;i3GEO.Interface.IDMAPA="i3GeoMap3d";i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.googleearth.ligaDesliga(this)";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)}i3GeoMap=null;google.load("earth","1")},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.gadgets.mostraMenuLista();i3GEO.Interface.googleearth.ativaBotoes();i3GEO.gadgets.mostraInserirKml("inserirKml");if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===true){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<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googleearth.retornaIndiceLayer(camada.name);layer=i3GEO.Interface.googleearth.retornaObjetoLayer(camada.name);if(indice===false){layer=i3GEO.Interface.googleearth.insereLayer(camada.name)}try{if(camada.status!=0){layer.setVisibility(true)}else{layer.setVisibility(false)}}catch(e){}}},insereLayer:function(nomeLayer){var kmlUrl=i3GEO.configura.locaplic+"/classesphp/mapa_googleearth.php?REQUEST=GetKml&g_sid="+i3GEO.configura.sid+"&layer="+nomeLayer+i3GEO.Interface.googleearth.PARAMETROSLAYER+"&r="+Math.random(),linki3geo=i3GeoMap.createLink(''),nl=i3GeoMap.createNetworkLink('');linki3geo.setHref(kmlUrl+i3GEO.Interface.googleearth.posfixo);nl.setLink(linki3geo);nl.setFlyToView(false);nl.setName(nomeLayer);i3GeoMap.getFeatures().appendChild(nl);return nl},retornaIndiceLayer:function(nomeLayer){var n=i3GeoMap.getFeatures().getChildNodes().getLength(),indice=false;for(i=0;i<n;i++){if(i3GeoMap.getFeatures().getChildNodes().item(i).getName()===nomeLayer){indice=i}}return indice},retornaObjetoLayer:function(nomeLayer){var n=i3GeoMap.getFeatures().getChildNodes().getLength(),indice=false,i;for(i=0;i<n;i++){if(i3GeoMap.getFeatures().getChildNodes().item(i).getName()===nomeLayer){indice=i3GeoMap.getFeatures().getChildNodes().item(i)}}return indice},registraEventos:function(){google.earth.addEventListener(i3GeoMap.getView(),"viewchangeend",function(e){i3GEO.Interface.googleearth.recalcPar()});google.earth.addEventListener(i3GeoMap.getGlobe(),'mousemove',function(event){d=i3GEO.calculo.dd2dms(event.getLongitude(),event.getLatitude());objposicaocursor={ddx:event.getLongitude(),ddy:event.getLatitude(),dmsx:d[0],dmsy:d[1],imgx:event.getClientX(),imgy:event.getClientY(),telax:event.getClientX()+i3GEO.Interface.googleearth.POSICAOTELA[0],telay:event.getClientY()+i3GEO.Interface.googleearth.POSICAOTELA[1]};i3GEO.eventos.mousemoveMapa()});google.earth.addEventListener(i3GeoMap.getGlobe(),'click',function(event){if(i3GEO.Interface.googleearth.aguarde.visibility==="hidden"){i3GEO.eventos.mousecliqueMapa()}else{i3GEO.Interface.googleearth.aguarde.visibility="hidden"}})},recalcPar:function(){var bounds;bounds=i3GeoMap.getView().getViewportGlobeBounds();i3GEO.parametros.mapexten=bounds.getWest()+" "+bounds.getSouth()+" "+bounds.getEast()+" "+bounds.getNorth()},falha:function(){alert("Falhou. Vc precisa do plugin instalado")},ativaBotoes:function(){var cabecalho=function(){i3GEO.barraDeBotoes.ativaIcone("")},minimiza=function(){i3GEO.janela.minimiza("i3GEOF.ferramentasGE")},janela=i3GEO.janela.cria("230px","110px","","","","Ferramentas","i3GEOF.ferramentasGE",false,"hd",cabecalho,minimiza);i3GEO.barraDeBotoes.TEMPLATEBOTAO='<div style="display:inline;background-color:rgb(250,250,250);"><img src="'+i3GEO.configura.locaplic+'/imagens/branco.gif" id="$$"/></div>&nbsp;';i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","",false,"200","200",janela[2].id);i3GEO.barraDeBotoes.ativaBotoes();i3GEO.Interface.googleearth.aguarde=$i("i3GEOF.ferramentasGE_imagemCabecalho").style;$i("i3GEOF.ferramentasGE_minimizaCabecalho").style.right="0px";$i("i3GEOF.ferramentasGE").lastChild.style.display="none";i3GEO.ajuda.abreJanela()},balao:function(texto,ddx,ddy){var placemark=i3GeoMap.createPlacemark(''),point=i3GeoMap.createPoint(''),b;point.setLatitude(ddy);point.setLongitude(ddx);placemark.setGeometry(point);b=i3GeoMap.createHtmlStringBalloon('');b.setContentString("<div style=text-align:left >"+texto+"</div>");b.setFeature(placemark);i3GeoMap.setBalloon(b)},insereMarca:function(description,ddx,ddy,name,snippet){var placemark=i3GeoMap.createPlacemark(''),point=i3GeoMap.createPoint('');placemark.setName(name);point.setLatitude(ddy);point.setLongitude(ddx);placemark.setGeometry(point);if(description!==""){placemark.setDescription(description)}placemark.setSnippet(snippet);i3GeoMap.getFeatures().appendChild(placemark)},insereCirculo:function(centerLng,centerLat,radius,name,snippet){function makeCircle(centerLat,centerLng,radius){var ring=i3GeoMap.createLinearRing(''),steps=25,i,pi2=Math.PI*2,lat,lng;for(i=0;i<steps;i++){lat=centerLat+radius*Math.cos(i/steps*pi2);lng=centerLng+radius*Math.sin(i/steps*pi2);ring.getCoordinates().pushLatLngAlt(lat,lng,0)}return ring}var polygonPlacemark=i3GeoMap.createPlacemark(''),poly=i3GeoMap.createPolygon(''),outer,polyStyle;poly.setAltitudeMode(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND);polygonPlacemark.setGeometry(poly);outer=i3GeoMap.createLinearRing('');polygonPlacemark.getGeometry().setOuterBoundary(makeCircle(centerLat,centerLng,radius));polygonPlacemark.setName(name);polygonPlacemark.setSnippet(snippet);polygonPlacemark.setStyleSelector(i3GeoMap.createStyle(''));polyStyle=polygonPlacemark.getStyleSelector().getPolyStyle();polyStyle.setFill(0);i3GeoMap.getFeatures().appendChild(polygonPlacemark)},insereLinha:function(xi,yi,xf,yf,name,snippet){var lineStringPlacemark=i3GeoMap.createPlacemark(''),lineString,lineStyle;lineStringPlacemark.setName(name);lineString=i3GeoMap.createLineString('');lineString.setAltitudeMode(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND);lineStringPlacemark.setGeometry(lineString);lineString.getCoordinates().pushLatLngAlt(yi,xi,0);lineString.getCoordinates().pushLatLngAlt(yf,xf,0);lineStringPlacemark.setStyleSelector(i3GeoMap.createStyle(''));lineStringPlacemark.setSnippet(snippet);lineStyle=lineStringPlacemark.getStyleSelector().getLineStyle();lineStyle.setWidth(3);i3GeoMap.getFeatures().appendChild(lineStringPlacemark)},removePlacemark:function(nome){var features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i,nfeatures=[];for(i=0;i<n;i++){try{if(features.getChildNodes().item(i).getName()===nome||features.getChildNodes().item(i).getDescription()===nome||features.getChildNodes().item(i).getSnippet()===nome){nfeatures.push(features.getChildNodes().item(i))}}catch(e){}}n=nfeatures.length;for(i=0;i<n;i++){features.removeChild(nfeatures[i])}},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i,zoom;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googleearth.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=false}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(arguments.length===2){ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);linki3geokml=i3GeoMap.createLink('');if(url.split("http").length===1){url=i3GEO.util.protocolo()+"://"+window.location.host+url}linki3geokml.setHref(url);eval(ngeoxml+" = i3GeoMap.createNetworkLink('')");eval(ngeoxml+".setLink(linki3geokml)");if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===false){i3GEO.arvoreDeCamadas.MOSTRALISTAKML=true;i3GEO.Interface.googleearth.criaArvoreKML()}i3GEO.Interface.googleearth.adicionaNoArvoreGoogle(url,titulo,ativo,ngeoxml)},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.googleearth.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaNoArvoreGoogle:function(url,nomeOverlay,ativo,id){var root,node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googleearth.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}root=i3GEO.Interface.googleearth.ARVORE.getRoot();node=i3GEO.Interface.googleearth.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.googleearth.ativaDesativaCamadaKml(this)' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";html+="&nbsp;<span style='cursor:move'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.googleearth.ARVORE.draw();i3GEO.Interface.googleearth.ARVORE.collapseAll();node.expand()},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.googleearth.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.googleearth.ARVORE.getRoot();titulo="<table><tr><td><b>Google Earth Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false;if(i3GEO.parametros.editor==="sim"){d=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/webservices.html' target=blank >Editar cadastro</a>",idmenu:"",enableHighlight:false,expanded:false},node)}},existeLink:function(url){var existe=false,features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i;for(i=0;i<n;i++){try{if(features.getChildNodes().item(i).getLink().getHref()===url){existe=true}}catch(e){}}return(existe)},ativaDesativaLink:function(url,valor){var features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i;for(i=0;i<n;i++){try{if(features.getChildNodes().item(i).getLink().getHref()===url){features.getChildNodes().item(i).setVisibility(valor)}}catch(e){}}},ativaDesativaCamadaKml:function(obj){var url=eval(obj.value+".getLink().getHref()"),existe=i3GEO.Interface.googleearth.existeLink(url);if(!obj.checked){i3GEO.Interface.googleearth.ativaDesativaLink(url,false)}else{if(existe===false){eval("i3GeoMap.getFeatures().appendChild("+obj.value+")")}else{i3GEO.Interface.googleearth.ativaDesativaLink(url,true)}}},zoom2extent:function(mapexten){var r=6378700,lng2,lng1,lat1,lat2,ret=mapexten.split(" "),fov=32,camera=i3GeoMap.getView().copyAsCamera(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND),dy,dx,d,dist,alt;lng2=(ret[0]*1);lng1=(ret[2]*1);lat1=(ret[1]*1);lat2=(ret[3]*1);camera.setLatitude((lat1+lat2)/2.0);camera.setLongitude((lng1+lng2)/2.0);camera.setHeading(0.0);camera.setTilt(0.0);dy=Math.max(lat1,lat2)-Math.min(lat1,lat2);dx=Math.max(lng1,lng2)-Math.min(lng1,lng2);d=Math.max(dy,dx);d=d*Math.PI/180.0;dist=r*Math.tan(d/2);alt=dist/(Math.tan(fov*Math.PI/180.0));camera.setAltitude(alt);i3GeoMap.getView().setAbstractView(camera)},alteraParametroLayers:function(parametro,valor){parametro=parametro.toUpperCase();var reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");i3GEO.Interface.googleearth.PARAMETROSLAYER=i3GEO.Interface.googleearth.PARAMETROSLAYER.replace(reg,"");i3GEO.Interface.googleearth.PARAMETROSLAYER+="&"+parametro+"="+valor;i3GEO.Interface.googleearth.redesenha()}}};if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.mapa={AUTORESIZE:false,GEOXML:[],ativaAutoResize:function(){window.onresize=function(){var temp=setTimeout(function(){i3GEO.reCalculaTamanho();i3GEO.barraDeBotoes.recria("i3geo_barra2");if(i3GEO.Interface.TABLET===true){i3GEO.guias.escondeGuias()}else{i3GEO.guias.ajustaAltura()}},2000)}},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+='<div style="cursor: pointer; text-align: left; font-size: 10px; display: block; height: 35px;" onclick="i3GEO.mapa.legendaHTML.libera()"><img id="soltaLeg" src="../imagens/branco.gif" title="clique para liberar" style="margin: 5px; position: relative;"> <p style="position: relative; left: -30px; top: -22px;">Mostra a legenda em uma janela</p></div>'}ins+="<div id='corpoLegi' >"+retorno.data.legenda+"</div>";$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<elementos.length;i+=1){elementos[i].style.display="none"}}};if(i3GEO.mapa.legendaHTML.ID!==""){idleg=$i(i3GEO.mapa.legendaHTML.ID);if(idleg&&idleg.style.display==="block"){i3GEO.mapa.legendaHTML.obtem(temp)}}idleg=$i("wlegenda");if(idleg&&idleg.style.display==="block"){i3GEO.mapa.legendaHTML.obtem(temp)}},obtem:function(funcao){i3GEO.php.criaLegendaHTML(funcao,"",i3GEO.configura.templateLegenda)},ativaDesativaTema:function(inputbox){var temp=function(){i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem);i3GEO.arvoreDeCamadas.atualiza("");i3GEO.janela.fechaAguarde("redesenha")};i3GEO.janela.abreAguarde("redesenha",$trad("o1"));if(!inputbox.checked){i3GEO.php.ligatemas(temp,inputbox.value,"")}else{i3GEO.php.ligatemas(temp,"",inputbox.value)}},libera:function(){var temp=function(retorno){var novoel,temp,n,i;if(!$i("moveLegi")){novoel=document.createElement("div");novoel.id="moveLegi";novoel.style.display="block";temp='<div class="hd" style=background:white >Legenda</div>';temp+='<div id="wlegenda" style="display:block;text-align:left;background-color:white;height:300px;width:300px;overflow:auto" ></div>';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:true});YAHOO.moveLegi.xp.panel.render()}$i("wlegenda").innerHTML=retorno.data.legenda;temp=$i("wlegenda").getElementsByTagName("input");n=temp.length;for(i=0;i<n;i+=1){temp[i].style.display="none"}YAHOO.moveLegi.xp.panel.show();$i("moveLegi_c").style.zIndex=100000;$i("moveLegi").style.border="1px solid gray"};i3GEO.mapa.legendaHTML.obtem(temp)}},legendaIMAGEM:{obtem:function(funcao){i3GEO.php.criaLegendaImagem(funcao)}},dialogo:{telaRemota:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.telaremota()","telaremota","telaremota")},t3d:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.t3d()","3d","t3d")},imprimir:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.imprimir()","imprimir","imprimir")},mostraExten:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.mostraExten()","mostraexten","mostraExten")},outputformat:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.outputformat()","outputformat","outputformat")},autoredesenha:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.autoredesenha()","opcoes_autoredesenha","opcoesTempo")},salvaMapa:function(){if(i3GEO.parametros===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.salvaMapa()","salvamapa","salvaMapa")},carregaMapa:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.carregaMapa()","carregamapa","carregaMapa")},convertews:function(){if(i3GEO.parametros.mapfile===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.convertews()","convertews","converteMapaWS")},convertekml:function(){if(i3GEO.parametros.mapfile===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.convertekml()","convertemapakml","converteMapaKml")},queryMap:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.queryMap()","opcoes_querymap","opcoesQuery")},template:function(){i3GEO.janela.cria("300px","400px",i3GEO.configura.locaplic+"/ferramentas/template/index.htm","","","Template <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=1&idajuda=8' >&nbsp;&nbsp;&nbsp;</a>")},tamanho:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tamanho()","opcoes_tamanho","opcoesTamanho")},tipoimagem:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tipoimagem()","tipoimagem","tipoimagem")},corFundo:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.corFundo()","opcoes_fundo","opcoesFundo")},opcoesEscala:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesEscala()","opcoes_escala","opcoesEscala")},opcoesLegenda:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesLegenda()","opcoes_legenda","opcoesLegenda")},gradeCoord:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.gradeCoord()","gradecoord","gradeCoord")},cliqueTexto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueTexto()","inseretxt","inseretxt")},selecao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.selecao()","selecao","selecao")},cliquePonto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliquePonto()","inserexy2","inserexy")},cliqueGrafico:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueGrafico()","inseregrafico","insereGrafico")},cliqueIdentificaDefault:function(){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<ntemas;j+=1){if(i3GEO.arvoreDeCamadas.CAMADAS[j].etiquetas!==""){etiquetas=true}}if(etiquetas===false){return}if(i3GEO.Interface.ATUAL==="padrao"){$i("img").style.cursor="wait"}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.aguarde.visibility="visible"}retorna=function(retorno){var pos,temp,rfes,n,i,mostra,res,temas,ntemas,titulo,tips,j,ntips,ins,r,ds,nds,s,balloon,configura=i3GEO.configura,tipotip=configura.tipotip;i=$i("i3geo_rosa");if(i){i.style.display="none"}mostra=false;retorno=retorno.data;if(retorno!==""){res="";temas=retorno;if(!temas){return}ntemas=temas.length;for(j=0;j<ntemas;j+=1){titulo=temas[j].nome;if(tipotip==="completo"||tipotip==="balao"){titulo="<span style='text-decoration:underline;text-align:left;font-size:9pt'><b>"+titulo+"</b></span><br>"}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<nds;s+=1){for(r=0;r<ntips;r+=1){try{eval("var alias = ds[s]."+tips[r]+".alias");eval("var valor = ds[s]."+tips[r]+".valor");eval("var link = ds[s]."+tips[r]+".link");eval("var img = ds[s]."+tips[r]+".img");if(tipotip==="completo"||tipotip==="balao"){if(valor!==""&&link===""){ins+="<span class='tiptexto' style='text-align:left;font-size:8pt'>"+alias+" :"+valor+"</span><br>"}if(valor!==""&&link!==""){ins+="<span class='tiptexto' style='text-align:left;font-size:8pt'>"+alias+" : <a style='color:blue;cursor:pointer' target=_blanck href='"+link+"' >"+valor+"</a></span><br>"}if(img!==""){ins+=img+"<br>"}ins+="<nl>";mostra=true}else{ins+="<span class='tiptexto' style='text-align:left;font-size:8pt'>"+valor+"</span><br>";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.janela.TIPS.push('marcaIdentifica');pos=i3GEO.util.posicionaImagemNoMapa("marcaIdentifica");balloon=new Balloon();BalloonConfig(balloon,'GBox');balloon.delayTime=0;res="<div style=text-align:left;overflow:auto;height:"+configura.alturatip+";width:"+configura.larguratip+"; >"+res+"</div>";temp=$i('marcaIdentifica');if(temp){balloon.showTooltip(temp,res,null,null,null,pos[1],pos[0]);balloon.addCloseButton();temp.onclick=function(e){if(!e){e=window.event}document.body.removeChild(balloon.getEventTarget(e));balloon.hideTooltip()}}}}}}if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(configura.cursores,temp,i3GEO.Interface.IDMAPA,configura.locaplic)}};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={TEMPORIZADORESID:{},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"));i3GEO.php.excluitema(i3GEO.atualiza,[tema]);i3GEO.mapa.ativaTema("")},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)}},temporizador:function(idtema,tempo){if(!tempo){tempo=$i("temporizador"+idtema).value}if(tempo!=""&&parseInt(tempo,10)>0){eval('i3GEO.tema.TEMPORIZADORESID.'+idtema+' = {tempo: '+tempo+',idtemporizador: setInterval(function('+idtema+'){if(!$i("arrastar_'+idtema+'")){delete(i3GEO.tema.TEMPORIZADORESID.'+idtema+');return;}i3GEO.Interface.atualizaTema("",idtema);},parseInt('+tempo+',10)*1000)};')}else{try{window.clearInterval(i3GEO.tema.TEMPORIZADORESID[idtema].idtemporizador);delete(i3GEO.tema.TEMPORIZADORESID[idtema])}catch(e){}}},dialogo:{mostraWms:function(tema){i3GEO.janela.mensagemSimples(i3GEO.configura.locaplic+"/ogc.php?tema="+tema,"Endereço do WMS")},comentario:function(tema){i3GEO.janela.cria("530px","330px",i3GEO.configura.locaplic+"/ferramentas/comentarios/index.php?tema="+tema+"&g_sid="+i3GEO.configura.sid+"&locaplic="+i3GEO.configura.locaplic,"","","<img src='"+i3GEO.configura.locaplic+"/imagens/player_volta.png' style=cursor:pointer onclick='javascript:history.go(-1)'><span style=position:relative;top:-2px; > Comentários de "+tema+" </span><a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=7&idajuda=68' >&nbsp;&nbsp;&nbsp;</a>","comentario"+Math.random())},cortina:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.cortina()","cortina","cortina")},abreKml:function(tema,tipo){if(arguments.lenght===1){tipo="kml"}if(typeof(i3GEOF.converteKml)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/convertekml/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.converteKml.criaJanelaFlutuante('"+tema+"','"+tipo+"')","i3GEOF.converteKml_script")}else{i3GEOF.converteKml.criaJanelaFlutuante(tema,tipo)}},salvaMapfile:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.salvamapfile()","salvamapfile","salvamapfile")},graficotema:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.graficotema()","graficotema","graficoTema")},toponimia:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.toponimia()","toponimia","toponimia")},filtro:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.filtro()","filtro","filtro")},procuraratrib:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.procuraratrib()","busca","busca")},tabela:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.tabela()","tabela","tabela")},etiquetas:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.etiquetas()","etiqueta","etiqueta")},editaLegenda:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.editaLegenda()","legenda","legenda")},download:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.download()","download","download")},sld:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.janela.cria("500px","350px",i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=tema2sld&tema="+idtema+"&g_sid="+i3GEO.configura.sid,"","","SLD <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=41' >&nbsp;&nbsp;&nbsp;</a>")},aplicarsld:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.aplicarsld()","aplicarsld","aplicarsld")},editorsql:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.editorsql()","editorsql","editorsql")}}};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 <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=3&idajuda=88' >&nbsp;&nbsp;&nbsp;</a>");atualizaLinhaDoTempo=function(){var doc,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:{inicia:function(){pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[],linhastemp:[]};i3GEO.analise.medeDistancia.criaJanela();if(g_tipoacao!=="mede"){if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.analise.medeDistancia.clique()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.analise.medeDistancia.clique()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.analise.medeDistancia.movimento()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.analise.medeDistancia.movimento()")}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.analise.medeDistancia.fechaJanela()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.analise.medeDistancia.fechaJanela()")}$i("mostradistancia").style.display="block";if(i3GEO.Interface.ATUAL!=="googleearth"){i3GEO.desenho.criaContainerRichdraw();i3GEO.desenho.richdraw.lineColor="black";i3GEO.desenho.richdraw.lineWidth="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='<div class="hd" style="font-size:11px">&nbsp;Dist&acirc;ncia aproximada <a class=ajuda_usuario target=_blank href="'+i3GEO.configura.locaplic+'/ajuda_usuario.php?idcategoria=6&idajuda=50" >&nbsp;&nbsp;&nbsp;</a></div>'+'<div class="bd" style="text-align:left;padding:3px;" >'+'<div style="text-align:left;padding:3px;" id="mostradistancia_calculo" ></div>'+'<div style="text-align:left;font-size:10px" >'+'<span style="color:navy;cursor:pointer;text-align:left;" >'+'<table class=lista7 ><tr><td><input style="cursor:pointer" type="checkbox" id="pararraios" checked /></td><td>Raios</td><td>&nbsp;</td>'+'<td>'+'<input style="cursor:pointer" type="checkbox" id="parartextos" checked />'+'</td><td>Textos<td>'+'<td>&nbsp;Estilo:</td><td>'+i3GEO.desenho.caixaEstilos()+'</td>'+'<td>&nbsp;<input id=i3GEObotaoPerfil size="22" type="button" value="perfil"></td>'+'</tr></table></span>'+'</div>'+'</div>';novoel.innerHTML=ins;novoel.style.borderColor="gray";document.body.appendChild(novoel)}else{i3GEO.util.defineValor("mostradistancia_calculo","innerHTML","")}YAHOO.namespace("janelaDocamede.xp");YAHOO.janelaDocamede.xp.panel=new YAHOO.widget.Panel("mostradistancia",{iframe:true,width:330,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]);if(navm&&i3GEO.Interface.ATUAL==="googleearth"){YAHOO.janelaDocamede.xp.panel.moveTo(0,0);alert("Essa opção não funciona bem no Internet Explorer")}temp=$i("mostradistancia_c").style;i3GEO.janela.ULTIMOZINDEX++;temp.zIndex=21000+i3GEO.janela.ULTIMOZINDEX;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(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;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,calculo=i3GEO.calculo;if(g_tipoacao==="mede"){YAHOO.util.Dom.setStyle("mostradistancia","display","block");n=pontosdistobj.xpt.length;try{if(n>0){d=calculo.distancia(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);r=calculo.direcao(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);r=calculo.dd2dms(r,r);r=r[0];d=d+"";d=d.split(".");decimal=d[1].substr(0,5);d=d[0]+"."+decimal;d=d*1;da=d+pontosdistobj.dist[n-1];da=da+"";da=da.split(".");decimal=da[1].substr(0,5);da=da[0]+"."+decimal;da=da*1;mostra=$i("mostradistancia_calculo");if(mostra){texto=" Dist acum.= "+da+" km <br>atual= "+d+" km <br> Direção (DMS)= "+r;texto+="<br>Método cálculo de distâncias: "+calculo.metododistancia;mostra.innerHTML=texto}if(i3GEO.Interface.ATUAL!=="googleearth"&&navn){i3GEO.desenho.aplica("resizeLinha",pontosdistobj.linhas[n-1],n)}}}catch(e){}}}},medeArea:{inicia:function(){pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[],linhastemp:[]};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,temp;if(!$i("mostraarea")){novoel=document.createElement("div");novoel.id="mostraarea";ins='<div class="hd" >&Aacute;rea aproximada <a class=ajuda_usuario target=_blank href="'+i3GEO.configura.locaplic+'"/ajuda_usuario.php?idcategoria=6&idajuda=51" >&nbsp;&nbsp;&nbsp;</a></div>'+'<div class="bd" style="text-align:left;padding:3px;font-size:10px" >'+'Estilo: '+i3GEO.desenho.caixaEstilos()+'<br>'+'<div style="text-align:left;padding:3px;font-size:10px" id="mostraarea_calculo" ></div>'+'</div>';novoel.innerHTML=ins;novoel.style.borderColor="gray";document.body.appendChild(novoel)}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);temp=$i("mostraarea_c").style;i3GEO.janela.ULTIMOZINDEX++;temp.zIndex=21000+i3GEO.janela.ULTIMOZINDEX},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;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","<br>m2</b>= "+m.toFixed(2)+"<br><b>km2</b>= "+(m/1000000).toFixed(2)+"<br><b>ha</b>= "+(m/10000).toFixed(2));if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["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;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:85,TOP:4,RIGHT:0,inicia:function(){var r,pos,novoel,ins,temp,moveX,moveY,escondeRef;if(navm){i3GEO.maparef.TRANSICAOSUAVE=false}if(!$i("i3geo_winRef")){novoel=document.createElement("div");novoel.id="i3geo_winRef";novoel.style.display="none";novoel.style.borderColor="gray";ins="";if(this.PERMITEDESLOCAR){ins+='<div class="hd" style="text-align:left;z-index:20;padding-left: 0px;padding-bottom: 3px;padding-top: 1px;">';ins+='<span id=maparefmaismenosZoom style=display:none > ';temp="javascript:if(i3GEO.maparef.fatorZoomDinamico == -1){i3GEO.maparef.fatorZoomDinamico = 1};i3GEO.maparef.fatorZoomDinamico = i3GEO.maparef.fatorZoomDinamico + 1 ;$i(\"refDinamico\").checked = true;i3GEO.maparef.atualiza();";ins+="<img class=mais onclick='"+temp+"' src="+i3GEO.util.$im("branco.gif")+" />";temp="javascript:if(i3GEO.maparef.fatorZoomDinamico == 1){i3GEO.maparef.fatorZoomDinamico = -1};i3GEO.maparef.fatorZoomDinamico = i3GEO.maparef.fatorZoomDinamico - 1 ;$i(\"refDinamico\").checked = true;i3GEO.maparef.atualiza();";ins+="<img class=menos onclick='"+temp+"' src="+i3GEO.util.$im("branco.gif")+" /></span>&nbsp;";if(this.SELETORTIPO){ins+="<select style='font-size:9px;' id='refDinamico' onchange='javascript:i3GEO.parametros.celularef=\"\";i3GEO.maparef.atualiza()'>";ins+="<option value='fixo' select >fixo</option>";ins+="<option value='mapa' >mapa</option>";ins+="<option value='dinamico' >dinâmico</option>";ins+="</select>"}ins+="</div>"}ins+='<div class="bd" style="text-align:left;padding:3px;height: 150px;" id="mapaReferencia" onmouseover="this.onmousemove=function(exy){i3GEO.eventos.posicaoMouseMapa(exy)}" >';ins+='<img style="cursor:pointer;display:none" onload="javascript:this.style.display = \'block\'" id="imagemReferencia" src="" onclick="javascript:i3GEO.maparef.click()">';ins+='</div>';novoel.innerHTML=ins;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.maparef.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($i("localizarxygeoProjxg")){var temp=function(){i3GEO.coordenadas.atualizaGeo(objposicaocursor.dmsx,objposicaocursor.dmsy,"localizarxygeoProj")};YAHOO.util.Event.addListener($i("imagemReferencia"),"mousemove",temp)}}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.maparef.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.maparef.atualiza()")}this.atualiza(true);$i("i3geo_winRef_h").className="hd2";if(navm){$i("i3geo_winRef_h").style.width="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.toLowerCase()!=="sim"){if(i3GEO.parametros.celularef===""||$i("imagemReferencia").src===""||forca===true){i3GEO.php.referencia(i3GEO.maparef.processaImagem)}else{i3GEO.maparef.atualizaBox()}if(temp){temp.style.display="none"}}else{re=new RegExp("&mode=map","g");$i("imagemReferencia").src=$i(i3GEO.Interface.IDMAPA).src.replace(re,'&mode=reference');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")}}};if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.ajuda={ATIVAJANELA:true,DIVAJUDA:"i3geo_ajuda",DIVLETREIRO:"i3geo_letreiro",MENSAGEMPADRAO:$trad("p1"),TRANSICAOSUAVE:true,OPACIDADE:20,abreDoc:function(){window.open(i3GEO.configura.locaplic+"/documentacao/index.html")},abreJanela:function(){try{var nx,ny,pos,corpo,texto,janela,temp,largura=262,YU=YAHOO.util;if(this.ATIVAJANELA===false){return}temp=$i("contemFerramentas");if(temp){largura=parseInt(temp.style.width,10)-5}if(!$i("janelaMenTexto")){corpo=$i(i3GEO.Interface.IDCORPO);if(corpo){pos=YU.Dom.getXY(corpo);nx=pos[0]-largura-3;ny=i3GEO.parametros.h-78}texto='<div id="janelaMenTexto" style="text-align:left;font-size:10px;color:rgb(80,80,80)">'+i3GEO.ajuda.MENSAGEMPADRAO+'</div>';janela=i3GEO.janela.cria(largura-3,"auto","",nx,ny,"&nbsp;","i3geo_janelaMensagens",false,"hd","","",true);janela[2].innerHTML=texto;YU.Event.addListener(janela[0].close,"click",i3GEO.ajuda.fechaJanela);this.ativaCookie()}}catch(e){}},ativaCookie:function(){var i=i3GEO.util.insereCookie;i("g_janelaMen","sim");i("botoesAjuda","sim")},ativaLetreiro:function(mensagem){var l;if($i(i3GEO.ajuda.DIVLETREIRO)){if(arguments.length===0){mensagem=i3GEO.parametros.mensagens}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.ajuda.ativaLetreiro()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.ajuda.ativaLetreiro()")}try{clearTimeout(i3GEO.ajuda.tempoLetreiro)}catch(e){i3GEO.ajuda.tempoLetreiro=""}l=$i(i3GEO.ajuda.DIVLETREIRO);if(l.style.display==="none"){return}l.style.cursor="pointer";if(mensagem===""){l.value="";return}if(l.size===1){l.size=i3GEO.parametros.w/8}BMessage=mensagem+" ---Clique para parar--- ";l.onclick=function(){l.style.display="none"};if(BMessage!==" ---Clique para parar--- "){BQuantas=0;BSize=l.size;BPos=BSize;BSpeed=1;BSpaces="";i3GEO.ajuda.mostraLetreiro()}i3GEO.ajuda.mostraLetreiro(mensagem)}},desativaCookie:function(){i3GEO.util.insereCookie("g_janelaMen","nao")},fechaJanela:function(){i3GEO.ajuda.desativaCookie();i3GEO.util.removeChild("i3geo_janelaMensagens_c",document.body)},mostraJanela:function(texto){var j=$i(this.DIVAJUDA),k=$i("janelaMenTexto"),jm=$i("i3geo_janelaMensagens"),Dom=YAHOO.util.Dom,h=parseInt(Dom.getStyle(jm,"height"),10),temp;if(j){j.innerHTML=texto===""?"-":texto}else{if(h){Dom.setY("i3geo_janelaMensagens",Dom.getY(jm)+h)}if(k){k.innerHTML=texto}if(this.TRANSICAOSUAVE){temp=texto!==""?Dom.setStyle(jm,"opacity","1"):Dom.setStyle(jm,"opacity",(this.OPACIDADE/100))}h=parseInt(Dom.getStyle(jm,"height"),10);if(h){Dom.setY(jm,Dom.getY(jm)-h)}}},mostraLetreiro:function(){for(count=0;count<BPos;count+=1){BSpaces+=" "}if(BPos<1){$i(i3GEO.ajuda.DIVLETREIRO).value=BMessage.substring(Math.abs(BPos),BMessage.length);if(BPos+BMessage.length<1){BPos=BSize;BQuantas=BQuantas+1}}else{$i(i3GEO.ajuda.DIVLETREIRO).value=BSpaces+BMessage}BPos-=BSpeed;if(BQuantas<2){i3GEO.ajuda.tempoLetreiro=setTimeout(function(){i3GEO.ajuda.mostraLetreiro()},140)}},redesSociais:function(){i3GEO.janela.cria("400px","400px",i3GEO.configura.locaplic+"/ferramentas/redessociais/index.php","","",$trad("u5c"),YAHOO.util.Dom.generateId(null,"redes"))}};if(typeof(i3GEO)==='undefined'){i3GEO=[]}YAHOO.namespace("janelaDoca.xp");YAHOO.janelaDoca.xp.manager=new YAHOO.widget.OverlayManager();i3GEO.janela={ESTILOBD:"display:block;padding:5px 0px 5px 2px;",ESTILOAGUARDE:"normal",AGUARDEMODAL:false,ANTESCRIA:["i3GEO.janela.prepara()"],ANTESFECHA:[],TRANSICAOSUAVE:true,OPACIDADE:65,TIPS:[],ULTIMOZINDEX:0,JANELASAGUARDE:[],prepara:function(){var iu=i3GEO.util;iu.escondePin();iu.escondeBox()},cria:function(wlargura,waltura,wsrc,nx,ny,texto,id,modal,classe,funcaoCabecalho,funcaoMinimiza){var i,wlargurA,ins,novoel,wdocaiframe,pos,temp,fix,underlay,ifr;if(navm&&!chro){this.TRANSICAOSUAVE=false}if(this.ANTESCRIA){for(i=0;i<this.ANTESCRIA.length;i++){eval(this.ANTESCRIA[i])}}if(arguments.length<7||id===""){id="wdoca";modal=false;classe="hd";funcaoCabecalho=null;funcaoMinimiza=null}if(arguments.length===7){modal=false;classe="hd";funcaoCabecalho=null;funcaoMinimiza=null}if(arguments.length===8){classe="hd";funcaoCabecalho=null;funcaoMinimiza=null}if(arguments.length===9){funcaoCabecalho=null;funcaoMinimiza=null}if(arguments.length===10){funcaoMinimiza=null}if(i3GEO.Interface.ATUAL==="googleearth"){classe="hd";i3GEO.janela.TRANSICAOSUAVE=false}wlargurA=parseInt(wlargura,10)+2+"px";if($i(id)){YAHOO.janelaDoca.xp.panel.destroy()}i3GEO.util.removeChild(id+"_c");i3GEO.util.removeChild(id);ins='<div id="'+id+'_cabecalho" class="'+classe+'" style="background-color:white;">';if(i3GEO.configura!==undefined){ins+="<img id='"+id+"_imagemCabecalho' style='position:absolute;left:3px;top:2px;visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' />"}ins+=texto;if(funcaoMinimiza){ins+="<div id='"+id+"_minimizaCabecalho' class='container-minimiza'></div>"}ins+='</div><div id="'+id+'_corpo" class="bd" style="'+this.ESTILOBD+'">';if(wsrc!==""){ins+='<iframe name="'+id+'i" id="'+id+'i" valign="top" style="border:0px white solid"></iframe>'}ins+='</div>';novoel=document.createElement("div");novoel.id=id;novoel.style.display="block";novoel.style.border="1px solid rgb(120 120 120)";novoel.innerHTML=ins;if(this.TRANSICAOSUAVE){novoel.onmouseover=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",1)};novoel.onmouseout=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.janela.OPACIDADE/100)};YAHOO.util.Dom.setStyle(novoel,"opacity",1)}document.body.appendChild(novoel);wdocaiframe=$i(id+"i");if(wdocaiframe){temp=wdocaiframe.style;temp.width=parseInt(wlargura,10)-12;temp.height=waltura;temp.display="block";wdocaiframe.src=wsrc}else{if(waltura!=="auto"){$i(id+'_corpo').style.height=parseInt(waltura,10)}$i(id+'_corpo').style.width=parseInt(wlargura,10)}fix=false;if(nx===""||nx==="center"){fix=true}if(modal===true){underlay="none"}else{underlay="shadow"}if(i3GEO.Interface.ATUAL==="googleearth"||i3GEO.Interface.ATUAL==="flamingo"){ifr=true}else{ifr=false}if(waltura==="auto"){YAHOO.janelaDoca.xp.panel=new YAHOO.widget.Panel(id,{iframe:ifr,modal:modal,width:wlargurA,underlay:"none",fixedcenter:fix,constraintoviewport:false,visible:true,monitorresize:false,dragOnly:true,keylisteners:null})}else{YAHOO.janelaDoca.xp.panel=new YAHOO.widget.ResizePanel(id,{iframe:ifr,underlay:underlay,modal:modal,width:wlargurA,fixedcenter:fix,constraintoviewport:false,visible:true,monitorresize:false,dragOnly:true,keylisteners:null})}if(nx!==""&&nx!=="center"){YAHOO.janelaDoca.xp.panel.moveTo(nx,ny+50)}YAHOO.janelaDoca.xp.manager.register(YAHOO.janelaDoca.xp.panel);if(this.TRANSICAOSUAVE){YAHOO.janelaDoca.xp.panel.cfg.setProperty("effect",[{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.5}])}YAHOO.janelaDoca.xp.panel.render();if(navm&&id!=="i3geo_janelaMensagens"&&i3GEO.Interface.ATUAL==="googleearth"){YAHOO.janelaDoca.xp.panel.moveTo(0,0)}if(ifr===true){YAHOO.janelaDoca.xp.panel.iframe.style.zIndex=0}if(modal===true){if($i(id+"_mask")){$i(id+"_mask").style.zIndex=9000+i3GEO.janela.ULTIMOZINDEX+1;i3GEO.janela.ULTIMOZINDEX=9000+i3GEO.janela.ULTIMOZINDEX+1}}if($i(id+"_c")){$i(id+"_c").style.zIndex=23000+i3GEO.janela.ULTIMOZINDEX+1;i3GEO.janela.ULTIMOZINDEX=23000+i3GEO.janela.ULTIMOZINDEX+1}if(funcaoCabecalho){$i(id+'_cabecalho').onclick=funcaoCabecalho}if(funcaoMinimiza){$i(id+"_minimizaCabecalho").onclick=funcaoMinimiza}YAHOO.util.Event.addListener(YAHOO.janelaDoca.xp.panel.close,"click",i3GEO.janela.fecha,YAHOO.janelaDoca.xp.panel,{id:id},true);i3GEO.janela.ULTIMOZINDEX++;return([YAHOO.janelaDoca.xp.panel,$i(id+"_cabecalho"),$i(id+"_corpo")])},minimiza:function(id){var temp=$i(id+"_corpo"),n,i,m=YAHOO.janelaDoca.xp.manager.find(id);if(temp){if(temp.style.display==="block"){temp.style.display="none";if(m){m.hideIframe}}else{temp.style.display="block";if(m){m.showIframe}}}temp=$i(id+"_resizehandle");if(temp){if(temp.style.display==="none"){temp.style.display="block"}else{temp.style.display="none"}}temp=$i(id+"_c");if(temp){temp=temp.getElementsByTagName("div");n=temp.length;for(i=0;i<n;i++){if(temp[i].className==="underlay"||temp[i].className==="bd"){if(temp[i].style.display==="none"){temp[i].style.display="block"}else{temp[i].style.display="none"}}}}temp=$i(id+"_corpo");if(temp){if(temp.style.display==="none"){temp.style.display="block"}else{temp.style.display="none"}}},fecha:function(event){var i,old,id,iu=i3GEO.util;iu.escondePin();iu.escondeBox();if(this.ANTESFECHA){for(i=0;i<this.ANTESFECHA.length;i++){eval(this.ANTESFECHA[i])}}if(this.id){id=this.id}else{id=event.id}iu.removeChild(id+"_c");iu.removeChild(id);iu.removeChild(id+"_mask");iu.removeScriptTag(id+"_script");YAHOO.janelaDoca.xp.manager.remove(YAHOO.janelaDoca.xp.manager.find(id))},alteraTamanho:function(w,h,id){var i;if(arguments.length===3){i=$i(id)}else{i=$i("wdoca")}if(i){i.style.width=w;i.style.height=h}},abreAguarde:function(id,texto){var pos,index,contador,temp;document.body.style.cursor="wait";i3GEO.util.removeChild(id+"_mask");i3GEO.util.removeChild(id+"_c");YAHOO.namespace("aguarde."+id);pos=[0,0];if($i(i3GEO.Interface.IDCORPO)){pos=YAHOO.util.Dom.getXY($i(i3GEO.Interface.IDCORPO))}else if($i("contemImg")){pos=YAHOO.util.Dom.getXY($i("contemImg"))}texto+="<br><span style='color:navy;cursor:pointer;font-size:9px;' onclick='javascript:if(i3GEO.janela.AGUARDEMODAL == true){i3GEO.janela.AGUARDEMODAL = false;}else{i3GEO.janela.AGUARDEMODAL = true;}'>bloquear/desbloquear</span>";contador="";for(index=0;index<i3GEO.contadorAtualiza;index++){contador=contador+"."}eval('YAHOO.aguarde.'+id+' = new YAHOO.widget.Panel("'+id+'",{width:"240px",fixedcenter:false,underlay:"none",close:true,draggable:false,modal:'+i3GEO.janela.AGUARDEMODAL.toString()+',monitorresize:false})');i3GEO.janela.JANELASAGUARDE.push(id);if(i3GEO.janela.ESTILOAGUARDE==="normal"||i3GEO.janela.ESTILOAGUARDE==="reduzida"){eval('YAHOO.aguarde.'+id+'.setBody(texto)');eval('YAHOO.aguarde.'+id+'.body.style.padding="5px"')}if(i3GEO.janela.ESTILOAGUARDE==="normal"||i3GEO.janela.ESTILOAGUARDE==="minima"){eval('YAHOO.aguarde.'+id+'.setHeader("<span><img id=aguardeGifAberto src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span>&nbsp;<span style=font-size:8px >'+contador+'</span>")')}eval('YAHOO.aguarde.'+id+'.render(document.body)');if(i3GEO.parametros.w>0){eval('YAHOO.aguarde.'+id+'.moveTo('+(pos[0]+(i3GEO.parametros.w/2)-120)+','+pos[1]+')')}else{eval('YAHOO.aguarde.'+id+'.moveTo('+pos[0]+','+pos[1]+')')}eval('YAHOO.aguarde.'+id+'.show()');if($i(id+"_mask")){$i(id+"_mask").style.zIndex=25000}temp=$i(id+"_c");if(temp){temp.style.zIndex=26000;temp.style.backgroundColor=""}},ativaAlerta:function(){YAHOO.namespace("dialogInfo");YAHOO.dialogInfo=new YAHOO.widget.SimpleDialog("simpledialog1",{width:"300px",fixedcenter:true,visible:false,draggable:false,zIndex:100000,textAlign:"left",close:true,modal:true,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25},constraintoviewport:true,buttons:[{text:"fecha",handler:function(){this.hide()},isDefault:true}],icon:YAHOO.widget.SimpleDialog.ICON_WARN,text:""});YAHOO.dialogInfo.setHeader("Alerta");YAHOO.dialogInfo.render(document.body);window.alert=function(texto){YAHOO.dialogInfo.cfg.setProperty("text",texto);YAHOO.dialogInfo.show()}},mensagemSimples:function(texto,cabecalho){if(!$i("mensagemSimples1")){YAHOO.namespace("mensagemSimples");YAHOO.mensagemSimples=new YAHOO.widget.SimpleDialog("mensagemSimples1",{width:"300px",fixedcenter:true,visible:true,draggable:true,zIndex:100000,textAlign:"left",close:true,modal:false,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25},constraintoviewport:true,text:""})}YAHOO.mensagemSimples.setHeader(cabecalho);YAHOO.mensagemSimples.render(document.body);YAHOO.mensagemSimples.cfg.setProperty("text",texto);YAHOO.mensagemSimples.show()},tip:function(cabecalho){var Nid,i,novoel,res;if(arguments.length===0){cabecalho="fixar"}Nid=YAHOO.util.Dom.generateId();i=$i("i3geo_rosa");if(i){i.style.display="none"}if($i(i3GEO.Interface.IDCORPO)){$i("img").title=""}novoel=document.createElement("div");novoel.id=Nid;novoel.style.position="absolute";novoel.style.zIndex=5000;novoel.style.textAlign="left";novoel.style.background="white";if(navm){novoel.style.filter="alpha(opacity=90)"}else{novoel.style.opacity=".9"}document.body.appendChild(novoel);i3GEO.janela.TIPS.push($i(Nid));res="<div id='"+Nid+"cabecatip' style='text-align:left;background-color:rgb(240,240,240)'>";res+="<span style='color:navy;cursor:pointer;text-align:left' onclick='javascript:$i(\""+Nid+"cabecatip\").innerHTML =\"\";' >"+cabecalho+"</span></div>";novoel.innerHTML="<table style='text-align:left'><tr><td style='text-align:left'>"+res+"</td></tr></table>";ist=novoel.style;ist.top=objposicaocursor.telay-9;ist.left=objposicaocursor.telax-5;ist.display="block";if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.janela.excluiTips('todos')")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.janela.excluiTips('todos')")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.janela.excluiTips('naofixos')")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.janela.excluiTips('naofixos')")}return(Nid)},excluiTips:function(tipo){var ot,i;if(arguments.length===0){tipo="todos"}if(i3GEO.janela.TIPS.length>0){ot=i3GEO.janela.TIPS.length-1;if(ot>=0){do{if(tipo==='todos'){if(i3GEO.janela.TIPS[ot]){i=$i(i3GEO.janela.TIPS[ot].id);document.body.removeChild(i)}}if(tipo==='naofixos'){if($i(i3GEO.janela.TIPS[ot])){if($i(i3GEO.janela.TIPS[ot].id+"cabecatip").innerHTML!==""){document.body.removeChild($i(i3GEO.janela.TIPS[ot].id))}}}}while(ot--);if(tipo==="todos"){i3GEO.janela.TIPS=[]}}}},slider:function(funcao,inicial){var tickSize,keyIncrement,scaleFactor,bottomConstraint,topConstraint,janela,novoel,Event,Dom,lang,slider,bg,thumb,valuearea,textfield;janela=i3GEO.janela.cria(230,200,"","","","Opacidade","opacidadeG");novoel=document.createElement("div");novoel.id="slider-bg";novoel.tabindex="-1";novoel.innerHTML='<div style="cursor:default;position:absolute;top:4px" id="slider-thumb"><img src="'+i3GEO.configura.locaplic+'/imagens/thumb-n.gif"></div>';janela[2].appendChild(novoel);Event=YAHOO.util.Event;Dom=YAHOO.util.Dom;lang=YAHOO.lang;bg="slider-bg";thumb="slider-thumb";valuearea="slider-value";textfield="slider-converted-value";novoel.style.position="relative";novoel.style.background='url('+i3GEO.configura.locaplic+'/imagens/bg-fader.gif) 5px 0 no-repeat';novoel.style.height="28px";novoel.style.width="228px";topConstraint=0;bottomConstraint=200;scaleFactor=1;keyIncrement=20;tickSize=20;Event.onDOMReady(function(){slider=YAHOO.widget.Slider.getHorizSlider(bg,thumb,topConstraint,bottomConstraint,20);slider.setValue(parseInt(inicial,10));slider.getRealValue=function(){return Math.round(this.getValue()*scaleFactor)};slider.subscribe("slideEnd",function(offsetFromStart){var actualValue=slider.getRealValue();eval(funcao+"("+actualValue+")")})});Event.on("putval","click",function(e){slider.setValue(100,false)})},fechaAguarde:function(id){document.body.style.cursor="default";if(arguments.length>0&&typeof(id)!=='undefined'){try{if($i(id+"_c")){eval('YAHOO.aguarde.'+id+'.destroy()')}if($i(id+"_c")){$i("i3geo").removeChild($i(id+"_c"))}if($i(id+"_mask")){$i("i3geo").removeChild($i(id+"_mask"))}}catch(e){}}else{try{var id,i,n=this.JANELASAGUARDE.length,iu=i3GEO.util;for(i=0;i<n;i+=1){id=this.JANELASAGUARDE[i];if($i(id+"_c")){eval('YAHOO.aguarde.'+id+'.destroy()')}iu.removeChild(id+"_c");iu.removeChild(id+"_mask")}this.JANELASAGUARDE=[]}catch(e){}}}};try{YAHOO.widget.ResizePanel=function(el,userConfig){if(arguments.length>0){YAHOO.widget.ResizePanel.superclass.constructor.call(this,el,userConfig)}};YAHOO.widget.ResizePanel.CSS_PANEL_RESIZE="yui-resizepanel";YAHOO.widget.ResizePanel.CSS_RESIZE_HANDLE="resizehandle";YAHOO.extend(YAHOO.widget.ResizePanel,YAHOO.widget.Panel,{init:function(el,userConfig){YAHOO.widget.ResizePanel.superclass.init.call(this,el);this.beforeInitEvent.fire(YAHOO.widget.ResizePanel);var Dom=YAHOO.util.Dom,Event=YAHOO.util.Event,oInnerElement=this.innerElement,oResizeHandle=document.createElement("DIV"),sResizeHandleId=this.id+"_resizehandle";oResizeHandle.id=sResizeHandleId;oResizeHandle.className=YAHOO.widget.ResizePanel.CSS_RESIZE_HANDLE;Dom.addClass(oInnerElement,YAHOO.widget.ResizePanel.CSS_PANEL_RESIZE);this.resizeHandle=oResizeHandle;function initResizeFunctionality(){var me=this,oHeader=this.header,oBody=this.body,oFooter=this.footer,nStartWidth,nStartHeight,aStartPos,nBodyBorderTopWidth,nBodyBorderBottomWidth,nBodyTopPadding,nBodyBottomPadding,nBodyOffset;oInnerElement.appendChild(oResizeHandle);this.ddResize=new YAHOO.util.DragDrop(sResizeHandleId,this.id);this.ddResize.setHandleElId(sResizeHandleId);this.ddResize.onMouseDown=function(e){nStartWidth=oInnerElement.offsetWidth;nStartHeight=oInnerElement.offsetHeight;if(YAHOO.env.ua.ie&&document.compatMode==="BackCompat"){nBodyOffset=0}else{nBodyBorderTopWidth=parseInt(Dom.getStyle(oBody,"borderTopWidth"),10);nBodyBorderBottomWidth=parseInt(Dom.getStyle(oBody,"borderBottomWidth"),10);nBodyTopPadding=parseInt(Dom.getStyle(oBody,"paddingTop"),10);nBodyBottomPadding=parseInt(Dom.getStyle(oBody,"paddingBottom"),10);nBodyOffset=nBodyBorderTopWidth+nBodyBorderBottomWidth+nBodyTopPadding+nBodyBottomPadding}me.cfg.setProperty("width",nStartWidth+"px");aStartPos=[Event.getPageX(e),Event.getPageY(e)]};this.ddResize.onDrag=function(e){var aNewPos=[Event.getPageX(e),Event.getPageY(e)],nOffsetX=aNewPos[0]-aStartPos[0],nOffsetY=aNewPos[1]-aStartPos[1],nNewWidth=Math.max(nStartWidth+nOffsetX,10),nNewHeight=Math.max(nStartHeight+nOffsetY,10),nBodyHeight=(nNewHeight-(oFooter.offsetHeight+oHeader.offsetHeight+nBodyOffset));me.cfg.setProperty("width",nNewWidth+"px");if(navm){nNewWidth=nNewWidth-2}oBody.style.width=nNewWidth-2+"px";if(nBodyHeight<0){nBodyHeight=0}oBody.style.height=nBodyHeight+"px";if($i("wdocai")){$i("wdocai").style.height=nBodyHeight;$i("wdocai").style.width=oBody.style.width}};this.ddResize.onMouseUp=this.ddResize.onDrag.call()}function onBeforeShow(){initResizeFunctionality.call(this);this.unsubscribe("beforeShow",onBeforeShow)}function onBeforeRender(){if(!this.footer){this.setFooter("")}if(this.cfg.getProperty("visible")){initResizeFunctionality.call(this)}else{this.subscribe("beforeShow",onBeforeShow)}this.unsubscribe("beforeRender",onBeforeRender)}this.subscribe("beforeRender",onBeforeRender);if(userConfig){this.cfg.applyConfig(userConfig,true)}this.initEvent.fire(YAHOO.widget.ResizePanel)},toString:function(){return"ResizePanel "+this.id}})}catch(e){}if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.guias={ATUAL:"temas",ALTURACORPOGUIAS:0,CONFIGURA:{"temas":{titulo:$trad("g4a"),id:"guia1",idconteudo:"guia1obj",click:""},"adiciona":{titulo:$trad("g1a"),id:"guia2",idconteudo:"guia2obj",click:function(){var ondeArvore;i3GEO.guias.mostra("adiciona");if(!$i("arvoreAdicionaTema")){try{ondeArvore=objmapa.guiaMenu+"obj"}catch(e){ondeArvore="guia2obj"}}else{ondeArvore="arvoreAdicionaTema"}if(document.getElementById("outrasOpcoesAdiciona")){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde="outrasOpcoesAdiciona";i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore=false}i3GEO.arvoreDeTemas.cria(i3GEO.configura.sid,i3GEO.configura.locaplic,ondeArvore)}},"legenda":{titulo:$trad("g3"),id:"guia4",idconteudo:"guia4obj",click:function(){i3GEO.guias.mostra("legenda");i3GEO.mapa.legendaHTML.cria("guia4obj")}},"mapas":{titulo:"Links",id:"guia5",idconteudo:"guia5obj",click:function(){var pegaMapas=function(retorno){var ins,mapa,ig1lt,ig1,nome,lkd,link,temp;ins="<br><div id='banners' style='overflow:auto;text-align:left'>";mapa=retorno.data.mapas;ig1lt=mapa.length;ig1=0;if(ig1lt>0){do{temp=mapa[ig1];nome=temp.NOME;if(temp.PUBLICADO){if(temp.PUBLICADO.toLowerCase()==="nao"){nome="<s>"+nome+"</s>"}}lkd=temp.LINK;link=i3GEO.configura.locaplic+"/ms_criamapa.php?temasa="+temp.TEMAS+"&layers="+temp.LIGADOS;if(temp.EXTENSAO!==""){link+="&mapext="+temp.EXTENSAO}if(temp.OUTROS!==""){link+="&"+temp.OUTROS}if(lkd!==""){link=lkd}ins+="<div><a href='"+link+"'><img src='"+temp.IMAGEM+"'></a></div><br>";ins+="<div><p style=text-align:center >"+nome+"</p></div><br>";ig1++}while(ig1<ig1lt)}$i(i3GEO.guias.CONFIGURA.mapas.idconteudo).innerHTML=ins+"</div>"};$i(i3GEO.guias.CONFIGURA.mapas.idconteudo).innerHTML="Aguarde...";i3GEO.guias.mostra("mapas");i3GEO.php.pegaMapas(pegaMapas)}}},ORDEM:"",TIPO:"guia",IDGUIAS:"guiasYUI",cria:function(onde){var nguiasreal=0,onf,outf,guiaconteudo,id,guia,guias,nguias,g,re,ng,tituloguia,i,ins,largura,altura,temp,CONFIGURA=i3GEO.guias.CONFIGURA,guias=i3GEO.util.listaChaves(CONFIGURA);try{nguias=guias.length;for(g=0;g<12;g++){tituloguia="";if($i("guia"+g)){tituloguia=$i("guia"+g).innerHTML;re=new RegExp("&nbsp;","g");tituloguia=tituloguia.replace(re,'');for(ng=0;ng<nguias;ng++){if(CONFIGURA[guias[ng]].id==="guia"+g){tituloguia=""}}if(tituloguia!==""){i3GEO.guias.CONFIGURA["guia"+g]=[];i3GEO.guias.CONFIGURA["guia"+g].titulo=tituloguia;i3GEO.guias.CONFIGURA["guia"+g].id="guia"+g;i3GEO.guias.CONFIGURA["guia"+g].idconteudo="guia"+g+"obj";if($i('guia'+g).onclick){i3GEO.guias.CONFIGURA["guia"+g].click=$i("guia"+g).onclick}}}}if(i3GEO.guias.ORDEM===""){guias=i3GEO.util.listaChaves(CONFIGURA)}else{guias=i3GEO.guias.ORDEM}nguias=guias.length;if(arguments.length===0){for(ng=0;ng<nguias;ng++){i=$i(i3GEO.guias.CONFIGURA[guias[ng]].id);if(i){onde=i.parentNode}}}else{onde=$i(onde)}if(!onde){return}onde.id=i3GEO.guias.IDGUIAS;onde.className="yui-navset";if(i3GEO.guias.TIPO==="guia"||i3GEO.guias.TIPO==="tablet"){ins='<ul class="yui-nav" style="border-width:0pt 0pt 0px;border-color:rgb(240,240,240);border-bottom-color:white;text-align:center;">';for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){if($i(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo)){ins+='<li><a alt="" title=""><em><div id="'+i3GEO.guias.CONFIGURA[guias[ng]].id+'" >'+i3GEO.guias.CONFIGURA[guias[ng]].titulo+'</div></em></a></li>'}}}ins+="</ul>";onde.innerHTML=ins;onf=function(event){var bcg,cor;YAHOO.util.Event.stopEvent(event);bcg=this.parentNode.parentNode.style;cor=bcg.background.split(" ")[0];if(cor!=="white"&&bcg.backgroundColor!=="white"){bcg.background="#bfdaff"}};outf=function(event){var bcg,cor;YAHOO.util.Event.stopEvent(event);bcg=this.parentNode.parentNode.style;cor=bcg.background.split(" ")[0];if(cor!=="white"&&bcg.backgroundColor!=="white"){bcg.background="transparent"}}}if(i3GEO.guias.TIPO==="sanfona"){ins='<dl id=sanfona'+onde.id+' class="accordion" >';if(i3GEO.guias.ORDEM===""){for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){nguiasreal++}}}else{nguiasreal=i3GEO.guias.ORDEM.length}if(navn){altura=i3GEO.parametros.h-(nguiasreal*25)-1}else{altura=i3GEO.parametros.h-(nguiasreal*23)+1}for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){id=i3GEO.guias.CONFIGURA[guias[ng]].idconteudo;temp=$i(id);if(temp){guiaconteudo=temp.innerHTML;temp.innerHTML="";temp.style.display="none";temp.id="";ins+='<dt style=height:17px id="'+i3GEO.guias.CONFIGURA[guias[ng]].id+'" >'+'<table class=accordiontable ><tr><td width="98%" >'+i3GEO.guias.CONFIGURA[guias[ng]].titulo+'</td><td width="2%" ><img id="" src="'+i3GEO.configura.locaplic+'/imagens/branco.gif" style="width:10px;" /></td></tr></table>'+'<dd clas=close >'+'<div class=bd >'+'<div id="'+id+'" >'+guiaconteudo+'</div></div></dd>'}}}ins+="</dl>";onde.innerHTML=ins;onde.style.height=altura+"px";onf=function(){};outf=function(){};YAHOO.lutsr.accordion.init(true,5,false,"sanfona"+onde.id,altura);i3GEO.guias.ALTURACORPOGUIAS=altura}for(g=0;g<nguias;g++){guia=i3GEO.guias.CONFIGURA[guias[g]];id=guia.id;guiaconteudo=$i(id);if(guiaconteudo){if(guia.click===""||guia.click===undefined){eval('$i("'+id+'").onclick = function(event){i3GEO.guias.mostra("'+guias[g]+'");}')}else{guiaconteudo.onclick=guia.click}YAHOO.util.Event.addListener($i(id),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addListener($i(id),"click",YAHOO.util.Event.stopPropagation);YAHOO.util.Event.addFocusListener($i(id),YAHOO.util.Event.preventDefault);guiaconteudo.onmouseover=onf;guiaconteudo.onmouseout=outf;temp=$i(guia.idconteudo);if(temp){temp.style.overflow="auto";if(i3GEO.guias.TIPO==="guia"){if(i3GEO.guias.ALTURACORPOGUIAS===0){temp.style.height=i3GEO.parametros.h}else{temp.style.height=i3GEO.guias.ALTURACORPOGUIAS}}else{temp.style.height=onde.style.height}}}}}catch(e){}if(i3GEO.guias.TIPO!=="tablet"){i3GEO.guias.mostra(i3GEO.guias.ATUAL);i3GEO.guias.ativa(i3GEO.guias.ATUAL)}else{i3GEO.guias.escondeGuias()}},ajustaAltura:function(){var guia,guias,nguias,temp,temps,n,i,altura=0;if(i3GEO.guias.ALTURACORPOGUIAS!=0){altura=i3GEO.guias.ALTURACORPOGUIAS}guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){guia=$i(this.CONFIGURA[guias[g]].idconteudo);if(guia){guia.style.overflow="auto";if(this.TIPO==="guia"){guia.style.height=altura}if(this.TIPO==="sanfona"){guia.style.height=altura;temp=$i("guiasYUI");if(temp){temp.style.height=altura;temps=temp.getElementsByTagName("dd");n=temps.length;for(i=0;i<n;i++){if(temps[i].style.visibility=="visible"){temps[i].style.height=altura}}}YAHOO.lutsr.accordion.properties.altura=altura}}}},escondeGuias:function(){var guias,nguias,g,temp,attributes,anim;guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){temp=$i(this.CONFIGURA[guias[g]].idconteudo);if(temp){if(i3GEO.guias.TIPO==="tablet"&&temp.style.display==="block"){temp.style.overflow="hidden";attributes={height:{to:0},id:this.CONFIGURA[guias[g]].idconteudo};anim=new YAHOO.util.Anim(temp,attributes,1,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){var temp=$i(anim.attributes.id);temp.style.overflow="auto";temp.style.display="none";i3GEO.barraDeBotoes.BARRAS[0].show()});anim.animate()}else{temp.style.display="none"}}if($i(this.CONFIGURA[guias[g]].id)){$i(this.CONFIGURA[guias[g]].id).parentNode.parentNode.style.background="transparent"}}},mostra:function(guia){var guias,nguias,g,temp,temp1,attributes,anim;guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;if($i(this.CONFIGURA[guia].idconteudo).style.display==="block"&&i3GEO.guias.TIPO==="tablet"){i3GEO.guias.escondeGuias();return}for(g=0;g<nguias;g++){if($i(this.CONFIGURA[guias[g]].idconteudo)){$i(this.CONFIGURA[guias[g]].idconteudo).style.display="none"}if($i(this.CONFIGURA[guias[g]].id)){$i(this.CONFIGURA[guias[g]].id).parentNode.parentNode.style.background="transparent"}}if(this.CONFIGURA.toString().search(guia)<0){for(g=0;g<nguias;g++){if(this.CONFIGURA[guias[g]].id===guia){guia=guias[g]}}}if(this.CONFIGURA[guia]){temp=$i(this.CONFIGURA[guia].idconteudo);if(temp){if(i3GEO.guias.TIPO==="tablet"){i3GEO.barraDeBotoes.BARRAS[0].hide();temp.style.left=(i3GEO.parametros.w/2)-150+"px";temp.style.height=0;temp.style.display="block";temp.style.zIndex=9000;temp.style.overflow="hidden";attributes={height:{to:i3GEO.parametros.h-10}};anim=new YAHOO.util.Anim(temp,attributes,1,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){temp.style.overflow="auto";temp.style.display="block"});if(DetectaMobile("DetectAndroid")===true){temp.style.height="";temp.style.overflow="auto"}else{anim.animate()}}else{temp.style.display="block"}$i(this.CONFIGURA[guia].id).parentNode.parentNode.style.backgroundColor="white";this.ATUAL=guia}}},ativa:function(guia){try{if(this.CONFIGURA[this.ATUAL].click!==""){this.CONFIGURA[this.ATUAL].click.call()}}catch(e){}},libera:function(){if(!$i("conteudojanelaguias")){var i,w,pos,a,l,letras,temp;$i(i3GEO.Interface.IDCORPO).style.left="0px";if($i(this.IDGUIAS)){$i(this.IDGUIAS).style.display="none"}i=$i("contemFerramentas");w=parseInt($i("contemFerramentas").style.width,10);$i("contemFerramentas").style.width="0px";i=$i("visual");if(i){i.style.width="0px";i.innerHTML=""}pos="px";a=i3GEO.parametros.h;l=i3GEO.parametros.w+w;i3GEO.parametros.h=a;i3GEO.parametros.w=l;if(navm){pos=""}i=$i(i3GEO.Interface.IDCORPO);if(i){i.style.width=l+pos;i.style.height=a+pos}i=$i(i3GEO.Interface.IDMAPA);if(i){i.style.width=l+pos;i.style.height=a+pos;i.style.clip='rect('+0+" "+(l*1+2)+" "+(a*1+2)+" "+0+')'}i=$i("mst");if(i){i.style.width=l+1+pos}if(i3GEO.configura.entorno.toLowerCase()==="sim"){letras=["L","O"];for(l=0;l<2;l++){if($i("img"+letras[l])){$i("img"+letras[l]).style.width=i3GEO.parametros.w+pos;$i("img"+letras[l]).style.height=i3GEO.parametros.h+pos;$i("corpoMapa"+letras[l]).style.width=i3GEO.parametros.w+pos;$i("corpoMapa"+letras[l]).style.height=i3GEO.parametros.h+pos+pos;$i("corpoMapa"+letras[l]).style.clip='rect(0 0 0 0)'}}letras=["N","S"];for(l=0;l<2;l++){if($i("img"+letras[l])){$i("img"+letras[l]).style.width=i3GEO.parametros.w*2+pos;$i("img"+letras[l]).style.height=i3GEO.parametros.h*2+pos;$i("corpoMapa"+letras[l]).style.width=i3GEO.parametros.w*3+pos;$i("corpoMapa"+letras[l]).style.height=i3GEO.parametros.h+pos;$i("corpoMapa"+letras[l]).style.clip='rect(0 0 0 0)'}}}i3GEO.mapa.ajustaPosicao();temp=function(retorno){var novoel,temp,i,g,guias,nguias;novoel=document.createElement("div");novoel.id="janelaguias";novoel.style.display="block";novoel.innerHTML='<div class="hd">Guias <div onclick ="i3GEO.janela.minimiza(\'conteudojanelaguias\')" id="janelaguias_minimizaCabecalho" class="container-minimiza" ></div></div><div class="bd" id="conteudojanelaguias_corpo" style=padding:0px ></div>';temp=$i("i3geo")?$i("i3geo").appendChild(novoel):document.body.appendChild(novoel);YAHOO.namespace("janelaguias.xp");YAHOO.janelaguias.xp.panel=new YAHOO.widget.Panel("janelaguias",{width:"270px",fixedcenter:true,constraintoviewport:false,underlay:"none",close:false,visible:true,draggable:true,modal:false,iframe:true});YAHOO.janelaguias.xp.panel.render();YAHOO.janelaguias.xp.panel.cfg.setProperty("y",0);YAHOO.janelaDoca.xp.manager.register(YAHOO.janelaDoca.xp.panel);i=$i(i3GEO.guias.IDGUIAS);$i("conteudojanelaguias_corpo").appendChild(i);i.style.borderLeft="1px solid black";i.style.borderRight="1px solid black";guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){if($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo)){$i("conteudojanelaguias_corpo").appendChild($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo));temp=$i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo).style;temp.background="white";temp.border="1px solid black";temp.borderTop="0px solid black";temp.width="270px";temp.left="-1px";temp.height=i3GEO.parametros.h-90}}i3GEO.atualiza("");i.style.display="block";i.style.left="-1px";i.style.width="270px"};i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.mudatamanho(temp,a,l)}else{YAHOO.janelaguias.xp.panel.render();YAHOO.janelaguias.xp.panel.show()}},mostraGuiaFerramenta:function(guia,namespace){var g,Dom=YAHOO.util.Dom;if(!namespace){namespace="guia"}for(g=0;g<12;g++){Dom.setStyle(namespace+g+"obj","display","none")}Dom.setStyle(guia+"obj","display","block")}};if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.arvoreDeCamadas={MOSTRALISTAKML:false,FILTRO:"",VERIFICAABRANGENCIATEMAS:true,finaliza:"",EXPANDESOLEGENDA:false,PERMITEEXPANDIRTEMAS:true,ARRASTARORDEM:true,ARRASTARLIXEIRA:true,LIGARDESLIGARTODOS:true,FILTRAR:true,ABRELEGENDA:true,EXPANDIDA:false,LEGENDAEXPANDIDA:false,OPCOESICONES:true,OPCOESTEMAS:true,OPCOESLEGENDA:true,AGUARDALEGENDA:false,ICONETEMA:true,FUNCOES:{farolescala:true,excluir:true,sobe:true,desce:true,fonte:true,zoomtema:true,compartilhar:true,opacidade:true,mudanome:true,procurar:true,toponimia:true,etiquetas:true,filtrar:true,tabela:true,grafico:true,editorlegenda:true,destacar:true,cortina:true,sql:true,comentar:true,temporizador:true,wms:true},CAMADAS:"",ARVORE:null,IDHTML:"listaTemas",SID:null,LOCAPLIC:null,ATIVATEMA:"",cria:function(onde,temas,g_sid,g_locaplic,funcaoTema){if(!YAHOO.lang.isUndefined(funcaoTema)){i3GEO.arvoreDeCamadas.ATIVATEMA=funcaoTema}i3GEO.arvoreDeCamadas.SID=typeof(g_sid)!=='undefined'?g_sid:i3GEO.configura.sid;i3GEO.arvoreDeCamadas.LOCAPLIC=typeof(g_locaplic)!=='undefined'?g_locaplic:i3GEO.configura.locaplic;if(onde!==""){i3GEO.arvoreDeCamadas.IDHTML=onde}if(i3GEO.arvoreDeCamadas.IDHTML===""){return}if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return}if(YAHOO.lang.isUndefined(temas)||temas===""){temas=i3GEO.arvoreDeCamadas.CAMADAS}i3GEO.arvoreDeCamadas.atualiza(temas);if(i3GEO.arvoreDeCamadas.finaliza!==""){eval(i3GEO.arvoreDeCamadas.finaliza)}},atualiza:function(temas,forca){if(arguments.length===0){temas=i3GEO.arvoreDeCamadas.CAMADAS;i3GEO.arvoreDeCamadas.CAMADAS="";forca=false}var estilo,temp,currentIconMode,newVal,root,tempNode,titulo,d,c,ltema,temaNode,grupoNode,i,j,n,nk,k,incluidos=[],grupoLayers=i3GEO.configura.grupoLayers,textoTema="";temp=$i(i3GEO.arvoreDeCamadas.IDHTML);if(temp){if(forca===true){temp.innerHTML=""}if(temp.innerHTML!==""){if(i3GEO.arvoreDeCamadas.comparaTemas(temas,i3GEO.arvoreDeCamadas.CAMADAS)){return}}}else{return}i3GEO.util.defineValor(i3GEO.arvoreDeCamadas.IDHTML,"innerHTML","");i3GEO.arvoreDeCamadas.CAMADAS=temas;(function(){function changeIconMode(){newVal=parseInt(this.value,10);if(newVal!==currentIconMode){currentIconMode=newVal}buildTree()}function buildTree(){i3GEO.arvoreDeCamadas.ARVORE=new YAHOO.widget.TreeView(i3GEO.arvoreDeCamadas.IDHTML)}buildTree()})();root=i3GEO.arvoreDeCamadas.ARVORE.getRoot();titulo="<table><tr><td><b>"+$trad("a7")+"</b></td><td>";if(this.ARRASTARLIXEIRA===true){titulo+="<img id='i3geo_lixeira' title='"+$trad("t2")+"' src='"+i3GEO.util.$im("branco.gif")+"' />"}if(this.FILTRAR===true){titulo+="<img onclick='i3GEO.arvoreDeCamadas.dialogo.filtro();' id='i3geo_filtro' title='"+$trad("t2a")+"' src='"+i3GEO.util.$im("branco.gif")+"' />"}if(this.ABRELEGENDA===true){titulo+="<img onclick='i3GEO.mapa.legendaHTML.libera();' id='soltaleg2' title='"+$trad("t2b")+"' src='"+i3GEO.util.$im("branco.gif")+"' />"}if(this.LIGARDESLIGARTODOS===true){titulo+="&nbsp;<img onclick='i3GEO.arvoreDeCamadas.aplicaTemas(\"ligartodos\");' id='olhoAberto' title='"+$trad("t3a")+"' src='"+i3GEO.util.$im("branco.gif")+"' />";titulo+="&nbsp;<img onclick='i3GEO.arvoreDeCamadas.aplicaTemas(\"desligartodos\");' id='olhoFechado' title='"+$trad("t3b")+"' src='"+i3GEO.util.$im("branco.gif")+"' />"}titulo+="</td></tr></table>";tempNode=new YAHOO.widget.HTMLNode({expanded:true,html:titulo,hasIcon:true,enableHighlight:false},root);estilo=navm?"text-align:left;font-size:11px;vertical-align:middle;display:table-cell;":"text-align:left;font-size:11px;vertical-align:vertical-align:top;padding-top:4px;";if(grupoLayers===""){c=temas.length;for(i=0,j=c;i<j;i+=1){ltema=temas[i];try{if((ltema.escondido).toLowerCase()!=="sim"){textoTema=i3GEO.arvoreDeCamadas.montaTextoTema(ltema);if(textoTema!==""){temaNode=new YAHOO.widget.HTMLNode({expanded:this.EXPANDIDA,html:textoTema,id:ltema.name,tipo:"tema",enableHighlight:false},tempNode);if(this.PERMITEEXPANDIRTEMAS===true){if(this.EXPANDESOLEGENDA===false){temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1)}else{if(ltema.classe!=="NAO"){temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraLegenda,1)}}}}YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault)}}catch(e){}}}else{nk=temas.length;c=grupoLayers.length;for(i=0;i<c;i+=1){temp="";if(grupoLayers[i].icone&&grupoLayers[i].icone===true){temp+="<p style="+estilo+" ><input class=inputsb style=cursor:pointer onclick='i3GEO.arvoreDeCamadas.ligaDesligaTemas(\""+i3GEO.configura.grupoLayers[i].layers+"\",this.checked)' type=checkbox title='Ligar/desligar temas do grupo' />&nbsp;"}temp+="<span style="+estilo+";vertical-align:top ><b>"+grupoLayers[i].nome+"</b></span></p>";d=this.EXPANDIDA;if(grupoLayers[i].expandido&&grupoLayers[i].expandido===true){d=true}grupoNode=new YAHOO.widget.HTMLNode({enableHighlight:false,html:temp,expanded:d},tempNode);n=grupoLayers[i].layers.length;for(j=0;j<n;j+=1){for(k=0;k<nk;k+=1){ltema=temas[k];if(ltema.name===grupoLayers[i].layers[j]&&ltema.escondido==="nao"){textoTema=i3GEO.arvoreDeCamadas.montaTextoTema(ltema);if(textoTema!==""){d={enableHighlight:false,expanded:i3GEO.arvoreDeCamadas.EXPANDIDA,html:textoTema,id:ltema.name,tipo:"tema"};if(grupoLayers[i].dinamico&&grupoLayers[i].dinamico===true){temaNode=new YAHOO.widget.HTMLNode(d,grupoNode)}else{temaNode=new YAHOO.widget.HTMLNode(d,tempNode)}temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1);YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault);incluidos.push(ltema.name)}}}}}grupoNode=new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,html:"<b>Outros</b>"},tempNode);c=incluidos.length;for(k=0;k<nk;k+=1){ltema=temas[k];n=false;for(j=0;j<c;j+=1){if(incluidos[j]===ltema.name||ltema.escondido.toLowerCase()==="sim"){n=true}}if(n===false){temaNode=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:i3GEO.arvoreDeCamadas.montaTextoTema(ltema),id:ltema.name,tipo:"tema"},grupoNode,i3GEO.arvoreDeCamadas.EXPANDIDA,true);temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1);YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault)}}}document.getElementById(i3GEO.arvoreDeCamadas.IDHTML).style.textAlign="left";i3GEO.arvoreDeCamadas.ARVORE.draw();if(i3GEO.arvoreDeCamadas.ARRASTARORDEM===true||i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){i3GEO.arvoreDeCamadas.ativaDragDrop()}i3GEO.mapa.ativaTema(i3GEO.temaAtivo);i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas();if(i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS===true&&i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()")}i3GEO.eventos.executaEventos(i3GEO.eventos.ATUALIZAARVORECAMADAS)},ligaDesligaTemas:function(lista,status){var c,n,i,aplica=false;lista=lista.split(",");n=lista.length;for(i=0;i<n;i+=1){c=i3GEO.arvoreDeCamadas.capturaCheckBox(lista[i]);if(c.checked!==status){aplica=true}c.checked=status;if(aplica===true&&i3GEO.Interface.ATUAL!=="padrao"){c.onclick.call()}}if(aplica===true&&i3GEO.Interface.ATUAL==="padrao"){i3GEO.arvoreDeCamadas.aplicaTemas()}},ativaDragDrop:function(){var Dom=YAHOO.util.Dom,Event=YAHOO.util.Event,DDM=YAHOO.util.DragDropMgr;YAHOO.example.DDList="";YAHOO.example.DDApp={init:function(){var ddtarget,i,ltema,ddlist;if($i("i3geo_lixeira")&&i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){ddtarget=new YAHOO.util.DDTarget("i3geo_lixeira")}i=i3GEO.arvoreDeCamadas.CAMADAS.length-1;if(i3GEO.arvoreDeCamadas.CAMADAS.length-1>=0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if($i("arrastar_"+ltema.name)){ddlist=new YAHOO.example.DDList("arrastar_"+ltema.name)}}while(i--)}}};YAHOO.example.DDList=function(id,sGroup,config){YAHOO.example.DDList.superclass.constructor.call(this,id,sGroup,config);this.logger=this.logger||YAHOO;YAHOO.util.Dom.setStyle(this.getDragEl(),"opacity",0.67);this.goingUp=false;this.lastY=0};YAHOO.extend(YAHOO.example.DDList,YAHOO.util.DDProxy,{startDrag:function(x,y){var dragEl,clickEl,Dom=YAHOO.util.Dom;this.logger.log(this.id+" startDrag");dragEl=this.getDragEl();clickEl=this.getEl();Dom.setStyle(clickEl,"visibility","hidden");dragEl.innerHTML=clickEl.innerHTML;Dom.setStyle(dragEl,"color",Dom.getStyle(clickEl,"color"));Dom.setStyle(dragEl,"backgroundColor",Dom.getStyle(clickEl,"backgroundColor"));Dom.setStyle(dragEl,"border","4px solid gray");Dom.setStyle(dragEl,"z-index","5000")},endDrag:function(e){var srcEl,proxy,a,thisid,proxyid;srcEl=this.getEl();proxy=this.getDragEl();Dom.setStyle(proxy,"visibility","");a=new YAHOO.util.Motion(proxy,{points:{to:Dom.getXY(srcEl)}},0.2,YAHOO.util.Easing.easeOut);proxyid=proxy.id;thisid=this.id;a.onComplete.subscribe(function(){var Dom=YAHOO.util.Dom;Dom.setStyle(proxyid,"visibility","hidden");Dom.setStyle(thisid,"visibility","")});a.animate();YAHOO.util.Dom.setStyle('i3geo_lixeira','border','0px solid blue')},onDragDrop:function(e,id){var pt,region,tema,destEl,els,lista,noid,temp,DDM=YAHOO.util.DragDropMgr,Dom=YAHOO.util.Dom;if(DDM.interactionInfo.drop.length===1){pt=DDM.interactionInfo.point;region=DDM.interactionInfo.sourceRegion;if(!region.intersect(pt)){DDM.refreshCache();if(DDM.getDDById(id).id==="i3geo_lixeira"){if(i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){(new YAHOO.util.Anim("i3geo_lixeira",{opacity:{from:0,to:1}},3,YAHOO.util.Easing.easeOutStrong)).animate();tema=(this.getEl()).id.split("arrastar_")[1];i3GEO.tema.exclui(tema)}}else{if(i3GEO.arvoreDeCamadas.ARRASTARORDEM===true){i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));destEl=Dom.get(id);noid=id.split("arrastar_")[1];destEl.appendChild(this.getEl());els=i3GEO.arvoreDeCamadas.listaLigadosDesligados();lista=els[2].join(",");temp=function(retorno){i3GEO.atualiza(retorno);if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ordenaLayers()}};i3GEO.php.reordenatemas(temp,lista)}}}}},onDrag:function(e){var y;y=Event.getPageY(e);if(y<this.lastY){this.goingUp=true}else if(y>this.lastY){this.goingUp=false}this.lastY=y},onDragOver:function(e,id){var srcEl,destEl;srcEl=this.getEl();destEl=YAHOO.util.Dom.get(id);if($i("i3geo_lixeira")&&id==="i3geo_lixeira"){$i("i3geo_lixeira").style.border="1px solid red"}else{destEl.style.textDecoration="underline"}},onDragOut:function(e,id){$i(id).style.textDecoration="none"}});Event.onDOMReady(YAHOO.example.DDApp.init,YAHOO.example.DDApp,true)},montaOpcoes:function(node){var d,conteudo,opcoesNode,idtema,ltema,farol,mfarol,tnome="",iconesNode,imb=i3GEO.util.$im("branco.gif"),funcoes=i3GEO.arvoreDeCamadas.FUNCOES;idtema=node.data.id;ltema=i3GEO.arvoreDeCamadas.pegaTema(idtema);if(i3GEO.arvoreDeCamadas.OPCOESICONES===true){if(funcoes.farolescala===true){farol="maisamarelo.png";mfarol="";if(ltema.escala*1<i3GEO.parametros.mapscale*1){farol="maisverde.png";mfarol=$trad("t9")}if(ltema.escala*1>i3GEO.parametros.mapscale*1){farol="maisvermelho.png";mfarol=$trad("t10")}if(ltema.escala===0){farol="maisamarelo.png";mfarol=$trad("t11")}tnome+="&nbsp;<img id='farol"+ltema.name+"' src='"+i3GEO.util.$im(farol)+"' title='"+mfarol+"' />"}if(funcoes.excluir===true){tnome+="&nbsp;<img id='idx"+ltema.name+"' class='x' src='"+imb+"' title='"+$trad("t12")+"' onclick='i3GEO.tema.exclui(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t12a")+"','exclui')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(funcoes.sobe===true){tnome+="&nbsp;<img class='sobe' src='"+imb+"' title='"+$trad("t13")+"' onclick='i3GEO.tema.sobe(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t14")+"','sobe')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(funcoes.desce===true){tnome+="&nbsp;<img class='desce' src='"+imb+"' title='"+$trad("t15")+"' onclick='i3GEO.tema.desce(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t16")+"','desce')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(funcoes.fonte===true){tnome+="&nbsp;<img class='fonte' src='"+imb+"' title='"+$trad("a9")+"' onclick='i3GEO.tema.fonte(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("a9")+"','fonte')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if((ltema.zoomtema.toLowerCase()==="sim")&&(i3GEO.Interface.ATUAL!=="flamingo")&&(funcoes.zoomtema===true)){tnome+="&nbsp;<img class='extent' src='"+imb+"' title='"+$trad("t17")+"' onclick='i3GEO.tema.zoom(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t18")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}iconesNode=new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node);if(funcoes.compartilhar===true&&ltema.permitecomentario.toLowerCase()!=="nao"){temp=i3GEO.configura.locaplic+"/ms_criamapa.php?layers="+ltema.name+"&amp;temasa="+ltema.name;tnome=i3GEO.social.compartilhar("",temp,temp,"semtotal");iconesNode=new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node)}}if(i3GEO.arvoreDeCamadas.OPCOESTEMAS===true){opcoesNode=new YAHOO.widget.HTMLNode({html:$trad("t18a"),idopcoes:ltema.name,identifica:ltema.identifica,enableHighlight:false,expanded:false},node);opcoesNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraOpcoes,1)}if(i3GEO.arvoreDeCamadas.OPCOESLEGENDA===true&&ltema.classe!=="NAO"){opcoesNode=new YAHOO.widget.HTMLNode({html:$trad("p3"),idlegenda:ltema.name,enableHighlight:false,expanded:i3GEO.arvoreDeCamadas.LEGENDAEXPANDIDA},node);opcoesNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraLegenda,1)}node.loadComplete()},mostraOpcoes:function(node){var tnome,d,n,temp,idtema=node.data.idopcoes,ltema=i3GEO.arvoreDeCamadas.pegaTema(idtema),funcoes=i3GEO.arvoreDeCamadas.FUNCOES;if(funcoes.opacidade===true){if(navm){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t19")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t20")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=42' >&nbsp;&nbsp;&nbsp;</a>"+$inputText("","","tr"+ltema.name,"","3",ltema.transparency)+"&nbsp;<a class='tic' onclick='i3GEO.tema.mudatransp(\""+ltema.name+"\")' href='#' /a>"}else{tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t19")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t20")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=42' >&nbsp;&nbsp;&nbsp;</a>"+$inputText("","","tr"+ltema.name,"","3",ltema.transparency)+"<img class='tic' style='position:relative;top:3px;' onclick='i3GEO.tema.mudatransp(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />"}n=new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if(funcoes.temporizador===true&&i3GEO.Interface.ATUAL!="padrao"&&i3GEO.Interface.ATUAL!="flamingo"){if(navm){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t47")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t48")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=101' >&nbsp;&nbsp;&nbsp;</a>"+$inputText("","","temporizador"+ltema.name,"","3",ltema.temporizador)+"&nbsp;<a class='tic' onclick='i3GEO.tema.temporizador(\""+ltema.name+"\")' href='#' /a>"}else{tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t47")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t48")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=101' >&nbsp;&nbsp;&nbsp;</a>"+$inputText("","","temporizador"+ltema.name,"","3",ltema.temporizador)+"<img class='tic' style='position:relative;top:3px;' onclick='i3GEO.tema.temporizador(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />"}n=new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if(funcoes.mudanome===true){if(navm){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t21a")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"+$trad("t21")+" </span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=43' >&nbsp;&nbsp;&nbsp;</a>"+$inputText("","","nn"+ltema.name,"","8","")+"&nbsp;<a class='tic' onclick='i3GEO.tema.mudanome(\""+ltema.name+"\")' href='#' />"}else{tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t21a")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"+$trad("t21")+" </span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=43' >&nbsp;&nbsp;&nbsp;</a>"+$inputText("","","nn"+ltema.name,"","10","")+"<img class='tic' style='position:relative;top:3px;' onclick='i3GEO.tema.mudanome(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />"}n=new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if((ltema.type<3)&&(ltema.connectiontype!==7)){if(i3GEO.Interface.ATUAL!=="flamingo"&&funcoes.procurar===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t22"),$trad("t23"),'i3GEO.tema.dialogo.procuraratrib(\"'+ltema.name+'\")',node)}if(funcoes.toponimia===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t24"),$trad("t25"),'i3GEO.tema.dialogo.toponimia(\"'+ltema.name+'\")',node)}if(funcoes.etiquetas===true&&(ltema.identifica.toLowerCase()==="sim"||ltema.identifica==="")){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t26"),$trad("t27"),'i3GEO.tema.dialogo.etiquetas(\"'+ltema.name+'\")',node)}if(funcoes.filtrar===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t28"),$trad("t29"),'i3GEO.tema.dialogo.filtro(\"'+ltema.name+'\")',node)}if(funcoes.tabela===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t30"),$trad("t31"),'i3GEO.tema.dialogo.tabela(\"'+ltema.name+'\")',node)}if(i3GEO.parametros.versaoms>4&&funcoes.grafico===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t37"),$trad("t37"),'i3GEO.tema.dialogo.graficotema(\"'+ltema.name+'\")',node)}}if(ltema.type<4&&funcoes.editorlegenda===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t32"),$trad("t33"),'i3GEO.tema.dialogo.editaLegenda(\"'+ltema.name+'\")',node)}if(funcoes.destacar===true&&i3GEO.Interface.ATUAL!=="googlemaps"&&i3GEO.Interface.ATUAL!=="googleearth"&&i3GEO.Interface.ATUAL!=="flamingo"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t34"),$trad("t35"),'i3GEO.navega.destacaTema.inicia(\"'+ltema.name+'\")',node)}if(funcoes.cortina===true&&i3GEO.Interface.ATUAL!=="padrao"&&i3GEO.Interface.ATUAL!=="googleearth"&&i3GEO.Interface.ATUAL!=="flamingo"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t42"),$trad("t42"),'i3GEO.tema.dialogo.cortina(\"'+ltema.name+'\")',node)}if(funcoes.sql===true&&ltema.editorsql.toLowerCase()==="sim"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t40"),$trad("t41"),'i3GEO.tema.dialogo.editorsql(\"'+ltema.name+'\")',node)}if(funcoes.comentar===true&&ltema.permitecomentario.toLowerCase()!=="nao"&&i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t45"),$trad("t45"),'i3GEO.tema.dialogo.comentario(\"'+ltema.name+'\")',node)}if(funcoes.wms===true&&ltema.permiteogc.toLowerCase()!=="nao"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema("Getcapabilities",'WMS-OGC','i3GEO.tema.dialogo.mostraWms(\"'+ltema.name+'\")',node)}if(i3GEO.parametros.editor.toLowerCase()==="sim"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t44"),"<span style=color:red title='Apenas usuários editores podem ver essa opção' >"+$trad("t44")+"</span>",'i3GEO.tema.dialogo.salvaMapfile(\"'+ltema.name+'\")',node)}node.loadComplete()},adicionaOpcaoTema:function(dica,titulo,onclick,node){var tnome="<a href='#' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+dica+"','');\" onclick="+onclick+">"+titulo+" </a>",temp=new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node)},mostraLegenda:function(node){var retorna,idtema=node.data.idlegenda,ltema=i3GEO.arvoreDeCamadas.pegaTema(idtema);retorna=function(retorno){var original,i,re,tabela,linhas,linha,colunas,id,exp,incluir,d,nodeLeg,elementos,nelementos,inputs,desativar,nindices;if(retorno.data.legenda){original=retorno;retorno=retorno.data.legenda;if(retorno[0]){if((navn)&&(!retorno[0].imagem)){tabela=retorno}else{i=retorno[0].imagem;re=new RegExp("tiff","g");i=i.replace(re,'png');tabela="<img src='"+i+"' />"}retorno=""}else{linhas=retorno.split("#");if(linhas.length>1){linhas=retorno.split("|");tabela="<table>";linha=linhas.length-1;if(linha>=0){do{colunas=linhas[linha].split("#");id=colunas[0]+"-"+colunas[1];re=new RegExp("'","g");exp=colunas[3].replace(re,'"');tabela+="<tr style='border-top:1px solid rgb(240,240,240);'><td><img src='"+colunas[4]+"' </td><td style='text-align:left'>"+colunas[2]+"</td></tr>"}while(linha--)}tabela+="</table><br>"}else{tabela=retorno}}}else{tabela="<img src='"+retorno.data[0].imagem+"' />"}incluir="<div style='text-align:left' id='"+idtema+"verdiv"+"'>"+tabela+"</div>";nodeLeg=new YAHOO.widget.HTMLNode({html:incluir,enableHighlight:false,expanded:false},node);node.loadComplete();elementos=document.getElementById(idtema+"verdiv").getElementsByTagName("input");nelementos=elementos.length;inputs=[];i=0;if(nelementos>0){do{if(elementos[i].type==="checkbox"){inputs.push(elementos[i])}i++}while(i<nelementos)}if(original.data.desativar){desativar=original.data.desativar;nindices=desativar.length;i=0;if(nindices>0){do{inputs[desativar[i]].checked=false;i++}while(i<nindices)}}};if(i3GEO.configura.templateLegenda!==""){i3GEO.php.criaLegendaHTML(retorna,idtema,i3GEO.configura.templateLegenda)}else{i3GEO.php.criaLegendaHTML(retorna,idtema)}},atualizaLegenda:function(idtema){var node;if(document.getElementById(idtema+"verdiv")){node=i3GEO.arvoreDeCamadas.ARVORE.getNodeByProperty("idlegenda",idtema);if(node){i3GEO.arvoreDeCamadas.ARVORE.removeChildren(node);this.mostraLegenda(node);if($i("janelaLegenda"+idtema+"_corpo")){i3GEO.tema.mostralegendajanela(idtema,"","abrejanela")}}}},escolheCorClasse:function(leg){var obj,novoel;leg=leg.parentNode.getElementsByTagName("input")[0];if(!$i("tempinputcorclasse")){novoel=document.createElement("input");novoel.id="tempinputcorclasse";novoel.style.display="none";novoel.alt="objeto criado para guardar dados da funcao escolohercorclasse";novoel.onchange="";document.body.appendChild(novoel)}obj=$i("tempinputcorclasse");obj.value="";obj.tema=leg.name;obj.idclasse=leg.value;obj.onchange=function(){var obj=$i("tempinputcorclasse");i3GEO.tema.alteracorclasse(obj.tema,obj.idclasse,obj.value)};i3GEO.util.abreCor("","tempinputcorclasse")},inverteStatusClasse:function(leg){var temp=function(retorno){i3GEO.atualiza();i3GEO.Interface.atualizaTema(retorno,leg.name)};i3GEO.php.inverteStatusClasse(temp,leg.name,leg.value)},montaTextoTema:function(tema){var ck,html,display="none",estilo,iu=i3GEO.util;if(tema.status*1===2){ck=' CHECKED '}else{ck=""}if(this.FILTRO!==""){if(this.FILTRO==="desligados"&&ck!==""){return""}if(this.FILTRO==="ligados"&&ck===""){return""}if(this.FILTRO==="selecionados"&&tema.sel.toLowerCase()!=="sim"){return""}if(this.FILTRO==="download"&&tema.download.toLowerCase()!=="sim"){return""}if(this.FILTRO==="wms"&&tema.connectiontype*1!==7){return""}if(this.FILTRO==="raster"&&tema.type*1!==3){return""}if(this.FILTRO==="toponimia"&&tema.type*1!==4){return""}}estilo=navm?"text-align:left;font-size:11px;vertical-align:middle;display:table-cell;":"text-align:left;font-size:11px;vertical-align:vertical-align:top;padding-top:4px;";html="<p onclick='i3GEO.mapa.ativaTema(\""+tema.name+"\")' id='arrastar_"+tema.name+"' style='"+estilo+"' ><input class=inputsb style='cursor:pointer;' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t3")+"','ligadesliga')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" type='checkbox' name=\"layer\" value='"+tema.name+"' "+ck;if(i3GEO.arvoreDeCamadas.ATIVATEMA!==""){html+="onclick=\""+i3GEO.arvoreDeCamadas.ATIVATEMA+"\""}else{html+="onclick='i3GEO.util.criaBotaoAplicar(\"i3GEO.arvoreDeCamadas.aplicaTemas\",\""+$trad("p14")+"\",\"i3geoBotaoAplicarCamadas\",this)'"}html+=" />";estilo=navm?"cursor:pointer;vertical-align:35%;padding-top:0px;":"cursor:pointer;vertical-align:top;";if(tema.iconetema!==""&&i3GEO.arvoreDeCamadas.ICONETEMA===true){html+="&nbsp;<img style='"+estilo+"' src='"+tema.iconetema+"' />"}if(tema.contextoescala.toLowerCase()==="sim"){html+="&nbsp;<img style='"+estilo+"' src="+iu.$im("contextoescala.png")+" title='"+$trad("t36")+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t36")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(tema.sel.toLowerCase()==="sim"){html+="&nbsp;<img style='"+estilo+"' src="+iu.$im("estasel.png")+" title='"+$trad("t4")+"' onclick='i3GEO.tema.limpasel(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t5")+"','limpasel')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />";html+="&nbsp;<img style='"+estilo+"' src="+iu.$im("zoomsel.gif")+" title='"+$trad("t4a")+"' onclick='i3GEO.tema.zoomsel(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t5")+"','zoomsel')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(tema.download.toLowerCase()==="sim"){html+="&nbsp;<img style='"+estilo+"' src="+iu.$im("down1.gif")+" title='download' onclick='i3GEO.tema.dialogo.download(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t6")+"','download')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}estilo=navm?"cursor:move;vertical-align:35%;padding-top:0px;color:black;":"cursor:move;vertical-align:top;color:black;";if(i3GEO.arvoreDeCamadas.AGUARDALEGENDA){html+="&nbsp;<span id='ArvoreTituloTema"+tema.name+"' style='"+estilo+"' onclick=\"i3GEO.tema.mostralegendajanela('"+tema.name+"','"+tema.tema+"','abrejanela');\" onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t7a")+"','');i3GEO.tema.mostralegendajanela('"+tema.name+"','"+tema.tema+"','ativatimer');\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('');i3GEO.tema.mostralegendajanela('"+tema.name+"','','desativatimer');\" >"+tema.tema+"</span>"}else{html+="&nbsp;<span id='ArvoreTituloTema"+tema.name+"' style='"+estilo+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t7")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+tema.tema+"</span>"}html+="</p>";if(i3GEO.tema.TEMPORIZADORESID[tema.name]==undefined&&tema.temporizador!=""){i3GEO.tema.temporizador(tema.name,tema.temporizador)}return(html)},atualizaFarol:function(mapscale){var farol,l,ltema,escala,iu=i3GEO.util,im=i3GEO.configura.locaplic+"/imagens/",camadas=i3GEO.arvoreDeCamadas.CAMADAS;farol="maisamarelo.png";l=camadas.length-1;if(l>=0){do{ltema=camadas[l];escala=ltema.escala;if(escala*1<mapscale*1){farol="maisverde.png"}if(escala*1>mapscale*1){farol="maisvermelho.png"}if(escala*1===0){farol="maisamarelo.png"}iu.defineValor("farol"+ltema.name,"src",im+farol)}while(l--)}},aplicaTemas:function(tipo){if(arguments.length===0){tipo="normal"}var t,temp,ligar,desligar;if(tipo==="normal"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("mantem")}if(tipo==="ligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("marca");if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googleearth","openlayers","googlemaps"])){return}}if(tipo==="desligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("desmarca");if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googleearth","openlayers","googlemaps"])){return}}temp=function(){i3GEO.atualiza();i3GEO.janela.fechaAguarde("redesenha")};try{clearTimeout(tempoBotaoAplicar)}catch(erro){}tempoBotaoAplicar="";i3GEO.janela.abreAguarde("redesenha",$trad("o1"));if(tipo==="normal"){i3GEO.php.ligatemas(temp,t[1].toString(),t[0].toString());return}if(tipo==="ligartodos"){i3GEO.php.ligatemas(temp,"",t[2].toString());return}if(tipo==="desligartodos"){i3GEO.php.ligatemas(temp,t[2].toString(),"")}},listaLigadosDesligados:function(tipo){if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return[[],[],[]]}if(arguments.length===0){tipo="manter"}var no,cs,csn,j,c,temp,nos=i3GEO.arvoreDeCamadas.ARVORE.getNodesByProperty("tipo","tema"),ligados=[],desligados=[],todos=[],n=nos.length,i=0,ATUAL=i3GEO.Interface.ATUAL;do{try{no=nos[i].getEl();cs=no.getElementsByTagName("input");csn=cs.length;for(j=0;j<csn;j+=1){c=cs[j];if(c.name==="layer"){temp=c.checked===true?ligados.push(c.value):desligados.push(c.value);todos.push(c.value);if(tipo==="marca"){c.checked=true;if(i3GEO.util.in_array(ATUAL,["googleearth","openlayers","googlemaps"])){i3GEO.Interface[ATUAL].ligaDesliga(c)}}if(tipo==="desmarca"){c.checked=false;if(i3GEO.util.in_array(ATUAL,["googleearth","openlayers","googlemaps"])){i3GEO.Interface[ATUAL].ligaDesliga(c)}}}}i++}catch(e){i+=1}}while(i<n);return([ligados,desligados,todos])},capturaCheckBox:function(tema){if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return}var nos,ligados,desligados,todos,n,i,no,cs,csn,j,c;nos=i3GEO.arvoreDeCamadas.ARVORE.getNodesByProperty("tipo","tema");n=nos.length;i=0;do{try{no=nos[i].getEl();cs=no.getElementsByTagName("input");csn=cs.length;for(j=0;j<csn;j+=1){c=cs[j];if(c.name==="layer"&&c.value===tema){return c}}i+=1}catch(e){i+=1}}while(i<n);return(null)},comparaTemas:function(novo,atual){try{var novon=novo.length,i;if(novon!==atual.length){return(false)}for(i=0;i<novon;i+=1){if(novo[i].name!==atual[i].name){return(false)}if(novo[i].tema!==atual[i].tema){return(false)}if(novo[i].sel!==atual[i].sel){return(false)}if(novo[i].status!==atual[i].status){return(false)}}return(true)}catch(e){return true}},pegaTema:function(idtema){var i,v="",c=i3GEO.arvoreDeCamadas.CAMADAS.length;for(i=0;i<c;i+=1){if(i3GEO.arvoreDeCamadas.CAMADAS[i].name===idtema){v=i3GEO.arvoreDeCamadas.CAMADAS[i]}}return v},filtraCamadas:function(propriedade,valor,operador,camadas){var resultado=[],i=0,temp,nelementos=camadas.length,ltema;if(nelementos>0){do{ltema=camadas[i];if(ltema.escondido.toLowerCase()!=="sim"){temp=ltema[propriedade];if(operador==="igual"){if(temp==valor){resultado.push(ltema)}}if(operador==="diferente"){if(temp!=valor){resultado.push(ltema)}}}i+=1}while(i<nelementos)}return resultado},alteraPropCamadas:function(propriedade,valor,camada){var resultado=[],i=0,temp,nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if(ltema.name===camada){ltema[propriedade]=valor}i+=1}while(i<nelementos)}},verificaAbrangenciaTemas:function(){if(i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS===false){return}try{var resultado=[],i=0,temp,nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema,intersec,node;if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];temp=ltema.exttema;if(temp!==""){if(i3GEO.util.intersectaBox(temp,i3GEO.parametros.mapexten)===false){$i("ArvoreTituloTema"+ltema.name).style.color="gray"}else{$i("ArvoreTituloTema"+ltema.name).style.color="black"}}i+=1}while(i<nelementos)}}catch(e){}},verificaAplicaExtensao:function(){var i=0,temp="",nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;try{if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if(ltema.aplicaextensao.toLowerCase()==="sim"){temp=ltema.name}i+=1}while(i<nelementos)}}catch(e){return""}return temp},dialogo:{filtro:function(){i3GEO.util.dialogoFerramenta("i3GEO.arvoreDeCamadas.dialogo.filtro()","filtroarvore","filtroarvore")}}};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="<table id='rosaV' >";setas+="<tr onclick=\"javascript:i3GEO.configura.mostraRosaDosVentos='nao'\"><td></td><td></td><td style=cursor:pointer >x</td></tr><tr>";setas+="<td><img class='rosanoroeste' title='noroeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','noroeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosanorte' title='norte' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','norte','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosanordeste' title='nordeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','nordeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td></tr>";setas+="<tr><td><img class='rosaoeste' title='oeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','oeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><table><tr>";setas+="<td><img class='rosamais' title='aproxima' onclick=\"i3GEO.navega.zoomin('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"')\" src='"+$im("branco.gif")+"' </td>";setas+="<td><img class='rosamenos' title='afasta' onclick=\"i3GEO.navega.zoomout('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"')\" src='"+$im("branco.gif")+"' </td>";setas+="</tr></table></td>";setas+="<td><img class='rosaleste' title='leste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','leste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td></tr>";setas+="<tr><td><img class='rosasudoeste' title='sudoeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','sudoeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosasul' title='sul' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','sul','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosasudeste' title='sudeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','sudeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td></tr></table>";i=$i("i3geo_rosa");i.innerHTML=setas;i.style.top=objposicaocursor.telay-27;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(ppx<boxxini){bxs.left=ppx;bxs.width=boxxini-ppx+2}if(py<boxyini){bxs.top=py;bxs.height=boxyini-py+2}}else{if(ppx>boxxini){bxs.width=ppx-boxxini+"px"}if(py>boxyini){bxs.height=py-boxyini+"px"}if(ppx<boxxini){bxs.left=ppx+"px";bxs.width=boxxini-ppx+"px"}if(py<boxyini){bxs.top=py+"px";bxs.height=boxyini-py+"px"}}},termina:function(){var valor,v,x1,y1,x2,y2,limpa,f;if(g_tipoacao!=='zoomli'){i3GEO.eventos.MOUSEDOWN.remove("i3GEO.navega.zoomBox.inicia()");i3GEO.eventos.MOUSEUP.remove("i3GEO.navega.zoomBox.termina()");return}try{if(i3GEO.navega.timerNavega!==null){return}valor=i3GEO.calculo.rect2ext("i3geoboxZoom",i3GEO.parametros.mapexten,i3GEO.parametros.pixelsize);v=valor[0];x1=valor[1];y1=valor[2];x2=valor[3];y2=valor[4];limpa=function(){var bxs=$i("i3geoboxZoom").style;bxs.display="none";bxs.visibility="hidden";bxs.width=0;bxs.height=0};if((x1===x2)||(y1===y2)){limpa.call();return}i3GEO.parametros.mapexten=v;limpa.call();i3GEO.eventos.MOUSEMOVE.remove("i3GEO.navega.zoomBox.desloca()");i3GEO.eventos.MOUSEUP.remove("i3GEO.navega.zoomBox.termina()");if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.zoom2extent(v);return}f="i3GEO.navega.timerNavega = null;i3GEO.navega.zoomExt('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','"+i3GEO.configura.tipoimagem+"','"+v+"')";if(i3GEO.navega.timerNavega!==undefined){clearTimeout(i3GEO.navega.timerNavega)}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)}catch(e){limpa.call();return}}},entorno:{ativaDesativa:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){alert("Essa operação não funciona nessa interface");return}if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.inverteModoTile();return}var letras,l;if(i3GEO.parametros.mapfile===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}if(i3GEO.configura.entorno.toLowerCase()==="sim"){letras=["L","O","N","S"];for(l=0;l<4;l++){if($i("img"+letras[l])){$i("img"+letras[l]).style.display="none";$i("img"+letras[l]).src=""}}$left("img",0);$top("img",0);i3GEO.configura.entorno="nao";alert("Entorno desativado");$i("img").style.visibility="visible";$i("img").style.display="block"}else{i3GEO.navega.entorno.geraURL();letras=["L","O","N","S"];for(l=0;l<4;l++){if($i("img"+letras[l])){$i("img"+letras[l]).style.width=i3GEO.parametros.w;$i("img"+letras[l]).style.height=i3GEO.parametros.h;$i("img"+letras[l]).style.display="block"}}i3GEO.configura.entorno.toLowerCase()="sim";i3GEO.navega.entorno.ajustaPosicao();alert("Entorno ativado. o desenho do mapa pode demorar mais.")}},geraURL:function(){var nny,nnx,sy,sx,lx,ly,ox,oy,u,sul,norte,leste,oeste;nny=(i3GEO.parametros.h/2)*-1;nnx=i3GEO.parametros.w/2;sy=i3GEO.parametros.h+(i3GEO.parametros.h/2);sx=i3GEO.parametros.w/2;lx=i3GEO.parametros.w+(i3GEO.parametros.w/2);ly=i3GEO.parametros.h/2;ox=(parseInt(i3GEO.parametros.w/2,10))*-1;oy=i3GEO.parametros.h/2;u=window.location.protocol+"\/\/"+window.location.host+i3GEO.parametros.cgi+"?map="+i3GEO.parametros.mapfile;u+="&mode=map&imgext="+i3GEO.parametros.mapexten+"&mapsize="+nnx+" "+oy;sul=u+"&imgxy="+sx/2+" "+sy/2;norte=u+"&imgxy="+nnx/2+" "+nny/2;leste=u+"&imgxy="+lx/2+" "+ly/2;oeste=u+"&imgxy="+ox/2+" "+oy/2;$i("imgS").src=sul;$i("imgN").src=norte;$i("imgL").src=leste;$i("imgO").src=oeste},ajustaPosicao:function(){$left("img",i3GEO.parametros.w*-1);$left("imgS",i3GEO.parametros.w*-1);$left("imgL",i3GEO.parametros.w);$left("imgO",i3GEO.parametros.w*-3);$left("imgN",i3GEO.parametros.w*-1);$top("img",i3GEO.parametros.h*-1);$top("imgS",i3GEO.parametros.h*-1);$top("imgL",i3GEO.parametros.h*-1);$top("imgN",i3GEO.parametros.h*-1);$top("imgO",i3GEO.parametros.h*-1)}},lente:{POSICAOX:0,POSICAOY:0,ESTAATIVA:"nao",inicia:function(){var novoel,novoimg,temp;if(!$i("lente")){novoel=document.createElement("div");novoel.id='lente';novoel.style.clip='rect(0px,0px,0px,0px)';novoimg=document.createElement("img");novoimg.src="";novoimg.id='lenteimg';novoel.appendChild(novoimg);document.body.appendChild(novoel);novoel=document.createElement("div");novoel.id='boxlente';document.body.appendChild(novoel)}temp=$i('boxlente').style;temp.borderWidth='1';temp.borderColor="red";temp.display="block";$i("lente").style.display="block";i3GEO.navega.lente.ESTAATIVA="sim";i3GEO.navega.lente.atualiza();if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.navega.lente.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.navega.lente.atualiza()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.navega.lente.movimenta()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.navega.lente.movimenta()")}},atualiza:function(){var temp=function(retorno){try{var pos,volta,nimg,olente,oboxlente,olenteimg;retorno=retorno.data;if(retorno==="erro"){alert("A lente nao pode ser criada");return}volta=retorno.split(",");nimg=volta[2];olente=$i('lente');oboxlente=$i('boxlente');olenteimg=$i('lenteimg');olenteimg.src=nimg;olenteimg.style.width=volta[0]*1.5;olenteimg.style.height=volta[1]*1.5;olente.style.zIndex=1000;olenteimg.style.zIndex=1000;oboxlente.style.zIndex=1000;pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));olente.style.left=pos[0]+i3GEO.navega.lente.POSICAOX+"px";olente.style.top=pos[1]+i3GEO.navega.lente.POSICAOY+"px";oboxlente.style.left=pos[0]+i3GEO.navega.lente.POSICAOX+"px";oboxlente.style.top=pos[1]+i3GEO.navega.lente.POSICAOY+"px";oboxlente.style.display='block';oboxlente.style.visibility='visible';olente.style.display='block';olente.style.visibility='visible';i3GEO.janela.fechaAguarde("ajaxabrelente")}catch(e){i3GEO.janela.fechaAguarde()}};if(i3GEO.navega.lente.ESTAATIVA==="sim"){i3GEO.janela.abreAguarde("ajaxabrelente",$trad("o1"));i3GEO.php.aplicaResolucao(temp,1.5)}else{i3GEO.navega.lente.desativa()}},desativa:function(){$i("lente").style.display="none";$i("boxlente").style.display="none";$i('boxlente').style.borderWidth=0;i3GEO.navega.lente.ESTAATIVA="nao";i3GEO.eventos.MOUSEMOVE.remove("i3GEO.navega.lente.movimenta()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.navega.lente.atualiza()")},movimenta:function(){try{if(i3GEO.navega.lente.ESTAATIVA==="sim"){var pos,esq,topo,clipt,i;if($i("lente").style.visibility==="visible"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA))}esq=(objposicaocursor.telax-pos[0])*2.25;topo=(objposicaocursor.telay-pos[1])*2.25;clipt="rect("+(topo-120)+" "+(esq+120)+" "+(topo+120)+" "+(esq-120)+")";i=$i("lente").style;i.clip=clipt;i.top=pos[1]-(topo-120);i.left=pos[0]-(esq-120)}}catch(e){}}},destacaTema:{TAMANHO:75,ESTAATIVO:"nao",TEMA:"",inicia:function(tema){var novoel,novoeli,janela,pos;if(!$i("img_d")){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));novoel=document.createElement("div");novoel.id="div_d";novoel.style.zIndex=5000;document.body.appendChild(novoel);$i("div_d").innerHTML="<input style='position:relative;top:0px;left:0px'' type=image src='' id='img_d' />";$i("div_d").style.left=parseInt(pos[0],10);$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="<p style='position:absolute;top:0px;left:0px'>+-</p>"}i3GEO.navega.destacaTema.TEMA=tema;i3GEO.navega.destacaTema.ESTAATIVO="sim";i3GEO.navega.destacaTema.atualiza();janela=i3GEO.janela.cria(160,0,"","center","center","Feche para parar destaque&nbsp;&nbsp;","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+='<div style="text-align:center;position:relative;left:9px" >'}estilo="top:4px;";if(navm){estilo="top:4px;left:-2px;"}temp+='<div id="vertMaisZoom" style="'+estilo+'"></div><div id="vertBGDiv" name="vertBGDiv" tabindex="0" x2:role="role:slider" state:valuenow="0" state:valuemin="0" state:valuemax="200" title="Zoom" >';temp+='<div id="vertHandleDivZoom" ><img alt="" class="slider" src="'+i3GEO.util.$im("branco.gif")+'" /></div></div>';if(navm){temp+='<div id=vertMenosZoom style="left:-1px;" ></div>'}else{temp+='<div id=vertMenosZoom ></div>'}if(navn){temp+='</div>'}return temp},ativa:function(){var temp;$i("vertMaisZoom").onmouseover=function(){i3GEO.ajuda.mostraJanela('Amplia o mapa mantendo o centro atual.')};$i("vertMaisZoom").onclick=function(){if(!$i("imgtemp")){$i("vertHandleDivZoom").onmousedown.call();g_fatordezoom=0;$i("vertHandleDivZoom").onmousemove.call();g_fatordezoom=-1}$i("vertHandleDivZoom").onmousemove.call();i3GEO.barraDeBotoes.BOTAOCLICADO='zoomin';try{clearTimeout(i3GEO.navega.timerNavega)}catch(e){}i3GEO.navega.timerNavega=setTimeout("$i('vertBGDiv').onmouseup.call();",i3GEO.navega.TEMPONAVEGAR);if(g_fatordezoom<-6){$i("vertBGDiv").onmouseup.call()}};$i("vertMenosZoom").onmouseover=function(){i3GEO.ajuda.mostraJanela('Reduz o mapa mantendo o centro atual.')};$i("vertMenosZoom").onclick=function(){if(!$i("imgtemp")){$i("vertHandleDivZoom").onmousedown.call();g_fatordezoom=0;$i("vertHandleDivZoom").onmousemove.call();g_fatordezoom=1}$i("vertHandleDivZoom").onmousemove.call();i3GEO.barraDeBotoes.BOTAOCLICADO='zoomout';try{clearTimeout(i3GEO.navega.timerNavega)}catch(e){}i3GEO.navega.timerNavega=setTimeout("$i('vertBGDiv').onmouseup.call();",i3GEO.navega.TEMPONAVEGAR);if(g_fatordezoom>6){$i("vertBGDiv").onmouseup.call()}};verticalSlider=YAHOO.widget.Slider.getVertSlider("vertBGDiv","vertHandleDivZoom",0,70);verticalSlider.onChange=function(offsetFromStart){g_fatordezoom=(offsetFromStart-35)/5};verticalSlider.setValue(35,true);if($i("vertBGDiv")){$i("vertBGDiv").onmouseup=function(){verticalSlider.setValue(35,true);if(g_fatordezoom!==0){temp=i3GEO.navega.TEMPONAVEGAR;i3GEO.navega.TEMPONAVEGAR=0;i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,i3geo_ns);i3GEO.navega.TEMPONAVEGAR=temp}g_fatordezoom=0}}if($i("vertHandleDivZoom")){$i("vertHandleDivZoom").onmousedown=function(){var iclone,corpo;$i("vertHandleDivZoom").onmouseout=function(e){if(!e){e=window.event}if(g_fatordezoom!==0){$i("vertBGDiv").onmouseup.call()}e.onmouseup.returnValue=false;e.onmouseout.returnValue=false};i3GEO.barraDeBotoes.BOTAOCLICADO='slidezoom';if(!$i("imgtemp")){iclone=document.createElement('IMG');iclone.style.position="absolute";iclone.id="imgtemp";iclone.style.border="1px solid blue";$i("img").parentNode.appendChild(iclone);iclone=$i("imgtemp");corpo=$i("img");if(!corpo){return}iclone.src=corpo.src;iclone.style.width=i3GEO.parametros.w;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(coordenadas){i3GEO.navega.dialogo.google.coordenadas=coordenadas;if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizagoogle()")>0){i3GEO.eventos.NAVEGAMAPA.remove("atualizagoogle()")}i3GEO.util.criaBox();g_operacao="navega";var idgoogle="googlemaps"+Math.random();i3GEO.janela.cria((i3GEO.parametros.w/2)+25+"px",(i3GEO.parametros.h/2)+18+"px",i3GEO.configura.locaplic+"/ferramentas/googlemaps/index.php","","","Google maps <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=7&idajuda=68' >&nbsp;&nbsp;&nbsp;</a>",idgoogle);atualizagoogle=function(){try{parent.frames[idgoogle+"i"].panTogoogle()}catch(e){i3GEO.eventos.NAVEGAMAPA.remove("atualizagoogle()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizagoogle()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizagoogle()")}},confluence:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.confluence()","confluence","confluence")}}};if(typeof(i3GEO)==='undefined'){i3GEO=[]}objposicaocursor={ddx:"",ddy:"",dmsx:"",dmsy:"",telax:"",telay:"",imgx:"",imgy:"",refx:"",refy:""};i3GEO.eventos={ATUALIZAARVORECAMADAS:[],ATIVATEMA:[],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.toLowerCase()==="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:false,uploadlocal:false,uploadarquivo: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:false,comentarios:true,bookmark:true,importarwmc:true,googleearth:true,carregaKml:true},FATORESTRELA:"10",INCLUISISTEMAS:true,INCLUIWMS:true,INCLUIESTRELAS:true,FILTRADOWNLOAD:false,FILTRAOGC:false,TIPOBOTAO:"checkbox",ATIVATEMA:"",ATIVATEMAIMEDIATO:false,IDSMENUS:[],RETORNAGUIA:"",IDHTML:"arvoreAdicionaTema",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<nraiz;i+=1){html="<span title='"+raiz[i].description+"'> "+raiz[i].title;if(raiz[i].nacessos>0){html+=" ("+((raiz[i].nacessosok*100)/(raiz[i].nacessos*1))+"%)</span>"}else{html+=" (% de acessos não definido)</span>"}html+="<hr>";tempNode=new YAHOO.widget.HTMLNode({html:html,id_ws:raiz[i].id_ws,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<n;i+=1){temp=retorno.data[i];cabeca=temp.nome+" - "+temp.titulo;if(cabeca!=="undefined - undefined"){tempNode=new YAHOO.widget.HTMLNode({html:"<span style='color:"+cor+"' >"+cabeca,url:node.data.url,nivel:(node.data.nivel*1+1),id_ws:"",layer:temp.nome,enableHighlight:false,expanded:false},node);if(!temp.estilos){tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS,1)}if(temp.estilos){ns=temp.estilos.length;for(j=0;j<ns;j+=1){tempNodeS=new YAHOO.widget.HTMLNode({html:i3GEO.arvoreDeTemas.montaTextoTemaWMS(node.data.url,temp.nome,temp.estilos[j].nome,temp.estilos[j].titulo,temp.srs.toString(),temp.formatsinfo.toString(),temp.version.toString(),temp.formats.toString(),cor),enableHighlight:false,expanded:false},tempNode);tempNode.isleaf=true}}cor=(cor==="rgb(51, 102, 102)")?"rgb(47, 70, 50)":"rgb(51, 102, 102)"}}node.loadComplete()};i3GEO.php.listaLayersWMS(monta,node.data.url,(node.data.nivel*1+1),node.data.id_ws,node.data.layer)},montaTextoTemaWMS:function(servico,layer,estilo,titulo,proj,formatoinfo,versao,formatoimg,cor){var html,temp,adiciona;html="<td style='vertical-align:top;padding-top:5px;'><span ><input style='cursor:pointer;border:solid 0 white;' ";temp=function(){i3GEO.janela.fechaAguarde("ajaxredesenha");i3GEO.atualiza()};adiciona="i3GEO.janela.abreAguarde(\"ajaxredesenha\",\""+$trad("o1")+"\");i3GEO.arvoreDeTemas.checked=false;i3GEO.php.adicionaTemaWMS("+temp+","+"\""+servico+"\","+"\""+layer+"\","+"\""+estilo+"\","+"\""+proj+"\","+"\""+formatoimg+"\","+"\""+versao+"\","+"\""+titulo+"\","+"\"\","+"\"nao\","+"\""+formatoinfo+"\")";html+="onclick='javascript:"+adiciona+"' "+" type='radio' /></td><td style='padding-top:4px;vertical-align:top;text-align:left;padding-left:3px;color:"+cor+";' >"+layer+" - "+titulo+"</td></span>";return(html)},listaMenus:function(g_sid,g_locaplic,funcao){var retorno=function(retorno){var c,m,i,k,jj,j;if(i3GEO.arvoreDeTemas.IDSMENUS.length===0){i3GEO.arvoreDeTemas.MENUS=retorno.data}else{i3GEO.arvoreDeTemas.MENUS=[];c=retorno.data.length;m=i3GEO.arvoreDeTemas.IDSMENUS.length;for(i=0,j=c;i<j;i+=1){for(k=0,jj=m;k<jj;k+=1){if(retorno.data[i].idmenu===i3GEO.arvoreDeTemas.IDSMENUS[k]){i3GEO.arvoreDeTemas.MENUS.push(retorno.data[i])}}}}if(funcao!==""){eval(funcao+"(retorno)")}};i3GEO.php.pegalistademenus(retorno)},listaGrupos:function(g_sid,g_locaplic,id_menu,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.GRUPOS=retorno.data;if(funcao!==""){funcao.call()}};if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD||i3GEO.arvoreDeTemas.FILTRAOGC){i3GEO.php.pegalistadegrupos(retorno,id_menu,"sim")}else{i3GEO.php.pegalistadegrupos(retorno,id_menu,"nao")}},listaSubGrupos:function(g_sid,g_locaplic,id_menu,id_grupo,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.SUBGRUPOS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegalistadeSubgrupos(retorno,id_menu,id_grupo)},listaTemas:function(g_sid,g_locaplic,id_menu,id_grupo,id_subgrupo,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.TEMAS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegalistadetemas(retorno,id_menu,id_grupo,id_subgrupo)},listaSistemas:function(g_sid,g_locaplic,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.SISTEMAS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegaSistemas(retorno)},listaDrives:function(g_sid,g_locaplic,funcao){var retorno=function(retorno){try{i3GEO.arvoreDeTemas.DRIVES=retorno.data[0];if(i3GEO.arvoreDeTemas.DRIVES==""){return}if(funcao!==""){funcao.call()}}catch(e){i3GEO.arvoreDeTemas.DRIVES=""}};i3GEO.php.listadrives(retorno)},listaEstrelas:function(node){var busca,root,montanos;montanos=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<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;try{if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}}catch(e){}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'>&nbsp;fonte</a>"}if(ngSgrupo[sg].subgrupo){d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>"}else{d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].grupo)+")"+lk+"</td>"}tempNode=new YAHOO.widget.HTMLNode({html:d,expanded:false,isLeaf:true,enableHighlight: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:"<span style='color:red'>Nada encontrado<br><br></span>",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(i3GEO.arvoreDeTemas.ARVORE){return}if(!idhtml){idhtml=""}if(idhtml!==""){i3GEO.arvoreDeTemas.IDHTML=idhtml}if(!funcaoTema){funcaoTema=""}if(funcaoTema!==""){i3GEO.arvoreDeTemas.ATIVATEMA=funcaoTema}if(!objOpcoes){objOpcoes=""}if(objOpcoes!==""){i3GEO.arvoreDeTemas.OPCOESADICIONAIS=objOpcoes}if(!tipoBotao){tipoBotao=""}if(tipoBotao!==""){i3GEO.arvoreDeTemas.TIPOBOTAO=tipoBotao}i3GEO.arvoreDeTemas.LOCAPLIC=g_locaplic;i3GEO.arvoreDeTemas.SID=g_sid;if(i3GEO.arvoreDeTemas.IDHTML===""){return}i3GEO.arvoreDeTemas.listaMenus(g_sid,g_locaplic,"i3GEO.arvoreDeTemas.montaArvore")},atualiza:function(){i3GEO.arvoreDeTemas.ARVORE=null;i3GEO.arvoreDeTemas.cria(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,i3GEO.arvoreDeTemas.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(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluibusca===true){insp="<br><br><table><tr>"+"<td><span style='font-size:12px'>&nbsp;"+$trad("a1")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=31' >&nbsp;&nbsp;&nbsp;</a></span></td>"+"<td><input onclick='javascript:i3GEO.arvoreDeTemas.select();' class='digitar' type='text' id='i3geo_buscatema' size='15' value='' /></td>"+"<td><img class='tic' ";if(navm){insp+="style='top:0px;'"}else{insp+="style='top:4px;'"}insp+=" src='"+i3GEO.util.$im("branco.gif")+"' onclick='i3GEO.arvoreDeTemas.buscaTema2(document.getElementById(\"i3geo_buscatema\").value)' /></td>";insp+="</tr></table>&nbsp;";tempNode=new YAHOO.widget.HTMLNode({html:insp,enableHighlight:false,expanded:false,hasIcon:false},root)}outrasOpcoes=i3GEO.arvoreDeTemas.outrasOpcoesHTML();if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde!==""){document.getElementById(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde).innerHTML=outrasOpcoes}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore===true){tempNode=new YAHOO.widget.HTMLNode({html:outrasOpcoes+"&nbsp;<br>",isLeaf:true,enableHighlight:false,expanded:false,hasIcon:false},root);if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir===true){retorno=function(){var drives,iglt,ig,drive;tempNode=new YAHOO.widget.HTMLNode({html:"&nbsp;"+$trad("a6")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=32' >&nbsp;&nbsp;&nbsp;</a>",enableHighlight: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(ig<iglt)};i3GEO.arvoreDeTemas.listaDrives(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,retorno)}}if(i3GEO.parametros.editor==="sim"){tempNode=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin' target=blank >Sistema de administração</a>",idmenu:"",enableHighlight:false,expanded:false},root);tempNode=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/arvore.html' target=blank >Editar árvore</a>",idmenu:"",enableHighlight:false,expanded:false},root);tempNode=new YAHOO.widget.HTMLNode({html:"<span style='color:red;cursor:pointer' title='opção visível apenas para editores' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/menus.html\")' target=blank >Editar menus</span>",idmenu:"",enableHighlight:false,expanded:false},root)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.googleearth===true){tempNode=new YAHOO.widget.HTMLNode({html:"<a href='"+i3GEO.configura.locaplic+"/kml.php' target=blank > <img src='"+i3GEO.configura.locaplic+"/imagens/visual/default/branco.gif' class='abregoogleearth'> "+$trad("a13")+"</a>",idmenu:"",enableHighlight:false,expanded:false},root)}if(i3GEO.arvoreDeTemas.INCLUIWMS===true){if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar lista' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/webservices.html?tipo=WMS\")' style='width:11px;position:relative;left:3px' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}tempNode=new YAHOO.widget.HTMLNode({html:"<b>&nbsp;OGC-WMS</b>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=33' >&nbsp;&nbsp;&nbsp;</a>"+editor,idwms:"raiz",expanded:false,enableHighlight:false},root);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaWMS,1)}if(i3GEO.arvoreDeTemas.INCLUIESTRELAS===true){tempNode=new YAHOO.widget.HTMLNode({expanded:false,html:"<b>&nbsp;"+$trad("t46")+"</b> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=95' >&nbsp;&nbsp;&nbsp;</a>",enableHighlight:false},root);ig=5;do{tempNode1=new YAHOO.widget.HTMLNode({expanded:false,html:"<img src='"+$im("e"+ig+".png")+"' />",enableHighlight:false,nivel:ig},tempNode);tempNode1.setDynamicLoad(i3GEO.arvoreDeTemas.listaEstrelas,1);ig-=1}while(ig>0)}dados=i3GEO.arvoreDeTemas.MENUS;c=dados.length;for(i=0,j=c;i<j;i+=1){if(!dados[i].nomemenu){dados[i].nomemenu=dados[i].idmenu}if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar grupos' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+dados[i].idmenu+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}if(!dados[i].publicado){dados[i].publicado="sim"}if(dados[i].publicado.toLowerCase()!=="nao"){conteudo="<b>&nbsp;<span title='"+(dados[i].desc)+"'>"+dados[i].nomemenu+"</span>"+editor}else{conteudo="<b>&nbsp;<span title='nao publicado' ><s>"+dados[i].nomemenu+"</s></span>"+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(i3GEO.arvoreDeTemas.INCLUISISTEMAS){retorno=function(){var sis,iglt,tempNode,ig,nomeSis,sisNode,funcoes,tempf,ig2,abre,nomeFunc,funcNode;try{sis=i3GEO.arvoreDeTemas.SISTEMAS;iglt=sis.length;tempNode=new YAHOO.widget.HTMLNode({html:"<b>Sistemas</b>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=34' >&nbsp;&nbsp;&nbsp;</a>",expanded:false,enableHighlight:false},root)}catch(e){i3GEO.arvoreDeTemas.ARVORE.draw();return}ig=0;do{nomeSis=sis[ig].NOME;if(sis[ig].PUBLICADO){if(sis[ig].PUBLICADO.toLowerCase()==="nao"){nomeSis="<s>"+sis[ig].NOME+"</s>"}}sisNode=new YAHOO.widget.HTMLNode({html:nomeSis,expanded:false,enableHighlight:false},tempNode);funcoes=sis[ig].FUNCOES;tempf=funcoes.length;for(ig2=0;ig2<tempf;ig2+=1){abre="i3GEO.janela.cria('"+(funcoes[ig2].W)+"px','"+(funcoes[ig2].H)+"px','"+(funcoes[ig2].ABRIR)+"','','','Sistemas')";nomeFunc="<a href='#' onclick=\""+abre+"\">"+funcoes[ig2].NOME+"</a>";funcNode=new YAHOO.widget.HTMLNode({html:nomeFunc,expanded:false,enableHighlight:false,isLeaf:true},sisNode)}ig+=1}while(ig<iglt);i3GEO.arvoreDeTemas.ARVORE.draw()};i3GEO.arvoreDeTemas.listaSistemas(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,retorno)}document.getElementById(i3GEO.arvoreDeTemas.IDHTML).style.textAlign="left";if(!i3GEO.arvoreDeTemas.INCLUISISTEMAS){i3GEO.arvoreDeTemas.ARVORE.draw()}},montaGrupos:function(node){var temp=function(){var grupos,c,raiz,nraiz,mostra,html,i,d,editor;grupos=i3GEO.arvoreDeTemas.GRUPOS.grupos;c=grupos.length-3;raiz=grupos[c].temasraiz;nraiz=raiz.length;for(i=0;i<nraiz;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&raiz[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&raiz[i].ogc==="nao"){mostra=false}if(mostra){tempNode=new YAHOO.widget.HTMLNode({isLeaf:false,enableHighlight:false,expanded:false,html:i3GEO.arvoreDeTemas.montaTextoTema("gray",raiz[i])},node)}}for(i=0;i<c;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&grupos[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&grupos[i].ogc==="nao"){mostra=false}if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar subgrupos' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+node.data.idmenu+"&id_grupo="+grupos[i].id_n1+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}if(mostra){if(grupos[i].publicado){if(grupos[i].publicado==="NAO"){grupos[i].nome="<span title='nao publicado' ><s>"+grupos[i].nome+"</s></span>"}}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(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,temp)},montaSubGrupos:function(node){var temp=function(){var i,c,mostra,d,html,tempNode,nraiz,subgrupos,raiz;subgrupos=i3GEO.arvoreDeTemas.SUBGRUPOS.subgrupo;c=subgrupos.length;raiz=i3GEO.arvoreDeTemas.SUBGRUPOS.temasgrupo;nraiz=raiz.length;for(i=0;i<nraiz;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&raiz[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&raiz[i].ogc==="nao"){mostra=false}if(mostra){tempNode=new YAHOO.widget.HTMLNode({nacessos:raiz[i].nacessos,html:i3GEO.arvoreDeTemas.montaTextoTema("gray",raiz[i]),idtema:raiz[i].tid,fonte:raiz[i].link,ogc:raiz[i].ogc,kmz:raiz[i].kmz,permitecomentario:raiz[i].permitecomentario,download:raiz[i].download,expanded:false,enableHighlight:false,isLeaf:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.propTemas,1)}}for(i=0;i<c;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&subgrupos[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&subgrupos[i].ogc==="nao"){mostra=false}if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar temas' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+node.data.idmenu+"&id_grupo="+node.data.idgrupo+"&id_subgrupo="+subgrupos[i].id_n2+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}if(mostra){if(subgrupos[i].publicado){if(subgrupos[i].publicado==="NAO"){subgrupos[i].nome="<span title='nao publicado' ><s>"+subgrupos[i].nome+"</s></span>"}}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(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,node.data.idgrupo,temp)},montaTemas:function(node){var temp=function(){var i,cor,temas,c,mostra,tempNode;temas=i3GEO.arvoreDeTemas.TEMAS.temas;c=temas.length;cor="rgb(51, 102, 102)";for(i=0;i<c;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&temas[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&temas[i].ogc==="nao"){mostra=false}if(mostra){if(temas[i].publicado){if(temas[i].publicado==="NAO"){temas[i].nome="<span title='nao publicado' ><s>"+temas[i].nome+"</s></span>"}}tempNode=new YAHOO.widget.HTMLNode({nacessos:temas[i].nacessos,html:i3GEO.arvoreDeTemas.montaTextoTema(cor,temas[i]),idtema:temas[i].tid,fonte:temas[i].link,ogc:temas[i].ogc,kmz:temas[i].kmz,download:temas[i].download,permitecomentario:temas[i].permitecomentario,bookmark:"sim",expanded:false,isLeaf:false,enableHighlight:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.propTemas,1);cor=(cor==="rgb(51, 102, 102)")?"rgb(47, 70, 50)":"rgb(51, 102, 102)"}}node.loadComplete()};i3GEO.arvoreDeTemas.listaTemas(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,node.data.idgrupo,node.data.idsubgrupo,temp)},montaDir:function(node){var montaLista=function(retorno){var ig,d,conteudo,dirs,tempNode,arquivos,nodeSHP;dirs=retorno.data.diretorios;for(ig=0;ig<dirs.length;ig+=1){tempNode=new YAHOO.widget.HTMLNode({html:dirs[ig],caminho:node.data.caminho+"/"+dirs[ig],expanded:false,enableHighlight:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaDir,1)}arquivos=retorno.data.arquivos;for(ig=0;ig<arquivos.length;ig+=1){conteudo=arquivos[ig];if(conteudo.search(".img")>1||conteudo.search(".tif")>1||conteudo.search(".TIF")>1||conteudo.search(".shp")>1||conteudo.search(".SHP")>1){conteudo="<a href='#' title='"+$trad("g2")+"' onclick='i3GEO.util.adicionaSHP(\""+node.data.caminho+"/"+conteudo+"\")' >"+conteudo+"</a>";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="<td style='"+estilo+"'><span>";if(i3GEO.arvoreDeTemas.TIPOBOTAO!=="download"){html+="<input title='"+tema.tid+"' style='width:12px;height:12px;cursor:pointer;border:solid 0 white;' "}else{html+="<img title='"+tema.tid+"' src='"+$im("down1.gif")+"'"}if(i3GEO.arvoreDeTemas.ATIVATEMA!==""){clique="onclick=\""+i3GEO.arvoreDeTemas.ATIVATEMA+"\""}else{if(i3GEO.arvoreDeTemas.ATIVATEMAIMEDIATO===false){clique="onclick='i3GEO.util.criaBotaoAplicar(\"i3GEO.arvoreDeTemas.adicionaTemas\",\""+$trad("p14")+"\",\"i3geoBotaoAplicar\",this)'"}else{clique="onclick='i3GEO.arvoreDeTemas.adicionaTemas([\""+tema.tid+"\"])'"}}html+=clique;if(i3GEO.arvoreDeTemas.TIPOBOTAO!=="download"){html+=" type='"+i3GEO.arvoreDeTemas.TIPOBOTAO+"' value='"+tema.tid+"' />"}else{html+=" /> "}html+="</td><td title='"+tema.tid+"' onmouseout='javascript:this.style.color=\""+cor+"\";' onmouseover='javascript:this.style.color=\"blue\";' style='cursor:pointer;font-size:11px;text-align:left;color:"+cor+";padding-left:0px;' "+clique+">";html+=tema.nome;html+="</td></span>";return(html)},propTemas:function(node){var d,tempNode,html,lkmini,lkmini1,lkgrcode,lkgrcode1,n,ogc;if(node.data.fonte&&node.data.fonte!==""&&node.data.fonte!==" "){tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' href='"+node.data.fonte+"' target='_blank' >Fonte</a>"},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.mini===true){lkmini=i3GEO.arvoreDeTemas.LOCAPLIC+"/testamapfile.php?map="+node.data.idtema+".map&tipo=mini";lkmini1=i3GEO.arvoreDeTemas.LOCAPLIC+"/testamapfile.php?map="+node.data.idtema+".map&tipo=grande";tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' onmouseover='i3GEO.ajuda.mostraJanela(\"<img src="+lkmini+" />\")' href='"+lkmini1+"' target='blank' >Miniatura</a>"},node)}if(node.data.ogc&&node.data.ogc!=="nao"){if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.kml===true){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.abreKml(\""+node.data.idtema+"\",\"kml\")' >Kml</a>";if(node.data.kmz.toLowerCase()==="sim"){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.abreKml(\""+node.data.idtema+"\",\"kmz\")' >Kml</a>"}tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}ogc=i3GEO.arvoreDeTemas.LOCAPLIC+"/ogc.php?tema="+node.data.idtema+"&service=wms&request=getcapabilities";tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='getcapabilities' href='"+ogc+"' target='blank' >WMS - OGC</a>"},node)}if(node.data.download&&node.data.download.toLowerCase()!=="nao"&&i3GEO.arvoreDeTemas.TIPOBOTAO!=="download"){html="<a href='"+i3GEO.configura.locaplic+"/datadownload.htm?"+node.data.idtema+"' target='_blank'>Download</a>";tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(node.data.permitecomentario&&node.data.permitecomentario!=="nao"&&i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios===true){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.comentario(\""+node.data.idtema+"\",\"comentario\")' >Comentário</a>";tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.qrcode===true){lkgrcode=i3GEO.arvoreDeTemas.LOCAPLIC+"/pacotes/qrcode/php/qr_html.php?d="+i3GEO.arvoreDeTemas.LOCAPLIC+"/mobile/index.php?temasa="+node.data.idtema;lkgrcode1=i3GEO.arvoreDeTemas.LOCAPLIC+"/pacotes/qrcode/php/qr_img.php?d="+i3GEO.arvoreDeTemas.LOCAPLIC+"/mobile/index.php?temasa="+node.data.idtema;tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' onmouseover='i3GEO.ajuda.mostraJanela(\"<img src="+lkgrcode1+" />\")' href='"+lkgrcode+"' target='blank' >Qrcode</a>"},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.estrelas===true){n=parseInt(node.data.nacessos/(i3GEO.arvoreDeTemas.FATORESTRELA*1),10);if(n>=5){n=5}html=(n>0)?"<img src='"+i3GEO.util.$im("e"+n+".png")+"'/>":"<img src='"+i3GEO.util.$im("e0.png")+"'/>";tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.bookmark===true){html=i3GEO.social.bookmark(i3GEO.configura.locaplic+"/ms_criamapa.php?layers="+node.data.idtema);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"),OPCOESADICIONAIS=i3GEO.arvoreDeTemas.OPCOESADICIONAIS;if(OPCOESADICIONAIS.refresh===true){ins+="<td><img class='refresh' onclick='i3GEO.arvoreDeTemas.atualiza()' src='"+imb+"' style='cursor:pointer;text-align:left' title='Refresh'/><td>";t+=20}if(OPCOESADICIONAIS.uploadgpx===true){ins+="<td><img class='uploadgpx' onclick='i3GEO.arvoreDeTemas.dialogo.uploadgpx()' src='"+imb+"' style='cursor:pointer;text-align:left' title='upload GPX'/><td>";t+=20}if(OPCOESADICIONAIS.uploaddbf===true){ins+="<td><img class='uploaddbf' onclick='i3GEO.arvoreDeTemas.dialogo.uploaddbf()' src='"+imb+"' style='cursor:pointer;text-align:left' title='"+$trad("a2b")+"'/><td>";t+=20}if(OPCOESADICIONAIS.uploadlocal===true){ins+="<td><img class='upload' onclick='i3GEO.arvoreDeTemas.dialogo.upload()' src='"+imb+"' style='cursor:pointer;text-align:left' title='"+$trad("a2")+"'/><td>";t+=20}if(OPCOESADICIONAIS.uploadarquivo===true){ins+="<td><img class='upload' onclick='i3GEO.arvoreDeTemas.dialogo.uploadarquivo()' src='"+imb+"' style='cursor:pointer;text-align:left' title='"+$trad("a14")+"'/><td>";t+=20}if(OPCOESADICIONAIS.downloadbase===true){ins+="<td><img onclick='i3GEO.arvoreDeTemas.dialogo.downloadbase()' class='download' src='"+imb+"' style='cursor:pointer;text-align:left' title='"+$trad("a3")+"'/><td>";t+=20}if(OPCOESADICIONAIS.importarwmc===true){ins+="<td><img onclick='i3GEO.arvoreDeTemas.dialogo.importarwmc()' class='importarwmc' src='"+imb+"' style='cursor:pointer;text-align:left' title='"+$trad("a3a")+"'/><td>";t+=20}if(OPCOESADICIONAIS.conectarwms===true){ins+="<td><img class='conectarwms' onclick='i3GEO.arvoreDeTemas.dialogo.conectarwms()' src='"+imb+"' style='cursor:pointer;text-align:left' title='"+$trad("a4")+"'/><td>";t+=20}if(OPCOESADICIONAIS.conectarwmst===true){ins+="<td><img class='conectarwmst' onclick='i3GEO.arvoreDeTemas.dialogo.conectarwmst()' src='"+imb+"' style='cursor:pointer;text-align:left' title='"+$trad("a4b")+"'/><td>";t+=20}if(OPCOESADICIONAIS.conectargeorss===true){ins+="<td><img class='conectargeorss' onclick='i3GEO.arvoreDeTemas.dialogo.conectargeorss()' src='"+imb+"' style='cursor:pointer;text-align:left' title='"+$trad("a5")+"'/><td>";t+=20}if(OPCOESADICIONAIS.nuvemTags===true){ins+="<td><img class='nuvemtags' onclick='i3GEO.arvoreDeTemas.dialogo.nuvemTags()' src='"+imb+"' style='cursor:pointer;text-align:left' title='"+$trad("a5a")+"'/><td>";t+=20}if(OPCOESADICIONAIS.nuvemTagsFlash===true){ins+="<td><img class='nuvemtags' onclick='i3GEO.arvoreDeTemas.dialogo.nuvemTagsFlash()' src='"+imb+"' style='cursor:pointer;text-align:left' title='"+$trad("a5a")+"'/><td>";t+=20}if(OPCOESADICIONAIS.carousel===true){ins+="<td><img class='carouselTemas' onclick='i3GEO.arvoreDeTemas.dialogo.carouselTemas()' src='"+imb+"' style='cursor:pointer;text-align:left' title='Miniaturas'/><td>";t+=20}if(OPCOESADICIONAIS.carregaKml===true){ins+="<td><img class='carregarKml' onclick='i3GEO.arvoreDeTemas.dialogo.carregaKml()' src='"+imb+"' style='cursor:pointer;text-align:left' title='Kml'/><td>";t+=20}return("<table width='"+t+"px' ><tr>"+ins+"</tr></table>")},desativaCheckbox:function(){var o,inputs,n,i;o=document.getElementById(i3GEO.arvoreDeTemas.ARVORE.id);inputs=o.getElementsByTagName("input");n=inputs.length;i=0;do{inputs[i].checked=false;i+=1}while(i<n)},listaTemasAtivos:function(){var o,inputs,n,i,lista;o=document.getElementById(i3GEO.arvoreDeTemas.ARVORE.id);inputs=o.getElementsByTagName("input");n=inputs.length;i=0;lista=[];do{if(inputs[i].checked===true){lista.push(inputs[i].value)}i+=1}while(i<n);return(lista)},buscaTema:function(palavra){if(palavra===""){return}var busca,root,nodePalavra;resultadoProcurar=function(retorno){var mostra,tempNode,d,conta,ig,ngSgrupo,tempn,sg,ngTema,tempng,st,lk;if(!retorno.data){alert("Ocorreu um erro")}else{retorno=retorno.data;conta=0;if((retorno!=="erro")&&(typeof(retorno)!=='undefined')){ig=retorno.length-1;if(ig>=0){do{ngSgrupo=retorno[ig].subgrupos;tempn=ngSgrupo.length;for(sg=0;sg<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'>&nbsp;fonte</a>"}d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>";tempNode=new YAHOO.widget.HTMLNode(d,nodePalavra,false,true);tempNode.isLeaf=true;tempNode.enableHighlight=false}conta+=1}}}while(ig--)}else{d="<span style='color:red'>Nada encontrado<br><br></span>";tempNode=new YAHOO.widget.HTMLNode(d,nodePalavra,false,true);tempNode.isLeaf=true;tempNode.enableHighlight=false}}}nodePalavra.loadComplete()};busca=function(){i3GEO.php.procurartemas2(resultadoProcurar,i3GEO.util.removeAcentos(palavra))};i3GEO.arvoreDeTemas.ARVORE.collapseAll();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(!i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")){tempNode=new YAHOO.widget.HTMLNode({html:"Temas encontrados",id:"temasEncontrados"},root,false,true);tempNode.enableHighlight=false}else{tempNode=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")}nodePalavra=new YAHOO.widget.HTMLNode({html:palavra},tempNode,false,true);nodePalavra.enableHighlight=false;i3GEO.arvoreDeTemas.ARVORE.draw();tempNode.expand();nodePalavra.setDynamicLoad(busca,1);nodePalavra.expand()},buscaTema2:function(palavra){if(palavra===""){return}var busca,root,nodePalavra;resultadoProcurar=function(retorno){var mostra,tempNode,d,ig,montaTexto=function(ngSgrupo){var tempn,ngTema,tempng,mostra,d,lk,tempNode,st,sg;tempn=ngSgrupo.length;for(sg=0;sg<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;try{if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}}catch(e){}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'>&nbsp;fonte</a>"}if(ngSgrupo[sg].subgrupo){d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>"}else{d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].grupo)+")"+lk+"</td>"}tempNode=new YAHOO.widget.HTMLNode({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:"<span style='color:red'>Nada encontrado<br><br></span>"},nodePalavra)}}}nodePalavra.loadComplete()};busca=function(){i3GEO.php.procurartemas2(resultadoProcurar,i3GEO.util.removeAcentos(palavra))};i3GEO.arvoreDeTemas.ARVORE.collapseAll();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(!i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")){tempNode=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:"Temas encontrados",id:"temasEncontrados"},root)}else{tempNode=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")}nodePalavra=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:palavra},tempNode);i3GEO.arvoreDeTemas.ARVORE.draw();tempNode.expand();nodePalavra.setDynamicLoad(busca,1);nodePalavra.expand()},adicionaTemas:function(tsl){var temp;try{clearTimeout(tempoBotaoAplicar)}catch(e){}tempoBotaoAplicar="";i3GEO.mapa.ativaTema("");if(arguments.length!==1){tsl=i3GEO.arvoreDeTemas.listaTemasAtivos()}if(tsl.length===1&&i3GEO.arvoreDeCamadas.pegaTema(tsl[0])!==""){temp=window.confirm("O tema já existe no mapa. Adiciona novamente?");if(!temp){return}}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="<select id='"+idCombo+"' SIZE="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(this.value)' ><option value='' >Escolha um menu:</option>";for(ig=0;ig<ob.length;ig+=1){if(ob[ig].publicado!=="nao"&&ob[ig].publicado!=="NAO"){if(ob[ig].nomemenu){ins+="<option value="+ob[ig].idmenu+" >"+ob[ig].nomemenu+"</option>"}}}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistademenus(combo)},comboGruposMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura,id_menu){i3GEO.configura.locaplic=locaplic;i3GEO.arvoreDeTemas.temasRaizGrupos=[];var combo=function(retorno){var ins,ig,obGrupos=retorno.data;ins="<select id='"+idCombo+"' SIZE="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(this.value)' ><option value='' >Escolha um grupo:</option>";for(ig=0;ig<obGrupos.grupos.length;ig+=1){if(obGrupos.grupos[ig].nome){ins+="<option value="+obGrupos.grupos[ig].id_n1+" >"+obGrupos.grupos[ig].nome+"</option>"}i3GEO.arvoreDeTemas.temasRaizGrupos[obGrupos.grupos[ig].id_n1]=obGrupos.grupos[ig].temasgrupo}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistadegrupos(combo,id_menu,"nao")},comboSubGruposMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,idGrupo,largura,altura){if(idGrupo!==""){var combo=function(retorno){var ins,sg,ig;ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(\""+idGrupo+"\",this.value)' ><option value='' >Escolha um sub-grupo:</option>";if(retorno.data.subgrupo){sg=retorno.data.subgrupo;for(ig=0;ig<sg.length;ig+=1){ins+="<option value="+sg[ig].id_n2+" >"+sg[ig].nome+"</option>"}}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistadeSubgrupos(combo,"",idGrupo)}},comboTemasMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,idGrupo,idSubGrupo,largura,altura,id_menu,temas){var combo=function(retorno){var ins,sg,ig,temas;if(idSubGrupo!=""){ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"("+idGrupo+","+idSubGrupo+",this.value)' ><option value='' >Escolha um tema:</option>"}else{ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"("+idGrupo+",\"\",this.value)' ><option value='' >Escolha um tema:</option>"}if(typeof(retorno.data)!=='undefined'){retorno=retorno.data.temas}sg=retorno.length;for(ig=0;ig<sg;ig+=1){ins+="<option value="+retorno[ig].tid+" >"+retorno[ig].nome+"</option>"}$i(idDestino).innerHTML=ins+"</select>"};if(typeof(temas)==='undefined'||temas===""){i3GEO.php.pegalistadetemas(combo,id_menu,idGrupo,idSubGrupo)}else{combo(temas)}},dialogo:{uploadarquivo:function(){var janela,ins,temp,titulo,cabecalho,minimiza;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOFuploadarquivo")};titulo="Upload de arquivo</a>";janela=i3GEO.janela.cria("250px","150px","","","",titulo,"i3GEOFuploadarquivo",false,"hd",cabecalho,minimiza);$i("i3GEOFuploadarquivo_corpo").style.backgroundColor="white";ins=""+" <p class=paragrafo style='width:90%' ><b>Tipo de arquivo</b><br><br>"+" <table class=lista6 style=left:20px;position:relative >"+" <tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.upload()' /></td>"+" <td>Shape file</td>"+" </tr>"+" <tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.uploaddbf()' /></td>"+" <td>DBF ou CSV</td>"+" </tr>"+" <tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.uploadgpx()' /></td>"+" <td>GPX</td>"+" </tr>"+" <tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.uploadkml()' /></td>"+" <td>KML ou KMZ</td>"+" </tr>"+" </table>";$i(janela[2].id).innerHTML=ins},carregaKml:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/carregakml/index.js.php","i3GEOF.carregakml.criaJanelaFlutuante()","i3GEOF.carregakml_script")},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&oacute;rios")},importarwmc:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/importarwmc/index.js.php","i3GEOF.importarwmc.criaJanelaFlutuante()","i3GEOF.importarwmc_script")},conectarwms:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwms/index.htm","","","Conexão WMS <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=28' >&nbsp;&nbsp;&nbsp;</a>")},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 <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=76' >&nbsp;&nbsp;&nbsp;</a>")},conectarwfs:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwfs/index.htm","","","WFS")},conectargeorss:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectargeorss/index.htm","","","Conexão GeoRSS <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=29' >&nbsp;&nbsp;&nbsp;</a>")},upload:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/upload/index.js.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")},uploadkml:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/uploadkml/index.js.php","i3GEOF.uploadkml.criaJanelaFlutuante()","i3GEOF.uploadkml_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={TIPO:"yui",OFFSET:-205,MAXBOTOES:10,AJUDA:true,ORIENTACAO:"vertical",HORIZONTALW:350,TIPOAJUDA:"balao",SOICONES:false,AUTOALTURA:false,TRANSICAOSUAVE:true,OPACIDADE:65,PERMITEFECHAR:true,PERMITEDESLOCAR:true,ATIVAMENUCONTEXTO:false,AUTO:false,LISTABOTOES:i3GEO.configura.funcoesBotoes.botoes,INCLUIBOTAO:{zoomli:true,pan:true,zoomtot:true,identifica:true,identificaBalao:true,mede:true,area:true,imprimir:true,selecao:true,google:true,referencia:true,exten:true,inserexy:true,textofid:true,reinicia:true,buscafotos:true,wiki:true,metar:true,lentei:true,confluence:true,inseregrafico:true,v3d:true},ICONEBOTAO:{zoomli:"/imagens/gisicons/eudock/zoom-region.png",pan:"/imagens/gisicons/eudock/pan.png",zoomtot:"/imagens/gisicons/eudock/zoom-extent.png",identifica:"/imagens/gisicons/eudock/identify.png",identificaBalao:"/imagens/gisicons/eudock/tips.png",mede:"/imagens/gisicons/eudock/length-measure.png",area:"/imagens/gisicons/eudock/area-measure.png",imprimir:"/imagens/gisicons/eudock/print.png",reinicia:"/imagens/gisicons/eudock/redraw.png",exten:"/imagens/gisicons/eudock/map-extent-info.png",referencia:"/imagens/gisicons/eudock/map-reference.png",inserexy:"/imagens/gisicons/eudock/point-create.png",textofid:"/imagens/gisicons/eudock/text-add.png",selecao:"/imagens/gisicons/eudock/select.png",google:"/imagens/gisicons/eudock/google-map.png",buscafotos:"/imagens/gisicons/eudock/fotos.png",wiki:"/imagens/gisicons/eudock/wiki.png",metar:"/imagens/gisicons/eudock/metar.png",lentei:"/imagens/gisicons/eudock/lente.png",confluence:"/imagens/gisicons/eudock/confluence.png",inseregrafico:"/imagens/gisicons/eudock/grafico.png",v3d:"/imagens/gisicons/eudock/v3d.png"},TEMPLATEBOTAO:"",BOTAOPADRAO:"pan",COMPORTAMENTO:"padrao",BARRAS:[],BOTAOCLICADO:"",ativaPadrao:function(){try{$i(i3GEO.barraDeBotoes.BOTAOPADRAO).onclick.apply()}catch(e){}},ativaIcone:function(icone){if(i3GEO.Interface.ATUAL==="openlayers"){try{i3GEO.Interface.openlayers.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"}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(e){i3GEO.barraDeBotoes.mostraJanela(this,"'+l[b].dica+'",e);}');eval('$i("'+l[b].iddiv+'").onmouseout = function(e){i3GEO.barraDeBotoes.mostraJanela(this,"",e);};')}if(l[b].funcaoonclick){temp.onclick=l[b].funcaoonclick;if(l[b].iddiv==padrao){l[b].funcaoonclick()}}if(l[b].constroiconteudo){eval(l[b].constroiconteudo)}}YAHOO.util.Event.addListener($i(l[b].iddiv),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addListener($i(l[b].iddiv),"click",YAHOO.util.Event.stopPropagation);YAHOO.util.Event.addFocusListener($i(l[b].iddiv),YAHOO.util.Event.preventDefault)}while(b--)}if(padrao===""){this.ativaIcone("")}},execBotao:function(id,x,y,posX,posY){var temp,n=38,botao=i3GEO.barraDeBotoes.defBotao(id);i3GEO.barraDeBotoes.BOTAOCLICADO=id;if(botao===false){return}try{if(botao.tipo==="dinamico"&&x){i3GEO.util.criaPin("i3geoMarcaIcone",i3GEO.configura.locaplic+"/imagens/gisicons/eudock/sobe1.png","10px","10px");temp=$i("i3geoMarcaIcone");if(temp){temp.style.display="block";temp.style.top=posY+43;temp.style.left=posX+18}}if(botao.funcaoonclick){botao.funcaoonclick.call()}}catch(e){}},defBotao:function(iddiv){var l,b,d,temp;l=i3GEO.barraDeBotoes.LISTABOTOES;b=l.length-1;if(b>=0){do{temp=l[b].iddiv;if(l[b].iddiv===iddiv){return l[b]}}while(b--)}return false},inicializaBarraOP:function(){i3GEO.barraDeBotoes.AJUDA=false;euEnv.imageBasePath=i3GEO.configura.locaplic+"/pacotes/eudock/";var botao,i,dock=new euDock(),temp="",chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length;dock.setObjectAlign(i3GEO.Interface.IDCORPO,euDOWN,(parseInt(document.body.style.height,10))*-1+i3GEO.barraDeBotoes.OFFSET,euUP);dock.setBar({left:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-l.png"}},horizontal:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-c-o.gif"}},right:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-r.png"}}});dock.setIconsOffset(7);if(i3GEO.barraDeBotoes.MAXBOTOES>0){n=i3GEO.barraDeBotoes.MAXBOTOES}for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]&&i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){botao=i3GEO.barraDeBotoes.defBotao(chaves[i]);if(botao===false){temp=""}else{if(botao.dica){temp=botao.dica}else{temp=""}}dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]}}),{mouseInsideClick:function(x,y,id,posX,posY){i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao,x,y,posX,posY)},idBotao:chaves[i],dica:temp})}}$i(euEnv.euDockArray.euDock_0.bar.elementsArray.left.id).onclick=function(){i3GEO.ajuda.abreJanela()};$i(euEnv.euDockArray.euDock_0.bar.elementsArray.right.id).onclick=function(){var temp="",chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length,nb=euEnv.euDockArray.euDock_0.iconsArray.length,i;if($i("i3geoMarcaIcone")){$i("i3geoMarcaIcone").style.display="none"}if(i3GEO.barraDeBotoes.MAXBOTOES>0&&n>nb){for(i=nb;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]&&i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){botao=i3GEO.barraDeBotoes.defBotao(chaves[i]);if(botao===false){temp=""}else{if(botao.dica){temp=botao.dica}else{temp=""}}dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]}}),{mouseInsideClick:function(x,y,id,posX){i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao,x,y,posX)},idBotao:chaves[i],dica:temp})}}}}},inicializaBarra:function(idconteudo,idconteudonovo,barraZoom,x,y,onde){if(i3GEO.configura.map3d===""){i3GEO.barraDeBotoes.INCLUIBOTAO.v3d=false}if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){i3GEO.barraDeBotoes.inicializaBarraOP()}else{if(this.TEMPLATEBOTAO===""&&i3GEO.Interface.TABLET===false){this.TEMPLATEBOTAO="<div style='display:inline;background-color:rgb(250,250,250);'><img style='border:0px solid white;' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='$$'/></div>"}if(this.TEMPLATEBOTAO===""&&i3GEO.Interface.TABLET===true){this.TEMPLATEBOTAO="<div style='display:inline;background-color:rgb(250,250,250);'><img style='margin:4px;border:0px solid white;' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='$$'/></div>"}var ticone,tipo,mostra,i,temp,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(navm){i3GEO.barraDeBotoes.TRANSICAOSUAVE=false}if(this.AUTO===true){if(idconteudo==="barraDeBotoes1"){novoel=document.createElement("div");novoel.id="barraDeBotoes1";temp='<table style="width:100%"><tr><td style="background-color:rgb(250,250,250);"><div ID="historicozoom" ></div></td></tr><tr><td style=height:5px ></td></tr></table>'+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="zoom" alt="zoom" src="'+branco+'" id="zoomli"/>'+"</div>"+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="desloca" alt="desloca" src="'+branco+'" id="pan"/>'+"</div>"+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="geral" alt="geral" src="'+branco+'" id="zoomtot"/>'+"</div>";novoel.innerHTML=temp;document.body.appendChild(novoel)}if(idconteudo==="barraDeBotoes2"){temp="";chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO);n=chaves.length;for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){temp+=i3GEO.barraDeBotoes.TEMPLATEBOTAO.replace("$$",chaves[i])}}if(typeof(onde)==='undefined'){novoel=document.createElement("div");novoel.id="barraDeBotoes2";estilo="font-size:2px;";if(this.SOICONES===true){estilo="font-size:0px;"}novoel.innerHTML="<table style='width:100%'>"+"<tr><td style='background-color:rgb(250,250,250);'><img title='' alt='sobe' src='"+branco+"' id='sobeferramentas'/></td></tr>"+"</table>"+temp+"<table style='width:100%;'><tr><td style='background-color:rgb(250,250,250);'><img title='desce' alt='' src='"+branco+"' id='desceferramentas'/></td></tr></table>";document.body.appendChild(novoel)}else{$i(onde).innerHTML=temp;return}}}else{if(idconteudo==="barraDeBotoes2"&&onde!==undefined){$i(onde).innerHTML=$i(idconteudo)}}wj="36px";recuo="0px";novoel=document.createElement("div");novoel.id=idconteudonovo;novoel.style.display="block";if(this.SOICONES===false){novoel.style.border="1px solid gray";novoel.style.background="white"}else{novoel.style.border="0px solid white"}if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){Dom.setStyle(novoel,"opacity",this.OPACIDADE/100)}temp="";if(barraZoom===true){temp+=i3GEO.navega.barraDeZoom.cria()}temp+='<div id="'+idconteudonovo+'_" style="left:'+recuo+';top:0px;" ></div>';novoel.innerHTML=temp;novoel.onmouseover=function(){YAHOO.util.Dom.setStyle("i3geo_rosa","display","none");if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",1)}if(i3GEO.Interface.TABLET===true){}};novoel.onmouseout=function(){if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.barraDeBotoes.OPACIDADE/100)}if(i3GEO.Interface.TABLET===true){}};document.body.appendChild(novoel);if(this.ATIVAMENUCONTEXTO){i3GEO.util.mudaCursor(i3GEO.configura.cursores,"contexto",idconteudonovo,i3GEO.configura.locaplic)}ticone=28;alturadisponivel=i3GEO.parametros.h-i3GEO.Interface.BARRABOTOESTOP-ticone-38-38;if(this.AUTOALTURA===true){alturadisponivel+=28}numerobotoes=parseInt(alturadisponivel/ticone,10);if($i(idconteudo)){$i(idconteudonovo+"_").innerHTML=$i(idconteudo).innerHTML;$i(idconteudo).innerHTML="";elementos=$i(idconteudonovo+"_").getElementsByTagName("img");nelementos=elementos.length;if(i3GEO.barraDeBotoes.ORIENTACAO==="horizontal"){numerobotoes=100}if(this.AUTOALTURA===true||(numerobotoes<nelementos)){if(elementos[0].id==="sobeferramentas"){try{elementos=$i(idconteudonovo+"_").getElementsByTagName("div");nelementos=elementos.length;i=0;do{elementos[i].style.display="none";i=i+1}while(i<nelementos);i=0;do{if(elementos[i]!=undefined){elementos[i].style.display="inline"}i=i+1}while(i<numerobotoes-1)}catch(men){}}}if(elementos.length<=numerobotoes){Dom.setStyle(["sobeferramentas","desceferramentas"],"display","none")}}YAHOO.namespace("janelaBotoes.xp");if(i3GEO.barraDeBotoes.ORIENTACAO==="horizontal"){YAHOO.janelaBotoes.xp.panel=new YAHOO.widget.Panel(idconteudonovo,{zIndex:20000,height:40,width:i3GEO.barraDeBotoes.HORIZONTALW,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}else{if(this.AUTOALTURA===false||barraZoom===true||(elementos.length>numerobotoes)){YAHOO.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<nelementos);mostra.style.display="inline";i=nelementos+1;mostra=elementos[i];do{if(elementos[i]){if(elementos[i].style){if(elementos[i].style.display==="inline"){mostra=elementos[i];break}}}i=i-1}while(i>=0);mostra.style.display="none"}}}if($i("desceferramentas")){$i("desceferramentas").onclick=function(){tipo="inline";if($i(idconteudonovo+"_")){elementos=$i(idconteudonovo+"_").getElementsByTagName("div");if(elementos[elementos.length-1].style.display===tipo){return}nelementos=elementos.length;if(nelementos>0){i=0;do{e=elementos[i];if(e.style){if((e.style.display==="block")||(e.style.display==="inline")||(e.style.display==="")){if(e.id===""){e.style.display="none";break}}}i=i+1}while(i<nelementos);i=nelementos-1;var mostra=elementos[i];do{e=elementos[i];if(e.style){if(e.style.display===tipo){break}if(e.style.display==="none"){mostra=e}}i=i-1}while(i>=0);mostra.style.display=tipo}}}}this.BARRAS.push(YAHOO.janelaBotoes.xp.panel);YAHOO.janelaBotoes.xp.panel.show();if(i3GEO.Interface.TABLET===true){YAHOO.janelaBotoes.xp.panel.moveTo((i3GEO.parametros.w/2)-(i3GEO.barraDeBotoes.HORIZONTALW/2),"")}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:"&nbsp;<span class='container-close'></span>"},{text:"Fechar barra",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.fecha('"+idbarra+"')"}},{text:"Barra normal",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.AUTOALTURA=false;i3GEO.barraDeBotoes.PERMITEFECHAR=true;i3GEO.barraDeBotoes.PERMITEDESLOCAR=true;i3GEO.barraDeBotoes.recria('"+idbarra+"')"}},{text:"Barra fixa",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.AUTOALTURA=true;i3GEO.barraDeBotoes.PERMITEFECHAR=false;i3GEO.barraDeBotoes.PERMITEDESLOCAR=false;i3GEO.barraDeBotoes.recria('"+idbarra+"')"}},{text:"Remove transiçã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;i<n;i+=1){i3GEO.barraDeBotoes.BARRAS[i].show()}};try{if(arguments.length===1){i3GEO.barraDeBotoes.BARRAS[indice].show()}else{abre.call()}}catch(e){abre.call()}},recria:function(id){if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){euEnv.euDockArray=[];euEnv.Kost.num=0;if($i("euDock_0_bar")){document.body.removeChild($i("euDock_0_bar").parentNode)}i3GEO.barraDeBotoes.inicializaBarra();if($i("i3geoMarcaIcone")){$i("i3geoMarcaIcone").style.display="none"}return}var n,temp,novoel,barraZoom,x,y,BARRAS=i3GEO.barraDeBotoes.BARRAS,iu=i3GEO.util;i3GEO.barraDeBotoes.BARRAS=[];n=BARRAS.length;for(i=0;i<n;i+=1){if(BARRAS[i].id===id){iu.removeChild("contexto_"+id);if(!$i("barraTemporaria"+i)){novoel=document.createElement("div");novoel.id="barraTemporaria"+i;document.body.appendChild(novoel)}novoel=$i("barraTemporaria"+i);novoel.innerHTML=$i(BARRAS[i].id+"_").innerHTML;barraZoom=false;temp=$i("vertMaisZoom");if(temp){temp=navm?temp.parentNode:temp.parentNode.parentNode;if(temp.id===id){barraZoom=true}}x=parseInt($i(BARRAS[i].id+"_c").style.left,10);y=parseInt($i(BARRAS[i].id+"_c").style.top,10);if(i3GEO.barraDeBotoes.PERMITEFECHAR===true){y=y-10}BARRAS[i].destroy();i3GEO.barraDeBotoes.inicializaBarra(novoel.id,BARRAS[i].id,barraZoom,x,y)}}i3GEO.barraDeBotoes.ativaBotoes()},fecha:function(id){var n=this.BARRAS.length;for(i=0;i<n;i+=1){if(this.BARRAS[i].id===id){$i(id+"_c").style.visibility="hidden"}}},mostraJanela:function(objeto,mensagem,evt){if(mensagem===""){try{clearTimeout(timeMostraAjudaBotoes)}catch(e){}try{clearTimeout(timeAjudaBotoes)}catch(e){}return}var divmensagem=$i("divMensagemBarraDeBotoes"),balloonAjuda,pos=YAHOO.util.Dom.getXY(objeto);if(this.AJUDA===false||$i("janelaMenTexto")){i3GEO.ajuda.mostraJanela(mensagem);i3GEO.barraDeBotoes.escondeJanelaAjuda();return}if(i3GEO.Interface.ATUAL==="googleearth"){objeto.title=mensagem;return}if(!divmensagem&&this.TIPOAJUDA!=="balao"){divmensagem=document.createElement("div");divmensagem.id="divMensagemBarraDeBotoes";divmensagem.style.border="0px solid rgb(120 120 120)";divmensagem.style.position="absolute";divmensagem.style.zIndex=20000;if($i("i3geo")){$i("i3geo").appendChild(divmensagem)}else{document.body.appendChild(divmensagem)}if(this.TIPOAJUDA==="horizontal"){divmensagem.innerHTML="<table style='z-index:20000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='"+$im("left.png")+"' ></td><td style='text-align:left;border-left:1px solid rgb(210,210,210)'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'></div></td></tr></table>"}if(this.TIPOAJUDA==="vertical"){divmensagem.innerHTML="<table style='z-index:20000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='"+$im("top.png")+"' ></td><td style='text-align:left;border-left:1px solid rgb(210,210,210)'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'></div></td></tr></table>"}}if(mensagem!==""){if(this.TIPOAJUDA!=="balao"){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none");if(this.TIPOAJUDA==="horizontal"){divmensagem.style.left=parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)+pos[0]+10+"px";divmensagem.style.top=pos[1]-2+(parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)/2)+"px"}if(this.TIPOAJUDA==="vertical"){divmensagem.style.left=(parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)/2)+pos[0]-5+"px";divmensagem.style.top=pos[1]+5+parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)+"px"}try{clearTimeout(timeAjudaBotoes)}catch(e){}timeMostraAjudaBotoes=setTimeout("i3GEO.barraDeBotoes.mostraJanelaAjuda('"+mensagem+"');",5000)}else{hideAllTooltips();balloonAjuda=new Balloon();BalloonConfig(balloonAjuda,'GBubble');balloonAjuda.delayTime=0;balloonAjuda.stem=false;balloonAjuda.stemHeight=0;balloonAjuda.vOffset=-24;balloonAjuda.images=i3GEO.configura.locaplic+'/pacotes/balloon-tooltips/htdocs/images/GBubblec';mensagem="<table style='z-index:20000' ><tr><td style='text-align:left;'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'>"+mensagem+"</div></td></tr></table>";try{clearTimeout(timeAjudaBotoes)}catch(e){}timeMostraAjudaBotoes=setTimeout(function(){balloonAjuda.cleanup();balloonIsVisible=false;if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){balloonAjuda.showTooltip(objeto,mensagem,null,null,null,pos[0],pos[1]-40)}else{balloonAjuda.showTooltip(objeto,mensagem,null,null,null,pos[0]+12,pos[1])}try{clearTimeout(timeMostraAjudaBotoes)}catch(e){}timeAjudaBotoes=setTimeout(function(){balloonAjuda.cleanup()},4000)},4000)}}},mostraJanelaAjuda:function(mensagem){$i("divMensagemBarraDeBotoesCorpo").innerHTML=mensagem;YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","block");try{clearTimeout(timeMostraAjudaBotoes)}catch(e){}timeAjudaBotoes=setTimeout(function(){i3GEO.barraDeBotoes.escondeJanelaAjuda()},3000)},escondeJanelaAjuda:function(){try{clearTimeout(timeAjudaBotoes)}catch(e){}if($i("divMensagemBarraDeBotoes")){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none")}},editor:{inicia:function(){if(navm){alert("O editor não funciona corretamente nesse navegador.")}i3GEO.barraDeBotoes.editor.carregaJs()},carregaJs:function(idjanela){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/mashups/openlayers.js.php","i3GEO.barraDeBotoes.editor.ativaPainel('"+idjanela+"')","openlayers.js.php",true)},criaJanela:function(){if($i("i3GEOjanelaEditor")){return"i3GEOjanelaEditor"}var janela,divid,temp,titulo,cabecalho,minimiza;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOjanelaEditor")};titulo="Editor vetorial";janela=i3GEO.janela.cria("300px","200px","","","",titulo,"i3GEOjanelaEditor",false,"hd",cabecalho,minimiza);divid=janela[2].id;$i("i3GEOjanelaEditor_corpo").style.backgroundColor="white";$i("i3GEOjanelaEditor_corpo").style.textAlign="left";return divid},ativaPainel:function(idjanela){OpenLayers.ImgPath=i3GEO.configura.locaplic+"/pacotes/openlayers/img/";i3GEO.editorOL.fundo="";i3GEO.editorOL.mapa=i3geoOL;i3GEO.editorOL.maxext="";i3GEO.editorOL.controles=[];i3GEO.editorOL.botoes={'pan':false,'zoombox':false,'zoomtot':false,'legenda':false,'distancia':false,'area':false,'identifica':true,'linha':true,'ponto':true,'poligono':true,'texto':true,'edita':true,'selecao':true,'apaga':true,'procura':false,'propriedades':true,'salva':true,'ajuda':true,'fecha':true,'tools':true,'undo':true,'frente':true};var sketchSymbolizers={"Point":{fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}",strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",label:"${texto}",pointRadius:"${pointRadius}",graphicName:"${graphicName}",fontSize:"${fontSize}",fontColor:"rgb(${fontColor})",fontFamily:"Arial",fontWeight:"normal",labelAlign:"lb",labelXOffset:"3",labelYOffset:"3"},"Line":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})"},"Polygon":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}"}},style=new OpenLayers.Style(),styleMap1=new OpenLayers.StyleMap({"default":style});style.addRules([new OpenLayers.Rule({symbolizer:sketchSymbolizers})]);i3GEO.editorOL.layergrafico=new OpenLayers.Layer.Vector("Edição",{styleMap:styleMap1,displayInLayerSwitcher:false,visibility:true});i3GEO.editorOL.mapa.addLayers([i3GEO.editorOL.layergrafico]);i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}}};function RichDrawEditor(elem,renderer){this.container=elem;this.gridX=10;this.gridY=10;this.mouseDownX=0;this.mouseDownY=0;this.mode='';this.fillColor='';this.lineColor='';this.lineWidth='';this.circColor='';this.textColor='';this.selected=null;this.selectedBounds={x:0,y:0,width:0,height:0};this.onselect=function(){};this.onunselect=function(){};this.renderer=renderer;this.renderer.init(this.container);this.fecha=function(){elem.innerHTML="";elem.style.display="none"}}RichDrawEditor.prototype.clearWorkspace=function(){this.container.innerHTML=''};RichDrawEditor.prototype.deleteSelection=function(){if(this.selected){this.renderer.remove(this.container.ownerDocument.getElementById('tracker'));this.renderer.remove(this.selected);this.selected=null}};RichDrawEditor.prototype.select=function(elem){if(elem==this.selected)return;this.selected=elem;this.renderer.showTracker(this.selected);this.onselect(this)};RichDrawEditor.prototype.unselect=function(){if(this.selected){this.renderer.remove(this.container.ownerDocument.getElementById('tracker'));this.selected=null;this.onunselect(this)}};RichDrawEditor.prototype.getSelectedElement=function(){return this.selected};RichDrawEditor.prototype.setGrid=function(horizontal,vertical){this.gridX=horizontal;this.gridY=vertical};RichDrawEditor.prototype.editCommand=function(cmd,value){if(cmd=='mode'){this.mode=value}else if(this.selected==null){if(cmd=='fillcolor'){this.fillColor=value}else if(cmd=='linecolor'){this.lineColor=value}else if(cmd=='textcolor'){this.textColor=value}else if(cmd=='circcolor'){this.circColor=value}else if(cmd=='linewidth'){this.lineWidth=parseInt(value)+'px'}}else{this.renderer.editCommand(this.selected,cmd,value)}};RichDrawEditor.prototype.queryCommand=function(cmd){if(cmd=='mode'){return this.mode}else if(this.selected==null){if(cmd=='fillcolor'){return this.fillColor}else if(cmd=='linecolor'){return this.lineColor}else if(cmd=='textcolor'){return this.textColor}else if(cmd=='circcolor'){return this.circColor}else if(cmd=='linewidth'){return this.lineWidth}}else{return this.renderer.queryCommand(this.selected,cmd)}};RichDrawEditor.prototype.onSelectStart=function(event){return false};RichDrawEditor.prototype.onClick=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;if(this.mode!='select'){this.unselect();this.mouseDownX=snappedX;this.mouseDownY=snappedY;this.selected=this.renderer.create(this.mode,this.fillColor,this.lineColor,this.lineWidth,this.mouseDownX,this.mouseDownY,1,1);this.selected.id='shape:'+createUUID();Event.observe(this.selected,"mousemove",this.onHitListener);Event.observe(this.container,"mousemove",this.onDrawListener)}else{if(this.mouseDownX!=snappedX||this.mouseDownY!=snappedY)this.unselect()}return false};RichDrawEditor.prototype.onMouseDown=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;if(this.mode!='select'){this.unselect();this.mouseDownX=snappedX;this.mouseDownY=snappedY;this.selected=this.renderer.create(this.mode,this.fillColor,this.lineColor,this.lineWidth,this.mouseDownX,this.mouseDownY,1,1);this.selected.id='shape:'+createUUID();Event.observe(this.selected,"mousedown",this.onHitListener);Event.observe(this.container,"mousemove",this.onDrawListener)}else{if(this.mouseDownX!=snappedX||this.mouseDownY!=snappedY)this.unselect()}return false};RichDrawEditor.prototype.onMouseUp=function(event){Event.stopObserving(this.container,"mouseup",this.onDrawListener);Event.stopObserving(this.container,"mouseup",this.onDragListener);if(this.mode!='select'){this.selected=null}};RichDrawEditor.prototype.onDrag=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;var deltaX=snappedX-this.mouseDownX;var deltaY=snappedY-this.mouseDownY;this.renderer.move(this.selected,this.selectedBounds.x+deltaX,this.selectedBounds.y+deltaY);this.renderer.showTracker(this.selected)};RichDrawEditor.prototype.onResize=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;var deltaX=snappedX-this.mouseDownX;var deltaY=snappedY-this.mouseDownY;this.renderer.track(handle,deltaX,deltaY);show_tracker()};RichDrawEditor.prototype.onDraw=function(event){if(this.selected==null)return;var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;this.renderer.resize(this.selected,this.mouseDownX,this.mouseDownY,snappedX,snappedY)};RichDrawEditor.prototype.onHit=function(event){if(this.mode=='select'){this.select(Event.element(event));this.selectedBounds=this.renderer.bounds(this.selected);var offset=Position.cumulativeOffset(this.container);this.mouseDownX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;this.mouseDownY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;Event.observe(this.container,"mousemove",this.onDragListener)}};function createUUID(){return[4,2,2,2,6].map(function(length){var uuidpart="";for(var i=0;i<length;i++){var uuidchar=parseInt((Math.random()*256)).toString(16);if(uuidchar.length==1)uuidchar="0"+uuidchar;uuidpart+=uuidchar}return uuidpart}).join('-')}function AbstractRenderer(){};AbstractRenderer.prototype.init=function(elem){};AbstractRenderer.prototype.bounds=function(shape){return{x:0,y:0,width:0,height:0}};AbstractRenderer.prototype.create=function(shape,fillColor,lineColor,lineWidth,left,top,width,height,texto){};AbstractRenderer.prototype.remove=function(shape){};AbstractRenderer.prototype.move=function(shape,left,top){};AbstractRenderer.prototype.track=function(shape){};AbstractRenderer.prototype.resize=function(shape,fromX,fromY,toX,toY){};AbstractRenderer.prototype.editCommand=function(shape,cmd,value){};AbstractRenderer.prototype.queryCommand=function(shape,cmd){};AbstractRenderer.prototype.showTracker=function(shape){};AbstractRenderer.prototype.getMarkup=function(){return null};function SVGRenderer(){this.base=AbstractRenderer;this.svgRoot=null}SVGRenderer.prototype=new AbstractRenderer;SVGRenderer.prototype.init=function(elem){this.container=elem;this.container.style.MozUserSelect='none';var svgNamespace='http://www.w3.org/2000/svg';this.svgRoot=this.container.ownerDocument.createElementNS(svgNamespace,"svg");this.container.appendChild(this.svgRoot)};SVGRenderer.prototype.bounds=function(shape){var rect=new Object();var box=shape.getBBox();rect['x']=box.x;rect['y']=box.y;rect['width']=box.width;rect['height']=box.height;return rect};SVGRenderer.prototype.create=function(shape,fillColor,lineColor,lineWidth,left,top,width,height,texto){var svgNamespace='http://www.w3.org/2000/svg';var svg;if(shape=='rect'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'rect');svg.setAttributeNS(null,'x',left+'px');svg.setAttributeNS(null,'y',top+'px');svg.setAttributeNS(null,'width',width+'px');svg.setAttributeNS(null,'height',height+'px')}else if(shape=='ellipse'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'ellipse');svg.setAttributeNS(null,'cx',(left+width/2)+'px');svg.setAttributeNS(null,'cy',(top+height/2)+'px');svg.setAttributeNS(null,'rx',(width/2)+'px');svg.setAttributeNS(null,'ry',(height/2)+'px')}else if(shape=='circ'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'ellipse');svg.setAttributeNS(null,'cx',left+'px');svg.setAttributeNS(null,'cy',top+'px');svg.setAttributeNS(null,'rx',width+'px');svg.setAttributeNS(null,'ry',width+'px')}else if(shape=='roundrect'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'rect');svg.setAttributeNS(null,'x',left+'px');svg.setAttributeNS(null,'y',top+'px');svg.setAttributeNS(null,'rx','20px');svg.setAttributeNS(null,'ry','20px');svg.setAttributeNS(null,'width',width+'px');svg.setAttributeNS(null,'height',height+'px')}else if(shape=='line'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'line');svg.setAttributeNS(null,'x1',left+'px');svg.setAttributeNS(null,'y1',top+'px');svg.setAttributeNS(null,'x2',width+'px');svg.setAttributeNS(null,'y2',height+'px')}else if(shape=='text'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'text');var n=this.container.ownerDocument.createTextNode(texto);svg.appendChild(n);svg.setAttributeNS(null,'x',left+'px');svg.setAttributeNS(null,'y',top+'px');svg.setAttributeNS(null,'font-size','12px')}svg.style.position='absolute';if(fillColor.length==0)fillColor='none';svg.setAttributeNS(null,'fill',fillColor);if(lineColor.length==0)lineColor='none';svg.setAttributeNS(null,'stroke',lineColor);svg.setAttributeNS(null,'stroke-width',lineWidth);this.svgRoot.appendChild(svg);return svg};SVGRenderer.prototype.remove=function(shape){shape.parentNode.removeChild(shape)};SVGRenderer.prototype.move=function(shape,left,top){if(shape.tagName=='line'){var deltaX=shape.getBBox().width;var deltaY=shape.getBBox().height;shape.setAttributeNS(null,'x1',left);shape.setAttributeNS(null,'y1',top);shape.setAttributeNS(null,'x2',left+deltaX);shape.setAttributeNS(null,'y2',top+deltaY)}else if(shape.tagName=='ellipse'){shape.setAttributeNS(null,'cx',left+(shape.getBBox().width/2));shape.setAttributeNS(null,'cy',top+(shape.getBBox().height/2))}else{shape.setAttributeNS(null,'x',left);shape.setAttributeNS(null,'y',top)}};SVGRenderer.prototype.track=function(shape){};SVGRenderer.prototype.resize=function(shape,fromX,fromY,toX,toY){var deltaX=toX-fromX;var deltaY=toY-fromY;if(shape.tagName=='line'){shape.setAttributeNS(null,'x2',toX);shape.setAttributeNS(null,'y2',toY)}else if(shape.tagName=='ellipse'){if(deltaX<0){shape.setAttributeNS(null,'cx',(fromX+deltaX/2)+'px');shape.setAttributeNS(null,'rx',(-deltaX/2)+'px')}else{shape.setAttributeNS(null,'cx',(fromX+deltaX/2)+'px');shape.setAttributeNS(null,'rx',(deltaX/2)+'px')}if(deltaY<0){shape.setAttributeNS(null,'cy',(fromY+deltaY/2)+'px');shape.setAttributeNS(null,'ry',(-deltaY/2)+'px')}else{shape.setAttributeNS(null,'cy',(fromY+deltaY/2)+'px');shape.setAttributeNS(null,'ry',(deltaY/2)+'px')}}else{if(deltaX<0){shape.setAttributeNS(null,'x',toX+'px');shape.setAttributeNS(null,'width',-deltaX+'px')}else{shape.setAttributeNS(null,'width',deltaX+'px')}if(deltaY<0){shape.setAttributeNS(null,'y',toY+'px');shape.setAttributeNS(null,'height',-deltaY+'px')}else{shape.setAttributeNS(null,'height',deltaY+'px')}}};SVGRenderer.prototype.editCommand=function(shape,cmd,value){if(shape!=null){if(cmd=='fillcolor'){if(value!='')shape.setAttributeNS(null,'fill',value);else shape.setAttributeNS(null,'fill','none')}else if(cmd=='linecolor'){if(value!='')shape.setAttributeNS(null,'stroke',value);else shape.setAttributeNS(null,'stroke','none')}else if(cmd=='linewidth'){shape.setAttributeNS(null,'stroke-width',parseInt(value)+'px')}}};SVGRenderer.prototype.queryCommand=function(shape,cmd){var result='';if(shape!=null){if(cmd=='fillcolor'){result=shape.getAttributeNS(null,'fill');if(result=='none')result=''}else if(cmd=='linecolor'){result=shape.getAttributeNS(null,'stroke');if(result=='none')result=''}else if(cmd=='linewidth'){result=shape.getAttributeNS(null,'stroke');if(result=='none')result='';else result=shape.getAttributeNS(null,'stroke-width')}}return result};SVGRenderer.prototype.showTracker=function(shape){var box=shape.getBBox();var tracker=document.getElementById('tracker');if(tracker){this.remove(tracker)}var svgNamespace='http://www.w3.org/2000/svg';tracker=document.createElementNS(svgNamespace,'rect');tracker.setAttributeNS(null,'id','tracker');tracker.setAttributeNS(null,'x',box.x-10);tracker.setAttributeNS(null,'y',box.y-10);tracker.setAttributeNS(null,'width',box.width+20);tracker.setAttributeNS(null,'height',box.height+20);tracker.setAttributeNS(null,'fill','none');tracker.setAttributeNS(null,'stroke','blue');tracker.setAttributeNS(null,'stroke-width','1');this.svgRoot.appendChild(tracker)};SVGRenderer.prototype.getMarkup=function(){return this.container.innerHTML};function VMLRenderer(){this.base=AbstractRenderer}VMLRenderer.prototype=new AbstractRenderer;VMLRenderer.prototype.init=function(elem){this.container=elem;this.container.style.overflow='hidden';elem.ownerDocument.namespaces.add("v","urn:schemas-microsoft-com:vml");var style=elem.ownerDocument.createStyleSheet();style.addRule('v\\:*',"behavior: url(#default#VML);")};VMLRenderer.prototype.bounds=function(shape){var rect=new Object();rect['x']=shape.offsetLeft;rect['y']=shape.offsetTop;rect['width']=shape.offsetWidth;rect['height']=shape.offsetHeight;return rect};VMLRenderer.prototype.create=function(shape,fillColor,lineColor,lineWidth,left,top,width,height,texto){var vml;if(shape=='rect'){vml=this.container.ownerDocument.createElement('v:rect')}else if(shape=='roundrect'){vml=this.container.ownerDocument.createElement('v:roundrect')}else if(shape=='ellipse'){vml=this.container.ownerDocument.createElement('v:oval')}else if(shape=='circ'){vml=this.container.ownerDocument.createElement('v:oval')}else if(shape=='line'){vml=this.container.ownerDocument.createElement('v:line')}else if(shape=='text'){vml=this.container.ownerDocument.createElement('v:textbox');vml.innerHTML=texto}if(shape!='line'){vml.style.position='absolute';vml.style.left=left;vml.style.top=top;vml.style.width=width;vml.style.height=height;if(fillColor!=''){vml.setAttribute('filled','true');vml.setAttribute('fillcolor',fillColor)}else{vml.setAttribute('filled','false')}}else{vml.style.position='absolute';vml.setAttribute('from',left+'px,'+top+'px');vml.setAttribute('to',width+'px,'+height+'px')}if(lineColor!=''){vml.setAttribute('stroked','true');vml.setAttribute('strokecolor',lineColor);vml.setAttribute('strokeweight',lineWidth)}else{vml.setAttribute('stroked','false')}this.container.appendChild(vml);return vml};VMLRenderer.prototype.remove=function(shape){shape.removeNode(true)};VMLRenderer.prototype.move=function(shape,left,top){if(shape.tagName=='line'){shape.style.marginLeft=left;shape.style.marginTop=top}else{shape.style.left=left;shape.style.top=top}};VMLRenderer.prototype.track=function(shape){};VMLRenderer.prototype.resize=function(shape,fromX,fromY,toX,toY){shape.setAttribute('to',toX+'px,'+toY+'px')};VMLRenderer.prototype.editCommand=function(shape,cmd,value){if(shape!=null){if(cmd=='fillcolor'){if(value!=''){shape.filled='true';shape.fillcolor=value}else{shape.filled='false';shape.fillcolor=''}}else if(cmd=='linecolor'){if(value!=''){shape.stroked='true';shape.strokecolor=value}else{shape.stroked='false';shape.strokecolor=''}}else if(cmd=='linewidth'){shape.strokeweight=parseInt(value)+'px'}}};VMLRenderer.prototype.queryCommand=function(shape,cmd){if(shape!=null){if(cmd=='fillcolor'){if(shape.filled=='false')return'';else return shape.fillcolor}else if(cmd=='linecolor'){if(shape.stroked=='false')return'';else return shape.strokecolor}else if(cmd=='linewidth'){if(shape.stroked=='false'){return''}else{return(parseFloat(shape.strokeweight)*(screen.logicalXDPI/72))+'px'}}}};VMLRenderer.prototype.showTracker=function(shape){var box=this.bounds(shape);var tracker=document.getElementById('tracker');if(tracker){this.remove(tracker)}tracker=this.container.ownerDocument.createElement('v:rect');tracker.id='tracker';tracker.style.position='absolute';tracker.style.left=box.x-10;tracker.style.top=box.y-10;tracker.style.width=box.width+20;tracker.style.height=box.height+20;tracker.setAttribute('filled','false');tracker.setAttribute('stroked','true');tracker.setAttribute('strokecolor','blue');tracker.setAttribute('strokeweight','1px');this.container.appendChild(tracker)};VMLRenderer.prototype.getMarkup=function(){return this.container.innerHTML};if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.coordenadas={formato:"bloco",padrao:"geoProj",defOrigem:"+proj=longlat +ellps=GRS67 +no_defs",config:{"geoProj":{idhtml:"localizarxy",tipo:"geo",titulo:"Geo",ativo:true,defepsg:""},"dd":{idhtml:"localizarxy",tipo:"metrica",titulo:"Déc. de grau",ativo:true,defepsg:""},"policonicaSad69":{idhtml:"localizarxy",tipo:"metrica",titulo:"Polic SAD-69",ativo:true,defepsg:"+proj=poly +lat_0=0 +lon_0=-54 +x_0=5000000 +y_0=10000000 +ellps=aust_SA +units=m +no_defs"},"utmSad69Proj":{idhtml:"localizarxy",tipo:"utm",titulo:"UTM Sad-69",ativo:true,defepsg:"",zona:{"19N":"+proj=utm +zone=19 +ellps=aust_SA +units=m +no_defs","20N":"+proj=utm +zone=20 +ellps=aust_SA +units=m +no_defs","21N":"+proj=utm +zone=21 +ellps=aust_SA +units=m +no_defs","22N":"+proj=utm +zone=22 +ellps=aust_SA +units=m +no_defs","17S":"+proj=utm +zone=17 +south +ellps=aust_SA +units=m +no_defs","18S":"+proj=utm +zone=18 +south +ellps=aust_SA +units=m +no_defs","19S":"+proj=utm +zone=19 +south +ellps=aust_SA +units=m +no_defs","20S":"+proj=utm +zone=20 +south +ellps=aust_SA +units=m +no_defs","21S":"+proj=utm +zone=21 +south +ellps=aust_SA +units=m +no_defs","22S":"+proj=utm +zone=22 +south +ellps=aust_SA +units=m +no_defs","23S":"+proj=utm +zone=23 +south +ellps=aust_SA +units=m +no_defs","24S":"+proj=utm +zone=24 +south +ellps=aust_SA +units=m +no_defs","25S":"+proj=utm +zone=25 +south +ellps=aust_SA +units=m +no_defs"}},"utmSirgas2000Proj":{idhtml:"localizarxy",tipo:"utm",titulo:"UTM Sirgas",ativo:true,defepsg:"",zona:{"11N":"+proj=utm +zone=11 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","12N":"+proj=utm +zone=12 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","13N":"+proj=utm +zone=13 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","14N":"+proj=utm +zone=14 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","15N":"+proj=utm +zone=15 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","16N":"+proj=utm +zone=16 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","17N":"+proj=utm +zone=17 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","18N":"+proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","19N":"+proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","20N":"+proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","21N":"+proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","22N":"+proj=utm +zone=22 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","17S":"+proj=utm +zone=17 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","18S":"+proj=utm +zone=18 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","19S":"+proj=utm +zone=19 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","20S":"+proj=utm +zone=20 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","21S":"+proj=utm +zone=21 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","22S":"+proj=utm +zone=22 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","23S":"+proj=utm +zone=23 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","24S":"+proj=utm +zone=24 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","25S":"+proj=utm +zone=25 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}}},PARAMETROS:{"mostraCoordenadasUTM":{idhtml:"localizarxy"},"mostraCoordenadasGEO":{idhtml:"localizarxy"}},MODOTEXTO:"",mostraCoordenadasUTM:function(id){try{if(arguments.length===0||id===""||typeof(id)==='undefined'){id=this.PARAMETROS.mostraCoordenadasUTM.idhtml}else{this.PARAMETROS.mostraCoordenadasUTM.idhtml=id}if(!$i(id)||this.PARAMETROS.mostraCoordenadasUTM.idhtml===""){if(i3GEO.eventos.MOUSEPARADO.toString().search("atualizaCoordenadasUTM()")>=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="<div onclick='javascript:clearTimeout(idSetTimeoutMostraUTM);i3GEO.coordenadas.PARAMETROS.mostraCoordenadasUTM.idhtml = \"\";i3GEO.coordenadas.mostraCoordenadasGEO();' style='width:300px;font-size:10px;' >UTM: x="+retorno.data.x+" y="+retorno.data.y+" zn="+retorno.data.zona+" "+retorno.data.datum+" &nbsp;<img class='x' src='"+i3GEO.util.$im("branco.gif")+"' /></div>";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.Interface.TABLET===true){if(i3GEO.eventos.MOUSECLIQUE.toString().search("atualizaLocalizarGeo()")<0){i3GEO.eventos.MOUSECLIQUE.push("atualizaLocalizarGeo()")}}else{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='<table id='+prefixo+' style=display:block;text-align:center;width:410px ><tr style="border-bottom:2px solid white" >'+'<td style=width:10px;text-align:right > X:</td>'+'<td>'+$inputText('','',prefixo+'xg','grau','2','-00')+'</td>'+'<td>'+$inputText('','',prefixo+'xm','minuto','2','00')+'</td>'+'<td>'+$inputText('','',prefixo+'xs','segundo','4','00.00')+'</td>'+'<td>Y:'+$inputText('','',prefixo+'yg','grau','2','-00')+'</td>'+'<td>'+$inputText('','',prefixo+'ym','minuto','2','00')+'</td>'+'<td>'+$inputText('','',prefixo+'ys','segundo','4','00.00')+'</td>',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+='<td><img class=tic title=zoom onclick="'+temp+'" src="'+i3GEO.util.$im("branco.gif")+'" /></td>'+"<td>"+caixa+"</td>"+"</tr></table>";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]+"<br>"},criaMascaraMetrica:function(prefixo,titulo,caixa){var ins="<table id="+prefixo+" style=display:block;text-align:center;;width:410px ><tr style='border-bottom:2px solid white' >"+"<td style=width:120px;text-align:right >"+titulo+" X:&nbsp;</td>"+"<td>"+$inputText("","",prefixo+"X","X","12","00")+"&nbsp;</td>"+"<td>Y:"+$inputText("","",prefixo+"Y","Y","12","00")+"&nbsp;</td>"+"<td>Zn:"+$inputText("","",prefixo+"ZN","Zona","2","--")+"&nbsp;</td>"+"<td>"+caixa+"<td>"+"</tr></table>";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+"<br>"},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<n;i++){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){if(tipos[i]===this.padrao){$i(prefixo+tipos[i]).style.display="block"}else{$i(prefixo+tipos[i]).style.display="none"}}}},mudaTipo:function(obj,onde){if(obj.value==="janela"){this.formato="janela";this.mostraCoordenadas();return}this.padrao=obj.value;obj.selectedIndex=0;i3GEO.coordenadas.ativaBloco(onde)},mostraCoordenadas:function(ativaMovimento,onde,x,y){try{var tipos=i3GEO.util.listaChaves(i3GEO.coordenadas.config),n=tipos.length,temp,ins="",i=0,caixa,janela;i3GEO.coordenadas.MODOTEXTO="";if(arguments.length===0){ativaMovimento=true;onde=""}if(onde===""){onde=i3GEO.coordenadas.config[tipos[0]].idhtml}caixa="<select onchange='javascript:i3GEO.coordenadas.mudaTipo(this,\""+onde+"\");' style='margin-left:3px;font-size:10px;height:16px;width:40px;' ><option>---</option><option value='janela' >janela</option>";for(i=0;i<n;i+=1){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){caixa+="<option value='"+tipos[i]+"'>"+temp.titulo+"</option>"}}caixa+="</select>";if(i3GEO.coordenadas.formato!=="bloco"){caixa=""}for(i=0;i<n;i+=1){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){if(temp.tipo==="geo"){ins+=i3GEO.coordenadas.criaMascaraDMS(onde+tipos[i],temp.titulo,caixa);if(i3GEO.coordenadas.formato==="separado"){try{$i(temp.idhtml).innerHTML=ins}catch(e){}ins=""}}else{ins+=i3GEO.coordenadas.criaMascaraMetrica(onde+tipos[i],temp.titulo,caixa)}}}if(this.formato==="janela"){janela=i3GEO.janela.cria("450px","120px","","","","Coordenadas aproximadas","i3GEOJanelaCoordenadas",false,"hd","","");YAHOO.util.Event.addListener(janela[0].close,"click",function(){i3GEO.coordenadas.formato="bloco",i3GEO.coordenadas.mostraCoordenadas()});temp=$i("i3GEOJanelaCoordenadas_corpo");temp.style.backgroundColor="white";temp.style.textAlign="left";temp=$i("i3GEOJanelaCoordenadas");temp.onmouseover="";temp.onmouseout="";if($i(onde)){$i(onde).innerHTML=""}onde="i3GEOJanelaCoordenadas_corpo";ins+="<br><a href='#' style='cursor:pointer;color:blue' onclick='new YAHOO.util.KeyListener(document.body,{alt:true,keys:67},{fn: function(type, args, obj){alert(i3GEO.coordenadas.MODOTEXTO);}}).enable();' >"+"Clique aqui para ativar Alt+C para poder capturar as coordenadas</a>"}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<n;i+=1){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){if(temp.tipo==="geo"){if(ativaMovimento===true){if(i3GEO.Interface.TABLET===true){if(i3GEO.eventos.MOUSECLIQUE.toString().search("atualizaLocalizarGeo('"+onde+tipos[i]+"')")<0){i3GEO.eventos.MOUSECLIQUE.push("atualizaLocalizarGeo('"+onde+tipos[i]+"')")}}else{if(i3GEO.eventos.MOUSEMOVE.toString().search("atualizaLocalizarGeo('"+onde+tipos[i]+"')")<0){i3GEO.eventos.MOUSEMOVE.push("atualizaLocalizarGeo('"+onde+tipos[i]+"')")}}}if(typeof(x)!=='undefined'){atualizaLocalizarGeo(onde+tipos[i],i3GEO.calculo.dd2dms(x)[0],i3GEO.calculo.dd2dms(y)[0])}}else{if(ativaMovimento===true){if(i3GEO.Interface.TABLET===true){if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')")}}else{if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')")}}}if(typeof(x)!=='undefined'){i3GEO.coordenadas.atualizaProj4(onde,tipos[i],x,y)}}}}if(ativaMovimento===true){if(i3GEO.Interface.TABLET===true){if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.coordenadas.limpaModoTexto()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.coordenadas.limpaModoTexto()")}}else{if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.coordenadas.limpaModoTexto()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.coordenadas.limpaModoTexto()")}}}if(i3GEO.coordenadas.formato==="bloco"){i3GEO.coordenadas.ativaBloco(onde)}}catch(men){}},limpaModoTexto:function(){i3GEO.coordenadas.MODOTEXTO=""}};if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.gadgets={PARAMETROS:{"mostraInserirKml":{idhtml:"inserirKml"},"mostraEscalaNumerica":{idhtml:"escala"},"mostraEscalaGrafica":{idhtml:"escalaGrafica"},"mostraBuscaRapida":{idhtml:"buscaRapida",servicosexternos:true,temasmapa:false},"mostraVisual":{idhtml:"visual"},"mostraQuadros":{idhtml:"lugarquadros"},"mostraHistoricoZoom":{idhtml:"historicozoom"},"mostraMenuSuspenso":{idhtml:"menus",deslocaEsquerda:0},"mostraMenuLista":{idhtml:"menuLista"},"mostraVersao":{idhtml:"versaoi3geo"},"mostraEmail":{idhtml:"emailInstituicao"}},mostraEmail:function(id){if(arguments.length===0||id===""){id=i3GEO.gadgets.PARAMETROS.mostraEmail.idhtml}else{i3GEO.gadgets.PARAMETROS.mostraEmail.idhtml=id}i3GEO.util.defineValor(id,"innerHTML",i3GEO.parametros.emailInstituicao)},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,"290","i3geo_urlkml","kml url","40","");ins="<table><tr><td>Kml: "+i;temp='i3GEO.Interface.adicionaKml();';ins+="</td><td><img src='"+i3GEO.util.$im("branco.gif")+"' class='tic' onclick='"+temp+"' /></td></tr></table>";$i(id).innerHTML=ins}}},mostraEscalaNumerica:function(id){var i,ins,temp,onde;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraEscalaNumerica.idhtml}onde=$i(id);if(onde){if(onde.style.display=="none"){onde.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,"100","i3geo_escalanum",$trad("d10"),"9",parseInt(i3GEO.parametros.mapscale,10));ins="<table><tr><td>"+i;temp='var nova = document.getElementById("i3geo_escalanum").value;';temp+='i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,nova);';ins+="</td><td><img src='"+i3GEO.util.$im("branco.gif")+"' class='tic' onclick='"+temp+"' /></td></tr></table>";onde.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="<img class='menuarrow' src=\""+i3GEO.configura.locaplic+"/imagens/branco.gif\" title='op&ccedil;&otilde;es' onclick='i3GEO.mapa.dialogo.opcoesEscala()' style='cursor:pointer'/><img id=imagemEscalaGrafica src='' />";$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(){alert("i3geo_buscaRapida foi depreciada")};i=$inputText(id,"225","valorBuscaRapida","Município, cidade, UC, endereço...","30",$trad("o2"));ins="<table><tr><td><a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=8&idajuda=71' >&nbsp;&nbsp;&nbsp;</a></td><td>"+i+"</td>";ins+="<td><img src='"+i3GEO.util.$im("branco.gif")+"' title='"+$trad("p13")+"' class='ticPropriedades2' id=i3GEObotaoPropriedadesBuscaRapida /></td>";ins+="<td><img src='"+i3GEO.util.$im("branco.gif")+"' class='tic' id=i3GEObotaoBuscaRapida /></td></tr></table>";temp=$i(id);if(temp){temp.innerHTML=ins;$i("i3GEObotaoBuscaRapida").onclick=function(){if(i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.servicosexternos===false&&i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.temasmapa===false){alert("Escolha um tipo de busca nas propriedades");return}if($i("valorBuscaRapida").value===""){alert("Digite uma palavra para busca!");return}i3GEO.janela.cria("300px","280px",i3GEO.configura.locaplic+"/ferramentas/buscarapida/index.htm","","","Busca rapida")};$i("i3GEObotaoPropriedadesBuscaRapida").onclick=function(){var ins,interno="",externo="";i3GEO.janela.cria("300px","150px","","","","Propriedades","i3GEOpropriedadesBuscaRapida");if(i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.servicosexternos){externo="checked"}if(i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.temasmapa){interno="checked"}ins="<p class=paragrafo >Onde será feita a busca:</p>"+"<table class=lista3 >"+"<tr><td><input style=cursor:pointer onclick='i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.servicosexternos = this.checked' type=checkbox "+externo+" ></td><td>Serviços de busca externos (Google e MMA)</td></tr>"+"<tr><td><input style=cursor:pointer onclick='i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.temasmapa = this.checked' type=checkbox "+interno+" ></td><td>Temas existentes no mapa</td></tr>"+"</table><br>"+"<p class=paragrafo >Apenas os temas especialmente configurados pelo administrador do i3Geo podem receber operações de busca.</p>";$i("i3GEOpropriedadesBuscaRapida_corpo").innerHTML=ins}}}},mostraHistoricoZoom:function(id){if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraHistoricoZoom.idhtml}if($i(id)){marcadorZoom="";var ins="<table style='text-align:center;position:relative;left:";if(navm){ins+="0px;'>"}else{ins+="6px;'>"}ins+="<tr><td><img id='i3geo_zoomanterior' class='zoomAnterior' title='anterior' src='"+i3GEO.util.$im("branco.gif")+"' /></td>";ins+="<td>&nbsp;</td>";ins+="<td><img id='i3geo_zoomproximo' class='zoomProximo' title='proximo' src='"+i3GEO.util.$im("branco.gif")+"' /></td>";ins+="</tr></table>";$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<i3GEO.gadgets.quadros.quadrosfilme.length){marcadorZoom=marcadorZoom+1;if(marcadorZoom<i3GEO.gadgets.quadros.quadrosfilme.length){i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,"",i3GEO.gadgets.quadros.quadrosfilme[marcadorZoom].extensao)}}else{marcadorZoom=i3GEO.gadgets.quadros.quadrosfilme.length}}}},visual:{inicia:function(id){var l,visuais,li;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraVisual.idhtml}if($i(id)){if(i3GEO.parametros.listavisual!==""){l=i3GEO.parametros.listavisual.split(",");visuais="";li=l.length-1;if(li>=0){do{visuais+="<img title='"+l[li]+"' style=cursor:pointer onclick='i3GEO.gadgets.visual.troca(\""+l[li]+"\")' src='"+i3GEO.configura.locaplic+"/imagens/visual/"+l[li]+".png' />&nbsp;"}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<elt;i++){if((elementos[i].src.search("branco")>-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="<table class=tablefilme ><tr><td><div class='menuarrow' title='op&ccedil;&otilde;es' onclick='i3GEO.gadgets.quadros.opcoes(this)' style='cursor:pointer'></div></td>";for(i=0;i<qs;i++){q+="<td><img class='quadro' src=\""+i3GEO.configura.locaplic+"/imagens/branco.gif\" id='quadro"+i+"' ";q+="onmouseover='i3GEO.gadgets.quadros.trocaMapa(this.id);i3GEO.ajuda.mostraJanela(\"Clique para aplicar a extensão geográfica do quadro ao mapa\")' ";q+="onclick='i3GEO.gadgets.quadros.zoom(this.id)' /></td>";i3GEO.gadgets.quadros.quadrosfilme[i]=[]}q+="</tr></table>";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.toLowerCase()==="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.toLowerCase()==="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="<br><b>N&atilde;o existem imagens guardadas.";wi.document.write("<html><body><p style='font-size: 12px; font-family: verdana, arial, helvetica, sans-serif;'>Click com o bot&atilde;o da direita do mouse sobre a imagem para fazer o download<br>");i=i3GEO.gadgets.quadros.quadrosfilme.length-1;if(i>=0){do{if(i3GEO.gadgets.quadros.quadrosfilme[i].imagem){wi.document.write("<p style='font-size: 12px; font-family: verdana, arial, helvetica, sans-serif;'>Imagem: "+i+"<br>");wi.document.write("<p style='font-size: 12px; font-family: verdana, arial, helvetica, sans-serif;'>Abrangência: "+i3GEO.gadgets.quadros.quadrosfilme[i].extensao+"<br>");wi.document.write("<img src='"+i3GEO.gadgets.quadros.quadrosfilme[i].imagem+"' />");wi.document.write("<img src='"+i3GEO.gadgets.quadros.quadrosfilme[i].referencia+"' />");if(i3GEO.gadgets.quadros.geraLegenda===true){wi.document.write("<img src='"+i3GEO.gadgets.quadros.quadrosfilme[i].legenda+"' />")}}i--}while(i>=0)}wi.document.write("<br>Fim</body></html>");wi.document.close()}}},mostraMenuSuspenso:function(id){var objid,sobe,n,i,estilo,t,onMenuBarBeforeRender,temp,ifr,i3GEOoMenuBarLocal,ms=i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso,confm=i3GEO.configura.oMenuData,ins="",alinhamento="";i3GEOoMenuBar=YAHOO.widget.MenuManager;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+='<div class="bd" style="top:0px;'+alinhamento+'display:block;align:right;border: 0px solid white;z-index:6000;line-height:1.4" >'+'<ul class="first-of-type" style="display:block;border:0px solid white;top:10px;">';n=confm.menu.length;estilo="padding-bottom:3px;top:0px;border: 0px solid white;";for(i=0;i<n;i+=1){t="";if(confm.menu[i].target){t="target="+confm.menu[i].target}ins+='<li class="yuimenubaritem" style="padding-top:2px;"><a style="'+estilo+'" href="#" class="yuimenubaritemlabel" '+t+'id="menu'+confm.menu[i].id+'" >&nbsp;'+confm.menu[i].nome+'</a></li>'}ins+='</ul>';ins+='</div>';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!==""){i3GEOoMenuBarLocal.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}i3GEOoMenuBarLocal=new YAHOO.widget.MenuBar(id,{iframe:ifr,autosubmenudisplay:true,showdelay:100,hidedelay:500,lazyload:false});i3GEOoMenuBar.addMenu(i3GEOoMenuBarLocal);i3GEOoMenuBarLocal.beforeRenderEvent.subscribe(onMenuBarBeforeRender);i3GEOoMenuBarLocal.render();try{if(i3GEO.Interface.ATUAL==="padrao"){i3GEOoMenuBar.getMenuItem("omenudataInterface1").cfg.setProperty("checked",true)}if(i3GEO.Interface.ATUAL==="openlayers"){i3GEOoMenuBar.getMenuItem("omenudataInterface2").cfg.setProperty("checked",true)}if(i3GEO.Interface.ATUAL==="flamingo"){i3GEOoMenuBar.getMenuItem("omenudataInterface3").cfg.setProperty("checked",true)}if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEOoMenuBar.getMenuItem("omenudataInterface4").cfg.setProperty("checked",true)}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEOoMenuBar.getMenuItem("omenudataInterface5").cfg.setProperty("checked",true)}}catch(e){}if(i3GEO.Interface.ATUAL!=="padrao"&&$i("omenudataArquivos3")){i3GEOoMenuBar.getMenuItem("omenudataArquivos3").cfg.setProperty("disabled",true)}if(i3GEO.Interface.ATUAL==="googleearth"&&$i("omenudataJanelas1")){i3GEOoMenuBar.getMenuItem("omenudataJanelas1").cfg.setProperty("disabled",true)}if(i3GEO.Interface.ATUAL!=="openlayers"&&$i("omenudataJanelas3")){i3GEOoMenuBar.getMenuItem("omenudataJanelas3").cfg.setProperty("disabled",true)}temp=objid.style;temp.backgroundPosition="0px -1px";temp.border="0px solid white";if(navm){temp.borderBottom="2px solid white"}if(navm&&i3GEO.Interface.ATUAL==="googlemaps"){temp.border="2px dotted white"}if(ms.finaliza&&ms.finaliza!=""){eval(ms.finaliza)}}},mostraMenuLista:function(id){var objid,n,i,estilo,t,temp,nomeMenu,sub,ms=i3GEO.gadgets.PARAMETROS.mostraMenuLista,confm=i3GEO.configura.oMenuData,ins="",subs=i3GEO.configura.oMenuData.submenus;if(arguments.length===0){id=ms.idhtml}else{ms.idhtml=id}objid=$i(id);if(objid){n=confm.menu.length;for(i=0;i<n;i+=1){ins+='<div class="listaMenuTitulo" id=menulista_'+confm.menu[i].id+'>'+confm.menu[i].nome+'</div>'}objid.innerHTML=ins;for(nomeMenu in subs){if($i("menulista_"+nomeMenu)){sub=subs[nomeMenu];n=sub.length;ins="";for(i=0;i<n;i++){ins+="<p class='listaMenuItem' ><a href='"+sub[i].url+"' target='_blank'>"+sub[i].text+"</a>"}$i("menulista_"+nomeMenu).innerHTML+=ins}}}}};if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.social={curtirFacebook:function(url,tipo){if(tipo==="comtotal"){return"<iframe src='http://www.facebook.com/plugins/like.php?href="+url+"&amp;layout=button_count&amp;show_faces=false&amp;width=160&amp;action=like&amp;colorscheme=light&amp;height=21' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:160px; height:21px;' allowTransparency='true'></iframe>"}if(tipo==="semtotal"){return"<iframe src='http://www.facebook.com/plugins/like.php?href="+url+"&amp;layout=button_count&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;height=21' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:100px; height:21px;' allowTransparency='true'></iframe>"}},publicarTwitter:function(url,tipo){var re=new RegExp("=","g");url=url.replace(re,'%3d');if(tipo==="comtotal"){return'<iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/tweet_button.html?count=horizontal&via=i3geo&url='+url+'" style="width:100px; height:21px;"></iframe>'}if(tipo==="semtotal"){return'<iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/tweet_button.html?count=none&via=i3geo&url='+url+'" style="width:55px; height:21px;"></iframe>'}},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+="<table style='width:250px' ><tr>"}if(tipo==="semtotal"){tabela+="<table style='width:115px' ><tr>"}if(onde||id===""){if(urlpt!==""){tabela+="<td>"+i3GEO.social.publicarTwitter(urlpt,tipo)+"</td>"}if(urlcf!==""){tabela+="<td>"+i3GEO.social.curtirFacebook(urlcf,tipo)+"</td>"}tabela+="</tr></table>";if(id!==""){onde.innerHTML=tabela}return tabela}else{return false}},bookmark:function(link,locaplic){if(!locaplic){locaplic=i3GEO.configura.locaplic}var ins="<img style='cursor:pointer' src='"+locaplic+"/imagens/delicious.gif' onclick='javascript:window.open(\"http://del.icio.us/post?url="+link+"\")' title='Delicious'/> ";ins+="<img style='cursor:pointer' src='"+locaplic+"/imagens/digg.gif' onclick='javascript:window.open(\"http://digg.com/submit/post?url="+link+"\")' title='Digg'/> ";ins+="<img style='cursor:pointer' src='"+locaplic+"/imagens/facebook.gif' onclick='javascript:window.open(\"http://www.facebook.com/sharer.php?u="+link+"\")' title='Facebook'/> ";ins+="<img style='cursor:pointer' src='"+locaplic+"/imagens/stumbleupon.gif' onclick='javascript:window.open(\"http://www.stumbleupon.com/submit?url="+link+"\")' title='StumbleUpon'/>";return ins}};/*
  329 + * euDock - javascript Emulation of Dock style MAC OS X bar
  330 + *
  331 + * Version: 2.0.06
  332 + *
  333 + * Copyright (C) 2006 Parodi (Pier...) Eugenio <eudock@inwind.it>
  334 + * http://eudock.jules.it
  335 + *
  336 + * SPECIAL THANKS TO Tiago D'Herbe (tvidigal) FOR (Multiple Dock) INSPIRATION
  337 + *
  338 + * Mario Zaizar to suggest and help me for Pointer icon patch and Target function
  339 + *
  340 + * J?r?mie 'ahFeel' BORDIER to suggest and help me for DeleteIcon feature
  341 + *
  342 + *
  343 + *
  344 + *
  345 + * This library is free software; you can redistribute it and/or
  346 + * modify it under the terms of the GNU Lesser General Public
  347 + * License as published by the Free Software Foundation; either
  348 + * version 2.1 of the License, or (at your option) any later version.
  349 + *
  350 + * This library is distributed in the hope that it will be useful,
  351 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  352 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  353 + * Lesser General Public License for more details.
  354 + *
  355 + * You should have received a copy of the GNU Lesser General Public
  356 + * License along with this library; if not, write to the Free Software
  357 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  358 + *
  359 + */
  360 +
  361 + /*
  362 + *
  363 + * This program is absolutely free...
  364 + * ...BUT...
  365 + * If you modify(OR TRY TO DO THAT)this Source Code,
  366 + * my SOUL will carry you some monstrous Nightmares
  367 + *
  368 + * Have a nice day
  369 + * enjoy yourself.
  370 + * Pier...
  371 + *
  372 + * (Sorry but I'm Italian not an American writer)
  373 + * (...a day Maybe...)
  374 + */
  375 +
  376 +if (!euEnv)
  377 + var euEnv = new Array();
  378 +euEnv.Kost = new Array();
  379 +euEnv.Kost.num = 0;
  380 +euEnv.Kost.next = function(){return this.num++;}
  381 +euEnv.euDockArray = new Array();
  382 +euEnv.refreshTime = 35;
  383 +euEnv.exeThread = true;
  384 +euEnv.exeThreadWhiteLoop = 0;
  385 +euEnv.x = 0;
  386 +euEnv.y = 0;
  387 +euEnv.mouseMoved=false;
  388 +
  389 +var euUP = 1;
  390 +var euDOWN = 2;
  391 +var euLEFT = 3;
  392 +var euRIGHT = 4;
  393 +
  394 +var euICON = 5;
  395 +var euMOUSE = 6;
  396 +
  397 +var euSCREEN = 7;
  398 +var euOBJECT = 8;
  399 +var euABSOLUTE = 9;
  400 +var euRELATIVE = 10;
  401 +
  402 +var euHORIZONTAL = 11;
  403 +var euVERTICAL = 12;
  404 +var euCENTER = 13;
  405 +
  406 +var euTRANSPARENT = 14;
  407 +var euFIXED = 15;
  408 +var euOPAQUE = 16;
  409 +
  410 +
  411 +
  412 +/*
  413 + ****************************************
  414 + ****** Standard euDock Functions *******
  415 + ****** (BEGIN) *******
  416 + ****************************************
  417 + */
  418 + function euIdObjTop(euObj){
  419 + var ret = euObj.offsetTop;
  420 + while ((euObj = euObj.offsetParent)!=null)
  421 + ret += euObj.offsetTop;
  422 + return ret;
  423 + };
  424 +
  425 + function euIdObjLeft(euObj){
  426 + var ret = euObj.offsetLeft;
  427 + while ((euObj = euObj.offsetParent)!=null)
  428 + ret += euObj.offsetLeft;
  429 +
  430 +
  431 + return ret;
  432 + };
  433 +
  434 + function isEuInside(euObj,x,y){
  435 + var euTop = euIdObjTop(euObj);
  436 + var euLeft = euIdObjLeft(euObj);
  437 + return ((euTop<=y && (euTop+euObj.offsetHeight)>=y)&&(euLeft<=x && (euLeft+euObj.offsetWidth)>=x));
  438 + };
  439 +
  440 + /*
  441 + * euDimensioni()
  442 + *
  443 + * standard code fo retrieve width and Height of Screen
  444 + *
  445 + */
  446 + function euDimensioni(){
  447 + if( typeof( window.innerWidth ) == 'number' ) {
  448 + //Non-IE
  449 + euEnv.euFrameWidth = window.innerWidth-16;
  450 + euEnv.euFrameHeight = window.innerHeight;
  451 + } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
  452 + //IE 6+ in 'standards compliant mode'
  453 + euEnv.euFrameWidth = document.documentElement.clientWidth-16;
  454 + euEnv.euFrameHeight = document.documentElement.clientHeight;
  455 + } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
  456 + //IE 4 compatible
  457 + euEnv.euFrameWidth = document.body.clientWidth;
  458 + euEnv.euFrameHeight = document.body.clientHeight;
  459 + }
  460 + };
  461 +
  462 + function offsEut() {
  463 + euEnv.euScrOfY = 0;
  464 + euEnv.euScrOfX = 0;
  465 + if( typeof( window.pageYoffsEut ) == 'number' ) {
  466 + //Netscape compliant
  467 + euEnv.euScrOfY = window.pageYoffsEut;
  468 + euEnv.euScrOfX = window.pageXoffsEut;
  469 + } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
  470 + //DOM compliant
  471 + euEnv.euScrOfY = document.body.scrollTop;
  472 + euEnv.euScrOfX = document.body.scrollLeft;
  473 + } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
  474 + //IE6 standards compliant mode
  475 + euEnv.euScrOfY = document.documentElement.scrollTop;
  476 + euEnv.euScrOfX = document.documentElement.scrollLeft;
  477 + }
  478 + };
  479 +/*
  480 + ****************************************
  481 + ****** Standard euDock Functions *******
  482 + ****** (END) *******
  483 + ****************************************
  484 + */
  485 +
  486 +/*
  487 + ****************************************
  488 + ****** euDock Trans Functions *******
  489 + ****** (BEGIN) *******
  490 + ****************************************
  491 + */
  492 +
  493 + function euKostFunc30(x){
  494 + return 0.3;
  495 + };
  496 +
  497 + function euKostFunc100(x){
  498 + return 1;
  499 + };
  500 +
  501 + function euLinear(x){
  502 + return x;
  503 + };
  504 +
  505 + function euLinear30(x){
  506 + //return 1*(x+(1-x)*0.3);
  507 + var r = 1*(x+(1-x)*0.3);
  508 + //if(r < 1)
  509 + //{r = 1;}
  510 + return r;
  511 + };
  512 +
  513 + function euLinear20(x){
  514 + return x+(1-x)*0.2;
  515 + };
  516 +
  517 + function euExp30(x){
  518 + return euLinear30(x*x*x);
  519 + };
  520 +
  521 + function euLinear50(x){
  522 + return x+(1-x)*0.5;
  523 + };
  524 +
  525 + function euHarmonic(x){
  526 + return euLinear30((1-Math.cos(Math.PI*x))/2);
  527 + };
  528 +
  529 + function euSemiHarmonic(x){
  530 + return euLinear30(Math.cos(Math.PI*(1-x)/2));
  531 + };
  532 +
  533 +/*
  534 + ****************************************
  535 + ****** euDock Trans Functions *******
  536 + ****** (END) *******
  537 + ****************************************
  538 + */
  539 +
  540 +/*
  541 + ****************************************
  542 + ****** euDock Object *******
  543 + ****** (START) *******
  544 + ****************************************
  545 + */
  546 + function euDock(){
  547 + this.id = 'euDock_'+euEnv.Kost.next();
  548 + var novoel = document.createElement("div");
  549 + novoel.style.position = "absolute";
  550 + novoel.innerHTML = "<div id='"+this.id+"_bar' style='z-index:1000;position:absolute;border:0px solid black;'></div>" +
  551 + "<div onMouseOut='euEnv.euDockArray."+this.id+".mouseOut();' onMouseOver='euEnv.euDockArray."+this.id+".mouseOver();' id='"+this.id+"' style='z-index:1000;position:absolute;border:0px solid black; cursor: pointer;'></div>";
  552 + document.body.appendChild(novoel);
  553 +
  554 + this.div =document.getElementById(this.id);
  555 + this.divBar=document.getElementById(this.id+"_bar");
  556 + this.iconsArray=new Array();
  557 + this.isInside=false;
  558 + euEnv.euDockArray[this.id]=this;
  559 + this.bar=null;
  560 +
  561 + this.mouseX = 0;
  562 + this.mouseY = 0;
  563 +
  564 + this.centerPosX = 0;
  565 + this.centerPosY = 0;
  566 + this.offset = 0;
  567 + this.iconOffset = 0;
  568 +
  569 + this.venusHillSize = 3;//200;
  570 + this.venusHillTrans = euLinear;
  571 +
  572 + this.position = euUP;
  573 + this.align = euSCREEN;
  574 + this.objectAlign = euDOWN;
  575 + this.idObjectHook;
  576 + this.animaition = euICON;
  577 + this.animFading = euABSOLUTE;
  578 +
  579 + this.setIconsOffset = function(offset){
  580 + this.iconOffset=offset;
  581 + };
  582 +
  583 + this.setAnimation = function(anim,size){
  584 + this.animaition = anim;
  585 + this.venusHillSize = size;
  586 + };
  587 +
  588 + this.setPointAlign = function(x,y,pos){
  589 + this.offset = 0;
  590 + this.align = euABSOLUTE;
  591 + this.position = pos;
  592 + this.setCenterPos(x,y);
  593 + }
  594 +
  595 + this.setObjectAlign = function(idObj,align,offset,pos){
  596 + this.offset = offset;
  597 + this.align = euOBJECT;
  598 + this.objectAlign = align;
  599 + this.position = pos;
  600 + this.idObjectHook = document.getElementById(idObj);
  601 + this.setObjectCoord();
  602 + };
  603 +
  604 + this.setObjectCoord = function(){
  605 + var tempx,tempy;
  606 + if (this.objectAlign==euDOWN){
  607 + tempx = euIdObjLeft(this.idObjectHook) + (this.idObjectHook.offsetWidth/2);
  608 + tempy = euIdObjTop(this.idObjectHook) + this.idObjectHook.offsetHeight + this.offset
  609 + if(navm){
  610 + tempx = ((i3GEO.barraDeBotoes.MAXBOTOES * 30) / 2);
  611 + tempy = euIdObjTop(this.idObjectHook) + this.idObjectHook.offsetHeight + this.offset + 38;
  612 + }
  613 + this.setCenterPos(
  614 + tempx,
  615 + tempy
  616 + );
  617 + }
  618 + else if (this.objectAlign==euUP)
  619 + this.setCenterPos(
  620 + euIdObjLeft(this.idObjectHook) + (this.idObjectHook.offsetWidth/2),
  621 + euIdObjTop(this.idObjectHook) - this.offset);
  622 + else if (this.objectAlign==euLEFT)
  623 + this.setCenterPos(
  624 + euIdObjLeft(this.idObjectHook) - this.offset,
  625 + euIdObjTop(this.idObjectHook) + (this.idObjectHook.offsetHeight/2));
  626 + else if (this.objectAlign==euRIGHT)
  627 + this.setCenterPos(
  628 + euIdObjLeft(this.idObjectHook) + this.idObjectHook.offsetWidth + this.offset,
  629 + euIdObjTop(this.idObjectHook) + (this.idObjectHook.offsetHeight/2));
  630 + else if (this.objectAlign==euCENTER){
  631 + if (this.position==euUP || this.position==euDOWN || this.position==euHORIZONTAL)
  632 + this.setCenterPos(
  633 + euIdObjLeft(this.idObjectHook) + (this.idObjectHook.offsetWidth/2),
  634 + euIdObjTop(this.idObjectHook) + (this.idObjectHook.offsetHeight/2) - this.offset);
  635 + else
  636 + this.setCenterPos(
  637 + euIdObjLeft(this.idObjectHook) + (this.idObjectHook.offsetWidth/2) + this.offset,
  638 + euIdObjTop(this.idObjectHook) + (this.idObjectHook.offsetHeight/2));
  639 + }
  640 + };
  641 +
  642 + this.setScreenAlign = function(align,offset){
  643 + this.offset=offset;
  644 + this.align = euSCREEN;
  645 + if (align==euUP)
  646 + this.position=euDOWN;
  647 + else if (align==euDOWN)
  648 + this.position=euUP;
  649 + else if (align==euLEFT)
  650 + this.position=euRIGHT;
  651 + else if (align==euRIGHT)
  652 + this.position=euLEFT;
  653 + this.setScreenCoord();
  654 + };
  655 +
  656 + this.setScreenCoord = function(){
  657 + euDimensioni();
  658 + offsEut();
  659 + if (this.position==euDOWN)
  660 + this.setCenterPos(
  661 + euEnv.euScrOfX+euEnv.euFrameWidth/2,
  662 + euEnv.euScrOfY+this.offset);
  663 + else if (this.position==euUP)
  664 + this.setCenterPos(
  665 + euEnv.euScrOfX+euEnv.euFrameWidth/2,
  666 + euEnv.euScrOfY+euEnv.euFrameHeight-this.offset);
  667 + else if (this.position==euRIGHT)
  668 + this.setCenterPos(
  669 + euEnv.euScrOfX+this.offset,
  670 + euEnv.euScrOfY+euEnv.euFrameHeight/2);
  671 + else if (this.position==euLEFT)
  672 + this.setCenterPos(
  673 + euEnv.euScrOfX+euEnv.euFrameWidth-this.offset,
  674 + euEnv.euScrOfY+euEnv.euFrameHeight/2);
  675 + };
  676 +
  677 + this.refreshDiv = function(){
  678 + if (this.position==euDOWN){
  679 + this.setPos(this.centerPosX-this.getWidth()/2,this.centerPosY+this.iconOffset);
  680 + }else if (this.position==euUP){
  681 + this.setPos(this.centerPosX-this.getWidth()/2,this.centerPosY-this.getHeight()-this.iconOffset);
  682 + }else if (this.position==euRIGHT){
  683 + this.setPos(this.centerPosX+this.iconOffset,this.centerPosY-this.getHeight()/2);
  684 + }else if (this.position==euLEFT){
  685 + this.setPos(this.centerPosX-this.getWidth()-this.iconOffset,this.centerPosY-this.getHeight()/2);
  686 + }else if (this.position==euHORIZONTAL){
  687 + this.setPos(this.centerPosX-this.getWidth()/2,this.centerPosY-this.getHeight()/2+this.iconOffset);
  688 + }else if (this.position==euVERTICAL){
  689 + this.setPos(this.centerPosX-this.getWidth()/2+this.iconOffset,this.centerPosY-this.getHeight()/2);
  690 + }
  691 + if (this.bar){
  692 + if (this.position==euDOWN){
  693 + this.setBarPos(this.centerPosX-this.getWidth()/2,this.centerPosY);
  694 + }else if (this.position==euUP){
  695 + this.setBarPos(this.centerPosX-this.getWidth()/2,this.centerPosY-this.bar.getSize());
  696 + }else if (this.position==euRIGHT){
  697 + this.setBarPos(this.centerPosX,this.centerPosY-this.getHeight()/2);
  698 + }else if (this.position==euLEFT){
  699 + this.setBarPos(this.centerPosX-this.bar.getSize(),this.centerPosY-this.getHeight()/2);
  700 + }else if (this.position==euHORIZONTAL){
  701 + this.setBarPos(this.centerPosX-this.getWidth()/2,this.centerPosY-this.bar.getSize()/2);
  702 + }else if(this.position==euVERTICAL){
  703 + this.setBarPos(this.centerPosX-this.bar.getSize()/2,this.centerPosY-this.getHeight()/2);
  704 + }
  705 + }
  706 + }
  707 +
  708 + this.riposition = function(){
  709 + if (this.align == euSCREEN)
  710 + this.setScreenCoord();
  711 + else if (this.align == euOBJECT)
  712 + this.setObjectCoord();
  713 + };
  714 +
  715 + this.setCenterPos = function(x,y){
  716 + this.centerPosX = x;
  717 + this.centerPosY = y;
  718 + this.refreshDiv();
  719 + };
  720 +
  721 + this.setPos = function(x,y){
  722 + this.setPosX(x);
  723 + this.setPosY(y);
  724 + };
  725 +
  726 + this.setBarPos = function(x,y){
  727 + this.setBarPosX(x);
  728 + this.setBarPosY(y);
  729 + };
  730 +
  731 + this.setDim = function(w,h){
  732 + this.setWidth(w);
  733 + this.setHeight(h);
  734 + };
  735 +
  736 +
  737 + this.setBarPosX = function(x) {document.getElementById(this.id+"_bar").style.left=x+'px';};
  738 + this.setBarPosY = function(y) {document.getElementById(this.id+"_bar").style.top=y+'px';};
  739 +
  740 + this.getPosX = function() {return document.getElementById(this.id).style.left.replace(/[^0-9]/g,"");};
  741 + this.setPosX = function(x) {document.getElementById(this.id).style.left=x+'px';};
  742 + this.getPosY = function() {return document.getElementById(this.id).style.top.replace(/[^0-9]/g,"");};
  743 + this.setPosY = function(y) {document.getElementById(this.id).style.top=y+'px';};
  744 + this.getWidth = function() {return document.getElementById(this.id).style.width.replace(/[^0-9]/g,"");};
  745 + this.setWidth = function(w){document.getElementById(this.id).style.width=Math.round(w)+'px';};
  746 + this.getHeight = function() {return document.getElementById(this.id).style.height.replace(/[^0-9]/g,"");};
  747 + this.setHeight = function(h){document.getElementById(this.id).style.height=Math.round(h)+'px';};
  748 +
  749 + this.getVenusWidth = function() {return this.venusHillSize*this.getWidth();};
  750 + this.getVenusHeight = function() {return this.venusHillSize*this.getHeight();};
  751 +
  752 + this.getMouseRelativeX = function(){return this.mouseX-euIdObjLeft(this.div);};
  753 + this.getMouseRelativeY = function(){return this.mouseY-euIdObjTop(this.div);};
  754 +
  755 + this.updateDims = function(){
  756 + var bakWidth = 0;
  757 + var bakHeight = 0;
  758 + for (var i in this.iconsArray) if (this.iconsArray[i].id){
  759 + if (this.position==euUP || this.position==euDOWN || this.position==euHORIZONTAL){
  760 + bakWidth += this.iconsArray[i].getWidth();
  761 + bakHeight = (this.iconsArray[i].getHeight()>bakHeight)?this.iconsArray[i].getHeight():bakHeight;
  762 + bakHeight = Math.round(bakHeight);
  763 + }else{
  764 + bakHeight += this.iconsArray[i].getHeight();
  765 + bakWidth = (this.iconsArray[i].getWidth()>bakWidth)?this.iconsArray[i].getWidth():bakWidth;
  766 + bakWidth = Math.round(bakWidth);
  767 + }
  768 + }
  769 +
  770 + if (this.bar){
  771 + if (this.position==euUP || this.position==euDOWN || this.position==euHORIZONTAL)
  772 + this.bar.setProperties(bakWidth,this.position)
  773 + else
  774 + this.bar.setProperties(bakHeight,this.position)
  775 + this.bar.refresh();
  776 + }
  777 +
  778 + //bakWidth=Math.ceil(bakWidth);
  779 + //bakHeight=Math.ceil(bakHeight);
  780 +
  781 + var posx=0;
  782 + var posy=0;
  783 + var updPosX=0;
  784 + var updPosY=0;
  785 + for (var i in this.iconsArray) if (this.iconsArray[i].id){
  786 + if (this.position==euDOWN){
  787 + updPosX=posx;
  788 + updPosY=posy;
  789 + posx+=this.iconsArray[i].getWidth();
  790 + }else if (this.position==euUP){
  791 + updPosX=posx;
  792 + updPosY=bakHeight-this.iconsArray[i].getHeight();
  793 + posx+=this.iconsArray[i].getWidth();
  794 + }else if (this.position==euRIGHT){
  795 + updPosX=posx;
  796 + updPosY=posy;
  797 + posy+=this.iconsArray[i].getHeight();
  798 + }else if (this.position==euLEFT){
  799 + updPosX=bakWidth-this.iconsArray[i].getWidth();
  800 + updPosY=posy;
  801 + posy+=this.iconsArray[i].getHeight();
  802 + }else if (this.position==euHORIZONTAL){
  803 + updPosX=posx;
  804 + updPosY=(bakHeight-this.iconsArray[i].getHeight())/2;
  805 + posx+=this.iconsArray[i].getWidth();
  806 + }else if (this.position==euVERTICAL){
  807 + updPosX=(bakWidth-this.iconsArray[i].getWidth())/2;
  808 + updPosY=posy;
  809 + posy+=this.iconsArray[i].getHeight();
  810 + }
  811 + this.iconsArray[i].setPos(updPosX,updPosY);
  812 + this.iconsArray[i].refresh();
  813 +
  814 + }
  815 +
  816 + this.setDim(bakWidth,bakHeight);
  817 + this.refreshDiv();
  818 + };
  819 +
  820 + this.kernel = function(){
  821 + if (this.isInside)
  822 + return this.kernelMouseOver();
  823 + else
  824 + return this.kernelMouseOut();
  825 + };
  826 +
  827 + this.kernelMouseOver = function(){
  828 + var ret=false;
  829 + var overI = -1;
  830 + var mouseRelX = this.getMouseRelativeX();
  831 + var mouseRelY = this.getMouseRelativeY();
  832 + var mediana;
  833 + var border;
  834 + var frameTo;
  835 + var venusWidth;
  836 + var venusHeight;
  837 + var overIcon;
  838 + var temp;
  839 + if (this.position==euUP || this.position==euDOWN || this.position==euHORIZONTAL){
  840 + venusWidth = this.getVenusWidth();
  841 + for (var i in this.iconsArray) if (this.iconsArray[i].id)
  842 + if (this.iconsArray[i].isInsideX(mouseRelX)){
  843 + overIcon=i;
  844 + border=this.iconsArray[i].getWidth()/2;
  845 + if (this.animaition==euICON){
  846 + mouseRelX = this.iconsArray[i].posX+border;
  847 + border=0;
  848 + }
  849 + try{
  850 + temp = $i(this.iconsArray[i].elementsArray[0].id);
  851 + if(temp)
  852 + {i3GEO.barraDeBotoes.mostraJanela(temp,this.iconsArray[i].dica);}
  853 + }
  854 + catch(e){}
  855 + }
  856 + for (var i in this.iconsArray) if (this.iconsArray[i].id){
  857 + mediana = this.iconsArray[i].posX+this.iconsArray[i].getWidth()/2;
  858 + if (Math.abs(mediana-mouseRelX)<=border)
  859 + mediana=mouseRelX;
  860 + else if (mediana<mouseRelX)
  861 + mediana+=this.iconsArray[i].getWidth()/2;
  862 + else if (mediana>mouseRelX)
  863 + mediana-=this.iconsArray[i].getWidth()/2;
  864 + if (this.animaition==euICON && Math.abs(i-overIcon)<=this.venusHillSize)
  865 + frameTo = this.venusHillTrans(1-Math.abs(i-overIcon)/this.venusHillSize);
  866 + else if (this.animaition==euMOUSE && Math.abs(mediana-mouseRelX)<=venusWidth)
  867 + frameTo = this.venusHillTrans(1-Math.abs(mediana-mouseRelX)/venusWidth);
  868 + else
  869 + frameTo = 0;
  870 +
  871 + if (frameTo==0 || frameTo==1 || Math.abs(frameTo-this.iconsArray[i].frame)>0.01)
  872 + ret|=this.iconsArray[i].setFrameTo(frameTo);
  873 +
  874 + if (this.animFading==euABSOLUTE)
  875 + if (this.iconsArray[i].isInsideX(mouseRelX))
  876 + ret|=this.iconsArray[i].setFadingTo(1);
  877 + else
  878 + ret|=this.iconsArray[i].setFadingTo(0);
  879 + else
  880 + ret|=this.iconsArray[i].setFadingTo(frameTo);
  881 +
  882 + }
  883 + }else{
  884 + venusHeight = this.getVenusHeight();
  885 + for (var i in this.iconsArray) if (this.iconsArray[i].id)
  886 + if (this.iconsArray[i].isInsideY(mouseRelY)){
  887 + overIcon=i;
  888 + border=this.iconsArray[i].getHeight()/2;
  889 + if (this.animaition==euICON){
  890 + mouseRelY = this.iconsArray[i].posY+border;
  891 + border=0;
  892 + }
  893 + }
  894 + for (var i in this.iconsArray) if (this.iconsArray[i].id){
  895 + mediana = this.iconsArray[i].posY+this.iconsArray[i].getHeight()/2;
  896 + if (Math.abs(mediana-mouseRelY)<=border)
  897 + mediana=mouseRelY;
  898 + else if (mediana<mouseRelY)
  899 + mediana+=this.iconsArray[i].getHeight()/2;
  900 + else if (mediana>mouseRelY)
  901 + mediana-=this.iconsArray[i].getHeight()/2;
  902 + if (this.animaition==euICON && Math.abs(i-overIcon)<=this.venusHillSize)
  903 + frameTo = this.venusHillTrans(1-Math.abs(i-overIcon)/this.venusHillSize);
  904 + else if (this.animaition==euMOUSE && Math.abs(mediana-mouseRelY)<=venusHeight)
  905 + frameTo = this.venusHillTrans(1-Math.abs(mediana-mouseRelY)/venusHeight);
  906 + else
  907 + frameTo = 0;
  908 +
  909 + if (frameTo==0 || frameTo==1 || Math.abs(frameTo-this.iconsArray[i].frame)>0.01)
  910 + ret|=this.iconsArray[i].setFrameTo(frameTo);
  911 +
  912 + if (this.animFading==euABSOLUTE)
  913 + if (this.iconsArray[i].isInsideY(mouseRelY))
  914 + ret|=this.iconsArray[i].setFadingTo(1);
  915 + else
  916 + ret|=this.iconsArray[i].setFadingTo(0);
  917 + else
  918 + ret|=this.iconsArray[i].setFadingTo(frameTo);
  919 +
  920 + }
  921 + }
  922 + if (ret)
  923 + this.updateDims();
  924 + return ret;
  925 + };
  926 +
  927 + this.kernelMouseOut = function(){
  928 + //i3GEO.barraDeBotoes.mostraJanela("","");
  929 + var ret=false;
  930 + for (var i in this.iconsArray){
  931 + if (this.iconsArray[i].id)
  932 + ret|=this.iconsArray[i].setAllFrameTo(0);
  933 + if (ret){
  934 + this.updateDims();
  935 + }
  936 + }
  937 + return ret;
  938 + };
  939 +
  940 + this.mouseOut = function(){
  941 + this.isInside=false;
  942 + euEnv.exeThreadWhiteLoop=5;
  943 + };
  944 +
  945 + this.mouseOver = function(){
  946 + this.isInside=true;
  947 + euEnv.exeThreadWhiteLoop=5;
  948 + };
  949 +
  950 + this.mouseMove = function(x,y){
  951 + var inside = isEuInside(this.div,x,y);
  952 + var ret = (this.mouseX!=x || this.mouseY!=y) && inside;
  953 +
  954 + this.mouseX=x;
  955 + this.mouseY=y;
  956 +
  957 +
  958 + if (inside!=this.isInside){
  959 + this.isInside=inside;
  960 + ret=true;
  961 + }
  962 +
  963 + for (var i in this.iconsArray) if (this.iconsArray[i].id)
  964 + ret|=this.iconsArray[i].isRunning();
  965 + return ret;
  966 + };
  967 +
  968 + this.iconParams=new Array();
  969 + this.setAllFrameStep = function(step){
  970 + this.iconParams.frameStep=step;
  971 + for (var i in this.iconsArray) if (this.iconsArray[i].id)
  972 + this.iconsArray[i].frameStep=step;
  973 + };
  974 +
  975 + this.setAllZoomFunc = function(func){
  976 + this.setAllZoomFuncW(func);
  977 + this.setAllZoomFuncH(func);
  978 + };
  979 +
  980 + this.setAllZoomFuncW = function(func){
  981 + this.iconParams.zoomFuncW=func;
  982 + for (var i in this.iconsArray) if (this.iconsArray[i].id)
  983 + this.iconsArray[i].zoomFuncW=func;
  984 + };
  985 +
  986 + this.setAllZoomFuncH = function(func){
  987 + this.iconParams.zoomFuncH=func;
  988 + for (var i in this.iconsArray) if (this.iconsArray[i].id)
  989 + this.iconsArray[i].zoomFuncH=func;
  990 + };
  991 +
  992 + this.setBar = function(args){
  993 + var id = 'euDock_bar_'+euEnv.Kost.next();
  994 + euEnv.euDockArray[id] = new euDockBar(id,this);
  995 + euEnv.euDockArray[id].setElements(args);
  996 + this.bar=euEnv.euDockArray[id];
  997 + return euEnv.euDockArray[id];
  998 + };
  999 +
  1000 + this.addIcon = function(args,params){
  1001 + //if(!id)
  1002 + //{var id = 'euDock_icon_'+euEnv.Kost.next();}
  1003 + var id = params.id;
  1004 + var id = 'euDock_icon_'+euEnv.Kost.next();
  1005 + euEnv.euDockArray[id] = new euDockIcon(id,this);
  1006 + euEnv.euDockArray[id].addElement(args);
  1007 + this.iconsArray.push(euEnv.euDockArray[id]);
  1008 + for (i in this.iconParams)
  1009 + euEnv.euDockArray[id][i]=this.iconParams[i];
  1010 + for (i in params)
  1011 + euEnv.euDockArray[id][i]=params[i];
  1012 +
  1013 + return euEnv.euDockArray[id];
  1014 + };
  1015 +
  1016 + this.delIcon = function(elem) {
  1017 + euEnv.euDockArray.splice(elem);
  1018 + euEnv.euDockArray[elem.id]=0;
  1019 + for (var i in this.iconsArray) if (this.iconsArray[i] == elem)
  1020 + this.iconsArray.splice(i,1);
  1021 + elem.destroy();
  1022 + elem=null;
  1023 + this.updateDims();
  1024 + };
  1025 +
  1026 + };
  1027 +/*
  1028 + ****************************************
  1029 + ****** euDock Object *******
  1030 + ****** (END) *******
  1031 + ****************************************
  1032 + */
  1033 +
  1034 +/*
  1035 + ****************************************
  1036 + ****** euDock Icon Object *******
  1037 + ****** (START) *******
  1038 + ****************************************
  1039 + */
  1040 + function euDockIcon(id,dock){
  1041 + this.id = id;
  1042 +
  1043 + this.parentDock = dock;
  1044 +
  1045 + this.elementsArray;
  1046 +
  1047 + this.zoomFuncW=euLinear30;
  1048 + this.zoomFuncH=euLinear30;
  1049 +
  1050 + this.posX = 0;
  1051 + this.posY = 0;
  1052 + this.width = 0;
  1053 + this.height = 0;
  1054 + this.frame = 0;
  1055 + this.frameStep = 0.5;
  1056 + this.fadingFrame = 0;
  1057 + this.fadingStep = 1;
  1058 + this.fadingType = euTRANSPARENT;
  1059 +
  1060 + this.loaded = false;
  1061 + this.runningFrame = false;
  1062 + this.runningFading = false;
  1063 +
  1064 + this.updateDims = function(){
  1065 + if (!this.loaded)return;
  1066 +
  1067 + for (var i=0;i<this.elementsArray.length;i++)
  1068 + this.elementsArray[i].setProperties(this.posX,this.posY,this.getWidth(),this.getHeight());
  1069 + };
  1070 +
  1071 + this.updateFading = function(){
  1072 + if (!this.loaded)return;
  1073 + var stato = this.fadingFrame*(this.elementsArray.length-1);
  1074 + var prev = Math.floor(stato);
  1075 + var next = Math.ceil( stato);
  1076 + var fading=0;
  1077 + for (var i=0;i<this.elementsArray.length;i++){
  1078 + if (this.fadingType==euFIXED){
  1079 + if (i==next)
  1080 + fading=100-100*(i-stato);
  1081 + else if (i<next)
  1082 + fading=100;
  1083 + else
  1084 + fading=0;
  1085 + }else{
  1086 + if (i==next)
  1087 + fading=100-100*(i-stato);
  1088 + else if (i==prev){
  1089 + if (this.fadingType==euTRANSPARENT)
  1090 + fading=100-100*(stato-i);
  1091 + else
  1092 + fading=100;
  1093 + }else
  1094 + fading=0;
  1095 + }
  1096 + this.elementsArray[i].setFading(fading);
  1097 + }
  1098 + };
  1099 +
  1100 + this.refresh = function(){
  1101 + this.updateDims();
  1102 + this.updateFading();
  1103 + };
  1104 +
  1105 + this.isAbsoluteInside = function(x,y){
  1106 + x-=this.getAbsolutePosX();
  1107 + y-=this.getAbsolutePosY();
  1108 + return x>0 && y>0 && x<this.getWidth() && y<this.getHeight();
  1109 + };
  1110 +
  1111 + this.isInside = function(x,y){
  1112 + return this.isInsideX(x) && this.isInsideY(y);
  1113 + };
  1114 +
  1115 + this.isInsideX = function(x){
  1116 + return (this.loaded && (this.posX<=x) && ((this.posX+this.getWidth())>=x));
  1117 + };
  1118 +
  1119 + this.isInsideY = function(y){
  1120 + return (this.loaded && (this.posY<=y) && ((this.posY+this.getHeight())>=y));
  1121 + };
  1122 +
  1123 + this.retrieveLoadingDims = function(elem,num){
  1124 + if (elem.onLoadPrev)
  1125 + elem.onLoadPrev();
  1126 + if (num==0 && !this.loaded)
  1127 + this.setDim(elem.getWidth(),elem.getHeight());
  1128 + elem.loaded=true;
  1129 + var ret=true;
  1130 + for (var i in this.elementsArray) if (this.elementsArray[i].id)
  1131 + ret&=this.elementsArray[i].loaded
  1132 + this.loaded=ret;
  1133 + if (this.loaded){
  1134 + this.parentDock.updateDims();
  1135 + for (var i in this.elementsArray) if (this.elementsArray[i].id)
  1136 + this.elementsArray[i].show();
  1137 + }
  1138 + if (elem.onLoadNext)
  1139 + elem.onLoadNext();
  1140 + };
  1141 +
  1142 + this.setPos = function(x,y){
  1143 + this.posX = x;
  1144 + this.posY = y;
  1145 + };
  1146 +
  1147 + this.setDim = function(w,h){
  1148 + if (this.width==0)
  1149 + this.width = w;
  1150 + if (this.height==0)
  1151 + this.height = h;
  1152 + };
  1153 +
  1154 + this.getAbsolutePosX = function(){return euIdObjLeft(this.parentDock.div)+this.posX;};
  1155 + this.getAbsolutePosY = function(){return euIdObjTop(this.parentDock.div)+this.posY;};
  1156 +
  1157 + this.setPosX = function(x) {this.posX=x;};
  1158 + this.setPosY = function(y) {this.posY=y;};
  1159 + this.getWidth = function() {
  1160 + if (!this.loaded)return 0;
  1161 + var calc = this.width*this.zoomFuncW(this.frame);
  1162 + //calc -= 5;
  1163 + if (calc < 38)
  1164 + {calc = 38;}
  1165 + return calc;
  1166 + };
  1167 + this.getHeight = function() {
  1168 + if (!this.loaded)return 0;
  1169 + var calc = this.height*this.zoomFuncH(this.frame);
  1170 + //calc -= 5;
  1171 + if (calc < 38)
  1172 + {calc = 38;}
  1173 + return calc;
  1174 + };
  1175 +
  1176 + this.isRunning = function(){
  1177 + return this.runningFrame || this.runningFading;
  1178 + };
  1179 +
  1180 + this.setAllFrameTo = function(to){
  1181 + this.setFadingTo(to);
  1182 + this.setFrameTo(to) ;
  1183 + return this.isRunning();
  1184 + };
  1185 +
  1186 + this.setFadingTo = function(fadingTo){
  1187 + if (this.fadingFrame==fadingTo)
  1188 + this.runningFading = false;
  1189 + else{
  1190 + if (this.fadingFrame>fadingTo)
  1191 + this.fadingFrame-=this.fadingStep;
  1192 + else
  1193 + this.fadingFrame+=this.fadingStep;
  1194 +
  1195 + this.runningFading = true;
  1196 +
  1197 + if (Math.abs(this.fadingFrame-fadingTo)<this.fadingStep)
  1198 + this.fadingFrame=fadingTo;
  1199 +
  1200 + if (this.fadingFrame<0)
  1201 + this.fadingFrame = 0;
  1202 + if (this.fadingFrame>1)
  1203 + this.fadingFrame = 1;
  1204 + }
  1205 + return this.runningFading;
  1206 + };
  1207 +
  1208 + this.setFrameTo = function(frameTo){
  1209 + //frameTo=(Math.round(frameTo*100))/100;
  1210 + if (this.frame==frameTo)
  1211 + this.runningFrame = false;
  1212 + else{
  1213 + this.runningFrame = true;
  1214 +
  1215 + this.frame+=(frameTo-this.frame)*this.frameStep;
  1216 +
  1217 + if (Math.abs(this.frame-frameTo)<0.01)
  1218 + this.frame=frameTo;
  1219 +
  1220 +
  1221 + if (this.frame<0)
  1222 + this.frame = 0;
  1223 + if (this.frame>1)
  1224 + this.frame = 1;
  1225 + }
  1226 + return this.runningFrame;
  1227 + };
  1228 +
  1229 + this.addElement = function(args){
  1230 + if (typeof(args)!="undefined" && args!=null){
  1231 + this.elementsArray=new Array();
  1232 + this.fadingStep = 0.5/args.length;
  1233 +
  1234 + for (var i=0;i<args.length;i++)
  1235 + for (var ii in args[i]){
  1236 + var id = "euDock_"+ii+"_"+euEnv.Kost.next();
  1237 + euEnv.euDockArray[id]= new window[ii](id,args[i][ii],this.parentDock.div,"euEnv.euDockArray."+this.id+".retrieveLoadingDims(euEnv.euDockArray."+id+","+i+");");
  1238 + this.elementsArray.push(euEnv.euDockArray[id]);
  1239 + euEnv.euDockArray[id].loaded=false;
  1240 + }
  1241 + }
  1242 + };
  1243 +
  1244 + this.destroy = function() {
  1245 + for (var i in this.elementsArray) if (this.elementsArray[i].id){
  1246 + euEnv.euDockArray[this.elementsArray[i].id]=0;
  1247 + euEnv.euDockArray.splice(this.elementsArray[i],1);
  1248 + this.elementsArray[i].destroy();
  1249 + }
  1250 + this.elementsArray.splice(0,this.elementsArray.length);
  1251 + };
  1252 +
  1253 + this.mouseClick = function(x,y){
  1254 + if (this.isAbsoluteInside(x,y)){
  1255 + if (this.link)
  1256 + if (this.target){
  1257 + if (top.frames[this.target])
  1258 + top.frames[this.target].location.href=this.link;
  1259 + else
  1260 + top.frames[this.target] = window.open(this.link,this.target,"");
  1261 + }else
  1262 + document.location.href=this.link;
  1263 + else if (this.mouseInsideClick)
  1264 + this.mouseInsideClick(x,y,this.id,this.getAbsolutePosX(),this.getAbsolutePosY());
  1265 + }
  1266 + };
  1267 +
  1268 + };
  1269 +/*
  1270 + ****************************************
  1271 + ****** euDock Icon Object *******
  1272 + ****** (END) *******
  1273 + ****************************************
  1274 + */
  1275 +
  1276 + /*
  1277 + ****************************************
  1278 + ****** euDock Bar Object *******
  1279 + ****** (START) *******
  1280 + ****************************************
  1281 + */
  1282 + function euDockBar(id,dock){
  1283 + this.id = id;
  1284 +
  1285 + this.parentDock = dock;
  1286 +
  1287 + this.elementsArray=new Array();
  1288 +
  1289 + this.len=0;
  1290 + this.align=euUP;
  1291 +
  1292 + this.loaded = false;
  1293 +
  1294 + this.getSize = function(){
  1295 + if (!this.loaded)
  1296 + return 0;
  1297 + if (this.align==euUP || this.align==euDOWN || this.align==euHORIZONTAL)
  1298 + return this.elementsArray.left.getHeight();
  1299 + else
  1300 + return this.elementsArray.top.getWidth();
  1301 + };
  1302 +
  1303 + this.refresh = function(){
  1304 + if (!this.loaded)
  1305 + return;
  1306 + if (this.align==euUP || this.align==euDOWN || this.align==euHORIZONTAL){
  1307 + this.elementsArray.left.setPos(-this.elementsArray.left.getWidth(),0);
  1308 + this.elementsArray.horizontal.setProperties(0,0,Math.round(this.len),this.getSize());
  1309 + this.elementsArray.right.setPos(Math.round(this.len),0);
  1310 + this.elementsArray.left.show();
  1311 + this.elementsArray.horizontal.show();
  1312 + this.elementsArray.right.show();
  1313 + if (this.elementsArray.top)
  1314 + this.elementsArray.top.hide();
  1315 + if (this.elementsArray.bottom)
  1316 + this.elementsArray.bottom.hide();
  1317 + if (this.elementsArray.vertical){
  1318 + this.elementsArray.vertical.setProperties(0,0,0,0);
  1319 + this.elementsArray.vertical.hide();
  1320 + }
  1321 + }else{
  1322 + this.elementsArray.top.setPos(0,-this.elementsArray.top.getHeight());
  1323 + this.elementsArray.vertical.setProperties(0,0,this.getSize(),Math.round(this.len));
  1324 + this.elementsArray.bottom.setPos(0,Math.round(this.len));
  1325 + this.elementsArray.top.show();
  1326 + this.elementsArray.vertical.show();
  1327 + this.elementsArray.bottom.show();
  1328 + if (this.elementsArray.left)
  1329 + this.elementsArray.left.hide();
  1330 + if (this.elementsArray.right)
  1331 + this.elementsArray.right.hide();
  1332 + if (this.elementsArray.horizontal){
  1333 + this.elementsArray.horizontal.setProperties(0,0,0,0);
  1334 + this.elementsArray.horizontal.hide();
  1335 + }
  1336 + }
  1337 +
  1338 + };
  1339 +
  1340 + this.setProperties = function(len,align){
  1341 + this.len=len+1;
  1342 + this.align=align;
  1343 + this.refresh();
  1344 + };
  1345 +
  1346 + this.retrieveLoadingDims = function(elem){
  1347 + if (elem.onLoadPrev)
  1348 + elem.onLoadPrev();
  1349 + elem.loaded=true;
  1350 + var ret=true;
  1351 + for (var i in this.elementsArray) if (this.elementsArray[i].id)
  1352 + ret&=this.elementsArray[i].loaded
  1353 + this.loaded=ret;
  1354 + if (this.loaded){
  1355 + this.parentDock.updateDims();
  1356 + for (var i in this.elementsArray) if (this.elementsArray[i].id)
  1357 + this.elementsArray[i].show();
  1358 + }
  1359 + if (elem.onLoadNext)
  1360 + elem.onLoadNext();
  1361 + };
  1362 +
  1363 + this.setElements = function(args){
  1364 + if (typeof(args)!="undefined" && args!=null){
  1365 + for (var i in args)
  1366 + for (var ii in args[i]){
  1367 + var id = "euDock_"+ii+"_"+euEnv.Kost.next();
  1368 + //if (this.elementsArray[i]){
  1369 + // this.elementsArray[i].hide();
  1370 + // euEnv.euDockArray[this.elementsArray[i].id]=null;
  1371 + //}
  1372 + euEnv.euDockArray[id]=new window[ii](id,args[i][ii],this.parentDock.divBar,"euEnv.euDockArray."+this.id+".retrieveLoadingDims(euEnv.euDockArray."+id+");");
  1373 + this.elementsArray[i]=euEnv.euDockArray[id];
  1374 + euEnv.euDockArray[id].loaded=false;
  1375 + }
  1376 + }
  1377 + };
  1378 + };
  1379 +/*
  1380 + ****************************************
  1381 + ****** euDock Bar Object *******
  1382 + ****** (END) *******
  1383 + ****************************************
  1384 + */
  1385 +function euThread(){
  1386 + euDimensioni();
  1387 + offsEut();
  1388 + euEnv.timeout=window.setTimeout("euThread();",euEnv.refreshTime);
  1389 +
  1390 + euEnv.exeThread = false;
  1391 + if (euEnv.mouseMoved)
  1392 + for (var i in euEnv.euDockArray)
  1393 + if (euEnv.euDockArray[i].mouseMove)
  1394 + euEnv.exeThread |= euEnv.euDockArray[i].mouseMove(euEnv.euScrOfX+euEnv.x,euEnv.euScrOfY+euEnv.y);
  1395 + euEnv.mouseMoved=false;
  1396 + if (euEnv.exeThread)
  1397 + euEnv.exeThreadWhiteLoop=5;
  1398 +
  1399 + if(euEnv.exeThreadWhiteLoop>0)
  1400 + euKernel();
  1401 +
  1402 + for (var i in euEnv.euDockArray)
  1403 + if (euEnv.euDockArray[i].riposition)
  1404 + euEnv.euDockArray[i].riposition();
  1405 +};
  1406 +
  1407 +function euKernel(){
  1408 + euEnv.exeThread = false;
  1409 + for (var i in euEnv.euDockArray)
  1410 + if (euEnv.euDockArray[i].kernel)
  1411 + euEnv.exeThread |= euEnv.euDockArray[i].kernel();
  1412 +
  1413 + if (euEnv.exeThread)
  1414 + euEnv.exeThreadWhiteLoop=5;
  1415 + else
  1416 + euEnv.exeThreadWhiteLoop--;
  1417 +};
  1418 +
  1419 +function on_MouseMove(e) {
  1420 + if (!e) var e = window.event;
  1421 + euEnv.x = e.clientX;
  1422 + euEnv.y = e.clientY;
  1423 + euEnv.mouseMoved = true;
  1424 + if (euEnv.onmousemoveBK)
  1425 + return euEnv.onmousemoveBK(e);
  1426 + return true;
  1427 +};
  1428 +
  1429 +function on_MouseDown(e) {
  1430 + if (!e) var e = window.event;
  1431 + for (var i in euEnv.euDockArray)
  1432 + if (euEnv.euDockArray[i].mouseDown)
  1433 + euEnv.exeThread |= euEnv.euDockArray[i].mouseDown(euEnv.euScrOfX+e.clientX,euEnv.euScrOfY+e.clientY);
  1434 + if (euEnv.onmousedownBK)
  1435 + return euEnv.onmousedownBK(e);
  1436 + return true;
  1437 +};
  1438 +
  1439 +function on_MouseUp(e) {
  1440 + if (!e) var e = window.event;
  1441 + for (var i in euEnv.euDockArray)
  1442 + if (euEnv.euDockArray[i].mouseUp)
  1443 + euEnv.exeThread |= euEnv.euDockArray[i].mouseUp(euEnv.euScrOfX+e.clientX,euEnv.euScrOfY+e.clientY);
  1444 + if (euEnv.onmouseupBK)
  1445 + return euEnv.onmouseupBK(e);
  1446 + return true;
  1447 +};
  1448 +
  1449 +function on_MouseClick(e) {
  1450 + if (!e) var e = window.event;
  1451 + for (var i in euEnv.euDockArray)
  1452 + if (euEnv.euDockArray[i].mouseClick)
  1453 + euEnv.exeThread |= euEnv.euDockArray[i].mouseClick(euEnv.euScrOfX+e.clientX,euEnv.euScrOfY+e.clientY);
  1454 + if (euEnv.onclickBK)
  1455 + return euEnv.onclickBK(e);
  1456 + return true;
  1457 +};
  1458 +
  1459 +if (document.onmousemove)
  1460 + euEnv.onmousemoveBK = document.onmousemove;
  1461 +document.onmousemove = on_MouseMove;
  1462 +
  1463 +if (document.onmousedown)
  1464 + euEnv.onmousedownBK = document.onmousedown;
  1465 +document.onmousedown = on_MouseDown;
  1466 +
  1467 +if (document.onmouseup)
  1468 + euEnv.onmouseupBK = document.onmouseup;
  1469 +document.onmouseup = on_MouseUp;
  1470 +
  1471 +if (document.onclick)
  1472 + euEnv.onclickBK = document.onclick;
  1473 +document.onclick = on_MouseClick;
  1474 +
  1475 +euDimensioni();
  1476 +offsEut();
  1477 +euThread();
  1478 +
  1479 +
  1480 +
  1481 +/*
  1482 + * euDock.Image
  1483 + *
  1484 + * euDock 2.0.06 plugin
  1485 + *
  1486 + * Copyright (C) 2006 Parodi (Pier...) Eugenio <eudock@inwind.it>
  1487 + * http://eudock.jules.it
  1488 + *
  1489 + * This library is free software; you can redistribute it and/or
  1490 + * modify it under the terms of the GNU Lesser General Public
  1491 + * License as published by the Free Software Foundation; either
  1492 + * version 2.1 of the License, or (at your option) any later version.
  1493 + *
  1494 + * This library is distributed in the hope that it will be useful,
  1495 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  1496 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1497 + * Lesser General Public License for more details.
  1498 + *
  1499 + * You should have received a copy of the GNU Lesser General Public
  1500 + * License along with this library; if not, write to the Free Software
  1501 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  1502 + *
  1503 + */
  1504 +
  1505 + /*
  1506 + *
  1507 + * This program is absolutely free...
  1508 + * ...BUT...
  1509 + * If you modify(OR TRY TO DO THAT)this Source Code,
  1510 + * my SOUL will carry you some monstrous Nightmares
  1511 + *
  1512 + * Have a nice day
  1513 + * enjoy yourself.
  1514 + * Pier...
  1515 + *
  1516 + * (Sorry but I'm Italian not an American writer)
  1517 + * (...a day Maybe...)
  1518 + */
  1519 +
  1520 +
  1521 + function euPreloadImage(a) {
  1522 + var d=document;
  1523 + if(d.images){
  1524 + if(!d.p) d.p=new Array();
  1525 + d.p.push(new Image());
  1526 + d.p[d.p.length-1].src=a;
  1527 + }
  1528 + };
  1529 +
  1530 +if (!euEnv.imageBasePath)
  1531 + euEnv.imageBasePath = "./";
  1532 +/*
  1533 + ****************************************
  1534 + ****** euImage Object *******
  1535 + ****** (START) *******
  1536 + ****************************************
  1537 + */
  1538 + function euImage(id,args,container,onLoadFunc){
  1539 + if (!args.PngObjIE)
  1540 + args.PngObjIE=euImageIE_PNG;
  1541 + if (typeof( window.innerWidth ) != 'number' && args.image.toLowerCase().indexOf("png")!=-1)
  1542 + return new args.PngObjIE(id,args,container,onLoadFunc);
  1543 + this.id = id;
  1544 + //edmar
  1545 + //if(args.id !== undefined)
  1546 + //{this.id = args.id;}
  1547 + this.container = container;
  1548 +
  1549 + euPreloadImage(args.image);
  1550 +
  1551 + this.setProperties = function(x,y,w,h){
  1552 + this.setPos(x,y);
  1553 + this.setDim(w,h);
  1554 + };
  1555 +
  1556 + this.setPos = function(x,y){
  1557 + this.setPosX(x);
  1558 + this.setPosY(y);
  1559 + };
  1560 +
  1561 + this.setDim = function(w,h){
  1562 + this.setWidth(w);
  1563 + this.setHeight(h);
  1564 + };
  1565 +
  1566 + this.getPosX = function() {return document.getElementById(this.id).style.left.replace(/[^0-9]/g,"");};
  1567 + this.setPosX = function(x) {document.getElementById(this.id).style.left=x+'px';};
  1568 + this.getPosY = function() {return document.getElementById(this.id).style.top.replace(/[^0-9]/g,"");};
  1569 + this.setPosY = function(y) {document.getElementById(this.id).style.top=y+'px';};
  1570 + this.getWidth = function() {return document.getElementById(this.id).width;};
  1571 + this.setWidth = function(w){document.getElementById(this.id).width=Math.round(w);};
  1572 + this.getHeight = function() {return document.getElementById(this.id).height;};
  1573 + this.setHeight = function(h){document.getElementById(this.id).height=Math.round(h);};
  1574 +
  1575 + this.hide = function(){document.getElementById(this.id).style.visibility='hidden';};
  1576 + this.show = function(){document.getElementById(this.id).style.visibility='visible';};
  1577 +
  1578 + this.setFading = function(fad){
  1579 + fad=Math.round(fad);
  1580 + if (fad<0)
  1581 + fad=0;
  1582 + if (fad>100)
  1583 + fad=100;
  1584 + document.getElementById(this.id).style.opacity = (fad/100);
  1585 + document.getElementById(this.id).style.filter = "alpha(opacity="+(fad)+");";
  1586 + };
  1587 + //alert(id)
  1588 + this.container.innerHTML+="<img onLoad='"+onLoadFunc+";' id='"+this.id+"' src='"+args.image+"' style='position:absolute;visibility:hidden;'>";
  1589 +
  1590 + this.destroy = function(){
  1591 + this.container.removeChild(document.getElementById(this.id));
  1592 + };
  1593 + };
  1594 +/*
  1595 + ****************************************
  1596 + ****** euImage Object *******
  1597 + ****** (END) *******
  1598 + ****************************************
  1599 + */
  1600 +
  1601 + /*
  1602 + ****************************************
  1603 + ****** euImageIE_PNG Object *******
  1604 + ****** (START) *******
  1605 + ****************************************
  1606 + */
  1607 + function euImageIE_PNG(id,args,container,onLoadFunc){
  1608 + this.id = id;
  1609 + this.container = container;
  1610 +
  1611 + euPreloadImage(args.image);
  1612 +
  1613 + this.setProperties = function(x,y,w,h){
  1614 + this.setPos(x,y);
  1615 + this.setDim(w,h);
  1616 + };
  1617 +
  1618 + this.setPos = function(x,y){
  1619 + this.setPosX(x);
  1620 + this.setPosY(y);
  1621 + };
  1622 +
  1623 + this.setDim = function(w,h){
  1624 + this.setWidth(w);
  1625 + this.setHeight(h);
  1626 + };
  1627 +
  1628 + this.getPosX = function() {return document.getElementById(this.id).style.left.replace(/[^0-9]/g,"");};
  1629 + this.setPosX = function(x) {
  1630 + document.getElementById(this.id).style.left=x+'px';
  1631 + };
  1632 + this.getPosY = function() {return document.getElementById(this.id).style.top.replace(/[^0-9]/g,"");};
  1633 + this.setPosY = function(y) {
  1634 + document.getElementById(this.id).style.top=y+'px';
  1635 + };
  1636 +
  1637 +
  1638 + this.getWidth = function() {if (!this.width)return 0;return this.width;};
  1639 + this.setWidth = function(w){
  1640 + if (!this.width)return;
  1641 + this.width=Math.round(w);
  1642 + document.getElementById(this.id).style.width=Math.round(w)+'px';
  1643 + document.getElementById(this.id+"_IMG").style.width=Math.round(w)+'px';
  1644 + };
  1645 + this.getHeight = function() {if (!this.height)return 0;return this.height;};
  1646 + this.setHeight = function(h){
  1647 + if (!this.height)return;
  1648 + this.height=Math.round(h);
  1649 + document.getElementById(this.id).style.height=Math.round(h)+'px';
  1650 + document.getElementById(this.id+"_IMG").style.height=Math.round(h)+'px';
  1651 + };
  1652 +
  1653 + this.onLoadPrev = function(){
  1654 + if (this.width && this.height)return;
  1655 + this.width=document.getElementById(this.id+"_IMG_BAK").width;
  1656 + this.height=document.getElementById(this.id+"_IMG_BAK").height;
  1657 + document.getElementById(this.id+"_IMG_BAK").width=0;
  1658 + document.getElementById(this.id+"_IMG_BAK").height=0;
  1659 + this.setDim(this.width,this.height);
  1660 + };
  1661 +
  1662 + this.hide = function(){document.getElementById(this.id).style.visibility='hidden';};
  1663 + this.show = function(){document.getElementById(this.id).style.visibility='visible';if (this.width && this.height)this.setDim(this.width,this.height);};
  1664 +
  1665 + this.setFading = function(fad){
  1666 + fad=Math.round(fad);
  1667 + if (fad<0)
  1668 + fad=0;
  1669 + if (fad>100)
  1670 + fad=100;
  1671 + document.getElementById(this.id).style.opacity = (fad/100);
  1672 + document.getElementById(this.id).style.filter = "alpha(opacity="+(fad)+");";
  1673 + };
  1674 +
  1675 + this.container.innerHTML+="<div id='"+this.id+"' style='position:absolute;'></div>";
  1676 + document.getElementById(this.id).innerHTML= "<img src='"+euEnv.imageBasePath+"blank.gif' id='"+this.id+"_IMG' style=\"top:0px;left:0px;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+args.image+"',sizingMethod='scale');position:absolute;\">";
  1677 + this.container.innerHTML+="<img onLoad='"+onLoadFunc+";' id='"+this.id+"_IMG_BAK' src='"+args.image+"' style='visibility:hidden;position:absolute;'>";
  1678 +
  1679 + this.destroy = function(){
  1680 + this.container.removeChild(document.getElementById(this.id));
  1681 + this.container.removeChild(document.getElementById(this.id+"_IMG_BAK"));
  1682 + };
  1683 + };
  1684 +/*
  1685 + ****************************************
  1686 + ****** euImageIE_PNG Object *******
  1687 + ****** (END) *******
  1688 + ****************************************
  1689 + */
  1690 +
  1691 + /*
  1692 + ****************************************
  1693 + *****euImageNoFadingIE_PNG Object ******
  1694 + ****** (START) *******
  1695 + ****************************************
  1696 + */
  1697 + function euImageNoFadingIE_PNG(id,args,container,onLoadFunc){
  1698 + this.id = id;
  1699 + this.container = container;
  1700 +
  1701 + euPreloadImage(args.image);
  1702 +
  1703 + this.setProperties = function(x,y,w,h){
  1704 + this.setPos(x,y);
  1705 + this.setDim(w,h);
  1706 + };
  1707 +
  1708 + this.setPos = function(x,y){
  1709 + this.setPosX(x);
  1710 + this.setPosY(y);
  1711 + };
  1712 +
  1713 + this.setDim = function(w,h){
  1714 + this.setWidth(w);
  1715 + this.setHeight(h);
  1716 + };
  1717 +
  1718 + this.getPosX = function() {return document.getElementById(this.id).style.left.replace(/[^0-9]/g,"");};
  1719 + this.setPosX = function(x) {document.getElementById(this.id).style.left=x+'px';};
  1720 + this.getPosY = function() {return document.getElementById(this.id).style.top.replace(/[^0-9]/g,"");};
  1721 + this.setPosY = function(y) {document.getElementById(this.id).style.top=y+'px';};
  1722 +
  1723 + this.getWidth = function() {if (!this.width) return 0;return this.width;};
  1724 + this.setWidth = function(w){if (!this.width) return; this.width=Math.round(w);document.getElementById(this.id).style.width=Math.round(w)+'px';};
  1725 + this.getHeight = function(){if (!this.height)return 0;return this.height;};
  1726 + this.setHeight = function(h){if (!this.height)return; this.height=Math.round(h);document.getElementById(this.id).style.height=Math.round(h)+'px';};
  1727 +
  1728 + this.hide = function(){document.getElementById(this.id).style.visibility='hidden';};
  1729 + this.show = function(){document.getElementById(this.id).style.visibility='visible';};
  1730 +
  1731 + this.onLoadPrev = function(){
  1732 + if (this.width && this.height)return;
  1733 + this.width=document.getElementById(this.id+"_IMG_BAK").width;
  1734 + this.height=document.getElementById(this.id+"_IMG_BAK").height;
  1735 + document.getElementById(this.id+"_IMG_BAK").width=0;
  1736 + document.getElementById(this.id+"_IMG_BAK").height=0;
  1737 + this.setDim(this.width,this.height);
  1738 + };
  1739 +
  1740 + this.setFading = function(fad){};
  1741 +
  1742 + this.container.innerHTML+="<img src='"+euEnv.imageBasePath+"blank.gif' id='"+this.id+"' style='position:absolute;visibility:hidden;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\""+args.image+"\",sizingMethod=\"scale\");' >";
  1743 + this.container.innerHTML+="<img onLoad='"+onLoadFunc+";' id='"+this.id+"_IMG_BAK' src='"+args.image+"' style='position:absolute;visibility:hidden;'>";
  1744 +
  1745 + this.destroy = function(){
  1746 + this.container.removeChild(document.getElementById(this.id));
  1747 + this.container.removeChild(document.getElementById(this.id+"_IMG_BAK"));
  1748 + };
  1749 + };
  1750 +/*
  1751 + ****************************************
  1752 + *****euImageNoFadingIE_PNG Object ******
  1753 + ****** (END) *******
  1754 + ****************************************
  1755 + */
  1756 +
  1757 +
382 1758 \ No newline at end of file
... ...
classesjs/i3geo_tudo_compacto45.js.php
1 1 <?php error_reporting(0);if(extension_loaded('zlib')){ob_start('ob_gzhandler');} header("Content-type: text/javascript"); ?>$i = function(id){return document.getElementById(id);};
2   -function DetectaMobile(funcao){var isIphone=false;var isTierTablet=false;var isTierIphone=false;var isTierRichCss=false;var isTierGenericMobile=false;var engineWebKit="webkit";var deviceIphone="iphone";var deviceIpod="ipod";var deviceIpad="ipad";var deviceMacPpc="macintosh";var deviceAndroid="android";var deviceGoogleTV="googletv";var deviceXoom="xoom";var deviceNuvifone="nuvifone";var deviceSymbian="symbian";var deviceS60="series60";var deviceS70="series70";var deviceS80="series80";var deviceS90="series90";var deviceWinPhone7="windows phone os 7";var deviceWinMob="windows ce";var deviceWindows="windows";var deviceIeMob="iemobile";var devicePpc="ppc";var enginePie="wm5 pie";var deviceBB="blackberry";var vndRIM="vnd.rim";var deviceBBStorm="blackberry95";var deviceBBBold="blackberry97";var deviceBBTour="blackberry96";var deviceBBCurve="blackberry89";var deviceBBTorch="blackberry 98";var deviceBBPlaybook="playbook";var devicePalm="palm";var deviceWebOS="webos";var engineBlazer="blazer";var engineXiino="xiino";var deviceKindle="kindle";var vndwap="vnd.wap";var wml="wml";var deviceBrew="brew";var deviceDanger="danger";var deviceHiptop="hiptop";var devicePlaystation="playstation";var deviceNintendoDs="nitro";var deviceNintendo="nintendo";var deviceWii="wii";var deviceXbox="xbox";var deviceArchos="archos";var engineOpera="opera";var engineNetfront="netfront";var engineUpBrowser="up.browser";var engineOpenWeb="openweb";var deviceMidp="midp";var uplink="up.link";var engineTelecaQ='teleca q';var devicePda="pda";var mini="mini";var mobile="mobile";var mobi="mobi";var maemo="maemo";var maemoTablet="tablet";var linux="linux";var qtembedded="qt embedded";var mylocom2="com2";var manuSonyEricsson="sonyericsson";var manuericsson="ericsson";var manuSamsung1="sec-sgh";var manuSony="sony";var manuHtc="htc";var svcDocomo="docomo";var svcKddi="kddi";var svcVodafone="vodafone";var disUpdate="update";var uagent=navigator.userAgent.toLowerCase();function DetectIphone(){if(uagent.search(deviceIphone)>-1){if(DetectIpad()||DetectIpod())return false;else return true}else return false}function DetectIpod(){if(uagent.search(deviceIpod)>-1)return true;else return false}function DetectIpad(){if(uagent.search(deviceIpad)>-1&&DetectWebkit())return true;else return false}function DetectIphoneOrIpod(){if(uagent.search(deviceIphone)>-1||uagent.search(deviceIpod)>-1)return true;else return false}function DetectAndroid(){if(DetectAndroidTablet())return false;if(uagent.search(deviceAndroid)>-1)return true;else return false}function DetectAndroidTablet(){if(uagent.search(deviceXoom)>-1)return true;else return false}function DetectAndroidWebKit(){if(DetectAndroid()&&DetectWebkit())return true;else return false}function DetectGoogleTV(){if(uagent.search(deviceGoogleTV)>-1)return true;else return false}function DetectWebkit(){if(uagent.search(engineWebKit)>-1)return true;else return false}function DetectS60OssBrowser(){if(DetectWebkit()){if((uagent.search(deviceS60)>-1||uagent.search(deviceSymbian)>-1))return true;else return false}else return false}function DetectSymbianOS(){if(uagent.search(deviceSymbian)>-1||uagent.search(deviceS60)>-1||uagent.search(deviceS70)>-1||uagent.search(deviceS80)>-1||uagent.search(deviceS90)>-1)return true;else return false}function DetectWindowsPhone7(){if(uagent.search(deviceWinPhone7)>-1)return true;else return false}function DetectWindowsMobile(){if(DetectWindowsPhone7())return false;if(uagent.search(deviceWinMob)>-1||uagent.search(deviceIeMob)>-1||uagent.search(enginePie)>-1)return true;if((uagent.search(devicePpc)>-1)&&!(uagent.search(deviceMacPpc)>-1))return true;if(uagent.search(manuHtc)>-1&&uagent.search(deviceWindows)>-1)return true;else return false}function DetectBlackBerry(){if(uagent.search(deviceBB)>-1)return true;if(uagent.search(vndRIM)>-1)return true;else return false}function DetectBlackBerryTablet(){if(uagent.search(deviceBBPlaybook)>-1)return true;else return false}function DetectBlackBerryWebKit(){if(uagent.search(deviceBB)>-1&&uagent.search(engineWebKit)>-1)return true;else return false}function DetectBlackBerryTouch(){if((uagent.search(deviceBBStorm)>-1)||(uagent.search(deviceBBTorch)>-1))return true;else return false}function DetectBlackBerryHigh(){if(DetectBlackBerryWebKit())return false;if(DetectBlackBerry()){if(DetectBlackBerryTouch()||uagent.search(deviceBBBold)>-1||uagent.search(deviceBBTour)>-1||uagent.search(deviceBBCurve)>-1)return true;else return false}else return false}function DetectBlackBerryLow(){if(DetectBlackBerry()){if(DetectBlackBerryHigh())return false;else return true}else return false}function DetectPalmOS(){if(uagent.search(devicePalm)>-1||uagent.search(engineBlazer)>-1||uagent.search(engineXiino)>-1){if(DetectPalmWebOS())return false;else return true}else return false}function DetectPalmWebOS(){if(uagent.search(deviceWebOS)>-1)return true;else return false}function DetectGarminNuvifone(){if(uagent.search(deviceNuvifone)>-1)return true;else return false}function DetectSmartphone(){if(DetectIphoneOrIpod())return true;if(DetectS60OssBrowser())return true;if(DetectSymbianOS())return true;if(DetectWindowsMobile())return true;if(DetectWindowsPhone7())return true;if(DetectAndroid())return true;if(DetectBlackBerry())return true;if(DetectPalmWebOS())return true;if(DetectPalmOS())return true;if(DetectGarminNuvifone())return true;return false};function DetectArchos(){if(uagent.search(deviceArchos)>-1)return true;else return false}function DetectBrewDevice(){if(uagent.search(deviceBrew)>-1)return true;else return false}function DetectDangerHiptop(){if(uagent.search(deviceDanger)>-1||uagent.search(deviceHiptop)>-1)return true;else return false}function DetectMaemoTablet(){if(uagent.search(maemo)>-1)return true;if(uagent.search(maemoTablet)>-1&&uagent.search(linux)>-1)return true;else return false}function DetectSonyMylo(){if(uagent.search(manuSony)>-1){if(uagent.search(qtembedded)>-1||uagent.search(mylocom2)>-1)return true;else return false}else return false}function DetectOperaMobile(){if(uagent.search(engineOpera)>-1){if(uagent.search(mini)>-1||uagent.search(mobi)>-1)return true;else return false}else return false}function DetectSonyPlaystation(){if(uagent.search(devicePlaystation)>-1)return true;else return false};function DetectNintendo(){if(uagent.search(deviceNintendo)>-1||uagent.search(deviceWii)>-1||uagent.search(deviceNintendoDs)>-1)return true;else return false};function DetectXbox(){if(uagent.search(deviceXbox)>-1)return true;else return false};function DetectGameConsole(){if(DetectSonyPlaystation())return true;if(DetectNintendo())return true;if(DetectXbox())return true;else return false};function DetectKindle(){if(uagent.search(deviceKindle)>-1)return true;else return false}function DetectMobileQuick(){if(DetectIpad())return false;if(DetectSmartphone())return true;if(uagent.search(deviceMidp)>-1||DetectBrewDevice())return true;if(DetectOperaMobile())return true;if(uagent.search(engineNetfront)>-1)return true;if(uagent.search(engineUpBrowser)>-1)return true;if(uagent.search(engineOpenWeb)>-1)return true;if(DetectDangerHiptop())return true;if(DetectMaemoTablet())return true;if(DetectArchos())return true;if((uagent.search(devicePda)>-1)&&(uagent.search(disUpdate)<0))return true;if(uagent.search(mobile)>-1)return true;if(DetectKindle())return true;return false};function DetectMobileLong(){if(DetectMobileQuick())return true;if(DetectGameConsole())return true;if(DetectSonyMylo())return true;if(uagent.search(manuSamsung1)>-1||uagent.search(manuSonyEricsson)>-1||uagent.search(manuericsson)>-1)return true;if(uagent.search(svcDocomo)>-1)return true;if(uagent.search(svcKddi)>-1)return true;if(uagent.search(svcVodafone)>-1)return true;return false};function DetectTierTablet(){if(DetectIpad()||DetectAndroidTablet()||DetectBlackBerryTablet())return true;else return false};function DetectTierIphone(){if(DetectIphoneOrIpod())return true;if(DetectAndroid())return true;if(DetectAndroidWebKit())return true;if(DetectBlackBerryWebKit())return true;if(DetectPalmWebOS())return true;if(DetectGarminNuvifone())return true;if(DetectMaemoTablet())return true;else return false};function DetectTierRichCss(){if(DetectMobileQuick()){if(DetectTierIphone())return false;if(DetectWebkit())return true;if(DetectS60OssBrowser())return true;if(DetectBlackBerryHigh())return true;if(DetectWindowsPhone7())return true;if(DetectWindowsMobile())return true;if(uagent.search(engineTelecaQ)>-1)return true;else return false}else return false};function DetectTierOtherPhones(){if(DetectMobileLong()){if(DetectTierIphone())return false;if(DetectTierRichCss())return false;else return true}else return false};if(funcao=="DetectMobileLong"){return DetectMobileLong()}if(funcao=="DetectAndroidTablet"){return DetectAndroidTablet()}if(funcao=="DetectAndroid"){return DetectAndroid()}}
3   -/*
  2 +function DetectaMobile(funcao){var isIphone=false;var isTierTablet=false;var isTierIphone=false;var isTierRichCss=false;var isTierGenericMobile=false;var engineWebKit="webkit";var deviceIphone="iphone";var deviceIpod="ipod";var deviceIpad="ipad";var deviceMacPpc="macintosh";var deviceAndroid="android";var deviceGoogleTV="googletv";var deviceXoom="xoom";var deviceNuvifone="nuvifone";var deviceSymbian="symbian";var deviceS60="series60";var deviceS70="series70";var deviceS80="series80";var deviceS90="series90";var deviceWinPhone7="windows phone os 7";var deviceWinMob="windows ce";var deviceWindows="windows";var deviceIeMob="iemobile";var devicePpc="ppc";var enginePie="wm5 pie";var deviceBB="blackberry";var vndRIM="vnd.rim";var deviceBBStorm="blackberry95";var deviceBBBold="blackberry97";var deviceBBTour="blackberry96";var deviceBBCurve="blackberry89";var deviceBBTorch="blackberry 98";var deviceBBPlaybook="playbook";var devicePalm="palm";var deviceWebOS="webos";var engineBlazer="blazer";var engineXiino="xiino";var deviceKindle="kindle";var vndwap="vnd.wap";var wml="wml";var deviceBrew="brew";var deviceDanger="danger";var deviceHiptop="hiptop";var devicePlaystation="playstation";var deviceNintendoDs="nitro";var deviceNintendo="nintendo";var deviceWii="wii";var deviceXbox="xbox";var deviceArchos="archos";var engineOpera="opera";var engineNetfront="netfront";var engineUpBrowser="up.browser";var engineOpenWeb="openweb";var deviceMidp="midp";var uplink="up.link";var engineTelecaQ='teleca q';var devicePda="pda";var mini="mini";var mobile="mobile";var mobi="mobi";var maemo="maemo";var maemoTablet="tablet";var linux="linux";var qtembedded="qt embedded";var mylocom2="com2";var manuSonyEricsson="sonyericsson";var manuericsson="ericsson";var manuSamsung1="sec-sgh";var manuSony="sony";var manuHtc="htc";var svcDocomo="docomo";var svcKddi="kddi";var svcVodafone="vodafone";var disUpdate="update";var uagent=navigator.userAgent.toLowerCase();function DetectIphone(){if(uagent.search(deviceIphone)>-1){if(DetectIpad()||DetectIpod())return false;else return true}else return false}function DetectIpod(){if(uagent.search(deviceIpod)>-1)return true;else return false}function DetectIpad(){if(uagent.search(deviceIpad)>-1&&DetectWebkit())return true;else return false}function DetectIphoneOrIpod(){if(uagent.search(deviceIphone)>-1||uagent.search(deviceIpod)>-1)return true;else return false}function DetectAndroid(){if(DetectAndroidTablet())return false;if(uagent.search(deviceAndroid)>-1)return true;else return false}function DetectAndroidTablet(){if(uagent.search(deviceXoom)>-1)return true;else return false}function DetectAndroidWebKit(){if(DetectAndroid()&&DetectWebkit())return true;else return false}function DetectGoogleTV(){if(uagent.search(deviceGoogleTV)>-1)return true;else return false}function DetectWebkit(){if(uagent.search(engineWebKit)>-1)return true;else return false}function DetectS60OssBrowser(){if(DetectWebkit()){if((uagent.search(deviceS60)>-1||uagent.search(deviceSymbian)>-1))return true;else return false}else return false}function DetectSymbianOS(){if(uagent.search(deviceSymbian)>-1||uagent.search(deviceS60)>-1||uagent.search(deviceS70)>-1||uagent.search(deviceS80)>-1||uagent.search(deviceS90)>-1)return true;else return false}function DetectWindowsPhone7(){if(uagent.search(deviceWinPhone7)>-1)return true;else return false}function DetectWindowsMobile(){if(DetectWindowsPhone7())return false;if(uagent.search(deviceWinMob)>-1||uagent.search(deviceIeMob)>-1||uagent.search(enginePie)>-1)return true;if((uagent.search(devicePpc)>-1)&&!(uagent.search(deviceMacPpc)>-1))return true;if(uagent.search(manuHtc)>-1&&uagent.search(deviceWindows)>-1)return true;else return false}function DetectBlackBerry(){if(uagent.search(deviceBB)>-1)return true;if(uagent.search(vndRIM)>-1)return true;else return false}function DetectBlackBerryTablet(){if(uagent.search(deviceBBPlaybook)>-1)return true;else return false}function DetectBlackBerryWebKit(){if(uagent.search(deviceBB)>-1&&uagent.search(engineWebKit)>-1)return true;else return false}function DetectBlackBerryTouch(){if((uagent.search(deviceBBStorm)>-1)||(uagent.search(deviceBBTorch)>-1))return true;else return false}function DetectBlackBerryHigh(){if(DetectBlackBerryWebKit())return false;if(DetectBlackBerry()){if(DetectBlackBerryTouch()||uagent.search(deviceBBBold)>-1||uagent.search(deviceBBTour)>-1||uagent.search(deviceBBCurve)>-1)return true;else return false}else return false}function DetectBlackBerryLow(){if(DetectBlackBerry()){if(DetectBlackBerryHigh())return false;else return true}else return false}function DetectPalmOS(){if(uagent.search(devicePalm)>-1||uagent.search(engineBlazer)>-1||uagent.search(engineXiino)>-1){if(DetectPalmWebOS())return false;else return true}else return false}function DetectPalmWebOS(){if(uagent.search(deviceWebOS)>-1)return true;else return false}function DetectGarminNuvifone(){if(uagent.search(deviceNuvifone)>-1)return true;else return false}function DetectSmartphone(){if(DetectIphoneOrIpod())return true;if(DetectS60OssBrowser())return true;if(DetectSymbianOS())return true;if(DetectWindowsMobile())return true;if(DetectWindowsPhone7())return true;if(DetectAndroid())return true;if(DetectBlackBerry())return true;if(DetectPalmWebOS())return true;if(DetectPalmOS())return true;if(DetectGarminNuvifone())return true;return false};function DetectArchos(){if(uagent.search(deviceArchos)>-1)return true;else return false}function DetectBrewDevice(){if(uagent.search(deviceBrew)>-1)return true;else return false}function DetectDangerHiptop(){if(uagent.search(deviceDanger)>-1||uagent.search(deviceHiptop)>-1)return true;else return false}function DetectMaemoTablet(){if(uagent.search(maemo)>-1)return true;if(uagent.search(maemoTablet)>-1&&uagent.search(linux)>-1)return true;else return false}function DetectSonyMylo(){if(uagent.search(manuSony)>-1){if(uagent.search(qtembedded)>-1||uagent.search(mylocom2)>-1)return true;else return false}else return false}function DetectOperaMobile(){if(uagent.search(engineOpera)>-1){if(uagent.search(mini)>-1||uagent.search(mobi)>-1)return true;else return false}else return false}function DetectSonyPlaystation(){if(uagent.search(devicePlaystation)>-1)return true;else return false};function DetectNintendo(){if(uagent.search(deviceNintendo)>-1||uagent.search(deviceWii)>-1||uagent.search(deviceNintendoDs)>-1)return true;else return false};function DetectXbox(){if(uagent.search(deviceXbox)>-1)return true;else return false};function DetectGameConsole(){if(DetectSonyPlaystation())return true;if(DetectNintendo())return true;if(DetectXbox())return true;else return false};function DetectKindle(){if(uagent.search(deviceKindle)>-1)return true;else return false}function DetectMobileQuick(){if(DetectIpad())return false;if(DetectSmartphone())return true;if(uagent.search(deviceMidp)>-1||DetectBrewDevice())return true;if(DetectOperaMobile())return true;if(uagent.search(engineNetfront)>-1)return true;if(uagent.search(engineUpBrowser)>-1)return true;if(uagent.search(engineOpenWeb)>-1)return true;if(DetectDangerHiptop())return true;if(DetectMaemoTablet())return true;if(DetectArchos())return true;if((uagent.search(devicePda)>-1)&&(uagent.search(disUpdate)<0))return true;if(uagent.search(mobile)>-1)return true;if(DetectKindle())return true;return false};function DetectMobileLong(){if(DetectMobileQuick())return true;if(DetectGameConsole())return true;if(DetectSonyMylo())return true;if(uagent.search(manuSamsung1)>-1||uagent.search(manuSonyEricsson)>-1||uagent.search(manuericsson)>-1)return true;if(uagent.search(svcDocomo)>-1)return true;if(uagent.search(svcKddi)>-1)return true;if(uagent.search(svcVodafone)>-1)return true;return false};function DetectTierTablet(){if(DetectIpad()||DetectAndroidTablet()||DetectBlackBerryTablet())return true;else return false};function DetectTierIphone(){if(DetectIphoneOrIpod())return true;if(DetectAndroid())return true;if(DetectAndroidWebKit())return true;if(DetectBlackBerryWebKit())return true;if(DetectPalmWebOS())return true;if(DetectGarminNuvifone())return true;if(DetectMaemoTablet())return true;else return false};function DetectTierRichCss(){if(DetectMobileQuick()){if(DetectTierIphone())return false;if(DetectWebkit())return true;if(DetectS60OssBrowser())return true;if(DetectBlackBerryHigh())return true;if(DetectWindowsPhone7())return true;if(DetectWindowsMobile())return true;if(uagent.search(engineTelecaQ)>-1)return true;else return false}else return false};function DetectTierOtherPhones(){if(DetectMobileLong()){if(DetectTierIphone())return false;if(DetectTierRichCss())return false;else return true}else return false};if(funcao=="DetectMobileLong"){return DetectMobileLong()}if(funcao=="DetectAndroidTablet"){return DetectAndroidTablet()}if(funcao=="DetectAndroid"){return DetectAndroid()}}/*
4 3 proj4js.js -- Javascript reprojection library.
5 4  
6 5 Authors: Mike Adair madairATdmsolutions.ca
... ... @@ -207,16 +206,13 @@ p.x=Proj4js.common.adjust_lon(this.long0+lam);p.y=phi;return p;},P00:.3333333333
207 206 p.x=this.x0+this.a*ksp*cosphi*Math.sin(dlon);p.y=this.y0+this.a*ksp*(this.cos_p12*sinphi-this.sin_p12*cosphi*coslon);return p;},inverse:function(p){p.x-=this.x0;p.y-=this.y0;var rh=Math.sqrt(p.x*p.x+p.y*p.y);if(rh>(2.0*Proj4js.common.HALF_PI*this.a)){Proj4js.reportError("aeqdInvDataError");return;}
208 207 var z=rh/this.a;var sinz=Math.sin(z);var cosz=Math.cos(z);var lon=this.long0;var lat;if(Math.abs(rh)<=Proj4js.common.EPSLN){lat=this.lat0;}else{lat=Proj4js.common.asinz(cosz*this.sin_p12+(p.y*sinz*this.cos_p12)/rh);var con=Math.abs(this.lat0)-Proj4js.common.HALF_PI;if(Math.abs(con)<=Proj4js.common.EPSLN){if(lat0>=0.0){lon=Proj4js.common.adjust_lon(this.long0+Math.atan2(p.x,-p.y));}else{lon=Proj4js.common.adjust_lon(this.long0-Math.atan2(-p.x,p.y));}}else{con=cosz-this.sin_p12*Math.sin(lat);if((Math.abs(con)<Proj4js.common.EPSLN)&&(Math.abs(p.x)<Proj4js.common.EPSLN)){}else{var temp=Math.atan2((p.x*sinz*this.cos_p12),(con*rh));lon=Proj4js.common.adjust_lon(this.long0+Math.atan2((p.x*sinz*this.cos_p12),(con*rh)));}}}
209 208 p.x=lon;p.y=lat;return p;}};Proj4js.Proj.moll={init:function(){},forward:function(p){var lon=p.x;var lat=p.y;var delta_lon=Proj4js.common.adjust_lon(lon-this.long0);var theta=lat;var con=Proj4js.common.PI*Math.sin(lat);for(var i=0;true;i++){var delta_theta=-(theta+Math.sin(theta)-con)/(1.0+Math.cos(theta));theta+=delta_theta;if(Math.abs(delta_theta)<Proj4js.common.EPSLN)break;if(i>=50){Proj4js.reportError("moll:Fwd:IterationError");}}
210   -theta/=2.0;if(Proj4js.common.PI/2-Math.abs(lat)<Proj4js.common.EPSLN)delta_lon=0;var x=0.900316316158*this.a*delta_lon*Math.cos(theta)+this.x0;var y=1.4142135623731*this.a*Math.sin(theta)+this.y0;p.x=x;p.y=y;return p;},inverse:function(p){var theta;var arg;p.x-=this.x0;var arg=p.y/(1.4142135623731*this.a);if(Math.abs(arg)>0.999999999999)arg=0.999999999999;var theta=Math.asin(arg);var lon=Proj4js.common.adjust_lon(this.long0+(p.x/(0.900316316158*this.a*Math.cos(theta))));if(lon<(-Proj4js.common.PI))lon=-Proj4js.common.PI;if(lon>Proj4js.common.PI)lon=Proj4js.common.PI;arg=(2.0*theta+Math.sin(2.0*theta))/Proj4js.common.PI;if(Math.abs(arg)>1.0)arg=1.0;var lat=Math.asin(arg);p.x=lon;p.y=lat;return p;}};
211   -function cpaint(){this.version='2.0.3';var config=new Array();config['debugging']=-1;config['proxy_url']='';config['transfer_mode']='GET';config['async']=true;config['response_type']='OBJECT';config['persistent_connection']=false;config['use_cpaint_api']=true;var stack_count=0;this.capable=test_ajax_capability();this.set_debug=function(){if(typeof arguments[0]=='boolean'){if(arguments[0]===true){config['debugging']=1}else{config['debugging']=0}}else if(typeof arguments[0]=='number'){config['debugging']=Math.round(arguments[0])}};this.set_proxy_url=function(){if(typeof arguments[0]=='string'){config['proxy_url']=arguments[0]}};this.set_transfer_mode=function(){if(arguments[0].toUpperCase()=='GET'||arguments[0].toUpperCase()=='POST'){config['transfer_mode']=arguments[0].toUpperCase()}};this.set_async=function(){if(typeof arguments[0]=='boolean'){config['async']=arguments[0]}};this.set_response_type=function(){if(arguments[0].toUpperCase()=='TEXT'||arguments[0].toUpperCase()=='XML'||arguments[0].toUpperCase()=='OBJECT'||arguments[0].toUpperCase()=='E4X'||arguments[0].toUpperCase()=='JSON'){config['response_type']=arguments[0].toUpperCase()}};this.set_persistent_connection=function(){if(typeof arguments[0]=='boolean'){config['persistent_connection']=arguments[0]}};this.set_use_cpaint_api=function(){if(typeof arguments[0]=='boolean'){config['use_cpaint_api']=arguments[0]}};function test_ajax_capability(){var cpc=new cpaint_call(0,config,this.version);return cpc.test_ajax_capability()}this.call=function(){var sUrl=escape(arguments[0]);var re=new RegExp("%3F","g");var sUrl=sUrl.replace(re,'?');var re=new RegExp("%3D","g");var sUrl=sUrl.replace(re,'=');var re=new RegExp("%26","g");var sUrl=sUrl.replace(re,'&');var re=new RegExp("%3A","g");var sUrl=sUrl.replace(re,':');arguments[0]=sUrl;var use_stack=-1;if(config['persistent_connection']==true&&__cpaint_stack[0]!=null){switch(__cpaint_stack[0].get_http_state()){case-1:use_stack=0;debug('no XMLHttpObject object to re-use for persistence, creating new one later',2);break;case 4:use_stack=0;debug('re-using the persistent connection',2);break;default:debug('the persistent connection is in use - skipping this request',2)}}else if(config['persistent_connection']==true){use_stack=0;__cpaint_stack[use_stack]=new cpaint_call(use_stack,config,this.version);debug('no cpaint_call object available for re-use, created new one',2)}else{use_stack=stack_count;__cpaint_stack[use_stack]=new cpaint_call(use_stack,config,this.version);debug('no cpaint_call object created new one',2)}if(use_stack!=-1){__cpaint_stack[use_stack].set_client_callback(arguments[2]);if(config['proxy_url']!=''){__cpaint_stack[use_stack].call_proxy(arguments)}else{__cpaint_stack[use_stack].call_direct(arguments)}stack_count++;debug('stack size: '+__cpaint_stack.length,2)}};var debug=function(message,debug_level){var prefix='[CPAINT Debug] ';if(debug_level<1){prefix='[CPAINT Error] '}if(config['debugging']>=debug_level){alert(prefix+message)}}}var __cpaint_stack=new Array();var __cpaint_transformer=new cpaint_transformer();function cpaint_call(){var version=arguments[2];var config=new Array();config['debugging']=arguments[1]['debugging'];config['proxy_url']=arguments[1]['proxy_url'];config['transfer_mode']=arguments[1]['transfer_mode'];config['async']=arguments[1]['async'];config['response_type']=arguments[1]['response_type'];config['persistent_connection']=arguments[1]['persistent_connection'];config['use_cpaint_api']=arguments[1]['use_cpaint_api'];var httpobj=false;var client_callback;var stack_id=arguments[0];this.set_client_callback=function(){if(typeof arguments[0]=='function'){client_callback=arguments[0]}};this.get_http_state=function(){var return_value=-1;if(typeof httpobj=='object'){return_value=httpobj.readyState}return return_value};this.call_direct=function(call_arguments){var url=call_arguments[0];var remote_method=call_arguments[1];var querystring='';var i=0;if(url=='SELF'){url=document.location.href}if(config['use_cpaint_api']==true){for(i=3;i<call_arguments.length;i++){if((typeof call_arguments[i]=='string'&&call_arguments[i]!=''&&call_arguments[i].search(/^\s+$/g)==-1)&&!isNaN(call_arguments[i])&&isFinite(call_arguments[i])){querystring+='&cpaint_argument[]='+encodeURIComponent(JSON.stringify(Number(call_arguments[i])))}else{querystring+='&cpaint_argument[]='+encodeURIComponent(JSON.stringify(call_arguments[i]))}}querystring+='&cpaint_response_type='+config['response_type'];if(config['transfer_mode']=='GET'){if(url.indexOf('?')!=-1){url=url+'&cpaint_function='+remote_method+querystring}else{url=url+'?cpaint_function='+remote_method+querystring}}else{querystring='cpaint_function='+remote_method+querystring}}else{for(i=3;i<call_arguments.length;i++){if(i==3){querystring+=encodeURIComponent(call_arguments[i])}else{querystring+='&'+encodeURIComponent(call_arguments[i])}}if(config['transfer_mode']=='GET'){url=url+querystring}}get_connection_object();debug('opening connection to "'+url+'"',1);httpobj.open(config['transfer_mode'],url,config['async']);if(config['transfer_mode']=='POST'){try{httpobj.setRequestHeader('Content-Type','application/x-www-form-urlencoded')}catch(cp_err){debug('POST cannot be completed due to incompatible browser. Use GET as your request method.',0)}}httpobj.setRequestHeader('X-Powered-By','CPAINT v'+version+' :: http://sf.net/projects/cpaint');httpobj.onreadystatechange=callback;if(config['transfer_mode']=='GET'){httpobj.send(null)}else{debug('sending query: '+querystring,1);httpobj.send(querystring)}if(config['async']==true){callback()}};this.call_proxy=function(call_arguments){var proxyscript=config['proxy_url'];var url=call_arguments[0];var remote_method=call_arguments[1];var querystring='';var i=0;var querystring_argument_prefix='cpaint_argument[]=';if(config['use_cpaint_api']==false){querystring_argument_prefix=''}for(i=3;i<call_arguments.length;i++){if(config['use_cpaint_api']==true){if((typeof call_arguments[i]=='string'&&call_arguments[i]!=''&&call_arguments[i].search(/^\s+$/g)==-1)&&!isNaN(call_arguments[i])&&isFinite(call_arguments[i])){querystring+=encodeURIComponent(querystring_argument_prefix+JSON.stringify(Number(call_arguments[i]))+'&')}else{querystring+=encodeURIComponent(querystring_argument_prefix+JSON.stringify(call_arguments[i])+'&')}}else{querystring+=encodeURIComponent(querystring_argument_prefix+call_arguments[i]+'&')}}if(config['use_cpaint_api']==true){querystring+=encodeURIComponent('&cpaint_function='+remote_method);querystring+=encodeURIComponent('&cpaint_responsetype='+config['response_type'])}if(config['transfer_mode']=='GET'){proxyscript+='?cpaint_remote_url='+encodeURIComponent(url)+'&cpaint_remote_query='+querystring+'&cpaint_remote_method='+config['transfer_mode']+'&cpaint_response_type='+config['response_type']}else{querystring='cpaint_remote_url='+encodeURIComponent(url)+'&cpaint_remote_query='+querystring+'&cpaint_remote_method='+config['transfer_mode']+'&cpaint_response_type='+config['response_type']}get_connection_object();debug('opening connection to proxy "'+proxyscript+'"',1);httpobj.open(config['transfer_mode'],proxyscript,config['async']);if(config['transfer_mode']=='POST'){try{httpobj.setRequestHeader('Content-Type','application/x-www-form-urlencoded')}catch(cp_err){debug('POST cannot be completed due to incompatible browser. Use GET as your request method.',0)}}httpobj.setRequestHeader('X-Powered-By','CPAINT v'+version);httpobj.onreadystatechange=callback;if(config['transfer_mode']=='GET'){httpobj.send(null)}else{debug('sending query: '+querystring,1);httpobj.send(querystring)}if(config['async']==false){callback()}};this.test_ajax_capability=function(){return get_connection_object()};var get_connection_object=function(){var return_value=false;var new_connection=false;if(config['persistent_connection']==false){debug('Using new connection object',1);new_connection=true}else{debug('Using shared connection object.',1);if(typeof httpobj!='object'){debug('Getting new persistent connection object.',1);new_connection=true}}if(new_connection==true){try{httpobj=new XMLHttpRequest()}catch(e1){try{httpobj=new ActiveXObject('Msxml2.XMLHTTP')}catch(e){try{httpobj=new ActiveXObject('Microsoft.XMLHTTP')}catch(oc){httpobj=null}}}if(!httpobj){debug('Could not create connection object',0)}else{return_value=true}}if(httpobj.readyState!=4){httpobj.abort()}return return_value};var callback=function(){var response=null;if(httpobj.readyState==4&&httpobj.status==200){if(httpobj.responseText==""){alert("Ocorreu um erro! Retorno vazio.");client_callback("","erro");return}debug(httpobj.responseText,1);debug('using response type '+config['response_type'],2);var r=httpobj.responseText;r=r.split("{");if(r[0]!=""&&r.length>1);{r[0]=""}var responseText=r.join("{");switch(config['response_type']){case'XML':debug(httpobj.responseXML,2);response=__cpaint_transformer.xml_conversion(httpobj.responseXML);break;case'OBJECT':response=__cpaint_transformer.object_conversion(httpobj.responseXML);break;case'TEXT':response=__cpaint_transformer.text_conversion(httpobj.responseText);break;case'E4X':response=__cpaint_transformer.e4x_conversion(httpobj.responseText);break;case'JSON':response=__cpaint_transformer.json_conversion(responseText);break;default:debug('invalid response type \''+response_type+'\'',0)}if(response!=null&&typeof client_callback=='function'){try{if(response.data)client_callback(response,responseText);else client_callback("","erro")}catch(e){client_callback("","erro")}}remove_from_stack()}else{if(httpobj.readyState==4&&httpobj.status!=200){debug('invalid HTTP response code \''+Number(httpobj.status)+'\'',0);if(httpobj.status==500){alert("Ocorreu um erro! 500");client_callback("","erro")}else{client_callback("","erro")}}}};var remove_from_stack=function(){if(typeof stack_id=='number'&&__cpaint_stack[stack_id]&&config['persistent_connection']==false){__cpaint_stack[stack_id]=null}};var debug=function(message,debug_level){var prefix='[CPAINT Debug] ';if(config['debugging']<1){prefix='[CPAINT Error] '}if(config['debugging']>=debug_level){alert(prefix+message)}if(message.search(" error")>1){client_callback("",message)}}}function cpaint_transformer(){this.object_conversion=function(xml_document){var return_value=new cpaint_result_object();var i=0;var firstNodeName='';if(typeof xml_document=='object'&&xml_document!=null){for(i=0;i<xml_document.childNodes.length;i++){if(xml_document.childNodes[i].nodeType==1){firstNodeName=xml_document.childNodes[i].nodeName;break}}var ajax_response=xml_document.getElementsByTagName(firstNodeName);return_value[firstNodeName]=new Array();for(i=0;i<ajax_response.length;i++){var tmp_node=create_object_structure(ajax_response[i]);tmp_node.id=ajax_response[i].getAttribute('id');return_value[firstNodeName].push(tmp_node)}}else{debug('received invalid XML response',0)}return return_value};this.xml_conversion=function(xml_document){return xml_document};this.text_conversion=function(text){return decode(text)};this.e4x_conversion=function(text){text=text.replace(/^\<\?xml[^>]+\>/,'');return new XML(text)};this.json_conversion=function(text){return JSON.parse(text)};var create_object_structure=function(stream){var return_value=new cpaint_result_object();var node_name='';var i=0;var attrib=0;if(stream.hasChildNodes()==true){for(i=0;i<stream.childNodes.length;i++){node_name=stream.childNodes[i].nodeName;node_name=node_name.replace(/[^a-zA-Z0-9_]*/g,'');if(typeof return_value[node_name]!='object'){return_value[node_name]=new Array()}if(stream.childNodes[i].nodeType==1){var tmp_node=create_object_structure(stream.childNodes[i]);for(attrib=0;attrib<stream.childNodes[i].attributes.length;attrib++){tmp_node.set_attribute(stream.childNodes[i].attributes[attrib].nodeName,stream.childNodes[i].attributes[attrib].nodeValue)}return_value[node_name].push(tmp_node)}else if(stream.childNodes[i].nodeType==3){return_value.data=decode(String(stream.firstChild.data))}}}return return_value};var decode=function(rawtext){var plaintext='';var i=0;var c1=0;var c2=0;var c3=0;var u=0;var t=0;while(i<rawtext.length){if(rawtext.charAt(i)=='\\'&&rawtext.charAt(i+1)=='u'){u=0;for(j=2;j<6;j+=1){t=parseInt(rawtext.charAt(i+j),16);if(!isFinite(t)){break}u=u*16+t}plaintext+=String.fromCharCode(u);i+=6}else{plaintext+=rawtext.charAt(i);i++}}if(plaintext!=''&&plaintext.search(/^\s+$/g)==-1&&!isNaN(plaintext)&&isFinite(plaintext)){plaintext=Number(plaintext)}return plaintext}}function cpaint_result_object(){this.id=0;this.data='';var __attributes=new Array();this.find_item_by_id=function(){var return_value=null;var type=arguments[0];var id=arguments[1];var i=0;if(this[type]){for(i=0;i<this[type].length;i++){if(this[type][i].get_attribute('id')==id){return_value=this[type][i];break}}}return return_value};this.get_attribute=function(){var return_value=null;var id=arguments[0];if(typeof __attributes[id]!='undefined'){return_value=__attributes[id]}return return_value};this.set_attribute=function(){__attributes[arguments[0]]=arguments[1]}}Array.prototype.______array='______array';var JSON={org:'http://www.JSON.org',copyright:'(c)2005 JSON.org',license:'http://www.crockford.com/JSON/license.html',stringify:function(arg){var c,i,l,s='',v;var numeric=true;switch(typeof arg){case'object':if(arg){if(arg.______array=='______array'){for(i in arg){if(i!='______array'&&(isNaN(i)||!isFinite(i))){numeric=false;break}}if(numeric==true){for(i=0;i<arg.length;++i){if(typeof arg[i]!='undefined'){v=this.stringify(arg[i]);if(s){s+=','}s+=v}else{s+=',null'}}return'['+s+']'}else{for(i in arg){if(i!='______array'){v=arg[i];if(typeof v!='undefined'&&typeof v!='function'){v=this.stringify(v);if(s){s+=','}s+=this.stringify(i)+':'+v}}}return'{'+s+'}'}}else if(typeof arg.toString!='undefined'){for(i in arg){v=arg[i];if(typeof v!='undefined'&&typeof v!='function'){v=this.stringify(v);if(s){s+=','}s+=this.stringify(i)+':'+v}}return'{'+s+'}'}}return'null';case'number':return isFinite(arg)?String(arg):'null';case'string':l=arg.length;s='"';for(i=0;i<l;i+=1){c=arg.charAt(i);if(c>=' '){if(c=='\\'||c=='"'){s+='\\'}s+=c}else{switch(c){case'\b':s+='\\b';break;case'\f':s+='\\f';break;case'\n':s+='\\n';break;case'\r':s+='\\r';break;case'\t':s+='\\t';break;default:c=c.charCodeAt();s+='\\u00'+Math.floor(c/16).toString(16)+(c%16).toString(16)}}}return s+'"';case'boolean':return String(arg);default:return'null'}},parse:function(text){var at=0;var ch=' ';function error(m){throw{name:'JSONError',message:m,at:at-1,text:text}};function next(){ch=text.charAt(at);at+=1;return ch};function white(){while(ch!=''&&ch<=' '){next()}};function str(){var i,s='',t,u;if(ch=='"'){outer:while(next()){if(ch=='"'){next();return s}else if(ch=='\\'){switch(next()){case'b':s+='\b';break;case'f':s+='\f';break;case'n':s+='\n';break;case'r':s+='\r';break;case't':s+='\t';break;case'u':u=0;for(i=0;i<4;i+=1){t=parseInt(next(),16);if(!isFinite(t)){break outer}u=u*16+t}s+=String.fromCharCode(u);break;default:s+=ch}}else{s+=ch}}}error("Bad string")};function arr(){var a=[];if(ch=='['){next();white();if(ch==']'){next();return a}while(ch){a.push(val());white();if(ch==']'){next();return a}else if(ch!=','){break}next();white()}}error("Bad array")};function obj(){var k,o={};if(ch=='{'){next();white();if(ch=='}'){next();return o}while(ch){k=str();white();if(ch!=':'){break}next();o[k]=val();white();if(ch=='}'){next();return o}else if(ch!=','){break}next();white()}}error("Bad object")};function assoc(){var k,a=[];if(ch=='<'){next();white();if(ch=='>'){next();return a}while(ch){k=str();white();if(ch!=':'){break}next();a[k]=val();white();if(ch=='>'){next();return a}else if(ch!=','){break}next();white()}}error("Bad associative array")};function num(){var n='',v;if(ch=='-'){n='-';next()}while(ch>='0'&&ch<='9'){n+=ch;next()}if(ch=='.'){n+='.';while(next()&&ch>='0'&&ch<='9'){n+=ch}}if(ch=='e'||ch=='E'){n+='e';next();if(ch=='-'||ch=='+'){n+=ch;next()}while(ch>='0'&&ch<='9'){n+=ch;next()}}v=+n;if(!isFinite(v)){error("Bad number")}else{return v}};function word(){switch(ch){case't':if(next()=='r'&&next()=='u'&&next()=='e'){next();return true}break;case'f':if(next()=='a'&&next()=='l'&&next()=='s'&&next()=='e'){next();return false}break;case'n':if(next()=='u'&&next()=='l'&&next()=='l'){next();return null}break}error("Syntax error")};function val(){white();switch(ch){case'{':return obj();case'[':return arr();case'<':return assoc();case'"':return str();case'-':return num();default:return ch>='0'&&ch<='9'?num():word()}};return val()}};
212   -/*
  209 +theta/=2.0;if(Proj4js.common.PI/2-Math.abs(lat)<Proj4js.common.EPSLN)delta_lon=0;var x=0.900316316158*this.a*delta_lon*Math.cos(theta)+this.x0;var y=1.4142135623731*this.a*Math.sin(theta)+this.y0;p.x=x;p.y=y;return p;},inverse:function(p){var theta;var arg;p.x-=this.x0;var arg=p.y/(1.4142135623731*this.a);if(Math.abs(arg)>0.999999999999)arg=0.999999999999;var theta=Math.asin(arg);var lon=Proj4js.common.adjust_lon(this.long0+(p.x/(0.900316316158*this.a*Math.cos(theta))));if(lon<(-Proj4js.common.PI))lon=-Proj4js.common.PI;if(lon>Proj4js.common.PI)lon=Proj4js.common.PI;arg=(2.0*theta+Math.sin(2.0*theta))/Proj4js.common.PI;if(Math.abs(arg)>1.0)arg=1.0;var lat=Math.asin(arg);p.x=lon;p.y=lat;return p;}};function cpaint(){this.version='2.0.3';var config=new Array();config['debugging']=-1;config['proxy_url']='';config['transfer_mode']='GET';config['async']=true;config['response_type']='OBJECT';config['persistent_connection']=false;config['use_cpaint_api']=true;var stack_count=0;this.capable=test_ajax_capability();this.set_debug=function(){if(typeof arguments[0]=='boolean'){if(arguments[0]===true){config['debugging']=1}else{config['debugging']=0}}else if(typeof arguments[0]=='number'){config['debugging']=Math.round(arguments[0])}};this.set_proxy_url=function(){if(typeof arguments[0]=='string'){config['proxy_url']=arguments[0]}};this.set_transfer_mode=function(){if(arguments[0].toUpperCase()=='GET'||arguments[0].toUpperCase()=='POST'){config['transfer_mode']=arguments[0].toUpperCase()}};this.set_async=function(){if(typeof arguments[0]=='boolean'){config['async']=arguments[0]}};this.set_response_type=function(){if(arguments[0].toUpperCase()=='TEXT'||arguments[0].toUpperCase()=='XML'||arguments[0].toUpperCase()=='OBJECT'||arguments[0].toUpperCase()=='E4X'||arguments[0].toUpperCase()=='JSON'){config['response_type']=arguments[0].toUpperCase()}};this.set_persistent_connection=function(){if(typeof arguments[0]=='boolean'){config['persistent_connection']=arguments[0]}};this.set_use_cpaint_api=function(){if(typeof arguments[0]=='boolean'){config['use_cpaint_api']=arguments[0]}};function test_ajax_capability(){var cpc=new cpaint_call(0,config,this.version);return cpc.test_ajax_capability()}this.call=function(){var sUrl=escape(arguments[0]);var re=new RegExp("%3F","g");var sUrl=sUrl.replace(re,'?');var re=new RegExp("%3D","g");var sUrl=sUrl.replace(re,'=');var re=new RegExp("%26","g");var sUrl=sUrl.replace(re,'&');var re=new RegExp("%3A","g");var sUrl=sUrl.replace(re,':');arguments[0]=sUrl;var use_stack=-1;if(config['persistent_connection']==true&&__cpaint_stack[0]!=null){switch(__cpaint_stack[0].get_http_state()){case-1:use_stack=0;debug('no XMLHttpObject object to re-use for persistence, creating new one later',2);break;case 4:use_stack=0;debug('re-using the persistent connection',2);break;default:debug('the persistent connection is in use - skipping this request',2)}}else if(config['persistent_connection']==true){use_stack=0;__cpaint_stack[use_stack]=new cpaint_call(use_stack,config,this.version);debug('no cpaint_call object available for re-use, created new one',2)}else{use_stack=stack_count;__cpaint_stack[use_stack]=new cpaint_call(use_stack,config,this.version);debug('no cpaint_call object created new one',2)}if(use_stack!=-1){__cpaint_stack[use_stack].set_client_callback(arguments[2]);if(config['proxy_url']!=''){__cpaint_stack[use_stack].call_proxy(arguments)}else{__cpaint_stack[use_stack].call_direct(arguments)}stack_count++;debug('stack size: '+__cpaint_stack.length,2)}};var debug=function(message,debug_level){var prefix='[CPAINT Debug] ';if(debug_level<1){prefix='[CPAINT Error] '}if(config['debugging']>=debug_level){alert(prefix+message)}}}var __cpaint_stack=new Array();var __cpaint_transformer=new cpaint_transformer();function cpaint_call(){var version=arguments[2];var config=new Array();config['debugging']=arguments[1]['debugging'];config['proxy_url']=arguments[1]['proxy_url'];config['transfer_mode']=arguments[1]['transfer_mode'];config['async']=arguments[1]['async'];config['response_type']=arguments[1]['response_type'];config['persistent_connection']=arguments[1]['persistent_connection'];config['use_cpaint_api']=arguments[1]['use_cpaint_api'];var httpobj=false;var client_callback;var stack_id=arguments[0];this.set_client_callback=function(){if(typeof arguments[0]=='function'){client_callback=arguments[0]}};this.get_http_state=function(){var return_value=-1;if(typeof httpobj=='object'){return_value=httpobj.readyState}return return_value};this.call_direct=function(call_arguments){var url=call_arguments[0];var remote_method=call_arguments[1];var querystring='';var i=0;if(url=='SELF'){url=document.location.href}if(config['use_cpaint_api']==true){for(i=3;i<call_arguments.length;i++){if((typeof call_arguments[i]=='string'&&call_arguments[i]!=''&&call_arguments[i].search(/^\s+$/g)==-1)&&!isNaN(call_arguments[i])&&isFinite(call_arguments[i])){querystring+='&cpaint_argument[]='+encodeURIComponent(JSON.stringify(Number(call_arguments[i])))}else{querystring+='&cpaint_argument[]='+encodeURIComponent(JSON.stringify(call_arguments[i]))}}querystring+='&cpaint_response_type='+config['response_type'];if(config['transfer_mode']=='GET'){if(url.indexOf('?')!=-1){url=url+'&cpaint_function='+remote_method+querystring}else{url=url+'?cpaint_function='+remote_method+querystring}}else{querystring='cpaint_function='+remote_method+querystring}}else{for(i=3;i<call_arguments.length;i++){if(i==3){querystring+=encodeURIComponent(call_arguments[i])}else{querystring+='&'+encodeURIComponent(call_arguments[i])}}if(config['transfer_mode']=='GET'){url=url+querystring}}get_connection_object();debug('opening connection to "'+url+'"',1);httpobj.open(config['transfer_mode'],url,config['async']);if(config['transfer_mode']=='POST'){try{httpobj.setRequestHeader('Content-Type','application/x-www-form-urlencoded')}catch(cp_err){debug('POST cannot be completed due to incompatible browser. Use GET as your request method.',0)}}httpobj.setRequestHeader('X-Powered-By','CPAINT v'+version+' :: http://sf.net/projects/cpaint');httpobj.onreadystatechange=callback;if(config['transfer_mode']=='GET'){httpobj.send(null)}else{debug('sending query: '+querystring,1);httpobj.send(querystring)}if(config['async']==true){callback()}};this.call_proxy=function(call_arguments){var proxyscript=config['proxy_url'];var url=call_arguments[0];var remote_method=call_arguments[1];var querystring='';var i=0;var querystring_argument_prefix='cpaint_argument[]=';if(config['use_cpaint_api']==false){querystring_argument_prefix=''}for(i=3;i<call_arguments.length;i++){if(config['use_cpaint_api']==true){if((typeof call_arguments[i]=='string'&&call_arguments[i]!=''&&call_arguments[i].search(/^\s+$/g)==-1)&&!isNaN(call_arguments[i])&&isFinite(call_arguments[i])){querystring+=encodeURIComponent(querystring_argument_prefix+JSON.stringify(Number(call_arguments[i]))+'&')}else{querystring+=encodeURIComponent(querystring_argument_prefix+JSON.stringify(call_arguments[i])+'&')}}else{querystring+=encodeURIComponent(querystring_argument_prefix+call_arguments[i]+'&')}}if(config['use_cpaint_api']==true){querystring+=encodeURIComponent('&cpaint_function='+remote_method);querystring+=encodeURIComponent('&cpaint_responsetype='+config['response_type'])}if(config['transfer_mode']=='GET'){proxyscript+='?cpaint_remote_url='+encodeURIComponent(url)+'&cpaint_remote_query='+querystring+'&cpaint_remote_method='+config['transfer_mode']+'&cpaint_response_type='+config['response_type']}else{querystring='cpaint_remote_url='+encodeURIComponent(url)+'&cpaint_remote_query='+querystring+'&cpaint_remote_method='+config['transfer_mode']+'&cpaint_response_type='+config['response_type']}get_connection_object();debug('opening connection to proxy "'+proxyscript+'"',1);httpobj.open(config['transfer_mode'],proxyscript,config['async']);if(config['transfer_mode']=='POST'){try{httpobj.setRequestHeader('Content-Type','application/x-www-form-urlencoded')}catch(cp_err){debug('POST cannot be completed due to incompatible browser. Use GET as your request method.',0)}}httpobj.setRequestHeader('X-Powered-By','CPAINT v'+version);httpobj.onreadystatechange=callback;if(config['transfer_mode']=='GET'){httpobj.send(null)}else{debug('sending query: '+querystring,1);httpobj.send(querystring)}if(config['async']==false){callback()}};this.test_ajax_capability=function(){return get_connection_object()};var get_connection_object=function(){var return_value=false;var new_connection=false;if(config['persistent_connection']==false){debug('Using new connection object',1);new_connection=true}else{debug('Using shared connection object.',1);if(typeof httpobj!='object'){debug('Getting new persistent connection object.',1);new_connection=true}}if(new_connection==true){try{httpobj=new XMLHttpRequest()}catch(e1){try{httpobj=new ActiveXObject('Msxml2.XMLHTTP')}catch(e){try{httpobj=new ActiveXObject('Microsoft.XMLHTTP')}catch(oc){httpobj=null}}}if(!httpobj){debug('Could not create connection object',0)}else{return_value=true}}if(httpobj.readyState!=4){httpobj.abort()}return return_value};var callback=function(){var response=null;if(httpobj.readyState==4&&httpobj.status==200){if(httpobj.responseText==""){alert("Ocorreu um erro! Retorno vazio.");client_callback("","erro");return}debug(httpobj.responseText,1);debug('using response type '+config['response_type'],2);var r=httpobj.responseText;r=r.split("{");if(r[0]!=""&&r.length>1);{r[0]=""}var responseText=r.join("{");switch(config['response_type']){case'XML':debug(httpobj.responseXML,2);response=__cpaint_transformer.xml_conversion(httpobj.responseXML);break;case'OBJECT':response=__cpaint_transformer.object_conversion(httpobj.responseXML);break;case'TEXT':response=__cpaint_transformer.text_conversion(httpobj.responseText);break;case'E4X':response=__cpaint_transformer.e4x_conversion(httpobj.responseText);break;case'JSON':response=__cpaint_transformer.json_conversion(responseText);break;default:debug('invalid response type \''+response_type+'\'',0)}if(response!=null&&typeof client_callback=='function'){try{if(response.data)client_callback(response,responseText);else client_callback("","erro")}catch(e){client_callback("","erro")}}remove_from_stack()}else{if(httpobj.readyState==4&&httpobj.status!=200){debug('invalid HTTP response code \''+Number(httpobj.status)+'\'',0);if(httpobj.status==500){alert("Ocorreu um erro! 500");client_callback("","erro")}else{client_callback("","erro")}}}};var remove_from_stack=function(){if(typeof stack_id=='number'&&__cpaint_stack[stack_id]&&config['persistent_connection']==false){__cpaint_stack[stack_id]=null}};var debug=function(message,debug_level){var prefix='[CPAINT Debug] ';if(config['debugging']<1){prefix='[CPAINT Error] '}if(config['debugging']>=debug_level){alert(prefix+message)}if(message.search(" error")>1){client_callback("",message)}}}function cpaint_transformer(){this.object_conversion=function(xml_document){var return_value=new cpaint_result_object();var i=0;var firstNodeName='';if(typeof xml_document=='object'&&xml_document!=null){for(i=0;i<xml_document.childNodes.length;i++){if(xml_document.childNodes[i].nodeType==1){firstNodeName=xml_document.childNodes[i].nodeName;break}}var ajax_response=xml_document.getElementsByTagName(firstNodeName);return_value[firstNodeName]=new Array();for(i=0;i<ajax_response.length;i++){var tmp_node=create_object_structure(ajax_response[i]);tmp_node.id=ajax_response[i].getAttribute('id');return_value[firstNodeName].push(tmp_node)}}else{debug('received invalid XML response',0)}return return_value};this.xml_conversion=function(xml_document){return xml_document};this.text_conversion=function(text){return decode(text)};this.e4x_conversion=function(text){text=text.replace(/^\<\?xml[^>]+\>/,'');return new XML(text)};this.json_conversion=function(text){return JSON.parse(text)};var create_object_structure=function(stream){var return_value=new cpaint_result_object();var node_name='';var i=0;var attrib=0;if(stream.hasChildNodes()==true){for(i=0;i<stream.childNodes.length;i++){node_name=stream.childNodes[i].nodeName;node_name=node_name.replace(/[^a-zA-Z0-9_]*/g,'');if(typeof return_value[node_name]!='object'){return_value[node_name]=new Array()}if(stream.childNodes[i].nodeType==1){var tmp_node=create_object_structure(stream.childNodes[i]);for(attrib=0;attrib<stream.childNodes[i].attributes.length;attrib++){tmp_node.set_attribute(stream.childNodes[i].attributes[attrib].nodeName,stream.childNodes[i].attributes[attrib].nodeValue)}return_value[node_name].push(tmp_node)}else if(stream.childNodes[i].nodeType==3){return_value.data=decode(String(stream.firstChild.data))}}}return return_value};var decode=function(rawtext){var plaintext='';var i=0;var c1=0;var c2=0;var c3=0;var u=0;var t=0;while(i<rawtext.length){if(rawtext.charAt(i)=='\\'&&rawtext.charAt(i+1)=='u'){u=0;for(j=2;j<6;j+=1){t=parseInt(rawtext.charAt(i+j),16);if(!isFinite(t)){break}u=u*16+t}plaintext+=String.fromCharCode(u);i+=6}else{plaintext+=rawtext.charAt(i);i++}}if(plaintext!=''&&plaintext.search(/^\s+$/g)==-1&&!isNaN(plaintext)&&isFinite(plaintext)){plaintext=Number(plaintext)}return plaintext}}function cpaint_result_object(){this.id=0;this.data='';var __attributes=new Array();this.find_item_by_id=function(){var return_value=null;var type=arguments[0];var id=arguments[1];var i=0;if(this[type]){for(i=0;i<this[type].length;i++){if(this[type][i].get_attribute('id')==id){return_value=this[type][i];break}}}return return_value};this.get_attribute=function(){var return_value=null;var id=arguments[0];if(typeof __attributes[id]!='undefined'){return_value=__attributes[id]}return return_value};this.set_attribute=function(){__attributes[arguments[0]]=arguments[1]}}Array.prototype.______array='______array';var JSON={org:'http://www.JSON.org',copyright:'(c)2005 JSON.org',license:'http://www.crockford.com/JSON/license.html',stringify:function(arg){var c,i,l,s='',v;var numeric=true;switch(typeof arg){case'object':if(arg){if(arg.______array=='______array'){for(i in arg){if(i!='______array'&&(isNaN(i)||!isFinite(i))){numeric=false;break}}if(numeric==true){for(i=0;i<arg.length;++i){if(typeof arg[i]!='undefined'){v=this.stringify(arg[i]);if(s){s+=','}s+=v}else{s+=',null'}}return'['+s+']'}else{for(i in arg){if(i!='______array'){v=arg[i];if(typeof v!='undefined'&&typeof v!='function'){v=this.stringify(v);if(s){s+=','}s+=this.stringify(i)+':'+v}}}return'{'+s+'}'}}else if(typeof arg.toString!='undefined'){for(i in arg){v=arg[i];if(typeof v!='undefined'&&typeof v!='function'){v=this.stringify(v);if(s){s+=','}s+=this.stringify(i)+':'+v}}return'{'+s+'}'}}return'null';case'number':return isFinite(arg)?String(arg):'null';case'string':l=arg.length;s='"';for(i=0;i<l;i+=1){c=arg.charAt(i);if(c>=' '){if(c=='\\'||c=='"'){s+='\\'}s+=c}else{switch(c){case'\b':s+='\\b';break;case'\f':s+='\\f';break;case'\n':s+='\\n';break;case'\r':s+='\\r';break;case'\t':s+='\\t';break;default:c=c.charCodeAt();s+='\\u00'+Math.floor(c/16).toString(16)+(c%16).toString(16)}}}return s+'"';case'boolean':return String(arg);default:return'null'}},parse:function(text){var at=0;var ch=' ';function error(m){throw{name:'JSONError',message:m,at:at-1,text:text}};function next(){ch=text.charAt(at);at+=1;return ch};function white(){while(ch!=''&&ch<=' '){next()}};function str(){var i,s='',t,u;if(ch=='"'){outer:while(next()){if(ch=='"'){next();return s}else if(ch=='\\'){switch(next()){case'b':s+='\b';break;case'f':s+='\f';break;case'n':s+='\n';break;case'r':s+='\r';break;case't':s+='\t';break;case'u':u=0;for(i=0;i<4;i+=1){t=parseInt(next(),16);if(!isFinite(t)){break outer}u=u*16+t}s+=String.fromCharCode(u);break;default:s+=ch}}else{s+=ch}}}error("Bad string")};function arr(){var a=[];if(ch=='['){next();white();if(ch==']'){next();return a}while(ch){a.push(val());white();if(ch==']'){next();return a}else if(ch!=','){break}next();white()}}error("Bad array")};function obj(){var k,o={};if(ch=='{'){next();white();if(ch=='}'){next();return o}while(ch){k=str();white();if(ch!=':'){break}next();o[k]=val();white();if(ch=='}'){next();return o}else if(ch!=','){break}next();white()}}error("Bad object")};function assoc(){var k,a=[];if(ch=='<'){next();white();if(ch=='>'){next();return a}while(ch){k=str();white();if(ch!=':'){break}next();a[k]=val();white();if(ch=='>'){next();return a}else if(ch!=','){break}next();white()}}error("Bad associative array")};function num(){var n='',v;if(ch=='-'){n='-';next()}while(ch>='0'&&ch<='9'){n+=ch;next()}if(ch=='.'){n+='.';while(next()&&ch>='0'&&ch<='9'){n+=ch}}if(ch=='e'||ch=='E'){n+='e';next();if(ch=='-'||ch=='+'){n+=ch;next()}while(ch>='0'&&ch<='9'){n+=ch;next()}}v=+n;if(!isFinite(v)){error("Bad number")}else{return v}};function word(){switch(ch){case't':if(next()=='r'&&next()=='u'&&next()=='e'){next();return true}break;case'f':if(next()=='a'&&next()=='l'&&next()=='s'&&next()=='e'){next();return false}break;case'n':if(next()=='u'&&next()=='l'&&next()=='l'){next();return null}break}error("Syntax error")};function val(){white();switch(ch){case'{':return obj();case'[':return arr();case'<':return assoc();case'"':return str();case'-':return num();default:return ch>='0'&&ch<='9'?num():word()}};return val()}};/*
213 210 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
214 211 Code licensed under the BSD License:
215 212 http://developer.yahoo.net/yui/license.txt
216 213 version: 2.7.0
217 214 */
218   -if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=(""+A[C]).split(".");E=YAHOO;for(B=(D[0]=="YAHOO")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]];}}return E;};YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(B&&B.log){return B.log(D,A,C);}else{return false;}};YAHOO.register=function(A,E,D){var I=YAHOO.env.modules,B,H,G,F,C;if(!I[A]){I[A]={versions:[],builds:[]};}B=I[A];H=D.version;G=D.build;F=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=E;for(C=0;C<F.length;C=C+1){F[C](B);}if(E){E.VERSION=H;E.BUILD=G;}else{YAHOO.log("mainClass is undefined for module "+A,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(A){return YAHOO.env.modules[A]||null;};YAHOO.env.ua=function(){var C={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0,caja:0},B=navigator.userAgent,A;if((/KHTML/).test(B)){C.webkit=1;}A=B.match(/AppleWebKit\/([^\s]*)/);if(A&&A[1]){C.webkit=parseFloat(A[1]);if(/ Mobile\//.test(B)){C.mobile="Apple";}else{A=B.match(/NokiaN[^\/]*/);if(A){C.mobile=A[0];}}A=B.match(/AdobeAIR\/([^\s]*)/);if(A){C.air=A[0];}}if(!C.webkit){A=B.match(/Opera[\s\/]([^\s]*)/);if(A&&A[1]){C.opera=parseFloat(A[1]);A=B.match(/Opera Mini[^;]*/);if(A){C.mobile=A[0];}}else{A=B.match(/MSIE\s([^;]*)/);if(A&&A[1]){C.ie=parseFloat(A[1]);}else{A=B.match(/Gecko\/([^\s]*)/);if(A){C.gecko=1;A=B.match(/rv:([^\s\)]*)/);if(A&&A[1]){C.gecko=parseFloat(A[1]);}}}}}A=B.match(/Caja\/([^\s]*)/);if(A&&A[1]){C.caja=parseFloat(A[1]);}return C;}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var B=YAHOO_config.listener,A=YAHOO.env.listeners,D=true,C;if(B){for(C=0;C<A.length;C=C+1){if(A[C]==B){D=false;break;}}if(D){A.push(B);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var B=YAHOO.lang,F="[object Array]",C="[object Function]",A=Object.prototype,E=["toString","valueOf"],D={isArray:function(G){return A.toString.apply(G)===F;},isBoolean:function(G){return typeof G==="boolean";},isFunction:function(G){return A.toString.apply(G)===C;},isNull:function(G){return G===null;},isNumber:function(G){return typeof G==="number"&&isFinite(G);},isObject:function(G){return(G&&(typeof G==="object"||B.isFunction(G)))||false;},isString:function(G){return typeof G==="string";},isUndefined:function(G){return typeof G==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(I,H){var G,K,J;for(G=0;G<E.length;G=G+1){K=E[G];J=H[K];if(B.isFunction(J)&&J!=A[K]){I[K]=J;}}}:function(){},extend:function(J,K,I){if(!K||!J){throw new Error("extend failed, please check that "+"all dependencies are included.");}var H=function(){},G;H.prototype=K.prototype;J.prototype=new H();J.prototype.constructor=J;J.superclass=K.prototype;if(K.prototype.constructor==A.constructor){K.prototype.constructor=K;}if(I){for(G in I){if(B.hasOwnProperty(I,G)){J.prototype[G]=I[G];}}B._IEEnumFix(J.prototype,I);}},augmentObject:function(K,J){if(!J||!K){throw new Error("Absorb failed, verify dependencies.");}var G=arguments,I,L,H=G[2];if(H&&H!==true){for(I=2;I<G.length;I=I+1){K[G[I]]=J[G[I]];}}else{for(L in J){if(H||!(L in K)){K[L]=J[L];}}B._IEEnumFix(K,J);}},augmentProto:function(J,I){if(!I||!J){throw new Error("Augment failed, verify dependencies.");}var G=[J.prototype,I.prototype],H;for(H=2;H<arguments.length;H=H+1){G.push(arguments[H]);}B.augmentObject.apply(this,G);},dump:function(G,L){var I,K,N=[],O="{...}",H="f(){...}",M=", ",J=" => ";if(!B.isObject(G)){return G+"";}else{if(G instanceof Date||("nodeType" in G&&"tagName" in G)){return G;}else{if(B.isFunction(G)){return H;}}}L=(B.isNumber(L))?L:3;if(B.isArray(G)){N.push("[");for(I=0,K=G.length;I<K;I=I+1){if(B.isObject(G[I])){N.push((L>0)?B.dump(G[I],L-1):O);}else{N.push(G[I]);}N.push(M);}if(N.length>1){N.pop();}N.push("]");}else{N.push("{");for(I in G){if(B.hasOwnProperty(G,I)){N.push(I+J);if(B.isObject(G[I])){N.push((L>0)?B.dump(G[I],L-1):O);}else{N.push(G[I]);}N.push(M);}}if(N.length>1){N.pop();}N.push("}");}return N.join("");},substitute:function(V,H,O){var L,K,J,R,S,U,Q=[],I,M="dump",P=" ",G="{",T="}",N;for(;;){L=V.lastIndexOf(G);if(L<0){break;}K=V.indexOf(T,L);if(L+1>=K){break;}I=V.substring(L+1,K);R=I;U=null;J=R.indexOf(P);if(J>-1){U=R.substring(J+1);R=R.substring(0,J);}S=H[R];if(O){S=O(R,S,U);}if(B.isObject(S)){if(B.isArray(S)){S=B.dump(S,parseInt(U,10));}else{U=U||"";N=U.indexOf(M);if(N>-1){U=U.substring(4);}if(S.toString===A.toString||N>-1){S=B.dump(S,parseInt(U,10));}else{S=S.toString();}}}else{if(!B.isString(S)&&!B.isNumber(S)){S="~-"+Q.length+"-~";Q[Q.length]=I;}}V=V.substring(0,L)+S+V.substring(K+1);}for(L=Q.length-1;L>=0;L=L-1){V=V.replace(new RegExp("~-"+L+"-~"),"{"+Q[L]+"}","g");}return V;},trim:function(G){try{return G.replace(/^\s+|\s+$/g,"");}catch(H){return G;}},merge:function(){var J={},H=arguments,G=H.length,I;for(I=0;I<G;I=I+1){B.augmentObject(J,H[I],true);}return J;},later:function(N,H,O,J,K){N=N||0;H=H||{};var I=O,M=J,L,G;if(B.isString(O)){I=H[O];}if(!I){throw new TypeError("method undefined");}if(!B.isArray(M)){M=[J];}L=function(){I.apply(H,M);};G=(K)?setInterval(L,N):setTimeout(L,N);return{interval:K,cancel:function(){if(this.interval){clearInterval(G);}else{clearTimeout(G);}}};},isValue:function(G){return(B.isObject(G)||B.isString(G)||B.isNumber(G)||B.isBoolean(G));}};B.hasOwnProperty=(A.hasOwnProperty)?function(G,H){return G&&G.hasOwnProperty(H);}:function(G,H){return !B.isUndefined(G[H])&&G.constructor.prototype[H]!==G[H];};D.augmentObject(B,D,true);YAHOO.util.Lang=B;B.augment=B.augmentProto;YAHOO.augment=B.augmentProto;YAHOO.extend=B.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.7.0",build:"1799"});
219   -/*
  215 +if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=(""+A[C]).split(".");E=YAHOO;for(B=(D[0]=="YAHOO")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]];}}return E;};YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(B&&B.log){return B.log(D,A,C);}else{return false;}};YAHOO.register=function(A,E,D){var I=YAHOO.env.modules,B,H,G,F,C;if(!I[A]){I[A]={versions:[],builds:[]};}B=I[A];H=D.version;G=D.build;F=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=E;for(C=0;C<F.length;C=C+1){F[C](B);}if(E){E.VERSION=H;E.BUILD=G;}else{YAHOO.log("mainClass is undefined for module "+A,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(A){return YAHOO.env.modules[A]||null;};YAHOO.env.ua=function(){var C={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0,caja:0},B=navigator.userAgent,A;if((/KHTML/).test(B)){C.webkit=1;}A=B.match(/AppleWebKit\/([^\s]*)/);if(A&&A[1]){C.webkit=parseFloat(A[1]);if(/ Mobile\//.test(B)){C.mobile="Apple";}else{A=B.match(/NokiaN[^\/]*/);if(A){C.mobile=A[0];}}A=B.match(/AdobeAIR\/([^\s]*)/);if(A){C.air=A[0];}}if(!C.webkit){A=B.match(/Opera[\s\/]([^\s]*)/);if(A&&A[1]){C.opera=parseFloat(A[1]);A=B.match(/Opera Mini[^;]*/);if(A){C.mobile=A[0];}}else{A=B.match(/MSIE\s([^;]*)/);if(A&&A[1]){C.ie=parseFloat(A[1]);}else{A=B.match(/Gecko\/([^\s]*)/);if(A){C.gecko=1;A=B.match(/rv:([^\s\)]*)/);if(A&&A[1]){C.gecko=parseFloat(A[1]);}}}}}A=B.match(/Caja\/([^\s]*)/);if(A&&A[1]){C.caja=parseFloat(A[1]);}return C;}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var B=YAHOO_config.listener,A=YAHOO.env.listeners,D=true,C;if(B){for(C=0;C<A.length;C=C+1){if(A[C]==B){D=false;break;}}if(D){A.push(B);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var B=YAHOO.lang,F="[object Array]",C="[object Function]",A=Object.prototype,E=["toString","valueOf"],D={isArray:function(G){return A.toString.apply(G)===F;},isBoolean:function(G){return typeof G==="boolean";},isFunction:function(G){return A.toString.apply(G)===C;},isNull:function(G){return G===null;},isNumber:function(G){return typeof G==="number"&&isFinite(G);},isObject:function(G){return(G&&(typeof G==="object"||B.isFunction(G)))||false;},isString:function(G){return typeof G==="string";},isUndefined:function(G){return typeof G==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(I,H){var G,K,J;for(G=0;G<E.length;G=G+1){K=E[G];J=H[K];if(B.isFunction(J)&&J!=A[K]){I[K]=J;}}}:function(){},extend:function(J,K,I){if(!K||!J){throw new Error("extend failed, please check that "+"all dependencies are included.");}var H=function(){},G;H.prototype=K.prototype;J.prototype=new H();J.prototype.constructor=J;J.superclass=K.prototype;if(K.prototype.constructor==A.constructor){K.prototype.constructor=K;}if(I){for(G in I){if(B.hasOwnProperty(I,G)){J.prototype[G]=I[G];}}B._IEEnumFix(J.prototype,I);}},augmentObject:function(K,J){if(!J||!K){throw new Error("Absorb failed, verify dependencies.");}var G=arguments,I,L,H=G[2];if(H&&H!==true){for(I=2;I<G.length;I=I+1){K[G[I]]=J[G[I]];}}else{for(L in J){if(H||!(L in K)){K[L]=J[L];}}B._IEEnumFix(K,J);}},augmentProto:function(J,I){if(!I||!J){throw new Error("Augment failed, verify dependencies.");}var G=[J.prototype,I.prototype],H;for(H=2;H<arguments.length;H=H+1){G.push(arguments[H]);}B.augmentObject.apply(this,G);},dump:function(G,L){var I,K,N=[],O="{...}",H="f(){...}",M=", ",J=" => ";if(!B.isObject(G)){return G+"";}else{if(G instanceof Date||("nodeType" in G&&"tagName" in G)){return G;}else{if(B.isFunction(G)){return H;}}}L=(B.isNumber(L))?L:3;if(B.isArray(G)){N.push("[");for(I=0,K=G.length;I<K;I=I+1){if(B.isObject(G[I])){N.push((L>0)?B.dump(G[I],L-1):O);}else{N.push(G[I]);}N.push(M);}if(N.length>1){N.pop();}N.push("]");}else{N.push("{");for(I in G){if(B.hasOwnProperty(G,I)){N.push(I+J);if(B.isObject(G[I])){N.push((L>0)?B.dump(G[I],L-1):O);}else{N.push(G[I]);}N.push(M);}}if(N.length>1){N.pop();}N.push("}");}return N.join("");},substitute:function(V,H,O){var L,K,J,R,S,U,Q=[],I,M="dump",P=" ",G="{",T="}",N;for(;;){L=V.lastIndexOf(G);if(L<0){break;}K=V.indexOf(T,L);if(L+1>=K){break;}I=V.substring(L+1,K);R=I;U=null;J=R.indexOf(P);if(J>-1){U=R.substring(J+1);R=R.substring(0,J);}S=H[R];if(O){S=O(R,S,U);}if(B.isObject(S)){if(B.isArray(S)){S=B.dump(S,parseInt(U,10));}else{U=U||"";N=U.indexOf(M);if(N>-1){U=U.substring(4);}if(S.toString===A.toString||N>-1){S=B.dump(S,parseInt(U,10));}else{S=S.toString();}}}else{if(!B.isString(S)&&!B.isNumber(S)){S="~-"+Q.length+"-~";Q[Q.length]=I;}}V=V.substring(0,L)+S+V.substring(K+1);}for(L=Q.length-1;L>=0;L=L-1){V=V.replace(new RegExp("~-"+L+"-~"),"{"+Q[L]+"}","g");}return V;},trim:function(G){try{return G.replace(/^\s+|\s+$/g,"");}catch(H){return G;}},merge:function(){var J={},H=arguments,G=H.length,I;for(I=0;I<G;I=I+1){B.augmentObject(J,H[I],true);}return J;},later:function(N,H,O,J,K){N=N||0;H=H||{};var I=O,M=J,L,G;if(B.isString(O)){I=H[O];}if(!I){throw new TypeError("method undefined");}if(!B.isArray(M)){M=[J];}L=function(){I.apply(H,M);};G=(K)?setInterval(L,N):setTimeout(L,N);return{interval:K,cancel:function(){if(this.interval){clearInterval(G);}else{clearTimeout(G);}}};},isValue:function(G){return(B.isObject(G)||B.isString(G)||B.isNumber(G)||B.isBoolean(G));}};B.hasOwnProperty=(A.hasOwnProperty)?function(G,H){return G&&G.hasOwnProperty(H);}:function(G,H){return !B.isUndefined(G[H])&&G.constructor.prototype[H]!==G[H];};D.augmentObject(B,D,true);YAHOO.util.Lang=B;B.augment=B.augmentProto;YAHOO.augment=B.augmentProto;YAHOO.extend=B.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.7.0",build:"1799"});/*
220 216 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
221 217 Code licensed under the BSD License:
222 218 http://developer.yahoo.net/yui/license.txt
... ... @@ -229,7 +225,6 @@ I.splice(S,1);return true;},getTarget:function(O,N){var M=O.target||O.srcElement
229 225 /* DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller */
230 226 if(EU.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var n=document.createElement("p");EU._dri=setInterval(function(){try{n.doScroll("left");clearInterval(EU._dri);EU._dri=null;EU._ready();n=null;}catch(ex){}},EU.POLL_INTERVAL);}else{if(EU.webkit&&EU.webkit<525){EU._dri=setInterval(function(){var rs=document.readyState;if("loaded"==rs||"complete"==rs){clearInterval(EU._dri);EU._dri=null;EU._ready();}},EU.POLL_INTERVAL);}else{EU._simpleAdd(document,"DOMContentLoaded",EU._ready);}}EU._simpleAdd(window,"load",EU._load);EU._simpleAdd(window,"unload",EU._unload);EU._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(A,C,F,E){this.__yui_events=this.__yui_events||{};var D=this.__yui_events[A];if(D){D.subscribe(C,F,E);
231 227 }else{this.__yui_subscribers=this.__yui_subscribers||{};var B=this.__yui_subscribers;if(!B[A]){B[A]=[];}B[A].push({fn:C,obj:F,overrideContext:E});}},unsubscribe:function(C,E,G){this.__yui_events=this.__yui_events||{};var A=this.__yui_events;if(C){var F=A[C];if(F){return F.unsubscribe(E,G);}}else{var B=true;for(var D in A){if(YAHOO.lang.hasOwnProperty(A,D)){B=B&&A[D].unsubscribe(E,G);}}return B;}return false;},unsubscribeAll:function(A){return this.unsubscribe(A);},createEvent:function(G,D){this.__yui_events=this.__yui_events||{};var A=D||{};var I=this.__yui_events;if(I[G]){}else{var H=A.scope||this;var E=(A.silent);var B=new YAHOO.util.CustomEvent(G,H,E,YAHOO.util.CustomEvent.FLAT);I[G]=B;if(A.onSubscribeCallback){B.subscribeEvent.subscribe(A.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var F=this.__yui_subscribers[G];if(F){for(var C=0;C<F.length;++C){B.subscribe(F[C].fn,F[C].obj,F[C].overrideContext);}}}return I[G];},fireEvent:function(E,D,A,C){this.__yui_events=this.__yui_events||{};var G=this.__yui_events[E];if(!G){return null;}var B=[];for(var F=1;F<arguments.length;++F){B.push(arguments[F]);}return G.fire.apply(G,B);},hasEvent:function(A){if(this.__yui_events){if(this.__yui_events[A]){return true;}}return false;}};(function(){var A=YAHOO.util.Event,C=YAHOO.lang;YAHOO.util.KeyListener=function(D,I,E,F){if(!D){}else{if(!I){}else{if(!E){}}}if(!F){F=YAHOO.util.KeyListener.KEYDOWN;}var G=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(C.isString(D)){D=document.getElementById(D);}if(C.isFunction(E)){G.subscribe(E);}else{G.subscribe(E.fn,E.scope,E.correctScope);}function H(O,N){if(!I.shift){I.shift=false;}if(!I.alt){I.alt=false;}if(!I.ctrl){I.ctrl=false;}if(O.shiftKey==I.shift&&O.altKey==I.alt&&O.ctrlKey==I.ctrl){var J,M=I.keys,L;if(YAHOO.lang.isArray(M)){for(var K=0;K<M.length;K++){J=M[K];L=A.getCharCode(O);if(J==L){G.fire(L,O);break;}}}else{L=A.getCharCode(O);if(M==L){G.fire(L,O);}}}}this.enable=function(){if(!this.enabled){A.on(D,F,H);this.enabledEvent.fire(I);}this.enabled=true;};this.disable=function(){if(this.enabled){A.removeListener(D,F,H);this.disabledEvent.fire(I);}this.enabled=false;};this.toString=function(){return"KeyListener ["+I.keys+"] "+D.tagName+(D.id?"["+D.id+"]":"");};};var B=YAHOO.util.KeyListener;B.KEYDOWN="keydown";B.KEYUP="keyup";B.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.7.0",build:"1799"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.7.0", build: "1799"});
232   -
233 228 /*
234 229 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
235 230 Code licensed under the BSD License:
... ... @@ -238,10 +233,7 @@ version: 2.7.0
238 233 */
239 234 (function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var E=YAHOO.util,L=YAHOO.lang,m=YAHOO.env.ua,A=YAHOO.lang.trim,d={},h={},N=/^t(?:able|d|h)$/i,X=/color$/i,K=window.document,W=K.documentElement,e="ownerDocument",n="defaultView",v="documentElement",t="compatMode",b="offsetLeft",P="offsetTop",u="offsetParent",Z="parentNode",l="nodeType",C="tagName",O="scrollLeft",i="scrollTop",Q="getBoundingClientRect",w="getComputedStyle",a="currentStyle",M="CSS1Compat",c="BackCompat",g="class",F="className",J="",B=" ",s="(?:^|\\s)",k="(?= |$)",U="g",p="position",f="fixed",V="relative",j="left",o="top",r="medium",q="borderLeftWidth",R="borderTopWidth",D=m.opera,I=m.webkit,H=m.gecko,T=m.ie;E.Dom={CUSTOM_ATTRIBUTES:(!W.hasAttribute)?{"for":"htmlFor","class":F}:{"htmlFor":"for","className":g},get:function(y){var AA,Y,z,x,G;if(y){if(y[l]||y.item){return y;}if(typeof y==="string"){AA=y;y=K.getElementById(y);if(y&&y.id===AA){return y;}else{if(y&&K.all){y=null;Y=K.all[AA];for(x=0,G=Y.length;x<G;++x){if(Y[x].id===AA){return Y[x];}}}}return y;}if(y.DOM_EVENTS){y=y.get("element");}if("length" in y){z=[];for(x=0,G=y.length;x<G;++x){z[z.length]=E.Dom.get(y[x]);}return z;}return y;}return null;},getComputedStyle:function(G,Y){if(window[w]){return G[e][n][w](G,null)[Y];}else{if(G[a]){return E.Dom.IE_ComputedStyle.get(G,Y);}}},getStyle:function(G,Y){return E.Dom.batch(G,E.Dom._getStyle,Y);},_getStyle:function(){if(window[w]){return function(G,y){y=(y==="float")?y="cssFloat":E.Dom._toCamel(y);var x=G.style[y],Y;if(!x){Y=G[e][n][w](G,null);if(Y){x=Y[y];}}return x;};}else{if(W[a]){return function(G,y){var x;switch(y){case"opacity":x=100;try{x=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(z){try{x=G.filters("alpha").opacity;}catch(Y){}}return x/100;case"float":y="styleFloat";default:y=E.Dom._toCamel(y);x=G[a]?G[a][y]:null;return(G.style[y]||x);}};}}}(),setStyle:function(G,Y,x){E.Dom.batch(G,E.Dom._setStyle,{prop:Y,val:x});},_setStyle:function(){if(T){return function(Y,G){var x=E.Dom._toCamel(G.prop),y=G.val;if(Y){switch(x){case"opacity":if(L.isString(Y.style.filter)){Y.style.filter="alpha(opacity="+y*100+")";if(!Y[a]||!Y[a].hasLayout){Y.style.zoom=1;}}break;case"float":x="styleFloat";default:Y.style[x]=y;}}else{}};}else{return function(Y,G){var x=E.Dom._toCamel(G.prop),y=G.val;if(Y){if(x=="float"){x="cssFloat";}Y.style[x]=y;}else{}};}}(),getXY:function(G){return E.Dom.batch(G,E.Dom._getXY);},_canPosition:function(G){return(E.Dom._getStyle(G,"display")!=="none"&&E.Dom._inDoc(G));},_getXY:function(){if(K[v][Q]){return function(y){var z,Y,AA,AF,AE,AD,AC,G,x,AB=Math.floor,AG=false;if(E.Dom._canPosition(y)){AA=y[Q]();AF=y[e];z=E.Dom.getDocumentScrollLeft(AF);Y=E.Dom.getDocumentScrollTop(AF);AG=[AB(AA[j]),AB(AA[o])];if(T&&m.ie<8){AE=2;AD=2;AC=AF[t];G=S(AF[v],q);x=S(AF[v],R);if(m.ie===6){if(AC!==c){AE=0;AD=0;}}if((AC==c)){if(G!==r){AE=parseInt(G,10);}if(x!==r){AD=parseInt(x,10);}}AG[0]-=AE;AG[1]-=AD;}if((Y||z)){AG[0]+=z;AG[1]+=Y;}AG[0]=AB(AG[0]);AG[1]=AB(AG[1]);}else{}return AG;};}else{return function(y){var x,Y,AA,AB,AC,z=false,G=y;if(E.Dom._canPosition(y)){z=[y[b],y[P]];x=E.Dom.getDocumentScrollLeft(y[e]);Y=E.Dom.getDocumentScrollTop(y[e]);AC=((H||m.webkit>519)?true:false);while((G=G[u])){z[0]+=G[b];z[1]+=G[P];if(AC){z=E.Dom._calcBorders(G,z);}}if(E.Dom._getStyle(y,p)!==f){G=y;while((G=G[Z])&&G[C]){AA=G[i];AB=G[O];if(H&&(E.Dom._getStyle(G,"overflow")!=="visible")){z=E.Dom._calcBorders(G,z);}if(AA||AB){z[0]-=AB;z[1]-=AA;}}z[0]+=x;z[1]+=Y;}else{if(D){z[0]-=x;z[1]-=Y;}else{if(I||H){z[0]+=x;z[1]+=Y;}}}z[0]=Math.floor(z[0]);z[1]=Math.floor(z[1]);}else{}return z;};}}(),getX:function(G){var Y=function(x){return E.Dom.getXY(x)[0];};return E.Dom.batch(G,Y,E.Dom,true);},getY:function(G){var Y=function(x){return E.Dom.getXY(x)[1];};return E.Dom.batch(G,Y,E.Dom,true);},setXY:function(G,x,Y){E.Dom.batch(G,E.Dom._setXY,{pos:x,noRetry:Y});},_setXY:function(G,z){var AA=E.Dom._getStyle(G,p),y=E.Dom.setStyle,AD=z.pos,Y=z.noRetry,AB=[parseInt(E.Dom.getComputedStyle(G,j),10),parseInt(E.Dom.getComputedStyle(G,o),10)],AC,x;if(AA=="static"){AA=V;y(G,p,AA);}AC=E.Dom._getXY(G);if(!AD||AC===false){return false;}if(isNaN(AB[0])){AB[0]=(AA==V)?0:G[b];}if(isNaN(AB[1])){AB[1]=(AA==V)?0:G[P];}if(AD[0]!==null){y(G,j,AD[0]-AC[0]+AB[0]+"px");}if(AD[1]!==null){y(G,o,AD[1]-AC[1]+AB[1]+"px");}if(!Y){x=E.Dom._getXY(G);if((AD[0]!==null&&x[0]!=AD[0])||(AD[1]!==null&&x[1]!=AD[1])){E.Dom._setXY(G,{pos:AD,noRetry:true});}}},setX:function(Y,G){E.Dom.setXY(Y,[G,null]);},setY:function(G,Y){E.Dom.setXY(G,[null,Y]);},getRegion:function(G){var Y=function(x){var y=false;if(E.Dom._canPosition(x)){y=E.Region.getRegion(x);}else{}return y;};return E.Dom.batch(G,Y,E.Dom,true);},getClientWidth:function(){return E.Dom.getViewportWidth();},getClientHeight:function(){return E.Dom.getViewportHeight();},getElementsByClassName:function(AB,AF,AC,AE,x,AD){AB=L.trim(AB);AF=AF||"*";AC=(AC)?E.Dom.get(AC):null||K;if(!AC){return[];}var Y=[],G=AC.getElementsByTagName(AF),z=E.Dom.hasClass;for(var y=0,AA=G.length;y<AA;++y){if(z(G[y],AB)){Y[Y.length]=G[y];}}if(AE){E.Dom.batch(Y,AE,x,AD);}return Y;},hasClass:function(Y,G){return E.Dom.batch(Y,E.Dom._hasClass,G);},_hasClass:function(x,Y){var G=false,y;if(x&&Y){y=E.Dom.getAttribute(x,F)||J;if(Y.exec){G=Y.test(y);}else{G=Y&&(B+y+B).indexOf(B+Y+B)>-1;}}else{}return G;},addClass:function(Y,G){return E.Dom.batch(Y,E.Dom._addClass,G);},_addClass:function(x,Y){var G=false,y;if(x&&Y){y=E.Dom.getAttribute(x,F)||J;if(!E.Dom._hasClass(x,Y)){E.Dom.setAttribute(x,F,A(y+B+Y));G=true;}}else{}return G;},removeClass:function(Y,G){return E.Dom.batch(Y,E.Dom._removeClass,G);},_removeClass:function(y,x){var Y=false,AA,z,G;if(y&&x){AA=E.Dom.getAttribute(y,F)||J;E.Dom.setAttribute(y,F,AA.replace(E.Dom._getClassRegex(x),J));z=E.Dom.getAttribute(y,F);if(AA!==z){E.Dom.setAttribute(y,F,A(z));Y=true;if(E.Dom.getAttribute(y,F)===""){G=(y.hasAttribute&&y.hasAttribute(g))?g:F;y.removeAttribute(G);}}}else{}return Y;},replaceClass:function(x,Y,G){return E.Dom.batch(x,E.Dom._replaceClass,{from:Y,to:G});
240 235 },_replaceClass:function(y,x){var Y,AB,AA,G=false,z;if(y&&x){AB=x.from;AA=x.to;if(!AA){G=false;}else{if(!AB){G=E.Dom._addClass(y,x.to);}else{if(AB!==AA){z=E.Dom.getAttribute(y,F)||J;Y=(B+z.replace(E.Dom._getClassRegex(AB),B+AA)).split(E.Dom._getClassRegex(AA));Y.splice(1,0,B+AA);E.Dom.setAttribute(y,F,A(Y.join(J)));G=true;}}}}else{}return G;},generateId:function(G,x){x=x||"yui-gen";var Y=function(y){if(y&&y.id){return y.id;}var z=x+YAHOO.env._id_counter++;if(y){if(y[e].getElementById(z)){return E.Dom.generateId(y,z+x);}y.id=z;}return z;};return E.Dom.batch(G,Y,E.Dom,true)||Y.apply(E.Dom,arguments);},isAncestor:function(Y,x){Y=E.Dom.get(Y);x=E.Dom.get(x);var G=false;if((Y&&x)&&(Y[l]&&x[l])){if(Y.contains&&Y!==x){G=Y.contains(x);}else{if(Y.compareDocumentPosition){G=!!(Y.compareDocumentPosition(x)&16);}}}else{}return G;},inDocument:function(G,Y){return E.Dom._inDoc(E.Dom.get(G),Y);},_inDoc:function(Y,x){var G=false;if(Y&&Y[C]){x=x||Y[e];G=E.Dom.isAncestor(x[v],Y);}else{}return G;},getElementsBy:function(Y,AF,AB,AD,y,AC,AE){AF=AF||"*";AB=(AB)?E.Dom.get(AB):null||K;if(!AB){return[];}var x=[],G=AB.getElementsByTagName(AF);for(var z=0,AA=G.length;z<AA;++z){if(Y(G[z])){if(AE){x=G[z];break;}else{x[x.length]=G[z];}}}if(AD){E.Dom.batch(x,AD,y,AC);}return x;},getElementBy:function(x,G,Y){return E.Dom.getElementsBy(x,G,Y,null,null,null,true);},batch:function(x,AB,AA,z){var y=[],Y=(z)?AA:window;x=(x&&(x[C]||x.item))?x:E.Dom.get(x);if(x&&AB){if(x[C]||x.length===undefined){return AB.call(Y,x,AA);}for(var G=0;G<x.length;++G){y[y.length]=AB.call(Y,x[G],AA);}}else{return false;}return y;},getDocumentHeight:function(){var Y=(K[t]!=M||I)?K.body.scrollHeight:W.scrollHeight,G=Math.max(Y,E.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var Y=(K[t]!=M||I)?K.body.scrollWidth:W.scrollWidth,G=Math.max(Y,E.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,Y=K[t];if((Y||T)&&!D){G=(Y==M)?W.clientHeight:K.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,Y=K[t];if(Y||T){G=(Y==M)?W.clientWidth:K.body.clientWidth;}return G;},getAncestorBy:function(G,Y){while((G=G[Z])){if(E.Dom._testElement(G,Y)){return G;}}return null;},getAncestorByClassName:function(Y,G){Y=E.Dom.get(Y);if(!Y){return null;}var x=function(y){return E.Dom.hasClass(y,G);};return E.Dom.getAncestorBy(Y,x);},getAncestorByTagName:function(Y,G){Y=E.Dom.get(Y);if(!Y){return null;}var x=function(y){return y[C]&&y[C].toUpperCase()==G.toUpperCase();};return E.Dom.getAncestorBy(Y,x);},getPreviousSiblingBy:function(G,Y){while(G){G=G.previousSibling;if(E.Dom._testElement(G,Y)){return G;}}return null;},getPreviousSibling:function(G){G=E.Dom.get(G);if(!G){return null;}return E.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,Y){while(G){G=G.nextSibling;if(E.Dom._testElement(G,Y)){return G;}}return null;},getNextSibling:function(G){G=E.Dom.get(G);if(!G){return null;}return E.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,x){var Y=(E.Dom._testElement(G.firstChild,x))?G.firstChild:null;return Y||E.Dom.getNextSiblingBy(G.firstChild,x);},getFirstChild:function(G,Y){G=E.Dom.get(G);if(!G){return null;}return E.Dom.getFirstChildBy(G);},getLastChildBy:function(G,x){if(!G){return null;}var Y=(E.Dom._testElement(G.lastChild,x))?G.lastChild:null;return Y||E.Dom.getPreviousSiblingBy(G.lastChild,x);},getLastChild:function(G){G=E.Dom.get(G);return E.Dom.getLastChildBy(G);},getChildrenBy:function(Y,y){var x=E.Dom.getFirstChildBy(Y,y),G=x?[x]:[];E.Dom.getNextSiblingBy(x,function(z){if(!y||y(z)){G[G.length]=z;}return false;});return G;},getChildren:function(G){G=E.Dom.get(G);if(!G){}return E.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||K;return Math.max(G[v].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||K;return Math.max(G[v].scrollTop,G.body.scrollTop);},insertBefore:function(Y,G){Y=E.Dom.get(Y);G=E.Dom.get(G);if(!Y||!G||!G[Z]){return null;}return G[Z].insertBefore(Y,G);},insertAfter:function(Y,G){Y=E.Dom.get(Y);G=E.Dom.get(G);if(!Y||!G||!G[Z]){return null;}if(G.nextSibling){return G[Z].insertBefore(Y,G.nextSibling);}else{return G[Z].appendChild(Y);}},getClientRegion:function(){var x=E.Dom.getDocumentScrollTop(),Y=E.Dom.getDocumentScrollLeft(),y=E.Dom.getViewportWidth()+Y,G=E.Dom.getViewportHeight()+x;return new E.Region(x,y,G,Y);},setAttribute:function(Y,G,x){G=E.Dom.CUSTOM_ATTRIBUTES[G]||G;Y.setAttribute(G,x);},getAttribute:function(Y,G){G=E.Dom.CUSTOM_ATTRIBUTES[G]||G;return Y.getAttribute(G);},_toCamel:function(Y){var x=d;function G(y,z){return z.toUpperCase();}return x[Y]||(x[Y]=Y.indexOf("-")===-1?Y:Y.replace(/-([a-z])/gi,G));},_getClassRegex:function(Y){var G;if(Y!==undefined){if(Y.exec){G=Y;}else{G=h[Y];if(!G){Y=Y.replace(E.Dom._patterns.CLASS_RE_TOKENS,"\\$1");G=h[Y]=new RegExp(s+Y+k,U);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}])/g},_testElement:function(G,Y){return G&&G[l]==1&&(!Y||Y(G));},_calcBorders:function(x,y){var Y=parseInt(E.Dom[w](x,R),10)||0,G=parseInt(E.Dom[w](x,q),10)||0;if(H){if(N.test(x[C])){Y=0;G=0;}}y[0]+=G;y[1]+=Y;return y;}};var S=E.Dom[w];if(m.opera){E.Dom[w]=function(Y,G){var x=S(Y,G);if(X.test(G)){x=E.Dom.Color.toRGB(x);}return x;};}if(m.webkit){E.Dom[w]=function(Y,G){var x=S(Y,G);if(x==="rgba(0, 0, 0, 0)"){x="transparent";}return x;};}})();YAHOO.util.Region=function(C,D,A,B){this.top=C;this.y=C;this[1]=C;this.right=D;this.bottom=A;this.left=B;this.x=B;this[0]=B;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(A){return(A.left>=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top),D=Math.min(this.right,E.right),A=Math.min(this.bottom,E.bottom),B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new YAHOO.util.Region(C,D,A,B);
241   -}else{return null;}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top),D=Math.max(this.right,E.right),A=Math.max(this.bottom,E.bottom),B=Math.min(this.left,E.left);return new YAHOO.util.Region(C,D,A,B);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D),C=F[1],E=F[0]+D.offsetWidth,A=F[1]+D.offsetHeight,B=F[0];return new YAHOO.util.Region(C,E,A,B);};YAHOO.util.Point=function(A,B){if(YAHOO.lang.isArray(A)){B=A[1];A=A[0];}YAHOO.util.Point.superclass.constructor.call(this,B,A,B,A);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var B=YAHOO.util,A="clientTop",F="clientLeft",J="parentNode",K="right",W="hasLayout",I="px",U="opacity",L="auto",D="borderLeftWidth",G="borderTopWidth",P="borderRightWidth",V="borderBottomWidth",S="visible",Q="transparent",N="height",E="width",H="style",T="currentStyle",R=/^width|height$/,O=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,M={get:function(X,Z){var Y="",a=X[T][Z];if(Z===U){Y=B.Dom.getStyle(X,U);}else{if(!a||(a.indexOf&&a.indexOf(I)>-1)){Y=a;}else{if(B.Dom.IE_COMPUTED[Z]){Y=B.Dom.IE_COMPUTED[Z](X,Z);}else{if(O.test(a)){Y=B.Dom.IE.ComputedStyle.getPixel(X,Z);}else{Y=a;}}}}return Y;},getOffset:function(Z,e){var b=Z[T][e],X=e.charAt(0).toUpperCase()+e.substr(1),c="offset"+X,Y="pixel"+X,a="",d;if(b==L){d=Z[c];if(d===undefined){a=0;}a=d;if(R.test(e)){Z[H][e]=d;if(Z[c]>d){a=d-(Z[c]-d);}Z[H][e]=L;}}else{if(!Z[H][Y]&&!Z[H][e]){Z[H][e]=b;}a=Z[H][Y];}return a+I;},getBorderWidth:function(X,Z){var Y=null;if(!X[T][W]){X[H].zoom=1;}switch(Z){case G:Y=X[A];break;case V:Y=X.offsetHeight-X.clientHeight-X[A];break;case D:Y=X[F];break;case P:Y=X.offsetWidth-X.clientWidth-X[F];break;}return Y+I;},getPixel:function(Y,X){var a=null,b=Y[T][K],Z=Y[T][X];Y[H][K]=Z;a=Y[H].pixelRight;Y[H][K]=b;return a+I;},getMargin:function(Y,X){var Z;if(Y[T][X]==L){Z=0+I;}else{Z=B.Dom.IE.ComputedStyle.getPixel(Y,X);}return Z;},getVisibility:function(Y,X){var Z;while((Z=Y[T])&&Z[X]=="inherit"){Y=Y[J];}return(Z)?Z[X]:S;},getColor:function(Y,X){return B.Dom.Color.toRGB(Y[T][X])||Q;},getBorderColor:function(Y,X){var Z=Y[T],a=Z[X]||Z.color;return B.Dom.Color.toRGB(B.Dom.Color.toHex(a));}},C={};C.top=C.right=C.bottom=C.left=C[E]=C[N]=M.getOffset;C.color=M.getColor;C[G]=C[P]=C[V]=C[D]=M.getBorderWidth;C.marginTop=C.marginRight=C.marginBottom=C.marginLeft=M.getMargin;C.visibility=M.getVisibility;C.borderColor=C.borderTopColor=C.borderRightColor=C.borderBottomColor=C.borderLeftColor=M.getBorderColor;B.Dom.IE_COMPUTED=C;B.Dom.IE_ComputedStyle=M;})();(function(){var C="toString",A=parseInt,B=RegExp,D=YAHOO.util;D.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(E){if(!D.Dom.Color.re_RGB.test(E)){E=D.Dom.Color.toHex(E);}if(D.Dom.Color.re_hex.exec(E)){E="rgb("+[A(B.$1,16),A(B.$2,16),A(B.$3,16)].join(", ")+")";}return E;},toHex:function(H){H=D.Dom.Color.KEYWORDS[H]||H;if(D.Dom.Color.re_RGB.exec(H)){var G=(B.$1.length===1)?"0"+B.$1:Number(B.$1),F=(B.$2.length===1)?"0"+B.$2:Number(B.$2),E=(B.$3.length===1)?"0"+B.$3:Number(B.$3);H=[G[C](16),F[C](16),E[C](16)].join("");}if(H.length<6){H=H.replace(D.Dom.Color.re_hex3,"$1$1");}if(H!=="transparent"&&H.indexOf("#")<0){H="#"+H;}return H.toLowerCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.7.0",build:"1799"});
242   -if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={}}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=(""+A[C]).split(".");E=YAHOO;for(B=(D[0]=="YAHOO")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]]}}return E};YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(B&&B.log){return B.log(D,A,C)}else{return false}};YAHOO.register=function(A,E,D){var I=YAHOO.env.modules,B,H,G,F,C;if(!I[A]){I[A]={versions:[],builds:[]}}B=I[A];H=D.version;G=D.build;F=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=E;for(C=0;C<F.length;C=C+1){F[C](B)}if(E){E.VERSION=H;E.BUILD=G}else{YAHOO.log("mainClass is undefined for module "+A,"warn")}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(A){return YAHOO.env.modules[A]||null};YAHOO.env.ua=function(){var C={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0,caja:0},B=navigator.userAgent,A;if((/KHTML/).test(B)){C.webkit=1}A=B.match(/AppleWebKit\/([^\s]*)/);if(A&&A[1]){C.webkit=parseFloat(A[1]);if(/ Mobile\//.test(B)){C.mobile="Apple"}else{A=B.match(/NokiaN[^\/]*/);if(A){C.mobile=A[0]}}A=B.match(/AdobeAIR\/([^\s]*)/);if(A){C.air=A[0]}}if(!C.webkit){A=B.match(/Opera[\s\/]([^\s]*)/);if(A&&A[1]){C.opera=parseFloat(A[1]);A=B.match(/Opera Mini[^;]*/);if(A){C.mobile=A[0]}}else{A=B.match(/MSIE\s([^;]*)/);if(A&&A[1]){C.ie=parseFloat(A[1])}else{A=B.match(/Gecko\/([^\s]*)/);if(A){C.gecko=1;A=B.match(/rv:([^\s\)]*)/);if(A&&A[1]){C.gecko=parseFloat(A[1])}}}}}A=B.match(/Caja\/([^\s]*)/);if(A&&A[1]){C.caja=parseFloat(A[1])}return C}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var B=YAHOO_config.listener,A=YAHOO.env.listeners,D=true,C;if(B){for(C=0;C<A.length;C=C+1){if(A[C]==B){D=false;break}}if(D){A.push(B)}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var B=YAHOO.lang,F="[object Array]",C="[object Function]",A=Object.prototype,E=["toString","valueOf"],D={isArray:function(G){return A.toString.apply(G)===F},isBoolean:function(G){return typeof G==="boolean"},isFunction:function(G){return A.toString.apply(G)===C},isNull:function(G){return G===null},isNumber:function(G){return typeof G==="number"&&isFinite(G)},isObject:function(G){return(G&&(typeof G==="object"||B.isFunction(G)))||false},isString:function(G){return typeof G==="string"},isUndefined:function(G){return typeof G==="undefined"},_IEEnumFix:(YAHOO.env.ua.ie)?function(I,H){var G,K,J;for(G=0;G<E.length;G=G+1){K=E[G];J=H[K];if(B.isFunction(J)&&J!=A[K]){I[K]=J}}}:function(){},extend:function(J,K,I){if(!K||!J){throw new Error("extend failed, please check that "+"all dependencies are included.")}var H=function(){},G;H.prototype=K.prototype;J.prototype=new H();J.prototype.constructor=J;J.superclass=K.prototype;if(K.prototype.constructor==A.constructor){K.prototype.constructor=K}if(I){for(G in I){if(B.hasOwnProperty(I,G)){J.prototype[G]=I[G]}}B._IEEnumFix(J.prototype,I)}},augmentObject:function(K,J){if(!J||!K){throw new Error("Absorb failed, verify dependencies.")}var G=arguments,I,L,H=G[2];if(H&&H!==true){for(I=2;I<G.length;I=I+1){K[G[I]]=J[G[I]]}}else{for(L in J){if(H||!(L in K)){K[L]=J[L]}}B._IEEnumFix(K,J)}},augmentProto:function(J,I){if(!I||!J){throw new Error("Augment failed, verify dependencies.")}var G=[J.prototype,I.prototype],H;for(H=2;H<arguments.length;H=H+1){G.push(arguments[H])}B.augmentObject.apply(this,G)},dump:function(G,L){var I,K,N=[],O="{...}",H="f(){...}",M=", ",J=" => ";if(!B.isObject(G)){return G+""}else{if(G instanceof Date||("nodeType"in G&&"tagName"in G)){return G}else{if(B.isFunction(G)){return H}}}L=(B.isNumber(L))?L:3;if(B.isArray(G)){N.push("[");for(I=0,K=G.length;I<K;I=I+1){if(B.isObject(G[I])){N.push((L>0)?B.dump(G[I],L-1):O)}else{N.push(G[I])}N.push(M)}if(N.length>1){N.pop()}N.push("]")}else{N.push("{");for(I in G){if(B.hasOwnProperty(G,I)){N.push(I+J);if(B.isObject(G[I])){N.push((L>0)?B.dump(G[I],L-1):O)}else{N.push(G[I])}N.push(M)}}if(N.length>1){N.pop()}N.push("}")}return N.join("")},substitute:function(V,H,O){var L,K,J,R,S,U,Q=[],I,M="dump",P=" ",G="{",T="}",N;for(;;){L=V.lastIndexOf(G);if(L<0){break}K=V.indexOf(T,L);if(L+1>=K){break}I=V.substring(L+1,K);R=I;U=null;J=R.indexOf(P);if(J>-1){U=R.substring(J+1);R=R.substring(0,J)}S=H[R];if(O){S=O(R,S,U)}if(B.isObject(S)){if(B.isArray(S)){S=B.dump(S,parseInt(U,10))}else{U=U||"";N=U.indexOf(M);if(N>-1){U=U.substring(4)}if(S.toString===A.toString||N>-1){S=B.dump(S,parseInt(U,10))}else{S=S.toString()}}}else{if(!B.isString(S)&&!B.isNumber(S)){S="~-"+Q.length+"-~";Q[Q.length]=I}}V=V.substring(0,L)+S+V.substring(K+1)}for(L=Q.length-1;L>=0;L=L-1){V=V.replace(new RegExp("~-"+L+"-~"),"{"+Q[L]+"}","g")}return V},trim:function(G){try{return G.replace(/^\s+|\s+$/g,"")}catch(H){return G}},merge:function(){var J={},H=arguments,G=H.length,I;for(I=0;I<G;I=I+1){B.augmentObject(J,H[I],true)}return J},later:function(N,H,O,J,K){N=N||0;H=H||{};var I=O,M=J,L,G;if(B.isString(O)){I=H[O]}if(!I){throw new TypeError("method undefined")}if(!B.isArray(M)){M=[J]}L=function(){I.apply(H,M)};G=(K)?setInterval(L,N):setTimeout(L,N);return{interval:K,cancel:function(){if(this.interval){clearInterval(G)}else{clearTimeout(G)}}}},isValue:function(G){return(B.isObject(G)||B.isString(G)||B.isNumber(G)||B.isBoolean(G))}};B.hasOwnProperty=(A.hasOwnProperty)?function(G,H){return G&&G.hasOwnProperty(H)}:function(G,H){return!B.isUndefined(G[H])&&G.constructor.prototype[H]!==G[H]};D.augmentObject(B,D,true);YAHOO.util.Lang=B;B.augment=B.augmentProto;YAHOO.augment=B.augmentProto;YAHOO.extend=B.extend})();YAHOO.register("yahoo",YAHOO,{version:"2.7.0",build:"1799"});YAHOO.util.Get=function(){var M={},L=0,R=0,E=false,N=YAHOO.env.ua,S=YAHOO.lang;var J=function(W,T,X){var U=X||window,Y=U.document,Z=Y.createElement(W);for(var V in T){if(T[V]&&YAHOO.lang.hasOwnProperty(T,V)){Z.setAttribute(V,T[V])}}return Z};var I=function(T,U,W){var V=W||"utf-8";return J("link",{"id":"yui__dyn_"+(R++),"type":"text/css","charset":V,"rel":"stylesheet","href":T},U)};var P=function(T,U,W){var V=W||"utf-8";return J("script",{"id":"yui__dyn_"+(R++),"type":"text/javascript","charset":V,"src":T},U)};var A=function(T,U){return{tId:T.tId,win:T.win,data:T.data,nodes:T.nodes,msg:U,purge:function(){D(this.tId)}}};var B=function(T,W){var U=M[W],V=(S.isString(T))?U.win.document.getElementById(T):T;if(!V){Q(W,"target node not found: "+T)}return V};var Q=function(W,V){var T=M[W];if(T.onFailure){var U=T.scope||T.win;T.onFailure.call(U,A(T,V))}};var C=function(W){var T=M[W];T.finished=true;if(T.aborted){var V="transaction "+W+" was aborted";Q(W,V);return}if(T.onSuccess){var U=T.scope||T.win;T.onSuccess.call(U,A(T))}};var O=function(V){var T=M[V];if(T.onTimeout){var U=T.scope||T;T.onTimeout.call(U,A(T))}};var G=function(V,Z){var U=M[V];if(U.timer){U.timer.cancel()}if(U.aborted){var X="transaction "+V+" was aborted";Q(V,X);return}if(Z){U.url.shift();if(U.varName){U.varName.shift()}}else{U.url=(S.isString(U.url))?[U.url]:U.url;if(U.varName){U.varName=(S.isString(U.varName))?[U.varName]:U.varName}}var c=U.win,b=c.document,a=b.getElementsByTagName("head")[0],W;if(U.url.length===0){if(U.type==="script"&&N.webkit&&N.webkit<420&&!U.finalpass&&!U.varName){var Y=P(null,U.win,U.charset);Y.innerHTML='YAHOO.util.Get._finalize("'+V+'");';U.nodes.push(Y);a.appendChild(Y)}else{C(V)}return}var T=U.url[0];if(!T){U.url.shift();return G(V)}if(U.timeout){U.timer=S.later(U.timeout,U,O,V)}if(U.type==="script"){W=P(T,c,U.charset)}else{W=I(T,c,U.charset)}F(U.type,W,V,T,c,U.url.length);U.nodes.push(W);if(U.insertBefore){var e=B(U.insertBefore,V);if(e){e.parentNode.insertBefore(W,e)}}else{a.appendChild(W)}if((N.webkit||N.gecko)&&U.type==="css"){G(V,T)}};var K=function(){if(E){return}E=true;for(var T in M){var U=M[T];if(U.autopurge&&U.finished){D(U.tId);delete M[T]}}E=false};var D=function(a){var X=M[a];if(X){var Z=X.nodes,T=Z.length,Y=X.win.document,W=Y.getElementsByTagName("head")[0];if(X.insertBefore){var V=B(X.insertBefore,a);if(V){W=V.parentNode}}for(var U=0;U<T;U=U+1){W.removeChild(Z[U])}X.nodes=[]}};var H=function(U,T,V){var X="q"+(L++);V=V||{};if(L%YAHOO.util.Get.PURGE_THRESH===0){K()}M[X]=S.merge(V,{tId:X,type:U,url:T,finished:false,aborted:false,nodes:[]});var W=M[X];W.win=W.win||window;W.scope=W.scope||W.win;W.autopurge=("autopurge"in W)?W.autopurge:(U==="script")?true:false;S.later(0,W,G,X);return{tId:X}};var F=function(c,X,W,U,Y,Z,b){var a=b||G;if(N.ie){X.onreadystatechange=function(){var d=this.readyState;if("loaded"===d||"complete"===d){X.onreadystatechange=null;a(W,U)}}}else{if(N.webkit){if(c==="script"){if(N.webkit>=420){X.addEventListener("load",function(){a(W,U)})}else{var T=M[W];if(T.varName){var V=YAHOO.util.Get.POLL_FREQ;T.maxattempts=YAHOO.util.Get.TIMEOUT/V;T.attempts=0;T._cache=T.varName[0].split(".");T.timer=S.later(V,T,function(j){var f=this._cache,e=f.length,d=this.win,g;for(g=0;g<e;g=g+1){d=d[f[g]];if(!d){this.attempts++;if(this.attempts++>this.maxattempts){var h="Over retry limit, giving up";T.timer.cancel();Q(W,h)}else{}return}}T.timer.cancel();a(W,U)},null,true)}else{S.later(YAHOO.util.Get.POLL_FREQ,null,a,[W,U])}}}}else{X.onload=function(){a(W,U)}}}};return{POLL_FREQ:10,PURGE_THRESH:20,TIMEOUT:2000,_finalize:function(T){S.later(0,null,C,T)},abort:function(U){var V=(S.isString(U))?U:U.tId;var T=M[V];if(T){T.aborted=true}},script:function(T,U){return H("script",T,U)},css:function(T,U){return H("css",T,U)}}}();YAHOO.register("get",YAHOO.util.Get,{version:"2.7.0",build:"1799"});(function(){var Y=YAHOO,util=Y.util,lang=Y.lang,env=Y.env,PROV="_provides",SUPER="_supersedes",REQ="expanded",AFTER="_after";var YUI={dupsAllowed:{"yahoo":true,"get":true},info:{"root":"2.7.0/build/","base":"http://yui.yahooapis.com/2.7.0/build/","comboBase":"http://yui.yahooapis.com/combo?","skin":{"defaultSkin":"sam","base":"assets/skins/","path":"skin.css","after":["reset","fonts","grids","base"],"rollup":3},dupsAllowed:["yahoo","get"],"moduleInfo":{"animation":{"type":"js","path":"animation/animation-min.js","requires":["dom","event"]},"autocomplete":{"type":"js","path":"autocomplete/autocomplete-min.js","requires":["dom","event","datasource"],"optional":["connection","animation"],"skinnable":true},"base":{"type":"css","path":"base/base-min.css","after":["reset","fonts","grids"]},"button":{"type":"js","path":"button/button-min.js","requires":["element"],"optional":["menu"],"skinnable":true},"calendar":{"type":"js","path":"calendar/calendar-min.js","requires":["event","dom"],"skinnable":true},"carousel":{"type":"js","path":"carousel/carousel-min.js","requires":["element"],"optional":["animation"],"skinnable":true},"charts":{"type":"js","path":"charts/charts-min.js","requires":["element","json","datasource"]},"colorpicker":{"type":"js","path":"colorpicker/colorpicker-min.js","requires":["slider","element"],"optional":["animation"],"skinnable":true},"connection":{"type":"js","path":"connection/connection-min.js","requires":["event"]},"container":{"type":"js","path":"container/container-min.js","requires":["dom","event"],"optional":["dragdrop","animation","connection"],"supersedes":["containercore"],"skinnable":true},"containercore":{"type":"js","path":"container/container_core-min.js","requires":["dom","event"],"pkg":"container"},"cookie":{"type":"js","path":"cookie/cookie-min.js","requires":["yahoo"]},"datasource":{"type":"js","path":"datasource/datasource-min.js","requires":["event"],"optional":["connection"]},"datatable":{"type":"js","path":"datatable/datatable-min.js","requires":["element","datasource"],"optional":["calendar","dragdrop","paginator"],"skinnable":true},"dom":{"type":"js","path":"dom/dom-min.js","requires":["yahoo"]},"dragdrop":{"type":"js","path":"dragdrop/dragdrop-min.js","requires":["dom","event"]},"editor":{"type":"js","path":"editor/editor-min.js","requires":["menu","element","button"],"optional":["animation","dragdrop"],"supersedes":["simpleeditor"],"skinnable":true},"element":{"type":"js","path":"element/element-min.js","requires":["dom","event"]},"event":{"type":"js","path":"event/event-min.js","requires":["yahoo"]},"fonts":{"type":"css","path":"fonts/fonts-min.css"},"get":{"type":"js","path":"get/get-min.js","requires":["yahoo"]},"grids":{"type":"css","path":"grids/grids-min.css","requires":["fonts"],"optional":["reset"]},"history":{"type":"js","path":"history/history-min.js","requires":["event"]},"imagecropper":{"type":"js","path":"imagecropper/imagecropper-min.js","requires":["dom","event","dragdrop","element","resize"],"skinnable":true},"imageloader":{"type":"js","path":"imageloader/imageloader-min.js","requires":["event","dom"]},"json":{"type":"js","path":"json/json-min.js","requires":["yahoo"]},"layout":{"type":"js","path":"layout/layout-min.js","requires":["dom","event","element"],"optional":["animation","dragdrop","resize","selector"],"skinnable":true},"logger":{"type":"js","path":"logger/logger-min.js","requires":["event","dom"],"optional":["dragdrop"],"skinnable":true},"menu":{"type":"js","path":"menu/menu-min.js","requires":["containercore"],"skinnable":true},"paginator":{"type":"js","path":"paginator/paginator-min.js","requires":["element"],"skinnable":true},"profiler":{"type":"js","path":"profiler/profiler-min.js","requires":["yahoo"]},"profilerviewer":{"type":"js","path":"profilerviewer/profilerviewer-min.js","requires":["profiler","yuiloader","element"],"skinnable":true},"reset":{"type":"css","path":"reset/reset-min.css"},"reset-fonts-grids":{"type":"css","path":"reset-fonts-grids/reset-fonts-grids.css","supersedes":["reset","fonts","grids","reset-fonts"],"rollup":4},"reset-fonts":{"type":"css","path":"reset-fonts/reset-fonts.css","supersedes":["reset","fonts"],"rollup":2},"resize":{"type":"js","path":"resize/resize-min.js","requires":["dom","event","dragdrop","element"],"optional":["animation"],"skinnable":true},"selector":{"type":"js","path":"selector/selector-min.js","requires":["yahoo","dom"]},"simpleeditor":{"type":"js","path":"editor/simpleeditor-min.js","requires":["element"],"optional":["containercore","menu","button","animation","dragdrop"],"skinnable":true,"pkg":"editor"},"slider":{"type":"js","path":"slider/slider-min.js","requires":["dragdrop"],"optional":["animation"],"skinnable":true},"stylesheet":{"type":"js","path":"stylesheet/stylesheet-min.js","requires":["yahoo"]},"tabview":{"type":"js","path":"tabview/tabview-min.js","requires":["element"],"optional":["connection"],"skinnable":true},"treeview":{"type":"js","path":"treeview/treeview-min.js","requires":["event","dom"],"optional":["json"],"skinnable":true},"uploader":{"type":"js","path":"uploader/uploader.js","requires":["element"]},"utilities":{"type":"js","path":"utilities/utilities.js","supersedes":["yahoo","event","dragdrop","animation","dom","connection","element","yahoo-dom-event","get","yuiloader","yuiloader-dom-event"],"rollup":8},"yahoo":{"type":"js","path":"yahoo/yahoo-min.js"},"yahoo-dom-event":{"type":"js","path":"yahoo-dom-event/yahoo-dom-event.js","supersedes":["yahoo","event","dom"],"rollup":3},"yuiloader":{"type":"js","path":"yuiloader/yuiloader-min.js","supersedes":["yahoo","get"]},"yuiloader-dom-event":{"type":"js","path":"yuiloader-dom-event/yuiloader-dom-event.js","supersedes":["yahoo","dom","event","get","yuiloader","yahoo-dom-event"],"rollup":5},"yuitest":{"type":"js","path":"yuitest/yuitest-min.js","requires":["logger"],"skinnable":true}}},ObjectUtil:{appendArray:function(o,a){if(a){for(var i=0;i<a.length;i=i+1){o[a[i]]=true}}},keys:function(o,ordered){var a=[],i;for(i in o){if(lang.hasOwnProperty(o,i)){a.push(i)}}return a}},ArrayUtil:{appendArray:function(a1,a2){Array.prototype.push.apply(a1,a2)},indexOf:function(a,val){for(var i=0;i<a.length;i=i+1){if(a[i]===val){return i}}return-1},toObject:function(a){var o={};for(var i=0;i<a.length;i=i+1){o[a[i]]=true}return o},uniq:function(a){return YUI.ObjectUtil.keys(YUI.ArrayUtil.toObject(a))}}};YAHOO.util.YUILoader=function(o){this._internalCallback=null;this._useYahooListener=false;this.onSuccess=null;this.onFailure=Y.log;this.onProgress=null;this.onTimeout=null;this.scope=this;this.data=null;this.insertBefore=null;this.charset=null;this.varName=null;this.base=YUI.info.base;this.comboBase=YUI.info.comboBase;this.combine=false;this.root=YUI.info.root;this.timeout=0;this.ignore=null;this.force=null;this.allowRollup=true;this.filter=null;this.required={};this.moduleInfo=lang.merge(YUI.info.moduleInfo);this.rollups=null;this.loadOptional=false;this.sorted=[];this.loaded={};this.dirty=true;this.inserted={};var self=this;env.listeners.push(function(m){if(self._useYahooListener){self.loadNext(m.name)}});this.skin=lang.merge(YUI.info.skin);this._config(o)};Y.util.YUILoader.prototype={FILTERS:{RAW:{"searchExp":"-min\\.js","replaceStr":".js"},DEBUG:{"searchExp":"-min\\.js","replaceStr":"-debug.js"}},SKIN_PREFIX:"skin-",_config:function(o){if(o){for(var i in o){if(lang.hasOwnProperty(o,i)){if(i=="require"){this.require(o[i])}else{this[i]=o[i]}}}}var f=this.filter;if(lang.isString(f)){f=f.toUpperCase();if(f==="DEBUG"){this.require("logger")}if(!Y.widget.LogWriter){Y.widget.LogWriter=function(){return Y}}this.filter=this.FILTERS[f]}},addModule:function(o){if(!o||!o.name||!o.type||(!o.path&&!o.fullpath)){return false}o.ext=("ext"in o)?o.ext:true;o.requires=o.requires||[];this.moduleInfo[o.name]=o;this.dirty=true;return true},require:function(what){var a=(typeof what==="string")?arguments:what;this.dirty=true;YUI.ObjectUtil.appendArray(this.required,a)},_addSkin:function(skin,mod){var name=this.formatSkin(skin),info=this.moduleInfo,sinf=this.skin,ext=info[mod]&&info[mod].ext;if(!info[name]){this.addModule({"name":name,"type":"css","path":sinf.base+skin+"/"+sinf.path,"after":sinf.after,"rollup":sinf.rollup,"ext":ext})}if(mod){name=this.formatSkin(skin,mod);if(!info[name]){var mdef=info[mod],pkg=mdef.pkg||mod;this.addModule({"name":name,"type":"css","after":sinf.after,"path":pkg+"/"+sinf.base+skin+"/"+mod+".css","ext":ext})}}return name},getRequires:function(mod){if(!mod){return[]}if(!this.dirty&&mod.expanded){return mod.expanded}mod.requires=mod.requires||[];var i,d=[],r=mod.requires,o=mod.optional,info=this.moduleInfo,m;for(i=0;i<r.length;i=i+1){d.push(r[i]);m=info[r[i]];YUI.ArrayUtil.appendArray(d,this.getRequires(m))}if(o&&this.loadOptional){for(i=0;i<o.length;i=i+1){d.push(o[i]);YUI.ArrayUtil.appendArray(d,this.getRequires(info[o[i]]))}}mod.expanded=YUI.ArrayUtil.uniq(d);return mod.expanded},getProvides:function(name,notMe){var addMe=!(notMe),ckey=(addMe)?PROV:SUPER,m=this.moduleInfo[name],o={};if(!m){return o}if(m[ckey]){return m[ckey]}var s=m.supersedes,done={},me=this;var add=function(mm){if(!done[mm]){done[mm]=true;lang.augmentObject(o,me.getProvides(mm))}};if(s){for(var i=0;i<s.length;i=i+1){add(s[i])}}m[SUPER]=o;m[PROV]=lang.merge(o);m[PROV][name]=true;return m[ckey]},calculate:function(o){if(o||this.dirty){this._config(o);this._setup();this._explode();if(this.allowRollup){this._rollup()}this._reduce();this._sort();this.dirty=false}},_setup:function(){var info=this.moduleInfo,name,i,j;for(name in info){if(lang.hasOwnProperty(info,name)){var m=info[name];if(m&&m.skinnable){var o=this.skin.overrides,smod;if(o&&o[name]){for(i=0;i<o[name].length;i=i+1){smod=this._addSkin(o[name][i],name)}}else{smod=this._addSkin(this.skin.defaultSkin,name)}m.requires.push(smod)}}}var l=lang.merge(this.inserted);if(!this._sandbox){l=lang.merge(l,env.modules)}if(this.ignore){YUI.ObjectUtil.appendArray(l,this.ignore)}if(this.force){for(i=0;i<this.force.length;i=i+1){if(this.force[i]in l){delete l[this.force[i]]}}}for(j in l){if(lang.hasOwnProperty(l,j)){lang.augmentObject(l,this.getProvides(j))}}this.loaded=l},_explode:function(){var r=this.required,i,mod;for(i in r){if(lang.hasOwnProperty(r,i)){mod=this.moduleInfo[i];if(mod){var req=this.getRequires(mod);if(req){YUI.ObjectUtil.appendArray(r,req)}}}}},_skin:function(){},formatSkin:function(skin,mod){var s=this.SKIN_PREFIX+skin;if(mod){s=s+"-"+mod}return s},parseSkin:function(mod){if(mod.indexOf(this.SKIN_PREFIX)===0){var a=mod.split("-");return{skin:a[1],module:a[2]}}return null},_rollup:function(){var i,j,m,s,rollups={},r=this.required,roll,info=this.moduleInfo;if(this.dirty||!this.rollups){for(i in info){if(lang.hasOwnProperty(info,i)){m=info[i];if(m&&m.rollup){rollups[i]=m}}}this.rollups=rollups}for(;;){var rolled=false;for(i in rollups){if(!r[i]&&!this.loaded[i]){m=info[i];s=m.supersedes;roll=false;if(!m.rollup){continue}var skin=(m.ext)?false:this.parseSkin(i),c=0;if(skin){for(j in r){if(lang.hasOwnProperty(r,j)){if(i!==j&&this.parseSkin(j)){c++;roll=(c>=m.rollup);if(roll){break}}}}}else{for(j=0;j<s.length;j=j+1){if(this.loaded[s[j]]&&(!YUI.dupsAllowed[s[j]])){roll=false;break}else{if(r[s[j]]){c++;roll=(c>=m.rollup);if(roll){break}}}}}if(roll){r[i]=true;rolled=true;this.getRequires(m)}}}if(!rolled){break}}},_reduce:function(){var i,j,s,m,r=this.required;for(i in r){if(i in this.loaded){delete r[i]}else{var skinDef=this.parseSkin(i);if(skinDef){if(!skinDef.module){var skin_pre=this.SKIN_PREFIX+skinDef.skin;for(j in r){if(lang.hasOwnProperty(r,j)){m=this.moduleInfo[j];var ext=m&&m.ext;if(!ext&&j!==i&&j.indexOf(skin_pre)>-1){delete r[j]}}}}}else{m=this.moduleInfo[i];s=m&&m.supersedes;if(s){for(j=0;j<s.length;j=j+1){if(s[j]in r){delete r[s[j]]}}}}}}},_onFailure:function(msg){YAHOO.log("Failure","info","loader");var f=this.onFailure;if(f){f.call(this.scope,{msg:"failure: "+msg,data:this.data,success:false})}},_onTimeout:function(){YAHOO.log("Timeout","info","loader");var f=this.onTimeout;if(f){f.call(this.scope,{msg:"timeout",data:this.data,success:false})}},_sort:function(){var s=[],info=this.moduleInfo,loaded=this.loaded,checkOptional=!this.loadOptional,me=this;var requires=function(aa,bb){var mm=info[aa];if(loaded[bb]||!mm){return false}var ii,rr=mm.expanded,after=mm.after,other=info[bb],optional=mm.optional;if(rr&&YUI.ArrayUtil.indexOf(rr,bb)>-1){return true}if(after&&YUI.ArrayUtil.indexOf(after,bb)>-1){return true}if(checkOptional&&optional&&YUI.ArrayUtil.indexOf(optional,bb)>-1){return true}var ss=info[bb]&&info[bb].supersedes;if(ss){for(ii=0;ii<ss.length;ii=ii+1){if(requires(aa,ss[ii])){return true}}}if(mm.ext&&mm.type=="css"&&!other.ext&&other.type=="css"){return true}return false};for(var i in this.required){if(lang.hasOwnProperty(this.required,i)){s.push(i)}}var p=0;for(;;){var l=s.length,a,b,j,k,moved=false;for(j=p;j<l;j=j+1){a=s[j];for(k=j+1;k<l;k=k+1){if(requires(a,s[k])){b=s.splice(k,1);s.splice(j,0,b[0]);moved=true;break}}if(moved){break}else{p=p+1}}if(!moved){break}}this.sorted=s},toString:function(){var o={type:"YUILoader",base:this.base,filter:this.filter,required:this.required,loaded:this.loaded,inserted:this.inserted};lang.dump(o,1)},_combine:function(){this._combining=[];var self=this,s=this.sorted,len=s.length,js=this.comboBase,css=this.comboBase,target,startLen=js.length,i,m,type=this.loadType;YAHOO.log("type "+type);for(i=0;i<len;i=i+1){m=this.moduleInfo[s[i]];if(m&&!m.ext&&(!type||type===m.type)){target=this.root+m.path;target+="&";if(m.type=="js"){js+=target}else{css+=target}this._combining.push(s[i])}}if(this._combining.length){YAHOO.log("Attempting to combine: "+this._combining,"info","loader");var callback=function(o){var c=this._combining,len=c.length,i,m;for(i=0;i<len;i=i+1){this.inserted[c[i]]=true}this.loadNext(o.data)},loadScript=function(){if(js.length>startLen){YAHOO.util.Get.script(self._filter(js),{data:self._loading,onSuccess:callback,onFailure:self._onFailure,onTimeout:self._onTimeout,insertBefore:self.insertBefore,charset:self.charset,timeout:self.timeout,scope:self})}};if(css.length>startLen){YAHOO.util.Get.css(this._filter(css),{data:this._loading,onSuccess:loadScript,onFailure:this._onFailure,onTimeout:this._onTimeout,insertBefore:this.insertBefore,charset:this.charset,timeout:this.timeout,scope:self})}else{loadScript()}return}else{this.loadNext(this._loading)}},insert:function(o,type){this.calculate(o);this._loading=true;this.loadType=type;if(this.combine){return this._combine()}if(!type){var self=this;this._internalCallback=function(){self._internalCallback=null;self.insert(null,"js")};this.insert(null,"css");return}this.loadNext()},sandbox:function(o,type){this._config(o);if(!this.onSuccess){throw new Error("You must supply an onSuccess handler for your sandbox")}this._sandbox=true;var self=this;if(!type||type!=="js"){this._internalCallback=function(){self._internalCallback=null;self.sandbox(null,"js")};this.insert(null,"css");return}if(!util.Connect){var ld=new YAHOO.util.YUILoader();ld.insert({base:this.base,filter:this.filter,require:"connection",insertBefore:this.insertBefore,charset:this.charset,onSuccess:function(){this.sandbox(null,"js")},scope:this},"js");return}this._scriptText=[];this._loadCount=0;this._stopCount=this.sorted.length;this._xhr=[];this.calculate();var s=this.sorted,l=s.length,i,m,url;for(i=0;i<l;i=i+1){m=this.moduleInfo[s[i]];if(!m){this._onFailure("undefined module "+m);for(var j=0;j<this._xhr.length;j=j+1){this._xhr[j].abort()}return}if(m.type!=="js"){this._loadCount++;continue}url=m.fullpath;url=(url)?this._filter(url):this._url(m.path);var xhrData={success:function(o){var idx=o.argument[0],name=o.argument[2];this._scriptText[idx]=o.responseText;if(this.onProgress){this.onProgress.call(this.scope,{name:name,scriptText:o.responseText,xhrResponse:o,data:this.data})}this._loadCount++;if(this._loadCount>=this._stopCount){var v=this.varName||"YAHOO";var t="(function() {\n";var b="\nreturn "+v+";\n})();";var ref=eval(t+this._scriptText.join("\n")+b);this._pushEvents(ref);if(ref){this.onSuccess.call(this.scope,{reference:ref,data:this.data})}else{this._onFailure.call(this.varName+" reference failure")}}},failure:function(o){this.onFailure.call(this.scope,{msg:"XHR failure",xhrResponse:o,data:this.data})},scope:this,argument:[i,url,s[i]]};this._xhr.push(util.Connect.asyncRequest("GET",url,xhrData))}},loadNext:function(mname){if(!this._loading){return}if(mname){if(mname!==this._loading){return}this.inserted[mname]=true;if(this.onProgress){this.onProgress.call(this.scope,{name:mname,data:this.data})}}var s=this.sorted,len=s.length,i,m;for(i=0;i<len;i=i+1){if(s[i]in this.inserted){continue}if(s[i]===this._loading){return}m=this.moduleInfo[s[i]];if(!m){this.onFailure.call(this.scope,{msg:"undefined module "+m,data:this.data});return}if(!this.loadType||this.loadType===m.type){this._loading=s[i];var fn=(m.type==="css")?util.Get.css:util.Get.script,url=m.fullpath,self=this,c=function(o){self.loadNext(o.data)};url=(url)?this._filter(url):this._url(m.path);if(env.ua.webkit&&env.ua.webkit<420&&m.type==="js"&&!m.varName){c=null;this._useYahooListener=true}fn(url,{data:s[i],onSuccess:c,onFailure:this._onFailure,onTimeout:this._onTimeout,insertBefore:this.insertBefore,charset:this.charset,timeout:this.timeout,varName:m.varName,scope:self});return}}this._loading=null;if(this._internalCallback){var f=this._internalCallback;this._internalCallback=null;f.call(this)}else{if(this.onSuccess){this._pushEvents();this.onSuccess.call(this.scope,{data:this.data})}}},_pushEvents:function(ref){var r=ref||YAHOO;if(r.util&&r.util.Event){r.util.Event._load()}},_filter:function(str){var f=this.filter;return(f)?str.replace(new RegExp(f.searchExp,"g"),f.replaceStr):str},_url:function(path){return this._filter((this.base||"")+path)}}})();YAHOO.register("yuiloader",YAHOO.util.YUILoader,{version:"2.7.0",build:"1799"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var E=YAHOO.util,L=YAHOO.lang,m=YAHOO.env.ua,A=YAHOO.lang.trim,d={},h={},N=/^t(?:able|d|h)$/i,X=/color$/i,K=window.document,W=K.documentElement,e="ownerDocument",n="defaultView",v="documentElement",t="compatMode",b="offsetLeft",P="offsetTop",u="offsetParent",Z="parentNode",l="nodeType",C="tagName",O="scrollLeft",i="scrollTop",Q="getBoundingClientRect",w="getComputedStyle",a="currentStyle",M="CSS1Compat",c="BackCompat",g="class",F="className",J="",B=" ",s="(?:^|\\s)",k="(?= |$)",U="g",p="position",f="fixed",V="relative",j="left",o="top",r="medium",q="borderLeftWidth",R="borderTopWidth",D=m.opera,I=m.webkit,H=m.gecko,T=m.ie;E.Dom={CUSTOM_ATTRIBUTES:(!W.hasAttribute)?{"for":"htmlFor","class":F}:{"htmlFor":"for","className":g},get:function(y){var AA,Y,z,x,G;if(y){if(y[l]||y.item){return y}if(typeof y==="string"){AA=y;y=K.getElementById(y);if(y&&y.id===AA){return y}else{if(y&&K.all){y=null;Y=K.all[AA];for(x=0,G=Y.length;x<G;++x){if(Y[x].id===AA){return Y[x]}}}}return y}if(y.DOM_EVENTS){y=y.get("element")}if("length"in y){z=[];for(x=0,G=y.length;x<G;++x){z[z.length]=E.Dom.get(y[x])}return z}return y}return null},getComputedStyle:function(G,Y){if(window[w]){return G[e][n][w](G,null)[Y]}else{if(G[a]){return E.Dom.IE_ComputedStyle.get(G,Y)}}},getStyle:function(G,Y){return E.Dom.batch(G,E.Dom._getStyle,Y)},_getStyle:function(){if(window[w]){return function(G,y){y=(y==="float")?y="cssFloat":E.Dom._toCamel(y);var x=G.style[y],Y;if(!x){Y=G[e][n][w](G,null);if(Y){x=Y[y]}}return x}}else{if(W[a]){return function(G,y){var x;switch(y){case"opacity":x=100;try{x=G.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(z){try{x=G.filters("alpha").opacity}catch(Y){}}return x/100;case"float":y="styleFloat";default:y=E.Dom._toCamel(y);x=G[a]?G[a][y]:null;return(G.style[y]||x)}}}}}(),setStyle:function(G,Y,x){E.Dom.batch(G,E.Dom._setStyle,{prop:Y,val:x})},_setStyle:function(){if(T){return function(Y,G){var x=E.Dom._toCamel(G.prop),y=G.val;if(Y){switch(x){case"opacity":if(L.isString(Y.style.filter)){Y.style.filter="alpha(opacity="+y*100+")";if(!Y[a]||!Y[a].hasLayout){Y.style.zoom=1}}break;case"float":x="styleFloat";default:Y.style[x]=y}}else{}}}else{return function(Y,G){var x=E.Dom._toCamel(G.prop),y=G.val;if(Y){if(x=="float"){x="cssFloat"}Y.style[x]=y}else{}}}}(),getXY:function(G){return E.Dom.batch(G,E.Dom._getXY)},_canPosition:function(G){return(E.Dom._getStyle(G,"display")!=="none"&&E.Dom._inDoc(G))},_getXY:function(){if(K[v][Q]){return function(y){var z,Y,AA,AF,AE,AD,AC,G,x,AB=Math.floor,AG=false;if(E.Dom._canPosition(y)){AA=y[Q]();AF=y[e];z=E.Dom.getDocumentScrollLeft(AF);Y=E.Dom.getDocumentScrollTop(AF);AG=[AB(AA[j]),AB(AA[o])];if(T&&m.ie<8){AE=2;AD=2;AC=AF[t];G=S(AF[v],q);x=S(AF[v],R);if(m.ie===6){if(AC!==c){AE=0;AD=0}}if((AC==c)){if(G!==r){AE=parseInt(G,10)}if(x!==r){AD=parseInt(x,10)}}AG[0]-=AE;AG[1]-=AD}if((Y||z)){AG[0]+=z;AG[1]+=Y}AG[0]=AB(AG[0]);AG[1]=AB(AG[1])}else{}return AG}}else{return function(y){var x,Y,AA,AB,AC,z=false,G=y;if(E.Dom._canPosition(y)){z=[y[b],y[P]];x=E.Dom.getDocumentScrollLeft(y[e]);Y=E.Dom.getDocumentScrollTop(y[e]);AC=((H||m.webkit>519)?true:false);while((G=G[u])){z[0]+=G[b];z[1]+=G[P];if(AC){z=E.Dom._calcBorders(G,z)}}if(E.Dom._getStyle(y,p)!==f){G=y;while((G=G[Z])&&G[C]){AA=G[i];AB=G[O];if(H&&(E.Dom._getStyle(G,"overflow")!=="visible")){z=E.Dom._calcBorders(G,z)}if(AA||AB){z[0]-=AB;z[1]-=AA}}z[0]+=x;z[1]+=Y}else{if(D){z[0]-=x;z[1]-=Y}else{if(I||H){z[0]+=x;z[1]+=Y}}}z[0]=Math.floor(z[0]);z[1]=Math.floor(z[1])}else{}return z}}}(),getX:function(G){var Y=function(x){return E.Dom.getXY(x)[0]};return E.Dom.batch(G,Y,E.Dom,true)},getY:function(G){var Y=function(x){return E.Dom.getXY(x)[1]};return E.Dom.batch(G,Y,E.Dom,true)},setXY:function(G,x,Y){E.Dom.batch(G,E.Dom._setXY,{pos:x,noRetry:Y})},_setXY:function(G,z){var AA=E.Dom._getStyle(G,p),y=E.Dom.setStyle,AD=z.pos,Y=z.noRetry,AB=[parseInt(E.Dom.getComputedStyle(G,j),10),parseInt(E.Dom.getComputedStyle(G,o),10)],AC,x;if(AA=="static"){AA=V;y(G,p,AA)}AC=E.Dom._getXY(G);if(!AD||AC===false){return false}if(isNaN(AB[0])){AB[0]=(AA==V)?0:G[b]}if(isNaN(AB[1])){AB[1]=(AA==V)?0:G[P]}if(AD[0]!==null){y(G,j,AD[0]-AC[0]+AB[0]+"px")}if(AD[1]!==null){y(G,o,AD[1]-AC[1]+AB[1]+"px")}if(!Y){x=E.Dom._getXY(G);if((AD[0]!==null&&x[0]!=AD[0])||(AD[1]!==null&&x[1]!=AD[1])){E.Dom._setXY(G,{pos:AD,noRetry:true})}}},setX:function(Y,G){E.Dom.setXY(Y,[G,null])},setY:function(G,Y){E.Dom.setXY(G,[null,Y])},getRegion:function(G){var Y=function(x){var y=false;if(E.Dom._canPosition(x)){y=E.Region.getRegion(x)}else{}return y};return E.Dom.batch(G,Y,E.Dom,true)},getClientWidth:function(){return E.Dom.getViewportWidth()},getClientHeight:function(){return E.Dom.getViewportHeight()},getElementsByClassName:function(AB,AF,AC,AE,x,AD){AB=L.trim(AB);AF=AF||"*";AC=(AC)?E.Dom.get(AC):null||K;if(!AC){return[]}var Y=[],G=AC.getElementsByTagName(AF),z=E.Dom.hasClass;for(var y=0,AA=G.length;y<AA;++y){if(z(G[y],AB)){Y[Y.length]=G[y]}}if(AE){E.Dom.batch(Y,AE,x,AD)}return Y},hasClass:function(Y,G){return E.Dom.batch(Y,E.Dom._hasClass,G)},_hasClass:function(x,Y){var G=false,y;if(x&&Y){y=E.Dom.getAttribute(x,F)||J;if(Y.exec){G=Y.test(y)}else{G=Y&&(B+y+B).indexOf(B+Y+B)>-1}}else{}return G},addClass:function(Y,G){return E.Dom.batch(Y,E.Dom._addClass,G)},_addClass:function(x,Y){var G=false,y;if(x&&Y){y=E.Dom.getAttribute(x,F)||J;if(!E.Dom._hasClass(x,Y)){E.Dom.setAttribute(x,F,A(y+B+Y));G=true}}else{}return G},removeClass:function(Y,G){return E.Dom.batch(Y,E.Dom._removeClass,G)},_removeClass:function(y,x){var Y=false,AA,z,G;if(y&&x){AA=E.Dom.getAttribute(y,F)||J;E.Dom.setAttribute(y,F,AA.replace(E.Dom._getClassRegex(x),J));z=E.Dom.getAttribute(y,F);if(AA!==z){E.Dom.setAttribute(y,F,A(z));Y=true;if(E.Dom.getAttribute(y,F)===""){G=(y.hasAttribute&&y.hasAttribute(g))?g:F;y.removeAttribute(G)}}}else{}return Y},replaceClass:function(x,Y,G){return E.Dom.batch(x,E.Dom._replaceClass,{from:Y,to:G})},_replaceClass:function(y,x){var Y,AB,AA,G=false,z;if(y&&x){AB=x.from;AA=x.to;if(!AA){G=false}else{if(!AB){G=E.Dom._addClass(y,x.to)}else{if(AB!==AA){z=E.Dom.getAttribute(y,F)||J;Y=(B+z.replace(E.Dom._getClassRegex(AB),B+AA)).split(E.Dom._getClassRegex(AA));Y.splice(1,0,B+AA);E.Dom.setAttribute(y,F,A(Y.join(J)));G=true}}}}else{}return G},generateId:function(G,x){x=x||"yui-gen";var Y=function(y){if(y&&y.id){return y.id}var z=x+YAHOO.env._id_counter++;if(y){if(y[e].getElementById(z)){return E.Dom.generateId(y,z+x)}y.id=z}return z};return E.Dom.batch(G,Y,E.Dom,true)||Y.apply(E.Dom,arguments)},isAncestor:function(Y,x){Y=E.Dom.get(Y);x=E.Dom.get(x);var G=false;if((Y&&x)&&(Y[l]&&x[l])){if(Y.contains&&Y!==x){G=Y.contains(x)}else{if(Y.compareDocumentPosition){G=!!(Y.compareDocumentPosition(x)&16)}}}else{}return G},inDocument:function(G,Y){return E.Dom._inDoc(E.Dom.get(G),Y)},_inDoc:function(Y,x){var G=false;if(Y&&Y[C]){x=x||Y[e];G=E.Dom.isAncestor(x[v],Y)}else{}return G},getElementsBy:function(Y,AF,AB,AD,y,AC,AE){AF=AF||"*";AB=(AB)?E.Dom.get(AB):null||K;if(!AB){return[]}var x=[],G=AB.getElementsByTagName(AF);for(var z=0,AA=G.length;z<AA;++z){if(Y(G[z])){if(AE){x=G[z];break}else{x[x.length]=G[z]}}}if(AD){E.Dom.batch(x,AD,y,AC)}return x},getElementBy:function(x,G,Y){return E.Dom.getElementsBy(x,G,Y,null,null,null,true)},batch:function(x,AB,AA,z){var y=[],Y=(z)?AA:window;x=(x&&(x[C]||x.item))?x:E.Dom.get(x);if(x&&AB){if(x[C]||x.length===undefined){return AB.call(Y,x,AA)}for(var G=0;G<x.length;++G){y[y.length]=AB.call(Y,x[G],AA)}}else{return false}return y},getDocumentHeight:function(){var Y=(K[t]!=M||I)?K.body.scrollHeight:W.scrollHeight,G=Math.max(Y,E.Dom.getViewportHeight());return G},getDocumentWidth:function(){var Y=(K[t]!=M||I)?K.body.scrollWidth:W.scrollWidth,G=Math.max(Y,E.Dom.getViewportWidth());return G},getViewportHeight:function(){var G=self.innerHeight,Y=K[t];if((Y||T)&&!D){G=(Y==M)?W.clientHeight:K.body.clientHeight}return G},getViewportWidth:function(){var G=self.innerWidth,Y=K[t];if(Y||T){G=(Y==M)?W.clientWidth:K.body.clientWidth}return G},getAncestorBy:function(G,Y){while((G=G[Z])){if(E.Dom._testElement(G,Y)){return G}}return null},getAncestorByClassName:function(Y,G){Y=E.Dom.get(Y);if(!Y){return null}var x=function(y){return E.Dom.hasClass(y,G)};return E.Dom.getAncestorBy(Y,x)},getAncestorByTagName:function(Y,G){Y=E.Dom.get(Y);if(!Y){return null}var x=function(y){return y[C]&&y[C].toUpperCase()==G.toUpperCase()};return E.Dom.getAncestorBy(Y,x)},getPreviousSiblingBy:function(G,Y){while(G){G=G.previousSibling;if(E.Dom._testElement(G,Y)){return G}}return null},getPreviousSibling:function(G){G=E.Dom.get(G);if(!G){return null}return E.Dom.getPreviousSiblingBy(G)},getNextSiblingBy:function(G,Y){while(G){G=G.nextSibling;if(E.Dom._testElement(G,Y)){return G}}return null},getNextSibling:function(G){G=E.Dom.get(G);if(!G){return null}return E.Dom.getNextSiblingBy(G)},getFirstChildBy:function(G,x){var Y=(E.Dom._testElement(G.firstChild,x))?G.firstChild:null;return Y||E.Dom.getNextSiblingBy(G.firstChild,x)},getFirstChild:function(G,Y){G=E.Dom.get(G);if(!G){return null}return E.Dom.getFirstChildBy(G)},getLastChildBy:function(G,x){if(!G){return null}var Y=(E.Dom._testElement(G.lastChild,x))?G.lastChild:null;return Y||E.Dom.getPreviousSiblingBy(G.lastChild,x)},getLastChild:function(G){G=E.Dom.get(G);return E.Dom.getLastChildBy(G)},getChildrenBy:function(Y,y){var x=E.Dom.getFirstChildBy(Y,y),G=x?[x]:[];E.Dom.getNextSiblingBy(x,function(z){if(!y||y(z)){G[G.length]=z}return false});return G},getChildren:function(G){G=E.Dom.get(G);if(!G){}return E.Dom.getChildrenBy(G)},getDocumentScrollLeft:function(G){G=G||K;return Math.max(G[v].scrollLeft,G.body.scrollLeft)},getDocumentScrollTop:function(G){G=G||K;return Math.max(G[v].scrollTop,G.body.scrollTop)},insertBefore:function(Y,G){Y=E.Dom.get(Y);G=E.Dom.get(G);if(!Y||!G||!G[Z]){return null}return G[Z].insertBefore(Y,G)},insertAfter:function(Y,G){Y=E.Dom.get(Y);G=E.Dom.get(G);if(!Y||!G||!G[Z]){return null}if(G.nextSibling){return G[Z].insertBefore(Y,G.nextSibling)}else{return G[Z].appendChild(Y)}},getClientRegion:function(){var x=E.Dom.getDocumentScrollTop(),Y=E.Dom.getDocumentScrollLeft(),y=E.Dom.getViewportWidth()+Y,G=E.Dom.getViewportHeight()+x;return new E.Region(x,y,G,Y)},setAttribute:function(Y,G,x){G=E.Dom.CUSTOM_ATTRIBUTES[G]||G;Y.setAttribute(G,x)},getAttribute:function(Y,G){G=E.Dom.CUSTOM_ATTRIBUTES[G]||G;return Y.getAttribute(G)},_toCamel:function(Y){var x=d;function G(y,z){return z.toUpperCase()}return x[Y]||(x[Y]=Y.indexOf("-")===-1?Y:Y.replace(/-([a-z])/gi,G))},_getClassRegex:function(Y){var G;if(Y!==undefined){if(Y.exec){G=Y}else{G=h[Y];if(!G){Y=Y.replace(E.Dom._patterns.CLASS_RE_TOKENS,"\\$1");G=h[Y]=new RegExp(s+Y+k,U)}}}return G},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}])/g},_testElement:function(G,Y){return G&&G[l]==1&&(!Y||Y(G))},_calcBorders:function(x,y){var Y=parseInt(E.Dom[w](x,R),10)||0,G=parseInt(E.Dom[w](x,q),10)||0;if(H){if(N.test(x[C])){Y=0;G=0}}y[0]+=G;y[1]+=Y;return y}};var S=E.Dom[w];if(m.opera){E.Dom[w]=function(Y,G){var x=S(Y,G);if(X.test(G)){x=E.Dom.Color.toRGB(x)}return x}}if(m.webkit){E.Dom[w]=function(Y,G){var x=S(Y,G);if(x==="rgba(0, 0, 0, 0)"){x="transparent"}return x}}})();YAHOO.util.Region=function(C,D,A,B){this.top=C;this.y=C;this[1]=C;this.right=D;this.bottom=A;this.left=B;this.x=B;this[0]=B;this.width=this.right-this.left;this.height=this.bottom-this.top};YAHOO.util.Region.prototype.contains=function(A){return(A.left>=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom)};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left))};YAHOO.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top),D=Math.min(this.right,E.right),A=Math.min(this.bottom,E.bottom),B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new YAHOO.util.Region(C,D,A,B)}else{return null}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top),D=Math.max(this.right,E.right),A=Math.max(this.bottom,E.bottom),B=Math.min(this.left,E.left);return new YAHOO.util.Region(C,D,A,B)};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}")};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D),C=F[1],E=F[0]+D.offsetWidth,A=F[1]+D.offsetHeight,B=F[0];return new YAHOO.util.Region(C,E,A,B)};YAHOO.util.Point=function(A,B){if(YAHOO.lang.isArray(A)){B=A[1];A=A[0]}YAHOO.util.Point.superclass.constructor.call(this,B,A,B,A)};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var B=YAHOO.util,A="clientTop",F="clientLeft",J="parentNode",K="right",W="hasLayout",I="px",U="opacity",L="auto",D="borderLeftWidth",G="borderTopWidth",P="borderRightWidth",V="borderBottomWidth",S="visible",Q="transparent",N="height",E="width",H="style",T="currentStyle",R=/^width|height$/,O=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,M={get:function(X,Z){var Y="",a=X[T][Z];if(Z===U){Y=B.Dom.getStyle(X,U)}else{if(!a||(a.indexOf&&a.indexOf(I)>-1)){Y=a}else{if(B.Dom.IE_COMPUTED[Z]){Y=B.Dom.IE_COMPUTED[Z](X,Z)}else{if(O.test(a)){Y=B.Dom.IE.ComputedStyle.getPixel(X,Z)}else{Y=a}}}}return Y},getOffset:function(Z,e){var b=Z[T][e],X=e.charAt(0).toUpperCase()+e.substr(1),c="offset"+X,Y="pixel"+X,a="",d;if(b==L){d=Z[c];if(d===undefined){a=0}a=d;if(R.test(e)){Z[H][e]=d;if(Z[c]>d){a=d-(Z[c]-d)}Z[H][e]=L}}else{if(!Z[H][Y]&&!Z[H][e]){Z[H][e]=b}a=Z[H][Y]}return a+I},getBorderWidth:function(X,Z){var Y=null;if(!X[T][W]){X[H].zoom=1}switch(Z){case G:Y=X[A];break;case V:Y=X.offsetHeight-X.clientHeight-X[A];break;case D:Y=X[F];break;case P:Y=X.offsetWidth-X.clientWidth-X[F];break}return Y+I},getPixel:function(Y,X){var a=null,b=Y[T][K],Z=Y[T][X];Y[H][K]=Z;a=Y[H].pixelRight;Y[H][K]=b;return a+I},getMargin:function(Y,X){var Z;if(Y[T][X]==L){Z=0+I}else{Z=B.Dom.IE.ComputedStyle.getPixel(Y,X)}return Z},getVisibility:function(Y,X){var Z;while((Z=Y[T])&&Z[X]=="inherit"){Y=Y[J]}return(Z)?Z[X]:S},getColor:function(Y,X){return B.Dom.Color.toRGB(Y[T][X])||Q},getBorderColor:function(Y,X){var Z=Y[T],a=Z[X]||Z.color;return B.Dom.Color.toRGB(B.Dom.Color.toHex(a))}},C={};C.top=C.right=C.bottom=C.left=C[E]=C[N]=M.getOffset;C.color=M.getColor;C[G]=C[P]=C[V]=C[D]=M.getBorderWidth;C.marginTop=C.marginRight=C.marginBottom=C.marginLeft=M.getMargin;C.visibility=M.getVisibility;C.borderColor=C.borderTopColor=C.borderRightColor=C.borderBottomColor=C.borderLeftColor=M.getBorderColor;B.Dom.IE_COMPUTED=C;B.Dom.IE_ComputedStyle=M})();(function(){var C="toString",A=parseInt,B=RegExp,D=YAHOO.util;D.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(E){if(!D.Dom.Color.re_RGB.test(E)){E=D.Dom.Color.toHex(E)}if(D.Dom.Color.re_hex.exec(E)){E="rgb("+[A(B.$1,16),A(B.$2,16),A(B.$3,16)].join(", ")+")"}return E},toHex:function(H){H=D.Dom.Color.KEYWORDS[H]||H;if(D.Dom.Color.re_RGB.exec(H)){var G=(B.$1.length===1)?"0"+B.$1:Number(B.$1),F=(B.$2.length===1)?"0"+B.$2:Number(B.$2),E=(B.$3.length===1)?"0"+B.$3:Number(B.$3);H=[G[C](16),F[C](16),E[C](16)].join("")}if(H.length<6){H=H.replace(D.Dom.Color.re_hex3,"$1$1")}if(H!=="transparent"&&H.indexOf("#")<0){H="#"+H}return H.toLowerCase()}}}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.7.0",build:"1799"});YAHOO.util.CustomEvent=function(D,C,B,A){this.type=D;this.scope=C||window;this.silent=B;this.signature=A||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var E="_YUICEOnSubscribe";if(D!==E){this.subscribeEvent=new YAHOO.util.CustomEvent(E,this,true)}this.lastError=null};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(A,B,C){if(!A){throw new Error("Invalid callback for subscriber to '"+this.type+"'")}if(this.subscribeEvent){this.subscribeEvent.fire(A,B,C)}this.subscribers.push(new YAHOO.util.Subscriber(A,B,C))},unsubscribe:function(D,F){if(!D){return this.unsubscribeAll()}var E=false;for(var B=0,A=this.subscribers.length;B<A;++B){var C=this.subscribers[B];if(C&&C.contains(D,F)){this._delete(B);E=true}}return E},fire:function(){this.lastError=null;var K=[],E=this.subscribers.length;if(!E&&this.silent){return true}var I=[].slice.call(arguments,0),G=true,D,J=false;if(!this.silent){}var C=this.subscribers.slice(),A=YAHOO.util.Event.throwErrors;for(D=0;D<E;++D){var M=C[D];if(!M){J=true}else{if(!this.silent){}var L=M.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var B=null;if(I.length>0){B=I[0]}try{G=M.fn.call(L,B,M.obj)}catch(F){this.lastError=F;if(A){throw F}}}else{try{G=M.fn.call(L,this.type,I,M.obj)}catch(H){this.lastError=H;if(A){throw H}}}if(false===G){if(!this.silent){}break}}}return(G!==false)},unsubscribeAll:function(){var A=this.subscribers.length,B;for(B=A-1;B>-1;B--){this._delete(B)}this.subscribers=[];return A},_delete:function(A){var B=this.subscribers[A];if(B){delete B.fn;delete B.obj}this.subscribers.splice(A,1)},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope}};YAHOO.util.Subscriber=function(A,B,C){this.fn=A;this.obj=YAHOO.lang.isUndefined(B)?null:B;this.overrideContext=C};YAHOO.util.Subscriber.prototype.getScope=function(A){if(this.overrideContext){if(this.overrideContext===true){return this.obj}else{return this.overrideContext}}return A};YAHOO.util.Subscriber.prototype.contains=function(A,B){if(B){return(this.fn==A&&this.obj==B)}else{return(this.fn==A)}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }"};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var H=false;var I=[];var J=[];var G=[];var E=[];var C=0;var F=[];var B=[];var A=0;var D={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9};var K=YAHOO.env.ua.ie?"focusin":"focus";var L=YAHOO.env.ua.ie?"focusout":"blur";return{POLL_RETRYS:2000,POLL_INTERVAL:20,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,_dri:null,DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){var M=this;var N=function(){M._tryPreloadAttach()};this._interval=setInterval(N,this.POLL_INTERVAL)}},onAvailable:function(S,O,Q,R,P){var M=(YAHOO.lang.isString(S))?[S]:S;for(var N=0;N<M.length;N=N+1){F.push({id:M[N],fn:O,obj:Q,overrideContext:R,checkReady:P})}C=this.POLL_RETRYS;this.startInterval()},onContentReady:function(P,M,N,O){this.onAvailable(P,M,N,O,true)},onDOMReady:function(M,N,O){if(this.DOMReady){setTimeout(function(){var P=window;if(O){if(O===true){P=N}else{P=O}}M.call(P,"DOMReady",[],N)},0)}else{this.DOMReadyEvent.subscribe(M,N,O)}},_addListener:function(O,M,Y,S,W,b){if(!Y||!Y.call){return false}if(this._isValidCollection(O)){var Z=true;for(var T=0,V=O.length;T<V;++T){Z=this.on(O[T],M,Y,S,W)&&Z}return Z}else{if(YAHOO.lang.isString(O)){var R=this.getEl(O);if(R){O=R}else{this.onAvailable(O,function(){YAHOO.util.Event.on(O,M,Y,S,W)});return true}}}if(!O){return false}if("unload"==M&&S!==this){J[J.length]=[O,M,Y,S,W];return true}var N=O;if(W){if(W===true){N=S}else{N=W}}var P=function(c){return Y.call(N,YAHOO.util.Event.getEvent(c,O),S)};var a=[O,M,Y,P,N,S,W];var U=I.length;I[U]=a;if(this.useLegacyEvent(O,M)){var Q=this.getLegacyIndex(O,M);if(Q==-1||O!=G[Q][0]){Q=G.length;B[O.id+M]=Q;G[Q]=[O,M,O["on"+M]];E[Q]=[];O["on"+M]=function(c){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(c),Q)}}E[Q].push(a)}else{try{this._simpleAdd(O,M,P,b)}catch(X){this.lastError=X;this.removeListener(O,M,Y);return false}}return true},addListener:function(N,Q,M,O,P){return this._addListener(N,Q,M,O,P,false)},addFocusListener:function(N,M,O,P){return this._addListener(N,K,M,O,P,true)},removeFocusListener:function(N,M){return this.removeListener(N,K,M)},addBlurListener:function(N,M,O,P){return this._addListener(N,L,M,O,P,true)},removeBlurListener:function(N,M){return this.removeListener(N,L,M)},fireLegacyEvent:function(R,P){var T=true,M,V,U,N,S;V=E[P].slice();for(var O=0,Q=V.length;O<Q;++O){U=V[O];if(U&&U[this.WFN]){N=U[this.ADJ_SCOPE];S=U[this.WFN].call(N,R);T=(T&&S)}}M=G[P];if(M&&M[2]){M[2](R)}return T},getLegacyIndex:function(N,O){var M=this.generateId(N)+O;if(typeof B[M]=="undefined"){return-1}else{return B[M]}},useLegacyEvent:function(M,N){return(this.webkit&&this.webkit<419&&("click"==N||"dblclick"==N))},removeListener:function(N,M,V){var Q,T,X;if(typeof N=="string"){N=this.getEl(N)}else{if(this._isValidCollection(N)){var W=true;for(Q=N.length-1;Q>-1;Q--){W=(this.removeListener(N[Q],M,V)&&W)}return W}}if(!V||!V.call){return this.purgeElement(N,false,M)}if("unload"==M){for(Q=J.length-1;Q>-1;Q--){X=J[Q];if(X&&X[0]==N&&X[1]==M&&X[2]==V){J.splice(Q,1);return true}}return false}var R=null;var S=arguments[3];if("undefined"===typeof S){S=this._getCacheIndex(N,M,V)}if(S>=0){R=I[S]}if(!N||!R){return false}if(this.useLegacyEvent(N,M)){var P=this.getLegacyIndex(N,M);var O=E[P];if(O){for(Q=0,T=O.length;Q<T;++Q){X=O[Q];if(X&&X[this.EL]==N&&X[this.TYPE]==M&&X[this.FN]==V){O.splice(Q,1);break}}}}else{try{this._simpleRemove(N,M,R[this.WFN],false)}catch(U){this.lastError=U;return false}}delete I[S][this.WFN];delete I[S][this.FN];I.splice(S,1);return true},getTarget:function(O,N){var M=O.target||O.srcElement;return this.resolveTextNode(M)},resolveTextNode:function(N){try{if(N&&3==N.nodeType){return N.parentNode}}catch(M){}return N},getPageX:function(N){var M=N.pageX;if(!M&&0!==M){M=N.clientX||0;if(this.isIE){M+=this._getScrollLeft()}}return M},getPageY:function(M){var N=M.pageY;if(!N&&0!==N){N=M.clientY||0;if(this.isIE){N+=this._getScrollTop()}}return N},getXY:function(M){return[this.getPageX(M),this.getPageY(M)]},getRelatedTarget:function(N){var M=N.relatedTarget;if(!M){if(N.type=="mouseout"){M=N.toElement}else{if(N.type=="mouseover"){M=N.fromElement}}}return this.resolveTextNode(M)},getTime:function(O){if(!O.time){var N=new Date().getTime();try{O.time=N}catch(M){this.lastError=M;return N}}return O.time},stopEvent:function(M){this.stopPropagation(M);this.preventDefault(M)},stopPropagation:function(M){if(M.stopPropagation){M.stopPropagation()}else{M.cancelBubble=true}},preventDefault:function(M){if(M.preventDefault){M.preventDefault()}else{M.returnValue=false}},getEvent:function(O,M){var N=O||window.event;if(!N){var P=this.getEvent.caller;while(P){N=P.arguments[0];if(N&&Event==N.constructor){break}P=P.caller}}return N},getCharCode:function(N){var M=N.keyCode||N.charCode||0;if(YAHOO.env.ua.webkit&&(M in D)){M=D[M]}return M},_getCacheIndex:function(Q,R,P){for(var O=0,N=I.length;O<N;O=O+1){var M=I[O];if(M&&M[this.FN]==P&&M[this.EL]==Q&&M[this.TYPE]==R){return O}}return-1},generateId:function(M){var N=M.id;if(!N){N="yuievtautoid-"+A;++A;M.id=N}return N},_isValidCollection:function(N){try{return(N&&typeof N!=="string"&&N.length&&!N.tagName&&!N.alert&&typeof N[0]!=="undefined")}catch(M){return false}},elCache:{},getEl:function(M){return(typeof M==="string")?document.getElementById(M):M},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(N){if(!H){H=true;var M=YAHOO.util.Event;M._ready();M._tryPreloadAttach()}},_ready:function(N){var M=YAHOO.util.Event;if(!M.DOMReady){M.DOMReady=true;M.DOMReadyEvent.fire();M._simpleRemove(document,"DOMContentLoaded",M._ready)}},_tryPreloadAttach:function(){if(F.length===0){C=0;if(this._interval){clearInterval(this._interval);this._interval=null}return}if(this.locked){return}if(this.isIE){if(!this.DOMReady){this.startInterval();return}}this.locked=true;var S=!H;if(!S){S=(C>0&&F.length>0)}var R=[];var T=function(V,W){var U=V;if(W.overrideContext){if(W.overrideContext===true){U=W.obj}else{U=W.overrideContext}}W.fn.call(U,W.obj)};var N,M,Q,P,O=[];for(N=0,M=F.length;N<M;N=N+1){Q=F[N];if(Q){P=this.getEl(Q.id);if(P){if(Q.checkReady){if(H||P.nextSibling||!S){O.push(Q);F[N]=null}}else{T(P,Q);F[N]=null}}else{R.push(Q)}}}for(N=0,M=O.length;N<M;N=N+1){Q=O[N];T(this.getEl(Q.id),Q)}C--;if(S){for(N=F.length-1;N>-1;N--){Q=F[N];if(!Q||!Q.id){F.splice(N,1)}}this.startInterval()}else{if(this._interval){clearInterval(this._interval);this._interval=null}}this.locked=false},purgeElement:function(Q,R,T){var O=(YAHOO.lang.isString(Q))?this.getEl(Q):Q;var S=this.getListeners(O,T),P,M;if(S){for(P=S.length-1;P>-1;P--){var N=S[P];this.removeListener(O,N.type,N.fn)}}if(R&&O&&O.childNodes){for(P=0,M=O.childNodes.length;P<M;++P){this.purgeElement(O.childNodes[P],R,T)}}},getListeners:function(O,M){var R=[],N;if(!M){N=[I,J]}else{if(M==="unload"){N=[J]}else{N=[I]}}var T=(YAHOO.lang.isString(O))?this.getEl(O):O;for(var Q=0;Q<N.length;Q=Q+1){var V=N[Q];if(V){for(var S=0,U=V.length;S<U;++S){var P=V[S];if(P&&P[this.EL]===T&&(!M||M===P[this.TYPE])){R.push({type:P[this.TYPE],fn:P[this.FN],obj:P[this.OBJ],adjust:P[this.OVERRIDE],scope:P[this.ADJ_SCOPE],index:S})}}}}return(R.length)?R:null},_unload:function(T){var N=YAHOO.util.Event,Q,P,O,S,R,U=J.slice(),M;for(Q=0,S=J.length;Q<S;++Q){O=U[Q];if(O){M=window;if(O[N.ADJ_SCOPE]){if(O[N.ADJ_SCOPE]===true){M=O[N.UNLOAD_OBJ]}else{M=O[N.ADJ_SCOPE]}}O[N.FN].call(M,N.getEvent(T,O[N.EL]),O[N.UNLOAD_OBJ]);U[Q]=null}}O=null;M=null;J=null;if(I){for(P=I.length-1;P>-1;P--){O=I[P];if(O){N.removeListener(O[N.EL],O[N.TYPE],O[N.FN],P)}}O=null}G=null;N._simpleRemove(window,"unload",N._unload)},_getScrollLeft:function(){return this._getScroll()[1]},_getScrollTop:function(){return this._getScroll()[0]},_getScroll:function(){var M=document.documentElement,N=document.body;if(M&&(M.scrollTop||M.scrollLeft)){return[M.scrollTop,M.scrollLeft]}else{if(N){return[N.scrollTop,N.scrollLeft]}else{return[0,0]}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(O,P,N,M){O.addEventListener(P,N,(M))}}else{if(window.attachEvent){return function(O,P,N,M){O.attachEvent("on"+P,N)}}else{return function(){}}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(O,P,N,M){O.removeEventListener(P,N,(M))}}else{if(window.detachEvent){return function(N,O,M){N.detachEvent("on"+O,M)}}else{return function(){}}}}()}}();(function(){var EU=YAHOO.util.Event;EU.on=EU.addListener;EU.onFocus=EU.addFocusListener;EU.onBlur=EU.addBlurListener;if(EU.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var n=document.createElement("p");EU._dri=setInterval(function(){try{n.doScroll("left");clearInterval(EU._dri);EU._dri=null;EU._ready();n=null}catch(ex){}},EU.POLL_INTERVAL)}else{if(EU.webkit&&EU.webkit<525){EU._dri=setInterval(function(){var rs=document.readyState;if("loaded"==rs||"complete"==rs){clearInterval(EU._dri);EU._dri=null;EU._ready()}},EU.POLL_INTERVAL)}else{EU._simpleAdd(document,"DOMContentLoaded",EU._ready)}}EU._simpleAdd(window,"load",EU._load);EU._simpleAdd(window,"unload",EU._unload);EU._tryPreloadAttach()})()}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(A,C,F,E){this.__yui_events=this.__yui_events||{};var D=this.__yui_events[A];if(D){D.subscribe(C,F,E)}else{this.__yui_subscribers=this.__yui_subscribers||{};var B=this.__yui_subscribers;if(!B[A]){B[A]=[]}B[A].push({fn:C,obj:F,overrideContext:E})}},unsubscribe:function(C,E,G){this.__yui_events=this.__yui_events||{};var A=this.__yui_events;if(C){var F=A[C];if(F){return F.unsubscribe(E,G)}}else{var B=true;for(var D in A){if(YAHOO.lang.hasOwnProperty(A,D)){B=B&&A[D].unsubscribe(E,G)}}return B}return false},unsubscribeAll:function(A){return this.unsubscribe(A)},createEvent:function(G,D){this.__yui_events=this.__yui_events||{};var A=D||{};var I=this.__yui_events;if(I[G]){}else{var H=A.scope||this;var E=(A.silent);var B=new YAHOO.util.CustomEvent(G,H,E,YAHOO.util.CustomEvent.FLAT);I[G]=B;if(A.onSubscribeCallback){B.subscribeEvent.subscribe(A.onSubscribeCallback)}this.__yui_subscribers=this.__yui_subscribers||{};var F=this.__yui_subscribers[G];if(F){for(var C=0;C<F.length;++C){B.subscribe(F[C].fn,F[C].obj,F[C].overrideContext)}}}return I[G]},fireEvent:function(E,D,A,C){this.__yui_events=this.__yui_events||{};var G=this.__yui_events[E];if(!G){return null}var B=[];for(var F=1;F<arguments.length;++F){B.push(arguments[F])}return G.fire.apply(G,B)},hasEvent:function(A){if(this.__yui_events){if(this.__yui_events[A]){return true}}return false}};(function(){var A=YAHOO.util.Event,C=YAHOO.lang;YAHOO.util.KeyListener=function(D,I,E,F){if(!D){}else{if(!I){}else{if(!E){}}}if(!F){F=YAHOO.util.KeyListener.KEYDOWN}var G=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(C.isString(D)){D=document.getElementById(D)}if(C.isFunction(E)){G.subscribe(E)}else{G.subscribe(E.fn,E.scope,E.correctScope)}function H(O,N){if(!I.shift){I.shift=false}if(!I.alt){I.alt=false}if(!I.ctrl){I.ctrl=false}if(O.shiftKey==I.shift&&O.altKey==I.alt&&O.ctrlKey==I.ctrl){var J,M=I.keys,L;if(YAHOO.lang.isArray(M)){for(var K=0;K<M.length;K++){J=M[K];L=A.getCharCode(O);if(J==L){G.fire(L,O);break}}}else{L=A.getCharCode(O);if(M==L){G.fire(L,O)}}}}this.enable=function(){if(!this.enabled){A.on(D,F,H);this.enabledEvent.fire(I)}this.enabled=true};this.disable=function(){if(this.enabled){A.removeListener(D,F,H);this.disabledEvent.fire(I)}this.enabled=false};this.toString=function(){return"KeyListener ["+I.keys+"] "+D.tagName+(D.id?"["+D.id+"]":"")}};var B=YAHOO.util.KeyListener;B.KEYDOWN="keydown";B.KEYUP="keyup";B.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38}})();YAHOO.register("event",YAHOO.util.Event,{version:"2.7.0",build:"1799"});YAHOO.util.Connect={_msxml_progid:["Microsoft.XMLHTTP","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP"],_http_headers:{},_has_http_headers:false,_use_default_post_header:true,_default_post_header:"application/x-www-form-urlencoded; charset=UTF-8",_default_form_header:"application/x-www-form-urlencoded",_use_default_xhr_header:true,_default_xhr_header:"XMLHttpRequest",_has_default_headers:true,_default_headers:{},_isFormSubmit:false,_isFileUpload:false,_formNode:null,_sFormData:null,_poll:{},_timeOut:{},_polling_interval:50,_transaction_id:0,_submitElementValue:null,_hasSubmitListener:(function(){if(YAHOO.util.Event){YAHOO.util.Event.addListener(document,"click",function(C){var B=YAHOO.util.Event.getTarget(C),A=B.nodeName.toLowerCase();if((A==="input"||A==="button")&&(B.type&&B.type.toLowerCase()=="submit")){YAHOO.util.Connect._submitElementValue=encodeURIComponent(B.name)+"="+encodeURIComponent(B.value)}});return true}return false})(),startEvent:new YAHOO.util.CustomEvent("start"),completeEvent:new YAHOO.util.CustomEvent("complete"),successEvent:new YAHOO.util.CustomEvent("success"),failureEvent:new YAHOO.util.CustomEvent("failure"),uploadEvent:new YAHOO.util.CustomEvent("upload"),abortEvent:new YAHOO.util.CustomEvent("abort"),_customEvents:{onStart:["startEvent","start"],onComplete:["completeEvent","complete"],onSuccess:["successEvent","success"],onFailure:["failureEvent","failure"],onUpload:["uploadEvent","upload"],onAbort:["abortEvent","abort"]},setProgId:function(A){this._msxml_progid.unshift(A)},setDefaultPostHeader:function(A){if(typeof A=="string"){this._default_post_header=A}else{if(typeof A=="boolean"){this._use_default_post_header=A}}},setDefaultXhrHeader:function(A){if(typeof A=="string"){this._default_xhr_header=A}else{this._use_default_xhr_header=A}},setPollingInterval:function(A){if(typeof A=="number"&&isFinite(A)){this._polling_interval=A}},createXhrObject:function(F){var E,A;try{A=new XMLHttpRequest();E={conn:A,tId:F}}catch(D){for(var B=0;B<this._msxml_progid.length;++B){try{A=new ActiveXObject(this._msxml_progid[B]);E={conn:A,tId:F};break}catch(C){}}}finally{return E}},getConnectionObject:function(A){var C;var D=this._transaction_id;try{if(!A){C=this.createXhrObject(D)}else{C={};C.tId=D;C.isUpload=true}if(C){this._transaction_id++}}catch(B){}finally{return C}},asyncRequest:function(F,C,E,A){var D=(this._isFileUpload)?this.getConnectionObject(true):this.getConnectionObject();var B=(E&&E.argument)?E.argument:null;if(!D){return null}else{if(E&&E.customevents){this.initCustomEvents(D,E)}if(this._isFormSubmit){if(this._isFileUpload){this.uploadFile(D,E,C,A);return D}if(F.toUpperCase()=="GET"){if(this._sFormData.length!==0){C+=((C.indexOf("?")==-1)?"?":"&")+this._sFormData}}else{if(F.toUpperCase()=="POST"){A=A?this._sFormData+"&"+A:this._sFormData}}}if(F.toUpperCase()=="GET"&&(E&&E.cache===false)){C+=((C.indexOf("?")==-1)?"?":"&")+"rnd="+new Date().valueOf().toString()}D.conn.open(F,C,true);if(this._use_default_xhr_header){if(!this._default_headers["X-Requested-With"]){this.initHeader("X-Requested-With",this._default_xhr_header,true)}}if((F.toUpperCase()==="POST"&&this._use_default_post_header)&&this._isFormSubmit===false){this.initHeader("Content-Type",this._default_post_header)}if(this._has_default_headers||this._has_http_headers){this.setHeader(D)}this.handleReadyState(D,E);D.conn.send(A||"");if(this._isFormSubmit===true){this.resetFormState()}this.startEvent.fire(D,B);if(D.startEvent){D.startEvent.fire(D,B)}return D}},initCustomEvents:function(A,C){var B;for(B in C.customevents){if(this._customEvents[B][0]){A[this._customEvents[B][0]]=new YAHOO.util.CustomEvent(this._customEvents[B][1],(C.scope)?C.scope:null);A[this._customEvents[B][0]].subscribe(C.customevents[B])}}},handleReadyState:function(C,D){var B=this;var A=(D&&D.argument)?D.argument:null;if(D&&D.timeout){this._timeOut[C.tId]=window.setTimeout(function(){B.abort(C,D,true)},D.timeout)}this._poll[C.tId]=window.setInterval(function(){if(C.conn&&C.conn.readyState===4){window.clearInterval(B._poll[C.tId]);delete B._poll[C.tId];if(D&&D.timeout){window.clearTimeout(B._timeOut[C.tId]);delete B._timeOut[C.tId]}B.completeEvent.fire(C,A);if(C.completeEvent){C.completeEvent.fire(C,A)}B.handleTransactionResponse(C,D)}},this._polling_interval)},handleTransactionResponse:function(F,G,A){var D,C;var B=(G&&G.argument)?G.argument:null;try{if(F.conn.status!==undefined&&F.conn.status!==0){D=F.conn.status}else{D=13030}}catch(E){D=13030}if(D>=200&&D<300||D===1223){C=this.createResponseObject(F,B);if(G&&G.success){if(!G.scope){G.success(C)}else{G.success.apply(G.scope,[C])}}this.successEvent.fire(C);if(F.successEvent){F.successEvent.fire(C)}}else{switch(D){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:C=this.createExceptionObject(F.tId,B,(A?A:false));if(G&&G.failure){if(!G.scope){G.failure(C)}else{G.failure.apply(G.scope,[C])}}break;default:C=this.createResponseObject(F,B);if(G&&G.failure){if(!G.scope){G.failure(C)}else{G.failure.apply(G.scope,[C])}}}this.failureEvent.fire(C);if(F.failureEvent){F.failureEvent.fire(C)}}this.releaseObject(F);C=null},createResponseObject:function(A,G){var D={};var I={};try{var C=A.conn.getAllResponseHeaders();var F=C.split("\n");for(var E=0;E<F.length;E++){var B=F[E].indexOf(":");if(B!=-1){I[F[E].substring(0,B)]=F[E].substring(B+2)}}}catch(H){}D.tId=A.tId;D.status=(A.conn.status==1223)?204:A.conn.status;D.statusText=(A.conn.status==1223)?"No Content":A.conn.statusText;D.getResponseHeader=I;D.getAllResponseHeaders=C;D.responseText=A.conn.responseText;D.responseXML=A.conn.responseXML;if(G){D.argument=G}return D},createExceptionObject:function(H,D,A){var F=0;var G="communication failure";var C=-1;var B="transaction aborted";var E={};E.tId=H;if(A){E.status=C;E.statusText=B}else{E.status=F;E.statusText=G}if(D){E.argument=D}return E},initHeader:function(A,D,C){var B=(C)?this._default_headers:this._http_headers;B[A]=D;if(C){this._has_default_headers=true}else{this._has_http_headers=true}},setHeader:function(A){var B;if(this._has_default_headers){for(B in this._default_headers){if(YAHOO.lang.hasOwnProperty(this._default_headers,B)){A.conn.setRequestHeader(B,this._default_headers[B])}}}if(this._has_http_headers){for(B in this._http_headers){if(YAHOO.lang.hasOwnProperty(this._http_headers,B)){A.conn.setRequestHeader(B,this._http_headers[B])}}delete this._http_headers;this._http_headers={};this._has_http_headers=false}},resetDefaultHeaders:function(){delete this._default_headers;this._default_headers={};this._has_default_headers=false},setForm:function(M,H,C){var L,B,K,I,P,J=false,F=[],O=0,E,G,D,N,A;this.resetFormState();if(typeof M=="string"){L=(document.getElementById(M)||document.forms[M])}else{if(typeof M=="object"){L=M}else{return}}if(H){this.createFrame(C?C:null);this._isFormSubmit=true;this._isFileUpload=true;this._formNode=L;return}for(E=0,G=L.elements.length;E<G;++E){B=L.elements[E];P=B.disabled;K=B.name;if(!P&&K){K=encodeURIComponent(K)+"=";I=encodeURIComponent(B.value);switch(B.type){case"select-one":if(B.selectedIndex>-1){A=B.options[B.selectedIndex];F[O++]=K+encodeURIComponent((A.attributes.value&&A.attributes.value.specified)?A.value:A.text)}break;case"select-multiple":if(B.selectedIndex>-1){for(D=B.selectedIndex,N=B.options.length;D<N;++D){A=B.options[D];if(A.selected){F[O++]=K+encodeURIComponent((A.attributes.value&&A.attributes.value.specified)?A.value:A.text)}}}break;case"radio":case"checkbox":if(B.checked){F[O++]=K+I}break;case"file":case undefined:case"reset":case"button":break;case"submit":if(J===false){if(this._hasSubmitListener&&this._submitElementValue){F[O++]=this._submitElementValue}J=true}break;default:F[O++]=K+I}}}this._isFormSubmit=true;this._sFormData=F.join("&");this.initHeader("Content-Type",this._default_form_header);return this._sFormData},resetFormState:function(){this._isFormSubmit=false;this._isFileUpload=false;this._formNode=null;this._sFormData=""},createFrame:function(A){var B="yuiIO"+this._transaction_id;var C;if(YAHOO.env.ua.ie){C=document.createElement('<iframe id="'+B+'" name="'+B+'" />');if(typeof A=="boolean"){C.src="javascript:false"}}else{C=document.createElement("iframe");C.id=B;C.name=B}C.style.position="absolute";C.style.top="-1000px";C.style.left="-1000px";document.body.appendChild(C)},appendPostData:function(A){var D=[],B=A.split("&"),C,E;for(C=0;C<B.length;C++){E=B[C].indexOf("=");if(E!=-1){D[C]=document.createElement("input");D[C].type="hidden";D[C].name=decodeURIComponent(B[C].substring(0,E));D[C].value=decodeURIComponent(B[C].substring(E+1));this._formNode.appendChild(D[C])}}return D},uploadFile:function(D,N,E,C){var I="yuiIO"+D.tId,J="multipart/form-data",L=document.getElementById(I),O=this,K=(N&&N.argument)?N.argument:null,M,H,B,G;var A={action:this._formNode.getAttribute("action"),method:this._formNode.getAttribute("method"),target:this._formNode.getAttribute("target")};this._formNode.setAttribute("action",E);this._formNode.setAttribute("method","POST");this._formNode.setAttribute("target",I);if(YAHOO.env.ua.ie){this._formNode.setAttribute("encoding",J)}else{this._formNode.setAttribute("enctype",J)}if(C){M=this.appendPostData(C)}this._formNode.submit();this.startEvent.fire(D,K);if(D.startEvent){D.startEvent.fire(D,K)}if(N&&N.timeout){this._timeOut[D.tId]=window.setTimeout(function(){O.abort(D,N,true)},N.timeout)}if(M&&M.length>0){for(H=0;H<M.length;H++){this._formNode.removeChild(M[H])}}for(B in A){if(YAHOO.lang.hasOwnProperty(A,B)){if(A[B]){this._formNode.setAttribute(B,A[B])}else{this._formNode.removeAttribute(B)}}}this.resetFormState();var F=function(){if(N&&N.timeout){window.clearTimeout(O._timeOut[D.tId]);delete O._timeOut[D.tId]}O.completeEvent.fire(D,K);if(D.completeEvent){D.completeEvent.fire(D,K)}G={tId:D.tId,argument:N.argument};try{G.responseText=L.contentWindow.document.body?L.contentWindow.document.body.innerHTML:L.contentWindow.document.documentElement.textContent;G.responseXML=L.contentWindow.document.XMLDocument?L.contentWindow.document.XMLDocument:L.contentWindow.document}catch(P){}if(N&&N.upload){if(!N.scope){N.upload(G)}else{N.upload.apply(N.scope,[G])}}O.uploadEvent.fire(G);if(D.uploadEvent){D.uploadEvent.fire(G)}YAHOO.util.Event.removeListener(L,"load",F);setTimeout(function(){document.body.removeChild(L);O.releaseObject(D)},100)};YAHOO.util.Event.addListener(L,"load",F)},abort:function(E,G,A){var D;var B=(G&&G.argument)?G.argument:null;if(E&&E.conn){if(this.isCallInProgress(E)){E.conn.abort();window.clearInterval(this._poll[E.tId]);delete this._poll[E.tId];if(A){window.clearTimeout(this._timeOut[E.tId]);delete this._timeOut[E.tId]}D=true}}else{if(E&&E.isUpload===true){var C="yuiIO"+E.tId;var F=document.getElementById(C);if(F){YAHOO.util.Event.removeListener(F,"load");document.body.removeChild(F);if(A){window.clearTimeout(this._timeOut[E.tId]);delete this._timeOut[E.tId]}D=true}}else{D=false}}if(D===true){this.abortEvent.fire(E,B);if(E.abortEvent){E.abortEvent.fire(E,B)}this.handleTransactionResponse(E,G,true)}return D},isCallInProgress:function(B){if(B&&B.conn){return B.conn.readyState!==4&&B.conn.readyState!==0}else{if(B&&B.isUpload===true){var A="yuiIO"+B.tId;return document.getElementById(A)?true:false}else{return false}}},releaseObject:function(A){if(A&&A.conn){A.conn=null;A=null}}};YAHOO.register("connection",YAHOO.util.Connect,{version:"2.7.0",build:"1799"});(function(){var B=YAHOO.util;var A=function(D,C,E,F){if(!D){}this.init(D,C,E,F)};A.NAME="Anim";A.prototype={toString:function(){var C=this.getEl()||{};var D=C.id||C.tagName;return(this.constructor.NAME+": "+D)},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(C,E,D){return this.method(this.currentFrame,E,D-E,this.totalFrames)},setAttribute:function(C,F,E){var D=this.getEl();if(this.patterns.noNegatives.test(C)){F=(F>0)?F:0}if("style"in D){B.Dom.setStyle(D,C,F+E)}else{if(C in D){D[C]=F}}},getAttribute:function(C){var E=this.getEl();var G=B.Dom.getStyle(E,C);if(G!=="auto"&&!this.patterns.offsetUnit.test(G)){return parseFloat(G)}var D=this.patterns.offsetAttribute.exec(C)||[];var H=!!(D[3]);var F=!!(D[2]);if("style"in E){if(F||(B.Dom.getStyle(E,"position")=="absolute"&&H)){G=E["offset"+D[0].charAt(0).toUpperCase()+D[0].substr(1)]}else{G=0}}else{if(C in E){G=E[C]}}return G},getDefaultUnit:function(C){if(this.patterns.defaultUnit.test(C)){return"px"}return""},setRuntimeAttribute:function(D){var I;var E;var F=this.attributes;this.runtimeAttributes[D]={};var H=function(J){return(typeof J!=="undefined")};if(!H(F[D]["to"])&&!H(F[D]["by"])){return false}I=(H(F[D]["from"]))?F[D]["from"]:this.getAttribute(D);if(H(F[D]["to"])){E=F[D]["to"]}else{if(H(F[D]["by"])){if(I.constructor==Array){E=[];for(var G=0,C=I.length;G<C;++G){E[G]=I[G]+F[D]["by"][G]*1}}else{E=I+F[D]["by"]*1}}}this.runtimeAttributes[D].start=I;this.runtimeAttributes[D].end=E;this.runtimeAttributes[D].unit=(H(F[D].unit))?F[D]["unit"]:this.getDefaultUnit(D);return true},init:function(E,J,I,C){var D=false;var F=null;var H=0;E=B.Dom.get(E);this.attributes=J||{};this.duration=!YAHOO.lang.isUndefined(I)?I:1;this.method=C||B.Easing.easeNone;this.useSeconds=true;this.currentFrame=0;this.totalFrames=B.AnimMgr.fps;this.setEl=function(M){E=B.Dom.get(M)};this.getEl=function(){return E};this.isAnimated=function(){return D};this.getStartTime=function(){return F};this.runtimeAttributes={};this.animate=function(){if(this.isAnimated()){return false}this.currentFrame=0;this.totalFrames=(this.useSeconds)?Math.ceil(B.AnimMgr.fps*this.duration):this.duration;if(this.duration===0&&this.useSeconds){this.totalFrames=1}B.AnimMgr.registerElement(this);return true};this.stop=function(M){if(!this.isAnimated()){return false}if(M){this.currentFrame=this.totalFrames;this._onTween.fire()}B.AnimMgr.stop(this)};var L=function(){this.onStart.fire();this.runtimeAttributes={};for(var M in this.attributes){this.setRuntimeAttribute(M)}D=true;H=0;F=new Date()};var K=function(){var O={duration:new Date()-this.getStartTime(),currentFrame:this.currentFrame};O.toString=function(){return("duration: "+O.duration+", currentFrame: "+O.currentFrame)};this.onTween.fire(O);var N=this.runtimeAttributes;for(var M in N){this.setAttribute(M,this.doMethod(M,N[M].start,N[M].end),N[M].unit)}H+=1};var G=function(){var M=(new Date()-F)/1000;var N={duration:M,frames:H,fps:H/M};N.toString=function(){return("duration: "+N.duration+", frames: "+N.frames+", fps: "+N.fps)};D=false;H=0;this.onComplete.fire(N)};this._onStart=new B.CustomEvent("_start",this,true);this.onStart=new B.CustomEvent("start",this);this.onTween=new B.CustomEvent("tween",this);this._onTween=new B.CustomEvent("_tween",this,true);this.onComplete=new B.CustomEvent("complete",this);this._onComplete=new B.CustomEvent("_complete",this,true);this._onStart.subscribe(L);this._onTween.subscribe(K);this._onComplete.subscribe(G)}};B.Anim=A})();YAHOO.util.AnimMgr=new function(){var C=null;var B=[];var A=0;this.fps=1000;this.delay=1;this.registerElement=function(F){B[B.length]=F;A+=1;F._onStart.fire();this.start()};this.unRegister=function(G,F){F=F||E(G);if(!G.isAnimated()||F==-1){return false}G._onComplete.fire();B.splice(F,1);A-=1;if(A<=0){this.stop()}return true};this.start=function(){if(C===null){C=setInterval(this.run,this.delay)}};this.stop=function(H){if(!H){clearInterval(C);for(var G=0,F=B.length;G<F;++G){this.unRegister(B[0],0)}B=[];C=null;A=0}else{this.unRegister(H)}};this.run=function(){for(var H=0,F=B.length;H<F;++H){var G=B[H];if(!G||!G.isAnimated()){continue}if(G.currentFrame<G.totalFrames||G.totalFrames===null){G.currentFrame+=1;if(G.useSeconds){D(G)}G._onTween.fire()}else{YAHOO.util.AnimMgr.stop(G,H)}}};var E=function(H){for(var G=0,F=B.length;G<F;++G){if(B[G]==H){return G}}return-1};var D=function(G){var J=G.totalFrames;var I=G.currentFrame;var H=(G.currentFrame*G.duration*1000/G.totalFrames);var F=(new Date()-G.getStartTime());var K=0;if(F<G.duration*1000){K=Math.round((F/H-1)*G.currentFrame)}else{K=J-(I+1)}if(K>0&&isFinite(K)){if(G.currentFrame+K>=J){K=J-(I+1)}G.currentFrame+=K}}};YAHOO.util.Bezier=new function(){this.getPosition=function(E,D){var F=E.length;var C=[];for(var B=0;B<F;++B){C[B]=[E[B][0],E[B][1]]}for(var A=1;A<F;++A){for(B=0;B<F-A;++B){C[B][0]=(1-D)*C[B][0]+D*C[parseInt(B+1,10)][0];C[B][1]=(1-D)*C[B][1]+D*C[parseInt(B+1,10)][1]}}return[C[0][0],C[0][1]]}};(function(){var A=function(F,E,G,H){A.superclass.constructor.call(this,F,E,G,H)};A.NAME="ColorAnim";A.DEFAULT_BGCOLOR="#fff";var C=YAHOO.util;YAHOO.extend(A,C.Anim);var D=A.superclass;var B=A.prototype;B.patterns.color=/color$/i;B.patterns.rgb=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;B.patterns.hex=/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;B.patterns.hex3=/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;B.patterns.transparent=/^transparent|rgba\(0, 0, 0, 0\)$/;B.parseColor=function(E){if(E.length==3){return E}var F=this.patterns.hex.exec(E);if(F&&F.length==4){return[parseInt(F[1],16),parseInt(F[2],16),parseInt(F[3],16)]}F=this.patterns.rgb.exec(E);if(F&&F.length==4){return[parseInt(F[1],10),parseInt(F[2],10),parseInt(F[3],10)]}F=this.patterns.hex3.exec(E);if(F&&F.length==4){return[parseInt(F[1]+F[1],16),parseInt(F[2]+F[2],16),parseInt(F[3]+F[3],16)]}return null};B.getAttribute=function(E){var G=this.getEl();if(this.patterns.color.test(E)){var I=YAHOO.util.Dom.getStyle(G,E);var H=this;if(this.patterns.transparent.test(I)){var F=YAHOO.util.Dom.getAncestorBy(G,function(J){return!H.patterns.transparent.test(I)});if(F){I=C.Dom.getStyle(F,E)}else{I=A.DEFAULT_BGCOLOR}}}else{I=D.getAttribute.call(this,E)}return I};B.doMethod=function(F,J,G){var I;if(this.patterns.color.test(F)){I=[];for(var H=0,E=J.length;H<E;++H){I[H]=D.doMethod.call(this,F,J[H],G[H])}I="rgb("+Math.floor(I[0])+","+Math.floor(I[1])+","+Math.floor(I[2])+")"}else{I=D.doMethod.call(this,F,J,G)}return I};B.setRuntimeAttribute=function(F){D.setRuntimeAttribute.call(this,F);if(this.patterns.color.test(F)){var H=this.attributes;var J=this.parseColor(this.runtimeAttributes[F].start);var G=this.parseColor(this.runtimeAttributes[F].end);if(typeof H[F]["to"]==="undefined"&&typeof H[F]["by"]!=="undefined"){G=this.parseColor(H[F].by);for(var I=0,E=J.length;I<E;++I){G[I]=J[I]+G[I]}}this.runtimeAttributes[F].start=J;this.runtimeAttributes[F].end=G}};C.ColorAnim=A})();YAHOO.util.Easing={easeNone:function(B,A,D,C){return D*B/C+A},easeIn:function(B,A,D,C){return D*(B/=C)*B+A},easeOut:function(B,A,D,C){return-D*(B/=C)*(B-2)+A},easeBoth:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B+A}return-D/2*((--B)*(B-2)-1)+A},easeInStrong:function(B,A,D,C){return D*(B/=C)*B*B*B+A},easeOutStrong:function(B,A,D,C){return-D*((B=B/C-1)*B*B*B-1)+A},easeBothStrong:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B*B*B+A}return-D/2*((B-=2)*B*B*B-2)+A},elasticIn:function(C,A,G,F,B,E){if(C==0){return A}if((C/=F)==1){return A+G}if(!E){E=F*0.3}if(!B||B<Math.abs(G)){B=G;var D=E/4}else{var D=E/(2*Math.PI)*Math.asin(G/B)}return-(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A},elasticOut:function(C,A,G,F,B,E){if(C==0){return A}if((C/=F)==1){return A+G}if(!E){E=F*0.3}if(!B||B<Math.abs(G)){B=G;var D=E/4}else{var D=E/(2*Math.PI)*Math.asin(G/B)}return B*Math.pow(2,-10*C)*Math.sin((C*F-D)*(2*Math.PI)/E)+G+A},elasticBoth:function(C,A,G,F,B,E){if(C==0){return A}if((C/=F/2)==2){return A+G}if(!E){E=F*(0.3*1.5)}if(!B||B<Math.abs(G)){B=G;var D=E/4}else{var D=E/(2*Math.PI)*Math.asin(G/B)}if(C<1){return-0.5*(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A}return B*Math.pow(2,-10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E)*0.5+G+A},backIn:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158}return E*(B/=D)*B*((C+1)*B-C)+A},backOut:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158}return E*((B=B/D-1)*B*((C+1)*B+C)+1)+A},backBoth:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158}if((B/=D/2)<1){return E/2*(B*B*(((C*=(1.525))+1)*B-C))+A}return E/2*((B-=2)*B*(((C*=(1.525))+1)*B+C)+2)+A},bounceIn:function(B,A,D,C){return D-YAHOO.util.Easing.bounceOut(C-B,0,D,C)+A},bounceOut:function(B,A,D,C){if((B/=C)<(1/2.75)){return D*(7.5625*B*B)+A}else{if(B<(2/2.75)){return D*(7.5625*(B-=(1.5/2.75))*B+0.75)+A}else{if(B<(2.5/2.75)){return D*(7.5625*(B-=(2.25/2.75))*B+0.9375)+A}}}return D*(7.5625*(B-=(2.625/2.75))*B+0.984375)+A},bounceBoth:function(B,A,D,C){if(B<C/2){return YAHOO.util.Easing.bounceIn(B*2,0,D,C)*0.5+A}return YAHOO.util.Easing.bounceOut(B*2-C,0,D,C)*0.5+D*0.5+A}};(function(){var A=function(H,G,I,J){if(H){A.superclass.constructor.call(this,H,G,I,J)}};A.NAME="Motion";var E=YAHOO.util;YAHOO.extend(A,E.ColorAnim);var F=A.superclass;var C=A.prototype;C.patterns.points=/^points$/i;C.setAttribute=function(G,I,H){if(this.patterns.points.test(G)){H=H||"px";F.setAttribute.call(this,"left",I[0],H);F.setAttribute.call(this,"top",I[1],H)}else{F.setAttribute.call(this,G,I,H)}};C.getAttribute=function(G){if(this.patterns.points.test(G)){var H=[F.getAttribute.call(this,"left"),F.getAttribute.call(this,"top")]}else{H=F.getAttribute.call(this,G)}return H};C.doMethod=function(G,K,H){var J=null;if(this.patterns.points.test(G)){var I=this.method(this.currentFrame,0,100,this.totalFrames)/100;J=E.Bezier.getPosition(this.runtimeAttributes[G],I)}else{J=F.doMethod.call(this,G,K,H)}return J};C.setRuntimeAttribute=function(P){if(this.patterns.points.test(P)){var H=this.getEl();var J=this.attributes;var G;var L=J["points"]["control"]||[];var I;var M,O;if(L.length>0&&!(L[0]instanceof Array)){L=[L]}else{var K=[];for(M=0,O=L.length;M<O;++M){K[M]=L[M]}L=K}if(E.Dom.getStyle(H,"position")=="static"){E.Dom.setStyle(H,"position","relative")}if(D(J["points"]["from"])){E.Dom.setXY(H,J["points"]["from"])}else{E.Dom.setXY(H,E.Dom.getXY(H))}G=this.getAttribute("points");if(D(J["points"]["to"])){I=B.call(this,J["points"]["to"],G);var N=E.Dom.getXY(this.getEl());for(M=0,O=L.length;M<O;++M){L[M]=B.call(this,L[M],G)}}else{if(D(J["points"]["by"])){I=[G[0]+J["points"]["by"][0],G[1]+J["points"]["by"][1]];for(M=0,O=L.length;M<O;++M){L[M]=[G[0]+L[M][0],G[1]+L[M][1]]}}}this.runtimeAttributes[P]=[G];if(L.length>0){this.runtimeAttributes[P]=this.runtimeAttributes[P].concat(L)}this.runtimeAttributes[P][this.runtimeAttributes[P].length]=I}else{F.setRuntimeAttribute.call(this,P)}};var B=function(G,I){var H=E.Dom.getXY(this.getEl());G=[G[0]-H[0]+I[0],G[1]-H[1]+I[1]];return G};var D=function(G){return(typeof G!=="undefined")};E.Motion=A})();(function(){var D=function(F,E,G,H){if(F){D.superclass.constructor.call(this,F,E,G,H)}};D.NAME="Scroll";var B=YAHOO.util;YAHOO.extend(D,B.ColorAnim);var C=D.superclass;var A=D.prototype;A.doMethod=function(E,H,F){var G=null;if(E=="scroll"){G=[this.method(this.currentFrame,H[0],F[0]-H[0],this.totalFrames),this.method(this.currentFrame,H[1],F[1]-H[1],this.totalFrames)]}else{G=C.doMethod.call(this,E,H,F)}return G};A.getAttribute=function(E){var G=null;var F=this.getEl();if(E=="scroll"){G=[F.scrollLeft,F.scrollTop]}else{G=C.getAttribute.call(this,E)}return G};A.setAttribute=function(E,H,G){var F=this.getEl();if(E=="scroll"){F.scrollLeft=H[0];F.scrollTop=H[1]}else{C.setAttribute.call(this,E,H,G)}};B.Scroll=D})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.7.0",build:"1799"});if(!YAHOO.util.DragDropMgr){YAHOO.util.DragDropMgr=function(){var A=YAHOO.util.Event,B=YAHOO.util.Dom;return{useShim:false,_shimActive:false,_shimState:false,_debugShim:false,_createShim:function(){var C=document.createElement("div");C.id="yui-ddm-shim";if(document.body.firstChild){document.body.insertBefore(C,document.body.firstChild)}else{document.body.appendChild(C)}C.style.display="none";C.style.backgroundColor="red";C.style.position="absolute";C.style.zIndex="99999";B.setStyle(C,"opacity","0");this._shim=C;A.on(C,"mouseup",this.handleMouseUp,this,true);A.on(C,"mousemove",this.handleMouseMove,this,true);A.on(window,"scroll",this._sizeShim,this,true)},_sizeShim:function(){if(this._shimActive){var C=this._shim;C.style.height=B.getDocumentHeight()+"px";C.style.width=B.getDocumentWidth()+"px";C.style.top="0";C.style.left="0"}},_activateShim:function(){if(this.useShim){if(!this._shim){this._createShim()}this._shimActive=true;var C=this._shim,D="0";if(this._debugShim){D=".5"}B.setStyle(C,"opacity",D);this._sizeShim();C.style.display="block"}},_deactivateShim:function(){this._shim.style.display="none";this._shimActive=false},_shim:null,ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,interactionInfo:null,init:function(){this.initialized=true},POINT:0,INTERSECT:1,STRICT_INTERSECT:2,mode:0,_execOnAll:function(E,D){for(var F in this.ids){for(var C in this.ids[F]){var G=this.ids[F][C];if(!this.isTypeOfDD(G)){continue}G[E].apply(G,D)}}},_onLoad:function(){this.init();A.on(document,"mouseup",this.handleMouseUp,this,true);A.on(document,"mousemove",this.handleMouseMove,this,true);A.on(window,"unload",this._onUnload,this,true);A.on(window,"resize",this._onResize,this,true)},_onResize:function(C){this._execOnAll("resetConstraints",[])},lock:function(){this.locked=true},unlock:function(){this.locked=false},isLocked:function(){return this.locked},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:1000,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,fromTimeout:false,regDragDrop:function(D,C){if(!this.initialized){this.init()}if(!this.ids[C]){this.ids[C]={}}this.ids[C][D.id]=D},removeDDFromGroup:function(E,C){if(!this.ids[C]){this.ids[C]={}}var D=this.ids[C];if(D&&D[E.id]){delete D[E.id]}},_remove:function(E){for(var D in E.groups){if(D){var C=this.ids[D];if(C&&C[E.id]){delete C[E.id]}}}delete this.handleIds[E.id]},regHandle:function(D,C){if(!this.handleIds[D]){this.handleIds[D]={}}this.handleIds[D][C]=C},isDragDrop:function(C){return(this.getDDById(C))?true:false},getRelated:function(H,D){var G=[];for(var F in H.groups){for(var E in this.ids[F]){var C=this.ids[F][E];if(!this.isTypeOfDD(C)){continue}if(!D||C.isTarget){G[G.length]=C}}}return G},isLegalTarget:function(G,F){var D=this.getRelated(G,true);for(var E=0,C=D.length;E<C;++E){if(D[E].id==F.id){return true}}return false},isTypeOfDD:function(C){return(C&&C.__ygDragDrop)},isHandle:function(D,C){return(this.handleIds[D]&&this.handleIds[D][C])},getDDById:function(D){for(var C in this.ids){if(this.ids[C][D]){return this.ids[C][D]}}return null},handleMouseDown:function(E,D){this.currentTarget=YAHOO.util.Event.getTarget(E);this.dragCurrent=D;var C=D.getEl();this.startX=YAHOO.util.Event.getPageX(E);this.startY=YAHOO.util.Event.getPageY(E);this.deltaX=this.startX-C.offsetLeft;this.deltaY=this.startY-C.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var F=YAHOO.util.DDM;F.startDrag(F.startX,F.startY);F.fromTimeout=true},this.clickTimeThresh)},startDrag:function(C,E){if(this.dragCurrent&&this.dragCurrent.useShim){this._shimState=this.useShim;this.useShim=true}this._activateShim();clearTimeout(this.clickTimeout);var D=this.dragCurrent;if(D&&D.events.b4StartDrag){D.b4StartDrag(C,E);D.fireEvent("b4StartDragEvent",{x:C,y:E})}if(D&&D.events.startDrag){D.startDrag(C,E);D.fireEvent("startDragEvent",{x:C,y:E})}this.dragThreshMet=true},handleMouseUp:function(C){if(this.dragCurrent){clearTimeout(this.clickTimeout);if(this.dragThreshMet){if(this.fromTimeout){this.fromTimeout=false;this.handleMouseMove(C)}this.fromTimeout=false;this.fireEvents(C,true)}else{}this.stopDrag(C);this.stopEvent(C)}},stopEvent:function(C){if(this.stopPropagation){YAHOO.util.Event.stopPropagation(C)}if(this.preventDefault){YAHOO.util.Event.preventDefault(C)}},stopDrag:function(E,D){var C=this.dragCurrent;if(C&&!D){if(this.dragThreshMet){if(C.events.b4EndDrag){C.b4EndDrag(E);C.fireEvent("b4EndDragEvent",{e:E})}if(C.events.endDrag){C.endDrag(E);C.fireEvent("endDragEvent",{e:E})}}if(C.events.mouseUp){C.onMouseUp(E);C.fireEvent("mouseUpEvent",{e:E})}}if(this._shimActive){this._deactivateShim();if(this.dragCurrent&&this.dragCurrent.useShim){this.useShim=this._shimState;this._shimState=false}}this.dragCurrent=null;this.dragOvers={}},handleMouseMove:function(F){var C=this.dragCurrent;if(C){if(YAHOO.util.Event.isIE&&!F.button){this.stopEvent(F);return this.handleMouseUp(F)}else{if(F.clientX<0||F.clientY<0){}}if(!this.dragThreshMet){var E=Math.abs(this.startX-YAHOO.util.Event.getPageX(F));var D=Math.abs(this.startY-YAHOO.util.Event.getPageY(F));if(E>this.clickPixelThresh||D>this.clickPixelThresh){this.startDrag(this.startX,this.startY)}}if(this.dragThreshMet){if(C&&C.events.b4Drag){C.b4Drag(F);C.fireEvent("b4DragEvent",{e:F})}if(C&&C.events.drag){C.onDrag(F);C.fireEvent("dragEvent",{e:F})}if(C){this.fireEvents(F,false)}}this.stopEvent(F)}},fireEvents:function(V,L){var a=this.dragCurrent;if(!a||a.isLocked()||a.dragOnly){return}var N=YAHOO.util.Event.getPageX(V),M=YAHOO.util.Event.getPageY(V),P=new YAHOO.util.Point(N,M),K=a.getTargetCoord(P.x,P.y),F=a.getDragEl(),E=["out","over","drop","enter"],U=new YAHOO.util.Region(K.y,K.x+F.offsetWidth,K.y+F.offsetHeight,K.x),I=[],D={},Q=[],c={outEvts:[],overEvts:[],dropEvts:[],enterEvts:[]};for(var S in this.dragOvers){var d=this.dragOvers[S];if(!this.isTypeOfDD(d)){continue}if(!this.isOverTarget(P,d,this.mode,U)){c.outEvts.push(d)}I[S]=true;delete this.dragOvers[S]}for(var R in a.groups){if("string"!=typeof R){continue}for(S in this.ids[R]){var G=this.ids[R][S];if(!this.isTypeOfDD(G)){continue}if(G.isTarget&&!G.isLocked()&&G!=a){if(this.isOverTarget(P,G,this.mode,U)){D[R]=true;if(L){c.dropEvts.push(G)}else{if(!I[G.id]){c.enterEvts.push(G)}else{c.overEvts.push(G)}this.dragOvers[G.id]=G}}}}}this.interactionInfo={out:c.outEvts,enter:c.enterEvts,over:c.overEvts,drop:c.dropEvts,point:P,draggedRegion:U,sourceRegion:this.locationCache[a.id],validDrop:L};for(var C in D){Q.push(C)}if(L&&!c.dropEvts.length){this.interactionInfo.validDrop=false;if(a.events.invalidDrop){a.onInvalidDrop(V);a.fireEvent("invalidDropEvent",{e:V})}}for(S=0;S<E.length;S++){var Y=null;if(c[E[S]+"Evts"]){Y=c[E[S]+"Evts"]}if(Y&&Y.length){var H=E[S].charAt(0).toUpperCase()+E[S].substr(1),X="onDrag"+H,J="b4Drag"+H,O="drag"+H+"Event",W="drag"+H;if(this.mode){if(a.events[J]){a[J](V,Y,Q);a.fireEvent(J+"Event",{event:V,info:Y,group:Q})}if(a.events[W]){a[X](V,Y,Q);a.fireEvent(O,{event:V,info:Y,group:Q})}}else{for(var Z=0,T=Y.length;Z<T;++Z){if(a.events[J]){a[J](V,Y[Z].id,Q[0]);a.fireEvent(J+"Event",{event:V,info:Y[Z].id,group:Q[0]})}if(a.events[W]){a[X](V,Y[Z].id,Q[0]);a.fireEvent(O,{event:V,info:Y[Z].id,group:Q[0]})}}}}}},getBestMatch:function(E){var G=null;var D=E.length;if(D==1){G=E[0]}else{for(var F=0;F<D;++F){var C=E[F];if(this.mode==this.INTERSECT&&C.cursorIsOver){G=C;break}else{if(!G||!G.overlap||(C.overlap&&G.overlap.getArea()<C.overlap.getArea())){G=C}}}}return G},refreshCache:function(D){var F=D||this.ids;for(var C in F){if("string"!=typeof C){continue}for(var E in this.ids[C]){var G=this.ids[C][E];if(this.isTypeOfDD(G)){var H=this.getLocation(G);if(H){this.locationCache[G.id]=H}else{delete this.locationCache[G.id]}}}}},verifyEl:function(D){try{if(D){var C=D.offsetParent;if(C){return true}}}catch(E){}return false},getLocation:function(H){if(!this.isTypeOfDD(H)){return null}var F=H.getEl(),K,E,D,M,L,N,C,J,G;try{K=YAHOO.util.Dom.getXY(F)}catch(I){}if(!K){return null}E=K[0];D=E+F.offsetWidth;M=K[1];L=M+F.offsetHeight;N=M-H.padding[0];C=D+H.padding[1];J=L+H.padding[2];G=E-H.padding[3];return new YAHOO.util.Region(N,C,J,G)},isOverTarget:function(K,C,E,F){var G=this.locationCache[C.id];if(!G||!this.useCache){G=this.getLocation(C);this.locationCache[C.id]=G}if(!G){return false}C.cursorIsOver=G.contains(K);var J=this.dragCurrent;if(!J||(!E&&!J.constrainX&&!J.constrainY)){return C.cursorIsOver}C.overlap=null;if(!F){var H=J.getTargetCoord(K.x,K.y);var D=J.getDragEl();F=new YAHOO.util.Region(H.y,H.x+D.offsetWidth,H.y+D.offsetHeight,H.x)}var I=F.intersect(G);if(I){C.overlap=I;return(E)?true:C.cursorIsOver}else{return false}},_onUnload:function(D,C){this.unregAll()},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null}this._execOnAll("unreg",[]);this.ids={}},elementCache:{},getElWrapper:function(D){var C=this.elementCache[D];if(!C||!C.el){C=this.elementCache[D]=new this.ElementWrapper(YAHOO.util.Dom.get(D))}return C},getElement:function(C){return YAHOO.util.Dom.get(C)},getCss:function(D){var C=YAHOO.util.Dom.get(D);return(C)?C.style:null},ElementWrapper:function(C){this.el=C||null;this.id=this.el&&C.id;this.css=this.el&&C.style},getPosX:function(C){return YAHOO.util.Dom.getX(C)},getPosY:function(C){return YAHOO.util.Dom.getY(C)},swapNode:function(E,C){if(E.swapNode){E.swapNode(C)}else{var F=C.parentNode;var D=C.nextSibling;if(D==E){F.insertBefore(E,C)}else{if(C==E.nextSibling){F.insertBefore(C,E)}else{E.parentNode.replaceChild(C,E);F.insertBefore(E,D)}}}},getScroll:function(){var E,C,F=document.documentElement,D=document.body;if(F&&(F.scrollTop||F.scrollLeft)){E=F.scrollTop;C=F.scrollLeft}else{if(D){E=D.scrollTop;C=D.scrollLeft}else{}}return{top:E,left:C}},getStyle:function(D,C){return YAHOO.util.Dom.getStyle(D,C)},getScrollTop:function(){return this.getScroll().top},getScrollLeft:function(){return this.getScroll().left},moveToEl:function(C,E){var D=YAHOO.util.Dom.getXY(E);YAHOO.util.Dom.setXY(C,D)},getClientHeight:function(){return YAHOO.util.Dom.getViewportHeight()},getClientWidth:function(){return YAHOO.util.Dom.getViewportWidth()},numericSort:function(D,C){return(D-C)},_timeoutCount:0,_addListeners:function(){var C=YAHOO.util.DDM;if(YAHOO.util.Event&&document){C._onLoad()}else{if(C._timeoutCount>2000){}else{setTimeout(C._addListeners,10);if(document&&document.body){C._timeoutCount+=1}}}},handleWasClicked:function(C,E){if(this.isHandle(E,C.id)){return true}else{var D=C.parentNode;while(D){if(this.isHandle(E,D.id)){return true}else{D=D.parentNode}}}return false}}}();YAHOO.util.DDM=YAHOO.util.DragDropMgr;YAHOO.util.DDM._addListeners()}(function(){var A=YAHOO.util.Event;var B=YAHOO.util.Dom;YAHOO.util.DragDrop=function(E,C,D){if(E){this.init(E,C,D)}};YAHOO.util.DragDrop.prototype={events:null,on:function(){this.subscribe.apply(this,arguments)},id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true},unlock:function(){this.locked=false},isTarget:true,padding:null,dragOnly:false,useShim:false,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,deltaX:0,deltaY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,cursorIsOver:false,overlap:null,b4StartDrag:function(C,D){},startDrag:function(C,D){},b4Drag:function(C){},onDrag:function(C){},onDragEnter:function(C,D){},b4DragOver:function(C){},onDragOver:function(C,D){},b4DragOut:function(C){},onDragOut:function(C,D){},b4DragDrop:function(C){},onDragDrop:function(C,D){},onInvalidDrop:function(C){},b4EndDrag:function(C){},endDrag:function(C){},b4MouseDown:function(C){},onMouseDown:function(C){},onMouseUp:function(C){},onAvailable:function(){},getEl:function(){if(!this._domRef){this._domRef=B.get(this.id)}return this._domRef},getDragEl:function(){return B.get(this.dragElId)},init:function(F,C,D){this.initTarget(F,C,D);A.on(this._domRef||this.id,"mousedown",this.handleMouseDown,this,true);for(var E in this.events){this.createEvent(E+"Event")}},initTarget:function(E,C,D){this.config=D||{};this.events={};this.DDM=YAHOO.util.DDM;this.groups={};if(typeof E!=="string"){this._domRef=E;E=B.generateId(E)}this.id=E;this.addToGroup((C)?C:"default");this.handleElId=E;A.onAvailable(E,this.handleOnAvailable,this,true);this.setDragElId(E);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig()},applyConfig:function(){this.events={mouseDown:true,b4MouseDown:true,mouseUp:true,b4StartDrag:true,startDrag:true,b4EndDrag:true,endDrag:true,drag:true,b4Drag:true,invalidDrop:true,b4DragOut:true,dragOut:true,dragEnter:true,b4DragOver:true,dragOver:true,b4DragDrop:true,dragDrop:true};if(this.config.events){for(var C in this.config.events){if(this.config.events[C]===false){this.events[C]=false}}}this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false);this.dragOnly=((this.config.dragOnly===true)?true:false);this.useShim=((this.config.useShim===true)?true:false)},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable()},setPadding:function(E,C,F,D){if(!C&&0!==C){this.padding=[E,E,E,E]}else{if(!F&&0!==F){this.padding=[E,C,E,C]}else{this.padding=[E,C,F,D]}}},setInitPosition:function(F,E){var G=this.getEl();if(!this.DDM.verifyEl(G)){if(G&&G.style&&(G.style.display=="none")){}else{}return}var D=F||0;var C=E||0;var H=B.getXY(G);this.initPageX=H[0]-D;this.initPageY=H[1]-C;this.lastPageX=H[0];this.lastPageY=H[1];this.setStartPosition(H)},setStartPosition:function(D){var C=D||B.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=C[0];this.startPageY=C[1]},addToGroup:function(C){this.groups[C]=true;this.DDM.regDragDrop(this,C)},removeFromGroup:function(C){if(this.groups[C]){delete this.groups[C]}this.DDM.removeDDFromGroup(this,C)},setDragElId:function(C){this.dragElId=C},setHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C)}this.handleElId=C;this.DDM.regHandle(this.id,C)},setOuterHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C)}A.on(C,"mousedown",this.handleMouseDown,this,true);this.setHandleElId(C);this.hasOuterHandles=true},unreg:function(){A.removeListener(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this)},isLocked:function(){return(this.DDM.isLocked()||this.locked)},handleMouseDown:function(J,I){var D=J.which||J.button;if(this.primaryButtonOnly&&D>1){return}if(this.isLocked()){return}var C=this.b4MouseDown(J),F=true;if(this.events.b4MouseDown){F=this.fireEvent("b4MouseDownEvent",J)}var E=this.onMouseDown(J),H=true;if(this.events.mouseDown){H=this.fireEvent("mouseDownEvent",J)}if((C===false)||(E===false)||(F===false)||(H===false)){return}this.DDM.refreshCache(this.groups);var G=new YAHOO.util.Point(A.getPageX(J),A.getPageY(J));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(G,this)){}else{if(this.clickValidator(J)){this.setStartPosition();this.DDM.handleMouseDown(J,this);this.DDM.stopEvent(J)}else{}}},clickValidator:function(D){var C=YAHOO.util.Event.getTarget(D);return(this.isValidHandleChild(C)&&(this.id==this.handleElId||this.DDM.handleWasClicked(C,this.id)))},getTargetCoord:function(E,D){var C=E-this.deltaX;var F=D-this.deltaY;if(this.constrainX){if(C<this.minX){C=this.minX}if(C>this.maxX){C=this.maxX}}if(this.constrainY){if(F<this.minY){F=this.minY}if(F>this.maxY){F=this.maxY}}C=this.getTick(C,this.xTicks);F=this.getTick(F,this.yTicks);return{x:C,y:F}},addInvalidHandleType:function(C){var D=C.toUpperCase();this.invalidHandleTypes[D]=D},addInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C)}this.invalidHandleIds[C]=C},addInvalidHandleClass:function(C){this.invalidHandleClasses.push(C)},removeInvalidHandleType:function(C){var D=C.toUpperCase();delete this.invalidHandleTypes[D]},removeInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C)}delete this.invalidHandleIds[C]},removeInvalidHandleClass:function(D){for(var E=0,C=this.invalidHandleClasses.length;E<C;++E){if(this.invalidHandleClasses[E]==D){delete this.invalidHandleClasses[E]}}},isValidHandleChild:function(F){var E=true;var H;try{H=F.nodeName.toUpperCase()}catch(G){H=F.nodeName}E=E&&!this.invalidHandleTypes[H];E=E&&!this.invalidHandleIds[F.id];for(var D=0,C=this.invalidHandleClasses.length;E&&D<C;++D){E=!B.hasClass(F,this.invalidHandleClasses[D])}return E},setXTicks:function(F,C){this.xTicks=[];this.xTickSize=C;var E={};for(var D=this.initPageX;D>=this.minX;D=D-C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true}}for(D=this.initPageX;D<=this.maxX;D=D+C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true}}this.xTicks.sort(this.DDM.numericSort)},setYTicks:function(F,C){this.yTicks=[];this.yTickSize=C;var E={};for(var D=this.initPageY;D>=this.minY;D=D-C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true}}for(D=this.initPageY;D<=this.maxY;D=D+C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true}}this.yTicks.sort(this.DDM.numericSort)},setXConstraint:function(E,D,C){this.leftConstraint=parseInt(E,10);this.rightConstraint=parseInt(D,10);this.minX=this.initPageX-this.leftConstraint;this.maxX=this.initPageX+this.rightConstraint;if(C){this.setXTicks(this.initPageX,C)}this.constrainX=true},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks()},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0},setYConstraint:function(C,E,D){this.topConstraint=parseInt(C,10);this.bottomConstraint=parseInt(E,10);this.minY=this.initPageY-this.topConstraint;this.maxY=this.initPageY+this.bottomConstraint;if(D){this.setYTicks(this.initPageY,D)}this.constrainY=true},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var D=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var C=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(D,C)}else{this.setInitPosition()}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize)}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize)}},getTick:function(I,F){if(!F){return I}else{if(F[0]>=I){return F[0]}else{for(var D=0,C=F.length;D<C;++D){var E=D+1;if(F[E]&&F[E]>=I){var H=I-F[D];var G=F[E]-I;return(G>H)?F[D]:F[E]}}return F[F.length-1]}}},toString:function(){return("DragDrop "+this.id)}};YAHOO.augment(YAHOO.util.DragDrop,YAHOO.util.EventProvider)})();YAHOO.util.DD=function(C,A,B){if(C){this.init(C,A,B)}};YAHOO.extend(YAHOO.util.DD,YAHOO.util.DragDrop,{scroll:true,autoOffset:function(C,B){var A=C-this.startPageX;var D=B-this.startPageY;this.setDelta(A,D)},setDelta:function(B,A){this.deltaX=B;this.deltaY=A},setDragElPos:function(C,B){var A=this.getDragEl();this.alignElWithMouse(A,C,B)},alignElWithMouse:function(C,G,F){var E=this.getTargetCoord(G,F);if(!this.deltaSetXY){var H=[E.x,E.y];YAHOO.util.Dom.setXY(C,H);var D=parseInt(YAHOO.util.Dom.getStyle(C,"left"),10);var B=parseInt(YAHOO.util.Dom.getStyle(C,"top"),10);this.deltaSetXY=[D-E.x,B-E.y]}else{YAHOO.util.Dom.setStyle(C,"left",(E.x+this.deltaSetXY[0])+"px");YAHOO.util.Dom.setStyle(C,"top",(E.y+this.deltaSetXY[1])+"px")}this.cachePosition(E.x,E.y);var A=this;setTimeout(function(){A.autoScroll.call(A,E.x,E.y,C.offsetHeight,C.offsetWidth)},0)},cachePosition:function(B,A){if(B){this.lastPageX=B;this.lastPageY=A}else{var C=YAHOO.util.Dom.getXY(this.getEl());this.lastPageX=C[0];this.lastPageY=C[1]}},autoScroll:function(J,I,E,K){if(this.scroll){var L=this.DDM.getClientHeight();var B=this.DDM.getClientWidth();var N=this.DDM.getScrollTop();var D=this.DDM.getScrollLeft();var H=E+I;var M=K+J;var G=(L+N-I-this.deltaY);var F=(B+D-J-this.deltaX);var C=40;var A=(document.all)?80:30;if(H>L&&G<C){window.scrollTo(D,N+A)}if(I<N&&N>0&&I-N<C){window.scrollTo(D,N-A)}if(M>B&&F<C){window.scrollTo(D+A,N)}if(J<D&&D>0&&J-D<C){window.scrollTo(D-A,N)}}},applyConfig:function(){YAHOO.util.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false)},b4MouseDown:function(A){this.setStartPosition();this.autoOffset(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A))},b4Drag:function(A){this.setDragElPos(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A))},toString:function(){return("DD "+this.id)}});YAHOO.util.DDProxy=function(C,A,B){if(C){this.init(C,A,B);this.initFrame()}};YAHOO.util.DDProxy.dragElId="ygddfdiv";YAHOO.extend(YAHOO.util.DDProxy,YAHOO.util.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var B=this,A=document.body;if(!A||!A.firstChild){setTimeout(function(){B.createFrame()},50);return}var F=this.getDragEl(),E=YAHOO.util.Dom;if(!F){F=document.createElement("div");F.id=this.dragElId;var D=F.style;D.position="absolute";D.visibility="hidden";D.cursor="move";D.border="2px solid #aaa";D.zIndex=999;D.height="25px";D.width="25px";var C=document.createElement("div");E.setStyle(C,"height","100%");E.setStyle(C,"width","100%");E.setStyle(C,"background-color","#ccc");E.setStyle(C,"opacity","0");F.appendChild(C);A.insertBefore(F,A.firstChild)}},initFrame:function(){this.createFrame()},applyConfig:function(){YAHOO.util.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||YAHOO.util.DDProxy.dragElId)},showFrame:function(E,D){var C=this.getEl();var A=this.getDragEl();var B=A.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(B.width,10)/2),Math.round(parseInt(B.height,10)/2))}this.setDragElPos(E,D);YAHOO.util.Dom.setStyle(A,"visibility","visible")},_resizeProxy:function(){if(this.resizeFrame){var H=YAHOO.util.Dom;var B=this.getEl();var C=this.getDragEl();var G=parseInt(H.getStyle(C,"borderTopWidth"),10);var I=parseInt(H.getStyle(C,"borderRightWidth"),10);var F=parseInt(H.getStyle(C,"borderBottomWidth"),10);var D=parseInt(H.getStyle(C,"borderLeftWidth"),10);if(isNaN(G)){G=0}if(isNaN(I)){I=0}if(isNaN(F)){F=0}if(isNaN(D)){D=0}var E=Math.max(0,B.offsetWidth-I-D);var A=Math.max(0,B.offsetHeight-G-F);H.setStyle(C,"width",E+"px");H.setStyle(C,"height",A+"px")}},b4MouseDown:function(B){this.setStartPosition();var A=YAHOO.util.Event.getPageX(B);var C=YAHOO.util.Event.getPageY(B);this.autoOffset(A,C)},b4StartDrag:function(A,B){this.showFrame(A,B)},b4EndDrag:function(A){YAHOO.util.Dom.setStyle(this.getDragEl(),"visibility","hidden")},endDrag:function(D){var C=YAHOO.util.Dom;var B=this.getEl();var A=this.getDragEl();C.setStyle(A,"visibility","");C.setStyle(B,"visibility","hidden");YAHOO.util.DDM.moveToEl(B,A);C.setStyle(A,"visibility","hidden");C.setStyle(B,"visibility","")},toString:function(){return("DDProxy "+this.id)}});YAHOO.util.DDTarget=function(C,A,B){if(C){this.initTarget(C,A,B)}};YAHOO.extend(YAHOO.util.DDTarget,YAHOO.util.DragDrop,{toString:function(){return("DDTarget "+this.id)}});YAHOO.register("dragdrop",YAHOO.util.DragDropMgr,{version:"2.7.0",build:"1799"});YAHOO.util.Attribute=function(B,A){if(A){this.owner=A;this.configure(B,true)}};YAHOO.util.Attribute.prototype={name:undefined,value:null,owner:null,readOnly:false,writeOnce:false,_initialConfig:null,_written:false,method:null,setter:null,getter:null,validator:null,getValue:function(){var A=this.value;if(this.getter){A=this.getter.call(this.owner,this.name)}return A},setValue:function(F,B){var E,A=this.owner,C=this.name;var D={type:C,prevValue:this.getValue(),newValue:F};if(this.readOnly||(this.writeOnce&&this._written)){return false}if(this.validator&&!this.validator.call(A,F)){return false}if(!B){E=A.fireBeforeChangeEvent(D);if(E===false){return false}}if(this.setter){F=this.setter.call(A,F,this.name);if(F===undefined){}}if(this.method){this.method.call(A,F,this.name)}this.value=F;this._written=true;D.type=C;if(!B){this.owner.fireChangeEvent(D)}return true},configure:function(B,C){B=B||{};if(C){this._written=false}this._initialConfig=this._initialConfig||{};for(var A in B){if(B.hasOwnProperty(A)){this[A]=B[A];if(C){this._initialConfig[A]=B[A]}}}},resetValue:function(){return this.setValue(this._initialConfig.value)},resetConfig:function(){this.configure(this._initialConfig,true)},refresh:function(A){this.setValue(this.value,A)}};(function(){var A=YAHOO.util.Lang;YAHOO.util.AttributeProvider=function(){};YAHOO.util.AttributeProvider.prototype={_configs:null,get:function(C){this._configs=this._configs||{};var B=this._configs[C];if(!B||!this._configs.hasOwnProperty(C)){return null}return B.getValue()},set:function(D,E,B){this._configs=this._configs||{};var C=this._configs[D];if(!C){return false}return C.setValue(E,B)},getAttributeKeys:function(){this._configs=this._configs;var C=[],B;for(B in this._configs){if(A.hasOwnProperty(this._configs,B)&&!A.isUndefined(this._configs[B])){C[C.length]=B}}return C},setAttributes:function(D,B){for(var C in D){if(A.hasOwnProperty(D,C)){this.set(C,D[C],B)}}},resetValue:function(C,B){this._configs=this._configs||{};if(this._configs[C]){this.set(C,this._configs[C]._initialConfig.value,B);return true}return false},refresh:function(E,C){this._configs=this._configs||{};var F=this._configs;E=((A.isString(E))?[E]:E)||this.getAttributeKeys();for(var D=0,B=E.length;D<B;++D){if(F.hasOwnProperty(E[D])){this._configs[E[D]].refresh(C)}}},register:function(B,C){this.setAttributeConfig(B,C)},getAttributeConfig:function(C){this._configs=this._configs||{};var B=this._configs[C]||{};var D={};for(C in B){if(A.hasOwnProperty(B,C)){D[C]=B[C]}}return D},setAttributeConfig:function(B,C,D){this._configs=this._configs||{};C=C||{};if(!this._configs[B]){C.name=B;this._configs[B]=this.createAttribute(C)}else{this._configs[B].configure(C,D)}},configureAttribute:function(B,C,D){this.setAttributeConfig(B,C,D)},resetAttributeConfig:function(B){this._configs=this._configs||{};this._configs[B].resetConfig()},subscribe:function(B,C){this._events=this._events||{};if(!(B in this._events)){this._events[B]=this.createEvent(B)}YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments)},on:function(){this.subscribe.apply(this,arguments)},addListener:function(){this.subscribe.apply(this,arguments)},fireBeforeChangeEvent:function(C){var B="before";B+=C.type.charAt(0).toUpperCase()+C.type.substr(1)+"Change";C.type=B;return this.fireEvent(C.type,C)},fireChangeEvent:function(B){B.type+="Change";return this.fireEvent(B.type,B)},createAttribute:function(B){return new YAHOO.util.Attribute(B,this)}};YAHOO.augment(YAHOO.util.AttributeProvider,YAHOO.util.EventProvider)})();(function(){var B=YAHOO.util.Dom,C=YAHOO.util.AttributeProvider;var A=function(D,E){this.init.apply(this,arguments)};A.DOM_EVENTS={"click":true,"dblclick":true,"keydown":true,"keypress":true,"keyup":true,"mousedown":true,"mousemove":true,"mouseout":true,"mouseover":true,"mouseup":true,"focus":true,"blur":true,"submit":true,"change":true};A.prototype={DOM_EVENTS:null,DEFAULT_HTML_SETTER:function(F,D){var E=this.get("element");if(E){E[D]=F}},DEFAULT_HTML_GETTER:function(D){var E=this.get("element"),F;if(E){F=E[D]}return F},appendChild:function(D){D=D.get?D.get("element"):D;return this.get("element").appendChild(D)},getElementsByTagName:function(D){return this.get("element").getElementsByTagName(D)},hasChildNodes:function(){return this.get("element").hasChildNodes()},insertBefore:function(D,E){D=D.get?D.get("element"):D;E=(E&&E.get)?E.get("element"):E;return this.get("element").insertBefore(D,E)},removeChild:function(D){D=D.get?D.get("element"):D;return this.get("element").removeChild(D)},replaceChild:function(D,E){D=D.get?D.get("element"):D;E=E.get?E.get("element"):E;return this.get("element").replaceChild(D,E)},initAttributes:function(D){},addListener:function(H,G,I,F){var E=this.get("element")||this.get("id");F=F||this;var D=this;if(!this._events[H]){if(E&&this.DOM_EVENTS[H]){YAHOO.util.Event.addListener(E,H,function(J){if(J.srcElement&&!J.target){J.target=J.srcElement}D.fireEvent(H,J)},I,F)}this.createEvent(H,this)}return YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments)},on:function(){return this.addListener.apply(this,arguments)},subscribe:function(){return this.addListener.apply(this,arguments)},removeListener:function(E,D){return this.unsubscribe.apply(this,arguments)},addClass:function(D){B.addClass(this.get("element"),D)},getElementsByClassName:function(E,D){return B.getElementsByClassName(E,D,this.get("element"))},hasClass:function(D){return B.hasClass(this.get("element"),D)},removeClass:function(D){return B.removeClass(this.get("element"),D)},replaceClass:function(E,D){return B.replaceClass(this.get("element"),E,D)},setStyle:function(E,D){return B.setStyle(this.get("element"),E,D)},getStyle:function(D){return B.getStyle(this.get("element"),D)},fireQueue:function(){var E=this._queue;for(var F=0,D=E.length;F<D;++F){this[E[F][0]].apply(this,E[F][1])}},appendTo:function(E,F){E=(E.get)?E.get("element"):B.get(E);this.fireEvent("beforeAppendTo",{type:"beforeAppendTo",target:E});F=(F&&F.get)?F.get("element"):B.get(F);var D=this.get("element");if(!D){return false}if(!E){return false}if(D.parent!=E){if(F){E.insertBefore(D,F)}else{E.appendChild(D)}}this.fireEvent("appendTo",{type:"appendTo",target:E});return D},get:function(D){var F=this._configs||{},E=F.element;if(E&&!F[D]&&!YAHOO.lang.isUndefined(E.value[D])){this._setHTMLAttrConfig(D)}return C.prototype.get.call(this,D)},setAttributes:function(J,G){var E={},H=this._configOrder;for(var I=0,D=H.length;I<D;++I){if(J[H[I]]!==undefined){E[H[I]]=true;this.set(H[I],J[H[I]],G)}}for(var F in J){if(J.hasOwnProperty(F)&&!E[F]){this.set(F,J[F],G)}}},set:function(E,G,D){var F=this.get("element");if(!F){this._queue[this._queue.length]=["set",arguments];if(this._configs[E]){this._configs[E].value=G}return}if(!this._configs[E]&&!YAHOO.lang.isUndefined(F[E])){this._setHTMLAttrConfig(E)}return C.prototype.set.apply(this,arguments)},setAttributeConfig:function(D,E,F){this._configOrder.push(D);C.prototype.setAttributeConfig.apply(this,arguments)},createEvent:function(E,D){this._events[E]=true;return C.prototype.createEvent.apply(this,arguments)},init:function(E,D){this._initElement(E,D)},destroy:function(){var D=this.get("element");YAHOO.util.Event.purgeElement(D,true);this.unsubscribeAll();if(D&&D.parentNode){D.parentNode.removeChild(D)}this._queue=[];this._events={};this._configs={};this._configOrder=[]},_initElement:function(F,E){this._queue=this._queue||[];this._events=this._events||{};this._configs=this._configs||{};this._configOrder=[];E=E||{};E.element=E.element||F||null;var H=false;var D=A.DOM_EVENTS;this.DOM_EVENTS=this.DOM_EVENTS||{};for(var G in D){if(D.hasOwnProperty(G)){this.DOM_EVENTS[G]=D[G]}}if(typeof E.element==="string"){this._setHTMLAttrConfig("id",{value:E.element})}if(B.get(E.element)){H=true;this._initHTMLElement(E);this._initContent(E)}YAHOO.util.Event.onAvailable(E.element,function(){if(!H){this._initHTMLElement(E)}this.fireEvent("available",{type:"available",target:B.get(E.element)})},this,true);YAHOO.util.Event.onContentReady(E.element,function(){if(!H){this._initContent(E)}this.fireEvent("contentReady",{type:"contentReady",target:B.get(E.element)})},this,true)},_initHTMLElement:function(D){this.setAttributeConfig("element",{value:B.get(D.element),readOnly:true})},_initContent:function(D){this.initAttributes(D);this.setAttributes(D,true);this.fireQueue()},_setHTMLAttrConfig:function(D,F){var E=this.get("element");F=F||{};F.name=D;F.setter=F.setter||this.DEFAULT_HTML_SETTER;F.getter=F.getter||this.DEFAULT_HTML_GETTER;F.value=F.value||E[D];this._configs[D]=new YAHOO.util.Attribute(F,this)}};YAHOO.augment(A,C);YAHOO.util.Element=A})();YAHOO.register("element",YAHOO.util.Element,{version:"2.7.0",build:"1799"});YAHOO.register("utilities",YAHOO,{version:"2.7.0",build:"1799"});
243   -(function(){YAHOO.util.Config=function(owner){if(owner){this.init(owner)}};var Lang=YAHOO.lang,CustomEvent=YAHOO.util.CustomEvent,Config=YAHOO.util.Config;Config.CONFIG_CHANGED_EVENT="configChanged";Config.BOOLEAN_TYPE="boolean";Config.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(owner){this.owner=owner;this.configChangedEvent=this.createEvent(Config.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=CustomEvent.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[]},checkBoolean:function(val){return(typeof val==Config.BOOLEAN_TYPE)},checkNumber:function(val){return(!isNaN(val))},fireEvent:function(key,value){var property=this.config[key];if(property&&property.event){property.event.fire(value)}},addProperty:function(key,propertyObject){key=key.toLowerCase();this.config[key]=propertyObject;propertyObject.event=this.createEvent(key,{scope:this.owner});propertyObject.event.signature=CustomEvent.LIST;propertyObject.key=key;if(propertyObject.handler){propertyObject.event.subscribe(propertyObject.handler,this.owner)}this.setProperty(key,propertyObject.value,true);if(!propertyObject.suppressEvent){this.queueProperty(key,propertyObject.value)}},getConfig:function(){var cfg={},currCfg=this.config,prop,property;for(prop in currCfg){if(Lang.hasOwnProperty(currCfg,prop)){property=currCfg[prop];if(property&&property.event){cfg[prop]=property.value}}}return cfg},getProperty:function(key){var property=this.config[key.toLowerCase()];if(property&&property.event){return property.value}else{return undefined}},resetProperty:function(key){key=key.toLowerCase();var property=this.config[key];if(property&&property.event){if(this.initialConfig[key]&&!Lang.isUndefined(this.initialConfig[key])){this.setProperty(key,this.initialConfig[key]);return true}}else{return false}},setProperty:function(key,value,silent){var property;key=key.toLowerCase();if(this.queueInProgress&&!silent){this.queueProperty(key,value);return true}else{property=this.config[key];if(property&&property.event){if(property.validator&&!property.validator(value)){return false}else{property.value=value;if(!silent){this.fireEvent(key,value);this.configChangedEvent.fire([key,value])}return true}}else{return false}}},queueProperty:function(key,value){key=key.toLowerCase();var property=this.config[key],foundDuplicate=false,iLen,queueItem,queueItemKey,queueItemValue,sLen,supercedesCheck,qLen,queueItemCheck,queueItemCheckKey,queueItemCheckValue,i,s,q;if(property&&property.event){if(!Lang.isUndefined(value)&&property.validator&&!property.validator(value)){return false}else{if(!Lang.isUndefined(value)){property.value=value}else{value=property.value}foundDuplicate=false;iLen=this.eventQueue.length;for(i=0;i<iLen;i++){queueItem=this.eventQueue[i];if(queueItem){queueItemKey=queueItem[0];queueItemValue=queueItem[1];if(queueItemKey==key){this.eventQueue[i]=null;this.eventQueue.push([key,(!Lang.isUndefined(value)?value:queueItemValue)]);foundDuplicate=true;break}}}if(!foundDuplicate&&!Lang.isUndefined(value)){this.eventQueue.push([key,value])}}if(property.supercedes){sLen=property.supercedes.length;for(s=0;s<sLen;s++){supercedesCheck=property.supercedes[s];qLen=this.eventQueue.length;for(q=0;q<qLen;q++){queueItemCheck=this.eventQueue[q];if(queueItemCheck){queueItemCheckKey=queueItemCheck[0];queueItemCheckValue=queueItemCheck[1];if(queueItemCheckKey==supercedesCheck.toLowerCase()){this.eventQueue.push([queueItemCheckKey,queueItemCheckValue]);this.eventQueue[q]=null;break}}}}}return true}else{return false}},refireEvent:function(key){key=key.toLowerCase();var property=this.config[key];if(property&&property.event&&!Lang.isUndefined(property.value)){if(this.queueInProgress){this.queueProperty(key)}else{this.fireEvent(key,property.value)}}},applyConfig:function(userConfig,init){var sKey,oConfig;if(init){oConfig={};for(sKey in userConfig){if(Lang.hasOwnProperty(userConfig,sKey)){oConfig[sKey.toLowerCase()]=userConfig[sKey]}}this.initialConfig=oConfig}for(sKey in userConfig){if(Lang.hasOwnProperty(userConfig,sKey)){this.queueProperty(sKey,userConfig[sKey])}}},refresh:function(){var prop;for(prop in this.config){if(Lang.hasOwnProperty(this.config,prop)){this.refireEvent(prop)}}},fireQueue:function(){var i,queueItem,key,value,property;this.queueInProgress=true;for(i=0;i<this.eventQueue.length;i++){queueItem=this.eventQueue[i];if(queueItem){key=queueItem[0];value=queueItem[1];property=this.config[key];property.value=value;this.eventQueue[i]=null;this.fireEvent(key,value)}}this.queueInProgress=false;this.eventQueue=[]},subscribeToConfigEvent:function(key,handler,obj,override){var property=this.config[key.toLowerCase()];if(property&&property.event){if(!Config.alreadySubscribed(property.event,handler,obj)){property.event.subscribe(handler,obj,override)}return true}else{return false}},unsubscribeFromConfigEvent:function(key,handler,obj){var property=this.config[key.toLowerCase()];if(property&&property.event){return property.event.unsubscribe(handler,obj)}else{return false}},toString:function(){var output="Config";if(this.owner){output+=" ["+this.owner.toString()+"]"}return output},outputEventQueue:function(){var output="",queueItem,q,nQueue=this.eventQueue.length;for(q=0;q<nQueue;q++){queueItem=this.eventQueue[q];if(queueItem){output+=queueItem[0]+"="+queueItem[1]+", "}}return output},destroy:function(){var oConfig=this.config,sProperty,oProperty;for(sProperty in oConfig){if(Lang.hasOwnProperty(oConfig,sProperty)){oProperty=oConfig[sProperty];oProperty.event.unsubscribeAll();oProperty.event=null}}this.configChangedEvent.unsubscribeAll();this.configChangedEvent=null;this.owner=null;this.config=null;this.initialConfig=null;this.eventQueue=null}};Config.alreadySubscribed=function(evt,fn,obj){var nSubscribers=evt.subscribers.length,subsc,i;if(nSubscribers>0){i=nSubscribers-1;do{subsc=evt.subscribers[i];if(subsc&&subsc.obj==obj&&subsc.fn==fn){return true}}while(i--)}return false};YAHOO.lang.augmentProto(Config,YAHOO.util.EventProvider)}());(function(){YAHOO.widget.Module=function(el,userConfig){if(el){this.init(el,userConfig)}else{}};var Dom=YAHOO.util.Dom,Config=YAHOO.util.Config,Event=YAHOO.util.Event,CustomEvent=YAHOO.util.CustomEvent,Module=YAHOO.widget.Module,UA=YAHOO.env.ua,m_oModuleTemplate,m_oHeaderTemplate,m_oBodyTemplate,m_oFooterTemplate,EVENT_TYPES={"BEFORE_INIT":"beforeInit","INIT":"init","APPEND":"append","BEFORE_RENDER":"beforeRender","RENDER":"render","CHANGE_HEADER":"changeHeader","CHANGE_BODY":"changeBody","CHANGE_FOOTER":"changeFooter","CHANGE_CONTENT":"changeContent","DESTORY":"destroy","BEFORE_SHOW":"beforeShow","SHOW":"show","BEFORE_HIDE":"beforeHide","HIDE":"hide"},DEFAULT_CONFIG={"VISIBLE":{key:"visible",value:true,validator:YAHOO.lang.isBoolean},"EFFECT":{key:"effect",suppressEvent:true,supercedes:["visible"]},"MONITOR_RESIZE":{key:"monitorresize",value:true},"APPEND_TO_DOCUMENT_BODY":{key:"appendtodocumentbody",value:false}};Module.IMG_ROOT=null;Module.IMG_ROOT_SSL=null;Module.CSS_MODULE="yui-module";Module.CSS_HEADER="hd";Module.CSS_BODY="bd";Module.CSS_FOOTER="ft";Module.RESIZE_MONITOR_SECURE_URL="javascript:false;";Module.RESIZE_MONITOR_BUFFER=1;Module.textResizeEvent=new CustomEvent("textResize");Module.forceDocumentRedraw=function(){var docEl=document.documentElement;if(docEl){docEl.className+=" ";docEl.className=YAHOO.lang.trim(docEl.className)}};function createModuleTemplate(){if(!m_oModuleTemplate){m_oModuleTemplate=document.createElement("div");m_oModuleTemplate.innerHTML=("<div class=\""+Module.CSS_HEADER+"\"></div>"+"<div class=\""+Module.CSS_BODY+"\"></div><div class=\""+Module.CSS_FOOTER+"\"></div>");m_oHeaderTemplate=m_oModuleTemplate.firstChild;m_oBodyTemplate=m_oHeaderTemplate.nextSibling;m_oFooterTemplate=m_oBodyTemplate.nextSibling}return m_oModuleTemplate}function createHeader(){if(!m_oHeaderTemplate){createModuleTemplate()}return(m_oHeaderTemplate.cloneNode(false))}function createBody(){if(!m_oBodyTemplate){createModuleTemplate()}return(m_oBodyTemplate.cloneNode(false))}function createFooter(){if(!m_oFooterTemplate){createModuleTemplate()}return(m_oFooterTemplate.cloneNode(false))}Module.prototype={constructor:Module,element:null,header:null,body:null,footer:null,id:null,imageRoot:Module.IMG_ROOT,initEvents:function(){var SIGNATURE=CustomEvent.LIST;this.beforeInitEvent=this.createEvent(EVENT_TYPES.BEFORE_INIT);this.beforeInitEvent.signature=SIGNATURE;this.initEvent=this.createEvent(EVENT_TYPES.INIT);this.initEvent.signature=SIGNATURE;this.appendEvent=this.createEvent(EVENT_TYPES.APPEND);this.appendEvent.signature=SIGNATURE;this.beforeRenderEvent=this.createEvent(EVENT_TYPES.BEFORE_RENDER);this.beforeRenderEvent.signature=SIGNATURE;this.renderEvent=this.createEvent(EVENT_TYPES.RENDER);this.renderEvent.signature=SIGNATURE;this.changeHeaderEvent=this.createEvent(EVENT_TYPES.CHANGE_HEADER);this.changeHeaderEvent.signature=SIGNATURE;this.changeBodyEvent=this.createEvent(EVENT_TYPES.CHANGE_BODY);this.changeBodyEvent.signature=SIGNATURE;this.changeFooterEvent=this.createEvent(EVENT_TYPES.CHANGE_FOOTER);this.changeFooterEvent.signature=SIGNATURE;this.changeContentEvent=this.createEvent(EVENT_TYPES.CHANGE_CONTENT);this.changeContentEvent.signature=SIGNATURE;this.destroyEvent=this.createEvent(EVENT_TYPES.DESTORY);this.destroyEvent.signature=SIGNATURE;this.beforeShowEvent=this.createEvent(EVENT_TYPES.BEFORE_SHOW);this.beforeShowEvent.signature=SIGNATURE;this.showEvent=this.createEvent(EVENT_TYPES.SHOW);this.showEvent.signature=SIGNATURE;this.beforeHideEvent=this.createEvent(EVENT_TYPES.BEFORE_HIDE);this.beforeHideEvent.signature=SIGNATURE;this.hideEvent=this.createEvent(EVENT_TYPES.HIDE);this.hideEvent.signature=SIGNATURE},platform:function(){var ua=navigator.userAgent.toLowerCase();if(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1){return"windows"}else if(ua.indexOf("macintosh")!=-1){return"mac"}else{return false}}(),browser:function(){var ua=navigator.userAgent.toLowerCase();if(ua.indexOf('opera')!=-1){return'opera'}else if(ua.indexOf('msie 7')!=-1){return'ie7'}else if(ua.indexOf('msie')!=-1){return'ie'}else if(ua.indexOf('safari')!=-1){return'safari'}else if(ua.indexOf('gecko')!=-1){return'gecko'}else{return false}}(),isSecure:function(){if(window.location.href.toLowerCase().indexOf("https")===0){return true}else{return false}}(),initDefaultConfig:function(){this.cfg.addProperty(DEFAULT_CONFIG.VISIBLE.key,{handler:this.configVisible,value:DEFAULT_CONFIG.VISIBLE.value,validator:DEFAULT_CONFIG.VISIBLE.validator});this.cfg.addProperty(DEFAULT_CONFIG.EFFECT.key,{suppressEvent:DEFAULT_CONFIG.EFFECT.suppressEvent,supercedes:DEFAULT_CONFIG.EFFECT.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.MONITOR_RESIZE.key,{handler:this.configMonitorResize,value:DEFAULT_CONFIG.MONITOR_RESIZE.value});this.cfg.addProperty(DEFAULT_CONFIG.APPEND_TO_DOCUMENT_BODY.key,{value:DEFAULT_CONFIG.APPEND_TO_DOCUMENT_BODY.value})},init:function(el,userConfig){var elId,child;this.initEvents();this.beforeInitEvent.fire(Module);this.cfg=new Config(this);if(this.isSecure){this.imageRoot=Module.IMG_ROOT_SSL}if(typeof el=="string"){elId=el;el=document.getElementById(el);if(!el){el=(createModuleTemplate()).cloneNode(false);el.id=elId}}this.id=Dom.generateId(el);this.element=el;child=this.element.firstChild;if(child){var fndHd=false,fndBd=false,fndFt=false;do{if(1==child.nodeType){if(!fndHd&&Dom.hasClass(child,Module.CSS_HEADER)){this.header=child;fndHd=true}else if(!fndBd&&Dom.hasClass(child,Module.CSS_BODY)){this.body=child;fndBd=true}else if(!fndFt&&Dom.hasClass(child,Module.CSS_FOOTER)){this.footer=child;fndFt=true}}}while((child=child.nextSibling))}this.initDefaultConfig();Dom.addClass(this.element,Module.CSS_MODULE);if(userConfig){this.cfg.applyConfig(userConfig,true)}if(!Config.alreadySubscribed(this.renderEvent,this.cfg.fireQueue,this.cfg)){this.renderEvent.subscribe(this.cfg.fireQueue,this.cfg,true)}this.initEvent.fire(Module)},initResizeMonitor:function(){var isGeckoWin=(UA.gecko&&this.platform=="windows");if(isGeckoWin){var self=this;setTimeout(function(){self._initResizeMonitor()},0)}else{this._initResizeMonitor()}},_initResizeMonitor:function(){return;var oDoc,oIFrame,sHTML;function fireTextResize(){Module.textResizeEvent.fire()}if(!UA.opera){oIFrame=Dom.get("_yuiResizeMonitor");var supportsCWResize=this._supportsCWResize();if(!oIFrame){oIFrame=document.createElement("iframe");if(this.isSecure&&Module.RESIZE_MONITOR_SECURE_URL&&UA.ie){oIFrame.src=Module.RESIZE_MONITOR_SECURE_URL}if(!supportsCWResize){sHTML=["<html><head><script ","type=\"text/javascript\">","window.onresize=function(){window.parent.","YAHOO.widget.Module.textResizeEvent.","fire();};<","\/script></head>","<body></body></html>"].join('');oIFrame.src="data:text/html;charset=utf-8,"+encodeURIComponent(sHTML)}oIFrame.id="_yuiResizeMonitor";oIFrame.title="Text Resize Monitor";oIFrame.style.position="absolute";oIFrame.style.visibility="hidden";var db=document.body,fc=db.firstChild;if(fc){db.insertBefore(oIFrame,fc)}else{db.appendChild(oIFrame)}oIFrame.style.width="2em";oIFrame.style.height="2em";oIFrame.style.top=(-1*(oIFrame.offsetHeight+Module.RESIZE_MONITOR_BUFFER))+"px";oIFrame.style.left="0";oIFrame.style.borderWidth="0";oIFrame.style.visibility="visible";if(UA.webkit){oDoc=oIFrame.contentWindow.document;oDoc.open();oDoc.close()}}if(oIFrame&&oIFrame.contentWindow){Module.textResizeEvent.subscribe(this.onDomResize,this,true);if(!Module.textResizeInitialized){if(supportsCWResize){if(!Event.on(oIFrame.contentWindow,"resize",fireTextResize)){Event.on(oIFrame,"resize",fireTextResize)}}Module.textResizeInitialized=true}this.resizeMonitor=oIFrame}}},_supportsCWResize:function(){var bSupported=true;if(UA.gecko&&UA.gecko<=1.8){bSupported=false}return bSupported},onDomResize:function(e,obj){var nTop=-1*(this.resizeMonitor.offsetHeight+Module.RESIZE_MONITOR_BUFFER);this.resizeMonitor.style.top=nTop+"px";this.resizeMonitor.style.left="0"},setHeader:function(headerContent){var oHeader=this.header||(this.header=createHeader());if(headerContent.nodeName){oHeader.innerHTML="";oHeader.appendChild(headerContent)}else{oHeader.innerHTML=headerContent}this.changeHeaderEvent.fire(headerContent);this.changeContentEvent.fire()},appendToHeader:function(element){var oHeader=this.header||(this.header=createHeader());oHeader.appendChild(element);this.changeHeaderEvent.fire(element);this.changeContentEvent.fire()},setBody:function(bodyContent){var oBody=this.body||(this.body=createBody());if(bodyContent.nodeName){oBody.innerHTML="";oBody.appendChild(bodyContent)}else{oBody.innerHTML=bodyContent}this.changeBodyEvent.fire(bodyContent);this.changeContentEvent.fire()},appendToBody:function(element){var oBody=this.body||(this.body=createBody());oBody.appendChild(element);this.changeBodyEvent.fire(element);this.changeContentEvent.fire()},setFooter:function(footerContent){var oFooter=this.footer||(this.footer=createFooter());if(footerContent.nodeName){oFooter.innerHTML="";oFooter.appendChild(footerContent)}else{oFooter.innerHTML=footerContent}this.changeFooterEvent.fire(footerContent);this.changeContentEvent.fire()},appendToFooter:function(element){var oFooter=this.footer||(this.footer=createFooter());oFooter.appendChild(element);this.changeFooterEvent.fire(element);this.changeContentEvent.fire()},render:function(appendToNode,moduleElement){var me=this,firstChild;function appendTo(parentNode){if(typeof parentNode=="string"){parentNode=document.getElementById(parentNode)}if(parentNode){me._addToParent(parentNode,me.element);me.appendEvent.fire()}}this.beforeRenderEvent.fire();if(!moduleElement){moduleElement=this.element}if(appendToNode){appendTo(appendToNode)}else{if(!Dom.inDocument(this.element)){return false}}if(this.header&&!Dom.inDocument(this.header)){firstChild=moduleElement.firstChild;if(firstChild){moduleElement.insertBefore(this.header,firstChild)}else{moduleElement.appendChild(this.header)}}if(this.body&&!Dom.inDocument(this.body)){if(this.footer&&Dom.isAncestor(this.moduleElement,this.footer)){moduleElement.insertBefore(this.body,this.footer)}else{moduleElement.appendChild(this.body)}}if(this.footer&&!Dom.inDocument(this.footer)){moduleElement.appendChild(this.footer)}this.renderEvent.fire();return true},destroy:function(){var parent;if(this.element){Event.purgeElement(this.element,true);parent=this.element.parentNode}if(parent){parent.removeChild(this.element)}this.element=null;this.header=null;this.body=null;this.footer=null;Module.textResizeEvent.unsubscribe(this.onDomResize,this);this.cfg.destroy();this.cfg=null;this.destroyEvent.fire()},show:function(){this.cfg.setProperty("visible",true)},hide:function(){this.cfg.setProperty("visible",false)},configVisible:function(type,args,obj){var visible=args[0];if(visible){this.beforeShowEvent.fire();Dom.setStyle(this.element,"display","block");this.showEvent.fire()}else{this.beforeHideEvent.fire();Dom.setStyle(this.element,"display","none");this.hideEvent.fire()}},configMonitorResize:function(type,args,obj){var monitor=args[0];if(monitor){this.initResizeMonitor()}else{Module.textResizeEvent.unsubscribe(this.onDomResize,this,true);this.resizeMonitor=null}},_addToParent:function(parentNode,element){if(!this.cfg.getProperty("appendtodocumentbody")&&parentNode===document.body&&parentNode.firstChild){parentNode.insertBefore(element,parentNode.firstChild)}else{parentNode.appendChild(element)}},toString:function(){return"Module "+this.id}};YAHOO.lang.augmentProto(Module,YAHOO.util.EventProvider)}());(function(){YAHOO.widget.Overlay=function(el,userConfig){YAHOO.widget.Overlay.superclass.constructor.call(this,el,userConfig)};var Lang=YAHOO.lang,CustomEvent=YAHOO.util.CustomEvent,Module=YAHOO.widget.Module,Event=YAHOO.util.Event,Dom=YAHOO.util.Dom,Config=YAHOO.util.Config,UA=YAHOO.env.ua,Overlay=YAHOO.widget.Overlay,_SUBSCRIBE="subscribe",_UNSUBSCRIBE="unsubscribe",_CONTAINED="contained",m_oIFrameTemplate,EVENT_TYPES={"BEFORE_MOVE":"beforeMove","MOVE":"move"},DEFAULT_CONFIG={"X":{key:"x",validator:Lang.isNumber,suppressEvent:true,supercedes:["iframe"]},"Y":{key:"y",validator:Lang.isNumber,suppressEvent:true,supercedes:["iframe"]},"XY":{key:"xy",suppressEvent:true,supercedes:["iframe"]},"CONTEXT":{key:"context",suppressEvent:true,supercedes:["iframe"]},"FIXED_CENTER":{key:"fixedcenter",value:false,supercedes:["iframe","visible"]},"WIDTH":{key:"width",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"HEIGHT":{key:"height",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"AUTO_FILL_HEIGHT":{key:"autofillheight",supercedes:["height"],value:"body"},"ZINDEX":{key:"zindex",value:null},"CONSTRAIN_TO_VIEWPORT":{key:"constraintoviewport",value:false,validator:Lang.isBoolean,supercedes:["iframe","x","y","xy"]},"IFRAME":{key:"iframe",value:(UA.ie==6?true:false),validator:Lang.isBoolean,supercedes:["zindex"]},"PREVENT_CONTEXT_OVERLAP":{key:"preventcontextoverlap",value:false,validator:Lang.isBoolean,supercedes:["constraintoviewport"]}};Overlay.IFRAME_SRC="javascript:false;";Overlay.IFRAME_OFFSET=3;Overlay.VIEWPORT_OFFSET=10;Overlay.TOP_LEFT="tl";Overlay.TOP_RIGHT="tr";Overlay.BOTTOM_LEFT="bl";Overlay.BOTTOM_RIGHT="br";Overlay.CSS_OVERLAY="yui-overlay";Overlay.STD_MOD_RE=/^\s*?(body|footer|header)\s*?$/i;Overlay.windowScrollEvent=new CustomEvent("windowScroll");Overlay.windowResizeEvent=new CustomEvent("windowResize");Overlay.windowScrollHandler=function(e){var t=Event.getTarget(e);if(!t||t===window||t===window.document){if(UA.ie){if(!window.scrollEnd){window.scrollEnd=-1}clearTimeout(window.scrollEnd);window.scrollEnd=setTimeout(function(){Overlay.windowScrollEvent.fire()},1)}else{Overlay.windowScrollEvent.fire()}}};Overlay.windowResizeHandler=function(e){if(UA.ie){if(!window.resizeEnd){window.resizeEnd=-1}clearTimeout(window.resizeEnd);window.resizeEnd=setTimeout(function(){Overlay.windowResizeEvent.fire()},100)}else{Overlay.windowResizeEvent.fire()}};Overlay._initialized=null;if(Overlay._initialized===null){Event.on(window,"scroll",Overlay.windowScrollHandler);Event.on(window,"resize",Overlay.windowResizeHandler);Overlay._initialized=true}Overlay._TRIGGER_MAP={"windowScroll":Overlay.windowScrollEvent,"windowResize":Overlay.windowResizeEvent,"textResize":Module.textResizeEvent};YAHOO.extend(Overlay,Module,{CONTEXT_TRIGGERS:[],init:function(el,userConfig){Overlay.superclass.init.call(this,el);this.beforeInitEvent.fire(Overlay);Dom.addClass(this.element,Overlay.CSS_OVERLAY);if(userConfig){this.cfg.applyConfig(userConfig,true)}if(this.platform=="mac"&&UA.gecko){if(!Config.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this)){this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true)}if(!Config.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this)){this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true)}}this.initEvent.fire(Overlay)},initEvents:function(){Overlay.superclass.initEvents.call(this);var SIGNATURE=CustomEvent.LIST;this.beforeMoveEvent=this.createEvent(EVENT_TYPES.BEFORE_MOVE);this.beforeMoveEvent.signature=SIGNATURE;this.moveEvent=this.createEvent(EVENT_TYPES.MOVE);this.moveEvent.signature=SIGNATURE},initDefaultConfig:function(){Overlay.superclass.initDefaultConfig.call(this);var cfg=this.cfg;cfg.addProperty(DEFAULT_CONFIG.X.key,{handler:this.configX,validator:DEFAULT_CONFIG.X.validator,suppressEvent:DEFAULT_CONFIG.X.suppressEvent,supercedes:DEFAULT_CONFIG.X.supercedes});cfg.addProperty(DEFAULT_CONFIG.Y.key,{handler:this.configY,validator:DEFAULT_CONFIG.Y.validator,suppressEvent:DEFAULT_CONFIG.Y.suppressEvent,supercedes:DEFAULT_CONFIG.Y.supercedes});cfg.addProperty(DEFAULT_CONFIG.XY.key,{handler:this.configXY,suppressEvent:DEFAULT_CONFIG.XY.suppressEvent,supercedes:DEFAULT_CONFIG.XY.supercedes});cfg.addProperty(DEFAULT_CONFIG.CONTEXT.key,{handler:this.configContext,suppressEvent:DEFAULT_CONFIG.CONTEXT.suppressEvent,supercedes:DEFAULT_CONFIG.CONTEXT.supercedes});cfg.addProperty(DEFAULT_CONFIG.FIXED_CENTER.key,{handler:this.configFixedCenter,value:DEFAULT_CONFIG.FIXED_CENTER.value,validator:DEFAULT_CONFIG.FIXED_CENTER.validator,supercedes:DEFAULT_CONFIG.FIXED_CENTER.supercedes});cfg.addProperty(DEFAULT_CONFIG.WIDTH.key,{handler:this.configWidth,suppressEvent:DEFAULT_CONFIG.WIDTH.suppressEvent,supercedes:DEFAULT_CONFIG.WIDTH.supercedes});cfg.addProperty(DEFAULT_CONFIG.HEIGHT.key,{handler:this.configHeight,suppressEvent:DEFAULT_CONFIG.HEIGHT.suppressEvent,supercedes:DEFAULT_CONFIG.HEIGHT.supercedes});cfg.addProperty(DEFAULT_CONFIG.AUTO_FILL_HEIGHT.key,{handler:this.configAutoFillHeight,value:DEFAULT_CONFIG.AUTO_FILL_HEIGHT.value,validator:this._validateAutoFill,supercedes:DEFAULT_CONFIG.AUTO_FILL_HEIGHT.supercedes});cfg.addProperty(DEFAULT_CONFIG.ZINDEX.key,{handler:this.configzIndex,value:DEFAULT_CONFIG.ZINDEX.value});cfg.addProperty(DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.key,{handler:this.configConstrainToViewport,value:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.value,validator:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.validator,supercedes:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.supercedes});cfg.addProperty(DEFAULT_CONFIG.IFRAME.key,{handler:this.configIframe,value:DEFAULT_CONFIG.IFRAME.value,validator:DEFAULT_CONFIG.IFRAME.validator,supercedes:DEFAULT_CONFIG.IFRAME.supercedes});cfg.addProperty(DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.key,{value:DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.value,validator:DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.validator,supercedes:DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.supercedes})},moveTo:function(x,y){this.cfg.setProperty("xy",[x,y])},hideMacGeckoScrollbars:function(){Dom.replaceClass(this.element,"show-scrollbars","hide-scrollbars")},showMacGeckoScrollbars:function(){Dom.replaceClass(this.element,"hide-scrollbars","show-scrollbars")},_setDomVisibility:function(show){Dom.setStyle(this.element,"visibility",(show)?"visible":"hidden");if(show){Dom.removeClass(this.element,"yui-overlay-hidden")}else{Dom.addClass(this.element,"yui-overlay-hidden")}},configVisible:function(type,args,obj){var visible=args[0],currentVis=Dom.getStyle(this.element,"visibility"),effect=this.cfg.getProperty("effect"),effectInstances=[],isMacGecko=(this.platform=="mac"&&UA.gecko),alreadySubscribed=Config.alreadySubscribed,eff,ei,e,i,j,k,h,nEffects,nEffectInstances;if(currentVis=="inherit"){e=this.element.parentNode;while(e.nodeType!=9&&e.nodeType!=11){currentVis=Dom.getStyle(e,"visibility");if(currentVis!="inherit"){break}e=e.parentNode}if(currentVis=="inherit"){currentVis="visible"}}if(effect){if(effect instanceof Array){nEffects=effect.length;for(i=0;i<nEffects;i++){eff=effect[i];effectInstances[effectInstances.length]=eff.effect(this,eff.duration)}}else{effectInstances[effectInstances.length]=effect.effect(this,effect.duration)}}if(visible){if(isMacGecko){this.showMacGeckoScrollbars()}if(effect){if(visible){if(currentVis!="visible"||currentVis===""){this.beforeShowEvent.fire();nEffectInstances=effectInstances.length;for(j=0;j<nEffectInstances;j++){ei=effectInstances[j];if(j===0&&!alreadySubscribed(ei.animateInCompleteEvent,this.showEvent.fire,this.showEvent)){ei.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,true)}ei.animateIn()}}}}else{if(currentVis!="visible"||currentVis===""){this.beforeShowEvent.fire();this._setDomVisibility(true);this.cfg.refireEvent("iframe");this.showEvent.fire()}else{this._setDomVisibility(true)}}}else{if(isMacGecko){this.hideMacGeckoScrollbars()}if(effect){if(currentVis=="visible"){this.beforeHideEvent.fire();nEffectInstances=effectInstances.length;for(k=0;k<nEffectInstances;k++){h=effectInstances[k];if(k===0&&!alreadySubscribed(h.animateOutCompleteEvent,this.hideEvent.fire,this.hideEvent)){h.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,true)}h.animateOut()}}else if(currentVis===""){this._setDomVisibility(false)}}else{if(currentVis=="visible"||currentVis===""){this.beforeHideEvent.fire();this._setDomVisibility(false);this.hideEvent.fire()}else{this._setDomVisibility(false)}}}},doCenterOnDOMEvent:function(){var cfg=this.cfg,fc=cfg.getProperty("fixedcenter");if(cfg.getProperty("visible")){if(fc&&(fc!==_CONTAINED||this.fitsInViewport())){this.center()}}},fitsInViewport:function(){var nViewportOffset=Overlay.VIEWPORT_OFFSET,element=this.element,elementWidth=element.offsetWidth,elementHeight=element.offsetHeight,viewportWidth=Dom.getViewportWidth(),viewportHeight=Dom.getViewportHeight();return((elementWidth+nViewportOffset<viewportWidth)&&(elementHeight+nViewportOffset<viewportHeight))},configFixedCenter:function(type,args,obj){var val=args[0],alreadySubscribed=Config.alreadySubscribed,windowResizeEvent=Overlay.windowResizeEvent,windowScrollEvent=Overlay.windowScrollEvent;if(val){this.center();if(!alreadySubscribed(this.beforeShowEvent,this.center)){this.beforeShowEvent.subscribe(this.center)}if(!alreadySubscribed(windowResizeEvent,this.doCenterOnDOMEvent,this)){windowResizeEvent.subscribe(this.doCenterOnDOMEvent,this,true)}if(!alreadySubscribed(windowScrollEvent,this.doCenterOnDOMEvent,this)){windowScrollEvent.subscribe(this.doCenterOnDOMEvent,this,true)}}else{this.beforeShowEvent.unsubscribe(this.center);windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this)}},configHeight:function(type,args,obj){var height=args[0],el=this.element;Dom.setStyle(el,"height",height);this.cfg.refireEvent("iframe")},configAutoFillHeight:function(type,args,obj){var fillEl=args[0],cfg=this.cfg,autoFillHeight="autofillheight",height="height",currEl=cfg.getProperty(autoFillHeight),autoFill=this._autoFillOnHeightChange;cfg.unsubscribeFromConfigEvent(height,autoFill);Module.textResizeEvent.unsubscribe(autoFill);this.changeContentEvent.unsubscribe(autoFill);if(currEl&&fillEl!==currEl&&this[currEl]){Dom.setStyle(this[currEl],height,"")}if(fillEl){fillEl=Lang.trim(fillEl.toLowerCase());cfg.subscribeToConfigEvent(height,autoFill,this[fillEl],this);Module.textResizeEvent.subscribe(autoFill,this[fillEl],this);this.changeContentEvent.subscribe(autoFill,this[fillEl],this);cfg.setProperty(autoFillHeight,fillEl,true)}},configWidth:function(type,args,obj){var width=args[0],el=this.element;Dom.setStyle(el,"width",width);this.cfg.refireEvent("iframe")},configzIndex:function(type,args,obj){var zIndex=args[0],el=this.element;if(!zIndex){zIndex=Dom.getStyle(el,"zIndex");if(!zIndex||isNaN(zIndex)){zIndex=0}}if(this.iframe||this.cfg.getProperty("iframe")===true){if(zIndex<=0){zIndex=1}}Dom.setStyle(el,"zIndex",zIndex);this.cfg.setProperty("zIndex",zIndex,true);if(this.iframe){this.stackIframe()}},configXY:function(type,args,obj){var pos=args[0],x=pos[0],y=pos[1];this.cfg.setProperty("x",x);this.cfg.setProperty("y",y);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y])},configX:function(type,args,obj){var x=args[0],y=this.cfg.getProperty("y");this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");Dom.setX(this.element,x,true);this.cfg.setProperty("xy",[x,y],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y])},configY:function(type,args,obj){var x=this.cfg.getProperty("x"),y=args[0];this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");Dom.setY(this.element,y,true);this.cfg.setProperty("xy",[x,y],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y])},showIframe:function(){var oIFrame=this.iframe,oParentNode;if(oIFrame){oParentNode=this.element.parentNode;if(oParentNode!=oIFrame.parentNode){this._addToParent(oParentNode,oIFrame)}oIFrame.style.display="block"}},hideIframe:function(){if(this.iframe){this.iframe.style.display="none"}},syncIframe:function(){var oIFrame=this.iframe,oElement=this.element,nOffset=Overlay.IFRAME_OFFSET,nDimensionOffset=(nOffset*2),aXY;if(oIFrame){oIFrame.style.width=(oElement.offsetWidth+nDimensionOffset+"px");oIFrame.style.height=(oElement.offsetHeight+nDimensionOffset+"px");aXY=this.cfg.getProperty("xy");if(!Lang.isArray(aXY)||(isNaN(aXY[0])||isNaN(aXY[1]))){this.syncPosition();aXY=this.cfg.getProperty("xy")}Dom.setXY(oIFrame,[(aXY[0]-nOffset),(aXY[1]-nOffset)])}},stackIframe:function(){if(this.iframe){var overlayZ=Dom.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(overlayZ)&&!isNaN(overlayZ)){Dom.setStyle(this.iframe,"zIndex",(overlayZ-1))}}},configIframe:function(type,args,obj){var bIFrame=args[0];function createIFrame(){var oIFrame=this.iframe,oElement=this.element,oParent;if(!oIFrame){if(!m_oIFrameTemplate){m_oIFrameTemplate=document.createElement("iframe");if(this.isSecure){m_oIFrameTemplate.src=Overlay.IFRAME_SRC}if(UA.ie){m_oIFrameTemplate.style.filter="alpha(opacity=0)";m_oIFrameTemplate.frameBorder=0}else{m_oIFrameTemplate.style.opacity="0"}m_oIFrameTemplate.style.position="absolute";m_oIFrameTemplate.style.border="none";m_oIFrameTemplate.style.margin="0";m_oIFrameTemplate.style.padding="0";m_oIFrameTemplate.style.display="none";m_oIFrameTemplate.tabIndex=-1}oIFrame=m_oIFrameTemplate.cloneNode(false);oParent=oElement.parentNode;var parentNode=oParent||document.body;this._addToParent(parentNode,oIFrame);this.iframe=oIFrame}this.showIframe();this.syncIframe();this.stackIframe();if(!this._hasIframeEventListeners){this.showEvent.subscribe(this.showIframe);this.hideEvent.subscribe(this.hideIframe);this.changeContentEvent.subscribe(this.syncIframe);this._hasIframeEventListeners=true}}function onBeforeShow(){createIFrame.call(this);this.beforeShowEvent.unsubscribe(onBeforeShow);this._iframeDeferred=false}if(bIFrame){if(this.cfg.getProperty("visible")){createIFrame.call(this)}else{if(!this._iframeDeferred){this.beforeShowEvent.subscribe(onBeforeShow);this._iframeDeferred=true}}}else{this.hideIframe();if(this._hasIframeEventListeners){this.showEvent.unsubscribe(this.showIframe);this.hideEvent.unsubscribe(this.hideIframe);this.changeContentEvent.unsubscribe(this.syncIframe);this._hasIframeEventListeners=false}}},_primeXYFromDOM:function(){if(YAHOO.lang.isUndefined(this.cfg.getProperty("xy"))){this.syncPosition();this.cfg.refireEvent("xy");this.beforeShowEvent.unsubscribe(this._primeXYFromDOM)}},configConstrainToViewport:function(type,args,obj){var val=args[0];if(val){if(!Config.alreadySubscribed(this.beforeMoveEvent,this.enforceConstraints,this)){this.beforeMoveEvent.subscribe(this.enforceConstraints,this,true)}if(!Config.alreadySubscribed(this.beforeShowEvent,this._primeXYFromDOM)){this.beforeShowEvent.subscribe(this._primeXYFromDOM)}}else{this.beforeShowEvent.unsubscribe(this._primeXYFromDOM);this.beforeMoveEvent.unsubscribe(this.enforceConstraints,this)}},configContext:function(type,args,obj){var contextArgs=args[0],contextEl,elementMagnetCorner,contextMagnetCorner,triggers,defTriggers=this.CONTEXT_TRIGGERS;if(contextArgs){contextEl=contextArgs[0];elementMagnetCorner=contextArgs[1];contextMagnetCorner=contextArgs[2];triggers=contextArgs[3];if(defTriggers&&defTriggers.length>0){triggers=(triggers||[]).concat(defTriggers)}if(contextEl){if(typeof contextEl=="string"){this.cfg.setProperty("context",[document.getElementById(contextEl),elementMagnetCorner,contextMagnetCorner,triggers],true)}if(elementMagnetCorner&&contextMagnetCorner){this.align(elementMagnetCorner,contextMagnetCorner)}if(this._contextTriggers){this._processTriggers(this._contextTriggers,_UNSUBSCRIBE,this._alignOnTrigger)}if(triggers){this._processTriggers(triggers,_SUBSCRIBE,this._alignOnTrigger);this._contextTriggers=triggers}}}},_alignOnTrigger:function(type,args){this.align()},_findTriggerCE:function(t){var tce=null;if(t instanceof CustomEvent){tce=t}else if(Overlay._TRIGGER_MAP[t]){tce=Overlay._TRIGGER_MAP[t]}return tce},_processTriggers:function(triggers,mode,fn){var t,tce;for(var i=0,l=triggers.length;i<l;++i){t=triggers[i];tce=this._findTriggerCE(t);if(tce){tce[mode](fn,this,true)}else{this[mode](t,fn)}}},align:function(elementAlign,contextAlign){var contextArgs=this.cfg.getProperty("context"),me=this,context,element,contextRegion;function doAlign(v,h){switch(elementAlign){case Overlay.TOP_LEFT:me.moveTo(h,v);break;case Overlay.TOP_RIGHT:me.moveTo((h-element.offsetWidth),v);break;case Overlay.BOTTOM_LEFT:me.moveTo(h,(v-element.offsetHeight));break;case Overlay.BOTTOM_RIGHT:me.moveTo((h-element.offsetWidth),(v-element.offsetHeight));break}}if(contextArgs){context=contextArgs[0];element=this.element;me=this;if(!elementAlign){elementAlign=contextArgs[1]}if(!contextAlign){contextAlign=contextArgs[2]}if(element&&context){contextRegion=Dom.getRegion(context);switch(contextAlign){case Overlay.TOP_LEFT:doAlign(contextRegion.top,contextRegion.left);break;case Overlay.TOP_RIGHT:doAlign(contextRegion.top,contextRegion.right);break;case Overlay.BOTTOM_LEFT:doAlign(contextRegion.bottom,contextRegion.left);break;case Overlay.BOTTOM_RIGHT:doAlign(contextRegion.bottom,contextRegion.right);break}}}},enforceConstraints:function(type,args,obj){var pos=args[0];var cXY=this.getConstrainedXY(pos[0],pos[1]);this.cfg.setProperty("x",cXY[0],true);this.cfg.setProperty("y",cXY[1],true);this.cfg.setProperty("xy",cXY,true)},getConstrainedX:function(x){var oOverlay=this,oOverlayEl=oOverlay.element,nOverlayOffsetWidth=oOverlayEl.offsetWidth,nViewportOffset=Overlay.VIEWPORT_OFFSET,viewPortWidth=Dom.getViewportWidth(),scrollX=Dom.getDocumentScrollLeft(),bCanConstrain=(nOverlayOffsetWidth+nViewportOffset<viewPortWidth),aContext=this.cfg.getProperty("context"),oContextEl,nContextElX,nContextElWidth,bFlipped=false,nLeftRegionWidth,nRightRegionWidth,leftConstraint=scrollX+nViewportOffset,rightConstraint=scrollX+viewPortWidth-nOverlayOffsetWidth-nViewportOffset,xNew=x,oOverlapPositions={"tltr":true,"blbr":true,"brbl":true,"trtl":true};var flipHorizontal=function(){var nNewX;if((oOverlay.cfg.getProperty("x")-scrollX)>nContextElX){nNewX=(nContextElX-nOverlayOffsetWidth)}else{nNewX=(nContextElX+nContextElWidth)}oOverlay.cfg.setProperty("x",(nNewX+scrollX),true);return nNewX};var getDisplayRegionWidth=function(){if((oOverlay.cfg.getProperty("x")-scrollX)>nContextElX){return(nRightRegionWidth-nViewportOffset)}else{return(nLeftRegionWidth-nViewportOffset)}};var setHorizontalPosition=function(){var nDisplayRegionWidth=getDisplayRegionWidth(),fnReturnVal;if(nOverlayOffsetWidth>nDisplayRegionWidth){if(bFlipped){flipHorizontal()}else{flipHorizontal();bFlipped=true;fnReturnVal=setHorizontalPosition()}}return fnReturnVal};if(x<leftConstraint||x>rightConstraint){if(bCanConstrain){if(this.cfg.getProperty("preventcontextoverlap")&&aContext&&oOverlapPositions[(aContext[1]+aContext[2])]){oContextEl=aContext[0];nContextElX=Dom.getX(oContextEl)-scrollX;nContextElWidth=oContextEl.offsetWidth;nLeftRegionWidth=nContextElX;nRightRegionWidth=(viewPortWidth-(nContextElX+nContextElWidth));setHorizontalPosition();xNew=this.cfg.getProperty("x")}else{if(x<leftConstraint){xNew=leftConstraint}else if(x>rightConstraint){xNew=rightConstraint}}}else{xNew=nViewportOffset+scrollX}}return xNew},getConstrainedY:function(y){var oOverlay=this,oOverlayEl=oOverlay.element,nOverlayOffsetHeight=oOverlayEl.offsetHeight,nViewportOffset=Overlay.VIEWPORT_OFFSET,viewPortHeight=Dom.getViewportHeight(),scrollY=Dom.getDocumentScrollTop(),bCanConstrain=(nOverlayOffsetHeight+nViewportOffset<viewPortHeight),aContext=this.cfg.getProperty("context"),oContextEl,nContextElY,nContextElHeight,bFlipped=false,nTopRegionHeight,nBottomRegionHeight,topConstraint=scrollY+nViewportOffset,bottomConstraint=scrollY+viewPortHeight-nOverlayOffsetHeight-nViewportOffset,yNew=y,oOverlapPositions={"trbr":true,"tlbl":true,"bltl":true,"brtr":true};var flipVertical=function(){var nNewY;if((oOverlay.cfg.getProperty("y")-scrollY)>nContextElY){nNewY=(nContextElY-nOverlayOffsetHeight)}else{nNewY=(nContextElY+nContextElHeight)}oOverlay.cfg.setProperty("y",(nNewY+scrollY),true);return nNewY};var getDisplayRegionHeight=function(){if((oOverlay.cfg.getProperty("y")-scrollY)>nContextElY){return(nBottomRegionHeight-nViewportOffset)}else{return(nTopRegionHeight-nViewportOffset)}};var setVerticalPosition=function(){var nDisplayRegionHeight=getDisplayRegionHeight(),fnReturnVal;if(nOverlayOffsetHeight>nDisplayRegionHeight){if(bFlipped){flipVertical()}else{flipVertical();bFlipped=true;fnReturnVal=setVerticalPosition()}}return fnReturnVal};if(y<topConstraint||y>bottomConstraint){if(bCanConstrain){if(this.cfg.getProperty("preventcontextoverlap")&&aContext&&oOverlapPositions[(aContext[1]+aContext[2])]){oContextEl=aContext[0];nContextElHeight=oContextEl.offsetHeight;nContextElY=(Dom.getY(oContextEl)-scrollY);nTopRegionHeight=nContextElY;nBottomRegionHeight=(viewPortHeight-(nContextElY+nContextElHeight));setVerticalPosition();yNew=oOverlay.cfg.getProperty("y")}else{if(y<topConstraint){yNew=topConstraint}else if(y>bottomConstraint){yNew=bottomConstraint}}}else{yNew=nViewportOffset+scrollY}}return yNew},getConstrainedXY:function(x,y){return[this.getConstrainedX(x),this.getConstrainedY(y)]},center:function(){var nViewportOffset=Overlay.VIEWPORT_OFFSET,elementWidth=this.element.offsetWidth,elementHeight=this.element.offsetHeight,viewPortWidth=Dom.getViewportWidth(),viewPortHeight=Dom.getViewportHeight(),x,y;if(elementWidth<viewPortWidth){x=(viewPortWidth/2)-(elementWidth/2)+Dom.getDocumentScrollLeft()}else{x=nViewportOffset+Dom.getDocumentScrollLeft()}if(elementHeight<viewPortHeight){y=(viewPortHeight/2)-(elementHeight/2)+Dom.getDocumentScrollTop()}else{y=nViewportOffset+Dom.getDocumentScrollTop()}this.cfg.setProperty("xy",[parseInt(x,10),parseInt(y,10)]);this.cfg.refireEvent("iframe");if(UA.webkit){this.forceContainerRedraw()}},syncPosition:function(){var pos=Dom.getXY(this.element);this.cfg.setProperty("x",pos[0],true);this.cfg.setProperty("y",pos[1],true);this.cfg.setProperty("xy",pos,true)},onDomResize:function(e,obj){var me=this;Overlay.superclass.onDomResize.call(this,e,obj);setTimeout(function(){me.syncPosition();me.cfg.refireEvent("iframe");me.cfg.refireEvent("context")},0)},_getComputedHeight:(function(){if(document.defaultView&&document.defaultView.getComputedStyle){return function(el){var height=null;if(el.ownerDocument&&el.ownerDocument.defaultView){var computed=el.ownerDocument.defaultView.getComputedStyle(el,'');if(computed){height=parseInt(computed.height,10)}}return(Lang.isNumber(height))?height:null}}else{return function(el){var height=null;if(el.style.pixelHeight){height=el.style.pixelHeight}return(Lang.isNumber(height))?height:null}}})(),_validateAutoFillHeight:function(val){return(!val)||(Lang.isString(val)&&Overlay.STD_MOD_RE.test(val))},_autoFillOnHeightChange:function(type,args,el){var height=this.cfg.getProperty("height");if((height&&height!=="auto")||(height===0)){this.fillHeight(el)}},_getPreciseHeight:function(el){var height=el.offsetHeight;if(el.getBoundingClientRect){var rect=el.getBoundingClientRect();height=rect.bottom-rect.top}return height},fillHeight:function(el){if(el){var container=this.innerElement||this.element,containerEls=[this.header,this.body,this.footer],containerEl,total=0,filled=0,remaining=0,validEl=false;for(var i=0,l=containerEls.length;i<l;i++){containerEl=containerEls[i];if(containerEl){if(el!==containerEl){filled+=this._getPreciseHeight(containerEl)}else{validEl=true}}}if(validEl){if(UA.ie||UA.opera){Dom.setStyle(el,'height',0+'px')}total=this._getComputedHeight(container);if(total===null){Dom.addClass(container,"yui-override-padding");total=container.clientHeight;Dom.removeClass(container,"yui-override-padding")}remaining=Math.max(total-filled,0);Dom.setStyle(el,"height",remaining+"px");if(el.offsetHeight!=remaining){remaining=Math.max(remaining-(el.offsetHeight-remaining),0)}Dom.setStyle(el,"height",remaining+"px")}}},bringToTop:function(){var aOverlays=[],oElement=this.element;function compareZIndexDesc(p_oOverlay1,p_oOverlay2){var sZIndex1=Dom.getStyle(p_oOverlay1,"zIndex"),sZIndex2=Dom.getStyle(p_oOverlay2,"zIndex"),nZIndex1=(!sZIndex1||isNaN(sZIndex1))?0:parseInt(sZIndex1,10),nZIndex2=(!sZIndex2||isNaN(sZIndex2))?0:parseInt(sZIndex2,10);if(nZIndex1>nZIndex2){return-1}else if(nZIndex1<nZIndex2){return 1}else{return 0}}function isOverlayElement(p_oElement){var isOverlay=Dom.hasClass(p_oElement,Overlay.CSS_OVERLAY),Panel=YAHOO.widget.Panel;if(isOverlay&&!Dom.isAncestor(oElement,p_oElement)){if(Panel&&Dom.hasClass(p_oElement,Panel.CSS_PANEL)){aOverlays[aOverlays.length]=p_oElement.parentNode}else{aOverlays[aOverlays.length]=p_oElement}}}Dom.getElementsBy(isOverlayElement,"DIV",document.body);aOverlays.sort(compareZIndexDesc);var oTopOverlay=aOverlays[0],nTopZIndex;if(oTopOverlay){nTopZIndex=Dom.getStyle(oTopOverlay,"zIndex");if(!isNaN(nTopZIndex)){var bRequiresBump=false;if(oTopOverlay!=oElement){bRequiresBump=true}else if(aOverlays.length>1){var nNextZIndex=Dom.getStyle(aOverlays[1],"zIndex");if(!isNaN(nNextZIndex)&&(nTopZIndex==nNextZIndex)){bRequiresBump=true}}if(bRequiresBump){this.cfg.setProperty("zindex",(parseInt(nTopZIndex,10)+2))}}}},destroy:function(){if(this.iframe){this.iframe.parentNode.removeChild(this.iframe)}this.iframe=null;Overlay.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);Overlay.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this);Module.textResizeEvent.unsubscribe(this._autoFillOnHeightChange);Overlay.superclass.destroy.call(this)},forceContainerRedraw:function(){var c=this;Dom.addClass(c.element,"yui-force-redraw");setTimeout(function(){Dom.removeClass(c.element,"yui-force-redraw")},0)},toString:function(){return"Overlay "+this.id}})}());(function(){YAHOO.widget.OverlayManager=function(userConfig){this.init(userConfig)};var Overlay=YAHOO.widget.Overlay,Event=YAHOO.util.Event,Dom=YAHOO.util.Dom,Config=YAHOO.util.Config,CustomEvent=YAHOO.util.CustomEvent,OverlayManager=YAHOO.widget.OverlayManager;OverlayManager.CSS_FOCUSED="focused";OverlayManager.prototype={constructor:OverlayManager,overlays:null,initDefaultConfig:function(){this.cfg.addProperty("overlays",{suppressEvent:true});this.cfg.addProperty("focusevent",{value:"mousedown"})},init:function(userConfig){this.cfg=new Config(this);this.initDefaultConfig();if(userConfig){this.cfg.applyConfig(userConfig,true)}this.cfg.fireQueue();var activeOverlay=null;this.getActive=function(){return activeOverlay};this.focus=function(overlay){var o=this.find(overlay);if(o){o.focus()}};this.remove=function(overlay){var o=this.find(overlay),originalZ;if(o){if(activeOverlay==o){activeOverlay=null}var bDestroyed=(o.element===null&&o.cfg===null)?true:false;if(!bDestroyed){originalZ=Dom.getStyle(o.element,"zIndex");o.cfg.setProperty("zIndex",-1000,true)}this.overlays.sort(this.compareZIndexDesc);this.overlays=this.overlays.slice(0,(this.overlays.length-1));o.hideEvent.unsubscribe(o.blur);o.destroyEvent.unsubscribe(this._onOverlayDestroy,o);o.focusEvent.unsubscribe(this._onOverlayFocusHandler,o);o.blurEvent.unsubscribe(this._onOverlayBlurHandler,o);if(!bDestroyed){Event.removeListener(o.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus);o.cfg.setProperty("zIndex",originalZ,true);o.cfg.setProperty("manager",null)}if(o.focusEvent._managed){o.focusEvent=null}if(o.blurEvent._managed){o.blurEvent=null}if(o.focus._managed){o.focus=null}if(o.blur._managed){o.blur=null}}};this.blurAll=function(){var nOverlays=this.overlays.length,i;if(nOverlays>0){i=nOverlays-1;do{this.overlays[i].blur()}while(i--)}};this._manageBlur=function(overlay){var changed=false;if(activeOverlay==overlay){Dom.removeClass(activeOverlay.element,OverlayManager.CSS_FOCUSED);activeOverlay=null;changed=true}return changed};this._manageFocus=function(overlay){var changed=false;if(activeOverlay!=overlay){if(activeOverlay){activeOverlay.blur()}activeOverlay=overlay;this.bringToTop(activeOverlay);Dom.addClass(activeOverlay.element,OverlayManager.CSS_FOCUSED);changed=true}return changed};var overlays=this.cfg.getProperty("overlays");if(!this.overlays){this.overlays=[]}if(overlays){this.register(overlays);this.overlays.sort(this.compareZIndexDesc)}},_onOverlayElementFocus:function(p_oEvent){var oTarget=Event.getTarget(p_oEvent),oClose=this.close;if(oClose&&(oTarget==oClose||Dom.isAncestor(oClose,oTarget))){this.blur()}else{this.focus()}},_onOverlayDestroy:function(p_sType,p_aArgs,p_oOverlay){this.remove(p_oOverlay)},_onOverlayFocusHandler:function(p_sType,p_aArgs,p_oOverlay){this._manageFocus(p_oOverlay)},_onOverlayBlurHandler:function(p_sType,p_aArgs,p_oOverlay){this._manageBlur(p_oOverlay)},_bindFocus:function(overlay){var mgr=this;if(!overlay.focusEvent){overlay.focusEvent=overlay.createEvent("focus");overlay.focusEvent.signature=CustomEvent.LIST;overlay.focusEvent._managed=true}else{overlay.focusEvent.subscribe(mgr._onOverlayFocusHandler,overlay,mgr)}if(!overlay.focus){Event.on(overlay.element,mgr.cfg.getProperty("focusevent"),mgr._onOverlayElementFocus,null,overlay);overlay.focus=function(){if(mgr._manageFocus(this)){if(this.cfg.getProperty("visible")&&this.focusFirst){this.focusFirst()}this.focusEvent.fire()}};overlay.focus._managed=true}},_bindBlur:function(overlay){var mgr=this;if(!overlay.blurEvent){overlay.blurEvent=overlay.createEvent("blur");overlay.blurEvent.signature=CustomEvent.LIST;overlay.focusEvent._managed=true}else{overlay.blurEvent.subscribe(mgr._onOverlayBlurHandler,overlay,mgr)}if(!overlay.blur){overlay.blur=function(){if(mgr._manageBlur(this)){this.blurEvent.fire()}};overlay.blur._managed=true}overlay.hideEvent.subscribe(overlay.blur)},_bindDestroy:function(overlay){var mgr=this;overlay.destroyEvent.subscribe(mgr._onOverlayDestroy,overlay,mgr)},_syncZIndex:function(overlay){var zIndex=Dom.getStyle(overlay.element,"zIndex");if(!isNaN(zIndex)){overlay.cfg.setProperty("zIndex",parseInt(zIndex,10))}else{overlay.cfg.setProperty("zIndex",0)}},register:function(overlay){var registered=false,i,n;if(overlay instanceof Overlay){overlay.cfg.addProperty("manager",{value:this});this._bindFocus(overlay);this._bindBlur(overlay);this._bindDestroy(overlay);this._syncZIndex(overlay);this.overlays.push(overlay);this.bringToTop(overlay);registered=true}else if(overlay instanceof Array){for(i=0,n=overlay.length;i<n;i++){registered=this.register(overlay[i])||registered}}return registered},bringToTop:function(p_oOverlay){var oOverlay=this.find(p_oOverlay),nTopZIndex,oTopOverlay,aOverlays;if(oOverlay){aOverlays=this.overlays;aOverlays.sort(this.compareZIndexDesc);oTopOverlay=aOverlays[0];if(oTopOverlay){nTopZIndex=Dom.getStyle(oTopOverlay.element,"zIndex");if(!isNaN(nTopZIndex)){var bRequiresBump=false;if(oTopOverlay!==oOverlay){bRequiresBump=true}else if(aOverlays.length>1){var nNextZIndex=Dom.getStyle(aOverlays[1].element,"zIndex");if(!isNaN(nNextZIndex)&&(nTopZIndex==nNextZIndex)){bRequiresBump=true}}if(bRequiresBump){oOverlay.cfg.setProperty("zindex",(parseInt(nTopZIndex,10)+2))}}aOverlays.sort(this.compareZIndexDesc)}}},find:function(overlay){var isInstance=overlay instanceof Overlay,overlays=this.overlays,n=overlays.length,found=null,o,i;if(isInstance||typeof overlay=="string"){for(i=n-1;i>=0;i--){o=overlays[i];if((isInstance&&(o===overlay))||(o.id==overlay)){found=o;break}}}return found},compareZIndexDesc:function(o1,o2){var zIndex1=(o1.cfg)?o1.cfg.getProperty("zIndex"):null,zIndex2=(o2.cfg)?o2.cfg.getProperty("zIndex"):null;if(zIndex1===null&&zIndex2===null){return 0}else if(zIndex1===null){return 1}else if(zIndex2===null){return-1}else if(zIndex1>zIndex2){return-1}else if(zIndex1<zIndex2){return 1}else{return 0}},showAll:function(){var overlays=this.overlays,n=overlays.length,i;for(i=n-1;i>=0;i--){overlays[i].show()}},hideAll:function(){var overlays=this.overlays,n=overlays.length,i;for(i=n-1;i>=0;i--){overlays[i].hide()}},toString:function(){return"OverlayManager"}}}());(function(){YAHOO.widget.ContainerEffect=function(overlay,attrIn,attrOut,targetElement,animClass){if(!animClass){animClass=YAHOO.util.Anim}this.overlay=overlay;this.attrIn=attrIn;this.attrOut=attrOut;this.targetElement=targetElement||overlay.element;this.animClass=animClass};var Dom=YAHOO.util.Dom,CustomEvent=YAHOO.util.CustomEvent,ContainerEffect=YAHOO.widget.ContainerEffect;ContainerEffect.FADE=function(overlay,dur){var Easing=YAHOO.util.Easing,fin={attributes:{opacity:{from:0,to:1}},duration:dur,method:Easing.easeIn},fout={attributes:{opacity:{to:0}},duration:dur,method:Easing.easeOut},fade=new ContainerEffect(overlay,fin,fout,overlay.element);fade.handleUnderlayStart=function(){var underlay=this.overlay.underlay;if(underlay&&YAHOO.env.ua.ie){var hasFilters=(underlay.filters&&underlay.filters.length>0);if(hasFilters){Dom.addClass(overlay.element,"yui-effect-fade")}}};fade.handleUnderlayComplete=function(){var underlay=this.overlay.underlay;if(underlay&&YAHOO.env.ua.ie){Dom.removeClass(overlay.element,"yui-effect-fade")}};fade.handleStartAnimateIn=function(type,args,obj){Dom.addClass(obj.overlay.element,"hide-select");if(!obj.overlay.underlay){obj.overlay.cfg.refireEvent("underlay")}obj.handleUnderlayStart();obj.overlay._setDomVisibility(true);Dom.setStyle(obj.overlay.element,"opacity",0)};fade.handleCompleteAnimateIn=function(type,args,obj){Dom.removeClass(obj.overlay.element,"hide-select");if(obj.overlay.element.style.filter){obj.overlay.element.style.filter=null}obj.handleUnderlayComplete();obj.overlay.cfg.refireEvent("iframe");obj.animateInCompleteEvent.fire()};fade.handleStartAnimateOut=function(type,args,obj){Dom.addClass(obj.overlay.element,"hide-select");obj.handleUnderlayStart()};fade.handleCompleteAnimateOut=function(type,args,obj){Dom.removeClass(obj.overlay.element,"hide-select");if(obj.overlay.element.style.filter){obj.overlay.element.style.filter=null}obj.overlay._setDomVisibility(false);Dom.setStyle(obj.overlay.element,"opacity",1);obj.handleUnderlayComplete();obj.overlay.cfg.refireEvent("iframe");obj.animateOutCompleteEvent.fire()};fade.init();return fade};ContainerEffect.SLIDE=function(overlay,dur){var Easing=YAHOO.util.Easing,x=overlay.cfg.getProperty("x")||Dom.getX(overlay.element),y=overlay.cfg.getProperty("y")||Dom.getY(overlay.element),clientWidth=Dom.getClientWidth(),offsetWidth=overlay.element.offsetWidth,sin={attributes:{points:{to:[x,y]}},duration:dur,method:Easing.easeIn},sout={attributes:{points:{to:[(clientWidth+25),y]}},duration:dur,method:Easing.easeOut},slide=new ContainerEffect(overlay,sin,sout,overlay.element,YAHOO.util.Motion);slide.handleStartAnimateIn=function(type,args,obj){obj.overlay.element.style.left=((-25)-offsetWidth)+"px";obj.overlay.element.style.top=y+"px"};slide.handleTweenAnimateIn=function(type,args,obj){var pos=Dom.getXY(obj.overlay.element),currentX=pos[0],currentY=pos[1];if(Dom.getStyle(obj.overlay.element,"visibility")=="hidden"&&currentX<x){obj.overlay._setDomVisibility(true)}obj.overlay.cfg.setProperty("xy",[currentX,currentY],true);obj.overlay.cfg.refireEvent("iframe")};slide.handleCompleteAnimateIn=function(type,args,obj){obj.overlay.cfg.setProperty("xy",[x,y],true);obj.startX=x;obj.startY=y;obj.overlay.cfg.refireEvent("iframe");obj.animateInCompleteEvent.fire()};slide.handleStartAnimateOut=function(type,args,obj){var vw=Dom.getViewportWidth(),pos=Dom.getXY(obj.overlay.element),yso=pos[1];obj.animOut.attributes.points.to=[(vw+25),yso]};slide.handleTweenAnimateOut=function(type,args,obj){var pos=Dom.getXY(obj.overlay.element),xto=pos[0],yto=pos[1];obj.overlay.cfg.setProperty("xy",[xto,yto],true);obj.overlay.cfg.refireEvent("iframe")};slide.handleCompleteAnimateOut=function(type,args,obj){obj.overlay._setDomVisibility(false);obj.overlay.cfg.setProperty("xy",[x,y]);obj.animateOutCompleteEvent.fire()};slide.init();return slide};ContainerEffect.prototype={init:function(){this.beforeAnimateInEvent=this.createEvent("beforeAnimateIn");this.beforeAnimateInEvent.signature=CustomEvent.LIST;this.beforeAnimateOutEvent=this.createEvent("beforeAnimateOut");this.beforeAnimateOutEvent.signature=CustomEvent.LIST;this.animateInCompleteEvent=this.createEvent("animateInComplete");this.animateInCompleteEvent.signature=CustomEvent.LIST;this.animateOutCompleteEvent=this.createEvent("animateOutComplete");this.animateOutCompleteEvent.signature=CustomEvent.LIST;this.animIn=new this.animClass(this.targetElement,this.attrIn.attributes,this.attrIn.duration,this.attrIn.method);this.animIn.onStart.subscribe(this.handleStartAnimateIn,this);this.animIn.onTween.subscribe(this.handleTweenAnimateIn,this);this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn,this);this.animOut=new this.animClass(this.targetElement,this.attrOut.attributes,this.attrOut.duration,this.attrOut.method);this.animOut.onStart.subscribe(this.handleStartAnimateOut,this);this.animOut.onTween.subscribe(this.handleTweenAnimateOut,this);this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut,this)},animateIn:function(){this.beforeAnimateInEvent.fire();this.animIn.animate()},animateOut:function(){this.beforeAnimateOutEvent.fire();this.animOut.animate()},handleStartAnimateIn:function(type,args,obj){},handleTweenAnimateIn:function(type,args,obj){},handleCompleteAnimateIn:function(type,args,obj){},handleStartAnimateOut:function(type,args,obj){},handleTweenAnimateOut:function(type,args,obj){},handleCompleteAnimateOut:function(type,args,obj){},toString:function(){var output="ContainerEffect";if(this.overlay){output+=" ["+this.overlay.toString()+"]"}return output}};YAHOO.lang.augmentProto(ContainerEffect,YAHOO.util.EventProvider)})();YAHOO.register("containercore",YAHOO.widget.Module,{version:"2.7.0",build:"1799"});
244   -/*
  236 +}else{return null;}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top),D=Math.max(this.right,E.right),A=Math.max(this.bottom,E.bottom),B=Math.min(this.left,E.left);return new YAHOO.util.Region(C,D,A,B);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D),C=F[1],E=F[0]+D.offsetWidth,A=F[1]+D.offsetHeight,B=F[0];return new YAHOO.util.Region(C,E,A,B);};YAHOO.util.Point=function(A,B){if(YAHOO.lang.isArray(A)){B=A[1];A=A[0];}YAHOO.util.Point.superclass.constructor.call(this,B,A,B,A);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var B=YAHOO.util,A="clientTop",F="clientLeft",J="parentNode",K="right",W="hasLayout",I="px",U="opacity",L="auto",D="borderLeftWidth",G="borderTopWidth",P="borderRightWidth",V="borderBottomWidth",S="visible",Q="transparent",N="height",E="width",H="style",T="currentStyle",R=/^width|height$/,O=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,M={get:function(X,Z){var Y="",a=X[T][Z];if(Z===U){Y=B.Dom.getStyle(X,U);}else{if(!a||(a.indexOf&&a.indexOf(I)>-1)){Y=a;}else{if(B.Dom.IE_COMPUTED[Z]){Y=B.Dom.IE_COMPUTED[Z](X,Z);}else{if(O.test(a)){Y=B.Dom.IE.ComputedStyle.getPixel(X,Z);}else{Y=a;}}}}return Y;},getOffset:function(Z,e){var b=Z[T][e],X=e.charAt(0).toUpperCase()+e.substr(1),c="offset"+X,Y="pixel"+X,a="",d;if(b==L){d=Z[c];if(d===undefined){a=0;}a=d;if(R.test(e)){Z[H][e]=d;if(Z[c]>d){a=d-(Z[c]-d);}Z[H][e]=L;}}else{if(!Z[H][Y]&&!Z[H][e]){Z[H][e]=b;}a=Z[H][Y];}return a+I;},getBorderWidth:function(X,Z){var Y=null;if(!X[T][W]){X[H].zoom=1;}switch(Z){case G:Y=X[A];break;case V:Y=X.offsetHeight-X.clientHeight-X[A];break;case D:Y=X[F];break;case P:Y=X.offsetWidth-X.clientWidth-X[F];break;}return Y+I;},getPixel:function(Y,X){var a=null,b=Y[T][K],Z=Y[T][X];Y[H][K]=Z;a=Y[H].pixelRight;Y[H][K]=b;return a+I;},getMargin:function(Y,X){var Z;if(Y[T][X]==L){Z=0+I;}else{Z=B.Dom.IE.ComputedStyle.getPixel(Y,X);}return Z;},getVisibility:function(Y,X){var Z;while((Z=Y[T])&&Z[X]=="inherit"){Y=Y[J];}return(Z)?Z[X]:S;},getColor:function(Y,X){return B.Dom.Color.toRGB(Y[T][X])||Q;},getBorderColor:function(Y,X){var Z=Y[T],a=Z[X]||Z.color;return B.Dom.Color.toRGB(B.Dom.Color.toHex(a));}},C={};C.top=C.right=C.bottom=C.left=C[E]=C[N]=M.getOffset;C.color=M.getColor;C[G]=C[P]=C[V]=C[D]=M.getBorderWidth;C.marginTop=C.marginRight=C.marginBottom=C.marginLeft=M.getMargin;C.visibility=M.getVisibility;C.borderColor=C.borderTopColor=C.borderRightColor=C.borderBottomColor=C.borderLeftColor=M.getBorderColor;B.Dom.IE_COMPUTED=C;B.Dom.IE_ComputedStyle=M;})();(function(){var C="toString",A=parseInt,B=RegExp,D=YAHOO.util;D.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(E){if(!D.Dom.Color.re_RGB.test(E)){E=D.Dom.Color.toHex(E);}if(D.Dom.Color.re_hex.exec(E)){E="rgb("+[A(B.$1,16),A(B.$2,16),A(B.$3,16)].join(", ")+")";}return E;},toHex:function(H){H=D.Dom.Color.KEYWORDS[H]||H;if(D.Dom.Color.re_RGB.exec(H)){var G=(B.$1.length===1)?"0"+B.$1:Number(B.$1),F=(B.$2.length===1)?"0"+B.$2:Number(B.$2),E=(B.$3.length===1)?"0"+B.$3:Number(B.$3);H=[G[C](16),F[C](16),E[C](16)].join("");}if(H.length<6){H=H.replace(D.Dom.Color.re_hex3,"$1$1");}if(H!=="transparent"&&H.indexOf("#")<0){H="#"+H;}return H.toLowerCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.7.0",build:"1799"});if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={}}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=(""+A[C]).split(".");E=YAHOO;for(B=(D[0]=="YAHOO")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]]}}return E};YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(B&&B.log){return B.log(D,A,C)}else{return false}};YAHOO.register=function(A,E,D){var I=YAHOO.env.modules,B,H,G,F,C;if(!I[A]){I[A]={versions:[],builds:[]}}B=I[A];H=D.version;G=D.build;F=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=E;for(C=0;C<F.length;C=C+1){F[C](B)}if(E){E.VERSION=H;E.BUILD=G}else{YAHOO.log("mainClass is undefined for module "+A,"warn")}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(A){return YAHOO.env.modules[A]||null};YAHOO.env.ua=function(){var C={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0,caja:0},B=navigator.userAgent,A;if((/KHTML/).test(B)){C.webkit=1}A=B.match(/AppleWebKit\/([^\s]*)/);if(A&&A[1]){C.webkit=parseFloat(A[1]);if(/ Mobile\//.test(B)){C.mobile="Apple"}else{A=B.match(/NokiaN[^\/]*/);if(A){C.mobile=A[0]}}A=B.match(/AdobeAIR\/([^\s]*)/);if(A){C.air=A[0]}}if(!C.webkit){A=B.match(/Opera[\s\/]([^\s]*)/);if(A&&A[1]){C.opera=parseFloat(A[1]);A=B.match(/Opera Mini[^;]*/);if(A){C.mobile=A[0]}}else{A=B.match(/MSIE\s([^;]*)/);if(A&&A[1]){C.ie=parseFloat(A[1])}else{A=B.match(/Gecko\/([^\s]*)/);if(A){C.gecko=1;A=B.match(/rv:([^\s\)]*)/);if(A&&A[1]){C.gecko=parseFloat(A[1])}}}}}A=B.match(/Caja\/([^\s]*)/);if(A&&A[1]){C.caja=parseFloat(A[1])}return C}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var B=YAHOO_config.listener,A=YAHOO.env.listeners,D=true,C;if(B){for(C=0;C<A.length;C=C+1){if(A[C]==B){D=false;break}}if(D){A.push(B)}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var B=YAHOO.lang,F="[object Array]",C="[object Function]",A=Object.prototype,E=["toString","valueOf"],D={isArray:function(G){return A.toString.apply(G)===F},isBoolean:function(G){return typeof G==="boolean"},isFunction:function(G){return A.toString.apply(G)===C},isNull:function(G){return G===null},isNumber:function(G){return typeof G==="number"&&isFinite(G)},isObject:function(G){return(G&&(typeof G==="object"||B.isFunction(G)))||false},isString:function(G){return typeof G==="string"},isUndefined:function(G){return typeof G==="undefined"},_IEEnumFix:(YAHOO.env.ua.ie)?function(I,H){var G,K,J;for(G=0;G<E.length;G=G+1){K=E[G];J=H[K];if(B.isFunction(J)&&J!=A[K]){I[K]=J}}}:function(){},extend:function(J,K,I){if(!K||!J){throw new Error("extend failed, please check that "+"all dependencies are included.")}var H=function(){},G;H.prototype=K.prototype;J.prototype=new H();J.prototype.constructor=J;J.superclass=K.prototype;if(K.prototype.constructor==A.constructor){K.prototype.constructor=K}if(I){for(G in I){if(B.hasOwnProperty(I,G)){J.prototype[G]=I[G]}}B._IEEnumFix(J.prototype,I)}},augmentObject:function(K,J){if(!J||!K){throw new Error("Absorb failed, verify dependencies.")}var G=arguments,I,L,H=G[2];if(H&&H!==true){for(I=2;I<G.length;I=I+1){K[G[I]]=J[G[I]]}}else{for(L in J){if(H||!(L in K)){K[L]=J[L]}}B._IEEnumFix(K,J)}},augmentProto:function(J,I){if(!I||!J){throw new Error("Augment failed, verify dependencies.")}var G=[J.prototype,I.prototype],H;for(H=2;H<arguments.length;H=H+1){G.push(arguments[H])}B.augmentObject.apply(this,G)},dump:function(G,L){var I,K,N=[],O="{...}",H="f(){...}",M=", ",J=" => ";if(!B.isObject(G)){return G+""}else{if(G instanceof Date||("nodeType"in G&&"tagName"in G)){return G}else{if(B.isFunction(G)){return H}}}L=(B.isNumber(L))?L:3;if(B.isArray(G)){N.push("[");for(I=0,K=G.length;I<K;I=I+1){if(B.isObject(G[I])){N.push((L>0)?B.dump(G[I],L-1):O)}else{N.push(G[I])}N.push(M)}if(N.length>1){N.pop()}N.push("]")}else{N.push("{");for(I in G){if(B.hasOwnProperty(G,I)){N.push(I+J);if(B.isObject(G[I])){N.push((L>0)?B.dump(G[I],L-1):O)}else{N.push(G[I])}N.push(M)}}if(N.length>1){N.pop()}N.push("}")}return N.join("")},substitute:function(V,H,O){var L,K,J,R,S,U,Q=[],I,M="dump",P=" ",G="{",T="}",N;for(;;){L=V.lastIndexOf(G);if(L<0){break}K=V.indexOf(T,L);if(L+1>=K){break}I=V.substring(L+1,K);R=I;U=null;J=R.indexOf(P);if(J>-1){U=R.substring(J+1);R=R.substring(0,J)}S=H[R];if(O){S=O(R,S,U)}if(B.isObject(S)){if(B.isArray(S)){S=B.dump(S,parseInt(U,10))}else{U=U||"";N=U.indexOf(M);if(N>-1){U=U.substring(4)}if(S.toString===A.toString||N>-1){S=B.dump(S,parseInt(U,10))}else{S=S.toString()}}}else{if(!B.isString(S)&&!B.isNumber(S)){S="~-"+Q.length+"-~";Q[Q.length]=I}}V=V.substring(0,L)+S+V.substring(K+1)}for(L=Q.length-1;L>=0;L=L-1){V=V.replace(new RegExp("~-"+L+"-~"),"{"+Q[L]+"}","g")}return V},trim:function(G){try{return G.replace(/^\s+|\s+$/g,"")}catch(H){return G}},merge:function(){var J={},H=arguments,G=H.length,I;for(I=0;I<G;I=I+1){B.augmentObject(J,H[I],true)}return J},later:function(N,H,O,J,K){N=N||0;H=H||{};var I=O,M=J,L,G;if(B.isString(O)){I=H[O]}if(!I){throw new TypeError("method undefined")}if(!B.isArray(M)){M=[J]}L=function(){I.apply(H,M)};G=(K)?setInterval(L,N):setTimeout(L,N);return{interval:K,cancel:function(){if(this.interval){clearInterval(G)}else{clearTimeout(G)}}}},isValue:function(G){return(B.isObject(G)||B.isString(G)||B.isNumber(G)||B.isBoolean(G))}};B.hasOwnProperty=(A.hasOwnProperty)?function(G,H){return G&&G.hasOwnProperty(H)}:function(G,H){return!B.isUndefined(G[H])&&G.constructor.prototype[H]!==G[H]};D.augmentObject(B,D,true);YAHOO.util.Lang=B;B.augment=B.augmentProto;YAHOO.augment=B.augmentProto;YAHOO.extend=B.extend})();YAHOO.register("yahoo",YAHOO,{version:"2.7.0",build:"1799"});YAHOO.util.Get=function(){var M={},L=0,R=0,E=false,N=YAHOO.env.ua,S=YAHOO.lang;var J=function(W,T,X){var U=X||window,Y=U.document,Z=Y.createElement(W);for(var V in T){if(T[V]&&YAHOO.lang.hasOwnProperty(T,V)){Z.setAttribute(V,T[V])}}return Z};var I=function(T,U,W){var V=W||"utf-8";return J("link",{"id":"yui__dyn_"+(R++),"type":"text/css","charset":V,"rel":"stylesheet","href":T},U)};var P=function(T,U,W){var V=W||"utf-8";return J("script",{"id":"yui__dyn_"+(R++),"type":"text/javascript","charset":V,"src":T},U)};var A=function(T,U){return{tId:T.tId,win:T.win,data:T.data,nodes:T.nodes,msg:U,purge:function(){D(this.tId)}}};var B=function(T,W){var U=M[W],V=(S.isString(T))?U.win.document.getElementById(T):T;if(!V){Q(W,"target node not found: "+T)}return V};var Q=function(W,V){var T=M[W];if(T.onFailure){var U=T.scope||T.win;T.onFailure.call(U,A(T,V))}};var C=function(W){var T=M[W];T.finished=true;if(T.aborted){var V="transaction "+W+" was aborted";Q(W,V);return}if(T.onSuccess){var U=T.scope||T.win;T.onSuccess.call(U,A(T))}};var O=function(V){var T=M[V];if(T.onTimeout){var U=T.scope||T;T.onTimeout.call(U,A(T))}};var G=function(V,Z){var U=M[V];if(U.timer){U.timer.cancel()}if(U.aborted){var X="transaction "+V+" was aborted";Q(V,X);return}if(Z){U.url.shift();if(U.varName){U.varName.shift()}}else{U.url=(S.isString(U.url))?[U.url]:U.url;if(U.varName){U.varName=(S.isString(U.varName))?[U.varName]:U.varName}}var c=U.win,b=c.document,a=b.getElementsByTagName("head")[0],W;if(U.url.length===0){if(U.type==="script"&&N.webkit&&N.webkit<420&&!U.finalpass&&!U.varName){var Y=P(null,U.win,U.charset);Y.innerHTML='YAHOO.util.Get._finalize("'+V+'");';U.nodes.push(Y);a.appendChild(Y)}else{C(V)}return}var T=U.url[0];if(!T){U.url.shift();return G(V)}if(U.timeout){U.timer=S.later(U.timeout,U,O,V)}if(U.type==="script"){W=P(T,c,U.charset)}else{W=I(T,c,U.charset)}F(U.type,W,V,T,c,U.url.length);U.nodes.push(W);if(U.insertBefore){var e=B(U.insertBefore,V);if(e){e.parentNode.insertBefore(W,e)}}else{a.appendChild(W)}if((N.webkit||N.gecko)&&U.type==="css"){G(V,T)}};var K=function(){if(E){return}E=true;for(var T in M){var U=M[T];if(U.autopurge&&U.finished){D(U.tId);delete M[T]}}E=false};var D=function(a){var X=M[a];if(X){var Z=X.nodes,T=Z.length,Y=X.win.document,W=Y.getElementsByTagName("head")[0];if(X.insertBefore){var V=B(X.insertBefore,a);if(V){W=V.parentNode}}for(var U=0;U<T;U=U+1){W.removeChild(Z[U])}X.nodes=[]}};var H=function(U,T,V){var X="q"+(L++);V=V||{};if(L%YAHOO.util.Get.PURGE_THRESH===0){K()}M[X]=S.merge(V,{tId:X,type:U,url:T,finished:false,aborted:false,nodes:[]});var W=M[X];W.win=W.win||window;W.scope=W.scope||W.win;W.autopurge=("autopurge"in W)?W.autopurge:(U==="script")?true:false;S.later(0,W,G,X);return{tId:X}};var F=function(c,X,W,U,Y,Z,b){var a=b||G;if(N.ie){X.onreadystatechange=function(){var d=this.readyState;if("loaded"===d||"complete"===d){X.onreadystatechange=null;a(W,U)}}}else{if(N.webkit){if(c==="script"){if(N.webkit>=420){X.addEventListener("load",function(){a(W,U)})}else{var T=M[W];if(T.varName){var V=YAHOO.util.Get.POLL_FREQ;T.maxattempts=YAHOO.util.Get.TIMEOUT/V;T.attempts=0;T._cache=T.varName[0].split(".");T.timer=S.later(V,T,function(j){var f=this._cache,e=f.length,d=this.win,g;for(g=0;g<e;g=g+1){d=d[f[g]];if(!d){this.attempts++;if(this.attempts++>this.maxattempts){var h="Over retry limit, giving up";T.timer.cancel();Q(W,h)}else{}return}}T.timer.cancel();a(W,U)},null,true)}else{S.later(YAHOO.util.Get.POLL_FREQ,null,a,[W,U])}}}}else{X.onload=function(){a(W,U)}}}};return{POLL_FREQ:10,PURGE_THRESH:20,TIMEOUT:2000,_finalize:function(T){S.later(0,null,C,T)},abort:function(U){var V=(S.isString(U))?U:U.tId;var T=M[V];if(T){T.aborted=true}},script:function(T,U){return H("script",T,U)},css:function(T,U){return H("css",T,U)}}}();YAHOO.register("get",YAHOO.util.Get,{version:"2.7.0",build:"1799"});(function(){var Y=YAHOO,util=Y.util,lang=Y.lang,env=Y.env,PROV="_provides",SUPER="_supersedes",REQ="expanded",AFTER="_after";var YUI={dupsAllowed:{"yahoo":true,"get":true},info:{"root":"2.7.0/build/","base":"http://yui.yahooapis.com/2.7.0/build/","comboBase":"http://yui.yahooapis.com/combo?","skin":{"defaultSkin":"sam","base":"assets/skins/","path":"skin.css","after":["reset","fonts","grids","base"],"rollup":3},dupsAllowed:["yahoo","get"],"moduleInfo":{"animation":{"type":"js","path":"animation/animation-min.js","requires":["dom","event"]},"autocomplete":{"type":"js","path":"autocomplete/autocomplete-min.js","requires":["dom","event","datasource"],"optional":["connection","animation"],"skinnable":true},"base":{"type":"css","path":"base/base-min.css","after":["reset","fonts","grids"]},"button":{"type":"js","path":"button/button-min.js","requires":["element"],"optional":["menu"],"skinnable":true},"calendar":{"type":"js","path":"calendar/calendar-min.js","requires":["event","dom"],"skinnable":true},"carousel":{"type":"js","path":"carousel/carousel-min.js","requires":["element"],"optional":["animation"],"skinnable":true},"charts":{"type":"js","path":"charts/charts-min.js","requires":["element","json","datasource"]},"colorpicker":{"type":"js","path":"colorpicker/colorpicker-min.js","requires":["slider","element"],"optional":["animation"],"skinnable":true},"connection":{"type":"js","path":"connection/connection-min.js","requires":["event"]},"container":{"type":"js","path":"container/container-min.js","requires":["dom","event"],"optional":["dragdrop","animation","connection"],"supersedes":["containercore"],"skinnable":true},"containercore":{"type":"js","path":"container/container_core-min.js","requires":["dom","event"],"pkg":"container"},"cookie":{"type":"js","path":"cookie/cookie-min.js","requires":["yahoo"]},"datasource":{"type":"js","path":"datasource/datasource-min.js","requires":["event"],"optional":["connection"]},"datatable":{"type":"js","path":"datatable/datatable-min.js","requires":["element","datasource"],"optional":["calendar","dragdrop","paginator"],"skinnable":true},"dom":{"type":"js","path":"dom/dom-min.js","requires":["yahoo"]},"dragdrop":{"type":"js","path":"dragdrop/dragdrop-min.js","requires":["dom","event"]},"editor":{"type":"js","path":"editor/editor-min.js","requires":["menu","element","button"],"optional":["animation","dragdrop"],"supersedes":["simpleeditor"],"skinnable":true},"element":{"type":"js","path":"element/element-min.js","requires":["dom","event"]},"event":{"type":"js","path":"event/event-min.js","requires":["yahoo"]},"fonts":{"type":"css","path":"fonts/fonts-min.css"},"get":{"type":"js","path":"get/get-min.js","requires":["yahoo"]},"grids":{"type":"css","path":"grids/grids-min.css","requires":["fonts"],"optional":["reset"]},"history":{"type":"js","path":"history/history-min.js","requires":["event"]},"imagecropper":{"type":"js","path":"imagecropper/imagecropper-min.js","requires":["dom","event","dragdrop","element","resize"],"skinnable":true},"imageloader":{"type":"js","path":"imageloader/imageloader-min.js","requires":["event","dom"]},"json":{"type":"js","path":"json/json-min.js","requires":["yahoo"]},"layout":{"type":"js","path":"layout/layout-min.js","requires":["dom","event","element"],"optional":["animation","dragdrop","resize","selector"],"skinnable":true},"logger":{"type":"js","path":"logger/logger-min.js","requires":["event","dom"],"optional":["dragdrop"],"skinnable":true},"menu":{"type":"js","path":"menu/menu-min.js","requires":["containercore"],"skinnable":true},"paginator":{"type":"js","path":"paginator/paginator-min.js","requires":["element"],"skinnable":true},"profiler":{"type":"js","path":"profiler/profiler-min.js","requires":["yahoo"]},"profilerviewer":{"type":"js","path":"profilerviewer/profilerviewer-min.js","requires":["profiler","yuiloader","element"],"skinnable":true},"reset":{"type":"css","path":"reset/reset-min.css"},"reset-fonts-grids":{"type":"css","path":"reset-fonts-grids/reset-fonts-grids.css","supersedes":["reset","fonts","grids","reset-fonts"],"rollup":4},"reset-fonts":{"type":"css","path":"reset-fonts/reset-fonts.css","supersedes":["reset","fonts"],"rollup":2},"resize":{"type":"js","path":"resize/resize-min.js","requires":["dom","event","dragdrop","element"],"optional":["animation"],"skinnable":true},"selector":{"type":"js","path":"selector/selector-min.js","requires":["yahoo","dom"]},"simpleeditor":{"type":"js","path":"editor/simpleeditor-min.js","requires":["element"],"optional":["containercore","menu","button","animation","dragdrop"],"skinnable":true,"pkg":"editor"},"slider":{"type":"js","path":"slider/slider-min.js","requires":["dragdrop"],"optional":["animation"],"skinnable":true},"stylesheet":{"type":"js","path":"stylesheet/stylesheet-min.js","requires":["yahoo"]},"tabview":{"type":"js","path":"tabview/tabview-min.js","requires":["element"],"optional":["connection"],"skinnable":true},"treeview":{"type":"js","path":"treeview/treeview-min.js","requires":["event","dom"],"optional":["json"],"skinnable":true},"uploader":{"type":"js","path":"uploader/uploader.js","requires":["element"]},"utilities":{"type":"js","path":"utilities/utilities.js","supersedes":["yahoo","event","dragdrop","animation","dom","connection","element","yahoo-dom-event","get","yuiloader","yuiloader-dom-event"],"rollup":8},"yahoo":{"type":"js","path":"yahoo/yahoo-min.js"},"yahoo-dom-event":{"type":"js","path":"yahoo-dom-event/yahoo-dom-event.js","supersedes":["yahoo","event","dom"],"rollup":3},"yuiloader":{"type":"js","path":"yuiloader/yuiloader-min.js","supersedes":["yahoo","get"]},"yuiloader-dom-event":{"type":"js","path":"yuiloader-dom-event/yuiloader-dom-event.js","supersedes":["yahoo","dom","event","get","yuiloader","yahoo-dom-event"],"rollup":5},"yuitest":{"type":"js","path":"yuitest/yuitest-min.js","requires":["logger"],"skinnable":true}}},ObjectUtil:{appendArray:function(o,a){if(a){for(var i=0;i<a.length;i=i+1){o[a[i]]=true}}},keys:function(o,ordered){var a=[],i;for(i in o){if(lang.hasOwnProperty(o,i)){a.push(i)}}return a}},ArrayUtil:{appendArray:function(a1,a2){Array.prototype.push.apply(a1,a2)},indexOf:function(a,val){for(var i=0;i<a.length;i=i+1){if(a[i]===val){return i}}return-1},toObject:function(a){var o={};for(var i=0;i<a.length;i=i+1){o[a[i]]=true}return o},uniq:function(a){return YUI.ObjectUtil.keys(YUI.ArrayUtil.toObject(a))}}};YAHOO.util.YUILoader=function(o){this._internalCallback=null;this._useYahooListener=false;this.onSuccess=null;this.onFailure=Y.log;this.onProgress=null;this.onTimeout=null;this.scope=this;this.data=null;this.insertBefore=null;this.charset=null;this.varName=null;this.base=YUI.info.base;this.comboBase=YUI.info.comboBase;this.combine=false;this.root=YUI.info.root;this.timeout=0;this.ignore=null;this.force=null;this.allowRollup=true;this.filter=null;this.required={};this.moduleInfo=lang.merge(YUI.info.moduleInfo);this.rollups=null;this.loadOptional=false;this.sorted=[];this.loaded={};this.dirty=true;this.inserted={};var self=this;env.listeners.push(function(m){if(self._useYahooListener){self.loadNext(m.name)}});this.skin=lang.merge(YUI.info.skin);this._config(o)};Y.util.YUILoader.prototype={FILTERS:{RAW:{"searchExp":"-min\\.js","replaceStr":".js"},DEBUG:{"searchExp":"-min\\.js","replaceStr":"-debug.js"}},SKIN_PREFIX:"skin-",_config:function(o){if(o){for(var i in o){if(lang.hasOwnProperty(o,i)){if(i=="require"){this.require(o[i])}else{this[i]=o[i]}}}}var f=this.filter;if(lang.isString(f)){f=f.toUpperCase();if(f==="DEBUG"){this.require("logger")}if(!Y.widget.LogWriter){Y.widget.LogWriter=function(){return Y}}this.filter=this.FILTERS[f]}},addModule:function(o){if(!o||!o.name||!o.type||(!o.path&&!o.fullpath)){return false}o.ext=("ext"in o)?o.ext:true;o.requires=o.requires||[];this.moduleInfo[o.name]=o;this.dirty=true;return true},require:function(what){var a=(typeof what==="string")?arguments:what;this.dirty=true;YUI.ObjectUtil.appendArray(this.required,a)},_addSkin:function(skin,mod){var name=this.formatSkin(skin),info=this.moduleInfo,sinf=this.skin,ext=info[mod]&&info[mod].ext;if(!info[name]){this.addModule({"name":name,"type":"css","path":sinf.base+skin+"/"+sinf.path,"after":sinf.after,"rollup":sinf.rollup,"ext":ext})}if(mod){name=this.formatSkin(skin,mod);if(!info[name]){var mdef=info[mod],pkg=mdef.pkg||mod;this.addModule({"name":name,"type":"css","after":sinf.after,"path":pkg+"/"+sinf.base+skin+"/"+mod+".css","ext":ext})}}return name},getRequires:function(mod){if(!mod){return[]}if(!this.dirty&&mod.expanded){return mod.expanded}mod.requires=mod.requires||[];var i,d=[],r=mod.requires,o=mod.optional,info=this.moduleInfo,m;for(i=0;i<r.length;i=i+1){d.push(r[i]);m=info[r[i]];YUI.ArrayUtil.appendArray(d,this.getRequires(m))}if(o&&this.loadOptional){for(i=0;i<o.length;i=i+1){d.push(o[i]);YUI.ArrayUtil.appendArray(d,this.getRequires(info[o[i]]))}}mod.expanded=YUI.ArrayUtil.uniq(d);return mod.expanded},getProvides:function(name,notMe){var addMe=!(notMe),ckey=(addMe)?PROV:SUPER,m=this.moduleInfo[name],o={};if(!m){return o}if(m[ckey]){return m[ckey]}var s=m.supersedes,done={},me=this;var add=function(mm){if(!done[mm]){done[mm]=true;lang.augmentObject(o,me.getProvides(mm))}};if(s){for(var i=0;i<s.length;i=i+1){add(s[i])}}m[SUPER]=o;m[PROV]=lang.merge(o);m[PROV][name]=true;return m[ckey]},calculate:function(o){if(o||this.dirty){this._config(o);this._setup();this._explode();if(this.allowRollup){this._rollup()}this._reduce();this._sort();this.dirty=false}},_setup:function(){var info=this.moduleInfo,name,i,j;for(name in info){if(lang.hasOwnProperty(info,name)){var m=info[name];if(m&&m.skinnable){var o=this.skin.overrides,smod;if(o&&o[name]){for(i=0;i<o[name].length;i=i+1){smod=this._addSkin(o[name][i],name)}}else{smod=this._addSkin(this.skin.defaultSkin,name)}m.requires.push(smod)}}}var l=lang.merge(this.inserted);if(!this._sandbox){l=lang.merge(l,env.modules)}if(this.ignore){YUI.ObjectUtil.appendArray(l,this.ignore)}if(this.force){for(i=0;i<this.force.length;i=i+1){if(this.force[i]in l){delete l[this.force[i]]}}}for(j in l){if(lang.hasOwnProperty(l,j)){lang.augmentObject(l,this.getProvides(j))}}this.loaded=l},_explode:function(){var r=this.required,i,mod;for(i in r){if(lang.hasOwnProperty(r,i)){mod=this.moduleInfo[i];if(mod){var req=this.getRequires(mod);if(req){YUI.ObjectUtil.appendArray(r,req)}}}}},_skin:function(){},formatSkin:function(skin,mod){var s=this.SKIN_PREFIX+skin;if(mod){s=s+"-"+mod}return s},parseSkin:function(mod){if(mod.indexOf(this.SKIN_PREFIX)===0){var a=mod.split("-");return{skin:a[1],module:a[2]}}return null},_rollup:function(){var i,j,m,s,rollups={},r=this.required,roll,info=this.moduleInfo;if(this.dirty||!this.rollups){for(i in info){if(lang.hasOwnProperty(info,i)){m=info[i];if(m&&m.rollup){rollups[i]=m}}}this.rollups=rollups}for(;;){var rolled=false;for(i in rollups){if(!r[i]&&!this.loaded[i]){m=info[i];s=m.supersedes;roll=false;if(!m.rollup){continue}var skin=(m.ext)?false:this.parseSkin(i),c=0;if(skin){for(j in r){if(lang.hasOwnProperty(r,j)){if(i!==j&&this.parseSkin(j)){c++;roll=(c>=m.rollup);if(roll){break}}}}}else{for(j=0;j<s.length;j=j+1){if(this.loaded[s[j]]&&(!YUI.dupsAllowed[s[j]])){roll=false;break}else{if(r[s[j]]){c++;roll=(c>=m.rollup);if(roll){break}}}}}if(roll){r[i]=true;rolled=true;this.getRequires(m)}}}if(!rolled){break}}},_reduce:function(){var i,j,s,m,r=this.required;for(i in r){if(i in this.loaded){delete r[i]}else{var skinDef=this.parseSkin(i);if(skinDef){if(!skinDef.module){var skin_pre=this.SKIN_PREFIX+skinDef.skin;for(j in r){if(lang.hasOwnProperty(r,j)){m=this.moduleInfo[j];var ext=m&&m.ext;if(!ext&&j!==i&&j.indexOf(skin_pre)>-1){delete r[j]}}}}}else{m=this.moduleInfo[i];s=m&&m.supersedes;if(s){for(j=0;j<s.length;j=j+1){if(s[j]in r){delete r[s[j]]}}}}}}},_onFailure:function(msg){YAHOO.log("Failure","info","loader");var f=this.onFailure;if(f){f.call(this.scope,{msg:"failure: "+msg,data:this.data,success:false})}},_onTimeout:function(){YAHOO.log("Timeout","info","loader");var f=this.onTimeout;if(f){f.call(this.scope,{msg:"timeout",data:this.data,success:false})}},_sort:function(){var s=[],info=this.moduleInfo,loaded=this.loaded,checkOptional=!this.loadOptional,me=this;var requires=function(aa,bb){var mm=info[aa];if(loaded[bb]||!mm){return false}var ii,rr=mm.expanded,after=mm.after,other=info[bb],optional=mm.optional;if(rr&&YUI.ArrayUtil.indexOf(rr,bb)>-1){return true}if(after&&YUI.ArrayUtil.indexOf(after,bb)>-1){return true}if(checkOptional&&optional&&YUI.ArrayUtil.indexOf(optional,bb)>-1){return true}var ss=info[bb]&&info[bb].supersedes;if(ss){for(ii=0;ii<ss.length;ii=ii+1){if(requires(aa,ss[ii])){return true}}}if(mm.ext&&mm.type=="css"&&!other.ext&&other.type=="css"){return true}return false};for(var i in this.required){if(lang.hasOwnProperty(this.required,i)){s.push(i)}}var p=0;for(;;){var l=s.length,a,b,j,k,moved=false;for(j=p;j<l;j=j+1){a=s[j];for(k=j+1;k<l;k=k+1){if(requires(a,s[k])){b=s.splice(k,1);s.splice(j,0,b[0]);moved=true;break}}if(moved){break}else{p=p+1}}if(!moved){break}}this.sorted=s},toString:function(){var o={type:"YUILoader",base:this.base,filter:this.filter,required:this.required,loaded:this.loaded,inserted:this.inserted};lang.dump(o,1)},_combine:function(){this._combining=[];var self=this,s=this.sorted,len=s.length,js=this.comboBase,css=this.comboBase,target,startLen=js.length,i,m,type=this.loadType;YAHOO.log("type "+type);for(i=0;i<len;i=i+1){m=this.moduleInfo[s[i]];if(m&&!m.ext&&(!type||type===m.type)){target=this.root+m.path;target+="&";if(m.type=="js"){js+=target}else{css+=target}this._combining.push(s[i])}}if(this._combining.length){YAHOO.log("Attempting to combine: "+this._combining,"info","loader");var callback=function(o){var c=this._combining,len=c.length,i,m;for(i=0;i<len;i=i+1){this.inserted[c[i]]=true}this.loadNext(o.data)},loadScript=function(){if(js.length>startLen){YAHOO.util.Get.script(self._filter(js),{data:self._loading,onSuccess:callback,onFailure:self._onFailure,onTimeout:self._onTimeout,insertBefore:self.insertBefore,charset:self.charset,timeout:self.timeout,scope:self})}};if(css.length>startLen){YAHOO.util.Get.css(this._filter(css),{data:this._loading,onSuccess:loadScript,onFailure:this._onFailure,onTimeout:this._onTimeout,insertBefore:this.insertBefore,charset:this.charset,timeout:this.timeout,scope:self})}else{loadScript()}return}else{this.loadNext(this._loading)}},insert:function(o,type){this.calculate(o);this._loading=true;this.loadType=type;if(this.combine){return this._combine()}if(!type){var self=this;this._internalCallback=function(){self._internalCallback=null;self.insert(null,"js")};this.insert(null,"css");return}this.loadNext()},sandbox:function(o,type){this._config(o);if(!this.onSuccess){throw new Error("You must supply an onSuccess handler for your sandbox")}this._sandbox=true;var self=this;if(!type||type!=="js"){this._internalCallback=function(){self._internalCallback=null;self.sandbox(null,"js")};this.insert(null,"css");return}if(!util.Connect){var ld=new YAHOO.util.YUILoader();ld.insert({base:this.base,filter:this.filter,require:"connection",insertBefore:this.insertBefore,charset:this.charset,onSuccess:function(){this.sandbox(null,"js")},scope:this},"js");return}this._scriptText=[];this._loadCount=0;this._stopCount=this.sorted.length;this._xhr=[];this.calculate();var s=this.sorted,l=s.length,i,m,url;for(i=0;i<l;i=i+1){m=this.moduleInfo[s[i]];if(!m){this._onFailure("undefined module "+m);for(var j=0;j<this._xhr.length;j=j+1){this._xhr[j].abort()}return}if(m.type!=="js"){this._loadCount++;continue}url=m.fullpath;url=(url)?this._filter(url):this._url(m.path);var xhrData={success:function(o){var idx=o.argument[0],name=o.argument[2];this._scriptText[idx]=o.responseText;if(this.onProgress){this.onProgress.call(this.scope,{name:name,scriptText:o.responseText,xhrResponse:o,data:this.data})}this._loadCount++;if(this._loadCount>=this._stopCount){var v=this.varName||"YAHOO";var t="(function() {\n";var b="\nreturn "+v+";\n})();";var ref=eval(t+this._scriptText.join("\n")+b);this._pushEvents(ref);if(ref){this.onSuccess.call(this.scope,{reference:ref,data:this.data})}else{this._onFailure.call(this.varName+" reference failure")}}},failure:function(o){this.onFailure.call(this.scope,{msg:"XHR failure",xhrResponse:o,data:this.data})},scope:this,argument:[i,url,s[i]]};this._xhr.push(util.Connect.asyncRequest("GET",url,xhrData))}},loadNext:function(mname){if(!this._loading){return}if(mname){if(mname!==this._loading){return}this.inserted[mname]=true;if(this.onProgress){this.onProgress.call(this.scope,{name:mname,data:this.data})}}var s=this.sorted,len=s.length,i,m;for(i=0;i<len;i=i+1){if(s[i]in this.inserted){continue}if(s[i]===this._loading){return}m=this.moduleInfo[s[i]];if(!m){this.onFailure.call(this.scope,{msg:"undefined module "+m,data:this.data});return}if(!this.loadType||this.loadType===m.type){this._loading=s[i];var fn=(m.type==="css")?util.Get.css:util.Get.script,url=m.fullpath,self=this,c=function(o){self.loadNext(o.data)};url=(url)?this._filter(url):this._url(m.path);if(env.ua.webkit&&env.ua.webkit<420&&m.type==="js"&&!m.varName){c=null;this._useYahooListener=true}fn(url,{data:s[i],onSuccess:c,onFailure:this._onFailure,onTimeout:this._onTimeout,insertBefore:this.insertBefore,charset:this.charset,timeout:this.timeout,varName:m.varName,scope:self});return}}this._loading=null;if(this._internalCallback){var f=this._internalCallback;this._internalCallback=null;f.call(this)}else{if(this.onSuccess){this._pushEvents();this.onSuccess.call(this.scope,{data:this.data})}}},_pushEvents:function(ref){var r=ref||YAHOO;if(r.util&&r.util.Event){r.util.Event._load()}},_filter:function(str){var f=this.filter;return(f)?str.replace(new RegExp(f.searchExp,"g"),f.replaceStr):str},_url:function(path){return this._filter((this.base||"")+path)}}})();YAHOO.register("yuiloader",YAHOO.util.YUILoader,{version:"2.7.0",build:"1799"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var E=YAHOO.util,L=YAHOO.lang,m=YAHOO.env.ua,A=YAHOO.lang.trim,d={},h={},N=/^t(?:able|d|h)$/i,X=/color$/i,K=window.document,W=K.documentElement,e="ownerDocument",n="defaultView",v="documentElement",t="compatMode",b="offsetLeft",P="offsetTop",u="offsetParent",Z="parentNode",l="nodeType",C="tagName",O="scrollLeft",i="scrollTop",Q="getBoundingClientRect",w="getComputedStyle",a="currentStyle",M="CSS1Compat",c="BackCompat",g="class",F="className",J="",B=" ",s="(?:^|\\s)",k="(?= |$)",U="g",p="position",f="fixed",V="relative",j="left",o="top",r="medium",q="borderLeftWidth",R="borderTopWidth",D=m.opera,I=m.webkit,H=m.gecko,T=m.ie;E.Dom={CUSTOM_ATTRIBUTES:(!W.hasAttribute)?{"for":"htmlFor","class":F}:{"htmlFor":"for","className":g},get:function(y){var AA,Y,z,x,G;if(y){if(y[l]||y.item){return y}if(typeof y==="string"){AA=y;y=K.getElementById(y);if(y&&y.id===AA){return y}else{if(y&&K.all){y=null;Y=K.all[AA];for(x=0,G=Y.length;x<G;++x){if(Y[x].id===AA){return Y[x]}}}}return y}if(y.DOM_EVENTS){y=y.get("element")}if("length"in y){z=[];for(x=0,G=y.length;x<G;++x){z[z.length]=E.Dom.get(y[x])}return z}return y}return null},getComputedStyle:function(G,Y){if(window[w]){return G[e][n][w](G,null)[Y]}else{if(G[a]){return E.Dom.IE_ComputedStyle.get(G,Y)}}},getStyle:function(G,Y){return E.Dom.batch(G,E.Dom._getStyle,Y)},_getStyle:function(){if(window[w]){return function(G,y){y=(y==="float")?y="cssFloat":E.Dom._toCamel(y);var x=G.style[y],Y;if(!x){Y=G[e][n][w](G,null);if(Y){x=Y[y]}}return x}}else{if(W[a]){return function(G,y){var x;switch(y){case"opacity":x=100;try{x=G.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(z){try{x=G.filters("alpha").opacity}catch(Y){}}return x/100;case"float":y="styleFloat";default:y=E.Dom._toCamel(y);x=G[a]?G[a][y]:null;return(G.style[y]||x)}}}}}(),setStyle:function(G,Y,x){E.Dom.batch(G,E.Dom._setStyle,{prop:Y,val:x})},_setStyle:function(){if(T){return function(Y,G){var x=E.Dom._toCamel(G.prop),y=G.val;if(Y){switch(x){case"opacity":if(L.isString(Y.style.filter)){Y.style.filter="alpha(opacity="+y*100+")";if(!Y[a]||!Y[a].hasLayout){Y.style.zoom=1}}break;case"float":x="styleFloat";default:Y.style[x]=y}}else{}}}else{return function(Y,G){var x=E.Dom._toCamel(G.prop),y=G.val;if(Y){if(x=="float"){x="cssFloat"}Y.style[x]=y}else{}}}}(),getXY:function(G){return E.Dom.batch(G,E.Dom._getXY)},_canPosition:function(G){return(E.Dom._getStyle(G,"display")!=="none"&&E.Dom._inDoc(G))},_getXY:function(){if(K[v][Q]){return function(y){var z,Y,AA,AF,AE,AD,AC,G,x,AB=Math.floor,AG=false;if(E.Dom._canPosition(y)){AA=y[Q]();AF=y[e];z=E.Dom.getDocumentScrollLeft(AF);Y=E.Dom.getDocumentScrollTop(AF);AG=[AB(AA[j]),AB(AA[o])];if(T&&m.ie<8){AE=2;AD=2;AC=AF[t];G=S(AF[v],q);x=S(AF[v],R);if(m.ie===6){if(AC!==c){AE=0;AD=0}}if((AC==c)){if(G!==r){AE=parseInt(G,10)}if(x!==r){AD=parseInt(x,10)}}AG[0]-=AE;AG[1]-=AD}if((Y||z)){AG[0]+=z;AG[1]+=Y}AG[0]=AB(AG[0]);AG[1]=AB(AG[1])}else{}return AG}}else{return function(y){var x,Y,AA,AB,AC,z=false,G=y;if(E.Dom._canPosition(y)){z=[y[b],y[P]];x=E.Dom.getDocumentScrollLeft(y[e]);Y=E.Dom.getDocumentScrollTop(y[e]);AC=((H||m.webkit>519)?true:false);while((G=G[u])){z[0]+=G[b];z[1]+=G[P];if(AC){z=E.Dom._calcBorders(G,z)}}if(E.Dom._getStyle(y,p)!==f){G=y;while((G=G[Z])&&G[C]){AA=G[i];AB=G[O];if(H&&(E.Dom._getStyle(G,"overflow")!=="visible")){z=E.Dom._calcBorders(G,z)}if(AA||AB){z[0]-=AB;z[1]-=AA}}z[0]+=x;z[1]+=Y}else{if(D){z[0]-=x;z[1]-=Y}else{if(I||H){z[0]+=x;z[1]+=Y}}}z[0]=Math.floor(z[0]);z[1]=Math.floor(z[1])}else{}return z}}}(),getX:function(G){var Y=function(x){return E.Dom.getXY(x)[0]};return E.Dom.batch(G,Y,E.Dom,true)},getY:function(G){var Y=function(x){return E.Dom.getXY(x)[1]};return E.Dom.batch(G,Y,E.Dom,true)},setXY:function(G,x,Y){E.Dom.batch(G,E.Dom._setXY,{pos:x,noRetry:Y})},_setXY:function(G,z){var AA=E.Dom._getStyle(G,p),y=E.Dom.setStyle,AD=z.pos,Y=z.noRetry,AB=[parseInt(E.Dom.getComputedStyle(G,j),10),parseInt(E.Dom.getComputedStyle(G,o),10)],AC,x;if(AA=="static"){AA=V;y(G,p,AA)}AC=E.Dom._getXY(G);if(!AD||AC===false){return false}if(isNaN(AB[0])){AB[0]=(AA==V)?0:G[b]}if(isNaN(AB[1])){AB[1]=(AA==V)?0:G[P]}if(AD[0]!==null){y(G,j,AD[0]-AC[0]+AB[0]+"px")}if(AD[1]!==null){y(G,o,AD[1]-AC[1]+AB[1]+"px")}if(!Y){x=E.Dom._getXY(G);if((AD[0]!==null&&x[0]!=AD[0])||(AD[1]!==null&&x[1]!=AD[1])){E.Dom._setXY(G,{pos:AD,noRetry:true})}}},setX:function(Y,G){E.Dom.setXY(Y,[G,null])},setY:function(G,Y){E.Dom.setXY(G,[null,Y])},getRegion:function(G){var Y=function(x){var y=false;if(E.Dom._canPosition(x)){y=E.Region.getRegion(x)}else{}return y};return E.Dom.batch(G,Y,E.Dom,true)},getClientWidth:function(){return E.Dom.getViewportWidth()},getClientHeight:function(){return E.Dom.getViewportHeight()},getElementsByClassName:function(AB,AF,AC,AE,x,AD){AB=L.trim(AB);AF=AF||"*";AC=(AC)?E.Dom.get(AC):null||K;if(!AC){return[]}var Y=[],G=AC.getElementsByTagName(AF),z=E.Dom.hasClass;for(var y=0,AA=G.length;y<AA;++y){if(z(G[y],AB)){Y[Y.length]=G[y]}}if(AE){E.Dom.batch(Y,AE,x,AD)}return Y},hasClass:function(Y,G){return E.Dom.batch(Y,E.Dom._hasClass,G)},_hasClass:function(x,Y){var G=false,y;if(x&&Y){y=E.Dom.getAttribute(x,F)||J;if(Y.exec){G=Y.test(y)}else{G=Y&&(B+y+B).indexOf(B+Y+B)>-1}}else{}return G},addClass:function(Y,G){return E.Dom.batch(Y,E.Dom._addClass,G)},_addClass:function(x,Y){var G=false,y;if(x&&Y){y=E.Dom.getAttribute(x,F)||J;if(!E.Dom._hasClass(x,Y)){E.Dom.setAttribute(x,F,A(y+B+Y));G=true}}else{}return G},removeClass:function(Y,G){return E.Dom.batch(Y,E.Dom._removeClass,G)},_removeClass:function(y,x){var Y=false,AA,z,G;if(y&&x){AA=E.Dom.getAttribute(y,F)||J;E.Dom.setAttribute(y,F,AA.replace(E.Dom._getClassRegex(x),J));z=E.Dom.getAttribute(y,F);if(AA!==z){E.Dom.setAttribute(y,F,A(z));Y=true;if(E.Dom.getAttribute(y,F)===""){G=(y.hasAttribute&&y.hasAttribute(g))?g:F;y.removeAttribute(G)}}}else{}return Y},replaceClass:function(x,Y,G){return E.Dom.batch(x,E.Dom._replaceClass,{from:Y,to:G})},_replaceClass:function(y,x){var Y,AB,AA,G=false,z;if(y&&x){AB=x.from;AA=x.to;if(!AA){G=false}else{if(!AB){G=E.Dom._addClass(y,x.to)}else{if(AB!==AA){z=E.Dom.getAttribute(y,F)||J;Y=(B+z.replace(E.Dom._getClassRegex(AB),B+AA)).split(E.Dom._getClassRegex(AA));Y.splice(1,0,B+AA);E.Dom.setAttribute(y,F,A(Y.join(J)));G=true}}}}else{}return G},generateId:function(G,x){x=x||"yui-gen";var Y=function(y){if(y&&y.id){return y.id}var z=x+YAHOO.env._id_counter++;if(y){if(y[e].getElementById(z)){return E.Dom.generateId(y,z+x)}y.id=z}return z};return E.Dom.batch(G,Y,E.Dom,true)||Y.apply(E.Dom,arguments)},isAncestor:function(Y,x){Y=E.Dom.get(Y);x=E.Dom.get(x);var G=false;if((Y&&x)&&(Y[l]&&x[l])){if(Y.contains&&Y!==x){G=Y.contains(x)}else{if(Y.compareDocumentPosition){G=!!(Y.compareDocumentPosition(x)&16)}}}else{}return G},inDocument:function(G,Y){return E.Dom._inDoc(E.Dom.get(G),Y)},_inDoc:function(Y,x){var G=false;if(Y&&Y[C]){x=x||Y[e];G=E.Dom.isAncestor(x[v],Y)}else{}return G},getElementsBy:function(Y,AF,AB,AD,y,AC,AE){AF=AF||"*";AB=(AB)?E.Dom.get(AB):null||K;if(!AB){return[]}var x=[],G=AB.getElementsByTagName(AF);for(var z=0,AA=G.length;z<AA;++z){if(Y(G[z])){if(AE){x=G[z];break}else{x[x.length]=G[z]}}}if(AD){E.Dom.batch(x,AD,y,AC)}return x},getElementBy:function(x,G,Y){return E.Dom.getElementsBy(x,G,Y,null,null,null,true)},batch:function(x,AB,AA,z){var y=[],Y=(z)?AA:window;x=(x&&(x[C]||x.item))?x:E.Dom.get(x);if(x&&AB){if(x[C]||x.length===undefined){return AB.call(Y,x,AA)}for(var G=0;G<x.length;++G){y[y.length]=AB.call(Y,x[G],AA)}}else{return false}return y},getDocumentHeight:function(){var Y=(K[t]!=M||I)?K.body.scrollHeight:W.scrollHeight,G=Math.max(Y,E.Dom.getViewportHeight());return G},getDocumentWidth:function(){var Y=(K[t]!=M||I)?K.body.scrollWidth:W.scrollWidth,G=Math.max(Y,E.Dom.getViewportWidth());return G},getViewportHeight:function(){var G=self.innerHeight,Y=K[t];if((Y||T)&&!D){G=(Y==M)?W.clientHeight:K.body.clientHeight}return G},getViewportWidth:function(){var G=self.innerWidth,Y=K[t];if(Y||T){G=(Y==M)?W.clientWidth:K.body.clientWidth}return G},getAncestorBy:function(G,Y){while((G=G[Z])){if(E.Dom._testElement(G,Y)){return G}}return null},getAncestorByClassName:function(Y,G){Y=E.Dom.get(Y);if(!Y){return null}var x=function(y){return E.Dom.hasClass(y,G)};return E.Dom.getAncestorBy(Y,x)},getAncestorByTagName:function(Y,G){Y=E.Dom.get(Y);if(!Y){return null}var x=function(y){return y[C]&&y[C].toUpperCase()==G.toUpperCase()};return E.Dom.getAncestorBy(Y,x)},getPreviousSiblingBy:function(G,Y){while(G){G=G.previousSibling;if(E.Dom._testElement(G,Y)){return G}}return null},getPreviousSibling:function(G){G=E.Dom.get(G);if(!G){return null}return E.Dom.getPreviousSiblingBy(G)},getNextSiblingBy:function(G,Y){while(G){G=G.nextSibling;if(E.Dom._testElement(G,Y)){return G}}return null},getNextSibling:function(G){G=E.Dom.get(G);if(!G){return null}return E.Dom.getNextSiblingBy(G)},getFirstChildBy:function(G,x){var Y=(E.Dom._testElement(G.firstChild,x))?G.firstChild:null;return Y||E.Dom.getNextSiblingBy(G.firstChild,x)},getFirstChild:function(G,Y){G=E.Dom.get(G);if(!G){return null}return E.Dom.getFirstChildBy(G)},getLastChildBy:function(G,x){if(!G){return null}var Y=(E.Dom._testElement(G.lastChild,x))?G.lastChild:null;return Y||E.Dom.getPreviousSiblingBy(G.lastChild,x)},getLastChild:function(G){G=E.Dom.get(G);return E.Dom.getLastChildBy(G)},getChildrenBy:function(Y,y){var x=E.Dom.getFirstChildBy(Y,y),G=x?[x]:[];E.Dom.getNextSiblingBy(x,function(z){if(!y||y(z)){G[G.length]=z}return false});return G},getChildren:function(G){G=E.Dom.get(G);if(!G){}return E.Dom.getChildrenBy(G)},getDocumentScrollLeft:function(G){G=G||K;return Math.max(G[v].scrollLeft,G.body.scrollLeft)},getDocumentScrollTop:function(G){G=G||K;return Math.max(G[v].scrollTop,G.body.scrollTop)},insertBefore:function(Y,G){Y=E.Dom.get(Y);G=E.Dom.get(G);if(!Y||!G||!G[Z]){return null}return G[Z].insertBefore(Y,G)},insertAfter:function(Y,G){Y=E.Dom.get(Y);G=E.Dom.get(G);if(!Y||!G||!G[Z]){return null}if(G.nextSibling){return G[Z].insertBefore(Y,G.nextSibling)}else{return G[Z].appendChild(Y)}},getClientRegion:function(){var x=E.Dom.getDocumentScrollTop(),Y=E.Dom.getDocumentScrollLeft(),y=E.Dom.getViewportWidth()+Y,G=E.Dom.getViewportHeight()+x;return new E.Region(x,y,G,Y)},setAttribute:function(Y,G,x){G=E.Dom.CUSTOM_ATTRIBUTES[G]||G;Y.setAttribute(G,x)},getAttribute:function(Y,G){G=E.Dom.CUSTOM_ATTRIBUTES[G]||G;return Y.getAttribute(G)},_toCamel:function(Y){var x=d;function G(y,z){return z.toUpperCase()}return x[Y]||(x[Y]=Y.indexOf("-")===-1?Y:Y.replace(/-([a-z])/gi,G))},_getClassRegex:function(Y){var G;if(Y!==undefined){if(Y.exec){G=Y}else{G=h[Y];if(!G){Y=Y.replace(E.Dom._patterns.CLASS_RE_TOKENS,"\\$1");G=h[Y]=new RegExp(s+Y+k,U)}}}return G},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}])/g},_testElement:function(G,Y){return G&&G[l]==1&&(!Y||Y(G))},_calcBorders:function(x,y){var Y=parseInt(E.Dom[w](x,R),10)||0,G=parseInt(E.Dom[w](x,q),10)||0;if(H){if(N.test(x[C])){Y=0;G=0}}y[0]+=G;y[1]+=Y;return y}};var S=E.Dom[w];if(m.opera){E.Dom[w]=function(Y,G){var x=S(Y,G);if(X.test(G)){x=E.Dom.Color.toRGB(x)}return x}}if(m.webkit){E.Dom[w]=function(Y,G){var x=S(Y,G);if(x==="rgba(0, 0, 0, 0)"){x="transparent"}return x}}})();YAHOO.util.Region=function(C,D,A,B){this.top=C;this.y=C;this[1]=C;this.right=D;this.bottom=A;this.left=B;this.x=B;this[0]=B;this.width=this.right-this.left;this.height=this.bottom-this.top};YAHOO.util.Region.prototype.contains=function(A){return(A.left>=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom)};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left))};YAHOO.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top),D=Math.min(this.right,E.right),A=Math.min(this.bottom,E.bottom),B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new YAHOO.util.Region(C,D,A,B)}else{return null}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top),D=Math.max(this.right,E.right),A=Math.max(this.bottom,E.bottom),B=Math.min(this.left,E.left);return new YAHOO.util.Region(C,D,A,B)};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}")};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D),C=F[1],E=F[0]+D.offsetWidth,A=F[1]+D.offsetHeight,B=F[0];return new YAHOO.util.Region(C,E,A,B)};YAHOO.util.Point=function(A,B){if(YAHOO.lang.isArray(A)){B=A[1];A=A[0]}YAHOO.util.Point.superclass.constructor.call(this,B,A,B,A)};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var B=YAHOO.util,A="clientTop",F="clientLeft",J="parentNode",K="right",W="hasLayout",I="px",U="opacity",L="auto",D="borderLeftWidth",G="borderTopWidth",P="borderRightWidth",V="borderBottomWidth",S="visible",Q="transparent",N="height",E="width",H="style",T="currentStyle",R=/^width|height$/,O=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,M={get:function(X,Z){var Y="",a=X[T][Z];if(Z===U){Y=B.Dom.getStyle(X,U)}else{if(!a||(a.indexOf&&a.indexOf(I)>-1)){Y=a}else{if(B.Dom.IE_COMPUTED[Z]){Y=B.Dom.IE_COMPUTED[Z](X,Z)}else{if(O.test(a)){Y=B.Dom.IE.ComputedStyle.getPixel(X,Z)}else{Y=a}}}}return Y},getOffset:function(Z,e){var b=Z[T][e],X=e.charAt(0).toUpperCase()+e.substr(1),c="offset"+X,Y="pixel"+X,a="",d;if(b==L){d=Z[c];if(d===undefined){a=0}a=d;if(R.test(e)){Z[H][e]=d;if(Z[c]>d){a=d-(Z[c]-d)}Z[H][e]=L}}else{if(!Z[H][Y]&&!Z[H][e]){Z[H][e]=b}a=Z[H][Y]}return a+I},getBorderWidth:function(X,Z){var Y=null;if(!X[T][W]){X[H].zoom=1}switch(Z){case G:Y=X[A];break;case V:Y=X.offsetHeight-X.clientHeight-X[A];break;case D:Y=X[F];break;case P:Y=X.offsetWidth-X.clientWidth-X[F];break}return Y+I},getPixel:function(Y,X){var a=null,b=Y[T][K],Z=Y[T][X];Y[H][K]=Z;a=Y[H].pixelRight;Y[H][K]=b;return a+I},getMargin:function(Y,X){var Z;if(Y[T][X]==L){Z=0+I}else{Z=B.Dom.IE.ComputedStyle.getPixel(Y,X)}return Z},getVisibility:function(Y,X){var Z;while((Z=Y[T])&&Z[X]=="inherit"){Y=Y[J]}return(Z)?Z[X]:S},getColor:function(Y,X){return B.Dom.Color.toRGB(Y[T][X])||Q},getBorderColor:function(Y,X){var Z=Y[T],a=Z[X]||Z.color;return B.Dom.Color.toRGB(B.Dom.Color.toHex(a))}},C={};C.top=C.right=C.bottom=C.left=C[E]=C[N]=M.getOffset;C.color=M.getColor;C[G]=C[P]=C[V]=C[D]=M.getBorderWidth;C.marginTop=C.marginRight=C.marginBottom=C.marginLeft=M.getMargin;C.visibility=M.getVisibility;C.borderColor=C.borderTopColor=C.borderRightColor=C.borderBottomColor=C.borderLeftColor=M.getBorderColor;B.Dom.IE_COMPUTED=C;B.Dom.IE_ComputedStyle=M})();(function(){var C="toString",A=parseInt,B=RegExp,D=YAHOO.util;D.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(E){if(!D.Dom.Color.re_RGB.test(E)){E=D.Dom.Color.toHex(E)}if(D.Dom.Color.re_hex.exec(E)){E="rgb("+[A(B.$1,16),A(B.$2,16),A(B.$3,16)].join(", ")+")"}return E},toHex:function(H){H=D.Dom.Color.KEYWORDS[H]||H;if(D.Dom.Color.re_RGB.exec(H)){var G=(B.$1.length===1)?"0"+B.$1:Number(B.$1),F=(B.$2.length===1)?"0"+B.$2:Number(B.$2),E=(B.$3.length===1)?"0"+B.$3:Number(B.$3);H=[G[C](16),F[C](16),E[C](16)].join("")}if(H.length<6){H=H.replace(D.Dom.Color.re_hex3,"$1$1")}if(H!=="transparent"&&H.indexOf("#")<0){H="#"+H}return H.toLowerCase()}}}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.7.0",build:"1799"});YAHOO.util.CustomEvent=function(D,C,B,A){this.type=D;this.scope=C||window;this.silent=B;this.signature=A||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var E="_YUICEOnSubscribe";if(D!==E){this.subscribeEvent=new YAHOO.util.CustomEvent(E,this,true)}this.lastError=null};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(A,B,C){if(!A){throw new Error("Invalid callback for subscriber to '"+this.type+"'")}if(this.subscribeEvent){this.subscribeEvent.fire(A,B,C)}this.subscribers.push(new YAHOO.util.Subscriber(A,B,C))},unsubscribe:function(D,F){if(!D){return this.unsubscribeAll()}var E=false;for(var B=0,A=this.subscribers.length;B<A;++B){var C=this.subscribers[B];if(C&&C.contains(D,F)){this._delete(B);E=true}}return E},fire:function(){this.lastError=null;var K=[],E=this.subscribers.length;if(!E&&this.silent){return true}var I=[].slice.call(arguments,0),G=true,D,J=false;if(!this.silent){}var C=this.subscribers.slice(),A=YAHOO.util.Event.throwErrors;for(D=0;D<E;++D){var M=C[D];if(!M){J=true}else{if(!this.silent){}var L=M.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var B=null;if(I.length>0){B=I[0]}try{G=M.fn.call(L,B,M.obj)}catch(F){this.lastError=F;if(A){throw F}}}else{try{G=M.fn.call(L,this.type,I,M.obj)}catch(H){this.lastError=H;if(A){throw H}}}if(false===G){if(!this.silent){}break}}}return(G!==false)},unsubscribeAll:function(){var A=this.subscribers.length,B;for(B=A-1;B>-1;B--){this._delete(B)}this.subscribers=[];return A},_delete:function(A){var B=this.subscribers[A];if(B){delete B.fn;delete B.obj}this.subscribers.splice(A,1)},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope}};YAHOO.util.Subscriber=function(A,B,C){this.fn=A;this.obj=YAHOO.lang.isUndefined(B)?null:B;this.overrideContext=C};YAHOO.util.Subscriber.prototype.getScope=function(A){if(this.overrideContext){if(this.overrideContext===true){return this.obj}else{return this.overrideContext}}return A};YAHOO.util.Subscriber.prototype.contains=function(A,B){if(B){return(this.fn==A&&this.obj==B)}else{return(this.fn==A)}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }"};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var H=false;var I=[];var J=[];var G=[];var E=[];var C=0;var F=[];var B=[];var A=0;var D={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9};var K=YAHOO.env.ua.ie?"focusin":"focus";var L=YAHOO.env.ua.ie?"focusout":"blur";return{POLL_RETRYS:2000,POLL_INTERVAL:20,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,_dri:null,DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){var M=this;var N=function(){M._tryPreloadAttach()};this._interval=setInterval(N,this.POLL_INTERVAL)}},onAvailable:function(S,O,Q,R,P){var M=(YAHOO.lang.isString(S))?[S]:S;for(var N=0;N<M.length;N=N+1){F.push({id:M[N],fn:O,obj:Q,overrideContext:R,checkReady:P})}C=this.POLL_RETRYS;this.startInterval()},onContentReady:function(P,M,N,O){this.onAvailable(P,M,N,O,true)},onDOMReady:function(M,N,O){if(this.DOMReady){setTimeout(function(){var P=window;if(O){if(O===true){P=N}else{P=O}}M.call(P,"DOMReady",[],N)},0)}else{this.DOMReadyEvent.subscribe(M,N,O)}},_addListener:function(O,M,Y,S,W,b){if(!Y||!Y.call){return false}if(this._isValidCollection(O)){var Z=true;for(var T=0,V=O.length;T<V;++T){Z=this.on(O[T],M,Y,S,W)&&Z}return Z}else{if(YAHOO.lang.isString(O)){var R=this.getEl(O);if(R){O=R}else{this.onAvailable(O,function(){YAHOO.util.Event.on(O,M,Y,S,W)});return true}}}if(!O){return false}if("unload"==M&&S!==this){J[J.length]=[O,M,Y,S,W];return true}var N=O;if(W){if(W===true){N=S}else{N=W}}var P=function(c){return Y.call(N,YAHOO.util.Event.getEvent(c,O),S)};var a=[O,M,Y,P,N,S,W];var U=I.length;I[U]=a;if(this.useLegacyEvent(O,M)){var Q=this.getLegacyIndex(O,M);if(Q==-1||O!=G[Q][0]){Q=G.length;B[O.id+M]=Q;G[Q]=[O,M,O["on"+M]];E[Q]=[];O["on"+M]=function(c){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(c),Q)}}E[Q].push(a)}else{try{this._simpleAdd(O,M,P,b)}catch(X){this.lastError=X;this.removeListener(O,M,Y);return false}}return true},addListener:function(N,Q,M,O,P){return this._addListener(N,Q,M,O,P,false)},addFocusListener:function(N,M,O,P){return this._addListener(N,K,M,O,P,true)},removeFocusListener:function(N,M){return this.removeListener(N,K,M)},addBlurListener:function(N,M,O,P){return this._addListener(N,L,M,O,P,true)},removeBlurListener:function(N,M){return this.removeListener(N,L,M)},fireLegacyEvent:function(R,P){var T=true,M,V,U,N,S;V=E[P].slice();for(var O=0,Q=V.length;O<Q;++O){U=V[O];if(U&&U[this.WFN]){N=U[this.ADJ_SCOPE];S=U[this.WFN].call(N,R);T=(T&&S)}}M=G[P];if(M&&M[2]){M[2](R)}return T},getLegacyIndex:function(N,O){var M=this.generateId(N)+O;if(typeof B[M]=="undefined"){return-1}else{return B[M]}},useLegacyEvent:function(M,N){return(this.webkit&&this.webkit<419&&("click"==N||"dblclick"==N))},removeListener:function(N,M,V){var Q,T,X;if(typeof N=="string"){N=this.getEl(N)}else{if(this._isValidCollection(N)){var W=true;for(Q=N.length-1;Q>-1;Q--){W=(this.removeListener(N[Q],M,V)&&W)}return W}}if(!V||!V.call){return this.purgeElement(N,false,M)}if("unload"==M){for(Q=J.length-1;Q>-1;Q--){X=J[Q];if(X&&X[0]==N&&X[1]==M&&X[2]==V){J.splice(Q,1);return true}}return false}var R=null;var S=arguments[3];if("undefined"===typeof S){S=this._getCacheIndex(N,M,V)}if(S>=0){R=I[S]}if(!N||!R){return false}if(this.useLegacyEvent(N,M)){var P=this.getLegacyIndex(N,M);var O=E[P];if(O){for(Q=0,T=O.length;Q<T;++Q){X=O[Q];if(X&&X[this.EL]==N&&X[this.TYPE]==M&&X[this.FN]==V){O.splice(Q,1);break}}}}else{try{this._simpleRemove(N,M,R[this.WFN],false)}catch(U){this.lastError=U;return false}}delete I[S][this.WFN];delete I[S][this.FN];I.splice(S,1);return true},getTarget:function(O,N){var M=O.target||O.srcElement;return this.resolveTextNode(M)},resolveTextNode:function(N){try{if(N&&3==N.nodeType){return N.parentNode}}catch(M){}return N},getPageX:function(N){var M=N.pageX;if(!M&&0!==M){M=N.clientX||0;if(this.isIE){M+=this._getScrollLeft()}}return M},getPageY:function(M){var N=M.pageY;if(!N&&0!==N){N=M.clientY||0;if(this.isIE){N+=this._getScrollTop()}}return N},getXY:function(M){return[this.getPageX(M),this.getPageY(M)]},getRelatedTarget:function(N){var M=N.relatedTarget;if(!M){if(N.type=="mouseout"){M=N.toElement}else{if(N.type=="mouseover"){M=N.fromElement}}}return this.resolveTextNode(M)},getTime:function(O){if(!O.time){var N=new Date().getTime();try{O.time=N}catch(M){this.lastError=M;return N}}return O.time},stopEvent:function(M){this.stopPropagation(M);this.preventDefault(M)},stopPropagation:function(M){if(M.stopPropagation){M.stopPropagation()}else{M.cancelBubble=true}},preventDefault:function(M){if(M.preventDefault){M.preventDefault()}else{M.returnValue=false}},getEvent:function(O,M){var N=O||window.event;if(!N){var P=this.getEvent.caller;while(P){N=P.arguments[0];if(N&&Event==N.constructor){break}P=P.caller}}return N},getCharCode:function(N){var M=N.keyCode||N.charCode||0;if(YAHOO.env.ua.webkit&&(M in D)){M=D[M]}return M},_getCacheIndex:function(Q,R,P){for(var O=0,N=I.length;O<N;O=O+1){var M=I[O];if(M&&M[this.FN]==P&&M[this.EL]==Q&&M[this.TYPE]==R){return O}}return-1},generateId:function(M){var N=M.id;if(!N){N="yuievtautoid-"+A;++A;M.id=N}return N},_isValidCollection:function(N){try{return(N&&typeof N!=="string"&&N.length&&!N.tagName&&!N.alert&&typeof N[0]!=="undefined")}catch(M){return false}},elCache:{},getEl:function(M){return(typeof M==="string")?document.getElementById(M):M},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(N){if(!H){H=true;var M=YAHOO.util.Event;M._ready();M._tryPreloadAttach()}},_ready:function(N){var M=YAHOO.util.Event;if(!M.DOMReady){M.DOMReady=true;M.DOMReadyEvent.fire();M._simpleRemove(document,"DOMContentLoaded",M._ready)}},_tryPreloadAttach:function(){if(F.length===0){C=0;if(this._interval){clearInterval(this._interval);this._interval=null}return}if(this.locked){return}if(this.isIE){if(!this.DOMReady){this.startInterval();return}}this.locked=true;var S=!H;if(!S){S=(C>0&&F.length>0)}var R=[];var T=function(V,W){var U=V;if(W.overrideContext){if(W.overrideContext===true){U=W.obj}else{U=W.overrideContext}}W.fn.call(U,W.obj)};var N,M,Q,P,O=[];for(N=0,M=F.length;N<M;N=N+1){Q=F[N];if(Q){P=this.getEl(Q.id);if(P){if(Q.checkReady){if(H||P.nextSibling||!S){O.push(Q);F[N]=null}}else{T(P,Q);F[N]=null}}else{R.push(Q)}}}for(N=0,M=O.length;N<M;N=N+1){Q=O[N];T(this.getEl(Q.id),Q)}C--;if(S){for(N=F.length-1;N>-1;N--){Q=F[N];if(!Q||!Q.id){F.splice(N,1)}}this.startInterval()}else{if(this._interval){clearInterval(this._interval);this._interval=null}}this.locked=false},purgeElement:function(Q,R,T){var O=(YAHOO.lang.isString(Q))?this.getEl(Q):Q;var S=this.getListeners(O,T),P,M;if(S){for(P=S.length-1;P>-1;P--){var N=S[P];this.removeListener(O,N.type,N.fn)}}if(R&&O&&O.childNodes){for(P=0,M=O.childNodes.length;P<M;++P){this.purgeElement(O.childNodes[P],R,T)}}},getListeners:function(O,M){var R=[],N;if(!M){N=[I,J]}else{if(M==="unload"){N=[J]}else{N=[I]}}var T=(YAHOO.lang.isString(O))?this.getEl(O):O;for(var Q=0;Q<N.length;Q=Q+1){var V=N[Q];if(V){for(var S=0,U=V.length;S<U;++S){var P=V[S];if(P&&P[this.EL]===T&&(!M||M===P[this.TYPE])){R.push({type:P[this.TYPE],fn:P[this.FN],obj:P[this.OBJ],adjust:P[this.OVERRIDE],scope:P[this.ADJ_SCOPE],index:S})}}}}return(R.length)?R:null},_unload:function(T){var N=YAHOO.util.Event,Q,P,O,S,R,U=J.slice(),M;for(Q=0,S=J.length;Q<S;++Q){O=U[Q];if(O){M=window;if(O[N.ADJ_SCOPE]){if(O[N.ADJ_SCOPE]===true){M=O[N.UNLOAD_OBJ]}else{M=O[N.ADJ_SCOPE]}}O[N.FN].call(M,N.getEvent(T,O[N.EL]),O[N.UNLOAD_OBJ]);U[Q]=null}}O=null;M=null;J=null;if(I){for(P=I.length-1;P>-1;P--){O=I[P];if(O){N.removeListener(O[N.EL],O[N.TYPE],O[N.FN],P)}}O=null}G=null;N._simpleRemove(window,"unload",N._unload)},_getScrollLeft:function(){return this._getScroll()[1]},_getScrollTop:function(){return this._getScroll()[0]},_getScroll:function(){var M=document.documentElement,N=document.body;if(M&&(M.scrollTop||M.scrollLeft)){return[M.scrollTop,M.scrollLeft]}else{if(N){return[N.scrollTop,N.scrollLeft]}else{return[0,0]}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(O,P,N,M){O.addEventListener(P,N,(M))}}else{if(window.attachEvent){return function(O,P,N,M){O.attachEvent("on"+P,N)}}else{return function(){}}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(O,P,N,M){O.removeEventListener(P,N,(M))}}else{if(window.detachEvent){return function(N,O,M){N.detachEvent("on"+O,M)}}else{return function(){}}}}()}}();(function(){var EU=YAHOO.util.Event;EU.on=EU.addListener;EU.onFocus=EU.addFocusListener;EU.onBlur=EU.addBlurListener;if(EU.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var n=document.createElement("p");EU._dri=setInterval(function(){try{n.doScroll("left");clearInterval(EU._dri);EU._dri=null;EU._ready();n=null}catch(ex){}},EU.POLL_INTERVAL)}else{if(EU.webkit&&EU.webkit<525){EU._dri=setInterval(function(){var rs=document.readyState;if("loaded"==rs||"complete"==rs){clearInterval(EU._dri);EU._dri=null;EU._ready()}},EU.POLL_INTERVAL)}else{EU._simpleAdd(document,"DOMContentLoaded",EU._ready)}}EU._simpleAdd(window,"load",EU._load);EU._simpleAdd(window,"unload",EU._unload);EU._tryPreloadAttach()})()}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(A,C,F,E){this.__yui_events=this.__yui_events||{};var D=this.__yui_events[A];if(D){D.subscribe(C,F,E)}else{this.__yui_subscribers=this.__yui_subscribers||{};var B=this.__yui_subscribers;if(!B[A]){B[A]=[]}B[A].push({fn:C,obj:F,overrideContext:E})}},unsubscribe:function(C,E,G){this.__yui_events=this.__yui_events||{};var A=this.__yui_events;if(C){var F=A[C];if(F){return F.unsubscribe(E,G)}}else{var B=true;for(var D in A){if(YAHOO.lang.hasOwnProperty(A,D)){B=B&&A[D].unsubscribe(E,G)}}return B}return false},unsubscribeAll:function(A){return this.unsubscribe(A)},createEvent:function(G,D){this.__yui_events=this.__yui_events||{};var A=D||{};var I=this.__yui_events;if(I[G]){}else{var H=A.scope||this;var E=(A.silent);var B=new YAHOO.util.CustomEvent(G,H,E,YAHOO.util.CustomEvent.FLAT);I[G]=B;if(A.onSubscribeCallback){B.subscribeEvent.subscribe(A.onSubscribeCallback)}this.__yui_subscribers=this.__yui_subscribers||{};var F=this.__yui_subscribers[G];if(F){for(var C=0;C<F.length;++C){B.subscribe(F[C].fn,F[C].obj,F[C].overrideContext)}}}return I[G]},fireEvent:function(E,D,A,C){this.__yui_events=this.__yui_events||{};var G=this.__yui_events[E];if(!G){return null}var B=[];for(var F=1;F<arguments.length;++F){B.push(arguments[F])}return G.fire.apply(G,B)},hasEvent:function(A){if(this.__yui_events){if(this.__yui_events[A]){return true}}return false}};(function(){var A=YAHOO.util.Event,C=YAHOO.lang;YAHOO.util.KeyListener=function(D,I,E,F){if(!D){}else{if(!I){}else{if(!E){}}}if(!F){F=YAHOO.util.KeyListener.KEYDOWN}var G=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(C.isString(D)){D=document.getElementById(D)}if(C.isFunction(E)){G.subscribe(E)}else{G.subscribe(E.fn,E.scope,E.correctScope)}function H(O,N){if(!I.shift){I.shift=false}if(!I.alt){I.alt=false}if(!I.ctrl){I.ctrl=false}if(O.shiftKey==I.shift&&O.altKey==I.alt&&O.ctrlKey==I.ctrl){var J,M=I.keys,L;if(YAHOO.lang.isArray(M)){for(var K=0;K<M.length;K++){J=M[K];L=A.getCharCode(O);if(J==L){G.fire(L,O);break}}}else{L=A.getCharCode(O);if(M==L){G.fire(L,O)}}}}this.enable=function(){if(!this.enabled){A.on(D,F,H);this.enabledEvent.fire(I)}this.enabled=true};this.disable=function(){if(this.enabled){A.removeListener(D,F,H);this.disabledEvent.fire(I)}this.enabled=false};this.toString=function(){return"KeyListener ["+I.keys+"] "+D.tagName+(D.id?"["+D.id+"]":"")}};var B=YAHOO.util.KeyListener;B.KEYDOWN="keydown";B.KEYUP="keyup";B.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38}})();YAHOO.register("event",YAHOO.util.Event,{version:"2.7.0",build:"1799"});YAHOO.util.Connect={_msxml_progid:["Microsoft.XMLHTTP","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP"],_http_headers:{},_has_http_headers:false,_use_default_post_header:true,_default_post_header:"application/x-www-form-urlencoded; charset=UTF-8",_default_form_header:"application/x-www-form-urlencoded",_use_default_xhr_header:true,_default_xhr_header:"XMLHttpRequest",_has_default_headers:true,_default_headers:{},_isFormSubmit:false,_isFileUpload:false,_formNode:null,_sFormData:null,_poll:{},_timeOut:{},_polling_interval:50,_transaction_id:0,_submitElementValue:null,_hasSubmitListener:(function(){if(YAHOO.util.Event){YAHOO.util.Event.addListener(document,"click",function(C){var B=YAHOO.util.Event.getTarget(C),A=B.nodeName.toLowerCase();if((A==="input"||A==="button")&&(B.type&&B.type.toLowerCase()=="submit")){YAHOO.util.Connect._submitElementValue=encodeURIComponent(B.name)+"="+encodeURIComponent(B.value)}});return true}return false})(),startEvent:new YAHOO.util.CustomEvent("start"),completeEvent:new YAHOO.util.CustomEvent("complete"),successEvent:new YAHOO.util.CustomEvent("success"),failureEvent:new YAHOO.util.CustomEvent("failure"),uploadEvent:new YAHOO.util.CustomEvent("upload"),abortEvent:new YAHOO.util.CustomEvent("abort"),_customEvents:{onStart:["startEvent","start"],onComplete:["completeEvent","complete"],onSuccess:["successEvent","success"],onFailure:["failureEvent","failure"],onUpload:["uploadEvent","upload"],onAbort:["abortEvent","abort"]},setProgId:function(A){this._msxml_progid.unshift(A)},setDefaultPostHeader:function(A){if(typeof A=="string"){this._default_post_header=A}else{if(typeof A=="boolean"){this._use_default_post_header=A}}},setDefaultXhrHeader:function(A){if(typeof A=="string"){this._default_xhr_header=A}else{this._use_default_xhr_header=A}},setPollingInterval:function(A){if(typeof A=="number"&&isFinite(A)){this._polling_interval=A}},createXhrObject:function(F){var E,A;try{A=new XMLHttpRequest();E={conn:A,tId:F}}catch(D){for(var B=0;B<this._msxml_progid.length;++B){try{A=new ActiveXObject(this._msxml_progid[B]);E={conn:A,tId:F};break}catch(C){}}}finally{return E}},getConnectionObject:function(A){var C;var D=this._transaction_id;try{if(!A){C=this.createXhrObject(D)}else{C={};C.tId=D;C.isUpload=true}if(C){this._transaction_id++}}catch(B){}finally{return C}},asyncRequest:function(F,C,E,A){var D=(this._isFileUpload)?this.getConnectionObject(true):this.getConnectionObject();var B=(E&&E.argument)?E.argument:null;if(!D){return null}else{if(E&&E.customevents){this.initCustomEvents(D,E)}if(this._isFormSubmit){if(this._isFileUpload){this.uploadFile(D,E,C,A);return D}if(F.toUpperCase()=="GET"){if(this._sFormData.length!==0){C+=((C.indexOf("?")==-1)?"?":"&")+this._sFormData}}else{if(F.toUpperCase()=="POST"){A=A?this._sFormData+"&"+A:this._sFormData}}}if(F.toUpperCase()=="GET"&&(E&&E.cache===false)){C+=((C.indexOf("?")==-1)?"?":"&")+"rnd="+new Date().valueOf().toString()}D.conn.open(F,C,true);if(this._use_default_xhr_header){if(!this._default_headers["X-Requested-With"]){this.initHeader("X-Requested-With",this._default_xhr_header,true)}}if((F.toUpperCase()==="POST"&&this._use_default_post_header)&&this._isFormSubmit===false){this.initHeader("Content-Type",this._default_post_header)}if(this._has_default_headers||this._has_http_headers){this.setHeader(D)}this.handleReadyState(D,E);D.conn.send(A||"");if(this._isFormSubmit===true){this.resetFormState()}this.startEvent.fire(D,B);if(D.startEvent){D.startEvent.fire(D,B)}return D}},initCustomEvents:function(A,C){var B;for(B in C.customevents){if(this._customEvents[B][0]){A[this._customEvents[B][0]]=new YAHOO.util.CustomEvent(this._customEvents[B][1],(C.scope)?C.scope:null);A[this._customEvents[B][0]].subscribe(C.customevents[B])}}},handleReadyState:function(C,D){var B=this;var A=(D&&D.argument)?D.argument:null;if(D&&D.timeout){this._timeOut[C.tId]=window.setTimeout(function(){B.abort(C,D,true)},D.timeout)}this._poll[C.tId]=window.setInterval(function(){if(C.conn&&C.conn.readyState===4){window.clearInterval(B._poll[C.tId]);delete B._poll[C.tId];if(D&&D.timeout){window.clearTimeout(B._timeOut[C.tId]);delete B._timeOut[C.tId]}B.completeEvent.fire(C,A);if(C.completeEvent){C.completeEvent.fire(C,A)}B.handleTransactionResponse(C,D)}},this._polling_interval)},handleTransactionResponse:function(F,G,A){var D,C;var B=(G&&G.argument)?G.argument:null;try{if(F.conn.status!==undefined&&F.conn.status!==0){D=F.conn.status}else{D=13030}}catch(E){D=13030}if(D>=200&&D<300||D===1223){C=this.createResponseObject(F,B);if(G&&G.success){if(!G.scope){G.success(C)}else{G.success.apply(G.scope,[C])}}this.successEvent.fire(C);if(F.successEvent){F.successEvent.fire(C)}}else{switch(D){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:C=this.createExceptionObject(F.tId,B,(A?A:false));if(G&&G.failure){if(!G.scope){G.failure(C)}else{G.failure.apply(G.scope,[C])}}break;default:C=this.createResponseObject(F,B);if(G&&G.failure){if(!G.scope){G.failure(C)}else{G.failure.apply(G.scope,[C])}}}this.failureEvent.fire(C);if(F.failureEvent){F.failureEvent.fire(C)}}this.releaseObject(F);C=null},createResponseObject:function(A,G){var D={};var I={};try{var C=A.conn.getAllResponseHeaders();var F=C.split("\n");for(var E=0;E<F.length;E++){var B=F[E].indexOf(":");if(B!=-1){I[F[E].substring(0,B)]=F[E].substring(B+2)}}}catch(H){}D.tId=A.tId;D.status=(A.conn.status==1223)?204:A.conn.status;D.statusText=(A.conn.status==1223)?"No Content":A.conn.statusText;D.getResponseHeader=I;D.getAllResponseHeaders=C;D.responseText=A.conn.responseText;D.responseXML=A.conn.responseXML;if(G){D.argument=G}return D},createExceptionObject:function(H,D,A){var F=0;var G="communication failure";var C=-1;var B="transaction aborted";var E={};E.tId=H;if(A){E.status=C;E.statusText=B}else{E.status=F;E.statusText=G}if(D){E.argument=D}return E},initHeader:function(A,D,C){var B=(C)?this._default_headers:this._http_headers;B[A]=D;if(C){this._has_default_headers=true}else{this._has_http_headers=true}},setHeader:function(A){var B;if(this._has_default_headers){for(B in this._default_headers){if(YAHOO.lang.hasOwnProperty(this._default_headers,B)){A.conn.setRequestHeader(B,this._default_headers[B])}}}if(this._has_http_headers){for(B in this._http_headers){if(YAHOO.lang.hasOwnProperty(this._http_headers,B)){A.conn.setRequestHeader(B,this._http_headers[B])}}delete this._http_headers;this._http_headers={};this._has_http_headers=false}},resetDefaultHeaders:function(){delete this._default_headers;this._default_headers={};this._has_default_headers=false},setForm:function(M,H,C){var L,B,K,I,P,J=false,F=[],O=0,E,G,D,N,A;this.resetFormState();if(typeof M=="string"){L=(document.getElementById(M)||document.forms[M])}else{if(typeof M=="object"){L=M}else{return}}if(H){this.createFrame(C?C:null);this._isFormSubmit=true;this._isFileUpload=true;this._formNode=L;return}for(E=0,G=L.elements.length;E<G;++E){B=L.elements[E];P=B.disabled;K=B.name;if(!P&&K){K=encodeURIComponent(K)+"=";I=encodeURIComponent(B.value);switch(B.type){case"select-one":if(B.selectedIndex>-1){A=B.options[B.selectedIndex];F[O++]=K+encodeURIComponent((A.attributes.value&&A.attributes.value.specified)?A.value:A.text)}break;case"select-multiple":if(B.selectedIndex>-1){for(D=B.selectedIndex,N=B.options.length;D<N;++D){A=B.options[D];if(A.selected){F[O++]=K+encodeURIComponent((A.attributes.value&&A.attributes.value.specified)?A.value:A.text)}}}break;case"radio":case"checkbox":if(B.checked){F[O++]=K+I}break;case"file":case undefined:case"reset":case"button":break;case"submit":if(J===false){if(this._hasSubmitListener&&this._submitElementValue){F[O++]=this._submitElementValue}J=true}break;default:F[O++]=K+I}}}this._isFormSubmit=true;this._sFormData=F.join("&");this.initHeader("Content-Type",this._default_form_header);return this._sFormData},resetFormState:function(){this._isFormSubmit=false;this._isFileUpload=false;this._formNode=null;this._sFormData=""},createFrame:function(A){var B="yuiIO"+this._transaction_id;var C;if(YAHOO.env.ua.ie){C=document.createElement('<iframe id="'+B+'" name="'+B+'" />');if(typeof A=="boolean"){C.src="javascript:false"}}else{C=document.createElement("iframe");C.id=B;C.name=B}C.style.position="absolute";C.style.top="-1000px";C.style.left="-1000px";document.body.appendChild(C)},appendPostData:function(A){var D=[],B=A.split("&"),C,E;for(C=0;C<B.length;C++){E=B[C].indexOf("=");if(E!=-1){D[C]=document.createElement("input");D[C].type="hidden";D[C].name=decodeURIComponent(B[C].substring(0,E));D[C].value=decodeURIComponent(B[C].substring(E+1));this._formNode.appendChild(D[C])}}return D},uploadFile:function(D,N,E,C){var I="yuiIO"+D.tId,J="multipart/form-data",L=document.getElementById(I),O=this,K=(N&&N.argument)?N.argument:null,M,H,B,G;var A={action:this._formNode.getAttribute("action"),method:this._formNode.getAttribute("method"),target:this._formNode.getAttribute("target")};this._formNode.setAttribute("action",E);this._formNode.setAttribute("method","POST");this._formNode.setAttribute("target",I);if(YAHOO.env.ua.ie){this._formNode.setAttribute("encoding",J)}else{this._formNode.setAttribute("enctype",J)}if(C){M=this.appendPostData(C)}this._formNode.submit();this.startEvent.fire(D,K);if(D.startEvent){D.startEvent.fire(D,K)}if(N&&N.timeout){this._timeOut[D.tId]=window.setTimeout(function(){O.abort(D,N,true)},N.timeout)}if(M&&M.length>0){for(H=0;H<M.length;H++){this._formNode.removeChild(M[H])}}for(B in A){if(YAHOO.lang.hasOwnProperty(A,B)){if(A[B]){this._formNode.setAttribute(B,A[B])}else{this._formNode.removeAttribute(B)}}}this.resetFormState();var F=function(){if(N&&N.timeout){window.clearTimeout(O._timeOut[D.tId]);delete O._timeOut[D.tId]}O.completeEvent.fire(D,K);if(D.completeEvent){D.completeEvent.fire(D,K)}G={tId:D.tId,argument:N.argument};try{G.responseText=L.contentWindow.document.body?L.contentWindow.document.body.innerHTML:L.contentWindow.document.documentElement.textContent;G.responseXML=L.contentWindow.document.XMLDocument?L.contentWindow.document.XMLDocument:L.contentWindow.document}catch(P){}if(N&&N.upload){if(!N.scope){N.upload(G)}else{N.upload.apply(N.scope,[G])}}O.uploadEvent.fire(G);if(D.uploadEvent){D.uploadEvent.fire(G)}YAHOO.util.Event.removeListener(L,"load",F);setTimeout(function(){document.body.removeChild(L);O.releaseObject(D)},100)};YAHOO.util.Event.addListener(L,"load",F)},abort:function(E,G,A){var D;var B=(G&&G.argument)?G.argument:null;if(E&&E.conn){if(this.isCallInProgress(E)){E.conn.abort();window.clearInterval(this._poll[E.tId]);delete this._poll[E.tId];if(A){window.clearTimeout(this._timeOut[E.tId]);delete this._timeOut[E.tId]}D=true}}else{if(E&&E.isUpload===true){var C="yuiIO"+E.tId;var F=document.getElementById(C);if(F){YAHOO.util.Event.removeListener(F,"load");document.body.removeChild(F);if(A){window.clearTimeout(this._timeOut[E.tId]);delete this._timeOut[E.tId]}D=true}}else{D=false}}if(D===true){this.abortEvent.fire(E,B);if(E.abortEvent){E.abortEvent.fire(E,B)}this.handleTransactionResponse(E,G,true)}return D},isCallInProgress:function(B){if(B&&B.conn){return B.conn.readyState!==4&&B.conn.readyState!==0}else{if(B&&B.isUpload===true){var A="yuiIO"+B.tId;return document.getElementById(A)?true:false}else{return false}}},releaseObject:function(A){if(A&&A.conn){A.conn=null;A=null}}};YAHOO.register("connection",YAHOO.util.Connect,{version:"2.7.0",build:"1799"});(function(){var B=YAHOO.util;var A=function(D,C,E,F){if(!D){}this.init(D,C,E,F)};A.NAME="Anim";A.prototype={toString:function(){var C=this.getEl()||{};var D=C.id||C.tagName;return(this.constructor.NAME+": "+D)},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(C,E,D){return this.method(this.currentFrame,E,D-E,this.totalFrames)},setAttribute:function(C,F,E){var D=this.getEl();if(this.patterns.noNegatives.test(C)){F=(F>0)?F:0}if("style"in D){B.Dom.setStyle(D,C,F+E)}else{if(C in D){D[C]=F}}},getAttribute:function(C){var E=this.getEl();var G=B.Dom.getStyle(E,C);if(G!=="auto"&&!this.patterns.offsetUnit.test(G)){return parseFloat(G)}var D=this.patterns.offsetAttribute.exec(C)||[];var H=!!(D[3]);var F=!!(D[2]);if("style"in E){if(F||(B.Dom.getStyle(E,"position")=="absolute"&&H)){G=E["offset"+D[0].charAt(0).toUpperCase()+D[0].substr(1)]}else{G=0}}else{if(C in E){G=E[C]}}return G},getDefaultUnit:function(C){if(this.patterns.defaultUnit.test(C)){return"px"}return""},setRuntimeAttribute:function(D){var I;var E;var F=this.attributes;this.runtimeAttributes[D]={};var H=function(J){return(typeof J!=="undefined")};if(!H(F[D]["to"])&&!H(F[D]["by"])){return false}I=(H(F[D]["from"]))?F[D]["from"]:this.getAttribute(D);if(H(F[D]["to"])){E=F[D]["to"]}else{if(H(F[D]["by"])){if(I.constructor==Array){E=[];for(var G=0,C=I.length;G<C;++G){E[G]=I[G]+F[D]["by"][G]*1}}else{E=I+F[D]["by"]*1}}}this.runtimeAttributes[D].start=I;this.runtimeAttributes[D].end=E;this.runtimeAttributes[D].unit=(H(F[D].unit))?F[D]["unit"]:this.getDefaultUnit(D);return true},init:function(E,J,I,C){var D=false;var F=null;var H=0;E=B.Dom.get(E);this.attributes=J||{};this.duration=!YAHOO.lang.isUndefined(I)?I:1;this.method=C||B.Easing.easeNone;this.useSeconds=true;this.currentFrame=0;this.totalFrames=B.AnimMgr.fps;this.setEl=function(M){E=B.Dom.get(M)};this.getEl=function(){return E};this.isAnimated=function(){return D};this.getStartTime=function(){return F};this.runtimeAttributes={};this.animate=function(){if(this.isAnimated()){return false}this.currentFrame=0;this.totalFrames=(this.useSeconds)?Math.ceil(B.AnimMgr.fps*this.duration):this.duration;if(this.duration===0&&this.useSeconds){this.totalFrames=1}B.AnimMgr.registerElement(this);return true};this.stop=function(M){if(!this.isAnimated()){return false}if(M){this.currentFrame=this.totalFrames;this._onTween.fire()}B.AnimMgr.stop(this)};var L=function(){this.onStart.fire();this.runtimeAttributes={};for(var M in this.attributes){this.setRuntimeAttribute(M)}D=true;H=0;F=new Date()};var K=function(){var O={duration:new Date()-this.getStartTime(),currentFrame:this.currentFrame};O.toString=function(){return("duration: "+O.duration+", currentFrame: "+O.currentFrame)};this.onTween.fire(O);var N=this.runtimeAttributes;for(var M in N){this.setAttribute(M,this.doMethod(M,N[M].start,N[M].end),N[M].unit)}H+=1};var G=function(){var M=(new Date()-F)/1000;var N={duration:M,frames:H,fps:H/M};N.toString=function(){return("duration: "+N.duration+", frames: "+N.frames+", fps: "+N.fps)};D=false;H=0;this.onComplete.fire(N)};this._onStart=new B.CustomEvent("_start",this,true);this.onStart=new B.CustomEvent("start",this);this.onTween=new B.CustomEvent("tween",this);this._onTween=new B.CustomEvent("_tween",this,true);this.onComplete=new B.CustomEvent("complete",this);this._onComplete=new B.CustomEvent("_complete",this,true);this._onStart.subscribe(L);this._onTween.subscribe(K);this._onComplete.subscribe(G)}};B.Anim=A})();YAHOO.util.AnimMgr=new function(){var C=null;var B=[];var A=0;this.fps=1000;this.delay=1;this.registerElement=function(F){B[B.length]=F;A+=1;F._onStart.fire();this.start()};this.unRegister=function(G,F){F=F||E(G);if(!G.isAnimated()||F==-1){return false}G._onComplete.fire();B.splice(F,1);A-=1;if(A<=0){this.stop()}return true};this.start=function(){if(C===null){C=setInterval(this.run,this.delay)}};this.stop=function(H){if(!H){clearInterval(C);for(var G=0,F=B.length;G<F;++G){this.unRegister(B[0],0)}B=[];C=null;A=0}else{this.unRegister(H)}};this.run=function(){for(var H=0,F=B.length;H<F;++H){var G=B[H];if(!G||!G.isAnimated()){continue}if(G.currentFrame<G.totalFrames||G.totalFrames===null){G.currentFrame+=1;if(G.useSeconds){D(G)}G._onTween.fire()}else{YAHOO.util.AnimMgr.stop(G,H)}}};var E=function(H){for(var G=0,F=B.length;G<F;++G){if(B[G]==H){return G}}return-1};var D=function(G){var J=G.totalFrames;var I=G.currentFrame;var H=(G.currentFrame*G.duration*1000/G.totalFrames);var F=(new Date()-G.getStartTime());var K=0;if(F<G.duration*1000){K=Math.round((F/H-1)*G.currentFrame)}else{K=J-(I+1)}if(K>0&&isFinite(K)){if(G.currentFrame+K>=J){K=J-(I+1)}G.currentFrame+=K}}};YAHOO.util.Bezier=new function(){this.getPosition=function(E,D){var F=E.length;var C=[];for(var B=0;B<F;++B){C[B]=[E[B][0],E[B][1]]}for(var A=1;A<F;++A){for(B=0;B<F-A;++B){C[B][0]=(1-D)*C[B][0]+D*C[parseInt(B+1,10)][0];C[B][1]=(1-D)*C[B][1]+D*C[parseInt(B+1,10)][1]}}return[C[0][0],C[0][1]]}};(function(){var A=function(F,E,G,H){A.superclass.constructor.call(this,F,E,G,H)};A.NAME="ColorAnim";A.DEFAULT_BGCOLOR="#fff";var C=YAHOO.util;YAHOO.extend(A,C.Anim);var D=A.superclass;var B=A.prototype;B.patterns.color=/color$/i;B.patterns.rgb=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;B.patterns.hex=/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;B.patterns.hex3=/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;B.patterns.transparent=/^transparent|rgba\(0, 0, 0, 0\)$/;B.parseColor=function(E){if(E.length==3){return E}var F=this.patterns.hex.exec(E);if(F&&F.length==4){return[parseInt(F[1],16),parseInt(F[2],16),parseInt(F[3],16)]}F=this.patterns.rgb.exec(E);if(F&&F.length==4){return[parseInt(F[1],10),parseInt(F[2],10),parseInt(F[3],10)]}F=this.patterns.hex3.exec(E);if(F&&F.length==4){return[parseInt(F[1]+F[1],16),parseInt(F[2]+F[2],16),parseInt(F[3]+F[3],16)]}return null};B.getAttribute=function(E){var G=this.getEl();if(this.patterns.color.test(E)){var I=YAHOO.util.Dom.getStyle(G,E);var H=this;if(this.patterns.transparent.test(I)){var F=YAHOO.util.Dom.getAncestorBy(G,function(J){return!H.patterns.transparent.test(I)});if(F){I=C.Dom.getStyle(F,E)}else{I=A.DEFAULT_BGCOLOR}}}else{I=D.getAttribute.call(this,E)}return I};B.doMethod=function(F,J,G){var I;if(this.patterns.color.test(F)){I=[];for(var H=0,E=J.length;H<E;++H){I[H]=D.doMethod.call(this,F,J[H],G[H])}I="rgb("+Math.floor(I[0])+","+Math.floor(I[1])+","+Math.floor(I[2])+")"}else{I=D.doMethod.call(this,F,J,G)}return I};B.setRuntimeAttribute=function(F){D.setRuntimeAttribute.call(this,F);if(this.patterns.color.test(F)){var H=this.attributes;var J=this.parseColor(this.runtimeAttributes[F].start);var G=this.parseColor(this.runtimeAttributes[F].end);if(typeof H[F]["to"]==="undefined"&&typeof H[F]["by"]!=="undefined"){G=this.parseColor(H[F].by);for(var I=0,E=J.length;I<E;++I){G[I]=J[I]+G[I]}}this.runtimeAttributes[F].start=J;this.runtimeAttributes[F].end=G}};C.ColorAnim=A})();YAHOO.util.Easing={easeNone:function(B,A,D,C){return D*B/C+A},easeIn:function(B,A,D,C){return D*(B/=C)*B+A},easeOut:function(B,A,D,C){return-D*(B/=C)*(B-2)+A},easeBoth:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B+A}return-D/2*((--B)*(B-2)-1)+A},easeInStrong:function(B,A,D,C){return D*(B/=C)*B*B*B+A},easeOutStrong:function(B,A,D,C){return-D*((B=B/C-1)*B*B*B-1)+A},easeBothStrong:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B*B*B+A}return-D/2*((B-=2)*B*B*B-2)+A},elasticIn:function(C,A,G,F,B,E){if(C==0){return A}if((C/=F)==1){return A+G}if(!E){E=F*0.3}if(!B||B<Math.abs(G)){B=G;var D=E/4}else{var D=E/(2*Math.PI)*Math.asin(G/B)}return-(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A},elasticOut:function(C,A,G,F,B,E){if(C==0){return A}if((C/=F)==1){return A+G}if(!E){E=F*0.3}if(!B||B<Math.abs(G)){B=G;var D=E/4}else{var D=E/(2*Math.PI)*Math.asin(G/B)}return B*Math.pow(2,-10*C)*Math.sin((C*F-D)*(2*Math.PI)/E)+G+A},elasticBoth:function(C,A,G,F,B,E){if(C==0){return A}if((C/=F/2)==2){return A+G}if(!E){E=F*(0.3*1.5)}if(!B||B<Math.abs(G)){B=G;var D=E/4}else{var D=E/(2*Math.PI)*Math.asin(G/B)}if(C<1){return-0.5*(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A}return B*Math.pow(2,-10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E)*0.5+G+A},backIn:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158}return E*(B/=D)*B*((C+1)*B-C)+A},backOut:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158}return E*((B=B/D-1)*B*((C+1)*B+C)+1)+A},backBoth:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158}if((B/=D/2)<1){return E/2*(B*B*(((C*=(1.525))+1)*B-C))+A}return E/2*((B-=2)*B*(((C*=(1.525))+1)*B+C)+2)+A},bounceIn:function(B,A,D,C){return D-YAHOO.util.Easing.bounceOut(C-B,0,D,C)+A},bounceOut:function(B,A,D,C){if((B/=C)<(1/2.75)){return D*(7.5625*B*B)+A}else{if(B<(2/2.75)){return D*(7.5625*(B-=(1.5/2.75))*B+0.75)+A}else{if(B<(2.5/2.75)){return D*(7.5625*(B-=(2.25/2.75))*B+0.9375)+A}}}return D*(7.5625*(B-=(2.625/2.75))*B+0.984375)+A},bounceBoth:function(B,A,D,C){if(B<C/2){return YAHOO.util.Easing.bounceIn(B*2,0,D,C)*0.5+A}return YAHOO.util.Easing.bounceOut(B*2-C,0,D,C)*0.5+D*0.5+A}};(function(){var A=function(H,G,I,J){if(H){A.superclass.constructor.call(this,H,G,I,J)}};A.NAME="Motion";var E=YAHOO.util;YAHOO.extend(A,E.ColorAnim);var F=A.superclass;var C=A.prototype;C.patterns.points=/^points$/i;C.setAttribute=function(G,I,H){if(this.patterns.points.test(G)){H=H||"px";F.setAttribute.call(this,"left",I[0],H);F.setAttribute.call(this,"top",I[1],H)}else{F.setAttribute.call(this,G,I,H)}};C.getAttribute=function(G){if(this.patterns.points.test(G)){var H=[F.getAttribute.call(this,"left"),F.getAttribute.call(this,"top")]}else{H=F.getAttribute.call(this,G)}return H};C.doMethod=function(G,K,H){var J=null;if(this.patterns.points.test(G)){var I=this.method(this.currentFrame,0,100,this.totalFrames)/100;J=E.Bezier.getPosition(this.runtimeAttributes[G],I)}else{J=F.doMethod.call(this,G,K,H)}return J};C.setRuntimeAttribute=function(P){if(this.patterns.points.test(P)){var H=this.getEl();var J=this.attributes;var G;var L=J["points"]["control"]||[];var I;var M,O;if(L.length>0&&!(L[0]instanceof Array)){L=[L]}else{var K=[];for(M=0,O=L.length;M<O;++M){K[M]=L[M]}L=K}if(E.Dom.getStyle(H,"position")=="static"){E.Dom.setStyle(H,"position","relative")}if(D(J["points"]["from"])){E.Dom.setXY(H,J["points"]["from"])}else{E.Dom.setXY(H,E.Dom.getXY(H))}G=this.getAttribute("points");if(D(J["points"]["to"])){I=B.call(this,J["points"]["to"],G);var N=E.Dom.getXY(this.getEl());for(M=0,O=L.length;M<O;++M){L[M]=B.call(this,L[M],G)}}else{if(D(J["points"]["by"])){I=[G[0]+J["points"]["by"][0],G[1]+J["points"]["by"][1]];for(M=0,O=L.length;M<O;++M){L[M]=[G[0]+L[M][0],G[1]+L[M][1]]}}}this.runtimeAttributes[P]=[G];if(L.length>0){this.runtimeAttributes[P]=this.runtimeAttributes[P].concat(L)}this.runtimeAttributes[P][this.runtimeAttributes[P].length]=I}else{F.setRuntimeAttribute.call(this,P)}};var B=function(G,I){var H=E.Dom.getXY(this.getEl());G=[G[0]-H[0]+I[0],G[1]-H[1]+I[1]];return G};var D=function(G){return(typeof G!=="undefined")};E.Motion=A})();(function(){var D=function(F,E,G,H){if(F){D.superclass.constructor.call(this,F,E,G,H)}};D.NAME="Scroll";var B=YAHOO.util;YAHOO.extend(D,B.ColorAnim);var C=D.superclass;var A=D.prototype;A.doMethod=function(E,H,F){var G=null;if(E=="scroll"){G=[this.method(this.currentFrame,H[0],F[0]-H[0],this.totalFrames),this.method(this.currentFrame,H[1],F[1]-H[1],this.totalFrames)]}else{G=C.doMethod.call(this,E,H,F)}return G};A.getAttribute=function(E){var G=null;var F=this.getEl();if(E=="scroll"){G=[F.scrollLeft,F.scrollTop]}else{G=C.getAttribute.call(this,E)}return G};A.setAttribute=function(E,H,G){var F=this.getEl();if(E=="scroll"){F.scrollLeft=H[0];F.scrollTop=H[1]}else{C.setAttribute.call(this,E,H,G)}};B.Scroll=D})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.7.0",build:"1799"});if(!YAHOO.util.DragDropMgr){YAHOO.util.DragDropMgr=function(){var A=YAHOO.util.Event,B=YAHOO.util.Dom;return{useShim:false,_shimActive:false,_shimState:false,_debugShim:false,_createShim:function(){var C=document.createElement("div");C.id="yui-ddm-shim";if(document.body.firstChild){document.body.insertBefore(C,document.body.firstChild)}else{document.body.appendChild(C)}C.style.display="none";C.style.backgroundColor="red";C.style.position="absolute";C.style.zIndex="99999";B.setStyle(C,"opacity","0");this._shim=C;A.on(C,"mouseup",this.handleMouseUp,this,true);A.on(C,"mousemove",this.handleMouseMove,this,true);A.on(window,"scroll",this._sizeShim,this,true)},_sizeShim:function(){if(this._shimActive){var C=this._shim;C.style.height=B.getDocumentHeight()+"px";C.style.width=B.getDocumentWidth()+"px";C.style.top="0";C.style.left="0"}},_activateShim:function(){if(this.useShim){if(!this._shim){this._createShim()}this._shimActive=true;var C=this._shim,D="0";if(this._debugShim){D=".5"}B.setStyle(C,"opacity",D);this._sizeShim();C.style.display="block"}},_deactivateShim:function(){this._shim.style.display="none";this._shimActive=false},_shim:null,ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,interactionInfo:null,init:function(){this.initialized=true},POINT:0,INTERSECT:1,STRICT_INTERSECT:2,mode:0,_execOnAll:function(E,D){for(var F in this.ids){for(var C in this.ids[F]){var G=this.ids[F][C];if(!this.isTypeOfDD(G)){continue}G[E].apply(G,D)}}},_onLoad:function(){this.init();A.on(document,"mouseup",this.handleMouseUp,this,true);A.on(document,"mousemove",this.handleMouseMove,this,true);A.on(window,"unload",this._onUnload,this,true);A.on(window,"resize",this._onResize,this,true)},_onResize:function(C){this._execOnAll("resetConstraints",[])},lock:function(){this.locked=true},unlock:function(){this.locked=false},isLocked:function(){return this.locked},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:1000,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,fromTimeout:false,regDragDrop:function(D,C){if(!this.initialized){this.init()}if(!this.ids[C]){this.ids[C]={}}this.ids[C][D.id]=D},removeDDFromGroup:function(E,C){if(!this.ids[C]){this.ids[C]={}}var D=this.ids[C];if(D&&D[E.id]){delete D[E.id]}},_remove:function(E){for(var D in E.groups){if(D){var C=this.ids[D];if(C&&C[E.id]){delete C[E.id]}}}delete this.handleIds[E.id]},regHandle:function(D,C){if(!this.handleIds[D]){this.handleIds[D]={}}this.handleIds[D][C]=C},isDragDrop:function(C){return(this.getDDById(C))?true:false},getRelated:function(H,D){var G=[];for(var F in H.groups){for(var E in this.ids[F]){var C=this.ids[F][E];if(!this.isTypeOfDD(C)){continue}if(!D||C.isTarget){G[G.length]=C}}}return G},isLegalTarget:function(G,F){var D=this.getRelated(G,true);for(var E=0,C=D.length;E<C;++E){if(D[E].id==F.id){return true}}return false},isTypeOfDD:function(C){return(C&&C.__ygDragDrop)},isHandle:function(D,C){return(this.handleIds[D]&&this.handleIds[D][C])},getDDById:function(D){for(var C in this.ids){if(this.ids[C][D]){return this.ids[C][D]}}return null},handleMouseDown:function(E,D){this.currentTarget=YAHOO.util.Event.getTarget(E);this.dragCurrent=D;var C=D.getEl();this.startX=YAHOO.util.Event.getPageX(E);this.startY=YAHOO.util.Event.getPageY(E);this.deltaX=this.startX-C.offsetLeft;this.deltaY=this.startY-C.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var F=YAHOO.util.DDM;F.startDrag(F.startX,F.startY);F.fromTimeout=true},this.clickTimeThresh)},startDrag:function(C,E){if(this.dragCurrent&&this.dragCurrent.useShim){this._shimState=this.useShim;this.useShim=true}this._activateShim();clearTimeout(this.clickTimeout);var D=this.dragCurrent;if(D&&D.events.b4StartDrag){D.b4StartDrag(C,E);D.fireEvent("b4StartDragEvent",{x:C,y:E})}if(D&&D.events.startDrag){D.startDrag(C,E);D.fireEvent("startDragEvent",{x:C,y:E})}this.dragThreshMet=true},handleMouseUp:function(C){if(this.dragCurrent){clearTimeout(this.clickTimeout);if(this.dragThreshMet){if(this.fromTimeout){this.fromTimeout=false;this.handleMouseMove(C)}this.fromTimeout=false;this.fireEvents(C,true)}else{}this.stopDrag(C);this.stopEvent(C)}},stopEvent:function(C){if(this.stopPropagation){YAHOO.util.Event.stopPropagation(C)}if(this.preventDefault){YAHOO.util.Event.preventDefault(C)}},stopDrag:function(E,D){var C=this.dragCurrent;if(C&&!D){if(this.dragThreshMet){if(C.events.b4EndDrag){C.b4EndDrag(E);C.fireEvent("b4EndDragEvent",{e:E})}if(C.events.endDrag){C.endDrag(E);C.fireEvent("endDragEvent",{e:E})}}if(C.events.mouseUp){C.onMouseUp(E);C.fireEvent("mouseUpEvent",{e:E})}}if(this._shimActive){this._deactivateShim();if(this.dragCurrent&&this.dragCurrent.useShim){this.useShim=this._shimState;this._shimState=false}}this.dragCurrent=null;this.dragOvers={}},handleMouseMove:function(F){var C=this.dragCurrent;if(C){if(YAHOO.util.Event.isIE&&!F.button){this.stopEvent(F);return this.handleMouseUp(F)}else{if(F.clientX<0||F.clientY<0){}}if(!this.dragThreshMet){var E=Math.abs(this.startX-YAHOO.util.Event.getPageX(F));var D=Math.abs(this.startY-YAHOO.util.Event.getPageY(F));if(E>this.clickPixelThresh||D>this.clickPixelThresh){this.startDrag(this.startX,this.startY)}}if(this.dragThreshMet){if(C&&C.events.b4Drag){C.b4Drag(F);C.fireEvent("b4DragEvent",{e:F})}if(C&&C.events.drag){C.onDrag(F);C.fireEvent("dragEvent",{e:F})}if(C){this.fireEvents(F,false)}}this.stopEvent(F)}},fireEvents:function(V,L){var a=this.dragCurrent;if(!a||a.isLocked()||a.dragOnly){return}var N=YAHOO.util.Event.getPageX(V),M=YAHOO.util.Event.getPageY(V),P=new YAHOO.util.Point(N,M),K=a.getTargetCoord(P.x,P.y),F=a.getDragEl(),E=["out","over","drop","enter"],U=new YAHOO.util.Region(K.y,K.x+F.offsetWidth,K.y+F.offsetHeight,K.x),I=[],D={},Q=[],c={outEvts:[],overEvts:[],dropEvts:[],enterEvts:[]};for(var S in this.dragOvers){var d=this.dragOvers[S];if(!this.isTypeOfDD(d)){continue}if(!this.isOverTarget(P,d,this.mode,U)){c.outEvts.push(d)}I[S]=true;delete this.dragOvers[S]}for(var R in a.groups){if("string"!=typeof R){continue}for(S in this.ids[R]){var G=this.ids[R][S];if(!this.isTypeOfDD(G)){continue}if(G.isTarget&&!G.isLocked()&&G!=a){if(this.isOverTarget(P,G,this.mode,U)){D[R]=true;if(L){c.dropEvts.push(G)}else{if(!I[G.id]){c.enterEvts.push(G)}else{c.overEvts.push(G)}this.dragOvers[G.id]=G}}}}}this.interactionInfo={out:c.outEvts,enter:c.enterEvts,over:c.overEvts,drop:c.dropEvts,point:P,draggedRegion:U,sourceRegion:this.locationCache[a.id],validDrop:L};for(var C in D){Q.push(C)}if(L&&!c.dropEvts.length){this.interactionInfo.validDrop=false;if(a.events.invalidDrop){a.onInvalidDrop(V);a.fireEvent("invalidDropEvent",{e:V})}}for(S=0;S<E.length;S++){var Y=null;if(c[E[S]+"Evts"]){Y=c[E[S]+"Evts"]}if(Y&&Y.length){var H=E[S].charAt(0).toUpperCase()+E[S].substr(1),X="onDrag"+H,J="b4Drag"+H,O="drag"+H+"Event",W="drag"+H;if(this.mode){if(a.events[J]){a[J](V,Y,Q);a.fireEvent(J+"Event",{event:V,info:Y,group:Q})}if(a.events[W]){a[X](V,Y,Q);a.fireEvent(O,{event:V,info:Y,group:Q})}}else{for(var Z=0,T=Y.length;Z<T;++Z){if(a.events[J]){a[J](V,Y[Z].id,Q[0]);a.fireEvent(J+"Event",{event:V,info:Y[Z].id,group:Q[0]})}if(a.events[W]){a[X](V,Y[Z].id,Q[0]);a.fireEvent(O,{event:V,info:Y[Z].id,group:Q[0]})}}}}}},getBestMatch:function(E){var G=null;var D=E.length;if(D==1){G=E[0]}else{for(var F=0;F<D;++F){var C=E[F];if(this.mode==this.INTERSECT&&C.cursorIsOver){G=C;break}else{if(!G||!G.overlap||(C.overlap&&G.overlap.getArea()<C.overlap.getArea())){G=C}}}}return G},refreshCache:function(D){var F=D||this.ids;for(var C in F){if("string"!=typeof C){continue}for(var E in this.ids[C]){var G=this.ids[C][E];if(this.isTypeOfDD(G)){var H=this.getLocation(G);if(H){this.locationCache[G.id]=H}else{delete this.locationCache[G.id]}}}}},verifyEl:function(D){try{if(D){var C=D.offsetParent;if(C){return true}}}catch(E){}return false},getLocation:function(H){if(!this.isTypeOfDD(H)){return null}var F=H.getEl(),K,E,D,M,L,N,C,J,G;try{K=YAHOO.util.Dom.getXY(F)}catch(I){}if(!K){return null}E=K[0];D=E+F.offsetWidth;M=K[1];L=M+F.offsetHeight;N=M-H.padding[0];C=D+H.padding[1];J=L+H.padding[2];G=E-H.padding[3];return new YAHOO.util.Region(N,C,J,G)},isOverTarget:function(K,C,E,F){var G=this.locationCache[C.id];if(!G||!this.useCache){G=this.getLocation(C);this.locationCache[C.id]=G}if(!G){return false}C.cursorIsOver=G.contains(K);var J=this.dragCurrent;if(!J||(!E&&!J.constrainX&&!J.constrainY)){return C.cursorIsOver}C.overlap=null;if(!F){var H=J.getTargetCoord(K.x,K.y);var D=J.getDragEl();F=new YAHOO.util.Region(H.y,H.x+D.offsetWidth,H.y+D.offsetHeight,H.x)}var I=F.intersect(G);if(I){C.overlap=I;return(E)?true:C.cursorIsOver}else{return false}},_onUnload:function(D,C){this.unregAll()},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null}this._execOnAll("unreg",[]);this.ids={}},elementCache:{},getElWrapper:function(D){var C=this.elementCache[D];if(!C||!C.el){C=this.elementCache[D]=new this.ElementWrapper(YAHOO.util.Dom.get(D))}return C},getElement:function(C){return YAHOO.util.Dom.get(C)},getCss:function(D){var C=YAHOO.util.Dom.get(D);return(C)?C.style:null},ElementWrapper:function(C){this.el=C||null;this.id=this.el&&C.id;this.css=this.el&&C.style},getPosX:function(C){return YAHOO.util.Dom.getX(C)},getPosY:function(C){return YAHOO.util.Dom.getY(C)},swapNode:function(E,C){if(E.swapNode){E.swapNode(C)}else{var F=C.parentNode;var D=C.nextSibling;if(D==E){F.insertBefore(E,C)}else{if(C==E.nextSibling){F.insertBefore(C,E)}else{E.parentNode.replaceChild(C,E);F.insertBefore(E,D)}}}},getScroll:function(){var E,C,F=document.documentElement,D=document.body;if(F&&(F.scrollTop||F.scrollLeft)){E=F.scrollTop;C=F.scrollLeft}else{if(D){E=D.scrollTop;C=D.scrollLeft}else{}}return{top:E,left:C}},getStyle:function(D,C){return YAHOO.util.Dom.getStyle(D,C)},getScrollTop:function(){return this.getScroll().top},getScrollLeft:function(){return this.getScroll().left},moveToEl:function(C,E){var D=YAHOO.util.Dom.getXY(E);YAHOO.util.Dom.setXY(C,D)},getClientHeight:function(){return YAHOO.util.Dom.getViewportHeight()},getClientWidth:function(){return YAHOO.util.Dom.getViewportWidth()},numericSort:function(D,C){return(D-C)},_timeoutCount:0,_addListeners:function(){var C=YAHOO.util.DDM;if(YAHOO.util.Event&&document){C._onLoad()}else{if(C._timeoutCount>2000){}else{setTimeout(C._addListeners,10);if(document&&document.body){C._timeoutCount+=1}}}},handleWasClicked:function(C,E){if(this.isHandle(E,C.id)){return true}else{var D=C.parentNode;while(D){if(this.isHandle(E,D.id)){return true}else{D=D.parentNode}}}return false}}}();YAHOO.util.DDM=YAHOO.util.DragDropMgr;YAHOO.util.DDM._addListeners()}(function(){var A=YAHOO.util.Event;var B=YAHOO.util.Dom;YAHOO.util.DragDrop=function(E,C,D){if(E){this.init(E,C,D)}};YAHOO.util.DragDrop.prototype={events:null,on:function(){this.subscribe.apply(this,arguments)},id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true},unlock:function(){this.locked=false},isTarget:true,padding:null,dragOnly:false,useShim:false,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,deltaX:0,deltaY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,cursorIsOver:false,overlap:null,b4StartDrag:function(C,D){},startDrag:function(C,D){},b4Drag:function(C){},onDrag:function(C){},onDragEnter:function(C,D){},b4DragOver:function(C){},onDragOver:function(C,D){},b4DragOut:function(C){},onDragOut:function(C,D){},b4DragDrop:function(C){},onDragDrop:function(C,D){},onInvalidDrop:function(C){},b4EndDrag:function(C){},endDrag:function(C){},b4MouseDown:function(C){},onMouseDown:function(C){},onMouseUp:function(C){},onAvailable:function(){},getEl:function(){if(!this._domRef){this._domRef=B.get(this.id)}return this._domRef},getDragEl:function(){return B.get(this.dragElId)},init:function(F,C,D){this.initTarget(F,C,D);A.on(this._domRef||this.id,"mousedown",this.handleMouseDown,this,true);for(var E in this.events){this.createEvent(E+"Event")}},initTarget:function(E,C,D){this.config=D||{};this.events={};this.DDM=YAHOO.util.DDM;this.groups={};if(typeof E!=="string"){this._domRef=E;E=B.generateId(E)}this.id=E;this.addToGroup((C)?C:"default");this.handleElId=E;A.onAvailable(E,this.handleOnAvailable,this,true);this.setDragElId(E);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig()},applyConfig:function(){this.events={mouseDown:true,b4MouseDown:true,mouseUp:true,b4StartDrag:true,startDrag:true,b4EndDrag:true,endDrag:true,drag:true,b4Drag:true,invalidDrop:true,b4DragOut:true,dragOut:true,dragEnter:true,b4DragOver:true,dragOver:true,b4DragDrop:true,dragDrop:true};if(this.config.events){for(var C in this.config.events){if(this.config.events[C]===false){this.events[C]=false}}}this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false);this.dragOnly=((this.config.dragOnly===true)?true:false);this.useShim=((this.config.useShim===true)?true:false)},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable()},setPadding:function(E,C,F,D){if(!C&&0!==C){this.padding=[E,E,E,E]}else{if(!F&&0!==F){this.padding=[E,C,E,C]}else{this.padding=[E,C,F,D]}}},setInitPosition:function(F,E){var G=this.getEl();if(!this.DDM.verifyEl(G)){if(G&&G.style&&(G.style.display=="none")){}else{}return}var D=F||0;var C=E||0;var H=B.getXY(G);this.initPageX=H[0]-D;this.initPageY=H[1]-C;this.lastPageX=H[0];this.lastPageY=H[1];this.setStartPosition(H)},setStartPosition:function(D){var C=D||B.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=C[0];this.startPageY=C[1]},addToGroup:function(C){this.groups[C]=true;this.DDM.regDragDrop(this,C)},removeFromGroup:function(C){if(this.groups[C]){delete this.groups[C]}this.DDM.removeDDFromGroup(this,C)},setDragElId:function(C){this.dragElId=C},setHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C)}this.handleElId=C;this.DDM.regHandle(this.id,C)},setOuterHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C)}A.on(C,"mousedown",this.handleMouseDown,this,true);this.setHandleElId(C);this.hasOuterHandles=true},unreg:function(){A.removeListener(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this)},isLocked:function(){return(this.DDM.isLocked()||this.locked)},handleMouseDown:function(J,I){var D=J.which||J.button;if(this.primaryButtonOnly&&D>1){return}if(this.isLocked()){return}var C=this.b4MouseDown(J),F=true;if(this.events.b4MouseDown){F=this.fireEvent("b4MouseDownEvent",J)}var E=this.onMouseDown(J),H=true;if(this.events.mouseDown){H=this.fireEvent("mouseDownEvent",J)}if((C===false)||(E===false)||(F===false)||(H===false)){return}this.DDM.refreshCache(this.groups);var G=new YAHOO.util.Point(A.getPageX(J),A.getPageY(J));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(G,this)){}else{if(this.clickValidator(J)){this.setStartPosition();this.DDM.handleMouseDown(J,this);this.DDM.stopEvent(J)}else{}}},clickValidator:function(D){var C=YAHOO.util.Event.getTarget(D);return(this.isValidHandleChild(C)&&(this.id==this.handleElId||this.DDM.handleWasClicked(C,this.id)))},getTargetCoord:function(E,D){var C=E-this.deltaX;var F=D-this.deltaY;if(this.constrainX){if(C<this.minX){C=this.minX}if(C>this.maxX){C=this.maxX}}if(this.constrainY){if(F<this.minY){F=this.minY}if(F>this.maxY){F=this.maxY}}C=this.getTick(C,this.xTicks);F=this.getTick(F,this.yTicks);return{x:C,y:F}},addInvalidHandleType:function(C){var D=C.toUpperCase();this.invalidHandleTypes[D]=D},addInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C)}this.invalidHandleIds[C]=C},addInvalidHandleClass:function(C){this.invalidHandleClasses.push(C)},removeInvalidHandleType:function(C){var D=C.toUpperCase();delete this.invalidHandleTypes[D]},removeInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C)}delete this.invalidHandleIds[C]},removeInvalidHandleClass:function(D){for(var E=0,C=this.invalidHandleClasses.length;E<C;++E){if(this.invalidHandleClasses[E]==D){delete this.invalidHandleClasses[E]}}},isValidHandleChild:function(F){var E=true;var H;try{H=F.nodeName.toUpperCase()}catch(G){H=F.nodeName}E=E&&!this.invalidHandleTypes[H];E=E&&!this.invalidHandleIds[F.id];for(var D=0,C=this.invalidHandleClasses.length;E&&D<C;++D){E=!B.hasClass(F,this.invalidHandleClasses[D])}return E},setXTicks:function(F,C){this.xTicks=[];this.xTickSize=C;var E={};for(var D=this.initPageX;D>=this.minX;D=D-C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true}}for(D=this.initPageX;D<=this.maxX;D=D+C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true}}this.xTicks.sort(this.DDM.numericSort)},setYTicks:function(F,C){this.yTicks=[];this.yTickSize=C;var E={};for(var D=this.initPageY;D>=this.minY;D=D-C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true}}for(D=this.initPageY;D<=this.maxY;D=D+C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true}}this.yTicks.sort(this.DDM.numericSort)},setXConstraint:function(E,D,C){this.leftConstraint=parseInt(E,10);this.rightConstraint=parseInt(D,10);this.minX=this.initPageX-this.leftConstraint;this.maxX=this.initPageX+this.rightConstraint;if(C){this.setXTicks(this.initPageX,C)}this.constrainX=true},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks()},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0},setYConstraint:function(C,E,D){this.topConstraint=parseInt(C,10);this.bottomConstraint=parseInt(E,10);this.minY=this.initPageY-this.topConstraint;this.maxY=this.initPageY+this.bottomConstraint;if(D){this.setYTicks(this.initPageY,D)}this.constrainY=true},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var D=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var C=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(D,C)}else{this.setInitPosition()}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize)}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize)}},getTick:function(I,F){if(!F){return I}else{if(F[0]>=I){return F[0]}else{for(var D=0,C=F.length;D<C;++D){var E=D+1;if(F[E]&&F[E]>=I){var H=I-F[D];var G=F[E]-I;return(G>H)?F[D]:F[E]}}return F[F.length-1]}}},toString:function(){return("DragDrop "+this.id)}};YAHOO.augment(YAHOO.util.DragDrop,YAHOO.util.EventProvider)})();YAHOO.util.DD=function(C,A,B){if(C){this.init(C,A,B)}};YAHOO.extend(YAHOO.util.DD,YAHOO.util.DragDrop,{scroll:true,autoOffset:function(C,B){var A=C-this.startPageX;var D=B-this.startPageY;this.setDelta(A,D)},setDelta:function(B,A){this.deltaX=B;this.deltaY=A},setDragElPos:function(C,B){var A=this.getDragEl();this.alignElWithMouse(A,C,B)},alignElWithMouse:function(C,G,F){var E=this.getTargetCoord(G,F);if(!this.deltaSetXY){var H=[E.x,E.y];YAHOO.util.Dom.setXY(C,H);var D=parseInt(YAHOO.util.Dom.getStyle(C,"left"),10);var B=parseInt(YAHOO.util.Dom.getStyle(C,"top"),10);this.deltaSetXY=[D-E.x,B-E.y]}else{YAHOO.util.Dom.setStyle(C,"left",(E.x+this.deltaSetXY[0])+"px");YAHOO.util.Dom.setStyle(C,"top",(E.y+this.deltaSetXY[1])+"px")}this.cachePosition(E.x,E.y);var A=this;setTimeout(function(){A.autoScroll.call(A,E.x,E.y,C.offsetHeight,C.offsetWidth)},0)},cachePosition:function(B,A){if(B){this.lastPageX=B;this.lastPageY=A}else{var C=YAHOO.util.Dom.getXY(this.getEl());this.lastPageX=C[0];this.lastPageY=C[1]}},autoScroll:function(J,I,E,K){if(this.scroll){var L=this.DDM.getClientHeight();var B=this.DDM.getClientWidth();var N=this.DDM.getScrollTop();var D=this.DDM.getScrollLeft();var H=E+I;var M=K+J;var G=(L+N-I-this.deltaY);var F=(B+D-J-this.deltaX);var C=40;var A=(document.all)?80:30;if(H>L&&G<C){window.scrollTo(D,N+A)}if(I<N&&N>0&&I-N<C){window.scrollTo(D,N-A)}if(M>B&&F<C){window.scrollTo(D+A,N)}if(J<D&&D>0&&J-D<C){window.scrollTo(D-A,N)}}},applyConfig:function(){YAHOO.util.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false)},b4MouseDown:function(A){this.setStartPosition();this.autoOffset(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A))},b4Drag:function(A){this.setDragElPos(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A))},toString:function(){return("DD "+this.id)}});YAHOO.util.DDProxy=function(C,A,B){if(C){this.init(C,A,B);this.initFrame()}};YAHOO.util.DDProxy.dragElId="ygddfdiv";YAHOO.extend(YAHOO.util.DDProxy,YAHOO.util.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var B=this,A=document.body;if(!A||!A.firstChild){setTimeout(function(){B.createFrame()},50);return}var F=this.getDragEl(),E=YAHOO.util.Dom;if(!F){F=document.createElement("div");F.id=this.dragElId;var D=F.style;D.position="absolute";D.visibility="hidden";D.cursor="move";D.border="2px solid #aaa";D.zIndex=999;D.height="25px";D.width="25px";var C=document.createElement("div");E.setStyle(C,"height","100%");E.setStyle(C,"width","100%");E.setStyle(C,"background-color","#ccc");E.setStyle(C,"opacity","0");F.appendChild(C);A.insertBefore(F,A.firstChild)}},initFrame:function(){this.createFrame()},applyConfig:function(){YAHOO.util.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||YAHOO.util.DDProxy.dragElId)},showFrame:function(E,D){var C=this.getEl();var A=this.getDragEl();var B=A.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(B.width,10)/2),Math.round(parseInt(B.height,10)/2))}this.setDragElPos(E,D);YAHOO.util.Dom.setStyle(A,"visibility","visible")},_resizeProxy:function(){if(this.resizeFrame){var H=YAHOO.util.Dom;var B=this.getEl();var C=this.getDragEl();var G=parseInt(H.getStyle(C,"borderTopWidth"),10);var I=parseInt(H.getStyle(C,"borderRightWidth"),10);var F=parseInt(H.getStyle(C,"borderBottomWidth"),10);var D=parseInt(H.getStyle(C,"borderLeftWidth"),10);if(isNaN(G)){G=0}if(isNaN(I)){I=0}if(isNaN(F)){F=0}if(isNaN(D)){D=0}var E=Math.max(0,B.offsetWidth-I-D);var A=Math.max(0,B.offsetHeight-G-F);H.setStyle(C,"width",E+"px");H.setStyle(C,"height",A+"px")}},b4MouseDown:function(B){this.setStartPosition();var A=YAHOO.util.Event.getPageX(B);var C=YAHOO.util.Event.getPageY(B);this.autoOffset(A,C)},b4StartDrag:function(A,B){this.showFrame(A,B)},b4EndDrag:function(A){YAHOO.util.Dom.setStyle(this.getDragEl(),"visibility","hidden")},endDrag:function(D){var C=YAHOO.util.Dom;var B=this.getEl();var A=this.getDragEl();C.setStyle(A,"visibility","");C.setStyle(B,"visibility","hidden");YAHOO.util.DDM.moveToEl(B,A);C.setStyle(A,"visibility","hidden");C.setStyle(B,"visibility","")},toString:function(){return("DDProxy "+this.id)}});YAHOO.util.DDTarget=function(C,A,B){if(C){this.initTarget(C,A,B)}};YAHOO.extend(YAHOO.util.DDTarget,YAHOO.util.DragDrop,{toString:function(){return("DDTarget "+this.id)}});YAHOO.register("dragdrop",YAHOO.util.DragDropMgr,{version:"2.7.0",build:"1799"});YAHOO.util.Attribute=function(B,A){if(A){this.owner=A;this.configure(B,true)}};YAHOO.util.Attribute.prototype={name:undefined,value:null,owner:null,readOnly:false,writeOnce:false,_initialConfig:null,_written:false,method:null,setter:null,getter:null,validator:null,getValue:function(){var A=this.value;if(this.getter){A=this.getter.call(this.owner,this.name)}return A},setValue:function(F,B){var E,A=this.owner,C=this.name;var D={type:C,prevValue:this.getValue(),newValue:F};if(this.readOnly||(this.writeOnce&&this._written)){return false}if(this.validator&&!this.validator.call(A,F)){return false}if(!B){E=A.fireBeforeChangeEvent(D);if(E===false){return false}}if(this.setter){F=this.setter.call(A,F,this.name);if(F===undefined){}}if(this.method){this.method.call(A,F,this.name)}this.value=F;this._written=true;D.type=C;if(!B){this.owner.fireChangeEvent(D)}return true},configure:function(B,C){B=B||{};if(C){this._written=false}this._initialConfig=this._initialConfig||{};for(var A in B){if(B.hasOwnProperty(A)){this[A]=B[A];if(C){this._initialConfig[A]=B[A]}}}},resetValue:function(){return this.setValue(this._initialConfig.value)},resetConfig:function(){this.configure(this._initialConfig,true)},refresh:function(A){this.setValue(this.value,A)}};(function(){var A=YAHOO.util.Lang;YAHOO.util.AttributeProvider=function(){};YAHOO.util.AttributeProvider.prototype={_configs:null,get:function(C){this._configs=this._configs||{};var B=this._configs[C];if(!B||!this._configs.hasOwnProperty(C)){return null}return B.getValue()},set:function(D,E,B){this._configs=this._configs||{};var C=this._configs[D];if(!C){return false}return C.setValue(E,B)},getAttributeKeys:function(){this._configs=this._configs;var C=[],B;for(B in this._configs){if(A.hasOwnProperty(this._configs,B)&&!A.isUndefined(this._configs[B])){C[C.length]=B}}return C},setAttributes:function(D,B){for(var C in D){if(A.hasOwnProperty(D,C)){this.set(C,D[C],B)}}},resetValue:function(C,B){this._configs=this._configs||{};if(this._configs[C]){this.set(C,this._configs[C]._initialConfig.value,B);return true}return false},refresh:function(E,C){this._configs=this._configs||{};var F=this._configs;E=((A.isString(E))?[E]:E)||this.getAttributeKeys();for(var D=0,B=E.length;D<B;++D){if(F.hasOwnProperty(E[D])){this._configs[E[D]].refresh(C)}}},register:function(B,C){this.setAttributeConfig(B,C)},getAttributeConfig:function(C){this._configs=this._configs||{};var B=this._configs[C]||{};var D={};for(C in B){if(A.hasOwnProperty(B,C)){D[C]=B[C]}}return D},setAttributeConfig:function(B,C,D){this._configs=this._configs||{};C=C||{};if(!this._configs[B]){C.name=B;this._configs[B]=this.createAttribute(C)}else{this._configs[B].configure(C,D)}},configureAttribute:function(B,C,D){this.setAttributeConfig(B,C,D)},resetAttributeConfig:function(B){this._configs=this._configs||{};this._configs[B].resetConfig()},subscribe:function(B,C){this._events=this._events||{};if(!(B in this._events)){this._events[B]=this.createEvent(B)}YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments)},on:function(){this.subscribe.apply(this,arguments)},addListener:function(){this.subscribe.apply(this,arguments)},fireBeforeChangeEvent:function(C){var B="before";B+=C.type.charAt(0).toUpperCase()+C.type.substr(1)+"Change";C.type=B;return this.fireEvent(C.type,C)},fireChangeEvent:function(B){B.type+="Change";return this.fireEvent(B.type,B)},createAttribute:function(B){return new YAHOO.util.Attribute(B,this)}};YAHOO.augment(YAHOO.util.AttributeProvider,YAHOO.util.EventProvider)})();(function(){var B=YAHOO.util.Dom,C=YAHOO.util.AttributeProvider;var A=function(D,E){this.init.apply(this,arguments)};A.DOM_EVENTS={"click":true,"dblclick":true,"keydown":true,"keypress":true,"keyup":true,"mousedown":true,"mousemove":true,"mouseout":true,"mouseover":true,"mouseup":true,"focus":true,"blur":true,"submit":true,"change":true};A.prototype={DOM_EVENTS:null,DEFAULT_HTML_SETTER:function(F,D){var E=this.get("element");if(E){E[D]=F}},DEFAULT_HTML_GETTER:function(D){var E=this.get("element"),F;if(E){F=E[D]}return F},appendChild:function(D){D=D.get?D.get("element"):D;return this.get("element").appendChild(D)},getElementsByTagName:function(D){return this.get("element").getElementsByTagName(D)},hasChildNodes:function(){return this.get("element").hasChildNodes()},insertBefore:function(D,E){D=D.get?D.get("element"):D;E=(E&&E.get)?E.get("element"):E;return this.get("element").insertBefore(D,E)},removeChild:function(D){D=D.get?D.get("element"):D;return this.get("element").removeChild(D)},replaceChild:function(D,E){D=D.get?D.get("element"):D;E=E.get?E.get("element"):E;return this.get("element").replaceChild(D,E)},initAttributes:function(D){},addListener:function(H,G,I,F){var E=this.get("element")||this.get("id");F=F||this;var D=this;if(!this._events[H]){if(E&&this.DOM_EVENTS[H]){YAHOO.util.Event.addListener(E,H,function(J){if(J.srcElement&&!J.target){J.target=J.srcElement}D.fireEvent(H,J)},I,F)}this.createEvent(H,this)}return YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments)},on:function(){return this.addListener.apply(this,arguments)},subscribe:function(){return this.addListener.apply(this,arguments)},removeListener:function(E,D){return this.unsubscribe.apply(this,arguments)},addClass:function(D){B.addClass(this.get("element"),D)},getElementsByClassName:function(E,D){return B.getElementsByClassName(E,D,this.get("element"))},hasClass:function(D){return B.hasClass(this.get("element"),D)},removeClass:function(D){return B.removeClass(this.get("element"),D)},replaceClass:function(E,D){return B.replaceClass(this.get("element"),E,D)},setStyle:function(E,D){return B.setStyle(this.get("element"),E,D)},getStyle:function(D){return B.getStyle(this.get("element"),D)},fireQueue:function(){var E=this._queue;for(var F=0,D=E.length;F<D;++F){this[E[F][0]].apply(this,E[F][1])}},appendTo:function(E,F){E=(E.get)?E.get("element"):B.get(E);this.fireEvent("beforeAppendTo",{type:"beforeAppendTo",target:E});F=(F&&F.get)?F.get("element"):B.get(F);var D=this.get("element");if(!D){return false}if(!E){return false}if(D.parent!=E){if(F){E.insertBefore(D,F)}else{E.appendChild(D)}}this.fireEvent("appendTo",{type:"appendTo",target:E});return D},get:function(D){var F=this._configs||{},E=F.element;if(E&&!F[D]&&!YAHOO.lang.isUndefined(E.value[D])){this._setHTMLAttrConfig(D)}return C.prototype.get.call(this,D)},setAttributes:function(J,G){var E={},H=this._configOrder;for(var I=0,D=H.length;I<D;++I){if(J[H[I]]!==undefined){E[H[I]]=true;this.set(H[I],J[H[I]],G)}}for(var F in J){if(J.hasOwnProperty(F)&&!E[F]){this.set(F,J[F],G)}}},set:function(E,G,D){var F=this.get("element");if(!F){this._queue[this._queue.length]=["set",arguments];if(this._configs[E]){this._configs[E].value=G}return}if(!this._configs[E]&&!YAHOO.lang.isUndefined(F[E])){this._setHTMLAttrConfig(E)}return C.prototype.set.apply(this,arguments)},setAttributeConfig:function(D,E,F){this._configOrder.push(D);C.prototype.setAttributeConfig.apply(this,arguments)},createEvent:function(E,D){this._events[E]=true;return C.prototype.createEvent.apply(this,arguments)},init:function(E,D){this._initElement(E,D)},destroy:function(){var D=this.get("element");YAHOO.util.Event.purgeElement(D,true);this.unsubscribeAll();if(D&&D.parentNode){D.parentNode.removeChild(D)}this._queue=[];this._events={};this._configs={};this._configOrder=[]},_initElement:function(F,E){this._queue=this._queue||[];this._events=this._events||{};this._configs=this._configs||{};this._configOrder=[];E=E||{};E.element=E.element||F||null;var H=false;var D=A.DOM_EVENTS;this.DOM_EVENTS=this.DOM_EVENTS||{};for(var G in D){if(D.hasOwnProperty(G)){this.DOM_EVENTS[G]=D[G]}}if(typeof E.element==="string"){this._setHTMLAttrConfig("id",{value:E.element})}if(B.get(E.element)){H=true;this._initHTMLElement(E);this._initContent(E)}YAHOO.util.Event.onAvailable(E.element,function(){if(!H){this._initHTMLElement(E)}this.fireEvent("available",{type:"available",target:B.get(E.element)})},this,true);YAHOO.util.Event.onContentReady(E.element,function(){if(!H){this._initContent(E)}this.fireEvent("contentReady",{type:"contentReady",target:B.get(E.element)})},this,true)},_initHTMLElement:function(D){this.setAttributeConfig("element",{value:B.get(D.element),readOnly:true})},_initContent:function(D){this.initAttributes(D);this.setAttributes(D,true);this.fireQueue()},_setHTMLAttrConfig:function(D,F){var E=this.get("element");F=F||{};F.name=D;F.setter=F.setter||this.DEFAULT_HTML_SETTER;F.getter=F.getter||this.DEFAULT_HTML_GETTER;F.value=F.value||E[D];this._configs[D]=new YAHOO.util.Attribute(F,this)}};YAHOO.augment(A,C);YAHOO.util.Element=A})();YAHOO.register("element",YAHOO.util.Element,{version:"2.7.0",build:"1799"});YAHOO.register("utilities",YAHOO,{version:"2.7.0",build:"1799"});(function(){YAHOO.util.Config=function(owner){if(owner){this.init(owner)}};var Lang=YAHOO.lang,CustomEvent=YAHOO.util.CustomEvent,Config=YAHOO.util.Config;Config.CONFIG_CHANGED_EVENT="configChanged";Config.BOOLEAN_TYPE="boolean";Config.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(owner){this.owner=owner;this.configChangedEvent=this.createEvent(Config.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=CustomEvent.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[]},checkBoolean:function(val){return(typeof val==Config.BOOLEAN_TYPE)},checkNumber:function(val){return(!isNaN(val))},fireEvent:function(key,value){var property=this.config[key];if(property&&property.event){property.event.fire(value)}},addProperty:function(key,propertyObject){key=key.toLowerCase();this.config[key]=propertyObject;propertyObject.event=this.createEvent(key,{scope:this.owner});propertyObject.event.signature=CustomEvent.LIST;propertyObject.key=key;if(propertyObject.handler){propertyObject.event.subscribe(propertyObject.handler,this.owner)}this.setProperty(key,propertyObject.value,true);if(!propertyObject.suppressEvent){this.queueProperty(key,propertyObject.value)}},getConfig:function(){var cfg={},currCfg=this.config,prop,property;for(prop in currCfg){if(Lang.hasOwnProperty(currCfg,prop)){property=currCfg[prop];if(property&&property.event){cfg[prop]=property.value}}}return cfg},getProperty:function(key){var property=this.config[key.toLowerCase()];if(property&&property.event){return property.value}else{return undefined}},resetProperty:function(key){key=key.toLowerCase();var property=this.config[key];if(property&&property.event){if(this.initialConfig[key]&&!Lang.isUndefined(this.initialConfig[key])){this.setProperty(key,this.initialConfig[key]);return true}}else{return false}},setProperty:function(key,value,silent){var property;key=key.toLowerCase();if(this.queueInProgress&&!silent){this.queueProperty(key,value);return true}else{property=this.config[key];if(property&&property.event){if(property.validator&&!property.validator(value)){return false}else{property.value=value;if(!silent){this.fireEvent(key,value);this.configChangedEvent.fire([key,value])}return true}}else{return false}}},queueProperty:function(key,value){key=key.toLowerCase();var property=this.config[key],foundDuplicate=false,iLen,queueItem,queueItemKey,queueItemValue,sLen,supercedesCheck,qLen,queueItemCheck,queueItemCheckKey,queueItemCheckValue,i,s,q;if(property&&property.event){if(!Lang.isUndefined(value)&&property.validator&&!property.validator(value)){return false}else{if(!Lang.isUndefined(value)){property.value=value}else{value=property.value}foundDuplicate=false;iLen=this.eventQueue.length;for(i=0;i<iLen;i++){queueItem=this.eventQueue[i];if(queueItem){queueItemKey=queueItem[0];queueItemValue=queueItem[1];if(queueItemKey==key){this.eventQueue[i]=null;this.eventQueue.push([key,(!Lang.isUndefined(value)?value:queueItemValue)]);foundDuplicate=true;break}}}if(!foundDuplicate&&!Lang.isUndefined(value)){this.eventQueue.push([key,value])}}if(property.supercedes){sLen=property.supercedes.length;for(s=0;s<sLen;s++){supercedesCheck=property.supercedes[s];qLen=this.eventQueue.length;for(q=0;q<qLen;q++){queueItemCheck=this.eventQueue[q];if(queueItemCheck){queueItemCheckKey=queueItemCheck[0];queueItemCheckValue=queueItemCheck[1];if(queueItemCheckKey==supercedesCheck.toLowerCase()){this.eventQueue.push([queueItemCheckKey,queueItemCheckValue]);this.eventQueue[q]=null;break}}}}}return true}else{return false}},refireEvent:function(key){key=key.toLowerCase();var property=this.config[key];if(property&&property.event&&!Lang.isUndefined(property.value)){if(this.queueInProgress){this.queueProperty(key)}else{this.fireEvent(key,property.value)}}},applyConfig:function(userConfig,init){var sKey,oConfig;if(init){oConfig={};for(sKey in userConfig){if(Lang.hasOwnProperty(userConfig,sKey)){oConfig[sKey.toLowerCase()]=userConfig[sKey]}}this.initialConfig=oConfig}for(sKey in userConfig){if(Lang.hasOwnProperty(userConfig,sKey)){this.queueProperty(sKey,userConfig[sKey])}}},refresh:function(){var prop;for(prop in this.config){if(Lang.hasOwnProperty(this.config,prop)){this.refireEvent(prop)}}},fireQueue:function(){var i,queueItem,key,value,property;this.queueInProgress=true;for(i=0;i<this.eventQueue.length;i++){queueItem=this.eventQueue[i];if(queueItem){key=queueItem[0];value=queueItem[1];property=this.config[key];property.value=value;this.eventQueue[i]=null;this.fireEvent(key,value)}}this.queueInProgress=false;this.eventQueue=[]},subscribeToConfigEvent:function(key,handler,obj,override){var property=this.config[key.toLowerCase()];if(property&&property.event){if(!Config.alreadySubscribed(property.event,handler,obj)){property.event.subscribe(handler,obj,override)}return true}else{return false}},unsubscribeFromConfigEvent:function(key,handler,obj){var property=this.config[key.toLowerCase()];if(property&&property.event){return property.event.unsubscribe(handler,obj)}else{return false}},toString:function(){var output="Config";if(this.owner){output+=" ["+this.owner.toString()+"]"}return output},outputEventQueue:function(){var output="",queueItem,q,nQueue=this.eventQueue.length;for(q=0;q<nQueue;q++){queueItem=this.eventQueue[q];if(queueItem){output+=queueItem[0]+"="+queueItem[1]+", "}}return output},destroy:function(){var oConfig=this.config,sProperty,oProperty;for(sProperty in oConfig){if(Lang.hasOwnProperty(oConfig,sProperty)){oProperty=oConfig[sProperty];oProperty.event.unsubscribeAll();oProperty.event=null}}this.configChangedEvent.unsubscribeAll();this.configChangedEvent=null;this.owner=null;this.config=null;this.initialConfig=null;this.eventQueue=null}};Config.alreadySubscribed=function(evt,fn,obj){var nSubscribers=evt.subscribers.length,subsc,i;if(nSubscribers>0){i=nSubscribers-1;do{subsc=evt.subscribers[i];if(subsc&&subsc.obj==obj&&subsc.fn==fn){return true}}while(i--)}return false};YAHOO.lang.augmentProto(Config,YAHOO.util.EventProvider)}());(function(){YAHOO.widget.Module=function(el,userConfig){if(el){this.init(el,userConfig)}else{}};var Dom=YAHOO.util.Dom,Config=YAHOO.util.Config,Event=YAHOO.util.Event,CustomEvent=YAHOO.util.CustomEvent,Module=YAHOO.widget.Module,UA=YAHOO.env.ua,m_oModuleTemplate,m_oHeaderTemplate,m_oBodyTemplate,m_oFooterTemplate,EVENT_TYPES={"BEFORE_INIT":"beforeInit","INIT":"init","APPEND":"append","BEFORE_RENDER":"beforeRender","RENDER":"render","CHANGE_HEADER":"changeHeader","CHANGE_BODY":"changeBody","CHANGE_FOOTER":"changeFooter","CHANGE_CONTENT":"changeContent","DESTORY":"destroy","BEFORE_SHOW":"beforeShow","SHOW":"show","BEFORE_HIDE":"beforeHide","HIDE":"hide"},DEFAULT_CONFIG={"VISIBLE":{key:"visible",value:true,validator:YAHOO.lang.isBoolean},"EFFECT":{key:"effect",suppressEvent:true,supercedes:["visible"]},"MONITOR_RESIZE":{key:"monitorresize",value:true},"APPEND_TO_DOCUMENT_BODY":{key:"appendtodocumentbody",value:false}};Module.IMG_ROOT=null;Module.IMG_ROOT_SSL=null;Module.CSS_MODULE="yui-module";Module.CSS_HEADER="hd";Module.CSS_BODY="bd";Module.CSS_FOOTER="ft";Module.RESIZE_MONITOR_SECURE_URL="javascript:false;";Module.RESIZE_MONITOR_BUFFER=1;Module.textResizeEvent=new CustomEvent("textResize");Module.forceDocumentRedraw=function(){var docEl=document.documentElement;if(docEl){docEl.className+=" ";docEl.className=YAHOO.lang.trim(docEl.className)}};function createModuleTemplate(){if(!m_oModuleTemplate){m_oModuleTemplate=document.createElement("div");m_oModuleTemplate.innerHTML=("<div class=\""+Module.CSS_HEADER+"\"></div>"+"<div class=\""+Module.CSS_BODY+"\"></div><div class=\""+Module.CSS_FOOTER+"\"></div>");m_oHeaderTemplate=m_oModuleTemplate.firstChild;m_oBodyTemplate=m_oHeaderTemplate.nextSibling;m_oFooterTemplate=m_oBodyTemplate.nextSibling}return m_oModuleTemplate}function createHeader(){if(!m_oHeaderTemplate){createModuleTemplate()}return(m_oHeaderTemplate.cloneNode(false))}function createBody(){if(!m_oBodyTemplate){createModuleTemplate()}return(m_oBodyTemplate.cloneNode(false))}function createFooter(){if(!m_oFooterTemplate){createModuleTemplate()}return(m_oFooterTemplate.cloneNode(false))}Module.prototype={constructor:Module,element:null,header:null,body:null,footer:null,id:null,imageRoot:Module.IMG_ROOT,initEvents:function(){var SIGNATURE=CustomEvent.LIST;this.beforeInitEvent=this.createEvent(EVENT_TYPES.BEFORE_INIT);this.beforeInitEvent.signature=SIGNATURE;this.initEvent=this.createEvent(EVENT_TYPES.INIT);this.initEvent.signature=SIGNATURE;this.appendEvent=this.createEvent(EVENT_TYPES.APPEND);this.appendEvent.signature=SIGNATURE;this.beforeRenderEvent=this.createEvent(EVENT_TYPES.BEFORE_RENDER);this.beforeRenderEvent.signature=SIGNATURE;this.renderEvent=this.createEvent(EVENT_TYPES.RENDER);this.renderEvent.signature=SIGNATURE;this.changeHeaderEvent=this.createEvent(EVENT_TYPES.CHANGE_HEADER);this.changeHeaderEvent.signature=SIGNATURE;this.changeBodyEvent=this.createEvent(EVENT_TYPES.CHANGE_BODY);this.changeBodyEvent.signature=SIGNATURE;this.changeFooterEvent=this.createEvent(EVENT_TYPES.CHANGE_FOOTER);this.changeFooterEvent.signature=SIGNATURE;this.changeContentEvent=this.createEvent(EVENT_TYPES.CHANGE_CONTENT);this.changeContentEvent.signature=SIGNATURE;this.destroyEvent=this.createEvent(EVENT_TYPES.DESTORY);this.destroyEvent.signature=SIGNATURE;this.beforeShowEvent=this.createEvent(EVENT_TYPES.BEFORE_SHOW);this.beforeShowEvent.signature=SIGNATURE;this.showEvent=this.createEvent(EVENT_TYPES.SHOW);this.showEvent.signature=SIGNATURE;this.beforeHideEvent=this.createEvent(EVENT_TYPES.BEFORE_HIDE);this.beforeHideEvent.signature=SIGNATURE;this.hideEvent=this.createEvent(EVENT_TYPES.HIDE);this.hideEvent.signature=SIGNATURE},platform:function(){var ua=navigator.userAgent.toLowerCase();if(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1){return"windows"}else if(ua.indexOf("macintosh")!=-1){return"mac"}else{return false}}(),browser:function(){var ua=navigator.userAgent.toLowerCase();if(ua.indexOf('opera')!=-1){return'opera'}else if(ua.indexOf('msie 7')!=-1){return'ie7'}else if(ua.indexOf('msie')!=-1){return'ie'}else if(ua.indexOf('safari')!=-1){return'safari'}else if(ua.indexOf('gecko')!=-1){return'gecko'}else{return false}}(),isSecure:function(){if(window.location.href.toLowerCase().indexOf("https")===0){return true}else{return false}}(),initDefaultConfig:function(){this.cfg.addProperty(DEFAULT_CONFIG.VISIBLE.key,{handler:this.configVisible,value:DEFAULT_CONFIG.VISIBLE.value,validator:DEFAULT_CONFIG.VISIBLE.validator});this.cfg.addProperty(DEFAULT_CONFIG.EFFECT.key,{suppressEvent:DEFAULT_CONFIG.EFFECT.suppressEvent,supercedes:DEFAULT_CONFIG.EFFECT.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.MONITOR_RESIZE.key,{handler:this.configMonitorResize,value:DEFAULT_CONFIG.MONITOR_RESIZE.value});this.cfg.addProperty(DEFAULT_CONFIG.APPEND_TO_DOCUMENT_BODY.key,{value:DEFAULT_CONFIG.APPEND_TO_DOCUMENT_BODY.value})},init:function(el,userConfig){var elId,child;this.initEvents();this.beforeInitEvent.fire(Module);this.cfg=new Config(this);if(this.isSecure){this.imageRoot=Module.IMG_ROOT_SSL}if(typeof el=="string"){elId=el;el=document.getElementById(el);if(!el){el=(createModuleTemplate()).cloneNode(false);el.id=elId}}this.id=Dom.generateId(el);this.element=el;child=this.element.firstChild;if(child){var fndHd=false,fndBd=false,fndFt=false;do{if(1==child.nodeType){if(!fndHd&&Dom.hasClass(child,Module.CSS_HEADER)){this.header=child;fndHd=true}else if(!fndBd&&Dom.hasClass(child,Module.CSS_BODY)){this.body=child;fndBd=true}else if(!fndFt&&Dom.hasClass(child,Module.CSS_FOOTER)){this.footer=child;fndFt=true}}}while((child=child.nextSibling))}this.initDefaultConfig();Dom.addClass(this.element,Module.CSS_MODULE);if(userConfig){this.cfg.applyConfig(userConfig,true)}if(!Config.alreadySubscribed(this.renderEvent,this.cfg.fireQueue,this.cfg)){this.renderEvent.subscribe(this.cfg.fireQueue,this.cfg,true)}this.initEvent.fire(Module)},initResizeMonitor:function(){var isGeckoWin=(UA.gecko&&this.platform=="windows");if(isGeckoWin){var self=this;setTimeout(function(){self._initResizeMonitor()},0)}else{this._initResizeMonitor()}},_initResizeMonitor:function(){return;var oDoc,oIFrame,sHTML;function fireTextResize(){Module.textResizeEvent.fire()}if(!UA.opera){oIFrame=Dom.get("_yuiResizeMonitor");var supportsCWResize=this._supportsCWResize();if(!oIFrame){oIFrame=document.createElement("iframe");if(this.isSecure&&Module.RESIZE_MONITOR_SECURE_URL&&UA.ie){oIFrame.src=Module.RESIZE_MONITOR_SECURE_URL}if(!supportsCWResize){sHTML=["<html><head><script ","type=\"text/javascript\">","window.onresize=function(){window.parent.","YAHOO.widget.Module.textResizeEvent.","fire();};<","\/script></head>","<body></body></html>"].join('');oIFrame.src="data:text/html;charset=utf-8,"+encodeURIComponent(sHTML)}oIFrame.id="_yuiResizeMonitor";oIFrame.title="Text Resize Monitor";oIFrame.style.position="absolute";oIFrame.style.visibility="hidden";var db=document.body,fc=db.firstChild;if(fc){db.insertBefore(oIFrame,fc)}else{db.appendChild(oIFrame)}oIFrame.style.width="2em";oIFrame.style.height="2em";oIFrame.style.top=(-1*(oIFrame.offsetHeight+Module.RESIZE_MONITOR_BUFFER))+"px";oIFrame.style.left="0";oIFrame.style.borderWidth="0";oIFrame.style.visibility="visible";if(UA.webkit){oDoc=oIFrame.contentWindow.document;oDoc.open();oDoc.close()}}if(oIFrame&&oIFrame.contentWindow){Module.textResizeEvent.subscribe(this.onDomResize,this,true);if(!Module.textResizeInitialized){if(supportsCWResize){if(!Event.on(oIFrame.contentWindow,"resize",fireTextResize)){Event.on(oIFrame,"resize",fireTextResize)}}Module.textResizeInitialized=true}this.resizeMonitor=oIFrame}}},_supportsCWResize:function(){var bSupported=true;if(UA.gecko&&UA.gecko<=1.8){bSupported=false}return bSupported},onDomResize:function(e,obj){var nTop=-1*(this.resizeMonitor.offsetHeight+Module.RESIZE_MONITOR_BUFFER);this.resizeMonitor.style.top=nTop+"px";this.resizeMonitor.style.left="0"},setHeader:function(headerContent){var oHeader=this.header||(this.header=createHeader());if(headerContent.nodeName){oHeader.innerHTML="";oHeader.appendChild(headerContent)}else{oHeader.innerHTML=headerContent}this.changeHeaderEvent.fire(headerContent);this.changeContentEvent.fire()},appendToHeader:function(element){var oHeader=this.header||(this.header=createHeader());oHeader.appendChild(element);this.changeHeaderEvent.fire(element);this.changeContentEvent.fire()},setBody:function(bodyContent){var oBody=this.body||(this.body=createBody());if(bodyContent.nodeName){oBody.innerHTML="";oBody.appendChild(bodyContent)}else{oBody.innerHTML=bodyContent}this.changeBodyEvent.fire(bodyContent);this.changeContentEvent.fire()},appendToBody:function(element){var oBody=this.body||(this.body=createBody());oBody.appendChild(element);this.changeBodyEvent.fire(element);this.changeContentEvent.fire()},setFooter:function(footerContent){var oFooter=this.footer||(this.footer=createFooter());if(footerContent.nodeName){oFooter.innerHTML="";oFooter.appendChild(footerContent)}else{oFooter.innerHTML=footerContent}this.changeFooterEvent.fire(footerContent);this.changeContentEvent.fire()},appendToFooter:function(element){var oFooter=this.footer||(this.footer=createFooter());oFooter.appendChild(element);this.changeFooterEvent.fire(element);this.changeContentEvent.fire()},render:function(appendToNode,moduleElement){var me=this,firstChild;function appendTo(parentNode){if(typeof parentNode=="string"){parentNode=document.getElementById(parentNode)}if(parentNode){me._addToParent(parentNode,me.element);me.appendEvent.fire()}}this.beforeRenderEvent.fire();if(!moduleElement){moduleElement=this.element}if(appendToNode){appendTo(appendToNode)}else{if(!Dom.inDocument(this.element)){return false}}if(this.header&&!Dom.inDocument(this.header)){firstChild=moduleElement.firstChild;if(firstChild){moduleElement.insertBefore(this.header,firstChild)}else{moduleElement.appendChild(this.header)}}if(this.body&&!Dom.inDocument(this.body)){if(this.footer&&Dom.isAncestor(this.moduleElement,this.footer)){moduleElement.insertBefore(this.body,this.footer)}else{moduleElement.appendChild(this.body)}}if(this.footer&&!Dom.inDocument(this.footer)){moduleElement.appendChild(this.footer)}this.renderEvent.fire();return true},destroy:function(){var parent;if(this.element){Event.purgeElement(this.element,true);parent=this.element.parentNode}if(parent){parent.removeChild(this.element)}this.element=null;this.header=null;this.body=null;this.footer=null;Module.textResizeEvent.unsubscribe(this.onDomResize,this);this.cfg.destroy();this.cfg=null;this.destroyEvent.fire()},show:function(){this.cfg.setProperty("visible",true)},hide:function(){this.cfg.setProperty("visible",false)},configVisible:function(type,args,obj){var visible=args[0];if(visible){this.beforeShowEvent.fire();Dom.setStyle(this.element,"display","block");this.showEvent.fire()}else{this.beforeHideEvent.fire();Dom.setStyle(this.element,"display","none");this.hideEvent.fire()}},configMonitorResize:function(type,args,obj){var monitor=args[0];if(monitor){this.initResizeMonitor()}else{Module.textResizeEvent.unsubscribe(this.onDomResize,this,true);this.resizeMonitor=null}},_addToParent:function(parentNode,element){if(!this.cfg.getProperty("appendtodocumentbody")&&parentNode===document.body&&parentNode.firstChild){parentNode.insertBefore(element,parentNode.firstChild)}else{parentNode.appendChild(element)}},toString:function(){return"Module "+this.id}};YAHOO.lang.augmentProto(Module,YAHOO.util.EventProvider)}());(function(){YAHOO.widget.Overlay=function(el,userConfig){YAHOO.widget.Overlay.superclass.constructor.call(this,el,userConfig)};var Lang=YAHOO.lang,CustomEvent=YAHOO.util.CustomEvent,Module=YAHOO.widget.Module,Event=YAHOO.util.Event,Dom=YAHOO.util.Dom,Config=YAHOO.util.Config,UA=YAHOO.env.ua,Overlay=YAHOO.widget.Overlay,_SUBSCRIBE="subscribe",_UNSUBSCRIBE="unsubscribe",_CONTAINED="contained",m_oIFrameTemplate,EVENT_TYPES={"BEFORE_MOVE":"beforeMove","MOVE":"move"},DEFAULT_CONFIG={"X":{key:"x",validator:Lang.isNumber,suppressEvent:true,supercedes:["iframe"]},"Y":{key:"y",validator:Lang.isNumber,suppressEvent:true,supercedes:["iframe"]},"XY":{key:"xy",suppressEvent:true,supercedes:["iframe"]},"CONTEXT":{key:"context",suppressEvent:true,supercedes:["iframe"]},"FIXED_CENTER":{key:"fixedcenter",value:false,supercedes:["iframe","visible"]},"WIDTH":{key:"width",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"HEIGHT":{key:"height",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"AUTO_FILL_HEIGHT":{key:"autofillheight",supercedes:["height"],value:"body"},"ZINDEX":{key:"zindex",value:null},"CONSTRAIN_TO_VIEWPORT":{key:"constraintoviewport",value:false,validator:Lang.isBoolean,supercedes:["iframe","x","y","xy"]},"IFRAME":{key:"iframe",value:(UA.ie==6?true:false),validator:Lang.isBoolean,supercedes:["zindex"]},"PREVENT_CONTEXT_OVERLAP":{key:"preventcontextoverlap",value:false,validator:Lang.isBoolean,supercedes:["constraintoviewport"]}};Overlay.IFRAME_SRC="javascript:false;";Overlay.IFRAME_OFFSET=3;Overlay.VIEWPORT_OFFSET=10;Overlay.TOP_LEFT="tl";Overlay.TOP_RIGHT="tr";Overlay.BOTTOM_LEFT="bl";Overlay.BOTTOM_RIGHT="br";Overlay.CSS_OVERLAY="yui-overlay";Overlay.STD_MOD_RE=/^\s*?(body|footer|header)\s*?$/i;Overlay.windowScrollEvent=new CustomEvent("windowScroll");Overlay.windowResizeEvent=new CustomEvent("windowResize");Overlay.windowScrollHandler=function(e){var t=Event.getTarget(e);if(!t||t===window||t===window.document){if(UA.ie){if(!window.scrollEnd){window.scrollEnd=-1}clearTimeout(window.scrollEnd);window.scrollEnd=setTimeout(function(){Overlay.windowScrollEvent.fire()},1)}else{Overlay.windowScrollEvent.fire()}}};Overlay.windowResizeHandler=function(e){if(UA.ie){if(!window.resizeEnd){window.resizeEnd=-1}clearTimeout(window.resizeEnd);window.resizeEnd=setTimeout(function(){Overlay.windowResizeEvent.fire()},100)}else{Overlay.windowResizeEvent.fire()}};Overlay._initialized=null;if(Overlay._initialized===null){Event.on(window,"scroll",Overlay.windowScrollHandler);Event.on(window,"resize",Overlay.windowResizeHandler);Overlay._initialized=true}Overlay._TRIGGER_MAP={"windowScroll":Overlay.windowScrollEvent,"windowResize":Overlay.windowResizeEvent,"textResize":Module.textResizeEvent};YAHOO.extend(Overlay,Module,{CONTEXT_TRIGGERS:[],init:function(el,userConfig){Overlay.superclass.init.call(this,el);this.beforeInitEvent.fire(Overlay);Dom.addClass(this.element,Overlay.CSS_OVERLAY);if(userConfig){this.cfg.applyConfig(userConfig,true)}if(this.platform=="mac"&&UA.gecko){if(!Config.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this)){this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true)}if(!Config.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this)){this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true)}}this.initEvent.fire(Overlay)},initEvents:function(){Overlay.superclass.initEvents.call(this);var SIGNATURE=CustomEvent.LIST;this.beforeMoveEvent=this.createEvent(EVENT_TYPES.BEFORE_MOVE);this.beforeMoveEvent.signature=SIGNATURE;this.moveEvent=this.createEvent(EVENT_TYPES.MOVE);this.moveEvent.signature=SIGNATURE},initDefaultConfig:function(){Overlay.superclass.initDefaultConfig.call(this);var cfg=this.cfg;cfg.addProperty(DEFAULT_CONFIG.X.key,{handler:this.configX,validator:DEFAULT_CONFIG.X.validator,suppressEvent:DEFAULT_CONFIG.X.suppressEvent,supercedes:DEFAULT_CONFIG.X.supercedes});cfg.addProperty(DEFAULT_CONFIG.Y.key,{handler:this.configY,validator:DEFAULT_CONFIG.Y.validator,suppressEvent:DEFAULT_CONFIG.Y.suppressEvent,supercedes:DEFAULT_CONFIG.Y.supercedes});cfg.addProperty(DEFAULT_CONFIG.XY.key,{handler:this.configXY,suppressEvent:DEFAULT_CONFIG.XY.suppressEvent,supercedes:DEFAULT_CONFIG.XY.supercedes});cfg.addProperty(DEFAULT_CONFIG.CONTEXT.key,{handler:this.configContext,suppressEvent:DEFAULT_CONFIG.CONTEXT.suppressEvent,supercedes:DEFAULT_CONFIG.CONTEXT.supercedes});cfg.addProperty(DEFAULT_CONFIG.FIXED_CENTER.key,{handler:this.configFixedCenter,value:DEFAULT_CONFIG.FIXED_CENTER.value,validator:DEFAULT_CONFIG.FIXED_CENTER.validator,supercedes:DEFAULT_CONFIG.FIXED_CENTER.supercedes});cfg.addProperty(DEFAULT_CONFIG.WIDTH.key,{handler:this.configWidth,suppressEvent:DEFAULT_CONFIG.WIDTH.suppressEvent,supercedes:DEFAULT_CONFIG.WIDTH.supercedes});cfg.addProperty(DEFAULT_CONFIG.HEIGHT.key,{handler:this.configHeight,suppressEvent:DEFAULT_CONFIG.HEIGHT.suppressEvent,supercedes:DEFAULT_CONFIG.HEIGHT.supercedes});cfg.addProperty(DEFAULT_CONFIG.AUTO_FILL_HEIGHT.key,{handler:this.configAutoFillHeight,value:DEFAULT_CONFIG.AUTO_FILL_HEIGHT.value,validator:this._validateAutoFill,supercedes:DEFAULT_CONFIG.AUTO_FILL_HEIGHT.supercedes});cfg.addProperty(DEFAULT_CONFIG.ZINDEX.key,{handler:this.configzIndex,value:DEFAULT_CONFIG.ZINDEX.value});cfg.addProperty(DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.key,{handler:this.configConstrainToViewport,value:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.value,validator:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.validator,supercedes:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.supercedes});cfg.addProperty(DEFAULT_CONFIG.IFRAME.key,{handler:this.configIframe,value:DEFAULT_CONFIG.IFRAME.value,validator:DEFAULT_CONFIG.IFRAME.validator,supercedes:DEFAULT_CONFIG.IFRAME.supercedes});cfg.addProperty(DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.key,{value:DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.value,validator:DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.validator,supercedes:DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.supercedes})},moveTo:function(x,y){this.cfg.setProperty("xy",[x,y])},hideMacGeckoScrollbars:function(){Dom.replaceClass(this.element,"show-scrollbars","hide-scrollbars")},showMacGeckoScrollbars:function(){Dom.replaceClass(this.element,"hide-scrollbars","show-scrollbars")},_setDomVisibility:function(show){Dom.setStyle(this.element,"visibility",(show)?"visible":"hidden");if(show){Dom.removeClass(this.element,"yui-overlay-hidden")}else{Dom.addClass(this.element,"yui-overlay-hidden")}},configVisible:function(type,args,obj){var visible=args[0],currentVis=Dom.getStyle(this.element,"visibility"),effect=this.cfg.getProperty("effect"),effectInstances=[],isMacGecko=(this.platform=="mac"&&UA.gecko),alreadySubscribed=Config.alreadySubscribed,eff,ei,e,i,j,k,h,nEffects,nEffectInstances;if(currentVis=="inherit"){e=this.element.parentNode;while(e.nodeType!=9&&e.nodeType!=11){currentVis=Dom.getStyle(e,"visibility");if(currentVis!="inherit"){break}e=e.parentNode}if(currentVis=="inherit"){currentVis="visible"}}if(effect){if(effect instanceof Array){nEffects=effect.length;for(i=0;i<nEffects;i++){eff=effect[i];effectInstances[effectInstances.length]=eff.effect(this,eff.duration)}}else{effectInstances[effectInstances.length]=effect.effect(this,effect.duration)}}if(visible){if(isMacGecko){this.showMacGeckoScrollbars()}if(effect){if(visible){if(currentVis!="visible"||currentVis===""){this.beforeShowEvent.fire();nEffectInstances=effectInstances.length;for(j=0;j<nEffectInstances;j++){ei=effectInstances[j];if(j===0&&!alreadySubscribed(ei.animateInCompleteEvent,this.showEvent.fire,this.showEvent)){ei.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,true)}ei.animateIn()}}}}else{if(currentVis!="visible"||currentVis===""){this.beforeShowEvent.fire();this._setDomVisibility(true);this.cfg.refireEvent("iframe");this.showEvent.fire()}else{this._setDomVisibility(true)}}}else{if(isMacGecko){this.hideMacGeckoScrollbars()}if(effect){if(currentVis=="visible"){this.beforeHideEvent.fire();nEffectInstances=effectInstances.length;for(k=0;k<nEffectInstances;k++){h=effectInstances[k];if(k===0&&!alreadySubscribed(h.animateOutCompleteEvent,this.hideEvent.fire,this.hideEvent)){h.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,true)}h.animateOut()}}else if(currentVis===""){this._setDomVisibility(false)}}else{if(currentVis=="visible"||currentVis===""){this.beforeHideEvent.fire();this._setDomVisibility(false);this.hideEvent.fire()}else{this._setDomVisibility(false)}}}},doCenterOnDOMEvent:function(){var cfg=this.cfg,fc=cfg.getProperty("fixedcenter");if(cfg.getProperty("visible")){if(fc&&(fc!==_CONTAINED||this.fitsInViewport())){this.center()}}},fitsInViewport:function(){var nViewportOffset=Overlay.VIEWPORT_OFFSET,element=this.element,elementWidth=element.offsetWidth,elementHeight=element.offsetHeight,viewportWidth=Dom.getViewportWidth(),viewportHeight=Dom.getViewportHeight();return((elementWidth+nViewportOffset<viewportWidth)&&(elementHeight+nViewportOffset<viewportHeight))},configFixedCenter:function(type,args,obj){var val=args[0],alreadySubscribed=Config.alreadySubscribed,windowResizeEvent=Overlay.windowResizeEvent,windowScrollEvent=Overlay.windowScrollEvent;if(val){this.center();if(!alreadySubscribed(this.beforeShowEvent,this.center)){this.beforeShowEvent.subscribe(this.center)}if(!alreadySubscribed(windowResizeEvent,this.doCenterOnDOMEvent,this)){windowResizeEvent.subscribe(this.doCenterOnDOMEvent,this,true)}if(!alreadySubscribed(windowScrollEvent,this.doCenterOnDOMEvent,this)){windowScrollEvent.subscribe(this.doCenterOnDOMEvent,this,true)}}else{this.beforeShowEvent.unsubscribe(this.center);windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this)}},configHeight:function(type,args,obj){var height=args[0],el=this.element;Dom.setStyle(el,"height",height);this.cfg.refireEvent("iframe")},configAutoFillHeight:function(type,args,obj){var fillEl=args[0],cfg=this.cfg,autoFillHeight="autofillheight",height="height",currEl=cfg.getProperty(autoFillHeight),autoFill=this._autoFillOnHeightChange;cfg.unsubscribeFromConfigEvent(height,autoFill);Module.textResizeEvent.unsubscribe(autoFill);this.changeContentEvent.unsubscribe(autoFill);if(currEl&&fillEl!==currEl&&this[currEl]){Dom.setStyle(this[currEl],height,"")}if(fillEl){fillEl=Lang.trim(fillEl.toLowerCase());cfg.subscribeToConfigEvent(height,autoFill,this[fillEl],this);Module.textResizeEvent.subscribe(autoFill,this[fillEl],this);this.changeContentEvent.subscribe(autoFill,this[fillEl],this);cfg.setProperty(autoFillHeight,fillEl,true)}},configWidth:function(type,args,obj){var width=args[0],el=this.element;Dom.setStyle(el,"width",width);this.cfg.refireEvent("iframe")},configzIndex:function(type,args,obj){var zIndex=args[0],el=this.element;if(!zIndex){zIndex=Dom.getStyle(el,"zIndex");if(!zIndex||isNaN(zIndex)){zIndex=0}}if(this.iframe||this.cfg.getProperty("iframe")===true){if(zIndex<=0){zIndex=1}}Dom.setStyle(el,"zIndex",zIndex);this.cfg.setProperty("zIndex",zIndex,true);if(this.iframe){this.stackIframe()}},configXY:function(type,args,obj){var pos=args[0],x=pos[0],y=pos[1];this.cfg.setProperty("x",x);this.cfg.setProperty("y",y);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y])},configX:function(type,args,obj){var x=args[0],y=this.cfg.getProperty("y");this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");Dom.setX(this.element,x,true);this.cfg.setProperty("xy",[x,y],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y])},configY:function(type,args,obj){var x=this.cfg.getProperty("x"),y=args[0];this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");Dom.setY(this.element,y,true);this.cfg.setProperty("xy",[x,y],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y])},showIframe:function(){var oIFrame=this.iframe,oParentNode;if(oIFrame){oParentNode=this.element.parentNode;if(oParentNode!=oIFrame.parentNode){this._addToParent(oParentNode,oIFrame)}oIFrame.style.display="block"}},hideIframe:function(){if(this.iframe){this.iframe.style.display="none"}},syncIframe:function(){var oIFrame=this.iframe,oElement=this.element,nOffset=Overlay.IFRAME_OFFSET,nDimensionOffset=(nOffset*2),aXY;if(oIFrame){oIFrame.style.width=(oElement.offsetWidth+nDimensionOffset+"px");oIFrame.style.height=(oElement.offsetHeight+nDimensionOffset+"px");aXY=this.cfg.getProperty("xy");if(!Lang.isArray(aXY)||(isNaN(aXY[0])||isNaN(aXY[1]))){this.syncPosition();aXY=this.cfg.getProperty("xy")}Dom.setXY(oIFrame,[(aXY[0]-nOffset),(aXY[1]-nOffset)])}},stackIframe:function(){if(this.iframe){var overlayZ=Dom.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(overlayZ)&&!isNaN(overlayZ)){Dom.setStyle(this.iframe,"zIndex",(overlayZ-1))}}},configIframe:function(type,args,obj){var bIFrame=args[0];function createIFrame(){var oIFrame=this.iframe,oElement=this.element,oParent;if(!oIFrame){if(!m_oIFrameTemplate){m_oIFrameTemplate=document.createElement("iframe");if(this.isSecure){m_oIFrameTemplate.src=Overlay.IFRAME_SRC}if(UA.ie){m_oIFrameTemplate.style.filter="alpha(opacity=0)";m_oIFrameTemplate.frameBorder=0}else{m_oIFrameTemplate.style.opacity="0"}m_oIFrameTemplate.style.position="absolute";m_oIFrameTemplate.style.border="none";m_oIFrameTemplate.style.margin="0";m_oIFrameTemplate.style.padding="0";m_oIFrameTemplate.style.display="none";m_oIFrameTemplate.tabIndex=-1}oIFrame=m_oIFrameTemplate.cloneNode(false);oParent=oElement.parentNode;var parentNode=oParent||document.body;this._addToParent(parentNode,oIFrame);this.iframe=oIFrame}this.showIframe();this.syncIframe();this.stackIframe();if(!this._hasIframeEventListeners){this.showEvent.subscribe(this.showIframe);this.hideEvent.subscribe(this.hideIframe);this.changeContentEvent.subscribe(this.syncIframe);this._hasIframeEventListeners=true}}function onBeforeShow(){createIFrame.call(this);this.beforeShowEvent.unsubscribe(onBeforeShow);this._iframeDeferred=false}if(bIFrame){if(this.cfg.getProperty("visible")){createIFrame.call(this)}else{if(!this._iframeDeferred){this.beforeShowEvent.subscribe(onBeforeShow);this._iframeDeferred=true}}}else{this.hideIframe();if(this._hasIframeEventListeners){this.showEvent.unsubscribe(this.showIframe);this.hideEvent.unsubscribe(this.hideIframe);this.changeContentEvent.unsubscribe(this.syncIframe);this._hasIframeEventListeners=false}}},_primeXYFromDOM:function(){if(YAHOO.lang.isUndefined(this.cfg.getProperty("xy"))){this.syncPosition();this.cfg.refireEvent("xy");this.beforeShowEvent.unsubscribe(this._primeXYFromDOM)}},configConstrainToViewport:function(type,args,obj){var val=args[0];if(val){if(!Config.alreadySubscribed(this.beforeMoveEvent,this.enforceConstraints,this)){this.beforeMoveEvent.subscribe(this.enforceConstraints,this,true)}if(!Config.alreadySubscribed(this.beforeShowEvent,this._primeXYFromDOM)){this.beforeShowEvent.subscribe(this._primeXYFromDOM)}}else{this.beforeShowEvent.unsubscribe(this._primeXYFromDOM);this.beforeMoveEvent.unsubscribe(this.enforceConstraints,this)}},configContext:function(type,args,obj){var contextArgs=args[0],contextEl,elementMagnetCorner,contextMagnetCorner,triggers,defTriggers=this.CONTEXT_TRIGGERS;if(contextArgs){contextEl=contextArgs[0];elementMagnetCorner=contextArgs[1];contextMagnetCorner=contextArgs[2];triggers=contextArgs[3];if(defTriggers&&defTriggers.length>0){triggers=(triggers||[]).concat(defTriggers)}if(contextEl){if(typeof contextEl=="string"){this.cfg.setProperty("context",[document.getElementById(contextEl),elementMagnetCorner,contextMagnetCorner,triggers],true)}if(elementMagnetCorner&&contextMagnetCorner){this.align(elementMagnetCorner,contextMagnetCorner)}if(this._contextTriggers){this._processTriggers(this._contextTriggers,_UNSUBSCRIBE,this._alignOnTrigger)}if(triggers){this._processTriggers(triggers,_SUBSCRIBE,this._alignOnTrigger);this._contextTriggers=triggers}}}},_alignOnTrigger:function(type,args){this.align()},_findTriggerCE:function(t){var tce=null;if(t instanceof CustomEvent){tce=t}else if(Overlay._TRIGGER_MAP[t]){tce=Overlay._TRIGGER_MAP[t]}return tce},_processTriggers:function(triggers,mode,fn){var t,tce;for(var i=0,l=triggers.length;i<l;++i){t=triggers[i];tce=this._findTriggerCE(t);if(tce){tce[mode](fn,this,true)}else{this[mode](t,fn)}}},align:function(elementAlign,contextAlign){var contextArgs=this.cfg.getProperty("context"),me=this,context,element,contextRegion;function doAlign(v,h){switch(elementAlign){case Overlay.TOP_LEFT:me.moveTo(h,v);break;case Overlay.TOP_RIGHT:me.moveTo((h-element.offsetWidth),v);break;case Overlay.BOTTOM_LEFT:me.moveTo(h,(v-element.offsetHeight));break;case Overlay.BOTTOM_RIGHT:me.moveTo((h-element.offsetWidth),(v-element.offsetHeight));break}}if(contextArgs){context=contextArgs[0];element=this.element;me=this;if(!elementAlign){elementAlign=contextArgs[1]}if(!contextAlign){contextAlign=contextArgs[2]}if(element&&context){contextRegion=Dom.getRegion(context);switch(contextAlign){case Overlay.TOP_LEFT:doAlign(contextRegion.top,contextRegion.left);break;case Overlay.TOP_RIGHT:doAlign(contextRegion.top,contextRegion.right);break;case Overlay.BOTTOM_LEFT:doAlign(contextRegion.bottom,contextRegion.left);break;case Overlay.BOTTOM_RIGHT:doAlign(contextRegion.bottom,contextRegion.right);break}}}},enforceConstraints:function(type,args,obj){var pos=args[0];var cXY=this.getConstrainedXY(pos[0],pos[1]);this.cfg.setProperty("x",cXY[0],true);this.cfg.setProperty("y",cXY[1],true);this.cfg.setProperty("xy",cXY,true)},getConstrainedX:function(x){var oOverlay=this,oOverlayEl=oOverlay.element,nOverlayOffsetWidth=oOverlayEl.offsetWidth,nViewportOffset=Overlay.VIEWPORT_OFFSET,viewPortWidth=Dom.getViewportWidth(),scrollX=Dom.getDocumentScrollLeft(),bCanConstrain=(nOverlayOffsetWidth+nViewportOffset<viewPortWidth),aContext=this.cfg.getProperty("context"),oContextEl,nContextElX,nContextElWidth,bFlipped=false,nLeftRegionWidth,nRightRegionWidth,leftConstraint=scrollX+nViewportOffset,rightConstraint=scrollX+viewPortWidth-nOverlayOffsetWidth-nViewportOffset,xNew=x,oOverlapPositions={"tltr":true,"blbr":true,"brbl":true,"trtl":true};var flipHorizontal=function(){var nNewX;if((oOverlay.cfg.getProperty("x")-scrollX)>nContextElX){nNewX=(nContextElX-nOverlayOffsetWidth)}else{nNewX=(nContextElX+nContextElWidth)}oOverlay.cfg.setProperty("x",(nNewX+scrollX),true);return nNewX};var getDisplayRegionWidth=function(){if((oOverlay.cfg.getProperty("x")-scrollX)>nContextElX){return(nRightRegionWidth-nViewportOffset)}else{return(nLeftRegionWidth-nViewportOffset)}};var setHorizontalPosition=function(){var nDisplayRegionWidth=getDisplayRegionWidth(),fnReturnVal;if(nOverlayOffsetWidth>nDisplayRegionWidth){if(bFlipped){flipHorizontal()}else{flipHorizontal();bFlipped=true;fnReturnVal=setHorizontalPosition()}}return fnReturnVal};if(x<leftConstraint||x>rightConstraint){if(bCanConstrain){if(this.cfg.getProperty("preventcontextoverlap")&&aContext&&oOverlapPositions[(aContext[1]+aContext[2])]){oContextEl=aContext[0];nContextElX=Dom.getX(oContextEl)-scrollX;nContextElWidth=oContextEl.offsetWidth;nLeftRegionWidth=nContextElX;nRightRegionWidth=(viewPortWidth-(nContextElX+nContextElWidth));setHorizontalPosition();xNew=this.cfg.getProperty("x")}else{if(x<leftConstraint){xNew=leftConstraint}else if(x>rightConstraint){xNew=rightConstraint}}}else{xNew=nViewportOffset+scrollX}}return xNew},getConstrainedY:function(y){var oOverlay=this,oOverlayEl=oOverlay.element,nOverlayOffsetHeight=oOverlayEl.offsetHeight,nViewportOffset=Overlay.VIEWPORT_OFFSET,viewPortHeight=Dom.getViewportHeight(),scrollY=Dom.getDocumentScrollTop(),bCanConstrain=(nOverlayOffsetHeight+nViewportOffset<viewPortHeight),aContext=this.cfg.getProperty("context"),oContextEl,nContextElY,nContextElHeight,bFlipped=false,nTopRegionHeight,nBottomRegionHeight,topConstraint=scrollY+nViewportOffset,bottomConstraint=scrollY+viewPortHeight-nOverlayOffsetHeight-nViewportOffset,yNew=y,oOverlapPositions={"trbr":true,"tlbl":true,"bltl":true,"brtr":true};var flipVertical=function(){var nNewY;if((oOverlay.cfg.getProperty("y")-scrollY)>nContextElY){nNewY=(nContextElY-nOverlayOffsetHeight)}else{nNewY=(nContextElY+nContextElHeight)}oOverlay.cfg.setProperty("y",(nNewY+scrollY),true);return nNewY};var getDisplayRegionHeight=function(){if((oOverlay.cfg.getProperty("y")-scrollY)>nContextElY){return(nBottomRegionHeight-nViewportOffset)}else{return(nTopRegionHeight-nViewportOffset)}};var setVerticalPosition=function(){var nDisplayRegionHeight=getDisplayRegionHeight(),fnReturnVal;if(nOverlayOffsetHeight>nDisplayRegionHeight){if(bFlipped){flipVertical()}else{flipVertical();bFlipped=true;fnReturnVal=setVerticalPosition()}}return fnReturnVal};if(y<topConstraint||y>bottomConstraint){if(bCanConstrain){if(this.cfg.getProperty("preventcontextoverlap")&&aContext&&oOverlapPositions[(aContext[1]+aContext[2])]){oContextEl=aContext[0];nContextElHeight=oContextEl.offsetHeight;nContextElY=(Dom.getY(oContextEl)-scrollY);nTopRegionHeight=nContextElY;nBottomRegionHeight=(viewPortHeight-(nContextElY+nContextElHeight));setVerticalPosition();yNew=oOverlay.cfg.getProperty("y")}else{if(y<topConstraint){yNew=topConstraint}else if(y>bottomConstraint){yNew=bottomConstraint}}}else{yNew=nViewportOffset+scrollY}}return yNew},getConstrainedXY:function(x,y){return[this.getConstrainedX(x),this.getConstrainedY(y)]},center:function(){var nViewportOffset=Overlay.VIEWPORT_OFFSET,elementWidth=this.element.offsetWidth,elementHeight=this.element.offsetHeight,viewPortWidth=Dom.getViewportWidth(),viewPortHeight=Dom.getViewportHeight(),x,y;if(elementWidth<viewPortWidth){x=(viewPortWidth/2)-(elementWidth/2)+Dom.getDocumentScrollLeft()}else{x=nViewportOffset+Dom.getDocumentScrollLeft()}if(elementHeight<viewPortHeight){y=(viewPortHeight/2)-(elementHeight/2)+Dom.getDocumentScrollTop()}else{y=nViewportOffset+Dom.getDocumentScrollTop()}this.cfg.setProperty("xy",[parseInt(x,10),parseInt(y,10)]);this.cfg.refireEvent("iframe");if(UA.webkit){this.forceContainerRedraw()}},syncPosition:function(){var pos=Dom.getXY(this.element);this.cfg.setProperty("x",pos[0],true);this.cfg.setProperty("y",pos[1],true);this.cfg.setProperty("xy",pos,true)},onDomResize:function(e,obj){var me=this;Overlay.superclass.onDomResize.call(this,e,obj);setTimeout(function(){me.syncPosition();me.cfg.refireEvent("iframe");me.cfg.refireEvent("context")},0)},_getComputedHeight:(function(){if(document.defaultView&&document.defaultView.getComputedStyle){return function(el){var height=null;if(el.ownerDocument&&el.ownerDocument.defaultView){var computed=el.ownerDocument.defaultView.getComputedStyle(el,'');if(computed){height=parseInt(computed.height,10)}}return(Lang.isNumber(height))?height:null}}else{return function(el){var height=null;if(el.style.pixelHeight){height=el.style.pixelHeight}return(Lang.isNumber(height))?height:null}}})(),_validateAutoFillHeight:function(val){return(!val)||(Lang.isString(val)&&Overlay.STD_MOD_RE.test(val))},_autoFillOnHeightChange:function(type,args,el){var height=this.cfg.getProperty("height");if((height&&height!=="auto")||(height===0)){this.fillHeight(el)}},_getPreciseHeight:function(el){var height=el.offsetHeight;if(el.getBoundingClientRect){var rect=el.getBoundingClientRect();height=rect.bottom-rect.top}return height},fillHeight:function(el){if(el){var container=this.innerElement||this.element,containerEls=[this.header,this.body,this.footer],containerEl,total=0,filled=0,remaining=0,validEl=false;for(var i=0,l=containerEls.length;i<l;i++){containerEl=containerEls[i];if(containerEl){if(el!==containerEl){filled+=this._getPreciseHeight(containerEl)}else{validEl=true}}}if(validEl){if(UA.ie||UA.opera){Dom.setStyle(el,'height',0+'px')}total=this._getComputedHeight(container);if(total===null){Dom.addClass(container,"yui-override-padding");total=container.clientHeight;Dom.removeClass(container,"yui-override-padding")}remaining=Math.max(total-filled,0);Dom.setStyle(el,"height",remaining+"px");if(el.offsetHeight!=remaining){remaining=Math.max(remaining-(el.offsetHeight-remaining),0)}Dom.setStyle(el,"height",remaining+"px")}}},bringToTop:function(){var aOverlays=[],oElement=this.element;function compareZIndexDesc(p_oOverlay1,p_oOverlay2){var sZIndex1=Dom.getStyle(p_oOverlay1,"zIndex"),sZIndex2=Dom.getStyle(p_oOverlay2,"zIndex"),nZIndex1=(!sZIndex1||isNaN(sZIndex1))?0:parseInt(sZIndex1,10),nZIndex2=(!sZIndex2||isNaN(sZIndex2))?0:parseInt(sZIndex2,10);if(nZIndex1>nZIndex2){return-1}else if(nZIndex1<nZIndex2){return 1}else{return 0}}function isOverlayElement(p_oElement){var isOverlay=Dom.hasClass(p_oElement,Overlay.CSS_OVERLAY),Panel=YAHOO.widget.Panel;if(isOverlay&&!Dom.isAncestor(oElement,p_oElement)){if(Panel&&Dom.hasClass(p_oElement,Panel.CSS_PANEL)){aOverlays[aOverlays.length]=p_oElement.parentNode}else{aOverlays[aOverlays.length]=p_oElement}}}Dom.getElementsBy(isOverlayElement,"DIV",document.body);aOverlays.sort(compareZIndexDesc);var oTopOverlay=aOverlays[0],nTopZIndex;if(oTopOverlay){nTopZIndex=Dom.getStyle(oTopOverlay,"zIndex");if(!isNaN(nTopZIndex)){var bRequiresBump=false;if(oTopOverlay!=oElement){bRequiresBump=true}else if(aOverlays.length>1){var nNextZIndex=Dom.getStyle(aOverlays[1],"zIndex");if(!isNaN(nNextZIndex)&&(nTopZIndex==nNextZIndex)){bRequiresBump=true}}if(bRequiresBump){this.cfg.setProperty("zindex",(parseInt(nTopZIndex,10)+2))}}}},destroy:function(){if(this.iframe){this.iframe.parentNode.removeChild(this.iframe)}this.iframe=null;Overlay.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);Overlay.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this);Module.textResizeEvent.unsubscribe(this._autoFillOnHeightChange);Overlay.superclass.destroy.call(this)},forceContainerRedraw:function(){var c=this;Dom.addClass(c.element,"yui-force-redraw");setTimeout(function(){Dom.removeClass(c.element,"yui-force-redraw")},0)},toString:function(){return"Overlay "+this.id}})}());(function(){YAHOO.widget.OverlayManager=function(userConfig){this.init(userConfig)};var Overlay=YAHOO.widget.Overlay,Event=YAHOO.util.Event,Dom=YAHOO.util.Dom,Config=YAHOO.util.Config,CustomEvent=YAHOO.util.CustomEvent,OverlayManager=YAHOO.widget.OverlayManager;OverlayManager.CSS_FOCUSED="focused";OverlayManager.prototype={constructor:OverlayManager,overlays:null,initDefaultConfig:function(){this.cfg.addProperty("overlays",{suppressEvent:true});this.cfg.addProperty("focusevent",{value:"mousedown"})},init:function(userConfig){this.cfg=new Config(this);this.initDefaultConfig();if(userConfig){this.cfg.applyConfig(userConfig,true)}this.cfg.fireQueue();var activeOverlay=null;this.getActive=function(){return activeOverlay};this.focus=function(overlay){var o=this.find(overlay);if(o){o.focus()}};this.remove=function(overlay){var o=this.find(overlay),originalZ;if(o){if(activeOverlay==o){activeOverlay=null}var bDestroyed=(o.element===null&&o.cfg===null)?true:false;if(!bDestroyed){originalZ=Dom.getStyle(o.element,"zIndex");o.cfg.setProperty("zIndex",-1000,true)}this.overlays.sort(this.compareZIndexDesc);this.overlays=this.overlays.slice(0,(this.overlays.length-1));o.hideEvent.unsubscribe(o.blur);o.destroyEvent.unsubscribe(this._onOverlayDestroy,o);o.focusEvent.unsubscribe(this._onOverlayFocusHandler,o);o.blurEvent.unsubscribe(this._onOverlayBlurHandler,o);if(!bDestroyed){Event.removeListener(o.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus);o.cfg.setProperty("zIndex",originalZ,true);o.cfg.setProperty("manager",null)}if(o.focusEvent._managed){o.focusEvent=null}if(o.blurEvent._managed){o.blurEvent=null}if(o.focus._managed){o.focus=null}if(o.blur._managed){o.blur=null}}};this.blurAll=function(){var nOverlays=this.overlays.length,i;if(nOverlays>0){i=nOverlays-1;do{this.overlays[i].blur()}while(i--)}};this._manageBlur=function(overlay){var changed=false;if(activeOverlay==overlay){Dom.removeClass(activeOverlay.element,OverlayManager.CSS_FOCUSED);activeOverlay=null;changed=true}return changed};this._manageFocus=function(overlay){var changed=false;if(activeOverlay!=overlay){if(activeOverlay){activeOverlay.blur()}activeOverlay=overlay;this.bringToTop(activeOverlay);Dom.addClass(activeOverlay.element,OverlayManager.CSS_FOCUSED);changed=true}return changed};var overlays=this.cfg.getProperty("overlays");if(!this.overlays){this.overlays=[]}if(overlays){this.register(overlays);this.overlays.sort(this.compareZIndexDesc)}},_onOverlayElementFocus:function(p_oEvent){var oTarget=Event.getTarget(p_oEvent),oClose=this.close;if(oClose&&(oTarget==oClose||Dom.isAncestor(oClose,oTarget))){this.blur()}else{this.focus()}},_onOverlayDestroy:function(p_sType,p_aArgs,p_oOverlay){this.remove(p_oOverlay)},_onOverlayFocusHandler:function(p_sType,p_aArgs,p_oOverlay){this._manageFocus(p_oOverlay)},_onOverlayBlurHandler:function(p_sType,p_aArgs,p_oOverlay){this._manageBlur(p_oOverlay)},_bindFocus:function(overlay){var mgr=this;if(!overlay.focusEvent){overlay.focusEvent=overlay.createEvent("focus");overlay.focusEvent.signature=CustomEvent.LIST;overlay.focusEvent._managed=true}else{overlay.focusEvent.subscribe(mgr._onOverlayFocusHandler,overlay,mgr)}if(!overlay.focus){Event.on(overlay.element,mgr.cfg.getProperty("focusevent"),mgr._onOverlayElementFocus,null,overlay);overlay.focus=function(){if(mgr._manageFocus(this)){if(this.cfg.getProperty("visible")&&this.focusFirst){this.focusFirst()}this.focusEvent.fire()}};overlay.focus._managed=true}},_bindBlur:function(overlay){var mgr=this;if(!overlay.blurEvent){overlay.blurEvent=overlay.createEvent("blur");overlay.blurEvent.signature=CustomEvent.LIST;overlay.focusEvent._managed=true}else{overlay.blurEvent.subscribe(mgr._onOverlayBlurHandler,overlay,mgr)}if(!overlay.blur){overlay.blur=function(){if(mgr._manageBlur(this)){this.blurEvent.fire()}};overlay.blur._managed=true}overlay.hideEvent.subscribe(overlay.blur)},_bindDestroy:function(overlay){var mgr=this;overlay.destroyEvent.subscribe(mgr._onOverlayDestroy,overlay,mgr)},_syncZIndex:function(overlay){var zIndex=Dom.getStyle(overlay.element,"zIndex");if(!isNaN(zIndex)){overlay.cfg.setProperty("zIndex",parseInt(zIndex,10))}else{overlay.cfg.setProperty("zIndex",0)}},register:function(overlay){var registered=false,i,n;if(overlay instanceof Overlay){overlay.cfg.addProperty("manager",{value:this});this._bindFocus(overlay);this._bindBlur(overlay);this._bindDestroy(overlay);this._syncZIndex(overlay);this.overlays.push(overlay);this.bringToTop(overlay);registered=true}else if(overlay instanceof Array){for(i=0,n=overlay.length;i<n;i++){registered=this.register(overlay[i])||registered}}return registered},bringToTop:function(p_oOverlay){var oOverlay=this.find(p_oOverlay),nTopZIndex,oTopOverlay,aOverlays;if(oOverlay){aOverlays=this.overlays;aOverlays.sort(this.compareZIndexDesc);oTopOverlay=aOverlays[0];if(oTopOverlay){nTopZIndex=Dom.getStyle(oTopOverlay.element,"zIndex");if(!isNaN(nTopZIndex)){var bRequiresBump=false;if(oTopOverlay!==oOverlay){bRequiresBump=true}else if(aOverlays.length>1){var nNextZIndex=Dom.getStyle(aOverlays[1].element,"zIndex");if(!isNaN(nNextZIndex)&&(nTopZIndex==nNextZIndex)){bRequiresBump=true}}if(bRequiresBump){oOverlay.cfg.setProperty("zindex",(parseInt(nTopZIndex,10)+2))}}aOverlays.sort(this.compareZIndexDesc)}}},find:function(overlay){var isInstance=overlay instanceof Overlay,overlays=this.overlays,n=overlays.length,found=null,o,i;if(isInstance||typeof overlay=="string"){for(i=n-1;i>=0;i--){o=overlays[i];if((isInstance&&(o===overlay))||(o.id==overlay)){found=o;break}}}return found},compareZIndexDesc:function(o1,o2){var zIndex1=(o1.cfg)?o1.cfg.getProperty("zIndex"):null,zIndex2=(o2.cfg)?o2.cfg.getProperty("zIndex"):null;if(zIndex1===null&&zIndex2===null){return 0}else if(zIndex1===null){return 1}else if(zIndex2===null){return-1}else if(zIndex1>zIndex2){return-1}else if(zIndex1<zIndex2){return 1}else{return 0}},showAll:function(){var overlays=this.overlays,n=overlays.length,i;for(i=n-1;i>=0;i--){overlays[i].show()}},hideAll:function(){var overlays=this.overlays,n=overlays.length,i;for(i=n-1;i>=0;i--){overlays[i].hide()}},toString:function(){return"OverlayManager"}}}());(function(){YAHOO.widget.ContainerEffect=function(overlay,attrIn,attrOut,targetElement,animClass){if(!animClass){animClass=YAHOO.util.Anim}this.overlay=overlay;this.attrIn=attrIn;this.attrOut=attrOut;this.targetElement=targetElement||overlay.element;this.animClass=animClass};var Dom=YAHOO.util.Dom,CustomEvent=YAHOO.util.CustomEvent,ContainerEffect=YAHOO.widget.ContainerEffect;ContainerEffect.FADE=function(overlay,dur){var Easing=YAHOO.util.Easing,fin={attributes:{opacity:{from:0,to:1}},duration:dur,method:Easing.easeIn},fout={attributes:{opacity:{to:0}},duration:dur,method:Easing.easeOut},fade=new ContainerEffect(overlay,fin,fout,overlay.element);fade.handleUnderlayStart=function(){var underlay=this.overlay.underlay;if(underlay&&YAHOO.env.ua.ie){var hasFilters=(underlay.filters&&underlay.filters.length>0);if(hasFilters){Dom.addClass(overlay.element,"yui-effect-fade")}}};fade.handleUnderlayComplete=function(){var underlay=this.overlay.underlay;if(underlay&&YAHOO.env.ua.ie){Dom.removeClass(overlay.element,"yui-effect-fade")}};fade.handleStartAnimateIn=function(type,args,obj){Dom.addClass(obj.overlay.element,"hide-select");if(!obj.overlay.underlay){obj.overlay.cfg.refireEvent("underlay")}obj.handleUnderlayStart();obj.overlay._setDomVisibility(true);Dom.setStyle(obj.overlay.element,"opacity",0)};fade.handleCompleteAnimateIn=function(type,args,obj){Dom.removeClass(obj.overlay.element,"hide-select");if(obj.overlay.element.style.filter){obj.overlay.element.style.filter=null}obj.handleUnderlayComplete();obj.overlay.cfg.refireEvent("iframe");obj.animateInCompleteEvent.fire()};fade.handleStartAnimateOut=function(type,args,obj){Dom.addClass(obj.overlay.element,"hide-select");obj.handleUnderlayStart()};fade.handleCompleteAnimateOut=function(type,args,obj){Dom.removeClass(obj.overlay.element,"hide-select");if(obj.overlay.element.style.filter){obj.overlay.element.style.filter=null}obj.overlay._setDomVisibility(false);Dom.setStyle(obj.overlay.element,"opacity",1);obj.handleUnderlayComplete();obj.overlay.cfg.refireEvent("iframe");obj.animateOutCompleteEvent.fire()};fade.init();return fade};ContainerEffect.SLIDE=function(overlay,dur){var Easing=YAHOO.util.Easing,x=overlay.cfg.getProperty("x")||Dom.getX(overlay.element),y=overlay.cfg.getProperty("y")||Dom.getY(overlay.element),clientWidth=Dom.getClientWidth(),offsetWidth=overlay.element.offsetWidth,sin={attributes:{points:{to:[x,y]}},duration:dur,method:Easing.easeIn},sout={attributes:{points:{to:[(clientWidth+25),y]}},duration:dur,method:Easing.easeOut},slide=new ContainerEffect(overlay,sin,sout,overlay.element,YAHOO.util.Motion);slide.handleStartAnimateIn=function(type,args,obj){obj.overlay.element.style.left=((-25)-offsetWidth)+"px";obj.overlay.element.style.top=y+"px"};slide.handleTweenAnimateIn=function(type,args,obj){var pos=Dom.getXY(obj.overlay.element),currentX=pos[0],currentY=pos[1];if(Dom.getStyle(obj.overlay.element,"visibility")=="hidden"&&currentX<x){obj.overlay._setDomVisibility(true)}obj.overlay.cfg.setProperty("xy",[currentX,currentY],true);obj.overlay.cfg.refireEvent("iframe")};slide.handleCompleteAnimateIn=function(type,args,obj){obj.overlay.cfg.setProperty("xy",[x,y],true);obj.startX=x;obj.startY=y;obj.overlay.cfg.refireEvent("iframe");obj.animateInCompleteEvent.fire()};slide.handleStartAnimateOut=function(type,args,obj){var vw=Dom.getViewportWidth(),pos=Dom.getXY(obj.overlay.element),yso=pos[1];obj.animOut.attributes.points.to=[(vw+25),yso]};slide.handleTweenAnimateOut=function(type,args,obj){var pos=Dom.getXY(obj.overlay.element),xto=pos[0],yto=pos[1];obj.overlay.cfg.setProperty("xy",[xto,yto],true);obj.overlay.cfg.refireEvent("iframe")};slide.handleCompleteAnimateOut=function(type,args,obj){obj.overlay._setDomVisibility(false);obj.overlay.cfg.setProperty("xy",[x,y]);obj.animateOutCompleteEvent.fire()};slide.init();return slide};ContainerEffect.prototype={init:function(){this.beforeAnimateInEvent=this.createEvent("beforeAnimateIn");this.beforeAnimateInEvent.signature=CustomEvent.LIST;this.beforeAnimateOutEvent=this.createEvent("beforeAnimateOut");this.beforeAnimateOutEvent.signature=CustomEvent.LIST;this.animateInCompleteEvent=this.createEvent("animateInComplete");this.animateInCompleteEvent.signature=CustomEvent.LIST;this.animateOutCompleteEvent=this.createEvent("animateOutComplete");this.animateOutCompleteEvent.signature=CustomEvent.LIST;this.animIn=new this.animClass(this.targetElement,this.attrIn.attributes,this.attrIn.duration,this.attrIn.method);this.animIn.onStart.subscribe(this.handleStartAnimateIn,this);this.animIn.onTween.subscribe(this.handleTweenAnimateIn,this);this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn,this);this.animOut=new this.animClass(this.targetElement,this.attrOut.attributes,this.attrOut.duration,this.attrOut.method);this.animOut.onStart.subscribe(this.handleStartAnimateOut,this);this.animOut.onTween.subscribe(this.handleTweenAnimateOut,this);this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut,this)},animateIn:function(){this.beforeAnimateInEvent.fire();this.animIn.animate()},animateOut:function(){this.beforeAnimateOutEvent.fire();this.animOut.animate()},handleStartAnimateIn:function(type,args,obj){},handleTweenAnimateIn:function(type,args,obj){},handleCompleteAnimateIn:function(type,args,obj){},handleStartAnimateOut:function(type,args,obj){},handleTweenAnimateOut:function(type,args,obj){},handleCompleteAnimateOut:function(type,args,obj){},toString:function(){var output="ContainerEffect";if(this.overlay){output+=" ["+this.overlay.toString()+"]"}return output}};YAHOO.lang.augmentProto(ContainerEffect,YAHOO.util.EventProvider)})();YAHOO.register("containercore",YAHOO.widget.Module,{version:"2.7.0",build:"1799"});/*
245 237 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
246 238 Code licensed under the BSD License:
247 239 http://developer.yahoo.net/yui/license.txt
... ... @@ -256,8 +248,7 @@ if(Aq.ie){AN.later(0,this,function(){A9.call(this);this.syncIframe();});this.cfg
256 248 A3.addProperty(Ad.key,{value:Ad.value,validator:Ad.validator,supercedes:Ad.supercedes,suppressEvent:Ad.suppressEvent});A3.addProperty(N.key,{value:N.value,validator:N.validator,supercedes:N.supercedes,suppressEvent:N.suppressEvent});A3.addProperty(X.key,{handler:this.configMaxHeight,value:X.value,validator:X.validator,suppressEvent:X.suppressEvent,supercedes:X.supercedes});A3.addProperty(W.key,{handler:this.configClassName,value:W.value,validator:W.validator,supercedes:W.supercedes});A3.addProperty(b.key,{handler:this.configDisabled,value:b.value,validator:b.validator,suppressEvent:b.suppressEvent});A3.addProperty(I.key,{handler:this.configShadow,value:I.value,validator:I.validator});A3.addProperty(Aj.key,{value:Aj.value,validator:Aj.validator});}});})();(function(){YAHOO.widget.MenuItem=function(AS,AR){if(AS){if(AR){this.parent=AR.parent;this.value=AR.value;this.id=AR.id;}this.init(AS,AR);}};var x=YAHOO.util.Dom,j=YAHOO.widget.Module,AB=YAHOO.widget.Menu,c=YAHOO.widget.MenuItem,AK=YAHOO.util.CustomEvent,k=YAHOO.env.ua,AQ=YAHOO.lang,AL="text",O="#",Q="-",L="helptext",n="url",AH="target",A="emphasis",N="strongemphasis",b="checked",w="submenu",H="disabled",B="selected",P="hassubmenu",U="checked-disabled",AI="hassubmenu-disabled",AD="hassubmenu-selected",T="checked-selected",q="onclick",J="classname",AJ="",i="OPTION",v="OPTGROUP",K="LI",AE="href",r="SELECT",X="DIV",AN='<em class="helptext">',a="<em>",I="</em>",W="<strong>",y="</strong>",Y="preventcontextoverlap",h="obj",AG="scope",t="none",V="visible",E=" ",m="MenuItem",AA="click",D="show",M="hide",S="li",AF='<a href="#"></a>',p=[["mouseOverEvent","mouseover"],["mouseOutEvent","mouseout"],["mouseDownEvent","mousedown"],["mouseUpEvent","mouseup"],["clickEvent",AA],["keyPressEvent","keypress"],["keyDownEvent","keydown"],["keyUpEvent","keyup"],["focusEvent","focus"],["blurEvent","blur"],["destroyEvent","destroy"]],o={key:AL,value:AJ,validator:AQ.isString,suppressEvent:true},s={key:L,supercedes:[AL],suppressEvent:true},G={key:n,value:O,suppressEvent:true},AO={key:AH,suppressEvent:true},AP={key:A,value:false,validator:AQ.isBoolean,suppressEvent:true,supercedes:[AL]},d={key:N,value:false,validator:AQ.isBoolean,suppressEvent:true,supercedes:[AL]},l={key:b,value:false,validator:AQ.isBoolean,suppressEvent:true,supercedes:[H,B]},F={key:w,suppressEvent:true,supercedes:[H,B]},AM={key:H,value:false,validator:AQ.isBoolean,suppressEvent:true,supercedes:[AL,B]},f={key:B,value:false,validator:AQ.isBoolean,suppressEvent:true},u={key:q,suppressEvent:true},AC={key:J,value:null,validator:AQ.isString,suppressEvent:true},z={key:"keylistener",value:null,suppressEvent:true},C=null,e={};var Z=function(AU,AT){var AR=e[AU];if(!AR){e[AU]={};AR=e[AU];}var AS=AR[AT];if(!AS){AS=AU+Q+AT;AR[AT]=AS;}return AS;};var g=function(AR){x.addClass(this.element,Z(this.CSS_CLASS_NAME,AR));x.addClass(this._oAnchor,Z(this.CSS_LABEL_CLASS_NAME,AR));};var R=function(AR){x.removeClass(this.element,Z(this.CSS_CLASS_NAME,AR));x.removeClass(this._oAnchor,Z(this.CSS_LABEL_CLASS_NAME,AR));};c.prototype={CSS_CLASS_NAME:"yuimenuitem",CSS_LABEL_CLASS_NAME:"yuimenuitemlabel",SUBMENU_TYPE:null,_oAnchor:null,_oHelpTextEM:null,_oSubmenu:null,_oOnclickAttributeValue:null,_sClassName:null,constructor:c,index:null,groupIndex:null,parent:null,element:null,srcElement:null,value:null,browser:j.prototype.browser,id:null,init:function(AR,Ab){if(!this.SUBMENU_TYPE){this.SUBMENU_TYPE=AB;}this.cfg=new YAHOO.util.Config(this);this.initDefaultConfig();var AX=this.cfg,AY=O,AT,Aa,AZ,AS,AV,AU,AW;if(AQ.isString(AR)){this._createRootNodeStructure();AX.queueProperty(AL,AR);}else{if(AR&&AR.tagName){switch(AR.tagName.toUpperCase()){case i:this._createRootNodeStructure();AX.queueProperty(AL,AR.text);AX.queueProperty(H,AR.disabled);this.value=AR.value;this.srcElement=AR;break;case v:this._createRootNodeStructure();AX.queueProperty(AL,AR.label);AX.queueProperty(H,AR.disabled);this.srcElement=AR;this._initSubTree();break;case K:AZ=x.getFirstChild(AR);if(AZ){AY=AZ.getAttribute(AE,2);AS=AZ.getAttribute(AH);AV=AZ.innerHTML;}this.srcElement=AR;this.element=AR;this._oAnchor=AZ;AX.setProperty(AL,AV,true);AX.setProperty(n,AY,true);AX.setProperty(AH,AS,true);this._initSubTree();break;}}}if(this.element){AU=(this.srcElement||this.element).id;if(!AU){AU=this.id||x.generateId();this.element.id=AU;}this.id=AU;x.addClass(this.element,this.CSS_CLASS_NAME);x.addClass(this._oAnchor,this.CSS_LABEL_CLASS_NAME);AW=p.length-1;do{Aa=p[AW];AT=this.createEvent(Aa[1]);AT.signature=AK.LIST;this[Aa[0]]=AT;}while(AW--);if(Ab){AX.applyConfig(Ab);}AX.fireQueue();}},_createRootNodeStructure:function(){var AR,AS;if(!C){C=document.createElement(S);C.innerHTML=AF;}AR=C.cloneNode(true);AR.className=this.CSS_CLASS_NAME;AS=AR.firstChild;AS.className=this.CSS_LABEL_CLASS_NAME;this.element=AR;this._oAnchor=AS;},_initSubTree:function(){var AX=this.srcElement,AT=this.cfg,AV,AU,AS,AR,AW;if(AX.childNodes.length>0){if(this.parent.lazyLoad&&this.parent.srcElement&&this.parent.srcElement.tagName.toUpperCase()==r){AT.setProperty(w,{id:x.generateId(),itemdata:AX.childNodes});}else{AV=AX.firstChild;AU=[];do{if(AV&&AV.tagName){switch(AV.tagName.toUpperCase()){case X:AT.setProperty(w,AV);break;case i:AU[AU.length]=AV;break;}}}while((AV=AV.nextSibling));AS=AU.length;if(AS>0){AR=new this.SUBMENU_TYPE(x.generateId());AT.setProperty(w,AR);for(AW=0;AW<AS;AW++){AR.addItem((new AR.ITEM_TYPE(AU[AW])));}}}}},configText:function(Aa,AT,AV){var AS=AT[0],AU=this.cfg,AY=this._oAnchor,AR=AU.getProperty(L),AZ=AJ,AW=AJ,AX=AJ;if(AS){if(AR){AZ=AN+AR+I;}if(AU.getProperty(A)){AW=a;AX=I;}if(AU.getProperty(N)){AW=W;AX=y;}AY.innerHTML=(AW+AS+AX+AZ);}},configHelpText:function(AT,AS,AR){this.cfg.refireEvent(AL);},configURL:function(AT,AS,AR){var AV=AS[0];if(!AV){AV=O;}var AU=this._oAnchor;if(k.opera){AU.removeAttribute(AE);}AU.setAttribute(AE,AV);},configTarget:function(AU,AT,AS){var AR=AT[0],AV=this._oAnchor;if(AR&&AR.length>0){AV.setAttribute(AH,AR);}else{AV.removeAttribute(AH);}},configEmphasis:function(AT,AS,AR){var AV=AS[0],AU=this.cfg;
257 249 if(AV&&AU.getProperty(N)){AU.setProperty(N,false);}AU.refireEvent(AL);},configStrongEmphasis:function(AU,AT,AS){var AR=AT[0],AV=this.cfg;if(AR&&AV.getProperty(A)){AV.setProperty(A,false);}AV.refireEvent(AL);},configChecked:function(AT,AS,AR){var AV=AS[0],AU=this.cfg;if(AV){g.call(this,b);}else{R.call(this,b);}AU.refireEvent(AL);if(AU.getProperty(H)){AU.refireEvent(H);}if(AU.getProperty(B)){AU.refireEvent(B);}},configDisabled:function(AT,AS,AR){var AV=AS[0],AW=this.cfg,AU=AW.getProperty(w),AX=AW.getProperty(b);if(AV){if(AW.getProperty(B)){AW.setProperty(B,false);}g.call(this,H);if(AU){g.call(this,AI);}if(AX){g.call(this,U);}}else{R.call(this,H);if(AU){R.call(this,AI);}if(AX){R.call(this,U);}}},configSelected:function(AT,AS,AR){var AX=this.cfg,AW=this._oAnchor,AV=AS[0],AY=AX.getProperty(b),AU=AX.getProperty(w);if(k.opera){AW.blur();}if(AV&&!AX.getProperty(H)){g.call(this,B);if(AU){g.call(this,AD);}if(AY){g.call(this,T);}}else{R.call(this,B);if(AU){R.call(this,AD);}if(AY){R.call(this,T);}}if(this.hasFocus()&&k.opera){AW.focus();}},_onSubmenuBeforeHide:function(AU,AT){var AV=this.parent,AR;function AS(){AV._oAnchor.blur();AR.beforeHideEvent.unsubscribe(AS);}if(AV.hasFocus()){AR=AV.parent;AR.beforeHideEvent.subscribe(AS);}},configSubmenu:function(AY,AT,AW){var AV=AT[0],AU=this.cfg,AS=this.parent&&this.parent.lazyLoad,AX,AZ,AR;if(AV){if(AV instanceof AB){AX=AV;AX.parent=this;AX.lazyLoad=AS;}else{if(AQ.isObject(AV)&&AV.id&&!AV.nodeType){AZ=AV.id;AR=AV;AR.lazyload=AS;AR.parent=this;AX=new this.SUBMENU_TYPE(AZ,AR);AU.setProperty(w,AX,true);}else{AX=new this.SUBMENU_TYPE(AV,{lazyload:AS,parent:this});AU.setProperty(w,AX,true);}}if(AX){AX.cfg.setProperty(Y,true);g.call(this,P);if(AU.getProperty(n)===O){AU.setProperty(n,(O+AX.id));}this._oSubmenu=AX;if(k.opera){AX.beforeHideEvent.subscribe(this._onSubmenuBeforeHide);}}}else{R.call(this,P);if(this._oSubmenu){this._oSubmenu.destroy();}}if(AU.getProperty(H)){AU.refireEvent(H);}if(AU.getProperty(B)){AU.refireEvent(B);}},configOnClick:function(AT,AS,AR){var AU=AS[0];if(this._oOnclickAttributeValue&&(this._oOnclickAttributeValue!=AU)){this.clickEvent.unsubscribe(this._oOnclickAttributeValue.fn,this._oOnclickAttributeValue.obj);this._oOnclickAttributeValue=null;}if(!this._oOnclickAttributeValue&&AQ.isObject(AU)&&AQ.isFunction(AU.fn)){this.clickEvent.subscribe(AU.fn,((h in AU)?AU.obj:this),((AG in AU)?AU.scope:null));this._oOnclickAttributeValue=AU;}},configClassName:function(AU,AT,AS){var AR=AT[0];if(this._sClassName){x.removeClass(this.element,this._sClassName);}x.addClass(this.element,AR);this._sClassName=AR;},_dispatchClickEvent:function(){var AT=this,AS,AR;if(!AT.cfg.getProperty(H)){AS=x.getFirstChild(AT.element);if(k.ie){AS.fireEvent(q);}else{if((k.gecko&&k.gecko>=1.9)||k.opera||k.webkit){AR=document.createEvent("HTMLEvents");AR.initEvent(AA,true,true);}else{AR=document.createEvent("MouseEvents");AR.initMouseEvent(AA,true,true,window,0,0,0,0,0,false,false,false,false,0,null);}AS.dispatchEvent(AR);}}},_createKeyListener:function(AU,AT,AW){var AV=this,AS=AV.parent;var AR=new YAHOO.util.KeyListener(AS.element.ownerDocument,AW,{fn:AV._dispatchClickEvent,scope:AV,correctScope:true});if(AS.cfg.getProperty(V)){AR.enable();}AS.subscribe(D,AR.enable,null,AR);AS.subscribe(M,AR.disable,null,AR);AV._keyListener=AR;AS.unsubscribe(D,AV._createKeyListener,AW);},configKeyListener:function(AT,AS){var AV=AS[0],AU=this,AR=AU.parent;if(AU._keyData){AR.unsubscribe(D,AU._createKeyListener,AU._keyData);AU._keyData=null;}if(AU._keyListener){AR.unsubscribe(D,AU._keyListener.enable);AR.unsubscribe(M,AU._keyListener.disable);AU._keyListener.disable();AU._keyListener=null;}if(AV){AU._keyData=AV;AR.subscribe(D,AU._createKeyListener,AV,AU);}},initDefaultConfig:function(){var AR=this.cfg;AR.addProperty(o.key,{handler:this.configText,value:o.value,validator:o.validator,suppressEvent:o.suppressEvent});AR.addProperty(s.key,{handler:this.configHelpText,supercedes:s.supercedes,suppressEvent:s.suppressEvent});AR.addProperty(G.key,{handler:this.configURL,value:G.value,suppressEvent:G.suppressEvent});AR.addProperty(AO.key,{handler:this.configTarget,suppressEvent:AO.suppressEvent});AR.addProperty(AP.key,{handler:this.configEmphasis,value:AP.value,validator:AP.validator,suppressEvent:AP.suppressEvent,supercedes:AP.supercedes});AR.addProperty(d.key,{handler:this.configStrongEmphasis,value:d.value,validator:d.validator,suppressEvent:d.suppressEvent,supercedes:d.supercedes});AR.addProperty(l.key,{handler:this.configChecked,value:l.value,validator:l.validator,suppressEvent:l.suppressEvent,supercedes:l.supercedes});AR.addProperty(AM.key,{handler:this.configDisabled,value:AM.value,validator:AM.validator,suppressEvent:AM.suppressEvent});AR.addProperty(f.key,{handler:this.configSelected,value:f.value,validator:f.validator,suppressEvent:f.suppressEvent});AR.addProperty(F.key,{handler:this.configSubmenu,supercedes:F.supercedes,suppressEvent:F.suppressEvent});AR.addProperty(u.key,{handler:this.configOnClick,suppressEvent:u.suppressEvent});AR.addProperty(AC.key,{handler:this.configClassName,value:AC.value,validator:AC.validator,suppressEvent:AC.suppressEvent});AR.addProperty(z.key,{handler:this.configKeyListener,value:z.value,suppressEvent:z.suppressEvent});},getNextEnabledSibling:function(){var AU,AX,AR,AW,AV,AS;function AT(AY,AZ){return AY[AZ]||AT(AY,(AZ+1));}if(this.parent instanceof AB){AU=this.groupIndex;AX=this.parent.getItemGroups();if(this.index<(AX[AU].length-1)){AR=AT(AX[AU],(this.index+1));}else{if(AU<(AX.length-1)){AW=AU+1;}else{AW=0;}AV=AT(AX,AW);AR=AT(AV,0);}AS=(AR.cfg.getProperty(H)||AR.element.style.display==t)?AR.getNextEnabledSibling():AR;}return AS;},getPreviousEnabledSibling:function(){var AW,AY,AS,AR,AV,AU;function AX(AZ,Aa){return AZ[Aa]||AX(AZ,(Aa-1));}function AT(AZ,Aa){return AZ[Aa]?Aa:AT(AZ,(Aa+1));}if(this.parent instanceof AB){AW=this.groupIndex;AY=this.parent.getItemGroups();if(this.index>AT(AY[AW],0)){AS=AX(AY[AW],(this.index-1));}else{if(AW>AT(AY,0)){AR=AW-1;}else{AR=AY.length-1;
258 250 }AV=AX(AY,AR);AS=AX(AV,(AV.length-1));}AU=(AS.cfg.getProperty(H)||AS.element.style.display==t)?AS.getPreviousEnabledSibling():AS;}return AU;},focus:function(){var AU=this.parent,AT=this._oAnchor,AR=AU.activeItem;function AS(){try{if(!(k.ie&&!document.hasFocus())){if(AR){AR.blurEvent.fire();}AT.focus();this.focusEvent.fire();}}catch(AV){}}if(!this.cfg.getProperty(H)&&AU&&AU.cfg.getProperty(V)&&this.element.style.display!=t){AQ.later(0,this,AS);}},blur:function(){var AR=this.parent;if(!this.cfg.getProperty(H)&&AR&&AR.cfg.getProperty(V)){AQ.later(0,this,function(){try{this._oAnchor.blur();this.blurEvent.fire();}catch(AS){}},0);}},hasFocus:function(){return(YAHOO.widget.MenuManager.getFocusedMenuItem()==this);},destroy:function(){var AT=this.element,AS,AR,AV,AU;if(AT){AS=this.cfg.getProperty(w);if(AS){AS.destroy();}AR=AT.parentNode;if(AR){AR.removeChild(AT);this.destroyEvent.fire();}AU=p.length-1;do{AV=p[AU];this[AV[0]].unsubscribeAll();}while(AU--);this.cfg.configChangedEvent.unsubscribeAll();}},toString:function(){var AS=m,AR=this.id;if(AR){AS+=(E+AR);}return AS;}};AQ.augmentProto(c,YAHOO.util.EventProvider);})();(function(){var B="xy",C="mousedown",F="ContextMenu",J=" ";YAHOO.widget.ContextMenu=function(L,K){YAHOO.widget.ContextMenu.superclass.constructor.call(this,L,K);};var I=YAHOO.util.Event,E=YAHOO.env.ua,G=YAHOO.widget.ContextMenu,A={"TRIGGER_CONTEXT_MENU":"triggerContextMenu","CONTEXT_MENU":(E.opera?C:"contextmenu"),"CLICK":"click"},H={key:"trigger",suppressEvent:true};function D(L,K,M){this.cfg.setProperty(B,M);this.beforeShowEvent.unsubscribe(D,M);}YAHOO.lang.extend(G,YAHOO.widget.Menu,{_oTrigger:null,_bCancelled:false,contextEventTarget:null,triggerContextMenuEvent:null,init:function(L,K){G.superclass.init.call(this,L);this.beforeInitEvent.fire(G);if(K){this.cfg.applyConfig(K,true);}this.initEvent.fire(G);},initEvents:function(){G.superclass.initEvents.call(this);this.triggerContextMenuEvent=this.createEvent(A.TRIGGER_CONTEXT_MENU);this.triggerContextMenuEvent.signature=YAHOO.util.CustomEvent.LIST;},cancel:function(){this._bCancelled=true;},_removeEventHandlers:function(){var K=this._oTrigger;if(K){I.removeListener(K,A.CONTEXT_MENU,this._onTriggerContextMenu);if(E.opera){I.removeListener(K,A.CLICK,this._onTriggerClick);}}},_onTriggerClick:function(L,K){if(L.ctrlKey){I.stopEvent(L);}},_onTriggerContextMenu:function(M,K){var L;if(!(M.type==C&&!M.ctrlKey)){this.contextEventTarget=I.getTarget(M);this.triggerContextMenuEvent.fire(M);if(!this._bCancelled){I.stopEvent(M);YAHOO.widget.MenuManager.hideVisible();L=I.getXY(M);if(!YAHOO.util.Dom.inDocument(this.element)){this.beforeShowEvent.subscribe(D,L);}else{this.cfg.setProperty(B,L);}this.show();}this._bCancelled=false;}},toString:function(){var L=F,K=this.id;if(K){L+=(J+K);}return L;},initDefaultConfig:function(){G.superclass.initDefaultConfig.call(this);this.cfg.addProperty(H.key,{handler:this.configTrigger,suppressEvent:H.suppressEvent});},destroy:function(){this._removeEventHandlers();G.superclass.destroy.call(this);},configTrigger:function(L,K,N){var M=K[0];if(M){if(this._oTrigger){this._removeEventHandlers();}this._oTrigger=M;I.on(M,A.CONTEXT_MENU,this._onTriggerContextMenu,this,true);if(E.opera){I.on(M,A.CLICK,this._onTriggerClick,this,true);}}else{this._removeEventHandlers();}}});}());YAHOO.widget.ContextMenuItem=YAHOO.widget.MenuItem;(function(){var D=YAHOO.lang,N="static",M="dynamic,"+N,A="disabled",F="selected",B="autosubmenudisplay",G="submenu",C="visible",Q=" ",H="submenutoggleregion",P="MenuBar";YAHOO.widget.MenuBar=function(T,S){YAHOO.widget.MenuBar.superclass.constructor.call(this,T,S);};function O(T){var S=false;if(D.isString(T)){S=(M.indexOf((T.toLowerCase()))!=-1);}return S;}var R=YAHOO.util.Event,L=YAHOO.widget.MenuBar,K={key:"position",value:N,validator:O,supercedes:[C]},E={key:"submenualignment",value:["tl","bl"]},J={key:B,value:false,validator:D.isBoolean,suppressEvent:true},I={key:H,value:false,validator:D.isBoolean};D.extend(L,YAHOO.widget.Menu,{init:function(T,S){if(!this.ITEM_TYPE){this.ITEM_TYPE=YAHOO.widget.MenuBarItem;}L.superclass.init.call(this,T);this.beforeInitEvent.fire(L);if(S){this.cfg.applyConfig(S,true);}this.initEvent.fire(L);},CSS_CLASS_NAME:"yuimenubar",SUBMENU_TOGGLE_REGION_WIDTH:20,_onKeyDown:function(U,T,Y){var S=T[0],Z=T[1],W,X,V;if(Z&&!Z.cfg.getProperty(A)){X=Z.cfg;switch(S.keyCode){case 37:case 39:if(Z==this.activeItem&&!X.getProperty(F)){X.setProperty(F,true);}else{V=(S.keyCode==37)?Z.getPreviousEnabledSibling():Z.getNextEnabledSibling();if(V){this.clearActiveItem();V.cfg.setProperty(F,true);W=V.cfg.getProperty(G);if(W){W.show();W.setInitialFocus();}else{V.focus();}}}R.preventDefault(S);break;case 40:if(this.activeItem!=Z){this.clearActiveItem();X.setProperty(F,true);Z.focus();}W=X.getProperty(G);if(W){if(W.cfg.getProperty(C)){W.setInitialSelection();W.setInitialFocus();}else{W.show();W.setInitialFocus();}}R.preventDefault(S);break;}}if(S.keyCode==27&&this.activeItem){W=this.activeItem.cfg.getProperty(G);if(W&&W.cfg.getProperty(C)){W.hide();this.activeItem.focus();}else{this.activeItem.cfg.setProperty(F,false);this.activeItem.blur();}R.preventDefault(S);}},_onClick:function(e,Y,b){L.superclass._onClick.call(this,e,Y,b);var d=Y[1],T=true,S,f,U,W,Z,a,c,V;var X=function(){if(a.cfg.getProperty(C)){a.hide();}else{a.show();}};if(d&&!d.cfg.getProperty(A)){f=Y[0];U=R.getTarget(f);W=this.activeItem;Z=this.cfg;if(W&&W!=d){this.clearActiveItem();}d.cfg.setProperty(F,true);a=d.cfg.getProperty(G);if(a){S=d.element;c=YAHOO.util.Dom.getX(S);V=c+(S.offsetWidth-this.SUBMENU_TOGGLE_REGION_WIDTH);if(Z.getProperty(H)){if(R.getPageX(f)>V){X();R.preventDefault(f);T=false;}}else{X();}}}return T;},configSubmenuToggle:function(U,T){var S=T[0];if(S){this.cfg.setProperty(B,false);}},toString:function(){var T=P,S=this.id;if(S){T+=(Q+S);}return T;},initDefaultConfig:function(){L.superclass.initDefaultConfig.call(this);var S=this.cfg;S.addProperty(K.key,{handler:this.configPosition,value:K.value,validator:K.validator,supercedes:K.supercedes});
259   -S.addProperty(E.key,{value:E.value,suppressEvent:E.suppressEvent});S.addProperty(J.key,{value:J.value,validator:J.validator,suppressEvent:J.suppressEvent});S.addProperty(I.key,{value:I.value,validator:I.validator,handler:this.configSubmenuToggle});}});}());YAHOO.widget.MenuBarItem=function(B,A){YAHOO.widget.MenuBarItem.superclass.constructor.call(this,B,A);};YAHOO.lang.extend(YAHOO.widget.MenuBarItem,YAHOO.widget.MenuItem,{init:function(B,A){if(!this.SUBMENU_TYPE){this.SUBMENU_TYPE=YAHOO.widget.Menu;}YAHOO.widget.MenuBarItem.superclass.init.call(this,B);var C=this.cfg;if(A){C.applyConfig(A,true);}C.fireQueue();},CSS_CLASS_NAME:"yuimenubaritem",CSS_LABEL_CLASS_NAME:"yuimenubaritemlabel",toString:function(){var A="MenuBarItem";if(this.cfg&&this.cfg.getProperty("text")){A+=(": "+this.cfg.getProperty("text"));}return A;}});YAHOO.register("menu",YAHOO.widget.Menu,{version:"2.7.0",build:"1799"});
260   -/*
  251 +S.addProperty(E.key,{value:E.value,suppressEvent:E.suppressEvent});S.addProperty(J.key,{value:J.value,validator:J.validator,suppressEvent:J.suppressEvent});S.addProperty(I.key,{value:I.value,validator:I.validator,handler:this.configSubmenuToggle});}});}());YAHOO.widget.MenuBarItem=function(B,A){YAHOO.widget.MenuBarItem.superclass.constructor.call(this,B,A);};YAHOO.lang.extend(YAHOO.widget.MenuBarItem,YAHOO.widget.MenuItem,{init:function(B,A){if(!this.SUBMENU_TYPE){this.SUBMENU_TYPE=YAHOO.widget.Menu;}YAHOO.widget.MenuBarItem.superclass.init.call(this,B);var C=this.cfg;if(A){C.applyConfig(A,true);}C.fireQueue();},CSS_CLASS_NAME:"yuimenubaritem",CSS_LABEL_CLASS_NAME:"yuimenubaritemlabel",toString:function(){var A="MenuBarItem";if(this.cfg&&this.cfg.getProperty("text")){A+=(": "+this.cfg.getProperty("text"));}return A;}});YAHOO.register("menu",YAHOO.widget.Menu,{version:"2.7.0",build:"1799"});/*
261 252 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
262 253 Code licensed under the BSD License:
263 254 http://developer.yahoo.net/yui/license.txt
... ... @@ -265,8 +256,7 @@ version: 2.7.0
265 256 */
266 257 YAHOO.widget.LogMsg=function(A){this.msg=this.time=this.category=this.source=this.sourceDetail=null;if(A&&(A.constructor==Object)){for(var B in A){if(A.hasOwnProperty(B)){this[B]=A[B];}}}};YAHOO.widget.LogWriter=function(A){if(!A){YAHOO.log("Could not instantiate LogWriter due to invalid source.","error","LogWriter");return;}this._source=A;};YAHOO.widget.LogWriter.prototype.toString=function(){return"LogWriter "+this._sSource;};YAHOO.widget.LogWriter.prototype.log=function(A,B){YAHOO.widget.Logger.log(A,B,this._source);};YAHOO.widget.LogWriter.prototype.getSource=function(){return this._source;};YAHOO.widget.LogWriter.prototype.setSource=function(A){if(!A){YAHOO.log("Could not set source due to invalid source.","error",this.toString());return;}else{this._source=A;}};YAHOO.widget.LogWriter.prototype._source=null;YAHOO.widget.LogReader=function(B,A){this._sName=YAHOO.widget.LogReader._index;YAHOO.widget.LogReader._index++;this._buffer=[];this._filterCheckboxes={};this._lastTime=YAHOO.widget.Logger.getStartTime();if(A&&(A.constructor==Object)){for(var C in A){if(A.hasOwnProperty(C)){this[C]=A[C];}}}this._initContainerEl(B);if(!this._elContainer){YAHOO.log("Could not instantiate LogReader due to an invalid container element "+B,"error",this.toString());return;}this._initHeaderEl();this._initConsoleEl();this._initFooterEl();this._initDragDrop();this._initCategories();this._initSources();YAHOO.widget.Logger.newLogEvent.subscribe(this._onNewLog,this);YAHOO.widget.Logger.logResetEvent.subscribe(this._onReset,this);YAHOO.widget.Logger.categoryCreateEvent.subscribe(this._onCategoryCreate,this);YAHOO.widget.Logger.sourceCreateEvent.subscribe(this._onSourceCreate,this);this._filterLogs();YAHOO.log("LogReader initialized",null,this.toString());};YAHOO.lang.augmentObject(YAHOO.widget.LogReader,{_index:0,ENTRY_TEMPLATE:(function(){var A=document.createElement("pre");YAHOO.util.Dom.addClass(A,"yui-log-entry");return A;})(),VERBOSE_TEMPLATE:"<p><span class='{category}'>{label}</span> {totalTime}ms (+{elapsedTime}) {localTime}:</p><p>{sourceAndDetail}</p><p>{message}</p>",BASIC_TEMPLATE:"<p><span class='{category}'>{label}</span> {totalTime}ms (+{elapsedTime}) {localTime}: {sourceAndDetail}: {message}</p>"});YAHOO.widget.LogReader.prototype={logReaderEnabled:true,width:null,height:null,top:null,left:null,right:null,bottom:null,fontSize:null,footerEnabled:true,verboseOutput:true,entryFormat:null,newestOnTop:true,outputBuffer:100,thresholdMax:500,thresholdMin:100,isCollapsed:false,isPaused:false,draggable:true,toString:function(){return"LogReader instance"+this._sName;},pause:function(){this.isPaused=true;this._timeout=null;this.logReaderEnabled=false;if(this._btnPause){this._btnPause.value="Resume";}},resume:function(){this.isPaused=false;this.logReaderEnabled=true;this._printBuffer();if(this._btnPause){this._btnPause.value="Pause";}},hide:function(){this._elContainer.style.display="none";},show:function(){this._elContainer.style.display="block";},collapse:function(){this._elConsole.style.display="none";if(this._elFt){this._elFt.style.display="none";}this._btnCollapse.value="Expand";this.isCollapsed=true;},expand:function(){this._elConsole.style.display="block";if(this._elFt){this._elFt.style.display="block";}this._btnCollapse.value="Collapse";this.isCollapsed=false;},getCheckbox:function(A){return this._filterCheckboxes[A];},getCategories:function(){return this._categoryFilters;},showCategory:function(B){var D=this._categoryFilters;if(D.indexOf){if(D.indexOf(B)>-1){return;}}else{for(var A=0;A<D.length;A++){if(D[A]===B){return;}}}this._categoryFilters.push(B);this._filterLogs();var C=this.getCheckbox(B);if(C){C.checked=true;}},hideCategory:function(B){var D=this._categoryFilters;for(var A=0;A<D.length;A++){if(B==D[A]){D.splice(A,1);break;}}this._filterLogs();var C=this.getCheckbox(B);if(C){C.checked=false;}},getSources:function(){return this._sourceFilters;},showSource:function(A){var D=this._sourceFilters;if(D.indexOf){if(D.indexOf(A)>-1){return;}}else{for(var B=0;B<D.length;B++){if(A==D[B]){return;}}}D.push(A);this._filterLogs();var C=this.getCheckbox(A);if(C){C.checked=true;}},hideSource:function(A){var D=this._sourceFilters;for(var B=0;B<D.length;B++){if(A==D[B]){D.splice(B,1);break;}}this._filterLogs();var C=this.getCheckbox(A);if(C){C.checked=false;}},clearConsole:function(){this._timeout=null;this._buffer=[];this._consoleMsgCount=0;var A=this._elConsole;A.innerHTML="";},setTitle:function(A){this._title.innerHTML=this.html2Text(A);},getLastTime:function(){return this._lastTime;},formatMsg:function(C){var B=YAHOO.widget.LogReader,A=this.entryFormat||(this.verboseOutput?B.VERBOSE_TEMPLATE:B.BASIC_TEMPLATE),D={category:C.category,label:C.category.substring(0,4).toUpperCase(),sourceAndDetail:C.sourceDetail?C.source+" "+C.sourceDetail:C.source,message:this.html2Text(C.msg||C.message||"")};if(C.time&&C.time.getTime){D.localTime=C.time.toLocaleTimeString?C.time.toLocaleTimeString():C.time.toString();D.elapsedTime=C.time.getTime()-this.getLastTime();D.totalTime=C.time.getTime()-YAHOO.widget.Logger.getStartTime();}var E=B.ENTRY_TEMPLATE.cloneNode(true);if(this.verboseOutput){E.className+=" yui-log-verbose";}E.innerHTML=A.replace(/\{(\w+)\}/g,function(F,G){return(G in D)?D[G]:"";});return E;},html2Text:function(A){if(A){A+="";return A.replace(/&/g,"&#38;").replace(/</g,"&#60;").replace(/>/g,"&#62;");}return"";},_sName:null,_buffer:null,_consoleMsgCount:0,_lastTime:null,_timeout:null,_filterCheckboxes:null,_categoryFilters:null,_sourceFilters:null,_elContainer:null,_elHd:null,_elCollapse:null,_btnCollapse:null,_title:null,_elConsole:null,_elFt:null,_elBtns:null,_elCategoryFilters:null,_elSourceFilters:null,_btnPause:null,_btnClear:null,_initContainerEl:function(B){B=YAHOO.util.Dom.get(B);if(B&&B.tagName&&(B.tagName.toLowerCase()=="div")){this._elContainer=B;YAHOO.util.Dom.addClass(this._elContainer,"yui-log");}else{this._elContainer=document.body.appendChild(document.createElement("div"));YAHOO.util.Dom.addClass(this._elContainer,"yui-log");
267 258 YAHOO.util.Dom.addClass(this._elContainer,"yui-log-container");var A=this._elContainer.style;if(this.width){A.width=this.width;}if(this.right){A.right=this.right;}if(this.top){A.top=this.top;}if(this.left){A.left=this.left;A.right="auto";}if(this.bottom){A.bottom=this.bottom;A.top="auto";}if(this.fontSize){A.fontSize=this.fontSize;}if(navigator.userAgent.toLowerCase().indexOf("opera")!=-1){document.body.style+="";}}},_initHeaderEl:function(){var A=this;if(this._elHd){YAHOO.util.Event.purgeElement(this._elHd,true);this._elHd.innerHTML="";}this._elHd=this._elContainer.appendChild(document.createElement("div"));this._elHd.id="yui-log-hd"+this._sName;this._elHd.className="yui-log-hd";this._elCollapse=this._elHd.appendChild(document.createElement("div"));this._elCollapse.className="yui-log-btns";this._btnCollapse=document.createElement("input");this._btnCollapse.type="button";this._btnCollapse.className="yui-log-button";this._btnCollapse.value="Collapse";this._btnCollapse=this._elCollapse.appendChild(this._btnCollapse);YAHOO.util.Event.addListener(A._btnCollapse,"click",A._onClickCollapseBtn,A);this._title=this._elHd.appendChild(document.createElement("h4"));this._title.innerHTML="Logger Console";},_initConsoleEl:function(){if(this._elConsole){YAHOO.util.Event.purgeElement(this._elConsole,true);this._elConsole.innerHTML="";}this._elConsole=this._elContainer.appendChild(document.createElement("div"));this._elConsole.className="yui-log-bd";if(this.height){this._elConsole.style.height=this.height;}},_initFooterEl:function(){var A=this;if(this.footerEnabled){if(this._elFt){YAHOO.util.Event.purgeElement(this._elFt,true);this._elFt.innerHTML="";}this._elFt=this._elContainer.appendChild(document.createElement("div"));this._elFt.className="yui-log-ft";this._elBtns=this._elFt.appendChild(document.createElement("div"));this._elBtns.className="yui-log-btns";this._btnPause=document.createElement("input");this._btnPause.type="button";this._btnPause.className="yui-log-button";this._btnPause.value="Pause";this._btnPause=this._elBtns.appendChild(this._btnPause);YAHOO.util.Event.addListener(A._btnPause,"click",A._onClickPauseBtn,A);this._btnClear=document.createElement("input");this._btnClear.type="button";this._btnClear.className="yui-log-button";this._btnClear.value="Clear";this._btnClear=this._elBtns.appendChild(this._btnClear);YAHOO.util.Event.addListener(A._btnClear,"click",A._onClickClearBtn,A);this._elCategoryFilters=this._elFt.appendChild(document.createElement("div"));this._elCategoryFilters.className="yui-log-categoryfilters";this._elSourceFilters=this._elFt.appendChild(document.createElement("div"));this._elSourceFilters.className="yui-log-sourcefilters";}},_initDragDrop:function(){if(YAHOO.util.DD&&this.draggable&&this._elHd){var A=new YAHOO.util.DD(this._elContainer);A.setHandleElId(this._elHd.id);this._elHd.style.cursor="move";}},_initCategories:function(){this._categoryFilters=[];var C=YAHOO.widget.Logger.categories;for(var A=0;A<C.length;A++){var B=C[A];this._categoryFilters.push(B);if(this._elCategoryFilters){this._createCategoryCheckbox(B);}}},_initSources:function(){this._sourceFilters=[];var C=YAHOO.widget.Logger.sources;for(var B=0;B<C.length;B++){var A=C[B];this._sourceFilters.push(A);if(this._elSourceFilters){this._createSourceCheckbox(A);}}},_createCategoryCheckbox:function(B){var A=this;if(this._elFt){var E=this._elCategoryFilters;var D=E.appendChild(document.createElement("span"));D.className="yui-log-filtergrp";var C=document.createElement("input");C.id="yui-log-filter-"+B+this._sName;C.className="yui-log-filter-"+B;C.type="checkbox";C.category=B;C=D.appendChild(C);C.checked=true;YAHOO.util.Event.addListener(C,"click",A._onCheckCategory,A);var F=D.appendChild(document.createElement("label"));F.htmlFor=C.id;F.className=B;F.innerHTML=B;this._filterCheckboxes[B]=C;}},_createSourceCheckbox:function(A){var D=this;if(this._elFt){var F=this._elSourceFilters;var E=F.appendChild(document.createElement("span"));E.className="yui-log-filtergrp";var C=document.createElement("input");C.id="yui-log-filter"+A+this._sName;C.className="yui-log-filter"+A;C.type="checkbox";C.source=A;C=E.appendChild(C);C.checked=true;YAHOO.util.Event.addListener(C,"click",D._onCheckSource,D);var B=E.appendChild(document.createElement("label"));B.htmlFor=C.id;B.className=A;B.innerHTML=A;this._filterCheckboxes[A]=C;}},_filterLogs:function(){if(this._elConsole!==null){this.clearConsole();this._printToConsole(YAHOO.widget.Logger.getStack());}},_printBuffer:function(){this._timeout=null;if(this._elConsole!==null){var B=this.thresholdMax;B=(B&&!isNaN(B))?B:500;if(this._consoleMsgCount<B){var A=[];for(var C=0;C<this._buffer.length;C++){A[C]=this._buffer[C];}this._buffer=[];this._printToConsole(A);}else{this._filterLogs();}if(!this.newestOnTop){this._elConsole.scrollTop=this._elConsole.scrollHeight;}}},_printToConsole:function(I){var B=I.length,M=document.createDocumentFragment(),P=[],Q=this.thresholdMin,C=this._sourceFilters.length,N=this._categoryFilters.length,K,H,G,F,L;if(isNaN(Q)||(Q>this.thresholdMax)){Q=0;}K=(B>Q)?(B-Q):0;for(H=K;H<B;H++){var E=false;var J=false;var O=I[H];var A=O.source;var D=O.category;for(G=0;G<C;G++){if(A==this._sourceFilters[G]){J=true;break;}}if(J){for(G=0;G<N;G++){if(D==this._categoryFilters[G]){E=true;break;}}}if(E){F=this.formatMsg(O);if(typeof F==="string"){P[P.length]=F;}else{M.insertBefore(F,this.newestOnTop?M.firstChild||null:null);}this._consoleMsgCount++;this._lastTime=O.time.getTime();}}if(P.length){P.splice(0,0,this._elConsole.innerHTML);this._elConsole.innerHTML=this.newestOnTop?P.reverse().join(""):P.join("");}else{if(M.firstChild){this._elConsole.insertBefore(M,this.newestOnTop?this._elConsole.firstChild||null:null);}}},_onCategoryCreate:function(D,C,A){var B=C[0];A._categoryFilters.push(B);if(A._elFt){A._createCategoryCheckbox(B);}},_onSourceCreate:function(D,C,A){var B=C[0];A._sourceFilters.push(B);if(A._elFt){A._createSourceCheckbox(B);}},_onCheckCategory:function(A,B){var C=this.category;
268   -if(!this.checked){B.hideCategory(C);}else{B.showCategory(C);}},_onCheckSource:function(A,B){var C=this.source;if(!this.checked){B.hideSource(C);}else{B.showSource(C);}},_onClickCollapseBtn:function(A,B){if(!B.isCollapsed){B.collapse();}else{B.expand();}},_onClickPauseBtn:function(A,B){if(!B.isPaused){B.pause();}else{B.resume();}},_onClickClearBtn:function(A,B){B.clearConsole();},_onNewLog:function(D,C,A){var B=C[0];A._buffer.push(B);if(A.logReaderEnabled===true&&A._timeout===null){A._timeout=setTimeout(function(){A._printBuffer();},A.outputBuffer);}},_onReset:function(C,B,A){A._filterLogs();}};if(!YAHOO.widget.Logger){YAHOO.widget.Logger={loggerEnabled:true,_browserConsoleEnabled:false,categories:["info","warn","error","time","window"],sources:["global"],_stack:[],maxStackEntries:2500,_startTime:new Date().getTime(),_lastTime:null,_windowErrorsHandled:false,_origOnWindowError:null};YAHOO.widget.Logger.log=function(B,F,G){if(this.loggerEnabled){if(!F){F="info";}else{F=F.toLocaleLowerCase();if(this._isNewCategory(F)){this._createNewCategory(F);}}var C="global";var A=null;if(G){var D=G.indexOf(" ");if(D>0){C=G.substring(0,D);A=G.substring(D,G.length);}else{C=G;}if(this._isNewSource(C)){this._createNewSource(C);}}var H=new Date();var J=new YAHOO.widget.LogMsg({msg:B,time:H,category:F,source:C,sourceDetail:A});var I=this._stack;var E=this.maxStackEntries;if(E&&!isNaN(E)&&(I.length>=E)){I.shift();}I.push(J);this.newLogEvent.fire(J);if(this._browserConsoleEnabled){this._printToBrowserConsole(J);}return true;}else{return false;}};YAHOO.widget.Logger.reset=function(){this._stack=[];this._startTime=new Date().getTime();this.loggerEnabled=true;this.log("Logger reset");this.logResetEvent.fire();};YAHOO.widget.Logger.getStack=function(){return this._stack;};YAHOO.widget.Logger.getStartTime=function(){return this._startTime;};YAHOO.widget.Logger.disableBrowserConsole=function(){YAHOO.log("Logger output to the function console.log() has been disabled.");this._browserConsoleEnabled=false;};YAHOO.widget.Logger.enableBrowserConsole=function(){this._browserConsoleEnabled=true;YAHOO.log("Logger output to the function console.log() has been enabled.");};YAHOO.widget.Logger.handleWindowErrors=function(){if(!YAHOO.widget.Logger._windowErrorsHandled){if(window.error){YAHOO.widget.Logger._origOnWindowError=window.onerror;}window.onerror=YAHOO.widget.Logger._onWindowError;YAHOO.widget.Logger._windowErrorsHandled=true;YAHOO.log("Logger handling of window.onerror has been enabled.");}else{YAHOO.log("Logger handling of window.onerror had already been enabled.");}};YAHOO.widget.Logger.unhandleWindowErrors=function(){if(YAHOO.widget.Logger._windowErrorsHandled){if(YAHOO.widget.Logger._origOnWindowError){window.onerror=YAHOO.widget.Logger._origOnWindowError;YAHOO.widget.Logger._origOnWindowError=null;}else{window.onerror=null;}YAHOO.widget.Logger._windowErrorsHandled=false;YAHOO.log("Logger handling of window.onerror has been disabled.");}else{YAHOO.log("Logger handling of window.onerror had already been disabled.");}};YAHOO.widget.Logger.categoryCreateEvent=new YAHOO.util.CustomEvent("categoryCreate",this,true);YAHOO.widget.Logger.sourceCreateEvent=new YAHOO.util.CustomEvent("sourceCreate",this,true);YAHOO.widget.Logger.newLogEvent=new YAHOO.util.CustomEvent("newLog",this,true);YAHOO.widget.Logger.logResetEvent=new YAHOO.util.CustomEvent("logReset",this,true);YAHOO.widget.Logger._createNewCategory=function(A){this.categories.push(A);this.categoryCreateEvent.fire(A);};YAHOO.widget.Logger._isNewCategory=function(B){for(var A=0;A<this.categories.length;A++){if(B==this.categories[A]){return false;}}return true;};YAHOO.widget.Logger._createNewSource=function(A){this.sources.push(A);this.sourceCreateEvent.fire(A);};YAHOO.widget.Logger._isNewSource=function(A){if(A){for(var B=0;B<this.sources.length;B++){if(A==this.sources[B]){return false;}}return true;}};YAHOO.widget.Logger._printToBrowserConsole=function(C){if(window.console&&console.log){var E=C.category;var D=C.category.substring(0,4).toUpperCase();var G=C.time;var F;if(G.toLocaleTimeString){F=G.toLocaleTimeString();}else{F=G.toString();}var H=G.getTime();var B=(YAHOO.widget.Logger._lastTime)?(H-YAHOO.widget.Logger._lastTime):0;YAHOO.widget.Logger._lastTime=H;var A=F+" ("+B+"ms): "+C.source+": ";if(YAHOO.env.ua.webkit){A+=C.msg;}console.log(A,C.msg);}};YAHOO.widget.Logger._onWindowError=function(A,C,B){try{YAHOO.widget.Logger.log(A+" ("+C+", line "+B+")","window");if(YAHOO.widget.Logger._origOnWindowError){YAHOO.widget.Logger._origOnWindowError();}}catch(D){return false;}};YAHOO.widget.Logger.log("Logger initialized");}YAHOO.register("logger",YAHOO.widget.Logger,{version:"2.7.0",build:"1799"});
269   -/*
  259 +if(!this.checked){B.hideCategory(C);}else{B.showCategory(C);}},_onCheckSource:function(A,B){var C=this.source;if(!this.checked){B.hideSource(C);}else{B.showSource(C);}},_onClickCollapseBtn:function(A,B){if(!B.isCollapsed){B.collapse();}else{B.expand();}},_onClickPauseBtn:function(A,B){if(!B.isPaused){B.pause();}else{B.resume();}},_onClickClearBtn:function(A,B){B.clearConsole();},_onNewLog:function(D,C,A){var B=C[0];A._buffer.push(B);if(A.logReaderEnabled===true&&A._timeout===null){A._timeout=setTimeout(function(){A._printBuffer();},A.outputBuffer);}},_onReset:function(C,B,A){A._filterLogs();}};if(!YAHOO.widget.Logger){YAHOO.widget.Logger={loggerEnabled:true,_browserConsoleEnabled:false,categories:["info","warn","error","time","window"],sources:["global"],_stack:[],maxStackEntries:2500,_startTime:new Date().getTime(),_lastTime:null,_windowErrorsHandled:false,_origOnWindowError:null};YAHOO.widget.Logger.log=function(B,F,G){if(this.loggerEnabled){if(!F){F="info";}else{F=F.toLocaleLowerCase();if(this._isNewCategory(F)){this._createNewCategory(F);}}var C="global";var A=null;if(G){var D=G.indexOf(" ");if(D>0){C=G.substring(0,D);A=G.substring(D,G.length);}else{C=G;}if(this._isNewSource(C)){this._createNewSource(C);}}var H=new Date();var J=new YAHOO.widget.LogMsg({msg:B,time:H,category:F,source:C,sourceDetail:A});var I=this._stack;var E=this.maxStackEntries;if(E&&!isNaN(E)&&(I.length>=E)){I.shift();}I.push(J);this.newLogEvent.fire(J);if(this._browserConsoleEnabled){this._printToBrowserConsole(J);}return true;}else{return false;}};YAHOO.widget.Logger.reset=function(){this._stack=[];this._startTime=new Date().getTime();this.loggerEnabled=true;this.log("Logger reset");this.logResetEvent.fire();};YAHOO.widget.Logger.getStack=function(){return this._stack;};YAHOO.widget.Logger.getStartTime=function(){return this._startTime;};YAHOO.widget.Logger.disableBrowserConsole=function(){YAHOO.log("Logger output to the function console.log() has been disabled.");this._browserConsoleEnabled=false;};YAHOO.widget.Logger.enableBrowserConsole=function(){this._browserConsoleEnabled=true;YAHOO.log("Logger output to the function console.log() has been enabled.");};YAHOO.widget.Logger.handleWindowErrors=function(){if(!YAHOO.widget.Logger._windowErrorsHandled){if(window.error){YAHOO.widget.Logger._origOnWindowError=window.onerror;}window.onerror=YAHOO.widget.Logger._onWindowError;YAHOO.widget.Logger._windowErrorsHandled=true;YAHOO.log("Logger handling of window.onerror has been enabled.");}else{YAHOO.log("Logger handling of window.onerror had already been enabled.");}};YAHOO.widget.Logger.unhandleWindowErrors=function(){if(YAHOO.widget.Logger._windowErrorsHandled){if(YAHOO.widget.Logger._origOnWindowError){window.onerror=YAHOO.widget.Logger._origOnWindowError;YAHOO.widget.Logger._origOnWindowError=null;}else{window.onerror=null;}YAHOO.widget.Logger._windowErrorsHandled=false;YAHOO.log("Logger handling of window.onerror has been disabled.");}else{YAHOO.log("Logger handling of window.onerror had already been disabled.");}};YAHOO.widget.Logger.categoryCreateEvent=new YAHOO.util.CustomEvent("categoryCreate",this,true);YAHOO.widget.Logger.sourceCreateEvent=new YAHOO.util.CustomEvent("sourceCreate",this,true);YAHOO.widget.Logger.newLogEvent=new YAHOO.util.CustomEvent("newLog",this,true);YAHOO.widget.Logger.logResetEvent=new YAHOO.util.CustomEvent("logReset",this,true);YAHOO.widget.Logger._createNewCategory=function(A){this.categories.push(A);this.categoryCreateEvent.fire(A);};YAHOO.widget.Logger._isNewCategory=function(B){for(var A=0;A<this.categories.length;A++){if(B==this.categories[A]){return false;}}return true;};YAHOO.widget.Logger._createNewSource=function(A){this.sources.push(A);this.sourceCreateEvent.fire(A);};YAHOO.widget.Logger._isNewSource=function(A){if(A){for(var B=0;B<this.sources.length;B++){if(A==this.sources[B]){return false;}}return true;}};YAHOO.widget.Logger._printToBrowserConsole=function(C){if(window.console&&console.log){var E=C.category;var D=C.category.substring(0,4).toUpperCase();var G=C.time;var F;if(G.toLocaleTimeString){F=G.toLocaleTimeString();}else{F=G.toString();}var H=G.getTime();var B=(YAHOO.widget.Logger._lastTime)?(H-YAHOO.widget.Logger._lastTime):0;YAHOO.widget.Logger._lastTime=H;var A=F+" ("+B+"ms): "+C.source+": ";if(YAHOO.env.ua.webkit){A+=C.msg;}console.log(A,C.msg);}};YAHOO.widget.Logger._onWindowError=function(A,C,B){try{YAHOO.widget.Logger.log(A+" ("+C+", line "+B+")","window");if(YAHOO.widget.Logger._origOnWindowError){YAHOO.widget.Logger._origOnWindowError();}}catch(D){return false;}};YAHOO.widget.Logger.log("Logger initialized");}YAHOO.register("logger",YAHOO.widget.Logger,{version:"2.7.0",build:"1799"});/*
270 260 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
271 261 Code licensed under the BSD License:
272 262 http://developer.yahoo.net/yui/license.txt
... ... @@ -275,8 +265,7 @@ version: 2.7.0
275 265 if(!YAHOO.util.DragDropMgr){YAHOO.util.DragDropMgr=function(){var A=YAHOO.util.Event,B=YAHOO.util.Dom;return{useShim:false,_shimActive:false,_shimState:false,_debugShim:false,_createShim:function(){var C=document.createElement("div");C.id="yui-ddm-shim";if(document.body.firstChild){document.body.insertBefore(C,document.body.firstChild);}else{document.body.appendChild(C);}C.style.display="none";C.style.backgroundColor="red";C.style.position="absolute";C.style.zIndex="99999";B.setStyle(C,"opacity","0");this._shim=C;A.on(C,"mouseup",this.handleMouseUp,this,true);A.on(C,"mousemove",this.handleMouseMove,this,true);A.on(window,"scroll",this._sizeShim,this,true);},_sizeShim:function(){if(this._shimActive){var C=this._shim;C.style.height=B.getDocumentHeight()+"px";C.style.width=B.getDocumentWidth()+"px";C.style.top="0";C.style.left="0";}},_activateShim:function(){if(this.useShim){if(!this._shim){this._createShim();}this._shimActive=true;var C=this._shim,D="0";if(this._debugShim){D=".5";}B.setStyle(C,"opacity",D);this._sizeShim();C.style.display="block";}},_deactivateShim:function(){this._shim.style.display="none";this._shimActive=false;},_shim:null,ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,interactionInfo:null,init:function(){this.initialized=true;},POINT:0,INTERSECT:1,STRICT_INTERSECT:2,mode:0,_execOnAll:function(E,D){for(var F in this.ids){for(var C in this.ids[F]){var G=this.ids[F][C];if(!this.isTypeOfDD(G)){continue;}G[E].apply(G,D);}}},_onLoad:function(){this.init();A.on(document,"mouseup",this.handleMouseUp,this,true);A.on(document,"mousemove",this.handleMouseMove,this,true);A.on(window,"unload",this._onUnload,this,true);A.on(window,"resize",this._onResize,this,true);},_onResize:function(C){this._execOnAll("resetConstraints",[]);},lock:function(){this.locked=true;},unlock:function(){this.locked=false;},isLocked:function(){return this.locked;},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:1000,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,fromTimeout:false,regDragDrop:function(D,C){if(!this.initialized){this.init();}if(!this.ids[C]){this.ids[C]={};}this.ids[C][D.id]=D;},removeDDFromGroup:function(E,C){if(!this.ids[C]){this.ids[C]={};}var D=this.ids[C];if(D&&D[E.id]){delete D[E.id];}},_remove:function(E){for(var D in E.groups){if(D){var C=this.ids[D];if(C&&C[E.id]){delete C[E.id];}}}delete this.handleIds[E.id];},regHandle:function(D,C){if(!this.handleIds[D]){this.handleIds[D]={};}this.handleIds[D][C]=C;},isDragDrop:function(C){return(this.getDDById(C))?true:false;},getRelated:function(H,D){var G=[];for(var F in H.groups){for(var E in this.ids[F]){var C=this.ids[F][E];if(!this.isTypeOfDD(C)){continue;}if(!D||C.isTarget){G[G.length]=C;}}}return G;},isLegalTarget:function(G,F){var D=this.getRelated(G,true);for(var E=0,C=D.length;E<C;++E){if(D[E].id==F.id){return true;}}return false;},isTypeOfDD:function(C){return(C&&C.__ygDragDrop);},isHandle:function(D,C){return(this.handleIds[D]&&this.handleIds[D][C]);},getDDById:function(D){for(var C in this.ids){if(this.ids[C][D]){return this.ids[C][D];}}return null;},handleMouseDown:function(E,D){this.currentTarget=YAHOO.util.Event.getTarget(E);this.dragCurrent=D;var C=D.getEl();this.startX=YAHOO.util.Event.getPageX(E);this.startY=YAHOO.util.Event.getPageY(E);this.deltaX=this.startX-C.offsetLeft;this.deltaY=this.startY-C.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var F=YAHOO.util.DDM;F.startDrag(F.startX,F.startY);F.fromTimeout=true;},this.clickTimeThresh);},startDrag:function(C,E){if(this.dragCurrent&&this.dragCurrent.useShim){this._shimState=this.useShim;this.useShim=true;}this._activateShim();clearTimeout(this.clickTimeout);var D=this.dragCurrent;if(D&&D.events.b4StartDrag){D.b4StartDrag(C,E);D.fireEvent("b4StartDragEvent",{x:C,y:E});}if(D&&D.events.startDrag){D.startDrag(C,E);D.fireEvent("startDragEvent",{x:C,y:E});}this.dragThreshMet=true;},handleMouseUp:function(C){if(this.dragCurrent){clearTimeout(this.clickTimeout);if(this.dragThreshMet){if(this.fromTimeout){this.fromTimeout=false;this.handleMouseMove(C);}this.fromTimeout=false;this.fireEvents(C,true);}else{}this.stopDrag(C);this.stopEvent(C);}},stopEvent:function(C){if(this.stopPropagation){YAHOO.util.Event.stopPropagation(C);}if(this.preventDefault){YAHOO.util.Event.preventDefault(C);}},stopDrag:function(E,D){var C=this.dragCurrent;if(C&&!D){if(this.dragThreshMet){if(C.events.b4EndDrag){C.b4EndDrag(E);C.fireEvent("b4EndDragEvent",{e:E});}if(C.events.endDrag){C.endDrag(E);C.fireEvent("endDragEvent",{e:E});}}if(C.events.mouseUp){C.onMouseUp(E);C.fireEvent("mouseUpEvent",{e:E});}}if(this._shimActive){this._deactivateShim();if(this.dragCurrent&&this.dragCurrent.useShim){this.useShim=this._shimState;this._shimState=false;}}this.dragCurrent=null;this.dragOvers={};},handleMouseMove:function(F){var C=this.dragCurrent;if(C){if(YAHOO.util.Event.isIE&&!F.button){this.stopEvent(F);return this.handleMouseUp(F);}else{if(F.clientX<0||F.clientY<0){}}if(!this.dragThreshMet){var E=Math.abs(this.startX-YAHOO.util.Event.getPageX(F));var D=Math.abs(this.startY-YAHOO.util.Event.getPageY(F));if(E>this.clickPixelThresh||D>this.clickPixelThresh){this.startDrag(this.startX,this.startY);}}if(this.dragThreshMet){if(C&&C.events.b4Drag){C.b4Drag(F);C.fireEvent("b4DragEvent",{e:F});}if(C&&C.events.drag){C.onDrag(F);C.fireEvent("dragEvent",{e:F});}if(C){this.fireEvents(F,false);}}this.stopEvent(F);}},fireEvents:function(V,L){var a=this.dragCurrent;if(!a||a.isLocked()||a.dragOnly){return;}var N=YAHOO.util.Event.getPageX(V),M=YAHOO.util.Event.getPageY(V),P=new YAHOO.util.Point(N,M),K=a.getTargetCoord(P.x,P.y),F=a.getDragEl(),E=["out","over","drop","enter"],U=new YAHOO.util.Region(K.y,K.x+F.offsetWidth,K.y+F.offsetHeight,K.x),I=[],D={},Q=[],c={outEvts:[],overEvts:[],dropEvts:[],enterEvts:[]};for(var S in this.dragOvers){var d=this.dragOvers[S];if(!this.isTypeOfDD(d)){continue;
276 266 }if(!this.isOverTarget(P,d,this.mode,U)){c.outEvts.push(d);}I[S]=true;delete this.dragOvers[S];}for(var R in a.groups){if("string"!=typeof R){continue;}for(S in this.ids[R]){var G=this.ids[R][S];if(!this.isTypeOfDD(G)){continue;}if(G.isTarget&&!G.isLocked()&&G!=a){if(this.isOverTarget(P,G,this.mode,U)){D[R]=true;if(L){c.dropEvts.push(G);}else{if(!I[G.id]){c.enterEvts.push(G);}else{c.overEvts.push(G);}this.dragOvers[G.id]=G;}}}}}this.interactionInfo={out:c.outEvts,enter:c.enterEvts,over:c.overEvts,drop:c.dropEvts,point:P,draggedRegion:U,sourceRegion:this.locationCache[a.id],validDrop:L};for(var C in D){Q.push(C);}if(L&&!c.dropEvts.length){this.interactionInfo.validDrop=false;if(a.events.invalidDrop){a.onInvalidDrop(V);a.fireEvent("invalidDropEvent",{e:V});}}for(S=0;S<E.length;S++){var Y=null;if(c[E[S]+"Evts"]){Y=c[E[S]+"Evts"];}if(Y&&Y.length){var H=E[S].charAt(0).toUpperCase()+E[S].substr(1),X="onDrag"+H,J="b4Drag"+H,O="drag"+H+"Event",W="drag"+H;if(this.mode){if(a.events[J]){a[J](V,Y,Q);a.fireEvent(J+"Event",{event:V,info:Y,group:Q});}if(a.events[W]){a[X](V,Y,Q);a.fireEvent(O,{event:V,info:Y,group:Q});}}else{for(var Z=0,T=Y.length;Z<T;++Z){if(a.events[J]){a[J](V,Y[Z].id,Q[0]);a.fireEvent(J+"Event",{event:V,info:Y[Z].id,group:Q[0]});}if(a.events[W]){a[X](V,Y[Z].id,Q[0]);a.fireEvent(O,{event:V,info:Y[Z].id,group:Q[0]});}}}}}},getBestMatch:function(E){var G=null;var D=E.length;if(D==1){G=E[0];}else{for(var F=0;F<D;++F){var C=E[F];if(this.mode==this.INTERSECT&&C.cursorIsOver){G=C;break;}else{if(!G||!G.overlap||(C.overlap&&G.overlap.getArea()<C.overlap.getArea())){G=C;}}}}return G;},refreshCache:function(D){var F=D||this.ids;for(var C in F){if("string"!=typeof C){continue;}for(var E in this.ids[C]){var G=this.ids[C][E];if(this.isTypeOfDD(G)){var H=this.getLocation(G);if(H){this.locationCache[G.id]=H;}else{delete this.locationCache[G.id];}}}}},verifyEl:function(D){try{if(D){var C=D.offsetParent;if(C){return true;}}}catch(E){}return false;},getLocation:function(H){if(!this.isTypeOfDD(H)){return null;}var F=H.getEl(),K,E,D,M,L,N,C,J,G;try{K=YAHOO.util.Dom.getXY(F);}catch(I){}if(!K){return null;}E=K[0];D=E+F.offsetWidth;M=K[1];L=M+F.offsetHeight;N=M-H.padding[0];C=D+H.padding[1];J=L+H.padding[2];G=E-H.padding[3];return new YAHOO.util.Region(N,C,J,G);},isOverTarget:function(K,C,E,F){var G=this.locationCache[C.id];if(!G||!this.useCache){G=this.getLocation(C);this.locationCache[C.id]=G;}if(!G){return false;}C.cursorIsOver=G.contains(K);var J=this.dragCurrent;if(!J||(!E&&!J.constrainX&&!J.constrainY)){return C.cursorIsOver;}C.overlap=null;if(!F){var H=J.getTargetCoord(K.x,K.y);var D=J.getDragEl();F=new YAHOO.util.Region(H.y,H.x+D.offsetWidth,H.y+D.offsetHeight,H.x);}var I=F.intersect(G);if(I){C.overlap=I;return(E)?true:C.cursorIsOver;}else{return false;}},_onUnload:function(D,C){this.unregAll();},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null;}this._execOnAll("unreg",[]);this.ids={};},elementCache:{},getElWrapper:function(D){var C=this.elementCache[D];if(!C||!C.el){C=this.elementCache[D]=new this.ElementWrapper(YAHOO.util.Dom.get(D));}return C;},getElement:function(C){return YAHOO.util.Dom.get(C);},getCss:function(D){var C=YAHOO.util.Dom.get(D);return(C)?C.style:null;},ElementWrapper:function(C){this.el=C||null;this.id=this.el&&C.id;this.css=this.el&&C.style;},getPosX:function(C){return YAHOO.util.Dom.getX(C);},getPosY:function(C){return YAHOO.util.Dom.getY(C);},swapNode:function(E,C){if(E.swapNode){E.swapNode(C);}else{var F=C.parentNode;var D=C.nextSibling;if(D==E){F.insertBefore(E,C);}else{if(C==E.nextSibling){F.insertBefore(C,E);}else{E.parentNode.replaceChild(C,E);F.insertBefore(E,D);}}}},getScroll:function(){var E,C,F=document.documentElement,D=document.body;if(F&&(F.scrollTop||F.scrollLeft)){E=F.scrollTop;C=F.scrollLeft;}else{if(D){E=D.scrollTop;C=D.scrollLeft;}else{}}return{top:E,left:C};},getStyle:function(D,C){return YAHOO.util.Dom.getStyle(D,C);},getScrollTop:function(){return this.getScroll().top;},getScrollLeft:function(){return this.getScroll().left;},moveToEl:function(C,E){var D=YAHOO.util.Dom.getXY(E);YAHOO.util.Dom.setXY(C,D);},getClientHeight:function(){return YAHOO.util.Dom.getViewportHeight();},getClientWidth:function(){return YAHOO.util.Dom.getViewportWidth();},numericSort:function(D,C){return(D-C);},_timeoutCount:0,_addListeners:function(){var C=YAHOO.util.DDM;if(YAHOO.util.Event&&document){C._onLoad();}else{if(C._timeoutCount>2000){}else{setTimeout(C._addListeners,10);if(document&&document.body){C._timeoutCount+=1;}}}},handleWasClicked:function(C,E){if(this.isHandle(E,C.id)){return true;}else{var D=C.parentNode;while(D){if(this.isHandle(E,D.id)){return true;}else{D=D.parentNode;}}}return false;}};}();YAHOO.util.DDM=YAHOO.util.DragDropMgr;YAHOO.util.DDM._addListeners();}(function(){var A=YAHOO.util.Event;var B=YAHOO.util.Dom;YAHOO.util.DragDrop=function(E,C,D){if(E){this.init(E,C,D);}};YAHOO.util.DragDrop.prototype={events:null,on:function(){this.subscribe.apply(this,arguments);},id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true;},unlock:function(){this.locked=false;},isTarget:true,padding:null,dragOnly:false,useShim:false,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,deltaX:0,deltaY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,cursorIsOver:false,overlap:null,b4StartDrag:function(C,D){},startDrag:function(C,D){},b4Drag:function(C){},onDrag:function(C){},onDragEnter:function(C,D){},b4DragOver:function(C){},onDragOver:function(C,D){},b4DragOut:function(C){},onDragOut:function(C,D){},b4DragDrop:function(C){},onDragDrop:function(C,D){},onInvalidDrop:function(C){},b4EndDrag:function(C){},endDrag:function(C){},b4MouseDown:function(C){},onMouseDown:function(C){},onMouseUp:function(C){},onAvailable:function(){},getEl:function(){if(!this._domRef){this._domRef=B.get(this.id);
277 267 }return this._domRef;},getDragEl:function(){return B.get(this.dragElId);},init:function(F,C,D){this.initTarget(F,C,D);A.on(this._domRef||this.id,"mousedown",this.handleMouseDown,this,true);for(var E in this.events){this.createEvent(E+"Event");}},initTarget:function(E,C,D){this.config=D||{};this.events={};this.DDM=YAHOO.util.DDM;this.groups={};if(typeof E!=="string"){this._domRef=E;E=B.generateId(E);}this.id=E;this.addToGroup((C)?C:"default");this.handleElId=E;A.onAvailable(E,this.handleOnAvailable,this,true);this.setDragElId(E);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();},applyConfig:function(){this.events={mouseDown:true,b4MouseDown:true,mouseUp:true,b4StartDrag:true,startDrag:true,b4EndDrag:true,endDrag:true,drag:true,b4Drag:true,invalidDrop:true,b4DragOut:true,dragOut:true,dragEnter:true,b4DragOver:true,dragOver:true,b4DragDrop:true,dragDrop:true};if(this.config.events){for(var C in this.config.events){if(this.config.events[C]===false){this.events[C]=false;}}}this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false);this.dragOnly=((this.config.dragOnly===true)?true:false);this.useShim=((this.config.useShim===true)?true:false);},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable();},setPadding:function(E,C,F,D){if(!C&&0!==C){this.padding=[E,E,E,E];}else{if(!F&&0!==F){this.padding=[E,C,E,C];}else{this.padding=[E,C,F,D];}}},setInitPosition:function(F,E){var G=this.getEl();if(!this.DDM.verifyEl(G)){if(G&&G.style&&(G.style.display=="none")){}else{}return;}var D=F||0;var C=E||0;var H=B.getXY(G);this.initPageX=H[0]-D;this.initPageY=H[1]-C;this.lastPageX=H[0];this.lastPageY=H[1];this.setStartPosition(H);},setStartPosition:function(D){var C=D||B.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=C[0];this.startPageY=C[1];},addToGroup:function(C){this.groups[C]=true;this.DDM.regDragDrop(this,C);},removeFromGroup:function(C){if(this.groups[C]){delete this.groups[C];}this.DDM.removeDDFromGroup(this,C);},setDragElId:function(C){this.dragElId=C;},setHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C);}this.handleElId=C;this.DDM.regHandle(this.id,C);},setOuterHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C);}A.on(C,"mousedown",this.handleMouseDown,this,true);this.setHandleElId(C);this.hasOuterHandles=true;},unreg:function(){A.removeListener(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this);},isLocked:function(){return(this.DDM.isLocked()||this.locked);},handleMouseDown:function(J,I){var D=J.which||J.button;if(this.primaryButtonOnly&&D>1){return;}if(this.isLocked()){return;}var C=this.b4MouseDown(J),F=true;if(this.events.b4MouseDown){F=this.fireEvent("b4MouseDownEvent",J);}var E=this.onMouseDown(J),H=true;if(this.events.mouseDown){H=this.fireEvent("mouseDownEvent",J);}if((C===false)||(E===false)||(F===false)||(H===false)){return;}this.DDM.refreshCache(this.groups);var G=new YAHOO.util.Point(A.getPageX(J),A.getPageY(J));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(G,this)){}else{if(this.clickValidator(J)){this.setStartPosition();this.DDM.handleMouseDown(J,this);this.DDM.stopEvent(J);}else{}}},clickValidator:function(D){var C=YAHOO.util.Event.getTarget(D);return(this.isValidHandleChild(C)&&(this.id==this.handleElId||this.DDM.handleWasClicked(C,this.id)));},getTargetCoord:function(E,D){var C=E-this.deltaX;var F=D-this.deltaY;if(this.constrainX){if(C<this.minX){C=this.minX;}if(C>this.maxX){C=this.maxX;}}if(this.constrainY){if(F<this.minY){F=this.minY;}if(F>this.maxY){F=this.maxY;}}C=this.getTick(C,this.xTicks);F=this.getTick(F,this.yTicks);return{x:C,y:F};},addInvalidHandleType:function(C){var D=C.toUpperCase();this.invalidHandleTypes[D]=D;},addInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C);}this.invalidHandleIds[C]=C;},addInvalidHandleClass:function(C){this.invalidHandleClasses.push(C);},removeInvalidHandleType:function(C){var D=C.toUpperCase();delete this.invalidHandleTypes[D];},removeInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C);}delete this.invalidHandleIds[C];},removeInvalidHandleClass:function(D){for(var E=0,C=this.invalidHandleClasses.length;E<C;++E){if(this.invalidHandleClasses[E]==D){delete this.invalidHandleClasses[E];}}},isValidHandleChild:function(F){var E=true;var H;try{H=F.nodeName.toUpperCase();}catch(G){H=F.nodeName;}E=E&&!this.invalidHandleTypes[H];E=E&&!this.invalidHandleIds[F.id];for(var D=0,C=this.invalidHandleClasses.length;E&&D<C;++D){E=!B.hasClass(F,this.invalidHandleClasses[D]);}return E;},setXTicks:function(F,C){this.xTicks=[];this.xTickSize=C;var E={};for(var D=this.initPageX;D>=this.minX;D=D-C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true;}}for(D=this.initPageX;D<=this.maxX;D=D+C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true;}}this.xTicks.sort(this.DDM.numericSort);},setYTicks:function(F,C){this.yTicks=[];this.yTickSize=C;var E={};for(var D=this.initPageY;D>=this.minY;D=D-C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true;}}for(D=this.initPageY;D<=this.maxY;D=D+C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true;}}this.yTicks.sort(this.DDM.numericSort);},setXConstraint:function(E,D,C){this.leftConstraint=parseInt(E,10);this.rightConstraint=parseInt(D,10);this.minX=this.initPageX-this.leftConstraint;this.maxX=this.initPageX+this.rightConstraint;if(C){this.setXTicks(this.initPageX,C);}this.constrainX=true;},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks();},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0;},setYConstraint:function(C,E,D){this.topConstraint=parseInt(C,10);this.bottomConstraint=parseInt(E,10);this.minY=this.initPageY-this.topConstraint;this.maxY=this.initPageY+this.bottomConstraint;if(D){this.setYTicks(this.initPageY,D);
278   -}this.constrainY=true;},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var D=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var C=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(D,C);}else{this.setInitPosition();}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize);}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize);}},getTick:function(I,F){if(!F){return I;}else{if(F[0]>=I){return F[0];}else{for(var D=0,C=F.length;D<C;++D){var E=D+1;if(F[E]&&F[E]>=I){var H=I-F[D];var G=F[E]-I;return(G>H)?F[D]:F[E];}}return F[F.length-1];}}},toString:function(){return("DragDrop "+this.id);}};YAHOO.augment(YAHOO.util.DragDrop,YAHOO.util.EventProvider);})();YAHOO.util.DD=function(C,A,B){if(C){this.init(C,A,B);}};YAHOO.extend(YAHOO.util.DD,YAHOO.util.DragDrop,{scroll:true,autoOffset:function(C,B){var A=C-this.startPageX;var D=B-this.startPageY;this.setDelta(A,D);},setDelta:function(B,A){this.deltaX=B;this.deltaY=A;},setDragElPos:function(C,B){var A=this.getDragEl();this.alignElWithMouse(A,C,B);},alignElWithMouse:function(C,G,F){var E=this.getTargetCoord(G,F);if(!this.deltaSetXY){var H=[E.x,E.y];YAHOO.util.Dom.setXY(C,H);var D=parseInt(YAHOO.util.Dom.getStyle(C,"left"),10);var B=parseInt(YAHOO.util.Dom.getStyle(C,"top"),10);this.deltaSetXY=[D-E.x,B-E.y];}else{YAHOO.util.Dom.setStyle(C,"left",(E.x+this.deltaSetXY[0])+"px");YAHOO.util.Dom.setStyle(C,"top",(E.y+this.deltaSetXY[1])+"px");}this.cachePosition(E.x,E.y);var A=this;setTimeout(function(){A.autoScroll.call(A,E.x,E.y,C.offsetHeight,C.offsetWidth);},0);},cachePosition:function(B,A){if(B){this.lastPageX=B;this.lastPageY=A;}else{var C=YAHOO.util.Dom.getXY(this.getEl());this.lastPageX=C[0];this.lastPageY=C[1];}},autoScroll:function(J,I,E,K){if(this.scroll){var L=this.DDM.getClientHeight();var B=this.DDM.getClientWidth();var N=this.DDM.getScrollTop();var D=this.DDM.getScrollLeft();var H=E+I;var M=K+J;var G=(L+N-I-this.deltaY);var F=(B+D-J-this.deltaX);var C=40;var A=(document.all)?80:30;if(H>L&&G<C){window.scrollTo(D,N+A);}if(I<N&&N>0&&I-N<C){window.scrollTo(D,N-A);}if(M>B&&F<C){window.scrollTo(D+A,N);}if(J<D&&D>0&&J-D<C){window.scrollTo(D-A,N);}}},applyConfig:function(){YAHOO.util.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false);},b4MouseDown:function(A){this.setStartPosition();this.autoOffset(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A));},b4Drag:function(A){this.setDragElPos(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A));},toString:function(){return("DD "+this.id);}});YAHOO.util.DDProxy=function(C,A,B){if(C){this.init(C,A,B);this.initFrame();}};YAHOO.util.DDProxy.dragElId="ygddfdiv";YAHOO.extend(YAHOO.util.DDProxy,YAHOO.util.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var B=this,A=document.body;if(!A||!A.firstChild){setTimeout(function(){B.createFrame();},50);return;}var F=this.getDragEl(),E=YAHOO.util.Dom;if(!F){F=document.createElement("div");F.id=this.dragElId;var D=F.style;D.position="absolute";D.visibility="hidden";D.cursor="move";D.border="2px solid #aaa";D.zIndex=999;D.height="25px";D.width="25px";var C=document.createElement("div");E.setStyle(C,"height","100%");E.setStyle(C,"width","100%");E.setStyle(C,"background-color","#ccc");E.setStyle(C,"opacity","0");F.appendChild(C);A.insertBefore(F,A.firstChild);}},initFrame:function(){this.createFrame();},applyConfig:function(){YAHOO.util.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||YAHOO.util.DDProxy.dragElId);},showFrame:function(E,D){var C=this.getEl();var A=this.getDragEl();var B=A.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(B.width,10)/2),Math.round(parseInt(B.height,10)/2));}this.setDragElPos(E,D);YAHOO.util.Dom.setStyle(A,"visibility","visible");},_resizeProxy:function(){if(this.resizeFrame){var H=YAHOO.util.Dom;var B=this.getEl();var C=this.getDragEl();var G=parseInt(H.getStyle(C,"borderTopWidth"),10);var I=parseInt(H.getStyle(C,"borderRightWidth"),10);var F=parseInt(H.getStyle(C,"borderBottomWidth"),10);var D=parseInt(H.getStyle(C,"borderLeftWidth"),10);if(isNaN(G)){G=0;}if(isNaN(I)){I=0;}if(isNaN(F)){F=0;}if(isNaN(D)){D=0;}var E=Math.max(0,B.offsetWidth-I-D);var A=Math.max(0,B.offsetHeight-G-F);H.setStyle(C,"width",E+"px");H.setStyle(C,"height",A+"px");}},b4MouseDown:function(B){this.setStartPosition();var A=YAHOO.util.Event.getPageX(B);var C=YAHOO.util.Event.getPageY(B);this.autoOffset(A,C);},b4StartDrag:function(A,B){this.showFrame(A,B);},b4EndDrag:function(A){YAHOO.util.Dom.setStyle(this.getDragEl(),"visibility","hidden");},endDrag:function(D){var C=YAHOO.util.Dom;var B=this.getEl();var A=this.getDragEl();C.setStyle(A,"visibility","");C.setStyle(B,"visibility","hidden");YAHOO.util.DDM.moveToEl(B,A);C.setStyle(A,"visibility","hidden");C.setStyle(B,"visibility","");},toString:function(){return("DDProxy "+this.id);}});YAHOO.util.DDTarget=function(C,A,B){if(C){this.initTarget(C,A,B);}};YAHOO.extend(YAHOO.util.DDTarget,YAHOO.util.DragDrop,{toString:function(){return("DDTarget "+this.id);}});YAHOO.register("dragdrop",YAHOO.util.DragDropMgr,{version:"2.7.0",build:"1799"});
279   -/*
  268 +}this.constrainY=true;},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var D=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var C=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(D,C);}else{this.setInitPosition();}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize);}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize);}},getTick:function(I,F){if(!F){return I;}else{if(F[0]>=I){return F[0];}else{for(var D=0,C=F.length;D<C;++D){var E=D+1;if(F[E]&&F[E]>=I){var H=I-F[D];var G=F[E]-I;return(G>H)?F[D]:F[E];}}return F[F.length-1];}}},toString:function(){return("DragDrop "+this.id);}};YAHOO.augment(YAHOO.util.DragDrop,YAHOO.util.EventProvider);})();YAHOO.util.DD=function(C,A,B){if(C){this.init(C,A,B);}};YAHOO.extend(YAHOO.util.DD,YAHOO.util.DragDrop,{scroll:true,autoOffset:function(C,B){var A=C-this.startPageX;var D=B-this.startPageY;this.setDelta(A,D);},setDelta:function(B,A){this.deltaX=B;this.deltaY=A;},setDragElPos:function(C,B){var A=this.getDragEl();this.alignElWithMouse(A,C,B);},alignElWithMouse:function(C,G,F){var E=this.getTargetCoord(G,F);if(!this.deltaSetXY){var H=[E.x,E.y];YAHOO.util.Dom.setXY(C,H);var D=parseInt(YAHOO.util.Dom.getStyle(C,"left"),10);var B=parseInt(YAHOO.util.Dom.getStyle(C,"top"),10);this.deltaSetXY=[D-E.x,B-E.y];}else{YAHOO.util.Dom.setStyle(C,"left",(E.x+this.deltaSetXY[0])+"px");YAHOO.util.Dom.setStyle(C,"top",(E.y+this.deltaSetXY[1])+"px");}this.cachePosition(E.x,E.y);var A=this;setTimeout(function(){A.autoScroll.call(A,E.x,E.y,C.offsetHeight,C.offsetWidth);},0);},cachePosition:function(B,A){if(B){this.lastPageX=B;this.lastPageY=A;}else{var C=YAHOO.util.Dom.getXY(this.getEl());this.lastPageX=C[0];this.lastPageY=C[1];}},autoScroll:function(J,I,E,K){if(this.scroll){var L=this.DDM.getClientHeight();var B=this.DDM.getClientWidth();var N=this.DDM.getScrollTop();var D=this.DDM.getScrollLeft();var H=E+I;var M=K+J;var G=(L+N-I-this.deltaY);var F=(B+D-J-this.deltaX);var C=40;var A=(document.all)?80:30;if(H>L&&G<C){window.scrollTo(D,N+A);}if(I<N&&N>0&&I-N<C){window.scrollTo(D,N-A);}if(M>B&&F<C){window.scrollTo(D+A,N);}if(J<D&&D>0&&J-D<C){window.scrollTo(D-A,N);}}},applyConfig:function(){YAHOO.util.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false);},b4MouseDown:function(A){this.setStartPosition();this.autoOffset(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A));},b4Drag:function(A){this.setDragElPos(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A));},toString:function(){return("DD "+this.id);}});YAHOO.util.DDProxy=function(C,A,B){if(C){this.init(C,A,B);this.initFrame();}};YAHOO.util.DDProxy.dragElId="ygddfdiv";YAHOO.extend(YAHOO.util.DDProxy,YAHOO.util.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var B=this,A=document.body;if(!A||!A.firstChild){setTimeout(function(){B.createFrame();},50);return;}var F=this.getDragEl(),E=YAHOO.util.Dom;if(!F){F=document.createElement("div");F.id=this.dragElId;var D=F.style;D.position="absolute";D.visibility="hidden";D.cursor="move";D.border="2px solid #aaa";D.zIndex=999;D.height="25px";D.width="25px";var C=document.createElement("div");E.setStyle(C,"height","100%");E.setStyle(C,"width","100%");E.setStyle(C,"background-color","#ccc");E.setStyle(C,"opacity","0");F.appendChild(C);A.insertBefore(F,A.firstChild);}},initFrame:function(){this.createFrame();},applyConfig:function(){YAHOO.util.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||YAHOO.util.DDProxy.dragElId);},showFrame:function(E,D){var C=this.getEl();var A=this.getDragEl();var B=A.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(B.width,10)/2),Math.round(parseInt(B.height,10)/2));}this.setDragElPos(E,D);YAHOO.util.Dom.setStyle(A,"visibility","visible");},_resizeProxy:function(){if(this.resizeFrame){var H=YAHOO.util.Dom;var B=this.getEl();var C=this.getDragEl();var G=parseInt(H.getStyle(C,"borderTopWidth"),10);var I=parseInt(H.getStyle(C,"borderRightWidth"),10);var F=parseInt(H.getStyle(C,"borderBottomWidth"),10);var D=parseInt(H.getStyle(C,"borderLeftWidth"),10);if(isNaN(G)){G=0;}if(isNaN(I)){I=0;}if(isNaN(F)){F=0;}if(isNaN(D)){D=0;}var E=Math.max(0,B.offsetWidth-I-D);var A=Math.max(0,B.offsetHeight-G-F);H.setStyle(C,"width",E+"px");H.setStyle(C,"height",A+"px");}},b4MouseDown:function(B){this.setStartPosition();var A=YAHOO.util.Event.getPageX(B);var C=YAHOO.util.Event.getPageY(B);this.autoOffset(A,C);},b4StartDrag:function(A,B){this.showFrame(A,B);},b4EndDrag:function(A){YAHOO.util.Dom.setStyle(this.getDragEl(),"visibility","hidden");},endDrag:function(D){var C=YAHOO.util.Dom;var B=this.getEl();var A=this.getDragEl();C.setStyle(A,"visibility","");C.setStyle(B,"visibility","hidden");YAHOO.util.DDM.moveToEl(B,A);C.setStyle(A,"visibility","hidden");C.setStyle(B,"visibility","");},toString:function(){return("DDProxy "+this.id);}});YAHOO.util.DDTarget=function(C,A,B){if(C){this.initTarget(C,A,B);}};YAHOO.extend(YAHOO.util.DDTarget,YAHOO.util.DragDrop,{toString:function(){return("DDTarget "+this.id);}});YAHOO.register("dragdrop",YAHOO.util.DragDropMgr,{version:"2.7.0",build:"1799"});/*
280 269 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
281 270 Code licensed under the BSD License:
282 271 http://developer.yahoo.net/yui/license.txt
... ... @@ -284,8 +273,7 @@ version: 2.7.0
284 273 */
285 274 (function(){var B=YAHOO.util.Dom.getXY,A=YAHOO.util.Event,D=Array.prototype.slice;function C(G,E,F,H){C.ANIM_AVAIL=(!YAHOO.lang.isUndefined(YAHOO.util.Anim));if(G){this.init(G,E,true);this.initSlider(H);this.initThumb(F);}}YAHOO.lang.augmentObject(C,{getHorizSlider:function(F,G,I,H,E){return new C(F,F,new YAHOO.widget.SliderThumb(G,F,I,H,0,0,E),"horiz");},getVertSlider:function(G,H,E,I,F){return new C(G,G,new YAHOO.widget.SliderThumb(H,G,0,0,E,I,F),"vert");},getSliderRegion:function(G,H,J,I,E,K,F){return new C(G,G,new YAHOO.widget.SliderThumb(H,G,J,I,E,K,F),"region");},SOURCE_UI_EVENT:1,SOURCE_SET_VALUE:2,SOURCE_KEY_EVENT:3,ANIM_AVAIL:false},true);YAHOO.extend(C,YAHOO.util.DragDrop,{_mouseDown:false,dragOnly:true,initSlider:function(E){this.type=E;this.createEvent("change",this);this.createEvent("slideStart",this);this.createEvent("slideEnd",this);this.isTarget=false;this.animate=C.ANIM_AVAIL;this.backgroundEnabled=true;this.tickPause=40;this.enableKeys=true;this.keyIncrement=20;this.moveComplete=true;this.animationDuration=0.2;this.SOURCE_UI_EVENT=1;this.SOURCE_SET_VALUE=2;this.valueChangeSource=0;this._silent=false;this.lastOffset=[0,0];},initThumb:function(F){var E=this;this.thumb=F;F.cacheBetweenDrags=true;if(F._isHoriz&&F.xTicks&&F.xTicks.length){this.tickPause=Math.round(360/F.xTicks.length);}else{if(F.yTicks&&F.yTicks.length){this.tickPause=Math.round(360/F.yTicks.length);}}F.onAvailable=function(){return E.setStartSliderState();};F.onMouseDown=function(){E._mouseDown=true;return E.focus();};F.startDrag=function(){E._slideStart();};F.onDrag=function(){E.fireEvents(true);};F.onMouseUp=function(){E.thumbMouseUp();};},onAvailable:function(){this._bindKeyEvents();},_bindKeyEvents:function(){A.on(this.id,"keydown",this.handleKeyDown,this,true);A.on(this.id,"keypress",this.handleKeyPress,this,true);},handleKeyPress:function(F){if(this.enableKeys){var E=A.getCharCode(F);switch(E){case 37:case 38:case 39:case 40:case 36:case 35:A.preventDefault(F);break;default:}}},handleKeyDown:function(J){if(this.enableKeys){var G=A.getCharCode(J),F=this.thumb,H=this.getXValue(),E=this.getYValue(),I=true;switch(G){case 37:H-=this.keyIncrement;break;case 38:E-=this.keyIncrement;break;case 39:H+=this.keyIncrement;break;case 40:E+=this.keyIncrement;break;case 36:H=F.leftConstraint;E=F.topConstraint;break;case 35:H=F.rightConstraint;E=F.bottomConstraint;break;default:I=false;}if(I){if(F._isRegion){this._setRegionValue(C.SOURCE_KEY_EVENT,H,E,true);}else{this._setValue(C.SOURCE_KEY_EVENT,(F._isHoriz?H:E),true);}A.stopEvent(J);}}},setStartSliderState:function(){this.setThumbCenterPoint();this.baselinePos=B(this.getEl());this.thumb.startOffset=this.thumb.getOffsetFromParent(this.baselinePos);if(this.thumb._isRegion){if(this.deferredSetRegionValue){this._setRegionValue.apply(this,this.deferredSetRegionValue);this.deferredSetRegionValue=null;}else{this.setRegionValue(0,0,true,true,true);}}else{if(this.deferredSetValue){this._setValue.apply(this,this.deferredSetValue);this.deferredSetValue=null;}else{this.setValue(0,true,true,true);}}},setThumbCenterPoint:function(){var E=this.thumb.getEl();if(E){this.thumbCenterPoint={x:parseInt(E.offsetWidth/2,10),y:parseInt(E.offsetHeight/2,10)};}},lock:function(){this.thumb.lock();this.locked=true;},unlock:function(){this.thumb.unlock();this.locked=false;},thumbMouseUp:function(){this._mouseDown=false;if(!this.isLocked()&&!this.moveComplete){this.endMove();}},onMouseUp:function(){this._mouseDown=false;if(this.backgroundEnabled&&!this.isLocked()&&!this.moveComplete){this.endMove();}},getThumb:function(){return this.thumb;},focus:function(){this.valueChangeSource=C.SOURCE_UI_EVENT;var E=this.getEl();if(E.focus){try{E.focus();}catch(F){}}this.verifyOffset();return !this.isLocked();},onChange:function(E,F){},onSlideStart:function(){},onSlideEnd:function(){},getValue:function(){return this.thumb.getValue();},getXValue:function(){return this.thumb.getXValue();},getYValue:function(){return this.thumb.getYValue();},setValue:function(){var E=D.call(arguments);E.unshift(C.SOURCE_SET_VALUE);return this._setValue.apply(this,E);},_setValue:function(I,L,G,H,E){var F=this.thumb,K,J;if(!F.available){this.deferredSetValue=arguments;return false;}if(this.isLocked()&&!H){return false;}if(isNaN(L)){return false;}if(F._isRegion){return false;}this._silent=E;this.valueChangeSource=I||C.SOURCE_SET_VALUE;F.lastOffset=[L,L];this.verifyOffset(true);this._slideStart();if(F._isHoriz){K=F.initPageX+L+this.thumbCenterPoint.x;this.moveThumb(K,F.initPageY,G);}else{J=F.initPageY+L+this.thumbCenterPoint.y;this.moveThumb(F.initPageX,J,G);}return true;},setRegionValue:function(){var E=D.call(arguments);E.unshift(C.SOURCE_SET_VALUE);return this._setRegionValue.apply(this,E);},_setRegionValue:function(F,J,H,I,G,K){var L=this.thumb,E,M;if(!L.available){this.deferredSetRegionValue=arguments;return false;}if(this.isLocked()&&!G){return false;}if(isNaN(J)){return false;}if(!L._isRegion){return false;}this._silent=K;this.valueChangeSource=F||C.SOURCE_SET_VALUE;L.lastOffset=[J,H];this.verifyOffset(true);this._slideStart();E=L.initPageX+J+this.thumbCenterPoint.x;M=L.initPageY+H+this.thumbCenterPoint.y;this.moveThumb(E,M,I);return true;},verifyOffset:function(F){var G=B(this.getEl()),E=this.thumb;if(!this.thumbCenterPoint||!this.thumbCenterPoint.x){this.setThumbCenterPoint();}if(G){if(G[0]!=this.baselinePos[0]||G[1]!=this.baselinePos[1]){this.setInitPosition();this.baselinePos=G;E.initPageX=this.initPageX+E.startOffset[0];E.initPageY=this.initPageY+E.startOffset[1];E.deltaSetXY=null;this.resetThumbConstraints();return false;}}return true;},moveThumb:function(K,J,I,G){var L=this.thumb,M=this,F,E,H;if(!L.available){return;}L.setDelta(this.thumbCenterPoint.x,this.thumbCenterPoint.y);E=L.getTargetCoord(K,J);F=[Math.round(E.x),Math.round(E.y)];if(this.animate&&L._graduated&&!I){this.lock();this.curCoord=B(this.thumb.getEl());this.curCoord=[Math.round(this.curCoord[0]),Math.round(this.curCoord[1])];setTimeout(function(){M.moveOneTick(F);
286 275 },this.tickPause);}else{if(this.animate&&C.ANIM_AVAIL&&!I){this.lock();H=new YAHOO.util.Motion(L.id,{points:{to:F}},this.animationDuration,YAHOO.util.Easing.easeOut);H.onComplete.subscribe(function(){M.unlock();if(!M._mouseDown){M.endMove();}});H.animate();}else{L.setDragElPos(K,J);if(!G&&!this._mouseDown){this.endMove();}}}},_slideStart:function(){if(!this._sliding){if(!this._silent){this.onSlideStart();this.fireEvent("slideStart");}this._sliding=true;}},_slideEnd:function(){if(this._sliding&&this.moveComplete){var E=this._silent;this._sliding=false;this._silent=false;this.moveComplete=false;if(!E){this.onSlideEnd();this.fireEvent("slideEnd");}}},moveOneTick:function(F){var H=this.thumb,G=this,I=null,E,J;if(H._isRegion){I=this._getNextX(this.curCoord,F);E=(I!==null)?I[0]:this.curCoord[0];I=this._getNextY(this.curCoord,F);J=(I!==null)?I[1]:this.curCoord[1];I=E!==this.curCoord[0]||J!==this.curCoord[1]?[E,J]:null;}else{if(H._isHoriz){I=this._getNextX(this.curCoord,F);}else{I=this._getNextY(this.curCoord,F);}}if(I){this.curCoord=I;this.thumb.alignElWithMouse(H.getEl(),I[0]+this.thumbCenterPoint.x,I[1]+this.thumbCenterPoint.y);if(!(I[0]==F[0]&&I[1]==F[1])){setTimeout(function(){G.moveOneTick(F);},this.tickPause);}else{this.unlock();if(!this._mouseDown){this.endMove();}}}else{this.unlock();if(!this._mouseDown){this.endMove();}}},_getNextX:function(E,F){var H=this.thumb,J,G=[],I=null;if(E[0]>F[0]){J=H.tickSize-this.thumbCenterPoint.x;G=H.getTargetCoord(E[0]-J,E[1]);I=[G.x,G.y];}else{if(E[0]<F[0]){J=H.tickSize+this.thumbCenterPoint.x;G=H.getTargetCoord(E[0]+J,E[1]);I=[G.x,G.y];}else{}}return I;},_getNextY:function(E,F){var H=this.thumb,J,G=[],I=null;if(E[1]>F[1]){J=H.tickSize-this.thumbCenterPoint.y;G=H.getTargetCoord(E[0],E[1]-J);I=[G.x,G.y];}else{if(E[1]<F[1]){J=H.tickSize+this.thumbCenterPoint.y;G=H.getTargetCoord(E[0],E[1]+J);I=[G.x,G.y];}else{}}return I;},b4MouseDown:function(E){if(!this.backgroundEnabled){return false;}this.thumb.autoOffset();this.resetThumbConstraints();},onMouseDown:function(F){if(!this.backgroundEnabled||this.isLocked()){return false;}this._mouseDown=true;var E=A.getPageX(F),G=A.getPageY(F);this.focus();this._slideStart();this.moveThumb(E,G);},onDrag:function(F){if(this.backgroundEnabled&&!this.isLocked()){var E=A.getPageX(F),G=A.getPageY(F);this.moveThumb(E,G,true,true);this.fireEvents();}},endMove:function(){this.unlock();this.fireEvents();this.moveComplete=true;this._slideEnd();},resetThumbConstraints:function(){var E=this.thumb;E.setXConstraint(E.leftConstraint,E.rightConstraint,E.xTickSize);E.setYConstraint(E.topConstraint,E.bottomConstraint,E.xTickSize);},fireEvents:function(G){var F=this.thumb,I,H,E;if(!G){F.cachePosition();}if(!this.isLocked()){if(F._isRegion){I=F.getXValue();H=F.getYValue();if(I!=this.previousX||H!=this.previousY){if(!this._silent){this.onChange(I,H);this.fireEvent("change",{x:I,y:H});}}this.previousX=I;this.previousY=H;}else{E=F.getValue();if(E!=this.previousVal){if(!this._silent){this.onChange(E);this.fireEvent("change",E);}}this.previousVal=E;}}},toString:function(){return("Slider ("+this.type+") "+this.id);}});YAHOO.lang.augmentProto(C,YAHOO.util.EventProvider);YAHOO.widget.Slider=C;})();YAHOO.widget.SliderThumb=function(G,B,E,D,A,F,C){if(G){YAHOO.widget.SliderThumb.superclass.constructor.call(this,G,B);this.parentElId=B;}this.isTarget=false;this.tickSize=C;this.maintainOffset=true;this.initSlider(E,D,A,F,C);this.scroll=false;};YAHOO.extend(YAHOO.widget.SliderThumb,YAHOO.util.DD,{startOffset:null,dragOnly:true,_isHoriz:false,_prevVal:0,_graduated:false,getOffsetFromParent0:function(C){var A=YAHOO.util.Dom.getXY(this.getEl()),B=C||YAHOO.util.Dom.getXY(this.parentElId);return[(A[0]-B[0]),(A[1]-B[1])];},getOffsetFromParent:function(H){var A=this.getEl(),E,I,F,B,K,D,C,J,G;if(!this.deltaOffset){I=YAHOO.util.Dom.getXY(A);F=H||YAHOO.util.Dom.getXY(this.parentElId);E=[(I[0]-F[0]),(I[1]-F[1])];B=parseInt(YAHOO.util.Dom.getStyle(A,"left"),10);K=parseInt(YAHOO.util.Dom.getStyle(A,"top"),10);D=B-E[0];C=K-E[1];if(isNaN(D)||isNaN(C)){}else{this.deltaOffset=[D,C];}}else{J=parseInt(YAHOO.util.Dom.getStyle(A,"left"),10);G=parseInt(YAHOO.util.Dom.getStyle(A,"top"),10);E=[J+this.deltaOffset[0],G+this.deltaOffset[1]];}return E;},initSlider:function(D,C,A,E,B){this.initLeft=D;this.initRight=C;this.initUp=A;this.initDown=E;this.setXConstraint(D,C,B);this.setYConstraint(A,E,B);if(B&&B>1){this._graduated=true;}this._isHoriz=(D||C);this._isVert=(A||E);this._isRegion=(this._isHoriz&&this._isVert);},clearTicks:function(){YAHOO.widget.SliderThumb.superclass.clearTicks.call(this);this.tickSize=0;this._graduated=false;},getValue:function(){return(this._isHoriz)?this.getXValue():this.getYValue();},getXValue:function(){if(!this.available){return 0;}var A=this.getOffsetFromParent();if(YAHOO.lang.isNumber(A[0])){this.lastOffset=A;return(A[0]-this.startOffset[0]);}else{return(this.lastOffset[0]-this.startOffset[0]);}},getYValue:function(){if(!this.available){return 0;}var A=this.getOffsetFromParent();if(YAHOO.lang.isNumber(A[1])){this.lastOffset=A;return(A[1]-this.startOffset[1]);}else{return(this.lastOffset[1]-this.startOffset[1]);}},toString:function(){return"SliderThumb "+this.id;},onChange:function(A,B){}});(function(){var A=YAHOO.util.Event,B=YAHOO.widget;function C(I,F,H,D){var G=this,J={min:false,max:false},E,K;this.minSlider=I;this.maxSlider=F;this.activeSlider=I;this.isHoriz=I.thumb._isHoriz;E=this.minSlider.thumb.onMouseDown;K=this.maxSlider.thumb.onMouseDown;this.minSlider.thumb.onMouseDown=function(){G.activeSlider=G.minSlider;E.apply(this,arguments);};this.maxSlider.thumb.onMouseDown=function(){G.activeSlider=G.maxSlider;K.apply(this,arguments);};this.minSlider.thumb.onAvailable=function(){I.setStartSliderState();J.min=true;if(J.max){G.fireEvent("ready",G);}};this.maxSlider.thumb.onAvailable=function(){F.setStartSliderState();J.max=true;if(J.min){G.fireEvent("ready",G);}};I.onMouseDown=F.onMouseDown=function(L){return this.backgroundEnabled&&G._handleMouseDown(L);
287   -};I.onDrag=F.onDrag=function(L){G._handleDrag(L);};I.onMouseUp=F.onMouseUp=function(L){G._handleMouseUp(L);};I._bindKeyEvents=function(){G._bindKeyEvents(this);};F._bindKeyEvents=function(){};I.subscribe("change",this._handleMinChange,I,this);I.subscribe("slideStart",this._handleSlideStart,I,this);I.subscribe("slideEnd",this._handleSlideEnd,I,this);F.subscribe("change",this._handleMaxChange,F,this);F.subscribe("slideStart",this._handleSlideStart,F,this);F.subscribe("slideEnd",this._handleSlideEnd,F,this);this.createEvent("ready",this);this.createEvent("change",this);this.createEvent("slideStart",this);this.createEvent("slideEnd",this);D=YAHOO.lang.isArray(D)?D:[0,H];D[0]=Math.min(Math.max(parseInt(D[0],10)|0,0),H);D[1]=Math.max(Math.min(parseInt(D[1],10)|0,H),0);if(D[0]>D[1]){D.splice(0,2,D[1],D[0]);}this.minVal=D[0];this.maxVal=D[1];this.minSlider.setValue(this.minVal,true,true,true);this.maxSlider.setValue(this.maxVal,true,true,true);}C.prototype={minVal:-1,maxVal:-1,minRange:0,_handleSlideStart:function(E,D){this.fireEvent("slideStart",D);},_handleSlideEnd:function(E,D){this.fireEvent("slideEnd",D);},_handleDrag:function(D){B.Slider.prototype.onDrag.call(this.activeSlider,D);},_handleMinChange:function(){this.activeSlider=this.minSlider;this.updateValue();},_handleMaxChange:function(){this.activeSlider=this.maxSlider;this.updateValue();},_bindKeyEvents:function(D){A.on(D.id,"keydown",this._handleKeyDown,this,true);A.on(D.id,"keypress",this._handleKeyPress,this,true);},_handleKeyDown:function(D){this.activeSlider.handleKeyDown.apply(this.activeSlider,arguments);},_handleKeyPress:function(D){this.activeSlider.handleKeyPress.apply(this.activeSlider,arguments);},setValues:function(H,K,I,E,J){var F=this.minSlider,M=this.maxSlider,D=F.thumb,L=M.thumb,N=this,G={min:false,max:false};if(D._isHoriz){D.setXConstraint(D.leftConstraint,L.rightConstraint,D.tickSize);L.setXConstraint(D.leftConstraint,L.rightConstraint,L.tickSize);}else{D.setYConstraint(D.topConstraint,L.bottomConstraint,D.tickSize);L.setYConstraint(D.topConstraint,L.bottomConstraint,L.tickSize);}this._oneTimeCallback(F,"slideEnd",function(){G.min=true;if(G.max){N.updateValue(J);setTimeout(function(){N._cleanEvent(F,"slideEnd");N._cleanEvent(M,"slideEnd");},0);}});this._oneTimeCallback(M,"slideEnd",function(){G.max=true;if(G.min){N.updateValue(J);setTimeout(function(){N._cleanEvent(F,"slideEnd");N._cleanEvent(M,"slideEnd");},0);}});F.setValue(H,I,E,false);M.setValue(K,I,E,false);},setMinValue:function(F,H,I,E){var G=this.minSlider,D=this;this.activeSlider=G;D=this;this._oneTimeCallback(G,"slideEnd",function(){D.updateValue(E);setTimeout(function(){D._cleanEvent(G,"slideEnd");},0);});G.setValue(F,H,I);},setMaxValue:function(D,H,I,F){var G=this.maxSlider,E=this;this.activeSlider=G;this._oneTimeCallback(G,"slideEnd",function(){E.updateValue(F);setTimeout(function(){E._cleanEvent(G,"slideEnd");},0);});G.setValue(D,H,I);},updateValue:function(J){var E=this.minSlider.getValue(),K=this.maxSlider.getValue(),F=false,D,M,H,I,L,G;if(E!=this.minVal||K!=this.maxVal){F=true;D=this.minSlider.thumb;M=this.maxSlider.thumb;H=this.isHoriz?"x":"y";G=this.minSlider.thumbCenterPoint[H]+this.maxSlider.thumbCenterPoint[H];I=Math.max(K-G-this.minRange,0);L=Math.min(-E-G-this.minRange,0);if(this.isHoriz){I=Math.min(I,M.rightConstraint);D.setXConstraint(D.leftConstraint,I,D.tickSize);M.setXConstraint(L,M.rightConstraint,M.tickSize);}else{I=Math.min(I,M.bottomConstraint);D.setYConstraint(D.leftConstraint,I,D.tickSize);M.setYConstraint(L,M.bottomConstraint,M.tickSize);}}this.minVal=E;this.maxVal=K;if(F&&!J){this.fireEvent("change",this);}},selectActiveSlider:function(H){var E=this.minSlider,D=this.maxSlider,J=E.isLocked()||!E.backgroundEnabled,G=D.isLocked()||!E.backgroundEnabled,F=YAHOO.util.Event,I;if(J||G){this.activeSlider=J?D:E;}else{if(this.isHoriz){I=F.getPageX(H)-E.thumb.initPageX-E.thumbCenterPoint.x;}else{I=F.getPageY(H)-E.thumb.initPageY-E.thumbCenterPoint.y;}this.activeSlider=I*2>D.getValue()+E.getValue()?D:E;}},_handleMouseDown:function(D){if(!D._handled){D._handled=true;this.selectActiveSlider(D);return B.Slider.prototype.onMouseDown.call(this.activeSlider,D);}else{return false;}},_handleMouseUp:function(D){B.Slider.prototype.onMouseUp.apply(this.activeSlider,arguments);},_oneTimeCallback:function(F,D,E){F.subscribe(D,function(){F.unsubscribe(D,arguments.callee);E.apply({},[].slice.apply(arguments));});},_cleanEvent:function(K,E){var J,I,D,G,H,F;if(K.__yui_events&&K.events[E]){for(I=K.__yui_events.length;I>=0;--I){if(K.__yui_events[I].type===E){J=K.__yui_events[I];break;}}if(J){H=J.subscribers;F=[];G=0;for(I=0,D=H.length;I<D;++I){if(H[I]){F[G++]=H[I];}}J.subscribers=F;}}}};YAHOO.lang.augmentProto(C,YAHOO.util.EventProvider);B.Slider.getHorizDualSlider=function(H,J,K,G,F,D){var I=new B.SliderThumb(J,H,0,G,0,0,F),E=new B.SliderThumb(K,H,0,G,0,0,F);return new C(new B.Slider(H,H,I,"horiz"),new B.Slider(H,H,E,"horiz"),G,D);};B.Slider.getVertDualSlider=function(H,J,K,G,F,D){var I=new B.SliderThumb(J,H,0,0,0,G,F),E=new B.SliderThumb(K,H,0,0,0,G,F);return new B.DualSlider(new B.Slider(H,H,I,"vert"),new B.Slider(H,H,E,"vert"),G,D);};YAHOO.widget.DualSlider=C;})();YAHOO.register("slider",YAHOO.widget.Slider,{version:"2.7.0",build:"1799"});
288   -/*
  276 +};I.onDrag=F.onDrag=function(L){G._handleDrag(L);};I.onMouseUp=F.onMouseUp=function(L){G._handleMouseUp(L);};I._bindKeyEvents=function(){G._bindKeyEvents(this);};F._bindKeyEvents=function(){};I.subscribe("change",this._handleMinChange,I,this);I.subscribe("slideStart",this._handleSlideStart,I,this);I.subscribe("slideEnd",this._handleSlideEnd,I,this);F.subscribe("change",this._handleMaxChange,F,this);F.subscribe("slideStart",this._handleSlideStart,F,this);F.subscribe("slideEnd",this._handleSlideEnd,F,this);this.createEvent("ready",this);this.createEvent("change",this);this.createEvent("slideStart",this);this.createEvent("slideEnd",this);D=YAHOO.lang.isArray(D)?D:[0,H];D[0]=Math.min(Math.max(parseInt(D[0],10)|0,0),H);D[1]=Math.max(Math.min(parseInt(D[1],10)|0,H),0);if(D[0]>D[1]){D.splice(0,2,D[1],D[0]);}this.minVal=D[0];this.maxVal=D[1];this.minSlider.setValue(this.minVal,true,true,true);this.maxSlider.setValue(this.maxVal,true,true,true);}C.prototype={minVal:-1,maxVal:-1,minRange:0,_handleSlideStart:function(E,D){this.fireEvent("slideStart",D);},_handleSlideEnd:function(E,D){this.fireEvent("slideEnd",D);},_handleDrag:function(D){B.Slider.prototype.onDrag.call(this.activeSlider,D);},_handleMinChange:function(){this.activeSlider=this.minSlider;this.updateValue();},_handleMaxChange:function(){this.activeSlider=this.maxSlider;this.updateValue();},_bindKeyEvents:function(D){A.on(D.id,"keydown",this._handleKeyDown,this,true);A.on(D.id,"keypress",this._handleKeyPress,this,true);},_handleKeyDown:function(D){this.activeSlider.handleKeyDown.apply(this.activeSlider,arguments);},_handleKeyPress:function(D){this.activeSlider.handleKeyPress.apply(this.activeSlider,arguments);},setValues:function(H,K,I,E,J){var F=this.minSlider,M=this.maxSlider,D=F.thumb,L=M.thumb,N=this,G={min:false,max:false};if(D._isHoriz){D.setXConstraint(D.leftConstraint,L.rightConstraint,D.tickSize);L.setXConstraint(D.leftConstraint,L.rightConstraint,L.tickSize);}else{D.setYConstraint(D.topConstraint,L.bottomConstraint,D.tickSize);L.setYConstraint(D.topConstraint,L.bottomConstraint,L.tickSize);}this._oneTimeCallback(F,"slideEnd",function(){G.min=true;if(G.max){N.updateValue(J);setTimeout(function(){N._cleanEvent(F,"slideEnd");N._cleanEvent(M,"slideEnd");},0);}});this._oneTimeCallback(M,"slideEnd",function(){G.max=true;if(G.min){N.updateValue(J);setTimeout(function(){N._cleanEvent(F,"slideEnd");N._cleanEvent(M,"slideEnd");},0);}});F.setValue(H,I,E,false);M.setValue(K,I,E,false);},setMinValue:function(F,H,I,E){var G=this.minSlider,D=this;this.activeSlider=G;D=this;this._oneTimeCallback(G,"slideEnd",function(){D.updateValue(E);setTimeout(function(){D._cleanEvent(G,"slideEnd");},0);});G.setValue(F,H,I);},setMaxValue:function(D,H,I,F){var G=this.maxSlider,E=this;this.activeSlider=G;this._oneTimeCallback(G,"slideEnd",function(){E.updateValue(F);setTimeout(function(){E._cleanEvent(G,"slideEnd");},0);});G.setValue(D,H,I);},updateValue:function(J){var E=this.minSlider.getValue(),K=this.maxSlider.getValue(),F=false,D,M,H,I,L,G;if(E!=this.minVal||K!=this.maxVal){F=true;D=this.minSlider.thumb;M=this.maxSlider.thumb;H=this.isHoriz?"x":"y";G=this.minSlider.thumbCenterPoint[H]+this.maxSlider.thumbCenterPoint[H];I=Math.max(K-G-this.minRange,0);L=Math.min(-E-G-this.minRange,0);if(this.isHoriz){I=Math.min(I,M.rightConstraint);D.setXConstraint(D.leftConstraint,I,D.tickSize);M.setXConstraint(L,M.rightConstraint,M.tickSize);}else{I=Math.min(I,M.bottomConstraint);D.setYConstraint(D.leftConstraint,I,D.tickSize);M.setYConstraint(L,M.bottomConstraint,M.tickSize);}}this.minVal=E;this.maxVal=K;if(F&&!J){this.fireEvent("change",this);}},selectActiveSlider:function(H){var E=this.minSlider,D=this.maxSlider,J=E.isLocked()||!E.backgroundEnabled,G=D.isLocked()||!E.backgroundEnabled,F=YAHOO.util.Event,I;if(J||G){this.activeSlider=J?D:E;}else{if(this.isHoriz){I=F.getPageX(H)-E.thumb.initPageX-E.thumbCenterPoint.x;}else{I=F.getPageY(H)-E.thumb.initPageY-E.thumbCenterPoint.y;}this.activeSlider=I*2>D.getValue()+E.getValue()?D:E;}},_handleMouseDown:function(D){if(!D._handled){D._handled=true;this.selectActiveSlider(D);return B.Slider.prototype.onMouseDown.call(this.activeSlider,D);}else{return false;}},_handleMouseUp:function(D){B.Slider.prototype.onMouseUp.apply(this.activeSlider,arguments);},_oneTimeCallback:function(F,D,E){F.subscribe(D,function(){F.unsubscribe(D,arguments.callee);E.apply({},[].slice.apply(arguments));});},_cleanEvent:function(K,E){var J,I,D,G,H,F;if(K.__yui_events&&K.events[E]){for(I=K.__yui_events.length;I>=0;--I){if(K.__yui_events[I].type===E){J=K.__yui_events[I];break;}}if(J){H=J.subscribers;F=[];G=0;for(I=0,D=H.length;I<D;++I){if(H[I]){F[G++]=H[I];}}J.subscribers=F;}}}};YAHOO.lang.augmentProto(C,YAHOO.util.EventProvider);B.Slider.getHorizDualSlider=function(H,J,K,G,F,D){var I=new B.SliderThumb(J,H,0,G,0,0,F),E=new B.SliderThumb(K,H,0,G,0,0,F);return new C(new B.Slider(H,H,I,"horiz"),new B.Slider(H,H,E,"horiz"),G,D);};B.Slider.getVertDualSlider=function(H,J,K,G,F,D){var I=new B.SliderThumb(J,H,0,0,0,G,F),E=new B.SliderThumb(K,H,0,0,0,G,F);return new B.DualSlider(new B.Slider(H,H,I,"vert"),new B.Slider(H,H,E,"vert"),G,D);};YAHOO.widget.DualSlider=C;})();YAHOO.register("slider",YAHOO.widget.Slider,{version:"2.7.0",build:"1799"});/*
289 277 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
290 278 Code licensed under the BSD License:
291 279 http://developer.yahoo.net/yui/license.txt
... ... @@ -307,26 +295,21 @@ Redistribution and use in source and binary forms, with or without modification,
307 295 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
308 296 */
309 297 YAHOO.util.Easing={easeNone:function(B,A,D,C){return D*B/C+A;},easeIn:function(B,A,D,C){return D*(B/=C)*B+A;},easeOut:function(B,A,D,C){return -D*(B/=C)*(B-2)+A;},easeBoth:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B+A;}return -D/2*((--B)*(B-2)-1)+A;},easeInStrong:function(B,A,D,C){return D*(B/=C)*B*B*B+A;},easeOutStrong:function(B,A,D,C){return -D*((B=B/C-1)*B*B*B-1)+A;},easeBothStrong:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B*B*B+A;}return -D/2*((B-=2)*B*B*B-2)+A;},elasticIn:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F)==1){return A+G;}if(!E){E=F*0.3;}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}return -(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A;},elasticOut:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F)==1){return A+G;}if(!E){E=F*0.3;}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}return B*Math.pow(2,-10*C)*Math.sin((C*F-D)*(2*Math.PI)/E)+G+A;},elasticBoth:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F/2)==2){return A+G;}if(!E){E=F*(0.3*1.5);}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}if(C<1){return -0.5*(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A;}return B*Math.pow(2,-10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E)*0.5+G+A;},backIn:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}return E*(B/=D)*B*((C+1)*B-C)+A;},backOut:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}return E*((B=B/D-1)*B*((C+1)*B+C)+1)+A;},backBoth:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}if((B/=D/2)<1){return E/2*(B*B*(((C*=(1.525))+1)*B-C))+A;}return E/2*((B-=2)*B*(((C*=(1.525))+1)*B+C)+2)+A;},bounceIn:function(B,A,D,C){return D-YAHOO.util.Easing.bounceOut(C-B,0,D,C)+A;},bounceOut:function(B,A,D,C){if((B/=C)<(1/2.75)){return D*(7.5625*B*B)+A;}else{if(B<(2/2.75)){return D*(7.5625*(B-=(1.5/2.75))*B+0.75)+A;}else{if(B<(2.5/2.75)){return D*(7.5625*(B-=(2.25/2.75))*B+0.9375)+A;}}}return D*(7.5625*(B-=(2.625/2.75))*B+0.984375)+A;},bounceBoth:function(B,A,D,C){if(B<C/2){return YAHOO.util.Easing.bounceIn(B*2,0,D,C)*0.5+A;}return YAHOO.util.Easing.bounceOut(B*2-C,0,D,C)*0.5+D*0.5+A;}};(function(){var A=function(H,G,I,J){if(H){A.superclass.constructor.call(this,H,G,I,J);}};A.NAME="Motion";var E=YAHOO.util;YAHOO.extend(A,E.ColorAnim);var F=A.superclass;var C=A.prototype;C.patterns.points=/^points$/i;C.setAttribute=function(G,I,H){if(this.patterns.points.test(G)){H=H||"px";F.setAttribute.call(this,"left",I[0],H);F.setAttribute.call(this,"top",I[1],H);}else{F.setAttribute.call(this,G,I,H);}};C.getAttribute=function(G){if(this.patterns.points.test(G)){var H=[F.getAttribute.call(this,"left"),F.getAttribute.call(this,"top")];}else{H=F.getAttribute.call(this,G);}return H;};C.doMethod=function(G,K,H){var J=null;if(this.patterns.points.test(G)){var I=this.method(this.currentFrame,0,100,this.totalFrames)/100;J=E.Bezier.getPosition(this.runtimeAttributes[G],I);}else{J=F.doMethod.call(this,G,K,H);}return J;};C.setRuntimeAttribute=function(P){if(this.patterns.points.test(P)){var H=this.getEl();var J=this.attributes;var G;var L=J["points"]["control"]||[];var I;var M,O;if(L.length>0&&!(L[0] instanceof Array)){L=[L];}else{var K=[];for(M=0,O=L.length;M<O;++M){K[M]=L[M];}L=K;}if(E.Dom.getStyle(H,"position")=="static"){E.Dom.setStyle(H,"position","relative");}if(D(J["points"]["from"])){E.Dom.setXY(H,J["points"]["from"]);
310   -}else{E.Dom.setXY(H,E.Dom.getXY(H));}G=this.getAttribute("points");if(D(J["points"]["to"])){I=B.call(this,J["points"]["to"],G);var N=E.Dom.getXY(this.getEl());for(M=0,O=L.length;M<O;++M){L[M]=B.call(this,L[M],G);}}else{if(D(J["points"]["by"])){I=[G[0]+J["points"]["by"][0],G[1]+J["points"]["by"][1]];for(M=0,O=L.length;M<O;++M){L[M]=[G[0]+L[M][0],G[1]+L[M][1]];}}}this.runtimeAttributes[P]=[G];if(L.length>0){this.runtimeAttributes[P]=this.runtimeAttributes[P].concat(L);}this.runtimeAttributes[P][this.runtimeAttributes[P].length]=I;}else{F.setRuntimeAttribute.call(this,P);}};var B=function(G,I){var H=E.Dom.getXY(this.getEl());G=[G[0]-H[0]+I[0],G[1]-H[1]+I[1]];return G;};var D=function(G){return(typeof G!=="undefined");};E.Motion=A;})();(function(){var D=function(F,E,G,H){if(F){D.superclass.constructor.call(this,F,E,G,H);}};D.NAME="Scroll";var B=YAHOO.util;YAHOO.extend(D,B.ColorAnim);var C=D.superclass;var A=D.prototype;A.doMethod=function(E,H,F){var G=null;if(E=="scroll"){G=[this.method(this.currentFrame,H[0],F[0]-H[0],this.totalFrames),this.method(this.currentFrame,H[1],F[1]-H[1],this.totalFrames)];}else{G=C.doMethod.call(this,E,H,F);}return G;};A.getAttribute=function(E){var G=null;var F=this.getEl();if(E=="scroll"){G=[F.scrollLeft,F.scrollTop];}else{G=C.getAttribute.call(this,E);}return G;};A.setAttribute=function(E,H,G){var F=this.getEl();if(E=="scroll"){F.scrollLeft=H[0];F.scrollTop=H[1];}else{C.setAttribute.call(this,E,H,G);}};B.Scroll=D;})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.7.0",build:"1799"});
311   -(function(){YAHOO.util.Config=function(owner){if(owner){this.init(owner)}};var Lang=YAHOO.lang,CustomEvent=YAHOO.util.CustomEvent,Config=YAHOO.util.Config;Config.CONFIG_CHANGED_EVENT="configChanged";Config.BOOLEAN_TYPE="boolean";Config.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(owner){this.owner=owner;this.configChangedEvent=this.createEvent(Config.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=CustomEvent.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[]},checkBoolean:function(val){return(typeof val==Config.BOOLEAN_TYPE)},checkNumber:function(val){return(!isNaN(val))},fireEvent:function(key,value){var property=this.config[key];if(property&&property.event){property.event.fire(value)}},addProperty:function(key,propertyObject){key=key.toLowerCase();this.config[key]=propertyObject;propertyObject.event=this.createEvent(key,{scope:this.owner});propertyObject.event.signature=CustomEvent.LIST;propertyObject.key=key;if(propertyObject.handler){propertyObject.event.subscribe(propertyObject.handler,this.owner)}this.setProperty(key,propertyObject.value,true);if(!propertyObject.suppressEvent){this.queueProperty(key,propertyObject.value)}},getConfig:function(){var cfg={},currCfg=this.config,prop,property;for(prop in currCfg){if(Lang.hasOwnProperty(currCfg,prop)){property=currCfg[prop];if(property&&property.event){cfg[prop]=property.value}}}return cfg},getProperty:function(key){var property=this.config[key.toLowerCase()];if(property&&property.event){return property.value}else{return undefined}},resetProperty:function(key){key=key.toLowerCase();var property=this.config[key];if(property&&property.event){if(this.initialConfig[key]&&!Lang.isUndefined(this.initialConfig[key])){this.setProperty(key,this.initialConfig[key]);return true}}else{return false}},setProperty:function(key,value,silent){var property;key=key.toLowerCase();if(this.queueInProgress&&!silent){this.queueProperty(key,value);return true}else{property=this.config[key];if(property&&property.event){if(property.validator&&!property.validator(value)){return false}else{property.value=value;if(!silent){this.fireEvent(key,value);this.configChangedEvent.fire([key,value])}return true}}else{return false}}},queueProperty:function(key,value){key=key.toLowerCase();var property=this.config[key],foundDuplicate=false,iLen,queueItem,queueItemKey,queueItemValue,sLen,supercedesCheck,qLen,queueItemCheck,queueItemCheckKey,queueItemCheckValue,i,s,q;if(property&&property.event){if(!Lang.isUndefined(value)&&property.validator&&!property.validator(value)){return false}else{if(!Lang.isUndefined(value)){property.value=value}else{value=property.value}foundDuplicate=false;iLen=this.eventQueue.length;for(i=0;i<iLen;i++){queueItem=this.eventQueue[i];if(queueItem){queueItemKey=queueItem[0];queueItemValue=queueItem[1];if(queueItemKey==key){this.eventQueue[i]=null;this.eventQueue.push([key,(!Lang.isUndefined(value)?value:queueItemValue)]);foundDuplicate=true;break}}}if(!foundDuplicate&&!Lang.isUndefined(value)){this.eventQueue.push([key,value])}}if(property.supercedes){sLen=property.supercedes.length;for(s=0;s<sLen;s++){supercedesCheck=property.supercedes[s];qLen=this.eventQueue.length;for(q=0;q<qLen;q++){queueItemCheck=this.eventQueue[q];if(queueItemCheck){queueItemCheckKey=queueItemCheck[0];queueItemCheckValue=queueItemCheck[1];if(queueItemCheckKey==supercedesCheck.toLowerCase()){this.eventQueue.push([queueItemCheckKey,queueItemCheckValue]);this.eventQueue[q]=null;break}}}}}return true}else{return false}},refireEvent:function(key){key=key.toLowerCase();var property=this.config[key];if(property&&property.event&&!Lang.isUndefined(property.value)){if(this.queueInProgress){this.queueProperty(key)}else{this.fireEvent(key,property.value)}}},applyConfig:function(userConfig,init){var sKey,oConfig;if(init){oConfig={};for(sKey in userConfig){if(Lang.hasOwnProperty(userConfig,sKey)){oConfig[sKey.toLowerCase()]=userConfig[sKey]}}this.initialConfig=oConfig}for(sKey in userConfig){if(Lang.hasOwnProperty(userConfig,sKey)){this.queueProperty(sKey,userConfig[sKey])}}},refresh:function(){var prop;for(prop in this.config){if(Lang.hasOwnProperty(this.config,prop)){this.refireEvent(prop)}}},fireQueue:function(){var i,queueItem,key,value,property;this.queueInProgress=true;for(i=0;i<this.eventQueue.length;i++){queueItem=this.eventQueue[i];if(queueItem){key=queueItem[0];value=queueItem[1];property=this.config[key];property.value=value;this.eventQueue[i]=null;this.fireEvent(key,value)}}this.queueInProgress=false;this.eventQueue=[]},subscribeToConfigEvent:function(key,handler,obj,override){var property=this.config[key.toLowerCase()];if(property&&property.event){if(!Config.alreadySubscribed(property.event,handler,obj)){property.event.subscribe(handler,obj,override)}return true}else{return false}},unsubscribeFromConfigEvent:function(key,handler,obj){var property=this.config[key.toLowerCase()];if(property&&property.event){return property.event.unsubscribe(handler,obj)}else{return false}},toString:function(){var output="Config";if(this.owner){output+=" ["+this.owner.toString()+"]"}return output},outputEventQueue:function(){var output="",queueItem,q,nQueue=this.eventQueue.length;for(q=0;q<nQueue;q++){queueItem=this.eventQueue[q];if(queueItem){output+=queueItem[0]+"="+queueItem[1]+", "}}return output},destroy:function(){var oConfig=this.config,sProperty,oProperty;for(sProperty in oConfig){if(Lang.hasOwnProperty(oConfig,sProperty)){oProperty=oConfig[sProperty];oProperty.event.unsubscribeAll();oProperty.event=null}}this.configChangedEvent.unsubscribeAll();this.configChangedEvent=null;this.owner=null;this.config=null;this.initialConfig=null;this.eventQueue=null}};Config.alreadySubscribed=function(evt,fn,obj){var nSubscribers=evt.subscribers.length,subsc,i;if(nSubscribers>0){i=nSubscribers-1;do{subsc=evt.subscribers[i];if(subsc&&subsc.obj==obj&&subsc.fn==fn){return true}}while(i--)}return false};YAHOO.lang.augmentProto(Config,YAHOO.util.EventProvider)}());(function(){YAHOO.widget.Module=function(el,userConfig){if(el){this.init(el,userConfig)}else{}};var Dom=YAHOO.util.Dom,Config=YAHOO.util.Config,Event=YAHOO.util.Event,CustomEvent=YAHOO.util.CustomEvent,Module=YAHOO.widget.Module,UA=YAHOO.env.ua,m_oModuleTemplate,m_oHeaderTemplate,m_oBodyTemplate,m_oFooterTemplate,EVENT_TYPES={"BEFORE_INIT":"beforeInit","INIT":"init","APPEND":"append","BEFORE_RENDER":"beforeRender","RENDER":"render","CHANGE_HEADER":"changeHeader","CHANGE_BODY":"changeBody","CHANGE_FOOTER":"changeFooter","CHANGE_CONTENT":"changeContent","DESTORY":"destroy","BEFORE_SHOW":"beforeShow","SHOW":"show","BEFORE_HIDE":"beforeHide","HIDE":"hide"},DEFAULT_CONFIG={"VISIBLE":{key:"visible",value:true,validator:YAHOO.lang.isBoolean},"EFFECT":{key:"effect",suppressEvent:true,supercedes:["visible"]},"MONITOR_RESIZE":{key:"monitorresize",value:true},"APPEND_TO_DOCUMENT_BODY":{key:"appendtodocumentbody",value:false}};Module.IMG_ROOT=null;Module.IMG_ROOT_SSL=null;Module.CSS_MODULE="yui-module";Module.CSS_HEADER="hd";Module.CSS_BODY="bd";Module.CSS_FOOTER="ft";Module.RESIZE_MONITOR_SECURE_URL="javascript:false;";Module.RESIZE_MONITOR_BUFFER=1;Module.textResizeEvent=new CustomEvent("textResize");Module.forceDocumentRedraw=function(){var docEl=document.documentElement;if(docEl){docEl.className+=" ";docEl.className=YAHOO.lang.trim(docEl.className)}};function createModuleTemplate(){if(!m_oModuleTemplate){m_oModuleTemplate=document.createElement("div");m_oModuleTemplate.innerHTML=("<div class=\""+Module.CSS_HEADER+"\"></div>"+"<div class=\""+Module.CSS_BODY+"\"></div><div class=\""+Module.CSS_FOOTER+"\"></div>");m_oHeaderTemplate=m_oModuleTemplate.firstChild;m_oBodyTemplate=m_oHeaderTemplate.nextSibling;m_oFooterTemplate=m_oBodyTemplate.nextSibling}return m_oModuleTemplate}function createHeader(){if(!m_oHeaderTemplate){createModuleTemplate()}return(m_oHeaderTemplate.cloneNode(false))}function createBody(){if(!m_oBodyTemplate){createModuleTemplate()}return(m_oBodyTemplate.cloneNode(false))}function createFooter(){if(!m_oFooterTemplate){createModuleTemplate()}return(m_oFooterTemplate.cloneNode(false))}Module.prototype={constructor:Module,element:null,header:null,body:null,footer:null,id:null,imageRoot:Module.IMG_ROOT,initEvents:function(){var SIGNATURE=CustomEvent.LIST;this.beforeInitEvent=this.createEvent(EVENT_TYPES.BEFORE_INIT);this.beforeInitEvent.signature=SIGNATURE;this.initEvent=this.createEvent(EVENT_TYPES.INIT);this.initEvent.signature=SIGNATURE;this.appendEvent=this.createEvent(EVENT_TYPES.APPEND);this.appendEvent.signature=SIGNATURE;this.beforeRenderEvent=this.createEvent(EVENT_TYPES.BEFORE_RENDER);this.beforeRenderEvent.signature=SIGNATURE;this.renderEvent=this.createEvent(EVENT_TYPES.RENDER);this.renderEvent.signature=SIGNATURE;this.changeHeaderEvent=this.createEvent(EVENT_TYPES.CHANGE_HEADER);this.changeHeaderEvent.signature=SIGNATURE;this.changeBodyEvent=this.createEvent(EVENT_TYPES.CHANGE_BODY);this.changeBodyEvent.signature=SIGNATURE;this.changeFooterEvent=this.createEvent(EVENT_TYPES.CHANGE_FOOTER);this.changeFooterEvent.signature=SIGNATURE;this.changeContentEvent=this.createEvent(EVENT_TYPES.CHANGE_CONTENT);this.changeContentEvent.signature=SIGNATURE;this.destroyEvent=this.createEvent(EVENT_TYPES.DESTORY);this.destroyEvent.signature=SIGNATURE;this.beforeShowEvent=this.createEvent(EVENT_TYPES.BEFORE_SHOW);this.beforeShowEvent.signature=SIGNATURE;this.showEvent=this.createEvent(EVENT_TYPES.SHOW);this.showEvent.signature=SIGNATURE;this.beforeHideEvent=this.createEvent(EVENT_TYPES.BEFORE_HIDE);this.beforeHideEvent.signature=SIGNATURE;this.hideEvent=this.createEvent(EVENT_TYPES.HIDE);this.hideEvent.signature=SIGNATURE},platform:function(){var ua=navigator.userAgent.toLowerCase();if(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1){return"windows"}else if(ua.indexOf("macintosh")!=-1){return"mac"}else{return false}}(),browser:function(){var ua=navigator.userAgent.toLowerCase();if(ua.indexOf('opera')!=-1){return'opera'}else if(ua.indexOf('msie 7')!=-1){return'ie7'}else if(ua.indexOf('msie')!=-1){return'ie'}else if(ua.indexOf('safari')!=-1){return'safari'}else if(ua.indexOf('gecko')!=-1){return'gecko'}else{return false}}(),isSecure:function(){if(window.location.href.toLowerCase().indexOf("https")===0){return true}else{return false}}(),initDefaultConfig:function(){this.cfg.addProperty(DEFAULT_CONFIG.VISIBLE.key,{handler:this.configVisible,value:DEFAULT_CONFIG.VISIBLE.value,validator:DEFAULT_CONFIG.VISIBLE.validator});this.cfg.addProperty(DEFAULT_CONFIG.EFFECT.key,{suppressEvent:DEFAULT_CONFIG.EFFECT.suppressEvent,supercedes:DEFAULT_CONFIG.EFFECT.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.MONITOR_RESIZE.key,{handler:this.configMonitorResize,value:DEFAULT_CONFIG.MONITOR_RESIZE.value});this.cfg.addProperty(DEFAULT_CONFIG.APPEND_TO_DOCUMENT_BODY.key,{value:DEFAULT_CONFIG.APPEND_TO_DOCUMENT_BODY.value})},init:function(el,userConfig){var elId,child;this.initEvents();this.beforeInitEvent.fire(Module);this.cfg=new Config(this);if(this.isSecure){this.imageRoot=Module.IMG_ROOT_SSL}if(typeof el=="string"){elId=el;el=document.getElementById(el);if(!el){el=(createModuleTemplate()).cloneNode(false);el.id=elId}}this.id=Dom.generateId(el);this.element=el;child=this.element.firstChild;if(child){var fndHd=false,fndBd=false,fndFt=false;do{if(1==child.nodeType){if(!fndHd&&Dom.hasClass(child,Module.CSS_HEADER)){this.header=child;fndHd=true}else if(!fndBd&&Dom.hasClass(child,Module.CSS_BODY)){this.body=child;fndBd=true}else if(!fndFt&&Dom.hasClass(child,Module.CSS_FOOTER)){this.footer=child;fndFt=true}}}while((child=child.nextSibling))}this.initDefaultConfig();Dom.addClass(this.element,Module.CSS_MODULE);if(userConfig){this.cfg.applyConfig(userConfig,true)}if(!Config.alreadySubscribed(this.renderEvent,this.cfg.fireQueue,this.cfg)){this.renderEvent.subscribe(this.cfg.fireQueue,this.cfg,true)}this.initEvent.fire(Module)},initResizeMonitor:function(){var isGeckoWin=(UA.gecko&&this.platform=="windows");if(isGeckoWin){var self=this;setTimeout(function(){self._initResizeMonitor()},0)}else{this._initResizeMonitor()}},_initResizeMonitor:function(){return;var oDoc,oIFrame,sHTML;function fireTextResize(){Module.textResizeEvent.fire()}if(!UA.opera){oIFrame=Dom.get("_yuiResizeMonitor");var supportsCWResize=this._supportsCWResize();if(!oIFrame){oIFrame=document.createElement("iframe");if(this.isSecure&&Module.RESIZE_MONITOR_SECURE_URL&&UA.ie){oIFrame.src=Module.RESIZE_MONITOR_SECURE_URL}if(!supportsCWResize){sHTML=["<html><head><script ","type=\"text/javascript\">","window.onresize=function(){window.parent.","YAHOO.widget.Module.textResizeEvent.","fire();};<","\/script></head>","<body></body></html>"].join('');oIFrame.src="data:text/html;charset=utf-8,"+encodeURIComponent(sHTML)}oIFrame.id="_yuiResizeMonitor";oIFrame.title="Text Resize Monitor";oIFrame.style.position="absolute";oIFrame.style.visibility="hidden";var db=document.body,fc=db.firstChild;if(fc){db.insertBefore(oIFrame,fc)}else{db.appendChild(oIFrame)}oIFrame.style.width="2em";oIFrame.style.height="2em";oIFrame.style.top=(-1*(oIFrame.offsetHeight+Module.RESIZE_MONITOR_BUFFER))+"px";oIFrame.style.left="0";oIFrame.style.borderWidth="0";oIFrame.style.visibility="visible";if(UA.webkit){oDoc=oIFrame.contentWindow.document;oDoc.open();oDoc.close()}}if(oIFrame&&oIFrame.contentWindow){Module.textResizeEvent.subscribe(this.onDomResize,this,true);if(!Module.textResizeInitialized){if(supportsCWResize){if(!Event.on(oIFrame.contentWindow,"resize",fireTextResize)){Event.on(oIFrame,"resize",fireTextResize)}}Module.textResizeInitialized=true}this.resizeMonitor=oIFrame}}},_supportsCWResize:function(){var bSupported=true;if(UA.gecko&&UA.gecko<=1.8){bSupported=false}return bSupported},onDomResize:function(e,obj){var nTop=-1*(this.resizeMonitor.offsetHeight+Module.RESIZE_MONITOR_BUFFER);this.resizeMonitor.style.top=nTop+"px";this.resizeMonitor.style.left="0"},setHeader:function(headerContent){var oHeader=this.header||(this.header=createHeader());if(headerContent.nodeName){oHeader.innerHTML="";oHeader.appendChild(headerContent)}else{oHeader.innerHTML=headerContent}this.changeHeaderEvent.fire(headerContent);this.changeContentEvent.fire()},appendToHeader:function(element){var oHeader=this.header||(this.header=createHeader());oHeader.appendChild(element);this.changeHeaderEvent.fire(element);this.changeContentEvent.fire()},setBody:function(bodyContent){var oBody=this.body||(this.body=createBody());if(bodyContent.nodeName){oBody.innerHTML="";oBody.appendChild(bodyContent)}else{oBody.innerHTML=bodyContent}this.changeBodyEvent.fire(bodyContent);this.changeContentEvent.fire()},appendToBody:function(element){var oBody=this.body||(this.body=createBody());oBody.appendChild(element);this.changeBodyEvent.fire(element);this.changeContentEvent.fire()},setFooter:function(footerContent){var oFooter=this.footer||(this.footer=createFooter());if(footerContent.nodeName){oFooter.innerHTML="";oFooter.appendChild(footerContent)}else{oFooter.innerHTML=footerContent}this.changeFooterEvent.fire(footerContent);this.changeContentEvent.fire()},appendToFooter:function(element){var oFooter=this.footer||(this.footer=createFooter());oFooter.appendChild(element);this.changeFooterEvent.fire(element);this.changeContentEvent.fire()},render:function(appendToNode,moduleElement){var me=this,firstChild;function appendTo(parentNode){if(typeof parentNode=="string"){parentNode=document.getElementById(parentNode)}if(parentNode){me._addToParent(parentNode,me.element);me.appendEvent.fire()}}this.beforeRenderEvent.fire();if(!moduleElement){moduleElement=this.element}if(appendToNode){appendTo(appendToNode)}else{if(!Dom.inDocument(this.element)){return false}}if(this.header&&!Dom.inDocument(this.header)){firstChild=moduleElement.firstChild;if(firstChild){moduleElement.insertBefore(this.header,firstChild)}else{moduleElement.appendChild(this.header)}}if(this.body&&!Dom.inDocument(this.body)){if(this.footer&&Dom.isAncestor(this.moduleElement,this.footer)){moduleElement.insertBefore(this.body,this.footer)}else{moduleElement.appendChild(this.body)}}if(this.footer&&!Dom.inDocument(this.footer)){moduleElement.appendChild(this.footer)}this.renderEvent.fire();return true},destroy:function(){var parent;if(this.element){Event.purgeElement(this.element,true);parent=this.element.parentNode}if(parent){parent.removeChild(this.element)}this.element=null;this.header=null;this.body=null;this.footer=null;Module.textResizeEvent.unsubscribe(this.onDomResize,this);if(this.cfg){this.cfg.destroy();this.cfg=null}this.destroyEvent.fire()},show:function(){this.cfg.setProperty("visible",true)},hide:function(){if(this.cfg)this.cfg.setProperty("visible",false)},configVisible:function(type,args,obj){var visible=args[0];if(visible){this.beforeShowEvent.fire();Dom.setStyle(this.element,"display","block");this.showEvent.fire()}else{this.beforeHideEvent.fire();Dom.setStyle(this.element,"display","none");this.hideEvent.fire()}},configMonitorResize:function(type,args,obj){var monitor=args[0];if(monitor){this.initResizeMonitor()}else{Module.textResizeEvent.unsubscribe(this.onDomResize,this,true);this.resizeMonitor=null}},_addToParent:function(parentNode,element){if(!this.cfg.getProperty("appendtodocumentbody")&&parentNode===document.body&&parentNode.firstChild){parentNode.insertBefore(element,parentNode.firstChild)}else{parentNode.appendChild(element)}},toString:function(){return"Module "+this.id}};YAHOO.lang.augmentProto(Module,YAHOO.util.EventProvider)}());(function(){YAHOO.widget.Overlay=function(el,userConfig){YAHOO.widget.Overlay.superclass.constructor.call(this,el,userConfig)};var Lang=YAHOO.lang,CustomEvent=YAHOO.util.CustomEvent,Module=YAHOO.widget.Module,Event=YAHOO.util.Event,Dom=YAHOO.util.Dom,Config=YAHOO.util.Config,UA=YAHOO.env.ua,Overlay=YAHOO.widget.Overlay,_SUBSCRIBE="subscribe",_UNSUBSCRIBE="unsubscribe",_CONTAINED="contained",m_oIFrameTemplate,EVENT_TYPES={"BEFORE_MOVE":"beforeMove","MOVE":"move"},DEFAULT_CONFIG={"X":{key:"x",validator:Lang.isNumber,suppressEvent:true,supercedes:["iframe"]},"Y":{key:"y",validator:Lang.isNumber,suppressEvent:true,supercedes:["iframe"]},"XY":{key:"xy",suppressEvent:true,supercedes:["iframe"]},"CONTEXT":{key:"context",suppressEvent:true,supercedes:["iframe"]},"FIXED_CENTER":{key:"fixedcenter",value:false,supercedes:["iframe","visible"]},"WIDTH":{key:"width",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"HEIGHT":{key:"height",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"AUTO_FILL_HEIGHT":{key:"autofillheight",supercedes:["height"],value:"body"},"ZINDEX":{key:"zindex",value:null},"CONSTRAIN_TO_VIEWPORT":{key:"constraintoviewport",value:false,validator:Lang.isBoolean,supercedes:["iframe","x","y","xy"]},"IFRAME":{key:"iframe",value:(UA.ie==6?true:false),validator:Lang.isBoolean,supercedes:["zindex"]},"PREVENT_CONTEXT_OVERLAP":{key:"preventcontextoverlap",value:false,validator:Lang.isBoolean,supercedes:["constraintoviewport"]}};Overlay.IFRAME_SRC="javascript:false;";Overlay.IFRAME_OFFSET=3;Overlay.VIEWPORT_OFFSET=10;Overlay.TOP_LEFT="tl";Overlay.TOP_RIGHT="tr";Overlay.BOTTOM_LEFT="bl";Overlay.BOTTOM_RIGHT="br";Overlay.CSS_OVERLAY="yui-overlay";Overlay.STD_MOD_RE=/^\s*?(body|footer|header)\s*?$/i;Overlay.windowScrollEvent=new CustomEvent("windowScroll");Overlay.windowResizeEvent=new CustomEvent("windowResize");Overlay.windowScrollHandler=function(e){var t=Event.getTarget(e);if(!t||t===window||t===window.document){if(UA.ie){if(!window.scrollEnd){window.scrollEnd=-1}clearTimeout(window.scrollEnd);window.scrollEnd=setTimeout(function(){Overlay.windowScrollEvent.fire()},1)}else{Overlay.windowScrollEvent.fire()}}};Overlay.windowResizeHandler=function(e){if(UA.ie){if(!window.resizeEnd){window.resizeEnd=-1}clearTimeout(window.resizeEnd);window.resizeEnd=setTimeout(function(){Overlay.windowResizeEvent.fire()},100)}else{Overlay.windowResizeEvent.fire()}};Overlay._initialized=null;if(Overlay._initialized===null){Event.on(window,"scroll",Overlay.windowScrollHandler);Event.on(window,"resize",Overlay.windowResizeHandler);Overlay._initialized=true}Overlay._TRIGGER_MAP={"windowScroll":Overlay.windowScrollEvent,"windowResize":Overlay.windowResizeEvent,"textResize":Module.textResizeEvent};YAHOO.extend(Overlay,Module,{CONTEXT_TRIGGERS:[],init:function(el,userConfig){Overlay.superclass.init.call(this,el);this.beforeInitEvent.fire(Overlay);Dom.addClass(this.element,Overlay.CSS_OVERLAY);if(userConfig){this.cfg.applyConfig(userConfig,true)}if(this.platform=="mac"&&UA.gecko){if(!Config.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this)){this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true)}if(!Config.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this)){this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true)}}this.initEvent.fire(Overlay)},initEvents:function(){Overlay.superclass.initEvents.call(this);var SIGNATURE=CustomEvent.LIST;this.beforeMoveEvent=this.createEvent(EVENT_TYPES.BEFORE_MOVE);this.beforeMoveEvent.signature=SIGNATURE;this.moveEvent=this.createEvent(EVENT_TYPES.MOVE);this.moveEvent.signature=SIGNATURE},initDefaultConfig:function(){Overlay.superclass.initDefaultConfig.call(this);var cfg=this.cfg;cfg.addProperty(DEFAULT_CONFIG.X.key,{handler:this.configX,validator:DEFAULT_CONFIG.X.validator,suppressEvent:DEFAULT_CONFIG.X.suppressEvent,supercedes:DEFAULT_CONFIG.X.supercedes});cfg.addProperty(DEFAULT_CONFIG.Y.key,{handler:this.configY,validator:DEFAULT_CONFIG.Y.validator,suppressEvent:DEFAULT_CONFIG.Y.suppressEvent,supercedes:DEFAULT_CONFIG.Y.supercedes});cfg.addProperty(DEFAULT_CONFIG.XY.key,{handler:this.configXY,suppressEvent:DEFAULT_CONFIG.XY.suppressEvent,supercedes:DEFAULT_CONFIG.XY.supercedes});cfg.addProperty(DEFAULT_CONFIG.CONTEXT.key,{handler:this.configContext,suppressEvent:DEFAULT_CONFIG.CONTEXT.suppressEvent,supercedes:DEFAULT_CONFIG.CONTEXT.supercedes});cfg.addProperty(DEFAULT_CONFIG.FIXED_CENTER.key,{handler:this.configFixedCenter,value:DEFAULT_CONFIG.FIXED_CENTER.value,validator:DEFAULT_CONFIG.FIXED_CENTER.validator,supercedes:DEFAULT_CONFIG.FIXED_CENTER.supercedes});cfg.addProperty(DEFAULT_CONFIG.WIDTH.key,{handler:this.configWidth,suppressEvent:DEFAULT_CONFIG.WIDTH.suppressEvent,supercedes:DEFAULT_CONFIG.WIDTH.supercedes});cfg.addProperty(DEFAULT_CONFIG.HEIGHT.key,{handler:this.configHeight,suppressEvent:DEFAULT_CONFIG.HEIGHT.suppressEvent,supercedes:DEFAULT_CONFIG.HEIGHT.supercedes});cfg.addProperty(DEFAULT_CONFIG.AUTO_FILL_HEIGHT.key,{handler:this.configAutoFillHeight,value:DEFAULT_CONFIG.AUTO_FILL_HEIGHT.value,validator:this._validateAutoFill,supercedes:DEFAULT_CONFIG.AUTO_FILL_HEIGHT.supercedes});cfg.addProperty(DEFAULT_CONFIG.ZINDEX.key,{handler:this.configzIndex,value:DEFAULT_CONFIG.ZINDEX.value});cfg.addProperty(DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.key,{handler:this.configConstrainToViewport,value:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.value,validator:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.validator,supercedes:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.supercedes});cfg.addProperty(DEFAULT_CONFIG.IFRAME.key,{handler:this.configIframe,value:DEFAULT_CONFIG.IFRAME.value,validator:DEFAULT_CONFIG.IFRAME.validator,supercedes:DEFAULT_CONFIG.IFRAME.supercedes});cfg.addProperty(DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.key,{value:DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.value,validator:DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.validator,supercedes:DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.supercedes})},moveTo:function(x,y){this.cfg.setProperty("xy",[x,y])},hideMacGeckoScrollbars:function(){Dom.replaceClass(this.element,"show-scrollbars","hide-scrollbars")},showMacGeckoScrollbars:function(){Dom.replaceClass(this.element,"hide-scrollbars","show-scrollbars")},_setDomVisibility:function(show){Dom.setStyle(this.element,"visibility",(show)?"visible":"hidden");if(show){Dom.removeClass(this.element,"yui-overlay-hidden")}else{Dom.addClass(this.element,"yui-overlay-hidden")}},configVisible:function(type,args,obj){var visible=args[0],currentVis=Dom.getStyle(this.element,"visibility"),effect=this.cfg.getProperty("effect"),effectInstances=[],isMacGecko=(this.platform=="mac"&&UA.gecko),alreadySubscribed=Config.alreadySubscribed,eff,ei,e,i,j,k,h,nEffects,nEffectInstances;if(currentVis=="inherit"){e=this.element.parentNode;while(e.nodeType!=9&&e.nodeType!=11){currentVis=Dom.getStyle(e,"visibility");if(currentVis!="inherit"){break}e=e.parentNode}if(currentVis=="inherit"){currentVis="visible"}}if(effect){if(effect instanceof Array){nEffects=effect.length;for(i=0;i<nEffects;i++){eff=effect[i];effectInstances[effectInstances.length]=eff.effect(this,eff.duration)}}else{effectInstances[effectInstances.length]=effect.effect(this,effect.duration)}}if(visible){if(isMacGecko){this.showMacGeckoScrollbars()}if(effect){if(visible){if(currentVis!="visible"||currentVis===""){this.beforeShowEvent.fire();nEffectInstances=effectInstances.length;for(j=0;j<nEffectInstances;j++){ei=effectInstances[j];if(j===0&&!alreadySubscribed(ei.animateInCompleteEvent,this.showEvent.fire,this.showEvent)){ei.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,true)}ei.animateIn()}}}}else{if(currentVis!="visible"||currentVis===""){this.beforeShowEvent.fire();this._setDomVisibility(true);this.cfg.refireEvent("iframe");this.showEvent.fire()}else{this._setDomVisibility(true)}}}else{if(isMacGecko){this.hideMacGeckoScrollbars()}if(effect){if(currentVis=="visible"){this.beforeHideEvent.fire();nEffectInstances=effectInstances.length;for(k=0;k<nEffectInstances;k++){h=effectInstances[k];if(k===0&&!alreadySubscribed(h.animateOutCompleteEvent,this.hideEvent.fire,this.hideEvent)){h.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,true)}h.animateOut()}}else if(currentVis===""){this._setDomVisibility(false)}}else{if(currentVis=="visible"||currentVis===""){this.beforeHideEvent.fire();this._setDomVisibility(false);this.hideEvent.fire()}else{this._setDomVisibility(false)}}}},doCenterOnDOMEvent:function(){var cfg=this.cfg,fc=cfg.getProperty("fixedcenter");if(cfg.getProperty("visible")){if(fc&&(fc!==_CONTAINED||this.fitsInViewport())){this.center()}}},fitsInViewport:function(){var nViewportOffset=Overlay.VIEWPORT_OFFSET,element=this.element,elementWidth=element.offsetWidth,elementHeight=element.offsetHeight,viewportWidth=Dom.getViewportWidth(),viewportHeight=Dom.getViewportHeight();return((elementWidth+nViewportOffset<viewportWidth)&&(elementHeight+nViewportOffset<viewportHeight))},configFixedCenter:function(type,args,obj){var val=args[0],alreadySubscribed=Config.alreadySubscribed,windowResizeEvent=Overlay.windowResizeEvent,windowScrollEvent=Overlay.windowScrollEvent;if(val){this.center();if(!alreadySubscribed(this.beforeShowEvent,this.center)){this.beforeShowEvent.subscribe(this.center)}if(!alreadySubscribed(windowResizeEvent,this.doCenterOnDOMEvent,this)){windowResizeEvent.subscribe(this.doCenterOnDOMEvent,this,true)}if(!alreadySubscribed(windowScrollEvent,this.doCenterOnDOMEvent,this)){windowScrollEvent.subscribe(this.doCenterOnDOMEvent,this,true)}}else{this.beforeShowEvent.unsubscribe(this.center);windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this)}},configHeight:function(type,args,obj){var height=args[0],el=this.element;Dom.setStyle(el,"height",height);this.cfg.refireEvent("iframe")},configAutoFillHeight:function(type,args,obj){var fillEl=args[0],cfg=this.cfg,autoFillHeight="autofillheight",height="height",currEl=cfg.getProperty(autoFillHeight),autoFill=this._autoFillOnHeightChange;cfg.unsubscribeFromConfigEvent(height,autoFill);Module.textResizeEvent.unsubscribe(autoFill);this.changeContentEvent.unsubscribe(autoFill);if(currEl&&fillEl!==currEl&&this[currEl]){Dom.setStyle(this[currEl],height,"")}if(fillEl){fillEl=Lang.trim(fillEl.toLowerCase());cfg.subscribeToConfigEvent(height,autoFill,this[fillEl],this);Module.textResizeEvent.subscribe(autoFill,this[fillEl],this);this.changeContentEvent.subscribe(autoFill,this[fillEl],this);cfg.setProperty(autoFillHeight,fillEl,true)}},configWidth:function(type,args,obj){var width=args[0],el=this.element;Dom.setStyle(el,"width",width);this.cfg.refireEvent("iframe")},configzIndex:function(type,args,obj){var zIndex=args[0],el=this.element;if(!zIndex){zIndex=Dom.getStyle(el,"zIndex");if(!zIndex||isNaN(zIndex)){zIndex=0}}if(this.iframe||this.cfg.getProperty("iframe")===true){if(zIndex<=0){zIndex=1}}Dom.setStyle(el,"zIndex",zIndex);this.cfg.setProperty("zIndex",zIndex,true);if(this.iframe){this.stackIframe()}},configXY:function(type,args,obj){var pos=args[0],x=pos[0],y=pos[1];this.cfg.setProperty("x",x);this.cfg.setProperty("y",y);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y])},configX:function(type,args,obj){var x=args[0],y=this.cfg.getProperty("y");this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");Dom.setX(this.element,x,true);this.cfg.setProperty("xy",[x,y],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y])},configY:function(type,args,obj){var x=this.cfg.getProperty("x"),y=args[0];this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");Dom.setY(this.element,y,true);this.cfg.setProperty("xy",[x,y],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y])},showIframe:function(){var oIFrame=this.iframe,oParentNode;if(oIFrame){oParentNode=this.element.parentNode;if(oParentNode!=oIFrame.parentNode){this._addToParent(oParentNode,oIFrame)}oIFrame.style.display="block"}},hideIframe:function(){if(this.iframe){this.iframe.style.display="none"}},syncIframe:function(){var oIFrame=this.iframe,oElement=this.element,nOffset=Overlay.IFRAME_OFFSET,nDimensionOffset=(nOffset*2),aXY;if(oIFrame){oIFrame.style.width=(oElement.offsetWidth+nDimensionOffset+"px");oIFrame.style.height=(oElement.offsetHeight+nDimensionOffset+"px");aXY=this.cfg.getProperty("xy");if(!Lang.isArray(aXY)||(isNaN(aXY[0])||isNaN(aXY[1]))){this.syncPosition();aXY=this.cfg.getProperty("xy")}Dom.setXY(oIFrame,[(aXY[0]-nOffset),(aXY[1]-nOffset)])}},stackIframe:function(){if(this.iframe){var overlayZ=Dom.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(overlayZ)&&!isNaN(overlayZ)){Dom.setStyle(this.iframe,"zIndex",(overlayZ-1))}}},configIframe:function(type,args,obj){var bIFrame=args[0];function createIFrame(){var oIFrame=this.iframe,oElement=this.element,oParent;if(!oIFrame){if(!m_oIFrameTemplate){m_oIFrameTemplate=document.createElement("iframe");if(this.isSecure){m_oIFrameTemplate.src=Overlay.IFRAME_SRC}if(UA.ie){m_oIFrameTemplate.style.filter="alpha(opacity=0)";m_oIFrameTemplate.frameBorder=0}else{m_oIFrameTemplate.style.opacity="0"}m_oIFrameTemplate.style.position="absolute";m_oIFrameTemplate.style.border="none";m_oIFrameTemplate.style.margin="0";m_oIFrameTemplate.style.padding="0";m_oIFrameTemplate.style.display="none";m_oIFrameTemplate.tabIndex=-1}oIFrame=m_oIFrameTemplate.cloneNode(false);oParent=oElement.parentNode;var parentNode=oParent||document.body;this._addToParent(parentNode,oIFrame);this.iframe=oIFrame}this.showIframe();this.syncIframe();this.stackIframe();if(!this._hasIframeEventListeners){this.showEvent.subscribe(this.showIframe);this.hideEvent.subscribe(this.hideIframe);this.changeContentEvent.subscribe(this.syncIframe);this._hasIframeEventListeners=true}}function onBeforeShow(){createIFrame.call(this);this.beforeShowEvent.unsubscribe(onBeforeShow);this._iframeDeferred=false}if(bIFrame){if(this.cfg.getProperty("visible")){createIFrame.call(this)}else{if(!this._iframeDeferred){this.beforeShowEvent.subscribe(onBeforeShow);this._iframeDeferred=true}}}else{this.hideIframe();if(this._hasIframeEventListeners){this.showEvent.unsubscribe(this.showIframe);this.hideEvent.unsubscribe(this.hideIframe);this.changeContentEvent.unsubscribe(this.syncIframe);this._hasIframeEventListeners=false}}},_primeXYFromDOM:function(){if(YAHOO.lang.isUndefined(this.cfg.getProperty("xy"))){this.syncPosition();this.cfg.refireEvent("xy");this.beforeShowEvent.unsubscribe(this._primeXYFromDOM)}},configConstrainToViewport:function(type,args,obj){var val=args[0];if(val){if(!Config.alreadySubscribed(this.beforeMoveEvent,this.enforceConstraints,this)){this.beforeMoveEvent.subscribe(this.enforceConstraints,this,true)}if(!Config.alreadySubscribed(this.beforeShowEvent,this._primeXYFromDOM)){this.beforeShowEvent.subscribe(this._primeXYFromDOM)}}else{this.beforeShowEvent.unsubscribe(this._primeXYFromDOM);this.beforeMoveEvent.unsubscribe(this.enforceConstraints,this)}},configContext:function(type,args,obj){var contextArgs=args[0],contextEl,elementMagnetCorner,contextMagnetCorner,triggers,defTriggers=this.CONTEXT_TRIGGERS;if(contextArgs){contextEl=contextArgs[0];elementMagnetCorner=contextArgs[1];contextMagnetCorner=contextArgs[2];triggers=contextArgs[3];if(defTriggers&&defTriggers.length>0){triggers=(triggers||[]).concat(defTriggers)}if(contextEl){if(typeof contextEl=="string"){this.cfg.setProperty("context",[document.getElementById(contextEl),elementMagnetCorner,contextMagnetCorner,triggers],true)}if(elementMagnetCorner&&contextMagnetCorner){this.align(elementMagnetCorner,contextMagnetCorner)}if(this._contextTriggers){this._processTriggers(this._contextTriggers,_UNSUBSCRIBE,this._alignOnTrigger)}if(triggers){this._processTriggers(triggers,_SUBSCRIBE,this._alignOnTrigger);this._contextTriggers=triggers}}}},_alignOnTrigger:function(type,args){this.align()},_findTriggerCE:function(t){var tce=null;if(t instanceof CustomEvent){tce=t}else if(Overlay._TRIGGER_MAP[t]){tce=Overlay._TRIGGER_MAP[t]}return tce},_processTriggers:function(triggers,mode,fn){var t,tce;for(var i=0,l=triggers.length;i<l;++i){t=triggers[i];tce=this._findTriggerCE(t);if(tce){tce[mode](fn,this,true)}else{this[mode](t,fn)}}},align:function(elementAlign,contextAlign){var contextArgs=this.cfg.getProperty("context"),me=this,context,element,contextRegion;function doAlign(v,h){switch(elementAlign){case Overlay.TOP_LEFT:me.moveTo(h,v);break;case Overlay.TOP_RIGHT:me.moveTo((h-element.offsetWidth),v);break;case Overlay.BOTTOM_LEFT:me.moveTo(h,(v-element.offsetHeight));break;case Overlay.BOTTOM_RIGHT:me.moveTo((h-element.offsetWidth),(v-element.offsetHeight));break}}if(contextArgs){context=contextArgs[0];element=this.element;me=this;if(!elementAlign){elementAlign=contextArgs[1]}if(!contextAlign){contextAlign=contextArgs[2]}if(element&&context){contextRegion=Dom.getRegion(context);switch(contextAlign){case Overlay.TOP_LEFT:doAlign(contextRegion.top,contextRegion.left);break;case Overlay.TOP_RIGHT:doAlign(contextRegion.top,contextRegion.right);break;case Overlay.BOTTOM_LEFT:doAlign(contextRegion.bottom,contextRegion.left);break;case Overlay.BOTTOM_RIGHT:doAlign(contextRegion.bottom,contextRegion.right);break}}}},enforceConstraints:function(type,args,obj){var pos=args[0];var cXY=this.getConstrainedXY(pos[0],pos[1]);this.cfg.setProperty("x",cXY[0],true);this.cfg.setProperty("y",cXY[1],true);this.cfg.setProperty("xy",cXY,true)},getConstrainedX:function(x){var oOverlay=this,oOverlayEl=oOverlay.element,nOverlayOffsetWidth=oOverlayEl.offsetWidth,nViewportOffset=Overlay.VIEWPORT_OFFSET,viewPortWidth=Dom.getViewportWidth(),scrollX=Dom.getDocumentScrollLeft(),bCanConstrain=(nOverlayOffsetWidth+nViewportOffset<viewPortWidth),aContext=this.cfg.getProperty("context"),oContextEl,nContextElX,nContextElWidth,bFlipped=false,nLeftRegionWidth,nRightRegionWidth,leftConstraint=scrollX+nViewportOffset,rightConstraint=scrollX+viewPortWidth-nOverlayOffsetWidth-nViewportOffset,xNew=x,oOverlapPositions={"tltr":true,"blbr":true,"brbl":true,"trtl":true};var flipHorizontal=function(){var nNewX;if((oOverlay.cfg.getProperty("x")-scrollX)>nContextElX){nNewX=(nContextElX-nOverlayOffsetWidth)}else{nNewX=(nContextElX+nContextElWidth)}oOverlay.cfg.setProperty("x",(nNewX+scrollX),true);return nNewX};var getDisplayRegionWidth=function(){if((oOverlay.cfg.getProperty("x")-scrollX)>nContextElX){return(nRightRegionWidth-nViewportOffset)}else{return(nLeftRegionWidth-nViewportOffset)}};var setHorizontalPosition=function(){var nDisplayRegionWidth=getDisplayRegionWidth(),fnReturnVal;if(nOverlayOffsetWidth>nDisplayRegionWidth){if(bFlipped){flipHorizontal()}else{flipHorizontal();bFlipped=true;fnReturnVal=setHorizontalPosition()}}return fnReturnVal};if(x<leftConstraint||x>rightConstraint){if(bCanConstrain){if(this.cfg.getProperty("preventcontextoverlap")&&aContext&&oOverlapPositions[(aContext[1]+aContext[2])]){oContextEl=aContext[0];nContextElX=Dom.getX(oContextEl)-scrollX;nContextElWidth=oContextEl.offsetWidth;nLeftRegionWidth=nContextElX;nRightRegionWidth=(viewPortWidth-(nContextElX+nContextElWidth));setHorizontalPosition();xNew=this.cfg.getProperty("x")}else{if(x<leftConstraint){xNew=leftConstraint}else if(x>rightConstraint){xNew=rightConstraint}}}else{xNew=nViewportOffset+scrollX}}return xNew},getConstrainedY:function(y){var oOverlay=this,oOverlayEl=oOverlay.element,nOverlayOffsetHeight=oOverlayEl.offsetHeight,nViewportOffset=Overlay.VIEWPORT_OFFSET,viewPortHeight=Dom.getViewportHeight(),scrollY=Dom.getDocumentScrollTop(),bCanConstrain=(nOverlayOffsetHeight+nViewportOffset<viewPortHeight),aContext=this.cfg.getProperty("context"),oContextEl,nContextElY,nContextElHeight,bFlipped=false,nTopRegionHeight,nBottomRegionHeight,topConstraint=scrollY+nViewportOffset,bottomConstraint=scrollY+viewPortHeight-nOverlayOffsetHeight-nViewportOffset,yNew=y,oOverlapPositions={"trbr":true,"tlbl":true,"bltl":true,"brtr":true};var flipVertical=function(){var nNewY;if((oOverlay.cfg.getProperty("y")-scrollY)>nContextElY){nNewY=(nContextElY-nOverlayOffsetHeight)}else{nNewY=(nContextElY+nContextElHeight)}oOverlay.cfg.setProperty("y",(nNewY+scrollY),true);return nNewY};var getDisplayRegionHeight=function(){if((oOverlay.cfg.getProperty("y")-scrollY)>nContextElY){return(nBottomRegionHeight-nViewportOffset)}else{return(nTopRegionHeight-nViewportOffset)}};var setVerticalPosition=function(){var nDisplayRegionHeight=getDisplayRegionHeight(),fnReturnVal;if(nOverlayOffsetHeight>nDisplayRegionHeight){if(bFlipped){flipVertical()}else{flipVertical();bFlipped=true;fnReturnVal=setVerticalPosition()}}return fnReturnVal};if(y<topConstraint||y>bottomConstraint){if(bCanConstrain){if(this.cfg.getProperty("preventcontextoverlap")&&aContext&&oOverlapPositions[(aContext[1]+aContext[2])]){oContextEl=aContext[0];nContextElHeight=oContextEl.offsetHeight;nContextElY=(Dom.getY(oContextEl)-scrollY);nTopRegionHeight=nContextElY;nBottomRegionHeight=(viewPortHeight-(nContextElY+nContextElHeight));setVerticalPosition();yNew=oOverlay.cfg.getProperty("y")}else{if(y<topConstraint){yNew=topConstraint}else if(y>bottomConstraint){yNew=bottomConstraint}}}else{yNew=nViewportOffset+scrollY}}return yNew},getConstrainedXY:function(x,y){return[this.getConstrainedX(x),this.getConstrainedY(y)]},center:function(){var nViewportOffset=Overlay.VIEWPORT_OFFSET,elementWidth=this.element.offsetWidth,elementHeight=this.element.offsetHeight,viewPortWidth=Dom.getViewportWidth(),viewPortHeight=Dom.getViewportHeight(),x,y;if(elementWidth<viewPortWidth){x=(viewPortWidth/2)-(elementWidth/2)+Dom.getDocumentScrollLeft()}else{x=nViewportOffset+Dom.getDocumentScrollLeft()}if(elementHeight<viewPortHeight){y=(viewPortHeight/2)-(elementHeight/2)+Dom.getDocumentScrollTop()}else{y=nViewportOffset+Dom.getDocumentScrollTop()}this.cfg.setProperty("xy",[parseInt(x,10),parseInt(y,10)]);this.cfg.refireEvent("iframe");if(UA.webkit){this.forceContainerRedraw()}},syncPosition:function(){var pos=Dom.getXY(this.element);this.cfg.setProperty("x",pos[0],true);this.cfg.setProperty("y",pos[1],true);this.cfg.setProperty("xy",pos,true)},onDomResize:function(e,obj){var me=this;Overlay.superclass.onDomResize.call(this,e,obj);setTimeout(function(){me.syncPosition();me.cfg.refireEvent("iframe");me.cfg.refireEvent("context")},0)},_getComputedHeight:(function(){if(document.defaultView&&document.defaultView.getComputedStyle){return function(el){var height=null;if(el.ownerDocument&&el.ownerDocument.defaultView){var computed=el.ownerDocument.defaultView.getComputedStyle(el,'');if(computed){height=parseInt(computed.height,10)}}return(Lang.isNumber(height))?height:null}}else{return function(el){var height=null;if(el.style.pixelHeight){height=el.style.pixelHeight}return(Lang.isNumber(height))?height:null}}})(),_validateAutoFillHeight:function(val){return(!val)||(Lang.isString(val)&&Overlay.STD_MOD_RE.test(val))},_autoFillOnHeightChange:function(type,args,el){var height=this.cfg.getProperty("height");if((height&&height!=="auto")||(height===0)){this.fillHeight(el)}},_getPreciseHeight:function(el){var height=el.offsetHeight;if(el.getBoundingClientRect){var rect=el.getBoundingClientRect();height=rect.bottom-rect.top}return height},fillHeight:function(el){if(el){var container=this.innerElement||this.element,containerEls=[this.header,this.body,this.footer],containerEl,total=0,filled=0,remaining=0,validEl=false;for(var i=0,l=containerEls.length;i<l;i++){containerEl=containerEls[i];if(containerEl){if(el!==containerEl){filled+=this._getPreciseHeight(containerEl)}else{validEl=true}}}if(validEl){if(UA.ie||UA.opera){Dom.setStyle(el,'height',0+'px')}total=this._getComputedHeight(container);if(total===null){Dom.addClass(container,"yui-override-padding");total=container.clientHeight;Dom.removeClass(container,"yui-override-padding")}remaining=Math.max(total-filled,0);Dom.setStyle(el,"height",remaining+"px");if(el.offsetHeight!=remaining){remaining=Math.max(remaining-(el.offsetHeight-remaining),0)}Dom.setStyle(el,"height",remaining+"px")}}},bringToTop:function(){var aOverlays=[],oElement=this.element;function compareZIndexDesc(p_oOverlay1,p_oOverlay2){var sZIndex1=Dom.getStyle(p_oOverlay1,"zIndex"),sZIndex2=Dom.getStyle(p_oOverlay2,"zIndex"),nZIndex1=(!sZIndex1||isNaN(sZIndex1))?0:parseInt(sZIndex1,10),nZIndex2=(!sZIndex2||isNaN(sZIndex2))?0:parseInt(sZIndex2,10);if(nZIndex1>nZIndex2){return-1}else if(nZIndex1<nZIndex2){return 1}else{return 0}}function isOverlayElement(p_oElement){var isOverlay=Dom.hasClass(p_oElement,Overlay.CSS_OVERLAY),Panel=YAHOO.widget.Panel;if(isOverlay&&!Dom.isAncestor(oElement,p_oElement)){if(Panel&&Dom.hasClass(p_oElement,Panel.CSS_PANEL)){aOverlays[aOverlays.length]=p_oElement.parentNode}else{aOverlays[aOverlays.length]=p_oElement}}}Dom.getElementsBy(isOverlayElement,"DIV",document.body);aOverlays.sort(compareZIndexDesc);var oTopOverlay=aOverlays[0],nTopZIndex;if(oTopOverlay){nTopZIndex=Dom.getStyle(oTopOverlay,"zIndex");if(!isNaN(nTopZIndex)){var bRequiresBump=false;if(oTopOverlay!=oElement){bRequiresBump=true}else if(aOverlays.length>1){var nNextZIndex=Dom.getStyle(aOverlays[1],"zIndex");if(!isNaN(nNextZIndex)&&(nTopZIndex==nNextZIndex)){bRequiresBump=true}}if(bRequiresBump){this.cfg.setProperty("zindex",(parseInt(nTopZIndex,10)+2))}}}},destroy:function(){if(this.iframe){this.iframe.parentNode.removeChild(this.iframe)}this.iframe=null;Overlay.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);Overlay.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this);Module.textResizeEvent.unsubscribe(this._autoFillOnHeightChange);Overlay.superclass.destroy.call(this)},forceContainerRedraw:function(){var c=this;Dom.addClass(c.element,"yui-force-redraw");setTimeout(function(){Dom.removeClass(c.element,"yui-force-redraw")},0)},toString:function(){return"Overlay "+this.id}})}());(function(){YAHOO.widget.OverlayManager=function(userConfig){this.init(userConfig)};var Overlay=YAHOO.widget.Overlay,Event=YAHOO.util.Event,Dom=YAHOO.util.Dom,Config=YAHOO.util.Config,CustomEvent=YAHOO.util.CustomEvent,OverlayManager=YAHOO.widget.OverlayManager;OverlayManager.CSS_FOCUSED="focused";OverlayManager.prototype={constructor:OverlayManager,overlays:null,initDefaultConfig:function(){this.cfg.addProperty("overlays",{suppressEvent:true});this.cfg.addProperty("focusevent",{value:"mousedown"})},init:function(userConfig){this.cfg=new Config(this);this.initDefaultConfig();if(userConfig){this.cfg.applyConfig(userConfig,true)}this.cfg.fireQueue();var activeOverlay=null;this.getActive=function(){return activeOverlay};this.focus=function(overlay){var o=this.find(overlay);if(o){o.focus()}};this.remove=function(overlay){var o=this.find(overlay),originalZ;if(o){if(activeOverlay==o){activeOverlay=null}var bDestroyed=(o.element===null&&o.cfg===null)?true:false;if(!bDestroyed){originalZ=Dom.getStyle(o.element,"zIndex");o.cfg.setProperty("zIndex",-1000,true)}this.overlays.sort(this.compareZIndexDesc);this.overlays=this.overlays.slice(0,(this.overlays.length-1));o.hideEvent.unsubscribe(o.blur);o.destroyEvent.unsubscribe(this._onOverlayDestroy,o);o.focusEvent.unsubscribe(this._onOverlayFocusHandler,o);o.blurEvent.unsubscribe(this._onOverlayBlurHandler,o);if(!bDestroyed){Event.removeListener(o.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus);o.cfg.setProperty("zIndex",originalZ,true);o.cfg.setProperty("manager",null)}if(o.focusEvent._managed){o.focusEvent=null}if(o.blurEvent._managed){o.blurEvent=null}if(o.focus._managed){o.focus=null}if(o.blur._managed){o.blur=null}}};this.blurAll=function(){var nOverlays=this.overlays.length,i;if(nOverlays>0){i=nOverlays-1;do{this.overlays[i].blur()}while(i--)}};this._manageBlur=function(overlay){var changed=false;if(activeOverlay==overlay){Dom.removeClass(activeOverlay.element,OverlayManager.CSS_FOCUSED);activeOverlay=null;changed=true}return changed};this._manageFocus=function(overlay){var changed=false;if(activeOverlay!=overlay){if(activeOverlay){activeOverlay.blur()}activeOverlay=overlay;this.bringToTop(activeOverlay);Dom.addClass(activeOverlay.element,OverlayManager.CSS_FOCUSED);changed=true}return changed};var overlays=this.cfg.getProperty("overlays");if(!this.overlays){this.overlays=[]}if(overlays){this.register(overlays);this.overlays.sort(this.compareZIndexDesc)}},_onOverlayElementFocus:function(p_oEvent){var oTarget=Event.getTarget(p_oEvent),oClose=this.close;if(oClose&&(oTarget==oClose||Dom.isAncestor(oClose,oTarget))){this.blur()}else{this.focus()}},_onOverlayDestroy:function(p_sType,p_aArgs,p_oOverlay){this.remove(p_oOverlay)},_onOverlayFocusHandler:function(p_sType,p_aArgs,p_oOverlay){this._manageFocus(p_oOverlay)},_onOverlayBlurHandler:function(p_sType,p_aArgs,p_oOverlay){this._manageBlur(p_oOverlay)},_bindFocus:function(overlay){var mgr=this;if(!overlay.focusEvent){overlay.focusEvent=overlay.createEvent("focus");overlay.focusEvent.signature=CustomEvent.LIST;overlay.focusEvent._managed=true}else{overlay.focusEvent.subscribe(mgr._onOverlayFocusHandler,overlay,mgr)}if(!overlay.focus){Event.on(overlay.element,mgr.cfg.getProperty("focusevent"),mgr._onOverlayElementFocus,null,overlay);overlay.focus=function(){if(mgr._manageFocus(this)){if(this.cfg.getProperty("visible")&&this.focusFirst){this.focusFirst()}this.focusEvent.fire()}};overlay.focus._managed=true}},_bindBlur:function(overlay){var mgr=this;if(!overlay.blurEvent){overlay.blurEvent=overlay.createEvent("blur");overlay.blurEvent.signature=CustomEvent.LIST;overlay.focusEvent._managed=true}else{overlay.blurEvent.subscribe(mgr._onOverlayBlurHandler,overlay,mgr)}if(!overlay.blur){overlay.blur=function(){if(mgr._manageBlur(this)){this.blurEvent.fire()}};overlay.blur._managed=true}overlay.hideEvent.subscribe(overlay.blur)},_bindDestroy:function(overlay){var mgr=this;overlay.destroyEvent.subscribe(mgr._onOverlayDestroy,overlay,mgr)},_syncZIndex:function(overlay){var zIndex=Dom.getStyle(overlay.element,"zIndex");if(!isNaN(zIndex)){overlay.cfg.setProperty("zIndex",parseInt(zIndex,10))}else{overlay.cfg.setProperty("zIndex",0)}},register:function(overlay){var registered=false,i,n;if(overlay instanceof Overlay){overlay.cfg.addProperty("manager",{value:this});this._bindFocus(overlay);this._bindBlur(overlay);this._bindDestroy(overlay);this._syncZIndex(overlay);this.overlays.push(overlay);this.bringToTop(overlay);registered=true}else if(overlay instanceof Array){for(i=0,n=overlay.length;i<n;i++){registered=this.register(overlay[i])||registered}}return registered},bringToTop:function(p_oOverlay){var oOverlay=this.find(p_oOverlay),nTopZIndex,oTopOverlay,aOverlays;if(oOverlay){aOverlays=this.overlays;aOverlays.sort(this.compareZIndexDesc);oTopOverlay=aOverlays[0];if(oTopOverlay){nTopZIndex=Dom.getStyle(oTopOverlay.element,"zIndex");if(!isNaN(nTopZIndex)){var bRequiresBump=false;if(oTopOverlay!==oOverlay){bRequiresBump=true}else if(aOverlays.length>1){var nNextZIndex=Dom.getStyle(aOverlays[1].element,"zIndex");if(!isNaN(nNextZIndex)&&(nTopZIndex==nNextZIndex)){bRequiresBump=true}}if(bRequiresBump){oOverlay.cfg.setProperty("zindex",(parseInt(nTopZIndex,10)+2))}}aOverlays.sort(this.compareZIndexDesc)}}},find:function(overlay){var isInstance=overlay instanceof Overlay,overlays=this.overlays,n=overlays.length,found=null,o,i;if(isInstance||typeof overlay=="string"){for(i=n-1;i>=0;i--){o=overlays[i];if((isInstance&&(o===overlay))||(o.id==overlay)){found=o;break}}}return found},compareZIndexDesc:function(o1,o2){var zIndex1=(o1.cfg)?o1.cfg.getProperty("zIndex"):null,zIndex2=(o2.cfg)?o2.cfg.getProperty("zIndex"):null;if(zIndex1===null&&zIndex2===null){return 0}else if(zIndex1===null){return 1}else if(zIndex2===null){return-1}else if(zIndex1>zIndex2){return-1}else if(zIndex1<zIndex2){return 1}else{return 0}},showAll:function(){var overlays=this.overlays,n=overlays.length,i;for(i=n-1;i>=0;i--){overlays[i].show()}},hideAll:function(){var overlays=this.overlays,n=overlays.length,i;for(i=n-1;i>=0;i--){overlays[i].hide()}},toString:function(){return"OverlayManager"}}}());(function(){YAHOO.widget.Tooltip=function(el,userConfig){YAHOO.widget.Tooltip.superclass.constructor.call(this,el,userConfig)};var Lang=YAHOO.lang,Event=YAHOO.util.Event,CustomEvent=YAHOO.util.CustomEvent,Dom=YAHOO.util.Dom,Tooltip=YAHOO.widget.Tooltip,UA=YAHOO.env.ua,bIEQuirks=(UA.ie&&(UA.ie<=6||document.compatMode=="BackCompat")),m_oShadowTemplate,DEFAULT_CONFIG={"PREVENT_OVERLAP":{key:"preventoverlap",value:true,validator:Lang.isBoolean,supercedes:["x","y","xy"]},"SHOW_DELAY":{key:"showdelay",value:200,validator:Lang.isNumber},"AUTO_DISMISS_DELAY":{key:"autodismissdelay",value:5000,validator:Lang.isNumber},"HIDE_DELAY":{key:"hidedelay",value:250,validator:Lang.isNumber},"TEXT":{key:"text",suppressEvent:true},"CONTAINER":{key:"container"},"DISABLED":{key:"disabled",value:false,suppressEvent:true}},EVENT_TYPES={"CONTEXT_MOUSE_OVER":"contextMouseOver","CONTEXT_MOUSE_OUT":"contextMouseOut","CONTEXT_TRIGGER":"contextTrigger"};Tooltip.CSS_TOOLTIP="yui-tt";function restoreOriginalWidth(sOriginalWidth,sForcedWidth){var oConfig=this.cfg,sCurrentWidth=oConfig.getProperty("width");if(sCurrentWidth==sForcedWidth){oConfig.setProperty("width",sOriginalWidth)}}function setWidthToOffsetWidth(p_sType,p_aArgs){if("_originalWidth"in this){restoreOriginalWidth.call(this,this._originalWidth,this._forcedWidth)}var oBody=document.body,oConfig=this.cfg,sOriginalWidth=oConfig.getProperty("width"),sNewWidth,oClone;if((!sOriginalWidth||sOriginalWidth=="auto")&&(oConfig.getProperty("container")!=oBody||oConfig.getProperty("x")>=Dom.getViewportWidth()||oConfig.getProperty("y")>=Dom.getViewportHeight())){oClone=this.element.cloneNode(true);oClone.style.visibility="hidden";oClone.style.top="0px";oClone.style.left="0px";oBody.appendChild(oClone);sNewWidth=(oClone.offsetWidth+"px");oBody.removeChild(oClone);oClone=null;oConfig.setProperty("width",sNewWidth);oConfig.refireEvent("xy");this._originalWidth=sOriginalWidth||"";this._forcedWidth=sNewWidth}}function onDOMReady(p_sType,p_aArgs,p_oObject){this.render(p_oObject)}function onInit(){Event.onDOMReady(onDOMReady,this.cfg.getProperty("container"),this)}YAHOO.extend(Tooltip,YAHOO.widget.Overlay,{init:function(el,userConfig){Tooltip.superclass.init.call(this,el);this.beforeInitEvent.fire(Tooltip);Dom.addClass(this.element,Tooltip.CSS_TOOLTIP);if(userConfig){this.cfg.applyConfig(userConfig,true)}this.cfg.queueProperty("visible",false);this.cfg.queueProperty("constraintoviewport",true);this.setBody("");this.subscribe("changeContent",setWidthToOffsetWidth);this.subscribe("init",onInit);this.subscribe("render",this.onRender);this.initEvent.fire(Tooltip)},initEvents:function(){Tooltip.superclass.initEvents.call(this);var SIGNATURE=CustomEvent.LIST;this.contextMouseOverEvent=this.createEvent(EVENT_TYPES.CONTEXT_MOUSE_OVER);this.contextMouseOverEvent.signature=SIGNATURE;this.contextMouseOutEvent=this.createEvent(EVENT_TYPES.CONTEXT_MOUSE_OUT);this.contextMouseOutEvent.signature=SIGNATURE;this.contextTriggerEvent=this.createEvent(EVENT_TYPES.CONTEXT_TRIGGER);this.contextTriggerEvent.signature=SIGNATURE},initDefaultConfig:function(){Tooltip.superclass.initDefaultConfig.call(this);this.cfg.addProperty(DEFAULT_CONFIG.PREVENT_OVERLAP.key,{value:DEFAULT_CONFIG.PREVENT_OVERLAP.value,validator:DEFAULT_CONFIG.PREVENT_OVERLAP.validator,supercedes:DEFAULT_CONFIG.PREVENT_OVERLAP.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.SHOW_DELAY.key,{handler:this.configShowDelay,value:200,validator:DEFAULT_CONFIG.SHOW_DELAY.validator});this.cfg.addProperty(DEFAULT_CONFIG.AUTO_DISMISS_DELAY.key,{handler:this.configAutoDismissDelay,value:DEFAULT_CONFIG.AUTO_DISMISS_DELAY.value,validator:DEFAULT_CONFIG.AUTO_DISMISS_DELAY.validator});this.cfg.addProperty(DEFAULT_CONFIG.HIDE_DELAY.key,{handler:this.configHideDelay,value:DEFAULT_CONFIG.HIDE_DELAY.value,validator:DEFAULT_CONFIG.HIDE_DELAY.validator});this.cfg.addProperty(DEFAULT_CONFIG.TEXT.key,{handler:this.configText,suppressEvent:DEFAULT_CONFIG.TEXT.suppressEvent});this.cfg.addProperty(DEFAULT_CONFIG.CONTAINER.key,{handler:this.configContainer,value:document.body});this.cfg.addProperty(DEFAULT_CONFIG.DISABLED.key,{handler:this.configContainer,value:DEFAULT_CONFIG.DISABLED.value,supressEvent:DEFAULT_CONFIG.DISABLED.suppressEvent})},configText:function(type,args,obj){var text=args[0];if(text){this.setBody(text)}},configContainer:function(type,args,obj){var container=args[0];if(typeof container=='string'){this.cfg.setProperty("container",document.getElementById(container),true)}},_removeEventListeners:function(){var aElements=this._context,nElements,oElement,i;if(aElements){nElements=aElements.length;if(nElements>0){i=nElements-1;do{oElement=aElements[i];Event.removeListener(oElement,"mouseover",this.onContextMouseOver);Event.removeListener(oElement,"mousemove",this.onContextMouseMove);Event.removeListener(oElement,"mouseout",this.onContextMouseOut)}while(i--)}}},configContext:function(type,args,obj){var context=args[0],aElements,nElements,oElement,i;if(context){if(!(context instanceof Array)){if(typeof context=="string"){this.cfg.setProperty("context",[document.getElementById(context)],true)}else{this.cfg.setProperty("context",[context],true)}context=this.cfg.getProperty("context")}this._removeEventListeners();this._context=context;aElements=this._context;if(aElements){nElements=aElements.length;if(nElements>0){i=nElements-1;do{oElement=aElements[i];Event.on(oElement,"mouseover",this.onContextMouseOver,this);Event.on(oElement,"mousemove",this.onContextMouseMove,this);Event.on(oElement,"mouseout",this.onContextMouseOut,this)}while(i--)}}}},onContextMouseMove:function(e,obj){obj.pageX=Event.getPageX(e);obj.pageY=Event.getPageY(e)},onContextMouseOver:function(e,obj){var context=this;if(context.title){obj._tempTitle=context.title;context.title=""}if(obj.fireEvent("contextMouseOver",context,e)!==false&&!obj.cfg.getProperty("disabled")){if(obj.hideProcId){clearTimeout(obj.hideProcId);obj.hideProcId=null}Event.on(context,"mousemove",obj.onContextMouseMove,obj);obj.showProcId=obj.doShow(e,context)}},onContextMouseOut:function(e,obj){var el=this;if(obj._tempTitle){el.title=obj._tempTitle;obj._tempTitle=null}if(obj.showProcId){clearTimeout(obj.showProcId);obj.showProcId=null}if(obj.hideProcId){clearTimeout(obj.hideProcId);obj.hideProcId=null}obj.fireEvent("contextMouseOut",el,e);obj.hideProcId=setTimeout(function(){obj.hide()},obj.cfg.getProperty("hidedelay"))},doShow:function(e,context){var yOffset=25,me=this;if(UA.opera&&context.tagName&&context.tagName.toUpperCase()=="A"){yOffset+=12}return setTimeout(function(){var txt=me.cfg.getProperty("text");if(me._tempTitle&&(txt===""||YAHOO.lang.isUndefined(txt)||YAHOO.lang.isNull(txt))){me.setBody(me._tempTitle)}else{me.cfg.refireEvent("text")}me.moveTo(me.pageX,me.pageY+yOffset);if(me.cfg.getProperty("preventoverlap")){me.preventOverlap(me.pageX,me.pageY)}Event.removeListener(context,"mousemove",me.onContextMouseMove);me.contextTriggerEvent.fire(context);me.show();me.hideProcId=me.doHide()},this.cfg.getProperty("showdelay"))},doHide:function(){var me=this;return setTimeout(function(){me.hide()},this.cfg.getProperty("autodismissdelay"))},preventOverlap:function(pageX,pageY){var height=this.element.offsetHeight,mousePoint=new YAHOO.util.Point(pageX,pageY),elementRegion=Dom.getRegion(this.element);elementRegion.top-=5;elementRegion.left-=5;elementRegion.right+=5;elementRegion.bottom+=5;if(elementRegion.contains(mousePoint)){this.cfg.setProperty("y",(pageY-height-5))}},onRender:function(p_sType,p_aArgs){function sizeShadow(){var oElement=this.element,oShadow=this.underlay;if(oShadow){oShadow.style.width=(oElement.offsetWidth+6)+"px";oShadow.style.height=(oElement.offsetHeight+1)+"px"}}function addShadowVisibleClass(){Dom.addClass(this.underlay,"yui-tt-shadow-visible");if(UA.ie){this.forceUnderlayRedraw()}}function removeShadowVisibleClass(){Dom.removeClass(this.underlay,"yui-tt-shadow-visible")}function createShadow(){var oShadow=this.underlay,oElement,Module,nIE,me;if(!oShadow){oElement=this.element;Module=YAHOO.widget.Module;nIE=UA.ie;me=this;if(!m_oShadowTemplate){m_oShadowTemplate=document.createElement("div");m_oShadowTemplate.className="yui-tt-shadow"}oShadow=m_oShadowTemplate.cloneNode(false);oElement.appendChild(oShadow);this.underlay=oShadow;this._shadow=this.underlay;addShadowVisibleClass.call(this);this.subscribe("beforeShow",addShadowVisibleClass);this.subscribe("hide",removeShadowVisibleClass);if(bIEQuirks){window.setTimeout(function(){sizeShadow.call(me)},0);this.cfg.subscribeToConfigEvent("width",sizeShadow);this.cfg.subscribeToConfigEvent("height",sizeShadow);this.subscribe("changeContent",sizeShadow);Module.textResizeEvent.subscribe(sizeShadow,this,true);this.subscribe("destroy",function(){Module.textResizeEvent.unsubscribe(sizeShadow,this)})}}}function onBeforeShow(){createShadow.call(this);this.unsubscribe("beforeShow",onBeforeShow)}if(this.cfg.getProperty("visible")){createShadow.call(this)}else{this.subscribe("beforeShow",onBeforeShow)}},forceUnderlayRedraw:function(){var tt=this;Dom.addClass(tt.underlay,"yui-force-redraw");setTimeout(function(){Dom.removeClass(tt.underlay,"yui-force-redraw")},0)},destroy:function(){this._removeEventListeners();Tooltip.superclass.destroy.call(this)},toString:function(){return"Tooltip "+this.id}})}());(function(){YAHOO.widget.Panel=function(el,userConfig){YAHOO.widget.Panel.superclass.constructor.call(this,el,userConfig)};var _currentModal=null;var Lang=YAHOO.lang,Util=YAHOO.util,Dom=Util.Dom,Event=Util.Event,CustomEvent=Util.CustomEvent,KeyListener=YAHOO.util.KeyListener,Config=Util.Config,Overlay=YAHOO.widget.Overlay,Panel=YAHOO.widget.Panel,UA=YAHOO.env.ua,bIEQuirks=(UA.ie&&(UA.ie<=6||document.compatMode=="BackCompat")),m_oMaskTemplate,m_oUnderlayTemplate,m_oCloseIconTemplate,EVENT_TYPES={"SHOW_MASK":"showMask","HIDE_MASK":"hideMask","DRAG":"drag"},DEFAULT_CONFIG={"CLOSE":{key:"close",value:true,validator:Lang.isBoolean,supercedes:["visible"]},"DRAGGABLE":{key:"draggable",value:(Util.DD?true:false),validator:Lang.isBoolean,supercedes:["visible"]},"DRAG_ONLY":{key:"dragonly",value:false,validator:Lang.isBoolean,supercedes:["draggable"]},"UNDERLAY":{key:"underlay",value:"shadow",supercedes:["visible"]},"MODAL":{key:"modal",value:false,validator:Lang.isBoolean,supercedes:["visible","zindex"]},"KEY_LISTENERS":{key:"keylisteners",suppressEvent:true,supercedes:["visible"]},"STRINGS":{key:"strings",supercedes:["close"],validator:Lang.isObject,value:{close:"Close"}}};Panel.CSS_PANEL="yui-panel";Panel.CSS_PANEL_CONTAINER="yui-panel-container";Panel.FOCUSABLE=["a","button","select","textarea","input","iframe"];function createHeader(p_sType,p_aArgs){if(!this.header&&this.cfg.getProperty("draggable")){this.setHeader("&#160;")}}function restoreOriginalWidth(p_sType,p_aArgs,p_oObject){var sOriginalWidth=p_oObject[0],sNewWidth=p_oObject[1],oConfig=this.cfg,sCurrentWidth=oConfig.getProperty("width");if(sCurrentWidth==sNewWidth){oConfig.setProperty("width",sOriginalWidth)}this.unsubscribe("hide",restoreOriginalWidth,p_oObject)}function setWidthToOffsetWidth(p_sType,p_aArgs){var oConfig,sOriginalWidth,sNewWidth;if(bIEQuirks){oConfig=this.cfg;sOriginalWidth=oConfig.getProperty("width");if(!sOriginalWidth||sOriginalWidth=="auto"){sNewWidth=(this.element.offsetWidth+"px");oConfig.setProperty("width",sNewWidth);this.subscribe("hide",restoreOriginalWidth,[(sOriginalWidth||""),sNewWidth])}}}YAHOO.extend(Panel,Overlay,{init:function(el,userConfig){Panel.superclass.init.call(this,el);this.beforeInitEvent.fire(Panel);Dom.addClass(this.element,Panel.CSS_PANEL);this.buildWrapper();if(userConfig){this.cfg.applyConfig(userConfig,true)}this.subscribe("showMask",this._addFocusHandlers);this.subscribe("hideMask",this._removeFocusHandlers);this.subscribe("beforeRender",createHeader);this.subscribe("render",function(){this.setFirstLastFocusable();this.subscribe("changeContent",this.setFirstLastFocusable)});this.subscribe("show",this.focusFirst);this.initEvent.fire(Panel)},_onElementFocus:function(e){if(_currentModal===this){var target=Event.getTarget(e),doc=document.documentElement,insideDoc=(target!==doc&&target!==window);if(insideDoc&&target!==this.element&&target!==this.mask&&!Dom.isAncestor(this.element,target)){try{if(this.firstElement){this.firstElement.focus()}else{if(this._modalFocus){this._modalFocus.focus()}else{this.innerElement.focus()}}}catch(err){try{if(insideDoc&&target!==document.body){target.blur()}}catch(err2){}}}}},_addFocusHandlers:function(p_sType,p_aArgs){if(!this.firstElement){if(UA.webkit||UA.opera){if(!this._modalFocus){this._createHiddenFocusElement()}}else{this.innerElement.tabIndex=0}}this.setTabLoop(this.firstElement,this.lastElement);Event.onFocus(document.documentElement,this._onElementFocus,this,true);_currentModal=this},_createHiddenFocusElement:function(){var e=document.createElement("button");e.style.height="1px";e.style.width="1px";e.style.position="absolute";e.style.left="-10000em";e.style.opacity=0;e.tabIndex=-1;this.innerElement.appendChild(e);this._modalFocus=e},_removeFocusHandlers:function(p_sType,p_aArgs){Event.removeFocusListener(document.documentElement,this._onElementFocus,this);if(_currentModal==this){_currentModal=null}},focusFirst:function(type,args,obj){var el=this.firstElement;if(args&&args[1]){Event.stopEvent(args[1])}if(el){try{el.focus()}catch(err){}}},focusLast:function(type,args,obj){var el=this.lastElement;if(args&&args[1]){Event.stopEvent(args[1])}if(el){try{el.focus()}catch(err){}}},setTabLoop:function(firstElement,lastElement){var backTab=this.preventBackTab,tab=this.preventTabOut,showEvent=this.showEvent,hideEvent=this.hideEvent;if(backTab){backTab.disable();showEvent.unsubscribe(backTab.enable,backTab);hideEvent.unsubscribe(backTab.disable,backTab);backTab=this.preventBackTab=null}if(tab){tab.disable();showEvent.unsubscribe(tab.enable,tab);hideEvent.unsubscribe(tab.disable,tab);tab=this.preventTabOut=null}if(firstElement){this.preventBackTab=new KeyListener(firstElement,{shift:true,keys:9},{fn:this.focusLast,scope:this,correctScope:true});backTab=this.preventBackTab;showEvent.subscribe(backTab.enable,backTab,true);hideEvent.subscribe(backTab.disable,backTab,true)}if(lastElement){this.preventTabOut=new KeyListener(lastElement,{shift:false,keys:9},{fn:this.focusFirst,scope:this,correctScope:true});tab=this.preventTabOut;showEvent.subscribe(tab.enable,tab,true);hideEvent.subscribe(tab.disable,tab,true)}},getFocusableElements:function(root){root=root||this.innerElement;var focusable={};for(var i=0;i<Panel.FOCUSABLE.length;i++){focusable[Panel.FOCUSABLE[i]]=true}function isFocusable(el){if(el.focus&&el.type!=="hidden"&&!el.disabled&&focusable[el.tagName.toLowerCase()]){return true}return false}return Dom.getElementsBy(isFocusable,null,root)},setFirstLastFocusable:function(){this.firstElement=null;this.lastElement=null;var elements=this.getFocusableElements();this.focusableElements=elements;if(elements.length>0){this.firstElement=elements[0];this.lastElement=elements[elements.length-1]}if(this.cfg.getProperty("modal")){this.setTabLoop(this.firstElement,this.lastElement)}},initEvents:function(){Panel.superclass.initEvents.call(this);var SIGNATURE=CustomEvent.LIST;this.showMaskEvent=this.createEvent(EVENT_TYPES.SHOW_MASK);this.showMaskEvent.signature=SIGNATURE;this.hideMaskEvent=this.createEvent(EVENT_TYPES.HIDE_MASK);this.hideMaskEvent.signature=SIGNATURE;this.dragEvent=this.createEvent(EVENT_TYPES.DRAG);this.dragEvent.signature=SIGNATURE},initDefaultConfig:function(){Panel.superclass.initDefaultConfig.call(this);this.cfg.addProperty(DEFAULT_CONFIG.CLOSE.key,{handler:this.configClose,value:DEFAULT_CONFIG.CLOSE.value,validator:DEFAULT_CONFIG.CLOSE.validator,supercedes:DEFAULT_CONFIG.CLOSE.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.DRAGGABLE.key,{handler:this.configDraggable,value:(Util.DD)?true:false,validator:DEFAULT_CONFIG.DRAGGABLE.validator,supercedes:DEFAULT_CONFIG.DRAGGABLE.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.DRAG_ONLY.key,{value:DEFAULT_CONFIG.DRAG_ONLY.value,validator:DEFAULT_CONFIG.DRAG_ONLY.validator,supercedes:DEFAULT_CONFIG.DRAG_ONLY.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.UNDERLAY.key,{handler:this.configUnderlay,value:DEFAULT_CONFIG.UNDERLAY.value,supercedes:DEFAULT_CONFIG.UNDERLAY.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.MODAL.key,{handler:this.configModal,value:DEFAULT_CONFIG.MODAL.value,validator:DEFAULT_CONFIG.MODAL.validator,supercedes:DEFAULT_CONFIG.MODAL.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.KEY_LISTENERS.key,{handler:this.configKeyListeners,suppressEvent:DEFAULT_CONFIG.KEY_LISTENERS.suppressEvent,supercedes:DEFAULT_CONFIG.KEY_LISTENERS.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.STRINGS.key,{value:DEFAULT_CONFIG.STRINGS.value,handler:this.configStrings,validator:DEFAULT_CONFIG.STRINGS.validator,supercedes:DEFAULT_CONFIG.STRINGS.supercedes})},configClose:function(type,args,obj){var val=args[0],oClose=this.close,strings=this.cfg.getProperty("strings");if(val){if(!oClose){if(!m_oCloseIconTemplate){m_oCloseIconTemplate=document.createElement("a");m_oCloseIconTemplate.className="container-close";m_oCloseIconTemplate.href="#"}oClose=m_oCloseIconTemplate.cloneNode(true);this.innerElement.appendChild(oClose);oClose.innerHTML=(strings&&strings.close)?strings.close:"&#160;";Event.on(oClose,"click",this._doClose,this,true);this.close=oClose}else{oClose.style.display="block"}}else{if(oClose){oClose.style.display="none"}}},_doClose:function(e){Event.preventDefault(e);this.hide()},configDraggable:function(type,args,obj){var val=args[0];if(val){if(!Util.DD){this.cfg.setProperty("draggable",false);return}if(this.header){Dom.setStyle(this.header,"cursor","move");this.registerDragDrop()}this.subscribe("beforeShow",setWidthToOffsetWidth)}else{if(this.dd){this.dd.unreg()}if(this.header){Dom.setStyle(this.header,"cursor","auto")}this.unsubscribe("beforeShow",setWidthToOffsetWidth)}},configUnderlay:function(type,args,obj){var bMacGecko=(this.platform=="mac"&&UA.gecko),sUnderlay=args[0].toLowerCase(),oUnderlay=this.underlay,oElement=this.element;function createUnderlay(){var bNew=false;if(!oUnderlay){if(!m_oUnderlayTemplate){m_oUnderlayTemplate=document.createElement("div");m_oUnderlayTemplate.className="underlay"}oUnderlay=m_oUnderlayTemplate.cloneNode(false);this.element.appendChild(oUnderlay);this.underlay=oUnderlay;if(bIEQuirks){this.sizeUnderlay();this.cfg.subscribeToConfigEvent("width",this.sizeUnderlay);this.cfg.subscribeToConfigEvent("height",this.sizeUnderlay);this.changeContentEvent.subscribe(this.sizeUnderlay);YAHOO.widget.Module.textResizeEvent.subscribe(this.sizeUnderlay,this,true)}if(UA.webkit&&UA.webkit<420){this.changeContentEvent.subscribe(this.forceUnderlayRedraw)}bNew=true}}function onBeforeShow(){var bNew=createUnderlay.call(this);if(!bNew&&bIEQuirks){this.sizeUnderlay()}this._underlayDeferred=false;this.beforeShowEvent.unsubscribe(onBeforeShow)}function destroyUnderlay(){if(this._underlayDeferred){this.beforeShowEvent.unsubscribe(onBeforeShow);this._underlayDeferred=false}if(oUnderlay){this.cfg.unsubscribeFromConfigEvent("width",this.sizeUnderlay);this.cfg.unsubscribeFromConfigEvent("height",this.sizeUnderlay);this.changeContentEvent.unsubscribe(this.sizeUnderlay);this.changeContentEvent.unsubscribe(this.forceUnderlayRedraw);YAHOO.widget.Module.textResizeEvent.unsubscribe(this.sizeUnderlay,this,true);this.element.removeChild(oUnderlay);this.underlay=null}}switch(sUnderlay){case"shadow":Dom.removeClass(oElement,"matte");Dom.addClass(oElement,"shadow");break;case"matte":if(!bMacGecko){destroyUnderlay.call(this)}Dom.removeClass(oElement,"shadow");Dom.addClass(oElement,"matte");break;default:if(!bMacGecko){destroyUnderlay.call(this)}Dom.removeClass(oElement,"shadow");Dom.removeClass(oElement,"matte");break}if((sUnderlay=="shadow")||(bMacGecko&&!oUnderlay)){if(this.cfg.getProperty("visible")){var bNew=createUnderlay.call(this);if(!bNew&&bIEQuirks){this.sizeUnderlay()}}else{if(!this._underlayDeferred){this.beforeShowEvent.subscribe(onBeforeShow);this._underlayDeferred=true}}}},configModal:function(type,args,obj){var modal=args[0];if(modal){if(!this._hasModalityEventListeners){this.subscribe("beforeShow",this.buildMask);this.subscribe("beforeShow",this.bringToTop);this.subscribe("beforeShow",this.showMask);this.subscribe("hide",this.hideMask);Overlay.windowResizeEvent.subscribe(this.sizeMask,this,true);this._hasModalityEventListeners=true}}else{if(this._hasModalityEventListeners){if(this.cfg.getProperty("visible")){this.hideMask();this.removeMask()}this.unsubscribe("beforeShow",this.buildMask);this.unsubscribe("beforeShow",this.bringToTop);this.unsubscribe("beforeShow",this.showMask);this.unsubscribe("hide",this.hideMask);Overlay.windowResizeEvent.unsubscribe(this.sizeMask,this);this._hasModalityEventListeners=false}}},removeMask:function(){var oMask=this.mask,oParentNode;if(oMask){this.hideMask();oParentNode=oMask.parentNode;if(oParentNode){oParentNode.removeChild(oMask)}this.mask=null}},configKeyListeners:function(type,args,obj){var listeners=args[0],listener,nListeners,i;if(listeners){if(listeners instanceof Array){nListeners=listeners.length;for(i=0;i<nListeners;i++){listener=listeners[i];if(!Config.alreadySubscribed(this.showEvent,listener.enable,listener)){this.showEvent.subscribe(listener.enable,listener,true)}if(!Config.alreadySubscribed(this.hideEvent,listener.disable,listener)){this.hideEvent.subscribe(listener.disable,listener,true);this.destroyEvent.subscribe(listener.disable,listener,true)}}}else{if(!Config.alreadySubscribed(this.showEvent,listeners.enable,listeners)){this.showEvent.subscribe(listeners.enable,listeners,true)}if(!Config.alreadySubscribed(this.hideEvent,listeners.disable,listeners)){this.hideEvent.subscribe(listeners.disable,listeners,true);this.destroyEvent.subscribe(listeners.disable,listeners,true)}}}},configStrings:function(type,args,obj){var val=Lang.merge(DEFAULT_CONFIG.STRINGS.value,args[0]);this.cfg.setProperty(DEFAULT_CONFIG.STRINGS.key,val,true)},configHeight:function(type,args,obj){var height=args[0],el=this.innerElement;Dom.setStyle(el,"height",height);this.cfg.refireEvent("iframe")},_autoFillOnHeightChange:function(type,args,el){Panel.superclass._autoFillOnHeightChange.apply(this,arguments);if(bIEQuirks){var panel=this;setTimeout(function(){panel.sizeUnderlay()},0)}},configWidth:function(type,args,obj){var width=args[0],el=this.innerElement;Dom.setStyle(el,"width",width);this.cfg.refireEvent("iframe")},configzIndex:function(type,args,obj){Panel.superclass.configzIndex.call(this,type,args,obj);if(this.mask||this.cfg.getProperty("modal")===true){var panelZ=Dom.getStyle(this.element,"zIndex");if(!panelZ||isNaN(panelZ)){panelZ=0}if(panelZ===0){this.cfg.setProperty("zIndex",1)}else{this.stackMask()}}},buildWrapper:function(){var elementParent=this.element.parentNode,originalElement=this.element,wrapper=document.createElement("div");wrapper.className=Panel.CSS_PANEL_CONTAINER;wrapper.id=originalElement.id+"_c";if(elementParent){elementParent.insertBefore(wrapper,originalElement)}wrapper.appendChild(originalElement);this.element=wrapper;this.innerElement=originalElement;Dom.setStyle(this.innerElement,"visibility","inherit")},sizeUnderlay:function(){var oUnderlay=this.underlay,oElement;if(oUnderlay){oElement=this.element;oUnderlay.style.width=oElement.offsetWidth+"px";oUnderlay.style.height=oElement.offsetHeight+"px"}},registerDragDrop:function(){var me=this;if(this.header){if(!Util.DD){return}var bDragOnly=(this.cfg.getProperty("dragonly")===true);this.dd=new Util.DD(this.element.id,this.id,{dragOnly:bDragOnly});if(!this.header.id){this.header.id=this.id+"_h"}this.dd.startDrag=function(){var offsetHeight,offsetWidth,viewPortWidth,viewPortHeight,scrollX,scrollY;if(YAHOO.env.ua.ie==6){Dom.addClass(me.element,"drag")}if(me.cfg.getProperty("constraintoviewport")){var nViewportOffset=Overlay.VIEWPORT_OFFSET;offsetHeight=me.element.offsetHeight;offsetWidth=me.element.offsetWidth;viewPortWidth=Dom.getViewportWidth();viewPortHeight=Dom.getViewportHeight();scrollX=Dom.getDocumentScrollLeft();scrollY=Dom.getDocumentScrollTop();if(offsetHeight+nViewportOffset<viewPortHeight){this.minY=scrollY+nViewportOffset;this.maxY=scrollY+viewPortHeight-offsetHeight-nViewportOffset}else{this.minY=scrollY+nViewportOffset;this.maxY=scrollY+nViewportOffset}if(offsetWidth+nViewportOffset<viewPortWidth){this.minX=scrollX+nViewportOffset;this.maxX=scrollX+viewPortWidth-offsetWidth-nViewportOffset}else{this.minX=scrollX+nViewportOffset;this.maxX=scrollX+nViewportOffset}this.constrainX=true;this.constrainY=true}else{this.constrainX=false;this.constrainY=false}me.dragEvent.fire("startDrag",arguments)};this.dd.onDrag=function(){me.syncPosition();me.cfg.refireEvent("iframe");if(this.platform=="mac"&&YAHOO.env.ua.gecko){this.showMacGeckoScrollbars()}me.dragEvent.fire("onDrag",arguments)};this.dd.endDrag=function(){if(YAHOO.env.ua.ie==6){Dom.removeClass(me.element,"drag")}me.dragEvent.fire("endDrag",arguments);me.moveEvent.fire(me.cfg.getProperty("xy"))};this.dd.setHandleElId(this.header.id);this.dd.addInvalidHandleType("INPUT");this.dd.addInvalidHandleType("SELECT");this.dd.addInvalidHandleType("TEXTAREA")}},buildMask:function(){var oMask=this.mask;if(!oMask){if(!m_oMaskTemplate){m_oMaskTemplate=document.createElement("div");m_oMaskTemplate.className="mask";m_oMaskTemplate.innerHTML="&#160;"}oMask=m_oMaskTemplate.cloneNode(true);oMask.id=this.id+"_mask";document.body.insertBefore(oMask,document.body.firstChild);this.mask=oMask;if(YAHOO.env.ua.gecko&&this.platform=="mac"){Dom.addClass(this.mask,"block-scrollbars")}this.stackMask()}},hideMask:function(){if(this.cfg.getProperty("modal")&&this.mask){this.mask.style.display="none";Dom.removeClass(document.body,"masked");this.hideMaskEvent.fire()}},showMask:function(){if(this.cfg.getProperty("modal")&&this.mask){Dom.addClass(document.body,"masked");this.sizeMask();this.mask.style.display="block";this.showMaskEvent.fire()}},sizeMask:function(){if(this.mask){var mask=this.mask,viewWidth=Dom.getViewportWidth(),viewHeight=Dom.getViewportHeight();if(mask.offsetHeight>viewHeight){mask.style.height=viewHeight+"px"}if(mask.offsetWidth>viewWidth){mask.style.width=viewWidth+"px"}mask.style.height=Dom.getDocumentHeight()+"px";mask.style.width=Dom.getDocumentWidth()+"px"}},stackMask:function(){if(this.mask){var panelZ=Dom.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(panelZ)&&!isNaN(panelZ)){Dom.setStyle(this.mask,"zIndex",panelZ-1)}}},render:function(appendToNode){return Panel.superclass.render.call(this,appendToNode,this.innerElement)},destroy:function(){Overlay.windowResizeEvent.unsubscribe(this.sizeMask,this);this.removeMask();if(this.close){Event.purgeElement(this.close)}Panel.superclass.destroy.call(this)},forceUnderlayRedraw:function(){var u=this.underlay;Dom.addClass(u,"yui-force-redraw");setTimeout(function(){Dom.removeClass(u,"yui-force-redraw")},0)},toString:function(){return"Panel "+this.id}})}());(function(){YAHOO.widget.Dialog=function(el,userConfig){YAHOO.widget.Dialog.superclass.constructor.call(this,el,userConfig)};var Event=YAHOO.util.Event,CustomEvent=YAHOO.util.CustomEvent,Dom=YAHOO.util.Dom,Dialog=YAHOO.widget.Dialog,Lang=YAHOO.lang,EVENT_TYPES={"BEFORE_SUBMIT":"beforeSubmit","SUBMIT":"submit","MANUAL_SUBMIT":"manualSubmit","ASYNC_SUBMIT":"asyncSubmit","FORM_SUBMIT":"formSubmit","CANCEL":"cancel"},DEFAULT_CONFIG={"POST_METHOD":{key:"postmethod",value:"async"},"POST_DATA":{key:"postdata",value:null},"BUTTONS":{key:"buttons",value:"none",supercedes:["visible"]},"HIDEAFTERSUBMIT":{key:"hideaftersubmit",value:true}};Dialog.CSS_DIALOG="yui-dialog";function removeButtonEventHandlers(){var aButtons=this._aButtons,nButtons,oButton,i;if(Lang.isArray(aButtons)){nButtons=aButtons.length;if(nButtons>0){i=nButtons-1;do{oButton=aButtons[i];if(YAHOO.widget.Button&&oButton instanceof YAHOO.widget.Button){oButton.destroy()}else if(oButton.tagName.toUpperCase()=="BUTTON"){Event.purgeElement(oButton);Event.purgeElement(oButton,false)}}while(i--)}}}YAHOO.extend(Dialog,YAHOO.widget.Panel,{form:null,initDefaultConfig:function(){Dialog.superclass.initDefaultConfig.call(this);this.callback={success:null,failure:null,argument:null};this.cfg.addProperty(DEFAULT_CONFIG.POST_METHOD.key,{handler:this.configPostMethod,value:DEFAULT_CONFIG.POST_METHOD.value,validator:function(val){if(val!="form"&&val!="async"&&val!="none"&&val!="manual"){return false}else{return true}}});this.cfg.addProperty(DEFAULT_CONFIG.POST_DATA.key,{value:DEFAULT_CONFIG.POST_DATA.value});this.cfg.addProperty(DEFAULT_CONFIG.HIDEAFTERSUBMIT.key,{value:DEFAULT_CONFIG.HIDEAFTERSUBMIT.value});this.cfg.addProperty(DEFAULT_CONFIG.BUTTONS.key,{handler:this.configButtons,value:DEFAULT_CONFIG.BUTTONS.value,supercedes:DEFAULT_CONFIG.BUTTONS.supercedes})},initEvents:function(){Dialog.superclass.initEvents.call(this);var SIGNATURE=CustomEvent.LIST;this.beforeSubmitEvent=this.createEvent(EVENT_TYPES.BEFORE_SUBMIT);this.beforeSubmitEvent.signature=SIGNATURE;this.submitEvent=this.createEvent(EVENT_TYPES.SUBMIT);this.submitEvent.signature=SIGNATURE;this.manualSubmitEvent=this.createEvent(EVENT_TYPES.MANUAL_SUBMIT);this.manualSubmitEvent.signature=SIGNATURE;this.asyncSubmitEvent=this.createEvent(EVENT_TYPES.ASYNC_SUBMIT);this.asyncSubmitEvent.signature=SIGNATURE;this.formSubmitEvent=this.createEvent(EVENT_TYPES.FORM_SUBMIT);this.formSubmitEvent.signature=SIGNATURE;this.cancelEvent=this.createEvent(EVENT_TYPES.CANCEL);this.cancelEvent.signature=SIGNATURE},init:function(el,userConfig){Dialog.superclass.init.call(this,el);this.beforeInitEvent.fire(Dialog);Dom.addClass(this.element,Dialog.CSS_DIALOG);this.cfg.setProperty("visible",false);if(userConfig){this.cfg.applyConfig(userConfig,true)}this.showEvent.subscribe(this.focusFirst,this,true);this.beforeHideEvent.subscribe(this.blurButtons,this,true);this.subscribe("changeBody",this.registerForm);this.initEvent.fire(Dialog)},doSubmit:function(){var Connect=YAHOO.util.Connect,oForm=this.form,bUseFileUpload=false,bUseSecureFileUpload=false,aElements,nElements,i,formAttrs;switch(this.cfg.getProperty("postmethod")){case"async":aElements=oForm.elements;nElements=aElements.length;if(nElements>0){i=nElements-1;do{if(aElements[i].type=="file"){bUseFileUpload=true;break}}while(i--)}if(bUseFileUpload&&YAHOO.env.ua.ie&&this.isSecure){bUseSecureFileUpload=true}formAttrs=this._getFormAttributes(oForm);Connect.setForm(oForm,bUseFileUpload,bUseSecureFileUpload);var postData=this.cfg.getProperty("postdata");var c=Connect.asyncRequest(formAttrs.method,formAttrs.action,this.callback,postData);this.asyncSubmitEvent.fire(c);break;case"form":oForm.submit();this.formSubmitEvent.fire();break;case"none":case"manual":this.manualSubmitEvent.fire();break}},_getFormAttributes:function(oForm){var attrs={method:null,action:null};if(oForm){if(oForm.getAttributeNode){var action=oForm.getAttributeNode("action");var method=oForm.getAttributeNode("method");if(action){attrs.action=action.value}if(method){attrs.method=method.value}}else{attrs.action=oForm.getAttribute("action");attrs.method=oForm.getAttribute("method")}}attrs.method=(Lang.isString(attrs.method)?attrs.method:"POST").toUpperCase();attrs.action=Lang.isString(attrs.action)?attrs.action:"";return attrs},registerForm:function(){var form=this.element.getElementsByTagName("form")[0];if(this.form){if(this.form==form&&Dom.isAncestor(this.element,this.form)){return}else{Event.purgeElement(this.form);this.form=null}}if(!form){form=document.createElement("form");form.name="frm_"+this.id;this.body.appendChild(form)}if(form){this.form=form;Event.on(form,"submit",this._submitHandler,this,true)}},_submitHandler:function(e){Event.stopEvent(e);this.submit();this.form.blur()},setTabLoop:function(firstElement,lastElement){firstElement=firstElement||this.firstButton;lastElement=this.lastButton||lastElement;Dialog.superclass.setTabLoop.call(this,firstElement,lastElement)},setFirstLastFocusable:function(){Dialog.superclass.setFirstLastFocusable.call(this);var i,l,el,elements=this.focusableElements;this.firstFormElement=null;this.lastFormElement=null;if(this.form&&elements&&elements.length>0){l=elements.length;for(i=0;i<l;++i){el=elements[i];if(this.form===el.form){this.firstFormElement=el;break}}for(i=l-1;i>=0;--i){el=elements[i];if(this.form===el.form){this.lastFormElement=el;break}}}},configClose:function(type,args,obj){Dialog.superclass.configClose.apply(this,arguments)},_doClose:function(e){Event.preventDefault(e);this.cancel()},configButtons:function(type,args,obj){var Button=YAHOO.widget.Button,aButtons=args[0],oInnerElement=this.innerElement,oButton,oButtonEl,oYUIButton,nButtons,oSpan,oFooter,i;removeButtonEventHandlers.call(this);this._aButtons=null;if(Lang.isArray(aButtons)){oSpan=document.createElement("span");oSpan.className="button-group";nButtons=aButtons.length;this._aButtons=[];this.defaultHtmlButton=null;for(i=0;i<nButtons;i++){oButton=aButtons[i];if(Button){oYUIButton=new Button({label:oButton.text});oYUIButton.appendTo(oSpan);oButtonEl=oYUIButton.get("element");if(oButton.isDefault){oYUIButton.addClass("default");this.defaultHtmlButton=oButtonEl}if(Lang.isFunction(oButton.handler)){oYUIButton.set("onclick",{fn:oButton.handler,obj:this,scope:this})}else if(Lang.isObject(oButton.handler)&&Lang.isFunction(oButton.handler.fn)){oYUIButton.set("onclick",{fn:oButton.handler.fn,obj:((!Lang.isUndefined(oButton.handler.obj))?oButton.handler.obj:this),scope:(oButton.handler.scope||this)})}this._aButtons[this._aButtons.length]=oYUIButton}else{oButtonEl=document.createElement("button");oButtonEl.setAttribute("type","button");if(oButton.isDefault){oButtonEl.className="default";this.defaultHtmlButton=oButtonEl}oButtonEl.innerHTML=oButton.text;if(Lang.isFunction(oButton.handler)){Event.on(oButtonEl,"click",oButton.handler,this,true)}else if(Lang.isObject(oButton.handler)&&Lang.isFunction(oButton.handler.fn)){Event.on(oButtonEl,"click",oButton.handler.fn,((!Lang.isUndefined(oButton.handler.obj))?oButton.handler.obj:this),(oButton.handler.scope||this))}oSpan.appendChild(oButtonEl);this._aButtons[this._aButtons.length]=oButtonEl}oButton.htmlButton=oButtonEl;if(i===0){this.firstButton=oButtonEl}if(i==(nButtons-1)){this.lastButton=oButtonEl}}this.setFooter(oSpan);oFooter=this.footer;if(Dom.inDocument(this.element)&&!Dom.isAncestor(oInnerElement,oFooter)){oInnerElement.appendChild(oFooter)}this.buttonSpan=oSpan}else{oSpan=this.buttonSpan;oFooter=this.footer;if(oSpan&&oFooter){oFooter.removeChild(oSpan);this.buttonSpan=null;this.firstButton=null;this.lastButton=null;this.defaultHtmlButton=null}}this.changeContentEvent.fire()},getButtons:function(){return this._aButtons||null},focusFirst:function(type,args,obj){var el=this.firstFormElement;if(args&&args[1]){Event.stopEvent(args[1])}if(el){try{el.focus()}catch(oException){}}else{if(this.defaultHtmlButton){this.focusDefaultButton()}else{this.focusFirstButton()}}},focusLast:function(type,args,obj){var aButtons=this.cfg.getProperty("buttons"),el=this.lastFormElement;if(args&&args[1]){Event.stopEvent(args[1])}if(aButtons&&Lang.isArray(aButtons)){this.focusLastButton()}else{if(el){try{el.focus()}catch(oException){}}}},_getButton:function(button){var Button=YAHOO.widget.Button;if(Button&&button&&button.nodeName&&button.id){button=Button.getButton(button.id)||button}return button},focusDefaultButton:function(){var button=this._getButton(this.defaultHtmlButton);if(button){try{button.focus()}catch(oException){}}},blurButtons:function(){var aButtons=this.cfg.getProperty("buttons"),nButtons,oButton,oElement,i;if(aButtons&&Lang.isArray(aButtons)){nButtons=aButtons.length;if(nButtons>0){i=(nButtons-1);do{oButton=aButtons[i];if(oButton){oElement=this._getButton(oButton.htmlButton);if(oElement){try{oElement.blur()}catch(oException){}}}}while(i--)}}},focusFirstButton:function(){var aButtons=this.cfg.getProperty("buttons"),oButton,oElement;if(aButtons&&Lang.isArray(aButtons)){oButton=aButtons[0];if(oButton){oElement=this._getButton(oButton.htmlButton);if(oElement){try{oElement.focus()}catch(oException){}}}}},focusLastButton:function(){var aButtons=this.cfg.getProperty("buttons"),nButtons,oButton,oElement;if(aButtons&&Lang.isArray(aButtons)){nButtons=aButtons.length;if(nButtons>0){oButton=aButtons[(nButtons-1)];if(oButton){oElement=this._getButton(oButton.htmlButton);if(oElement){try{oElement.focus()}catch(oException){}}}}}},configPostMethod:function(type,args,obj){this.registerForm()},validate:function(){return true},submit:function(){if(this.validate()){this.beforeSubmitEvent.fire();this.doSubmit();this.submitEvent.fire();if(this.cfg.getProperty("hideaftersubmit")){this.hide()}return true}else{return false}},cancel:function(){this.cancelEvent.fire();this.hide()},getData:function(){var oForm=this.form,aElements,nTotalElements,oData,sName,oElement,nElements,sType,sTagName,aOptions,nOptions,aValues,oOption,sValue,oRadio,oCheckbox,i,n;function isFormElement(p_oElement){var sTag=p_oElement.tagName.toUpperCase();return((sTag=="INPUT"||sTag=="TEXTAREA"||sTag=="SELECT")&&p_oElement.name==sName)}if(oForm){aElements=oForm.elements;nTotalElements=aElements.length;oData={};for(i=0;i<nTotalElements;i++){sName=aElements[i].name;oElement=Dom.getElementsBy(isFormElement,"*",oForm);nElements=oElement.length;if(nElements>0){if(nElements==1){oElement=oElement[0];sType=oElement.type;sTagName=oElement.tagName.toUpperCase();switch(sTagName){case"INPUT":if(sType=="checkbox"){oData[sName]=oElement.checked}else if(sType!="radio"){oData[sName]=oElement.value}break;case"TEXTAREA":oData[sName]=oElement.value;break;case"SELECT":aOptions=oElement.options;nOptions=aOptions.length;aValues=[];for(n=0;n<nOptions;n++){oOption=aOptions[n];if(oOption.selected){sValue=oOption.value;if(!sValue||sValue===""){sValue=oOption.text}aValues[aValues.length]=sValue}}oData[sName]=aValues;break}}else{sType=oElement[0].type;switch(sType){case"radio":for(n=0;n<nElements;n++){oRadio=oElement[n];if(oRadio.checked){oData[sName]=oRadio.value;break}}break;case"checkbox":aValues=[];for(n=0;n<nElements;n++){oCheckbox=oElement[n];if(oCheckbox.checked){aValues[aValues.length]=oCheckbox.value}}oData[sName]=aValues;break}}}}}return oData},destroy:function(){removeButtonEventHandlers.call(this);this._aButtons=null;var aForms=this.element.getElementsByTagName("form"),oForm;if(aForms.length>0){oForm=aForms[0];if(oForm){Event.purgeElement(oForm);if(oForm.parentNode){oForm.parentNode.removeChild(oForm)}this.form=null}}Dialog.superclass.destroy.call(this)},toString:function(){return"Dialog "+this.id}})}());(function(){YAHOO.widget.SimpleDialog=function(el,userConfig){YAHOO.widget.SimpleDialog.superclass.constructor.call(this,el,userConfig)};var Dom=YAHOO.util.Dom,SimpleDialog=YAHOO.widget.SimpleDialog,DEFAULT_CONFIG={"ICON":{key:"icon",value:"none",suppressEvent:true},"TEXT":{key:"text",value:"",suppressEvent:true,supercedes:["icon"]}};SimpleDialog.ICON_BLOCK="blckicon";SimpleDialog.ICON_ALARM="alrticon";SimpleDialog.ICON_HELP="hlpicon";SimpleDialog.ICON_INFO="infoicon";SimpleDialog.ICON_WARN="warnicon";SimpleDialog.ICON_TIP="tipicon";SimpleDialog.ICON_CSS_CLASSNAME="yui-icon";SimpleDialog.CSS_SIMPLEDIALOG="yui-simple-dialog";YAHOO.extend(SimpleDialog,YAHOO.widget.Dialog,{initDefaultConfig:function(){SimpleDialog.superclass.initDefaultConfig.call(this);this.cfg.addProperty(DEFAULT_CONFIG.ICON.key,{handler:this.configIcon,value:DEFAULT_CONFIG.ICON.value,suppressEvent:DEFAULT_CONFIG.ICON.suppressEvent});this.cfg.addProperty(DEFAULT_CONFIG.TEXT.key,{handler:this.configText,value:DEFAULT_CONFIG.TEXT.value,suppressEvent:DEFAULT_CONFIG.TEXT.suppressEvent,supercedes:DEFAULT_CONFIG.TEXT.supercedes})},init:function(el,userConfig){SimpleDialog.superclass.init.call(this,el);this.beforeInitEvent.fire(SimpleDialog);Dom.addClass(this.element,SimpleDialog.CSS_SIMPLEDIALOG);this.cfg.queueProperty("postmethod","manual");if(userConfig){this.cfg.applyConfig(userConfig,true)}this.beforeRenderEvent.subscribe(function(){if(!this.body){this.setBody("")}},this,true);this.initEvent.fire(SimpleDialog)},registerForm:function(){SimpleDialog.superclass.registerForm.call(this);this.form.innerHTML+="<input type=\"hidden\" name=\""+this.id+"\" value=\"\"/>"},configIcon:function(type,args,obj){var sIcon=args[0],oBody=this.body,sCSSClass=SimpleDialog.ICON_CSS_CLASSNAME,oIcon,oIconParent;if(sIcon&&sIcon!="none"){oIcon=Dom.getElementsByClassName(sCSSClass,"*",oBody);if(oIcon){oIconParent=oIcon.parentNode;if(oIconParent){oIconParent.removeChild(oIcon);oIcon=null}}if(sIcon.indexOf(".")==-1){oIcon=document.createElement("span");oIcon.className=(sCSSClass+" "+sIcon);oIcon.innerHTML="&#160;"}else{oIcon=document.createElement("img");oIcon.src=(this.imageRoot+sIcon);oIcon.className=sCSSClass}if(oIcon){oBody.insertBefore(oIcon,oBody.firstChild)}}},configText:function(type,args,obj){var text=args[0];if(text){this.setBody(text);this.cfg.refireEvent("icon")}},toString:function(){return"SimpleDialog "+this.id}})}());(function(){YAHOO.widget.ContainerEffect=function(overlay,attrIn,attrOut,targetElement,animClass){if(!animClass){animClass=YAHOO.util.Anim}this.overlay=overlay;this.attrIn=attrIn;this.attrOut=attrOut;this.targetElement=targetElement||overlay.element;this.animClass=animClass};var Dom=YAHOO.util.Dom,CustomEvent=YAHOO.util.CustomEvent,ContainerEffect=YAHOO.widget.ContainerEffect;ContainerEffect.FADE=function(overlay,dur){var Easing=YAHOO.util.Easing,fin={attributes:{opacity:{from:0,to:1}},duration:dur,method:Easing.easeIn},fout={attributes:{opacity:{to:0}},duration:dur,method:Easing.easeOut},fade=new ContainerEffect(overlay,fin,fout,overlay.element);fade.handleUnderlayStart=function(){var underlay=this.overlay.underlay;if(underlay&&YAHOO.env.ua.ie){var hasFilters=(underlay.filters&&underlay.filters.length>0);if(hasFilters){Dom.addClass(overlay.element,"yui-effect-fade")}}};fade.handleUnderlayComplete=function(){var underlay=this.overlay.underlay;if(underlay&&YAHOO.env.ua.ie){Dom.removeClass(overlay.element,"yui-effect-fade")}};fade.handleStartAnimateIn=function(type,args,obj){Dom.addClass(obj.overlay.element,"hide-select");if(!obj.overlay.underlay){obj.overlay.cfg.refireEvent("underlay")}obj.handleUnderlayStart();obj.overlay._setDomVisibility(true);Dom.setStyle(obj.overlay.element,"opacity",0)};fade.handleCompleteAnimateIn=function(type,args,obj){Dom.removeClass(obj.overlay.element,"hide-select");if(obj.overlay.element.style.filter){obj.overlay.element.style.filter=null}obj.handleUnderlayComplete();obj.overlay.cfg.refireEvent("iframe");obj.animateInCompleteEvent.fire()};fade.handleStartAnimateOut=function(type,args,obj){Dom.addClass(obj.overlay.element,"hide-select");obj.handleUnderlayStart()};fade.handleCompleteAnimateOut=function(type,args,obj){Dom.removeClass(obj.overlay.element,"hide-select");if(obj.overlay.element.style.filter){obj.overlay.element.style.filter=null}obj.overlay._setDomVisibility(false);Dom.setStyle(obj.overlay.element,"opacity",1);obj.handleUnderlayComplete();obj.overlay.cfg.refireEvent("iframe");obj.animateOutCompleteEvent.fire()};fade.init();return fade};ContainerEffect.SLIDE=function(overlay,dur){var Easing=YAHOO.util.Easing,x=overlay.cfg.getProperty("x")||Dom.getX(overlay.element),y=overlay.cfg.getProperty("y")||Dom.getY(overlay.element),clientWidth=Dom.getClientWidth(),offsetWidth=overlay.element.offsetWidth,sin={attributes:{points:{to:[x,y]}},duration:dur,method:Easing.easeIn},sout={attributes:{points:{to:[(clientWidth+25),y]}},duration:dur,method:Easing.easeOut},slide=new ContainerEffect(overlay,sin,sout,overlay.element,YAHOO.util.Motion);slide.handleStartAnimateIn=function(type,args,obj){obj.overlay.element.style.left=((-25)-offsetWidth)+"px";obj.overlay.element.style.top=y+"px"};slide.handleTweenAnimateIn=function(type,args,obj){var pos=Dom.getXY(obj.overlay.element),currentX=pos[0],currentY=pos[1];if(Dom.getStyle(obj.overlay.element,"visibility")=="hidden"&&currentX<x){obj.overlay._setDomVisibility(true)}obj.overlay.cfg.setProperty("xy",[currentX,currentY],true);obj.overlay.cfg.refireEvent("iframe")};slide.handleCompleteAnimateIn=function(type,args,obj){obj.overlay.cfg.setProperty("xy",[x,y],true);obj.startX=x;obj.startY=y;obj.overlay.cfg.refireEvent("iframe");obj.animateInCompleteEvent.fire()};slide.handleStartAnimateOut=function(type,args,obj){var vw=Dom.getViewportWidth(),pos=Dom.getXY(obj.overlay.element),yso=pos[1];obj.animOut.attributes.points.to=[(vw+25),yso]};slide.handleTweenAnimateOut=function(type,args,obj){var pos=Dom.getXY(obj.overlay.element),xto=pos[0],yto=pos[1];obj.overlay.cfg.setProperty("xy",[xto,yto],true);obj.overlay.cfg.refireEvent("iframe")};slide.handleCompleteAnimateOut=function(type,args,obj){obj.overlay._setDomVisibility(false);obj.overlay.cfg.setProperty("xy",[x,y]);obj.animateOutCompleteEvent.fire()};slide.init();return slide};ContainerEffect.prototype={init:function(){this.beforeAnimateInEvent=this.createEvent("beforeAnimateIn");this.beforeAnimateInEvent.signature=CustomEvent.LIST;this.beforeAnimateOutEvent=this.createEvent("beforeAnimateOut");this.beforeAnimateOutEvent.signature=CustomEvent.LIST;this.animateInCompleteEvent=this.createEvent("animateInComplete");this.animateInCompleteEvent.signature=CustomEvent.LIST;this.animateOutCompleteEvent=this.createEvent("animateOutComplete");this.animateOutCompleteEvent.signature=CustomEvent.LIST;this.animIn=new this.animClass(this.targetElement,this.attrIn.attributes,this.attrIn.duration,this.attrIn.method);this.animIn.onStart.subscribe(this.handleStartAnimateIn,this);this.animIn.onTween.subscribe(this.handleTweenAnimateIn,this);this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn,this);this.animOut=new this.animClass(this.targetElement,this.attrOut.attributes,this.attrOut.duration,this.attrOut.method);this.animOut.onStart.subscribe(this.handleStartAnimateOut,this);this.animOut.onTween.subscribe(this.handleTweenAnimateOut,this);this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut,this)},animateIn:function(){this.beforeAnimateInEvent.fire();this.animIn.animate()},animateOut:function(){this.beforeAnimateOutEvent.fire();this.animOut.animate()},handleStartAnimateIn:function(type,args,obj){},handleTweenAnimateIn:function(type,args,obj){},handleCompleteAnimateIn:function(type,args,obj){},handleStartAnimateOut:function(type,args,obj){},handleTweenAnimateOut:function(type,args,obj){},handleCompleteAnimateOut:function(type,args,obj){},toString:function(){var output="ContainerEffect";if(this.overlay){output+=" ["+this.overlay.toString()+"]"}return output}};YAHOO.lang.augmentProto(ContainerEffect,YAHOO.util.EventProvider)})();YAHOO.register("container",YAHOO.widget.Module,{version:"2.7.0",build:"1799"});
312   -/*
  298 +}else{E.Dom.setXY(H,E.Dom.getXY(H));}G=this.getAttribute("points");if(D(J["points"]["to"])){I=B.call(this,J["points"]["to"],G);var N=E.Dom.getXY(this.getEl());for(M=0,O=L.length;M<O;++M){L[M]=B.call(this,L[M],G);}}else{if(D(J["points"]["by"])){I=[G[0]+J["points"]["by"][0],G[1]+J["points"]["by"][1]];for(M=0,O=L.length;M<O;++M){L[M]=[G[0]+L[M][0],G[1]+L[M][1]];}}}this.runtimeAttributes[P]=[G];if(L.length>0){this.runtimeAttributes[P]=this.runtimeAttributes[P].concat(L);}this.runtimeAttributes[P][this.runtimeAttributes[P].length]=I;}else{F.setRuntimeAttribute.call(this,P);}};var B=function(G,I){var H=E.Dom.getXY(this.getEl());G=[G[0]-H[0]+I[0],G[1]-H[1]+I[1]];return G;};var D=function(G){return(typeof G!=="undefined");};E.Motion=A;})();(function(){var D=function(F,E,G,H){if(F){D.superclass.constructor.call(this,F,E,G,H);}};D.NAME="Scroll";var B=YAHOO.util;YAHOO.extend(D,B.ColorAnim);var C=D.superclass;var A=D.prototype;A.doMethod=function(E,H,F){var G=null;if(E=="scroll"){G=[this.method(this.currentFrame,H[0],F[0]-H[0],this.totalFrames),this.method(this.currentFrame,H[1],F[1]-H[1],this.totalFrames)];}else{G=C.doMethod.call(this,E,H,F);}return G;};A.getAttribute=function(E){var G=null;var F=this.getEl();if(E=="scroll"){G=[F.scrollLeft,F.scrollTop];}else{G=C.getAttribute.call(this,E);}return G;};A.setAttribute=function(E,H,G){var F=this.getEl();if(E=="scroll"){F.scrollLeft=H[0];F.scrollTop=H[1];}else{C.setAttribute.call(this,E,H,G);}};B.Scroll=D;})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.7.0",build:"1799"});(function(){YAHOO.util.Config=function(owner){if(owner){this.init(owner)}};var Lang=YAHOO.lang,CustomEvent=YAHOO.util.CustomEvent,Config=YAHOO.util.Config;Config.CONFIG_CHANGED_EVENT="configChanged";Config.BOOLEAN_TYPE="boolean";Config.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(owner){this.owner=owner;this.configChangedEvent=this.createEvent(Config.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=CustomEvent.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[]},checkBoolean:function(val){return(typeof val==Config.BOOLEAN_TYPE)},checkNumber:function(val){return(!isNaN(val))},fireEvent:function(key,value){var property=this.config[key];if(property&&property.event){property.event.fire(value)}},addProperty:function(key,propertyObject){key=key.toLowerCase();this.config[key]=propertyObject;propertyObject.event=this.createEvent(key,{scope:this.owner});propertyObject.event.signature=CustomEvent.LIST;propertyObject.key=key;if(propertyObject.handler){propertyObject.event.subscribe(propertyObject.handler,this.owner)}this.setProperty(key,propertyObject.value,true);if(!propertyObject.suppressEvent){this.queueProperty(key,propertyObject.value)}},getConfig:function(){var cfg={},currCfg=this.config,prop,property;for(prop in currCfg){if(Lang.hasOwnProperty(currCfg,prop)){property=currCfg[prop];if(property&&property.event){cfg[prop]=property.value}}}return cfg},getProperty:function(key){var property=this.config[key.toLowerCase()];if(property&&property.event){return property.value}else{return undefined}},resetProperty:function(key){key=key.toLowerCase();var property=this.config[key];if(property&&property.event){if(this.initialConfig[key]&&!Lang.isUndefined(this.initialConfig[key])){this.setProperty(key,this.initialConfig[key]);return true}}else{return false}},setProperty:function(key,value,silent){var property;key=key.toLowerCase();if(this.queueInProgress&&!silent){this.queueProperty(key,value);return true}else{property=this.config[key];if(property&&property.event){if(property.validator&&!property.validator(value)){return false}else{property.value=value;if(!silent){this.fireEvent(key,value);this.configChangedEvent.fire([key,value])}return true}}else{return false}}},queueProperty:function(key,value){key=key.toLowerCase();var property=this.config[key],foundDuplicate=false,iLen,queueItem,queueItemKey,queueItemValue,sLen,supercedesCheck,qLen,queueItemCheck,queueItemCheckKey,queueItemCheckValue,i,s,q;if(property&&property.event){if(!Lang.isUndefined(value)&&property.validator&&!property.validator(value)){return false}else{if(!Lang.isUndefined(value)){property.value=value}else{value=property.value}foundDuplicate=false;iLen=this.eventQueue.length;for(i=0;i<iLen;i++){queueItem=this.eventQueue[i];if(queueItem){queueItemKey=queueItem[0];queueItemValue=queueItem[1];if(queueItemKey==key){this.eventQueue[i]=null;this.eventQueue.push([key,(!Lang.isUndefined(value)?value:queueItemValue)]);foundDuplicate=true;break}}}if(!foundDuplicate&&!Lang.isUndefined(value)){this.eventQueue.push([key,value])}}if(property.supercedes){sLen=property.supercedes.length;for(s=0;s<sLen;s++){supercedesCheck=property.supercedes[s];qLen=this.eventQueue.length;for(q=0;q<qLen;q++){queueItemCheck=this.eventQueue[q];if(queueItemCheck){queueItemCheckKey=queueItemCheck[0];queueItemCheckValue=queueItemCheck[1];if(queueItemCheckKey==supercedesCheck.toLowerCase()){this.eventQueue.push([queueItemCheckKey,queueItemCheckValue]);this.eventQueue[q]=null;break}}}}}return true}else{return false}},refireEvent:function(key){key=key.toLowerCase();var property=this.config[key];if(property&&property.event&&!Lang.isUndefined(property.value)){if(this.queueInProgress){this.queueProperty(key)}else{this.fireEvent(key,property.value)}}},applyConfig:function(userConfig,init){var sKey,oConfig;if(init){oConfig={};for(sKey in userConfig){if(Lang.hasOwnProperty(userConfig,sKey)){oConfig[sKey.toLowerCase()]=userConfig[sKey]}}this.initialConfig=oConfig}for(sKey in userConfig){if(Lang.hasOwnProperty(userConfig,sKey)){this.queueProperty(sKey,userConfig[sKey])}}},refresh:function(){var prop;for(prop in this.config){if(Lang.hasOwnProperty(this.config,prop)){this.refireEvent(prop)}}},fireQueue:function(){var i,queueItem,key,value,property;this.queueInProgress=true;for(i=0;i<this.eventQueue.length;i++){queueItem=this.eventQueue[i];if(queueItem){key=queueItem[0];value=queueItem[1];property=this.config[key];property.value=value;this.eventQueue[i]=null;this.fireEvent(key,value)}}this.queueInProgress=false;this.eventQueue=[]},subscribeToConfigEvent:function(key,handler,obj,override){var property=this.config[key.toLowerCase()];if(property&&property.event){if(!Config.alreadySubscribed(property.event,handler,obj)){property.event.subscribe(handler,obj,override)}return true}else{return false}},unsubscribeFromConfigEvent:function(key,handler,obj){var property=this.config[key.toLowerCase()];if(property&&property.event){return property.event.unsubscribe(handler,obj)}else{return false}},toString:function(){var output="Config";if(this.owner){output+=" ["+this.owner.toString()+"]"}return output},outputEventQueue:function(){var output="",queueItem,q,nQueue=this.eventQueue.length;for(q=0;q<nQueue;q++){queueItem=this.eventQueue[q];if(queueItem){output+=queueItem[0]+"="+queueItem[1]+", "}}return output},destroy:function(){var oConfig=this.config,sProperty,oProperty;for(sProperty in oConfig){if(Lang.hasOwnProperty(oConfig,sProperty)){oProperty=oConfig[sProperty];oProperty.event.unsubscribeAll();oProperty.event=null}}this.configChangedEvent.unsubscribeAll();this.configChangedEvent=null;this.owner=null;this.config=null;this.initialConfig=null;this.eventQueue=null}};Config.alreadySubscribed=function(evt,fn,obj){var nSubscribers=evt.subscribers.length,subsc,i;if(nSubscribers>0){i=nSubscribers-1;do{subsc=evt.subscribers[i];if(subsc&&subsc.obj==obj&&subsc.fn==fn){return true}}while(i--)}return false};YAHOO.lang.augmentProto(Config,YAHOO.util.EventProvider)}());(function(){YAHOO.widget.Module=function(el,userConfig){if(el){this.init(el,userConfig)}else{}};var Dom=YAHOO.util.Dom,Config=YAHOO.util.Config,Event=YAHOO.util.Event,CustomEvent=YAHOO.util.CustomEvent,Module=YAHOO.widget.Module,UA=YAHOO.env.ua,m_oModuleTemplate,m_oHeaderTemplate,m_oBodyTemplate,m_oFooterTemplate,EVENT_TYPES={"BEFORE_INIT":"beforeInit","INIT":"init","APPEND":"append","BEFORE_RENDER":"beforeRender","RENDER":"render","CHANGE_HEADER":"changeHeader","CHANGE_BODY":"changeBody","CHANGE_FOOTER":"changeFooter","CHANGE_CONTENT":"changeContent","DESTORY":"destroy","BEFORE_SHOW":"beforeShow","SHOW":"show","BEFORE_HIDE":"beforeHide","HIDE":"hide"},DEFAULT_CONFIG={"VISIBLE":{key:"visible",value:true,validator:YAHOO.lang.isBoolean},"EFFECT":{key:"effect",suppressEvent:true,supercedes:["visible"]},"MONITOR_RESIZE":{key:"monitorresize",value:true},"APPEND_TO_DOCUMENT_BODY":{key:"appendtodocumentbody",value:false}};Module.IMG_ROOT=null;Module.IMG_ROOT_SSL=null;Module.CSS_MODULE="yui-module";Module.CSS_HEADER="hd";Module.CSS_BODY="bd";Module.CSS_FOOTER="ft";Module.RESIZE_MONITOR_SECURE_URL="javascript:false;";Module.RESIZE_MONITOR_BUFFER=1;Module.textResizeEvent=new CustomEvent("textResize");Module.forceDocumentRedraw=function(){var docEl=document.documentElement;if(docEl){docEl.className+=" ";docEl.className=YAHOO.lang.trim(docEl.className)}};function createModuleTemplate(){if(!m_oModuleTemplate){m_oModuleTemplate=document.createElement("div");m_oModuleTemplate.innerHTML=("<div class=\""+Module.CSS_HEADER+"\"></div>"+"<div class=\""+Module.CSS_BODY+"\"></div><div class=\""+Module.CSS_FOOTER+"\"></div>");m_oHeaderTemplate=m_oModuleTemplate.firstChild;m_oBodyTemplate=m_oHeaderTemplate.nextSibling;m_oFooterTemplate=m_oBodyTemplate.nextSibling}return m_oModuleTemplate}function createHeader(){if(!m_oHeaderTemplate){createModuleTemplate()}return(m_oHeaderTemplate.cloneNode(false))}function createBody(){if(!m_oBodyTemplate){createModuleTemplate()}return(m_oBodyTemplate.cloneNode(false))}function createFooter(){if(!m_oFooterTemplate){createModuleTemplate()}return(m_oFooterTemplate.cloneNode(false))}Module.prototype={constructor:Module,element:null,header:null,body:null,footer:null,id:null,imageRoot:Module.IMG_ROOT,initEvents:function(){var SIGNATURE=CustomEvent.LIST;this.beforeInitEvent=this.createEvent(EVENT_TYPES.BEFORE_INIT);this.beforeInitEvent.signature=SIGNATURE;this.initEvent=this.createEvent(EVENT_TYPES.INIT);this.initEvent.signature=SIGNATURE;this.appendEvent=this.createEvent(EVENT_TYPES.APPEND);this.appendEvent.signature=SIGNATURE;this.beforeRenderEvent=this.createEvent(EVENT_TYPES.BEFORE_RENDER);this.beforeRenderEvent.signature=SIGNATURE;this.renderEvent=this.createEvent(EVENT_TYPES.RENDER);this.renderEvent.signature=SIGNATURE;this.changeHeaderEvent=this.createEvent(EVENT_TYPES.CHANGE_HEADER);this.changeHeaderEvent.signature=SIGNATURE;this.changeBodyEvent=this.createEvent(EVENT_TYPES.CHANGE_BODY);this.changeBodyEvent.signature=SIGNATURE;this.changeFooterEvent=this.createEvent(EVENT_TYPES.CHANGE_FOOTER);this.changeFooterEvent.signature=SIGNATURE;this.changeContentEvent=this.createEvent(EVENT_TYPES.CHANGE_CONTENT);this.changeContentEvent.signature=SIGNATURE;this.destroyEvent=this.createEvent(EVENT_TYPES.DESTORY);this.destroyEvent.signature=SIGNATURE;this.beforeShowEvent=this.createEvent(EVENT_TYPES.BEFORE_SHOW);this.beforeShowEvent.signature=SIGNATURE;this.showEvent=this.createEvent(EVENT_TYPES.SHOW);this.showEvent.signature=SIGNATURE;this.beforeHideEvent=this.createEvent(EVENT_TYPES.BEFORE_HIDE);this.beforeHideEvent.signature=SIGNATURE;this.hideEvent=this.createEvent(EVENT_TYPES.HIDE);this.hideEvent.signature=SIGNATURE},platform:function(){var ua=navigator.userAgent.toLowerCase();if(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1){return"windows"}else if(ua.indexOf("macintosh")!=-1){return"mac"}else{return false}}(),browser:function(){var ua=navigator.userAgent.toLowerCase();if(ua.indexOf('opera')!=-1){return'opera'}else if(ua.indexOf('msie 7')!=-1){return'ie7'}else if(ua.indexOf('msie')!=-1){return'ie'}else if(ua.indexOf('safari')!=-1){return'safari'}else if(ua.indexOf('gecko')!=-1){return'gecko'}else{return false}}(),isSecure:function(){if(window.location.href.toLowerCase().indexOf("https")===0){return true}else{return false}}(),initDefaultConfig:function(){this.cfg.addProperty(DEFAULT_CONFIG.VISIBLE.key,{handler:this.configVisible,value:DEFAULT_CONFIG.VISIBLE.value,validator:DEFAULT_CONFIG.VISIBLE.validator});this.cfg.addProperty(DEFAULT_CONFIG.EFFECT.key,{suppressEvent:DEFAULT_CONFIG.EFFECT.suppressEvent,supercedes:DEFAULT_CONFIG.EFFECT.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.MONITOR_RESIZE.key,{handler:this.configMonitorResize,value:DEFAULT_CONFIG.MONITOR_RESIZE.value});this.cfg.addProperty(DEFAULT_CONFIG.APPEND_TO_DOCUMENT_BODY.key,{value:DEFAULT_CONFIG.APPEND_TO_DOCUMENT_BODY.value})},init:function(el,userConfig){var elId,child;this.initEvents();this.beforeInitEvent.fire(Module);this.cfg=new Config(this);if(this.isSecure){this.imageRoot=Module.IMG_ROOT_SSL}if(typeof el=="string"){elId=el;el=document.getElementById(el);if(!el){el=(createModuleTemplate()).cloneNode(false);el.id=elId}}this.id=Dom.generateId(el);this.element=el;child=this.element.firstChild;if(child){var fndHd=false,fndBd=false,fndFt=false;do{if(1==child.nodeType){if(!fndHd&&Dom.hasClass(child,Module.CSS_HEADER)){this.header=child;fndHd=true}else if(!fndBd&&Dom.hasClass(child,Module.CSS_BODY)){this.body=child;fndBd=true}else if(!fndFt&&Dom.hasClass(child,Module.CSS_FOOTER)){this.footer=child;fndFt=true}}}while((child=child.nextSibling))}this.initDefaultConfig();Dom.addClass(this.element,Module.CSS_MODULE);if(userConfig){this.cfg.applyConfig(userConfig,true)}if(!Config.alreadySubscribed(this.renderEvent,this.cfg.fireQueue,this.cfg)){this.renderEvent.subscribe(this.cfg.fireQueue,this.cfg,true)}this.initEvent.fire(Module)},initResizeMonitor:function(){var isGeckoWin=(UA.gecko&&this.platform=="windows");if(isGeckoWin){var self=this;setTimeout(function(){self._initResizeMonitor()},0)}else{this._initResizeMonitor()}},_initResizeMonitor:function(){return;var oDoc,oIFrame,sHTML;function fireTextResize(){Module.textResizeEvent.fire()}if(!UA.opera){oIFrame=Dom.get("_yuiResizeMonitor");var supportsCWResize=this._supportsCWResize();if(!oIFrame){oIFrame=document.createElement("iframe");if(this.isSecure&&Module.RESIZE_MONITOR_SECURE_URL&&UA.ie){oIFrame.src=Module.RESIZE_MONITOR_SECURE_URL}if(!supportsCWResize){sHTML=["<html><head><script ","type=\"text/javascript\">","window.onresize=function(){window.parent.","YAHOO.widget.Module.textResizeEvent.","fire();};<","\/script></head>","<body></body></html>"].join('');oIFrame.src="data:text/html;charset=utf-8,"+encodeURIComponent(sHTML)}oIFrame.id="_yuiResizeMonitor";oIFrame.title="Text Resize Monitor";oIFrame.style.position="absolute";oIFrame.style.visibility="hidden";var db=document.body,fc=db.firstChild;if(fc){db.insertBefore(oIFrame,fc)}else{db.appendChild(oIFrame)}oIFrame.style.width="2em";oIFrame.style.height="2em";oIFrame.style.top=(-1*(oIFrame.offsetHeight+Module.RESIZE_MONITOR_BUFFER))+"px";oIFrame.style.left="0";oIFrame.style.borderWidth="0";oIFrame.style.visibility="visible";if(UA.webkit){oDoc=oIFrame.contentWindow.document;oDoc.open();oDoc.close()}}if(oIFrame&&oIFrame.contentWindow){Module.textResizeEvent.subscribe(this.onDomResize,this,true);if(!Module.textResizeInitialized){if(supportsCWResize){if(!Event.on(oIFrame.contentWindow,"resize",fireTextResize)){Event.on(oIFrame,"resize",fireTextResize)}}Module.textResizeInitialized=true}this.resizeMonitor=oIFrame}}},_supportsCWResize:function(){var bSupported=true;if(UA.gecko&&UA.gecko<=1.8){bSupported=false}return bSupported},onDomResize:function(e,obj){var nTop=-1*(this.resizeMonitor.offsetHeight+Module.RESIZE_MONITOR_BUFFER);this.resizeMonitor.style.top=nTop+"px";this.resizeMonitor.style.left="0"},setHeader:function(headerContent){var oHeader=this.header||(this.header=createHeader());if(headerContent.nodeName){oHeader.innerHTML="";oHeader.appendChild(headerContent)}else{oHeader.innerHTML=headerContent}this.changeHeaderEvent.fire(headerContent);this.changeContentEvent.fire()},appendToHeader:function(element){var oHeader=this.header||(this.header=createHeader());oHeader.appendChild(element);this.changeHeaderEvent.fire(element);this.changeContentEvent.fire()},setBody:function(bodyContent){var oBody=this.body||(this.body=createBody());if(bodyContent.nodeName){oBody.innerHTML="";oBody.appendChild(bodyContent)}else{oBody.innerHTML=bodyContent}this.changeBodyEvent.fire(bodyContent);this.changeContentEvent.fire()},appendToBody:function(element){var oBody=this.body||(this.body=createBody());oBody.appendChild(element);this.changeBodyEvent.fire(element);this.changeContentEvent.fire()},setFooter:function(footerContent){var oFooter=this.footer||(this.footer=createFooter());if(footerContent.nodeName){oFooter.innerHTML="";oFooter.appendChild(footerContent)}else{oFooter.innerHTML=footerContent}this.changeFooterEvent.fire(footerContent);this.changeContentEvent.fire()},appendToFooter:function(element){var oFooter=this.footer||(this.footer=createFooter());oFooter.appendChild(element);this.changeFooterEvent.fire(element);this.changeContentEvent.fire()},render:function(appendToNode,moduleElement){var me=this,firstChild;function appendTo(parentNode){if(typeof parentNode=="string"){parentNode=document.getElementById(parentNode)}if(parentNode){me._addToParent(parentNode,me.element);me.appendEvent.fire()}}this.beforeRenderEvent.fire();if(!moduleElement){moduleElement=this.element}if(appendToNode){appendTo(appendToNode)}else{if(!Dom.inDocument(this.element)){return false}}if(this.header&&!Dom.inDocument(this.header)){firstChild=moduleElement.firstChild;if(firstChild){moduleElement.insertBefore(this.header,firstChild)}else{moduleElement.appendChild(this.header)}}if(this.body&&!Dom.inDocument(this.body)){if(this.footer&&Dom.isAncestor(this.moduleElement,this.footer)){moduleElement.insertBefore(this.body,this.footer)}else{moduleElement.appendChild(this.body)}}if(this.footer&&!Dom.inDocument(this.footer)){moduleElement.appendChild(this.footer)}this.renderEvent.fire();return true},destroy:function(){var parent;if(this.element){Event.purgeElement(this.element,true);parent=this.element.parentNode}if(parent){parent.removeChild(this.element)}this.element=null;this.header=null;this.body=null;this.footer=null;Module.textResizeEvent.unsubscribe(this.onDomResize,this);if(this.cfg){this.cfg.destroy();this.cfg=null}this.destroyEvent.fire()},show:function(){this.cfg.setProperty("visible",true)},hide:function(){if(this.cfg)this.cfg.setProperty("visible",false)},configVisible:function(type,args,obj){var visible=args[0];if(visible){this.beforeShowEvent.fire();Dom.setStyle(this.element,"display","block");this.showEvent.fire()}else{this.beforeHideEvent.fire();Dom.setStyle(this.element,"display","none");this.hideEvent.fire()}},configMonitorResize:function(type,args,obj){var monitor=args[0];if(monitor){this.initResizeMonitor()}else{Module.textResizeEvent.unsubscribe(this.onDomResize,this,true);this.resizeMonitor=null}},_addToParent:function(parentNode,element){if(!this.cfg.getProperty("appendtodocumentbody")&&parentNode===document.body&&parentNode.firstChild){parentNode.insertBefore(element,parentNode.firstChild)}else{parentNode.appendChild(element)}},toString:function(){return"Module "+this.id}};YAHOO.lang.augmentProto(Module,YAHOO.util.EventProvider)}());(function(){YAHOO.widget.Overlay=function(el,userConfig){YAHOO.widget.Overlay.superclass.constructor.call(this,el,userConfig)};var Lang=YAHOO.lang,CustomEvent=YAHOO.util.CustomEvent,Module=YAHOO.widget.Module,Event=YAHOO.util.Event,Dom=YAHOO.util.Dom,Config=YAHOO.util.Config,UA=YAHOO.env.ua,Overlay=YAHOO.widget.Overlay,_SUBSCRIBE="subscribe",_UNSUBSCRIBE="unsubscribe",_CONTAINED="contained",m_oIFrameTemplate,EVENT_TYPES={"BEFORE_MOVE":"beforeMove","MOVE":"move"},DEFAULT_CONFIG={"X":{key:"x",validator:Lang.isNumber,suppressEvent:true,supercedes:["iframe"]},"Y":{key:"y",validator:Lang.isNumber,suppressEvent:true,supercedes:["iframe"]},"XY":{key:"xy",suppressEvent:true,supercedes:["iframe"]},"CONTEXT":{key:"context",suppressEvent:true,supercedes:["iframe"]},"FIXED_CENTER":{key:"fixedcenter",value:false,supercedes:["iframe","visible"]},"WIDTH":{key:"width",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"HEIGHT":{key:"height",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"AUTO_FILL_HEIGHT":{key:"autofillheight",supercedes:["height"],value:"body"},"ZINDEX":{key:"zindex",value:null},"CONSTRAIN_TO_VIEWPORT":{key:"constraintoviewport",value:false,validator:Lang.isBoolean,supercedes:["iframe","x","y","xy"]},"IFRAME":{key:"iframe",value:(UA.ie==6?true:false),validator:Lang.isBoolean,supercedes:["zindex"]},"PREVENT_CONTEXT_OVERLAP":{key:"preventcontextoverlap",value:false,validator:Lang.isBoolean,supercedes:["constraintoviewport"]}};Overlay.IFRAME_SRC="javascript:false;";Overlay.IFRAME_OFFSET=3;Overlay.VIEWPORT_OFFSET=10;Overlay.TOP_LEFT="tl";Overlay.TOP_RIGHT="tr";Overlay.BOTTOM_LEFT="bl";Overlay.BOTTOM_RIGHT="br";Overlay.CSS_OVERLAY="yui-overlay";Overlay.STD_MOD_RE=/^\s*?(body|footer|header)\s*?$/i;Overlay.windowScrollEvent=new CustomEvent("windowScroll");Overlay.windowResizeEvent=new CustomEvent("windowResize");Overlay.windowScrollHandler=function(e){var t=Event.getTarget(e);if(!t||t===window||t===window.document){if(UA.ie){if(!window.scrollEnd){window.scrollEnd=-1}clearTimeout(window.scrollEnd);window.scrollEnd=setTimeout(function(){Overlay.windowScrollEvent.fire()},1)}else{Overlay.windowScrollEvent.fire()}}};Overlay.windowResizeHandler=function(e){if(UA.ie){if(!window.resizeEnd){window.resizeEnd=-1}clearTimeout(window.resizeEnd);window.resizeEnd=setTimeout(function(){Overlay.windowResizeEvent.fire()},100)}else{Overlay.windowResizeEvent.fire()}};Overlay._initialized=null;if(Overlay._initialized===null){Event.on(window,"scroll",Overlay.windowScrollHandler);Event.on(window,"resize",Overlay.windowResizeHandler);Overlay._initialized=true}Overlay._TRIGGER_MAP={"windowScroll":Overlay.windowScrollEvent,"windowResize":Overlay.windowResizeEvent,"textResize":Module.textResizeEvent};YAHOO.extend(Overlay,Module,{CONTEXT_TRIGGERS:[],init:function(el,userConfig){Overlay.superclass.init.call(this,el);this.beforeInitEvent.fire(Overlay);Dom.addClass(this.element,Overlay.CSS_OVERLAY);if(userConfig){this.cfg.applyConfig(userConfig,true)}if(this.platform=="mac"&&UA.gecko){if(!Config.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this)){this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true)}if(!Config.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this)){this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true)}}this.initEvent.fire(Overlay)},initEvents:function(){Overlay.superclass.initEvents.call(this);var SIGNATURE=CustomEvent.LIST;this.beforeMoveEvent=this.createEvent(EVENT_TYPES.BEFORE_MOVE);this.beforeMoveEvent.signature=SIGNATURE;this.moveEvent=this.createEvent(EVENT_TYPES.MOVE);this.moveEvent.signature=SIGNATURE},initDefaultConfig:function(){Overlay.superclass.initDefaultConfig.call(this);var cfg=this.cfg;cfg.addProperty(DEFAULT_CONFIG.X.key,{handler:this.configX,validator:DEFAULT_CONFIG.X.validator,suppressEvent:DEFAULT_CONFIG.X.suppressEvent,supercedes:DEFAULT_CONFIG.X.supercedes});cfg.addProperty(DEFAULT_CONFIG.Y.key,{handler:this.configY,validator:DEFAULT_CONFIG.Y.validator,suppressEvent:DEFAULT_CONFIG.Y.suppressEvent,supercedes:DEFAULT_CONFIG.Y.supercedes});cfg.addProperty(DEFAULT_CONFIG.XY.key,{handler:this.configXY,suppressEvent:DEFAULT_CONFIG.XY.suppressEvent,supercedes:DEFAULT_CONFIG.XY.supercedes});cfg.addProperty(DEFAULT_CONFIG.CONTEXT.key,{handler:this.configContext,suppressEvent:DEFAULT_CONFIG.CONTEXT.suppressEvent,supercedes:DEFAULT_CONFIG.CONTEXT.supercedes});cfg.addProperty(DEFAULT_CONFIG.FIXED_CENTER.key,{handler:this.configFixedCenter,value:DEFAULT_CONFIG.FIXED_CENTER.value,validator:DEFAULT_CONFIG.FIXED_CENTER.validator,supercedes:DEFAULT_CONFIG.FIXED_CENTER.supercedes});cfg.addProperty(DEFAULT_CONFIG.WIDTH.key,{handler:this.configWidth,suppressEvent:DEFAULT_CONFIG.WIDTH.suppressEvent,supercedes:DEFAULT_CONFIG.WIDTH.supercedes});cfg.addProperty(DEFAULT_CONFIG.HEIGHT.key,{handler:this.configHeight,suppressEvent:DEFAULT_CONFIG.HEIGHT.suppressEvent,supercedes:DEFAULT_CONFIG.HEIGHT.supercedes});cfg.addProperty(DEFAULT_CONFIG.AUTO_FILL_HEIGHT.key,{handler:this.configAutoFillHeight,value:DEFAULT_CONFIG.AUTO_FILL_HEIGHT.value,validator:this._validateAutoFill,supercedes:DEFAULT_CONFIG.AUTO_FILL_HEIGHT.supercedes});cfg.addProperty(DEFAULT_CONFIG.ZINDEX.key,{handler:this.configzIndex,value:DEFAULT_CONFIG.ZINDEX.value});cfg.addProperty(DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.key,{handler:this.configConstrainToViewport,value:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.value,validator:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.validator,supercedes:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.supercedes});cfg.addProperty(DEFAULT_CONFIG.IFRAME.key,{handler:this.configIframe,value:DEFAULT_CONFIG.IFRAME.value,validator:DEFAULT_CONFIG.IFRAME.validator,supercedes:DEFAULT_CONFIG.IFRAME.supercedes});cfg.addProperty(DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.key,{value:DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.value,validator:DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.validator,supercedes:DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.supercedes})},moveTo:function(x,y){this.cfg.setProperty("xy",[x,y])},hideMacGeckoScrollbars:function(){Dom.replaceClass(this.element,"show-scrollbars","hide-scrollbars")},showMacGeckoScrollbars:function(){Dom.replaceClass(this.element,"hide-scrollbars","show-scrollbars")},_setDomVisibility:function(show){Dom.setStyle(this.element,"visibility",(show)?"visible":"hidden");if(show){Dom.removeClass(this.element,"yui-overlay-hidden")}else{Dom.addClass(this.element,"yui-overlay-hidden")}},configVisible:function(type,args,obj){var visible=args[0],currentVis=Dom.getStyle(this.element,"visibility"),effect=this.cfg.getProperty("effect"),effectInstances=[],isMacGecko=(this.platform=="mac"&&UA.gecko),alreadySubscribed=Config.alreadySubscribed,eff,ei,e,i,j,k,h,nEffects,nEffectInstances;if(currentVis=="inherit"){e=this.element.parentNode;while(e.nodeType!=9&&e.nodeType!=11){currentVis=Dom.getStyle(e,"visibility");if(currentVis!="inherit"){break}e=e.parentNode}if(currentVis=="inherit"){currentVis="visible"}}if(effect){if(effect instanceof Array){nEffects=effect.length;for(i=0;i<nEffects;i++){eff=effect[i];effectInstances[effectInstances.length]=eff.effect(this,eff.duration)}}else{effectInstances[effectInstances.length]=effect.effect(this,effect.duration)}}if(visible){if(isMacGecko){this.showMacGeckoScrollbars()}if(effect){if(visible){if(currentVis!="visible"||currentVis===""){this.beforeShowEvent.fire();nEffectInstances=effectInstances.length;for(j=0;j<nEffectInstances;j++){ei=effectInstances[j];if(j===0&&!alreadySubscribed(ei.animateInCompleteEvent,this.showEvent.fire,this.showEvent)){ei.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,true)}ei.animateIn()}}}}else{if(currentVis!="visible"||currentVis===""){this.beforeShowEvent.fire();this._setDomVisibility(true);this.cfg.refireEvent("iframe");this.showEvent.fire()}else{this._setDomVisibility(true)}}}else{if(isMacGecko){this.hideMacGeckoScrollbars()}if(effect){if(currentVis=="visible"){this.beforeHideEvent.fire();nEffectInstances=effectInstances.length;for(k=0;k<nEffectInstances;k++){h=effectInstances[k];if(k===0&&!alreadySubscribed(h.animateOutCompleteEvent,this.hideEvent.fire,this.hideEvent)){h.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,true)}h.animateOut()}}else if(currentVis===""){this._setDomVisibility(false)}}else{if(currentVis=="visible"||currentVis===""){this.beforeHideEvent.fire();this._setDomVisibility(false);this.hideEvent.fire()}else{this._setDomVisibility(false)}}}},doCenterOnDOMEvent:function(){var cfg=this.cfg,fc=cfg.getProperty("fixedcenter");if(cfg.getProperty("visible")){if(fc&&(fc!==_CONTAINED||this.fitsInViewport())){this.center()}}},fitsInViewport:function(){var nViewportOffset=Overlay.VIEWPORT_OFFSET,element=this.element,elementWidth=element.offsetWidth,elementHeight=element.offsetHeight,viewportWidth=Dom.getViewportWidth(),viewportHeight=Dom.getViewportHeight();return((elementWidth+nViewportOffset<viewportWidth)&&(elementHeight+nViewportOffset<viewportHeight))},configFixedCenter:function(type,args,obj){var val=args[0],alreadySubscribed=Config.alreadySubscribed,windowResizeEvent=Overlay.windowResizeEvent,windowScrollEvent=Overlay.windowScrollEvent;if(val){this.center();if(!alreadySubscribed(this.beforeShowEvent,this.center)){this.beforeShowEvent.subscribe(this.center)}if(!alreadySubscribed(windowResizeEvent,this.doCenterOnDOMEvent,this)){windowResizeEvent.subscribe(this.doCenterOnDOMEvent,this,true)}if(!alreadySubscribed(windowScrollEvent,this.doCenterOnDOMEvent,this)){windowScrollEvent.subscribe(this.doCenterOnDOMEvent,this,true)}}else{this.beforeShowEvent.unsubscribe(this.center);windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this)}},configHeight:function(type,args,obj){var height=args[0],el=this.element;Dom.setStyle(el,"height",height);this.cfg.refireEvent("iframe")},configAutoFillHeight:function(type,args,obj){var fillEl=args[0],cfg=this.cfg,autoFillHeight="autofillheight",height="height",currEl=cfg.getProperty(autoFillHeight),autoFill=this._autoFillOnHeightChange;cfg.unsubscribeFromConfigEvent(height,autoFill);Module.textResizeEvent.unsubscribe(autoFill);this.changeContentEvent.unsubscribe(autoFill);if(currEl&&fillEl!==currEl&&this[currEl]){Dom.setStyle(this[currEl],height,"")}if(fillEl){fillEl=Lang.trim(fillEl.toLowerCase());cfg.subscribeToConfigEvent(height,autoFill,this[fillEl],this);Module.textResizeEvent.subscribe(autoFill,this[fillEl],this);this.changeContentEvent.subscribe(autoFill,this[fillEl],this);cfg.setProperty(autoFillHeight,fillEl,true)}},configWidth:function(type,args,obj){var width=args[0],el=this.element;Dom.setStyle(el,"width",width);this.cfg.refireEvent("iframe")},configzIndex:function(type,args,obj){var zIndex=args[0],el=this.element;if(!zIndex){zIndex=Dom.getStyle(el,"zIndex");if(!zIndex||isNaN(zIndex)){zIndex=0}}if(this.iframe||this.cfg.getProperty("iframe")===true){if(zIndex<=0){zIndex=1}}Dom.setStyle(el,"zIndex",zIndex);this.cfg.setProperty("zIndex",zIndex,true);if(this.iframe){this.stackIframe()}},configXY:function(type,args,obj){var pos=args[0],x=pos[0],y=pos[1];this.cfg.setProperty("x",x);this.cfg.setProperty("y",y);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y])},configX:function(type,args,obj){var x=args[0],y=this.cfg.getProperty("y");this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");Dom.setX(this.element,x,true);this.cfg.setProperty("xy",[x,y],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y])},configY:function(type,args,obj){var x=this.cfg.getProperty("x"),y=args[0];this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");Dom.setY(this.element,y,true);this.cfg.setProperty("xy",[x,y],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y])},showIframe:function(){var oIFrame=this.iframe,oParentNode;if(oIFrame){oParentNode=this.element.parentNode;if(oParentNode!=oIFrame.parentNode){this._addToParent(oParentNode,oIFrame)}oIFrame.style.display="block"}},hideIframe:function(){if(this.iframe){this.iframe.style.display="none"}},syncIframe:function(){var oIFrame=this.iframe,oElement=this.element,nOffset=Overlay.IFRAME_OFFSET,nDimensionOffset=(nOffset*2),aXY;if(oIFrame){oIFrame.style.width=(oElement.offsetWidth+nDimensionOffset+"px");oIFrame.style.height=(oElement.offsetHeight+nDimensionOffset+"px");aXY=this.cfg.getProperty("xy");if(!Lang.isArray(aXY)||(isNaN(aXY[0])||isNaN(aXY[1]))){this.syncPosition();aXY=this.cfg.getProperty("xy")}Dom.setXY(oIFrame,[(aXY[0]-nOffset),(aXY[1]-nOffset)])}},stackIframe:function(){if(this.iframe){var overlayZ=Dom.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(overlayZ)&&!isNaN(overlayZ)){Dom.setStyle(this.iframe,"zIndex",(overlayZ-1))}}},configIframe:function(type,args,obj){var bIFrame=args[0];function createIFrame(){var oIFrame=this.iframe,oElement=this.element,oParent;if(!oIFrame){if(!m_oIFrameTemplate){m_oIFrameTemplate=document.createElement("iframe");if(this.isSecure){m_oIFrameTemplate.src=Overlay.IFRAME_SRC}if(UA.ie){m_oIFrameTemplate.style.filter="alpha(opacity=0)";m_oIFrameTemplate.frameBorder=0}else{m_oIFrameTemplate.style.opacity="0"}m_oIFrameTemplate.style.position="absolute";m_oIFrameTemplate.style.border="none";m_oIFrameTemplate.style.margin="0";m_oIFrameTemplate.style.padding="0";m_oIFrameTemplate.style.display="none";m_oIFrameTemplate.tabIndex=-1}oIFrame=m_oIFrameTemplate.cloneNode(false);oParent=oElement.parentNode;var parentNode=oParent||document.body;this._addToParent(parentNode,oIFrame);this.iframe=oIFrame}this.showIframe();this.syncIframe();this.stackIframe();if(!this._hasIframeEventListeners){this.showEvent.subscribe(this.showIframe);this.hideEvent.subscribe(this.hideIframe);this.changeContentEvent.subscribe(this.syncIframe);this._hasIframeEventListeners=true}}function onBeforeShow(){createIFrame.call(this);this.beforeShowEvent.unsubscribe(onBeforeShow);this._iframeDeferred=false}if(bIFrame){if(this.cfg.getProperty("visible")){createIFrame.call(this)}else{if(!this._iframeDeferred){this.beforeShowEvent.subscribe(onBeforeShow);this._iframeDeferred=true}}}else{this.hideIframe();if(this._hasIframeEventListeners){this.showEvent.unsubscribe(this.showIframe);this.hideEvent.unsubscribe(this.hideIframe);this.changeContentEvent.unsubscribe(this.syncIframe);this._hasIframeEventListeners=false}}},_primeXYFromDOM:function(){if(YAHOO.lang.isUndefined(this.cfg.getProperty("xy"))){this.syncPosition();this.cfg.refireEvent("xy");this.beforeShowEvent.unsubscribe(this._primeXYFromDOM)}},configConstrainToViewport:function(type,args,obj){var val=args[0];if(val){if(!Config.alreadySubscribed(this.beforeMoveEvent,this.enforceConstraints,this)){this.beforeMoveEvent.subscribe(this.enforceConstraints,this,true)}if(!Config.alreadySubscribed(this.beforeShowEvent,this._primeXYFromDOM)){this.beforeShowEvent.subscribe(this._primeXYFromDOM)}}else{this.beforeShowEvent.unsubscribe(this._primeXYFromDOM);this.beforeMoveEvent.unsubscribe(this.enforceConstraints,this)}},configContext:function(type,args,obj){var contextArgs=args[0],contextEl,elementMagnetCorner,contextMagnetCorner,triggers,defTriggers=this.CONTEXT_TRIGGERS;if(contextArgs){contextEl=contextArgs[0];elementMagnetCorner=contextArgs[1];contextMagnetCorner=contextArgs[2];triggers=contextArgs[3];if(defTriggers&&defTriggers.length>0){triggers=(triggers||[]).concat(defTriggers)}if(contextEl){if(typeof contextEl=="string"){this.cfg.setProperty("context",[document.getElementById(contextEl),elementMagnetCorner,contextMagnetCorner,triggers],true)}if(elementMagnetCorner&&contextMagnetCorner){this.align(elementMagnetCorner,contextMagnetCorner)}if(this._contextTriggers){this._processTriggers(this._contextTriggers,_UNSUBSCRIBE,this._alignOnTrigger)}if(triggers){this._processTriggers(triggers,_SUBSCRIBE,this._alignOnTrigger);this._contextTriggers=triggers}}}},_alignOnTrigger:function(type,args){this.align()},_findTriggerCE:function(t){var tce=null;if(t instanceof CustomEvent){tce=t}else if(Overlay._TRIGGER_MAP[t]){tce=Overlay._TRIGGER_MAP[t]}return tce},_processTriggers:function(triggers,mode,fn){var t,tce;for(var i=0,l=triggers.length;i<l;++i){t=triggers[i];tce=this._findTriggerCE(t);if(tce){tce[mode](fn,this,true)}else{this[mode](t,fn)}}},align:function(elementAlign,contextAlign){var contextArgs=this.cfg.getProperty("context"),me=this,context,element,contextRegion;function doAlign(v,h){switch(elementAlign){case Overlay.TOP_LEFT:me.moveTo(h,v);break;case Overlay.TOP_RIGHT:me.moveTo((h-element.offsetWidth),v);break;case Overlay.BOTTOM_LEFT:me.moveTo(h,(v-element.offsetHeight));break;case Overlay.BOTTOM_RIGHT:me.moveTo((h-element.offsetWidth),(v-element.offsetHeight));break}}if(contextArgs){context=contextArgs[0];element=this.element;me=this;if(!elementAlign){elementAlign=contextArgs[1]}if(!contextAlign){contextAlign=contextArgs[2]}if(element&&context){contextRegion=Dom.getRegion(context);switch(contextAlign){case Overlay.TOP_LEFT:doAlign(contextRegion.top,contextRegion.left);break;case Overlay.TOP_RIGHT:doAlign(contextRegion.top,contextRegion.right);break;case Overlay.BOTTOM_LEFT:doAlign(contextRegion.bottom,contextRegion.left);break;case Overlay.BOTTOM_RIGHT:doAlign(contextRegion.bottom,contextRegion.right);break}}}},enforceConstraints:function(type,args,obj){var pos=args[0];var cXY=this.getConstrainedXY(pos[0],pos[1]);this.cfg.setProperty("x",cXY[0],true);this.cfg.setProperty("y",cXY[1],true);this.cfg.setProperty("xy",cXY,true)},getConstrainedX:function(x){var oOverlay=this,oOverlayEl=oOverlay.element,nOverlayOffsetWidth=oOverlayEl.offsetWidth,nViewportOffset=Overlay.VIEWPORT_OFFSET,viewPortWidth=Dom.getViewportWidth(),scrollX=Dom.getDocumentScrollLeft(),bCanConstrain=(nOverlayOffsetWidth+nViewportOffset<viewPortWidth),aContext=this.cfg.getProperty("context"),oContextEl,nContextElX,nContextElWidth,bFlipped=false,nLeftRegionWidth,nRightRegionWidth,leftConstraint=scrollX+nViewportOffset,rightConstraint=scrollX+viewPortWidth-nOverlayOffsetWidth-nViewportOffset,xNew=x,oOverlapPositions={"tltr":true,"blbr":true,"brbl":true,"trtl":true};var flipHorizontal=function(){var nNewX;if((oOverlay.cfg.getProperty("x")-scrollX)>nContextElX){nNewX=(nContextElX-nOverlayOffsetWidth)}else{nNewX=(nContextElX+nContextElWidth)}oOverlay.cfg.setProperty("x",(nNewX+scrollX),true);return nNewX};var getDisplayRegionWidth=function(){if((oOverlay.cfg.getProperty("x")-scrollX)>nContextElX){return(nRightRegionWidth-nViewportOffset)}else{return(nLeftRegionWidth-nViewportOffset)}};var setHorizontalPosition=function(){var nDisplayRegionWidth=getDisplayRegionWidth(),fnReturnVal;if(nOverlayOffsetWidth>nDisplayRegionWidth){if(bFlipped){flipHorizontal()}else{flipHorizontal();bFlipped=true;fnReturnVal=setHorizontalPosition()}}return fnReturnVal};if(x<leftConstraint||x>rightConstraint){if(bCanConstrain){if(this.cfg.getProperty("preventcontextoverlap")&&aContext&&oOverlapPositions[(aContext[1]+aContext[2])]){oContextEl=aContext[0];nContextElX=Dom.getX(oContextEl)-scrollX;nContextElWidth=oContextEl.offsetWidth;nLeftRegionWidth=nContextElX;nRightRegionWidth=(viewPortWidth-(nContextElX+nContextElWidth));setHorizontalPosition();xNew=this.cfg.getProperty("x")}else{if(x<leftConstraint){xNew=leftConstraint}else if(x>rightConstraint){xNew=rightConstraint}}}else{xNew=nViewportOffset+scrollX}}return xNew},getConstrainedY:function(y){var oOverlay=this,oOverlayEl=oOverlay.element,nOverlayOffsetHeight=oOverlayEl.offsetHeight,nViewportOffset=Overlay.VIEWPORT_OFFSET,viewPortHeight=Dom.getViewportHeight(),scrollY=Dom.getDocumentScrollTop(),bCanConstrain=(nOverlayOffsetHeight+nViewportOffset<viewPortHeight),aContext=this.cfg.getProperty("context"),oContextEl,nContextElY,nContextElHeight,bFlipped=false,nTopRegionHeight,nBottomRegionHeight,topConstraint=scrollY+nViewportOffset,bottomConstraint=scrollY+viewPortHeight-nOverlayOffsetHeight-nViewportOffset,yNew=y,oOverlapPositions={"trbr":true,"tlbl":true,"bltl":true,"brtr":true};var flipVertical=function(){var nNewY;if((oOverlay.cfg.getProperty("y")-scrollY)>nContextElY){nNewY=(nContextElY-nOverlayOffsetHeight)}else{nNewY=(nContextElY+nContextElHeight)}oOverlay.cfg.setProperty("y",(nNewY+scrollY),true);return nNewY};var getDisplayRegionHeight=function(){if((oOverlay.cfg.getProperty("y")-scrollY)>nContextElY){return(nBottomRegionHeight-nViewportOffset)}else{return(nTopRegionHeight-nViewportOffset)}};var setVerticalPosition=function(){var nDisplayRegionHeight=getDisplayRegionHeight(),fnReturnVal;if(nOverlayOffsetHeight>nDisplayRegionHeight){if(bFlipped){flipVertical()}else{flipVertical();bFlipped=true;fnReturnVal=setVerticalPosition()}}return fnReturnVal};if(y<topConstraint||y>bottomConstraint){if(bCanConstrain){if(this.cfg.getProperty("preventcontextoverlap")&&aContext&&oOverlapPositions[(aContext[1]+aContext[2])]){oContextEl=aContext[0];nContextElHeight=oContextEl.offsetHeight;nContextElY=(Dom.getY(oContextEl)-scrollY);nTopRegionHeight=nContextElY;nBottomRegionHeight=(viewPortHeight-(nContextElY+nContextElHeight));setVerticalPosition();yNew=oOverlay.cfg.getProperty("y")}else{if(y<topConstraint){yNew=topConstraint}else if(y>bottomConstraint){yNew=bottomConstraint}}}else{yNew=nViewportOffset+scrollY}}return yNew},getConstrainedXY:function(x,y){return[this.getConstrainedX(x),this.getConstrainedY(y)]},center:function(){var nViewportOffset=Overlay.VIEWPORT_OFFSET,elementWidth=this.element.offsetWidth,elementHeight=this.element.offsetHeight,viewPortWidth=Dom.getViewportWidth(),viewPortHeight=Dom.getViewportHeight(),x,y;if(elementWidth<viewPortWidth){x=(viewPortWidth/2)-(elementWidth/2)+Dom.getDocumentScrollLeft()}else{x=nViewportOffset+Dom.getDocumentScrollLeft()}if(elementHeight<viewPortHeight){y=(viewPortHeight/2)-(elementHeight/2)+Dom.getDocumentScrollTop()}else{y=nViewportOffset+Dom.getDocumentScrollTop()}this.cfg.setProperty("xy",[parseInt(x,10),parseInt(y,10)]);this.cfg.refireEvent("iframe");if(UA.webkit){this.forceContainerRedraw()}},syncPosition:function(){var pos=Dom.getXY(this.element);this.cfg.setProperty("x",pos[0],true);this.cfg.setProperty("y",pos[1],true);this.cfg.setProperty("xy",pos,true)},onDomResize:function(e,obj){var me=this;Overlay.superclass.onDomResize.call(this,e,obj);setTimeout(function(){me.syncPosition();me.cfg.refireEvent("iframe");me.cfg.refireEvent("context")},0)},_getComputedHeight:(function(){if(document.defaultView&&document.defaultView.getComputedStyle){return function(el){var height=null;if(el.ownerDocument&&el.ownerDocument.defaultView){var computed=el.ownerDocument.defaultView.getComputedStyle(el,'');if(computed){height=parseInt(computed.height,10)}}return(Lang.isNumber(height))?height:null}}else{return function(el){var height=null;if(el.style.pixelHeight){height=el.style.pixelHeight}return(Lang.isNumber(height))?height:null}}})(),_validateAutoFillHeight:function(val){return(!val)||(Lang.isString(val)&&Overlay.STD_MOD_RE.test(val))},_autoFillOnHeightChange:function(type,args,el){var height=this.cfg.getProperty("height");if((height&&height!=="auto")||(height===0)){this.fillHeight(el)}},_getPreciseHeight:function(el){var height=el.offsetHeight;if(el.getBoundingClientRect){var rect=el.getBoundingClientRect();height=rect.bottom-rect.top}return height},fillHeight:function(el){if(el){var container=this.innerElement||this.element,containerEls=[this.header,this.body,this.footer],containerEl,total=0,filled=0,remaining=0,validEl=false;for(var i=0,l=containerEls.length;i<l;i++){containerEl=containerEls[i];if(containerEl){if(el!==containerEl){filled+=this._getPreciseHeight(containerEl)}else{validEl=true}}}if(validEl){if(UA.ie||UA.opera){Dom.setStyle(el,'height',0+'px')}total=this._getComputedHeight(container);if(total===null){Dom.addClass(container,"yui-override-padding");total=container.clientHeight;Dom.removeClass(container,"yui-override-padding")}remaining=Math.max(total-filled,0);Dom.setStyle(el,"height",remaining+"px");if(el.offsetHeight!=remaining){remaining=Math.max(remaining-(el.offsetHeight-remaining),0)}Dom.setStyle(el,"height",remaining+"px")}}},bringToTop:function(){var aOverlays=[],oElement=this.element;function compareZIndexDesc(p_oOverlay1,p_oOverlay2){var sZIndex1=Dom.getStyle(p_oOverlay1,"zIndex"),sZIndex2=Dom.getStyle(p_oOverlay2,"zIndex"),nZIndex1=(!sZIndex1||isNaN(sZIndex1))?0:parseInt(sZIndex1,10),nZIndex2=(!sZIndex2||isNaN(sZIndex2))?0:parseInt(sZIndex2,10);if(nZIndex1>nZIndex2){return-1}else if(nZIndex1<nZIndex2){return 1}else{return 0}}function isOverlayElement(p_oElement){var isOverlay=Dom.hasClass(p_oElement,Overlay.CSS_OVERLAY),Panel=YAHOO.widget.Panel;if(isOverlay&&!Dom.isAncestor(oElement,p_oElement)){if(Panel&&Dom.hasClass(p_oElement,Panel.CSS_PANEL)){aOverlays[aOverlays.length]=p_oElement.parentNode}else{aOverlays[aOverlays.length]=p_oElement}}}Dom.getElementsBy(isOverlayElement,"DIV",document.body);aOverlays.sort(compareZIndexDesc);var oTopOverlay=aOverlays[0],nTopZIndex;if(oTopOverlay){nTopZIndex=Dom.getStyle(oTopOverlay,"zIndex");if(!isNaN(nTopZIndex)){var bRequiresBump=false;if(oTopOverlay!=oElement){bRequiresBump=true}else if(aOverlays.length>1){var nNextZIndex=Dom.getStyle(aOverlays[1],"zIndex");if(!isNaN(nNextZIndex)&&(nTopZIndex==nNextZIndex)){bRequiresBump=true}}if(bRequiresBump){this.cfg.setProperty("zindex",(parseInt(nTopZIndex,10)+2))}}}},destroy:function(){if(this.iframe){this.iframe.parentNode.removeChild(this.iframe)}this.iframe=null;Overlay.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);Overlay.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this);Module.textResizeEvent.unsubscribe(this._autoFillOnHeightChange);Overlay.superclass.destroy.call(this)},forceContainerRedraw:function(){var c=this;Dom.addClass(c.element,"yui-force-redraw");setTimeout(function(){Dom.removeClass(c.element,"yui-force-redraw")},0)},toString:function(){return"Overlay "+this.id}})}());(function(){YAHOO.widget.OverlayManager=function(userConfig){this.init(userConfig)};var Overlay=YAHOO.widget.Overlay,Event=YAHOO.util.Event,Dom=YAHOO.util.Dom,Config=YAHOO.util.Config,CustomEvent=YAHOO.util.CustomEvent,OverlayManager=YAHOO.widget.OverlayManager;OverlayManager.CSS_FOCUSED="focused";OverlayManager.prototype={constructor:OverlayManager,overlays:null,initDefaultConfig:function(){this.cfg.addProperty("overlays",{suppressEvent:true});this.cfg.addProperty("focusevent",{value:"mousedown"})},init:function(userConfig){this.cfg=new Config(this);this.initDefaultConfig();if(userConfig){this.cfg.applyConfig(userConfig,true)}this.cfg.fireQueue();var activeOverlay=null;this.getActive=function(){return activeOverlay};this.focus=function(overlay){var o=this.find(overlay);if(o){o.focus()}};this.remove=function(overlay){var o=this.find(overlay),originalZ;if(o){if(activeOverlay==o){activeOverlay=null}var bDestroyed=(o.element===null&&o.cfg===null)?true:false;if(!bDestroyed){originalZ=Dom.getStyle(o.element,"zIndex");o.cfg.setProperty("zIndex",-1000,true)}this.overlays.sort(this.compareZIndexDesc);this.overlays=this.overlays.slice(0,(this.overlays.length-1));o.hideEvent.unsubscribe(o.blur);o.destroyEvent.unsubscribe(this._onOverlayDestroy,o);o.focusEvent.unsubscribe(this._onOverlayFocusHandler,o);o.blurEvent.unsubscribe(this._onOverlayBlurHandler,o);if(!bDestroyed){Event.removeListener(o.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus);o.cfg.setProperty("zIndex",originalZ,true);o.cfg.setProperty("manager",null)}if(o.focusEvent._managed){o.focusEvent=null}if(o.blurEvent._managed){o.blurEvent=null}if(o.focus._managed){o.focus=null}if(o.blur._managed){o.blur=null}}};this.blurAll=function(){var nOverlays=this.overlays.length,i;if(nOverlays>0){i=nOverlays-1;do{this.overlays[i].blur()}while(i--)}};this._manageBlur=function(overlay){var changed=false;if(activeOverlay==overlay){Dom.removeClass(activeOverlay.element,OverlayManager.CSS_FOCUSED);activeOverlay=null;changed=true}return changed};this._manageFocus=function(overlay){var changed=false;if(activeOverlay!=overlay){if(activeOverlay){activeOverlay.blur()}activeOverlay=overlay;this.bringToTop(activeOverlay);Dom.addClass(activeOverlay.element,OverlayManager.CSS_FOCUSED);changed=true}return changed};var overlays=this.cfg.getProperty("overlays");if(!this.overlays){this.overlays=[]}if(overlays){this.register(overlays);this.overlays.sort(this.compareZIndexDesc)}},_onOverlayElementFocus:function(p_oEvent){var oTarget=Event.getTarget(p_oEvent),oClose=this.close;if(oClose&&(oTarget==oClose||Dom.isAncestor(oClose,oTarget))){this.blur()}else{this.focus()}},_onOverlayDestroy:function(p_sType,p_aArgs,p_oOverlay){this.remove(p_oOverlay)},_onOverlayFocusHandler:function(p_sType,p_aArgs,p_oOverlay){this._manageFocus(p_oOverlay)},_onOverlayBlurHandler:function(p_sType,p_aArgs,p_oOverlay){this._manageBlur(p_oOverlay)},_bindFocus:function(overlay){var mgr=this;if(!overlay.focusEvent){overlay.focusEvent=overlay.createEvent("focus");overlay.focusEvent.signature=CustomEvent.LIST;overlay.focusEvent._managed=true}else{overlay.focusEvent.subscribe(mgr._onOverlayFocusHandler,overlay,mgr)}if(!overlay.focus){Event.on(overlay.element,mgr.cfg.getProperty("focusevent"),mgr._onOverlayElementFocus,null,overlay);overlay.focus=function(){if(mgr._manageFocus(this)){if(this.cfg.getProperty("visible")&&this.focusFirst){this.focusFirst()}this.focusEvent.fire()}};overlay.focus._managed=true}},_bindBlur:function(overlay){var mgr=this;if(!overlay.blurEvent){overlay.blurEvent=overlay.createEvent("blur");overlay.blurEvent.signature=CustomEvent.LIST;overlay.focusEvent._managed=true}else{overlay.blurEvent.subscribe(mgr._onOverlayBlurHandler,overlay,mgr)}if(!overlay.blur){overlay.blur=function(){if(mgr._manageBlur(this)){this.blurEvent.fire()}};overlay.blur._managed=true}overlay.hideEvent.subscribe(overlay.blur)},_bindDestroy:function(overlay){var mgr=this;overlay.destroyEvent.subscribe(mgr._onOverlayDestroy,overlay,mgr)},_syncZIndex:function(overlay){var zIndex=Dom.getStyle(overlay.element,"zIndex");if(!isNaN(zIndex)){overlay.cfg.setProperty("zIndex",parseInt(zIndex,10))}else{overlay.cfg.setProperty("zIndex",0)}},register:function(overlay){var registered=false,i,n;if(overlay instanceof Overlay){overlay.cfg.addProperty("manager",{value:this});this._bindFocus(overlay);this._bindBlur(overlay);this._bindDestroy(overlay);this._syncZIndex(overlay);this.overlays.push(overlay);this.bringToTop(overlay);registered=true}else if(overlay instanceof Array){for(i=0,n=overlay.length;i<n;i++){registered=this.register(overlay[i])||registered}}return registered},bringToTop:function(p_oOverlay){var oOverlay=this.find(p_oOverlay),nTopZIndex,oTopOverlay,aOverlays;if(oOverlay){aOverlays=this.overlays;aOverlays.sort(this.compareZIndexDesc);oTopOverlay=aOverlays[0];if(oTopOverlay){nTopZIndex=Dom.getStyle(oTopOverlay.element,"zIndex");if(!isNaN(nTopZIndex)){var bRequiresBump=false;if(oTopOverlay!==oOverlay){bRequiresBump=true}else if(aOverlays.length>1){var nNextZIndex=Dom.getStyle(aOverlays[1].element,"zIndex");if(!isNaN(nNextZIndex)&&(nTopZIndex==nNextZIndex)){bRequiresBump=true}}if(bRequiresBump){oOverlay.cfg.setProperty("zindex",(parseInt(nTopZIndex,10)+2))}}aOverlays.sort(this.compareZIndexDesc)}}},find:function(overlay){var isInstance=overlay instanceof Overlay,overlays=this.overlays,n=overlays.length,found=null,o,i;if(isInstance||typeof overlay=="string"){for(i=n-1;i>=0;i--){o=overlays[i];if((isInstance&&(o===overlay))||(o.id==overlay)){found=o;break}}}return found},compareZIndexDesc:function(o1,o2){var zIndex1=(o1.cfg)?o1.cfg.getProperty("zIndex"):null,zIndex2=(o2.cfg)?o2.cfg.getProperty("zIndex"):null;if(zIndex1===null&&zIndex2===null){return 0}else if(zIndex1===null){return 1}else if(zIndex2===null){return-1}else if(zIndex1>zIndex2){return-1}else if(zIndex1<zIndex2){return 1}else{return 0}},showAll:function(){var overlays=this.overlays,n=overlays.length,i;for(i=n-1;i>=0;i--){overlays[i].show()}},hideAll:function(){var overlays=this.overlays,n=overlays.length,i;for(i=n-1;i>=0;i--){overlays[i].hide()}},toString:function(){return"OverlayManager"}}}());(function(){YAHOO.widget.Tooltip=function(el,userConfig){YAHOO.widget.Tooltip.superclass.constructor.call(this,el,userConfig)};var Lang=YAHOO.lang,Event=YAHOO.util.Event,CustomEvent=YAHOO.util.CustomEvent,Dom=YAHOO.util.Dom,Tooltip=YAHOO.widget.Tooltip,UA=YAHOO.env.ua,bIEQuirks=(UA.ie&&(UA.ie<=6||document.compatMode=="BackCompat")),m_oShadowTemplate,DEFAULT_CONFIG={"PREVENT_OVERLAP":{key:"preventoverlap",value:true,validator:Lang.isBoolean,supercedes:["x","y","xy"]},"SHOW_DELAY":{key:"showdelay",value:200,validator:Lang.isNumber},"AUTO_DISMISS_DELAY":{key:"autodismissdelay",value:5000,validator:Lang.isNumber},"HIDE_DELAY":{key:"hidedelay",value:250,validator:Lang.isNumber},"TEXT":{key:"text",suppressEvent:true},"CONTAINER":{key:"container"},"DISABLED":{key:"disabled",value:false,suppressEvent:true}},EVENT_TYPES={"CONTEXT_MOUSE_OVER":"contextMouseOver","CONTEXT_MOUSE_OUT":"contextMouseOut","CONTEXT_TRIGGER":"contextTrigger"};Tooltip.CSS_TOOLTIP="yui-tt";function restoreOriginalWidth(sOriginalWidth,sForcedWidth){var oConfig=this.cfg,sCurrentWidth=oConfig.getProperty("width");if(sCurrentWidth==sForcedWidth){oConfig.setProperty("width",sOriginalWidth)}}function setWidthToOffsetWidth(p_sType,p_aArgs){if("_originalWidth"in this){restoreOriginalWidth.call(this,this._originalWidth,this._forcedWidth)}var oBody=document.body,oConfig=this.cfg,sOriginalWidth=oConfig.getProperty("width"),sNewWidth,oClone;if((!sOriginalWidth||sOriginalWidth=="auto")&&(oConfig.getProperty("container")!=oBody||oConfig.getProperty("x")>=Dom.getViewportWidth()||oConfig.getProperty("y")>=Dom.getViewportHeight())){oClone=this.element.cloneNode(true);oClone.style.visibility="hidden";oClone.style.top="0px";oClone.style.left="0px";oBody.appendChild(oClone);sNewWidth=(oClone.offsetWidth+"px");oBody.removeChild(oClone);oClone=null;oConfig.setProperty("width",sNewWidth);oConfig.refireEvent("xy");this._originalWidth=sOriginalWidth||"";this._forcedWidth=sNewWidth}}function onDOMReady(p_sType,p_aArgs,p_oObject){this.render(p_oObject)}function onInit(){Event.onDOMReady(onDOMReady,this.cfg.getProperty("container"),this)}YAHOO.extend(Tooltip,YAHOO.widget.Overlay,{init:function(el,userConfig){Tooltip.superclass.init.call(this,el);this.beforeInitEvent.fire(Tooltip);Dom.addClass(this.element,Tooltip.CSS_TOOLTIP);if(userConfig){this.cfg.applyConfig(userConfig,true)}this.cfg.queueProperty("visible",false);this.cfg.queueProperty("constraintoviewport",true);this.setBody("");this.subscribe("changeContent",setWidthToOffsetWidth);this.subscribe("init",onInit);this.subscribe("render",this.onRender);this.initEvent.fire(Tooltip)},initEvents:function(){Tooltip.superclass.initEvents.call(this);var SIGNATURE=CustomEvent.LIST;this.contextMouseOverEvent=this.createEvent(EVENT_TYPES.CONTEXT_MOUSE_OVER);this.contextMouseOverEvent.signature=SIGNATURE;this.contextMouseOutEvent=this.createEvent(EVENT_TYPES.CONTEXT_MOUSE_OUT);this.contextMouseOutEvent.signature=SIGNATURE;this.contextTriggerEvent=this.createEvent(EVENT_TYPES.CONTEXT_TRIGGER);this.contextTriggerEvent.signature=SIGNATURE},initDefaultConfig:function(){Tooltip.superclass.initDefaultConfig.call(this);this.cfg.addProperty(DEFAULT_CONFIG.PREVENT_OVERLAP.key,{value:DEFAULT_CONFIG.PREVENT_OVERLAP.value,validator:DEFAULT_CONFIG.PREVENT_OVERLAP.validator,supercedes:DEFAULT_CONFIG.PREVENT_OVERLAP.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.SHOW_DELAY.key,{handler:this.configShowDelay,value:200,validator:DEFAULT_CONFIG.SHOW_DELAY.validator});this.cfg.addProperty(DEFAULT_CONFIG.AUTO_DISMISS_DELAY.key,{handler:this.configAutoDismissDelay,value:DEFAULT_CONFIG.AUTO_DISMISS_DELAY.value,validator:DEFAULT_CONFIG.AUTO_DISMISS_DELAY.validator});this.cfg.addProperty(DEFAULT_CONFIG.HIDE_DELAY.key,{handler:this.configHideDelay,value:DEFAULT_CONFIG.HIDE_DELAY.value,validator:DEFAULT_CONFIG.HIDE_DELAY.validator});this.cfg.addProperty(DEFAULT_CONFIG.TEXT.key,{handler:this.configText,suppressEvent:DEFAULT_CONFIG.TEXT.suppressEvent});this.cfg.addProperty(DEFAULT_CONFIG.CONTAINER.key,{handler:this.configContainer,value:document.body});this.cfg.addProperty(DEFAULT_CONFIG.DISABLED.key,{handler:this.configContainer,value:DEFAULT_CONFIG.DISABLED.value,supressEvent:DEFAULT_CONFIG.DISABLED.suppressEvent})},configText:function(type,args,obj){var text=args[0];if(text){this.setBody(text)}},configContainer:function(type,args,obj){var container=args[0];if(typeof container=='string'){this.cfg.setProperty("container",document.getElementById(container),true)}},_removeEventListeners:function(){var aElements=this._context,nElements,oElement,i;if(aElements){nElements=aElements.length;if(nElements>0){i=nElements-1;do{oElement=aElements[i];Event.removeListener(oElement,"mouseover",this.onContextMouseOver);Event.removeListener(oElement,"mousemove",this.onContextMouseMove);Event.removeListener(oElement,"mouseout",this.onContextMouseOut)}while(i--)}}},configContext:function(type,args,obj){var context=args[0],aElements,nElements,oElement,i;if(context){if(!(context instanceof Array)){if(typeof context=="string"){this.cfg.setProperty("context",[document.getElementById(context)],true)}else{this.cfg.setProperty("context",[context],true)}context=this.cfg.getProperty("context")}this._removeEventListeners();this._context=context;aElements=this._context;if(aElements){nElements=aElements.length;if(nElements>0){i=nElements-1;do{oElement=aElements[i];Event.on(oElement,"mouseover",this.onContextMouseOver,this);Event.on(oElement,"mousemove",this.onContextMouseMove,this);Event.on(oElement,"mouseout",this.onContextMouseOut,this)}while(i--)}}}},onContextMouseMove:function(e,obj){obj.pageX=Event.getPageX(e);obj.pageY=Event.getPageY(e)},onContextMouseOver:function(e,obj){var context=this;if(context.title){obj._tempTitle=context.title;context.title=""}if(obj.fireEvent("contextMouseOver",context,e)!==false&&!obj.cfg.getProperty("disabled")){if(obj.hideProcId){clearTimeout(obj.hideProcId);obj.hideProcId=null}Event.on(context,"mousemove",obj.onContextMouseMove,obj);obj.showProcId=obj.doShow(e,context)}},onContextMouseOut:function(e,obj){var el=this;if(obj._tempTitle){el.title=obj._tempTitle;obj._tempTitle=null}if(obj.showProcId){clearTimeout(obj.showProcId);obj.showProcId=null}if(obj.hideProcId){clearTimeout(obj.hideProcId);obj.hideProcId=null}obj.fireEvent("contextMouseOut",el,e);obj.hideProcId=setTimeout(function(){obj.hide()},obj.cfg.getProperty("hidedelay"))},doShow:function(e,context){var yOffset=25,me=this;if(UA.opera&&context.tagName&&context.tagName.toUpperCase()=="A"){yOffset+=12}return setTimeout(function(){var txt=me.cfg.getProperty("text");if(me._tempTitle&&(txt===""||YAHOO.lang.isUndefined(txt)||YAHOO.lang.isNull(txt))){me.setBody(me._tempTitle)}else{me.cfg.refireEvent("text")}me.moveTo(me.pageX,me.pageY+yOffset);if(me.cfg.getProperty("preventoverlap")){me.preventOverlap(me.pageX,me.pageY)}Event.removeListener(context,"mousemove",me.onContextMouseMove);me.contextTriggerEvent.fire(context);me.show();me.hideProcId=me.doHide()},this.cfg.getProperty("showdelay"))},doHide:function(){var me=this;return setTimeout(function(){me.hide()},this.cfg.getProperty("autodismissdelay"))},preventOverlap:function(pageX,pageY){var height=this.element.offsetHeight,mousePoint=new YAHOO.util.Point(pageX,pageY),elementRegion=Dom.getRegion(this.element);elementRegion.top-=5;elementRegion.left-=5;elementRegion.right+=5;elementRegion.bottom+=5;if(elementRegion.contains(mousePoint)){this.cfg.setProperty("y",(pageY-height-5))}},onRender:function(p_sType,p_aArgs){function sizeShadow(){var oElement=this.element,oShadow=this.underlay;if(oShadow){oShadow.style.width=(oElement.offsetWidth+6)+"px";oShadow.style.height=(oElement.offsetHeight+1)+"px"}}function addShadowVisibleClass(){Dom.addClass(this.underlay,"yui-tt-shadow-visible");if(UA.ie){this.forceUnderlayRedraw()}}function removeShadowVisibleClass(){Dom.removeClass(this.underlay,"yui-tt-shadow-visible")}function createShadow(){var oShadow=this.underlay,oElement,Module,nIE,me;if(!oShadow){oElement=this.element;Module=YAHOO.widget.Module;nIE=UA.ie;me=this;if(!m_oShadowTemplate){m_oShadowTemplate=document.createElement("div");m_oShadowTemplate.className="yui-tt-shadow"}oShadow=m_oShadowTemplate.cloneNode(false);oElement.appendChild(oShadow);this.underlay=oShadow;this._shadow=this.underlay;addShadowVisibleClass.call(this);this.subscribe("beforeShow",addShadowVisibleClass);this.subscribe("hide",removeShadowVisibleClass);if(bIEQuirks){window.setTimeout(function(){sizeShadow.call(me)},0);this.cfg.subscribeToConfigEvent("width",sizeShadow);this.cfg.subscribeToConfigEvent("height",sizeShadow);this.subscribe("changeContent",sizeShadow);Module.textResizeEvent.subscribe(sizeShadow,this,true);this.subscribe("destroy",function(){Module.textResizeEvent.unsubscribe(sizeShadow,this)})}}}function onBeforeShow(){createShadow.call(this);this.unsubscribe("beforeShow",onBeforeShow)}if(this.cfg.getProperty("visible")){createShadow.call(this)}else{this.subscribe("beforeShow",onBeforeShow)}},forceUnderlayRedraw:function(){var tt=this;Dom.addClass(tt.underlay,"yui-force-redraw");setTimeout(function(){Dom.removeClass(tt.underlay,"yui-force-redraw")},0)},destroy:function(){this._removeEventListeners();Tooltip.superclass.destroy.call(this)},toString:function(){return"Tooltip "+this.id}})}());(function(){YAHOO.widget.Panel=function(el,userConfig){YAHOO.widget.Panel.superclass.constructor.call(this,el,userConfig)};var _currentModal=null;var Lang=YAHOO.lang,Util=YAHOO.util,Dom=Util.Dom,Event=Util.Event,CustomEvent=Util.CustomEvent,KeyListener=YAHOO.util.KeyListener,Config=Util.Config,Overlay=YAHOO.widget.Overlay,Panel=YAHOO.widget.Panel,UA=YAHOO.env.ua,bIEQuirks=(UA.ie&&(UA.ie<=6||document.compatMode=="BackCompat")),m_oMaskTemplate,m_oUnderlayTemplate,m_oCloseIconTemplate,EVENT_TYPES={"SHOW_MASK":"showMask","HIDE_MASK":"hideMask","DRAG":"drag"},DEFAULT_CONFIG={"CLOSE":{key:"close",value:true,validator:Lang.isBoolean,supercedes:["visible"]},"DRAGGABLE":{key:"draggable",value:(Util.DD?true:false),validator:Lang.isBoolean,supercedes:["visible"]},"DRAG_ONLY":{key:"dragonly",value:false,validator:Lang.isBoolean,supercedes:["draggable"]},"UNDERLAY":{key:"underlay",value:"shadow",supercedes:["visible"]},"MODAL":{key:"modal",value:false,validator:Lang.isBoolean,supercedes:["visible","zindex"]},"KEY_LISTENERS":{key:"keylisteners",suppressEvent:true,supercedes:["visible"]},"STRINGS":{key:"strings",supercedes:["close"],validator:Lang.isObject,value:{close:"Close"}}};Panel.CSS_PANEL="yui-panel";Panel.CSS_PANEL_CONTAINER="yui-panel-container";Panel.FOCUSABLE=["a","button","select","textarea","input","iframe"];function createHeader(p_sType,p_aArgs){if(!this.header&&this.cfg.getProperty("draggable")){this.setHeader("&#160;")}}function restoreOriginalWidth(p_sType,p_aArgs,p_oObject){var sOriginalWidth=p_oObject[0],sNewWidth=p_oObject[1],oConfig=this.cfg,sCurrentWidth=oConfig.getProperty("width");if(sCurrentWidth==sNewWidth){oConfig.setProperty("width",sOriginalWidth)}this.unsubscribe("hide",restoreOriginalWidth,p_oObject)}function setWidthToOffsetWidth(p_sType,p_aArgs){var oConfig,sOriginalWidth,sNewWidth;if(bIEQuirks){oConfig=this.cfg;sOriginalWidth=oConfig.getProperty("width");if(!sOriginalWidth||sOriginalWidth=="auto"){sNewWidth=(this.element.offsetWidth+"px");oConfig.setProperty("width",sNewWidth);this.subscribe("hide",restoreOriginalWidth,[(sOriginalWidth||""),sNewWidth])}}}YAHOO.extend(Panel,Overlay,{init:function(el,userConfig){Panel.superclass.init.call(this,el);this.beforeInitEvent.fire(Panel);Dom.addClass(this.element,Panel.CSS_PANEL);this.buildWrapper();if(userConfig){this.cfg.applyConfig(userConfig,true)}this.subscribe("showMask",this._addFocusHandlers);this.subscribe("hideMask",this._removeFocusHandlers);this.subscribe("beforeRender",createHeader);this.subscribe("render",function(){this.setFirstLastFocusable();this.subscribe("changeContent",this.setFirstLastFocusable)});this.subscribe("show",this.focusFirst);this.initEvent.fire(Panel)},_onElementFocus:function(e){if(_currentModal===this){var target=Event.getTarget(e),doc=document.documentElement,insideDoc=(target!==doc&&target!==window);if(insideDoc&&target!==this.element&&target!==this.mask&&!Dom.isAncestor(this.element,target)){try{if(this.firstElement){this.firstElement.focus()}else{if(this._modalFocus){this._modalFocus.focus()}else{this.innerElement.focus()}}}catch(err){try{if(insideDoc&&target!==document.body){target.blur()}}catch(err2){}}}}},_addFocusHandlers:function(p_sType,p_aArgs){if(!this.firstElement){if(UA.webkit||UA.opera){if(!this._modalFocus){this._createHiddenFocusElement()}}else{this.innerElement.tabIndex=0}}this.setTabLoop(this.firstElement,this.lastElement);Event.onFocus(document.documentElement,this._onElementFocus,this,true);_currentModal=this},_createHiddenFocusElement:function(){var e=document.createElement("button");e.style.height="1px";e.style.width="1px";e.style.position="absolute";e.style.left="-10000em";e.style.opacity=0;e.tabIndex=-1;this.innerElement.appendChild(e);this._modalFocus=e},_removeFocusHandlers:function(p_sType,p_aArgs){Event.removeFocusListener(document.documentElement,this._onElementFocus,this);if(_currentModal==this){_currentModal=null}},focusFirst:function(type,args,obj){var el=this.firstElement;if(args&&args[1]){Event.stopEvent(args[1])}if(el){try{el.focus()}catch(err){}}},focusLast:function(type,args,obj){var el=this.lastElement;if(args&&args[1]){Event.stopEvent(args[1])}if(el){try{el.focus()}catch(err){}}},setTabLoop:function(firstElement,lastElement){var backTab=this.preventBackTab,tab=this.preventTabOut,showEvent=this.showEvent,hideEvent=this.hideEvent;if(backTab){backTab.disable();showEvent.unsubscribe(backTab.enable,backTab);hideEvent.unsubscribe(backTab.disable,backTab);backTab=this.preventBackTab=null}if(tab){tab.disable();showEvent.unsubscribe(tab.enable,tab);hideEvent.unsubscribe(tab.disable,tab);tab=this.preventTabOut=null}if(firstElement){this.preventBackTab=new KeyListener(firstElement,{shift:true,keys:9},{fn:this.focusLast,scope:this,correctScope:true});backTab=this.preventBackTab;showEvent.subscribe(backTab.enable,backTab,true);hideEvent.subscribe(backTab.disable,backTab,true)}if(lastElement){this.preventTabOut=new KeyListener(lastElement,{shift:false,keys:9},{fn:this.focusFirst,scope:this,correctScope:true});tab=this.preventTabOut;showEvent.subscribe(tab.enable,tab,true);hideEvent.subscribe(tab.disable,tab,true)}},getFocusableElements:function(root){root=root||this.innerElement;var focusable={};for(var i=0;i<Panel.FOCUSABLE.length;i++){focusable[Panel.FOCUSABLE[i]]=true}function isFocusable(el){if(el.focus&&el.type!=="hidden"&&!el.disabled&&focusable[el.tagName.toLowerCase()]){return true}return false}return Dom.getElementsBy(isFocusable,null,root)},setFirstLastFocusable:function(){this.firstElement=null;this.lastElement=null;var elements=this.getFocusableElements();this.focusableElements=elements;if(elements.length>0){this.firstElement=elements[0];this.lastElement=elements[elements.length-1]}if(this.cfg.getProperty("modal")){this.setTabLoop(this.firstElement,this.lastElement)}},initEvents:function(){Panel.superclass.initEvents.call(this);var SIGNATURE=CustomEvent.LIST;this.showMaskEvent=this.createEvent(EVENT_TYPES.SHOW_MASK);this.showMaskEvent.signature=SIGNATURE;this.hideMaskEvent=this.createEvent(EVENT_TYPES.HIDE_MASK);this.hideMaskEvent.signature=SIGNATURE;this.dragEvent=this.createEvent(EVENT_TYPES.DRAG);this.dragEvent.signature=SIGNATURE},initDefaultConfig:function(){Panel.superclass.initDefaultConfig.call(this);this.cfg.addProperty(DEFAULT_CONFIG.CLOSE.key,{handler:this.configClose,value:DEFAULT_CONFIG.CLOSE.value,validator:DEFAULT_CONFIG.CLOSE.validator,supercedes:DEFAULT_CONFIG.CLOSE.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.DRAGGABLE.key,{handler:this.configDraggable,value:(Util.DD)?true:false,validator:DEFAULT_CONFIG.DRAGGABLE.validator,supercedes:DEFAULT_CONFIG.DRAGGABLE.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.DRAG_ONLY.key,{value:DEFAULT_CONFIG.DRAG_ONLY.value,validator:DEFAULT_CONFIG.DRAG_ONLY.validator,supercedes:DEFAULT_CONFIG.DRAG_ONLY.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.UNDERLAY.key,{handler:this.configUnderlay,value:DEFAULT_CONFIG.UNDERLAY.value,supercedes:DEFAULT_CONFIG.UNDERLAY.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.MODAL.key,{handler:this.configModal,value:DEFAULT_CONFIG.MODAL.value,validator:DEFAULT_CONFIG.MODAL.validator,supercedes:DEFAULT_CONFIG.MODAL.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.KEY_LISTENERS.key,{handler:this.configKeyListeners,suppressEvent:DEFAULT_CONFIG.KEY_LISTENERS.suppressEvent,supercedes:DEFAULT_CONFIG.KEY_LISTENERS.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.STRINGS.key,{value:DEFAULT_CONFIG.STRINGS.value,handler:this.configStrings,validator:DEFAULT_CONFIG.STRINGS.validator,supercedes:DEFAULT_CONFIG.STRINGS.supercedes})},configClose:function(type,args,obj){var val=args[0],oClose=this.close,strings=this.cfg.getProperty("strings");if(val){if(!oClose){if(!m_oCloseIconTemplate){m_oCloseIconTemplate=document.createElement("a");m_oCloseIconTemplate.className="container-close";m_oCloseIconTemplate.href="#"}oClose=m_oCloseIconTemplate.cloneNode(true);this.innerElement.appendChild(oClose);oClose.innerHTML=(strings&&strings.close)?strings.close:"&#160;";Event.on(oClose,"click",this._doClose,this,true);this.close=oClose}else{oClose.style.display="block"}}else{if(oClose){oClose.style.display="none"}}},_doClose:function(e){Event.preventDefault(e);this.hide()},configDraggable:function(type,args,obj){var val=args[0];if(val){if(!Util.DD){this.cfg.setProperty("draggable",false);return}if(this.header){Dom.setStyle(this.header,"cursor","move");this.registerDragDrop()}this.subscribe("beforeShow",setWidthToOffsetWidth)}else{if(this.dd){this.dd.unreg()}if(this.header){Dom.setStyle(this.header,"cursor","auto")}this.unsubscribe("beforeShow",setWidthToOffsetWidth)}},configUnderlay:function(type,args,obj){var bMacGecko=(this.platform=="mac"&&UA.gecko),sUnderlay=args[0].toLowerCase(),oUnderlay=this.underlay,oElement=this.element;function createUnderlay(){var bNew=false;if(!oUnderlay){if(!m_oUnderlayTemplate){m_oUnderlayTemplate=document.createElement("div");m_oUnderlayTemplate.className="underlay"}oUnderlay=m_oUnderlayTemplate.cloneNode(false);this.element.appendChild(oUnderlay);this.underlay=oUnderlay;if(bIEQuirks){this.sizeUnderlay();this.cfg.subscribeToConfigEvent("width",this.sizeUnderlay);this.cfg.subscribeToConfigEvent("height",this.sizeUnderlay);this.changeContentEvent.subscribe(this.sizeUnderlay);YAHOO.widget.Module.textResizeEvent.subscribe(this.sizeUnderlay,this,true)}if(UA.webkit&&UA.webkit<420){this.changeContentEvent.subscribe(this.forceUnderlayRedraw)}bNew=true}}function onBeforeShow(){var bNew=createUnderlay.call(this);if(!bNew&&bIEQuirks){this.sizeUnderlay()}this._underlayDeferred=false;this.beforeShowEvent.unsubscribe(onBeforeShow)}function destroyUnderlay(){if(this._underlayDeferred){this.beforeShowEvent.unsubscribe(onBeforeShow);this._underlayDeferred=false}if(oUnderlay){this.cfg.unsubscribeFromConfigEvent("width",this.sizeUnderlay);this.cfg.unsubscribeFromConfigEvent("height",this.sizeUnderlay);this.changeContentEvent.unsubscribe(this.sizeUnderlay);this.changeContentEvent.unsubscribe(this.forceUnderlayRedraw);YAHOO.widget.Module.textResizeEvent.unsubscribe(this.sizeUnderlay,this,true);this.element.removeChild(oUnderlay);this.underlay=null}}switch(sUnderlay){case"shadow":Dom.removeClass(oElement,"matte");Dom.addClass(oElement,"shadow");break;case"matte":if(!bMacGecko){destroyUnderlay.call(this)}Dom.removeClass(oElement,"shadow");Dom.addClass(oElement,"matte");break;default:if(!bMacGecko){destroyUnderlay.call(this)}Dom.removeClass(oElement,"shadow");Dom.removeClass(oElement,"matte");break}if((sUnderlay=="shadow")||(bMacGecko&&!oUnderlay)){if(this.cfg.getProperty("visible")){var bNew=createUnderlay.call(this);if(!bNew&&bIEQuirks){this.sizeUnderlay()}}else{if(!this._underlayDeferred){this.beforeShowEvent.subscribe(onBeforeShow);this._underlayDeferred=true}}}},configModal:function(type,args,obj){var modal=args[0];if(modal){if(!this._hasModalityEventListeners){this.subscribe("beforeShow",this.buildMask);this.subscribe("beforeShow",this.bringToTop);this.subscribe("beforeShow",this.showMask);this.subscribe("hide",this.hideMask);Overlay.windowResizeEvent.subscribe(this.sizeMask,this,true);this._hasModalityEventListeners=true}}else{if(this._hasModalityEventListeners){if(this.cfg.getProperty("visible")){this.hideMask();this.removeMask()}this.unsubscribe("beforeShow",this.buildMask);this.unsubscribe("beforeShow",this.bringToTop);this.unsubscribe("beforeShow",this.showMask);this.unsubscribe("hide",this.hideMask);Overlay.windowResizeEvent.unsubscribe(this.sizeMask,this);this._hasModalityEventListeners=false}}},removeMask:function(){var oMask=this.mask,oParentNode;if(oMask){this.hideMask();oParentNode=oMask.parentNode;if(oParentNode){oParentNode.removeChild(oMask)}this.mask=null}},configKeyListeners:function(type,args,obj){var listeners=args[0],listener,nListeners,i;if(listeners){if(listeners instanceof Array){nListeners=listeners.length;for(i=0;i<nListeners;i++){listener=listeners[i];if(!Config.alreadySubscribed(this.showEvent,listener.enable,listener)){this.showEvent.subscribe(listener.enable,listener,true)}if(!Config.alreadySubscribed(this.hideEvent,listener.disable,listener)){this.hideEvent.subscribe(listener.disable,listener,true);this.destroyEvent.subscribe(listener.disable,listener,true)}}}else{if(!Config.alreadySubscribed(this.showEvent,listeners.enable,listeners)){this.showEvent.subscribe(listeners.enable,listeners,true)}if(!Config.alreadySubscribed(this.hideEvent,listeners.disable,listeners)){this.hideEvent.subscribe(listeners.disable,listeners,true);this.destroyEvent.subscribe(listeners.disable,listeners,true)}}}},configStrings:function(type,args,obj){var val=Lang.merge(DEFAULT_CONFIG.STRINGS.value,args[0]);this.cfg.setProperty(DEFAULT_CONFIG.STRINGS.key,val,true)},configHeight:function(type,args,obj){var height=args[0],el=this.innerElement;Dom.setStyle(el,"height",height);this.cfg.refireEvent("iframe")},_autoFillOnHeightChange:function(type,args,el){Panel.superclass._autoFillOnHeightChange.apply(this,arguments);if(bIEQuirks){var panel=this;setTimeout(function(){panel.sizeUnderlay()},0)}},configWidth:function(type,args,obj){var width=args[0],el=this.innerElement;Dom.setStyle(el,"width",width);this.cfg.refireEvent("iframe")},configzIndex:function(type,args,obj){Panel.superclass.configzIndex.call(this,type,args,obj);if(this.mask||this.cfg.getProperty("modal")===true){var panelZ=Dom.getStyle(this.element,"zIndex");if(!panelZ||isNaN(panelZ)){panelZ=0}if(panelZ===0){this.cfg.setProperty("zIndex",1)}else{this.stackMask()}}},buildWrapper:function(){var elementParent=this.element.parentNode,originalElement=this.element,wrapper=document.createElement("div");wrapper.className=Panel.CSS_PANEL_CONTAINER;wrapper.id=originalElement.id+"_c";if(elementParent){elementParent.insertBefore(wrapper,originalElement)}wrapper.appendChild(originalElement);this.element=wrapper;this.innerElement=originalElement;Dom.setStyle(this.innerElement,"visibility","inherit")},sizeUnderlay:function(){var oUnderlay=this.underlay,oElement;if(oUnderlay){oElement=this.element;oUnderlay.style.width=oElement.offsetWidth+"px";oUnderlay.style.height=oElement.offsetHeight+"px"}},registerDragDrop:function(){var me=this;if(this.header){if(!Util.DD){return}var bDragOnly=(this.cfg.getProperty("dragonly")===true);this.dd=new Util.DD(this.element.id,this.id,{dragOnly:bDragOnly});if(!this.header.id){this.header.id=this.id+"_h"}this.dd.startDrag=function(){var offsetHeight,offsetWidth,viewPortWidth,viewPortHeight,scrollX,scrollY;if(YAHOO.env.ua.ie==6){Dom.addClass(me.element,"drag")}if(me.cfg.getProperty("constraintoviewport")){var nViewportOffset=Overlay.VIEWPORT_OFFSET;offsetHeight=me.element.offsetHeight;offsetWidth=me.element.offsetWidth;viewPortWidth=Dom.getViewportWidth();viewPortHeight=Dom.getViewportHeight();scrollX=Dom.getDocumentScrollLeft();scrollY=Dom.getDocumentScrollTop();if(offsetHeight+nViewportOffset<viewPortHeight){this.minY=scrollY+nViewportOffset;this.maxY=scrollY+viewPortHeight-offsetHeight-nViewportOffset}else{this.minY=scrollY+nViewportOffset;this.maxY=scrollY+nViewportOffset}if(offsetWidth+nViewportOffset<viewPortWidth){this.minX=scrollX+nViewportOffset;this.maxX=scrollX+viewPortWidth-offsetWidth-nViewportOffset}else{this.minX=scrollX+nViewportOffset;this.maxX=scrollX+nViewportOffset}this.constrainX=true;this.constrainY=true}else{this.constrainX=false;this.constrainY=false}me.dragEvent.fire("startDrag",arguments)};this.dd.onDrag=function(){me.syncPosition();me.cfg.refireEvent("iframe");if(this.platform=="mac"&&YAHOO.env.ua.gecko){this.showMacGeckoScrollbars()}me.dragEvent.fire("onDrag",arguments)};this.dd.endDrag=function(){if(YAHOO.env.ua.ie==6){Dom.removeClass(me.element,"drag")}me.dragEvent.fire("endDrag",arguments);me.moveEvent.fire(me.cfg.getProperty("xy"))};this.dd.setHandleElId(this.header.id);this.dd.addInvalidHandleType("INPUT");this.dd.addInvalidHandleType("SELECT");this.dd.addInvalidHandleType("TEXTAREA")}},buildMask:function(){var oMask=this.mask;if(!oMask){if(!m_oMaskTemplate){m_oMaskTemplate=document.createElement("div");m_oMaskTemplate.className="mask";m_oMaskTemplate.innerHTML="&#160;"}oMask=m_oMaskTemplate.cloneNode(true);oMask.id=this.id+"_mask";document.body.insertBefore(oMask,document.body.firstChild);this.mask=oMask;if(YAHOO.env.ua.gecko&&this.platform=="mac"){Dom.addClass(this.mask,"block-scrollbars")}this.stackMask()}},hideMask:function(){if(this.cfg.getProperty("modal")&&this.mask){this.mask.style.display="none";Dom.removeClass(document.body,"masked");this.hideMaskEvent.fire()}},showMask:function(){if(this.cfg.getProperty("modal")&&this.mask){Dom.addClass(document.body,"masked");this.sizeMask();this.mask.style.display="block";this.showMaskEvent.fire()}},sizeMask:function(){if(this.mask){var mask=this.mask,viewWidth=Dom.getViewportWidth(),viewHeight=Dom.getViewportHeight();if(mask.offsetHeight>viewHeight){mask.style.height=viewHeight+"px"}if(mask.offsetWidth>viewWidth){mask.style.width=viewWidth+"px"}mask.style.height=Dom.getDocumentHeight()+"px";mask.style.width=Dom.getDocumentWidth()+"px"}},stackMask:function(){if(this.mask){var panelZ=Dom.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(panelZ)&&!isNaN(panelZ)){Dom.setStyle(this.mask,"zIndex",panelZ-1)}}},render:function(appendToNode){return Panel.superclass.render.call(this,appendToNode,this.innerElement)},destroy:function(){Overlay.windowResizeEvent.unsubscribe(this.sizeMask,this);this.removeMask();if(this.close){Event.purgeElement(this.close)}Panel.superclass.destroy.call(this)},forceUnderlayRedraw:function(){var u=this.underlay;Dom.addClass(u,"yui-force-redraw");setTimeout(function(){Dom.removeClass(u,"yui-force-redraw")},0)},toString:function(){return"Panel "+this.id}})}());(function(){YAHOO.widget.Dialog=function(el,userConfig){YAHOO.widget.Dialog.superclass.constructor.call(this,el,userConfig)};var Event=YAHOO.util.Event,CustomEvent=YAHOO.util.CustomEvent,Dom=YAHOO.util.Dom,Dialog=YAHOO.widget.Dialog,Lang=YAHOO.lang,EVENT_TYPES={"BEFORE_SUBMIT":"beforeSubmit","SUBMIT":"submit","MANUAL_SUBMIT":"manualSubmit","ASYNC_SUBMIT":"asyncSubmit","FORM_SUBMIT":"formSubmit","CANCEL":"cancel"},DEFAULT_CONFIG={"POST_METHOD":{key:"postmethod",value:"async"},"POST_DATA":{key:"postdata",value:null},"BUTTONS":{key:"buttons",value:"none",supercedes:["visible"]},"HIDEAFTERSUBMIT":{key:"hideaftersubmit",value:true}};Dialog.CSS_DIALOG="yui-dialog";function removeButtonEventHandlers(){var aButtons=this._aButtons,nButtons,oButton,i;if(Lang.isArray(aButtons)){nButtons=aButtons.length;if(nButtons>0){i=nButtons-1;do{oButton=aButtons[i];if(YAHOO.widget.Button&&oButton instanceof YAHOO.widget.Button){oButton.destroy()}else if(oButton.tagName.toUpperCase()=="BUTTON"){Event.purgeElement(oButton);Event.purgeElement(oButton,false)}}while(i--)}}}YAHOO.extend(Dialog,YAHOO.widget.Panel,{form:null,initDefaultConfig:function(){Dialog.superclass.initDefaultConfig.call(this);this.callback={success:null,failure:null,argument:null};this.cfg.addProperty(DEFAULT_CONFIG.POST_METHOD.key,{handler:this.configPostMethod,value:DEFAULT_CONFIG.POST_METHOD.value,validator:function(val){if(val!="form"&&val!="async"&&val!="none"&&val!="manual"){return false}else{return true}}});this.cfg.addProperty(DEFAULT_CONFIG.POST_DATA.key,{value:DEFAULT_CONFIG.POST_DATA.value});this.cfg.addProperty(DEFAULT_CONFIG.HIDEAFTERSUBMIT.key,{value:DEFAULT_CONFIG.HIDEAFTERSUBMIT.value});this.cfg.addProperty(DEFAULT_CONFIG.BUTTONS.key,{handler:this.configButtons,value:DEFAULT_CONFIG.BUTTONS.value,supercedes:DEFAULT_CONFIG.BUTTONS.supercedes})},initEvents:function(){Dialog.superclass.initEvents.call(this);var SIGNATURE=CustomEvent.LIST;this.beforeSubmitEvent=this.createEvent(EVENT_TYPES.BEFORE_SUBMIT);this.beforeSubmitEvent.signature=SIGNATURE;this.submitEvent=this.createEvent(EVENT_TYPES.SUBMIT);this.submitEvent.signature=SIGNATURE;this.manualSubmitEvent=this.createEvent(EVENT_TYPES.MANUAL_SUBMIT);this.manualSubmitEvent.signature=SIGNATURE;this.asyncSubmitEvent=this.createEvent(EVENT_TYPES.ASYNC_SUBMIT);this.asyncSubmitEvent.signature=SIGNATURE;this.formSubmitEvent=this.createEvent(EVENT_TYPES.FORM_SUBMIT);this.formSubmitEvent.signature=SIGNATURE;this.cancelEvent=this.createEvent(EVENT_TYPES.CANCEL);this.cancelEvent.signature=SIGNATURE},init:function(el,userConfig){Dialog.superclass.init.call(this,el);this.beforeInitEvent.fire(Dialog);Dom.addClass(this.element,Dialog.CSS_DIALOG);this.cfg.setProperty("visible",false);if(userConfig){this.cfg.applyConfig(userConfig,true)}this.showEvent.subscribe(this.focusFirst,this,true);this.beforeHideEvent.subscribe(this.blurButtons,this,true);this.subscribe("changeBody",this.registerForm);this.initEvent.fire(Dialog)},doSubmit:function(){var Connect=YAHOO.util.Connect,oForm=this.form,bUseFileUpload=false,bUseSecureFileUpload=false,aElements,nElements,i,formAttrs;switch(this.cfg.getProperty("postmethod")){case"async":aElements=oForm.elements;nElements=aElements.length;if(nElements>0){i=nElements-1;do{if(aElements[i].type=="file"){bUseFileUpload=true;break}}while(i--)}if(bUseFileUpload&&YAHOO.env.ua.ie&&this.isSecure){bUseSecureFileUpload=true}formAttrs=this._getFormAttributes(oForm);Connect.setForm(oForm,bUseFileUpload,bUseSecureFileUpload);var postData=this.cfg.getProperty("postdata");var c=Connect.asyncRequest(formAttrs.method,formAttrs.action,this.callback,postData);this.asyncSubmitEvent.fire(c);break;case"form":oForm.submit();this.formSubmitEvent.fire();break;case"none":case"manual":this.manualSubmitEvent.fire();break}},_getFormAttributes:function(oForm){var attrs={method:null,action:null};if(oForm){if(oForm.getAttributeNode){var action=oForm.getAttributeNode("action");var method=oForm.getAttributeNode("method");if(action){attrs.action=action.value}if(method){attrs.method=method.value}}else{attrs.action=oForm.getAttribute("action");attrs.method=oForm.getAttribute("method")}}attrs.method=(Lang.isString(attrs.method)?attrs.method:"POST").toUpperCase();attrs.action=Lang.isString(attrs.action)?attrs.action:"";return attrs},registerForm:function(){var form=this.element.getElementsByTagName("form")[0];if(this.form){if(this.form==form&&Dom.isAncestor(this.element,this.form)){return}else{Event.purgeElement(this.form);this.form=null}}if(!form){form=document.createElement("form");form.name="frm_"+this.id;this.body.appendChild(form)}if(form){this.form=form;Event.on(form,"submit",this._submitHandler,this,true)}},_submitHandler:function(e){Event.stopEvent(e);this.submit();this.form.blur()},setTabLoop:function(firstElement,lastElement){firstElement=firstElement||this.firstButton;lastElement=this.lastButton||lastElement;Dialog.superclass.setTabLoop.call(this,firstElement,lastElement)},setFirstLastFocusable:function(){Dialog.superclass.setFirstLastFocusable.call(this);var i,l,el,elements=this.focusableElements;this.firstFormElement=null;this.lastFormElement=null;if(this.form&&elements&&elements.length>0){l=elements.length;for(i=0;i<l;++i){el=elements[i];if(this.form===el.form){this.firstFormElement=el;break}}for(i=l-1;i>=0;--i){el=elements[i];if(this.form===el.form){this.lastFormElement=el;break}}}},configClose:function(type,args,obj){Dialog.superclass.configClose.apply(this,arguments)},_doClose:function(e){Event.preventDefault(e);this.cancel()},configButtons:function(type,args,obj){var Button=YAHOO.widget.Button,aButtons=args[0],oInnerElement=this.innerElement,oButton,oButtonEl,oYUIButton,nButtons,oSpan,oFooter,i;removeButtonEventHandlers.call(this);this._aButtons=null;if(Lang.isArray(aButtons)){oSpan=document.createElement("span");oSpan.className="button-group";nButtons=aButtons.length;this._aButtons=[];this.defaultHtmlButton=null;for(i=0;i<nButtons;i++){oButton=aButtons[i];if(Button){oYUIButton=new Button({label:oButton.text});oYUIButton.appendTo(oSpan);oButtonEl=oYUIButton.get("element");if(oButton.isDefault){oYUIButton.addClass("default");this.defaultHtmlButton=oButtonEl}if(Lang.isFunction(oButton.handler)){oYUIButton.set("onclick",{fn:oButton.handler,obj:this,scope:this})}else if(Lang.isObject(oButton.handler)&&Lang.isFunction(oButton.handler.fn)){oYUIButton.set("onclick",{fn:oButton.handler.fn,obj:((!Lang.isUndefined(oButton.handler.obj))?oButton.handler.obj:this),scope:(oButton.handler.scope||this)})}this._aButtons[this._aButtons.length]=oYUIButton}else{oButtonEl=document.createElement("button");oButtonEl.setAttribute("type","button");if(oButton.isDefault){oButtonEl.className="default";this.defaultHtmlButton=oButtonEl}oButtonEl.innerHTML=oButton.text;if(Lang.isFunction(oButton.handler)){Event.on(oButtonEl,"click",oButton.handler,this,true)}else if(Lang.isObject(oButton.handler)&&Lang.isFunction(oButton.handler.fn)){Event.on(oButtonEl,"click",oButton.handler.fn,((!Lang.isUndefined(oButton.handler.obj))?oButton.handler.obj:this),(oButton.handler.scope||this))}oSpan.appendChild(oButtonEl);this._aButtons[this._aButtons.length]=oButtonEl}oButton.htmlButton=oButtonEl;if(i===0){this.firstButton=oButtonEl}if(i==(nButtons-1)){this.lastButton=oButtonEl}}this.setFooter(oSpan);oFooter=this.footer;if(Dom.inDocument(this.element)&&!Dom.isAncestor(oInnerElement,oFooter)){oInnerElement.appendChild(oFooter)}this.buttonSpan=oSpan}else{oSpan=this.buttonSpan;oFooter=this.footer;if(oSpan&&oFooter){oFooter.removeChild(oSpan);this.buttonSpan=null;this.firstButton=null;this.lastButton=null;this.defaultHtmlButton=null}}this.changeContentEvent.fire()},getButtons:function(){return this._aButtons||null},focusFirst:function(type,args,obj){var el=this.firstFormElement;if(args&&args[1]){Event.stopEvent(args[1])}if(el){try{el.focus()}catch(oException){}}else{if(this.defaultHtmlButton){this.focusDefaultButton()}else{this.focusFirstButton()}}},focusLast:function(type,args,obj){var aButtons=this.cfg.getProperty("buttons"),el=this.lastFormElement;if(args&&args[1]){Event.stopEvent(args[1])}if(aButtons&&Lang.isArray(aButtons)){this.focusLastButton()}else{if(el){try{el.focus()}catch(oException){}}}},_getButton:function(button){var Button=YAHOO.widget.Button;if(Button&&button&&button.nodeName&&button.id){button=Button.getButton(button.id)||button}return button},focusDefaultButton:function(){var button=this._getButton(this.defaultHtmlButton);if(button){try{button.focus()}catch(oException){}}},blurButtons:function(){var aButtons=this.cfg.getProperty("buttons"),nButtons,oButton,oElement,i;if(aButtons&&Lang.isArray(aButtons)){nButtons=aButtons.length;if(nButtons>0){i=(nButtons-1);do{oButton=aButtons[i];if(oButton){oElement=this._getButton(oButton.htmlButton);if(oElement){try{oElement.blur()}catch(oException){}}}}while(i--)}}},focusFirstButton:function(){var aButtons=this.cfg.getProperty("buttons"),oButton,oElement;if(aButtons&&Lang.isArray(aButtons)){oButton=aButtons[0];if(oButton){oElement=this._getButton(oButton.htmlButton);if(oElement){try{oElement.focus()}catch(oException){}}}}},focusLastButton:function(){var aButtons=this.cfg.getProperty("buttons"),nButtons,oButton,oElement;if(aButtons&&Lang.isArray(aButtons)){nButtons=aButtons.length;if(nButtons>0){oButton=aButtons[(nButtons-1)];if(oButton){oElement=this._getButton(oButton.htmlButton);if(oElement){try{oElement.focus()}catch(oException){}}}}}},configPostMethod:function(type,args,obj){this.registerForm()},validate:function(){return true},submit:function(){if(this.validate()){this.beforeSubmitEvent.fire();this.doSubmit();this.submitEvent.fire();if(this.cfg.getProperty("hideaftersubmit")){this.hide()}return true}else{return false}},cancel:function(){this.cancelEvent.fire();this.hide()},getData:function(){var oForm=this.form,aElements,nTotalElements,oData,sName,oElement,nElements,sType,sTagName,aOptions,nOptions,aValues,oOption,sValue,oRadio,oCheckbox,i,n;function isFormElement(p_oElement){var sTag=p_oElement.tagName.toUpperCase();return((sTag=="INPUT"||sTag=="TEXTAREA"||sTag=="SELECT")&&p_oElement.name==sName)}if(oForm){aElements=oForm.elements;nTotalElements=aElements.length;oData={};for(i=0;i<nTotalElements;i++){sName=aElements[i].name;oElement=Dom.getElementsBy(isFormElement,"*",oForm);nElements=oElement.length;if(nElements>0){if(nElements==1){oElement=oElement[0];sType=oElement.type;sTagName=oElement.tagName.toUpperCase();switch(sTagName){case"INPUT":if(sType=="checkbox"){oData[sName]=oElement.checked}else if(sType!="radio"){oData[sName]=oElement.value}break;case"TEXTAREA":oData[sName]=oElement.value;break;case"SELECT":aOptions=oElement.options;nOptions=aOptions.length;aValues=[];for(n=0;n<nOptions;n++){oOption=aOptions[n];if(oOption.selected){sValue=oOption.value;if(!sValue||sValue===""){sValue=oOption.text}aValues[aValues.length]=sValue}}oData[sName]=aValues;break}}else{sType=oElement[0].type;switch(sType){case"radio":for(n=0;n<nElements;n++){oRadio=oElement[n];if(oRadio.checked){oData[sName]=oRadio.value;break}}break;case"checkbox":aValues=[];for(n=0;n<nElements;n++){oCheckbox=oElement[n];if(oCheckbox.checked){aValues[aValues.length]=oCheckbox.value}}oData[sName]=aValues;break}}}}}return oData},destroy:function(){removeButtonEventHandlers.call(this);this._aButtons=null;var aForms=this.element.getElementsByTagName("form"),oForm;if(aForms.length>0){oForm=aForms[0];if(oForm){Event.purgeElement(oForm);if(oForm.parentNode){oForm.parentNode.removeChild(oForm)}this.form=null}}Dialog.superclass.destroy.call(this)},toString:function(){return"Dialog "+this.id}})}());(function(){YAHOO.widget.SimpleDialog=function(el,userConfig){YAHOO.widget.SimpleDialog.superclass.constructor.call(this,el,userConfig)};var Dom=YAHOO.util.Dom,SimpleDialog=YAHOO.widget.SimpleDialog,DEFAULT_CONFIG={"ICON":{key:"icon",value:"none",suppressEvent:true},"TEXT":{key:"text",value:"",suppressEvent:true,supercedes:["icon"]}};SimpleDialog.ICON_BLOCK="blckicon";SimpleDialog.ICON_ALARM="alrticon";SimpleDialog.ICON_HELP="hlpicon";SimpleDialog.ICON_INFO="infoicon";SimpleDialog.ICON_WARN="warnicon";SimpleDialog.ICON_TIP="tipicon";SimpleDialog.ICON_CSS_CLASSNAME="yui-icon";SimpleDialog.CSS_SIMPLEDIALOG="yui-simple-dialog";YAHOO.extend(SimpleDialog,YAHOO.widget.Dialog,{initDefaultConfig:function(){SimpleDialog.superclass.initDefaultConfig.call(this);this.cfg.addProperty(DEFAULT_CONFIG.ICON.key,{handler:this.configIcon,value:DEFAULT_CONFIG.ICON.value,suppressEvent:DEFAULT_CONFIG.ICON.suppressEvent});this.cfg.addProperty(DEFAULT_CONFIG.TEXT.key,{handler:this.configText,value:DEFAULT_CONFIG.TEXT.value,suppressEvent:DEFAULT_CONFIG.TEXT.suppressEvent,supercedes:DEFAULT_CONFIG.TEXT.supercedes})},init:function(el,userConfig){SimpleDialog.superclass.init.call(this,el);this.beforeInitEvent.fire(SimpleDialog);Dom.addClass(this.element,SimpleDialog.CSS_SIMPLEDIALOG);this.cfg.queueProperty("postmethod","manual");if(userConfig){this.cfg.applyConfig(userConfig,true)}this.beforeRenderEvent.subscribe(function(){if(!this.body){this.setBody("")}},this,true);this.initEvent.fire(SimpleDialog)},registerForm:function(){SimpleDialog.superclass.registerForm.call(this);this.form.innerHTML+="<input type=\"hidden\" name=\""+this.id+"\" value=\"\"/>"},configIcon:function(type,args,obj){var sIcon=args[0],oBody=this.body,sCSSClass=SimpleDialog.ICON_CSS_CLASSNAME,oIcon,oIconParent;if(sIcon&&sIcon!="none"){oIcon=Dom.getElementsByClassName(sCSSClass,"*",oBody);if(oIcon){oIconParent=oIcon.parentNode;if(oIconParent){oIconParent.removeChild(oIcon);oIcon=null}}if(sIcon.indexOf(".")==-1){oIcon=document.createElement("span");oIcon.className=(sCSSClass+" "+sIcon);oIcon.innerHTML="&#160;"}else{oIcon=document.createElement("img");oIcon.src=(this.imageRoot+sIcon);oIcon.className=sCSSClass}if(oIcon){oBody.insertBefore(oIcon,oBody.firstChild)}}},configText:function(type,args,obj){var text=args[0];if(text){this.setBody(text);this.cfg.refireEvent("icon")}},toString:function(){return"SimpleDialog "+this.id}})}());(function(){YAHOO.widget.ContainerEffect=function(overlay,attrIn,attrOut,targetElement,animClass){if(!animClass){animClass=YAHOO.util.Anim}this.overlay=overlay;this.attrIn=attrIn;this.attrOut=attrOut;this.targetElement=targetElement||overlay.element;this.animClass=animClass};var Dom=YAHOO.util.Dom,CustomEvent=YAHOO.util.CustomEvent,ContainerEffect=YAHOO.widget.ContainerEffect;ContainerEffect.FADE=function(overlay,dur){var Easing=YAHOO.util.Easing,fin={attributes:{opacity:{from:0,to:1}},duration:dur,method:Easing.easeIn},fout={attributes:{opacity:{to:0}},duration:dur,method:Easing.easeOut},fade=new ContainerEffect(overlay,fin,fout,overlay.element);fade.handleUnderlayStart=function(){var underlay=this.overlay.underlay;if(underlay&&YAHOO.env.ua.ie){var hasFilters=(underlay.filters&&underlay.filters.length>0);if(hasFilters){Dom.addClass(overlay.element,"yui-effect-fade")}}};fade.handleUnderlayComplete=function(){var underlay=this.overlay.underlay;if(underlay&&YAHOO.env.ua.ie){Dom.removeClass(overlay.element,"yui-effect-fade")}};fade.handleStartAnimateIn=function(type,args,obj){Dom.addClass(obj.overlay.element,"hide-select");if(!obj.overlay.underlay){obj.overlay.cfg.refireEvent("underlay")}obj.handleUnderlayStart();obj.overlay._setDomVisibility(true);Dom.setStyle(obj.overlay.element,"opacity",0)};fade.handleCompleteAnimateIn=function(type,args,obj){Dom.removeClass(obj.overlay.element,"hide-select");if(obj.overlay.element.style.filter){obj.overlay.element.style.filter=null}obj.handleUnderlayComplete();obj.overlay.cfg.refireEvent("iframe");obj.animateInCompleteEvent.fire()};fade.handleStartAnimateOut=function(type,args,obj){Dom.addClass(obj.overlay.element,"hide-select");obj.handleUnderlayStart()};fade.handleCompleteAnimateOut=function(type,args,obj){Dom.removeClass(obj.overlay.element,"hide-select");if(obj.overlay.element.style.filter){obj.overlay.element.style.filter=null}obj.overlay._setDomVisibility(false);Dom.setStyle(obj.overlay.element,"opacity",1);obj.handleUnderlayComplete();obj.overlay.cfg.refireEvent("iframe");obj.animateOutCompleteEvent.fire()};fade.init();return fade};ContainerEffect.SLIDE=function(overlay,dur){var Easing=YAHOO.util.Easing,x=overlay.cfg.getProperty("x")||Dom.getX(overlay.element),y=overlay.cfg.getProperty("y")||Dom.getY(overlay.element),clientWidth=Dom.getClientWidth(),offsetWidth=overlay.element.offsetWidth,sin={attributes:{points:{to:[x,y]}},duration:dur,method:Easing.easeIn},sout={attributes:{points:{to:[(clientWidth+25),y]}},duration:dur,method:Easing.easeOut},slide=new ContainerEffect(overlay,sin,sout,overlay.element,YAHOO.util.Motion);slide.handleStartAnimateIn=function(type,args,obj){obj.overlay.element.style.left=((-25)-offsetWidth)+"px";obj.overlay.element.style.top=y+"px"};slide.handleTweenAnimateIn=function(type,args,obj){var pos=Dom.getXY(obj.overlay.element),currentX=pos[0],currentY=pos[1];if(Dom.getStyle(obj.overlay.element,"visibility")=="hidden"&&currentX<x){obj.overlay._setDomVisibility(true)}obj.overlay.cfg.setProperty("xy",[currentX,currentY],true);obj.overlay.cfg.refireEvent("iframe")};slide.handleCompleteAnimateIn=function(type,args,obj){obj.overlay.cfg.setProperty("xy",[x,y],true);obj.startX=x;obj.startY=y;obj.overlay.cfg.refireEvent("iframe");obj.animateInCompleteEvent.fire()};slide.handleStartAnimateOut=function(type,args,obj){var vw=Dom.getViewportWidth(),pos=Dom.getXY(obj.overlay.element),yso=pos[1];obj.animOut.attributes.points.to=[(vw+25),yso]};slide.handleTweenAnimateOut=function(type,args,obj){var pos=Dom.getXY(obj.overlay.element),xto=pos[0],yto=pos[1];obj.overlay.cfg.setProperty("xy",[xto,yto],true);obj.overlay.cfg.refireEvent("iframe")};slide.handleCompleteAnimateOut=function(type,args,obj){obj.overlay._setDomVisibility(false);obj.overlay.cfg.setProperty("xy",[x,y]);obj.animateOutCompleteEvent.fire()};slide.init();return slide};ContainerEffect.prototype={init:function(){this.beforeAnimateInEvent=this.createEvent("beforeAnimateIn");this.beforeAnimateInEvent.signature=CustomEvent.LIST;this.beforeAnimateOutEvent=this.createEvent("beforeAnimateOut");this.beforeAnimateOutEvent.signature=CustomEvent.LIST;this.animateInCompleteEvent=this.createEvent("animateInComplete");this.animateInCompleteEvent.signature=CustomEvent.LIST;this.animateOutCompleteEvent=this.createEvent("animateOutComplete");this.animateOutCompleteEvent.signature=CustomEvent.LIST;this.animIn=new this.animClass(this.targetElement,this.attrIn.attributes,this.attrIn.duration,this.attrIn.method);this.animIn.onStart.subscribe(this.handleStartAnimateIn,this);this.animIn.onTween.subscribe(this.handleTweenAnimateIn,this);this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn,this);this.animOut=new this.animClass(this.targetElement,this.attrOut.attributes,this.attrOut.duration,this.attrOut.method);this.animOut.onStart.subscribe(this.handleStartAnimateOut,this);this.animOut.onTween.subscribe(this.handleTweenAnimateOut,this);this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut,this)},animateIn:function(){this.beforeAnimateInEvent.fire();this.animIn.animate()},animateOut:function(){this.beforeAnimateOutEvent.fire();this.animOut.animate()},handleStartAnimateIn:function(type,args,obj){},handleTweenAnimateIn:function(type,args,obj){},handleCompleteAnimateIn:function(type,args,obj){},handleStartAnimateOut:function(type,args,obj){},handleTweenAnimateOut:function(type,args,obj){},handleCompleteAnimateOut:function(type,args,obj){},toString:function(){var output="ContainerEffect";if(this.overlay){output+=" ["+this.overlay.toString()+"]"}return output}};YAHOO.lang.augmentProto(ContainerEffect,YAHOO.util.EventProvider)})();YAHOO.register("container",YAHOO.widget.Module,{version:"2.7.0",build:"1799"});/*
313 299 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
314 300 Code licensed under the BSD License:
315 301 http://developer.yahoo.net/yui/license.txt
316 302 version: 2.7.0
317 303 */
318 304 YAHOO.util.Attribute=function(B,A){if(A){this.owner=A;this.configure(B,true);}};YAHOO.util.Attribute.prototype={name:undefined,value:null,owner:null,readOnly:false,writeOnce:false,_initialConfig:null,_written:false,method:null,setter:null,getter:null,validator:null,getValue:function(){var A=this.value;if(this.getter){A=this.getter.call(this.owner,this.name);}return A;},setValue:function(F,B){var E,A=this.owner,C=this.name;var D={type:C,prevValue:this.getValue(),newValue:F};if(this.readOnly||(this.writeOnce&&this._written)){return false;}if(this.validator&&!this.validator.call(A,F)){return false;}if(!B){E=A.fireBeforeChangeEvent(D);if(E===false){return false;}}if(this.setter){F=this.setter.call(A,F,this.name);if(F===undefined){}}if(this.method){this.method.call(A,F,this.name);}this.value=F;this._written=true;D.type=C;if(!B){this.owner.fireChangeEvent(D);}return true;},configure:function(B,C){B=B||{};if(C){this._written=false;}this._initialConfig=this._initialConfig||{};for(var A in B){if(B.hasOwnProperty(A)){this[A]=B[A];if(C){this._initialConfig[A]=B[A];}}}},resetValue:function(){return this.setValue(this._initialConfig.value);},resetConfig:function(){this.configure(this._initialConfig,true);},refresh:function(A){this.setValue(this.value,A);}};(function(){var A=YAHOO.util.Lang;YAHOO.util.AttributeProvider=function(){};YAHOO.util.AttributeProvider.prototype={_configs:null,get:function(C){this._configs=this._configs||{};var B=this._configs[C];if(!B||!this._configs.hasOwnProperty(C)){return null;}return B.getValue();},set:function(D,E,B){this._configs=this._configs||{};var C=this._configs[D];if(!C){return false;}return C.setValue(E,B);},getAttributeKeys:function(){this._configs=this._configs;var C=[],B;for(B in this._configs){if(A.hasOwnProperty(this._configs,B)&&!A.isUndefined(this._configs[B])){C[C.length]=B;}}return C;},setAttributes:function(D,B){for(var C in D){if(A.hasOwnProperty(D,C)){this.set(C,D[C],B);}}},resetValue:function(C,B){this._configs=this._configs||{};if(this._configs[C]){this.set(C,this._configs[C]._initialConfig.value,B);return true;}return false;},refresh:function(E,C){this._configs=this._configs||{};var F=this._configs;E=((A.isString(E))?[E]:E)||this.getAttributeKeys();for(var D=0,B=E.length;D<B;++D){if(F.hasOwnProperty(E[D])){this._configs[E[D]].refresh(C);}}},register:function(B,C){this.setAttributeConfig(B,C);},getAttributeConfig:function(C){this._configs=this._configs||{};var B=this._configs[C]||{};var D={};for(C in B){if(A.hasOwnProperty(B,C)){D[C]=B[C];}}return D;},setAttributeConfig:function(B,C,D){this._configs=this._configs||{};C=C||{};if(!this._configs[B]){C.name=B;this._configs[B]=this.createAttribute(C);}else{this._configs[B].configure(C,D);}},configureAttribute:function(B,C,D){this.setAttributeConfig(B,C,D);},resetAttributeConfig:function(B){this._configs=this._configs||{};this._configs[B].resetConfig();},subscribe:function(B,C){this._events=this._events||{};if(!(B in this._events)){this._events[B]=this.createEvent(B);}YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments);},on:function(){this.subscribe.apply(this,arguments);},addListener:function(){this.subscribe.apply(this,arguments);},fireBeforeChangeEvent:function(C){var B="before";B+=C.type.charAt(0).toUpperCase()+C.type.substr(1)+"Change";C.type=B;return this.fireEvent(C.type,C);},fireChangeEvent:function(B){B.type+="Change";return this.fireEvent(B.type,B);},createAttribute:function(B){return new YAHOO.util.Attribute(B,this);}};YAHOO.augment(YAHOO.util.AttributeProvider,YAHOO.util.EventProvider);})();(function(){var B=YAHOO.util.Dom,C=YAHOO.util.AttributeProvider;var A=function(D,E){this.init.apply(this,arguments);};A.DOM_EVENTS={"click":true,"dblclick":true,"keydown":true,"keypress":true,"keyup":true,"mousedown":true,"mousemove":true,"mouseout":true,"mouseover":true,"mouseup":true,"focus":true,"blur":true,"submit":true,"change":true};A.prototype={DOM_EVENTS:null,DEFAULT_HTML_SETTER:function(F,D){var E=this.get("element");if(E){E[D]=F;}},DEFAULT_HTML_GETTER:function(D){var E=this.get("element"),F;if(E){F=E[D];}return F;},appendChild:function(D){D=D.get?D.get("element"):D;return this.get("element").appendChild(D);},getElementsByTagName:function(D){return this.get("element").getElementsByTagName(D);},hasChildNodes:function(){return this.get("element").hasChildNodes();},insertBefore:function(D,E){D=D.get?D.get("element"):D;E=(E&&E.get)?E.get("element"):E;return this.get("element").insertBefore(D,E);},removeChild:function(D){D=D.get?D.get("element"):D;return this.get("element").removeChild(D);},replaceChild:function(D,E){D=D.get?D.get("element"):D;E=E.get?E.get("element"):E;return this.get("element").replaceChild(D,E);},initAttributes:function(D){},addListener:function(H,G,I,F){var E=this.get("element")||this.get("id");F=F||this;var D=this;if(!this._events[H]){if(E&&this.DOM_EVENTS[H]){YAHOO.util.Event.addListener(E,H,function(J){if(J.srcElement&&!J.target){J.target=J.srcElement;}D.fireEvent(H,J);},I,F);}this.createEvent(H,this);}return YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments);},on:function(){return this.addListener.apply(this,arguments);},subscribe:function(){return this.addListener.apply(this,arguments);},removeListener:function(E,D){return this.unsubscribe.apply(this,arguments);},addClass:function(D){B.addClass(this.get("element"),D);},getElementsByClassName:function(E,D){return B.getElementsByClassName(E,D,this.get("element"));},hasClass:function(D){return B.hasClass(this.get("element"),D);},removeClass:function(D){return B.removeClass(this.get("element"),D);},replaceClass:function(E,D){return B.replaceClass(this.get("element"),E,D);},setStyle:function(E,D){return B.setStyle(this.get("element"),E,D);},getStyle:function(D){return B.getStyle(this.get("element"),D);},fireQueue:function(){var E=this._queue;for(var F=0,D=E.length;F<D;++F){this[E[F][0]].apply(this,E[F][1]);}},appendTo:function(E,F){E=(E.get)?E.get("element"):B.get(E);this.fireEvent("beforeAppendTo",{type:"beforeAppendTo",target:E});
319   -F=(F&&F.get)?F.get("element"):B.get(F);var D=this.get("element");if(!D){return false;}if(!E){return false;}if(D.parent!=E){if(F){E.insertBefore(D,F);}else{E.appendChild(D);}}this.fireEvent("appendTo",{type:"appendTo",target:E});return D;},get:function(D){var F=this._configs||{},E=F.element;if(E&&!F[D]&&!YAHOO.lang.isUndefined(E.value[D])){this._setHTMLAttrConfig(D);}return C.prototype.get.call(this,D);},setAttributes:function(J,G){var E={},H=this._configOrder;for(var I=0,D=H.length;I<D;++I){if(J[H[I]]!==undefined){E[H[I]]=true;this.set(H[I],J[H[I]],G);}}for(var F in J){if(J.hasOwnProperty(F)&&!E[F]){this.set(F,J[F],G);}}},set:function(E,G,D){var F=this.get("element");if(!F){this._queue[this._queue.length]=["set",arguments];if(this._configs[E]){this._configs[E].value=G;}return;}if(!this._configs[E]&&!YAHOO.lang.isUndefined(F[E])){this._setHTMLAttrConfig(E);}return C.prototype.set.apply(this,arguments);},setAttributeConfig:function(D,E,F){this._configOrder.push(D);C.prototype.setAttributeConfig.apply(this,arguments);},createEvent:function(E,D){this._events[E]=true;return C.prototype.createEvent.apply(this,arguments);},init:function(E,D){this._initElement(E,D);},destroy:function(){var D=this.get("element");YAHOO.util.Event.purgeElement(D,true);this.unsubscribeAll();if(D&&D.parentNode){D.parentNode.removeChild(D);}this._queue=[];this._events={};this._configs={};this._configOrder=[];},_initElement:function(F,E){this._queue=this._queue||[];this._events=this._events||{};this._configs=this._configs||{};this._configOrder=[];E=E||{};E.element=E.element||F||null;var H=false;var D=A.DOM_EVENTS;this.DOM_EVENTS=this.DOM_EVENTS||{};for(var G in D){if(D.hasOwnProperty(G)){this.DOM_EVENTS[G]=D[G];}}if(typeof E.element==="string"){this._setHTMLAttrConfig("id",{value:E.element});}if(B.get(E.element)){H=true;this._initHTMLElement(E);this._initContent(E);}YAHOO.util.Event.onAvailable(E.element,function(){if(!H){this._initHTMLElement(E);}this.fireEvent("available",{type:"available",target:B.get(E.element)});},this,true);YAHOO.util.Event.onContentReady(E.element,function(){if(!H){this._initContent(E);}this.fireEvent("contentReady",{type:"contentReady",target:B.get(E.element)});},this,true);},_initHTMLElement:function(D){this.setAttributeConfig("element",{value:B.get(D.element),readOnly:true});},_initContent:function(D){this.initAttributes(D);this.setAttributes(D,true);this.fireQueue();},_setHTMLAttrConfig:function(D,F){var E=this.get("element");F=F||{};F.name=D;F.setter=F.setter||this.DEFAULT_HTML_SETTER;F.getter=F.getter||this.DEFAULT_HTML_GETTER;F.value=F.value||E[D];this._configs[D]=new YAHOO.util.Attribute(F,this);}};YAHOO.augment(A,C);YAHOO.util.Element=A;})();YAHOO.register("element",YAHOO.util.Element,{version:"2.7.0",build:"1799"});
320   -/*
  305 +F=(F&&F.get)?F.get("element"):B.get(F);var D=this.get("element");if(!D){return false;}if(!E){return false;}if(D.parent!=E){if(F){E.insertBefore(D,F);}else{E.appendChild(D);}}this.fireEvent("appendTo",{type:"appendTo",target:E});return D;},get:function(D){var F=this._configs||{},E=F.element;if(E&&!F[D]&&!YAHOO.lang.isUndefined(E.value[D])){this._setHTMLAttrConfig(D);}return C.prototype.get.call(this,D);},setAttributes:function(J,G){var E={},H=this._configOrder;for(var I=0,D=H.length;I<D;++I){if(J[H[I]]!==undefined){E[H[I]]=true;this.set(H[I],J[H[I]],G);}}for(var F in J){if(J.hasOwnProperty(F)&&!E[F]){this.set(F,J[F],G);}}},set:function(E,G,D){var F=this.get("element");if(!F){this._queue[this._queue.length]=["set",arguments];if(this._configs[E]){this._configs[E].value=G;}return;}if(!this._configs[E]&&!YAHOO.lang.isUndefined(F[E])){this._setHTMLAttrConfig(E);}return C.prototype.set.apply(this,arguments);},setAttributeConfig:function(D,E,F){this._configOrder.push(D);C.prototype.setAttributeConfig.apply(this,arguments);},createEvent:function(E,D){this._events[E]=true;return C.prototype.createEvent.apply(this,arguments);},init:function(E,D){this._initElement(E,D);},destroy:function(){var D=this.get("element");YAHOO.util.Event.purgeElement(D,true);this.unsubscribeAll();if(D&&D.parentNode){D.parentNode.removeChild(D);}this._queue=[];this._events={};this._configs={};this._configOrder=[];},_initElement:function(F,E){this._queue=this._queue||[];this._events=this._events||{};this._configs=this._configs||{};this._configOrder=[];E=E||{};E.element=E.element||F||null;var H=false;var D=A.DOM_EVENTS;this.DOM_EVENTS=this.DOM_EVENTS||{};for(var G in D){if(D.hasOwnProperty(G)){this.DOM_EVENTS[G]=D[G];}}if(typeof E.element==="string"){this._setHTMLAttrConfig("id",{value:E.element});}if(B.get(E.element)){H=true;this._initHTMLElement(E);this._initContent(E);}YAHOO.util.Event.onAvailable(E.element,function(){if(!H){this._initHTMLElement(E);}this.fireEvent("available",{type:"available",target:B.get(E.element)});},this,true);YAHOO.util.Event.onContentReady(E.element,function(){if(!H){this._initContent(E);}this.fireEvent("contentReady",{type:"contentReady",target:B.get(E.element)});},this,true);},_initHTMLElement:function(D){this.setAttributeConfig("element",{value:B.get(D.element),readOnly:true});},_initContent:function(D){this.initAttributes(D);this.setAttributes(D,true);this.fireQueue();},_setHTMLAttrConfig:function(D,F){var E=this.get("element");F=F||{};F.name=D;F.setter=F.setter||this.DEFAULT_HTML_SETTER;F.getter=F.getter||this.DEFAULT_HTML_GETTER;F.value=F.value||E[D];this._configs[D]=new YAHOO.util.Attribute(F,this);}};YAHOO.augment(A,C);YAHOO.util.Element=A;})();YAHOO.register("element",YAHOO.util.Element,{version:"2.7.0",build:"1799"});/*
321 306 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
322 307 Code licensed under the BSD License:
323 308 http://developer.yahoo.net/yui/license.txt
324 309 version: 2.7.0
325 310 */
326 311 (function(){var B=YAHOO.util,C=B.Dom,H=B.Event,F=window.document,J="active",D="activeIndex",E="activeTab",A="contentEl",G="element",I=function(L,K){K=K||{};if(arguments.length==1&&!YAHOO.lang.isString(L)&&!L.nodeName){K=L;L=K.element||null;}if(!L&&!K.element){L=this._createTabViewElement(K);}I.superclass.constructor.call(this,L,K);};YAHOO.extend(I,B.Element,{CLASSNAME:"yui-navset",TAB_PARENT_CLASSNAME:"yui-nav",CONTENT_PARENT_CLASSNAME:"yui-content",_tabParent:null,_contentParent:null,addTab:function(P,L){var N=this.get("tabs"),Q=this.getTab(L),R=this._tabParent,K=this._contentParent,M=P.get(G),O=P.get(A);if(!N){this._queue[this._queue.length]=["addTab",arguments];return false;}L=(L===undefined)?N.length:L;if(Q){R.insertBefore(M,Q.get(G));}else{R.appendChild(M);}if(O&&!C.isAncestor(K,O)){K.appendChild(O);}if(!P.get(J)){P.set("contentVisible",false,true);}else{this.set(E,P,true);}this._initTabEvents(P);N.splice(L,0,P);},_initTabEvents:function(K){K.addListener(K.get("activationEvent"),K._onActivate,this,K);K.addListener("activationEventChange",function(L){if(L.prevValue!=L.newValue){K.removeListener(L.prevValue,K._onActivate);K.addListener(L.newValue,K._onActivate,this,K);}});},DOMEventHandler:function(P){var Q=H.getTarget(P),S=this._tabParent,R=this.get("tabs"),M,L,K;if(C.isAncestor(S,Q)){for(var N=0,O=R.length;N<O;N++){L=R[N].get(G);K=R[N].get(A);if(Q==L||C.isAncestor(L,Q)){M=R[N];break;}}if(M){M.fireEvent(P.type,P);}}},getTab:function(K){return this.get("tabs")[K];},getTabIndex:function(O){var L=null,N=this.get("tabs");for(var M=0,K=N.length;M<K;++M){if(O==N[M]){L=M;break;}}return L;},removeTab:function(M){var L=this.get("tabs").length,K=this.getTabIndex(M);if(M===this.get(E)){if(L>1){if(K+1===L){this.set(D,K-1);}else{this.set(D,K+1);}}else{this.set(E,null);}}this._tabParent.removeChild(M.get(G));this._contentParent.removeChild(M.get(A));this._configs.tabs.value.splice(K,1);M.fireEvent("remove",{type:"remove",tabview:this});},toString:function(){var K=this.get("id")||this.get("tagName");return"TabView "+K;},contentTransition:function(L,K){if(L){L.set("contentVisible",true);}if(K){K.set("contentVisible",false);}},initAttributes:function(K){I.superclass.initAttributes.call(this,K);if(!K.orientation){K.orientation="top";}var M=this.get(G);if(!C.hasClass(M,this.CLASSNAME)){C.addClass(M,this.CLASSNAME);}this.setAttributeConfig("tabs",{value:[],readOnly:true});this._tabParent=this.getElementsByClassName(this.TAB_PARENT_CLASSNAME,"ul")[0]||this._createTabParent();this._contentParent=this.getElementsByClassName(this.CONTENT_PARENT_CLASSNAME,"div")[0]||this._createContentParent();this.setAttributeConfig("orientation",{value:K.orientation,method:function(N){var O=this.get("orientation");this.addClass("yui-navset-"+N);if(O!=N){this.removeClass("yui-navset-"+O);}if(N==="bottom"){this.appendChild(this._tabParent);}}});this.setAttributeConfig(D,{value:K.activeIndex,method:function(N){},validator:function(O){var N=true;if(O&&this.getTab(O).get("disabled")){N=false;}return N;}});this.setAttributeConfig(E,{value:K.activeTab,method:function(O){var N=this.get(E);if(O){O.set(J,true);}if(N&&N!==O){N.set(J,false);}if(N&&O!==N){this.contentTransition(O,N);}else{if(O){O.set("contentVisible",true);}}},validator:function(O){var N=true;if(O&&O.get("disabled")){N=false;}return N;}});this.on("activeTabChange",this._onActiveTabChange);this.on("activeIndexChange",this._onActiveIndexChange);if(this._tabParent){this._initTabs();}this.DOM_EVENTS.submit=false;this.DOM_EVENTS.focus=false;this.DOM_EVENTS.blur=false;for(var L in this.DOM_EVENTS){if(YAHOO.lang.hasOwnProperty(this.DOM_EVENTS,L)){this.addListener.call(this,L,this.DOMEventHandler);}}},deselectTab:function(K){if(this.getTab(K)===this.get("activeTab")){this.set("activeTab",null);}},selectTab:function(K){this.set("activeTab",this.getTab(K));},_onActiveTabChange:function(M){var K=this.get(D),L=this.getTabIndex(M.newValue);if(K!==L){if(!(this.set(D,L))){this.set(E,M.prevValue);}}},_onActiveIndexChange:function(K){if(K.newValue!==this.getTabIndex(this.get(E))){if(!(this.set(E,this.getTab(K.newValue)))){this.set(D,K.prevValue);}}},_initTabs:function(){var P=C.getChildren(this._tabParent),N=C.getChildren(this._contentParent),M=this.get(D),Q,L,R;for(var O=0,K=P.length;O<K;++O){L={};if(N[O]){L.contentEl=N[O];}Q=new YAHOO.widget.Tab(P[O],L);this.addTab(Q);if(Q.hasClass(Q.ACTIVE_CLASSNAME)){R=Q;}}if(M){this.set(E,this.getTab(M));}else{this._configs.activeTab.value=R;this._configs.activeIndex.value=this.getTabIndex(R);}},_createTabViewElement:function(K){var L=F.createElement("div");if(this.CLASSNAME){L.className=this.CLASSNAME;}return L;},_createTabParent:function(K){var L=F.createElement("ul");if(this.TAB_PARENT_CLASSNAME){L.className=this.TAB_PARENT_CLASSNAME;}this.get(G).appendChild(L);return L;},_createContentParent:function(K){var L=F.createElement("div");if(this.CONTENT_PARENT_CLASSNAME){L.className=this.CONTENT_PARENT_CLASSNAME;}this.get(G).appendChild(L);return L;}});YAHOO.widget.TabView=I;})();(function(){var D=YAHOO.util,I=D.Dom,L=YAHOO.lang,M="activeTab",J="label",G="labelEl",Q="content",C="contentEl",O="element",P="cacheData",B="dataSrc",H="dataLoaded",A="dataTimeout",N="loadMethod",F="postData",K="disabled",E=function(S,R){R=R||{};if(arguments.length==1&&!L.isString(S)&&!S.nodeName){R=S;S=R.element;}if(!S&&!R.element){S=this._createTabElement(R);}this.loadHandler={success:function(T){this.set(Q,T.responseText);},failure:function(T){}};E.superclass.constructor.call(this,S,R);this.DOM_EVENTS={};};YAHOO.extend(E,YAHOO.util.Element,{LABEL_TAGNAME:"em",ACTIVE_CLASSNAME:"selected",HIDDEN_CLASSNAME:"yui-hidden",ACTIVE_TITLE:"active",DISABLED_CLASSNAME:K,LOADING_CLASSNAME:"loading",dataConnection:null,loadHandler:null,_loading:false,toString:function(){var R=this.get(O),S=R.id||R.tagName;return"Tab "+S;},initAttributes:function(R){R=R||{};E.superclass.initAttributes.call(this,R);this.setAttributeConfig("activationEvent",{value:R.activationEvent||"click"});this.setAttributeConfig(G,{value:R[G]||this._getLabelEl(),method:function(S){S=I.get(S);
327   -var T=this.get(G);if(T){if(T==S){return false;}T.parentNode.replaceChild(S,T);this.set(J,S.innerHTML);}}});this.setAttributeConfig(J,{value:R.label||this._getLabel(),method:function(T){var S=this.get(G);if(!S){this.set(G,this._createLabelEl());}S.innerHTML=T;}});this.setAttributeConfig(C,{value:R[C]||document.createElement("div"),method:function(S){S=I.get(S);var T=this.get(C);if(T){if(T===S){return false;}if(!this.get("selected")){I.addClass(S,"yui-hidden");}T.parentNode.replaceChild(S,T);this.set(Q,S.innerHTML);}}});this.setAttributeConfig(Q,{value:R[Q],method:function(S){this.get(C).innerHTML=S;}});this.setAttributeConfig(B,{value:R.dataSrc});this.setAttributeConfig(P,{value:R.cacheData||false,validator:L.isBoolean});this.setAttributeConfig(N,{value:R.loadMethod||"GET",validator:L.isString});this.setAttributeConfig(H,{value:false,validator:L.isBoolean,writeOnce:true});this.setAttributeConfig(A,{value:R.dataTimeout||null,validator:L.isNumber});this.setAttributeConfig(F,{value:R.postData||null});this.setAttributeConfig("active",{value:R.active||this.hasClass(this.ACTIVE_CLASSNAME),method:function(S){if(S===true){this.addClass(this.ACTIVE_CLASSNAME);this.set("title",this.ACTIVE_TITLE);}else{this.removeClass(this.ACTIVE_CLASSNAME);this.set("title","");}},validator:function(S){return L.isBoolean(S)&&!this.get(K);}});this.setAttributeConfig(K,{value:R.disabled||this.hasClass(this.DISABLED_CLASSNAME),method:function(S){if(S===true){I.addClass(this.get(O),this.DISABLED_CLASSNAME);}else{I.removeClass(this.get(O),this.DISABLED_CLASSNAME);}},validator:L.isBoolean});this.setAttributeConfig("href",{value:R.href||this.getElementsByTagName("a")[0].getAttribute("href",2)||"#",method:function(S){this.getElementsByTagName("a")[0].href=S;},validator:L.isString});this.setAttributeConfig("contentVisible",{value:R.contentVisible,method:function(S){if(S){I.removeClass(this.get(C),this.HIDDEN_CLASSNAME);if(this.get(B)){if(!this._loading&&!(this.get(H)&&this.get(P))){this._dataConnect();}}}else{I.addClass(this.get(C),this.HIDDEN_CLASSNAME);}},validator:L.isBoolean});},_dataConnect:function(){if(!D.Connect){return false;}I.addClass(this.get(C).parentNode,this.LOADING_CLASSNAME);this._loading=true;this.dataConnection=D.Connect.asyncRequest(this.get(N),this.get(B),{success:function(R){this.loadHandler.success.call(this,R);this.set(H,true);this.dataConnection=null;I.removeClass(this.get(C).parentNode,this.LOADING_CLASSNAME);this._loading=false;},failure:function(R){this.loadHandler.failure.call(this,R);this.dataConnection=null;I.removeClass(this.get(C).parentNode,this.LOADING_CLASSNAME);this._loading=false;},scope:this,timeout:this.get(A)},this.get(F));},_createTabElement:function(R){var V=document.createElement("li"),S=document.createElement("a"),U=R.label||null,T=R.labelEl||null;S.href=R.href||"#";V.appendChild(S);if(T){if(!U){U=this._getLabel();}}else{T=this._createLabelEl();}S.appendChild(T);return V;},_getLabelEl:function(){return this.getElementsByTagName(this.LABEL_TAGNAME)[0];},_createLabelEl:function(){var R=document.createElement(this.LABEL_TAGNAME);return R;},_getLabel:function(){var R=this.get(G);if(!R){return undefined;}return R.innerHTML;},_onActivate:function(U,T){var S=this,R=false;D.Event.preventDefault(U);if(S===T.get(M)){R=true;}T.set(M,S,R);}});YAHOO.widget.Tab=E;})();YAHOO.register("tabview",YAHOO.widget.TabView,{version:"2.7.0",build:"1799"});
328   -(function(){var Dom=YAHOO.util.Dom,Event=YAHOO.util.Event,Lang=YAHOO.lang,Widget=YAHOO.widget;YAHOO.widget.TreeView=function(id,oConfig){if(id){this.init(id)}if(oConfig){if(!Lang.isArray(oConfig)){oConfig=[oConfig]}this.buildTreeFromObject(oConfig)}else if(Lang.trim(this._el.innerHTML)){this.buildTreeFromMarkup(id)}};var TV=Widget.TreeView;TV.prototype={id:null,_el:null,_nodes:null,locked:false,_expandAnim:null,_collapseAnim:null,_animCount:0,maxAnim:2,_hasDblClickSubscriber:false,_dblClickTimer:null,currentFocus:null,singleNodeHighlight:false,_currentlyHighlighted:null,setExpandAnim:function(type){this._expandAnim=(Widget.TVAnim.isValid(type))?type:null},setCollapseAnim:function(type){this._collapseAnim=(Widget.TVAnim.isValid(type))?type:null},animateExpand:function(el,node){if(this._expandAnim&&this._animCount<this.maxAnim){var tree=this;var a=Widget.TVAnim.getAnim(this._expandAnim,el,function(){tree.expandComplete(node)});if(a){++this._animCount;this.fireEvent("animStart",{"node":node,"type":"expand"});a.animate()}return true}return false},animateCollapse:function(el,node){if(this._collapseAnim&&this._animCount<this.maxAnim){var tree=this;var a=Widget.TVAnim.getAnim(this._collapseAnim,el,function(){tree.collapseComplete(node)});if(a){++this._animCount;this.fireEvent("animStart",{"node":node,"type":"collapse"});a.animate()}return true}return false},expandComplete:function(node){--this._animCount;this.fireEvent("animComplete",{"node":node,"type":"expand"})},collapseComplete:function(node){--this._animCount;this.fireEvent("animComplete",{"node":node,"type":"collapse"})},init:function(id){this._el=Dom.get(id);this.id=Dom.generateId(this._el,"yui-tv-auto-id-");this.createEvent("animStart",this);this.createEvent("animComplete",this);this.createEvent("collapse",this);this.createEvent("collapseComplete",this);this.createEvent("expand",this);this.createEvent("expandComplete",this);this.createEvent("enterKeyPressed",this);this.createEvent("clickEvent",this);this.createEvent('focusChanged',this);var self=this;this.createEvent("dblClickEvent",{scope:this,onSubscribeCallback:function(){self._hasDblClickSubscriber=true}});this.createEvent("labelClick",this);this.createEvent("highlightEvent",this);this._nodes=[];TV.trees[this.id]=this;this.root=new Widget.RootNode(this);var LW=Widget.LogWriter},buildTreeFromObject:function(oConfig){var build=function(parent,oConfig){var i,item,node,children,type,NodeType,ThisType;for(i=0;i<oConfig.length;i++){item=oConfig[i];if(Lang.isString(item)){node=new Widget.TextNode(item,parent)}else if(Lang.isObject(item)){children=item.children;delete item.children;type=item.type||'text';delete item.type;switch(Lang.isString(type)&&type.toLowerCase()){case'text':node=new Widget.TextNode(item,parent);break;case'menu':node=new Widget.MenuNode(item,parent);break;case'html':node=new Widget.HTMLNode(item,parent);break;default:if(Lang.isString(type)){NodeType=Widget[type]}else{NodeType=type}if(Lang.isObject(NodeType)){for(ThisType=NodeType;ThisType&&ThisType!==Widget.Node;ThisType=ThisType.superclass.constructor){}if(ThisType){node=new NodeType(item,parent)}else{}}else{}}if(children){build(node,children)}}else{}}};build(this.root,oConfig)},buildTreeFromMarkup:function(id){var build=function(markup){var el,child,branch=[],config={},label,yuiConfig;for(el=Dom.getFirstChild(markup);el;el=Dom.getNextSibling(el)){switch(el.tagName.toUpperCase()){case'LI':label='';config={expanded:Dom.hasClass(el,'expanded'),title:el.title||el.alt||null,className:Lang.trim(el.className.replace(/\bexpanded\b/,''))||null};child=el.firstChild;if(child.nodeType==3){label=Lang.trim(child.nodeValue.replace(/[\n\t\r]*/g,''));if(label){config.type='text';config.label=label}else{child=Dom.getNextSibling(child)}}if(!label){if(child.tagName.toUpperCase()=='A'){config.type='text';config.label=child.innerHTML;config.href=child.href;config.target=child.target;config.title=child.title||child.alt||config.title}else{config.type='html';var d=document.createElement('div');d.appendChild(child.cloneNode(true));config.html=d.innerHTML;config.hasIcon=true}}child=Dom.getNextSibling(child);switch(child&&child.tagName.toUpperCase()){case'UL':case'OL':config.children=build(child);break}if(YAHOO.lang.JSON){yuiConfig=el.getAttribute('yuiConfig');if(yuiConfig){yuiConfig=YAHOO.lang.JSON.parse(yuiConfig);config=YAHOO.lang.merge(config,yuiConfig)}}branch.push(config);break;case'UL':case'OL':config={type:'text',label:'',children:build(child)};branch.push(config);break}}return branch};var markup=Dom.getChildrenBy(Dom.get(id),function(el){var tag=el.tagName.toUpperCase();return tag=='UL'||tag=='OL'});if(markup.length){this.buildTreeFromObject(build(markup[0]))}else{}},_getEventTargetTdEl:function(ev){var target=Event.getTarget(ev);while(target&&!(target.tagName.toUpperCase()=='TD'&&Dom.hasClass(target.parentNode,'ygtvrow'))){target=Dom.getAncestorByTagName(target,'td')}if(Lang.isNull(target)){return null}if(/\bygtv(blank)?depthcell/.test(target.className)){return null}if(target.id){var m=target.id.match(/\bygtv([^\d]*)(.*)/);if(m&&m[2]&&this._nodes[m[2]]){return target}}return null},_onClickEvent:function(ev){var self=this,td=this._getEventTargetTdEl(ev),node,target,toggle=function(){node.toggle();node.focus();try{Event.preventDefault(ev)}catch(e){}};if(!td){return}node=this.getNodeByElement(td);if(!node){return}target=Event.getTarget(ev);if(Dom.hasClass(target,node.labelStyle)||Dom.getAncestorByClassName(target,node.labelStyle)){this.fireEvent('labelClick',node)}if(/\bygtv[tl][mp]h?h?/.test(td.className)){toggle()}else{if(this._dblClickTimer){window.clearTimeout(this._dblClickTimer);this._dblClickTimer=null}else{if(this._hasDblClickSubscriber){this._dblClickTimer=window.setTimeout(function(){self._dblClickTimer=null;if(self.fireEvent('clickEvent',{event:ev,node:node})!==false){toggle()}},200)}else{if(self.fireEvent('clickEvent',{event:ev,node:node})!==false){}}}}},_onDblClickEvent:function(ev){if(!this._hasDblClickSubscriber){return}var td=this._getEventTargetTdEl(ev);if(!td){return}if(!(/\bygtv[tl][mp]h?h?/.test(td.className))){this.fireEvent('dblClickEvent',{event:ev,node:this.getNodeByElement(td)});if(this._dblClickTimer){window.clearTimeout(this._dblClickTimer);this._dblClickTimer=null}}},_onMouseOverEvent:function(ev){var target;if((target=this._getEventTargetTdEl(ev))&&(target=this.getNodeByElement(target))&&(target=target.getToggleEl())){target.className=target.className.replace(/\bygtv([lt])([mp])\b/gi,'ygtv$1$2h')}},_onMouseOutEvent:function(ev){var target;if((target=this._getEventTargetTdEl(ev))&&(target=this.getNodeByElement(target))&&(target=target.getToggleEl())){target.className=target.className.replace(/\bygtv([lt])([mp])h\b/gi,'ygtv$1$2')}},_onKeyDownEvent:function(ev){var target=Event.getTarget(ev),node=this.getNodeByElement(target),newNode=node,KEY=YAHOO.util.KeyListener.KEY;switch(ev.keyCode){case KEY.UP:do{if(newNode.previousSibling){newNode=newNode.previousSibling}else{newNode=newNode.parent}}while(newNode&&!newNode._canHaveFocus());if(newNode){newNode.focus()}Event.preventDefault(ev);break;case KEY.DOWN:do{if(newNode.nextSibling){newNode=newNode.nextSibling}else{newNode.expand();newNode=(newNode.children.length||null)&&newNode.children[0]}}while(newNode&&!newNode._canHaveFocus);if(newNode){newNode.focus()}Event.preventDefault(ev);break;case KEY.LEFT:do{if(newNode.parent){newNode=newNode.parent}else{newNode=newNode.previousSibling}}while(newNode&&!newNode._canHaveFocus());if(newNode){newNode.focus()}Event.preventDefault(ev);break;case KEY.RIGHT:do{newNode.expand();if(newNode.children.length){newNode=newNode.children[0]}else{newNode=newNode.nextSibling}}while(newNode&&!newNode._canHaveFocus());if(newNode){newNode.focus()}Event.preventDefault(ev);break;case KEY.ENTER:if(node.href){if(node.target){window.open(node.href,node.target)}else{window.location(node.href)}}else{node.toggle()}this.fireEvent('enterKeyPressed',node);Event.preventDefault(ev);break;case KEY.HOME:newNode=this.getRoot();if(newNode.children.length){newNode=newNode.children[0]}if(newNode._canHaveFocus()){newNode.focus()}Event.preventDefault(ev);break;case KEY.END:newNode=newNode.parent.children;newNode=newNode[newNode.length-1];if(newNode._canHaveFocus()){newNode.focus()}Event.preventDefault(ev);break;case 107:if(ev.shiftKey){node.parent.expandAll()}else{node.expand()}break;case 109:if(ev.shiftKey){node.parent.collapseAll()}else{node.collapse()}break;default:break}},render:function(){var html=this.root.getHtml(),el=this.getEl();el.innerHTML=html;if(!this._hasEvents){Event.on(el,'click',this._onClickEvent,this,true);Event.on(el,'dblclick',this._onDblClickEvent,this,true);Event.on(el,'mouseover',this._onMouseOverEvent,this,true);Event.on(el,'mouseout',this._onMouseOutEvent,this,true);Event.on(el,'keydown',this._onKeyDownEvent,this,true)}this._hasEvents=true},getEl:function(){if(!this._el){this._el=Dom.get(this.id)}return this._el},regNode:function(node){this._nodes[node.index]=node},getRoot:function(){return this.root},setDynamicLoad:function(fnDataLoader,iconMode){this.root.setDynamicLoad(fnDataLoader,iconMode)},expandAll:function(){if(!this.locked){this.root.expandAll()}},collapseAll:function(){if(!this.locked){this.root.collapseAll()}},getNodeByIndex:function(nodeIndex){var n=this._nodes[nodeIndex];return(n)?n:null},getNodeByProperty:function(property,value){for(var i in this._nodes){if(this._nodes.hasOwnProperty(i)){var n=this._nodes[i];if((property in n&&n[property]==value)||(n.data&&value==n.data[property])){return n}}}return null},getNodesByProperty:function(property,value){var values=[];for(var i in this._nodes){if(this._nodes.hasOwnProperty(i)){var n=this._nodes[i];if((property in n&&n[property]==value)||(n.data&&value==n.data[property])){values.push(n)}}}return(values.length)?values:null},getNodeByElement:function(el){var p=el,m,re=/ygtv([^\d]*)(.*)/;do{if(p&&p.id){m=p.id.match(re);if(m&&m[2]){return this.getNodeByIndex(m[2])}}p=p.parentNode;if(!p||!p.tagName){break}}while(p.id!==this.id&&p.tagName.toLowerCase()!=="body");return null},removeNode:function(node,autoRefresh){if(node.isRoot()){return false}var p=node.parent;if(p.parent){p=p.parent}this._deleteNode(node);if(autoRefresh&&p&&p.childrenRendered){p.refresh()}return true},_removeChildren_animComplete:function(o){this.unsubscribe(this._removeChildren_animComplete);this.removeChildren(o.node)},removeChildren:function(node){if(node.expanded){if(this._collapseAnim){this.subscribe("animComplete",this._removeChildren_animComplete,this,true);Widget.Node.prototype.collapse.call(node);return}node.collapse()}while(node.children.length){this._deleteNode(node.children[0])}if(node.isRoot()){Widget.Node.prototype.expand.call(node)}node.childrenRendered=false;node.dynamicLoadComplete=false;node.updateIcon()},_deleteNode:function(node){this.removeChildren(node);this.popNode(node)},popNode:function(node){var p=node.parent;var a=[];for(var i=0,len=p.children.length;i<len;++i){if(p.children[i]!=node){a[a.length]=p.children[i]}}p.children=a;p.childrenRendered=false;if(node.previousSibling){node.previousSibling.nextSibling=node.nextSibling}if(node.nextSibling){node.nextSibling.previousSibling=node.previousSibling}node.parent=null;node.previousSibling=null;node.nextSibling=null;node.tree=null;delete this._nodes[node.index]},destroy:function(){if(this._destroyEditor){this._destroyEditor()}var el=this.getEl();Event.removeListener(el,'click');Event.removeListener(el,'dblclick');Event.removeListener(el,'mouseover');Event.removeListener(el,'mouseout');Event.removeListener(el,'keydown');for(var i=0;i<this._nodes.length;i++){var node=this._nodes[i];if(node&&node.destroy){node.destroy()}}el.innerHTML='';this._hasEvents=false},toString:function(){return"TreeView "+this.id},getNodeCount:function(){return this.getRoot().getNodeCount()},getTreeDefinition:function(){return this.getRoot().getNodeDefinition()},onExpand:function(node){},onCollapse:function(node){},setNodesProperty:function(name,value,refresh){this.root.setNodesProperty(name,value);if(refresh){this.root.refresh()}},onEventToggleHighlight:function(oArgs){var node;if('node'in oArgs&&oArgs.node instanceof Widget.Node){node=oArgs.node}else if(oArgs instanceof Widget.Node){node=oArgs}else{return false}node.toggleHighlight();return false}};var PROT=TV.prototype;PROT.draw=PROT.render;YAHOO.augment(TV,YAHOO.util.EventProvider);TV.nodeCount=0;TV.trees=[];TV.getTree=function(treeId){var t=TV.trees[treeId];return(t)?t:null};TV.getNode=function(treeId,nodeIndex){var t=TV.getTree(treeId);return(t)?t.getNodeByIndex(nodeIndex):null};TV.FOCUS_CLASS_NAME='ygtvfocus';TV.preload=function(e,prefix){prefix=prefix||"ygtv";var styles=["tn","tm","tmh","tp","tph","ln","lm","lmh","lp","lph","loading"];var sb=[];for(var i=1;i<styles.length;i=i+1){sb[sb.length]='<span class="'+prefix+styles[i]+'">&#160;</span>'}var f=document.createElement("div");var s=f.style;s.className=prefix+styles[0];s.position="absolute";s.height="1px";s.width="1px";s.top="-1000px";s.left="-1000px";f.innerHTML=sb.join("");document.body.appendChild(f);Event.removeListener(window,"load",TV.preload)};Event.addListener(window,"load",TV.preload)})();(function(){var Dom=YAHOO.util.Dom,Lang=YAHOO.lang,Event=YAHOO.util.Event;YAHOO.widget.Node=function(oData,oParent,expanded){if(oData){this.init(oData,oParent,expanded)}};YAHOO.widget.Node.prototype={index:0,children:null,tree:null,data:null,parent:null,depth:-1,expanded:false,multiExpand:true,renderHidden:false,childrenRendered:false,dynamicLoadComplete:false,previousSibling:null,nextSibling:null,_dynLoad:false,dataLoader:null,isLoading:false,hasIcon:true,iconMode:0,nowrap:false,isLeaf:false,contentStyle:"",contentElId:null,enableHighlight:false,highlightState:0,propagateHighlightUp:false,propagateHighlightDown:false,className:null,_type:"Node",init:function(oData,oParent,expanded){this.data={};this.children=[];this.index=YAHOO.widget.TreeView.nodeCount;++YAHOO.widget.TreeView.nodeCount;this.contentElId="ygtvcontentel"+this.index;if(Lang.isObject(oData)){for(var property in oData){if(oData.hasOwnProperty(property)){if(property.charAt(0)!='_'&&!Lang.isUndefined(this[property])&&!Lang.isFunction(this[property])){this[property]=oData[property]}else{this.data[property]=oData[property]}}}}if(!Lang.isUndefined(expanded)){this.expanded=expanded}this.createEvent("parentChange",this);if(oParent){oParent.appendChild(this)}},applyParent:function(parentNode){if(!parentNode){return false}this.tree=parentNode.tree;this.parent=parentNode;this.depth=parentNode.depth+1;this.tree.regNode(this);parentNode.childrenRendered=false;for(var i=0,len=this.children.length;i<len;++i){this.children[i].applyParent(this)}this.fireEvent("parentChange");return true},appendChild:function(childNode){if(this.hasChildren()){var sib=this.children[this.children.length-1];sib.nextSibling=childNode;childNode.previousSibling=sib}this.children[this.children.length]=childNode;childNode.applyParent(this);if(this.childrenRendered&&this.expanded){this.getChildrenEl().style.display=""}return childNode},appendTo:function(parentNode){return parentNode.appendChild(this)},insertBefore:function(node){var p=node.parent;if(p){if(this.tree){this.tree.popNode(this)}var refIndex=node.isChildOf(p);p.children.splice(refIndex,0,this);if(node.previousSibling){node.previousSibling.nextSibling=this}this.previousSibling=node.previousSibling;this.nextSibling=node;node.previousSibling=this;this.applyParent(p)}return this},insertAfter:function(node){var p=node.parent;if(p){if(this.tree){this.tree.popNode(this)}var refIndex=node.isChildOf(p);if(!node.nextSibling){this.nextSibling=null;return this.appendTo(p)}p.children.splice(refIndex+1,0,this);node.nextSibling.previousSibling=this;this.previousSibling=node;this.nextSibling=node.nextSibling;node.nextSibling=this;this.applyParent(p)}return this},isChildOf:function(parentNode){if(parentNode&&parentNode.children){for(var i=0,len=parentNode.children.length;i<len;++i){if(parentNode.children[i]===this){return i}}}return-1},getSiblings:function(){var sib=this.parent.children.slice(0);for(var i=0;i<sib.length&&sib[i]!=this;i++){}sib.splice(i,1);if(sib.length){return sib}return null},showChildren:function(){if(!this.tree.animateExpand(this.getChildrenEl(),this)){if(this.hasChildren()){this.getChildrenEl().style.display=""}}},hideChildren:function(){if(!this.tree.animateCollapse(this.getChildrenEl(),this)){this.getChildrenEl().style.display="none"}},getElId:function(){return"ygtv"+this.index},getChildrenElId:function(){return"ygtvc"+this.index},getToggleElId:function(){return"ygtvt"+this.index},getEl:function(){return Dom.get(this.getElId())},getChildrenEl:function(){return Dom.get(this.getChildrenElId())},getToggleEl:function(){return Dom.get(this.getToggleElId())},getContentEl:function(){return Dom.get(this.contentElId)},collapse:function(){if(!this.expanded){return}var ret=this.tree.onCollapse(this);if(false===ret){return}ret=this.tree.fireEvent("collapse",this);if(false===ret){return}if(!this.getEl()){this.expanded=false}else{this.hideChildren();this.expanded=false;this.updateIcon()}ret=this.tree.fireEvent("collapseComplete",this)},expand:function(lazySource){if(this.expanded&&!lazySource){return}var ret=true;if(!lazySource){ret=this.tree.onExpand(this);if(false===ret){return}ret=this.tree.fireEvent("expand",this)}if(false===ret){return}if(!this.getEl()){this.expanded=true;return}if(!this.childrenRendered){this.getChildrenEl().innerHTML=this.renderChildren()}else{}this.expanded=true;this.updateIcon();if(this.isLoading){this.expanded=false;return}if(!this.multiExpand){var sibs=this.getSiblings();for(var i=0;sibs&&i<sibs.length;++i){if(sibs[i]!=this&&sibs[i].expanded){sibs[i].collapse()}}}this.showChildren();ret=this.tree.fireEvent("expandComplete",this)},updateIcon:function(){if(this.hasIcon){var el=this.getToggleEl();if(el){el.className=el.className.replace(/\bygtv(([tl][pmn]h?)|(loading))\b/gi,this.getStyle())}}},getStyle:function(){if(this.isLoading){return"ygtvloading"}else{var loc=(this.nextSibling)?"t":"l";var type="n";if(this.hasChildren(true)||(this.isDynamic()&&!this.getIconMode())){type=(this.expanded)?"m":"p"}return"ygtv"+loc+type}},getHoverStyle:function(){var s=this.getStyle();if(this.hasChildren(true)&&!this.isLoading){s+="h"}return s},expandAll:function(){var l=this.children.length;for(var i=0;i<l;++i){var c=this.children[i];if(c.isDynamic()){break}else if(!c.multiExpand){break}else{c.expand();c.expandAll()}}},collapseAll:function(){for(var i=0;i<this.children.length;++i){this.children[i].collapse();this.children[i].collapseAll()}},setDynamicLoad:function(fnDataLoader,iconMode){if(fnDataLoader){this.dataLoader=fnDataLoader;this._dynLoad=true}else{this.dataLoader=null;this._dynLoad=false}if(iconMode){this.iconMode=iconMode}},isRoot:function(){return(this==this.tree.root)},isDynamic:function(){if(this.isLeaf){return false}else{return(!this.isRoot()&&(this._dynLoad||this.tree.root._dynLoad))}},getIconMode:function(){return(this.iconMode||this.tree.root.iconMode)},hasChildren:function(checkForLazyLoad){if(this.isLeaf){return false}else{return(this.children.length>0||(checkForLazyLoad&&this.isDynamic()&&!this.dynamicLoadComplete))}},toggle:function(){if(!this.tree.locked&&(this.hasChildren(true)||this.isDynamic())){if(this.expanded){this.collapse()}else{this.expand()}}},getHtml:function(){this.childrenRendered=false;return['<div class="ygtvitem" id="',this.getElId(),'">',this.getNodeHtml(),this.getChildrenHtml(),'</div>'].join("")},getChildrenHtml:function(){var sb=[];sb[sb.length]='<div class="ygtvchildren" id="'+this.getChildrenElId()+'"';if(!this.expanded||!this.hasChildren()){sb[sb.length]=' style="display:none;"'}sb[sb.length]='>';if((this.hasChildren(true)&&this.expanded)||(this.renderHidden&&!this.isDynamic())){sb[sb.length]=this.renderChildren()}sb[sb.length]='</div>';return sb.join("")},renderChildren:function(){var node=this;if(this.isDynamic()&&!this.dynamicLoadComplete){this.isLoading=true;this.tree.locked=true;if(this.dataLoader){setTimeout(function(){node.dataLoader(node,function(){node.loadComplete()})},10)}else if(this.tree.root.dataLoader){setTimeout(function(){node.tree.root.dataLoader(node,function(){node.loadComplete()})},10)}else{return"Error: data loader not found or not specified."}return""}else{return this.completeRender()}},completeRender:function(){var sb=[];for(var i=0;i<this.children.length;++i){sb[sb.length]=this.children[i].getHtml()}this.childrenRendered=true;return sb.join("")},loadComplete:function(){this.getChildrenEl().innerHTML=this.completeRender();this.dynamicLoadComplete=true;this.isLoading=false;this.expand(true);this.tree.locked=false},getAncestor:function(depth){if(depth>=this.depth||depth<0){return null}var p=this.parent;while(p.depth>depth){p=p.parent}return p},getDepthStyle:function(depth){return(this.getAncestor(depth).nextSibling)?"ygtvdepthcell":"ygtvblankdepthcell"},getNodeHtml:function(){var sb=[];sb[sb.length]='<table id="ygtvtableel'+this.index+'"border="0" cellpadding="0" cellspacing="0" class="ygtvtable ygtvdepth'+this.depth;if(this.enableHighlight){}if(this.className){sb[sb.length]=' '+this.className}sb[sb.length]='"><tr class="ygtvrow">';for(var i=0;i<this.depth;++i){sb[sb.length]='<td class="ygtvcell '+this.getDepthStyle(i)+'"><div class="ygtvspacer"></div></td>'}if(this.hasIcon){sb[sb.length]='<td id="'+this.getToggleElId();sb[sb.length]='" class="ygtvcell ';sb[sb.length]=this.getStyle();sb[sb.length]='"><a href="#" class="ygtvspacer">&nbsp;</a></td>'}sb[sb.length]='<td id="'+this.contentElId;sb[sb.length]='" class="ygtvcell ';sb[sb.length]=this.contentStyle+' ygtvcontent" ';sb[sb.length]=(this.nowrap)?' nowrap="nowrap" ':'';sb[sb.length]=' >';sb[sb.length]=this.getContentHtml();sb[sb.length]='</td></tr></table>';return sb.join("")},getContentHtml:function(){return""},refresh:function(){this.getChildrenEl().innerHTML=this.completeRender();if(this.hasIcon){var el=this.getToggleEl();if(el){el.className=el.className.replace(/\bygtv[lt][nmp]h*\b/gi,this.getStyle())}}},toString:function(){return this._type+" ("+this.index+")"},_focusHighlightedItems:[],_focusedItem:null,_canHaveFocus:function(){return this.getEl().getElementsByTagName('a').length>0},_removeFocus:function(){if(this._focusedItem){Event.removeListener(this._focusedItem,'blur');this._focusedItem=null}var el;while((el=this._focusHighlightedItems.shift())){Dom.removeClass(el,YAHOO.widget.TreeView.FOCUS_CLASS_NAME)}},focus:function(){var focused=false,self=this;if(this.tree.currentFocus){this.tree.currentFocus._removeFocus()}var expandParent=function(node){if(node.parent){expandParent(node.parent);node.parent.expand()}};expandParent(this);Dom.getElementsBy(function(el){return/ygtv(([tl][pmn]h?)|(content))/.test(el.className)},'td',self.getEl().firstChild,function(el){Dom.addClass(el,YAHOO.widget.TreeView.FOCUS_CLASS_NAME);if(!focused){var aEl=el.getElementsByTagName('a');if(aEl.length){aEl=aEl[0];aEl.focus();self._focusedItem=aEl;Event.on(aEl,'blur',function(){self.tree.fireEvent('focusChanged',{oldNode:self.tree.currentFocus,newNode:null});self.tree.currentFocus=null;self._removeFocus()});focused=true}}self._focusHighlightedItems.push(el)});if(focused){this.tree.fireEvent('focusChanged',{oldNode:this.tree.currentFocus,newNode:this});this.tree.currentFocus=this}else{this.tree.fireEvent('focusChanged',{oldNode:self.tree.currentFocus,newNode:null});this.tree.currentFocus=null;this._removeFocus()}return focused},getNodeCount:function(){for(var i=0,count=0;i<this.children.length;i++){count+=this.children[i].getNodeCount()}return count+1},getNodeDefinition:function(){if(this.isDynamic()){return false}var def,defs=Lang.merge(this.data),children=[];if(this.expanded){defs.expanded=this.expanded}if(!this.multiExpand){defs.multiExpand=this.multiExpand}if(!this.renderHidden){defs.renderHidden=this.renderHidden}if(!this.hasIcon){defs.hasIcon=this.hasIcon}if(this.nowrap){defs.nowrap=this.nowrap}if(this.className){defs.className=this.className}if(this.editable){defs.editable=this.editable}if(this.enableHighlight){defs.enableHighlight=this.enableHighlight}if(this.highlightState){defs.highlightState=this.highlightState}if(this.propagateHighlightUp){defs.propagateHighlightUp=this.propagateHighlightUp}if(this.propagateHighlightDown){defs.propagateHighlightDown=this.propagateHighlightDown}defs.type=this._type;for(var i=0;i<this.children.length;i++){def=this.children[i].getNodeDefinition();if(def===false){return false}children.push(def)}if(children.length){defs.children=children}return defs},getToggleLink:function(){return'return false;'},setNodesProperty:function(name,value,refresh){if(name.charAt(0)!='_'&&!Lang.isUndefined(this[name])&&!Lang.isFunction(this[name])){this[name]=value}else{this.data[name]=value}for(var i=0;i<this.children.length;i++){this.children[i].setNodesProperty(name,value)}if(refresh){this.refresh()}},toggleHighlight:function(){if(this.enableHighlight){if(this.highlightState==1){this.unhighlight()}else{this.highlight()}}},highlight:function(_silent){return;if(this.enableHighlight){if(this.tree.singleNodeHighlight){if(this.tree._currentlyHighlighted){this.tree._currentlyHighlighted.unhighlight()}this.tree._currentlyHighlighted=this}this.highlightState=1;this._setHighlightClassName();if(this.propagateHighlightDown){for(var i=0;i<this.children.length;i++){this.children[i].highlight(true)}}if(this.propagateHighlightUp){if(this.parent){this.parent._childrenHighlighted()}}if(!_silent){this.tree.fireEvent('highlightEvent',this)}}},unhighlight:function(_silent){if(this.enableHighlight){this.highlightState=0;this._setHighlightClassName();if(this.propagateHighlightDown){for(var i=0;i<this.children.length;i++){this.children[i].unhighlight(true)}}if(this.propagateHighlightUp){if(this.parent){this.parent._childrenHighlighted()}}if(!_silent){this.tree.fireEvent('highlightEvent',this)}}},_childrenHighlighted:function(){var yes=false,no=false;if(this.enableHighlight){for(var i=0;i<this.children.length;i++){switch(this.children[i].highlightState){case 0:no=true;break;case 1:yes=true;break;case 2:yes=no=true;break}}if(yes&&no){this.highlightState=2}else if(yes){this.highlightState=1}else{this.highlightState=0}this._setHighlightClassName();if(this.propagateHighlightUp){if(this.parent){this.parent._childrenHighlighted()}}}},_setHighlightClassName:function(){var el=Dom.get('ygtvtableel'+this.index);if(el){el.className=el.className.replace(/\bygtv-highlight\d\b/gi,'ygtv-highlight'+this.highlightState)}}};YAHOO.augment(YAHOO.widget.Node,YAHOO.util.EventProvider)})();YAHOO.widget.RootNode=function(oTree){this.init(null,null,true);this.tree=oTree};YAHOO.extend(YAHOO.widget.RootNode,YAHOO.widget.Node,{_type:"RootNode",getNodeHtml:function(){return""},toString:function(){return this._type},loadComplete:function(){this.tree.draw()},getNodeCount:function(){for(var i=0,count=0;i<this.children.length;i++){count+=this.children[i].getNodeCount()}return count},getNodeDefinition:function(){for(var def,defs=[],i=0;i<this.children.length;i++){def=this.children[i].getNodeDefinition();if(def===false){return false}defs.push(def)}return defs},collapse:function(){},expand:function(){},getSiblings:function(){return null},focus:function(){}});(function(){var Dom=YAHOO.util.Dom,Lang=YAHOO.lang,Event=YAHOO.util.Event;YAHOO.widget.TextNode=function(oData,oParent,expanded){if(oData){if(Lang.isString(oData)){oData={label:oData}}this.init(oData,oParent,expanded);this.setUpLabel(oData)}};YAHOO.extend(YAHOO.widget.TextNode,YAHOO.widget.Node,{labelStyle:"ygtvlabel",labelElId:null,label:null,title:null,href:null,target:"_self",_type:"TextNode",setUpLabel:function(oData){if(Lang.isString(oData)){oData={label:oData}}else{if(oData.style){this.labelStyle=oData.style}}this.label=oData.label;this.labelElId="ygtvlabelel"+this.index},getLabelEl:function(){return Dom.get(this.labelElId)},getContentHtml:function(){var sb=[];sb[sb.length]=this.href?'<a':'<span';sb[sb.length]=' id="'+this.labelElId+'"';sb[sb.length]=' class="'+this.labelStyle+'"';if(this.href){sb[sb.length]=' href="'+this.href+'"';sb[sb.length]=' target="'+this.target+'"'}if(this.title){sb[sb.length]=' title="'+this.title+'"'}sb[sb.length]=' >';sb[sb.length]=this.label;sb[sb.length]=this.href?'</a>':'</span>';return sb.join("")},getNodeDefinition:function(){var def=YAHOO.widget.TextNode.superclass.getNodeDefinition.call(this);if(def===false){return false}def.label=this.label;if(this.labelStyle!='ygtvlabel'){def.style=this.labelStyle}if(this.title){def.title=this.title}if(this.href){def.href=this.href}if(this.target!='_self'){def.target=this.target}return def},toString:function(){return YAHOO.widget.TextNode.superclass.toString.call(this)+": "+this.label},onLabelClick:function(){return false},refresh:function(){YAHOO.widget.TextNode.superclass.refresh.call(this);var label=this.getLabelEl();label.innerHTML=this.label;if(label.tagName.toUpperCase()=='A'){label.href=this.href;label.target=this.target}}})})();YAHOO.widget.MenuNode=function(oData,oParent,expanded){YAHOO.widget.MenuNode.superclass.constructor.call(this,oData,oParent,expanded);this.multiExpand=false};YAHOO.extend(YAHOO.widget.MenuNode,YAHOO.widget.TextNode,{_type:"MenuNode"});(function(){var Dom=YAHOO.util.Dom,Lang=YAHOO.lang,Event=YAHOO.util.Event;YAHOO.widget.HTMLNode=function(oData,oParent,expanded,hasIcon){if(oData){this.init(oData,oParent,expanded);this.initContent(oData,hasIcon)}};YAHOO.extend(YAHOO.widget.HTMLNode,YAHOO.widget.Node,{contentStyle:"ygtvhtml",html:null,_type:"HTMLNode",initContent:function(oData,hasIcon){this.setHtml(oData);this.contentElId="ygtvcontentel"+this.index;if(!Lang.isUndefined(hasIcon)){this.hasIcon=hasIcon}},setHtml:function(o){this.html=(typeof o==="string")?o:o.html;var el=this.getContentEl();if(el){el.innerHTML=this.html}},getContentHtml:function(){return this.html},getNodeDefinition:function(){var def=YAHOO.widget.HTMLNode.superclass.getNodeDefinition.call(this);if(def===false){return false}def.html=this.html;return def}})})();(function(){var Dom=YAHOO.util.Dom,Lang=YAHOO.lang,Event=YAHOO.util.Event,Calendar=YAHOO.widget.Calendar;YAHOO.widget.DateNode=function(oData,oParent,expanded){YAHOO.widget.DateNode.superclass.constructor.call(this,oData,oParent,expanded)};YAHOO.extend(YAHOO.widget.DateNode,YAHOO.widget.TextNode,{_type:"DateNode",calendarConfig:null,fillEditorContainer:function(editorData){var cal,container=editorData.inputContainer;if(Lang.isUndefined(Calendar)){Dom.replaceClass(editorData.editorPanel,'ygtv-edit-DateNode','ygtv-edit-TextNode');YAHOO.widget.DateNode.superclass.fillEditorContainer.call(this,editorData);return}if(editorData.nodeType!=this._type){editorData.nodeType=this._type;editorData.saveOnEnter=false;editorData.node.destroyEditorContents(editorData);editorData.inputObject=cal=new Calendar(container.appendChild(document.createElement('div')));if(this.calendarConfig){cal.cfg.applyConfig(this.calendarConfig,true);cal.cfg.fireQueue()}cal.selectEvent.subscribe(function(){this.tree._closeEditor(true)},this,true)}else{cal=editorData.inputObject}cal.cfg.setProperty("selected",this.label,false);var delim=cal.cfg.getProperty('DATE_FIELD_DELIMITER');var pageDate=this.label.split(delim);cal.cfg.setProperty('pagedate',pageDate[cal.cfg.getProperty('MDY_MONTH_POSITION')-1]+delim+pageDate[cal.cfg.getProperty('MDY_YEAR_POSITION')-1]);cal.cfg.fireQueue();cal.render();cal.oDomContainer.focus()},saveEditorValue:function(editorData){var node=editorData.node,validator=node.tree.validator,value;if(Lang.isUndefined(Calendar)){value=editorData.inputElement.value}else{var cal=editorData.inputObject,date=cal.getSelectedDates()[0],dd=[];dd[cal.cfg.getProperty('MDY_DAY_POSITION')-1]=date.getDate();dd[cal.cfg.getProperty('MDY_MONTH_POSITION')-1]=date.getMonth()+1;dd[cal.cfg.getProperty('MDY_YEAR_POSITION')-1]=date.getFullYear();value=dd.join(cal.cfg.getProperty('DATE_FIELD_DELIMITER'))}if(Lang.isFunction(validator)){value=validator(value,node.label,node);if(Lang.isUndefined(value)){return false}}node.label=value;node.getLabelEl().innerHTML=value},getNodeDefinition:function(){var def=YAHOO.widget.DateNode.superclass.getNodeDefinition.call(this);if(def===false){return false}if(this.calendarConfig){def.calendarConfig=this.calendarConfig}return def}})})();(function(){var Dom=YAHOO.util.Dom,Lang=YAHOO.lang,Event=YAHOO.util.Event,TV=YAHOO.widget.TreeView,TVproto=TV.prototype;TV.editorData={active:false,whoHasIt:null,nodeType:null,editorPanel:null,inputContainer:null,buttonsContainer:null,node:null,saveOnEnter:true};TVproto.validator=null;TVproto._nodeEditing=function(node){if(node.fillEditorContainer&&node.editable){var ed,topLeft,buttons,button,editorData=TV.editorData;editorData.active=true;editorData.whoHasIt=this;if(!editorData.nodeType){editorData.editorPanel=ed=document.body.appendChild(document.createElement('div'));Dom.addClass(ed,'ygtv-label-editor');buttons=editorData.buttonsContainer=ed.appendChild(document.createElement('div'));Dom.addClass(buttons,'ygtv-button-container');button=buttons.appendChild(document.createElement('button'));Dom.addClass(button,'ygtvok');button.innerHTML=' ';button=buttons.appendChild(document.createElement('button'));Dom.addClass(button,'ygtvcancel');button.innerHTML=' ';Event.on(buttons,'click',function(ev){var target=Event.getTarget(ev);var node=TV.editorData.node;if(Dom.hasClass(target,'ygtvok')){Event.stopEvent(ev);this._closeEditor(true)}if(Dom.hasClass(target,'ygtvcancel')){Event.stopEvent(ev);this._closeEditor(false)}},this,true);editorData.inputContainer=ed.appendChild(document.createElement('div'));Dom.addClass(editorData.inputContainer,'ygtv-input');Event.on(ed,'keydown',function(ev){var editorData=TV.editorData,KEY=YAHOO.util.KeyListener.KEY;switch(ev.keyCode){case KEY.ENTER:Event.stopEvent(ev);if(editorData.saveOnEnter){this._closeEditor(true)}break;case KEY.ESCAPE:Event.stopEvent(ev);this._closeEditor(false);break}},this,true)}else{ed=editorData.editorPanel}editorData.node=node;if(editorData.nodeType){Dom.removeClass(ed,'ygtv-edit-'+editorData.nodeType)}Dom.addClass(ed,' ygtv-edit-'+node._type);topLeft=Dom.getXY(node.getContentEl());Dom.setStyle(ed,'left',topLeft[0]+'px');Dom.setStyle(ed,'top',topLeft[1]+'px');Dom.setStyle(ed,'display','block');ed.focus();node.fillEditorContainer(editorData);return true}};TVproto.onEventEditNode=function(oArgs){if(oArgs instanceof YAHOO.widget.Node){oArgs.editNode()}else if(oArgs.node instanceof YAHOO.widget.Node){oArgs.node.editNode()}};TVproto._closeEditor=function(save){var ed=TV.editorData,node=ed.node,close=true;if(save){close=ed.node.saveEditorValue(ed)!==false}if(close){Dom.setStyle(ed.editorPanel,'display','none');ed.active=false;node.focus()}};TVproto._destroyEditor=function(){var ed=TV.editorData;if(ed&&ed.nodeType&&(!ed.active||ed.whoHasIt===this)){Event.removeListener(ed.editorPanel,'keydown');Event.removeListener(ed.buttonContainer,'click');ed.node.destroyEditorContents(ed);document.body.removeChild(ed.editorPanel);ed.nodeType=ed.editorPanel=ed.inputContainer=ed.buttonsContainer=ed.whoHasIt=ed.node=null;ed.active=false}};var Nproto=YAHOO.widget.Node.prototype;Nproto.editable=false;Nproto.editNode=function(){this.tree._nodeEditing(this)};Nproto.fillEditorContainer=null;Nproto.destroyEditorContents=function(editorData){Event.purgeElement(editorData.inputContainer,true);editorData.inputContainer.innerHTML=''};Nproto.saveEditorValue=function(editorData){};var TNproto=YAHOO.widget.TextNode.prototype;TNproto.fillEditorContainer=function(editorData){var input;if(editorData.nodeType!=this._type){editorData.nodeType=this._type;editorData.saveOnEnter=true;editorData.node.destroyEditorContents(editorData);editorData.inputElement=input=editorData.inputContainer.appendChild(document.createElement('input'))}else{input=editorData.inputElement}input.value=this.label;input.focus();input.select()};TNproto.saveEditorValue=function(editorData){var node=editorData.node,value=editorData.inputElement.value,validator=node.tree.validator;if(Lang.isFunction(validator)){value=validator(value,node.label,node);if(Lang.isUndefined(value)){return false}}node.label=value;node.getLabelEl().innerHTML=value};TNproto.destroyEditorContents=function(editorData){editorData.inputContainer.innerHTML=''}})();YAHOO.register("treeview",YAHOO.widget.TreeView,{version:"2.7.0",build:"1799"});
329   -/*
  312 +var T=this.get(G);if(T){if(T==S){return false;}T.parentNode.replaceChild(S,T);this.set(J,S.innerHTML);}}});this.setAttributeConfig(J,{value:R.label||this._getLabel(),method:function(T){var S=this.get(G);if(!S){this.set(G,this._createLabelEl());}S.innerHTML=T;}});this.setAttributeConfig(C,{value:R[C]||document.createElement("div"),method:function(S){S=I.get(S);var T=this.get(C);if(T){if(T===S){return false;}if(!this.get("selected")){I.addClass(S,"yui-hidden");}T.parentNode.replaceChild(S,T);this.set(Q,S.innerHTML);}}});this.setAttributeConfig(Q,{value:R[Q],method:function(S){this.get(C).innerHTML=S;}});this.setAttributeConfig(B,{value:R.dataSrc});this.setAttributeConfig(P,{value:R.cacheData||false,validator:L.isBoolean});this.setAttributeConfig(N,{value:R.loadMethod||"GET",validator:L.isString});this.setAttributeConfig(H,{value:false,validator:L.isBoolean,writeOnce:true});this.setAttributeConfig(A,{value:R.dataTimeout||null,validator:L.isNumber});this.setAttributeConfig(F,{value:R.postData||null});this.setAttributeConfig("active",{value:R.active||this.hasClass(this.ACTIVE_CLASSNAME),method:function(S){if(S===true){this.addClass(this.ACTIVE_CLASSNAME);this.set("title",this.ACTIVE_TITLE);}else{this.removeClass(this.ACTIVE_CLASSNAME);this.set("title","");}},validator:function(S){return L.isBoolean(S)&&!this.get(K);}});this.setAttributeConfig(K,{value:R.disabled||this.hasClass(this.DISABLED_CLASSNAME),method:function(S){if(S===true){I.addClass(this.get(O),this.DISABLED_CLASSNAME);}else{I.removeClass(this.get(O),this.DISABLED_CLASSNAME);}},validator:L.isBoolean});this.setAttributeConfig("href",{value:R.href||this.getElementsByTagName("a")[0].getAttribute("href",2)||"#",method:function(S){this.getElementsByTagName("a")[0].href=S;},validator:L.isString});this.setAttributeConfig("contentVisible",{value:R.contentVisible,method:function(S){if(S){I.removeClass(this.get(C),this.HIDDEN_CLASSNAME);if(this.get(B)){if(!this._loading&&!(this.get(H)&&this.get(P))){this._dataConnect();}}}else{I.addClass(this.get(C),this.HIDDEN_CLASSNAME);}},validator:L.isBoolean});},_dataConnect:function(){if(!D.Connect){return false;}I.addClass(this.get(C).parentNode,this.LOADING_CLASSNAME);this._loading=true;this.dataConnection=D.Connect.asyncRequest(this.get(N),this.get(B),{success:function(R){this.loadHandler.success.call(this,R);this.set(H,true);this.dataConnection=null;I.removeClass(this.get(C).parentNode,this.LOADING_CLASSNAME);this._loading=false;},failure:function(R){this.loadHandler.failure.call(this,R);this.dataConnection=null;I.removeClass(this.get(C).parentNode,this.LOADING_CLASSNAME);this._loading=false;},scope:this,timeout:this.get(A)},this.get(F));},_createTabElement:function(R){var V=document.createElement("li"),S=document.createElement("a"),U=R.label||null,T=R.labelEl||null;S.href=R.href||"#";V.appendChild(S);if(T){if(!U){U=this._getLabel();}}else{T=this._createLabelEl();}S.appendChild(T);return V;},_getLabelEl:function(){return this.getElementsByTagName(this.LABEL_TAGNAME)[0];},_createLabelEl:function(){var R=document.createElement(this.LABEL_TAGNAME);return R;},_getLabel:function(){var R=this.get(G);if(!R){return undefined;}return R.innerHTML;},_onActivate:function(U,T){var S=this,R=false;D.Event.preventDefault(U);if(S===T.get(M)){R=true;}T.set(M,S,R);}});YAHOO.widget.Tab=E;})();YAHOO.register("tabview",YAHOO.widget.TabView,{version:"2.7.0",build:"1799"});(function(){var Dom=YAHOO.util.Dom,Event=YAHOO.util.Event,Lang=YAHOO.lang,Widget=YAHOO.widget;YAHOO.widget.TreeView=function(id,oConfig){if(id){this.init(id)}if(oConfig){if(!Lang.isArray(oConfig)){oConfig=[oConfig]}this.buildTreeFromObject(oConfig)}else if(Lang.trim(this._el.innerHTML)){this.buildTreeFromMarkup(id)}};var TV=Widget.TreeView;TV.prototype={id:null,_el:null,_nodes:null,locked:false,_expandAnim:null,_collapseAnim:null,_animCount:0,maxAnim:2,_hasDblClickSubscriber:false,_dblClickTimer:null,currentFocus:null,singleNodeHighlight:false,_currentlyHighlighted:null,setExpandAnim:function(type){this._expandAnim=(Widget.TVAnim.isValid(type))?type:null},setCollapseAnim:function(type){this._collapseAnim=(Widget.TVAnim.isValid(type))?type:null},animateExpand:function(el,node){if(this._expandAnim&&this._animCount<this.maxAnim){var tree=this;var a=Widget.TVAnim.getAnim(this._expandAnim,el,function(){tree.expandComplete(node)});if(a){++this._animCount;this.fireEvent("animStart",{"node":node,"type":"expand"});a.animate()}return true}return false},animateCollapse:function(el,node){if(this._collapseAnim&&this._animCount<this.maxAnim){var tree=this;var a=Widget.TVAnim.getAnim(this._collapseAnim,el,function(){tree.collapseComplete(node)});if(a){++this._animCount;this.fireEvent("animStart",{"node":node,"type":"collapse"});a.animate()}return true}return false},expandComplete:function(node){--this._animCount;this.fireEvent("animComplete",{"node":node,"type":"expand"})},collapseComplete:function(node){--this._animCount;this.fireEvent("animComplete",{"node":node,"type":"collapse"})},init:function(id){this._el=Dom.get(id);this.id=Dom.generateId(this._el,"yui-tv-auto-id-");this.createEvent("animStart",this);this.createEvent("animComplete",this);this.createEvent("collapse",this);this.createEvent("collapseComplete",this);this.createEvent("expand",this);this.createEvent("expandComplete",this);this.createEvent("enterKeyPressed",this);this.createEvent("clickEvent",this);this.createEvent('focusChanged',this);var self=this;this.createEvent("dblClickEvent",{scope:this,onSubscribeCallback:function(){self._hasDblClickSubscriber=true}});this.createEvent("labelClick",this);this.createEvent("highlightEvent",this);this._nodes=[];TV.trees[this.id]=this;this.root=new Widget.RootNode(this);var LW=Widget.LogWriter},buildTreeFromObject:function(oConfig){var build=function(parent,oConfig){var i,item,node,children,type,NodeType,ThisType;for(i=0;i<oConfig.length;i++){item=oConfig[i];if(Lang.isString(item)){node=new Widget.TextNode(item,parent)}else if(Lang.isObject(item)){children=item.children;delete item.children;type=item.type||'text';delete item.type;switch(Lang.isString(type)&&type.toLowerCase()){case'text':node=new Widget.TextNode(item,parent);break;case'menu':node=new Widget.MenuNode(item,parent);break;case'html':node=new Widget.HTMLNode(item,parent);break;default:if(Lang.isString(type)){NodeType=Widget[type]}else{NodeType=type}if(Lang.isObject(NodeType)){for(ThisType=NodeType;ThisType&&ThisType!==Widget.Node;ThisType=ThisType.superclass.constructor){}if(ThisType){node=new NodeType(item,parent)}else{}}else{}}if(children){build(node,children)}}else{}}};build(this.root,oConfig)},buildTreeFromMarkup:function(id){var build=function(markup){var el,child,branch=[],config={},label,yuiConfig;for(el=Dom.getFirstChild(markup);el;el=Dom.getNextSibling(el)){switch(el.tagName.toUpperCase()){case'LI':label='';config={expanded:Dom.hasClass(el,'expanded'),title:el.title||el.alt||null,className:Lang.trim(el.className.replace(/\bexpanded\b/,''))||null};child=el.firstChild;if(child.nodeType==3){label=Lang.trim(child.nodeValue.replace(/[\n\t\r]*/g,''));if(label){config.type='text';config.label=label}else{child=Dom.getNextSibling(child)}}if(!label){if(child.tagName.toUpperCase()=='A'){config.type='text';config.label=child.innerHTML;config.href=child.href;config.target=child.target;config.title=child.title||child.alt||config.title}else{config.type='html';var d=document.createElement('div');d.appendChild(child.cloneNode(true));config.html=d.innerHTML;config.hasIcon=true}}child=Dom.getNextSibling(child);switch(child&&child.tagName.toUpperCase()){case'UL':case'OL':config.children=build(child);break}if(YAHOO.lang.JSON){yuiConfig=el.getAttribute('yuiConfig');if(yuiConfig){yuiConfig=YAHOO.lang.JSON.parse(yuiConfig);config=YAHOO.lang.merge(config,yuiConfig)}}branch.push(config);break;case'UL':case'OL':config={type:'text',label:'',children:build(child)};branch.push(config);break}}return branch};var markup=Dom.getChildrenBy(Dom.get(id),function(el){var tag=el.tagName.toUpperCase();return tag=='UL'||tag=='OL'});if(markup.length){this.buildTreeFromObject(build(markup[0]))}else{}},_getEventTargetTdEl:function(ev){var target=Event.getTarget(ev);while(target&&!(target.tagName.toUpperCase()=='TD'&&Dom.hasClass(target.parentNode,'ygtvrow'))){target=Dom.getAncestorByTagName(target,'td')}if(Lang.isNull(target)){return null}if(/\bygtv(blank)?depthcell/.test(target.className)){return null}if(target.id){var m=target.id.match(/\bygtv([^\d]*)(.*)/);if(m&&m[2]&&this._nodes[m[2]]){return target}}return null},_onClickEvent:function(ev){var self=this,td=this._getEventTargetTdEl(ev),node,target,toggle=function(){node.toggle();node.focus();try{Event.preventDefault(ev)}catch(e){}};if(!td){return}node=this.getNodeByElement(td);if(!node){return}target=Event.getTarget(ev);if(Dom.hasClass(target,node.labelStyle)||Dom.getAncestorByClassName(target,node.labelStyle)){this.fireEvent('labelClick',node)}if(/\bygtv[tl][mp]h?h?/.test(td.className)){toggle()}else{if(this._dblClickTimer){window.clearTimeout(this._dblClickTimer);this._dblClickTimer=null}else{if(this._hasDblClickSubscriber){this._dblClickTimer=window.setTimeout(function(){self._dblClickTimer=null;if(self.fireEvent('clickEvent',{event:ev,node:node})!==false){toggle()}},200)}else{if(self.fireEvent('clickEvent',{event:ev,node:node})!==false){}}}}},_onDblClickEvent:function(ev){if(!this._hasDblClickSubscriber){return}var td=this._getEventTargetTdEl(ev);if(!td){return}if(!(/\bygtv[tl][mp]h?h?/.test(td.className))){this.fireEvent('dblClickEvent',{event:ev,node:this.getNodeByElement(td)});if(this._dblClickTimer){window.clearTimeout(this._dblClickTimer);this._dblClickTimer=null}}},_onMouseOverEvent:function(ev){var target;if((target=this._getEventTargetTdEl(ev))&&(target=this.getNodeByElement(target))&&(target=target.getToggleEl())){target.className=target.className.replace(/\bygtv([lt])([mp])\b/gi,'ygtv$1$2h')}},_onMouseOutEvent:function(ev){var target;if((target=this._getEventTargetTdEl(ev))&&(target=this.getNodeByElement(target))&&(target=target.getToggleEl())){target.className=target.className.replace(/\bygtv([lt])([mp])h\b/gi,'ygtv$1$2')}},_onKeyDownEvent:function(ev){var target=Event.getTarget(ev),node=this.getNodeByElement(target),newNode=node,KEY=YAHOO.util.KeyListener.KEY;switch(ev.keyCode){case KEY.UP:do{if(newNode.previousSibling){newNode=newNode.previousSibling}else{newNode=newNode.parent}}while(newNode&&!newNode._canHaveFocus());if(newNode){newNode.focus()}Event.preventDefault(ev);break;case KEY.DOWN:do{if(newNode.nextSibling){newNode=newNode.nextSibling}else{newNode.expand();newNode=(newNode.children.length||null)&&newNode.children[0]}}while(newNode&&!newNode._canHaveFocus);if(newNode){newNode.focus()}Event.preventDefault(ev);break;case KEY.LEFT:do{if(newNode.parent){newNode=newNode.parent}else{newNode=newNode.previousSibling}}while(newNode&&!newNode._canHaveFocus());if(newNode){newNode.focus()}Event.preventDefault(ev);break;case KEY.RIGHT:do{newNode.expand();if(newNode.children.length){newNode=newNode.children[0]}else{newNode=newNode.nextSibling}}while(newNode&&!newNode._canHaveFocus());if(newNode){newNode.focus()}Event.preventDefault(ev);break;case KEY.ENTER:if(node.href){if(node.target){window.open(node.href,node.target)}else{window.location(node.href)}}else{node.toggle()}this.fireEvent('enterKeyPressed',node);Event.preventDefault(ev);break;case KEY.HOME:newNode=this.getRoot();if(newNode.children.length){newNode=newNode.children[0]}if(newNode._canHaveFocus()){newNode.focus()}Event.preventDefault(ev);break;case KEY.END:newNode=newNode.parent.children;newNode=newNode[newNode.length-1];if(newNode._canHaveFocus()){newNode.focus()}Event.preventDefault(ev);break;case 107:if(ev.shiftKey){node.parent.expandAll()}else{node.expand()}break;case 109:if(ev.shiftKey){node.parent.collapseAll()}else{node.collapse()}break;default:break}},render:function(){var html=this.root.getHtml(),el=this.getEl();el.innerHTML=html;if(!this._hasEvents){Event.on(el,'click',this._onClickEvent,this,true);Event.on(el,'dblclick',this._onDblClickEvent,this,true);Event.on(el,'mouseover',this._onMouseOverEvent,this,true);Event.on(el,'mouseout',this._onMouseOutEvent,this,true);Event.on(el,'keydown',this._onKeyDownEvent,this,true)}this._hasEvents=true},getEl:function(){if(!this._el){this._el=Dom.get(this.id)}return this._el},regNode:function(node){this._nodes[node.index]=node},getRoot:function(){return this.root},setDynamicLoad:function(fnDataLoader,iconMode){this.root.setDynamicLoad(fnDataLoader,iconMode)},expandAll:function(){if(!this.locked){this.root.expandAll()}},collapseAll:function(){if(!this.locked){this.root.collapseAll()}},getNodeByIndex:function(nodeIndex){var n=this._nodes[nodeIndex];return(n)?n:null},getNodeByProperty:function(property,value){for(var i in this._nodes){if(this._nodes.hasOwnProperty(i)){var n=this._nodes[i];if((property in n&&n[property]==value)||(n.data&&value==n.data[property])){return n}}}return null},getNodesByProperty:function(property,value){var values=[];for(var i in this._nodes){if(this._nodes.hasOwnProperty(i)){var n=this._nodes[i];if((property in n&&n[property]==value)||(n.data&&value==n.data[property])){values.push(n)}}}return(values.length)?values:null},getNodeByElement:function(el){var p=el,m,re=/ygtv([^\d]*)(.*)/;do{if(p&&p.id){m=p.id.match(re);if(m&&m[2]){return this.getNodeByIndex(m[2])}}p=p.parentNode;if(!p||!p.tagName){break}}while(p.id!==this.id&&p.tagName.toLowerCase()!=="body");return null},removeNode:function(node,autoRefresh){if(node.isRoot()){return false}var p=node.parent;if(p.parent){p=p.parent}this._deleteNode(node);if(autoRefresh&&p&&p.childrenRendered){p.refresh()}return true},_removeChildren_animComplete:function(o){this.unsubscribe(this._removeChildren_animComplete);this.removeChildren(o.node)},removeChildren:function(node){if(node.expanded){if(this._collapseAnim){this.subscribe("animComplete",this._removeChildren_animComplete,this,true);Widget.Node.prototype.collapse.call(node);return}node.collapse()}while(node.children.length){this._deleteNode(node.children[0])}if(node.isRoot()){Widget.Node.prototype.expand.call(node)}node.childrenRendered=false;node.dynamicLoadComplete=false;node.updateIcon()},_deleteNode:function(node){this.removeChildren(node);this.popNode(node)},popNode:function(node){var p=node.parent;var a=[];for(var i=0,len=p.children.length;i<len;++i){if(p.children[i]!=node){a[a.length]=p.children[i]}}p.children=a;p.childrenRendered=false;if(node.previousSibling){node.previousSibling.nextSibling=node.nextSibling}if(node.nextSibling){node.nextSibling.previousSibling=node.previousSibling}node.parent=null;node.previousSibling=null;node.nextSibling=null;node.tree=null;delete this._nodes[node.index]},destroy:function(){if(this._destroyEditor){this._destroyEditor()}var el=this.getEl();Event.removeListener(el,'click');Event.removeListener(el,'dblclick');Event.removeListener(el,'mouseover');Event.removeListener(el,'mouseout');Event.removeListener(el,'keydown');for(var i=0;i<this._nodes.length;i++){var node=this._nodes[i];if(node&&node.destroy){node.destroy()}}el.innerHTML='';this._hasEvents=false},toString:function(){return"TreeView "+this.id},getNodeCount:function(){return this.getRoot().getNodeCount()},getTreeDefinition:function(){return this.getRoot().getNodeDefinition()},onExpand:function(node){},onCollapse:function(node){},setNodesProperty:function(name,value,refresh){this.root.setNodesProperty(name,value);if(refresh){this.root.refresh()}},onEventToggleHighlight:function(oArgs){var node;if('node'in oArgs&&oArgs.node instanceof Widget.Node){node=oArgs.node}else if(oArgs instanceof Widget.Node){node=oArgs}else{return false}node.toggleHighlight();return false}};var PROT=TV.prototype;PROT.draw=PROT.render;YAHOO.augment(TV,YAHOO.util.EventProvider);TV.nodeCount=0;TV.trees=[];TV.getTree=function(treeId){var t=TV.trees[treeId];return(t)?t:null};TV.getNode=function(treeId,nodeIndex){var t=TV.getTree(treeId);return(t)?t.getNodeByIndex(nodeIndex):null};TV.FOCUS_CLASS_NAME='ygtvfocus';TV.preload=function(e,prefix){prefix=prefix||"ygtv";var styles=["tn","tm","tmh","tp","tph","ln","lm","lmh","lp","lph","loading"];var sb=[];for(var i=1;i<styles.length;i=i+1){sb[sb.length]='<span class="'+prefix+styles[i]+'">&#160;</span>'}var f=document.createElement("div");var s=f.style;s.className=prefix+styles[0];s.position="absolute";s.height="1px";s.width="1px";s.top="-1000px";s.left="-1000px";f.innerHTML=sb.join("");document.body.appendChild(f);Event.removeListener(window,"load",TV.preload)};Event.addListener(window,"load",TV.preload)})();(function(){var Dom=YAHOO.util.Dom,Lang=YAHOO.lang,Event=YAHOO.util.Event;YAHOO.widget.Node=function(oData,oParent,expanded){if(oData){this.init(oData,oParent,expanded)}};YAHOO.widget.Node.prototype={index:0,children:null,tree:null,data:null,parent:null,depth:-1,expanded:false,multiExpand:true,renderHidden:false,childrenRendered:false,dynamicLoadComplete:false,previousSibling:null,nextSibling:null,_dynLoad:false,dataLoader:null,isLoading:false,hasIcon:true,iconMode:0,nowrap:false,isLeaf:false,contentStyle:"",contentElId:null,enableHighlight:false,highlightState:0,propagateHighlightUp:false,propagateHighlightDown:false,className:null,_type:"Node",init:function(oData,oParent,expanded){this.data={};this.children=[];this.index=YAHOO.widget.TreeView.nodeCount;++YAHOO.widget.TreeView.nodeCount;this.contentElId="ygtvcontentel"+this.index;if(Lang.isObject(oData)){for(var property in oData){if(oData.hasOwnProperty(property)){if(property.charAt(0)!='_'&&!Lang.isUndefined(this[property])&&!Lang.isFunction(this[property])){this[property]=oData[property]}else{this.data[property]=oData[property]}}}}if(!Lang.isUndefined(expanded)){this.expanded=expanded}this.createEvent("parentChange",this);if(oParent){oParent.appendChild(this)}},applyParent:function(parentNode){if(!parentNode){return false}this.tree=parentNode.tree;this.parent=parentNode;this.depth=parentNode.depth+1;this.tree.regNode(this);parentNode.childrenRendered=false;for(var i=0,len=this.children.length;i<len;++i){this.children[i].applyParent(this)}this.fireEvent("parentChange");return true},appendChild:function(childNode){if(this.hasChildren()){var sib=this.children[this.children.length-1];sib.nextSibling=childNode;childNode.previousSibling=sib}this.children[this.children.length]=childNode;childNode.applyParent(this);if(this.childrenRendered&&this.expanded){this.getChildrenEl().style.display=""}return childNode},appendTo:function(parentNode){return parentNode.appendChild(this)},insertBefore:function(node){var p=node.parent;if(p){if(this.tree){this.tree.popNode(this)}var refIndex=node.isChildOf(p);p.children.splice(refIndex,0,this);if(node.previousSibling){node.previousSibling.nextSibling=this}this.previousSibling=node.previousSibling;this.nextSibling=node;node.previousSibling=this;this.applyParent(p)}return this},insertAfter:function(node){var p=node.parent;if(p){if(this.tree){this.tree.popNode(this)}var refIndex=node.isChildOf(p);if(!node.nextSibling){this.nextSibling=null;return this.appendTo(p)}p.children.splice(refIndex+1,0,this);node.nextSibling.previousSibling=this;this.previousSibling=node;this.nextSibling=node.nextSibling;node.nextSibling=this;this.applyParent(p)}return this},isChildOf:function(parentNode){if(parentNode&&parentNode.children){for(var i=0,len=parentNode.children.length;i<len;++i){if(parentNode.children[i]===this){return i}}}return-1},getSiblings:function(){var sib=this.parent.children.slice(0);for(var i=0;i<sib.length&&sib[i]!=this;i++){}sib.splice(i,1);if(sib.length){return sib}return null},showChildren:function(){if(!this.tree.animateExpand(this.getChildrenEl(),this)){if(this.hasChildren()){this.getChildrenEl().style.display=""}}},hideChildren:function(){if(!this.tree.animateCollapse(this.getChildrenEl(),this)){this.getChildrenEl().style.display="none"}},getElId:function(){return"ygtv"+this.index},getChildrenElId:function(){return"ygtvc"+this.index},getToggleElId:function(){return"ygtvt"+this.index},getEl:function(){return Dom.get(this.getElId())},getChildrenEl:function(){return Dom.get(this.getChildrenElId())},getToggleEl:function(){return Dom.get(this.getToggleElId())},getContentEl:function(){return Dom.get(this.contentElId)},collapse:function(){if(!this.expanded){return}var ret=this.tree.onCollapse(this);if(false===ret){return}ret=this.tree.fireEvent("collapse",this);if(false===ret){return}if(!this.getEl()){this.expanded=false}else{this.hideChildren();this.expanded=false;this.updateIcon()}ret=this.tree.fireEvent("collapseComplete",this)},expand:function(lazySource){if(this.expanded&&!lazySource){return}var ret=true;if(!lazySource){ret=this.tree.onExpand(this);if(false===ret){return}ret=this.tree.fireEvent("expand",this)}if(false===ret){return}if(!this.getEl()){this.expanded=true;return}if(!this.childrenRendered){this.getChildrenEl().innerHTML=this.renderChildren()}else{}this.expanded=true;this.updateIcon();if(this.isLoading){this.expanded=false;return}if(!this.multiExpand){var sibs=this.getSiblings();for(var i=0;sibs&&i<sibs.length;++i){if(sibs[i]!=this&&sibs[i].expanded){sibs[i].collapse()}}}this.showChildren();ret=this.tree.fireEvent("expandComplete",this)},updateIcon:function(){if(this.hasIcon){var el=this.getToggleEl();if(el){el.className=el.className.replace(/\bygtv(([tl][pmn]h?)|(loading))\b/gi,this.getStyle())}}},getStyle:function(){if(this.isLoading){return"ygtvloading"}else{var loc=(this.nextSibling)?"t":"l";var type="n";if(this.hasChildren(true)||(this.isDynamic()&&!this.getIconMode())){type=(this.expanded)?"m":"p"}return"ygtv"+loc+type}},getHoverStyle:function(){var s=this.getStyle();if(this.hasChildren(true)&&!this.isLoading){s+="h"}return s},expandAll:function(){var l=this.children.length;for(var i=0;i<l;++i){var c=this.children[i];if(c.isDynamic()){break}else if(!c.multiExpand){break}else{c.expand();c.expandAll()}}},collapseAll:function(){for(var i=0;i<this.children.length;++i){this.children[i].collapse();this.children[i].collapseAll()}},setDynamicLoad:function(fnDataLoader,iconMode){if(fnDataLoader){this.dataLoader=fnDataLoader;this._dynLoad=true}else{this.dataLoader=null;this._dynLoad=false}if(iconMode){this.iconMode=iconMode}},isRoot:function(){return(this==this.tree.root)},isDynamic:function(){if(this.isLeaf){return false}else{return(!this.isRoot()&&(this._dynLoad||this.tree.root._dynLoad))}},getIconMode:function(){return(this.iconMode||this.tree.root.iconMode)},hasChildren:function(checkForLazyLoad){if(this.isLeaf){return false}else{return(this.children.length>0||(checkForLazyLoad&&this.isDynamic()&&!this.dynamicLoadComplete))}},toggle:function(){if(!this.tree.locked&&(this.hasChildren(true)||this.isDynamic())){if(this.expanded){this.collapse()}else{this.expand()}}},getHtml:function(){this.childrenRendered=false;return['<div class="ygtvitem" id="',this.getElId(),'">',this.getNodeHtml(),this.getChildrenHtml(),'</div>'].join("")},getChildrenHtml:function(){var sb=[];sb[sb.length]='<div class="ygtvchildren" id="'+this.getChildrenElId()+'"';if(!this.expanded||!this.hasChildren()){sb[sb.length]=' style="display:none;"'}sb[sb.length]='>';if((this.hasChildren(true)&&this.expanded)||(this.renderHidden&&!this.isDynamic())){sb[sb.length]=this.renderChildren()}sb[sb.length]='</div>';return sb.join("")},renderChildren:function(){var node=this;if(this.isDynamic()&&!this.dynamicLoadComplete){this.isLoading=true;this.tree.locked=true;if(this.dataLoader){setTimeout(function(){node.dataLoader(node,function(){node.loadComplete()})},10)}else if(this.tree.root.dataLoader){setTimeout(function(){node.tree.root.dataLoader(node,function(){node.loadComplete()})},10)}else{return"Error: data loader not found or not specified."}return""}else{return this.completeRender()}},completeRender:function(){var sb=[];for(var i=0;i<this.children.length;++i){sb[sb.length]=this.children[i].getHtml()}this.childrenRendered=true;return sb.join("")},loadComplete:function(){this.getChildrenEl().innerHTML=this.completeRender();this.dynamicLoadComplete=true;this.isLoading=false;this.expand(true);this.tree.locked=false},getAncestor:function(depth){if(depth>=this.depth||depth<0){return null}var p=this.parent;while(p.depth>depth){p=p.parent}return p},getDepthStyle:function(depth){return(this.getAncestor(depth).nextSibling)?"ygtvdepthcell":"ygtvblankdepthcell"},getNodeHtml:function(){var sb=[];sb[sb.length]='<table id="ygtvtableel'+this.index+'"border="0" cellpadding="0" cellspacing="0" class="ygtvtable ygtvdepth'+this.depth;if(this.enableHighlight){}if(this.className){sb[sb.length]=' '+this.className}sb[sb.length]='"><tr class="ygtvrow">';for(var i=0;i<this.depth;++i){sb[sb.length]='<td class="ygtvcell '+this.getDepthStyle(i)+'"><div class="ygtvspacer"></div></td>'}if(this.hasIcon){sb[sb.length]='<td id="'+this.getToggleElId();sb[sb.length]='" class="ygtvcell ';sb[sb.length]=this.getStyle();sb[sb.length]='"><a href="#" class="ygtvspacer">&nbsp;</a></td>'}sb[sb.length]='<td id="'+this.contentElId;sb[sb.length]='" class="ygtvcell ';sb[sb.length]=this.contentStyle+' ygtvcontent" ';sb[sb.length]=(this.nowrap)?' nowrap="nowrap" ':'';sb[sb.length]=' >';sb[sb.length]=this.getContentHtml();sb[sb.length]='</td></tr></table>';return sb.join("")},getContentHtml:function(){return""},refresh:function(){this.getChildrenEl().innerHTML=this.completeRender();if(this.hasIcon){var el=this.getToggleEl();if(el){el.className=el.className.replace(/\bygtv[lt][nmp]h*\b/gi,this.getStyle())}}},toString:function(){return this._type+" ("+this.index+")"},_focusHighlightedItems:[],_focusedItem:null,_canHaveFocus:function(){return this.getEl().getElementsByTagName('a').length>0},_removeFocus:function(){if(this._focusedItem){Event.removeListener(this._focusedItem,'blur');this._focusedItem=null}var el;while((el=this._focusHighlightedItems.shift())){Dom.removeClass(el,YAHOO.widget.TreeView.FOCUS_CLASS_NAME)}},focus:function(){var focused=false,self=this;if(this.tree.currentFocus){this.tree.currentFocus._removeFocus()}var expandParent=function(node){if(node.parent){expandParent(node.parent);node.parent.expand()}};expandParent(this);Dom.getElementsBy(function(el){return/ygtv(([tl][pmn]h?)|(content))/.test(el.className)},'td',self.getEl().firstChild,function(el){Dom.addClass(el,YAHOO.widget.TreeView.FOCUS_CLASS_NAME);if(!focused){var aEl=el.getElementsByTagName('a');if(aEl.length){aEl=aEl[0];aEl.focus();self._focusedItem=aEl;Event.on(aEl,'blur',function(){self.tree.fireEvent('focusChanged',{oldNode:self.tree.currentFocus,newNode:null});self.tree.currentFocus=null;self._removeFocus()});focused=true}}self._focusHighlightedItems.push(el)});if(focused){this.tree.fireEvent('focusChanged',{oldNode:this.tree.currentFocus,newNode:this});this.tree.currentFocus=this}else{this.tree.fireEvent('focusChanged',{oldNode:self.tree.currentFocus,newNode:null});this.tree.currentFocus=null;this._removeFocus()}return focused},getNodeCount:function(){for(var i=0,count=0;i<this.children.length;i++){count+=this.children[i].getNodeCount()}return count+1},getNodeDefinition:function(){if(this.isDynamic()){return false}var def,defs=Lang.merge(this.data),children=[];if(this.expanded){defs.expanded=this.expanded}if(!this.multiExpand){defs.multiExpand=this.multiExpand}if(!this.renderHidden){defs.renderHidden=this.renderHidden}if(!this.hasIcon){defs.hasIcon=this.hasIcon}if(this.nowrap){defs.nowrap=this.nowrap}if(this.className){defs.className=this.className}if(this.editable){defs.editable=this.editable}if(this.enableHighlight){defs.enableHighlight=this.enableHighlight}if(this.highlightState){defs.highlightState=this.highlightState}if(this.propagateHighlightUp){defs.propagateHighlightUp=this.propagateHighlightUp}if(this.propagateHighlightDown){defs.propagateHighlightDown=this.propagateHighlightDown}defs.type=this._type;for(var i=0;i<this.children.length;i++){def=this.children[i].getNodeDefinition();if(def===false){return false}children.push(def)}if(children.length){defs.children=children}return defs},getToggleLink:function(){return'return false;'},setNodesProperty:function(name,value,refresh){if(name.charAt(0)!='_'&&!Lang.isUndefined(this[name])&&!Lang.isFunction(this[name])){this[name]=value}else{this.data[name]=value}for(var i=0;i<this.children.length;i++){this.children[i].setNodesProperty(name,value)}if(refresh){this.refresh()}},toggleHighlight:function(){if(this.enableHighlight){if(this.highlightState==1){this.unhighlight()}else{this.highlight()}}},highlight:function(_silent){return;if(this.enableHighlight){if(this.tree.singleNodeHighlight){if(this.tree._currentlyHighlighted){this.tree._currentlyHighlighted.unhighlight()}this.tree._currentlyHighlighted=this}this.highlightState=1;this._setHighlightClassName();if(this.propagateHighlightDown){for(var i=0;i<this.children.length;i++){this.children[i].highlight(true)}}if(this.propagateHighlightUp){if(this.parent){this.parent._childrenHighlighted()}}if(!_silent){this.tree.fireEvent('highlightEvent',this)}}},unhighlight:function(_silent){if(this.enableHighlight){this.highlightState=0;this._setHighlightClassName();if(this.propagateHighlightDown){for(var i=0;i<this.children.length;i++){this.children[i].unhighlight(true)}}if(this.propagateHighlightUp){if(this.parent){this.parent._childrenHighlighted()}}if(!_silent){this.tree.fireEvent('highlightEvent',this)}}},_childrenHighlighted:function(){var yes=false,no=false;if(this.enableHighlight){for(var i=0;i<this.children.length;i++){switch(this.children[i].highlightState){case 0:no=true;break;case 1:yes=true;break;case 2:yes=no=true;break}}if(yes&&no){this.highlightState=2}else if(yes){this.highlightState=1}else{this.highlightState=0}this._setHighlightClassName();if(this.propagateHighlightUp){if(this.parent){this.parent._childrenHighlighted()}}}},_setHighlightClassName:function(){var el=Dom.get('ygtvtableel'+this.index);if(el){el.className=el.className.replace(/\bygtv-highlight\d\b/gi,'ygtv-highlight'+this.highlightState)}}};YAHOO.augment(YAHOO.widget.Node,YAHOO.util.EventProvider)})();YAHOO.widget.RootNode=function(oTree){this.init(null,null,true);this.tree=oTree};YAHOO.extend(YAHOO.widget.RootNode,YAHOO.widget.Node,{_type:"RootNode",getNodeHtml:function(){return""},toString:function(){return this._type},loadComplete:function(){this.tree.draw()},getNodeCount:function(){for(var i=0,count=0;i<this.children.length;i++){count+=this.children[i].getNodeCount()}return count},getNodeDefinition:function(){for(var def,defs=[],i=0;i<this.children.length;i++){def=this.children[i].getNodeDefinition();if(def===false){return false}defs.push(def)}return defs},collapse:function(){},expand:function(){},getSiblings:function(){return null},focus:function(){}});(function(){var Dom=YAHOO.util.Dom,Lang=YAHOO.lang,Event=YAHOO.util.Event;YAHOO.widget.TextNode=function(oData,oParent,expanded){if(oData){if(Lang.isString(oData)){oData={label:oData}}this.init(oData,oParent,expanded);this.setUpLabel(oData)}};YAHOO.extend(YAHOO.widget.TextNode,YAHOO.widget.Node,{labelStyle:"ygtvlabel",labelElId:null,label:null,title:null,href:null,target:"_self",_type:"TextNode",setUpLabel:function(oData){if(Lang.isString(oData)){oData={label:oData}}else{if(oData.style){this.labelStyle=oData.style}}this.label=oData.label;this.labelElId="ygtvlabelel"+this.index},getLabelEl:function(){return Dom.get(this.labelElId)},getContentHtml:function(){var sb=[];sb[sb.length]=this.href?'<a':'<span';sb[sb.length]=' id="'+this.labelElId+'"';sb[sb.length]=' class="'+this.labelStyle+'"';if(this.href){sb[sb.length]=' href="'+this.href+'"';sb[sb.length]=' target="'+this.target+'"'}if(this.title){sb[sb.length]=' title="'+this.title+'"'}sb[sb.length]=' >';sb[sb.length]=this.label;sb[sb.length]=this.href?'</a>':'</span>';return sb.join("")},getNodeDefinition:function(){var def=YAHOO.widget.TextNode.superclass.getNodeDefinition.call(this);if(def===false){return false}def.label=this.label;if(this.labelStyle!='ygtvlabel'){def.style=this.labelStyle}if(this.title){def.title=this.title}if(this.href){def.href=this.href}if(this.target!='_self'){def.target=this.target}return def},toString:function(){return YAHOO.widget.TextNode.superclass.toString.call(this)+": "+this.label},onLabelClick:function(){return false},refresh:function(){YAHOO.widget.TextNode.superclass.refresh.call(this);var label=this.getLabelEl();label.innerHTML=this.label;if(label.tagName.toUpperCase()=='A'){label.href=this.href;label.target=this.target}}})})();YAHOO.widget.MenuNode=function(oData,oParent,expanded){YAHOO.widget.MenuNode.superclass.constructor.call(this,oData,oParent,expanded);this.multiExpand=false};YAHOO.extend(YAHOO.widget.MenuNode,YAHOO.widget.TextNode,{_type:"MenuNode"});(function(){var Dom=YAHOO.util.Dom,Lang=YAHOO.lang,Event=YAHOO.util.Event;YAHOO.widget.HTMLNode=function(oData,oParent,expanded,hasIcon){if(oData){this.init(oData,oParent,expanded);this.initContent(oData,hasIcon)}};YAHOO.extend(YAHOO.widget.HTMLNode,YAHOO.widget.Node,{contentStyle:"ygtvhtml",html:null,_type:"HTMLNode",initContent:function(oData,hasIcon){this.setHtml(oData);this.contentElId="ygtvcontentel"+this.index;if(!Lang.isUndefined(hasIcon)){this.hasIcon=hasIcon}},setHtml:function(o){this.html=(typeof o==="string")?o:o.html;var el=this.getContentEl();if(el){el.innerHTML=this.html}},getContentHtml:function(){return this.html},getNodeDefinition:function(){var def=YAHOO.widget.HTMLNode.superclass.getNodeDefinition.call(this);if(def===false){return false}def.html=this.html;return def}})})();(function(){var Dom=YAHOO.util.Dom,Lang=YAHOO.lang,Event=YAHOO.util.Event,Calendar=YAHOO.widget.Calendar;YAHOO.widget.DateNode=function(oData,oParent,expanded){YAHOO.widget.DateNode.superclass.constructor.call(this,oData,oParent,expanded)};YAHOO.extend(YAHOO.widget.DateNode,YAHOO.widget.TextNode,{_type:"DateNode",calendarConfig:null,fillEditorContainer:function(editorData){var cal,container=editorData.inputContainer;if(Lang.isUndefined(Calendar)){Dom.replaceClass(editorData.editorPanel,'ygtv-edit-DateNode','ygtv-edit-TextNode');YAHOO.widget.DateNode.superclass.fillEditorContainer.call(this,editorData);return}if(editorData.nodeType!=this._type){editorData.nodeType=this._type;editorData.saveOnEnter=false;editorData.node.destroyEditorContents(editorData);editorData.inputObject=cal=new Calendar(container.appendChild(document.createElement('div')));if(this.calendarConfig){cal.cfg.applyConfig(this.calendarConfig,true);cal.cfg.fireQueue()}cal.selectEvent.subscribe(function(){this.tree._closeEditor(true)},this,true)}else{cal=editorData.inputObject}cal.cfg.setProperty("selected",this.label,false);var delim=cal.cfg.getProperty('DATE_FIELD_DELIMITER');var pageDate=this.label.split(delim);cal.cfg.setProperty('pagedate',pageDate[cal.cfg.getProperty('MDY_MONTH_POSITION')-1]+delim+pageDate[cal.cfg.getProperty('MDY_YEAR_POSITION')-1]);cal.cfg.fireQueue();cal.render();cal.oDomContainer.focus()},saveEditorValue:function(editorData){var node=editorData.node,validator=node.tree.validator,value;if(Lang.isUndefined(Calendar)){value=editorData.inputElement.value}else{var cal=editorData.inputObject,date=cal.getSelectedDates()[0],dd=[];dd[cal.cfg.getProperty('MDY_DAY_POSITION')-1]=date.getDate();dd[cal.cfg.getProperty('MDY_MONTH_POSITION')-1]=date.getMonth()+1;dd[cal.cfg.getProperty('MDY_YEAR_POSITION')-1]=date.getFullYear();value=dd.join(cal.cfg.getProperty('DATE_FIELD_DELIMITER'))}if(Lang.isFunction(validator)){value=validator(value,node.label,node);if(Lang.isUndefined(value)){return false}}node.label=value;node.getLabelEl().innerHTML=value},getNodeDefinition:function(){var def=YAHOO.widget.DateNode.superclass.getNodeDefinition.call(this);if(def===false){return false}if(this.calendarConfig){def.calendarConfig=this.calendarConfig}return def}})})();(function(){var Dom=YAHOO.util.Dom,Lang=YAHOO.lang,Event=YAHOO.util.Event,TV=YAHOO.widget.TreeView,TVproto=TV.prototype;TV.editorData={active:false,whoHasIt:null,nodeType:null,editorPanel:null,inputContainer:null,buttonsContainer:null,node:null,saveOnEnter:true};TVproto.validator=null;TVproto._nodeEditing=function(node){if(node.fillEditorContainer&&node.editable){var ed,topLeft,buttons,button,editorData=TV.editorData;editorData.active=true;editorData.whoHasIt=this;if(!editorData.nodeType){editorData.editorPanel=ed=document.body.appendChild(document.createElement('div'));Dom.addClass(ed,'ygtv-label-editor');buttons=editorData.buttonsContainer=ed.appendChild(document.createElement('div'));Dom.addClass(buttons,'ygtv-button-container');button=buttons.appendChild(document.createElement('button'));Dom.addClass(button,'ygtvok');button.innerHTML=' ';button=buttons.appendChild(document.createElement('button'));Dom.addClass(button,'ygtvcancel');button.innerHTML=' ';Event.on(buttons,'click',function(ev){var target=Event.getTarget(ev);var node=TV.editorData.node;if(Dom.hasClass(target,'ygtvok')){Event.stopEvent(ev);this._closeEditor(true)}if(Dom.hasClass(target,'ygtvcancel')){Event.stopEvent(ev);this._closeEditor(false)}},this,true);editorData.inputContainer=ed.appendChild(document.createElement('div'));Dom.addClass(editorData.inputContainer,'ygtv-input');Event.on(ed,'keydown',function(ev){var editorData=TV.editorData,KEY=YAHOO.util.KeyListener.KEY;switch(ev.keyCode){case KEY.ENTER:Event.stopEvent(ev);if(editorData.saveOnEnter){this._closeEditor(true)}break;case KEY.ESCAPE:Event.stopEvent(ev);this._closeEditor(false);break}},this,true)}else{ed=editorData.editorPanel}editorData.node=node;if(editorData.nodeType){Dom.removeClass(ed,'ygtv-edit-'+editorData.nodeType)}Dom.addClass(ed,' ygtv-edit-'+node._type);topLeft=Dom.getXY(node.getContentEl());Dom.setStyle(ed,'left',topLeft[0]+'px');Dom.setStyle(ed,'top',topLeft[1]+'px');Dom.setStyle(ed,'display','block');ed.focus();node.fillEditorContainer(editorData);return true}};TVproto.onEventEditNode=function(oArgs){if(oArgs instanceof YAHOO.widget.Node){oArgs.editNode()}else if(oArgs.node instanceof YAHOO.widget.Node){oArgs.node.editNode()}};TVproto._closeEditor=function(save){var ed=TV.editorData,node=ed.node,close=true;if(save){close=ed.node.saveEditorValue(ed)!==false}if(close){Dom.setStyle(ed.editorPanel,'display','none');ed.active=false;node.focus()}};TVproto._destroyEditor=function(){var ed=TV.editorData;if(ed&&ed.nodeType&&(!ed.active||ed.whoHasIt===this)){Event.removeListener(ed.editorPanel,'keydown');Event.removeListener(ed.buttonContainer,'click');ed.node.destroyEditorContents(ed);document.body.removeChild(ed.editorPanel);ed.nodeType=ed.editorPanel=ed.inputContainer=ed.buttonsContainer=ed.whoHasIt=ed.node=null;ed.active=false}};var Nproto=YAHOO.widget.Node.prototype;Nproto.editable=false;Nproto.editNode=function(){this.tree._nodeEditing(this)};Nproto.fillEditorContainer=null;Nproto.destroyEditorContents=function(editorData){Event.purgeElement(editorData.inputContainer,true);editorData.inputContainer.innerHTML=''};Nproto.saveEditorValue=function(editorData){};var TNproto=YAHOO.widget.TextNode.prototype;TNproto.fillEditorContainer=function(editorData){var input;if(editorData.nodeType!=this._type){editorData.nodeType=this._type;editorData.saveOnEnter=true;editorData.node.destroyEditorContents(editorData);editorData.inputElement=input=editorData.inputContainer.appendChild(document.createElement('input'))}else{input=editorData.inputElement}input.value=this.label;input.focus();input.select()};TNproto.saveEditorValue=function(editorData){var node=editorData.node,value=editorData.inputElement.value,validator=node.tree.validator;if(Lang.isFunction(validator)){value=validator(value,node.label,node);if(Lang.isUndefined(value)){return false}}node.label=value;node.getLabelEl().innerHTML=value};TNproto.destroyEditorContents=function(editorData){editorData.inputContainer.innerHTML=''}})();YAHOO.register("treeview",YAHOO.widget.TreeView,{version:"2.7.0",build:"1799"});/*
330 313 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
331 314 Code licensed under the BSD License:
332 315 http://developer.yahoo.net/yui/license.txt
... ... @@ -336,48 +319,1440 @@ version: 2.7.0
336 319 }K.register(X);}}this._menu=X;if(!W&&!P){if(G.inDocument(R)){X.render(R.parentNode);}else{this.on("appendTo",V);}}}}if(B){if(J){N=J.prototype.CSS_CLASS_NAME;}if(U&&J&&(U instanceof J)){X=U;W=true;S.call(this);}else{if(B&&U&&(U instanceof B)){X=U;W=true;X.cfg.queueProperty("visible",false);S.call(this);}else{if(J&&I.isArray(U)){X=new J(G.generateId(),{lazyload:P,itemdata:U});this._menu=X;this.on("appendTo",S);}else{if(I.isString(U)){O=G.get(U);if(O){if(J&&G.hasClass(O,N)||O.nodeName.toUpperCase()=="SELECT"){X=new J(U,{lazyload:P});S.call(this);}else{if(B){X=new B(U,{visible:false});S.call(this);}}}}else{if(U&&U.nodeName){if(J&&G.hasClass(U,N)||U.nodeName.toUpperCase()=="SELECT"){X=new J(U,{lazyload:P});S.call(this);}else{if(B){if(!U.id){G.generateId(U);}X=new B(U,{visible:false});S.call(this);}}}}}}}}},_setOnClick:function(N){if(this._onclickAttributeValue&&(this._onclickAttributeValue!=N)){this.removeListener("click",this._onclickAttributeValue.fn);this._onclickAttributeValue=null;}if(!this._onclickAttributeValue&&I.isObject(N)&&I.isFunction(N.fn)){this.on("click",N.fn,N.obj,N.scope);this._onclickAttributeValue=N;}},_isActivationKey:function(N){var S=this.get("type"),O=(S=="checkbox"||S=="radio")?this.CHECK_ACTIVATION_KEYS:this.ACTIVATION_KEYS,Q=O.length,R=false,P;if(Q>0){P=Q-1;do{if(N==O[P]){R=true;break;}}while(P--);}return R;},_isSplitButtonOptionKey:function(P){var O=(M.getCharCode(P)==40);var N=function(Q){M.preventDefault(Q);this.removeListener("keypress",N);};if(O){if(L.opera){this.on("keypress",N);}M.preventDefault(P);}return O;},_addListenersToForm:function(){var T=this.getForm(),S=YAHOO.widget.Button.onFormKeyPress,R,N,Q,P,O;if(T){M.on(T,"reset",this._onFormReset,null,this);M.on(T,"submit",this._onFormSubmit,null,this);N=this.get("srcelement");if(this.get("type")=="submit"||(N&&N.type=="submit")){Q=M.getListeners(T,"keypress");R=false;if(Q){P=Q.length;if(P>0){O=P-1;do{if(Q[O].fn==S){R=true;break;}}while(O--);}}if(!R){M.on(T,"keypress",S);}}}},_showMenu:function(R){if(YAHOO.widget.MenuManager){YAHOO.widget.MenuManager.hideVisible();}if(K){K.hideAll();}var N=this._menu,Q=this.get("menualignment"),P=this.get("focusmenu"),O;if(this._renderedMenu){N.cfg.setProperty("context",[this.get("element"),Q[0],Q[1]]);N.cfg.setProperty("preventcontextoverlap",true);N.cfg.setProperty("constraintoviewport",true);}else{N.cfg.queueProperty("context",[this.get("element"),Q[0],Q[1]]);N.cfg.queueProperty("preventcontextoverlap",true);N.cfg.queueProperty("constraintoviewport",true);}this.focus();if(J&&N&&(N instanceof J)){O=N.focus;N.focus=function(){};if(this._renderedMenu){N.cfg.setProperty("minscrollheight",this.get("menuminscrollheight"));N.cfg.setProperty("maxheight",this.get("menumaxheight"));}else{N.cfg.queueProperty("minscrollheight",this.get("menuminscrollheight"));N.cfg.queueProperty("maxheight",this.get("menumaxheight"));}N.show();N.focus=O;N.align();if(R.type=="mousedown"){M.stopPropagation(R);}if(P){N.focus();}}else{if(B&&N&&(N instanceof B)){if(!this._renderedMenu){N.render(this.get("element").parentNode);}N.show();N.align();}}},_hideMenu:function(){var N=this._menu;if(N){N.hide();}},_onMouseOver:function(O){var Q=this.get("type"),N,P;if(Q==="split"){N=this.get("element");P=(G.getX(N)+(N.offsetWidth-this.OPTION_AREA_WIDTH));this._nOptionRegionX=P;}if(!this._hasMouseEventHandlers){if(Q==="split"){this.on("mousemove",this._onMouseMove);}this.on("mouseout",this._onMouseOut);this._hasMouseEventHandlers=true;}this.addStateCSSClasses("hover");if(Q==="split"&&(M.getPageX(O)>P)){this.addStateCSSClasses("hoveroption");}if(this._activationButtonPressed){this.addStateCSSClasses("active");}if(this._bOptionPressed){this.addStateCSSClasses("activeoption");}if(this._activationButtonPressed||this._bOptionPressed){M.removeListener(document,"mouseup",this._onDocumentMouseUp);}},_onMouseMove:function(N){var O=this._nOptionRegionX;if(O){if(M.getPageX(N)>O){this.addStateCSSClasses("hoveroption");}else{this.removeStateCSSClasses("hoveroption");}}},_onMouseOut:function(N){var O=this.get("type");this.removeStateCSSClasses("hover");if(O!="menu"){this.removeStateCSSClasses("active");}if(this._activationButtonPressed||this._bOptionPressed){M.on(document,"mouseup",this._onDocumentMouseUp,null,this);}if(O==="split"&&(M.getPageX(N)>this._nOptionRegionX)){this.removeStateCSSClasses("hoveroption");}},_onDocumentMouseUp:function(P){this._activationButtonPressed=false;this._bOptionPressed=false;var Q=this.get("type"),N,O;if(Q=="menu"||Q=="split"){N=M.getTarget(P);O=this._menu.element;if(N!=O&&!G.isAncestor(O,N)){this.removeStateCSSClasses((Q=="menu"?"active":"activeoption"));this._hideMenu();}}M.removeListener(document,"mouseup",this._onDocumentMouseUp);},_onMouseDown:function(P){var Q,O=true;function N(){this._hideMenu();this.removeListener("mouseup",N);}if((P.which||P.button)==1){if(!this.hasFocus()){this.focus();}Q=this.get("type");if(Q=="split"){if(M.getPageX(P)>this._nOptionRegionX){this.fireEvent("option",P);O=false;}else{this.addStateCSSClasses("active");this._activationButtonPressed=true;}}else{if(Q=="menu"){if(this.isActive()){this._hideMenu();this._activationButtonPressed=false;}else{this._showMenu(P);this._activationButtonPressed=true;}}else{this.addStateCSSClasses("active");this._activationButtonPressed=true;}}if(Q=="split"||Q=="menu"){this._hideMenuTimer=I.later(250,this,this.on,["mouseup",N]);}}return O;},_onMouseUp:function(P){var Q=this.get("type"),N=this._hideMenuTimer,O=true;if(N){N.cancel();}if(Q=="checkbox"||Q=="radio"){this.set("checked",!(this.get("checked")));}this._activationButtonPressed=false;if(Q!="menu"){this.removeStateCSSClasses("active");}if(Q=="split"&&M.getPageX(P)>this._nOptionRegionX){O=false;}return O;},_onFocus:function(O){var N;this.addStateCSSClasses("focus");if(this._activationKeyPressed){this.addStateCSSClasses("active");}C=this;if(!this._hasKeyEventHandlers){N=this._button;M.on(N,"blur",this._onBlur,null,this);M.on(N,"keydown",this._onKeyDown,null,this);M.on(N,"keyup",this._onKeyUp,null,this);
337 320 this._hasKeyEventHandlers=true;}this.fireEvent("focus",O);},_onBlur:function(N){this.removeStateCSSClasses("focus");if(this.get("type")!="menu"){this.removeStateCSSClasses("active");}if(this._activationKeyPressed){M.on(document,"keyup",this._onDocumentKeyUp,null,this);}C=null;this.fireEvent("blur",N);},_onDocumentKeyUp:function(N){if(this._isActivationKey(M.getCharCode(N))){this._activationKeyPressed=false;M.removeListener(document,"keyup",this._onDocumentKeyUp);}},_onKeyDown:function(O){var N=this._menu;if(this.get("type")=="split"&&this._isSplitButtonOptionKey(O)){this.fireEvent("option",O);}else{if(this._isActivationKey(M.getCharCode(O))){if(this.get("type")=="menu"){this._showMenu(O);}else{this._activationKeyPressed=true;this.addStateCSSClasses("active");}}}if(N&&N.cfg.getProperty("visible")&&M.getCharCode(O)==27){N.hide();this.focus();}},_onKeyUp:function(N){var O;if(this._isActivationKey(M.getCharCode(N))){O=this.get("type");if(O=="checkbox"||O=="radio"){this.set("checked",!(this.get("checked")));}this._activationKeyPressed=false;if(this.get("type")!="menu"){this.removeStateCSSClasses("active");}}},_onClick:function(Q){var S=this.get("type"),N,R,O,P;switch(S){case"radio":case"checkbox":if(!this._hasDefaultTitle){if(this.get("checked")){N=(S=="radio")?this.RADIO_CHECKED_TITLE:this.CHECKBOX_CHECKED_TITLE;}else{N=(S=="radio")?this.RADIO_DEFAULT_TITLE:this.CHECKBOX_DEFAULT_TITLE;}this.set("title",N);}break;case"submit":if(Q.returnValue!==false){this.submitForm();}break;case"reset":R=this.getForm();if(R){R.reset();}break;case"menu":N=this._menu.cfg.getProperty("visible")?this.MENUBUTTON_MENU_VISIBLE_TITLE:this.MENUBUTTON_DEFAULT_TITLE;this.set("title",N);break;case"split":if(this._nOptionRegionX>0&&(M.getPageX(Q)>this._nOptionRegionX)){P=false;}else{this._hideMenu();O=this.get("srcelement");if(O&&O.type=="submit"&&Q.returnValue!==false){this.submitForm();}}N=this._menu.cfg.getProperty("visible")?this.SPLITBUTTON_OPTION_VISIBLE_TITLE:this.SPLITBUTTON_DEFAULT_TITLE;this.set("title",N);break;}return P;},_onDblClick:function(O){var N=true;if(this.get("type")=="split"&&M.getPageX(O)>this._nOptionRegionX){N=false;}return N;},_onAppendTo:function(N){I.later(0,this,this._addListenersToForm);},_onFormReset:function(O){var P=this.get("type"),N=this._menu;if(P=="checkbox"||P=="radio"){this.resetValue("checked");}if(J&&N&&(N instanceof J)){this.resetValue("selectedMenuItem");}},_onFormSubmit:function(N){this.createHiddenFields();},_onDocumentMouseDown:function(Q){var N=M.getTarget(Q),P=this.get("element"),O=this._menu.element;if(N!=P&&!G.isAncestor(P,N)&&N!=O&&!G.isAncestor(O,N)){this._hideMenu();M.removeListener(document,"mousedown",this._onDocumentMouseDown);}},_onOption:function(N){if(this.hasClass("yui-split-button-activeoption")){this._hideMenu();this._bOptionPressed=false;}else{this._showMenu(N);this._bOptionPressed=true;}},_onMenuShow:function(O){M.on(document,"mousedown",this._onDocumentMouseDown,null,this);var N,P;if(this.get("type")=="split"){N=this.SPLITBUTTON_OPTION_VISIBLE_TITLE;P="activeoption";}else{N=this.MENUBUTTON_MENU_VISIBLE_TITLE;P="active";}this.addStateCSSClasses(P);this.set("title",N);},_onMenuHide:function(P){var O=this._menu,N,Q;if(this.get("type")=="split"){N=this.SPLITBUTTON_DEFAULT_TITLE;Q="activeoption";}else{N=this.MENUBUTTON_DEFAULT_TITLE;Q="active";}this.removeStateCSSClasses(Q);this.set("title",N);if(this.get("type")=="split"){this._bOptionPressed=false;}},_onMenuKeyDown:function(P,O){var N=O[0];if(M.getCharCode(N)==27){this.focus();if(this.get("type")=="split"){this._bOptionPressed=false;}}},_onMenuRender:function(P){var S=this.get("element"),O=S.parentNode,N=this._menu,R=N.element,Q=N.srcElement;if(O!=R.parentNode){O.appendChild(R);}this._renderedMenu=true;if(Q&&Q.nodeName.toLowerCase()==="select"&&Q.value){this.set("selectedMenuItem",N.getItem(Q.selectedIndex));}},_onMenuClick:function(O,N){var Q=N[1],P;if(Q){this.set("selectedMenuItem",Q);P=this.get("srcelement");if(P&&P.type=="submit"){this.submitForm();}this._hideMenu();}},_onSelectedMenuItemChange:function(N){var O=N.prevValue,P=N.newValue;if(O){G.removeClass(O.element,"yui-button-selectedmenuitem");}if(P){G.addClass(P.element,"yui-button-selectedmenuitem");}},createButtonElement:function(N){var P=this.NODE_NAME,O=document.createElement(P);O.innerHTML="<"+P+' class="first-child">'+(N=="link"?"<a></a>":'<button type="button"></button>')+"</"+P+">";return O;},addStateCSSClasses:function(N){var O=this.get("type");if(I.isString(N)){if(N!="activeoption"&&N!="hoveroption"){this.addClass(this.CSS_CLASS_NAME+("-"+N));}this.addClass("yui-"+O+("-button-"+N));}},removeStateCSSClasses:function(N){var O=this.get("type");if(I.isString(N)){this.removeClass(this.CSS_CLASS_NAME+("-"+N));this.removeClass("yui-"+O+("-button-"+N));}},createHiddenFields:function(){this.removeHiddenFields();var V=this.getForm(),Z,O,S,X,Y,T,U,N,R,W,P,Q=false;if(V&&!this.get("disabled")){O=this.get("type");S=(O=="checkbox"||O=="radio");if((S&&this.get("checked"))||(E==this)){Z=F((S?O:"hidden"),this.get("name"),this.get("value"),this.get("checked"));if(Z){if(S){Z.style.display="none";}V.appendChild(Z);}}X=this._menu;if(J&&X&&(X instanceof J)){Y=this.get("selectedMenuItem");P=X.srcElement;Q=(P&&P.nodeName.toUpperCase()=="SELECT");if(Y){U=(Y.value===null||Y.value==="")?Y.cfg.getProperty("text"):Y.value;T=this.get("name");if(Q){W=P.name;}else{if(T){W=(T+"_options");}}if(U&&W){N=F("hidden",W,U);V.appendChild(N);}}else{if(Q){V.appendChild(P);}}}if(Z&&N){this._hiddenFields=[Z,N];}else{if(!Z&&N){this._hiddenFields=N;}else{if(Z&&!N){this._hiddenFields=Z;}}}R=this._hiddenFields;}return R;},removeHiddenFields:function(){var Q=this._hiddenFields,O,P;function N(R){if(G.inDocument(R)){R.parentNode.removeChild(R);}}if(Q){if(I.isArray(Q)){O=Q.length;if(O>0){P=O-1;do{N(Q[P]);}while(P--);}}else{N(Q);}this._hiddenFields=null;}},submitForm:function(){var Q=this.getForm(),P=this.get("srcelement"),O=false,N;if(Q){if(this.get("type")=="submit"||(P&&P.type=="submit")){E=this;
338 321 }if(L.ie){O=Q.fireEvent("onsubmit");}else{N=document.createEvent("HTMLEvents");N.initEvent("submit",true,true);O=Q.dispatchEvent(N);}if((L.ie||L.webkit)&&O){Q.submit();}}return O;},init:function(O,a){var Q=a.type=="link"?"a":"button",V=a.srcelement,Z=O.getElementsByTagName(Q)[0],X;if(!Z){X=O.getElementsByTagName("input")[0];if(X){Z=document.createElement("button");Z.setAttribute("type","button");X.parentNode.replaceChild(Z,X);}}this._button=Z;this._hasDefaultTitle=(a.title&&a.title.length>0);YAHOO.widget.Button.superclass.init.call(this,O,a);var T=this.get("id"),N=T+"-button";Z.id=N;var U,W;var d=function(e){return(e.htmlFor===T);};var S=function(){W.setAttribute((L.ie?"htmlFor":"for"),N);};if(V&&this.get("type")!="link"){U=G.getElementsBy(d,"label");if(I.isArray(U)&&U.length>0){W=U[0];}}D[T]=this;this.addClass(this.CSS_CLASS_NAME);this.addClass("yui-"+this.get("type")+"-button");M.on(this._button,"focus",this._onFocus,null,this);this.on("mouseover",this._onMouseOver);this.on("mousedown",this._onMouseDown);this.on("mouseup",this._onMouseUp);this.on("click",this._onClick);var Y=this.get("onclick");this.set("onclick",null);this.set("onclick",Y);this.on("dblclick",this._onDblClick);if(W){this.on("appendTo",S);}this.on("appendTo",this._onAppendTo);var c=this.get("container"),P=this.get("element"),b=G.inDocument(P),R;if(c){if(V&&V!=P){R=V.parentNode;if(R){R.removeChild(V);}}if(I.isString(c)){M.onContentReady(c,this.appendTo,c,this);}else{this.on("init",function(){I.later(0,this,this.appendTo,c);});}}else{if(!b&&V&&V!=P){R=V.parentNode;if(R){this.fireEvent("beforeAppendTo",{type:"beforeAppendTo",target:R});R.replaceChild(P,V);this.fireEvent("appendTo",{type:"appendTo",target:R});}}else{if(this.get("type")!="link"&&b&&V&&V==P){this._addListenersToForm();}}}this.fireEvent("init",{type:"init",target:this});},initAttributes:function(O){var N=O||{};YAHOO.widget.Button.superclass.initAttributes.call(this,N);this.setAttributeConfig("type",{value:(N.type||"push"),validator:I.isString,writeOnce:true,method:this._setType});this.setAttributeConfig("label",{value:N.label,validator:I.isString,method:this._setLabel});this.setAttributeConfig("value",{value:N.value});this.setAttributeConfig("name",{value:N.name,validator:I.isString});this.setAttributeConfig("tabindex",{value:N.tabindex,validator:I.isNumber,method:this._setTabIndex});this.configureAttribute("title",{value:N.title,validator:I.isString,method:this._setTitle});this.setAttributeConfig("disabled",{value:(N.disabled||false),validator:I.isBoolean,method:this._setDisabled});this.setAttributeConfig("href",{value:N.href,validator:I.isString,method:this._setHref});this.setAttributeConfig("target",{value:N.target,validator:I.isString,method:this._setTarget});this.setAttributeConfig("checked",{value:(N.checked||false),validator:I.isBoolean,method:this._setChecked});this.setAttributeConfig("container",{value:N.container,writeOnce:true});this.setAttributeConfig("srcelement",{value:N.srcelement,writeOnce:true});this.setAttributeConfig("menu",{value:null,method:this._setMenu,writeOnce:true});this.setAttributeConfig("lazyloadmenu",{value:(N.lazyloadmenu===false?false:true),validator:I.isBoolean,writeOnce:true});this.setAttributeConfig("menuclassname",{value:(N.menuclassname||"yui-button-menu"),validator:I.isString,method:this._setMenuClassName,writeOnce:true});this.setAttributeConfig("menuminscrollheight",{value:(N.menuminscrollheight||90),validator:I.isNumber});this.setAttributeConfig("menumaxheight",{value:(N.menumaxheight||0),validator:I.isNumber});this.setAttributeConfig("menualignment",{value:(N.menualignment||["tl","bl"]),validator:I.isArray});this.setAttributeConfig("selectedMenuItem",{value:null});this.setAttributeConfig("onclick",{value:N.onclick,method:this._setOnClick});this.setAttributeConfig("focusmenu",{value:(N.focusmenu===false?false:true),validator:I.isBoolean});},focus:function(){if(!this.get("disabled")){this._button.focus();}},blur:function(){if(!this.get("disabled")){this._button.blur();}},hasFocus:function(){return(C==this);},isActive:function(){return this.hasClass(this.CSS_CLASS_NAME+"-active");},getMenu:function(){return this._menu;},getForm:function(){var N=this._button,O;if(N){O=N.form;}return O;},getHiddenFields:function(){return this._hiddenFields;},destroy:function(){var P=this.get("element"),O=P.parentNode,N=this._menu,R;if(N){if(K&&K.find(N)){K.remove(N);}N.destroy();}M.purgeElement(P);M.purgeElement(this._button);M.removeListener(document,"mouseup",this._onDocumentMouseUp);M.removeListener(document,"keyup",this._onDocumentKeyUp);M.removeListener(document,"mousedown",this._onDocumentMouseDown);var Q=this.getForm();if(Q){M.removeListener(Q,"reset",this._onFormReset);M.removeListener(Q,"submit",this._onFormSubmit);}this.unsubscribeAll();if(O){O.removeChild(P);}delete D[this.get("id")];R=G.getElementsByClassName(this.CSS_CLASS_NAME,this.NODE_NAME,Q);if(I.isArray(R)&&R.length===0){M.removeListener(Q,"keypress",YAHOO.widget.Button.onFormKeyPress);}},fireEvent:function(O,N){var P=arguments[0];if(this.DOM_EVENTS[P]&&this.get("disabled")){return false;}return YAHOO.widget.Button.superclass.fireEvent.apply(this,arguments);},toString:function(){return("Button "+this.get("id"));}});YAHOO.widget.Button.onFormKeyPress=function(R){var P=M.getTarget(R),S=M.getCharCode(R),Q=P.nodeName&&P.nodeName.toUpperCase(),N=P.type,T=false,V,X,O,W;function U(a){var Z,Y;switch(a.nodeName.toUpperCase()){case"INPUT":case"BUTTON":if(a.type=="submit"&&!a.disabled){if(!T&&!O){O=a;}}break;default:Z=a.id;if(Z){V=D[Z];if(V){T=true;if(!V.get("disabled")){Y=V.get("srcelement");if(!X&&(V.get("type")=="submit"||(Y&&Y.type=="submit"))){X=V;}}}}break;}}if(S==13&&((Q=="INPUT"&&(N=="text"||N=="password"||N=="checkbox"||N=="radio"||N=="file"))||Q=="SELECT")){G.getElementsBy(U,"*",this);if(O){O.focus();}else{if(!O&&X){M.preventDefault(R);if(L.ie){X.get("element").fireEvent("onclick");}else{W=document.createEvent("HTMLEvents");W.initEvent("click",true,true);if(L.gecko<1.9){X.fireEvent("click",W);
339   -}else{X.get("element").dispatchEvent(W);}}}}}};YAHOO.widget.Button.addHiddenFieldsToForm=function(N){var S=G.getElementsByClassName(YAHOO.widget.Button.prototype.CSS_CLASS_NAME,"*",N),Q=S.length,R,O,P;if(Q>0){for(P=0;P<Q;P++){O=S[P].id;if(O){R=D[O];if(R){R.createHiddenFields();}}}}};YAHOO.widget.Button.getButton=function(N){return D[N];};})();(function(){var C=YAHOO.util.Dom,B=YAHOO.util.Event,D=YAHOO.lang,A=YAHOO.widget.Button,E={};YAHOO.widget.ButtonGroup=function(J,H){var I=YAHOO.widget.ButtonGroup.superclass.constructor,K,G,F;if(arguments.length==1&&!D.isString(J)&&!J.nodeName){if(!J.id){F=C.generateId();J.id=F;}I.call(this,(this._createGroupElement()),J);}else{if(D.isString(J)){G=C.get(J);if(G){if(G.nodeName.toUpperCase()==this.NODE_NAME){I.call(this,G,H);}}}else{K=J.nodeName.toUpperCase();if(K&&K==this.NODE_NAME){if(!J.id){J.id=C.generateId();}I.call(this,J,H);}}}};YAHOO.extend(YAHOO.widget.ButtonGroup,YAHOO.util.Element,{_buttons:null,NODE_NAME:"DIV",CSS_CLASS_NAME:"yui-buttongroup",_createGroupElement:function(){var F=document.createElement(this.NODE_NAME);return F;},_setDisabled:function(G){var H=this.getCount(),F;if(H>0){F=H-1;do{this._buttons[F].set("disabled",G);}while(F--);}},_onKeyDown:function(K){var G=B.getTarget(K),I=B.getCharCode(K),H=G.parentNode.parentNode.id,J=E[H],F=-1;if(I==37||I==38){F=(J.index===0)?(this._buttons.length-1):(J.index-1);}else{if(I==39||I==40){F=(J.index===(this._buttons.length-1))?0:(J.index+1);}}if(F>-1){this.check(F);this.getButton(F).focus();}},_onAppendTo:function(H){var I=this._buttons,G=I.length,F;for(F=0;F<G;F++){I[F].appendTo(this.get("element"));}},_onButtonCheckedChange:function(G,F){var I=G.newValue,H=this.get("checkedButton");if(I&&H!=F){if(H){H.set("checked",false,true);}this.set("checkedButton",F);this.set("value",F.get("value"));}else{if(H&&!H.set("checked")){H.set("checked",true,true);}}},init:function(I,H){this._buttons=[];YAHOO.widget.ButtonGroup.superclass.init.call(this,I,H);this.addClass(this.CSS_CLASS_NAME);var J=this.getElementsByClassName("yui-radio-button");if(J.length>0){this.addButtons(J);}function F(K){return(K.type=="radio");}J=C.getElementsBy(F,"input",this.get("element"));if(J.length>0){this.addButtons(J);}this.on("keydown",this._onKeyDown);this.on("appendTo",this._onAppendTo);var G=this.get("container");if(G){if(D.isString(G)){B.onContentReady(G,function(){this.appendTo(G);},null,this);}else{this.appendTo(G);}}},initAttributes:function(G){var F=G||{};YAHOO.widget.ButtonGroup.superclass.initAttributes.call(this,F);this.setAttributeConfig("name",{value:F.name,validator:D.isString});this.setAttributeConfig("disabled",{value:(F.disabled||false),validator:D.isBoolean,method:this._setDisabled});this.setAttributeConfig("value",{value:F.value});this.setAttributeConfig("container",{value:F.container,writeOnce:true});this.setAttributeConfig("checkedButton",{value:null});},addButton:function(J){var L,K,G,F,H,I;if(J instanceof A&&J.get("type")=="radio"){L=J;}else{if(!D.isString(J)&&!J.nodeName){J.type="radio";L=new A(J);}else{L=new A(J,{type:"radio"});}}if(L){F=this._buttons.length;H=L.get("name");I=this.get("name");L.index=F;this._buttons[F]=L;E[L.get("id")]=L;if(H!=I){L.set("name",I);}if(this.get("disabled")){L.set("disabled",true);}if(L.get("checked")){this.set("checkedButton",L);}K=L.get("element");G=this.get("element");if(K.parentNode!=G){G.appendChild(K);}L.on("checkedChange",this._onButtonCheckedChange,L,this);}return L;},addButtons:function(G){var H,I,J,F;if(D.isArray(G)){H=G.length;J=[];if(H>0){for(F=0;F<H;F++){I=this.addButton(G[F]);if(I){J[J.length]=I;}}}}return J;},removeButton:function(H){var I=this.getButton(H),G,F;if(I){this._buttons.splice(H,1);delete E[I.get("id")];I.removeListener("checkedChange",this._onButtonCheckedChange);I.destroy();G=this._buttons.length;if(G>0){F=this._buttons.length-1;do{this._buttons[F].index=F;}while(F--);}}},getButton:function(F){return this._buttons[F];},getButtons:function(){return this._buttons;},getCount:function(){return this._buttons.length;},focus:function(H){var I,G,F;if(D.isNumber(H)){I=this._buttons[H];if(I){I.focus();}}else{G=this.getCount();for(F=0;F<G;F++){I=this._buttons[F];if(!I.get("disabled")){I.focus();break;}}}},check:function(F){var G=this.getButton(F);if(G){G.set("checked",true);}},destroy:function(){var I=this._buttons.length,H=this.get("element"),F=H.parentNode,G;if(I>0){G=this._buttons.length-1;do{this._buttons[G].destroy();}while(G--);}B.purgeElement(H);F.removeChild(H);},toString:function(){return("ButtonGroup "+this.get("id"));}});})();YAHOO.register("button",YAHOO.widget.Button,{version:"2.7.0",build:"1799"});
340   -(function(){var M;YAHOO.widget.Carousel=function(n,m){YAHOO.widget.Carousel.superclass.constructor.call(this,n,m)};var Q=YAHOO.widget.Carousel,a=YAHOO.util.Dom,Y=YAHOO.util.Event,k=YAHOO.lang;M="Carousel";var P={},F="afterScroll",b="allItemsRemoved",X="beforeHide",I="beforePageChange",e="beforeScroll",U="beforeShow",B="blur",T="focus",W="hide",O="itemAdded",j="itemRemoved",C="itemSelected",K="loadItems",H="navigationStateChange",c="pageChange",G="render",R="show",V="startAutoPlay",l="stopAutoPlay",J="uiUpdate";function S(n,m){var o=document.createElement(n);m=m||{};if(m.className){a.addClass(o,m.className)}if(m.parent){m.parent.appendChild(o)}if(m.id){o.setAttribute("id",m.id)}if(m.content){if(m.content.nodeName){o.appendChild(m.content)}else{o.innerHTML=m.content}}return o}function Z(o,n,m){var q;if(!o){return 0}function p(t,s){var u;if(s=="marginRight"&&YAHOO.env.ua.webkit){u=parseInt(a.getStyle(t,"marginLeft"),10)}else{u=parseInt(a.getStyle(t,s),10)}return k.isNumber(u)?u:0}function r(t,s){var u;if(s=="marginRight"&&YAHOO.env.ua.webkit){u=parseFloat(a.getStyle(t,"marginLeft"))}else{u=parseFloat(a.getStyle(t,s))}return k.isNumber(u)?u:0}if(typeof m=="undefined"){m="int"}switch(n){case"height":q=o.offsetHeight;if(q>0){q+=p(o,"marginTop")+p(o,"marginBottom")}else{q=r(o,"height")+p(o,"marginTop")+p(o,"marginBottom")+p(o,"borderTopWidth")+p(o,"borderBottomWidth")+p(o,"paddingTop")+p(o,"paddingBottom")}break;case"width":q=o.offsetWidth;if(q>0){q+=p(o,"marginLeft")+p(o,"marginRight")}else{q=r(o,"width")+p(o,"marginLeft")+p(o,"marginRight")+p(o,"borderLeftWidth")+p(o,"borderRightWidth")+p(o,"paddingLeft")+p(o,"paddingRight")}break;default:if(m=="int"){q=p(o,n)}else{if(m=="float"){q=r(o,n)}else{q=a.getStyle(o,n)}}break}return q}function L(p){var o=this,q,n=0,m=false;if(o._itemsTable.numItems===0){return 0}if(typeof p=="undefined"){if(o._itemsTable.size>0){return o._itemsTable.size}}if(k.isUndefined(o._itemsTable.items[0])){return 0}q=a.get(o._itemsTable.items[0].id);if(typeof p=="undefined"){m=o.get("isVertical")}else{m=p=="height"}if(m){n=Z(q,"height")}else{n=Z(q,"width")}if(typeof p=="undefined"){o._itemsTable.size=n}return n}function D(n){var m=this.get("numVisible");return Math.floor(n/m)*m}function f(o){var n=0,m=0;n=L.call(this);m=n*o;if(this.get("isVertical")){m-=o}return m}function d(m,n){n.scrollPageBackward();Y.preventDefault(m)}function g(m,n){n.scrollPageForward();Y.preventDefault(m)}function i(r,n){var v=this,w=v.CLASSES,m,t=v._firstItem,o=v.get("isCircular"),s=v.get("numItems"),u=v.get("numVisible"),q=n,p=t+u-1;if(q>=0&&q<s){if(!k.isUndefined(v._itemsTable.items[q])){m=a.get(v._itemsTable.items[q].id);if(m){a.removeClass(m,w.SELECTED_ITEM)}}}if(k.isNumber(r)){r=parseInt(r,10);r=k.isNumber(r)?r:0}else{r=t}if(k.isUndefined(v._itemsTable.items[r])){r=D.call(v,r);v.scrollTo(r)}if(!k.isUndefined(v._itemsTable.items[r])){m=a.get(v._itemsTable.items[r].id);if(m){a.addClass(m,w.SELECTED_ITEM)}}if(r<t||r>p){r=D.call(v,r);v.scrollTo(r)}}function h(){var o=false,r=this,n=r.CLASSES,q,m,p;if(!r._hasRendered){return}m=r.get("navigation");p=r._firstItem+r.get("numVisible");if(m.prev){if(r.get("numItems")===0||r._firstItem===0){if(r.get("numItems")===0||!r.get("isCircular")){Y.removeListener(m.prev,"click",d);a.addClass(m.prev,n.FIRST_NAV_DISABLED);for(q=0;q<r._navBtns.prev.length;q++){r._navBtns.prev[q].setAttribute("disabled","true")}r._prevEnabled=false}else{o=!r._prevEnabled}}else{o=!r._prevEnabled}if(o){Y.on(m.prev,"click",d,r);a.removeClass(m.prev,n.FIRST_NAV_DISABLED);for(q=0;q<r._navBtns.prev.length;q++){r._navBtns.prev[q].removeAttribute("disabled")}r._prevEnabled=true}}o=false;if(m.next){if(p>=r.get("numItems")){if(!r.get("isCircular")){Y.removeListener(m.next,"click",g);a.addClass(m.next,n.DISABLED);for(q=0;q<r._navBtns.next.length;q++){r._navBtns.next[q].setAttribute("disabled","true")}r._nextEnabled=false}else{o=!r._nextEnabled}}else{o=!r._nextEnabled}if(o){Y.on(m.next,"click",g,r);a.removeClass(m.next,n.DISABLED);for(q=0;q<r._navBtns.next.length;q++){r._navBtns.next[q].removeAttribute("disabled")}r._nextEnabled=true}}r.fireEvent(H,{next:r._nextEnabled,prev:r._prevEnabled})}function N(o){var p=this,m,n;if(!p._hasRendered){return}n=p.get("numVisible");if(!k.isNumber(o)){o=Math.ceil(p.get("selectedItem")/n)}m=Math.ceil(p.get("numItems")/n);p._pages.num=m;p._pages.cur=o;if(m>p.CONFIG.MAX_PAGER_BUTTONS){p._updatePagerMenu()}else{p._updatePagerButtons()}}function A(n){var m=this;if(!k.isObject(n)){return}switch(n.ev){case O:m._syncUiForItemAdd(n);break;case j:m._syncUiForItemRemove(n);break;case K:m._syncUiForLazyLoading(n);break}m.fireEvent(J)}function E(p,n){var r=this,q=r.get("currentPage"),o,m=r.get("numVisible");o=parseInt(r._firstItem/m,10);if(o!=q){r.setAttributeConfig("currentPage",{value:o});r.fireEvent(c,o)}if(r.get("selectOnScroll")){if(r.get("selectedItem")!=r._selectedItem){r.set("selectedItem",r._selectedItem)}}clearTimeout(r._autoPlayTimer);delete r._autoPlayTimer;if(r.isAutoPlayOn()){r.startAutoPlay()}r.fireEvent(F,{first:r._firstItem,last:n},r)}Q.getById=function(m){return P[m]?P[m].object:false};YAHOO.extend(Q,YAHOO.util.Element,{_animObj:null,_carouselEl:null,_clipEl:null,_firstItem:0,_hasFocus:false,_hasRendered:false,_isAnimationInProgress:false,_isAutoPlayInProgress:false,_itemsTable:null,_navBtns:null,_navEl:null,_nextEnabled:true,_pages:null,_prevEnabled:true,_recomputeSize:true,CLASSES:{BUTTON:"yui-carousel-button",CAROUSEL:"yui-carousel",CAROUSEL_EL:"yui-carousel-element",CONTAINER:"yui-carousel-container",CONTENT:"yui-carousel-content",DISABLED:"yui-carousel-button-disabled",FIRST_NAV:" yui-carousel-first-button",FIRST_NAV_DISABLED:"yui-carousel-first-button-disabled",FIRST_PAGE:"yui-carousel-nav-first-page",FOCUSSED_BUTTON:"yui-carousel-button-focus",HORIZONTAL:"yui-carousel-horizontal",ITEM_LOADING:"yui-carousel-item-loading",MIN_WIDTH:"yui-carousel-min-width",NAVIGATION:"yui-carousel-nav",NEXT_NAV:" yui-carousel-next-button",NEXT_PAGE:"yui-carousel-next",NAV_CONTAINER:"yui-carousel-buttons",PAGE_FOCUS:"yui-carousel-nav-page-focus",PREV_PAGE:"yui-carousel-prev",SELECTED_ITEM:"yui-carousel-item-selected",SELECTED_NAV:"yui-carousel-nav-page-selected",VERTICAL:"yui-carousel-vertical",VERTICAL_CONTAINER:"yui-carousel-vertical-container",VISIBLE:"yui-carousel-visible"},CONFIG:{FIRST_VISIBLE:0,HORZ_MIN_WIDTH:180,MAX_PAGER_BUTTONS:5,VERT_MIN_WIDTH:99,NUM_VISIBLE:3},STRINGS:{ITEM_LOADING_CONTENT:"Loading",NEXT_BUTTON_TEXT:"Next Page",PAGER_PREFIX_TEXT:"Go to page ",PREVIOUS_BUTTON_TEXT:"Previous Page"},addItem:function(r,n){var s=this,p,q,m,o=s.get("numItems");if(!r){return false}if(k.isString(r)||r.nodeName){q=r.nodeName?r.innerHTML:r}else{if(k.isObject(r)){q=r.content}else{return false}}p=r.className||"";m=r.id?r.id:a.generateId();if(k.isUndefined(n)){s._itemsTable.items.push({item:q,className:p,id:m})}else{if(n<0||n>=o){return false}s._itemsTable.items.splice(n,0,{item:q,className:p,id:m})}s._itemsTable.numItems++;if(o<s._itemsTable.items.length){s.set("numItems",s._itemsTable.items.length)}s.fireEvent(O,{pos:n,ev:O});return true},addItems:function(m){var o,q,p=true;if(!k.isArray(m)){return false}for(o=0,q=m.length;o<q;o++){if(this.addItem(m[o][0],m[o][1])===false){p=false}}return p},blur:function(){this._carouselEl.blur();this.fireEvent(B)},clearItems:function(){var m=this,o=m.get("numItems");while(o>0){if(!m.removeItem(0)){}if(m._itemsTable.numItems===0){m.set("numItems",0);break}o--}m.fireEvent(b)},focus:function(){var v=this,q,r,s,p,u,w,n,o,m;if(!v._hasRendered){return}if(v.isAnimating()){return}m=v.get("selectedItem");w=v.get("numVisible");n=v.get("selectOnScroll");o=(m>=0)?v.getItem(m):null;q=v.get("firstVisible");u=q+w-1;s=(m<q||m>u);r=(o&&o.id)?a.get(o.id):null;p=v._itemsTable;if(!n&&s){r=(p&&p.items&&p.items[q])?a.get(p.items[q].id):null}if(r){try{r.focus()}catch(t){}}v.fireEvent(T)},hide:function(){var m=this;if(m.fireEvent(X)!==false){m.removeClass(m.CLASSES.VISIBLE);m.fireEvent(W)}},init:function(o,n){var p=this,m=o,q=false;if(!o){return}p._hasRendered=false;p._navBtns={prev:[],next:[]};p._pages={el:null,num:0,cur:0};p._itemsTable={loading:{},numItems:0,items:[],size:0};if(k.isString(o)){o=a.get(o)}else{if(!o.nodeName){return}}Q.superclass.init.call(p,o,n);if(o){if(!o.id){o.setAttribute("id",a.generateId())}q=p._parseCarousel(o);if(!q){p._createCarousel(m)}}else{o=p._createCarousel(m)}m=o.id;p.initEvents();if(q){p._parseCarouselItems()}if(!n||typeof n.isVertical=="undefined"){p.set("isVertical",false)}p._parseCarouselNavigation(o);p._navEl=p._setupCarouselNavigation();P[m]={object:p};p._loadItems()},initAttributes:function(m){var n=this;m=m||{};Q.superclass.initAttributes.call(n,m);n.setAttributeConfig("carouselEl",{validator:k.isString,value:m.carouselEl||"OL"});n.setAttributeConfig("carouselItemEl",{validator:k.isString,value:m.carouselItemEl||"LI"});n.setAttributeConfig("currentPage",{readOnly:true,value:0});n.setAttributeConfig("firstVisible",{method:n._setFirstVisible,validator:n._validateFirstVisible,value:m.firstVisible||n.CONFIG.FIRST_VISIBLE});n.setAttributeConfig("selectOnScroll",{validator:k.isBoolean,value:m.selectOnScroll||true});n.setAttributeConfig("numVisible",{method:n._setNumVisible,validator:n._validateNumVisible,value:m.numVisible||n.CONFIG.NUM_VISIBLE});n.setAttributeConfig("numItems",{method:n._setNumItems,validator:n._validateNumItems,value:n._itemsTable.numItems});n.setAttributeConfig("scrollIncrement",{validator:n._validateScrollIncrement,value:m.scrollIncrement||1});n.setAttributeConfig("selectedItem",{method:n._setSelectedItem,validator:k.isNumber,value:-1});n.setAttributeConfig("revealAmount",{method:n._setRevealAmount,validator:n._validateRevealAmount,value:m.revealAmount||0});n.setAttributeConfig("isCircular",{validator:k.isBoolean,value:m.isCircular||false});n.setAttributeConfig("isVertical",{method:n._setOrientation,validator:k.isBoolean,value:m.isVertical||false});n.setAttributeConfig("navigation",{method:n._setNavigation,validator:n._validateNavigation,value:m.navigation||{prev:null,next:null,page:null}});n.setAttributeConfig("animation",{validator:n._validateAnimation,value:m.animation||{speed:0,effect:null}});n.setAttributeConfig("autoPlay",{validator:k.isNumber,value:m.autoPlay||0});n.setAttributeConfig("autoPlayInterval",{validator:k.isNumber,value:m.autoPlayInterval||0})},initEvents:function(){var o=this,n=o.CLASSES,m;o.on("keydown",o._keyboardEventHandler);o.on(F,h);o.on(O,A);o.on(j,A);o.on(C,function(){if(o._hasFocus){o.focus()}});o.on(K,A);o.on(b,function(p){o.scrollTo(0);h.call(o);N.call(o)});o.on(c,N,o);o.on(G,function(p){o.set("selectedItem",o.get("firstVisible"));h.call(o,p);N.call(o,p);o._setClipContainerSize()});o.on("selectedItemChange",function(p){i.call(o,p.newValue,p.prevValue);if(p.newValue>=0){o._updateTabIndex(o.getElementForItem(p.newValue))}o.fireEvent(C,p.newValue)});o.on(J,function(p){h.call(o,p);N.call(o,p)});o.on("firstVisibleChange",function(p){if(!o.get("selectOnScroll")){if(p.newValue>=0){o._updateTabIndex(o.getElementForItem(p.newValue))}}});o.on("click",function(p){if(o.isAutoPlayOn()){o.stopAutoPlay()}o._itemClickHandler(p);o._pagerClickHandler(p)});Y.onFocus(o.get("element"),function(p,r){var q=Y.getTarget(p);if(q&&q.nodeName.toUpperCase()=="A"&&a.getAncestorByClassName(q,n.NAVIGATION)){if(m){a.removeClass(m,n.PAGE_FOCUS)}m=q.parentNode;a.addClass(m,n.PAGE_FOCUS)}else{if(m){a.removeClass(m,n.PAGE_FOCUS)}}r._hasFocus=true;r._updateNavButtons(Y.getTarget(p),true)},o);Y.onBlur(o.get("element"),function(p,q){q._hasFocus=false;q._updateNavButtons(Y.getTarget(p),false)},o)},isAnimating:function(){return this._isAnimationInProgress},isAutoPlayOn:function(){return this._isAutoPlayInProgress},getElementForItem:function(m){var n=this;if(m<0||m>=n.get("numItems")){return null}if(n._itemsTable.numItems>m){if(!k.isUndefined(n._itemsTable.items[m])){return a.get(n._itemsTable.items[m].id)}}return null},getElementForItems:function(){var o=this,n=[],m;for(m=0;m<o._itemsTable.numItems;m++){n.push(o.getElementForItem(m))}return n},getItem:function(m){var n=this;if(m<0||m>=n.get("numItems")){return null}if(n._itemsTable.numItems>m){if(!k.isUndefined(n._itemsTable.items[m])){return n._itemsTable.items[m]}}return null},getItems:function(m){return this._itemsTable.items},getItemPositionById:function(q){var o=this,m=0,p=o._itemsTable.numItems;while(m<p){if(!k.isUndefined(o._itemsTable.items[m])){if(o._itemsTable.items[m].id==q){return m}}m++}return-1},getVisibleItems:function(){var p=this,m=p.get("firstVisible"),q=m+p.get("numVisible"),o=[];while(m<q){o.push(p.getElementForItem(m));m++}return o},removeItem:function(n){var p=this,o,m=p.get("numItems");if(n<0||n>=m){return false}o=p._itemsTable.items.splice(n,1);if(o&&o.length==1){p._itemsTable.numItems--;p.set("numItems",m-1);p.fireEvent(j,{item:o[0],pos:n,ev:j});return true}return false},render:function(n){var o=this,m=o.CLASSES;o.addClass(m.CAROUSEL);if(!o._clipEl){o._clipEl=o._createCarouselClip();o._clipEl.appendChild(o._carouselEl)}if(n){o.appendChild(o._clipEl);o.appendTo(n)}else{if(!a.inDocument(o.get("element"))){return false}o.appendChild(o._clipEl)}if(o.get("isVertical")){o.addClass(m.VERTICAL)}else{o.addClass(m.HORIZONTAL)}if(o.get("numItems")<1){return false}o._refreshUi();return true},scrollBackward:function(){var m=this;m.scrollTo(m._firstItem-m.get("scrollIncrement"))},scrollForward:function(){var m=this;m.scrollTo(m._firstItem+m.get("scrollIncrement"))},scrollPageBackward:function(){var n=this,m=n._firstItem-n.get("numVisible");if(n.get("selectOnScroll")){n._selectedItem=n._getSelectedItem(m)}else{m=n._getValidIndex(m)}n.scrollTo(m)},scrollPageForward:function(){var n=this,m=n._firstItem+n.get("numVisible");if(n.get("selectOnScroll")){n._selectedItem=n._getSelectedItem(m)}else{m=n._getValidIndex(m)}n.scrollTo(m)},scrollTo:function(AB,n){var AA=this,m,r,p,z,x,w,u,v,q,t,o,s,y;if(k.isUndefined(AB)||AB==AA._firstItem||AA.isAnimating()){return}r=AA.get("animation");p=AA.get("isCircular");w=AA._firstItem;u=AA.get("numItems");v=AA.get("numVisible");t=AA.get("currentPage");y=function(){if(AA.isAutoPlayOn()){AA.stopAutoPlay()}};if(AB<0){if(p){AB=u+AB}else{y.call(AA);return}}else{if(u>0&&AB>u-1){if(AA.get("isCircular")){AB=u-AB}else{y.call(AA);return}}}x=(AA._firstItem>AB)?"backward":"forward";s=w+v;s=(s>u-1)?u-1:s;o=AA.fireEvent(e,{dir:x,first:w,last:s});if(o===false){return}AA.fireEvent(I,{page:t});z=w-AB;AA._firstItem=AB;AA.set("firstVisible",AB);AA._loadItems();s=AB+v;s=(s>u-1)?u-1:s;q=f.call(AA,z);m=r.speed>0;if(m){AA._animateAndSetCarouselOffset(q,AB,s,n)}else{AA._setCarouselOffset(q);E.call(AA,AB,s)}},selectPreviousItem:function(){var o=this,n=0,m=o.get("selectedItem");if(m==this._firstItem){n=m-o.get("numVisible");o._selectedItem=o._getSelectedItem(m-1);o.scrollTo(n)}else{n=o.get("selectedItem")-o.get("scrollIncrement");o.set("selectedItem",o._getSelectedItem(n))}},selectNextItem:function(){var n=this,m=0;m=n.get("selectedItem")+n.get("scrollIncrement");n.set("selectedItem",n._getSelectedItem(m))},show:function(){var n=this,m=n.CLASSES;if(n.fireEvent(U)!==false){n.addClass(m.VISIBLE);n.fireEvent(R)}},startAutoPlay:function(){var m=this,n;if(k.isUndefined(m._autoPlayTimer)){n=m.get("autoPlayInterval");if(n<=0){return}m._isAutoPlayInProgress=true;m.fireEvent(V);m._autoPlayTimer=setTimeout(function(){m._autoScroll()},n)}},stopAutoPlay:function(){var m=this;if(!k.isUndefined(m._autoPlayTimer)){clearTimeout(m._autoPlayTimer);delete m._autoPlayTimer;m._isAutoPlayInProgress=false;m.fireEvent(l)}},toString:function(){return M+(this.get?" (#"+this.get("id")+")":"")},_animateAndSetCarouselOffset:function(r,p,n){var q=this,o=q.get("animation"),m=null;if(q.get("isVertical")){m=new YAHOO.util.Motion(q._carouselEl,{points:{by:[0,r]}},o.speed,o.effect)}else{m=new YAHOO.util.Motion(q._carouselEl,{points:{by:[r,0]}},o.speed,o.effect)}q._isAnimationInProgress=true;m.onComplete.subscribe(q._animationCompleteHandler,{scope:q,item:p,last:n});m.animate()},_animationCompleteHandler:function(m,n,q){q.scope._isAnimationInProgress=false;E.call(q.scope,q.item,q.last)},_autoScroll:function(){var n=this,o=n._firstItem,m;if(o>=n.get("numItems")-1){if(n.get("isCircular")){m=0}else{n.stopAutoPlay()}}else{m=o+n.get("numVisible")}n._selectedItem=n._getSelectedItem(m);n.scrollTo.call(n,m)},_createCarousel:function(n){var p=this,m=p.CLASSES,o=a.get(n);if(!o){o=S("DIV",{className:m.CAROUSEL,id:n})}if(!p._carouselEl){p._carouselEl=S(p.get("carouselEl"),{className:m.CAROUSEL_EL})}return o},_createCarouselClip:function(){return S("DIV",{className:this.CLASSES.CONTENT})},_createCarouselItem:function(m){return S(this.get("carouselItemEl"),{className:m.className,content:m.content,id:m.id})},_getValidIndex:function(o){var q=this,m=q.get("isCircular"),p=q.get("numItems"),n=p-1;if(o<0){o=m?p+o:0}else{if(o>n){o=m?o-p:n}}return o},_getSelectedItem:function(q){var p=this,m=p.get("isCircular"),o=p.get("numItems"),n=o-1;if(q<0){if(m){q=o+q}else{q=p.get("selectedItem")}}else{if(q>n){if(m){q=q-o}else{q=p.get("selectedItem")}}}return q},_itemClickHandler:function(p){var r=this,m=r.get("element"),n,o,q=YAHOO.util.Event.getTarget(p);while(q&&q!=m&&q.id!=r._carouselEl){n=q.nodeName;if(n.toUpperCase()==r.get("carouselItemEl")){break}q=q.parentNode}if((o=r.getItemPositionById(q.id))>=0){r.set("selectedItem",r._getSelectedItem(o));r.focus()}},_keyboardEventHandler:function(o){var p=this,n=Y.getCharCode(o),m=false;if(p.isAnimating()){return}switch(n){case 37:case 38:p.selectPreviousItem();m=true;break;case 39:case 40:p.selectNextItem();m=true;break;case 33:p.scrollPageBackward();m=true;break;case 34:p.scrollPageForward();m=true;break}if(m){if(p.isAutoPlayOn()){p.stopAutoPlay()}Y.preventDefault(o)}},_loadItems:function(){var q=this,r=q.get("firstVisible"),n=0,m=q.get("numItems"),o=q.get("numVisible"),p=q.get("revealAmount");n=r+o-1+(p?1:0);n=n>m-1?m-1:n;if(!q.getItem(r)||!q.getItem(n)){q.fireEvent(K,{ev:K,first:r,last:n,num:n-r})}},_pagerClickHandler:function(n){var p=this,r,o=Y.getTarget(n),q;function m(t){var s=p.get("carouselItemEl");if(t.nodeName.toUpperCase()==s.toUpperCase()){t=a.getChildrenBy(t,function(u){return u.href||u.value});if(t&&t[0]){return t[0]}}else{if(t.href||t.value){return t}}return null}if(o){o=m(o);if(!o){return}q=o.href||o.value;if(k.isString(q)&&q){r=q.lastIndexOf("#");if(r!=-1){q=p.getItemPositionById(q.substring(r+1));p._selectedItem=q;p.scrollTo(q);if(!o.value){p.focus()}Y.preventDefault(n)}}}},_parseCarousel:function(o){var r=this,s,m,n,q,p;m=r.CLASSES;n=r.get("carouselEl");q=false;for(s=o.firstChild;s;s=s.nextSibling){if(s.nodeType==1){p=s.nodeName;if(p.toUpperCase()==n){r._carouselEl=s;a.addClass(r._carouselEl,r.CLASSES.CAROUSEL_EL);q=true}}}return q},_parseCarouselItems:function(){var q=this,r,m,n,p,o=q._carouselEl;m=q.get("carouselItemEl");for(r=o.firstChild;r;r=r.nextSibling){if(r.nodeType==1){p=r.nodeName;if(p.toUpperCase()==m){if(r.id){n=r.id}else{n=a.generateId();r.setAttribute("id",n)}q.addItem(r)}}}},_parseCarouselNavigation:function(s){var t=this,r,u=t.CLASSES,n,q,p,m,o=false;m=a.getElementsByClassName(u.PREV_PAGE,"*",s);if(m.length>0){for(q in m){if(m.hasOwnProperty(q)){n=m[q];if(n.nodeName=="INPUT"||n.nodeName=="BUTTON"){t._navBtns.prev.push(n)}else{p=n.getElementsByTagName("INPUT");if(k.isArray(p)&&p.length>0){t._navBtns.prev.push(p[0])}else{p=n.getElementsByTagName("BUTTON");if(k.isArray(p)&&p.length>0){t._navBtns.prev.push(p[0])}}}}}r={prev:m}}m=a.getElementsByClassName(u.NEXT_PAGE,"*",s);if(m.length>0){for(q in m){if(m.hasOwnProperty(q)){n=m[q];if(n.nodeName=="INPUT"||n.nodeName=="BUTTON"){t._navBtns.next.push(n)}else{p=n.getElementsByTagName("INPUT");if(k.isArray(p)&&p.length>0){t._navBtns.next.push(p[0])}else{p=n.getElementsByTagName("BUTTON");if(k.isArray(p)&&p.length>0){t._navBtns.next.push(p[0])}}}}}if(r){r.next=m}else{r={next:m}}}if(r){t.set("navigation",r);o=true}return o},_refreshUi:function(){var m=this;m._hasRendered=true;m.fireEvent(G)},_setCarouselOffset:function(o){var m=this,n;n=m.get("isVertical")?"top":"left";o+=o!==0?Z(m._carouselEl,n):0;a.setStyle(m._carouselEl,n,o+"px")},_setupCarouselNavigation:function(){var r=this,p,n,m,t,q,s,o;m=r.CLASSES;q=a.getElementsByClassName(m.NAVIGATION,"DIV",r.get("element"));if(q.length===0){q=S("DIV",{className:m.NAVIGATION});r.insertBefore(q,a.getFirstChild(r.get("element")))}else{q=q[0]}r._pages.el=S("UL");q.appendChild(r._pages.el);t=r.get("navigation");if(k.isString(t.prev)||k.isArray(t.prev)){if(k.isString(t.prev)){t.prev=[t.prev]}for(p in t.prev){if(t.prev.hasOwnProperty(p)){r._navBtns.prev.push(a.get(t.prev[p]))}}}else{o=S("SPAN",{className:m.BUTTON+m.FIRST_NAV});a.setStyle(o,"visibility","visible");p=a.generateId();o.innerHTML='<button type="button" '+'id="'+p+'" name="'+r.STRINGS.PREVIOUS_BUTTON_TEXT+'">'+r.STRINGS.PREVIOUS_BUTTON_TEXT+"</button>";q.appendChild(o);p=a.get(p);r._navBtns.prev=[p];n={prev:[o]}}if(k.isString(t.next)||k.isArray(t.next)){if(k.isString(t.next)){t.next=[t.next]}for(p in t.next){if(t.next.hasOwnProperty(p)){r._navBtns.next.push(a.get(t.next[p]))}}}else{s=S("SPAN",{className:m.BUTTON+m.NEXT_NAV});a.setStyle(s,"visibility","visible");p=a.generateId();s.innerHTML='<button type="button" '+'id="'+p+'" name="'+r.STRINGS.NEXT_BUTTON_TEXT+'">'+r.STRINGS.NEXT_BUTTON_TEXT+"</button>";q.appendChild(s);p=a.get(p);r._navBtns.next=[p];if(n){n.next=[s]}else{n={next:[s]}}}if(n){r.set("navigation",n)}return q},_setClipContainerSize:function(n,p){var u=this,q,m,r,s,t,v,o;r=u.get("isVertical");t=u.get("revealAmount");o=r?"height":"width";q=r?"top":"left";n=n||u._clipEl;if(!n){return}p=p||u.get("numVisible");s=L.call(u,o);v=s*p;u._recomputeSize=(v===0);if(u._recomputeSize){u._hasRendered=false;return}if(t>0){t=s*(t/100)*2;v+=t;m=parseFloat(a.getStyle(u._carouselEl,q));m=k.isNumber(m)?m:0;a.setStyle(u._carouselEl,q,m+(t/2)+"px")}if(r){v+=Z(u._carouselEl,"marginTop")+Z(u._carouselEl,"marginBottom")+Z(u._carouselEl,"paddingTop")+Z(u._carouselEl,"paddingBottom")+Z(u._carouselEl,"borderTopWidth")+Z(u._carouselEl,"borderBottomWidth");a.setStyle(n,o,(v-(p-1))+"px")}else{v+=Z(u._carouselEl,"marginLeft")+Z(u._carouselEl,"marginRight")+Z(u._carouselEl,"paddingLeft")+Z(u._carouselEl,"paddingRight")+Z(u._carouselEl,"borderLeftWidth")+Z(u._carouselEl,"borderRightWidth");a.setStyle(n,o,v+"px")}u._setContainerSize(n)},_setContainerSize:function(q,m){var r=this,o=r.CONFIG,n=r.CLASSES,s,p;s=r.get("isVertical");q=q||r._clipEl;m=m||(s?"height":"width");p=parseFloat(a.getStyle(q,m),10);p=k.isNumber(p)?p:0;if(s){p+=Z(r._carouselEl,"marginTop")+Z(r._carouselEl,"marginBottom")+Z(r._carouselEl,"paddingTop")+Z(r._carouselEl,"paddingBottom")+Z(r._carouselEl,"borderTopWidth")+Z(r._carouselEl,"borderBottomWidth")+Z(r._navEl,"height")}else{p+=Z(q,"marginLeft")+Z(q,"marginRight")+Z(q,"paddingLeft")+Z(q,"paddingRight")+Z(q,"borderLeftWidth")+Z(q,"borderRightWidth")}if(!s){if(p<o.HORZ_MIN_WIDTH){p=o.HORZ_MIN_WIDTH;r.addClass(n.MIN_WIDTH)}}r.setStyle(m,p+"px");if(s){p=L.call(r,"width");if(p<o.VERT_MIN_WIDTH){p=o.VERT_MIN_WIDTH;r.addClass(n.MIN_WIDTH)}r.setStyle("width",p+"px")}},_setFirstVisible:function(n){var m=this;if(n>=0&&n<m.get("numItems")){m.scrollTo(n)}else{n=m.get("firstVisible")}return n},_setNavigation:function(m){var n=this;if(m.prev){Y.on(m.prev,"click",d,n)}if(m.next){Y.on(m.next,"click",g,n)}},_setNumVisible:function(n){var m=this;m._setClipContainerSize(m._clipEl,n)},_setNumItems:function(o){var n=this,m=n._itemsTable.numItems;if(k.isArray(n._itemsTable.items)){if(n._itemsTable.items.length!=m){m=n._itemsTable.items.length;n._itemsTable.numItems=m}}if(o<m){while(m>o){n.removeItem(m-1);m--}}return o},_setOrientation:function(o){var n=this,m=n.CLASSES;if(o){n.replaceClass(m.HORIZONTAL,m.VERTICAL)}else{n.replaceClass(m.VERTICAL,m.HORIZONTAL)}n._itemsTable.size=0;return o},_setRevealAmount:function(n){var m=this;if(n>=0&&n<=100){n=parseInt(n,10);n=k.isNumber(n)?n:0;m._setClipContainerSize()}else{n=m.get("revealAmount")}return n},_setSelectedItem:function(m){this._selectedItem=m},_syncUiForItemAdd:function(p){var t=this,r=t._carouselEl,m,u,o=t._itemsTable,n,q,s;q=k.isUndefined(p.pos)?o.numItems-1:p.pos;if(!k.isUndefined(o.items[q])){u=o.items[q];if(u&&!k.isUndefined(u.id)){n=a.get(u.id)}}if(!n){m=t._createCarouselItem({className:u.className,content:u.item,id:u.id});if(k.isUndefined(p.pos)){if(!k.isUndefined(o.loading[q])){n=o.loading[q]}if(n){r.replaceChild(m,n);delete o.loading[q]}else{r.appendChild(m)}}else{if(!k.isUndefined(o.items[p.pos+1])){s=a.get(o.items[p.pos+1].id)}if(s){r.insertBefore(m,s)}else{}}}else{if(k.isUndefined(p.pos)){if(!a.isAncestor(t._carouselEl,n)){r.appendChild(n)}}else{if(!a.isAncestor(r,n)){if(!k.isUndefined(o.items[p.pos+1])){r.insertBefore(n,a.get(o.items[p.pos+1].id))}}}}if(!t._hasRendered){t._refreshUi()}if(t.get("selectedItem")<0){t.set("selectedItem",t.get("firstVisible"))}},_syncUiForItemRemove:function(r){var q=this,m=q._carouselEl,o,p,n,s;n=q.get("numItems");p=r.item;s=r.pos;if(p&&(o=a.get(p.id))){if(o&&a.isAncestor(m,o)){Y.purgeElement(o,true);m.removeChild(o)}if(q.get("selectedItem")==s){s=s>=n?n-1:s;q.set("selectedItem",s)}}else{}},_syncUiForLazyLoading:function(s){var r=this,n=r._carouselEl,q,o,m=r._itemsTable,p;for(o=s.first;o<=s.last;o++){q=r._createCarouselItem({className:r.CLASSES.ITEM_LOADING,content:r.STRINGS.ITEM_LOADING_CONTENT,id:a.generateId()});if(q){if(!k.isUndefined(m.items[s.last+1])){p=a.get(m.items[s.last+1].id);if(p){n.insertBefore(q,p)}else{}}else{n.appendChild(q)}}m.loading[o]=q}},_updateNavButtons:function(q,n){var o,m=this.CLASSES,r,p=q.parentNode;if(!p){return}r=p.parentNode;if(q.nodeName.toUpperCase()=="BUTTON"&&a.hasClass(p,m.BUTTON)){if(n){if(r){o=a.getChildren(r);if(o){a.removeClass(o,m.FOCUSSED_BUTTON)}}a.addClass(p,m.FOCUSSED_BUTTON)}else{a.removeClass(p,m.FOCUSSED_BUTTON)}}},_updatePagerButtons:function(){var v=this,t=v.CLASSES,u=v._pages.cur,m,s,q,w,o=v.get("numVisible"),r=v._pages.num,p=v._pages.el;if(r===0||!p){return}a.setStyle(p,"visibility","hidden");while(p.firstChild){p.removeChild(p.firstChild)}for(q=0;q<r;q++){if(k.isUndefined(v._itemsTable.items[q*o])){a.setStyle(p,"visibility","visible");break}w=v._itemsTable.items[q*o].id;m=document.createElement("LI");if(!m){a.setStyle(p,"visibility","visible");break}if(q===0){a.addClass(m,t.FIRST_PAGE)}if(q==u){a.addClass(m,t.SELECTED_NAV)}s='<a href="#'+w+'" tabindex="0"><em>'+v.STRINGS.PAGER_PREFIX_TEXT+" "+(q+1)+"</em></a>";m.innerHTML=s;p.appendChild(m)}a.setStyle(p,"visibility","visible")},_updatePagerMenu:function(){var u=this,t=u._pages.cur,o,r,v,p=u.get("numVisible"),s=u._pages.num,q=u._pages.el,m;if(s===0){return}m=document.createElement("SELECT");if(!m){return}a.setStyle(q,"visibility","hidden");while(q.firstChild){q.removeChild(q.firstChild)}for(r=0;r<s;r++){if(k.isUndefined(u._itemsTable.items[r*p])){a.setStyle(q,"visibility","visible");break}v=u._itemsTable.items[r*p].id;o=document.createElement("OPTION");if(!o){a.setStyle(q,"visibility","visible");break}o.value="#"+v;o.innerHTML=u.STRINGS.PAGER_PREFIX_TEXT+" "+(r+1);if(r==t){o.setAttribute("selected","selected")}m.appendChild(o)}o=document.createElement("FORM");if(!o){}else{o.appendChild(m);q.appendChild(o)}a.setStyle(q,"visibility","visible")},_updateTabIndex:function(m){var n=this;if(m){if(n._focusableItemEl){n._focusableItemEl.tabIndex=-1}n._focusableItemEl=m;m.tabIndex=0}},_validateAnimation:function(m){var n=true;if(k.isObject(m)){if(m.speed){n=n&&k.isNumber(m.speed)}if(m.effect){n=n&&k.isFunction(m.effect)}else{if(!k.isUndefined(YAHOO.util.Easing)){m.effect=YAHOO.util.Easing.easeOut}}}else{n=false}return n},_validateFirstVisible:function(o){var n=this,m=n.get("numItems");if(k.isNumber(o)){if(m===0&&o==m){return true}else{return(o>=0&&o<m)}}return false},_validateNavigation:function(m){var n;if(!k.isObject(m)){return false}if(m.prev){if(!k.isArray(m.prev)){return false}for(n in m.prev){if(m.prev.hasOwnProperty(n)){if(!k.isString(m.prev[n].nodeName)){return false}}}}if(m.next){if(!k.isArray(m.next)){return false}for(n in m.next){if(m.next.hasOwnProperty(n)){if(!k.isString(m.next[n].nodeName)){return false}}}}return true},_validateNumItems:function(m){return k.isNumber(m)&&(m>=0)},_validateNumVisible:function(m){var n=false;if(k.isNumber(m)){n=m>0&&m<=this.get("numItems")}return n},_validateRevealAmount:function(m){var n=false;if(k.isNumber(m)){n=m>=0&&m<100}return n},_validateScrollIncrement:function(m){var n=false;if(k.isNumber(m)){n=(m>0&&m<this.get("numItems"))}return n}})})();YAHOO.register("carousel",YAHOO.widget.Carousel,{version:"2.7.0",build:"1799"});
341   -/*
  322 +}else{X.get("element").dispatchEvent(W);}}}}}};YAHOO.widget.Button.addHiddenFieldsToForm=function(N){var S=G.getElementsByClassName(YAHOO.widget.Button.prototype.CSS_CLASS_NAME,"*",N),Q=S.length,R,O,P;if(Q>0){for(P=0;P<Q;P++){O=S[P].id;if(O){R=D[O];if(R){R.createHiddenFields();}}}}};YAHOO.widget.Button.getButton=function(N){return D[N];};})();(function(){var C=YAHOO.util.Dom,B=YAHOO.util.Event,D=YAHOO.lang,A=YAHOO.widget.Button,E={};YAHOO.widget.ButtonGroup=function(J,H){var I=YAHOO.widget.ButtonGroup.superclass.constructor,K,G,F;if(arguments.length==1&&!D.isString(J)&&!J.nodeName){if(!J.id){F=C.generateId();J.id=F;}I.call(this,(this._createGroupElement()),J);}else{if(D.isString(J)){G=C.get(J);if(G){if(G.nodeName.toUpperCase()==this.NODE_NAME){I.call(this,G,H);}}}else{K=J.nodeName.toUpperCase();if(K&&K==this.NODE_NAME){if(!J.id){J.id=C.generateId();}I.call(this,J,H);}}}};YAHOO.extend(YAHOO.widget.ButtonGroup,YAHOO.util.Element,{_buttons:null,NODE_NAME:"DIV",CSS_CLASS_NAME:"yui-buttongroup",_createGroupElement:function(){var F=document.createElement(this.NODE_NAME);return F;},_setDisabled:function(G){var H=this.getCount(),F;if(H>0){F=H-1;do{this._buttons[F].set("disabled",G);}while(F--);}},_onKeyDown:function(K){var G=B.getTarget(K),I=B.getCharCode(K),H=G.parentNode.parentNode.id,J=E[H],F=-1;if(I==37||I==38){F=(J.index===0)?(this._buttons.length-1):(J.index-1);}else{if(I==39||I==40){F=(J.index===(this._buttons.length-1))?0:(J.index+1);}}if(F>-1){this.check(F);this.getButton(F).focus();}},_onAppendTo:function(H){var I=this._buttons,G=I.length,F;for(F=0;F<G;F++){I[F].appendTo(this.get("element"));}},_onButtonCheckedChange:function(G,F){var I=G.newValue,H=this.get("checkedButton");if(I&&H!=F){if(H){H.set("checked",false,true);}this.set("checkedButton",F);this.set("value",F.get("value"));}else{if(H&&!H.set("checked")){H.set("checked",true,true);}}},init:function(I,H){this._buttons=[];YAHOO.widget.ButtonGroup.superclass.init.call(this,I,H);this.addClass(this.CSS_CLASS_NAME);var J=this.getElementsByClassName("yui-radio-button");if(J.length>0){this.addButtons(J);}function F(K){return(K.type=="radio");}J=C.getElementsBy(F,"input",this.get("element"));if(J.length>0){this.addButtons(J);}this.on("keydown",this._onKeyDown);this.on("appendTo",this._onAppendTo);var G=this.get("container");if(G){if(D.isString(G)){B.onContentReady(G,function(){this.appendTo(G);},null,this);}else{this.appendTo(G);}}},initAttributes:function(G){var F=G||{};YAHOO.widget.ButtonGroup.superclass.initAttributes.call(this,F);this.setAttributeConfig("name",{value:F.name,validator:D.isString});this.setAttributeConfig("disabled",{value:(F.disabled||false),validator:D.isBoolean,method:this._setDisabled});this.setAttributeConfig("value",{value:F.value});this.setAttributeConfig("container",{value:F.container,writeOnce:true});this.setAttributeConfig("checkedButton",{value:null});},addButton:function(J){var L,K,G,F,H,I;if(J instanceof A&&J.get("type")=="radio"){L=J;}else{if(!D.isString(J)&&!J.nodeName){J.type="radio";L=new A(J);}else{L=new A(J,{type:"radio"});}}if(L){F=this._buttons.length;H=L.get("name");I=this.get("name");L.index=F;this._buttons[F]=L;E[L.get("id")]=L;if(H!=I){L.set("name",I);}if(this.get("disabled")){L.set("disabled",true);}if(L.get("checked")){this.set("checkedButton",L);}K=L.get("element");G=this.get("element");if(K.parentNode!=G){G.appendChild(K);}L.on("checkedChange",this._onButtonCheckedChange,L,this);}return L;},addButtons:function(G){var H,I,J,F;if(D.isArray(G)){H=G.length;J=[];if(H>0){for(F=0;F<H;F++){I=this.addButton(G[F]);if(I){J[J.length]=I;}}}}return J;},removeButton:function(H){var I=this.getButton(H),G,F;if(I){this._buttons.splice(H,1);delete E[I.get("id")];I.removeListener("checkedChange",this._onButtonCheckedChange);I.destroy();G=this._buttons.length;if(G>0){F=this._buttons.length-1;do{this._buttons[F].index=F;}while(F--);}}},getButton:function(F){return this._buttons[F];},getButtons:function(){return this._buttons;},getCount:function(){return this._buttons.length;},focus:function(H){var I,G,F;if(D.isNumber(H)){I=this._buttons[H];if(I){I.focus();}}else{G=this.getCount();for(F=0;F<G;F++){I=this._buttons[F];if(!I.get("disabled")){I.focus();break;}}}},check:function(F){var G=this.getButton(F);if(G){G.set("checked",true);}},destroy:function(){var I=this._buttons.length,H=this.get("element"),F=H.parentNode,G;if(I>0){G=this._buttons.length-1;do{this._buttons[G].destroy();}while(G--);}B.purgeElement(H);F.removeChild(H);},toString:function(){return("ButtonGroup "+this.get("id"));}});})();YAHOO.register("button",YAHOO.widget.Button,{version:"2.7.0",build:"1799"});(function(){var M;YAHOO.widget.Carousel=function(n,m){YAHOO.widget.Carousel.superclass.constructor.call(this,n,m)};var Q=YAHOO.widget.Carousel,a=YAHOO.util.Dom,Y=YAHOO.util.Event,k=YAHOO.lang;M="Carousel";var P={},F="afterScroll",b="allItemsRemoved",X="beforeHide",I="beforePageChange",e="beforeScroll",U="beforeShow",B="blur",T="focus",W="hide",O="itemAdded",j="itemRemoved",C="itemSelected",K="loadItems",H="navigationStateChange",c="pageChange",G="render",R="show",V="startAutoPlay",l="stopAutoPlay",J="uiUpdate";function S(n,m){var o=document.createElement(n);m=m||{};if(m.className){a.addClass(o,m.className)}if(m.parent){m.parent.appendChild(o)}if(m.id){o.setAttribute("id",m.id)}if(m.content){if(m.content.nodeName){o.appendChild(m.content)}else{o.innerHTML=m.content}}return o}function Z(o,n,m){var q;if(!o){return 0}function p(t,s){var u;if(s=="marginRight"&&YAHOO.env.ua.webkit){u=parseInt(a.getStyle(t,"marginLeft"),10)}else{u=parseInt(a.getStyle(t,s),10)}return k.isNumber(u)?u:0}function r(t,s){var u;if(s=="marginRight"&&YAHOO.env.ua.webkit){u=parseFloat(a.getStyle(t,"marginLeft"))}else{u=parseFloat(a.getStyle(t,s))}return k.isNumber(u)?u:0}if(typeof m=="undefined"){m="int"}switch(n){case"height":q=o.offsetHeight;if(q>0){q+=p(o,"marginTop")+p(o,"marginBottom")}else{q=r(o,"height")+p(o,"marginTop")+p(o,"marginBottom")+p(o,"borderTopWidth")+p(o,"borderBottomWidth")+p(o,"paddingTop")+p(o,"paddingBottom")}break;case"width":q=o.offsetWidth;if(q>0){q+=p(o,"marginLeft")+p(o,"marginRight")}else{q=r(o,"width")+p(o,"marginLeft")+p(o,"marginRight")+p(o,"borderLeftWidth")+p(o,"borderRightWidth")+p(o,"paddingLeft")+p(o,"paddingRight")}break;default:if(m=="int"){q=p(o,n)}else{if(m=="float"){q=r(o,n)}else{q=a.getStyle(o,n)}}break}return q}function L(p){var o=this,q,n=0,m=false;if(o._itemsTable.numItems===0){return 0}if(typeof p=="undefined"){if(o._itemsTable.size>0){return o._itemsTable.size}}if(k.isUndefined(o._itemsTable.items[0])){return 0}q=a.get(o._itemsTable.items[0].id);if(typeof p=="undefined"){m=o.get("isVertical")}else{m=p=="height"}if(m){n=Z(q,"height")}else{n=Z(q,"width")}if(typeof p=="undefined"){o._itemsTable.size=n}return n}function D(n){var m=this.get("numVisible");return Math.floor(n/m)*m}function f(o){var n=0,m=0;n=L.call(this);m=n*o;if(this.get("isVertical")){m-=o}return m}function d(m,n){n.scrollPageBackward();Y.preventDefault(m)}function g(m,n){n.scrollPageForward();Y.preventDefault(m)}function i(r,n){var v=this,w=v.CLASSES,m,t=v._firstItem,o=v.get("isCircular"),s=v.get("numItems"),u=v.get("numVisible"),q=n,p=t+u-1;if(q>=0&&q<s){if(!k.isUndefined(v._itemsTable.items[q])){m=a.get(v._itemsTable.items[q].id);if(m){a.removeClass(m,w.SELECTED_ITEM)}}}if(k.isNumber(r)){r=parseInt(r,10);r=k.isNumber(r)?r:0}else{r=t}if(k.isUndefined(v._itemsTable.items[r])){r=D.call(v,r);v.scrollTo(r)}if(!k.isUndefined(v._itemsTable.items[r])){m=a.get(v._itemsTable.items[r].id);if(m){a.addClass(m,w.SELECTED_ITEM)}}if(r<t||r>p){r=D.call(v,r);v.scrollTo(r)}}function h(){var o=false,r=this,n=r.CLASSES,q,m,p;if(!r._hasRendered){return}m=r.get("navigation");p=r._firstItem+r.get("numVisible");if(m.prev){if(r.get("numItems")===0||r._firstItem===0){if(r.get("numItems")===0||!r.get("isCircular")){Y.removeListener(m.prev,"click",d);a.addClass(m.prev,n.FIRST_NAV_DISABLED);for(q=0;q<r._navBtns.prev.length;q++){r._navBtns.prev[q].setAttribute("disabled","true")}r._prevEnabled=false}else{o=!r._prevEnabled}}else{o=!r._prevEnabled}if(o){Y.on(m.prev,"click",d,r);a.removeClass(m.prev,n.FIRST_NAV_DISABLED);for(q=0;q<r._navBtns.prev.length;q++){r._navBtns.prev[q].removeAttribute("disabled")}r._prevEnabled=true}}o=false;if(m.next){if(p>=r.get("numItems")){if(!r.get("isCircular")){Y.removeListener(m.next,"click",g);a.addClass(m.next,n.DISABLED);for(q=0;q<r._navBtns.next.length;q++){r._navBtns.next[q].setAttribute("disabled","true")}r._nextEnabled=false}else{o=!r._nextEnabled}}else{o=!r._nextEnabled}if(o){Y.on(m.next,"click",g,r);a.removeClass(m.next,n.DISABLED);for(q=0;q<r._navBtns.next.length;q++){r._navBtns.next[q].removeAttribute("disabled")}r._nextEnabled=true}}r.fireEvent(H,{next:r._nextEnabled,prev:r._prevEnabled})}function N(o){var p=this,m,n;if(!p._hasRendered){return}n=p.get("numVisible");if(!k.isNumber(o)){o=Math.ceil(p.get("selectedItem")/n)}m=Math.ceil(p.get("numItems")/n);p._pages.num=m;p._pages.cur=o;if(m>p.CONFIG.MAX_PAGER_BUTTONS){p._updatePagerMenu()}else{p._updatePagerButtons()}}function A(n){var m=this;if(!k.isObject(n)){return}switch(n.ev){case O:m._syncUiForItemAdd(n);break;case j:m._syncUiForItemRemove(n);break;case K:m._syncUiForLazyLoading(n);break}m.fireEvent(J)}function E(p,n){var r=this,q=r.get("currentPage"),o,m=r.get("numVisible");o=parseInt(r._firstItem/m,10);if(o!=q){r.setAttributeConfig("currentPage",{value:o});r.fireEvent(c,o)}if(r.get("selectOnScroll")){if(r.get("selectedItem")!=r._selectedItem){r.set("selectedItem",r._selectedItem)}}clearTimeout(r._autoPlayTimer);delete r._autoPlayTimer;if(r.isAutoPlayOn()){r.startAutoPlay()}r.fireEvent(F,{first:r._firstItem,last:n},r)}Q.getById=function(m){return P[m]?P[m].object:false};YAHOO.extend(Q,YAHOO.util.Element,{_animObj:null,_carouselEl:null,_clipEl:null,_firstItem:0,_hasFocus:false,_hasRendered:false,_isAnimationInProgress:false,_isAutoPlayInProgress:false,_itemsTable:null,_navBtns:null,_navEl:null,_nextEnabled:true,_pages:null,_prevEnabled:true,_recomputeSize:true,CLASSES:{BUTTON:"yui-carousel-button",CAROUSEL:"yui-carousel",CAROUSEL_EL:"yui-carousel-element",CONTAINER:"yui-carousel-container",CONTENT:"yui-carousel-content",DISABLED:"yui-carousel-button-disabled",FIRST_NAV:" yui-carousel-first-button",FIRST_NAV_DISABLED:"yui-carousel-first-button-disabled",FIRST_PAGE:"yui-carousel-nav-first-page",FOCUSSED_BUTTON:"yui-carousel-button-focus",HORIZONTAL:"yui-carousel-horizontal",ITEM_LOADING:"yui-carousel-item-loading",MIN_WIDTH:"yui-carousel-min-width",NAVIGATION:"yui-carousel-nav",NEXT_NAV:" yui-carousel-next-button",NEXT_PAGE:"yui-carousel-next",NAV_CONTAINER:"yui-carousel-buttons",PAGE_FOCUS:"yui-carousel-nav-page-focus",PREV_PAGE:"yui-carousel-prev",SELECTED_ITEM:"yui-carousel-item-selected",SELECTED_NAV:"yui-carousel-nav-page-selected",VERTICAL:"yui-carousel-vertical",VERTICAL_CONTAINER:"yui-carousel-vertical-container",VISIBLE:"yui-carousel-visible"},CONFIG:{FIRST_VISIBLE:0,HORZ_MIN_WIDTH:180,MAX_PAGER_BUTTONS:5,VERT_MIN_WIDTH:99,NUM_VISIBLE:3},STRINGS:{ITEM_LOADING_CONTENT:"Loading",NEXT_BUTTON_TEXT:"Next Page",PAGER_PREFIX_TEXT:"Go to page ",PREVIOUS_BUTTON_TEXT:"Previous Page"},addItem:function(r,n){var s=this,p,q,m,o=s.get("numItems");if(!r){return false}if(k.isString(r)||r.nodeName){q=r.nodeName?r.innerHTML:r}else{if(k.isObject(r)){q=r.content}else{return false}}p=r.className||"";m=r.id?r.id:a.generateId();if(k.isUndefined(n)){s._itemsTable.items.push({item:q,className:p,id:m})}else{if(n<0||n>=o){return false}s._itemsTable.items.splice(n,0,{item:q,className:p,id:m})}s._itemsTable.numItems++;if(o<s._itemsTable.items.length){s.set("numItems",s._itemsTable.items.length)}s.fireEvent(O,{pos:n,ev:O});return true},addItems:function(m){var o,q,p=true;if(!k.isArray(m)){return false}for(o=0,q=m.length;o<q;o++){if(this.addItem(m[o][0],m[o][1])===false){p=false}}return p},blur:function(){this._carouselEl.blur();this.fireEvent(B)},clearItems:function(){var m=this,o=m.get("numItems");while(o>0){if(!m.removeItem(0)){}if(m._itemsTable.numItems===0){m.set("numItems",0);break}o--}m.fireEvent(b)},focus:function(){var v=this,q,r,s,p,u,w,n,o,m;if(!v._hasRendered){return}if(v.isAnimating()){return}m=v.get("selectedItem");w=v.get("numVisible");n=v.get("selectOnScroll");o=(m>=0)?v.getItem(m):null;q=v.get("firstVisible");u=q+w-1;s=(m<q||m>u);r=(o&&o.id)?a.get(o.id):null;p=v._itemsTable;if(!n&&s){r=(p&&p.items&&p.items[q])?a.get(p.items[q].id):null}if(r){try{r.focus()}catch(t){}}v.fireEvent(T)},hide:function(){var m=this;if(m.fireEvent(X)!==false){m.removeClass(m.CLASSES.VISIBLE);m.fireEvent(W)}},init:function(o,n){var p=this,m=o,q=false;if(!o){return}p._hasRendered=false;p._navBtns={prev:[],next:[]};p._pages={el:null,num:0,cur:0};p._itemsTable={loading:{},numItems:0,items:[],size:0};if(k.isString(o)){o=a.get(o)}else{if(!o.nodeName){return}}Q.superclass.init.call(p,o,n);if(o){if(!o.id){o.setAttribute("id",a.generateId())}q=p._parseCarousel(o);if(!q){p._createCarousel(m)}}else{o=p._createCarousel(m)}m=o.id;p.initEvents();if(q){p._parseCarouselItems()}if(!n||typeof n.isVertical=="undefined"){p.set("isVertical",false)}p._parseCarouselNavigation(o);p._navEl=p._setupCarouselNavigation();P[m]={object:p};p._loadItems()},initAttributes:function(m){var n=this;m=m||{};Q.superclass.initAttributes.call(n,m);n.setAttributeConfig("carouselEl",{validator:k.isString,value:m.carouselEl||"OL"});n.setAttributeConfig("carouselItemEl",{validator:k.isString,value:m.carouselItemEl||"LI"});n.setAttributeConfig("currentPage",{readOnly:true,value:0});n.setAttributeConfig("firstVisible",{method:n._setFirstVisible,validator:n._validateFirstVisible,value:m.firstVisible||n.CONFIG.FIRST_VISIBLE});n.setAttributeConfig("selectOnScroll",{validator:k.isBoolean,value:m.selectOnScroll||true});n.setAttributeConfig("numVisible",{method:n._setNumVisible,validator:n._validateNumVisible,value:m.numVisible||n.CONFIG.NUM_VISIBLE});n.setAttributeConfig("numItems",{method:n._setNumItems,validator:n._validateNumItems,value:n._itemsTable.numItems});n.setAttributeConfig("scrollIncrement",{validator:n._validateScrollIncrement,value:m.scrollIncrement||1});n.setAttributeConfig("selectedItem",{method:n._setSelectedItem,validator:k.isNumber,value:-1});n.setAttributeConfig("revealAmount",{method:n._setRevealAmount,validator:n._validateRevealAmount,value:m.revealAmount||0});n.setAttributeConfig("isCircular",{validator:k.isBoolean,value:m.isCircular||false});n.setAttributeConfig("isVertical",{method:n._setOrientation,validator:k.isBoolean,value:m.isVertical||false});n.setAttributeConfig("navigation",{method:n._setNavigation,validator:n._validateNavigation,value:m.navigation||{prev:null,next:null,page:null}});n.setAttributeConfig("animation",{validator:n._validateAnimation,value:m.animation||{speed:0,effect:null}});n.setAttributeConfig("autoPlay",{validator:k.isNumber,value:m.autoPlay||0});n.setAttributeConfig("autoPlayInterval",{validator:k.isNumber,value:m.autoPlayInterval||0})},initEvents:function(){var o=this,n=o.CLASSES,m;o.on("keydown",o._keyboardEventHandler);o.on(F,h);o.on(O,A);o.on(j,A);o.on(C,function(){if(o._hasFocus){o.focus()}});o.on(K,A);o.on(b,function(p){o.scrollTo(0);h.call(o);N.call(o)});o.on(c,N,o);o.on(G,function(p){o.set("selectedItem",o.get("firstVisible"));h.call(o,p);N.call(o,p);o._setClipContainerSize()});o.on("selectedItemChange",function(p){i.call(o,p.newValue,p.prevValue);if(p.newValue>=0){o._updateTabIndex(o.getElementForItem(p.newValue))}o.fireEvent(C,p.newValue)});o.on(J,function(p){h.call(o,p);N.call(o,p)});o.on("firstVisibleChange",function(p){if(!o.get("selectOnScroll")){if(p.newValue>=0){o._updateTabIndex(o.getElementForItem(p.newValue))}}});o.on("click",function(p){if(o.isAutoPlayOn()){o.stopAutoPlay()}o._itemClickHandler(p);o._pagerClickHandler(p)});Y.onFocus(o.get("element"),function(p,r){var q=Y.getTarget(p);if(q&&q.nodeName.toUpperCase()=="A"&&a.getAncestorByClassName(q,n.NAVIGATION)){if(m){a.removeClass(m,n.PAGE_FOCUS)}m=q.parentNode;a.addClass(m,n.PAGE_FOCUS)}else{if(m){a.removeClass(m,n.PAGE_FOCUS)}}r._hasFocus=true;r._updateNavButtons(Y.getTarget(p),true)},o);Y.onBlur(o.get("element"),function(p,q){q._hasFocus=false;q._updateNavButtons(Y.getTarget(p),false)},o)},isAnimating:function(){return this._isAnimationInProgress},isAutoPlayOn:function(){return this._isAutoPlayInProgress},getElementForItem:function(m){var n=this;if(m<0||m>=n.get("numItems")){return null}if(n._itemsTable.numItems>m){if(!k.isUndefined(n._itemsTable.items[m])){return a.get(n._itemsTable.items[m].id)}}return null},getElementForItems:function(){var o=this,n=[],m;for(m=0;m<o._itemsTable.numItems;m++){n.push(o.getElementForItem(m))}return n},getItem:function(m){var n=this;if(m<0||m>=n.get("numItems")){return null}if(n._itemsTable.numItems>m){if(!k.isUndefined(n._itemsTable.items[m])){return n._itemsTable.items[m]}}return null},getItems:function(m){return this._itemsTable.items},getItemPositionById:function(q){var o=this,m=0,p=o._itemsTable.numItems;while(m<p){if(!k.isUndefined(o._itemsTable.items[m])){if(o._itemsTable.items[m].id==q){return m}}m++}return-1},getVisibleItems:function(){var p=this,m=p.get("firstVisible"),q=m+p.get("numVisible"),o=[];while(m<q){o.push(p.getElementForItem(m));m++}return o},removeItem:function(n){var p=this,o,m=p.get("numItems");if(n<0||n>=m){return false}o=p._itemsTable.items.splice(n,1);if(o&&o.length==1){p._itemsTable.numItems--;p.set("numItems",m-1);p.fireEvent(j,{item:o[0],pos:n,ev:j});return true}return false},render:function(n){var o=this,m=o.CLASSES;o.addClass(m.CAROUSEL);if(!o._clipEl){o._clipEl=o._createCarouselClip();o._clipEl.appendChild(o._carouselEl)}if(n){o.appendChild(o._clipEl);o.appendTo(n)}else{if(!a.inDocument(o.get("element"))){return false}o.appendChild(o._clipEl)}if(o.get("isVertical")){o.addClass(m.VERTICAL)}else{o.addClass(m.HORIZONTAL)}if(o.get("numItems")<1){return false}o._refreshUi();return true},scrollBackward:function(){var m=this;m.scrollTo(m._firstItem-m.get("scrollIncrement"))},scrollForward:function(){var m=this;m.scrollTo(m._firstItem+m.get("scrollIncrement"))},scrollPageBackward:function(){var n=this,m=n._firstItem-n.get("numVisible");if(n.get("selectOnScroll")){n._selectedItem=n._getSelectedItem(m)}else{m=n._getValidIndex(m)}n.scrollTo(m)},scrollPageForward:function(){var n=this,m=n._firstItem+n.get("numVisible");if(n.get("selectOnScroll")){n._selectedItem=n._getSelectedItem(m)}else{m=n._getValidIndex(m)}n.scrollTo(m)},scrollTo:function(AB,n){var AA=this,m,r,p,z,x,w,u,v,q,t,o,s,y;if(k.isUndefined(AB)||AB==AA._firstItem||AA.isAnimating()){return}r=AA.get("animation");p=AA.get("isCircular");w=AA._firstItem;u=AA.get("numItems");v=AA.get("numVisible");t=AA.get("currentPage");y=function(){if(AA.isAutoPlayOn()){AA.stopAutoPlay()}};if(AB<0){if(p){AB=u+AB}else{y.call(AA);return}}else{if(u>0&&AB>u-1){if(AA.get("isCircular")){AB=u-AB}else{y.call(AA);return}}}x=(AA._firstItem>AB)?"backward":"forward";s=w+v;s=(s>u-1)?u-1:s;o=AA.fireEvent(e,{dir:x,first:w,last:s});if(o===false){return}AA.fireEvent(I,{page:t});z=w-AB;AA._firstItem=AB;AA.set("firstVisible",AB);AA._loadItems();s=AB+v;s=(s>u-1)?u-1:s;q=f.call(AA,z);m=r.speed>0;if(m){AA._animateAndSetCarouselOffset(q,AB,s,n)}else{AA._setCarouselOffset(q);E.call(AA,AB,s)}},selectPreviousItem:function(){var o=this,n=0,m=o.get("selectedItem");if(m==this._firstItem){n=m-o.get("numVisible");o._selectedItem=o._getSelectedItem(m-1);o.scrollTo(n)}else{n=o.get("selectedItem")-o.get("scrollIncrement");o.set("selectedItem",o._getSelectedItem(n))}},selectNextItem:function(){var n=this,m=0;m=n.get("selectedItem")+n.get("scrollIncrement");n.set("selectedItem",n._getSelectedItem(m))},show:function(){var n=this,m=n.CLASSES;if(n.fireEvent(U)!==false){n.addClass(m.VISIBLE);n.fireEvent(R)}},startAutoPlay:function(){var m=this,n;if(k.isUndefined(m._autoPlayTimer)){n=m.get("autoPlayInterval");if(n<=0){return}m._isAutoPlayInProgress=true;m.fireEvent(V);m._autoPlayTimer=setTimeout(function(){m._autoScroll()},n)}},stopAutoPlay:function(){var m=this;if(!k.isUndefined(m._autoPlayTimer)){clearTimeout(m._autoPlayTimer);delete m._autoPlayTimer;m._isAutoPlayInProgress=false;m.fireEvent(l)}},toString:function(){return M+(this.get?" (#"+this.get("id")+")":"")},_animateAndSetCarouselOffset:function(r,p,n){var q=this,o=q.get("animation"),m=null;if(q.get("isVertical")){m=new YAHOO.util.Motion(q._carouselEl,{points:{by:[0,r]}},o.speed,o.effect)}else{m=new YAHOO.util.Motion(q._carouselEl,{points:{by:[r,0]}},o.speed,o.effect)}q._isAnimationInProgress=true;m.onComplete.subscribe(q._animationCompleteHandler,{scope:q,item:p,last:n});m.animate()},_animationCompleteHandler:function(m,n,q){q.scope._isAnimationInProgress=false;E.call(q.scope,q.item,q.last)},_autoScroll:function(){var n=this,o=n._firstItem,m;if(o>=n.get("numItems")-1){if(n.get("isCircular")){m=0}else{n.stopAutoPlay()}}else{m=o+n.get("numVisible")}n._selectedItem=n._getSelectedItem(m);n.scrollTo.call(n,m)},_createCarousel:function(n){var p=this,m=p.CLASSES,o=a.get(n);if(!o){o=S("DIV",{className:m.CAROUSEL,id:n})}if(!p._carouselEl){p._carouselEl=S(p.get("carouselEl"),{className:m.CAROUSEL_EL})}return o},_createCarouselClip:function(){return S("DIV",{className:this.CLASSES.CONTENT})},_createCarouselItem:function(m){return S(this.get("carouselItemEl"),{className:m.className,content:m.content,id:m.id})},_getValidIndex:function(o){var q=this,m=q.get("isCircular"),p=q.get("numItems"),n=p-1;if(o<0){o=m?p+o:0}else{if(o>n){o=m?o-p:n}}return o},_getSelectedItem:function(q){var p=this,m=p.get("isCircular"),o=p.get("numItems"),n=o-1;if(q<0){if(m){q=o+q}else{q=p.get("selectedItem")}}else{if(q>n){if(m){q=q-o}else{q=p.get("selectedItem")}}}return q},_itemClickHandler:function(p){var r=this,m=r.get("element"),n,o,q=YAHOO.util.Event.getTarget(p);while(q&&q!=m&&q.id!=r._carouselEl){n=q.nodeName;if(n.toUpperCase()==r.get("carouselItemEl")){break}q=q.parentNode}if((o=r.getItemPositionById(q.id))>=0){r.set("selectedItem",r._getSelectedItem(o));r.focus()}},_keyboardEventHandler:function(o){var p=this,n=Y.getCharCode(o),m=false;if(p.isAnimating()){return}switch(n){case 37:case 38:p.selectPreviousItem();m=true;break;case 39:case 40:p.selectNextItem();m=true;break;case 33:p.scrollPageBackward();m=true;break;case 34:p.scrollPageForward();m=true;break}if(m){if(p.isAutoPlayOn()){p.stopAutoPlay()}Y.preventDefault(o)}},_loadItems:function(){var q=this,r=q.get("firstVisible"),n=0,m=q.get("numItems"),o=q.get("numVisible"),p=q.get("revealAmount");n=r+o-1+(p?1:0);n=n>m-1?m-1:n;if(!q.getItem(r)||!q.getItem(n)){q.fireEvent(K,{ev:K,first:r,last:n,num:n-r})}},_pagerClickHandler:function(n){var p=this,r,o=Y.getTarget(n),q;function m(t){var s=p.get("carouselItemEl");if(t.nodeName.toUpperCase()==s.toUpperCase()){t=a.getChildrenBy(t,function(u){return u.href||u.value});if(t&&t[0]){return t[0]}}else{if(t.href||t.value){return t}}return null}if(o){o=m(o);if(!o){return}q=o.href||o.value;if(k.isString(q)&&q){r=q.lastIndexOf("#");if(r!=-1){q=p.getItemPositionById(q.substring(r+1));p._selectedItem=q;p.scrollTo(q);if(!o.value){p.focus()}Y.preventDefault(n)}}}},_parseCarousel:function(o){var r=this,s,m,n,q,p;m=r.CLASSES;n=r.get("carouselEl");q=false;for(s=o.firstChild;s;s=s.nextSibling){if(s.nodeType==1){p=s.nodeName;if(p.toUpperCase()==n){r._carouselEl=s;a.addClass(r._carouselEl,r.CLASSES.CAROUSEL_EL);q=true}}}return q},_parseCarouselItems:function(){var q=this,r,m,n,p,o=q._carouselEl;m=q.get("carouselItemEl");for(r=o.firstChild;r;r=r.nextSibling){if(r.nodeType==1){p=r.nodeName;if(p.toUpperCase()==m){if(r.id){n=r.id}else{n=a.generateId();r.setAttribute("id",n)}q.addItem(r)}}}},_parseCarouselNavigation:function(s){var t=this,r,u=t.CLASSES,n,q,p,m,o=false;m=a.getElementsByClassName(u.PREV_PAGE,"*",s);if(m.length>0){for(q in m){if(m.hasOwnProperty(q)){n=m[q];if(n.nodeName=="INPUT"||n.nodeName=="BUTTON"){t._navBtns.prev.push(n)}else{p=n.getElementsByTagName("INPUT");if(k.isArray(p)&&p.length>0){t._navBtns.prev.push(p[0])}else{p=n.getElementsByTagName("BUTTON");if(k.isArray(p)&&p.length>0){t._navBtns.prev.push(p[0])}}}}}r={prev:m}}m=a.getElementsByClassName(u.NEXT_PAGE,"*",s);if(m.length>0){for(q in m){if(m.hasOwnProperty(q)){n=m[q];if(n.nodeName=="INPUT"||n.nodeName=="BUTTON"){t._navBtns.next.push(n)}else{p=n.getElementsByTagName("INPUT");if(k.isArray(p)&&p.length>0){t._navBtns.next.push(p[0])}else{p=n.getElementsByTagName("BUTTON");if(k.isArray(p)&&p.length>0){t._navBtns.next.push(p[0])}}}}}if(r){r.next=m}else{r={next:m}}}if(r){t.set("navigation",r);o=true}return o},_refreshUi:function(){var m=this;m._hasRendered=true;m.fireEvent(G)},_setCarouselOffset:function(o){var m=this,n;n=m.get("isVertical")?"top":"left";o+=o!==0?Z(m._carouselEl,n):0;a.setStyle(m._carouselEl,n,o+"px")},_setupCarouselNavigation:function(){var r=this,p,n,m,t,q,s,o;m=r.CLASSES;q=a.getElementsByClassName(m.NAVIGATION,"DIV",r.get("element"));if(q.length===0){q=S("DIV",{className:m.NAVIGATION});r.insertBefore(q,a.getFirstChild(r.get("element")))}else{q=q[0]}r._pages.el=S("UL");q.appendChild(r._pages.el);t=r.get("navigation");if(k.isString(t.prev)||k.isArray(t.prev)){if(k.isString(t.prev)){t.prev=[t.prev]}for(p in t.prev){if(t.prev.hasOwnProperty(p)){r._navBtns.prev.push(a.get(t.prev[p]))}}}else{o=S("SPAN",{className:m.BUTTON+m.FIRST_NAV});a.setStyle(o,"visibility","visible");p=a.generateId();o.innerHTML='<button type="button" '+'id="'+p+'" name="'+r.STRINGS.PREVIOUS_BUTTON_TEXT+'">'+r.STRINGS.PREVIOUS_BUTTON_TEXT+"</button>";q.appendChild(o);p=a.get(p);r._navBtns.prev=[p];n={prev:[o]}}if(k.isString(t.next)||k.isArray(t.next)){if(k.isString(t.next)){t.next=[t.next]}for(p in t.next){if(t.next.hasOwnProperty(p)){r._navBtns.next.push(a.get(t.next[p]))}}}else{s=S("SPAN",{className:m.BUTTON+m.NEXT_NAV});a.setStyle(s,"visibility","visible");p=a.generateId();s.innerHTML='<button type="button" '+'id="'+p+'" name="'+r.STRINGS.NEXT_BUTTON_TEXT+'">'+r.STRINGS.NEXT_BUTTON_TEXT+"</button>";q.appendChild(s);p=a.get(p);r._navBtns.next=[p];if(n){n.next=[s]}else{n={next:[s]}}}if(n){r.set("navigation",n)}return q},_setClipContainerSize:function(n,p){var u=this,q,m,r,s,t,v,o;r=u.get("isVertical");t=u.get("revealAmount");o=r?"height":"width";q=r?"top":"left";n=n||u._clipEl;if(!n){return}p=p||u.get("numVisible");s=L.call(u,o);v=s*p;u._recomputeSize=(v===0);if(u._recomputeSize){u._hasRendered=false;return}if(t>0){t=s*(t/100)*2;v+=t;m=parseFloat(a.getStyle(u._carouselEl,q));m=k.isNumber(m)?m:0;a.setStyle(u._carouselEl,q,m+(t/2)+"px")}if(r){v+=Z(u._carouselEl,"marginTop")+Z(u._carouselEl,"marginBottom")+Z(u._carouselEl,"paddingTop")+Z(u._carouselEl,"paddingBottom")+Z(u._carouselEl,"borderTopWidth")+Z(u._carouselEl,"borderBottomWidth");a.setStyle(n,o,(v-(p-1))+"px")}else{v+=Z(u._carouselEl,"marginLeft")+Z(u._carouselEl,"marginRight")+Z(u._carouselEl,"paddingLeft")+Z(u._carouselEl,"paddingRight")+Z(u._carouselEl,"borderLeftWidth")+Z(u._carouselEl,"borderRightWidth");a.setStyle(n,o,v+"px")}u._setContainerSize(n)},_setContainerSize:function(q,m){var r=this,o=r.CONFIG,n=r.CLASSES,s,p;s=r.get("isVertical");q=q||r._clipEl;m=m||(s?"height":"width");p=parseFloat(a.getStyle(q,m),10);p=k.isNumber(p)?p:0;if(s){p+=Z(r._carouselEl,"marginTop")+Z(r._carouselEl,"marginBottom")+Z(r._carouselEl,"paddingTop")+Z(r._carouselEl,"paddingBottom")+Z(r._carouselEl,"borderTopWidth")+Z(r._carouselEl,"borderBottomWidth")+Z(r._navEl,"height")}else{p+=Z(q,"marginLeft")+Z(q,"marginRight")+Z(q,"paddingLeft")+Z(q,"paddingRight")+Z(q,"borderLeftWidth")+Z(q,"borderRightWidth")}if(!s){if(p<o.HORZ_MIN_WIDTH){p=o.HORZ_MIN_WIDTH;r.addClass(n.MIN_WIDTH)}}r.setStyle(m,p+"px");if(s){p=L.call(r,"width");if(p<o.VERT_MIN_WIDTH){p=o.VERT_MIN_WIDTH;r.addClass(n.MIN_WIDTH)}r.setStyle("width",p+"px")}},_setFirstVisible:function(n){var m=this;if(n>=0&&n<m.get("numItems")){m.scrollTo(n)}else{n=m.get("firstVisible")}return n},_setNavigation:function(m){var n=this;if(m.prev){Y.on(m.prev,"click",d,n)}if(m.next){Y.on(m.next,"click",g,n)}},_setNumVisible:function(n){var m=this;m._setClipContainerSize(m._clipEl,n)},_setNumItems:function(o){var n=this,m=n._itemsTable.numItems;if(k.isArray(n._itemsTable.items)){if(n._itemsTable.items.length!=m){m=n._itemsTable.items.length;n._itemsTable.numItems=m}}if(o<m){while(m>o){n.removeItem(m-1);m--}}return o},_setOrientation:function(o){var n=this,m=n.CLASSES;if(o){n.replaceClass(m.HORIZONTAL,m.VERTICAL)}else{n.replaceClass(m.VERTICAL,m.HORIZONTAL)}n._itemsTable.size=0;return o},_setRevealAmount:function(n){var m=this;if(n>=0&&n<=100){n=parseInt(n,10);n=k.isNumber(n)?n:0;m._setClipContainerSize()}else{n=m.get("revealAmount")}return n},_setSelectedItem:function(m){this._selectedItem=m},_syncUiForItemAdd:function(p){var t=this,r=t._carouselEl,m,u,o=t._itemsTable,n,q,s;q=k.isUndefined(p.pos)?o.numItems-1:p.pos;if(!k.isUndefined(o.items[q])){u=o.items[q];if(u&&!k.isUndefined(u.id)){n=a.get(u.id)}}if(!n){m=t._createCarouselItem({className:u.className,content:u.item,id:u.id});if(k.isUndefined(p.pos)){if(!k.isUndefined(o.loading[q])){n=o.loading[q]}if(n){r.replaceChild(m,n);delete o.loading[q]}else{r.appendChild(m)}}else{if(!k.isUndefined(o.items[p.pos+1])){s=a.get(o.items[p.pos+1].id)}if(s){r.insertBefore(m,s)}else{}}}else{if(k.isUndefined(p.pos)){if(!a.isAncestor(t._carouselEl,n)){r.appendChild(n)}}else{if(!a.isAncestor(r,n)){if(!k.isUndefined(o.items[p.pos+1])){r.insertBefore(n,a.get(o.items[p.pos+1].id))}}}}if(!t._hasRendered){t._refreshUi()}if(t.get("selectedItem")<0){t.set("selectedItem",t.get("firstVisible"))}},_syncUiForItemRemove:function(r){var q=this,m=q._carouselEl,o,p,n,s;n=q.get("numItems");p=r.item;s=r.pos;if(p&&(o=a.get(p.id))){if(o&&a.isAncestor(m,o)){Y.purgeElement(o,true);m.removeChild(o)}if(q.get("selectedItem")==s){s=s>=n?n-1:s;q.set("selectedItem",s)}}else{}},_syncUiForLazyLoading:function(s){var r=this,n=r._carouselEl,q,o,m=r._itemsTable,p;for(o=s.first;o<=s.last;o++){q=r._createCarouselItem({className:r.CLASSES.ITEM_LOADING,content:r.STRINGS.ITEM_LOADING_CONTENT,id:a.generateId()});if(q){if(!k.isUndefined(m.items[s.last+1])){p=a.get(m.items[s.last+1].id);if(p){n.insertBefore(q,p)}else{}}else{n.appendChild(q)}}m.loading[o]=q}},_updateNavButtons:function(q,n){var o,m=this.CLASSES,r,p=q.parentNode;if(!p){return}r=p.parentNode;if(q.nodeName.toUpperCase()=="BUTTON"&&a.hasClass(p,m.BUTTON)){if(n){if(r){o=a.getChildren(r);if(o){a.removeClass(o,m.FOCUSSED_BUTTON)}}a.addClass(p,m.FOCUSSED_BUTTON)}else{a.removeClass(p,m.FOCUSSED_BUTTON)}}},_updatePagerButtons:function(){var v=this,t=v.CLASSES,u=v._pages.cur,m,s,q,w,o=v.get("numVisible"),r=v._pages.num,p=v._pages.el;if(r===0||!p){return}a.setStyle(p,"visibility","hidden");while(p.firstChild){p.removeChild(p.firstChild)}for(q=0;q<r;q++){if(k.isUndefined(v._itemsTable.items[q*o])){a.setStyle(p,"visibility","visible");break}w=v._itemsTable.items[q*o].id;m=document.createElement("LI");if(!m){a.setStyle(p,"visibility","visible");break}if(q===0){a.addClass(m,t.FIRST_PAGE)}if(q==u){a.addClass(m,t.SELECTED_NAV)}s='<a href="#'+w+'" tabindex="0"><em>'+v.STRINGS.PAGER_PREFIX_TEXT+" "+(q+1)+"</em></a>";m.innerHTML=s;p.appendChild(m)}a.setStyle(p,"visibility","visible")},_updatePagerMenu:function(){var u=this,t=u._pages.cur,o,r,v,p=u.get("numVisible"),s=u._pages.num,q=u._pages.el,m;if(s===0){return}m=document.createElement("SELECT");if(!m){return}a.setStyle(q,"visibility","hidden");while(q.firstChild){q.removeChild(q.firstChild)}for(r=0;r<s;r++){if(k.isUndefined(u._itemsTable.items[r*p])){a.setStyle(q,"visibility","visible");break}v=u._itemsTable.items[r*p].id;o=document.createElement("OPTION");if(!o){a.setStyle(q,"visibility","visible");break}o.value="#"+v;o.innerHTML=u.STRINGS.PAGER_PREFIX_TEXT+" "+(r+1);if(r==t){o.setAttribute("selected","selected")}m.appendChild(o)}o=document.createElement("FORM");if(!o){}else{o.appendChild(m);q.appendChild(o)}a.setStyle(q,"visibility","visible")},_updateTabIndex:function(m){var n=this;if(m){if(n._focusableItemEl){n._focusableItemEl.tabIndex=-1}n._focusableItemEl=m;m.tabIndex=0}},_validateAnimation:function(m){var n=true;if(k.isObject(m)){if(m.speed){n=n&&k.isNumber(m.speed)}if(m.effect){n=n&&k.isFunction(m.effect)}else{if(!k.isUndefined(YAHOO.util.Easing)){m.effect=YAHOO.util.Easing.easeOut}}}else{n=false}return n},_validateFirstVisible:function(o){var n=this,m=n.get("numItems");if(k.isNumber(o)){if(m===0&&o==m){return true}else{return(o>=0&&o<m)}}return false},_validateNavigation:function(m){var n;if(!k.isObject(m)){return false}if(m.prev){if(!k.isArray(m.prev)){return false}for(n in m.prev){if(m.prev.hasOwnProperty(n)){if(!k.isString(m.prev[n].nodeName)){return false}}}}if(m.next){if(!k.isArray(m.next)){return false}for(n in m.next){if(m.next.hasOwnProperty(n)){if(!k.isString(m.next[n].nodeName)){return false}}}}return true},_validateNumItems:function(m){return k.isNumber(m)&&(m>=0)},_validateNumVisible:function(m){var n=false;if(k.isNumber(m)){n=m>0&&m<=this.get("numItems")}return n},_validateRevealAmount:function(m){var n=false;if(k.isNumber(m)){n=m>=0&&m<100}return n},_validateScrollIncrement:function(m){var n=false;if(k.isNumber(m)){n=(m>0&&m<this.get("numItems"))}return n}})})();YAHOO.register("carousel",YAHOO.widget.Carousel,{version:"2.7.0",build:"1799"});/*
342 323 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
343 324 Code licensed under the BSD License:
344 325 http://developer.yahoo.net/yui/license.txt
345 326 version: 2.7.0
346 327 */
347   -YAHOO.lang.JSON=(function(){var l=YAHOO.lang,_UNICODE_EXCEPTIONS=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,_ESCAPES=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,_VALUES=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,_BRACKETS=/(?:^|:|,)(?:\s*\[)+/g,_INVALID=/^[\],:{}\s]*$/,_SPECIAL_CHARS=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,_CHARS={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function _revive(data,reviver){var walk=function(o,key){var k,v,value=o[key];if(value&&typeof value==="object"){for(k in value){if(l.hasOwnProperty(value,k)){v=walk(value,k);if(v===undefined){delete value[k];}else{value[k]=v;}}}}return reviver.call(o,key,value);};return typeof reviver==="function"?walk({"":data},""):data;}function _char(c){if(!_CHARS[c]){_CHARS[c]="\\u"+("0000"+(+(c.charCodeAt(0))).toString(16)).slice(-4);}return _CHARS[c];}function _prepare(s){return s.replace(_UNICODE_EXCEPTIONS,_char);}function _isValid(str){return l.isString(str)&&_INVALID.test(str.replace(_ESCAPES,"@").replace(_VALUES,"]").replace(_BRACKETS,""));}function _string(s){return'"'+s.replace(_SPECIAL_CHARS,_char)+'"';}function _stringify(h,key,d,w,pstack){var o=typeof w==="function"?w.call(h,key,h[key]):h[key],i,len,j,k,v,isArray,a;if(o instanceof Date){o=l.JSON.dateToString(o);}else{if(o instanceof String||o instanceof Boolean||o instanceof Number){o=o.valueOf();}}switch(typeof o){case"string":return _string(o);case"number":return isFinite(o)?String(o):"null";case"boolean":return String(o);case"object":if(o===null){return"null";}for(i=pstack.length-1;i>=0;--i){if(pstack[i]===o){return"null";}}pstack[pstack.length]=o;a=[];isArray=l.isArray(o);if(d>0){if(isArray){for(i=o.length-1;i>=0;--i){a[i]=_stringify(o,i,d-1,w,pstack)||"null";}}else{j=0;if(l.isArray(w)){for(i=0,len=w.length;i<len;++i){k=w[i];v=_stringify(o,k,d-1,w,pstack);if(v){a[j++]=_string(k)+":"+v;}}}else{for(k in o){if(typeof k==="string"&&l.hasOwnProperty(o,k)){v=_stringify(o,k,d-1,w,pstack);if(v){a[j++]=_string(k)+":"+v;}}}}a.sort();}}pstack.pop();return isArray?"["+a.join(",")+"]":"{"+a.join(",")+"}";}return undefined;}return{isValid:function(s){return _isValid(_prepare(s));},parse:function(s,reviver){s=_prepare(s);if(_isValid(s)){return _revive(eval("("+s+")"),reviver);}throw new SyntaxError("parseJSON");},stringify:function(o,w,d){if(o!==undefined){if(l.isArray(w)){w=(function(a){var uniq=[],map={},v,i,j,len;for(i=0,j=0,len=a.length;i<len;++i){v=a[i];if(typeof v==="string"&&map[v]===undefined){uniq[(map[v]=j++)]=v;}}return uniq;})(w);}d=d>=0?d:1/0;return _stringify({"":o},"",d,w,[]);}return undefined;},dateToString:function(d){function _zeroPad(v){return v<10?"0"+v:v;}return d.getUTCFullYear()+"-"+_zeroPad(d.getUTCMonth()+1)+"-"+_zeroPad(d.getUTCDate())+"T"+_zeroPad(d.getUTCHours())+":"+_zeroPad(d.getUTCMinutes())+":"+_zeroPad(d.getUTCSeconds())+"Z";},stringToDate:function(str){if(/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})Z$/.test(str)){var d=new Date();d.setUTCFullYear(RegExp.$1,(RegExp.$2|0)-1,RegExp.$3);d.setUTCHours(RegExp.$4,RegExp.$5,RegExp.$6);return d;}return str;}};})();YAHOO.register("json",YAHOO.lang.JSON,{version:"2.7.0",build:"1799"});
348   -(function(){var E=YAHOO.util.Dom,A=YAHOO.util.Event,C=YAHOO.lang;var B=function(F,D){var G={element:F,attributes:D||{}};B.superclass.constructor.call(this,G.element,G.attributes)};B._instances={};B.getResizeById=function(D){if(B._instances[D]){return B._instances[D]}return false};YAHOO.extend(B,YAHOO.util.Element,{CSS_RESIZE:"yui-resize",CSS_DRAG:"yui-draggable",CSS_HOVER:"yui-resize-hover",CSS_PROXY:"yui-resize-proxy",CSS_WRAP:"yui-resize-wrap",CSS_KNOB:"yui-resize-knob",CSS_HIDDEN:"yui-resize-hidden",CSS_HANDLE:"yui-resize-handle",CSS_STATUS:"yui-resize-status",CSS_GHOST:"yui-resize-ghost",CSS_RESIZING:"yui-resize-resizing",_resizeEvent:null,dd:null,browser:YAHOO.env.ua,_locked:null,_positioned:null,_dds:null,_wrap:null,_proxy:null,_handles:null,_currentHandle:null,_currentDD:null,_cache:null,_active:null,_createProxy:function(){if(this.get("proxy")){this._proxy=document.createElement("div");this._proxy.className=this.CSS_PROXY;this._proxy.style.height=this.get("element").clientHeight+"px";this._proxy.style.width=this.get("element").clientWidth+"px";this._wrap.parentNode.appendChild(this._proxy)}else{this.set("animate",false)}},_createWrap:function(){this._positioned=false;if(this.get("wrap")===false){switch(this.get("element").tagName.toLowerCase()){case"img":case"textarea":case"input":case"iframe":case"select":this.set("wrap",true);break}}if(this.get("wrap")===true){this._wrap=document.createElement("div");this._wrap.id=this.get("element").id+"_wrap";this._wrap.className=this.CSS_WRAP;if(this.get("element").tagName.toLowerCase()=="textarea"){E.addClass(this._wrap,"yui-resize-textarea")}E.setStyle(this._wrap,"width",this.get("width")+"px");E.setStyle(this._wrap,"height",this.get("height")+"px");E.setStyle(this._wrap,"z-index",this.getStyle("z-index"));this.setStyle("z-index",0);var F=E.getStyle(this.get("element"),"position");E.setStyle(this._wrap,"position",((F=="static")?"relative":F));E.setStyle(this._wrap,"top",E.getStyle(this.get("element"),"top"));E.setStyle(this._wrap,"left",E.getStyle(this.get("element"),"left"));if(E.getStyle(this.get("element"),"position")=="absolute"){this._positioned=true;E.setStyle(this.get("element"),"position","relative");E.setStyle(this.get("element"),"top","0");E.setStyle(this.get("element"),"left","0")}var D=this.get("element").parentNode;D.replaceChild(this._wrap,this.get("element"));this._wrap.appendChild(this.get("element"))}else{this._wrap=this.get("element");if(E.getStyle(this._wrap,"position")=="absolute"){this._positioned=true}}if(this.get("draggable")){this._setupDragDrop()}if(this.get("hover")){E.addClass(this._wrap,this.CSS_HOVER)}if(this.get("knobHandles")){E.addClass(this._wrap,this.CSS_KNOB)}if(this.get("hiddenHandles")){E.addClass(this._wrap,this.CSS_HIDDEN)}E.addClass(this._wrap,this.CSS_RESIZE)},_setupDragDrop:function(){E.addClass(this._wrap,this.CSS_DRAG);this.dd=new YAHOO.util.DD(this._wrap,this.get("id")+"-resize",{dragOnly:true,useShim:this.get("useShim")});this.dd.on("dragEvent",function(){this.fireEvent("dragEvent",arguments)},this,true)},_createHandles:function(){this._handles={};this._dds={};var G=this.get("handles");for(var F=0;F<G.length;F++){this._handles[G[F]]=document.createElement("div");this._handles[G[F]].id=E.generateId(this._handles[G[F]]);this._handles[G[F]].className=this.CSS_HANDLE+" "+this.CSS_HANDLE+"-"+G[F];var D=document.createElement("div");D.className=this.CSS_HANDLE+"-inner-"+G[F];this._handles[G[F]].appendChild(D);this._wrap.appendChild(this._handles[G[F]]);A.on(this._handles[G[F]],"mouseover",this._handleMouseOver,this,true);A.on(this._handles[G[F]],"mouseout",this._handleMouseOut,this,true);this._dds[G[F]]=new YAHOO.util.DragDrop(this._handles[G[F]],this.get("id")+"-handle-"+G,{useShim:this.get("useShim")});this._dds[G[F]].setPadding(15,15,15,15);this._dds[G[F]].on("startDragEvent",this._handleStartDrag,this._dds[G[F]],this);this._dds[G[F]].on("mouseDownEvent",this._handleMouseDown,this._dds[G[F]],this)}this._status=document.createElement("span");this._status.className=this.CSS_STATUS;document.body.insertBefore(this._status,document.body.firstChild)},_ieSelectFix:function(){return false},_ieSelectBack:null,_setAutoRatio:function(D){if(this.get("autoRatio")){if(D&&D.shiftKey){this.set("ratio",true)}else{this.set("ratio",this._configs.ratio._initialConfig.value)}}},_handleMouseDown:function(D){if(this._locked){return false}if(E.getStyle(this._wrap,"position")=="absolute"){this._positioned=true}if(D){this._setAutoRatio(D)}if(this.browser.ie){this._ieSelectBack=document.body.onselectstart;document.body.onselectstart=this._ieSelectFix}},_handleMouseOver:function(G){if(this._locked){return false}E.removeClass(this._wrap,this.CSS_RESIZE);if(this.get("hover")){E.removeClass(this._wrap,this.CSS_HOVER)}var D=A.getTarget(G);if(!E.hasClass(D,this.CSS_HANDLE)){D=D.parentNode}if(E.hasClass(D,this.CSS_HANDLE)&&!this._active){E.addClass(D,this.CSS_HANDLE+"-active");for(var F in this._handles){if(C.hasOwnProperty(this._handles,F)){if(this._handles[F]==D){E.addClass(D,this.CSS_HANDLE+"-"+F+"-active");break}}}}E.addClass(this._wrap,this.CSS_RESIZE)},_handleMouseOut:function(G){E.removeClass(this._wrap,this.CSS_RESIZE);if(this.get("hover")&&!this._active){E.addClass(this._wrap,this.CSS_HOVER)}var D=A.getTarget(G);if(!E.hasClass(D,this.CSS_HANDLE)){D=D.parentNode}if(E.hasClass(D,this.CSS_HANDLE)&&!this._active){E.removeClass(D,this.CSS_HANDLE+"-active");for(var F in this._handles){if(C.hasOwnProperty(this._handles,F)){if(this._handles[F]==D){E.removeClass(D,this.CSS_HANDLE+"-"+F+"-active");break}}}}E.addClass(this._wrap,this.CSS_RESIZE)},_handleStartDrag:function(G,F){var D=F.getDragEl();if(E.hasClass(D,this.CSS_HANDLE)){if(E.getStyle(this._wrap,"position")=="absolute"){this._positioned=true}this._active=true;this._currentDD=F;if(this._proxy){this._proxy.style.visibility="visible";this._proxy.style.zIndex="1000";this._proxy.style.height=this.get("element").clientHeight+"px";this._proxy.style.width=this.get("element").clientWidth+"px"}for(var H in this._handles){if(C.hasOwnProperty(this._handles,H)){if(this._handles[H]==D){this._currentHandle=H;var I="_handle_for_"+H;E.addClass(D,this.CSS_HANDLE+"-"+H+"-active");F.on("dragEvent",this[I],this,true);F.on("mouseUpEvent",this._handleMouseUp,this,true);break}}}E.addClass(D,this.CSS_HANDLE+"-active");if(this.get("proxy")){var J=E.getXY(this.get("element"));E.setXY(this._proxy,J);if(this.get("ghost")){this.addClass(this.CSS_GHOST)}}E.addClass(this._wrap,this.CSS_RESIZING);this._setCache();this._updateStatus(this._cache.height,this._cache.width,this._cache.top,this._cache.left);this.fireEvent("startResize",{type:"startresize",target:this})}},_setCache:function(){this._cache.xy=E.getXY(this._wrap);E.setXY(this._wrap,this._cache.xy);this._cache.height=this.get("clientHeight");this._cache.width=this.get("clientWidth");this._cache.start.height=this._cache.height;this._cache.start.width=this._cache.width;this._cache.start.top=this._cache.xy[1];this._cache.start.left=this._cache.xy[0];this._cache.top=this._cache.xy[1];this._cache.left=this._cache.xy[0];this.set("height",this._cache.height,true);this.set("width",this._cache.width,true)},_handleMouseUp:function(F){this._active=false;var G="_handle_for_"+this._currentHandle;this._currentDD.unsubscribe("dragEvent",this[G],this,true);this._currentDD.unsubscribe("mouseUpEvent",this._handleMouseUp,this,true);if(this._proxy){this._proxy.style.visibility="hidden";this._proxy.style.zIndex="-1";if(this.get("setSize")){this.resize(F,this._cache.height,this._cache.width,this._cache.top,this._cache.left,true)}else{this.fireEvent("resize",{ev:"resize",target:this,height:this._cache.height,width:this._cache.width,top:this._cache.top,left:this._cache.left})}if(this.get("ghost")){this.removeClass(this.CSS_GHOST)}}if(this.get("hover")){E.addClass(this._wrap,this.CSS_HOVER)}if(this._status){E.setStyle(this._status,"display","none")}if(this.browser.ie){document.body.onselectstart=this._ieSelectBack}if(this.browser.ie){E.removeClass(this._wrap,this.CSS_RESIZE)}for(var D in this._handles){if(C.hasOwnProperty(this._handles,D)){E.removeClass(this._handles[D],this.CSS_HANDLE+"-active")}}if(this.get("hover")&&!this._active){E.addClass(this._wrap,this.CSS_HOVER)}E.removeClass(this._wrap,this.CSS_RESIZING);E.removeClass(this._handles[this._currentHandle],this.CSS_HANDLE+"-"+this._currentHandle+"-active");E.removeClass(this._handles[this._currentHandle],this.CSS_HANDLE+"-active");if(this.browser.ie){E.addClass(this._wrap,this.CSS_RESIZE)}this._resizeEvent=null;this._currentHandle=null;if(!this.get("animate")){this.set("height",this._cache.height,true);this.set("width",this._cache.width,true)}this.fireEvent("endResize",{ev:"endResize",target:this,height:this._cache.height,width:this._cache.width,top:this._cache.top,left:this._cache.left})},_setRatio:function(K,N,Q,I){var O=K,G=N;if(this.get("ratio")){var P=this._cache.height,H=this._cache.width,F=parseInt(this.get("height"),10),L=parseInt(this.get("width"),10),M=this.get("maxHeight"),R=this.get("minHeight"),D=this.get("maxWidth"),J=this.get("minWidth");switch(this._currentHandle){case"l":K=F*(N/L);K=Math.min(Math.max(R,K),M);N=L*(K/F);Q=(this._cache.start.top-(-((F-K)/2)));I=(this._cache.start.left-(-((L-N))));break;case"r":K=F*(N/L);K=Math.min(Math.max(R,K),M);N=L*(K/F);Q=(this._cache.start.top-(-((F-K)/2)));break;case"t":N=L*(K/F);K=F*(N/L);I=(this._cache.start.left-(-((L-N)/2)));Q=(this._cache.start.top-(-((F-K))));break;case"b":N=L*(K/F);K=F*(N/L);I=(this._cache.start.left-(-((L-N)/2)));break;case"bl":K=F*(N/L);N=L*(K/F);I=(this._cache.start.left-(-((L-N))));break;case"br":K=F*(N/L);N=L*(K/F);break;case"tl":K=F*(N/L);N=L*(K/F);I=(this._cache.start.left-(-((L-N))));Q=(this._cache.start.top-(-((F-K))));break;case"tr":K=F*(N/L);N=L*(K/F);I=(this._cache.start.left);Q=(this._cache.start.top-(-((F-K))));break}O=this._checkHeight(K);G=this._checkWidth(N);if((O!=K)||(G!=N)){Q=0;I=0;if(O!=K){G=this._cache.width}if(G!=N){O=this._cache.height}}}return[O,G,Q,I]},_updateStatus:function(K,G,J,F){if(this._resizeEvent&&(!C.isString(this._resizeEvent))){K=((K===0)?this._cache.start.height:K);G=((G===0)?this._cache.start.width:G);var I=parseInt(this.get("height"),10),D=parseInt(this.get("width"),10);if(isNaN(I)){I=parseInt(K,10)}if(isNaN(D)){D=parseInt(G,10)}var L=(parseInt(K,10)-I);var H=(parseInt(G,10)-D);this._cache.offsetHeight=L;this._cache.offsetWidth=H;if(this.get("status")){E.setStyle(this._status,"display","inline");this._status.innerHTML="<strong>"+parseInt(K,10)+" x "+parseInt(G,10)+"</strong><em>"+((L>0)?"+":"")+L+" x "+((H>0)?"+":"")+H+"</em>";E.setXY(this._status,[A.getPageX(this._resizeEvent)+12,A.getPageY(this._resizeEvent)+12])}}},lock:function(D){this._locked=true;if(D&&this.dd){E.removeClass(this._wrap,"yui-draggable");this.dd.lock()}return this},unlock:function(D){this._locked=false;if(D&&this.dd){E.addClass(this._wrap,"yui-draggable");this.dd.unlock()}return this},isLocked:function(){return this._locked},reset:function(){this.resize(null,this._cache.start.height,this._cache.start.width,this._cache.start.top,this._cache.start.left,true);return this},resize:function(M,J,P,Q,H,F,K){if(this._locked){return false}this._resizeEvent=M;var G=this._wrap,I=this.get("animate"),O=true;if(this._proxy&&!F){G=this._proxy;I=false}this._setAutoRatio(M);if(this._positioned){if(this._proxy){Q=this._cache.top-Q;H=this._cache.left-H}}var L=this._setRatio(J,P,Q,H);J=parseInt(L[0],10);P=parseInt(L[1],10);Q=parseInt(L[2],10);H=parseInt(L[3],10);if(Q==0){Q=E.getY(G)}if(H==0){H=E.getX(G)}if(this._positioned){if(this._proxy&&F){if(!I){G.style.top=this._proxy.style.top;G.style.left=this._proxy.style.left}else{Q=this._proxy.style.top;H=this._proxy.style.left}}else{if(!this.get("ratio")&&!this._proxy){Q=this._cache.top+-(Q);H=this._cache.left+-(H)}if(Q){if(this.get("minY")){if(Q<this.get("minY")){Q=this.get("minY")}}if(this.get("maxY")){if(Q>this.get("maxY")){Q=this.get("maxY")}}}if(H){if(this.get("minX")){if(H<this.get("minX")){H=this.get("minX")}}if(this.get("maxX")){if((H+P)>this.get("maxX")){H=(this.get("maxX")-P)}}}}}if(!K){var N=this.fireEvent("beforeResize",{ev:"beforeResize",target:this,height:J,width:P,top:Q,left:H});if(N===false){return false}}this._updateStatus(J,P,Q,H);if(this._positioned){if(this._proxy&&F){}else{if(Q){E.setY(G,Q);this._cache.top=Q}if(H){E.setX(G,H);this._cache.left=H}}}if(J){if(!I){O=true;if(this._proxy&&F){if(!this.get("setSize")){O=false}}if(O){G.style.height=J+"px"}if((this._proxy&&F)||!this._proxy){if(this._wrap!=this.get("element")){this.get("element").style.height=J+"px"}}}this._cache.height=J}if(P){this._cache.width=P;if(!I){O=true;if(this._proxy&&F){if(!this.get("setSize")){O=false}}if(O){G.style.width=P+"px"}if((this._proxy&&F)||!this._proxy){if(this._wrap!=this.get("element")){this.get("element").style.width=P+"px"}}}}if(I){if(YAHOO.util.Anim){var D=new YAHOO.util.Anim(G,{height:{to:this._cache.height},width:{to:this._cache.width}},this.get("animateDuration"),this.get("animateEasing"));if(this._positioned){if(Q){D.attributes.top={to:parseInt(Q,10)}}if(H){D.attributes.left={to:parseInt(H,10)}}}if(this._wrap!=this.get("element")){D.onTween.subscribe(function(){this.get("element").style.height=G.style.height;this.get("element").style.width=G.style.width},this,true)}D.onComplete.subscribe(function(){this.set("height",J);this.set("width",P);this.fireEvent("resize",{ev:"resize",target:this,height:J,width:P,top:Q,left:H})},this,true);D.animate()}}else{if(this._proxy&&!F){this.fireEvent("proxyResize",{ev:"proxyresize",target:this,height:J,width:P,top:Q,left:H})}else{this.fireEvent("resize",{ev:"resize",target:this,height:J,width:P,top:Q,left:H})}}return this},_handle_for_br:function(F){var G=this._setWidth(F.e);var D=this._setHeight(F.e);this.resize(F.e,D,G,0,0)},_handle_for_bl:function(G){var H=this._setWidth(G.e,true);var F=this._setHeight(G.e);var D=(H-this._cache.width);this.resize(G.e,F,H,0,D)},_handle_for_tl:function(G){var I=this._setWidth(G.e,true);var F=this._setHeight(G.e,true);var H=(F-this._cache.height);var D=(I-this._cache.width);this.resize(G.e,F,I,H,D)},_handle_for_tr:function(F){var H=this._setWidth(F.e);var D=this._setHeight(F.e,true);var G=(D-this._cache.height);this.resize(F.e,D,H,G,0)},_handle_for_r:function(D){this._dds.r.setYConstraint(0,0);var F=this._setWidth(D.e);this.resize(D.e,0,F,0,0)},_handle_for_l:function(F){this._dds.l.setYConstraint(0,0);var G=this._setWidth(F.e,true);var D=(G-this._cache.width);this.resize(F.e,0,G,0,D)},_handle_for_b:function(F){this._dds.b.setXConstraint(0,0);var D=this._setHeight(F.e);this.resize(F.e,D,0,0,0)},_handle_for_t:function(F){this._dds.t.setXConstraint(0,0);var D=this._setHeight(F.e,true);var G=(D-this._cache.height);this.resize(F.e,D,0,G,0)},_setWidth:function(H,J){var I=this._cache.xy[0],G=this._cache.width,D=A.getPageX(H),F=(D-I);if(J){F=(I-D)+parseInt(this.get("width"),10)}F=this._snapTick(F,this.get("xTicks"));F=this._checkWidth(F);return F},_checkWidth:function(D){if(this.get("minWidth")){if(D<=this.get("minWidth")){D=this.get("minWidth")}}if(this.get("maxWidth")){if(D>=this.get("maxWidth")){D=this.get("maxWidth")}}return D},_checkHeight:function(D){if(this.get("minHeight")){if(D<=this.get("minHeight")){D=this.get("minHeight")}}if(this.get("maxHeight")){if(D>=this.get("maxHeight")){D=this.get("maxHeight")}}return D},_setHeight:function(G,I){var H=this._cache.xy[1],F=this._cache.height,J=A.getPageY(G),D=(J-H);if(I){D=(H-J)+parseInt(this.get("height"),10)}D=this._snapTick(D,this.get("yTicks"));D=this._checkHeight(D);return D},_snapTick:function(G,F){if(!G||!F){return G}var H=G;var D=G%F;if(D>0){if(D>(F/2)){H=G+(F-D)}else{H=G-D}}return H},init:function(H,F){this._locked=false;this._cache={xy:[],height:0,width:0,top:0,left:0,offsetHeight:0,offsetWidth:0,start:{height:0,width:0,top:0,left:0}};B.superclass.init.call(this,H,F);this.set("setSize",this.get("setSize"));if(F.height){this.set("height",parseInt(F.height,10))}else{var G=this.getStyle("height");if(G=="auto"){this.set("height",parseInt(this.get("element").offsetHeight,10))}}if(F.width){this.set("width",parseInt(F.width,10))}else{var D=this.getStyle("width");if(D=="auto"){this.set("width",parseInt(this.get("element").offsetWidth,10))}}var I=H;if(!C.isString(I)){I=E.generateId(I)}B._instances[I]=this;this._active=false;this._createWrap();this._createProxy();this._createHandles()},getProxyEl:function(){return this._proxy},getWrapEl:function(){return this._wrap},getStatusEl:function(){return this._status},getActiveHandleEl:function(){return this._handles[this._currentHandle]},isActive:function(){return((this._active)?true:false)},initAttributes:function(D){B.superclass.initAttributes.call(this,D);this.setAttributeConfig("useShim",{value:((D.useShim===true)?true:false),validator:YAHOO.lang.isBoolean,method:function(F){for(var G in this._dds){if(C.hasOwnProperty(this._dds,G)){this._dds[G].useShim=F}}if(this.dd){this.dd.useShim=F}}});this.setAttributeConfig("setSize",{value:((D.setSize===false)?false:true),validator:YAHOO.lang.isBoolean});this.setAttributeConfig("wrap",{writeOnce:true,validator:YAHOO.lang.isBoolean,value:D.wrap||false});this.setAttributeConfig("handles",{writeOnce:true,value:D.handles||["r","b","br"],validator:function(F){if(C.isString(F)&&F.toLowerCase()=="all"){F=["t","b","r","l","bl","br","tl","tr"]}if(!C.isArray(F)){F=F.replace(/, /g,",");F=F.split(",")}this._configs.handles.value=F}});this.setAttributeConfig("width",{value:D.width||parseInt(this.getStyle("width"),10),validator:YAHOO.lang.isNumber,method:function(F){F=parseInt(F,10);if(F>0){if(this.get("setSize")){this.setStyle("width",F+"px")}this._cache.width=F;this._configs.width.value=F}}});this.setAttributeConfig("height",{value:D.height||parseInt(this.getStyle("height"),10),validator:YAHOO.lang.isNumber,method:function(F){F=parseInt(F,10);if(F>0){if(this.get("setSize")){this.setStyle("height",F+"px")}this._cache.height=F;this._configs.height.value=F}}});this.setAttributeConfig("minWidth",{value:D.minWidth||15,validator:YAHOO.lang.isNumber});this.setAttributeConfig("minHeight",{value:D.minHeight||15,validator:YAHOO.lang.isNumber});this.setAttributeConfig("maxWidth",{value:D.maxWidth||10000,validator:YAHOO.lang.isNumber});this.setAttributeConfig("maxHeight",{value:D.maxHeight||10000,validator:YAHOO.lang.isNumber});this.setAttributeConfig("minY",{value:D.minY||false});this.setAttributeConfig("minX",{value:D.minX||false});this.setAttributeConfig("maxY",{value:D.maxY||false});this.setAttributeConfig("maxX",{value:D.maxX||false});this.setAttributeConfig("animate",{value:D.animate||false,validator:function(G){var F=true;if(!YAHOO.util.Anim){F=false}return F}});this.setAttributeConfig("animateEasing",{value:D.animateEasing||function(){var F=false;if(YAHOO.util.Easing&&YAHOO.util.Easing.easeOut){F=YAHOO.util.Easing.easeOut}return F}()});this.setAttributeConfig("animateDuration",{value:D.animateDuration||0.5});this.setAttributeConfig("proxy",{value:D.proxy||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("ratio",{value:D.ratio||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("ghost",{value:D.ghost||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("draggable",{value:D.draggable||false,validator:YAHOO.lang.isBoolean,method:function(F){if(F&&this._wrap){this._setupDragDrop()}else{if(this.dd){E.removeClass(this._wrap,this.CSS_DRAG);this.dd.unreg()}}}});this.setAttributeConfig("hover",{value:D.hover||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("hiddenHandles",{value:D.hiddenHandles||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("knobHandles",{value:D.knobHandles||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("xTicks",{value:D.xTicks||false});this.setAttributeConfig("yTicks",{value:D.yTicks||false});this.setAttributeConfig("status",{value:D.status||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("autoRatio",{value:D.autoRatio||false,validator:YAHOO.lang.isBoolean})},destroy:function(){for(var F in this._handles){if(C.hasOwnProperty(this._handles,F)){A.purgeElement(this._handles[F]);this._handles[F].parentNode.removeChild(this._handles[F])}}if(this._proxy){this._proxy.parentNode.removeChild(this._proxy)}if(this._status){this._status.parentNode.removeChild(this._status)}if(this.dd){this.dd.unreg();E.removeClass(this._wrap,this.CSS_DRAG)}if(this._wrap!=this.get("element")){this.setStyle("position","");this.setStyle("top","");this.setStyle("left","");this._wrap.parentNode.replaceChild(this.get("element"),this._wrap)}this.removeClass(this.CSS_RESIZE);delete YAHOO.util.Resize._instances[this.get("id")];for(var D in this){if(C.hasOwnProperty(this,D)){this[D]=null;delete this[D]}}},toString:function(){if(this.get){return"Resize (#"+this.get("id")+")"}return"Resize Utility"}});YAHOO.util.Resize=B})();YAHOO.register("resize",YAHOO.util.Resize,{version:"2.7.0",build:"1799"});
349   -BalloonConfig=function(balloon,set){set=set||'';if(!balloon.configured||set=='GBubble'||set=='GBox'){balloon.fontColor='black';balloon.fontFamily='Arial, sans-serif';balloon.fontSize='12pt';balloon.minWidth=100;balloon.maxWidth=400;balloon.delayTime=750;balloon.vOffset=10;balloon.hOffset=10;balloon.stem=true;balloon.images=i3GEO.configura.locaplic+'/pacotes/balloon-tooltips/htdocs/images/GBubble';balloon.ieImage='balloon_ie.png';balloon.balloonImage='balloon.png';balloon.upLeftStem='up_left.png';balloon.downLeftStem='down_left.png';balloon.upRightStem='up_right.png';balloon.downRightStem='down_right.png';balloon.closeButton='close.png';balloon.closeButtonWidth=16;balloon.allowAJAX=true;balloon.allowIframes=true;balloon.trackCursor=true;balloon.shadow=20;balloon.padding=10;balloon.stemHeight=32;balloon.stemOverlap=3;balloon.vOffset=1;balloon.hOffset=1;balloon.opacity=0.9;balloon.configured=set||true}switch(set){case('GBoxxxx'):balloon.bgColor='whitesmoke';balloon.borderStyle='2px solid gray';balloon.padding=5;balloon.shadow=0;balloon.stem=true;balloon.opacity=0.8;balloon.hOffset=1;balloon.vOffset=1;balloon.allowFade=false;break;case('GPlain'):balloon.padding=5;balloon.images=i3GEO.configura.locaplic+'/pacotes/balloon-tooltips/htdocs/images/GPlain';balloon.ieImage=null;balloon.shadow=0;balloon.stemHeight=15;balloon.stemOverlap=1;balloon.opacity=0.85;break;case('GFade'):balloon.allowFade=true;balloon.fadeIn=1000;balloon.faedOut=200;break}};
350   -var currentBalloonClass;var balloonIsVisible;var balloonIsSticky;var balloonInvisibleSelects;var balloonIsSuppressed;var tooltipIsSuppressed;var Balloon=function(){this.trackCursor=true;document.onmousemove=this.setActiveCoordinates;var myObject=this.isIE()?window:document;myObject.onscroll=function(){Balloon.prototype.nukeTooltip()};window.onbeforeunload=function(){Balloon.prototype.nukeTooltip();balloonIsSuppressed=true};if(this.isIE()){this.suppress=true}return this};Balloon.prototype.showTooltip=function(evt,caption,sticky,width,height,x,y){if(!this.configured){BalloonConfig(this,'GBubble')}this.stopTrackingX=this.trackCursor?100:10;this.stopTrackingY=this.trackCursor?50:10;if(this.isIE()&&document.readyState.match(/complete/i)){this.suppress=false}if(this.suppress||balloonIsSuppressed){return false}if(tooltipIsSuppressed&&!sticky){return false}if(this.opacity&&this.opacity<1){this.opacity=parseInt(parseFloat(this.opacity)*100)}else if(this.opacity&&this.opacity==1){this.opacity=100}else if(!this.opacity){this.opacity==100}if(this.isKonqueror()){this.allowFade=false;this.opacity=100}if(this.isIE()&&this.allowFade){this.opacity=100}var mouseOver=true;try{var mouseOver=evt.type.match('mouseover','i')}catch(e){}if(!mouseOver){sticky=true;this.fadeOK=false;if(balloonIsVisible){this.hideTooltip()}}else{this.fadeOK=this.allowFade}if(balloonIsVisible&&!balloonIsSticky&&mouseOver){return false}if(balloonIsVisible&&balloonIsSticky&&!sticky){return false}try{var el=this.getEventTarget(evt)}catch(e){var el=evt}if(sticky&&mouseOver&&this.isSameElement(el,this.currentElement)){return false}this.currentElement=el;this.elCoords=this.getLoc(el,'region');if(!sticky){var mouseoutFunc=el.onmouseout;var closeBalloon=function(){Balloon.prototype.hideTooltip();if(mouseoutFunc){mouseoutFunc()}};if(!mouseOver){el.onmouseup=function(){return false}}}balloonIsSticky=sticky;this.hideTooltip();this.currentHelpText=this.getAndCheckContents(caption);if(!this.currentHelpText){return false}this.width=width;this.height=height;this.actualWidth=null;this.x=x;this.y=y;this.hideTooltip();this.container=document.createElement('div');this.container.id='balloonPreloadContainer';document.body.appendChild(this.container);this.setStyle(this.container,'position','absolute');this.setStyle(this.container,'top',-8888);this.setStyle(this.container,'font-family',this.fontFamily);this.setStyle(this.container,'font-size',this.fontSize);this.currentHelpText=this.currentHelpText.replace(/\&amp;/g,'&amp;amp');this.container.innerHTML=unescape(this.currentHelpText);if(this.images){this.balloonImage=this.balloonImage?this.images+'/'+this.balloonImage:false;this.ieImage=this.ieImage?this.images+'/'+this.ieImage:false;this.upLeftStem=this.upLeftStem?this.images+'/'+this.upLeftStem:false;this.upRightStem=this.upRightStem?this.images+'/'+this.upRightStem:false;this.downLeftStem=this.downLeftStem?this.images+'/'+this.downLeftStem:false;this.downRightStem=this.downRightStem?this.images+'/'+this.downRightStem:false;this.closeButton=this.closeButton?this.images+'/'+this.closeButton:false;this.images=false}if(this.ieImage&&(this.isIE()||this.isChrome())){if(this.isOldIE()||this.opacity||this.allowFade){this.balloonImage=this.ieImage}}if(!this.preloadedImages){var images=[this.balloonImage,this.closeButton];if(this.ieImage){images.push(this.ieImage)}if(this.stem){images.push(this.upLeftStem,this.upRightStem,this.downLeftStem,this.downRightStem)}var len=images.length;for(var i=0;i<len;i++){if(images[i]){this.preload(images[i])}}this.preloadedImages=true}currentBalloonClass=this;if(!mouseOver)el.onmouseup=function(){return false};this.currentEvent=evt;evt.cancelBubble=true;this.setActiveCoordinates([]);this.doShowTooltip();this.pending=true};Balloon.prototype.preload=function(src){var i=new Image;i.src=src;this.setStyle(i,'position','absolute');this.setStyle(i,'top',-8000);document.body.appendChild(i);document.body.removeChild(i)};Balloon.prototype.doShowTooltip=function(){var self=currentBalloonClass;if(balloonIsVisible){return false}if(!self.parent){if(self.parentID){self.parent=document.getElementById(self.parentID)}else{self.parent=document.body}self.xOffset=self.getLoc(self.parent,'x1');self.yOffset=self.getLoc(self.parent,'y1')}window.clearTimeout(self.timeoutFade);if(!balloonIsSticky){self.setStyle('visibleBalloonElement','display','none')}self.parseIntAll();var balloon=self.makeBalloon();var pageWidth=YAHOO.util.Dom.getViewportWidth();var pageCen=Math.round(pageWidth/2);var pageHeight=YAHOO.util.Dom.getViewportHeight();var pageLeft=YAHOO.util.Dom.getDocumentScrollLeft();var pageTop=YAHOO.util.Dom.getDocumentScrollTop();var pageMid=pageTop+Math.round(pageHeight/2);self.pageBottom=pageTop+pageHeight;self.pageTop=pageTop;self.pageLeft=pageLeft;self.pageRight=pageLeft+pageWidth;var vOrient=self.activeTop>pageMid?'up':'down';var hOrient=self.activeRight>pageCen?'left':'right';var helpText=self.container.innerHTML;self.actualWidth=self.getLoc(self.container,'width');if(!isNaN(self.actualWidth)){self.actualWidth+=10}self.parent.removeChild(self.container);var wrapper=document.createElement('div');wrapper.id='contentWrapper';self.contents.appendChild(wrapper);wrapper.innerHTML=helpText;self.setBalloonStyle(vOrient,hOrient,pageWidth,pageLeft);if(balloonIsSticky){self.addCloseButton()}balloonIsVisible=true;self.pending=false;self.showHide();self.startX=self.activeLeft;self.startY=self.activeTop;self.fade(0,self.opacity,self.fadeIn)};Balloon.prototype.addCloseButton=function(){var self=currentBalloonClass;var margin=Math.round(self.padding/2);var closeWidth=self.closeButtonWidth||16;var balloonTop=self.getLoc('visibleBalloonElement','y1')+margin+self.shadow;var BalloonLeft=self.getLoc('topRight','x2')-self.closeButtonWidth-self.shadow-margin;var closeButton=document.getElementById('closeButton');if(!closeButton){closeButton=new Image;closeButton.setAttribute('id','closeButton');closeButton.setAttribute('src',self.closeButton);closeButton.onclick=function(){Balloon.prototype.nukeTooltip();var temp=$i('marcaIdentifica');if(temp){temp.parentNode.removeChild(temp)}};self.setStyle(closeButton,'position','absolute');document.body.appendChild(closeButton)}if(self.isIE()){BalloonLeft=BalloonLeft-5}self.setStyle(closeButton,'top',balloonTop);self.setStyle(closeButton,'left',BalloonLeft);self.setStyle(closeButton,'display','inline');self.setStyle(closeButton,'cursor','pointer');self.setStyle(closeButton,'z-index',999999999)};Balloon.prototype.makeBalloon=function(){var self=currentBalloonClass;var balloon=document.getElementById('visibleBalloonElement');if(balloon){self.hideTooltip()}balloon=document.createElement('div');balloon.setAttribute('id','visibleBalloonElement');self.parent.appendChild(balloon);self.activeBalloon=balloon;self.parts=new Array();var parts=new Array('contents','topRight','bottomRight','bottomLeft');for(var i=0;i<parts.length;i++){var child=document.createElement('div');child.setAttribute('id',parts[i]);balloon.appendChild(child);if(parts[i]=='contents')self.contents=child;self.parts.push(child)}if(self.displayTime){self.timeoutAutoClose=window.setTimeout(this.hideTooltip,self.displayTime)}return balloon};Balloon.prototype.setBalloonStyle=function(vOrient,hOrient,pageWidth,pageLeft){var self=currentBalloonClass;var balloon=self.activeBalloon;if(typeof(self.shadow)!='number')self.shadow=0;if(!self.stem)self.stemHeight=0;var fullPadding=self.padding+self.shadow;var insidePadding=self.padding;var outerWidth=self.actualWidth+fullPadding;var innerWidth=self.actualWidth;self.setStyle(balloon,'position','absolute');self.setStyle(balloon,'top',-9999);self.setStyle(balloon,'z-index',1000000);if(self.height){self.setStyle('contentWrapper','height',self.height-fullPadding)}if(self.width){self.setStyle(balloon,'width',self.width);innerWidth=self.width-fullPadding;if(balloonIsSticky){innerWidth-=self.closeButtonWidth}self.setStyle('contentWrapper','width',innerWidth)}else{self.setStyle(balloon,'width',outerWidth);self.setStyle('contentWrapper','width',innerWidth)}if(!self.width&&self.maxWidth&&outerWidth>self.maxWidth){self.setStyle(balloon,'width',self.maxWidth);self.setStyle('contentWrapper','width',self.maxWidth-fullPadding)}if(!self.width&&self.minWidth&&outerWidth<self.minWidth){self.setStyle(balloon,'width',self.minWidth);self.setStyle('contentWrapper','width',self.minWidth-fullPadding)}self.setStyle('contents','z-index',2);self.setStyle('contents','color',self.fontColor);self.setStyle('contents','font-family',self.fontFamily);self.setStyle('contents','font-size',self.fontSize);self.setStyle('contents','background','url('+self.balloonImage+') top left no-repeat');self.setStyle('contents','padding-top',fullPadding);self.setStyle('contents','padding-left',fullPadding);self.setStyle('bottomRight','background','url('+self.balloonImage+') bottom right no-repeat');self.setStyle('bottomRight','position','absolute');self.setStyle('bottomRight','right',0-fullPadding);self.setStyle('bottomRight','bottom',0-fullPadding);self.setStyle('bottomRight','height',fullPadding);self.setStyle('bottomRight','width',fullPadding);self.setStyle('bottomRight','z-index',-1);self.setStyle('topRight','background','url('+self.balloonImage+') top right no-repeat');self.setStyle('topRight','position','absolute');self.setStyle('topRight','right',0-fullPadding);self.setStyle('topRight','top',0);self.setStyle('topRight','width',fullPadding);self.setStyle('bottomLeft','background','url('+self.balloonImage+') bottom left no-repeat');self.setStyle('bottomLeft','position','absolute');self.setStyle('bottomLeft','left',0);self.setStyle('bottomLeft','bottom',0-fullPadding);self.setStyle('bottomLeft','height',fullPadding);self.setStyle('bottomLeft','z-index',-1);if(this.stem){var stem=document.createElement('img');stem.style.zIndex=50000;self.setStyle(stem,'position','absolute');balloon.appendChild(stem);if(vOrient=='up'&&hOrient=='left'){stem.src=self.upLeftStem;var height=self.stemHeight+insidePadding-self.stemOverlap;self.setStyle(stem,'bottom',0-height);self.setStyle(stem,'right',0)}else if(vOrient=='down'&&hOrient=='left'){stem.src=self.downLeftStem;var height=self.stemHeight-(self.shadow+self.stemOverlap);self.setStyle(stem,'top',0-height);self.setStyle(stem,'right',0)}else if(vOrient=='up'&&hOrient=='right'){stem.src=self.upRightStem;var height=self.stemHeight+insidePadding-self.stemOverlap;self.setStyle(stem,'bottom',0-height);self.setStyle(stem,'left',self.shadow)}else if(vOrient=='down'&&hOrient=='right'){stem.src=self.downRightStem;var height=self.stemHeight-(self.shadow+self.stemOverlap);self.setStyle(stem,'top',0-height);self.setStyle(stem,'left',self.shadow)}if(self.fadeOK&&self.isIE()){self.parts.push(stem)}}if(self.allowFade){self.setOpacity(1)}else if(self.opacity){self.setOpacity(self.opacity)}if(hOrient=='left'){var pageWidth=self.pageRight-self.pageLeft;var activeRight=pageWidth-self.activeLeft;self.setStyle(balloon,'right',activeRight)}else{var activeLeft=self.activeRight-self.xOffset;self.setStyle(balloon,'left',activeLeft)}var overflow=balloonIsSticky?'auto':'hidden';self.setStyle('contentWrapper','overflow',overflow);if(balloonIsSticky){self.setStyle('contentWrapper','margin-right',self.closeButtonWidth)}var balloonLeft=self.getLoc(balloon,'x1');var balloonRight=self.getLoc(balloon,'x2');var scrollBar=20;if(hOrient=='right'&&balloonRight>(self.pageRight-fullPadding)){var width=(self.pageRight-balloonLeft)-fullPadding-scrollBar;self.setStyle(balloon,'width',width);self.setStyle('contentWrapper','width',width-fullPadding)}else if(hOrient=='left'&&balloonLeft<(self.pageLeft+fullPadding)){var width=(balloonRight-self.pageLeft)-fullPadding;self.setStyle(balloon,'width',width);self.setStyle('contentWrapper','width',width-fullPadding)}var balloonWidth=self.getLoc(balloon,'width');var balloonHeight=self.getLoc(balloon,'height');var vOverlap=self.isOverlap('topRight','bottomRight');var hOverlap=self.isOverlap('bottomLeft','bottomRight');if(vOverlap){self.setStyle('topRight','height',balloonHeight-vOverlap[1])}if(hOverlap){self.setStyle('bottomLeft','width',balloonWidth-hOverlap[0])}if(vOrient=='up'){var activeTop=self.activeTop-balloonHeight;self.setStyle(balloon,'top',activeTop)}else{var activeTop=self.activeBottom;self.setStyle(balloon,'top',activeTop)}var balloonTop=self.getLoc(balloon,'y1');var balloonBottom=self.height?balloonTop+self.height:self.getLoc(balloon,'y2');var deltaTop=balloonTop<self.pageTop?self.pageTop-balloonTop:0;var deltaBottom=balloonBottom>self.pageBottom?balloonBottom-self.pageBottom:0;if(vOrient=='up'&&deltaTop){var newHeight=balloonHeight-deltaTop;if(newHeight>(self.padding*2)){self.setStyle('contentWrapper','height',newHeight-fullPadding);self.setStyle(balloon,'top',self.pageTop+self.padding);self.setStyle(balloon,'height',newHeight)}}if(vOrient=='down'&&deltaBottom){var newHeight=balloonHeight-deltaBottom-scrollBar;if(newHeight>(self.padding*2)+scrollBar){self.setStyle('contentWrapper','height',newHeight-fullPadding);self.setStyle(balloon,'height',newHeight)}}var iframe=balloon.getElementsByTagName('iframe');if(iframe[0]){iframe=iframe[0];var w=self.getLoc('contentWrapper','width');if(balloonIsSticky&&!this.isIE()){w-=self.closeButtonWidth}var h=self.getLoc('contentWrapper','height');self.setStyle(iframe,'width',w);self.setStyle(iframe,'height',h);self.setStyle('contentWrapper','overflow','hidden')}self.setStyle('topRight','height',self.getLoc(balloon,'height'));self.setStyle('bottomLeft','width',self.getLoc(balloon,'width'));self.hOrient=hOrient;self.vOrient=vOrient};Balloon.prototype.fade=function(opacStart,opacEnd,millisec){var self=currentBalloonClass||new Balloon;if(!millisec||!self.allowFade){return false}opacEnd=opacEnd||100;var speed=Math.round(millisec/100);var timer=0;for(o=opacStart;o<=opacEnd;o++){self.timeoutFade=setTimeout('Balloon.prototype.setOpacity('+o+')',(timer*speed));timer++}};Balloon.prototype.setOpacity=function(opc){var self=currentBalloonClass;if(!self||!opc)return false;var o=parseFloat(opc/100);var parts=self.isIE()?self.parts:[self.activeBalloon];var len=parts.length;for(var i=0;i<len;i++){self.doOpacity(o,opc,parts[i])}};Balloon.prototype.doOpacity=function(op,opc,el){var self=currentBalloonClass;if(!el)return false;self.setStyle(el,'opacity',op);self.setStyle(el,'filter','alpha(opacity='+opc+')');self.setStyle(el,'MozOpacity',op);self.setStyle(el,'KhtmlOpacity',op)};Balloon.prototype.nukeTooltip=function(){this.hideTooltip(1)};Balloon.prototype.hideTooltip=function(override){if(override&&typeof override=='object')override=false;if(balloonIsSticky&&!override)return false;var self=currentBalloonClass;Balloon.prototype.showHide(1);Balloon.prototype.cleanup();if(self){window.clearTimeout(self.timeoutTooltip);window.clearTimeout(self.timeoutFade);window.clearTimeout(self.timeoutAutoClose);if(balloonIsSticky){self.currentElement=null}self.startX=0;self.startY=0}balloonIsVisible=false;balloonIsSticky=false};Balloon.prototype.cleanup=function(){var self=currentBalloonClass;var body;if(self){body=self.parent?self.parent:self.parentID?document.getElementById(self.parentID)||document.body:document.body}else{body=document.body}var bubble=document.getElementById('visibleBalloonElement');var close=document.getElementById('closeButton');var cont=document.getElementById('balloonPreloadContainer');if(bubble){body.removeChild(bubble)}if(close){body.removeChild(close)}if(cont){body.removeChild(cont)}};hideAllTooltips=function(){var self=currentBalloonClass;if(!self)return;window.clearTimeout(self.timeoutTooltip);if(self.activeBalloon)self.setStyle(self.activeBalloon,'display','none');balloonIsVisible=false;balloonIsSticky=false;currentBalloonClass=null};Balloon.prototype.setActiveCoordinates=function(evt){var self=currentBalloonClass;if(!self){return true}var evt=evt||window.event||self.currentEvent;if(!evt){return true}self.currentEvent={};for(var i in evt){self.currentEvent[i]=evt[i]}self.hOffset=self.hOffset||1;self.vOffset=self.vOffset||1;self.stemHeight=self.stem&&self.stemHeight?(self.stemHeight||0):0;var scrollTop=0;var scrollLeft=0;var XY=[self.x,self.y];adjustment=self.hOffset<20?10:0;self.activeTop=scrollTop+XY[1]-adjustment-self.vOffset-self.stemHeight;self.activeLeft=scrollLeft+XY[0]-adjustment-self.hOffset;self.activeRight=scrollLeft+XY[0];self.activeBottom=scrollTop+XY[1]+self.vOffset+2*adjustment;if(balloonIsVisible&&!balloonIsSticky){var deltaX=Math.abs(self.activeLeft-self.startX);var deltaY=Math.abs(self.activeTop-self.startY);if(XY[0]<self.elCoords.left||XY[0]>self.elCoords.right||XY[1]<self.elCoords.top||XY[1]>self.elCoords.bottom){}if(deltaX>self.stopTrackingX||deltaY>self.stopTrackingY){}else if(self.trackCursor){var b=self.activeBalloon;var bwidth=self.getLoc(b,'width');var bheight=self.getLoc(b,'height');var btop=self.getLoc(b,'y1');var bleft=self.getLoc(b,'x1');if(self.hOrient=='right'){self.setStyle(b,'left',self.activeRight)}else if(self.hOrient=='left'){self.setStyle(b,'right',null);var newLeft=self.activeLeft-bwidth;self.setStyle(b,'left',newLeft)}if(self.vOrient=='up'){self.setStyle(b,'top',self.activeTop-bheight)}else if(self.vOrient=='down'){self.setStyle(b,'top',self.activeBottom)}}}return true};Balloon.prototype.eventXY=function(event){var XY=new Array(2);var e=event||window.event;if(!e){return false}if(e.pageX||e.pageY){XY[0]=e.pageX;XY[1]=e.pageY;return XY}else if(e.clientX||e.clientY){XY[0]=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;XY[1]=e.clientY+document.body.scrollTop+document.documentElement.scrollTop;return XY}};Balloon.prototype.getEventTarget=function(event){var targ;var e=event||window.event;if(e.target)targ=e.target;else if(e.srcElement)targ=e.srcElement;if(targ.nodeType==3)targ=targ.parentNode;return targ};Balloon.prototype.setStyle=function(el,att,val){if(!el){return false}if(typeof(el)!='object'){el=document.getElementById(el)}if(!el){return false}var v=val;if(val&&att.match(/left|top|bottom|right|width|height|padding|margin/)){val=new String(val);if(!val.match(/auto/)){val+='px'}}if(att=='z-index'){if(el.style){el.style.zIndex=parseInt(val)}}else{if(this.isIE()&&att.match(/^left|right|top|bottom$/)&&!parseInt(val)&&val!=0){val=null}YAHOO.util.Dom.setStyle(el,att,val)}};Balloon.prototype.getLoc=function(el,request){var region=YAHOO.util.Dom.getRegion(el);switch(request){case('y1'):return parseInt(region.top);case('y2'):return parseInt(region.bottom);case('x1'):return parseInt(region.left);case('x2'):return parseInt(region.right);case('width'):return(parseInt(region.right)-parseInt(region.left));case('height'):return(parseInt(region.bottom)-parseInt(region.top));case('region'):return region}return region};Balloon.prototype.parseIntAll=function(){this.padding=parseInt(this.padding);this.shadow=parseInt(this.shadow);this.stemHeight=parseInt(this.stemHeight);this.stemOverlap=parseInt(this.stemOverlap);this.vOffset=parseInt(this.vOffset);this.delayTime=parseInt(this.delayTime);this.width=parseInt(this.width);this.maxWidth=parseInt(this.maxWidth);this.minWidth=parseInt(this.minWidth);this.fadeIn=parseInt(this.fadeIn)||1000};Balloon.prototype.showHide=function(visible){var self=currentBalloonClass||new Balloon;if(self.isOldIE()){var balloonContents=document.getElementById('contentWrapper');if(!visible&&balloonContents){var balloonSelects=balloonContents.getElementsByTagName('select');var myHash=new Object();for(var i=0;i<balloonSelects.length;i++){var id=balloonSelects[i].id||balloonSelects[i].name;myHash[id]=1}balloonInvisibleSelects=new Array();var allSelects=document.getElementsByTagName('select');for(var i=0;i<allSelects.length;i++){var id=allSelects[i].id||allSelects[i].name;if(self.isOverlap(allSelects[i],self.activeBalloon)&&!myHash[id]){balloonInvisibleSelects.push(allSelects[i]);self.setStyle(allSelects[i],'visibility','hidden')}}}else if(balloonInvisibleSelects){for(var i=0;i<balloonInvisibleSelects.length;i++){var id=balloonInvisibleSelects[i].id||balloonInvisibleSelects[i].name;self.setStyle(balloonInvisibleSelects[i],'visibility','visible')}balloonInvisibleSelects=null}}if(self.hide){var display=visible?'inline':'none';for(var n=0;n<self.hide.length;n++){if(self.isOverlap(self.activeBalloon,self.hide[n])){self.setStyle(self.hide[n],'display',display)}}}};Balloon.prototype.isOverlap=function(el1,el2){if(!el1||!el2)return false;var R1=this.getLoc(el1,'region');var R2=this.getLoc(el2,'region');if(!R1||!R2)return false;var intersect=R1.intersect(R2);if(intersect){intersect=new Array((intersect.right-intersect.left),(intersect.bottom-intersect.top))}return intersect};Balloon.prototype.isSameElement=function(el1,el2){if(!el1||!el2)return false;var R1=this.getLoc(el1,'region');var R2=this.getLoc(el2,'region');var same=R1.contains(R2)&&R2.contains(R1);return same?true:false};Balloon.prototype.getAndCheckContents=function(caption){this.currentHelpText=this.getContents(caption);this.loadedFromElement=false;return this.currentHelpText};Balloon.prototype.getContents=function(section){if(!this.helpUrl&&!this.activeUrl)return section;if(this.loadedFromElement)return section;var url=this.activeUrl||this.helpUrl;url+=this.activeUrl?'':'?section='+section;this.activeUrl=null;var ajax;if(window.XMLHttpRequest){ajax=new XMLHttpRequest()}else{ajax=new ActiveXObject("Microsoft.XMLHTTP")}if(ajax){ajax.open("GET",url,false);ajax.onreadystatechange=function(){};try{ajax.send(null)}catch(e){}var txt=this.escapeHTML?escape(ajax.responseText):ajax.responseText;return txt||section}else{return section}};Balloon.prototype.isIE=function(){return document.all&&!window.opera};Balloon.prototype.isOldIE=function(){if(navigator.appVersion.indexOf("MSIE")==-1)return false;var temp=navigator.appVersion.split("MSIE");return parseFloat(temp[1])<7};Balloon.prototype.isKonqueror=function(){return navigator.userAgent.toLowerCase().indexOf('konqueror')!=-1};Balloon.prototype.isChrome=function(){return navigator.userAgent.toLowerCase().indexOf('chrome')>-1};
351   -if(!euEnv)var euEnv=new Array();euEnv.Kost=new Array();euEnv.Kost.num=0;euEnv.Kost.next=function(){return this.num++}euEnv.euDockArray=new Array();euEnv.refreshTime=35;euEnv.exeThread=true;euEnv.exeThreadWhiteLoop=0;euEnv.x=0;euEnv.y=0;euEnv.mouseMoved=false;var euUP=1;var euDOWN=2;var euLEFT=3;var euRIGHT=4;var euICON=5;var euMOUSE=6;var euSCREEN=7;var euOBJECT=8;var euABSOLUTE=9;var euRELATIVE=10;var euHORIZONTAL=11;var euVERTICAL=12;var euCENTER=13;var euTRANSPARENT=14;var euFIXED=15;var euOPAQUE=16;function euIdObjTop(euObj){var ret=euObj.offsetTop;while((euObj=euObj.offsetParent)!=null)ret+=euObj.offsetTop;return ret};function euIdObjLeft(euObj){var ret=euObj.offsetLeft;while((euObj=euObj.offsetParent)!=null)ret+=euObj.offsetLeft;return ret};function isEuInside(euObj,x,y){var euTop=euIdObjTop(euObj);var euLeft=euIdObjLeft(euObj);return((euTop<=y&&(euTop+euObj.offsetHeight)>=y)&&(euLeft<=x&&(euLeft+euObj.offsetWidth)>=x))};function euDimensioni(){if(typeof(window.innerWidth)=='number'){euEnv.euFrameWidth=window.innerWidth-16;euEnv.euFrameHeight=window.innerHeight}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){euEnv.euFrameWidth=document.documentElement.clientWidth-16;euEnv.euFrameHeight=document.documentElement.clientHeight}else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){euEnv.euFrameWidth=document.body.clientWidth;euEnv.euFrameHeight=document.body.clientHeight}};function offsEut(){euEnv.euScrOfY=0;euEnv.euScrOfX=0;if(typeof(window.pageYoffsEut)=='number'){euEnv.euScrOfY=window.pageYoffsEut;euEnv.euScrOfX=window.pageXoffsEut}else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){euEnv.euScrOfY=document.body.scrollTop;euEnv.euScrOfX=document.body.scrollLeft}else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){euEnv.euScrOfY=document.documentElement.scrollTop;euEnv.euScrOfX=document.documentElement.scrollLeft}};function euKostFunc30(x){return 0.3};function euKostFunc100(x){return 1};function euLinear(x){return x};function euLinear30(x){var r=1*(x+(1-x)*0.3);return r};function euLinear20(x){return x+(1-x)*0.2};function euExp30(x){return euLinear30(x*x*x)};function euLinear50(x){return x+(1-x)*0.5};function euHarmonic(x){return euLinear30((1-Math.cos(Math.PI*x))/2)};function euSemiHarmonic(x){return euLinear30(Math.cos(Math.PI*(1-x)/2))};function euDock(){this.id='euDock_'+euEnv.Kost.next();var novoel=document.createElement("div");novoel.style.position="absolute";novoel.innerHTML="<div id='"+this.id+"_bar' style='z-index:1000;position:absolute;border:0px solid black;'></div>"+"<div onMouseOut='euEnv.euDockArray."+this.id+".mouseOut();' onMouseOver='euEnv.euDockArray."+this.id+".mouseOver();' id='"+this.id+"' style='z-index:1000;position:absolute;border:0px solid black; cursor: pointer;'></div>";document.body.appendChild(novoel);this.div=document.getElementById(this.id);this.divBar=document.getElementById(this.id+"_bar");this.iconsArray=new Array();this.isInside=false;euEnv.euDockArray[this.id]=this;this.bar=null;this.mouseX=0;this.mouseY=0;this.centerPosX=0;this.centerPosY=0;this.offset=0;this.iconOffset=0;this.venusHillSize=3;this.venusHillTrans=euLinear;this.position=euUP;this.align=euSCREEN;this.objectAlign=euDOWN;this.idObjectHook;this.animaition=euICON;this.animFading=euABSOLUTE;this.setIconsOffset=function(offset){this.iconOffset=offset};this.setAnimation=function(anim,size){this.animaition=anim;this.venusHillSize=size};this.setPointAlign=function(x,y,pos){this.offset=0;this.align=euABSOLUTE;this.position=pos;this.setCenterPos(x,y)}this.setObjectAlign=function(idObj,align,offset,pos){this.offset=offset;this.align=euOBJECT;this.objectAlign=align;this.position=pos;this.idObjectHook=document.getElementById(idObj);this.setObjectCoord()};this.setObjectCoord=function(){if(this.objectAlign==euDOWN)this.setCenterPos(euIdObjLeft(this.idObjectHook)+(this.idObjectHook.offsetWidth/2),euIdObjTop(this.idObjectHook)+this.idObjectHook.offsetHeight+this.offset);else if(this.objectAlign==euUP)this.setCenterPos(euIdObjLeft(this.idObjectHook)+(this.idObjectHook.offsetWidth/2),euIdObjTop(this.idObjectHook)-this.offset);else if(this.objectAlign==euLEFT)this.setCenterPos(euIdObjLeft(this.idObjectHook)-this.offset,euIdObjTop(this.idObjectHook)+(this.idObjectHook.offsetHeight/2));else if(this.objectAlign==euRIGHT)this.setCenterPos(euIdObjLeft(this.idObjectHook)+this.idObjectHook.offsetWidth+this.offset,euIdObjTop(this.idObjectHook)+(this.idObjectHook.offsetHeight/2));else if(this.objectAlign==euCENTER){if(this.position==euUP||this.position==euDOWN||this.position==euHORIZONTAL)this.setCenterPos(euIdObjLeft(this.idObjectHook)+(this.idObjectHook.offsetWidth/2),euIdObjTop(this.idObjectHook)+(this.idObjectHook.offsetHeight/2)-this.offset);else this.setCenterPos(euIdObjLeft(this.idObjectHook)+(this.idObjectHook.offsetWidth/2)+this.offset,euIdObjTop(this.idObjectHook)+(this.idObjectHook.offsetHeight/2))}};this.setScreenAlign=function(align,offset){this.offset=offset;this.align=euSCREEN;if(align==euUP)this.position=euDOWN;else if(align==euDOWN)this.position=euUP;else if(align==euLEFT)this.position=euRIGHT;else if(align==euRIGHT)this.position=euLEFT;this.setScreenCoord()};this.setScreenCoord=function(){euDimensioni();offsEut();if(this.position==euDOWN)this.setCenterPos(euEnv.euScrOfX+euEnv.euFrameWidth/2,euEnv.euScrOfY+this.offset);else if(this.position==euUP)this.setCenterPos(euEnv.euScrOfX+euEnv.euFrameWidth/2,euEnv.euScrOfY+euEnv.euFrameHeight-this.offset);else if(this.position==euRIGHT)this.setCenterPos(euEnv.euScrOfX+this.offset,euEnv.euScrOfY+euEnv.euFrameHeight/2);else if(this.position==euLEFT)this.setCenterPos(euEnv.euScrOfX+euEnv.euFrameWidth-this.offset,euEnv.euScrOfY+euEnv.euFrameHeight/2)};this.refreshDiv=function(){if(this.position==euDOWN){this.setPos(this.centerPosX-this.getWidth()/2,this.centerPosY+this.iconOffset)}else if(this.position==euUP){this.setPos(this.centerPosX-this.getWidth()/2,this.centerPosY-this.getHeight()-this.iconOffset)}else if(this.position==euRIGHT){this.setPos(this.centerPosX+this.iconOffset,this.centerPosY-this.getHeight()/2)}else if(this.position==euLEFT){this.setPos(this.centerPosX-this.getWidth()-this.iconOffset,this.centerPosY-this.getHeight()/2)}else if(this.position==euHORIZONTAL){this.setPos(this.centerPosX-this.getWidth()/2,this.centerPosY-this.getHeight()/2+this.iconOffset)}else if(this.position==euVERTICAL){this.setPos(this.centerPosX-this.getWidth()/2+this.iconOffset,this.centerPosY-this.getHeight()/2)}if(this.bar){if(this.position==euDOWN){this.setBarPos(this.centerPosX-this.getWidth()/2,this.centerPosY)}else if(this.position==euUP){this.setBarPos(this.centerPosX-this.getWidth()/2,this.centerPosY-this.bar.getSize())}else if(this.position==euRIGHT){this.setBarPos(this.centerPosX,this.centerPosY-this.getHeight()/2)}else if(this.position==euLEFT){this.setBarPos(this.centerPosX-this.bar.getSize(),this.centerPosY-this.getHeight()/2)}else if(this.position==euHORIZONTAL){this.setBarPos(this.centerPosX-this.getWidth()/2,this.centerPosY-this.bar.getSize()/2)}else if(this.position==euVERTICAL){this.setBarPos(this.centerPosX-this.bar.getSize()/2,this.centerPosY-this.getHeight()/2)}}}this.riposition=function(){if(this.align==euSCREEN)this.setScreenCoord();else if(this.align==euOBJECT)this.setObjectCoord()};this.setCenterPos=function(x,y){this.centerPosX=x;this.centerPosY=y;this.refreshDiv()};this.setPos=function(x,y){this.setPosX(x);this.setPosY(y)};this.setBarPos=function(x,y){this.setBarPosX(x);this.setBarPosY(y)};this.setDim=function(w,h){this.setWidth(w);this.setHeight(h)};this.setBarPosX=function(x){document.getElementById(this.id+"_bar").style.left=x+'px'};this.setBarPosY=function(y){document.getElementById(this.id+"_bar").style.top=y+'px'};this.getPosX=function(){return document.getElementById(this.id).style.left.replace(/[^0-9]/g,"")};this.setPosX=function(x){document.getElementById(this.id).style.left=x+'px'};this.getPosY=function(){return document.getElementById(this.id).style.top.replace(/[^0-9]/g,"")};this.setPosY=function(y){document.getElementById(this.id).style.top=y+'px'};this.getWidth=function(){return document.getElementById(this.id).style.width.replace(/[^0-9]/g,"")};this.setWidth=function(w){document.getElementById(this.id).style.width=Math.round(w)+'px'};this.getHeight=function(){return document.getElementById(this.id).style.height.replace(/[^0-9]/g,"")};this.setHeight=function(h){document.getElementById(this.id).style.height=Math.round(h)+'px'};this.getVenusWidth=function(){return this.venusHillSize*this.getWidth()};this.getVenusHeight=function(){return this.venusHillSize*this.getHeight()};this.getMouseRelativeX=function(){return this.mouseX-euIdObjLeft(this.div)};this.getMouseRelativeY=function(){return this.mouseY-euIdObjTop(this.div)};this.updateDims=function(){var bakWidth=0;var bakHeight=0;for(var i in this.iconsArray)if(this.iconsArray[i].id){if(this.position==euUP||this.position==euDOWN||this.position==euHORIZONTAL){bakWidth+=this.iconsArray[i].getWidth();bakHeight=(this.iconsArray[i].getHeight()>bakHeight)?this.iconsArray[i].getHeight():bakHeight;bakHeight=Math.round(bakHeight)}else{bakHeight+=this.iconsArray[i].getHeight();bakWidth=(this.iconsArray[i].getWidth()>bakWidth)?this.iconsArray[i].getWidth():bakWidth;bakWidth=Math.round(bakWidth)}}if(this.bar){if(this.position==euUP||this.position==euDOWN||this.position==euHORIZONTAL)this.bar.setProperties(bakWidth,this.position)else this.bar.setProperties(bakHeight,this.position)this.bar.refresh()}var posx=0;var posy=0;var updPosX=0;var updPosY=0;for(var i in this.iconsArray)if(this.iconsArray[i].id){if(this.position==euDOWN){updPosX=posx;updPosY=posy;posx+=this.iconsArray[i].getWidth()}else if(this.position==euUP){updPosX=posx;updPosY=bakHeight-this.iconsArray[i].getHeight();posx+=this.iconsArray[i].getWidth()}else if(this.position==euRIGHT){updPosX=posx;updPosY=posy;posy+=this.iconsArray[i].getHeight()}else if(this.position==euLEFT){updPosX=bakWidth-this.iconsArray[i].getWidth();updPosY=posy;posy+=this.iconsArray[i].getHeight()}else if(this.position==euHORIZONTAL){updPosX=posx;updPosY=(bakHeight-this.iconsArray[i].getHeight())/2;posx+=this.iconsArray[i].getWidth()}else if(this.position==euVERTICAL){updPosX=(bakWidth-this.iconsArray[i].getWidth())/2;updPosY=posy;posy+=this.iconsArray[i].getHeight()}this.iconsArray[i].setPos(updPosX,updPosY);this.iconsArray[i].refresh()}this.setDim(bakWidth,bakHeight);this.refreshDiv()};this.kernel=function(){if(this.isInside)return this.kernelMouseOver();else return this.kernelMouseOut()};this.kernelMouseOver=function(){var ret=false;var overI=-1;var mouseRelX=this.getMouseRelativeX();var mouseRelY=this.getMouseRelativeY();var mediana;var border;var frameTo;var venusWidth;var venusHeight;var overIcon;if(this.position==euUP||this.position==euDOWN||this.position==euHORIZONTAL){venusWidth=this.getVenusWidth();for(var i in this.iconsArray)if(this.iconsArray[i].id)if(this.iconsArray[i].isInsideX(mouseRelX)){overIcon=i;border=this.iconsArray[i].getWidth()/2;if(this.animaition==euICON){mouseRelX=this.iconsArray[i].posX+border;border=0}}for(var i in this.iconsArray)if(this.iconsArray[i].id){mediana=this.iconsArray[i].posX+this.iconsArray[i].getWidth()/2;if(Math.abs(mediana-mouseRelX)<=border)mediana=mouseRelX;else if(mediana<mouseRelX)mediana+=this.iconsArray[i].getWidth()/2;else if(mediana>mouseRelX)mediana-=this.iconsArray[i].getWidth()/2;if(this.animaition==euICON&&Math.abs(i-overIcon)<=this.venusHillSize)frameTo=this.venusHillTrans(1-Math.abs(i-overIcon)/this.venusHillSize);else if(this.animaition==euMOUSE&&Math.abs(mediana-mouseRelX)<=venusWidth)frameTo=this.venusHillTrans(1-Math.abs(mediana-mouseRelX)/venusWidth);else frameTo=0;if(frameTo==0||frameTo==1||Math.abs(frameTo-this.iconsArray[i].frame)>0.01)ret|=this.iconsArray[i].setFrameTo(frameTo);if(this.animFading==euABSOLUTE)if(this.iconsArray[i].isInsideX(mouseRelX))ret|=this.iconsArray[i].setFadingTo(1);else ret|=this.iconsArray[i].setFadingTo(0);else ret|=this.iconsArray[i].setFadingTo(frameTo)}}else{venusHeight=this.getVenusHeight();for(var i in this.iconsArray)if(this.iconsArray[i].id)if(this.iconsArray[i].isInsideY(mouseRelY)){overIcon=i;border=this.iconsArray[i].getHeight()/2;if(this.animaition==euICON){mouseRelY=this.iconsArray[i].posY+border;border=0}}for(var i in this.iconsArray)if(this.iconsArray[i].id){mediana=this.iconsArray[i].posY+this.iconsArray[i].getHeight()/2;if(Math.abs(mediana-mouseRelY)<=border)mediana=mouseRelY;else if(mediana<mouseRelY)mediana+=this.iconsArray[i].getHeight()/2;else if(mediana>mouseRelY)mediana-=this.iconsArray[i].getHeight()/2;if(this.animaition==euICON&&Math.abs(i-overIcon)<=this.venusHillSize)frameTo=this.venusHillTrans(1-Math.abs(i-overIcon)/this.venusHillSize);else if(this.animaition==euMOUSE&&Math.abs(mediana-mouseRelY)<=venusHeight)frameTo=this.venusHillTrans(1-Math.abs(mediana-mouseRelY)/venusHeight);else frameTo=0;if(frameTo==0||frameTo==1||Math.abs(frameTo-this.iconsArray[i].frame)>0.01)ret|=this.iconsArray[i].setFrameTo(frameTo);if(this.animFading==euABSOLUTE)if(this.iconsArray[i].isInsideY(mouseRelY))ret|=this.iconsArray[i].setFadingTo(1);else ret|=this.iconsArray[i].setFadingTo(0);else ret|=this.iconsArray[i].setFadingTo(frameTo)}}if(ret)this.updateDims();return ret};this.kernelMouseOut=function(){var ret=false;for(var i in this.iconsArray)if(this.iconsArray[i].id)ret|=this.iconsArray[i].setAllFrameTo(0);if(ret)this.updateDims();return ret};this.mouseOut=function(){this.isInside=false;euEnv.exeThreadWhiteLoop=5};this.mouseOver=function(){this.isInside=true;euEnv.exeThreadWhiteLoop=5};this.mouseMove=function(x,y){var inside=isEuInside(this.div,x,y);var ret=(this.mouseX!=x||this.mouseY!=y)&&inside;this.mouseX=x;this.mouseY=y;if(inside!=this.isInside){this.isInside=inside;ret=true}for(var i in this.iconsArray)if(this.iconsArray[i].id)ret|=this.iconsArray[i].isRunning();return ret};this.iconParams=new Array();this.setAllFrameStep=function(step){this.iconParams.frameStep=step;for(var i in this.iconsArray)if(this.iconsArray[i].id)this.iconsArray[i].frameStep=step};this.setAllZoomFunc=function(func){this.setAllZoomFuncW(func);this.setAllZoomFuncH(func)};this.setAllZoomFuncW=function(func){this.iconParams.zoomFuncW=func;for(var i in this.iconsArray)if(this.iconsArray[i].id)this.iconsArray[i].zoomFuncW=func};this.setAllZoomFuncH=function(func){this.iconParams.zoomFuncH=func;for(var i in this.iconsArray)if(this.iconsArray[i].id)this.iconsArray[i].zoomFuncH=func};this.setBar=function(args){var id='euDock_bar_'+euEnv.Kost.next();euEnv.euDockArray[id]=new euDockBar(id,this);euEnv.euDockArray[id].setElements(args);this.bar=euEnv.euDockArray[id];return euEnv.euDockArray[id]};this.addIcon=function(args,params){var id=params.id;var id='euDock_icon_'+euEnv.Kost.next();euEnv.euDockArray[id]=new euDockIcon(id,this);euEnv.euDockArray[id].addElement(args);this.iconsArray.push(euEnv.euDockArray[id]);for(i in this.iconParams)euEnv.euDockArray[id][i]=this.iconParams[i];for(i in params)euEnv.euDockArray[id][i]=params[i];return euEnv.euDockArray[id]};this.delIcon=function(elem){euEnv.euDockArray.splice(elem);euEnv.euDockArray[elem.id]=0;for(var i in this.iconsArray)if(this.iconsArray[i]==elem)this.iconsArray.splice(i,1);elem.destroy();elem=null;this.updateDims()}};function euDockIcon(id,dock){this.id=id;this.parentDock=dock;this.elementsArray;this.zoomFuncW=euLinear30;this.zoomFuncH=euLinear30;this.posX=0;this.posY=0;this.width=0;this.height=0;this.frame=0;this.frameStep=0.5;this.fadingFrame=0;this.fadingStep=1;this.fadingType=euTRANSPARENT;this.loaded=false;this.runningFrame=false;this.runningFading=false;this.updateDims=function(){if(!this.loaded)return;for(var i=0;i<this.elementsArray.length;i++)this.elementsArray[i].setProperties(this.posX,this.posY,this.getWidth(),this.getHeight())};this.updateFading=function(){if(!this.loaded)return;var stato=this.fadingFrame*(this.elementsArray.length-1);var prev=Math.floor(stato);var next=Math.ceil(stato);var fading=0;for(var i=0;i<this.elementsArray.length;i++){if(this.fadingType==euFIXED){if(i==next)fading=100-100*(i-stato);else if(i<next)fading=100;else fading=0}else{if(i==next)fading=100-100*(i-stato);else if(i==prev){if(this.fadingType==euTRANSPARENT)fading=100-100*(stato-i);else fading=100}else fading=0}this.elementsArray[i].setFading(fading)}};this.refresh=function(){this.updateDims();this.updateFading()};this.isAbsoluteInside=function(x,y){x-=this.getAbsolutePosX();y-=this.getAbsolutePosY();return x>0&&y>0&&x<this.getWidth()&&y<this.getHeight()};this.isInside=function(x,y){return this.isInsideX(x)&&this.isInsideY(y)};this.isInsideX=function(x){return(this.loaded&&(this.posX<=x)&&((this.posX+this.getWidth())>=x))};this.isInsideY=function(y){return(this.loaded&&(this.posY<=y)&&((this.posY+this.getHeight())>=y))};this.retrieveLoadingDims=function(elem,num){if(elem.onLoadPrev)elem.onLoadPrev();if(num==0&&!this.loaded)this.setDim(elem.getWidth(),elem.getHeight());elem.loaded=true;var ret=true;for(var i in this.elementsArray)if(this.elementsArray[i].id)ret&=this.elementsArray[i].loaded this.loaded=ret;if(this.loaded){this.parentDock.updateDims();for(var i in this.elementsArray)if(this.elementsArray[i].id)this.elementsArray[i].show()}if(elem.onLoadNext)elem.onLoadNext()};this.setPos=function(x,y){this.posX=x;this.posY=y};this.setDim=function(w,h){if(this.width==0)this.width=w;if(this.height==0)this.height=h};this.getAbsolutePosX=function(){return euIdObjLeft(this.parentDock.div)+this.posX};this.getAbsolutePosY=function(){return euIdObjTop(this.parentDock.div)+this.posY};this.setPosX=function(x){this.posX=x};this.setPosY=function(y){this.posY=y};this.getWidth=function(){if(!this.loaded)return 0;var calc=this.width*this.zoomFuncW(this.frame);if(calc<38){calc=38}return calc};this.getHeight=function(){if(!this.loaded)return 0;var calc=this.height*this.zoomFuncH(this.frame);if(calc<38){calc=38}return calc};this.isRunning=function(){return this.runningFrame||this.runningFading};this.setAllFrameTo=function(to){this.setFadingTo(to);this.setFrameTo(to);return this.isRunning()};this.setFadingTo=function(fadingTo){if(this.fadingFrame==fadingTo)this.runningFading=false;else{if(this.fadingFrame>fadingTo)this.fadingFrame-=this.fadingStep;else this.fadingFrame+=this.fadingStep;this.runningFading=true;if(Math.abs(this.fadingFrame-fadingTo)<this.fadingStep)this.fadingFrame=fadingTo;if(this.fadingFrame<0)this.fadingFrame=0;if(this.fadingFrame>1)this.fadingFrame=1}return this.runningFading};this.setFrameTo=function(frameTo){if(this.frame==frameTo)this.runningFrame=false;else{this.runningFrame=true;this.frame+=(frameTo-this.frame)*this.frameStep;if(Math.abs(this.frame-frameTo)<0.01)this.frame=frameTo;if(this.frame<0)this.frame=0;if(this.frame>1)this.frame=1}return this.runningFrame};this.addElement=function(args){if(typeof(args)!="undefined"&&args!=null){this.elementsArray=new Array();this.fadingStep=0.5/args.length;for(var i=0;i<args.length;i++)for(var ii in args[i]){var id="euDock_"+ii+"_"+euEnv.Kost.next();euEnv.euDockArray[id]=new window[ii](id,args[i][ii],this.parentDock.div,"euEnv.euDockArray."+this.id+".retrieveLoadingDims(euEnv.euDockArray."+id+","+i+");");this.elementsArray.push(euEnv.euDockArray[id]);euEnv.euDockArray[id].loaded=false}}};this.destroy=function(){for(var i in this.elementsArray)if(this.elementsArray[i].id){euEnv.euDockArray[this.elementsArray[i].id]=0;euEnv.euDockArray.splice(this.elementsArray[i],1);this.elementsArray[i].destroy()}this.elementsArray.splice(0,this.elementsArray.length)};this.mouseClick=function(x,y){if(this.isAbsoluteInside(x,y)){if(this.link)if(this.target){if(top.frames[this.target])top.frames[this.target].location.href=this.link;else top.frames[this.target]=window.open(this.link,this.target,"")}else document.location.href=this.link;else if(this.mouseInsideClick)this.mouseInsideClick(x,y,this.id)}}};function euDockBar(id,dock){this.id=id;this.parentDock=dock;this.elementsArray=new Array();this.len=0;this.align=euUP;this.loaded=false;this.getSize=function(){if(!this.loaded)return 0;if(this.align==euUP||this.align==euDOWN||this.align==euHORIZONTAL)return this.elementsArray.left.getHeight();else return this.elementsArray.top.getWidth()};this.refresh=function(){if(!this.loaded)return;if(this.align==euUP||this.align==euDOWN||this.align==euHORIZONTAL){this.elementsArray.left.setPos(-this.elementsArray.left.getWidth(),0);this.elementsArray.horizontal.setProperties(0,0,Math.round(this.len),this.getSize());this.elementsArray.right.setPos(Math.round(this.len),0);this.elementsArray.left.show();this.elementsArray.horizontal.show();this.elementsArray.right.show();if(this.elementsArray.top)this.elementsArray.top.hide();if(this.elementsArray.bottom)this.elementsArray.bottom.hide();if(this.elementsArray.vertical){this.elementsArray.vertical.setProperties(0,0,0,0);this.elementsArray.vertical.hide()}}else{this.elementsArray.top.setPos(0,-this.elementsArray.top.getHeight());this.elementsArray.vertical.setProperties(0,0,this.getSize(),Math.round(this.len));this.elementsArray.bottom.setPos(0,Math.round(this.len));this.elementsArray.top.show();this.elementsArray.vertical.show();this.elementsArray.bottom.show();if(this.elementsArray.left)this.elementsArray.left.hide();if(this.elementsArray.right)this.elementsArray.right.hide();if(this.elementsArray.horizontal){this.elementsArray.horizontal.setProperties(0,0,0,0);this.elementsArray.horizontal.hide()}}};this.setProperties=function(len,align){this.len=len+1;this.align=align;this.refresh()};this.retrieveLoadingDims=function(elem){if(elem.onLoadPrev)elem.onLoadPrev();elem.loaded=true;var ret=true;for(var i in this.elementsArray)if(this.elementsArray[i].id)ret&=this.elementsArray[i].loaded this.loaded=ret;if(this.loaded){this.parentDock.updateDims();for(var i in this.elementsArray)if(this.elementsArray[i].id)this.elementsArray[i].show()}if(elem.onLoadNext)elem.onLoadNext()};this.setElements=function(args){if(typeof(args)!="undefined"&&args!=null){for(var i in args)for(var ii in args[i]){var id="euDock_"+ii+"_"+euEnv.Kost.next();euEnv.euDockArray[id]=new window[ii](id,args[i][ii],this.parentDock.divBar,"euEnv.euDockArray."+this.id+".retrieveLoadingDims(euEnv.euDockArray."+id+");");this.elementsArray[i]=euEnv.euDockArray[id];euEnv.euDockArray[id].loaded=false}}}};function euThread(){euDimensioni();offsEut();euEnv.timeout=window.setTimeout("euThread();",euEnv.refreshTime);euEnv.exeThread=false;if(euEnv.mouseMoved)for(var i in euEnv.euDockArray)if(euEnv.euDockArray[i].mouseMove)euEnv.exeThread|=euEnv.euDockArray[i].mouseMove(euEnv.euScrOfX+euEnv.x,euEnv.euScrOfY+euEnv.y);euEnv.mouseMoved=false;if(euEnv.exeThread)euEnv.exeThreadWhiteLoop=5;if(euEnv.exeThreadWhiteLoop>0)euKernel();for(var i in euEnv.euDockArray)if(euEnv.euDockArray[i].riposition)euEnv.euDockArray[i].riposition()};function euKernel(){euEnv.exeThread=false;for(var i in euEnv.euDockArray)if(euEnv.euDockArray[i].kernel)euEnv.exeThread|=euEnv.euDockArray[i].kernel();if(euEnv.exeThread)euEnv.exeThreadWhiteLoop=5;else euEnv.exeThreadWhiteLoop--};function on_MouseMove(e){if(!e)var e=window.event;euEnv.x=e.clientX;euEnv.y=e.clientY;euEnv.mouseMoved=true;if(euEnv.onmousemoveBK)return euEnv.onmousemoveBK(e);return true};function on_MouseDown(e){if(!e)var e=window.event;for(var i in euEnv.euDockArray)if(euEnv.euDockArray[i].mouseDown)euEnv.exeThread|=euEnv.euDockArray[i].mouseDown(euEnv.euScrOfX+e.clientX,euEnv.euScrOfY+e.clientY);if(euEnv.onmousedownBK)return euEnv.onmousedownBK(e);return true};function on_MouseUp(e){if(!e)var e=window.event;for(var i in euEnv.euDockArray)if(euEnv.euDockArray[i].mouseUp)euEnv.exeThread|=euEnv.euDockArray[i].mouseUp(euEnv.euScrOfX+e.clientX,euEnv.euScrOfY+e.clientY);if(euEnv.onmouseupBK)return euEnv.onmouseupBK(e);return true};function on_MouseClick(e){if(!e)var e=window.event;for(var i in euEnv.euDockArray)if(euEnv.euDockArray[i].mouseClick)euEnv.exeThread|=euEnv.euDockArray[i].mouseClick(euEnv.euScrOfX+e.clientX,euEnv.euScrOfY+e.clientY);if(euEnv.onclickBK)return euEnv.onclickBK(e);return true};if(document.onmousemove)euEnv.onmousemoveBK=document.onmousemove;document.onmousemove=on_MouseMove;if(document.onmousedown)euEnv.onmousedownBK=document.onmousedown;document.onmousedown=on_MouseDown;if(document.onmouseup)euEnv.onmouseupBK=document.onmouseup;document.onmouseup=on_MouseUp;if(document.onclick)euEnv.onclickBK=document.onclick;document.onclick=on_MouseClick;euDimensioni();offsEut();euThread();
352   -function euPreloadImage(a){var d=document;if(d.images){if(!d.p)d.p=new Array();d.p.push(new Image());d.p[d.p.length-1].src=a}};if(!euEnv.imageBasePath)euEnv.imageBasePath="./";function euImage(id,args,container,onLoadFunc){if(!args.PngObjIE)args.PngObjIE=euImageIE_PNG;if(typeof(window.innerWidth)!='number'&&args.image.toLowerCase().indexOf("png")!=-1)return new args.PngObjIE(id,args,container,onLoadFunc);this.id=id;this.container=container;euPreloadImage(args.image);this.setProperties=function(x,y,w,h){this.setPos(x,y);this.setDim(w,h)};this.setPos=function(x,y){this.setPosX(x);this.setPosY(y)};this.setDim=function(w,h){this.setWidth(w);this.setHeight(h)};this.getPosX=function(){return document.getElementById(this.id).style.left.replace(/[^0-9]/g,"")};this.setPosX=function(x){document.getElementById(this.id).style.left=x+'px'};this.getPosY=function(){return document.getElementById(this.id).style.top.replace(/[^0-9]/g,"")};this.setPosY=function(y){document.getElementById(this.id).style.top=y+'px'};this.getWidth=function(){return document.getElementById(this.id).width};this.setWidth=function(w){document.getElementById(this.id).width=Math.round(w)};this.getHeight=function(){return document.getElementById(this.id).height};this.setHeight=function(h){document.getElementById(this.id).height=Math.round(h)};this.hide=function(){document.getElementById(this.id).style.visibility='hidden'};this.show=function(){document.getElementById(this.id).style.visibility='visible'};this.setFading=function(fad){fad=Math.round(fad);if(fad<0)fad=0;if(fad>100)fad=100;document.getElementById(this.id).style.opacity=(fad/100);document.getElementById(this.id).style.filter="alpha(opacity="+(fad)+");"};this.container.innerHTML+="<img onLoad='"+onLoadFunc+";' id='"+this.id+"' src='"+args.image+"' style='position:absolute;visibility:hidden;'>";this.destroy=function(){this.container.removeChild(document.getElementById(this.id))}};function euImageIE_PNG(id,args,container,onLoadFunc){this.id=id;this.container=container;euPreloadImage(args.image);this.setProperties=function(x,y,w,h){this.setPos(x,y);this.setDim(w,h)};this.setPos=function(x,y){this.setPosX(x);this.setPosY(y)};this.setDim=function(w,h){this.setWidth(w);this.setHeight(h)};this.getPosX=function(){return document.getElementById(this.id).style.left.replace(/[^0-9]/g,"")};this.setPosX=function(x){document.getElementById(this.id).style.left=x+'px'};this.getPosY=function(){return document.getElementById(this.id).style.top.replace(/[^0-9]/g,"")};this.setPosY=function(y){document.getElementById(this.id).style.top=y+'px'};this.getWidth=function(){if(!this.width)return 0;return this.width};this.setWidth=function(w){if(!this.width)return;this.width=Math.round(w);document.getElementById(this.id).style.width=Math.round(w)+'px';document.getElementById(this.id+"_IMG").style.width=Math.round(w)+'px'};this.getHeight=function(){if(!this.height)return 0;return this.height};this.setHeight=function(h){if(!this.height)return;this.height=Math.round(h);document.getElementById(this.id).style.height=Math.round(h)+'px';document.getElementById(this.id+"_IMG").style.height=Math.round(h)+'px'};this.onLoadPrev=function(){if(this.width&&this.height)return;this.width=document.getElementById(this.id+"_IMG_BAK").width;this.height=document.getElementById(this.id+"_IMG_BAK").height;document.getElementById(this.id+"_IMG_BAK").width=0;document.getElementById(this.id+"_IMG_BAK").height=0;this.setDim(this.width,this.height)};this.hide=function(){document.getElementById(this.id).style.visibility='hidden'};this.show=function(){document.getElementById(this.id).style.visibility='visible';if(this.width&&this.height)this.setDim(this.width,this.height)};this.setFading=function(fad){fad=Math.round(fad);if(fad<0)fad=0;if(fad>100)fad=100;document.getElementById(this.id).style.opacity=(fad/100);document.getElementById(this.id).style.filter="alpha(opacity="+(fad)+");"};this.container.innerHTML+="<div id='"+this.id+"' style='position:absolute;'></div>";document.getElementById(this.id).innerHTML="<img src='"+euEnv.imageBasePath+"blank.gif' id='"+this.id+"_IMG' style=\"top:0px;left:0px;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+args.image+"',sizingMethod='scale');position:absolute;\">";this.container.innerHTML+="<img onLoad='"+onLoadFunc+";' id='"+this.id+"_IMG_BAK' src='"+args.image+"' style='visibility:hidden;position:absolute;'>";this.destroy=function(){this.container.removeChild(document.getElementById(this.id));this.container.removeChild(document.getElementById(this.id+"_IMG_BAK"))}};function euImageNoFadingIE_PNG(id,args,container,onLoadFunc){this.id=id;this.container=container;euPreloadImage(args.image);this.setProperties=function(x,y,w,h){this.setPos(x,y);this.setDim(w,h)};this.setPos=function(x,y){this.setPosX(x);this.setPosY(y)};this.setDim=function(w,h){this.setWidth(w);this.setHeight(h)};this.getPosX=function(){return document.getElementById(this.id).style.left.replace(/[^0-9]/g,"")};this.setPosX=function(x){document.getElementById(this.id).style.left=x+'px'};this.getPosY=function(){return document.getElementById(this.id).style.top.replace(/[^0-9]/g,"")};this.setPosY=function(y){document.getElementById(this.id).style.top=y+'px'};this.getWidth=function(){if(!this.width)return 0;return this.width};this.setWidth=function(w){if(!this.width)return;this.width=Math.round(w);document.getElementById(this.id).style.width=Math.round(w)+'px'};this.getHeight=function(){if(!this.height)return 0;return this.height};this.setHeight=function(h){if(!this.height)return;this.height=Math.round(h);document.getElementById(this.id).style.height=Math.round(h)+'px'};this.hide=function(){document.getElementById(this.id).style.visibility='hidden'};this.show=function(){document.getElementById(this.id).style.visibility='visible'};this.onLoadPrev=function(){if(this.width&&this.height)return;this.width=document.getElementById(this.id+"_IMG_BAK").width;this.height=document.getElementById(this.id+"_IMG_BAK").height;document.getElementById(this.id+"_IMG_BAK").width=0;document.getElementById(this.id+"_IMG_BAK").height=0;this.setDim(this.width,this.height)};this.setFading=function(fad){};this.container.innerHTML+="<img src='"+euEnv.imageBasePath+"blank.gif' id='"+this.id+"' style='position:absolute;visibility:hidden;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\""+args.image+"\",sizingMethod=\"scale\");' >";this.container.innerHTML+="<img onLoad='"+onLoadFunc+";' id='"+this.id+"_IMG_BAK' src='"+args.image+"' style='position:absolute;visibility:hidden;'>";this.destroy=function(){this.container.removeChild(document.getElementById(this.id));this.container.removeChild(document.getElementById(this.id+"_IMG_BAK"))}};
353   -i3GEO={parametros:{mapexten:"",mapscale:"",mapres:"",pixelsize:"",mapfile:"",cgi:"",extentTotal:"",mapimagem:"",geoip:"",listavisual:"",utilizacgi:"",versaoms:"",versaomscompleta:"",mensagens:"",w:"",h:"",locsistemas:"",locidentifica:"",r:"",locmapas:"",celularef:"",kmlurl:"",mensageminicia:"",interfacePadrao:"geral.htm",embedLegenda:"nao",autenticadoopenid:"nao"},finaliza:"",temaAtivo:"",contadorAtualiza:0,cria:function(){var temp,i,tamanho;if(window.location.href.split("?")[1]){i3GEO.configura.sid=window.location.href.split("?")[1];if(i3GEO.configura.sid.split("#")[0]){i3GEO.configura.sid=i3GEO.configura.sid.split("#")[0]}}else{i3GEO.configura.sid=""}if(i3GEO.Interface.ALTTABLET!=""){if(i3GEO.util.detectaTablet()){return}}if(!i3GEO.configura.locaplic||i3GEO.configura.locaplic===""){i3GEO.util.localizai3GEO()}tamanho=i3GEO.calculaTamanho();i3GEO.Interface.cria(tamanho[0],tamanho[1]);if(tamanho[0]<550){i=$i(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml);if(i){i.style.display="none"}}},inicia:function(retorno){var montaMapa,mashup,tamanho;if(typeof("i3GEOmantemCompatibilidade")==='function'){i3GEOmantemCompatibilidade()}montaMapa=function(retorno){try{var tempo,titulo,temp,abreJM;if(retorno===""){alert("Ocorreu um erro no mapa - montaMapa");retorno={data:{erro:"erro"}}}if(retorno.data.erro){document.body.style.backgroundColor="white";document.body.innerHTML="<br>Para abrir o i3Geo utilize o link:<br><a href="+i3GEO.configura.locaplic+"/ms_criamapa.php >"+i3GEO.configura.locaplic+"/ms_criamapa.php</a>";return("linkquebrado")}else{if(retorno.data.variaveis){i3GEO.parametros=retorno.data.variaveis;i3GEO.parametros.mapscale=i3GEO.parametros.mapscale*1;i3GEO.parametros.mapres=i3GEO.parametros.mapres*1;i3GEO.parametros.pixelsize=i3GEO.parametros.pixelsize*1;i3GEO.parametros.w=i3GEO.parametros.w*1;i3GEO.parametros.h=i3GEO.parametros.h*1;i3GEO.arvoreDeCamadas.CAMADAS=retorno.data.temas;if(retorno.data.variaveis.navegacaoDir.toLowerCase()==="sim"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir=true}if(i3GEO.Interface.ATUAL==="padrao"){i3GEO.atualiza(retorno)}temp=0;if($i("contemFerramentas")){temp=temp+parseInt($i("contemFerramentas").style.width,10)}if($i("ferramentas")){temp=temp+parseInt($i("ferramentas").style.width,10)}if($i("mst")){$i("mst").style.width=i3GEO.parametros.w+temp+"px"}i3GEO.Interface.inicia()}else{alert("Erro. Impossivel criar o mapa "+retorno.data);return}if($i("ajuda")){i3GEO.ajuda.DIVAJUDA="ajuda"}abreJM="sim";if(i3GEO.util.pegaCookie("botoesAjuda")){abreJM=i3GEO.util.pegaCookie("botoesAjuda");i3GEO.barraDeBotoes.AJUDA=(abreJM==="sim")?true:false}abreJM="sim";if(i3GEO.util.pegaCookie("g_janelaMen")){abreJM=i3GEO.util.pegaCookie("g_janelaMen");i3GEO.configura.iniciaJanelaMensagens=(abreJM==="sim")?true:false}if(i3GEO.configura.iniciaJanelaMensagens===true){i3GEO.ajuda.abreJanela()}if(i3GEO.configura.liberaGuias.toLowerCase()==="sim"){i3GEO.guias.libera()}}if($i("mst")){$i("mst").style.visibility="visible"}}catch(e){alert(e)}};if(!$i("i3geo")){document.body.id="i3geo"}$i("i3geo").className="yui-skin-sam";if(i3GEO.configura.sid===""){mashup=function(retorno){i3GEO.configura.sid=retorno.data;i3GEO.inicia(retorno)};if(i3GEO.Interface.ATUAL!=="padrao"){i3GEO.configura.mashuppar+="&interface="+i3GEO.Interface.ATUAL}i3GEO.php.criamapa(mashup,i3GEO.configura.mashuppar)}else{if(i3GEO.parametros.w===""||i3GEO.parametros.h===""){tamanho=i3GEO.calculaTamanho();i3GEO.parametros.w=tamanho[0];i3GEO.parametros.h=tamanho[1]}i3GEO.php.inicia(montaMapa,i3GEO.configura.embedLegenda,i3GEO.parametros.w,i3GEO.parametros.h)}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.janela.fechaAguarde()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.janela.fechaAguarde()")}if(i3GEO.mapa.AUTORESIZE===true){i3GEO.mapa.ativaAutoResize()}eval(i3GEO.finaliza)},atualiza:function(retorno){var corpoMapa,erro,tempo,mapscale,mapexten,temp;if(i3GEO.contadorAtualiza>1){i3GEO.contadorAtualiza--;return}if(i3GEO.contadorAtualiza>0){i3GEO.contadorAtualiza--}i3GEO.contadorAtualiza++;corpoMapa=function(){if($i("ajaxCorpoMapa")){return}i3GEO.janela.abreAguarde("ajaxCorpoMapa",$trad("o1")+" atualizando...");i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem)};if(arguments.length===0){i3GEO.janela.fechaAguarde("ajaxCorpoMapa");corpoMapa.call();return}if(retorno===""){corpoMapa.call();return}if(!retorno.data){alert(retorno);i3GEO.mapa.recupera.inicia();return}try{if(retorno.data==="erro"){alert("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia();return}else if(retorno.data==="ok"||retorno.data===""){corpoMapa.call();return}}catch(e){}erro=function(){var legimagem,c;legimagem="";c=confirm("Ocorreu um erro, quer tentar novamente?");if(c){corpoMapa.call()}else{i3GEO.janela.fechaAguarde()}return};if(arguments.length===0||retorno===""||retorno.data.variaveis===undefined){erro.call();return}else{if(arguments.length===0){return}i3GEO.mapa.verifica(retorno);tempo="";if(i3GEO.desenho.richdraw){i3GEO.desenho.richdraw.clearWorkspace()}mapscale=i3GEO.parametros.mapscale;i3GEO.atualizaParametros(retorno.data.variaveis);if(retorno.data.variaveis.erro!==""){alert(retorno.data.variaveis.erro)}try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas);if(i3GEO.parametros.mapscale!==mapscale){i3GEO.arvoreDeCamadas.atualizaFarol(i3GEO.parametros.mapscale)}}catch(e){}i3GEO.arvoreDeCamadas.CAMADAS=retorno.data.temas;i3GEO.Interface.redesenha();if($i("i3GEOidentificalistaTemas")){g_tipoacao="identifica";g_operacao='identifica'}else{g_operacao=""}if($i("mensagemt")){$i("mensagemt").value=i3GEO.parametros.mapexten}i3GEO.eventos.navegaMapa();if(i3GEO.configura.entorno.toLowerCase()==="sim"){i3GEO.navega.entorno.geraURL();i3GEO.navega.entorno.ajustaPosicao()}i3GEO.ajuda.mostraJanela("Tempo de redesenho em segundos: "+retorno.data.variaveis.tempo,"");temp=i3GEO.arvoreDeCamadas.verificaAplicaExtensao();if(temp!==""){i3GEO.tema.zoom(temp)}}},calculaTamanho:function(){var diminuix,diminuiy,menos,novow,novoh,w,h,temp;diminuix=(navm)?i3GEO.configura.diminuixM:i3GEO.configura.diminuixN;diminuiy=(navm)?i3GEO.configura.diminuiyM:i3GEO.configura.diminuiyN;menos=0;temp=$i("contemFerramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("contemFerramentas").style.width,10)}temp=$i("ferramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("ferramentas").style.width,10)}if(i3GEO.configura.autotamanho===true){if(window.top===window.self){window.resizeTo(screen.availWidth,screen.availHeight);window.moveTo(0,0)}}novow=YAHOO.util.Dom.getDocumentWidth()-i3GEO.util.getScrollerWidth();novoh=YAHOO.util.Dom.getDocumentHeight();document.body.style.width=novow;document.body.style.height=novoh;w=novow-menos-diminuix;h=novoh-diminuiy;temp=$i("corpoMapa");if(temp){if(temp.style){if(temp.style.width){w=parseInt(temp.style.width,10);h=parseInt(temp.style.width,10);i3GEO.parametros.w=w}if(temp.style.height){h=parseInt(temp.style.height,10);i3GEO.parametros.h=h}}}temp=$i("contemImg");if(temp){temp.style.height=h+"px";temp.style.width=w+"px"}return[w,h]},reCalculaTamanho:function(){var diminuix,diminuiy,menos,novow,novoh,w,h,temp,temp1,antigoh=i3GEO.parametros.h,antigow=i3GEO.parametros.w;diminuix=(navm)?i3GEO.configura.diminuixM:i3GEO.configura.diminuixN;diminuiy=(navm)?i3GEO.configura.diminuiyM:i3GEO.configura.diminuiyN;menos=0;temp=$i("contemFerramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("contemFerramentas").style.width,10)}temp=$i("ferramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("ferramentas").style.width,10)}document.body.style.width="100%";temp=i3GEO.util.tamanhoBrowser();novow=temp[0];novoh=temp[1];temp=(antigoh-(novoh-diminuiy));temp1=(antigow-(novow-diminuix));document.body.style.height=novoh;w=novow-menos-diminuix;h=novoh-diminuiy;temp=$i(i3GEO.Interface.IDMAPA);if(temp){temp.style.height=h+"px";temp.style.width=w+"px";YAHOO.util.Event.addListener(temp,"click",YAHOO.util.Event.stopEvent);YAHOO.util.Event.addFocusListener(temp,YAHOO.util.Event.preventDefault)}temp=$i(i3GEO.Interface.IDCORPO);if(temp){temp.style.height=h+"px";temp.style.width=w+"px";YAHOO.util.Event.addListener(temp,"click",YAHOO.util.Event.stopEvent);YAHOO.util.Event.addFocusListener(temp,YAHOO.util.Event.preventDefault)}temp=$i("mst");if(temp){temp.style.width="100%"}i3GEO.parametros.w=w;i3GEO.parametros.h=h;i3GEO.php.mudatamanho(i3GEO.atualiza,h,w);switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);break;case"googleearth":i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);break;case"openlayers":i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);i3geoOL.updateSize();break}if(i3GEO.guias.TIPO==="sanfona"){i3GEO.guias.ALTURACORPOGUIAS=h-(antigoh-i3GEO.guias.ALTURACORPOGUIAS)}else{i3GEO.guias.ALTURACORPOGUIAS=h}return[w,h]},atualizaParametros:function(variaveis){i3GEO.parametros.mapscale=variaveis.mapscale*1;i3GEO.parametros.mapres=variaveis.mapres*1;i3GEO.parametros.pixelsize=variaveis.pixelsize*1;i3GEO.parametros.mapexten=variaveis.mapexten;i3GEO.parametros.mapimagem=variaveis.mapimagem;i3GEO.parametros.w=variaveis.w*1;i3GEO.parametros.h=variaveis.h*1;i3GEO.parametros.mappath=variaveis.mappath;i3GEO.parametros.mapurl=variaveis.mapurl}};i3GEOF=[];
354   -if(typeof(i3GEO)==='undefined'){i3GEO=[]}navm=false;navn=false;chro=navigator.userAgent.toLowerCase().indexOf('chrome')>-1;opera=navigator.userAgent.toLowerCase().indexOf('opera')>-1;if(navigator.appName.substring(0,1)==='N'){navn=true}if(navigator.appName.substring(0,1)==='M'){navm=true}if(opera===true){navn=true}g_operacao="";g_tipoacao="zoomli";$i=function(id){return document.getElementById(id)};Array.prototype.remove=function(s){try{var n=this.length,i;for(i=0;i<n;i++){if(this[i]==s){this.splice(i,1)}}}catch(e){}};i3GEO.util={PINS:[],BOXES:[],escapeURL:function(sUrl){var re;sUrl=escape(sUrl);re=new RegExp("%3F","g");sUrl=sUrl.replace(re,'?');re=new RegExp("%3D","g");sUrl=sUrl.replace(re,'=');re=new RegExp("%26","g");sUrl=sUrl.replace(re,'&');return sUrl},insereCookie:function(nome,valor){var exdate=new Date();exdate.setDate(exdate.getDate()+10);document.cookie=nome+"="+valor+"; expires="+exdate.toUTCString()+";path=/"},pegaCookie:function(nome){var cookies,i,fim;cookies=document.cookie;i=cookies.indexOf(nome);if(i===-1){return null}fim=cookies.indexOf(";",i);if(fim===-1){fim=cookies.length}return(unescape(cookies.substring(i,fim))).split("=")[1]},listaChaves:function(obj){var keys,key;keys=[];for(key in obj){if(obj[key]){keys.push(key)}}return keys},criaBotaoAplicar:function(nomeFuncao,titulo,classe,obj){try{if(typeof(tempoBotaoAplicar)!=='undefined'){clearTimeout(tempoBotaoAplicar)}}catch(e){}var executar=new Function(nomeFuncao+"().call;clearTimeout(tempoBotaoAplicar);"),novoel,xy;tempoBotaoAplicar=setTimeout(executar,(i3GEO.configura.tempoAplicar));if(arguments.length===1){titulo="Aplicar"}if(arguments.length===1||arguments.length===2){classe="i3geoBotaoAplicar"}if(!document.getElementById("i3geo_aplicar")){novoel=document.createElement("input");novoel.id='i3geo_aplicar';novoel.type='button';novoel.value=titulo;novoel.style.cursor="pointer";novoel.style.fontSize="10px";novoel.style.zIndex=15000;novoel.style.position="absolute";novoel.style.display="none";novoel.onmouseover=function(){this.style.display="block"};novoel.onmouseout=function(){this.style.display="none"};novoel.className=classe;document.body.appendChild(novoel)}else{novoel=document.getElementById("i3geo_aplicar")}novoel.onclick=function(){clearTimeout(i3GEO.parametros.tempo);i3GEO.parametros.tempo="";this.style.display='none';eval(nomeFuncao+"\(\)")};if(arguments.length===4){novoel.style.display="block";xy=YAHOO.util.Dom.getXY(obj);YAHOO.util.Dom.setXY(novoel,xy)}return(novoel)},arvore:function(titulo,onde,obj){var arvore,root,tempNode,currentIconMode,d,c,i,linha,conteudo,j,temaNode;if(!$i(onde)){return}try{arvore=new YAHOO.widget.TreeView(onde);root=arvore.getRoot();tempNode=new YAHOO.widget.TextNode('',root,false);tempNode.isLeaf=false;tempNode.enableHighlight=false}catch(e){}titulo="<table><tr><td><b>"+titulo+"</b></td><td></td></tr></table>";d={html:titulo};tempNode=new YAHOO.widget.HTMLNode(d,root,true,true);tempNode.enableHighlight=false;c=obj.propriedades.length;for(i=0,j=c;i<j;i++){linha=obj.propriedades[i];if(linha.url!==""){conteudo="<a href='#' onclick='"+linha.url+"'>"+$trad(linha.text)+"</a>"}else{conteudo=linha.text}d={html:conteudo};temaNode=new YAHOO.widget.HTMLNode(d,tempNode,false,true);temaNode.enableHighlight=false}arvore.collapseAll();arvore.draw()},removeAcentos:function(palavra){var re;re=/ã|á|à|â/gi;palavra=palavra.replace(re,"a");re=/é|ê/gi;palavra=palavra.replace(re,"e");re=/í/gi;palavra=palavra.replace(re,"i");re=/ó|õ|ô/gi;palavra=palavra.replace(re,"o");re=/ç/gi;palavra=palavra.replace(re,"c");re=/ú/gi;palavra=palavra.replace(re,"u");return(palavra)},protocolo:function(){var u=window.location.href;u=u.split(":");return(u[0])},pegaPosicaoObjeto:function(obj){if(obj){if(!obj.style){return[0,0]}var curleft=0,curtop=0,teste;if(obj){if(obj.offsetParent){do{curleft+=obj.offsetLeft-obj.scrollLeft;curtop+=obj.offsetTop-obj.scrollTop;obj=obj.offsetParent}while(obj)}}return[curleft+document.body.scrollLeft,curtop+document.body.scrollTop]}else{return[0,0]}},pegaElementoPai:function(e){var targ;if(!e){e=window.event}if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}if(targ.nodeType===3){targ=targ.parentNode}tparent=targ.parentNode;return(tparent)},mudaCursor:function(cursores,tipo,idobjeto,locaplic){var os=[],o,i,c,n,layers,cursor="",ext=".ff";try{if(navm){ext=".ie"}os.push(document.getElementById(idobjeto));if(i3GEO.Interface.ATUAL==="openlayers"){os=YAHOO.util.Dom.getElementsByClassName('olTileImage','img')}if(i3GEO.Interface.ATUAL==="googlemaps"){os=document.getElementById(idobjeto).firstChild;os=os.getElementsByTagName("div")}n=os.length;if(tipo==="default"||tipo==="pointer"||tipo==="crosshair"||tipo==="help"||tipo==="move"||tipo==="text"){cursor=tipo}else{c=eval("cursores."+tipo+ext)}if(c==="default"||c==="pointer"||c==="crosshair"||c==="help"||c==="move"||c==="text"){cursor=c}if(cursor===""){cursor="URL(\""+locaplic+eval("cursores."+tipo+ext)+"\"),auto"}for(i=0;i<n;i++){o=os[i];if(o){o.style.cursor=cursor}}}catch(e){}},criaBox:function(id){if(arguments.length===0){id="boxg"}if(!$i(id)){var novoel=document.createElement("div");novoel.id=id;novoel.style.zIndex=1;novoel.innerHTML='<font face="Arial" size=0></font>';document.body.appendChild(novoel);novoel.onmouseover=function(){novoel.style.display='none'};novoel.onmouseout=function(){novoel.style.display='block'};i3GEO.util.BOXES.push(id)}else{$i(id).style.display="block"}},escondeBox:function(){var l,i;l=i3GEO.util.BOXES.length;for(i=0;i<l;i++){if($i(i3GEO.util.BOXES[i])){$i(i3GEO.util.BOXES[i]).style.display="none"}}},criaPin:function(id,imagem,w,h,mouseover){if(arguments.length<1||id===""){id="boxpin"}if(arguments.length<2||imagem===""){imagem=i3GEO.configura.locaplic+'/imagens/marker.png'}if(arguments.length<3||w===""){w="21px"}if(arguments.length<4||h===""){h="25px"}if(!$i(id)){var novoel=document.createElement("img");novoel.id=id;novoel.style.zIndex=10000;novoel.style.position="absolute";novoel.style.width=w;novoel.style.height=h;novoel.src=imagem;if(id==="boxpin"){novoel.onmouseover=function(){$i("boxpin").style.display="none"}}else if(mouseover){novoel.onmouseover=mouseover}document.body.appendChild(novoel);i3GEO.util.PINS.push(id)}},posicionaImagemNoMapa:function(id){var i,mx,my;i=$i(id);mx=parseInt(i.style.width,10)/2;my=parseInt(i.style.height,10)/2;i.style.position="absolute";i.style.top=objposicaocursor.telay-my;i.style.left=objposicaocursor.telax-mx;return[objposicaocursor.telay-my,objposicaocursor.telax-mx]},escondePin:function(){var l,i;l=i3GEO.util.PINS.length;for(i=0;i<l;i++){if($i(i3GEO.util.PINS[i])){$i(i3GEO.util.PINS[i]).style.display="none"}}},$im:function(g){return i3GEO.configura.locaplic+"/imagens/visual/"+i3GEO.configura.visual+"/"+g},$inputText:function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome){if(arguments.length===6){nome=""}if(idPai!==""){if(larguraIdPai!==""){$i(idPai).style.width=larguraIdPai+"px"}$i(idPai).style.padding="3";$i(idPai).style.textAlign="center";$i(idPai).onmouseover=function(){this.className="digitarMouseover"};$i(idPai).onmouseout=function(){this.className=""}}return"<input tabindex='0' onmouseover='javascript:this.className=\"digitarOver\";' onmouseout='javascript:this.className=\"digitar\";' onclick='javascript:this.select();this.className=\"digitarMouseclick\";' id='"+idInput+"' title='"+titulo+"' type='text' size='"+digitos+"' class='digitar' value='"+valor+"' name='"+nome+"' />"},$inputTextMudaCor:function(obj){var n=obj.value.split(" ");obj.style.color="rgb("+n[0]+","+n[1]+","+n[2]+")"},$top:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelTop){document.getElementById(id).style.pixelTop=valor}else{document.getElementById(id).style.top=valor+"px"}}},$left:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelLeft){document.getElementById(id).style.pixelLeft=valor}else{document.getElementById(id).style.left=valor+"px"}}},insereMarca:{CONTAINER:[],cria:function(xi,yi,funcaoOnclick,container,texto,srci){if(!srci){srci=i3GEO.configura.locaplic+"/imagens/dot2.gif"}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereMarca(texto,xi,yi,container);return}try{var novoel,i,novoimg,temp;if(i3GEO.util.insereMarca.CONTAINER.toString().search(container)<0){i3GEO.util.insereMarca.CONTAINER.push(container)}if(!$i(container)){novoel=document.createElement("div");novoel.id=container;i=novoel.style;i.position="absolute";if($i(i3GEO.Interface.IDCORPO)){i.top=parseInt($i(i3GEO.Interface.IDCORPO).style.top,10);i.left=parseInt($i(i3GEO.Interface.IDCORPO).style.left,10)}else{i.top=parseInt($i(i3GEO.Interface.IDMAPA).style.top,10);i.left=parseInt($i(i3GEO.Interface.IDMAPA).style.left,10)}document.body.appendChild(novoel)}container=$i(container);novoel=document.createElement("div");i=novoel.style;i.position="absolute";i.zIndex=2000;i.top=(yi-2)+"px";i.left=(xi-2)+"px";i.width="5px";i.height="5px";novoimg=document.createElement("img");if(funcaoOnclick!==""){novoimg.onclick=funcaoOnclick}else{novoimg.onclick=function(){i3GEO.util.insereMarca.limpa()}}novoimg.src=srci;temp=novoimg.style;temp.width="5px";temp.height="5px";temp.zIndex=2000;novoel.appendChild(novoimg);container.appendChild(novoel);if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.util.insereMarca.limpa()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.util.insereMarca.limpa()")}}catch(e){alert("Ocorreu um erro. inseremarca"+e)}},limpa:function(){try{var n,i;n=i3GEO.util.insereMarca.CONTAINER.length;for(i=0;i<n;i++){if($i(i3GEO.util.insereMarca.CONTAINER[i])){$i(i3GEO.util.insereMarca.CONTAINER[i]).innerHTML=""}}i3GEO.util.insereMarca.CONTAINER=[];i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.util.insereMarca.limpa()")}catch(e){}}},adicionaSHP:function(path){i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));var temp=path.split(".");if((temp[1]==="SHP")||(temp[1]==="shp")){i3GEO.php.adicionaTemaSHP(i3GEO.atualiza,path)}else{i3GEO.php.adicionaTemaIMG(i3GEO.atualiza,path)}},abreCor:function(janela,elemento,tipo){if(!i3GEO.configura){i3GEO.configura={locaplic:"../"}}if(arguments.length===2){tipo="rgb"}var ins,temp,novoel,wdocaiframe,fix=false,wlargura="300",waltura="250",wsrc=i3GEO.configura.locaplic+"/ferramentas/colorpicker/index.htm?doc="+janela+"&elemento="+elemento+"&tipo="+tipo,nx="",ny="",texto="Cor",id="i3geo_janelaCor",modal=true,classe="hd";YAHOO.namespace("janelaCor.xp");if($i(id)){YAHOO.janelaCor.xp.panel.destroy()}ins='<div id="'+id+'_cabecalho" class="hd">';ins+="<span><img id='i3geo_janelaCor_imagemCabecalho' style='visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span>";ins+=texto;ins+='</div><div id="i3geo_janelaCor_corpo" class="bd" style="padding:5px">';if(wsrc!==""){ins+='<iframe name="'+id+'i" id="i3geo_janelaCori" valign="top" style="height:230px,border:0px white solid"></iframe>'}ins+='</div>';novoel=document.createElement("div");novoel.id="i3geo_janelaCor";novoel.style.display="block";novoel.innerHTML=ins;if($i("i3geo")){$i("i3geo").appendChild(novoel)}else{document.body.appendChild(novoel)}wdocaiframe=$i("i3geo_janelaCori");if(wdocaiframe){wdocaiframe.style.display="block";wdocaiframe.src=wsrc;wdocaiframe.style.height="250px";wdocaiframe.style.width="325px";wdocaiframe.style.border="0px solid white"}if(nx===""||nx==="center"){fix=true}YAHOO.janelaCor.xp.panel=new YAHOO.widget.ResizePanel(id,{height:"300px",zIndex:5000,modal:modal,width:"350px",fixedcenter:fix,constraintoviewport:false,visible:true,iframe:false});YAHOO.janelaCor.xp.panel.render();$i(id+'_cabecalho').className=classe},ajaxhttp:function(){var objhttp1;try{objhttp1=new XMLHttpRequest()}catch(ee){try{objhttp1=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{objhttp1=new ActiveXObject("Microsoft.XMLHTTP")}catch(E){objhttp1=false}}}return(objhttp1)},ajaxexecASXml:function(programa,funcao){var h,ohttp,retorno;if(programa.search("http")===0){h=window.location.host;if(programa.search(h)<0){alert("OOps! Nao e possivel chamar um XML de outro host.\nContacte o administrador do sistema.\nConfigure corretamente o ms_configura.php");return}}ohttp=i3GEO.util.ajaxhttp();ohttp.open("GET",programa,true);retorno="";ohttp.onreadystatechange=function(){var retorno,parser,dom;if(ohttp.readyState===4){retorno=ohttp.responseText;if(retorno!==undefined){if(document.implementation.createDocument){parser=new DOMParser();dom=parser.parseFromString(retorno,"text/xml")}else{dom=new ActiveXObject("Microsoft.XMLDOM");dom.async="false";dom.load(programa)}}else{dom="erro"}if(funcao!=="volta"){eval(funcao+'(dom)')}else{return dom}}};ohttp.send(null)},aparece:function(id,tempo,intervalo){var n,obj,opacidade,fadei,tempoFadei;n=parseInt(tempo/intervalo,10);obj=$i(id);if(n===1){obj.style.display="block";if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}}tempo=n*intervalo;intervalo=(intervalo*100)/tempo;opacidade=0;if(navm){obj.style.filter='alpha(opacity=0)'}else{obj.style.opacity=0}obj.style.display="block";fadei=function(){opacidade+=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade<100){tempoFadei=setTimeout(fadei,tempo)}else{clearTimeout(tempoFadei);if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}}};tempoFadei=setTimeout(fadei,tempo)},desaparece:function(id,tempo,intervalo,removeobj){var n,obj,opacidade,fade,p,tempoFade;n=parseInt(tempo/intervalo,10);obj=$i(id);if(n===1){obj.style.display="none";if(removeobj){p=obj.parentNode;if(p){p.removeChild(obj)}}return}tempo=n*intervalo;intervalo=(intervalo*100)/tempo;opacidade=100;if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}obj.style.display="block";fade=function(){opacidade-=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade>0){tempoFade=setTimeout(fade,tempo)}else{clearTimeout(tempoFade);obj.style.display="none";if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}if(removeobj){p=obj.parentNode;if(p){p.removeChild(obj)}}}};tempoFade=setTimeout(fade,tempo)},wkt2ext:function(wkt,tipo){var re,x,y,w,xMin,xMax,yMin,yMax,temp;tipo=tipo.toLowerCase();ext=false;if(tipo==="polygon"){try{re=new RegExp("POLYGON","g");wkt=wkt.replace(re,"");wkt=wkt.split("(")[2].split(")")[0];wkt=wkt.split(",");x=[];y=[];for(w=0;w<wkt.length;w++){temp=wkt[w].split(" ");x.push(temp[0]);y.push(temp[1])}x.sort(i3GEO.util.sortNumber);xMin=x[0];xMax=x[(x.length)-1];y.sort(i3GEO.util.sortNumber);yMin=y[0];yMax=y[(y.length)-1];return xMin+" "+yMin+" "+xMax+" "+yMax}catch(e){}}if(tipo==="point"){try{re=new RegExp("POINT","g");wkt=wkt.replace(re,"");wkt=wkt.split("(")[1].split(")")[0];wkt=wkt.split(" ");return(wkt[0]*1-0.01)+" "+(wkt[1]*1-0.01)+" "+(wkt[0]*1+0.01)+" "+(wkt[1]*1+0.01)}catch(e){}}return ext},sortNumber:function(a,b){return a-b},getScrollerWidth:function(){var scr=null,inn=null,wNoScroll=0,wScroll=0;scr=document.createElement('div');scr.style.position='absolute';scr.style.top='-1000px';scr.style.left='-1000px';scr.style.width='100px';scr.style.height='50px';scr.style.overflow='hidden';inn=document.createElement('div');inn.style.width='100%';inn.style.height='200px';scr.appendChild(inn);document.body.appendChild(scr);wNoScroll=inn.offsetWidth;scr.style.overflow='auto';wScroll=inn.offsetWidth;document.body.removeChild(document.body.lastChild);return(wNoScroll-wScroll)},scriptTag:function(js,ini,id,aguarde){if(!aguarde){aguarde=true}var head,script,tipojanela=i3GEO.janela.ESTILOAGUARDE;if(!$i(id)||id===""){head=document.getElementsByTagName('head')[0];script=document.createElement('script');script.type='text/javascript';if(ini!==""){if(navm){script.onreadystatechange=function(){if(this.readyState==='loaded'||this.readyState==='complete'){i3GEO.janela.fechaAguarde(id+"aguarde");i3GEO.janela.ESTILOAGUARDE=tipojanela;eval(ini)}}}else{script.onload=function(){i3GEO.janela.fechaAguarde(id+"aguarde");i3GEO.janela.ESTILOAGUARDE=tipojanela;eval(ini)}}}script.src=js;if(id!==""){script.id=id}head.appendChild(script)}else{if(ini!==""){eval(ini)}}},removeScriptTag:function(id){try{old=$i("loadscriptI3GEO");if(old!==null){old.parentNode.removeChild(old);old=null;eval(id+" = null;")}old=$i(id);if(old!==null){old.parentNode.removeChild(old)}}catch(erro){}},verificaScriptTag:function(texto){var s=document.getElementsByTagName("script"),n=s.length,i,t;for(i=0;i<n;i++){t=s[i].id;t=t.split(".");if(t[0]===texto){return true}}return false},mensagemAjuda:function(onde,texto){var ins="<table style='width:100%;padding:2;vertical-align:top;background-color:#ffffff;' ><tr><th style='background-color: #cedff2; font-family:Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; border: 1px solid #B1CDEB; text-align: left; padding-left: 7px;padding-right: 11px;'>";ins+='<div style="float:right"><img src="'+i3GEO.configura.locaplic+'/imagens/question.gif" /></div>';ins+='<div style="text-align:left;">';if(texto===""){texto=$i(onde).innerHTML}ins+=texto;ins+='</div></th></tr></table>';if(onde!==""){$i(onde).innerHTML=ins}else{return(ins)}},randomRGB:function(){var v=Math.random(),r=parseInt(255*v,10),g;v=Math.random();g=parseInt(255*v,10);v=Math.random();b=parseInt(255*v,10);return(r+","+g+","+b)},rgb2hex:function(str){var re=new RegExp(" ","g"),s=str.replace(re,','),rgb=s.split(",");function hex(x){var hexDigits=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"];return hexDigits[(x-x%16)/16]+hexDigits[x%16]}return"#"+hex(rgb[0])+hex(rgb[1])+hex(rgb[2])},comboTemas:function(id,funcao,onde,nome,multiplo,tipoCombo){if(arguments.length>2){i3GEO.util.defineValor(onde,"innerHTML","<span style=color:red;font-size:10px; >buscando temas...</span>")}if(arguments.length===3){nome=""}if(arguments.length<5){multiplo=false}var monta,lista,temp;monta=function(retorno){var i,comboTemas,temp,n,nome;if(retorno!==undefined){if(retorno.data){retorno=retorno.data}n=retorno.length;if(n>0){if(multiplo){comboTemas="<select style='font-size:12px;' id='"+id+"' size='4' multiple='multiple' name='"+nome+"'>"}else{comboTemas="<select style='font-size:12px;' id='"+id+"' name='"+nome+"'>"}comboTemas+="<option value=''>----</option>";for(i=0;i<n;i++){if(retorno[i].nome){nome=retorno[i].nome;tema=retorno[i].tema}else{nome=retorno[i].tema;tema=retorno[i].name}if(retorno[i].escondido!=="sim"){comboTemas+="<option value="+tema+" >"+nome+"</option>"}}comboTemas+="</select>";temp={dados:comboTemas,tipo:"dados"}}else{if(tipoCombo==="poligonosSelecionados"||tipoCombo==="selecionados"||tipoCombo==="pontosSelecionados"){temp={dados:'<div class=alerta >Nenhum tema encontrado. <span style=cursor:pointer;color:blue onclick="i3GEO.mapa.dialogo.selecao()" > Selecionar...</span></div>',tipo:"mensagem"}}else{temp={dados:'<div class=alerta >Nenhum tema encontrado. </div>',tipo:"mensagem"}}}}else{temp={dados:"<p style=color:red >Ocorreu um erro<br>",tipo:"erro"}}eval("funcao(temp);")};if(tipoCombo==="ligados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="editaveis"){i3GEO.php.listaTemasEditaveis(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}if(tipoCombo==="selecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemasComSel(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="raster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listatemasTipo(monta,"raster",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="pontosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert("Arvore de camadas não encontrada")}}if(tipoCombo==="pontos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert("Arvore de camadas não encontrada")}}if(tipoCombo==="poligonos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert("Arvore de camadas não encontrada")}}if(tipoCombo==="poligonosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert("Arvore de camadas não encontrada")}}if(tipoCombo==="naolinearSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",1,"diferente",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert("Arvore de camadas não encontrada")}}if(tipoCombo==="linhaDoTempo"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("linhadotempo","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert("Arvore de camadas não encontrada")}}if(tipoCombo===""){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type","","diferente",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert("Arvore de camadas não encontrada")}}},checkTemas:function(id,funcao,onde,nome,tipoLista,prefixo,size){if(arguments.length>2){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando temas...</span>"}if(arguments.length===3){nome=""}var monta,lista,temp,temp1,n,i;monta=function(retorno){try{var i,comboTemas,temp,n,nome;if(retorno!==undefined){if(retorno.data){retorno=retorno.data}n=retorno.length;if(n>0){comboTemas="<table class=lista3 >";for(i=0;i<n;i++){if(retorno[i].nome){nome=retorno[i].nome;tema=retorno[i].tema}else{nome=retorno[i].tema;tema=retorno[i].name}comboTemas+="<tr><td><input size=2 style='cursor:pointer' type=checkbox name='"+tema+"' /></td>";comboTemas+="<td>&nbsp;<input style='text-align:left; cursor:text;' onclick='javascript:this.select();' id='"+prefixo+tema+"' type=text size='"+size+"' value='"+nome+"' /></td></tr>"}comboTemas+="</table>";temp={dados:comboTemas,tipo:"dados"}}else{temp={dados:'<div class=alerta >Nenhum tema encontrado.</div>',tipo:"mensagem"}}}else{temp={dados:"<p style=color:red >Ocorreu um erro<br>",tipo:"erro"}}eval("funcao(temp);")}catch(e){}};if(tipoLista==="ligados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="selecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemasComSel(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="raster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listatemasTipo(monta,"raster",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="polraster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS);temp1=i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);n=temp1.length;for(i=0;i<n;i++){temp.push(temp1[i])}monta(temp)}else{alert("Arvore de camadas não encontrada")}}if(tipoLista==="pontosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert("Arvore de camadas não encontrada")}}if(tipoLista==="pontos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert("Arvore de camadas não encontrada")}}},comboItens:function(id,tema,funcao,onde,nome){if(arguments.length>3){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando itens...</span>"}if(arguments.length!==5){nome=""}var monta=function(retorno){var ins,temp,i;if(retorno.data!==undefined){ins=[];ins.push("<select id='"+id+"' name='"+nome+"'>");ins.push("<option value='' >---</option>");temp=retorno.data.valores.length;for(i=0;i<temp;i++){if(retorno.data.valores[i].tema===tema){ins.push("<option value='"+retorno.data.valores[i].item+"' >"+retorno.data.valores[i].item+"</option>")}}ins.push("</select>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</div>',tipo:"erro"}}eval("funcao(temp)")};i3GEO.php.listaItensTema(monta,tema)},comboValoresItem:function(id,tema,itemTema,funcao,onde){if(arguments.length===5){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando valores...</span>"}var monta=function(retorno){var ins=[],i,pares,j,temp;if(retorno.data!==undefined){ins.push("<select id="+id+" >");ins.push("<option value='' >---</option>");for(i=0;i<retorno.data[1].registros.length;i++){pares=retorno.data[1].registros[i].valores;for(j=0;j<pares.length;j++){ins.push("<option value='"+pares[j].valor+"' >"+pares[j].valor+"</option>")}}ins.push("</select>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</erro>',tipo:"erro"}}eval("funcao(temp)")};i3GEO.php.listaValoresItensTema(monta,tema,itemTema)},comboFontes:function(id,onde){$i(onde).innerHTML="<span style=color:red >buscando fontes...</span>";var monta=function(retorno){var ins="",temp,i,dados;if(retorno.data!==undefined){ins+="<select id='"+id+"'>";ins+="<option value='bitmap' >bitmap</option>";dados=retorno.data.split(",");temp=dados.length;for(i=0;i<temp;i++){ins+="<option value='"+dados[i]+"' >"+dados[i]+"</option>"}ins+="</select>"}$i(onde).innerHTML=ins};i3GEO.php.listaFontesTexto(monta)},comboSimNao:function(id,selecionado){var combo="<select name="+id+" id="+id+" >";combo+="<option value='' >---</option>";if(selecionado.toLowerCase()==="sim"){combo+="<option value=TRUE selected >sim</option>"}else{combo+="<option value=TRUE >sim</option>"}if(selecionado==="nao"){combo+="<option value=FALSE selected >não</option>"}else{combo+="<option value=FALSE >não</option>"}combo+="</select>";return(combo)},checkItensEditaveis:function(tema,funcao,onde,size,prefixo){if(onde!==""){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando itens...</span>"}var monta=function(retorno){var ins=[],i,temp,n;if(retorno.data!==undefined){ins.push("<table class=lista3 >");n=retorno.data.valores.length;for(i=0;i<n;i++){ins.push("<tr><td><input size=2 style='cursor:pointer' name='"+retorno.data.valores[i].tema+"' type=checkbox id='"+prefixo+retorno.data.valores[i].item+"' /></td>");ins.push("<td><input style='text-align:left; cursor:text;' onclick='javascript:this.select();' id='"+prefixo+retorno.data.valores[i].item+retorno.data.valores[i].tema+"' type=text size='"+size+"' value='"+retorno.data.valores[i].item+"' /></td></tr>")}ins.push("</table>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</div>',tipo:"erro"}}eval("funcao(temp)")};i3GEO.php.listaItensTema(monta,tema)},radioEpsg:function(funcao,onde,prefixo){if(arguments.length===2){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando...</span>"}var cp,monta=function(retorno){var ins=[],i,n,temp;if(retorno.data!==undefined){ins.push("<table class=lista2 >");ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio checked value='' /></td>");ins.push("<td>"+retorno.data[0].nome+"</td></tr>");ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio value='' /></td>");ins.push("<td>"+retorno.data[1].nome+"</td></tr>");n=retorno.data.length;for(i=2;i<n;i++){ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio value='"+retorno.data[i].codigo+"' /></td>");ins.push("<td>"+retorno.data[i].nome+"</td></tr>")}ins.push("</table>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</erro>',tipo:"erro"}}eval("funcao(temp)")};i3GEO.php.listaEpsg(monta)},proximoAnterior:function(anterior,proxima,texto,idatual,container){var temp=$i(idatual),ndiv=document.createElement("div"),nids,i,fundo,b;if(temp){$i(container).removeChild(temp)}if(!document.getElementById(idatual)){fundo=$i(container).style.backgroundColor;ndiv.id=idatual;texto+="<br><br><table style='width:100%;background-color:"+fundo+";' ><tr style='width:100%'>";if(anterior!==""){texto+="<td style='border:0px solid white;text-align:left;cursor:pointer;background-color:"+fundo+";'><input id='"+idatual+"anterior_' onclick='"+anterior+"' type='button' value='&nbsp;&nbsp;' /></td>"}if(proxima!==""){texto+="<td style='border:0px solid white;text-align:right;cursor:pointer;background-color:"+fundo+";'><input id='"+idatual+"proxima_' onclick='"+proxima+"' type='button' value='&nbsp;&nbsp;' /></td>"}ndiv.innerHTML=texto+"</tr></table>";$i(container).appendChild(ndiv);b=new YAHOO.widget.Button(idatual+"anterior_",{onclick:{fn:function(){eval(anterior+"()")},lazyloadmenu:true}});b=new YAHOO.widget.Button(idatual+"proxima_",{onclick:{fn:function(){eval(proxima+"()")},lazyloadmenu:true}});i=$i(idatual+"proxima_-button");if(i){i.style.backgroundImage="url('"+i3GEO.configura.locaplic+"/imagens/player_avanca.png')";i.style.backgroundRepeat="no-repeat";i.style.backgroundPosition="center center"}i=$i(idatual+"anterior_-button");if(i){i.style.backgroundImage="url('"+i3GEO.configura.locaplic+"/imagens/player_volta.png')";i.style.backgroundRepeat="no-repeat";i.style.backgroundPosition="center center"}}temp=$i(container).getElementsByTagName("div");nids=temp.length;for(i=0;i<nids;i++){temp[i].style.display="none"}$i(idatual).style.display="block"},dialogoFerramenta:function(mensagem,dir,nome){var js=i3GEO.configura.locaplic+"/ferramentas/"+dir+"/index.js.php";if(!$i("i3GEOF."+nome+"_script")){i3GEO.janela.ESTILOAGUARDE="reduzida";i3GEO.util.multiStep([i3GEO.janela.abreAguarde,i3GEO.util.scriptTag],[["i3GEOF."+nome+"_script"+"aguarde","Carregando JS"],[js,"i3GEOF."+nome+".criaJanelaFlutuante()","i3GEOF."+nome+"_script"]],function(){})}else{i3GEO.util.scriptTag(js,"i3GEOF."+nome+".criaJanelaFlutuante()","i3GEOF."+nome+"_script")}},intersectaBox:function(box1,box2){box1=box1.split(" ");box2=box2.split(" ");var box1i=box2,box2i=box1,coordx,coordy,i;coordx=box1[0]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true;coordx=box1[0]*1;coordy=box1[3]*1}if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[3]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}box1=box1i;box2=box2i;coordx=box1[0]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true;coordx=box1[0]*1;coordy=box1[3]*1}if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[3]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}return false},abreColourRamp:function(janela,elemento,ncores){var ins,temp,novoel,wdocaiframe,fix=false,wlargura="300",waltura="480",wsrc=i3GEO.configura.locaplic+"/ferramentas/colourramp/index.php?ncores="+ncores+"&doc="+janela+"&elemento="+elemento,nx="",ny="",texto="Cor",id="i3geo_janelaCorRamp",modal=true,classe="hd";YAHOO.namespace("janelaCorRamp.xp");if($i(id)){YAHOO.janelaCorRamp.xp.panel.destroy()}ins='<div id="'+id+'_cabecalho" class="hd">';ins+="<span><img id='i3geo_janelaCorRamp_imagemCabecalho' style='visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span>";ins+=texto;ins+='</div><div id="i3geo_janelaCorRamp_corpo" class="bd" style="padding:5px">';ins+='<iframe name="'+id+'i" id="i3geo_janelaCorRampi" valign="top" ></iframe>';ins+='</div>';novoel=document.createElement("div");novoel.id="i3geo_janelaCorRamp";novoel.style.display="block";novoel.innerHTML=ins;if($i("i3geo")){$i("i3geo").appendChild(novoel)}else{document.body.appendChild(novoel)}wdocaiframe=$i("i3geo_janelaCorRampi");wdocaiframe.style.display="block";wdocaiframe.src=wsrc;wdocaiframe.style.height="430px";wdocaiframe.style.width="340px";wdocaiframe.style.border="0px solid white";if(nx===""||nx==="center"){fix=true}YAHOO.janelaCorRamp.xp.panel=new YAHOO.widget.ResizePanel(id,{height:"480px",zIndex:5000,modal:modal,width:"350px",fixedcenter:fix,constraintoviewport:false,visible:true,iframe:false});YAHOO.janelaCorRamp.xp.panel.render();$i(id+'_cabecalho').className=classe},localizai3GEO:function(){var scriptLocation="",scripts=document.getElementsByTagName('script'),i=0,index,ns=scripts.length,src;for(i=0;i<ns;i++){src=scripts[i].getAttribute('src');if(src){index=src.lastIndexOf("/classesjs/i3geo.js");if((index>-1)&&(index+"/classesjs/i3geo.js".length===src.length)){scriptLocation=src.slice(0,-"/classesjs/i3geo.js".length);break}index=src.lastIndexOf("/classesjs/i3geonaocompacto.js");if((index>-1)&&(index+"/classesjs/i3geonaocompacto.js".length===src.length)){scriptLocation=src.slice(0,-"/classesjs/i3geonaocompacto.js".length);break}}}if(i3GEO.configura){i3GEO.configura.locaplic=scriptLocation}return scriptLocation},removeChild:function(id,el){var j=$i(id);if(j){if(!el){el=j.parentNode}el.removeChild(j)}},defineValor:function(id,prop,valor){try{eval("$i('"+id+"')."+prop+"='"+valor+"';")}catch(e){}},in_array:function(x,matriz){var txt="¬"+matriz.join("¬")+"¬";var er=new RegExp("¬"+x+"¬","gim");return((txt.match(er))?true:false)},timedProcessArray:function(items,process,callback){var todo=items.concat();setTimeout(function(){var start=+new Date();do{process(todo.shift())}while(todo.length>0&&(+new date()-start<50));if(todo.length>0){setTimeout(arguments.callee,25)}else{callback(items)}},25)},multiStep:function(steps,args,callback){var tasks=steps.concat();setTimeout(function(){var task=tasks.shift(),a=args.shift();task.apply(null,a||[]);if(tasks.length>0){setTimeout(arguments.callee,25)}else{callback()}},25)},tamanhoBrowser:function(){var viewportwidth,viewportheight;if(typeof window.innerWidth!='undefined'){viewportwidth=window.innerWidth,viewportheight=window.innerHeight}else if(typeof document.documentElement!='undefined'&&typeof document.documentElement.clientWidth!='undefined'&&document.documentElement.clientWidth!=0){viewportwidth=document.documentElement.clientWidth,viewportheight=document.documentElement.clientHeight}else{viewportwidth=document.getElementsByTagName('body')[0].clientWidth,viewportheight=document.getElementsByTagName('body')[0].clientHeight}viewportwidth=viewportwidth-i3GEO.util.getScrollerWidth();return[viewportwidth,viewportheight]},detectaTablet:function(){var p,c=DetectaMobile("DetectMobileLong");if(c===false){return false}p=confirm("Direciona para a versão adaptada para tablets?");if(p){window.location=i3GEO.configura.locaplic+'/interface/'+i3GEO.Interface.ALTTABLET+'?'+i3GEO.configura.sid;return true}}};try{YAHOO.namespace("lutsr");YAHOO.lutsr.accordion={properties:{animation:true,animationDuration:10,multipleOpen:false,Id:"sanfona",altura:200,ativa:0},init:function(animation,animationDuration,multipleOpen,Id,altura,ativa){if(animation){this.properties.animation=animation}if(animationDuration){this.properties.animationDuration=animationDuration}if(multipleOpen){this.properties.multipleOpen=multipleOpen}if(Id){this.properties.Id=Id}if(altura){this.properties.altura=altura}if(ativa){this.properties.ativa=ativa}var accordionObject=document.getElementById(this.properties.Id),headers,bodies;if(accordionObject){if(accordionObject.nodeName==="DL"){headers=accordionObject.getElementsByTagName("dt");bodies=headers[0].parentNode.getElementsByTagName("dd")}this.attachEvents(headers,0)}},attachEvents:function(headers,nr){var i,headerProperties,parentObj,header;for(i=0;i<headers.length;i++){headerProperties={objRef:headers[i],nr:i,jsObj:this};YAHOO.util.Event.addListener(headers[i],"click",this.clickHeader,headerProperties)}parentObj=headers[this.properties.ativa].parentNode;headers=parentObj.getElementsByTagName("dd");header=headers[this.properties.ativa];this.expand(header)},clickHeader:function(e,headerProperties){var parentObj=headerProperties.objRef.parentNode,headers=parentObj.getElementsByTagName("dd"),header=headers[headerProperties.nr],i;if(YAHOO.util.Dom.hasClass(header,"open")){headerProperties.jsObj.collapse(header)}else{if(headerProperties.jsObj.properties.multipleOpen){headerProperties.jsObj.expand(header)}else{for(i=0;i<headers.length;i++){if(YAHOO.util.Dom.hasClass(headers[i],"open")){headerProperties.jsObj.collapse(headers[i])}}headerProperties.jsObj.expand(header)}}},collapse:function(header){YAHOO.util.Dom.removeClass(YAHOO.util.Dom.getPreviousSibling(header),"selected");if(!this.properties.animation){YAHOO.util.Dom.removeClass(header,"open")}else{this.initAnimation(header,"close")}},expand:function(header){YAHOO.util.Dom.addClass(YAHOO.util.Dom.getPreviousSibling(header),"selected");if(!this.properties.animation){YAHOO.util.Dom.addClass(header,"open")}else{this.initAnimation(header,"open")}},initAnimation:function(header,dir){var attributes,animation,animationEnd;if(dir==="open"){YAHOO.util.Dom.setStyle(header,"visibility","hidden");YAHOO.util.Dom.setStyle(header,"height",this.properties.altura);YAHOO.util.Dom.addClass(header,"open");attributes={height:{from:0,to:this.properties.altura}};YAHOO.util.Dom.setStyle(header,"height",0);YAHOO.util.Dom.setStyle(header,"visibility","visible");animation=new YAHOO.util.Anim(header,attributes);animationEnd=function(){header.style.height=this.properties.altura+"px"};animation.duration=this.properties.animationDuration;animation.useSeconds=false;animation.onComplete.subscribe(animationEnd);animation.animate()}else if("close"){attributes={height:{to:0}};animationEnd=function(){YAHOO.util.Dom.removeClass(header,"open")};animation=new YAHOO.util.Anim(header,attributes);animation.duration=this.properties.animationDuration;animation.useSeconds=false;animation.onComplete.subscribe(animationEnd);animation.animate()}}}}catch(e){}$im=function(g){return i3GEO.util.$im(g)};$inputText=function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome){if(arguments.length===6){nome=""}return i3GEO.util.$inputText(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome)};$top=function(id,valor){i3GEO.util.$top(id,valor)};$left=function(id,valor){i3GEO.util.$left(id,valor)};
355   -g_traducao={"p1":[{pt:"O i3Geo &eacute; software livre! Para download clique <a href='http://mapas.mma.gov.br/download' target=blank >aqui</a>. <b><a href='http://"+window.location.host+"/i3geo/mobile/qrcode.htm' target=blank >Qrcode mobile</a></b>",en:"I3geo is a open source software! <a href='http://mapas.mma.gov.br/download' target=blank >Click</a> to download.",es:"I3Geo es software libre. <a href='http://mapas.mma.gov.br/download' target=blank > Download</a>",it:"I3geo è un software libero! <a href='http://mapas.mma.gov.br/download' target=blank >clicca qui </a> per il download."}],"p2":[{pt:"Filtro de cores",en:"Image type",es:"Tipo de imagen",it:"Tipo di immagine"}],"p3":[{pt:"Legenda",en:"Legend",es:"Subt&iacute;tulo",it:"Legenda"}],"p4":[{pt:"Escala",en:"Scale",es:"Escala",it:"Scala"}],"p5":[{pt:"Tamanho",en:"Size",es:"Tama&ntilde;o",it:"Dimensione"}],"p6":[{pt:"Ativa/desativa entorno",en:"Enable/Disable surrounding",es:"Activar/desactivar entorno",it:"Attiva / Disattiva campo"}],"p7":[{pt:"Ativa/desativa logo",en:"Enable/Disable logo",es:"Activar/desactivar logomarca",it:"Attiva / disattiva logo"}],"p8":[{pt:"Cor da selecao",en:"Selection color",es:"Color de la selecci&oacute;n",it:"Colore della selezione"}],"p9":[{pt:"Cor do fundo",en:"Background color",es:"Color del fondo",it:"Colore dello sfondo"}],"p10":[{pt:"Grade de coordenadas",en:"Graticule",es:"Grado de coordenadas",it:"Reticolo"}],"p11":[{pt:"Template",en:"Template",es:"Template",it:"Template"}],"p12":[{pt:"Temporizador",en:"Timer",es:"Temporizador",it:"Temporizzazione"}],"p13":[{pt:"Propriedades",en:"Properties",es:"Propiedades",it:"Proprietà"}],"p14":[{pt:"Aplicar",en:"Apply",es:"Aplicar",it:"Applica"}],"p15":[{pt:"Formato da imagem do mapa",en:"Image map format",es:"Formato de la imagen del mapa",it:"Image map format"}],"p16":[{pt:"Camadas de fundo",en:"Base layers",es:"Base layers",it:"Base layers"}],"p17":[{pt:"Imprime legenda",en:"Enable legend",es:"Activar Subtitulo",it:"Attiva legenda"}],"p18":[{pt:"Não imprime a legenda",en:"Disable legend",es:"Desactivar Subtitulo",it:"Disattiva legenda"}],"p19":[{pt:"Ativa ou desativa a legenda de um tema na opção de impressão do mapa",en:"Ativa ou desativa a legenda de um tema na opção de impressão do mapa",es:"Ativa ou desativa a legenda de um tema na opção de impressão do mapa",it:"Ativa ou desativa a legenda de um tema na opção de impressão do mapa"}],"p20":[{pt:"Tela remota",en:"Tela remota",es:"Tela remota",it:"Tela remota"}],"s1":[{pt:"Ajuda",en:"Help",es:"Ayuda",it:"Aiuto?"}],"s2":[{pt:"An&aacute;lise",en:"Analysis",es:"An&aacute;lisis",it:"Analisi"}],"s3":[{pt:"Janelas",en:"Windows",es:"Ventanas",it:"Finestra"}],"s4":[{pt:"Arquivo",en:"Files",es:"Archivo",it:"Archivio"}],"s5":[{pt:"Propriedades",en:"Properties",es:"Propiedades",it:"Proprietà"}],"u1":[{pt:"Sobre o i3Geo",en:"About",es:"Sobre I3Geo",it:"Informazioni WebGis"}],"u2":[{pt:"Doc. dos c&oacute;digos",en:"Doc. of the codes",es:"Doc. de los c&oacute;digos",it:"Doc. dei codici"}],"u3":[{pt:"WikiBook",en:"WikiBook",es:"WikiBook",it:"WikiBook"}],"u4":[{pt:"Tutoriais",en:"Tutorials",es:"Tutoriales",it:"Guida"}],"u5":[{pt:"Blog",en:"Blog",es:"Blog",it:"Blog"}],"u5a":[{pt:"Software p&uacute;blico",en:"Software p&uacute;blico",es:"Software p&uacute;blico",it:"Software pubblico"}],"u5b":[{pt:"Lista de fun&ccedil;&otilde;es",en:"Function list",es:"Lista de funciones",it:"Lista delle funzioni"}],"u5c":[{pt:"Redes sociais",en:"Social networks",es:"Redes sociales",it:"Reti sociali"}],"u6":[{pt:"Geometrias",en:"Geometries",es:"Geometr&iacute;as",it:"Geometrie"}],"u7":[{pt:"Grade de poligonos",en:"Polygon grid",es:"Grado de pol&iacute;gonos",it:"Reticolo poligonale"}],"u8":[{pt:"Grade de pontos",en:"Grid of Points",es:"Grado de puntos",it:"Reticolo puntuale"}],"u9":[{pt:"Grade de hex&aacute;gonos",en:"Grid of Hexagons",es:"Grado de hex&aacute;gonos",it:"Reticolo Esagonale"}],"u10":[{pt:"Entorno(Buffer)",en:"Buffer",es:"Entorno (Buffer)",it:"Buffer"}],"u11":[{pt:"Centr&oacute;ide",en:"Centroid",es:"Centro geométrico",it:"Baricentro"}],"u11a":[{pt:"Dist&acirc;ncia entre pontos",en:"Point distance",es:"Distancia de puntos",it:"Distanza tra i punti"}],"u12":[{pt:"N pontos em poligono",en:"N point in polygon",es:"N puntos en pol&iacute;gono",it:"N punti nel Poligono"}],"u13":[{pt:"Ponto em poligono/raster",en:"Point in polygon/raster",es:"Punto en pol&iacute;gono/matriz",it:"Punto nel Poligono / raster"}],"u14":[{pt:"Distribui&ccedil;&atilde;o de pontos",en:"Point distribution",es:"Distribuci&oacute;n de puntos",it:"Distribuzione di punti"}],"u15":[{pt:"Barras de ferramentas",en:"Toolbars",es:"Barras de herramientas",it:"Barre Strumenti"}],"u16":[{pt:"Janela de mensagens",en:"Message window",es:"Ventana de mensajes",it:"Finestra messaggi"}],"u17":[{pt:"Salvar mapa",en:"Save map",es:"Guardar mapa",it:"Salva mappa"}],"u18":[{pt:"Carregar mapa",en:"Load map",es:"Cargar mapa",it:"Apri mappa"}],"u19":[{pt:"Pegar imagens",en:"Get pictures",es:"Tomar im&aacute;genes",it:"Apri immagine"}],"u20":[{pt:"Converter em WMS e WMC",en:"Convert to WMS and WMC",es:"Convertir en WMS y WMC",it:"Converti in WMS e WMC"}],"u20a":[{pt:"Converter em KML",en:"Convert to KML",es:"Convertir en KML",it:"Converti in KML"}],"u21":[{pt:"Gerador de links",en:"Link generator",es:"Generador de enlaces",it:"Genera collegamento"}],"u22":[{pt:"Grade",en:"Graticule",es:"Grado",it:"Reticolo"}],"u23":[{pt:"Ponto",en:"Point",es:"Punto",it:"Punto"}],"u24":[{pt:"Pol&iacute;gono",en:"Polygon",es:"Poligonos",it:"Poligono"}],"u25":[{pt:"Dissolve",en:"Dissolv",es:"Dissolve",it:"Dissolvi"}],"u26":[{pt:"Agrupa",en:"Group",es:"Agrupa",it:"Aggrega"}],"u27":[{pt:"Outros",en:"Others",es:"Otros",it:"Altri"}],"u28":[{pt:"Centro médio",en:"Centro médio",es:"Centro médio",it:"Centro médio"}],"u29":[{pt:"Editor vetorial",en:"Editor vetorial",es:"Editor vetorial",it:"Editor vetorial"}],"t1":[{pt:"Camadas",en:"Layers",es:"Capas",it:"Strati"}],"t2":[{pt:"Arraste o tema aqui para excluir",en:"Drag the layer here to remove",es:"Arrastre el tema aqui para excluirlo",it:"Trascina qui per rimuovere"}],"t2a":[{pt:"Filtra a lista de camadas",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&atilde;o no mapa. Ap&oacute;s alterar o estado do tema, aguarde alguns instantes para o mapa ser redesenhado, ou clique no bot&atilde;o aplicar que ser&aacute; mostrado.",en:"Turn the layer on/off on the map. Wait a few moments to get the map redesigned or press the button to apply it.",es:"Haga clic para conectar o desconectar este tema, mostr&aacute;ndolo o no en el mapa. Despu&eacute;s de alterar el estado del tema, espere algunos instantes para que el mapa sea redise&ntilde;ado, o haga clic en el bot&oacute;n aplicar que se mostrar&aacute;.",it:"Fare clic per attivare o disattivare questo tema. Dopo aver modificato lo stato del tema, La mappa aggiornata sarà visualizzata dopo qualche istante. Per visualizzare subito cliccare su Applica"}],"t3a":[{pt:"Clique para ligar todos os temas",en:"Turn all layers layer on",es:"Haga clic para conectar los temas",it:"Turn all layers on"}],"t3b":[{pt:"Clique para desligar todos os temas",en:"Turn all layers layer off",es:"Haga clic para desconectar los temas",it:"Turn all layers off"}],"t4":[{pt:"limpa sele&ccedil;&atilde;o",en:"Clear selection",es:"Limpia la selecci&oacute;n",it:"Pulizia della selezione"}],"t4a":[{pt:"zoom para a sele&ccedil;&atilde;o",en:"Zoom to selection",es:"Zoom a la selecci&oacute;n",it:"Zoom della selezione"}],"t5":[{pt:"Limpa sele&ccedil;&atilde;o existente nesse tema",en:"Clear selection",es:"Limpia la selecci&oacute;n existente en este tema",it:"Pulizia della selezione esistente in questo strato"}],"t6":[{pt:"Clique para fazer o download desse tema no formato shapefile",en:"Click to download in shapefile format",es:"Haga clic para hacer el download",it:"Clicca per il download di questo tema nel formato Shapefile"}],"t7":[{pt:"clique e arraste",en:"dragging",es:"Haga clic y arrastre",it:"Clicca e trascina"}],"t7a":[{pt:"Clique e arraste para mudar a ordem. Arraste e solte na lixeira para remover. Aguarde para ver a legenda.",en:"dragging or wait",es:"Haga clic y arrastre",it:"Clicca e trascina"}],"t8":[{pt:"arraste para mudar a ordem",en:"drag to change the draw order",es:"Arrastre para cambiar la orden",it:"Trascina per modificare l'ordine"}],"t9":[{pt:"A escala do tema &eacute; compat&iacute;vel com a escala do mapa",en:"The scale of the layer is compatible with the scale of the map",es:"La escala del tema es compatible con la escala del mapa",it:"La scala del tema è compatibile con la scala della mappa"}],"t10":[{pt:"A escala do tema &eacute incompat&iacute;vel com a escala do mapa",en:"The scale of the layer is incompatible with the scale of the map",es:"La escala del tema es incompatible con la escala del mapa",it:"La scala del tema è incompatibile con la scala della mappa"}],"t11":[{pt:"A escala do tema n&atilde;o &eacute conhecida",en:"The scale of the layer is not known",es:"La escala del tema no es conocida",it:"La scala del tema non è conosciuta"}],"t12":[{pt:"excluir",en:"delete",es:"Excluir",it:"Eliminare"}],"t12a":[{pt:"Clique para excluir esse tema do mapa.",en:"Delete layer of the map.",es:"Haga clic para excluir este tema del mapa",it:"Clicca per rimuovere questo strato della mappa"}],"t13":[{pt:"sobe",en:"up",es:"Sube",it:"Mettere sopra "}],"t14":[{pt:"Clique para subir esse tema na ordem de desenho",en:"Drag the layer up",es:"Haga clic para subir ese tema en la orden de dise&ntilde;o",it:"Clicca per sollevare questo tema nell’ordine di progettazione"}],"t15":[{pt:"desce",en:"down",es:"Baja",it:"scendere"}],"t16":[{pt:"Clique para descer esse tema na ordem de desenho",en:"Drag the layer down",es:"Haga clic para bajar este tema en la orden de dise&ntilde;o",it:"Clicca per scendere questo tema nell’ordine di progettazione."}],"t17":[{pt:"zoom para o tema",en:"zoom to a layer",es:"Zoom para el tema",it:"Zoom al tema"}],"t18":[{pt:"Clique para ajustar o mapa de forma a mostrar todo o tema",en:"Click to adjust the map in order to show the whole layer",es:"Haga clic para ajustar el mapa de forma para que muestre todo el tema",it:"Clicca per regolare la mappa per visualizzare tutto lo strato"}],"t18a":[{pt:"Op&ccedil;&otilde;es e propriedades",en:"Options",es:"Opciones",it:"Opzioni"}],"t18b":[{pt:"Legenda",en:"Legend",es:"Subtitulo",it:"Legenda"}],"t19":[{pt:"Altera a transparência do tema, possibilitando que as camadas inferiores possam ser vistas.",en:"Change the layer transparency.",es:"Altera la transparencia del tema, haciendo posible que las capas inferiores puedan verse",it:"Modifica la trasparenza del tema, consentendo che gli strati più bassi siano visti"}],"t20":[{pt:"Opacidade:",en:"Opacity",es:"Opacidad",it:"Opacità"}],"t21a":[{pt:"Muda o nome atual do tema. Utilize para melhorar a legenda do mapa.",en:"Change layer name.",es:"Cambia el nombre actual del tema. Utilice para mejorar el subtitulo del mapa.",it:"Cambia il nome del tema corrente. Utilizzare per migliorare la legenda della mappa."}],"t21":[{pt:"Novo nome:",en:"New name",es:"Nuevo nombre",it:"Nuovo nome"}],"t22":[{pt:"Localize elementos no tema com base em seus atributos descritivos.",en:"Find elements on the layer based on their descriptive attributes.",es:"Ubique elementos en el tema con base en sus atributos descriptivos",it:"Trova gli elementi nel tema secondo i suoi attributi descrittivi."}],"t23":[{pt:"Procurar",en:"Search...",es:"Buscar...",it:"Cerca..."}],"t24":[{pt:"Crie uma nova camada no mapa para apresentar textos descritivos sobre esse tema, tendo como base a tabela de atributos.",en:"Create a new layer to display descriptive texts on the subject, based on table of attributes.",es:"Crear una nueva capa en el mapa para presentar textos descriptivos sobre este tema, teniendo como base la tabla de atributos",it:"Creare un nuovo strato sulla mappa per visualizzare testi descrittivi sul tema, secondo la tabella di attributi."}],"t25":[{pt:"Texto (nomes ou valores)",en:"Label...",es:"Texto...",it:"Testo..."}],"t26":[{pt:"Defina as etiquetas que ser&atilde;o mostradas quando o mouse &eacute; estacionado sobre um elemento desse tema.",en:"Set the tooltips that will be shown when the mouse is over the element of that layer.",es:"Defina las etiquetas que se mostrar&aacute;n cuando el rat&oacute;n se estaciona sobre un elemento de este tema",it:"Definire le etichette da visualizzare quando il mouse si ferma su un elemento di questo tema."}],"t27":[{pt:"Ativar etiquetas",en:"Tooltip...",es:"Etiquetas...",it:"Descrizioni..."}],"t28":[{pt:"Insira um filtro nesse tema para mostrar apenas determinadas informa&ccedil;&otilde;es, com base na tabela de atributos.",en:"Filter based on the table of attributes.",es:"Inserte un filtro en este tema para mostrar solo determinadas informaciones, con base en la tabla de atributos",it:"Inserisci un filtro in questo tema per mostrare solo determinate informazioni, con base nella tabella di attributi"}],"t29":[{pt:"Filtrar",en:"Filter...",es:"Filtro...",it:"Filtro..."}],"t30":[{pt:"Veja a tabela de atributos relacionada a esse tema.",en:"See the table of attributes related to that layer.",es:"Vea la tabla de atributos relacionada con este tema",it:"Vedi la tabella degli attributi di questo tema."}],"t31":[{pt:"Tabela com os dados",en:"Table...",es:"Tabla...",it:"Tabella..."}],"t32":[{pt:"Abre o editor de legenda, permitindo a alteração da forma de representação desse tema.",en:"Opens the editor of legend, allowing the modification of the form of representation of this theme.",es:"Abre el editor de subtítulo, permitiendo la alteraci&oacute;n de la forma de representaci&oacute;n de este tema",it:"Aprire l'editor di legenda, che consente la modifica della forma di rappresentazione di questo tema "}],"t33":[{pt:"Editar legenda",en:"Legend edit...",es:"Editar subtítulo...",it:"Modifica la legenda"}],"t34":[{pt:"Mostra os dados desse tema em uma janela que acompanha o mouse.",en:"The data shows that layer in a window that tracks the mouse.",es:"Muestra los datos de este tema en una ventana que acompa&ntilde;a el rat&oacute;n",it:"Mostra i dati di questo tema in una finestra che accompagna il mouse."}],"t35":[{pt:"Mostra em janela",en:"Show in window",es:"Muestra en la ventana...",it:"Mostra nella finestra..."}],"t36":[{pt:"tema vis&iacute;vel apenas em determinadas escalas",en:"the layer is visible in specific scales",es:"capa visible en ciertas escalas",it:"Tema visibile solo a determinate scale"}],"t37":[{pt:"Gráfico",en:"Graphic",es:"Gr&aacute;fico",it:"Grafico"}],"t38":[{pt:"Exporta a legenda para o padrão SLD.",en:"Export the legend to SLD.",es:"Exporta a legenda para o padrão SLD.",it:"Exporta a legenda para o padrão SLD."}],"t39":[{pt:"Exportar SLD",en:"SLD...",es:"SLD...",it:"SLD..."}],"t40":[{pt:"Abre a ferramenta que permite alterar o SQL de acesso aos dados",en:"Abre a ferramenta que permite alterar o SQL de acesso aos dados",es:"Abre a ferramenta que permite alterar o SQL de acesso aos dados",it:"Abre a ferramenta que permite alterar o SQL de acesso aos dados"}],"t41":[{pt:"Editar SQL",en:"SQL...",es:"SQL...",it:"SQL..."}],"t42":[{pt:"Efeito cortina",en:"Curtain...",es:"Cortina...",it:"Tenda..."}],"t43":[{pt:"Aplicar SLD",en:"Aplicar SLD...",es:"Aplicar SLD...",it:"Aplicar SLD..."}],"t44":[{pt:"Salvar mapfile",en:"Save mapfile",es:"Guardar mapfile",it:"Salva mapfile"}],"t45":[{pt:"Comentar",en:"Comentar",es:"Comentar",it:"Comentar"}],"t46":[{pt:"Mais populares",en:"Mais populares",es:"Mais populares",it:"Mais populares"}],"t47":[{pt:"Intervalo em segundos após o qual a camada será atualizada. Para ignorar, deixe em branco",en:"Intervalo em segundos após o qual a camada será atualizada. Para ignorar, deixe em branco",es:"Intervalo em segundos após o qual a camada será atualizada. Para ignorar, deixe em branco",it:"Intervalo em segundos após o qual a camada será atualizada. Para ignorar, deixe em branco"}],"t48":[{pt:"Temporizador",en:"Temporizador",es:"Temporizador",it:"Temporizador"}],"a1":[{pt:"procurar tema:",en:"search layer:",es:"Buscar datos:",it:"Ricerca il tema:"}],"a2":[{pt:"Upload de shape file",en:"Upload shape file",es:"Upload de shape file",it:"Upload del shape file"}],"a2b":[{pt:"Upload de arquivo dbf ou CSV",en:"Upload dbf or CSV file",es:"Upload de archivo dbf o CSV",it:"Upload del file dbf o CSV"}],"a3":[{pt:"Download de dados",en:"Data download",es:"Download de datos",it:"Download dei dati"}],"a3a":[{pt:"Importar Web Map Context (WMC)",en:"Importar Web Map Context (WMC)",es:"Importar Web Map Context (WMC)",it:"Importar Web Map Context (WMC)"}],"a4":[{pt:"Conectar com servidor WMS",en:"WMS server connection",es:"Conectar con el servidor WMS",it:"Connetti con il server WMS"}],"a4b":[{pt:"Conectar com servidor WMS-T",en:"WMS-T server connection",es:"Conectar con el servidor WMS-T",it:"Connetti con il server WMS-T"}],"a5":[{pt:"Conectar com GeoRss",en:"GeoRss connection",es:"Conectar con GeoRss",it:"Connetti con il GeoRss"}],"a5a":[{pt:"Nuvem de tags",en:"Tags cloud",es:"Tags",it:"Tag"}],"a6":[{pt:"Acesso aos arquivos do servidor",en:"Access files in server directory",es:"Acceso a los archivos del servidor",it:"Accesso agli archivi del server"}],"a7":[{pt:"Temas",en:"Layers",es:"Temas",it:"Temi"}],"a8":[{pt:"Clique no box ao lado do tema para ligar ou desligar, mostrando-o ou nã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.",en:"Click to connect or disconnect layer, showing it or not on the map. After changing the layer status, wait a few moments to be redesigned the map, or click in the button apply that will be shown.",es:"Haga clic para conectar o desconectar este tema, mostr&aacute;ndolo o no en el mapa. Despu&eacute;s de alterar el estado del tema, espere algunos instantes para que el mapa sea redise&ntilde;ado, o haga clic en el bot&oacute;n aplicar que aparecer&aacute;",it:"Clicca sulla casella accanto al tema per attivare o disattivare, mostrandolo o meno sulla mappa. Dopo aver modificato lo stato del tema, attendere qualche istante per vedere ridisegnata la mappa, oppure fare clic sul pulsante Applica, che verrà visualizzato."}],"a9":[{pt:"fonte",en:"font",es:"Fuente",it:"Fonte"}],"a10":[{pt:"c&oacute;digo:",en:"code",es:"C&oacute;digo",it:"Codice"}],"a11":[{pt:"Sistemas",en:"Systems",es:"Sistemas",it:"Sistemi"}],"a12":[{pt:"Abrir sistema",en:"Open system",es:"Abrir sistema",it:"Aprire il sistema"}],"a13":[{pt:"Abrir no Google Earth",en:"Open in Google Earth",es:"Abrir no Google Earth",it:"Abrir no Google Earth"}],"a14":[{pt:"Upload SHP, CSV, DBF, GPX, KML",en:"Upload SHP, CSV, DBF, GPX, KML",es:"Upload SHP, CSV, DBF, GPX, KML",it:"Upload SHP, CSV, DBF, GPX, KML"}],"g1":[{pt:"Temas",en:"Layer",es:"Temas",it:"Temi"}],"g1a":[{pt:"Catálogo",en:"Catalog",es:"Catalogo",it:"Catalog"}],"g2":[{pt:"Adiciona",en:"Add",es:"Agrega",it:"Aggiunge"}],"g3":[{pt:"Legenda",en:"Legend",es:"Subtítulo",it:"Legenda"}],"g4":[{pt:"Mapas",en:"Maps",es:"Mapas",it:"Mappa"}],"g4a":[{pt:"Mapa",en:"Map",es:"Mapa",it:"Mappe"}],"o1":[{pt:"Aguarde...",en:"Wait...",es:"Espere...",it:"Attendere..."}],"o2":[{pt:"Busca r&aacute;pida...",en:"Quick search...",es:"B&uacute;squeda r&aacute;pida...",it:"Ricerca rapida ..."}],"o3":[{pt:"Lendo imagem...",en:"Loading images...",es:"Leyendo imagen...",it:"Lettura di immagini..."}],"o4":[{pt:"Aguarde...abrindo lente",en:"Wait...Opening lens...",es:"Espere...abriendo lente",it:"Attendere...apertura della lente"}],"o5":[{pt:"Aguarde...iniciando",en:"Wait...initializing",es:"Espere...iniciando",it:"Attendere...partenza"}],"o6":[{pt:"din&acirc;mico",en:"dynamic",es:"Din&aacute;mico",it:"Dinamico"}],"d1":[{pt:"Digite as coordenadas de um ponto (X=longitude e Y=latitude) para localiz&acute;-lo no mapa. O centro do mapa ser&acute; deslocado para o ponto digitado.",en:"Enter the coordinates of a point (X=longitude and Y=latitude) to localize it on the map. The center of the map is move to the point entered.",es:"Digite las coordenadas de un punto (X=longitud e Y=latitud) para ubicarlas en el mapa. El centro del mapa se desplazar&aacute; para el punto digitado.",it:"Inserisci le coordinate di un punto (X=longitudine e Y=latitudine) per individuarlo sulla mappa. Il centro della mappa viene spostato al punto digitato"}],"d2":[{pt:"Altera a escala do mapa ajustando-a para mostrar a mesma abrang&ecirc;ncia geogr&aacute;fica da inicializa&ccedil;&atilde;o.",en:"Change the scale of the map adjusting it to show the same initial geographical cover.",es:"Modifica la escala del mapa ajust&aacute;ndola para mostrar la misma &aacute;rea geogr&aacute;fica inicial",it:"Modificare la scala della mappa adeguandola per mostrare la stessa copertura geografica sin dall'inizializzazione"}],"d3":[{pt:"Amplia o mapa - desloca o ponto clicado para centro da tela ou amplia a regi&atilde;o indicada por um ret&acirc;ngulo. Ap&oacute;s ativada, clique e arraste o mouse sobre o mapa na &aacute;rea de zoom desejada.",en:"Extends the map - place the clicked point in the center of the screen or extends the region indicated by a rectangular.After enabled, click and drag the mouse over the map in the area of zoom desired.",es:"Ampl&iacute;a el mapa - coloca el punto donde se hizo clic en el centro de la pantalla o ampl&iacute;a la regi&oacute;n indicada por un rect&aacute;ngulo. Despu&eacute;s de activarla, haga clic y arrastre el rat&oacute;n sobre el mapa en el &aacute;rea de zoom deseada",it:"Ampliare la mappa - pone il punto cliccato nel centro dello schermo o ingrandisce la regione indicata con un rettangolo. Dopo aver attivata, cliccare e trascinare il mouse sopra la mappa nell’area di zoom desiderata."}],"d4":[{pt:"Desloca a regi&atilde;o vis&iacute;vel no mapa. Ap&oacute;s ativada, clique e arraste o mouse sobre o mapa para deslocar a regi&atilde;o vis&iacute;vel.",en:"Shifts the region visible on the map. Once activated, click and drag the mouse over the map to move the visible region.",es:"Desloca la regi&oacute;n visible en el mapa",it:"Sposta la regione visibile sulla mappa. Dopo averla attivata, cliccare e trascinare il mouse sulla mappa per spostare la regione visibile "}],"d5":[{pt:"Amplia o mapa tendo como refer&ecirc;ncia o centro atual.",en:"Magnify the map with the reference the current center.",es:"Ampl&iacute;a el mapa teniendo como referencia el centro actual",it:"Estendi la mappa tenendo come riferimento il centro corrente."}],"d6":[{pt:"Reduz o mapa tendo como refer&ecircncia o centro atual.",en:"Reduces the map as having reference the current center.",es:"Reduce el mapa teniendo como referencia el centro actual",it:"Riduci la mappa tenendo come referimento il centro corrente"}],"d7":[{pt:"Mostra informa&ccedil;&otilde;es sobre um ponto no mapa. Ap&oacute;s ativada, clique sobre o mapa.",en:"Displays information about a point on the map. Once activated, click on it.",es:"Muestra informaci&oacute;n sobre un punto en el mapa. Despu&eacute;s de activarla haga clic sobre el mismo.",it:"Mostra gli informazioni su un punto sulla mappa. Dopo averla attivata, fare clic su di esso."}],"d7a":[{pt:"Mostra informa&ccedil;&otilde;es sobre um ponto no mapa. Ap&oacute;s ativada, pare o mouse por alguns instantes no ponto desejado ou clique sobre o mesmo.",en:"Displays information about a point on the map. Once activated, stop the mouse for a few moments at the desired point or click on it.",es:"Muestra informaci&oacute;n sobre un punto en el mapa. Despu&eacute;s de activarla, pare el rat&oacute;n por algunos instantes en el punto deseado o haga clic sobre el mismo.",it:"Mostra gli informazioni su un punto sulla mappa. Dopo averla attivata, fermare il mouse per qualche istante nel punto desiderato o fare clic su di esso."}],"d8":[{pt:"Mostra a extens&atilde;o geogr&aacute;fica atual em coordenadas geogr&aacute;ficas",en:"It shows the extent of current geographic coordinates",es:"Muestra la extensi&oacute;n geográfica actual en coordenadas geogr&aacute;ficas",it:"Mostra la estensione geografica corrente in coordinate geografiche"}],"d9":[{pt:"Abre/fecha o mapa de refer&ecirc;ncia",en:"Open/close the reference map ",es:"Abre/cierra el mapa de referencia",it:"Apertura/chiusura della mappa di riferimento"}],"d10":[{pt:"Digite o novo valor de escala e clique no bot&atilde;o aplicar para alterar a escala do mapa",en:"Enter the new value of scale and click the button Apply to change the scale of the map",es:"Digite el nuevo valor de escala y haga clic en el bot&oacute;n aplicar para modificar la escala del mapa",it:"Immettere il nuovo valore di scala e clicca sul pulsante Applica per cambiare la scala della mappa"}],"d11":[{pt:"Busca dados na Wikipedia na abrang&ecirc;ncia atual do mapa. Fa&ccedil;a um zoom no mapa antes de abrir essa op&ccedil;&atilde;o. Regi&ocirc;es muito extensas podem tornar a busca muito demorada",en:"Search data on Wikipedia in the current scope of the map. Make a zoom on the map before opening this option. Regions very extensive can make a very long search ",es:"Busca datos en Wikipedia en el alcance actual del mapa. Haga zoom en el mapa antes de abrir esta opci&oacute;n. Regiones muy extensas pueden ocasionar una b&uacute;squeda muy lenta",it:"Ricerca dati su Wikipedia nell'ambito corrente della mappa. Fare uno zoom sulla mappa prima dell’apertura di questa opzione. Regioni molto ampie potrebbero causare una ricerca troppo lenta."}],"d12":[{pt:"Imprime o mapa",en:"Print the map",es:"Imprime el mapa",it:"Stampa la mappa"}],"d13":[{pt:"Localiza o IP do usu&aacute;rio no mapa",en:"Locates the user's IP on the map",es:"Ubica el IP del usuario en el mapa",it:"Trova IP dell'utente nella mappa"}],"d14":[{pt:"Gera arquivo para 3d",en:"Generates file for 3d",es:"Genera archivo para 3d",it:"Genera file per 3d"}],"d15":[{pt:"Abre o Google Maps, mostrando uma imagem de sat&eacute;lite da regi&atilde;o vista no mapa principal",en:"Open Google Maps, showing a satellite image of the region's main views on the map",es:"Abre Google Maps, mostrando una imagen de sat&eacute;lite de la regi&oacute;n en el mapa principal",it:"Apri Google Maps, mostrando un'immagine satellitare della regione vista sulla mappa principale."}],"d16":[{pt:"Pesquisa documentos na base de dados Scielo (dados preliminares)",en:"Search documents in the database Scielo (preliminary data)",es:"Busca documentos en la base de datos Scielo (datos preliminares)",it:"Ricerca dei documenti nella base di dati Scielo (dati preliminari)"}],"d17":[{pt:"Projeto Confluence. Pontos de intersec&ccedil;&atilde;o de coordenadas observadas em campo",en:"Confluence Project. Points of intersection of coordinates observed in field",es:"Proyecto Confluence. Puntos de intersecci&oacute;n de coordenadas observadas en campo",it:"Progetto di confluenza. Punti di intersezione delle coordinate osservate in campo"}],"d18":[{pt:"Abre lente de amplia&ccedil;&atilde;o",en:"Opens lens to expansion",es:"Abre lente de ampliaci&oacute;n",it:"Apri lente di ingrandimento"}],"d19":[{pt:"Coloca as guias em uma janela m&oacute;vel",en:"Open the tabs in a window mobile",es:"Coloca las gu&iacute;as en una ventana m&oacute;vil",it:"Aprire le schede in una finestra mobile."}],"d20":[{pt:"Redesenha o mapa com as configura&ccedil;&ocirc;es iniciais.",en:"Reload the map with the initial configurations.",es:"Redise&ntilde;a el mapa con las configuraciones iniciales",it:"Ricarica la mappa con la configurazione iniziale."}],"d21":[{pt:"Mede a dist&acirc;ncia entre dois ou mais pontos clicados no mapa (menor dist&acirc;ncia). O c&aacute;lculo de dist&acirc;ncia &eacute; aproximado e sua precis&atilde;o depende da escala do mapa.",en:"It measures the distance between two or more clicked points on the map (less distance). The calculation of distance is approximate and their accuracy depends on the scale of the map.",es:"Mide la distancia entre dos o m&aacute;s puntos marcados en el mapa (menor distancia). El c&aacute;lculo de distancia es aproximado y su precisi&oacute;n depende de la escala del mapa",it:"Misura la distanza tra due o più punti cliccati sulla mappa (minore distanza). Il calcolo della distanza è approssimativo e la sua precisione dipende dalla scala della mappa."}],"d21a":[{pt:"Mede a &aacute;rea de um pol&iacute;gono desenhado na tela. O c&aacute;lculo de &aacute;rea &eacute; aproximado e sua precis&atilde;o depende da escala do mapa.",en:"It measures the area on the map. The calculation of area is approximate and their accuracy depends on the scale of the map.",es:"Mede a &aacute;rea de um pol&iacute;gono desenhado na tela. O c&aacute;lculo de &aacute;rea &eacute; aproximado e sua precis&atilde;o depende da escala do mapa.",it:"Misura l'area di un poligono tracciato sullo schermo. Il calcolo della superficie è approssimativo e la sua precisione dipende dalla scala della mappa."}],"d22":[{pt:"Insere pontos no mapa em coordenadas geogr&aacute;ficas. Ospontos inclu&iacute;dos podem ser transformados em linhas ou pol&iacute;gonos. Os pontos s&atilde;o armazenados em um tema tempor&aacute;rio, podendo-se fazer o download do arquivo shapefile.",en:"Insert points on the map in geographical coordinates. Items included can be converted into lines or polygons. Items are stored in a temporary layer, can be to download shapefile.",es:"Inserte puntos en el mapa en coordenadas geogr&aacute;ficas. Los puntos incluidos pueden transformarse en l&iacute;neas o pol&iacute;gonos. Los puntos se almacenan en un tema temporal, pudiendo hacerse el download del archivo shapefile.",it:"Inserire punti sulla mappa in coordinate geografiche. I punti inseriti possono essere trasformati in linee o poligoni. I punti vengono memorizzati in un tema temporaneo, con la possibilità di effettuare il download del file Shapefile."}],"d23":[{pt:"Insere um gr&aacute;fico no ponto clicado conforme os atributos existentes no tema escolhido. O tema deve possuir itens com valores num&eacute;ricos na tabela de atributos.",en:"Insert a graphic in the clicked point as the exist attributes in the chosen layer. The layer must have items with numerical values in the table of attributes.",es:"Inserte un gr&aacute;fico en el punto marcado seg&uacute;n los atributos existentes en el tema elejido. El tema debe tener puntos con valores num&eacute;ricos en la tabla de atributos",it:"Inserire un grafico nel punto cliccato con gli attributi che esistono nel tema scelto. Il tema deve avere gli oggetti con valori numerici contenute nella tabella di attributi."}],"d24":[{pt:"Abre as ferramentas para sele&ccedil;&atilde;o de elementos de um tema. Os elementos selecionados podem ser utilizados em outras opera&ccedil;&ocirc;es, como buffer e sele&ccedil;&atilde;o por tema.",en:"Opens the tools to select elements of a layer. The elements selected can be used in other buffer or selection operation by layer .",es:"Abre las herramientas para selecci&oacute;n de elementos de un tema. Los elementos seleccionados pueden utilizarse en otras ",it:"Aprire gli strumenti per selezionare gli elementi di un tema. Gli elementi selezionati possono essere utilizzati in altre operazioni, come ad esempio buffer e selezione per tema."}],"d25":[{pt:"Insere texto no mapa clicando em um ponto. Utilize essa op&ccedil;&atilde;o para adicionar informa&ccedil;&ocirc;es ao mapa.",en:"Insert text on the map by clicking on a point. Use this option to add information on the map.",es:"Inserte texto en el mapa haciendo clic en un punto. Utilice esta opci&oacute;n para agregar informaci&oacute;n al mapa",it:"Inserisci il testo sulla mappa cliccando su un punto. Utilizzare questa opzione per aggiungere informazioni alla mappa."}],"d26":[{pt:"Escolha o visual para os botões e outras caracter&iacute;sticas visuais do mapa",en:"Choose look for the buttons and other map's visual characteristics",es:"Elija la vista para los botones y otras caracter&iacute;sticas visuales del mapa",it:"Scegli il visuale (??) per i pulsanti e le altre caratteristiche visive della mappa."}],"d27":[{pt:"Interface",en:"Interface",es:"Interface",it:"Interface"}],"d28":[{pt:"Aguarde...gerando os arquivos",en:"Wait...",es:"Espere...",it:"Attendere..."}],"d29":[{pt:"Estações metar",en:"Estações metar",es:"Estações metar",it:"Estações metar"}],"d30":[{pt:"Linha do tempo",en:"Time line",es:"Linha do tempo",it:"Linha do tempo"}],"d31":[{pt:"Não existe nenhuma camada com etiquetas ativas",en:"Não existe nenhuma camada com etiquetas ativas",es:"Não existe nenhuma camada com etiquetas ativas",it:"Não existe nenhuma camada com etiquetas ativas"}],"d32":[{pt:"Aplicativos",en:"Applications",es:"Aplicaciones",it:"Applicazioni"}],"ge1":[{pt:"Navegação com o mouse",en:"Navegação com o mouse",es:"Navegação com o mouse",it:"Navegação com o mouse"}],"ge2":[{pt:"Barra de status",en:"Barra de status",es:"Barra de status",it:"Barra de status"}],"ge3":[{pt:"Mapa de referência",en:"Mapa de referência",es:"Mapa de referência",it:"Mapa de referência"}],"ge4":[{pt:"Escala e legenda",en:"Escala e legenda",es:"Escala e legenda",it:"Escala e legenda"}],"ge5":[{pt:"Atmosfera",en:"Atmosfera",es:"Atmosfera",it:"Atmosfera"}],"ge6":[{pt:"Grade de coordenadas",en:"Grade de coordenadas",es:"Grade de coordenadas",it:"Grade de coordenadas"}],"ge7":[{pt:"Luz do sol",en:"Luz do sol",es:"Luz do sol",it:"Luz do sol"}],"ge8":[{pt:"Limites políticos",en:"Limites políticos",es:"Limites políticos",it:"Limites políticos"}],"ge9":[{pt:"Construções em 3d",en:"Construções em 3d",es:"Construções em 3d",it:"Construções em 3d"}],"ge10":[{pt:"Estradas",en:"Estradas",es:"Estradas",it:"Estradas"}],"ge11":[{pt:"Terreno",en:"Terreno",es:"Terreno",it:"Terreno"}]};
356   -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.idioma={MOSTRASELETOR:true,IDSELETOR:"",SELETORES:["pt","en","es"],DICIONARIO:g_traducao,define:function(codigo){i3GEO.idioma.ATUAL=codigo;i3GEO.util.insereCookie("i3geolingua",codigo)},retornaAtual:function(){return(i3GEO.idioma.ATUAL)},defineDicionario:function(obj){i3GEO.idioma.DICIONARIO=obj},alteraDicionario:function(id,novo){i3GEO.idioma.DICIONARIO[id][0][i3GEO.idioma.ATUAL]=novo},traduzir:function(id){if(i3GEO.idioma.DICIONARIO[id]){var t=i3GEO.idioma.DICIONARIO[id][0];return t[i3GEO.idioma.ATUAL]}else{return}},adicionaDicionario:function(novodic){for(var k in novodic){if(novodic.hasOwnProperty(k)){i3GEO.idioma.DICIONARIO[k]=novodic[k]}}},mostraDicionario:function(){var w,k;w=window.open();for(k in i3GEO.idioma.DICIONARIO){if(i3GEO.idioma.DICIONARIO.hasOwnProperty(k)){w.document.write(k+" = "+i3GEO.idioma.traduzir(k)+"<br>")}}},trocaIdioma:function(codigo){i3GEO.util.insereCookie("i3geolingua",codigo);window.location.reload(true)},listaIdiomas:function(){for(var k in i3GEO.idioma.DICIONARIO){if(i3GEO.idioma.DICIONARIO.hasOwnProperty(k)){return(i3GEO.util.listaChaves(i3GEO.idioma.DICIONARIO[k][0]))}}},mostraSeletor:function(){if(!i3GEO.idioma.MOSTRASELETOR){return}var ins,n,w,i,pos,novoel,temp,iu=i3GEO.util;ins="";n=i3GEO.idioma.SELETORES.length;if($i("i3geo")&&i3GEO.parametros.w<550){w="width:12px;"}else{w=""}for(i=0;i<n;i++){temp=i3GEO.idioma.SELETORES[i];ins+='<img style="'+w+'padding:0 0px;top:-7px;padding-right:0px;border: 1px solid white;" src="'+iu.$im("branco.gif")+'" onclick="i3GEO.idioma.trocaIdioma(\''+temp+'\')" ';if(temp==="en"){ins+='alt="Ingles" id="uk" />'}if(temp==="pt"){ins+='alt="Portugues" id="brasil" />'}if(temp==="es"){ins+='alt="Espanhol" id="espanhol" />'}if(temp==="it"){ins+='alt="Italiano" id="italiano" />'}}if(i3GEO.idioma.IDSELETOR!==""&&$i(i3GEO.idioma.IDSELETOR)){$i(i3GEO.idioma.IDSELETOR).innerHTML=ins}else{pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if(!$i("i3geoseletoridiomas")){novoel=document.createElement("div");novoel.innerHTML=ins;novoel.id="i3geoseletoridiomas";document.body.appendChild(novoel)}else{novoel=$i("i3geoseletoridiomas")}novoel.style.position="absolute";novoel.style.top=pos[1]-17+"px";novoel.style.left=pos[0]+"px";novoel.style.zIndex=5000}}};var $trad=function(id){return(i3GEO.idioma.traduzir(id))};(function(){try{var c=i3GEO.util.pegaCookie("i3geolingua");if(c){i3GEO.idioma.define(c);g_linguagem=c}else{if(typeof(g_linguagem)!=="undefined"){i3GEO.idioma.define(g_linguagem)}else{g_linguagem="pt";i3GEO.idioma.define("pt")}}if(typeof('g_traducao')!=="undefined"){i3GEO.idioma.defineDicionario(g_traducao)}}catch(e){alert("Problemas com idiomas "+e)}})();
357   -if(typeof(i3GEO)==='undefined'){i3GEO=[]}cpJSON=new cpaint();cpJSON.set_response_type("JSON");i3GEO.php={verifica:function(){if(i3GEO.configura.locaplic===undefined){alert("i3GEO.php diz: variavel i3GEO.configura.locaplic não esta definida")}if(i3GEO.configura.sid===undefined){alert("i3GEO.php diz: variavel i3GEO.configura.sid não esta definida")}},insereSHPgrafico:function(funcao,tema,x,y,itens,shadow_height,width,inclinacao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=insereSHPgrafico&tipo=pizza&tema="+tema+"&x="+x+"&y="+y+"&itens="+itens+"&shadow_height="+shadow_height+"&width="+width+"&inclinacao="+inclinacao+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"insereSHPgrafico",funcao)},insereSHP:function(funcao,tema,item,valoritem,xy,projecao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=insereSHP&item="+item+"&valor="+valoritem+"&tema="+tema+"&xy="+xy+"&projecao="+projecao+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"insereSHP",funcao)},pegaMensagens:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegaMensagens&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaMensagem",funcao)},areaPixel:function(funcao,g_celula){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=areaPixel&celsize="+g_celula+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"areaPixel",funcao)},excluitema:function(funcao,temas){var layer,retorno,p,n,i;i3GEO.php.verifica();retorno=function(retorno){n=temas.length;for(i=0;i<n;i++){if(i3GEO.Interface.ATUAL==="openlayers"){layer=i3geoOL.getLayersByName(temas[i]);if(layer.length>0){i3geoOL.removeLayer(layer[0])}}if(i3GEO.Interface.ATUAL==="googlemaps"){indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(temas[i]);if(indice!==false){i3GeoMap.overlayMapTypes.removeAt(indice)}}if(i3GEO.Interface.ATUAL==="googleearth"){indice=i3GEO.Interface.googleearth.retornaObjetoLayer(temas[i]);i3GeoMap.getFeatures().removeChild(indice)}}funcao.call(retorno)};p=i3GEO.arvoreDeCamadas.LOCAPLIC+"/classesphp/mapa_controle.php?funcao=excluitema&temas="+temas+"&g_sid="+i3GEO.arvoreDeCamadas.SID;cpJSON.call(p,"excluitema",retorno)},reordenatemas:function(funcao,lista){i3GEO.php.verifica();var p=i3GEO.arvoreDeCamadas.LOCAPLIC+"/classesphp/mapa_controle.php?funcao=reordenatemas&lista="+lista+"&g_sid="+i3GEO.arvoreDeCamadas.SID;cpJSON.call(p,"reordenatemas",funcao)},criaLegendaHTML:function(funcao,tema,template){i3GEO.php.verifica();if(arguments.length===1){tema="";template="legenda2.htm"}if(arguments.length===2){template="legenda2.htm"}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=criaLegendaHTML&tema="+tema+"&templateLegenda="+template+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"criaLegendaHTML",funcao)},inverteStatusClasse:function(funcao,tema,classe){i3GEO.php.verifica();var p=i3GEO.arvoreDeCamadas.LOCAPLIC+"/classesphp/mapa_controle.php?funcao=inverteStatusClasse&g_sid="+i3GEO.arvoreDeCamadas.SID+"&tema="+tema+"&classe="+classe;cpJSON.call(p,"inverteStatusClasse",funcao)},ligatemas:function(funcao,desligar,ligar,adicionar){i3GEO.php.verifica();if(arguments.length===3){adicionar="nao"}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=ligatemas&desligar="+desligar+"&ligar="+ligar+"&adicionar="+adicionar+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"ligaDesligaTemas",funcao)},pegalistademenus:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegalistademenus&g_sid="+i3GEO.configura.sid+"&map_file=&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistademenus",funcao)},pegalistadegrupos:function(funcao,id_menu,listasgrupos){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegalistadegrupos&map_file=&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&listasistemas=nao&listasgrupos="+listasgrupos+"&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistadegrupos",funcao)},pegalistadeSubgrupos:function(funcao,id_menu,id_grupo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegalistadeSubgrupos&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&grupo="+id_grupo+"&map_file=&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistadeSubgrupos",funcao)},pegalistadetemas:function(funcao,id_menu,id_grupo,id_subgrupo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegalistadetemas&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&grupo="+id_grupo+"&subgrupo="+id_subgrupo+"&map_file=&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistadetemas",funcao)},listaTemas:function(funcao,tipo,locaplic,sid){if(arguments.length===2){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php?funcao=listatemas&g_sid="+sid+"&tipo="+tipo;cpJSON.call(p,"listaTemas",funcao)},listaTemasEditaveis:function(funcao,locaplic,sid){if(arguments.length===1){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php?funcao=listatemaslocais&g_sid="+sid;cpJSON.call(p,"listatemaslocais",funcao)},listaTemasComSel:function(funcao,locaplic,sid){if(arguments.length===1){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php?funcao=listatemascomsel&g_sid="+sid;cpJSON.call(p,"listaTemasComSel",funcao)},listatemasTipo:function(funcao,tipo,locaplic,sid){if(arguments.length===2){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php?funcao=&funcao=listatemasTipo&tipo="+tipo+"&g_sid="+sid;cpJSON.call(p,"listatemasTipo",funcao)},pegaSistemas:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegaSistemas&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaSistemas",funcao)},listadrives:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=listaDrives&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"listaDrives",funcao)},listaarquivos:function(funcao,caminho){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=listaArquivos&diretorio="+caminho;cpJSON.call(p,"listaArquivos",funcao)},geo2utm:function(funcao,x,y){i3GEO.php.verifica();if($i("aguardeGifAberto")||x<-180){return}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=geo2utm&x="+x+"&y="+y+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"geo2utm",funcao)},desativacgi:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=desativacgi&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"desativacgi",funcao)},pegaMapas:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegaMapas&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaSistemas",funcao)},mudatamanho:function(funcao,altura,largura){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=mudatamanho&altura="+altura+"&largura="+largura+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaSistemas",funcao)},ativalogo:function(funcao,altura,largura){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=ativalogo&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"ativalogo",funcao)},insereAnnotation:function(funcao,pin,xy,texto,position,partials,offsetx,offsety,minfeaturesize,mindistance,force,shadowcolor,shadowsizex,shadowsizey,outlinecolor,cor,sombray,sombrax,sombra,fundo,angulo,tamanho,fonte){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=inserefeature&pin="+pin+"&tipo=ANNOTATION&xy="+xy+"&texto="+texto+"&position="+position+"&partials="+partials+"&offsetx="+offsetx+"&offsety="+offsety+"&minfeaturesize="+minfeaturesize+"&mindistance="+mindistance+"&force="+force+"&shadowcolor="+shadowcolor+"&shadowsizex="+shadowsizex+"&shadowsizey="+shadowsizey+"&outlinecolor="+outlinecolor+"&cor="+cor+"&sombray="+sombray+"&sombrax="+sombrax+"&sombra="+sombra+"&fundo="+fundo+"&angulo="+angulo+"&tamanho="+tamanho+"&fonte="+fonte+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"inserefeature",funcao)},identificaunico:function(funcao,xy,tema,item){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=identificaunico&xy="+xy+"&resolucao=5&tema="+tema+"&item="+item+"&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"identificaunico",funcao)},recuperamapa:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=recuperamapa&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"recuperamapa",funcao)},criaLegendaImagem:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=criaLegendaImagem&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"criaLegendaImagem",funcao)},referenciadinamica:function(funcao,zoom,tipo){i3GEO.php.verifica();if(arguments.length===2){tipo="dinamico"}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=referenciadinamica&g_sid="+i3GEO.configura.sid+"&zoom="+zoom+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"retornaReferenciaDinamica",funcao)},referencia:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=referencia&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"retornaReferencia",funcao)},pan:function(funcao,escala,tipo,x,y){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pan&escala="+escala+"&tipo="+tipo+"&x="+x+"&y="+y+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pan",funcao)},aproxima:function(funcao,nivel){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=aproxima&nivel="+nivel+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"aproxima",funcao)},afasta:function(funcao,nivel){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=afasta&nivel="+nivel+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"afasta",funcao)},zoomponto:function(funcao,x,y,tamanho,simbolo,cor){i3GEO.php.verifica();if(!simbolo){simbolo="ponto"}if(!tamanho){tamanho=15}if(!cor){cor="255 0 0"}var retorno=function(retorno){if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.pan2ponto(x,y);i3GEO.janela.fechaAguarde()}if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.pan2ponto(x,y);i3GEO.janela.fechaAguarde()}funcao.call(retorno)},p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=zoomponto&pin=pin&xy="+x+" "+y+"&g_sid="+i3GEO.configura.sid+"&marca="+simbolo+"&tamanho="+tamanho+"&cor="+cor;cpJSON.call(p,"zoomponto",retorno)},localizaIP:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=localizaIP&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"localizaIP",funcao)},mudaext:function(funcao,tipoimagem,ext,locaplic,sid,atualiza,geo){var retorno,p;if(arguments.length===3){i3GEO.php.verifica();locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid;atualiza=true;geo=false}if(geo===undefined){geo=false}if(atualiza===undefined){atualiza=true}if(ext===undefined){alert("extensao nao definida");return}retorno=function(retorno){switch(i3GEO.Interface.ATUAL){case"googlemaps":if(atualiza===true){i3GEO.Interface.googlemaps.zoom2extent(ext)}break;case"googleearth":if(atualiza===true){i3GEO.Interface.googleearth.zoom2extent(ext)}break;case"openlayers":i3GEO.Interface.openlayers.zoom2ext(ext);break}i3GEO.janela.fechaAguarde();try{funcao.call(retorno)}catch(e){}};p=locaplic+"/classesphp/mapa_controle.php?funcao=mudaext&tipoimagem="+tipoimagem+"&ext="+ext+"&g_sid="+sid+"&geo="+geo;cpJSON.call(p,"mudaext",retorno)},mudaescala:function(funcao,escala){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=mudaescala&escala="+escala+"&g_sid="+i3GEO.configura.sid+"&tipoimagem="+i3GEO.configura.tipoimagem;cpJSON.call(p,"mudaescala",funcao)},aplicaResolucao:function(funcao,resolucao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=crialente&resolucao="+resolucao+"&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"crialente",funcao)},geradestaque:function(funcao,tema,ext){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=geradestaque&tema="+tema+"&g_sid="+i3GEO.configura.sid+"&ext="+ext;cpJSON.call(p,"geradestaque",funcao)},selecaopt:function(funcao,tema,xy,tipo,tolerancia){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=selecaopt&tema="+tema+"&tipo="+tipo+"&xy="+xy+"&tolerancia="+tolerancia+"&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaoPT",funcao)},selecaobox:function(funcao,tema,tipo,box){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=selecaobox&ext="+box+"&g_sid="+i3GEO.configura.sid+"&tipo="+tipo+"&tema="+tema+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaobox",funcao)},selecaoext:function(funcao,tema,tipo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=selecaoext&tema="+tema+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaobox",funcao)},selecaoatrib2:function(funcao,tema,filtro,tipo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=selecaoatrib2&tema="+tema+"&filtro="+filtro+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaoatrib2",funcao)},selecaotema:function(funcao,temao,tema,tipo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=selecaotema&temao="+temao+"&tema="+tema+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaotema",funcao)},sobetema:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=sobetema&tema="+tema+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"sobetema",funcao)},descetema:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?&funcao=descetema&tema="+tema+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"descetema",funcao)},fontetema:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=fontetema&tema="+tema+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"fontetema",funcao)},zoomtema:function(funcao,tema){i3GEO.php.verifica();var retorno,p;retorno=function(retorno){switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde();break;case"googleearth":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde();break;case"openlayers":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde();break;case"padrao":i3GEO.atualiza(retorno);break}};p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=zoomtema&tema="+tema+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"zoomtema",retorno)},zoomsel:function(funcao,tema){i3GEO.php.verifica();var retorno,p;retorno=function(retorno){switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde();break;case"googleearth":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde();break;case"openlayers":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde();break;case"padrao":i3GEO.atualiza(retorno);break}};p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=zoomsel&tema="+tema+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"zoomsel",retorno)},limpasel:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=limpasel&tema="+tema+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"limpasel",funcao)},invertestatuslegenda:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=invertestatuslegenda&tema="+tema+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"invertestatuslegenda",funcao)},aplicaCorClasseTema:function(funcao,idtema,idclasse,rgb){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=alteraclasse&opcao=alteracor&tema="+idtema+"&idclasse="+idclasse+"&cor="+rgb+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"aplicaCorClasseTema",funcao)},mudatransp:function(funcao,tema,valor){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=mudatransp&tema="+tema+"&valor="+valor+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"mudatransp",funcao)},mudanome:function(funcao,tema,valor){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=mudanome&tema="+tema+"&valor="+valor+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"mudanome",funcao)},adicionaTemaWMS:function(funcao,servico,tema,nome,proj,formato,versao,nomecamada,tiporep,suportasld,formatosinfo,locaplic,sid){if(arguments.length===11){i3GEO.php.verifica();locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php?g_sid="+sid+"&funcao=adicionatemawms&servico="+servico+"&tema="+tema+"&nome="+nome+"&proj="+proj+"&formato="+formato+"&versao="+versao+"&nomecamada="+nomecamada+"&tiporep="+tiporep+"&suportasld="+suportasld+"&formatosinfo="+formatosinfo;cpJSON.call(p,"adicionatemawms",funcao)},adicionaTemaSHP:function(funcao,path){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=adicionaTemaSHP&arq="+path;cpJSON.call(p,"adicionaTemaSHP",funcao)},adicionaTemaIMG:function(funcao,path){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=adicionaTemaIMG&arq="+path;cpJSON.call(p,"adicionaTemaIMG",funcao)},identifica:function(funcao,x,y,resolucao,locaplic,sid){var p=locaplic+"/classesphp/mapa_controle.php?funcao=identifica&opcao=tip&xy="+x+","+y+"&resolucao=5&g_sid="+sid;cpJSON.call(p,"identifica",funcao)},identifica2:function(funcao,x,y,resolucao,opcao,locaplic,sid,tema,ext,listaDeTemas){if(arguments.length===4){opcao="tip";locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid;ext="";listaDeTemas=""}if(arguments.length===5){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid;ext="";listaDeTemas=""}if(listaDeTemas===undefined){listaDeTemas=""}var p=locaplic+"/classesphp/mapa_controle.php?funcao=identifica2&opcao="+opcao+"&xy="+x+","+y+"&resolucao=5&g_sid="+sid+"&ext="+ext+"&listaDeTemas="+listaDeTemas;if(opcao!=="tip"){p+="&tema="+tema}cpJSON.call(p,"identifica",funcao)},reiniciaMapa:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=reiniciaMapa&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"reiniciaMapa",funcao)},procurartemas:function(funcao,procurar,locaplic){if(arguments.length===2){locaplic=i3GEO.configura.locaplic}try{var p=locaplic+"/classesphp/mapa_controle.php?funcao=procurartemas&map_file=&procurar="+procurar+"&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"procurartemas",funcao)}catch(e){}},procurartemas2:function(funcao,procurar,locaplic){if(arguments.length===2){locaplic=i3GEO.configura.locaplic}try{var p=locaplic+"/classesphp/mapa_controle.php?funcao=procurartemas2&map_file=&procurar="+procurar+"&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"procurartemas",funcao)}catch(e){}},procurartemasestrela:function(funcao,nivel,fatorestrela,locaplic){if(arguments.length===3){locaplic=i3GEO.configura.locaplic}try{var p=locaplic+"/classesphp/mapa_controle.php?funcao=procurartemasestrela&map_file=&nivel="+nivel+"&fatorestrela="+fatorestrela+"&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"foo",funcao)}catch(e){}},adtema:function(funcao,temas,locaplic,sid){if(arguments.length===2){i3GEO.php.verifica();locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php?funcao=adtema&temas="+temas+"&g_sid="+sid;cpJSON.call(p,"adtema",funcao)},escalagrafica:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=escalagrafica&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"escalagrafica",funcao)},flamingo:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=montaFlamingo&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"montaFlamingo",funcao)},googlemaps:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=googlemaps&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"googlemaps",funcao)},googleearth:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=googleearth&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"googleearth",funcao)},openlayers:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=openlayers&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"openlayers",funcao)},corpo:function(funcao,tipoimagem){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=corpo&tipoimagem="+tipoimagem+"&g_sid="+i3GEO.configura.sid+"&interface="+i3GEO.Interface.ATUAL;if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.recalcPar();p+="&mapexten="+i3GEO.parametros.mapexten}cpJSON.call(p,"corpo",funcao)},criamapa:function(funcao,parametros){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=criaMapa&"+parametros;cpJSON.call(p,"criaMapa",funcao)},inicia:function(funcao,embedLegenda,w,h){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=inicia&embedLegenda="+embedLegenda+"&w="+w+"&h="+h+"&g_sid="+i3GEO.configura.sid+"&interface="+i3GEO.Interface.ATUAL;cpJSON.call(p,"iniciaMapa",funcao)},chaveGoogle:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=chavegoogle&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"chavegoogle",funcao)},listaRSSwsARRAY:function(funcao,tipo){var p=i3GEO.configura.locaplic+"/classesphp/wscliente.php?funcao=listaRSSwsARRAY&rss="+["|"]+"&tipo="+tipo;cpJSON.call(p,"listaRSSwsARRAY",funcao)},listaLayersWMS:function(funcao,servico,nivel,id_ws,nomelayer){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=listaLayersWMS&servico="+servico+"&nivel="+nivel+"&id_ws="+id_ws+"&nomelayer="+nomelayer;cpJSON.call(p,"listaLayersWMS",funcao)},buscaRapida:function(funcao,locaplic,servico,palavra){var p=locaplic+"/classesphp/mapa_controle.php?map_file=&funcao=buscaRapida&palavra="+palavra+"&servico="+servico;cpJSON.call(p,"buscaRapida",funcao)},listaItensTema:function(funcao,tema){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=listaitens&tema="+tema+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"listaItensTema",funcao)},listaValoresItensTema:function(funcao,tema,itemTema){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=listaregistros&unico=sim&tema="+tema+"&itemtema="+itemTema+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"listaRegistros",funcao)},extRegistros:function(funcao,tema,reg){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=extregistros&registro="+reg+"&tema="+tema;cpJSON.call(p,"listaItensTema",funcao)},listaFontesTexto:function(funcao){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=listatruetype";cpJSON.call(p,"listaTrueType",funcao)},listaEpsg:function(funcao){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=listaEpsg";cpJSON.call(p,"listaEpsg",funcao)},criatemaSel:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=criatemasel&tema="+tema+"&nome=Novo tema "+tema;cpJSON.call(p,"chavegoogle",funcao)},pegaData:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=pegadata&tema="+tema;cpJSON.call(p,"pegadata",funcao)},alteraData:function(funcao,tema,data){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=alteradata&tema="+tema+"&novodata="+data;cpJSON.call(p,"alteradata",funcao)},dadosPerfilRelevo:function(funcao,opcao,pontos,amostragem,item){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=dadosPerfilRelevo&opcao="+opcao,cp=new cpaint();cp.set_transfer_mode('POST');cp.set_response_type("JSON");cp.call(p,"foo",funcao,"&pontos="+pontos+"&amostragem="+amostragem+"&item="+item)},funcoesGeometriasWkt:function(funcao,listaWkt,operacao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=funcoesGeometriasWkt&operacao="+operacao,cp=new cpaint();cp.set_transfer_mode('POST');cp.set_response_type("JSON");cp.call(p,"foo",funcao,"&geometrias="+listaWkt)}};
358   -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.configura={grupoLayers:"",oMenuData:{menu:[{nome:$trad("s1"),id:"ajudaMenu"},{nome:$trad("s2"),id:"analise"},{nome:$trad("s3"),id:"janelas"},{nome:$trad("s4"),id:"arquivos"},{nome:$trad("d32"),id:"interface"}],submenus:{"ajudaMenu":[{id:"omenudataAjudamenu1",text:$trad("u1"),url:"http://www.softwarepublico.gov.br/spb/ver-comunidade?community_id=1444332",target:"_blank"},{id:"omenudataAjudamenu2",text:$trad("u2"),url:"javascript:i3GEO.ajuda.abreDoc()"},{id:"omenudataAjudamenu3",text:$trad("u3"),url:"http://pt.wikibooks.org/wiki/I3geo",target:"_blank"},{id:"omenudataAjudamenu4",text:$trad("u4"),url:"http://www.softwarepublico.gov.br/dotlrn/clubs/i3geo/file-storage/index?folder%5fid=22667525",target:"_blank"},{id:"omenudataAjudamenu5",text:$trad("u5a"),url:"http://www.softwarepublico.gov.br",target:"_blank"},{id:"omenudataAjudamenu7",text:$trad("u5b"),url:"../ajuda_usuario.php",target:"_blank"},{id:"omenudataAjudamenu8",text:$trad("u5c"),url:"javascript:i3GEO.ajuda.redesSociais()"}],"analise":[{id:"omenudataAnalise1",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u22")+'</b></span>',url:"#"},{id:"omenudataAnalise2",text:$trad("u7"),url:"javascript:i3GEO.analise.dialogo.gradePol()"},{id:"omenudataAnalise3",text:$trad("u8"),url:"javascript:i3GEO.analise.dialogo.gradePontos()"},{id:"omenudataAnalise4",text:$trad("u9"),url:"javascript:i3GEO.analise.dialogo.gradeHex()"},{id:"omenudataAnalise5",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u23")+'</b></span>',url:"#"},{id:"omenudataAnalise6",text:$trad("u11a"),url:"javascript:i3GEO.analise.dialogo.distanciaptpt()"},{id:"omenudataAnalise7",text:$trad("u12"),url:"javascript:i3GEO.analise.dialogo.nptPol()"},{id:"omenudataAnalise8",text:$trad("u13"),url:"javascript:i3GEO.analise.dialogo.pontoempoligono()"},{id:"omenudataAnalise9",text:$trad("u14"),url:"javascript:i3GEO.analise.dialogo.pontosdistri()"},{id:"omenudataAnalise9a",text:$trad("u28"),url:"javascript:i3GEO.analise.dialogo.centromassa()"},{id:"omenudataAnalise10",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u24")+'</b></span>',url:"#"},{id:"omenudataAnalise11",text:$trad("u25"),url:"javascript:i3GEO.analise.dialogo.dissolve()"},{id:"omenudataAnalise12",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u27")+'</b></span>',url:"#"},{id:"omenudataAnalise13",text:$trad("u6"),url:"javascript:i3GEO.analise.dialogo.analisaGeometrias()"},{id:"omenudataAnalise14",text:$trad("u10"),url:"javascript:i3GEO.analise.dialogo.buffer()"},{id:"omenudataAnalise15",text:$trad("u26"),url:"javascript:i3GEO.analise.dialogo.agrupaElementos()"},{id:"omenudataAnalise16",text:$trad("u11"),url:"javascript:i3GEO.analise.dialogo.centroide()"},{id:"omenudataAnalise17",text:$trad("t37"),url:"javascript:i3GEO.analise.dialogo.graficoInterativo()"},{id:"omenudataAnalise18",text:$trad("d30"),url:"javascript:i3GEO.analise.dialogo.linhaDoTempo()"}],"janelas":[{id:"omenudataJanelas1",text:$trad("u15"),url:"javascript:i3GEO.barraDeBotoes.reativa(0);i3GEO.barraDeBotoes.reativa(1)"},{id:"omenudataJanelas2",text:$trad("u16"),url:"javascript:i3GEO.ajuda.abreJanela()"},{id:"omenudataJanelas3",text:$trad("u29"),url:"javascript:i3GEO.barraDeBotoes.editor.inicia()"}],"arquivos":[{id:"omenudataArquivos1",text:$trad("u17"),url:"javascript:i3GEO.mapa.dialogo.salvaMapa()"},{id:"omenudataArquivos2",text:$trad("u18"),url:"javascript:i3GEO.mapa.dialogo.carregaMapa()"},{id:"omenudataArquivos3",text:$trad("u19"),url:"javascript:i3GEO.gadgets.quadros.listaImagens()"},{id:"omenudataArquivos4",text:$trad("u20"),url:"javascript:i3GEO.mapa.dialogo.convertews()"},{id:"omenudataArquivos5",text:$trad("u20a"),url:"javascript:i3GEO.mapa.dialogo.convertekml()"}],"interface":[{id:"omenudataInterface1",text:"Interface normal",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/geral.htm?'+i3GEO.configura.sid"},{id:"omenudataInterface2",text:"OpenLayers",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/openlayers.htm?'+i3GEO.configura.sid"},{id:"omenudataInterface10",text:"OpenLayers tablet",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/openlayers_t.htm?'+i3GEO.configura.sid"},{id:"omenudataInterface3",text:"Flash",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/flamingo.htm?'+i3GEO.configura.sid"},{id:"omenudataInterface4",text:"Google Maps",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/googlemaps.phtml?'+i3GEO.configura.sid"},{id:"omenudataInterface5",text:"Google Earth",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/googleearth.phtml?'+i3GEO.configura.sid"},{id:"omenudataInterface6",text:$trad("u21"),url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/geradordelinks.htm')"},{id:"omenudataInterface7",text:"Serviços WMS",url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/ogc.htm')"},{id:"omenudataInterface8",text:"Hiperbólica",url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/hiperbolica.html')"},{id:"omenudataInterface9",text:"Download de dados",url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/datadownload.htm')"},{id:"omenudataInterface11",text:$trad("p20"),url:"javascript:i3GEO.mapa.dialogo.telaRemota()"}]}},tipoimagem:"nenhum",tipotip:"balao",alturatip:"200px",larguratip:"200px",funcaoTip:"i3GEO.mapa.dialogo.verificaTipDefault()",funcaoIdentifica:"i3GEO.mapa.dialogo.cliqueIdentificaDefault()",diminuixM:0,diminuixN:0,diminuiyM:100,diminuiyN:70,autotamanho:false,map3d:"",embedLegenda:"nao",templateLegenda:"",mashuppar:"",sid:"",locaplic:"",mapaRefDisplay:"block",visual:"default",cursores:{"identifica":{ff:"pointer",ie:"pointer"},"pan":{ff:"/imagens/cursores/pan.png",ie:"/imagens/cursores/pan.cur"},"area":{ff:"crosshair",ie:"crosshair"},"distancia":{ff:"crosshair",ie:"crosshair"},"zoom":{ff:"/imagens/cursores/zoom.png",ie:"/imagens/cursores/zoom.cur"},"contexto":{ff:"/imagens/cursores/contexto.png",ie:"/imagens/cursores/contexto.cur"},"identifica_contexto":{ff:"pointer",ie:"pointer"},"pan_contexto":{ff:"/imagens/cursores/pan_contexto.png",ie:"/imagens/cursores/pan_contexto.cur"},"zoom_contexto":{ff:"/imagens/cursores/zoom_contexto.png",ie:"/imagens/cursores/zoom_contexto.cur"}},listaDePropriedadesDoMapa:{"propriedades":[{text:"p2",url:"javascript:i3GEO.mapa.dialogo.tipoimagem()"},{text:"p15",url:"javascript:i3GEO.mapa.dialogo.outputformat()"},{text:"p3",url:"javascript:i3GEO.mapa.dialogo.opcoesLegenda()"},{text:"p4",url:"javascript:i3GEO.mapa.dialogo.opcoesEscala()"},{text:"p5",url:"javascript:i3GEO.mapa.dialogo.tamanho()"},{text:"p6",url:"javascript:i3GEO.navega.entorno.ativaDesativa()"},{text:"p7",url:"javascript:i3GEO.mapa.ativaLogo()"},{text:"p8",url:"javascript:i3GEO.mapa.dialogo.queryMap()"},{text:"p9",url:"javascript:i3GEO.mapa.dialogo.corFundo()"},{text:"p10",url:"javascript:i3GEO.mapa.dialogo.gradeCoord()"},{text:"p12",url:"javascript:i3GEO.mapa.dialogo.autoredesenha()"}]},tempoAplicar:4000,tempoMouseParado:2500,iniciaJanelaMensagens:true,mostraRosaDosVentos:"nao",liberaGuias:"nao",entorno:"nao",funcoesBotoes:{"botoes":[{iddiv:"historicozoom",tipo:"",dica:$trad("d1"),constroiconteudo:'i3GEO.gadgets.mostraHistoricoZoom()'},{iddiv:"zoomtot",tipo:"",dica:$trad("d2"),funcaoonclick:function(){if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.extentTotal);return}if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.extentTotal);return}i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,i3GEO.configura.tipoimagem,i3GEO.parametros.extentTotal);marcadorZoom=""}},{iddiv:"zoomli",tipo:"dinamico",dica:$trad("d3"),funcaoonclick:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){alert("Pressione a tecla CTRL junto com o botão esquerdo do mouse");return}var temp;temp="zoom";if(i3GEO.Interface.ATIVAMENUCONTEXTO&&i3GEO.Interface.ATUAL==="padrao"){temp="zoom_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic);g_operacao='navega';g_tipoacao='zoomli';i3GEO.barraDeBotoes.ativaIcone("zoomli");marcadorZoom="";if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLzoom);return}if(!$i("i3geoboxZoom")){i3GEO.navega.zoomBox.criaBox()}if(i3GEO.eventos.MOUSEDOWN.toString().search("i3GEO.navega.zoomBox.inicia()")<0){i3GEO.eventos.MOUSEDOWN.push("i3GEO.navega.zoomBox.inicia()")}if(i3GEO.eventos.MOUSEUP.toString().search("i3GEO.navega.zoomBox.termina()")<0){i3GEO.eventos.MOUSEUP.push("i3GEO.navega.zoomBox.termina()")}i3GEO.barraDeBotoes.BOTAOPADRAO="zoomli"}},{iddiv:"pan",tipo:"dinamico",dica:$trad("d4"),funcaoonclick:function(){var temp;g_tipoacao='pan';g_operacao='navega';i3GEO.barraDeBotoes.ativaIcone("pan");i3GEO.barraDeBotoes.BOTAOPADRAO="pan";if(i3GEO.Interface.ATUAL==="googlemaps"){i3GeoMap.setOptions({draggable:true});i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pan",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic);return}if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="pan";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="pan_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}marcadorZoom="";if(i3GEO.Interface.ATUAL==="openlayers"){return}panMapaInicia=function(exy){var k;leftinicial=0;topinicial=0;if($i("img")&&(g_tipoacao==="pan")){try{if(arguments.length>0){if(navm){k=event.button}else{k=exy.button}if(k===2){return}}}catch(h){}g_panM="sim";if($i(i3GEO.Interface.IDCORPO)){leftinicial=parseInt($i(i3GEO.Interface.IDCORPO).style.left,10);topinicial=parseInt($i(i3GEO.Interface.IDCORPO).style.top,10)}clicinicialx=objposicaocursor.imgx;clicinicialy=objposicaocursor.imgy;ddinicialx=objposicaocursor.ddx;ddinicialy=objposicaocursor.ddy;boxrefObj=$i("boxref");if(boxrefObj){proporcaoBox=i3GEO.parametros.w/parseInt(boxrefObj.style.width,10);boxrefObjLeft=parseInt(boxrefObj.style.left,10);boxrefObjTop=parseInt(boxrefObj.style.top,10)}}};panMapaDesloca=function(){var nx,ny,l,t;if(typeof(g_panM)!=='undefined'&&$i(i3GEO.Interface.IDMAPA)&&(g_panM==="sim")){nx=objposicaocursor.telax-leftinicial-clicinicialx;ny=objposicaocursor.telay-topinicial-clicinicialy;if(i3GEO.configura.entorno==="nao"){l=0;if(parseInt($i("i3geo").style.left,10)){l=parseInt($i("i3geo").style.left,10)}$i(i3GEO.Interface.IDMAPA).style.left=nx-l;t=0;if(parseInt($i("i3geo").style.top,10)){t=parseInt($i("i3geo").style.top,10)}$i(i3GEO.Interface.IDMAPA).style.top=ny-t;if(boxrefObj){boxrefObj.style.left=boxrefObjLeft-(nx/proporcaoBox);boxrefObj.style.top=boxrefObjTop-(ny/proporcaoBox)}}else{$left("img",i3GEO.parametros.w*-1+nx);$left("imgS",i3GEO.parametros.w*-1+nx);$left("imgL",i3GEO.parametros.w+nx);$left("imgO",i3GEO.parametros.w*-3+nx);$left("imgN",i3GEO.parametros.w*-1+nx);$top("img",i3GEO.parametros.h*-1+ny);$top("imgS",i3GEO.parametros.h*-1+ny);$top("imgL",i3GEO.parametros.h*-1+ny);$top("imgN",i3GEO.parametros.h*-1+ny);$top("imgO",i3GEO.parametros.h*-1+ny)}}};panMapaTermina=function(){if(g_tipoacao==="pan"){marcadorZoom="";g_panM="nao";try{var f="i3GEO.navega.timerNavega = null;if("+"i3GEO.navega.xy2xy('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"',"+ddinicialx+","+ddinicialy+","+objposicaocursor.ddx+","+objposicaocursor.ddy+",'"+i3GEO.parametros.mapexten+"','"+i3GEO.configura.tipoimagem+"'"+") == false"+"){"+"i3GEO.navega.zoompontoIMG('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"',"+objposicaocursor.imgx+","+objposicaocursor.imgy+")"+"}";clearTimeout(i3GEO.navega.timerNavega);i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)}catch(e){}}};if(i3GEO.eventos.MOUSEDOWN.toString().search("panMapaInicia()")<0){i3GEO.eventos.MOUSEDOWN.push("panMapaInicia()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("panMapaDesloca()")<0){i3GEO.eventos.MOUSEMOVE.push("panMapaDesloca()")}if(i3GEO.eventos.MOUSEUP.toString().search("panMapaTermina()")<0){i3GEO.eventos.MOUSEUP.push("panMapaTermina()")}}},{iddiv:"zoomiauto",tipo:"",dica:$trad("d5"),funcaoonclick:function(){i3GEO.navega.zoomin(i3GEO.configura.locaplic,i3GEO.configura.sid);marcadorZoom=''}},{iddiv:"zoomoauto",tipo:"",dica:$trad("d6"),funcaoonclick:function(){i3GEO.navega.zoomout(i3GEO.configura.locaplic,i3GEO.configura.sid);marcadorZoom=""}},{iddiv:"identifica",tipo:"dinamico",dica:$trad("d7"),funcaoonclick:function(){var temp;if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO&&i3GEO.Interface.ATUAL!=="googlemaps"){temp="identifica_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}i3GEO.barraDeBotoes.ativaIcone("identifica");g_tipoacao='identifica';g_operacao='identifica';cliqueIdentifica=function(){if(g_operacao==="identifica"||i3GEO.barraDeBotoes.BOTAOPADRAO==="identifica"){g_operacao="identifica";eval(i3GEO.configura.funcaoIdentifica)}var temp=function(){$i("i3GEOmarcaIdentifica").style.display="none"},i;i3GEO.util.criaPin("i3GEOmarcaIdentifica",i3GEO.configura.locaplic+"/imagens/marcaidentify.png",48,48,temp);i3GEO.util.posicionaImagemNoMapa("i3GEOmarcaIdentifica");i=$i("i3GEOmarcaIdentifica");if(i){i.style.display="block"}};if(i3GEO.eventos.MOUSECLIQUE.toString().search("cliqueIdentifica()")<0){i3GEO.eventos.MOUSECLIQUE.push("cliqueIdentifica()")}if(i3GEO.eventos.MOUSECLIQUE.toString().search("verificaTip()")>0){i3GEO.eventos.MOUSECLIQUE.remove("verificaTip()")}if(i3GEO.eventos.MOUSEPARADO.toString().search("verificaTip()")>0){i3GEO.eventos.MOUSEPARADO.remove("verificaTip()")}}},{iddiv:"identificaBalao",tipo:"dinamico",dica:$trad("d7a"),funcaoonclick:function(){if(i3GEO.arvoreDeCamadas.filtraCamadas("etiquetas","","diferente",i3GEO.arvoreDeCamadas.CAMADAS)===""){alert($trad("d31"));return}var temp;if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}i3GEO.barraDeBotoes.ativaIcone("identificaBalao");g_tipoacao='identifica';g_operacao='identifica';verificaTip=function(){if(i3GEO.util.verificaScriptTag("i3GEOF")===true){return}if($i("marcaIdentifica")){return}if(g_operacao==="identifica"){eval(i3GEO.configura.funcaoTip)}};if(i3GEO.eventos.MOUSECLIQUE.toString().search("cliqueIdentifica()")>0){i3GEO.eventos.MOUSECLIQUE.remove("cliqueIdentifica()")}if(i3GEO.eventos.MOUSECLIQUE.toString().search("verificaTip()")<0){i3GEO.eventos.MOUSECLIQUE.push("verificaTip()")}if(i3GEO.eventos.MOUSEPARADO.toString().search("verificaTip()")<0){i3GEO.eventos.MOUSEPARADO.push("verificaTip()")}}},{iddiv:"exten",tipo:"",dica:$trad("d8"),funcaoonclick:function(){i3GEO.mapa.dialogo.mostraExten()}},{iddiv:"referencia",tipo:"",dica:$trad("d9"),funcaoonclick:function(){i3GEO.maparef.inicia()}},{iddiv:"wiki",tipo:"",dica:$trad("d11"),funcaoonclick:function(){i3GEO.navega.dialogo.wiki()}},{iddiv:"metar",tipo:"",dica:$trad("d29"),funcaoonclick:function(){i3GEO.navega.dialogo.metar()}},{iddiv:"buscafotos",tipo:"",dica:"Fotos",funcaoonclick:function(){i3GEO.navega.dialogo.buscaFotos()}},{iddiv:"imprimir",tipo:"",dica:$trad("d12"),funcaoonclick:function(){i3GEO.mapa.dialogo.imprimir()}},{iddiv:"ondeestou",tipo:"",dica:$trad("d13"),funcaoonclick:function(){i3GEO.navega.zoomIP(i3GEO.configura.locaplic,i3GEO.configura.sid)}},{iddiv:"v3d",tipo:"",dica:$trad("d14"),funcaoonclick:function(){i3GEO.mapa.dialogo.t3d()}},{iddiv:"google",tipo:"",dica:$trad("d15"),funcaoonclick:function(){i3GEO.navega.dialogo.google()}},{iddiv:"scielo",tipo:"",dica:$trad("d16"),funcaoonclick:function(){scieloAtivo=false;g_operacao="navega";i3GEO.janela.cria("450px","190px",i3GEO.configura.locaplic+"/ferramentas/scielo/index.htm","","","Scielo");atualizascielo=function(){var docel;try{docel=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;if(docel.getElementById("resultadoscielo")){$i("wdocai").src=i3GEO.configura.locaplic+"/ferramentas/scielo/index.htm"}else{i3GEO.eventos.NAVEGAMAPA.remove("atualizascielo()");if(i3GEO.Interface.ATUAL==="googlemaps"){GEvent.removeListener(scieloDragend);GEvent.removeListener(scieloZoomend)}}}catch(e){scieloAtivo=false;i3GEO.eventos.NAVEGAMAPA.remove("atualizascielo()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizascielo()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizascielo()");if(i3GEO.Interface.ATUAL==="googlemaps"){scieloDragend=GEvent.addListener(i3GeoMap,"dragend",function(){atualizascielo()});scieloZoomend=GEvent.addListener(i3GeoMap,"zoomend",function(){atualizascielo()})}}}},{iddiv:"confluence",tipo:"",dica:$trad("d17"),funcaoonclick:function(){i3GEO.navega.dialogo.confluence()}},{iddiv:"lentei",tipo:"",dica:$trad("d18"),funcaoonclick:function(){if(i3GEO.navega.lente.ESTAATIVA==="nao"){i3GEO.navega.lente.inicia()}else{i3GEO.navega.lente.desativa()}}},{iddiv:"encolheFerramentas",tipo:"",dica:$trad("d19"),funcaoonclick:function(){i3GEO.guias.libera()}},{iddiv:"reinicia",tipo:"",dica:$trad("d20"),funcaoonclick:function(){i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));var temp=function(){var url=(window.location.href.split("?"));window.location.href=url[0]+"?"+i3GEO.configura.sid};i3GEO.php.reiniciaMapa(temp)}},{iddiv:"mede",tipo:"dinamico",dica:$trad("d21"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("mede");if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";i3GEO.util.mudaCursor(i3GEO.configura.cursores,"distancia",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}g_tipoacao="";g_operacao="";i3GEO.analise.medeDistancia.inicia()}},{iddiv:"area",tipo:"dinamico",dica:$trad("d21a"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("area");if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";i3GEO.util.mudaCursor(i3GEO.configura.cursores,"area",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}g_tipoacao="";g_operacao="";i3GEO.analise.medeArea.inicia()}},{iddiv:"inserexy",tipo:"dinamico",dica:$trad("d22"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("inserexy");g_tipoacao="";i3GEO.mapa.dialogo.cliquePonto()}},{iddiv:"inseregrafico",tipo:"dinamico",dica:$trad("d23"),funcaoonclick:function(){g_tipoacao="";i3GEO.mapa.dialogo.cliqueGrafico();i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pointer",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}},{iddiv:"selecao",tipo:"dinamico",dica:$trad("d24"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("selecao");i3GEO.mapa.dialogo.selecao()}},{iddiv:"textofid",tipo:"dinamico",dica:$trad("d25"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("textofid");g_tipoacao="";i3GEO.mapa.dialogo.cliqueTexto()}},{iddiv:"rota",tipo:"",dica:"Rota",funcaoonclick:function(){if(i3GEO.Interface.ATUAL!=="googlemaps"){alert("Operacao disponivel apenas na interface Google Maps");return}counterClick=1;var parametrosRota=function(overlay,latlng){var temp,janela;if(counterClick===1){counterClick++;alert("Clique o ponto de destino da rota");pontoRota1=latlng;return}if(counterClick===2){pontoRota2=latlng;counterClick=0;GEvent.removeListener(rotaEvento);janela=i3GEO.janela.cria("300px","300px","","center","","Rota");janela[2].style.overflow="auto";janela[2].style.height="300px";directions=new GDirections(i3GeoMap,janela[2]);temp=function(){$i("wdoca_corpo").innerHTML="Não foi possível criar a rota"};GEvent.addListener(directions,"error",temp);directions.load("from: "+pontoRota1.lat()+","+pontoRota1.lng()+" to: "+pontoRota2.lat()+","+pontoRota2.lng())}};rotaEvento=GEvent.addListener(i3GeoMap,"click",parametrosRota);alert("Clique o ponto de origem da rota")}}]}};
359   -function i3GEOmantemCompatibilidade(){try{i3GEO.configura.oMenuData=oMenuData}catch(e){alert("funcao depreciada")}try{i3GEO.configura.tipoimagem=g_tipoimagem}catch(e){alert("funcao depreciada")}try{i3GEO.configura.tipotip=g_tipotip}catch(e){alert("funcao depreciada")}try{i3GEO.configura.funcaoTip=g_funcaoTip}catch(e){alert("funcao depreciada")}try{i3GEO.configura.map3d=g_3dmap}catch(e){alert("funcao depreciada")}try{i3GEO.configura.embedLegenda=g_embedLegenda}catch(e){alert("funcao depreciada")}try{i3GEO.configura.templateLegenda=g_templateLegenda}catch(e){alert("funcao depreciada")}try{if(objmapa.finaliza!="")i3GEO.finaliza=objmapa.finaliza}catch(e){alert("funcao depreciada")};g_arvoreClick="";g_arvoreClicks="";if($i("longlat")){atualizalonglat=function(){$i("longlat").innerHTML=objposicaocursor.dmsx+" "+objposicaocursor.dmsy};YAHOO.util.Event.addListener($i("img"),"mousemove",atualizalonglat)}try{if(g_opcoesTemas=="nao"){i3GEO.arvoreDeCamadas.OPCOESTEMAS=false}}catch(e){alert("funcao depreciada")};try{i3GEO.maparef.fatorZoomDinamico=g_zoomRefDinamico}catch(e){alert("funcao depreciada")};try{i3GEO.configura.mashuppar=g_mashuppar}catch(e){alert("funcao depreciada")};try{if(!$i("arvoreAdicionaTema")){i3GEO.arvoreDeTemas.IDHTML=objmapa.guiaMenu+"obj"}else{i3GEO.arvoreDeTemas.IDHTML="arvoreAdicionaTema"}}catch(e){alert("funcao depreciada")};try{if(g_uploaddbf=="nao"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.uploaddbf=false}}catch(e){alert("funcao depreciada")};try{if(g_uploadlocal=="nao"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.uploadlocal=false}}catch(e){alert("funcao depreciada")};try{if(g_downloadbase=="nao"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.downloadbase=false}}catch(e){alert("funcao depreciada")};try{if(g_conectarwms=="nao"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.conectarwms=false}}catch(e){alert("funcao depreciada")};try{if(g_conectargeorss=="nao"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.conectargeorss=false}}catch(e){alert("funcao depreciada")};try{if(g_nuvemTags=="nao"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.nuvemTags=false}}catch(e){alert("funcao depreciada")};try{if(g_kml=="nao"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.kml=false}}catch(e){alert("funcao depreciada")};try{if(g_qrcode=="nao"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.qrcode=false}}catch(e){alert("funcao depreciada")};try{if(g_tipoacao!=""){i3GEO.barraDeBotoes.BOTAOPADRAO=g_tipoacao}}catch(e){alert("funcao depreciada")}try{if(g_listaPropriedades){i3GEO.configura.listaDePropriedadesDoMapa=g_listaPropriedades}}catch(e){alert("funcao depreciada")};try{if(g_tempo_aplicar){i3GEO.configura.tempoAplicar=g_tempo_aplicar}}catch(e){alert("funcao depreciada")};try{if(g_janelaMen=="nao"){i3GEO.configura.iniciaJanelaMensagens=false}}catch(e){alert("funcao depreciada")};try{if(g_locaplic){i3GEO.configura.locaplic=g_locaplic}}catch(e){alert("funcao depreciada")};try{if(g_tempotip){i3GEO.configura.tempoMouseParado=g_tempotip}}catch(e){alert("funcao depreciada")};try{if(g_mostraRosa){i3GEO.configura.mostraRosaDosVentos=g_mostraRosa}}catch(e){alert("funcao depreciada")};try{if(g_visual){i3GEO.configura.visual=g_visual}}catch(e){alert("funcao depreciada")};try{if(g_mapaRefDisplay){i3GEO.configura.mapaRefDisplay=g_mapaRefDisplay}}catch(e){alert("funcao depreciada")};try{if(g_docaguias){i3GEO.configura.liberaGuias=g_docaguias}}catch(e){alert("funcao depreciada")};if(window.location.href.split("?")[1]){g_sid=window.location.href.split("?")[1];if(g_sid.split("#")[0]){g_sid=g_sid.split("#")[0]}}else{g_sid=""}i3GEO.configura.sid=g_sid;try{i3GEO.guias.ATUAL=g_guiaativa}catch(e){alert("funcao depreciada")}try{i3GEO.navega.autoRedesenho.INTERVALO=g_autoRedesenho}catch(e){alert("funcao depreciada")}try{i3GEO.eventos.NAVEGAMAPA=g_funcoesNavegaMapaDefault}catch(e){alert("funcao depreciada")}try{i3GEO.eventos.MOUSEMOVE=g_funcoesMousemoveMapaDefault}catch(e){alert("funcao depreciada")}try{i3GEO.eventos.MOUSECLIQUE=g_funcoesClickMapaDefault}catch(e){alert("funcao depreciada")}try{i3GEO.configura.entorno=g_entorno}catch(e){alert("funcao depreciada")}try{i3GEO.navega.lente.POSICAOX=g_posicaoLenteX=0}catch(e){alert("funcao depreciada")}try{i3GEO.navega.lente.POSICAOY=g_posicaoLenteY}catch(e){alert("funcao depreciada")}try{i3GEO.navega.destacaTema.TAMANHO=destacaTamanho}catch(e){alert("funcao depreciada")}if(!$i("tip")){var novoel=document.createElement("div");novoel.id="tip";novoel.style.position="absolute";novoel.style.zIndex=5000;if(navm){novoel.style.filter="alpha(opacity=90)"}document.body.appendChild(novoel)}try{objmapa.atualizaListaTemas=function(temas){alert("atualizaListaTemas foi depreciado. Utilize i3GEO.arvoreDeCamadas")}}catch(e){alert("funcao depreciada")}}if(typeof(i3GEO)=='undefined'){i3GEO=[]}cpObj=new cpaint();cpObj.set_async("true");cpObj.set_response_type("JSON");function Mapa(e,m){alert("Funcao Mapa foi depreciada. Utilize i3GEO.cria()");i3GEO.cria();this.inicializa=function(){i3GEO.finaliza=this.finaliza;i3GEO.inicia()}}objaguarde={abre:function(){alert("objaguarde foi depreciada. Utilize i3GEO.janela");i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"))},fecha:function(){alert("objaguarde foi depreciada. Utilize i3GEO.janela");i3GEO.janela.fechaAguarde("i3GEO.atualiza")}};function iCookie(nome,valor){alert("iCookie foi depreciado. Utilize i3GEO.util.insereCookie");i3GEO.util.insereCookie(nome,valor)}function pCookie(nome){alert("pCookie foi depreciado. Utilize i3GEO.util.pegaCookie");i3GEO.util.pegaCookie(nome)}function wdocaf(wlargura,waltura,wsrc,nx,ny,texto){var janela=i3GEO.janela.cria(wlargura,waltura,wsrc,nx,ny,texto)}function wdocaf2(wlargura,waltura,wsrc,nx,ny,texto){var id=YAHOO.util.Dom.generateId();i3GEO.janela.cria(wlargura,waltura,wsrc,nx,ny,texto,id,true)}function processevent1(exy1){alert("funcao depreciada")}function mensagemBanner(){alert("funcao depreciada")}function borra(){alert("funcao depreciada")}function movecursor(){alert("funcao depreciada");if($i("obj")){if($i("openlayers")||$i("flamingo")){$i("obj").style.display="none"}else{var obje=$i("obj").style;if($i("img")){eval("obje."+g_tipotop+"= objposicaocursor.telay + 9 + g_postpx");eval("obje."+g_tipoleft+"= objposicaocursor.telax + 9 + g_postpx")}else{eval("obje."+g_tipotop+"= objposicaocursor.telay - 15 + g_postpx");eval("obje."+g_tipoleft+"= objposicaocursor.telax + 15 + g_postpx")}}}if($i("box1")){var bx=$i("box1");if(bx.style.visibility!="visible"){bx.style.left=objposicaocursor.telax+g_postpx;bx.style.top=objposicaocursor.telay+g_postpx}}}function buscaRapida(){alert("funcao depreciada");i3geo_buscarapida()}function initJanelaZoom(qual){alert("funcao depreciada");i3GEO.barraDeBotoes.reativa(qual-1)}function sobeferramentas(){alert("funcao depreciada")}function desceferramentas(){alert("funcao depreciada")}function arvoreclick(itemID){alert("funcao depreciada");if(itemID.search("tema")==0){if($i(itemID).checked==true){$i(itemID).checked=false}else{$i(itemID).checked=true}}}function pegaTema(celula){alert("funcao depreciada");var nos=celula.parentNode.childNodes;var tempi=nos.length;for(var no=0;no<tempi;no++){if(nos[no].type=="checkbox"){return nos[no].value}}}function gerafilmef(qs){alert("funcao depreciada")}function gravaQuadro(variavel,valor){alert("funcao depreciada");i3GEO.gadgets.quadros.grava(variavel,valor)}function avancaQuadro(){alert("funcao depreciada");i3GEO.gadgets.quadros.avanca()}function zoomAnterior(){alert("funcao depreciada")}function zoomProximo(){alert("funcao depreciada")}function opcoesQuadros(){alert("funcao depreciada")}function filmef(o){alert("funcao depreciada")}function rebobinaf(){alert("funcao depreciada")}function filmezf(o){alert("funcao depreciada")}function quadrofilme(){alert("funcao depreciada")}function filmeanimaf(){alert("funcao depreciada")}function filmeanimarodaf(janima){alert("funcao depreciada")}function pegaimagens(){alert("funcao depreciada")}function calculaArea(pontos,pixel){alert("funcao depreciada");return(i3GEO.calculo.area(pontos,pixel))}function calculadistancia(lga,lta,lgb,ltb){alert("funcao depreciada");return(i3GEO.calculo.distancia(lga,lta,lgb,ltb))}function initJanelaRef(){alert("funcao depreciada");i3GEO.maparef.inicia()}function ajaxReferencia(retorno){alert("funcao depreciada");i3GEO.maparef.processaImagem(retorno)}function clicouRef(){alert("funcao depreciada")}function movimentoRef(obj){alert("funcao depreciada")}function mostraTip(retorno){alert("funcao depreciada");if(!$i("tip")){var novoel=document.createElement("div");novoel.id="tip";novoel.style.position="absolute";novoel.style.zIndex=5000;if(navm){novoel.style.filter="alpha(opacity=90)"}document.body.appendChild(novoel)}var i=$i("i3geo_rosa");if(i)i.style.display="none";var mostra=false;var retorno=retorno.data;if((retorno!="erro")&&(retorno!=undefined)){if($i("img")){$i("img").title=""}if(retorno!=""){var res="<div id='cabecatip' style='text-align:left;background-color:rgb(240,240,240)'><span style='color:navy;cursor:pointer;text-align:left' onclick='javascript:objmapaparado=\"cancela\"'>parar&nbsp;&nbsp;</span>";res+="<span style='color:navy;cursor:pointer;text-align:left' onclick='javascript:i3GEO.janela.TIPS.push($i(\"tip\"));$i(\"tip\").id=\"\";$i(\"cabecatip\").innerHTML =\"\";$i(\"cabecatip\").id =\"\"' >fixar</span></div>";var temas=retorno.split("!");var tema=temas.length-1;if(tema>=0){do{var titulo=temas[tema].split("@");if(g_tipotip=="completo"){res+="<span style='text-align:left;font-size:9pt'><b>"+titulo[0]+"</b></span><br>"}var ocorrencias=titulo[1].split("*");var ocorrencia=ocorrencias.length-1;if(ocorrencia>=0){do{if(ocorrencias[ocorrencia]!=""){var pares=ocorrencias[ocorrencia].split("##");var paresi=pares.length;for(var par=0;par<paresi;par++){var valores=pares[par].split("#");if(g_tipotip=="completo"){res=res+"<span class='tiptexto' style='text-align:left;font-size:9pt'>"+valores[0]+" <i>"+valores[1]+"</i></span><br>";var mostra=true}else{res=res+"<span class='tiptexto' style='text-align:left;font-size:9pt'><i>"+valores[1]+"</i></span><br>";var mostra=true}}}}while(ocorrencia--)}}while(tema--)}if(!mostra){$i("tip").style.display="none";return}if($i("janelaMen")){$i("janelaMenTexto").innerHTML=res}else{var i=$i("tip");i.innerHTML="<table style='text-align:left'><tr><td style='text-align:left'>"+res+"</td></tr></table>";ist=i.style;ist.top=objposicaocursor.telay-10;ist.left=objposicaocursor.telax-20;ist.display="block"}}}}function trataErro(){alert("funcao depreciada");i3GEO.janela.fechaAguarde()}function mostraguiaf(guia){alert("funcao depreciada");i3GEO.guias.mostra(guia)}function ativaGuias(){alert("funcao depreciada");for(var g=0;g<12;g++){if($i("guia"+g))var gpai=$i("guia"+g).parentNode}if(gpai){gpai.id="guiasYUI";gpai.className="yui-navset";var ins='<ul class="yui-nav" style="border-width:0pt 0pt 0px;border-color:rgb(240,240,240);border-bottom-color:white;">';try{if($i(objmapa.guiaTemas)){$i(objmapa.guiaTemas).innerHTML=$trad("g1")}if($i(objmapa.guiaMenu)){$i(objmapa.guiaMenu).innerHTML=$trad("g2")}if($i(objmapa.guiaLegenda)){$i(objmapa.guiaLegenda).innerHTML=$trad("g3")}if($i(objmapa.guiaListaMapas)){$i(objmapa.guiaListaMapas).innerHTML=$trad("g4")}}catch(e){alert("funcao depreciada")};for(var g=0;g<12;g++){if($i("guia"+g)){var tituloguia=$i("guia"+g).innerHTML;var re=new RegExp("&nbsp;","g");var tituloguia=tituloguia.replace(re,'');ins+='<li><a href="#"><em><div id="guia'+g+'" >'+tituloguia+'</div></em></a></li>'}}ins+="</ul>";gpai.innerHTML=ins;for(var g=0;g<12;g++){if($i("guia"+g)){eval('$i("guia'+g+'").onclick = function(){g_guiaativa = "guia'+g+'";mostraguiaf('+g+');}');$i("guia"+g).onmouseover=function(){var bcg=this.parentNode.parentNode.style;var cor=bcg.background.split(" ")[0];if(cor!="white")bcg.background="#bfdaff"};$i("guia"+g).onmouseout=function(){var bcg=this.parentNode.parentNode.style;var cor=bcg.background.split(" ")[0];if(cor!="white")bcg.background="transparent"};if($i("guia"+g+"obj")){$i("guia"+g+"obj").style.overflow="auto";$i("guia"+g+"obj").style.height=i3GEO.parametros.h}}}}if($i(objmapa.guiaTemas)){$i(objmapa.guiaTemas).onclick=function(){g_guiaativa=objmapa.guiaTemas;mostraguiaf(1)}}if($i(objmapa.guiaMenu)){$i(objmapa.guiaMenu).onclick=function(){g_guiaativa=objmapa.guiaMenu;mostraguiaf(2);if(!$i("arvoreAdicionaTema")){var ondeArvore=objmapa.guiaMenu+"obj"}else{var ondeArvore="arvoreAdicionaTema"}if(document.getElementById("outrasOpcoesAdiciona")){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde="outrasOpcoesAdiciona";i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore=false}i3GEO.arvoreDeTemas.cria(i3GEO.configura.sid,i3GEO.configura.locaplic,ondeArvore)}}if($i(objmapa.guiaLegenda)){$i(objmapa.guiaLegenda).onclick=function(){g_guiaativa=objmapa.guiaLegenda;mostraguiaf(4);objmapa.atualizaLegendaHTML()}}if($i(objmapa.guiaListaMapas)){$i(objmapa.guiaListaMapas).onclick=function(){g_guiaativa=objmapa.guiaListaMapas;mostraguiaf(5);if($i("banners")){$i("banners").innerHTML==$trad("o1");var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegaMapas&g_sid="+i3GEO.configura.sid;cpObj.call(p,"pegaMapas",pegaMapas)}else{alert("id banners nao encontrado")}}}}function docaguias(){alert("funcao depreciada");i3GEO.guias.libera()}function autoRedesenho(opcao){alert("funcao depreciada")}function selecao(){alert("funcao depreciada")}function cliqueSelecao(){alert("funcao depreciada")}function zoomboxf(tipo){alert("funcao depreciada")}function i3geo_comboGruposMenu(funcaoOnchange,idDestino,idCombo,largura,altura){alert("funcao depreciada")}function i3geo_comboSubGruposMenu(funcaoOnchange,idDestino,idCombo,idGrupo,largura,altura){alert("funcao depreciada")}function i3geo_comboTemasMenu(funcaoOnchange,idDestino,idCombo,idGrupo,idSubGrupo,largura,altura){alert("funcao depreciada")}function remapaf(){i3GEO.atualiza("");alert("funcao depreciada")}function limpacontainerf(){alert("funcao depreciada")}function inseremarcaf(xi,yi,funcaoOnclick,container){alert("funcao depreciada");i3GEO.utl.insereMarca.cria(xi,yi,funcaoOnclick,container)}function moveSelecaoPoli(){alert("funcao depreciada")}function cliqueSelecaoPoli(){alert("funcao depreciada")}function ativaEntorno(){alert("funcao depreciada")}function geraURLentorno(){alert("funcao depreciada")}function ajustaEntorno(){alert("funcao depreciada")}function ajaxabrelente(retorno){alert("funcao depreciada")}function movelentef(){alert("funcao depreciada")}function ativaClicks(docMapa){alert("funcao depreciada")}function incluir(path){i3GEO.util.adicionaSHP(path);alert("funcao depreciada")}function pontosdist(){this.xpt=[];this.ypt=[];this.dist=[];this.xtela=[];this.ytela=[];this.ximg=[];this.yimg=[];this.linhas=[];alert("funcao depreciada")}function mudaiconf(i){i3GEO.barraDeBotoes.ativaIcone(i);alert("funcao depreciada")}function calcposf(){i3GEO.mapa.ajustaPosicao();alert("funcao depreciada")}function recuperamapa(){alert("funcao depreciada")}function desenhoRichdraw(tipo,objeto,n){alert("funcao depreciada")}function ajaxhttp(){alert("funcao depreciada");try{var objhttp1=new XMLHttpRequest()}catch(ee){try{var objhttp1=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{var objhttp1=new ActiveXObject("Microsoft.XMLHTTP")}catch(E){var objhttp1=false}}}return(objhttp1)}function ajaxexecAS(programa,funcao){alert("funcao depreciada");var ohttp=ajaxhttp();ohttp.open("POST",programa,true);var retorno="";ohttp.onreadystatechange=function(){if(ohttp.readyState==4){retorno=ohttp.responseText;var reg=/Warning/gi;if(retorno.search(reg)!=-1){alert("OOps! Ocorreu um erro\n"+retorno);return}var reg=/erro/gi;if(retorno.search(reg)!=-1){alert("OOps! Ocorreu um erro\n"+retorno);return}if(funcao!="volta"){eval(funcao+'("'+retorno+'")')}}};ohttp.send(null)}function ajaxexec(programa,funcao){alert("funcao depreciada");var objhttp=ajaxhttp();objhttp.open('GET',programa,false);objhttp.send(null);if(objhttp.status==200){if(funcao!="volta"){eval(funcao+'("'+objhttp.responseText+'")')}else{return objhttp.responseText}}}function ajaxLegendaHTML(retorno){alert("funcao depreciada")}function ajaxLegendaImagem(retorno){alert("funcao depreciada")}function mede(){alert("funcao depreciada")}function cliqueMede(){alert("funcao depreciada")}function moveMede(){alert("funcao depreciada")}function area(){alert("funcao depreciada")}function cliqueArea(){alert("funcao depreciada")}function moveArea(){alert("funcao depreciada")}function textofid(){alert("funcao depreciada")}function inserexy(){alert("funcao depreciada")}function cliqueInseretoponimo(){alert("funcao depreciada")}function cliqueInserexy(){alert("funcao depreciada")}function inseregrafico(){alert("funcao depreciada")}function cliqueInseregrafico(){alert("funcao depreciada")}function ativaHistoricoZoom(iddiv){alert("funcao depreciada")}function ajaxhttp(){alert("funcao depreciada");return i3GEO.util.ajaxhttp()}function ajaxCorpoMapa(retorno){i3GEO.mapa.corpo.veirifca(retorno);alert("funcao depreciada")}function ajaxredesenha(retorno){i3GEO.atualiza(retorno);alert("funcao depreciada")}function ajaxIniciaParametros(retorno){i3GEO.atualiza(retorno);alert("funcao depreciada")}function montaMenuSuspenso(iddiv){i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.idhtml=iddiv;i3GEO.gadgets.mostraMenuSuspenso();alert("funcao depreciada")}
360   -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]]}};
361   -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);if($i("localizarxygeoProjxg")){var temp=function(){i3GEO.coordenadas.atualizaGeo(objposicaocursor.dmsx,objposicaocursor.dmsy,"localizarxygeoProj")};YAHOO.util.Event.addListener(divgeo,"mousemove",temp)}}catch(men){alert("Erro ao tentar criar container richdraw "+men)}},criaDivContainer:function(){desenhoUltimaLinha="";desenhoUltimaLinhaPol="";if(!$i("divGeometriasTemp")){var pos,novoel,ne;pos=[0,0];pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));novoel=document.createElement("div");novoel.id="divGeometriasTemp";ne=novoel.style;ne.cursor="crosshair";ne.zIndex=0;if(i3GEO.Interface.TABLET===true){ne.zIndex=5000}ne.position="absolute";ne.width=i3GEO.parametros.w;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=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);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="<select onchange='i3GEO.desenho.definePadrao(this.value)'>";for(i=0;i<n;i+=1){sel="";if(lista[i]===i3GEO.desenho.estiloPadrao){sel="select"}caixa+="<option value='"+lista[i]+"' sel >"+lista[i]+"</option>"}caixa+="</select>";return caixa}};
362   -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.Interface={TABLET:false,ALTTABLET:"openlayers_t.htm",OUTPUTFORMAT:"AGG_Q",BARRABOTOESTOP:12,BARRABOTOESLEFT:3,BARRADEZOOMTOP:7,BARRADEZOOMLEFT: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")}if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.adicionaKml("foo")}},cria:function(w,h){i3GEO.Interface[i3GEO.Interface.ATUAL].cria(w,h)},inicia:function(w,h){var temp=window.location.href.split("?")[0],gadgets=i3GEO.gadgets;if($i("i3GEOcompartilhar")){i3GEO.social.compartilhar("i3GEOcompartilhar",temp,temp,"semtotal")}gadgets.quadros.inicia(10);gadgets.quadros.grava("extensao",i3GEO.parametros.extentTotal);gadgets.mostraBuscaRapida();gadgets.mostraVersao();gadgets.mostraEmail();i3GEO.guias.cria();if($i("mst")){$i("mst").style.display="block"}if(i3GEO.configura.entorno.toLowerCase()==="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(){if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){i3GEO.barraDeBotoes.inicializaBarra()}else{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="<input style='position:relative;top:0px;left:0px;' type=image src='' id='img' />";$i(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:"&nbsp;<span class='container-close'></span>"},{text:"<img class='rosamais' style='height:18px;' src='"+$im("branco.gif")+"'><span style='position:relative;top:-4px;'> Aproxima</span>",onclick:{fn:i3GEO.navega.zoomin}},{text:"<img class='rosamenos' style='height:18px;' src='"+$im("branco.gif")+"'><span style='position:relative;top:-4px;'> Afasta</span>",onclick:{fn:i3GEO.navega.zoomout}},{text:"<img class='rosanorte' style='height:18px;' src='"+$im("branco.gif")+"'><span style='position:relative;top:-7px;'> Norte</span>",onclick:{fn:i3GEO.navega.panFixoNorte}},{text:"<img class='rosasul' style='height:18px;' src='"+$im("branco.gif")+"'><span style='position:relative;top:-7px;'> Sul</span>",onclick:{fn:i3GEO.navega.panFixoSul}},{text:"<img class='rosaleste' style='height:18px;' src='"+$im("branco.gif")+"'><span style='position:relative;top:-7px;'> Leste</span>",onclick:{fn:i3GEO.navega.panFixoLeste}},{text:"<img class='rosaoeste' style='height:18px;' src='"+$im("branco.gif")+"'><span style='position:relative;top:-7px;'> Oeste</span>",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();gadgets.mostraMenuLista();i3GEO.eventos.ativa(i);i3GEO.coordenadas.mostraCoordenadas();gadgets.mostraEscalaNumerica();gadgets.mostraEscalaGrafica();gadgets.visual.inicia();iu.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",configura.listaDePropriedadesDoMapa);i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,configura.sid,configura.locaplic);i3GEO.ajuda.ativaLetreiro(parametros.mensagens);i3GEO.Interface.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(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='<div id=flamingo style="width:0px;height:0px;text-align:left;background-image:url(/"'+i3GEO.configura.locaplic+'/imagens/i3geo1bw.jpg/")"></div>';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("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa)},ativaBotoes:function(){}},openlayers:{FUNDOTEMA:"yellow",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();openlayers.sobeLayersGraficos()},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='<div id=openlayers style="width:0px;height:0px;text-align:left;background-image:url('+i3GEO.configura.locaplic+'/imagens/i3geo1bw.jpg)"></div>';i.innerHTML=ins}f=$i("openlayers");f.style.width=w;f.style.height=h}i3GEO.Interface.IDMAPA="openlayers";if(i3GEO.Interface.TABLET===true){i3geoOL=new OpenLayers.Map({div:"openlayers",theme:null,controls:[new OpenLayers.Control.Attribution(),new OpenLayers.Control.TouchNavigation({dragPanOptions:{interval:100,enableKinetic:true}}),new OpenLayers.Control.ZoomPanel()]})}else{bb.INCLUIBOTAO.zoomli=true;bb.INCLUIBOTAO.pan=true;bb.INCLUIBOTAO.zoomtot=true;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,layersn,openlayers=i3GEO.Interface.openlayers;i3GEO.util.multiStep([openlayers.registraEventos,openlayers.zoom2ext],[null,[i3GEO.parametros.mapexten]],function(){});openlayers.criaLayers();if(openlayers.GADGETS.PanZoomBar===true){i3GEO.Interface.openlayers.OLpanzoombar=new OpenLayers.Control.PanZoomBar();i3geoOL.addControl(i3GEO.Interface.openlayers.OLpanzoombar);i3GEO.Interface.openlayers.OLpanzoombar.div.style.zIndex=5000;i3GEO.Interface.openlayers.OLpanzoombar.div.style.top=i3GEO.Interface.BARRADEZOOMTOP+"px";i3GEO.Interface.openlayers.OLpanzoombar.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+"px"}if(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<layersn;i++){texto="<input type=radio style='"+estilo+"' onclick='i3GEO.Interface.openlayers.ativaFundo(this.value)' name=i3GEObaseLayer value='"+layers[i].id+"' />"+layers[i].name;temp.propriedades.push({text:texto,url:""})}i3GEO.util.arvore("<b>"+$trad("p16")+"</b>","listaLayersBase",temp)}else{if(openlayers.GADGETS.LayerSwitcher===true){i3geoOL.addControl(new OpenLayers.Control.LayerSwitcher())}}if(openlayers.GADGETS.ScaleLine===true){pz=new OpenLayers.Control.ScaleLine();i3geoOL.addControl(pz);pz.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+5+"px"}if(openlayers.GADGETS.OverviewMap===true){i3geoOL.addControl(new OpenLayers.Control.OverviewMap())}if(i3GEO.Interface.TABLET===false){i3GEO.Interface.openlayers.OLpan=new OpenLayers.Control.Navigation();i3GEO.Interface.openlayers.OLzoom=new OpenLayers.Control.ZoomBox();i3GEO.Interface.openlayers.OLpanel=new OpenLayers.Control.Panel();i3GEO.Interface.openlayers.OLpanel.addControls([i3GEO.Interface.openlayers.OLpan,i3GEO.Interface.openlayers.OLzoom]);i3geoOL.addControl(i3GEO.Interface.openlayers.OLpanel)}if(i3GEO.configura.mapaRefDisplay!=="none"){if(i3GEO.util.pegaCookie("i3GEO.configura.mapaRefDisplay")){i3GEO.configura.mapaRefDisplay=i3GEO.util.pegaCookie("i3GEO.configura.mapaRefDisplay")}if(i3GEO.configura.mapaRefDisplay==="block"){i3GEO.maparef.inicia()}}if(i3GEO.Interface.TABLET===false){i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLpan)}};i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.openlayers.ligaDesliga(this);i3GEO.eventos.executaEventos(i3GEO.eventos.ATUALIZAARVORECAMADAS);";i3GEO.util.multiStep([i3GEO.coordenadas.mostraCoordenadas,montaMapa,i3GEO.gadgets.mostraMenuSuspenso,i3GEO.ajuda.ativaLetreiro,i3GEO.idioma.mostraSeletor,i3GEO.gadgets.mostraEscalaNumerica,i3GEO.util.arvore,i3GEO.gadgets.mostraMenuLista,i3GEO.Interface.ativaBotoes],[null,null,null,[i3GEO.parametros.mensagens],null,null,["<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa],null,null],function(){});i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===true){i3GEO.Interface.openlayers.adicionaListaKml()}if(i3GEO.parametros.kmlurl!==""){i3GEO.Interface.openlayers.adicionaKml(true,i3GEO.parametros.kmlurl)}},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.openlayers.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i,zoom;if(!$i("arvoreCamadasKml")){i3GEO.Interface.openlayers.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=true}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===false){i3GEO.arvoreDeCamadas.MOSTRALISTAKML=true;i3GEO.Interface.openlayers.criaArvoreKML()}i3GEO.Interface.openlayers.adicionaNoArvoreKml(url,titulo,ativo,ngeoxml)},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.openlayers.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.openlayers.ARVORE.getRoot();titulo="<table><tr><td><b>Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false;if(i3GEO.parametros.editor==="sim"){d=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/webservices.html' target=blank >Editar cadastro</a>",idmenu:"",enableHighlight:false,expanded:false},node)}},adicionaNoArvoreKml:function(url,nomeOverlay,ativo,id){var root,node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.openlayers.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}root=i3GEO.Interface.openlayers.ARVORE.getRoot();node=i3GEO.Interface.openlayers.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.openlayers.ativaDesativaCamadaKml(this,\""+url+"\")' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";if(navm){estilo="cursor:default;vertical-align:35%;padding-top:0px;"}else{estilo="cursor:default;vertical-align:top;"}html+="&nbsp;<span style='"+estilo+"'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.openlayers.ARVORE.draw();i3GEO.Interface.openlayers.ARVORE.collapseAll();node.expand();if(ativo===true){i3GEO.Interface.openlayers.insereLayerKml(id,url)}},insereLayerKml:function(id,url){var temp;eval(id+" = new OpenLayers.Layer.Vector('"+id+"', {displayOutsideMaxExtent:true,displayInLayerSwitcher:false,visibility:true, strategies: [new OpenLayers.Strategy.Fixed()],protocol: new OpenLayers.Protocol.HTTP({url: '"+url+"',format: new OpenLayers.Format.KML({extractStyles: true,extractAttributes: true,maxDepth: 5})})})");eval("i3geoOL.addLayer("+id+");");eval("temp = "+id+".div;");temp.onclick=function(e){var targ,id,temp,features,n,i,j,html="";if(!e){e=window.event}if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}temp=targ.id.split("_");if(temp[0]==="OpenLayers.Geometry.Point"){id=targ.id;temp=i3geoOL.getLayer(this.id);features=temp.features;n=features.length;for(i=0;i<n;i++){if(features[i].geometry.id===id){for(j in features[i].attributes){html+=j+": "+features[i].attributes[j]}g=features[i].geometry;i3geoOL.addPopup(new OpenLayers.Popup.FramedCloud("kml",new OpenLayers.LonLat(g.x,g.y),null,html,null,true))}}}}},ativaDesativaCamadaKml:function(obj,url){if(!obj.checked){eval(obj.value+".setVisibility(false);")}else{if(!(i3geoOL.getLayersByName(obj.value)[0])){i3GEO.Interface.openlayers.insereLayerKml(obj.value,url)}else{eval(obj.value+".setVisibility(true);")}}},criaLayers:function(){var configura=i3GEO.configura,url=configura.locaplic+"/classesphp/mapa_openlayers.php?g_sid="+i3GEO.configura.sid+"&TIPOIMAGEM="+configura.tipoimagem,urlfundo=configura.locaplic+"/classesphp/mapa_openlayers.php?g_sid="+i3GEO.configura.sid+"&layer=&tipolayer=fundo&TIPOIMAGEM="+configura.tipoimagem,nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,layer,layers,camada,urllayer,opcoes,i,n,temp,fundoIsBase=true;try{temp=i3GEO.Interface.openlayers.LAYERSADICIONAIS;n=temp.length;for(i=0;i<n;i++){if(temp[i].isBaseLayer===true&&temp[i].visibility===true){fundoIsBase=false}}}catch(e){}if(i3geoOL.getLayersByName("Nenhum").length===0&&fundoIsBase===true){layer=new OpenLayers.Layer.WMS("Nenhum",urlfundo,{map_imagetype:i3GEO.Interface.OUTPUTFORMAT},{ratio:1,singleTile:true,isBaseLayer:true,opacity:1,visibility:true});i3geoOL.addLayer(layer)}opcoes={gutter:0,isBaseLayer:false,displayInLayerSwitcher:false,opacity:1,singleTile:!(i3GEO.Interface.openlayers.TILES),ratio:1,buffer:i3GEO.Interface.openlayers.BUFFER,wrapDateLine:true,transitionEffect:"resize",eventListeners:{"loadstart":i3GEO.Interface.openlayers.loadStartLayer,"loadend":i3GEO.Interface.openlayers.loadStopLayer}};for(i=nlayers-1;i>=0;i--){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];if(i3geoOL.getLayersByName(camada.name).length===0){urllayer=url+"&layer="+camada.name+"&r="+Math.random();try{temp=camada.type===0?opcoes.gutter=20:opcoes.gutter=0;temp=camada.transitioneffect==="nao"?opcoes.transitionEffect="null":opcoes.transitionEffect="resize";if(camada.connectiontype===7&&camada.wmsurl!==""&&camada.usasld.toLowerCase()!="sim"){urllayer=camada.wmsurl+"&r="+Math.random();layer=new OpenLayers.Layer.WMS(camada.name,urllayer,{LAYERS:camada.name,format:camada.wmsformat,transparent:true},opcoes);if(camada.wmssrs!=""){layer.url=layer.url+"&SRS="+camada.wmssrs+"&CRS="+camada.wmssrs}}else{if(camada.tiles==="nao"||camada.escondido.toLowerCase()==="sim"||camada.connectiontype===10||camada.type===0||camada.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,{LAYERS:camada.name,map_imagetype:i3GEO.Interface.OUTPUTFORMAT},opcoes)}}catch(e){}if(camada.escondido.toLowerCase()==="sim"){layer.transitionEffect="null"}i3geoOL.addLayer(layer)}else{layer=i3geoOL.getLayersByName(camada.name)[0]}temp=camada.status==0?layer.setVisibility(false):layer.setVisibility(true)}try{i3geoOL.addLayers(i3GEO.Interface.openlayers.LAYERSADICIONAIS)}catch(e){}},sobeLayersGraficos:function(){var nlayers=i3geoOL.getNumLayers(),layers=i3geoOL.layers,i;for(i=0;i<nlayers;i++){if(layers[i].CLASS_NAME=="OpenLayers.Layer.Vector"){i3geoOL.raiseLayer(i3geoOL.layers[i],nlayers)}}},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}i3GEO.Interface.openlayers.removeTodosOsLayers();i3GEO.Interface.openlayers.criaLayers()},removeTodosOsLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,layer,i,camada;for(i=nlayers-1;i>=0;i--){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];layer=i3geoOL.getLayersByName(camada.name)[0];i3geoOL.removeLayer(layer,false)}},alteraParametroLayers:function(parametro,valor){var layers=i3geoOL.layers,nlayers=layers.length,i,url,reg;for(i=0;i<nlayers;i+=1){url=layers[i].url;reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");layers[i].url=url.replace(reg,"");eval("layers[i].mergeNewParams({"+parametro+":valor})");layers[i].redraw()}},loadStartLayer:function(event){i3GEO.Interface.STATUS.atualizando.push(event.object.name);YAHOO.util.Dom.setStyle("ArvoreTituloTema"+event.object.name,"background",i3GEO.Interface.openlayers.FUNDOTEMA)},loadStopLayer:function(event){i3GEO.Interface.STATUS.atualizando.remove(event.object.name);YAHOO.util.Dom.setStyle("ArvoreTituloTema"+event.object.name,"background","")},ordenaLayers:function(){var ordem=i3GEO.arvoreDeCamadas.CAMADAS,nordem=ordem.length,layer,layers,i,maiorindice;layers=i3geoOL.layers;maiorindice=i3geoOL.getLayerIndex(layers[(layers.length)-1]);for(i=nordem-1;i>=0;i--){layers=i3geoOL.getLayersByName(ordem[i].name);layer=layers[0];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));i3GEO.Interface.openlayers.OLpanzoombar.div.style.top=i3GEO.Interface.BARRADEZOOMTOP+"px";i3GEO.Interface.openlayers.OLpanzoombar.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+"px"},atualizaMapa:function(){var layers=i3geoOL.layers,nlayers=layers.length,i;for(i=0;i<nlayers;i++){layers[i].mergeNewParams({r:Math.random()});layers[i].url=layers[i].url.replace("&&&&&&&&&&&&&&","");layers[i].url=layers[i].url+"&&";if(layers[i].visibility===true){layers[i].redraw()}}},atualizaTema:function(retorno,tema){var layer=i3geoOL.getLayersByName(tema)[0];if(layer&&layer!=undefined){layer.mergeNewParams({r:Math.random()});layer.url=layer.url.replace("&&&&&&&&&&&&&&","");layer.url=layer.url+"&&";layer.redraw()}if(retorno===""){return}i3GEO.Interface.openlayers.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},registraEventos:function(){i3GEO.eventos.ativa($i("openlayers"));i3geoOL.events.register("moveend",i3geoOL,function(e){i3GEO.Interface.openlayers.recalcPar();i3GEO.eventos.navegaMapa()});i3geoOL.events.register("mousemove",i3geoOL,function(e){var p,lonlat,d,dc,imgp,targ,pos,mousex,mousey;p=e.xy;lonlat=i3geoOL.getLonLatFromPixel(p);if(!lonlat){return}d=i3GEO.calculo.dd2dms(lonlat.lon,lonlat.lat);try{objposicaocursor.ddx=lonlat.lon;objposicaocursor.ddy=lonlat.lat;objposicaocursor.dmsx=d[0];objposicaocursor.dmsy=d[1];objposicaocursor.imgx=p.x;objposicaocursor.imgy=p.y;pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));objposicaocursor.telax=p.x+pos[0];objposicaocursor.telay=p.y+pos[1]}catch(e){}})},ativaBotoes:function(){var imagemxy,x1,y1,x2,y2;imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){x2=imagemxy[0]+i3GEO.Interface.BARRABOTOESLEFT;y2=imagemxy[1]+i3GEO.Interface.BARRABOTOESTOP}if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","i3geo_barra2",false,x2,y2)}if(i3GEO.configura.visual!=="default"){i3GEO.gadgets.visual.troca(i3GEO.configura.visual)}i3GEO.barraDeBotoes.ativaBotoes()},recalcPar:function(){var bounds=i3geoOL.getExtent().toBBOX().split(","),escalaAtual=i3geoOL.getScale();if(i3GEO.parametros.mapscale!==escalaAtual){i3GEO.arvoreDeCamadas.atualizaFarol(escalaAtual)}i3GEO.parametros.mapexten=bounds[0]+" "+bounds[1]+" "+bounds[2]+" "+bounds[3];i3GEO.parametros.mapscale=escalaAtual;i3GEO.parametros.pixelsize=i3geoOL.getResolution();try{atualizaEscalaNumerica(parseInt(escalaAtual,10))}catch(e){}},zoom2ext:function(ext){var m,b;m=ext.split(" ");b=new OpenLayers.Bounds(m[0],m[1],m[2],m[3]);i3geoOL.zoomToExtent(b)},pan2ponto:function(x,y){i3geoOL.panTo(new OpenLayers.LonLat(x,y))}},googlemaps:{OPACIDADE:0.8,TIPOMAPA:"terrain",ZOOMSCALE:[591657550,295828775,147914387,73957193,36978596,18489298,9244649,4622324,2311162,1155581,577790,288895,144447,72223,36111,18055,9027,4513,2256,1128],PARAMETROSLAYER:"&TIPOIMAGEM="+i3GEO.configura.tipoimagem,posfixo:0,atualizaTema:function(retorno,tema){var indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(tema);i3GeoMap.overlayMapTypes.removeAt(indice);i3GEO.Interface.googlemaps.posfixo+=1;i3GEO.Interface.googlemaps.insereLayer(tema,indice);if(retorno===""){return}i3GEO.Interface.googlemaps.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},redesenha:function(){i3GEO.Interface.googlemaps.posfixo+=1;var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(camada.name);if(indice!==false){try{i3GeoMap.overlayMapTypes.removeAt(indice)}catch(e){}}}i3GEO.Interface.googlemaps.criaLayers()},cria:function(w,h){var i,f,ins,js;posfixo="&nd=0";i=$i(i3GEO.Interface.IDCORPO);if(i){f=$i("googlemapsdiv");if(!f){ins='<div id=googlemapsdiv style="width:0px;height:0px;text-align:left;background-image:url('+i3GEO.configura.locaplic+'/imagens/i3geo1bw.jpg)"></div>';i.innerHTML=ins}f=$i("googlemapsdiv");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.ativaBotoes();i3GEO.eventos.ativa($i(i3GEO.Interface.IDMAPA));i3GEO.coordenadas.mostraCoordenadas();i3GEO.gadgets.mostraEscalaNumerica();i3GEO.gadgets.mostraMenuSuspenso();i3GEO.gadgets.mostraMenuLista();i3GEO.idioma.mostraSeletor();g_operacao="";g_tipoacao="";i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.googlemaps.ligaDesliga(this)";i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);i3GEO.util.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===true){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<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(camada.name);if(!indice){if(camada.status!=0){i3GEO.Interface.googlemaps.insereLayer(camada.name,0)}}}},criaImageMap:function(nomeLayer){var i3GEOTileO,s;s="i3GEOTileO = new google.maps.ImageMapType({ "+"getTileUrl: function(coord, zoom) {"+" var url = '"+i3GEO.configura.locaplic+"/classesphp/mapa_googlemaps.php?g_sid="+i3GEO.configura.sid+"&Z=' + zoom + '&X=' + coord.x + '&Y=' + coord.y + '&layer="+nomeLayer+i3GEO.Interface.googlemaps.PARAMETROSLAYER+'&r='+Math.random()+"';"+" return url+'&nd='+i3GEO.Interface.googlemaps.posfixo; "+"}, "+"tileSize: new google.maps.Size(256, 256),"+"isPng: true,"+"name: '"+nomeLayer+"'"+"});";eval(s);return i3GEOTileO},insereLayer:function(nomeLayer,indice){var i=i3GEO.Interface.googlemaps.criaImageMap(nomeLayer);i3GeoMap.overlayMapTypes.insertAt(indice,i)},registraEventos:function(){var pos;google.maps.event.addListener(i3GeoMap,"dragstart",function(){g_operacao="";g_tipoacao=""});google.maps.event.addListener(i3GeoMap,"dragend",function(){i3GEO.Interface.googlemaps.recalcPar();i3GEO.eventos.navegaMapa()});google.maps.event.addListener(i3GeoMap,"tilesloaded",function(){i3GEO.Interface.googlemaps.recalcPar()});google.maps.event.addListener(i3GeoMap,"bounds_changed",function(){i3GEO.Interface.googlemaps.recalcPar();g_operacao="";g_tipoacao="";i3GEO.eventos.navegaMapa()});pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));google.maps.event.addListener(i3GeoMap,"mousemove",function(ponto){var teladms,tela;ponto=ponto.latLng;teladms=i3GEO.calculo.dd2dms(ponto.lng(),ponto.lat());tela=i3GeoMapOverlay.getProjection().fromLatLngToContainerPixel(ponto);objposicaocursor={ddx:ponto.lng(),ddy:ponto.lat(),dmsx:teladms[0],dmsy:teladms[1],imgx:tela.x,imgy:tela.y,telax:tela.x+pos[0],telay:tela.y+pos[1]}})},retornaIndiceLayer:function(nomeLayer){var i=false;try{i3GeoMap.overlayMapTypes.forEach(function(elemento,number){if(elemento.name===nomeLayer){i=number}});return i}catch(e){return false}},retornaObjetoLayer:function(nomeLayer){var i=false;try{i3GeoMap.overlayMapTypes.forEach(function(elemento,number){if(elemento.name===nomeLayer){i=elemento}});return i}catch(e){return false}},retornaDivLayer:function(nomeLayer){var i=false,divmapa=$i("googlemapsdiv"),divlayer=divmapa.firstChild.firstChild.firstChild.getElementsByTagName("div"),divs,divimg,j,ndivs=divlayer.length;for(j=0;j<ndivs;j++){divimg=divlayer[j].getElementsByTagName("img");if(divimg.length>0){if(divimg[0].src.search("&layer="+nomeLayer+"&")>0){return divimg[0].parentNode.parentNode.parentNode}}}},ligaDesliga:function(obj){var indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(obj.value),temp=function(){i3GEO.mapa.legendaHTML.atualiza()},desligar="",ligar="";if(obj.checked&&!indice){ligar=obj.value;i3GEO.Interface.googlemaps.insereLayer(obj.value,0);i3GEO.arvoreDeCamadas.alteraPropCamadas("status","2",obj.value)}else{if(indice!==false){desligar=obj.value;i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value);i3GeoMap.overlayMapTypes.removeAt(indice)}}if(desligar!==""||ligar!==""){i3GEO.php.ligatemas(temp,desligar,ligar)}},bbox:function(){var bd,so,ne,bbox;bd=i3GeoMap.getBounds();so=bd.getSouthWest();ne=bd.getNorthEast();bbox=so.lng()+" "+so.lat()+" "+ne.lng()+" "+ne.lat();return(bbox)},ativaBotoes:function(){var imagemxy,x1,y1,x2,y2;imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){x2=imagemxy[0]+i3GEO.Interface.BARRABOTOESLEFT;y2=imagemxy[1]+i3GEO.Interface.BARRABOTOESTOP}if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","i3geo_barra2",false,x2,y2)}if(i3GEO.configura.visual!=="default"){i3GEO.gadgets.visual.troca(i3GEO.configura.visual)}i3GEO.barraDeBotoes.ativaBotoes()},mudaOpacidade:function(valor){i3GEO.Interface.googlemaps.OPACIDADE=valor/200;i3GEO.Interface.googlemaps.redesenha()},recalcPar:function(){try{var bounds,sw,ne,escalaAtual=i3GEO.parametros.mapscale;sw=i3GeoMap.getBounds().getSouthWest();ne=i3GeoMap.getBounds().getNorthEast();i3GEO.parametros.mapexten=sw.lng()+" "+sw.lat()+" "+ne.lng()+" "+ne.lat();i3GEO.parametros.mapscale=i3GEO.Interface.googlemaps.calcescala();sw=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(0,1));ne=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(1,0));i3GEO.parametros.pixelsize=sw.lng()-ne.lng();if(i3GEO.parametros.pixelsize<0){i3GEO.parametros.pixelsize=i3GEO.parametros.pixelsize*-1}if(i3GEO.parametros.mapscale!==escalaAtual&&escalaAtual!==0){i3GEO.arvoreDeCamadas.atualizaFarol(i3GEO.parametros.mapscale)}}catch(e){i3GEO.parametros.mapexten="0 0 0 0";i3GEO.parametros.mapscale=0}},calcescala:function(){var zoom=i3GeoMap.getZoom();return(i3GEO.Interface.googlemaps.ZOOMSCALE[zoom])},escala2nzoom:function(escala){var n,i;n=i3GEO.Interface.googlemaps.ZOOMSCALE.length;for(i=0;i<n;i++){if(i3GEO.Interface.googlemaps.ZOOMSCALE[i]<escala){return(i)}}},zoom2extent:function(mapexten){var pol,ret,pt1,pt2,sw,ne,z;pol=mapexten;ret=pol.split(" ");pt1=(((ret[0]*-1)-(ret[2]*-1))/2)+ret[0]*1;pt2=(((ret[1]-ret[3])/2)*-1)+ret[1]*1;sw=new google.maps.LatLng(ret[1],ret[0]);ne=new google.maps.LatLng(ret[3],ret[2]);i3GeoMap.fitBounds(new google.maps.LatLngBounds(sw,ne))},pan2ponto:function(x,y){i3GeoMap.panTo(new google.maps.LatLng(y,x))},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i,zoom;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googlemaps.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=true}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===false){i3GEO.arvoreDeCamadas.MOSTRALISTAKML=true;i3GEO.Interface.googlemaps.criaArvoreKML()}i3GEO.Interface.googlemaps.adicionaNoArvoreGoogle(url,titulo,ativo,ngeoxml)},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.googlemaps.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaNoArvoreGoogle:function(url,nomeOverlay,ativo,id){var root,node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googlemaps.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}root=i3GEO.Interface.googlemaps.ARVORE.getRoot();node=i3GEO.Interface.googlemaps.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.googlemaps.ativaDesativaCamadaKml(this,\""+url+"\")' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";if(navm){estilo="cursor:default;vertical-align:35%;padding-top:0px;"}else{estilo="cursor:default;vertical-align:top;"}html+="&nbsp;<span style='"+estilo+"'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.googlemaps.ARVORE.draw();i3GEO.Interface.googlemaps.ARVORE.collapseAll();node.expand();if(ativo===true){eval(id+" = new google.maps.KmlLayer('"+url+"',{map:i3GeoMap,preserveViewport:true});")}},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.googlemaps.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.googlemaps.ARVORE.getRoot();titulo="<table><tr><td><b>Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false;if(i3GEO.parametros.editor==="sim"){d=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/webservices.html' target=blank >Editar cadastro</a>",idmenu:"",enableHighlight:false,expanded:false},node)}},ativaDesativaCamadaKml:function(obj,url){if(!obj.checked){eval(obj.value+".setMap(null);")}else{eval(obj.value+" = new google.maps.KmlLayer(url,{map:i3GeoMap,preserveViewport:true});")}},alteraParametroLayers:function(parametro,valor){parametro=parametro.toUpperCase();var reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");i3GEO.Interface.googlemaps.PARAMETROSLAYER=i3GEO.Interface.googlemaps.PARAMETROSLAYER.replace(reg,"");i3GEO.Interface.googlemaps.PARAMETROSLAYER+="&"+parametro+"="+valor;i3GEO.Interface.googlemaps.redesenha()}},googleearth:{PARAMETROSLAYER:"&TIPOIMAGEM="+i3GEO.configura.tipoimagem,posfixo:"",GADGETS:{setMouseNavigationEnabled:true,setStatusBarVisibility:true,setOverviewMapVisibility:true,setScaleLegendVisibility:true,setAtmosphereVisibility:true,setGridVisibility:false,getSun:false,LAYER_BORDERS:true,LAYER_BUILDINGS:false,LAYER_ROADS:false,LAYER_TERRAIN:true},POSICAOTELA:[0,0],aguarde:"",ligaDesliga:function(obj){var layer=i3GEO.Interface.googleearth.retornaObjetoLayer(obj.value),temp=function(){i3GEO.mapa.legendaHTML.atualiza()},desligar="",ligar="";if(obj.checked){i3GEO.arvoreDeCamadas.alteraPropCamadas("status","2",obj.value);ligar=obj.value}else{i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value);desligar=obj.value}layer.setVisibility(obj.checked);if(desligar!==""||ligar!==""){i3GEO.php.ligatemas(temp,desligar,ligar)}},atualizaTema:function(retorno,tema){var layer=i3GEO.Interface.googleearth.retornaObjetoLayer(tema),hr=layer.getLink().getHref();hr=hr.replace("&&&&&","");layer.getLink().setHref(hr+"&");if(retorno===""){return}i3GEO.Interface.googleearth.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},redesenha:function(){i3GEO.Interface.googleearth.posfixo+="&";var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googleearth.retornaObjetoLayer(camada.name);if(indice!==false){try{i3GeoMap.getFeatures().removeChild(indice)}catch(e){}}}i3GEO.Interface.googleearth.criaLayers()},cria:function(w,h){var i,i3GeoMap3d,i3GeoMap,texto;i3GEO.configura.listaDePropriedadesDoMapa={"propriedades":[{text:"p2",url:"javascript:i3GEO.mapa.dialogo.tipoimagem()"},{text:"p3",url:"javascript:i3GEO.mapa.dialogo.opcoesLegenda()"},{text:"p4",url:"javascript:i3GEO.mapa.dialogo.opcoesEscala()"},{text:"p8",url:"javascript:i3GEO.mapa.dialogo.queryMap()"},{text:"p9",url:"javascript:i3GEO.mapa.dialogo.corFundo()"},{text:"p10",url:"javascript:i3GEO.mapa.dialogo.gradeCoord()"}]};texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setMouseNavigationEnabled===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setMouseNavigationEnabled(this.checked)'";texto+="> "+$trad("ge1");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setStatusBarVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setStatusBarVisibility(this.checked)'";texto+="> "+$trad("ge2");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setOverviewMapVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setOverviewMapVisibility(this.checked)'";texto+="> "+$trad("ge3");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setScaleLegendVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setScaleLegendVisibility(this.checked)'";texto+="> "+$trad("ge4");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setAtmosphereVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setAtmosphereVisibility(this.checked)'";texto+="> "+$trad("ge5");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setGridVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setGridVisibility(this.checked)'";texto+="> "+$trad("ge6");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.getSun===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getSun().setVisibility(this.checked)'";texto+="> "+$trad("ge7");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_BORDERS===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_BORDERS, i3GEO.Interface.checked)'";texto+="> "+$trad("ge8");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_BUILDINGS===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_BUILDINGS, i3GEO.Interface.checked)'";texto+="> "+$trad("ge9");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_ROADS===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_ROADS, i3GEO.Interface.checked)'";texto+="> "+$trad("ge10");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_TERRAIN===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_TERRAIN, i3GEO.Interface.checked)'";texto+="> "+$trad("ge11");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});i3GEO.util.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa);i3GEO.barraDeBotoes.INCLUIBOTAO.zoomli=false;i3GEO.barraDeBotoes.INCLUIBOTAO.pan=false;i3GEO.barraDeBotoes.INCLUIBOTAO.zoomtot=false;i3GEO.Interface.IDMAPA="i3GeoMap3d";i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.googleearth.ligaDesliga(this)";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)}i3GeoMap=null;google.load("earth","1")},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.gadgets.mostraMenuLista();i3GEO.Interface.googleearth.ativaBotoes();i3GEO.gadgets.mostraInserirKml("inserirKml");if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===true){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<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googleearth.retornaIndiceLayer(camada.name);layer=i3GEO.Interface.googleearth.retornaObjetoLayer(camada.name);if(indice===false){layer=i3GEO.Interface.googleearth.insereLayer(camada.name)}try{if(camada.status!=0){layer.setVisibility(true)}else{layer.setVisibility(false)}}catch(e){}}},insereLayer:function(nomeLayer){var kmlUrl=i3GEO.configura.locaplic+"/classesphp/mapa_googleearth.php?REQUEST=GetKml&g_sid="+i3GEO.configura.sid+"&layer="+nomeLayer+i3GEO.Interface.googleearth.PARAMETROSLAYER+"&r="+Math.random(),linki3geo=i3GeoMap.createLink(''),nl=i3GeoMap.createNetworkLink('');linki3geo.setHref(kmlUrl+i3GEO.Interface.googleearth.posfixo);nl.setLink(linki3geo);nl.setFlyToView(false);nl.setName(nomeLayer);i3GeoMap.getFeatures().appendChild(nl);return nl},retornaIndiceLayer:function(nomeLayer){var n=i3GeoMap.getFeatures().getChildNodes().getLength(),indice=false;for(i=0;i<n;i++){if(i3GeoMap.getFeatures().getChildNodes().item(i).getName()===nomeLayer){indice=i}}return indice},retornaObjetoLayer:function(nomeLayer){var n=i3GeoMap.getFeatures().getChildNodes().getLength(),indice=false,i;for(i=0;i<n;i++){if(i3GeoMap.getFeatures().getChildNodes().item(i).getName()===nomeLayer){indice=i3GeoMap.getFeatures().getChildNodes().item(i)}}return indice},registraEventos:function(){google.earth.addEventListener(i3GeoMap.getView(),"viewchangeend",function(e){i3GEO.Interface.googleearth.recalcPar()});google.earth.addEventListener(i3GeoMap.getGlobe(),'mousemove',function(event){d=i3GEO.calculo.dd2dms(event.getLongitude(),event.getLatitude());objposicaocursor={ddx:event.getLongitude(),ddy:event.getLatitude(),dmsx:d[0],dmsy:d[1],imgx:event.getClientX(),imgy:event.getClientY(),telax:event.getClientX()+i3GEO.Interface.googleearth.POSICAOTELA[0],telay:event.getClientY()+i3GEO.Interface.googleearth.POSICAOTELA[1]};i3GEO.eventos.mousemoveMapa()});google.earth.addEventListener(i3GeoMap.getGlobe(),'click',function(event){if(i3GEO.Interface.googleearth.aguarde.visibility==="hidden"){i3GEO.eventos.mousecliqueMapa()}else{i3GEO.Interface.googleearth.aguarde.visibility="hidden"}})},recalcPar:function(){var bounds;bounds=i3GeoMap.getView().getViewportGlobeBounds();i3GEO.parametros.mapexten=bounds.getWest()+" "+bounds.getSouth()+" "+bounds.getEast()+" "+bounds.getNorth()},falha:function(){alert("Falhou. Vc precisa do plugin instalado")},ativaBotoes:function(){var cabecalho=function(){i3GEO.barraDeBotoes.ativaIcone("")},minimiza=function(){i3GEO.janela.minimiza("i3GEOF.ferramentasGE")},janela=i3GEO.janela.cria("230px","110px","","","","Ferramentas","i3GEOF.ferramentasGE",false,"hd",cabecalho,minimiza);i3GEO.barraDeBotoes.TEMPLATEBOTAO='<div style="display:inline;background-color:rgb(250,250,250);"><img src="'+i3GEO.configura.locaplic+'/imagens/branco.gif" id="$$"/></div>&nbsp;';i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","",false,"200","200",janela[2].id);i3GEO.barraDeBotoes.ativaBotoes();i3GEO.Interface.googleearth.aguarde=$i("i3GEOF.ferramentasGE_imagemCabecalho").style;$i("i3GEOF.ferramentasGE_minimizaCabecalho").style.right="0px";$i("i3GEOF.ferramentasGE").lastChild.style.display="none";i3GEO.ajuda.abreJanela()},balao:function(texto,ddx,ddy){var placemark=i3GeoMap.createPlacemark(''),point=i3GeoMap.createPoint(''),b;point.setLatitude(ddy);point.setLongitude(ddx);placemark.setGeometry(point);b=i3GeoMap.createHtmlStringBalloon('');b.setContentString("<div style=text-align:left >"+texto+"</div>");b.setFeature(placemark);i3GeoMap.setBalloon(b)},insereMarca:function(description,ddx,ddy,name,snippet){var placemark=i3GeoMap.createPlacemark(''),point=i3GeoMap.createPoint('');placemark.setName(name);point.setLatitude(ddy);point.setLongitude(ddx);placemark.setGeometry(point);if(description!==""){placemark.setDescription(description)}placemark.setSnippet(snippet);i3GeoMap.getFeatures().appendChild(placemark)},insereCirculo:function(centerLng,centerLat,radius,name,snippet){function makeCircle(centerLat,centerLng,radius){var ring=i3GeoMap.createLinearRing(''),steps=25,i,pi2=Math.PI*2,lat,lng;for(i=0;i<steps;i++){lat=centerLat+radius*Math.cos(i/steps*pi2);lng=centerLng+radius*Math.sin(i/steps*pi2);ring.getCoordinates().pushLatLngAlt(lat,lng,0)}return ring}var polygonPlacemark=i3GeoMap.createPlacemark(''),poly=i3GeoMap.createPolygon(''),outer,polyStyle;poly.setAltitudeMode(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND);polygonPlacemark.setGeometry(poly);outer=i3GeoMap.createLinearRing('');polygonPlacemark.getGeometry().setOuterBoundary(makeCircle(centerLat,centerLng,radius));polygonPlacemark.setName(name);polygonPlacemark.setSnippet(snippet);polygonPlacemark.setStyleSelector(i3GeoMap.createStyle(''));polyStyle=polygonPlacemark.getStyleSelector().getPolyStyle();polyStyle.setFill(0);i3GeoMap.getFeatures().appendChild(polygonPlacemark)},insereLinha:function(xi,yi,xf,yf,name,snippet){var lineStringPlacemark=i3GeoMap.createPlacemark(''),lineString,lineStyle;lineStringPlacemark.setName(name);lineString=i3GeoMap.createLineString('');lineString.setAltitudeMode(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND);lineStringPlacemark.setGeometry(lineString);lineString.getCoordinates().pushLatLngAlt(yi,xi,0);lineString.getCoordinates().pushLatLngAlt(yf,xf,0);lineStringPlacemark.setStyleSelector(i3GeoMap.createStyle(''));lineStringPlacemark.setSnippet(snippet);lineStyle=lineStringPlacemark.getStyleSelector().getLineStyle();lineStyle.setWidth(3);i3GeoMap.getFeatures().appendChild(lineStringPlacemark)},removePlacemark:function(nome){var features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i,nfeatures=[];for(i=0;i<n;i++){try{if(features.getChildNodes().item(i).getName()===nome||features.getChildNodes().item(i).getDescription()===nome||features.getChildNodes().item(i).getSnippet()===nome){nfeatures.push(features.getChildNodes().item(i))}}catch(e){}}n=nfeatures.length;for(i=0;i<n;i++){features.removeChild(nfeatures[i])}},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i,zoom;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googleearth.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=false}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(arguments.length===2){ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);linki3geokml=i3GeoMap.createLink('');if(url.split("http").length===1){url=i3GEO.util.protocolo()+"://"+window.location.host+url}linki3geokml.setHref(url);eval(ngeoxml+" = i3GeoMap.createNetworkLink('')");eval(ngeoxml+".setLink(linki3geokml)");if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===false){i3GEO.arvoreDeCamadas.MOSTRALISTAKML=true;i3GEO.Interface.googleearth.criaArvoreKML()}i3GEO.Interface.googleearth.adicionaNoArvoreGoogle(url,titulo,ativo,ngeoxml)},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.googleearth.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaNoArvoreGoogle:function(url,nomeOverlay,ativo,id){var root,node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googleearth.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}root=i3GEO.Interface.googleearth.ARVORE.getRoot();node=i3GEO.Interface.googleearth.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.googleearth.ativaDesativaCamadaKml(this)' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";html+="&nbsp;<span style='cursor:move'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.googleearth.ARVORE.draw();i3GEO.Interface.googleearth.ARVORE.collapseAll();node.expand()},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.googleearth.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.googleearth.ARVORE.getRoot();titulo="<table><tr><td><b>Google Earth Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false;if(i3GEO.parametros.editor==="sim"){d=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/webservices.html' target=blank >Editar cadastro</a>",idmenu:"",enableHighlight:false,expanded:false},node)}},existeLink:function(url){var existe=false,features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i;for(i=0;i<n;i++){try{if(features.getChildNodes().item(i).getLink().getHref()===url){existe=true}}catch(e){}}return(existe)},ativaDesativaLink:function(url,valor){var features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i;for(i=0;i<n;i++){try{if(features.getChildNodes().item(i).getLink().getHref()===url){features.getChildNodes().item(i).setVisibility(valor)}}catch(e){}}},ativaDesativaCamadaKml:function(obj){var url=eval(obj.value+".getLink().getHref()"),existe=i3GEO.Interface.googleearth.existeLink(url);if(!obj.checked){i3GEO.Interface.googleearth.ativaDesativaLink(url,false)}else{if(existe===false){eval("i3GeoMap.getFeatures().appendChild("+obj.value+")")}else{i3GEO.Interface.googleearth.ativaDesativaLink(url,true)}}},zoom2extent:function(mapexten){var r=6378700,lng2,lng1,lat1,lat2,ret=mapexten.split(" "),fov=32,camera=i3GeoMap.getView().copyAsCamera(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND),dy,dx,d,dist,alt;lng2=(ret[0]*1);lng1=(ret[2]*1);lat1=(ret[1]*1);lat2=(ret[3]*1);camera.setLatitude((lat1+lat2)/2.0);camera.setLongitude((lng1+lng2)/2.0);camera.setHeading(0.0);camera.setTilt(0.0);dy=Math.max(lat1,lat2)-Math.min(lat1,lat2);dx=Math.max(lng1,lng2)-Math.min(lng1,lng2);d=Math.max(dy,dx);d=d*Math.PI/180.0;dist=r*Math.tan(d/2);alt=dist/(Math.tan(fov*Math.PI/180.0));camera.setAltitude(alt);i3GeoMap.getView().setAbstractView(camera)},alteraParametroLayers:function(parametro,valor){parametro=parametro.toUpperCase();var reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");i3GEO.Interface.googleearth.PARAMETROSLAYER=i3GEO.Interface.googleearth.PARAMETROSLAYER.replace(reg,"");i3GEO.Interface.googleearth.PARAMETROSLAYER+="&"+parametro+"="+valor;i3GEO.Interface.googleearth.redesenha()}}};
363   -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.mapa={AUTORESIZE:false,GEOXML:[],ativaAutoResize:function(){window.onresize=function(){var temp=setTimeout(function(){i3GEO.reCalculaTamanho();i3GEO.barraDeBotoes.recria("i3geo_barra2");if(i3GEO.Interface.TABLET===true){i3GEO.guias.escondeGuias()}else{i3GEO.guias.ajustaAltura()}},2000)}},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+='<div style="cursor: pointer; text-align: left; font-size: 10px; display: block; height: 35px;" onclick="i3GEO.mapa.legendaHTML.libera()"><img id="soltaLeg" src="../imagens/branco.gif" title="clique para liberar" style="margin: 5px; position: relative;"> <p style="position: relative; left: -30px; top: -22px;">Mostra a legenda em uma janela</p></div>'}ins+="<div id='corpoLegi' >"+retorno.data.legenda+"</div>";$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<elementos.length;i+=1){elementos[i].style.display="none"}}};if(i3GEO.mapa.legendaHTML.ID!==""){idleg=$i(i3GEO.mapa.legendaHTML.ID);if(idleg&&idleg.style.display==="block"){i3GEO.mapa.legendaHTML.obtem(temp)}}idleg=$i("wlegenda");if(idleg&&idleg.style.display==="block"){i3GEO.mapa.legendaHTML.obtem(temp)}},obtem:function(funcao){i3GEO.php.criaLegendaHTML(funcao,"",i3GEO.configura.templateLegenda)},ativaDesativaTema:function(inputbox){var temp=function(){i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem);i3GEO.arvoreDeCamadas.atualiza("");i3GEO.janela.fechaAguarde("redesenha")};i3GEO.janela.abreAguarde("redesenha",$trad("o1"));if(!inputbox.checked){i3GEO.php.ligatemas(temp,inputbox.value,"")}else{i3GEO.php.ligatemas(temp,"",inputbox.value)}},libera:function(){var temp=function(retorno){var novoel,temp,n,i;if(!$i("moveLegi")){novoel=document.createElement("div");novoel.id="moveLegi";novoel.style.display="block";temp='<div class="hd" style=background:white >Legenda</div>';temp+='<div id="wlegenda" style="display:block;text-align:left;background-color:white;height:300px;width:300px;overflow:auto" ></div>';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:true});YAHOO.moveLegi.xp.panel.render()}$i("wlegenda").innerHTML=retorno.data.legenda;temp=$i("wlegenda").getElementsByTagName("input");n=temp.length;for(i=0;i<n;i+=1){temp[i].style.display="none"}YAHOO.moveLegi.xp.panel.show();$i("moveLegi_c").style.zIndex=100000;$i("moveLegi").style.border="1px solid gray"};i3GEO.mapa.legendaHTML.obtem(temp)}},legendaIMAGEM:{obtem:function(funcao){i3GEO.php.criaLegendaImagem(funcao)}},dialogo:{telaRemota:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.telaremota()","telaremota","telaremota")},t3d:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.t3d()","3d","t3d")},imprimir:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.imprimir()","imprimir","imprimir")},mostraExten:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.mostraExten()","mostraexten","mostraExten")},outputformat:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.outputformat()","outputformat","outputformat")},autoredesenha:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.autoredesenha()","opcoes_autoredesenha","opcoesTempo")},salvaMapa:function(){if(i3GEO.parametros===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.salvaMapa()","salvamapa","salvaMapa")},carregaMapa:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.carregaMapa()","carregamapa","carregaMapa")},convertews:function(){if(i3GEO.parametros.mapfile===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.convertews()","convertews","converteMapaWS")},convertekml:function(){if(i3GEO.parametros.mapfile===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.convertekml()","convertemapakml","converteMapaKml")},queryMap:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.queryMap()","opcoes_querymap","opcoesQuery")},template:function(){i3GEO.janela.cria("300px","400px",i3GEO.configura.locaplic+"/ferramentas/template/index.htm","","","Template <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=1&idajuda=8' >&nbsp;&nbsp;&nbsp;</a>")},tamanho:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tamanho()","opcoes_tamanho","opcoesTamanho")},tipoimagem:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tipoimagem()","tipoimagem","tipoimagem")},corFundo:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.corFundo()","opcoes_fundo","opcoesFundo")},opcoesEscala:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesEscala()","opcoes_escala","opcoesEscala")},opcoesLegenda:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesLegenda()","opcoes_legenda","opcoesLegenda")},gradeCoord:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.gradeCoord()","gradecoord","gradeCoord")},cliqueTexto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueTexto()","inseretxt","inseretxt")},selecao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.selecao()","selecao","selecao")},cliquePonto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliquePonto()","inserexy2","inserexy")},cliqueGrafico:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueGrafico()","inseregrafico","insereGrafico")},cliqueIdentificaDefault:function(){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<ntemas;j+=1){if(i3GEO.arvoreDeCamadas.CAMADAS[j].etiquetas!==""){etiquetas=true}}if(etiquetas===false){return}if(i3GEO.Interface.ATUAL==="padrao"){$i("img").style.cursor="wait"}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.aguarde.visibility="visible"}retorna=function(retorno){var pos,temp,rfes,n,i,mostra,res,temas,ntemas,titulo,tips,j,ntips,ins,r,ds,nds,s,balloon,configura=i3GEO.configura,tipotip=configura.tipotip;i=$i("i3geo_rosa");if(i){i.style.display="none"}mostra=false;retorno=retorno.data;if(retorno!==""){res="";temas=retorno;if(!temas){return}ntemas=temas.length;for(j=0;j<ntemas;j+=1){titulo=temas[j].nome;if(tipotip==="completo"||tipotip==="balao"){titulo="<span style='text-decoration:underline;text-align:left;font-size:9pt'><b>"+titulo+"</b></span><br>"}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<nds;s+=1){for(r=0;r<ntips;r+=1){try{eval("var alias = ds[s]."+tips[r]+".alias");eval("var valor = ds[s]."+tips[r]+".valor");eval("var link = ds[s]."+tips[r]+".link");eval("var img = ds[s]."+tips[r]+".img");if(tipotip==="completo"||tipotip==="balao"){if(valor!==""&&link===""){ins+="<span class='tiptexto' style='text-align:left;font-size:8pt'>"+alias+" :"+valor+"</span><br>"}if(valor!==""&&link!==""){ins+="<span class='tiptexto' style='text-align:left;font-size:8pt'>"+alias+" : <a style='color:blue;cursor:pointer' target=_blanck href='"+link+"' >"+valor+"</a></span><br>"}if(img!==""){ins+=img+"<br>"}ins+="<nl>";mostra=true}else{ins+="<span class='tiptexto' style='text-align:left;font-size:8pt'>"+valor+"</span><br>";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.janela.TIPS.push('marcaIdentifica');pos=i3GEO.util.posicionaImagemNoMapa("marcaIdentifica");balloon=new Balloon();BalloonConfig(balloon,'GBox');balloon.delayTime=0;res="<div style=text-align:left;overflow:auto;height:"+configura.alturatip+";width:"+configura.larguratip+"; >"+res+"</div>";temp=$i('marcaIdentifica');if(temp){balloon.showTooltip(temp,res,null,null,null,pos[1],pos[0]);balloon.addCloseButton();temp.onclick=function(e){if(!e){e=window.event}document.body.removeChild(balloon.getEventTarget(e));balloon.hideTooltip()}}}}}}if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(configura.cursores,temp,i3GEO.Interface.IDMAPA,configura.locaplic)}};i3GEO.php.identifica2(retorna,objposicaocursor.ddx,objposicaocursor.ddy,"5","tip",i3GEO.configura.locaplic,i3GEO.configura.sid,"ligados",i3GEO.parametros.mapexten)}}};
364   -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.tema={TEMPORIZADORESID:{},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"));i3GEO.php.excluitema(i3GEO.atualiza,[tema]);i3GEO.mapa.ativaTema("")},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)}},temporizador:function(idtema,tempo){if(!tempo){tempo=$i("temporizador"+idtema).value}if(tempo!=""&&parseInt(tempo,10)>0){eval('i3GEO.tema.TEMPORIZADORESID.'+idtema+' = {tempo: '+tempo+',idtemporizador: setInterval(function('+idtema+'){if(!$i("arrastar_'+idtema+'")){delete(i3GEO.tema.TEMPORIZADORESID.'+idtema+');return;}i3GEO.Interface.atualizaTema("",idtema);},parseInt('+tempo+',10)*1000)};')}else{try{window.clearInterval(i3GEO.tema.TEMPORIZADORESID[idtema].idtemporizador);delete(i3GEO.tema.TEMPORIZADORESID[idtema])}catch(e){}}},dialogo:{mostraWms:function(tema){i3GEO.janela.mensagemSimples(i3GEO.configura.locaplic+"/ogc.php?tema="+tema,"Endereço do WMS")},comentario:function(tema){i3GEO.janela.cria("530px","330px",i3GEO.configura.locaplic+"/ferramentas/comentarios/index.php?tema="+tema+"&g_sid="+i3GEO.configura.sid+"&locaplic="+i3GEO.configura.locaplic,"","","<img src='"+i3GEO.configura.locaplic+"/imagens/player_volta.png' style=cursor:pointer onclick='javascript:history.go(-1)'><span style=position:relative;top:-2px; > Comentários de "+tema+" </span><a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=7&idajuda=68' >&nbsp;&nbsp;&nbsp;</a>","comentario"+Math.random())},cortina:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.cortina()","cortina","cortina")},abreKml:function(tema,tipo){if(arguments.lenght===1){tipo="kml"}if(typeof(i3GEOF.converteKml)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/convertekml/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.converteKml.criaJanelaFlutuante('"+tema+"','"+tipo+"')","i3GEOF.converteKml_script")}else{i3GEOF.converteKml.criaJanelaFlutuante(tema,tipo)}},salvaMapfile:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.salvamapfile()","salvamapfile","salvamapfile")},graficotema:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.graficotema()","graficotema","graficoTema")},toponimia:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.toponimia()","toponimia","toponimia")},filtro:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.filtro()","filtro","filtro")},procuraratrib:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.procuraratrib()","busca","busca")},tabela:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.tabela()","tabela","tabela")},etiquetas:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.etiquetas()","etiqueta","etiqueta")},editaLegenda:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.editaLegenda()","legenda","legenda")},download:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.download()","download","download")},sld:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.janela.cria("500px","350px",i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=tema2sld&tema="+idtema+"&g_sid="+i3GEO.configura.sid,"","","SLD <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=41' >&nbsp;&nbsp;&nbsp;</a>")},aplicarsld:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.aplicarsld()","aplicarsld","aplicarsld")},editorsql:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.editorsql()","editorsql","editorsql")}}};
365   -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 <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=3&idajuda=88' >&nbsp;&nbsp;&nbsp;</a>");atualizaLinhaDoTempo=function(){var doc,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:{inicia:function(){pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[],linhastemp:[]};i3GEO.analise.medeDistancia.criaJanela();if(g_tipoacao!=="mede"){if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.analise.medeDistancia.clique()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.analise.medeDistancia.clique()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.analise.medeDistancia.movimento()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.analise.medeDistancia.movimento()")}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.analise.medeDistancia.fechaJanela()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.analise.medeDistancia.fechaJanela()")}$i("mostradistancia").style.display="block";if(i3GEO.Interface.ATUAL!=="googleearth"){i3GEO.desenho.criaContainerRichdraw();i3GEO.desenho.richdraw.lineColor="black";i3GEO.desenho.richdraw.lineWidth="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='<div class="hd" style="font-size:11px">&nbsp;Dist&acirc;ncia aproximada <a class=ajuda_usuario target=_blank href="'+i3GEO.configura.locaplic+'/ajuda_usuario.php?idcategoria=6&idajuda=50" >&nbsp;&nbsp;&nbsp;</a></div>'+'<div class="bd" style="text-align:left;padding:3px;" >'+'<div style="text-align:left;padding:3px;" id="mostradistancia_calculo" ></div>'+'<div style="text-align:left;font-size:10px" >'+'<span style="color:navy;cursor:pointer;text-align:left;" >'+'<table class=lista7 ><tr><td><input style="cursor:pointer" type="checkbox" id="pararraios" checked /></td><td>Raios</td><td>&nbsp;</td>'+'<td>'+'<input style="cursor:pointer" type="checkbox" id="parartextos" checked />'+'</td><td>Textos<td>'+'<td>&nbsp;Estilo:</td><td>'+i3GEO.desenho.caixaEstilos()+'</td>'+'<td>&nbsp;<input id=i3GEObotaoPerfil size="22" type="button" value="perfil"></td>'+'</tr></table></span>'+'</div>'+'</div>';novoel.innerHTML=ins;novoel.style.borderColor="gray";document.body.appendChild(novoel)}else{i3GEO.util.defineValor("mostradistancia_calculo","innerHTML","")}YAHOO.namespace("janelaDocamede.xp");YAHOO.janelaDocamede.xp.panel=new YAHOO.widget.Panel("mostradistancia",{iframe:true,width:330,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]);if(navm&&i3GEO.Interface.ATUAL==="googleearth"){YAHOO.janelaDocamede.xp.panel.moveTo(0,0);alert("Essa opção não funciona bem no Internet Explorer")}temp=$i("mostradistancia_c").style;i3GEO.janela.ULTIMOZINDEX++;temp.zIndex=21000+i3GEO.janela.ULTIMOZINDEX;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(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;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,calculo=i3GEO.calculo;if(g_tipoacao==="mede"){YAHOO.util.Dom.setStyle("mostradistancia","display","block");n=pontosdistobj.xpt.length;try{if(n>0){d=calculo.distancia(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);r=calculo.direcao(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);r=calculo.dd2dms(r,r);r=r[0];d=d+"";d=d.split(".");decimal=d[1].substr(0,5);d=d[0]+"."+decimal;d=d*1;da=d+pontosdistobj.dist[n-1];da=da+"";da=da.split(".");decimal=da[1].substr(0,5);da=da[0]+"."+decimal;da=da*1;mostra=$i("mostradistancia_calculo");if(mostra){texto=" Dist acum.= "+da+" km <br>atual= "+d+" km <br> Direção (DMS)= "+r;texto+="<br>Método cálculo de distâncias: "+calculo.metododistancia;mostra.innerHTML=texto}if(i3GEO.Interface.ATUAL!=="googleearth"&&navn){i3GEO.desenho.aplica("resizeLinha",pontosdistobj.linhas[n-1],n)}}}catch(e){}}}},medeArea:{inicia:function(){pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[],linhastemp:[]};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,temp;if(!$i("mostraarea")){novoel=document.createElement("div");novoel.id="mostraarea";ins='<div class="hd" >&Aacute;rea aproximada <a class=ajuda_usuario target=_blank href="'+i3GEO.configura.locaplic+'"/ajuda_usuario.php?idcategoria=6&idajuda=51" >&nbsp;&nbsp;&nbsp;</a></div>'+'<div class="bd" style="text-align:left;padding:3px;font-size:10px" >'+'Estilo: '+i3GEO.desenho.caixaEstilos()+'<br>'+'<div style="text-align:left;padding:3px;font-size:10px" id="mostraarea_calculo" ></div>'+'</div>';novoel.innerHTML=ins;novoel.style.borderColor="gray";document.body.appendChild(novoel)}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);temp=$i("mostraarea_c").style;i3GEO.janela.ULTIMOZINDEX++;temp.zIndex=21000+i3GEO.janela.ULTIMOZINDEX},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;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","<br>m2</b>= "+m.toFixed(2)+"<br><b>km2</b>= "+(m/1000000).toFixed(2)+"<br><b>ha</b>= "+(m/10000).toFixed(2));if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["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;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)}}}}};
366   -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.maparef={fatorZoomDinamico:-3,SELETORTIPO:true,PERMITEFECHAR:true,PERMITEDESLOCAR:true,TRANSICAOSUAVE:true,OPACIDADE:85,TOP:4,RIGHT:0,inicia:function(){var r,pos,novoel,ins,temp,moveX,moveY,escondeRef;if(navm){i3GEO.maparef.TRANSICAOSUAVE=false}if(!$i("i3geo_winRef")){novoel=document.createElement("div");novoel.id="i3geo_winRef";novoel.style.display="none";novoel.style.borderColor="gray";ins="";if(this.PERMITEDESLOCAR){ins+='<div class="hd" style="text-align:left;z-index:20;padding-left: 0px;padding-bottom: 3px;padding-top: 1px;">';ins+='<span id=maparefmaismenosZoom style=display:none > ';temp="javascript:if(i3GEO.maparef.fatorZoomDinamico == -1){i3GEO.maparef.fatorZoomDinamico = 1};i3GEO.maparef.fatorZoomDinamico = i3GEO.maparef.fatorZoomDinamico + 1 ;$i(\"refDinamico\").checked = true;i3GEO.maparef.atualiza();";ins+="<img class=mais onclick='"+temp+"' src="+i3GEO.util.$im("branco.gif")+" />";temp="javascript:if(i3GEO.maparef.fatorZoomDinamico == 1){i3GEO.maparef.fatorZoomDinamico = -1};i3GEO.maparef.fatorZoomDinamico = i3GEO.maparef.fatorZoomDinamico - 1 ;$i(\"refDinamico\").checked = true;i3GEO.maparef.atualiza();";ins+="<img class=menos onclick='"+temp+"' src="+i3GEO.util.$im("branco.gif")+" /></span>&nbsp;";if(this.SELETORTIPO){ins+="<select style='font-size:9px;' id='refDinamico' onchange='javascript:i3GEO.parametros.celularef=\"\";i3GEO.maparef.atualiza()'>";ins+="<option value='fixo' select >fixo</option>";ins+="<option value='mapa' >mapa</option>";ins+="<option value='dinamico' >dinâmico</option>";ins+="</select>"}ins+="</div>"}ins+='<div class="bd" style="text-align:left;padding:3px;height: 150px;" id="mapaReferencia" onmouseover="this.onmousemove=function(exy){i3GEO.eventos.posicaoMouseMapa(exy)}" >';ins+='<img style="cursor:pointer;display:none" onload="javascript:this.style.display = \'block\'" id="imagemReferencia" src="" onclick="javascript:i3GEO.maparef.click()">';ins+='</div>';novoel.innerHTML=ins;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.maparef.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($i("localizarxygeoProjxg")){var temp=function(){i3GEO.coordenadas.atualizaGeo(objposicaocursor.dmsx,objposicaocursor.dmsy,"localizarxygeoProj")};YAHOO.util.Event.addListener($i("imagemReferencia"),"mousemove",temp)}}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.maparef.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.maparef.atualiza()")}this.atualiza(true);$i("i3geo_winRef_h").className="hd2";if(navm){$i("i3geo_winRef_h").style.width="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.toLowerCase()!=="sim"){if(i3GEO.parametros.celularef===""||$i("imagemReferencia").src===""||forca===true){i3GEO.php.referencia(i3GEO.maparef.processaImagem)}else{i3GEO.maparef.atualizaBox()}if(temp){temp.style.display="none"}}else{re=new RegExp("&mode=map","g");$i("imagemReferencia").src=$i(i3GEO.Interface.IDMAPA).src.replace(re,'&mode=reference');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")}}};
367   -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.ajuda={ATIVAJANELA:true,DIVAJUDA:"i3geo_ajuda",DIVLETREIRO:"i3geo_letreiro",MENSAGEMPADRAO:$trad("p1"),TRANSICAOSUAVE:true,OPACIDADE:20,abreDoc:function(){window.open(i3GEO.configura.locaplic+"/documentacao/index.html")},abreJanela:function(){try{var nx,ny,pos,corpo,texto,janela,temp,largura=262,YU=YAHOO.util;if(this.ATIVAJANELA===false){return}temp=$i("contemFerramentas");if(temp){largura=parseInt(temp.style.width,10)-5}if(!$i("janelaMenTexto")){corpo=$i(i3GEO.Interface.IDCORPO);if(corpo){pos=YU.Dom.getXY(corpo);nx=pos[0]-largura-3;ny=i3GEO.parametros.h-78}texto='<div id="janelaMenTexto" style="text-align:left;font-size:10px;color:rgb(80,80,80)">'+i3GEO.ajuda.MENSAGEMPADRAO+'</div>';janela=i3GEO.janela.cria(largura-3,"auto","",nx,ny,"&nbsp;","i3geo_janelaMensagens",false,"hd","","",true);janela[2].innerHTML=texto;YU.Event.addListener(janela[0].close,"click",i3GEO.ajuda.fechaJanela);this.ativaCookie()}}catch(e){}},ativaCookie:function(){var i=i3GEO.util.insereCookie;i("g_janelaMen","sim");i("botoesAjuda","sim")},ativaLetreiro:function(mensagem){var l;if($i(i3GEO.ajuda.DIVLETREIRO)){if(arguments.length===0){mensagem=i3GEO.parametros.mensagens}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.ajuda.ativaLetreiro()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.ajuda.ativaLetreiro()")}try{clearTimeout(i3GEO.ajuda.tempoLetreiro)}catch(e){i3GEO.ajuda.tempoLetreiro=""}l=$i(i3GEO.ajuda.DIVLETREIRO);if(l.style.display==="none"){return}l.style.cursor="pointer";if(mensagem===""){l.value="";return}if(l.size===1){l.size=i3GEO.parametros.w/8}BMessage=mensagem+" ---Clique para parar--- ";l.onclick=function(){l.style.display="none"};if(BMessage!==" ---Clique para parar--- "){BQuantas=0;BSize=l.size;BPos=BSize;BSpeed=1;BSpaces="";i3GEO.ajuda.mostraLetreiro()}i3GEO.ajuda.mostraLetreiro(mensagem)}},desativaCookie:function(){i3GEO.util.insereCookie("g_janelaMen","nao")},fechaJanela:function(){i3GEO.ajuda.desativaCookie();i3GEO.util.removeChild("i3geo_janelaMensagens_c",document.body)},mostraJanela:function(texto){var j=$i(this.DIVAJUDA),k=$i("janelaMenTexto"),jm=$i("i3geo_janelaMensagens"),Dom=YAHOO.util.Dom,h=parseInt(Dom.getStyle(jm,"height"),10),temp;if(j){j.innerHTML=texto===""?"-":texto}else{if(h){Dom.setY("i3geo_janelaMensagens",Dom.getY(jm)+h)}if(k){k.innerHTML=texto}if(this.TRANSICAOSUAVE){temp=texto!==""?Dom.setStyle(jm,"opacity","1"):Dom.setStyle(jm,"opacity",(this.OPACIDADE/100))}h=parseInt(Dom.getStyle(jm,"height"),10);if(h){Dom.setY(jm,Dom.getY(jm)-h)}}},mostraLetreiro:function(){for(count=0;count<BPos;count+=1){BSpaces+=" "}if(BPos<1){$i(i3GEO.ajuda.DIVLETREIRO).value=BMessage.substring(Math.abs(BPos),BMessage.length);if(BPos+BMessage.length<1){BPos=BSize;BQuantas=BQuantas+1}}else{$i(i3GEO.ajuda.DIVLETREIRO).value=BSpaces+BMessage}BPos-=BSpeed;if(BQuantas<2){i3GEO.ajuda.tempoLetreiro=setTimeout(function(){i3GEO.ajuda.mostraLetreiro()},140)}},redesSociais:function(){i3GEO.janela.cria("400px","400px",i3GEO.configura.locaplic+"/ferramentas/redessociais/index.php","","",$trad("u5c"),YAHOO.util.Dom.generateId(null,"redes"))}};
368   -if(typeof(i3GEO)==='undefined'){i3GEO=[]}YAHOO.namespace("janelaDoca.xp");YAHOO.janelaDoca.xp.manager=new YAHOO.widget.OverlayManager();i3GEO.janela={ESTILOBD:"display:block;padding:5px 0px 5px 2px;",ESTILOAGUARDE:"normal",AGUARDEMODAL:false,ANTESCRIA:["i3GEO.janela.prepara()"],ANTESFECHA:[],TRANSICAOSUAVE:true,OPACIDADE:65,TIPS:[],ULTIMOZINDEX:0,JANELASAGUARDE:[],prepara:function(){var iu=i3GEO.util;iu.escondePin();iu.escondeBox()},cria:function(wlargura,waltura,wsrc,nx,ny,texto,id,modal,classe,funcaoCabecalho,funcaoMinimiza){var i,wlargurA,ins,novoel,wdocaiframe,pos,temp,fix,underlay,ifr;if(navm&&!chro){this.TRANSICAOSUAVE=false}if(this.ANTESCRIA){for(i=0;i<this.ANTESCRIA.length;i++){eval(this.ANTESCRIA[i])}}if(arguments.length<7||id===""){id="wdoca";modal=false;classe="hd";funcaoCabecalho=null;funcaoMinimiza=null}if(arguments.length===7){modal=false;classe="hd";funcaoCabecalho=null;funcaoMinimiza=null}if(arguments.length===8){classe="hd";funcaoCabecalho=null;funcaoMinimiza=null}if(arguments.length===9){funcaoCabecalho=null;funcaoMinimiza=null}if(arguments.length===10){funcaoMinimiza=null}if(i3GEO.Interface.ATUAL==="googleearth"){classe="hd";i3GEO.janela.TRANSICAOSUAVE=false}wlargurA=parseInt(wlargura,10)+2+"px";if($i(id)){YAHOO.janelaDoca.xp.panel.destroy()}i3GEO.util.removeChild(id+"_c");i3GEO.util.removeChild(id);ins='<div id="'+id+'_cabecalho" class="'+classe+'" style="background-color:white;">';if(i3GEO.configura!==undefined){ins+="<img id='"+id+"_imagemCabecalho' style='position:absolute;left:3px;top:2px;visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' />"}ins+=texto;if(funcaoMinimiza){ins+="<div id='"+id+"_minimizaCabecalho' class='container-minimiza'></div>"}ins+='</div><div id="'+id+'_corpo" class="bd" style="'+this.ESTILOBD+'">';if(wsrc!==""){ins+='<iframe name="'+id+'i" id="'+id+'i" valign="top" style="border:0px white solid"></iframe>'}ins+='</div>';novoel=document.createElement("div");novoel.id=id;novoel.style.display="block";novoel.style.border="1px solid rgb(120 120 120)";novoel.innerHTML=ins;if(this.TRANSICAOSUAVE){novoel.onmouseover=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",1)};novoel.onmouseout=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.janela.OPACIDADE/100)};YAHOO.util.Dom.setStyle(novoel,"opacity",1)}document.body.appendChild(novoel);wdocaiframe=$i(id+"i");if(wdocaiframe){temp=wdocaiframe.style;temp.width=parseInt(wlargura,10)-12;temp.height=waltura;temp.display="block";wdocaiframe.src=wsrc}else{if(waltura!=="auto"){$i(id+'_corpo').style.height=parseInt(waltura,10)}$i(id+'_corpo').style.width=parseInt(wlargura,10)}fix=false;if(nx===""||nx==="center"){fix=true}if(modal===true){underlay="none"}else{underlay="shadow"}if(i3GEO.Interface.ATUAL==="googleearth"||i3GEO.Interface.ATUAL==="flamingo"){ifr=true}else{ifr=false}if(waltura==="auto"){YAHOO.janelaDoca.xp.panel=new YAHOO.widget.Panel(id,{iframe:ifr,modal:modal,width:wlargurA,underlay:"none",fixedcenter:fix,constraintoviewport:false,visible:true,monitorresize:false,dragOnly:true,keylisteners:null})}else{YAHOO.janelaDoca.xp.panel=new YAHOO.widget.ResizePanel(id,{iframe:ifr,underlay:underlay,modal:modal,width:wlargurA,fixedcenter:fix,constraintoviewport:false,visible:true,monitorresize:false,dragOnly:true,keylisteners:null})}if(nx!==""&&nx!=="center"){YAHOO.janelaDoca.xp.panel.moveTo(nx,ny+50)}YAHOO.janelaDoca.xp.manager.register(YAHOO.janelaDoca.xp.panel);if(this.TRANSICAOSUAVE){YAHOO.janelaDoca.xp.panel.cfg.setProperty("effect",[{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.5}])}YAHOO.janelaDoca.xp.panel.render();if(navm&&id!=="i3geo_janelaMensagens"&&i3GEO.Interface.ATUAL==="googleearth"){YAHOO.janelaDoca.xp.panel.moveTo(0,0)}if(ifr===true){YAHOO.janelaDoca.xp.panel.iframe.style.zIndex=0}if(modal===true){if($i(id+"_mask")){$i(id+"_mask").style.zIndex=9000+i3GEO.janela.ULTIMOZINDEX+1;i3GEO.janela.ULTIMOZINDEX=9000+i3GEO.janela.ULTIMOZINDEX+1}}if($i(id+"_c")){$i(id+"_c").style.zIndex=23000+i3GEO.janela.ULTIMOZINDEX+1;i3GEO.janela.ULTIMOZINDEX=23000+i3GEO.janela.ULTIMOZINDEX+1}if(funcaoCabecalho){$i(id+'_cabecalho').onclick=funcaoCabecalho}if(funcaoMinimiza){$i(id+"_minimizaCabecalho").onclick=funcaoMinimiza}YAHOO.util.Event.addListener(YAHOO.janelaDoca.xp.panel.close,"click",i3GEO.janela.fecha,YAHOO.janelaDoca.xp.panel,{id:id},true);i3GEO.janela.ULTIMOZINDEX++;return([YAHOO.janelaDoca.xp.panel,$i(id+"_cabecalho"),$i(id+"_corpo")])},minimiza:function(id){var temp=$i(id+"_corpo"),n,i,m=YAHOO.janelaDoca.xp.manager.find(id);if(temp){if(temp.style.display==="block"){temp.style.display="none";if(m){m.hideIframe}}else{temp.style.display="block";if(m){m.showIframe}}}temp=$i(id+"_resizehandle");if(temp){if(temp.style.display==="none"){temp.style.display="block"}else{temp.style.display="none"}}temp=$i(id+"_c");if(temp){temp=temp.getElementsByTagName("div");n=temp.length;for(i=0;i<n;i++){if(temp[i].className==="underlay"||temp[i].className==="bd"){if(temp[i].style.display==="none"){temp[i].style.display="block"}else{temp[i].style.display="none"}}}}temp=$i(id+"_corpo");if(temp){if(temp.style.display==="none"){temp.style.display="block"}else{temp.style.display="none"}}},fecha:function(event){var i,old,id,iu=i3GEO.util;iu.escondePin();iu.escondeBox();if(this.ANTESFECHA){for(i=0;i<this.ANTESFECHA.length;i++){eval(this.ANTESFECHA[i])}}if(this.id){id=this.id}else{id=event.id}iu.removeChild(id+"_c");iu.removeChild(id);iu.removeChild(id+"_mask");iu.removeScriptTag(id+"_script");YAHOO.janelaDoca.xp.manager.remove(YAHOO.janelaDoca.xp.manager.find(id))},alteraTamanho:function(w,h,id){var i;if(arguments.length===3){i=$i(id)}else{i=$i("wdoca")}if(i){i.style.width=w;i.style.height=h}},abreAguarde:function(id,texto){var pos,index,contador,temp;document.body.style.cursor="wait";i3GEO.util.removeChild(id+"_mask");i3GEO.util.removeChild(id+"_c");YAHOO.namespace("aguarde."+id);pos=[0,0];if($i(i3GEO.Interface.IDCORPO)){pos=YAHOO.util.Dom.getXY($i(i3GEO.Interface.IDCORPO))}else if($i("contemImg")){pos=YAHOO.util.Dom.getXY($i("contemImg"))}texto+="<br><span style='color:navy;cursor:pointer;font-size:9px;' onclick='javascript:if(i3GEO.janela.AGUARDEMODAL == true){i3GEO.janela.AGUARDEMODAL = false;}else{i3GEO.janela.AGUARDEMODAL = true;}'>bloquear/desbloquear</span>";contador="";for(index=0;index<i3GEO.contadorAtualiza;index++){contador=contador+"."}eval('YAHOO.aguarde.'+id+' = new YAHOO.widget.Panel("'+id+'",{width:"240px",fixedcenter:false,underlay:"none",close:true,draggable:false,modal:'+i3GEO.janela.AGUARDEMODAL.toString()+',monitorresize:false})');i3GEO.janela.JANELASAGUARDE.push(id);if(i3GEO.janela.ESTILOAGUARDE==="normal"||i3GEO.janela.ESTILOAGUARDE==="reduzida"){eval('YAHOO.aguarde.'+id+'.setBody(texto)');eval('YAHOO.aguarde.'+id+'.body.style.padding="5px"')}if(i3GEO.janela.ESTILOAGUARDE==="normal"||i3GEO.janela.ESTILOAGUARDE==="minima"){eval('YAHOO.aguarde.'+id+'.setHeader("<span><img id=aguardeGifAberto src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span>&nbsp;<span style=font-size:8px >'+contador+'</span>")')}eval('YAHOO.aguarde.'+id+'.render(document.body)');if(i3GEO.parametros.w>0){eval('YAHOO.aguarde.'+id+'.moveTo('+(pos[0]+(i3GEO.parametros.w/2)-120)+','+pos[1]+')')}else{eval('YAHOO.aguarde.'+id+'.moveTo('+pos[0]+','+pos[1]+')')}eval('YAHOO.aguarde.'+id+'.show()');if($i(id+"_mask")){$i(id+"_mask").style.zIndex=25000}temp=$i(id+"_c");if(temp){temp.style.zIndex=26000;temp.style.backgroundColor=""}},ativaAlerta:function(){YAHOO.namespace("dialogInfo");YAHOO.dialogInfo=new YAHOO.widget.SimpleDialog("simpledialog1",{width:"300px",fixedcenter:true,visible:false,draggable:false,zIndex:100000,textAlign:"left",close:true,modal:true,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25},constraintoviewport:true,buttons:[{text:"fecha",handler:function(){this.hide()},isDefault:true}],icon:YAHOO.widget.SimpleDialog.ICON_WARN,text:""});YAHOO.dialogInfo.setHeader("Alerta");YAHOO.dialogInfo.render(document.body);window.alert=function(texto){YAHOO.dialogInfo.cfg.setProperty("text",texto);YAHOO.dialogInfo.show()}},mensagemSimples:function(texto,cabecalho){if(!$i("mensagemSimples1")){YAHOO.namespace("mensagemSimples");YAHOO.mensagemSimples=new YAHOO.widget.SimpleDialog("mensagemSimples1",{width:"300px",fixedcenter:true,visible:true,draggable:true,zIndex:100000,textAlign:"left",close:true,modal:false,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25},constraintoviewport:true,text:""})}YAHOO.mensagemSimples.setHeader(cabecalho);YAHOO.mensagemSimples.render(document.body);YAHOO.mensagemSimples.cfg.setProperty("text",texto);YAHOO.mensagemSimples.show()},tip:function(cabecalho){var Nid,i,novoel,res;if(arguments.length===0){cabecalho="fixar"}Nid=YAHOO.util.Dom.generateId();i=$i("i3geo_rosa");if(i){i.style.display="none"}if($i(i3GEO.Interface.IDCORPO)){$i("img").title=""}novoel=document.createElement("div");novoel.id=Nid;novoel.style.position="absolute";novoel.style.zIndex=5000;novoel.style.textAlign="left";novoel.style.background="white";if(navm){novoel.style.filter="alpha(opacity=90)"}else{novoel.style.opacity=".9"}document.body.appendChild(novoel);i3GEO.janela.TIPS.push($i(Nid));res="<div id='"+Nid+"cabecatip' style='text-align:left;background-color:rgb(240,240,240)'>";res+="<span style='color:navy;cursor:pointer;text-align:left' onclick='javascript:$i(\""+Nid+"cabecatip\").innerHTML =\"\";' >"+cabecalho+"</span></div>";novoel.innerHTML="<table style='text-align:left'><tr><td style='text-align:left'>"+res+"</td></tr></table>";ist=novoel.style;ist.top=objposicaocursor.telay-9;ist.left=objposicaocursor.telax-5;ist.display="block";if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.janela.excluiTips('todos')")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.janela.excluiTips('todos')")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.janela.excluiTips('naofixos')")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.janela.excluiTips('naofixos')")}return(Nid)},excluiTips:function(tipo){var ot,i;if(arguments.length===0){tipo="todos"}if(i3GEO.janela.TIPS.length>0){ot=i3GEO.janela.TIPS.length-1;if(ot>=0){do{if(tipo==='todos'){if(i3GEO.janela.TIPS[ot]){i=$i(i3GEO.janela.TIPS[ot].id);document.body.removeChild(i)}}if(tipo==='naofixos'){if($i(i3GEO.janela.TIPS[ot])){if($i(i3GEO.janela.TIPS[ot].id+"cabecatip").innerHTML!==""){document.body.removeChild($i(i3GEO.janela.TIPS[ot].id))}}}}while(ot--);if(tipo==="todos"){i3GEO.janela.TIPS=[]}}}},slider:function(funcao,inicial){var tickSize,keyIncrement,scaleFactor,bottomConstraint,topConstraint,janela,novoel,Event,Dom,lang,slider,bg,thumb,valuearea,textfield;janela=i3GEO.janela.cria(230,200,"","","","Opacidade","opacidadeG");novoel=document.createElement("div");novoel.id="slider-bg";novoel.tabindex="-1";novoel.innerHTML='<div style="cursor:default;position:absolute;top:4px" id="slider-thumb"><img src="'+i3GEO.configura.locaplic+'/imagens/thumb-n.gif"></div>';janela[2].appendChild(novoel);Event=YAHOO.util.Event;Dom=YAHOO.util.Dom;lang=YAHOO.lang;bg="slider-bg";thumb="slider-thumb";valuearea="slider-value";textfield="slider-converted-value";novoel.style.position="relative";novoel.style.background='url('+i3GEO.configura.locaplic+'/imagens/bg-fader.gif) 5px 0 no-repeat';novoel.style.height="28px";novoel.style.width="228px";topConstraint=0;bottomConstraint=200;scaleFactor=1;keyIncrement=20;tickSize=20;Event.onDOMReady(function(){slider=YAHOO.widget.Slider.getHorizSlider(bg,thumb,topConstraint,bottomConstraint,20);slider.setValue(parseInt(inicial,10));slider.getRealValue=function(){return Math.round(this.getValue()*scaleFactor)};slider.subscribe("slideEnd",function(offsetFromStart){var actualValue=slider.getRealValue();eval(funcao+"("+actualValue+")")})});Event.on("putval","click",function(e){slider.setValue(100,false)})},fechaAguarde:function(id){document.body.style.cursor="default";if(arguments.length>0&&typeof(id)!=='undefined'){try{if($i(id+"_c")){eval('YAHOO.aguarde.'+id+'.destroy()')}if($i(id+"_c")){$i("i3geo").removeChild($i(id+"_c"))}if($i(id+"_mask")){$i("i3geo").removeChild($i(id+"_mask"))}}catch(e){}}else{try{var id,i,n=this.JANELASAGUARDE.length,iu=i3GEO.util;for(i=0;i<n;i+=1){id=this.JANELASAGUARDE[i];if($i(id+"_c")){eval('YAHOO.aguarde.'+id+'.destroy()')}iu.removeChild(id+"_c");iu.removeChild(id+"_mask")}this.JANELASAGUARDE=[]}catch(e){}}}};try{YAHOO.widget.ResizePanel=function(el,userConfig){if(arguments.length>0){YAHOO.widget.ResizePanel.superclass.constructor.call(this,el,userConfig)}};YAHOO.widget.ResizePanel.CSS_PANEL_RESIZE="yui-resizepanel";YAHOO.widget.ResizePanel.CSS_RESIZE_HANDLE="resizehandle";YAHOO.extend(YAHOO.widget.ResizePanel,YAHOO.widget.Panel,{init:function(el,userConfig){YAHOO.widget.ResizePanel.superclass.init.call(this,el);this.beforeInitEvent.fire(YAHOO.widget.ResizePanel);var Dom=YAHOO.util.Dom,Event=YAHOO.util.Event,oInnerElement=this.innerElement,oResizeHandle=document.createElement("DIV"),sResizeHandleId=this.id+"_resizehandle";oResizeHandle.id=sResizeHandleId;oResizeHandle.className=YAHOO.widget.ResizePanel.CSS_RESIZE_HANDLE;Dom.addClass(oInnerElement,YAHOO.widget.ResizePanel.CSS_PANEL_RESIZE);this.resizeHandle=oResizeHandle;function initResizeFunctionality(){var me=this,oHeader=this.header,oBody=this.body,oFooter=this.footer,nStartWidth,nStartHeight,aStartPos,nBodyBorderTopWidth,nBodyBorderBottomWidth,nBodyTopPadding,nBodyBottomPadding,nBodyOffset;oInnerElement.appendChild(oResizeHandle);this.ddResize=new YAHOO.util.DragDrop(sResizeHandleId,this.id);this.ddResize.setHandleElId(sResizeHandleId);this.ddResize.onMouseDown=function(e){nStartWidth=oInnerElement.offsetWidth;nStartHeight=oInnerElement.offsetHeight;if(YAHOO.env.ua.ie&&document.compatMode==="BackCompat"){nBodyOffset=0}else{nBodyBorderTopWidth=parseInt(Dom.getStyle(oBody,"borderTopWidth"),10);nBodyBorderBottomWidth=parseInt(Dom.getStyle(oBody,"borderBottomWidth"),10);nBodyTopPadding=parseInt(Dom.getStyle(oBody,"paddingTop"),10);nBodyBottomPadding=parseInt(Dom.getStyle(oBody,"paddingBottom"),10);nBodyOffset=nBodyBorderTopWidth+nBodyBorderBottomWidth+nBodyTopPadding+nBodyBottomPadding}me.cfg.setProperty("width",nStartWidth+"px");aStartPos=[Event.getPageX(e),Event.getPageY(e)]};this.ddResize.onDrag=function(e){var aNewPos=[Event.getPageX(e),Event.getPageY(e)],nOffsetX=aNewPos[0]-aStartPos[0],nOffsetY=aNewPos[1]-aStartPos[1],nNewWidth=Math.max(nStartWidth+nOffsetX,10),nNewHeight=Math.max(nStartHeight+nOffsetY,10),nBodyHeight=(nNewHeight-(oFooter.offsetHeight+oHeader.offsetHeight+nBodyOffset));me.cfg.setProperty("width",nNewWidth+"px");if(navm){nNewWidth=nNewWidth-2}oBody.style.width=nNewWidth-2+"px";if(nBodyHeight<0){nBodyHeight=0}oBody.style.height=nBodyHeight+"px";if($i("wdocai")){$i("wdocai").style.height=nBodyHeight;$i("wdocai").style.width=oBody.style.width}};this.ddResize.onMouseUp=this.ddResize.onDrag.call()}function onBeforeShow(){initResizeFunctionality.call(this);this.unsubscribe("beforeShow",onBeforeShow)}function onBeforeRender(){if(!this.footer){this.setFooter("")}if(this.cfg.getProperty("visible")){initResizeFunctionality.call(this)}else{this.subscribe("beforeShow",onBeforeShow)}this.unsubscribe("beforeRender",onBeforeRender)}this.subscribe("beforeRender",onBeforeRender);if(userConfig){this.cfg.applyConfig(userConfig,true)}this.initEvent.fire(YAHOO.widget.ResizePanel)},toString:function(){return"ResizePanel "+this.id}})}catch(e){}
369   -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.guias={ATUAL:"temas",ALTURACORPOGUIAS:0,CONFIGURA:{"temas":{titulo:$trad("g4a"),id:"guia1",idconteudo:"guia1obj",click:""},"adiciona":{titulo:$trad("g1a"),id:"guia2",idconteudo:"guia2obj",click:function(){var ondeArvore;i3GEO.guias.mostra("adiciona");if(!$i("arvoreAdicionaTema")){try{ondeArvore=objmapa.guiaMenu+"obj"}catch(e){ondeArvore="guia2obj"}}else{ondeArvore="arvoreAdicionaTema"}if(document.getElementById("outrasOpcoesAdiciona")){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde="outrasOpcoesAdiciona";i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore=false}i3GEO.arvoreDeTemas.cria(i3GEO.configura.sid,i3GEO.configura.locaplic,ondeArvore)}},"legenda":{titulo:$trad("g3"),id:"guia4",idconteudo:"guia4obj",click:function(){i3GEO.guias.mostra("legenda");i3GEO.mapa.legendaHTML.cria("guia4obj")}},"mapas":{titulo:"Links",id:"guia5",idconteudo:"guia5obj",click:function(){var pegaMapas=function(retorno){var ins,mapa,ig1lt,ig1,nome,lkd,link,temp;ins="<br><div id='banners' style='overflow:auto;text-align:left'>";mapa=retorno.data.mapas;ig1lt=mapa.length;ig1=0;if(ig1lt>0){do{temp=mapa[ig1];nome=temp.NOME;if(temp.PUBLICADO){if(temp.PUBLICADO.toLowerCase()==="nao"){nome="<s>"+nome+"</s>"}}lkd=temp.LINK;link=i3GEO.configura.locaplic+"/ms_criamapa.php?temasa="+temp.TEMAS+"&layers="+temp.LIGADOS;if(temp.EXTENSAO!==""){link+="&mapext="+temp.EXTENSAO}if(temp.OUTROS!==""){link+="&"+temp.OUTROS}if(lkd!==""){link=lkd}ins+="<div><a href='"+link+"'><img src='"+temp.IMAGEM+"'></a></div><br>";ins+="<div><p style=text-align:center >"+nome+"</p></div><br>";ig1++}while(ig1<ig1lt)}$i(i3GEO.guias.CONFIGURA.mapas.idconteudo).innerHTML=ins+"</div>"};$i(i3GEO.guias.CONFIGURA.mapas.idconteudo).innerHTML="Aguarde...";i3GEO.guias.mostra("mapas");i3GEO.php.pegaMapas(pegaMapas)}}},ORDEM:"",TIPO:"guia",IDGUIAS:"guiasYUI",cria:function(onde){var nguiasreal=0,onf,outf,guiaconteudo,id,guia,guias,nguias,g,re,ng,tituloguia,i,ins,largura,altura,temp,CONFIGURA=i3GEO.guias.CONFIGURA,guias=i3GEO.util.listaChaves(CONFIGURA);try{nguias=guias.length;for(g=0;g<12;g++){tituloguia="";if($i("guia"+g)){tituloguia=$i("guia"+g).innerHTML;re=new RegExp("&nbsp;","g");tituloguia=tituloguia.replace(re,'');for(ng=0;ng<nguias;ng++){if(CONFIGURA[guias[ng]].id==="guia"+g){tituloguia=""}}if(tituloguia!==""){i3GEO.guias.CONFIGURA["guia"+g]=[];i3GEO.guias.CONFIGURA["guia"+g].titulo=tituloguia;i3GEO.guias.CONFIGURA["guia"+g].id="guia"+g;i3GEO.guias.CONFIGURA["guia"+g].idconteudo="guia"+g+"obj";if($i('guia'+g).onclick){i3GEO.guias.CONFIGURA["guia"+g].click=$i("guia"+g).onclick}}}}if(i3GEO.guias.ORDEM===""){guias=i3GEO.util.listaChaves(CONFIGURA)}else{guias=i3GEO.guias.ORDEM}nguias=guias.length;if(arguments.length===0){for(ng=0;ng<nguias;ng++){i=$i(i3GEO.guias.CONFIGURA[guias[ng]].id);if(i){onde=i.parentNode}}}else{onde=$i(onde)}if(!onde){return}onde.id=i3GEO.guias.IDGUIAS;onde.className="yui-navset";if(i3GEO.guias.TIPO==="guia"||i3GEO.guias.TIPO==="tablet"){ins='<ul class="yui-nav" style="border-width:0pt 0pt 0px;border-color:rgb(240,240,240);border-bottom-color:white;text-align:center;">';for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){if($i(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo)){ins+='<li><a alt="" title=""><em><div id="'+i3GEO.guias.CONFIGURA[guias[ng]].id+'" >'+i3GEO.guias.CONFIGURA[guias[ng]].titulo+'</div></em></a></li>'}}}ins+="</ul>";onde.innerHTML=ins;onf=function(event){var bcg,cor;YAHOO.util.Event.stopEvent(event);bcg=this.parentNode.parentNode.style;cor=bcg.background.split(" ")[0];if(cor!=="white"&&bcg.backgroundColor!=="white"){bcg.background="#bfdaff"}};outf=function(event){var bcg,cor;YAHOO.util.Event.stopEvent(event);bcg=this.parentNode.parentNode.style;cor=bcg.background.split(" ")[0];if(cor!=="white"&&bcg.backgroundColor!=="white"){bcg.background="transparent"}}}if(i3GEO.guias.TIPO==="sanfona"){ins='<dl id=sanfona'+onde.id+' class="accordion" >';if(i3GEO.guias.ORDEM===""){for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){nguiasreal++}}}else{nguiasreal=i3GEO.guias.ORDEM.length}if(navn){altura=i3GEO.parametros.h-(nguiasreal*25)-1}else{altura=i3GEO.parametros.h-(nguiasreal*23)+1}for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){id=i3GEO.guias.CONFIGURA[guias[ng]].idconteudo;temp=$i(id);if(temp){guiaconteudo=temp.innerHTML;temp.innerHTML="";temp.style.display="none";temp.id="";ins+='<dt style=height:17px id="'+i3GEO.guias.CONFIGURA[guias[ng]].id+'" >'+'<table class=accordiontable ><tr><td width="98%" >'+i3GEO.guias.CONFIGURA[guias[ng]].titulo+'</td><td width="2%" ><img id="" src="'+i3GEO.configura.locaplic+'/imagens/branco.gif" style="width:10px;" /></td></tr></table>'+'<dd clas=close >'+'<div class=bd >'+'<div id="'+id+'" >'+guiaconteudo+'</div></div></dd>'}}}ins+="</dl>";onde.innerHTML=ins;onde.style.height=altura+"px";onf=function(){};outf=function(){};YAHOO.lutsr.accordion.init(true,5,false,"sanfona"+onde.id,altura);i3GEO.guias.ALTURACORPOGUIAS=altura}for(g=0;g<nguias;g++){guia=i3GEO.guias.CONFIGURA[guias[g]];id=guia.id;guiaconteudo=$i(id);if(guiaconteudo){if(guia.click===""||guia.click===undefined){eval('$i("'+id+'").onclick = function(event){i3GEO.guias.mostra("'+guias[g]+'");}')}else{guiaconteudo.onclick=guia.click}YAHOO.util.Event.addListener($i(id),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addListener($i(id),"click",YAHOO.util.Event.stopPropagation);YAHOO.util.Event.addFocusListener($i(id),YAHOO.util.Event.preventDefault);guiaconteudo.onmouseover=onf;guiaconteudo.onmouseout=outf;temp=$i(guia.idconteudo);if(temp){temp.style.overflow="auto";if(i3GEO.guias.TIPO==="guia"){if(i3GEO.guias.ALTURACORPOGUIAS===0){temp.style.height=i3GEO.parametros.h}else{temp.style.height=i3GEO.guias.ALTURACORPOGUIAS}}else{temp.style.height=onde.style.height}}}}}catch(e){}if(i3GEO.guias.TIPO!=="tablet"){i3GEO.guias.mostra(i3GEO.guias.ATUAL);i3GEO.guias.ativa(i3GEO.guias.ATUAL)}else{i3GEO.guias.escondeGuias()}},ajustaAltura:function(){var guia,guias,nguias,temp,temps,n,i,altura=0;if(i3GEO.guias.ALTURACORPOGUIAS!=0){altura=i3GEO.guias.ALTURACORPOGUIAS}guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){guia=$i(this.CONFIGURA[guias[g]].idconteudo);if(guia){guia.style.overflow="auto";if(this.TIPO==="guia"){guia.style.height=altura}if(this.TIPO==="sanfona"){guia.style.height=altura;temp=$i("guiasYUI");if(temp){temp.style.height=altura;temps=temp.getElementsByTagName("dd");n=temps.length;for(i=0;i<n;i++){if(temps[i].style.visibility=="visible"){temps[i].style.height=altura}}}YAHOO.lutsr.accordion.properties.altura=altura}}}},escondeGuias:function(){var guias,nguias,g,temp,attributes,anim;guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){temp=$i(this.CONFIGURA[guias[g]].idconteudo);if(temp){if(i3GEO.guias.TIPO==="tablet"&&temp.style.display==="block"){temp.style.overflow="hidden";attributes={height:{to:0},id:this.CONFIGURA[guias[g]].idconteudo};anim=new YAHOO.util.Anim(temp,attributes,1,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){var temp=$i(anim.attributes.id);temp.style.overflow="auto";temp.style.display="none";i3GEO.barraDeBotoes.BARRAS[0].show()});anim.animate()}else{temp.style.display="none"}}if($i(this.CONFIGURA[guias[g]].id)){$i(this.CONFIGURA[guias[g]].id).parentNode.parentNode.style.background="transparent"}}},mostra:function(guia){var guias,nguias,g,temp,temp1,attributes,anim;guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;if($i(this.CONFIGURA[guia].idconteudo).style.display==="block"&&i3GEO.guias.TIPO==="tablet"){i3GEO.guias.escondeGuias();return}for(g=0;g<nguias;g++){if($i(this.CONFIGURA[guias[g]].idconteudo)){$i(this.CONFIGURA[guias[g]].idconteudo).style.display="none"}if($i(this.CONFIGURA[guias[g]].id)){$i(this.CONFIGURA[guias[g]].id).parentNode.parentNode.style.background="transparent"}}if(this.CONFIGURA.toString().search(guia)<0){for(g=0;g<nguias;g++){if(this.CONFIGURA[guias[g]].id===guia){guia=guias[g]}}}if(this.CONFIGURA[guia]){temp=$i(this.CONFIGURA[guia].idconteudo);if(temp){if(i3GEO.guias.TIPO==="tablet"){i3GEO.barraDeBotoes.BARRAS[0].hide();temp.style.left=(i3GEO.parametros.w/2)-150+"px";temp.style.height=0;temp.style.display="block";temp.style.zIndex=9000;temp.style.overflow="hidden";attributes={height:{to:i3GEO.parametros.h-10}};anim=new YAHOO.util.Anim(temp,attributes,1,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){temp.style.overflow="auto";temp.style.display="block"});if(DetectaMobile("DetectAndroid")===true){temp.style.height="";temp.style.overflow="auto"}else{anim.animate()}}else{temp.style.display="block"}$i(this.CONFIGURA[guia].id).parentNode.parentNode.style.backgroundColor="white";this.ATUAL=guia}}},ativa:function(guia){try{if(this.CONFIGURA[this.ATUAL].click!==""){this.CONFIGURA[this.ATUAL].click.call()}}catch(e){}},libera:function(){if(!$i("conteudojanelaguias")){var i,w,pos,a,l,letras,temp;$i(i3GEO.Interface.IDCORPO).style.left="0px";if($i(this.IDGUIAS)){$i(this.IDGUIAS).style.display="none"}i=$i("contemFerramentas");w=parseInt($i("contemFerramentas").style.width,10);$i("contemFerramentas").style.width="0px";i=$i("visual");if(i){i.style.width="0px";i.innerHTML=""}pos="px";a=i3GEO.parametros.h;l=i3GEO.parametros.w+w;i3GEO.parametros.h=a;i3GEO.parametros.w=l;if(navm){pos=""}i=$i(i3GEO.Interface.IDCORPO);if(i){i.style.width=l+pos;i.style.height=a+pos}i=$i(i3GEO.Interface.IDMAPA);if(i){i.style.width=l+pos;i.style.height=a+pos;i.style.clip='rect('+0+" "+(l*1+2)+" "+(a*1+2)+" "+0+')'}i=$i("mst");if(i){i.style.width=l+1+pos}if(i3GEO.configura.entorno.toLowerCase()==="sim"){letras=["L","O"];for(l=0;l<2;l++){if($i("img"+letras[l])){$i("img"+letras[l]).style.width=i3GEO.parametros.w+pos;$i("img"+letras[l]).style.height=i3GEO.parametros.h+pos;$i("corpoMapa"+letras[l]).style.width=i3GEO.parametros.w+pos;$i("corpoMapa"+letras[l]).style.height=i3GEO.parametros.h+pos+pos;$i("corpoMapa"+letras[l]).style.clip='rect(0 0 0 0)'}}letras=["N","S"];for(l=0;l<2;l++){if($i("img"+letras[l])){$i("img"+letras[l]).style.width=i3GEO.parametros.w*2+pos;$i("img"+letras[l]).style.height=i3GEO.parametros.h*2+pos;$i("corpoMapa"+letras[l]).style.width=i3GEO.parametros.w*3+pos;$i("corpoMapa"+letras[l]).style.height=i3GEO.parametros.h+pos;$i("corpoMapa"+letras[l]).style.clip='rect(0 0 0 0)'}}}i3GEO.mapa.ajustaPosicao();temp=function(retorno){var novoel,temp,i,g,guias,nguias;novoel=document.createElement("div");novoel.id="janelaguias";novoel.style.display="block";novoel.innerHTML='<div class="hd">Guias <div onclick ="i3GEO.janela.minimiza(\'conteudojanelaguias\')" id="janelaguias_minimizaCabecalho" class="container-minimiza" ></div></div><div class="bd" id="conteudojanelaguias_corpo" style=padding:0px ></div>';temp=$i("i3geo")?$i("i3geo").appendChild(novoel):document.body.appendChild(novoel);YAHOO.namespace("janelaguias.xp");YAHOO.janelaguias.xp.panel=new YAHOO.widget.Panel("janelaguias",{width:"270px",fixedcenter:true,constraintoviewport:false,underlay:"none",close:false,visible:true,draggable:true,modal:false,iframe:true});YAHOO.janelaguias.xp.panel.render();YAHOO.janelaguias.xp.panel.cfg.setProperty("y",0);YAHOO.janelaDoca.xp.manager.register(YAHOO.janelaDoca.xp.panel);i=$i(i3GEO.guias.IDGUIAS);$i("conteudojanelaguias_corpo").appendChild(i);i.style.borderLeft="1px solid black";i.style.borderRight="1px solid black";guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){if($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo)){$i("conteudojanelaguias_corpo").appendChild($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo));temp=$i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo).style;temp.background="white";temp.border="1px solid black";temp.borderTop="0px solid black";temp.width="270px";temp.left="-1px";temp.height=i3GEO.parametros.h-90}}i3GEO.atualiza("");i.style.display="block";i.style.left="-1px";i.style.width="270px"};i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.mudatamanho(temp,a,l)}else{YAHOO.janelaguias.xp.panel.render();YAHOO.janelaguias.xp.panel.show()}},mostraGuiaFerramenta:function(guia,namespace){var g,Dom=YAHOO.util.Dom;if(!namespace){namespace="guia"}for(g=0;g<12;g++){Dom.setStyle(namespace+g+"obj","display","none")}Dom.setStyle(guia+"obj","display","block")}};
370   -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.arvoreDeCamadas={MOSTRALISTAKML:false,FILTRO:"",VERIFICAABRANGENCIATEMAS:true,finaliza:"",EXPANDESOLEGENDA:false,PERMITEEXPANDIRTEMAS:true,ARRASTARORDEM:true,ARRASTARLIXEIRA:true,LIGARDESLIGARTODOS:true,FILTRAR:true,ABRELEGENDA:true,EXPANDIDA:false,LEGENDAEXPANDIDA:false,OPCOESICONES:true,OPCOESTEMAS:true,OPCOESLEGENDA:true,AGUARDALEGENDA:false,ICONETEMA:true,FUNCOES:{farolescala:true,excluir:true,sobe:true,desce:true,fonte:true,zoomtema:true,compartilhar:true,opacidade:true,mudanome:true,procurar:true,toponimia:true,etiquetas:true,filtrar:true,tabela:true,grafico:true,editorlegenda:true,destacar:true,cortina:true,sql:true,comentar:true,temporizador:true,wms:true},CAMADAS:"",ARVORE:null,IDHTML:"listaTemas",SID:null,LOCAPLIC:null,ATIVATEMA:"",cria:function(onde,temas,g_sid,g_locaplic,funcaoTema){if(!YAHOO.lang.isUndefined(funcaoTema)){i3GEO.arvoreDeCamadas.ATIVATEMA=funcaoTema}i3GEO.arvoreDeCamadas.SID=typeof(g_sid)!=='undefined'?g_sid:i3GEO.configura.sid;i3GEO.arvoreDeCamadas.LOCAPLIC=typeof(g_locaplic)!=='undefined'?g_locaplic:i3GEO.configura.locaplic;if(onde!==""){i3GEO.arvoreDeCamadas.IDHTML=onde}if(i3GEO.arvoreDeCamadas.IDHTML===""){return}if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return}if(YAHOO.lang.isUndefined(temas)||temas===""){temas=i3GEO.arvoreDeCamadas.CAMADAS}i3GEO.arvoreDeCamadas.atualiza(temas);if(i3GEO.arvoreDeCamadas.finaliza!==""){eval(i3GEO.arvoreDeCamadas.finaliza)}},atualiza:function(temas,forca){if(arguments.length===0){temas=i3GEO.arvoreDeCamadas.CAMADAS;i3GEO.arvoreDeCamadas.CAMADAS="";forca=false}var estilo,temp,currentIconMode,newVal,root,tempNode,titulo,d,c,ltema,temaNode,grupoNode,i,j,n,nk,k,incluidos=[],grupoLayers=i3GEO.configura.grupoLayers,textoTema="";temp=$i(i3GEO.arvoreDeCamadas.IDHTML);if(temp){if(forca===true){temp.innerHTML=""}if(temp.innerHTML!==""){if(i3GEO.arvoreDeCamadas.comparaTemas(temas,i3GEO.arvoreDeCamadas.CAMADAS)){return}}}else{return}i3GEO.util.defineValor(i3GEO.arvoreDeCamadas.IDHTML,"innerHTML","");i3GEO.arvoreDeCamadas.CAMADAS=temas;(function(){function changeIconMode(){newVal=parseInt(this.value,10);if(newVal!==currentIconMode){currentIconMode=newVal}buildTree()}function buildTree(){i3GEO.arvoreDeCamadas.ARVORE=new YAHOO.widget.TreeView(i3GEO.arvoreDeCamadas.IDHTML)}buildTree()})();root=i3GEO.arvoreDeCamadas.ARVORE.getRoot();titulo="<table><tr><td><b>"+$trad("a7")+"</b></td><td>";if(this.ARRASTARLIXEIRA===true){titulo+="<img id='i3geo_lixeira' title='"+$trad("t2")+"' src='"+i3GEO.util.$im("branco.gif")+"' />"}if(this.FILTRAR===true){titulo+="<img onclick='i3GEO.arvoreDeCamadas.dialogo.filtro();' id='i3geo_filtro' title='"+$trad("t2a")+"' src='"+i3GEO.util.$im("branco.gif")+"' />"}if(this.ABRELEGENDA===true){titulo+="<img onclick='i3GEO.mapa.legendaHTML.libera();' id='soltaleg2' title='"+$trad("t2b")+"' src='"+i3GEO.util.$im("branco.gif")+"' />"}if(this.LIGARDESLIGARTODOS===true){titulo+="&nbsp;<img onclick='i3GEO.arvoreDeCamadas.aplicaTemas(\"ligartodos\");' id='olhoAberto' title='"+$trad("t3a")+"' src='"+i3GEO.util.$im("branco.gif")+"' />";titulo+="&nbsp;<img onclick='i3GEO.arvoreDeCamadas.aplicaTemas(\"desligartodos\");' id='olhoFechado' title='"+$trad("t3b")+"' src='"+i3GEO.util.$im("branco.gif")+"' />"}titulo+="</td></tr></table>";tempNode=new YAHOO.widget.HTMLNode({expanded:true,html:titulo,hasIcon:true,enableHighlight:false},root);estilo=navm?"text-align:left;font-size:11px;vertical-align:middle;display:table-cell;":"text-align:left;font-size:11px;vertical-align:vertical-align:top;padding-top:4px;";if(grupoLayers===""){c=temas.length;for(i=0,j=c;i<j;i+=1){ltema=temas[i];try{if((ltema.escondido).toLowerCase()!=="sim"){textoTema=i3GEO.arvoreDeCamadas.montaTextoTema(ltema);if(textoTema!==""){temaNode=new YAHOO.widget.HTMLNode({expanded:this.EXPANDIDA,html:textoTema,id:ltema.name,tipo:"tema",enableHighlight:false},tempNode);if(this.PERMITEEXPANDIRTEMAS===true){if(this.EXPANDESOLEGENDA===false){temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1)}else{if(ltema.classe!=="NAO"){temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraLegenda,1)}}}}YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault)}}catch(e){}}}else{nk=temas.length;c=grupoLayers.length;for(i=0;i<c;i+=1){temp="";if(grupoLayers[i].icone&&grupoLayers[i].icone===true){temp+="<p style="+estilo+" ><input class=inputsb style=cursor:pointer onclick='i3GEO.arvoreDeCamadas.ligaDesligaTemas(\""+i3GEO.configura.grupoLayers[i].layers+"\",this.checked)' type=checkbox title='Ligar/desligar temas do grupo' />&nbsp;"}temp+="<span style="+estilo+";vertical-align:top ><b>"+grupoLayers[i].nome+"</b></span></p>";d=this.EXPANDIDA;if(grupoLayers[i].expandido&&grupoLayers[i].expandido===true){d=true}grupoNode=new YAHOO.widget.HTMLNode({enableHighlight:false,html:temp,expanded:d},tempNode);n=grupoLayers[i].layers.length;for(j=0;j<n;j+=1){for(k=0;k<nk;k+=1){ltema=temas[k];if(ltema.name===grupoLayers[i].layers[j]&&ltema.escondido==="nao"){textoTema=i3GEO.arvoreDeCamadas.montaTextoTema(ltema);if(textoTema!==""){d={enableHighlight:false,expanded:i3GEO.arvoreDeCamadas.EXPANDIDA,html:textoTema,id:ltema.name,tipo:"tema"};if(grupoLayers[i].dinamico&&grupoLayers[i].dinamico===true){temaNode=new YAHOO.widget.HTMLNode(d,grupoNode)}else{temaNode=new YAHOO.widget.HTMLNode(d,tempNode)}temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1);YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault);incluidos.push(ltema.name)}}}}}grupoNode=new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,html:"<b>Outros</b>"},tempNode);c=incluidos.length;for(k=0;k<nk;k+=1){ltema=temas[k];n=false;for(j=0;j<c;j+=1){if(incluidos[j]===ltema.name||ltema.escondido.toLowerCase()==="sim"){n=true}}if(n===false){temaNode=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:i3GEO.arvoreDeCamadas.montaTextoTema(ltema),id:ltema.name,tipo:"tema"},grupoNode,i3GEO.arvoreDeCamadas.EXPANDIDA,true);temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1);YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault)}}}document.getElementById(i3GEO.arvoreDeCamadas.IDHTML).style.textAlign="left";i3GEO.arvoreDeCamadas.ARVORE.draw();if(i3GEO.arvoreDeCamadas.ARRASTARORDEM===true||i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){i3GEO.arvoreDeCamadas.ativaDragDrop()}i3GEO.mapa.ativaTema(i3GEO.temaAtivo);i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas();if(i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS===true&&i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()")}i3GEO.eventos.executaEventos(i3GEO.eventos.ATUALIZAARVORECAMADAS)},ligaDesligaTemas:function(lista,status){var c,n,i,aplica=false;lista=lista.split(",");n=lista.length;for(i=0;i<n;i+=1){c=i3GEO.arvoreDeCamadas.capturaCheckBox(lista[i]);if(c.checked!==status){aplica=true}c.checked=status;if(aplica===true&&i3GEO.Interface.ATUAL!=="padrao"){c.onclick.call()}}if(aplica===true&&i3GEO.Interface.ATUAL==="padrao"){i3GEO.arvoreDeCamadas.aplicaTemas()}},ativaDragDrop:function(){var Dom=YAHOO.util.Dom,Event=YAHOO.util.Event,DDM=YAHOO.util.DragDropMgr;YAHOO.example.DDList="";YAHOO.example.DDApp={init:function(){var ddtarget,i,ltema,ddlist;if($i("i3geo_lixeira")&&i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){ddtarget=new YAHOO.util.DDTarget("i3geo_lixeira")}i=i3GEO.arvoreDeCamadas.CAMADAS.length-1;if(i3GEO.arvoreDeCamadas.CAMADAS.length-1>=0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if($i("arrastar_"+ltema.name)){ddlist=new YAHOO.example.DDList("arrastar_"+ltema.name)}}while(i--)}}};YAHOO.example.DDList=function(id,sGroup,config){YAHOO.example.DDList.superclass.constructor.call(this,id,sGroup,config);this.logger=this.logger||YAHOO;YAHOO.util.Dom.setStyle(this.getDragEl(),"opacity",0.67);this.goingUp=false;this.lastY=0};YAHOO.extend(YAHOO.example.DDList,YAHOO.util.DDProxy,{startDrag:function(x,y){var dragEl,clickEl,Dom=YAHOO.util.Dom;this.logger.log(this.id+" startDrag");dragEl=this.getDragEl();clickEl=this.getEl();Dom.setStyle(clickEl,"visibility","hidden");dragEl.innerHTML=clickEl.innerHTML;Dom.setStyle(dragEl,"color",Dom.getStyle(clickEl,"color"));Dom.setStyle(dragEl,"backgroundColor",Dom.getStyle(clickEl,"backgroundColor"));Dom.setStyle(dragEl,"border","4px solid gray");Dom.setStyle(dragEl,"z-index","5000")},endDrag:function(e){var srcEl,proxy,a,thisid,proxyid;srcEl=this.getEl();proxy=this.getDragEl();Dom.setStyle(proxy,"visibility","");a=new YAHOO.util.Motion(proxy,{points:{to:Dom.getXY(srcEl)}},0.2,YAHOO.util.Easing.easeOut);proxyid=proxy.id;thisid=this.id;a.onComplete.subscribe(function(){var Dom=YAHOO.util.Dom;Dom.setStyle(proxyid,"visibility","hidden");Dom.setStyle(thisid,"visibility","")});a.animate();YAHOO.util.Dom.setStyle('i3geo_lixeira','border','0px solid blue')},onDragDrop:function(e,id){var pt,region,tema,destEl,els,lista,noid,temp,DDM=YAHOO.util.DragDropMgr,Dom=YAHOO.util.Dom;if(DDM.interactionInfo.drop.length===1){pt=DDM.interactionInfo.point;region=DDM.interactionInfo.sourceRegion;if(!region.intersect(pt)){DDM.refreshCache();if(DDM.getDDById(id).id==="i3geo_lixeira"){if(i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){(new YAHOO.util.Anim("i3geo_lixeira",{opacity:{from:0,to:1}},3,YAHOO.util.Easing.easeOutStrong)).animate();tema=(this.getEl()).id.split("arrastar_")[1];i3GEO.tema.exclui(tema)}}else{if(i3GEO.arvoreDeCamadas.ARRASTARORDEM===true){i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));destEl=Dom.get(id);noid=id.split("arrastar_")[1];destEl.appendChild(this.getEl());els=i3GEO.arvoreDeCamadas.listaLigadosDesligados();lista=els[2].join(",");temp=function(retorno){i3GEO.atualiza(retorno);if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ordenaLayers()}};i3GEO.php.reordenatemas(temp,lista)}}}}},onDrag:function(e){var y;y=Event.getPageY(e);if(y<this.lastY){this.goingUp=true}else if(y>this.lastY){this.goingUp=false}this.lastY=y},onDragOver:function(e,id){var srcEl,destEl;srcEl=this.getEl();destEl=YAHOO.util.Dom.get(id);if($i("i3geo_lixeira")&&id==="i3geo_lixeira"){$i("i3geo_lixeira").style.border="1px solid red"}else{destEl.style.textDecoration="underline"}},onDragOut:function(e,id){$i(id).style.textDecoration="none"}});Event.onDOMReady(YAHOO.example.DDApp.init,YAHOO.example.DDApp,true)},montaOpcoes:function(node){var d,conteudo,opcoesNode,idtema,ltema,farol,mfarol,tnome="",iconesNode,imb=i3GEO.util.$im("branco.gif"),funcoes=i3GEO.arvoreDeCamadas.FUNCOES;idtema=node.data.id;ltema=i3GEO.arvoreDeCamadas.pegaTema(idtema);if(i3GEO.arvoreDeCamadas.OPCOESICONES===true){if(funcoes.farolescala===true){farol="maisamarelo.png";mfarol="";if(ltema.escala*1<i3GEO.parametros.mapscale*1){farol="maisverde.png";mfarol=$trad("t9")}if(ltema.escala*1>i3GEO.parametros.mapscale*1){farol="maisvermelho.png";mfarol=$trad("t10")}if(ltema.escala===0){farol="maisamarelo.png";mfarol=$trad("t11")}tnome+="&nbsp;<img id='farol"+ltema.name+"' src='"+i3GEO.util.$im(farol)+"' title='"+mfarol+"' />"}if(funcoes.excluir===true){tnome+="&nbsp;<img id='idx"+ltema.name+"' class='x' src='"+imb+"' title='"+$trad("t12")+"' onclick='i3GEO.tema.exclui(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t12a")+"','exclui')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(funcoes.sobe===true){tnome+="&nbsp;<img class='sobe' src='"+imb+"' title='"+$trad("t13")+"' onclick='i3GEO.tema.sobe(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t14")+"','sobe')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(funcoes.desce===true){tnome+="&nbsp;<img class='desce' src='"+imb+"' title='"+$trad("t15")+"' onclick='i3GEO.tema.desce(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t16")+"','desce')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(funcoes.fonte===true){tnome+="&nbsp;<img class='fonte' src='"+imb+"' title='"+$trad("a9")+"' onclick='i3GEO.tema.fonte(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("a9")+"','fonte')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if((ltema.zoomtema.toLowerCase()==="sim")&&(i3GEO.Interface.ATUAL!=="flamingo")&&(funcoes.zoomtema===true)){tnome+="&nbsp;<img class='extent' src='"+imb+"' title='"+$trad("t17")+"' onclick='i3GEO.tema.zoom(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t18")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}iconesNode=new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node);if(funcoes.compartilhar===true&&ltema.permitecomentario.toLowerCase()!=="nao"){temp=i3GEO.configura.locaplic+"/ms_criamapa.php?layers="+ltema.name+"&amp;temasa="+ltema.name;tnome=i3GEO.social.compartilhar("",temp,temp,"semtotal");iconesNode=new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node)}}if(i3GEO.arvoreDeCamadas.OPCOESTEMAS===true){opcoesNode=new YAHOO.widget.HTMLNode({html:$trad("t18a"),idopcoes:ltema.name,identifica:ltema.identifica,enableHighlight:false,expanded:false},node);opcoesNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraOpcoes,1)}if(i3GEO.arvoreDeCamadas.OPCOESLEGENDA===true&&ltema.classe!=="NAO"){opcoesNode=new YAHOO.widget.HTMLNode({html:$trad("p3"),idlegenda:ltema.name,enableHighlight:false,expanded:i3GEO.arvoreDeCamadas.LEGENDAEXPANDIDA},node);opcoesNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraLegenda,1)}node.loadComplete()},mostraOpcoes:function(node){var tnome,d,n,temp,idtema=node.data.idopcoes,ltema=i3GEO.arvoreDeCamadas.pegaTema(idtema),funcoes=i3GEO.arvoreDeCamadas.FUNCOES;if(funcoes.opacidade===true){if(navm){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t19")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t20")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=42' >&nbsp;&nbsp;&nbsp;</a>"+$inputText("","","tr"+ltema.name,"","3",ltema.transparency)+"&nbsp;<a class='tic' onclick='i3GEO.tema.mudatransp(\""+ltema.name+"\")' href='#' /a>"}else{tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t19")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t20")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=42' >&nbsp;&nbsp;&nbsp;</a>"+$inputText("","","tr"+ltema.name,"","3",ltema.transparency)+"<img class='tic' style='position:relative;top:3px;' onclick='i3GEO.tema.mudatransp(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />"}n=new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if(funcoes.temporizador===true&&i3GEO.Interface.ATUAL!="padrao"&&i3GEO.Interface.ATUAL!="flamingo"){if(navm){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t47")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t48")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=101' >&nbsp;&nbsp;&nbsp;</a>"+$inputText("","","temporizador"+ltema.name,"","3",ltema.temporizador)+"&nbsp;<a class='tic' onclick='i3GEO.tema.temporizador(\""+ltema.name+"\")' href='#' /a>"}else{tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t47")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t48")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=101' >&nbsp;&nbsp;&nbsp;</a>"+$inputText("","","temporizador"+ltema.name,"","3",ltema.temporizador)+"<img class='tic' style='position:relative;top:3px;' onclick='i3GEO.tema.temporizador(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />"}n=new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if(funcoes.mudanome===true){if(navm){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t21a")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"+$trad("t21")+" </span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=43' >&nbsp;&nbsp;&nbsp;</a>"+$inputText("","","nn"+ltema.name,"","8","")+"&nbsp;<a class='tic' onclick='i3GEO.tema.mudanome(\""+ltema.name+"\")' href='#' />"}else{tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t21a")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"+$trad("t21")+" </span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=43' >&nbsp;&nbsp;&nbsp;</a>"+$inputText("","","nn"+ltema.name,"","10","")+"<img class='tic' style='position:relative;top:3px;' onclick='i3GEO.tema.mudanome(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />"}n=new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if((ltema.type<3)&&(ltema.connectiontype!==7)){if(i3GEO.Interface.ATUAL!=="flamingo"&&funcoes.procurar===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t22"),$trad("t23"),'i3GEO.tema.dialogo.procuraratrib(\"'+ltema.name+'\")',node)}if(funcoes.toponimia===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t24"),$trad("t25"),'i3GEO.tema.dialogo.toponimia(\"'+ltema.name+'\")',node)}if(funcoes.etiquetas===true&&(ltema.identifica.toLowerCase()==="sim"||ltema.identifica==="")){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t26"),$trad("t27"),'i3GEO.tema.dialogo.etiquetas(\"'+ltema.name+'\")',node)}if(funcoes.filtrar===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t28"),$trad("t29"),'i3GEO.tema.dialogo.filtro(\"'+ltema.name+'\")',node)}if(funcoes.tabela===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t30"),$trad("t31"),'i3GEO.tema.dialogo.tabela(\"'+ltema.name+'\")',node)}if(i3GEO.parametros.versaoms>4&&funcoes.grafico===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t37"),$trad("t37"),'i3GEO.tema.dialogo.graficotema(\"'+ltema.name+'\")',node)}}if(ltema.type<4&&funcoes.editorlegenda===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t32"),$trad("t33"),'i3GEO.tema.dialogo.editaLegenda(\"'+ltema.name+'\")',node)}if(funcoes.destacar===true&&i3GEO.Interface.ATUAL!=="googlemaps"&&i3GEO.Interface.ATUAL!=="googleearth"&&i3GEO.Interface.ATUAL!=="flamingo"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t34"),$trad("t35"),'i3GEO.navega.destacaTema.inicia(\"'+ltema.name+'\")',node)}if(funcoes.cortina===true&&i3GEO.Interface.ATUAL!=="padrao"&&i3GEO.Interface.ATUAL!=="googleearth"&&i3GEO.Interface.ATUAL!=="flamingo"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t42"),$trad("t42"),'i3GEO.tema.dialogo.cortina(\"'+ltema.name+'\")',node)}if(funcoes.sql===true&&ltema.editorsql.toLowerCase()==="sim"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t40"),$trad("t41"),'i3GEO.tema.dialogo.editorsql(\"'+ltema.name+'\")',node)}if(funcoes.comentar===true&&ltema.permitecomentario.toLowerCase()!=="nao"&&i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t45"),$trad("t45"),'i3GEO.tema.dialogo.comentario(\"'+ltema.name+'\")',node)}if(funcoes.wms===true&&ltema.permiteogc.toLowerCase()!=="nao"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema("Getcapabilities",'WMS-OGC','i3GEO.tema.dialogo.mostraWms(\"'+ltema.name+'\")',node)}if(i3GEO.parametros.editor.toLowerCase()==="sim"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t44"),"<span style=color:red title='Apenas usuários editores podem ver essa opção' >"+$trad("t44")+"</span>",'i3GEO.tema.dialogo.salvaMapfile(\"'+ltema.name+'\")',node)}node.loadComplete()},adicionaOpcaoTema:function(dica,titulo,onclick,node){var tnome="<a href='#' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+dica+"','');\" onclick="+onclick+">"+titulo+" </a>",temp=new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node)},mostraLegenda:function(node){var retorna,idtema=node.data.idlegenda,ltema=i3GEO.arvoreDeCamadas.pegaTema(idtema);retorna=function(retorno){var original,i,re,tabela,linhas,linha,colunas,id,exp,incluir,d,nodeLeg,elementos,nelementos,inputs,desativar,nindices;if(retorno.data.legenda){original=retorno;retorno=retorno.data.legenda;if(retorno[0]){if((navn)&&(!retorno[0].imagem)){tabela=retorno}else{i=retorno[0].imagem;re=new RegExp("tiff","g");i=i.replace(re,'png');tabela="<img src='"+i+"' />"}retorno=""}else{linhas=retorno.split("#");if(linhas.length>1){linhas=retorno.split("|");tabela="<table>";linha=linhas.length-1;if(linha>=0){do{colunas=linhas[linha].split("#");id=colunas[0]+"-"+colunas[1];re=new RegExp("'","g");exp=colunas[3].replace(re,'"');tabela+="<tr style='border-top:1px solid rgb(240,240,240);'><td><img src='"+colunas[4]+"' </td><td style='text-align:left'>"+colunas[2]+"</td></tr>"}while(linha--)}tabela+="</table><br>"}else{tabela=retorno}}}else{tabela="<img src='"+retorno.data[0].imagem+"' />"}incluir="<div style='text-align:left' id='"+idtema+"verdiv"+"'>"+tabela+"</div>";nodeLeg=new YAHOO.widget.HTMLNode({html:incluir,enableHighlight:false,expanded:false},node);node.loadComplete();elementos=document.getElementById(idtema+"verdiv").getElementsByTagName("input");nelementos=elementos.length;inputs=[];i=0;if(nelementos>0){do{if(elementos[i].type==="checkbox"){inputs.push(elementos[i])}i++}while(i<nelementos)}if(original.data.desativar){desativar=original.data.desativar;nindices=desativar.length;i=0;if(nindices>0){do{inputs[desativar[i]].checked=false;i++}while(i<nindices)}}};if(i3GEO.configura.templateLegenda!==""){i3GEO.php.criaLegendaHTML(retorna,idtema,i3GEO.configura.templateLegenda)}else{i3GEO.php.criaLegendaHTML(retorna,idtema)}},atualizaLegenda:function(idtema){var node;if(document.getElementById(idtema+"verdiv")){node=i3GEO.arvoreDeCamadas.ARVORE.getNodeByProperty("idlegenda",idtema);if(node){i3GEO.arvoreDeCamadas.ARVORE.removeChildren(node);this.mostraLegenda(node);if($i("janelaLegenda"+idtema+"_corpo")){i3GEO.tema.mostralegendajanela(idtema,"","abrejanela")}}}},escolheCorClasse:function(leg){var obj,novoel;leg=leg.parentNode.getElementsByTagName("input")[0];if(!$i("tempinputcorclasse")){novoel=document.createElement("input");novoel.id="tempinputcorclasse";novoel.style.display="none";novoel.alt="objeto criado para guardar dados da funcao escolohercorclasse";novoel.onchange="";document.body.appendChild(novoel)}obj=$i("tempinputcorclasse");obj.value="";obj.tema=leg.name;obj.idclasse=leg.value;obj.onchange=function(){var obj=$i("tempinputcorclasse");i3GEO.tema.alteracorclasse(obj.tema,obj.idclasse,obj.value)};i3GEO.util.abreCor("","tempinputcorclasse")},inverteStatusClasse:function(leg){var temp=function(retorno){i3GEO.atualiza();i3GEO.Interface.atualizaTema(retorno,leg.name)};i3GEO.php.inverteStatusClasse(temp,leg.name,leg.value)},montaTextoTema:function(tema){var ck,html,display="none",estilo,iu=i3GEO.util;if(tema.status*1===2){ck=' CHECKED '}else{ck=""}if(this.FILTRO!==""){if(this.FILTRO==="desligados"&&ck!==""){return""}if(this.FILTRO==="ligados"&&ck===""){return""}if(this.FILTRO==="selecionados"&&tema.sel.toLowerCase()!=="sim"){return""}if(this.FILTRO==="download"&&tema.download.toLowerCase()!=="sim"){return""}if(this.FILTRO==="wms"&&tema.connectiontype*1!==7){return""}if(this.FILTRO==="raster"&&tema.type*1!==3){return""}if(this.FILTRO==="toponimia"&&tema.type*1!==4){return""}}estilo=navm?"text-align:left;font-size:11px;vertical-align:middle;display:table-cell;":"text-align:left;font-size:11px;vertical-align:vertical-align:top;padding-top:4px;";html="<p onclick='i3GEO.mapa.ativaTema(\""+tema.name+"\")' id='arrastar_"+tema.name+"' style='"+estilo+"' ><input class=inputsb style='cursor:pointer;' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t3")+"','ligadesliga')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" type='checkbox' name=\"layer\" value='"+tema.name+"' "+ck;if(i3GEO.arvoreDeCamadas.ATIVATEMA!==""){html+="onclick=\""+i3GEO.arvoreDeCamadas.ATIVATEMA+"\""}else{html+="onclick='i3GEO.util.criaBotaoAplicar(\"i3GEO.arvoreDeCamadas.aplicaTemas\",\""+$trad("p14")+"\",\"i3geoBotaoAplicarCamadas\",this)'"}html+=" />";estilo=navm?"cursor:pointer;vertical-align:35%;padding-top:0px;":"cursor:pointer;vertical-align:top;";if(tema.iconetema!==""&&i3GEO.arvoreDeCamadas.ICONETEMA===true){html+="&nbsp;<img style='"+estilo+"' src='"+tema.iconetema+"' />"}if(tema.contextoescala.toLowerCase()==="sim"){html+="&nbsp;<img style='"+estilo+"' src="+iu.$im("contextoescala.png")+" title='"+$trad("t36")+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t36")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(tema.sel.toLowerCase()==="sim"){html+="&nbsp;<img style='"+estilo+"' src="+iu.$im("estasel.png")+" title='"+$trad("t4")+"' onclick='i3GEO.tema.limpasel(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t5")+"','limpasel')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />";html+="&nbsp;<img style='"+estilo+"' src="+iu.$im("zoomsel.gif")+" title='"+$trad("t4a")+"' onclick='i3GEO.tema.zoomsel(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t5")+"','zoomsel')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(tema.download.toLowerCase()==="sim"){html+="&nbsp;<img style='"+estilo+"' src="+iu.$im("down1.gif")+" title='download' onclick='i3GEO.tema.dialogo.download(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t6")+"','download')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}estilo=navm?"cursor:move;vertical-align:35%;padding-top:0px;color:black;":"cursor:move;vertical-align:top;color:black;";if(i3GEO.arvoreDeCamadas.AGUARDALEGENDA){html+="&nbsp;<span id='ArvoreTituloTema"+tema.name+"' style='"+estilo+"' onclick=\"i3GEO.tema.mostralegendajanela('"+tema.name+"','"+tema.tema+"','abrejanela');\" onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t7a")+"','');i3GEO.tema.mostralegendajanela('"+tema.name+"','"+tema.tema+"','ativatimer');\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('');i3GEO.tema.mostralegendajanela('"+tema.name+"','','desativatimer');\" >"+tema.tema+"</span>"}else{html+="&nbsp;<span id='ArvoreTituloTema"+tema.name+"' style='"+estilo+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t7")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+tema.tema+"</span>"}html+="</p>";if(i3GEO.tema.TEMPORIZADORESID[tema.name]==undefined&&tema.temporizador!=""){i3GEO.tema.temporizador(tema.name,tema.temporizador)}return(html)},atualizaFarol:function(mapscale){var farol,l,ltema,escala,iu=i3GEO.util,im=i3GEO.configura.locaplic+"/imagens/",camadas=i3GEO.arvoreDeCamadas.CAMADAS;farol="maisamarelo.png";l=camadas.length-1;if(l>=0){do{ltema=camadas[l];escala=ltema.escala;if(escala*1<mapscale*1){farol="maisverde.png"}if(escala*1>mapscale*1){farol="maisvermelho.png"}if(escala*1===0){farol="maisamarelo.png"}iu.defineValor("farol"+ltema.name,"src",im+farol)}while(l--)}},aplicaTemas:function(tipo){if(arguments.length===0){tipo="normal"}var t,temp,ligar,desligar;if(tipo==="normal"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("mantem")}if(tipo==="ligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("marca");if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googleearth","openlayers","googlemaps"])){return}}if(tipo==="desligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("desmarca");if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googleearth","openlayers","googlemaps"])){return}}temp=function(){i3GEO.atualiza();i3GEO.janela.fechaAguarde("redesenha")};try{clearTimeout(tempoBotaoAplicar)}catch(erro){}tempoBotaoAplicar="";i3GEO.janela.abreAguarde("redesenha",$trad("o1"));if(tipo==="normal"){i3GEO.php.ligatemas(temp,t[1].toString(),t[0].toString());return}if(tipo==="ligartodos"){i3GEO.php.ligatemas(temp,"",t[2].toString());return}if(tipo==="desligartodos"){i3GEO.php.ligatemas(temp,t[2].toString(),"")}},listaLigadosDesligados:function(tipo){if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return[[],[],[]]}if(arguments.length===0){tipo="manter"}var no,cs,csn,j,c,temp,nos=i3GEO.arvoreDeCamadas.ARVORE.getNodesByProperty("tipo","tema"),ligados=[],desligados=[],todos=[],n=nos.length,i=0,ATUAL=i3GEO.Interface.ATUAL;do{try{no=nos[i].getEl();cs=no.getElementsByTagName("input");csn=cs.length;for(j=0;j<csn;j+=1){c=cs[j];if(c.name==="layer"){temp=c.checked===true?ligados.push(c.value):desligados.push(c.value);todos.push(c.value);if(tipo==="marca"){c.checked=true;if(i3GEO.util.in_array(ATUAL,["googleearth","openlayers","googlemaps"])){i3GEO.Interface[ATUAL].ligaDesliga(c)}}if(tipo==="desmarca"){c.checked=false;if(i3GEO.util.in_array(ATUAL,["googleearth","openlayers","googlemaps"])){i3GEO.Interface[ATUAL].ligaDesliga(c)}}}}i++}catch(e){i+=1}}while(i<n);return([ligados,desligados,todos])},capturaCheckBox:function(tema){if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return}var nos,ligados,desligados,todos,n,i,no,cs,csn,j,c;nos=i3GEO.arvoreDeCamadas.ARVORE.getNodesByProperty("tipo","tema");n=nos.length;i=0;do{try{no=nos[i].getEl();cs=no.getElementsByTagName("input");csn=cs.length;for(j=0;j<csn;j+=1){c=cs[j];if(c.name==="layer"&&c.value===tema){return c}}i+=1}catch(e){i+=1}}while(i<n);return(null)},comparaTemas:function(novo,atual){try{var novon=novo.length,i;if(novon!==atual.length){return(false)}for(i=0;i<novon;i+=1){if(novo[i].name!==atual[i].name){return(false)}if(novo[i].tema!==atual[i].tema){return(false)}if(novo[i].sel!==atual[i].sel){return(false)}if(novo[i].status!==atual[i].status){return(false)}}return(true)}catch(e){return true}},pegaTema:function(idtema){var i,v="",c=i3GEO.arvoreDeCamadas.CAMADAS.length;for(i=0;i<c;i+=1){if(i3GEO.arvoreDeCamadas.CAMADAS[i].name===idtema){v=i3GEO.arvoreDeCamadas.CAMADAS[i]}}return v},filtraCamadas:function(propriedade,valor,operador,camadas){var resultado=[],i=0,temp,nelementos=camadas.length,ltema;if(nelementos>0){do{ltema=camadas[i];if(ltema.escondido.toLowerCase()!=="sim"){temp=ltema[propriedade];if(operador==="igual"){if(temp==valor){resultado.push(ltema)}}if(operador==="diferente"){if(temp!=valor){resultado.push(ltema)}}}i+=1}while(i<nelementos)}return resultado},alteraPropCamadas:function(propriedade,valor,camada){var resultado=[],i=0,temp,nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if(ltema.name===camada){ltema[propriedade]=valor}i+=1}while(i<nelementos)}},verificaAbrangenciaTemas:function(){if(i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS===false){return}try{var resultado=[],i=0,temp,nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema,intersec,node;if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];temp=ltema.exttema;if(temp!==""){if(i3GEO.util.intersectaBox(temp,i3GEO.parametros.mapexten)===false){$i("ArvoreTituloTema"+ltema.name).style.color="gray"}else{$i("ArvoreTituloTema"+ltema.name).style.color="black"}}i+=1}while(i<nelementos)}}catch(e){}},verificaAplicaExtensao:function(){var i=0,temp="",nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;try{if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if(ltema.aplicaextensao.toLowerCase()==="sim"){temp=ltema.name}i+=1}while(i<nelementos)}}catch(e){return""}return temp},dialogo:{filtro:function(){i3GEO.util.dialogoFerramenta("i3GEO.arvoreDeCamadas.dialogo.filtro()","filtroarvore","filtroarvore")}}};
371   -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="<table id='rosaV' >";setas+="<tr onclick=\"javascript:i3GEO.configura.mostraRosaDosVentos='nao'\"><td></td><td></td><td style=cursor:pointer >x</td></tr><tr>";setas+="<td><img class='rosanoroeste' title='noroeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','noroeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosanorte' title='norte' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','norte','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosanordeste' title='nordeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','nordeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td></tr>";setas+="<tr><td><img class='rosaoeste' title='oeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','oeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><table><tr>";setas+="<td><img class='rosamais' title='aproxima' onclick=\"i3GEO.navega.zoomin('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"')\" src='"+$im("branco.gif")+"' </td>";setas+="<td><img class='rosamenos' title='afasta' onclick=\"i3GEO.navega.zoomout('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"')\" src='"+$im("branco.gif")+"' </td>";setas+="</tr></table></td>";setas+="<td><img class='rosaleste' title='leste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','leste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td></tr>";setas+="<tr><td><img class='rosasudoeste' title='sudoeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','sudoeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosasul' title='sul' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','sul','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosasudeste' title='sudeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','sudeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td></tr></table>";i=$i("i3geo_rosa");i.innerHTML=setas;i.style.top=objposicaocursor.telay-27;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(ppx<boxxini){bxs.left=ppx;bxs.width=boxxini-ppx+2}if(py<boxyini){bxs.top=py;bxs.height=boxyini-py+2}}else{if(ppx>boxxini){bxs.width=ppx-boxxini+"px"}if(py>boxyini){bxs.height=py-boxyini+"px"}if(ppx<boxxini){bxs.left=ppx+"px";bxs.width=boxxini-ppx+"px"}if(py<boxyini){bxs.top=py+"px";bxs.height=boxyini-py+"px"}}},termina:function(){var valor,v,x1,y1,x2,y2,limpa,f;if(g_tipoacao!=='zoomli'){i3GEO.eventos.MOUSEDOWN.remove("i3GEO.navega.zoomBox.inicia()");i3GEO.eventos.MOUSEUP.remove("i3GEO.navega.zoomBox.termina()");return}try{if(i3GEO.navega.timerNavega!==null){return}valor=i3GEO.calculo.rect2ext("i3geoboxZoom",i3GEO.parametros.mapexten,i3GEO.parametros.pixelsize);v=valor[0];x1=valor[1];y1=valor[2];x2=valor[3];y2=valor[4];limpa=function(){var bxs=$i("i3geoboxZoom").style;bxs.display="none";bxs.visibility="hidden";bxs.width=0;bxs.height=0};if((x1===x2)||(y1===y2)){limpa.call();return}i3GEO.parametros.mapexten=v;limpa.call();i3GEO.eventos.MOUSEMOVE.remove("i3GEO.navega.zoomBox.desloca()");i3GEO.eventos.MOUSEUP.remove("i3GEO.navega.zoomBox.termina()");if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.zoom2extent(v);return}f="i3GEO.navega.timerNavega = null;i3GEO.navega.zoomExt('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','"+i3GEO.configura.tipoimagem+"','"+v+"')";if(i3GEO.navega.timerNavega!==undefined){clearTimeout(i3GEO.navega.timerNavega)}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)}catch(e){limpa.call();return}}},entorno:{ativaDesativa:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){alert("Essa operação não funciona nessa interface");return}if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.inverteModoTile();return}var letras,l;if(i3GEO.parametros.mapfile===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}if(i3GEO.configura.entorno.toLowerCase()==="sim"){letras=["L","O","N","S"];for(l=0;l<4;l++){if($i("img"+letras[l])){$i("img"+letras[l]).style.display="none";$i("img"+letras[l]).src=""}}$left("img",0);$top("img",0);i3GEO.configura.entorno="nao";alert("Entorno desativado");$i("img").style.visibility="visible";$i("img").style.display="block"}else{i3GEO.navega.entorno.geraURL();letras=["L","O","N","S"];for(l=0;l<4;l++){if($i("img"+letras[l])){$i("img"+letras[l]).style.width=i3GEO.parametros.w;$i("img"+letras[l]).style.height=i3GEO.parametros.h;$i("img"+letras[l]).style.display="block"}}i3GEO.configura.entorno.toLowerCase()="sim";i3GEO.navega.entorno.ajustaPosicao();alert("Entorno ativado. o desenho do mapa pode demorar mais.")}},geraURL:function(){var nny,nnx,sy,sx,lx,ly,ox,oy,u,sul,norte,leste,oeste;nny=(i3GEO.parametros.h/2)*-1;nnx=i3GEO.parametros.w/2;sy=i3GEO.parametros.h+(i3GEO.parametros.h/2);sx=i3GEO.parametros.w/2;lx=i3GEO.parametros.w+(i3GEO.parametros.w/2);ly=i3GEO.parametros.h/2;ox=(parseInt(i3GEO.parametros.w/2,10))*-1;oy=i3GEO.parametros.h/2;u=window.location.protocol+"\/\/"+window.location.host+i3GEO.parametros.cgi+"?map="+i3GEO.parametros.mapfile;u+="&mode=map&imgext="+i3GEO.parametros.mapexten+"&mapsize="+nnx+" "+oy;sul=u+"&imgxy="+sx/2+" "+sy/2;norte=u+"&imgxy="+nnx/2+" "+nny/2;leste=u+"&imgxy="+lx/2+" "+ly/2;oeste=u+"&imgxy="+ox/2+" "+oy/2;$i("imgS").src=sul;$i("imgN").src=norte;$i("imgL").src=leste;$i("imgO").src=oeste},ajustaPosicao:function(){$left("img",i3GEO.parametros.w*-1);$left("imgS",i3GEO.parametros.w*-1);$left("imgL",i3GEO.parametros.w);$left("imgO",i3GEO.parametros.w*-3);$left("imgN",i3GEO.parametros.w*-1);$top("img",i3GEO.parametros.h*-1);$top("imgS",i3GEO.parametros.h*-1);$top("imgL",i3GEO.parametros.h*-1);$top("imgN",i3GEO.parametros.h*-1);$top("imgO",i3GEO.parametros.h*-1)}},lente:{POSICAOX:0,POSICAOY:0,ESTAATIVA:"nao",inicia:function(){var novoel,novoimg,temp;if(!$i("lente")){novoel=document.createElement("div");novoel.id='lente';novoel.style.clip='rect(0px,0px,0px,0px)';novoimg=document.createElement("img");novoimg.src="";novoimg.id='lenteimg';novoel.appendChild(novoimg);document.body.appendChild(novoel);novoel=document.createElement("div");novoel.id='boxlente';document.body.appendChild(novoel)}temp=$i('boxlente').style;temp.borderWidth='1';temp.borderColor="red";temp.display="block";$i("lente").style.display="block";i3GEO.navega.lente.ESTAATIVA="sim";i3GEO.navega.lente.atualiza();if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.navega.lente.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.navega.lente.atualiza()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.navega.lente.movimenta()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.navega.lente.movimenta()")}},atualiza:function(){var temp=function(retorno){try{var pos,volta,nimg,olente,oboxlente,olenteimg;retorno=retorno.data;if(retorno==="erro"){alert("A lente nao pode ser criada");return}volta=retorno.split(",");nimg=volta[2];olente=$i('lente');oboxlente=$i('boxlente');olenteimg=$i('lenteimg');olenteimg.src=nimg;olenteimg.style.width=volta[0]*1.5;olenteimg.style.height=volta[1]*1.5;olente.style.zIndex=1000;olenteimg.style.zIndex=1000;oboxlente.style.zIndex=1000;pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));olente.style.left=pos[0]+i3GEO.navega.lente.POSICAOX+"px";olente.style.top=pos[1]+i3GEO.navega.lente.POSICAOY+"px";oboxlente.style.left=pos[0]+i3GEO.navega.lente.POSICAOX+"px";oboxlente.style.top=pos[1]+i3GEO.navega.lente.POSICAOY+"px";oboxlente.style.display='block';oboxlente.style.visibility='visible';olente.style.display='block';olente.style.visibility='visible';i3GEO.janela.fechaAguarde("ajaxabrelente")}catch(e){i3GEO.janela.fechaAguarde()}};if(i3GEO.navega.lente.ESTAATIVA==="sim"){i3GEO.janela.abreAguarde("ajaxabrelente",$trad("o1"));i3GEO.php.aplicaResolucao(temp,1.5)}else{i3GEO.navega.lente.desativa()}},desativa:function(){$i("lente").style.display="none";$i("boxlente").style.display="none";$i('boxlente').style.borderWidth=0;i3GEO.navega.lente.ESTAATIVA="nao";i3GEO.eventos.MOUSEMOVE.remove("i3GEO.navega.lente.movimenta()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.navega.lente.atualiza()")},movimenta:function(){try{if(i3GEO.navega.lente.ESTAATIVA==="sim"){var pos,esq,topo,clipt,i;if($i("lente").style.visibility==="visible"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA))}esq=(objposicaocursor.telax-pos[0])*2.25;topo=(objposicaocursor.telay-pos[1])*2.25;clipt="rect("+(topo-120)+" "+(esq+120)+" "+(topo+120)+" "+(esq-120)+")";i=$i("lente").style;i.clip=clipt;i.top=pos[1]-(topo-120);i.left=pos[0]-(esq-120)}}catch(e){}}},destacaTema:{TAMANHO:75,ESTAATIVO:"nao",TEMA:"",inicia:function(tema){var novoel,novoeli,janela,pos;if(!$i("img_d")){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));novoel=document.createElement("div");novoel.id="div_d";novoel.style.zIndex=5000;document.body.appendChild(novoel);$i("div_d").innerHTML="<input style='position:relative;top:0px;left:0px'' type=image src='' id='img_d' />";$i("div_d").style.left=parseInt(pos[0],10);$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="<p style='position:absolute;top:0px;left:0px'>+-</p>"}i3GEO.navega.destacaTema.TEMA=tema;i3GEO.navega.destacaTema.ESTAATIVO="sim";i3GEO.navega.destacaTema.atualiza();janela=i3GEO.janela.cria(160,0,"","center","center","Feche para parar destaque&nbsp;&nbsp;","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+='<div style="text-align:center;position:relative;left:9px" >'}estilo="top:4px;";if(navm){estilo="top:4px;left:-2px;"}temp+='<div id="vertMaisZoom" style="'+estilo+'"></div><div id="vertBGDiv" name="vertBGDiv" tabindex="0" x2:role="role:slider" state:valuenow="0" state:valuemin="0" state:valuemax="200" title="Zoom" >';temp+='<div id="vertHandleDivZoom" ><img alt="" class="slider" src="'+i3GEO.util.$im("branco.gif")+'" /></div></div>';if(navm){temp+='<div id=vertMenosZoom style="left:-1px;" ></div>'}else{temp+='<div id=vertMenosZoom ></div>'}if(navn){temp+='</div>'}return temp},ativa:function(){var temp;$i("vertMaisZoom").onmouseover=function(){i3GEO.ajuda.mostraJanela('Amplia o mapa mantendo o centro atual.')};$i("vertMaisZoom").onclick=function(){if(!$i("imgtemp")){$i("vertHandleDivZoom").onmousedown.call();g_fatordezoom=0;$i("vertHandleDivZoom").onmousemove.call();g_fatordezoom=-1}$i("vertHandleDivZoom").onmousemove.call();i3GEO.barraDeBotoes.BOTAOCLICADO='zoomin';try{clearTimeout(i3GEO.navega.timerNavega)}catch(e){}i3GEO.navega.timerNavega=setTimeout("$i('vertBGDiv').onmouseup.call();",i3GEO.navega.TEMPONAVEGAR);if(g_fatordezoom<-6){$i("vertBGDiv").onmouseup.call()}};$i("vertMenosZoom").onmouseover=function(){i3GEO.ajuda.mostraJanela('Reduz o mapa mantendo o centro atual.')};$i("vertMenosZoom").onclick=function(){if(!$i("imgtemp")){$i("vertHandleDivZoom").onmousedown.call();g_fatordezoom=0;$i("vertHandleDivZoom").onmousemove.call();g_fatordezoom=1}$i("vertHandleDivZoom").onmousemove.call();i3GEO.barraDeBotoes.BOTAOCLICADO='zoomout';try{clearTimeout(i3GEO.navega.timerNavega)}catch(e){}i3GEO.navega.timerNavega=setTimeout("$i('vertBGDiv').onmouseup.call();",i3GEO.navega.TEMPONAVEGAR);if(g_fatordezoom>6){$i("vertBGDiv").onmouseup.call()}};verticalSlider=YAHOO.widget.Slider.getVertSlider("vertBGDiv","vertHandleDivZoom",0,70);verticalSlider.onChange=function(offsetFromStart){g_fatordezoom=(offsetFromStart-35)/5};verticalSlider.setValue(35,true);if($i("vertBGDiv")){$i("vertBGDiv").onmouseup=function(){verticalSlider.setValue(35,true);if(g_fatordezoom!==0){temp=i3GEO.navega.TEMPONAVEGAR;i3GEO.navega.TEMPONAVEGAR=0;i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,i3geo_ns);i3GEO.navega.TEMPONAVEGAR=temp}g_fatordezoom=0}}if($i("vertHandleDivZoom")){$i("vertHandleDivZoom").onmousedown=function(){var iclone,corpo;$i("vertHandleDivZoom").onmouseout=function(e){if(!e){e=window.event}if(g_fatordezoom!==0){$i("vertBGDiv").onmouseup.call()}e.onmouseup.returnValue=false;e.onmouseout.returnValue=false};i3GEO.barraDeBotoes.BOTAOCLICADO='slidezoom';if(!$i("imgtemp")){iclone=document.createElement('IMG');iclone.style.position="absolute";iclone.id="imgtemp";iclone.style.border="1px solid blue";$i("img").parentNode.appendChild(iclone);iclone=$i("imgtemp");corpo=$i("img");if(!corpo){return}iclone.src=corpo.src;iclone.style.width=i3GEO.parametros.w;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(coordenadas){i3GEO.navega.dialogo.google.coordenadas=coordenadas;if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizagoogle()")>0){i3GEO.eventos.NAVEGAMAPA.remove("atualizagoogle()")}i3GEO.util.criaBox();g_operacao="navega";var idgoogle="googlemaps"+Math.random();i3GEO.janela.cria((i3GEO.parametros.w/2)+25+"px",(i3GEO.parametros.h/2)+18+"px",i3GEO.configura.locaplic+"/ferramentas/googlemaps/index.php","","","Google maps <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=7&idajuda=68' >&nbsp;&nbsp;&nbsp;</a>",idgoogle);atualizagoogle=function(){try{parent.frames[idgoogle+"i"].panTogoogle()}catch(e){i3GEO.eventos.NAVEGAMAPA.remove("atualizagoogle()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizagoogle()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizagoogle()")}},confluence:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.confluence()","confluence","confluence")}}};
372   -if(typeof(i3GEO)==='undefined'){i3GEO=[]}objposicaocursor={ddx:"",ddy:"",dmsx:"",dmsy:"",telax:"",telay:"",imgx:"",imgy:"",refx:"",refy:""};i3GEO.eventos={ATUALIZAARVORECAMADAS:[],ATIVATEMA:[],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.toLowerCase()==="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){}}}};
373   -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.arvoreDeTemas={OPCOESADICIONAIS:{idonde:"",incluiArvore:true,uploaddbf:false,uploadlocal:false,uploadarquivo: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:false,comentarios:true,bookmark:true,importarwmc:true,googleearth:true,carregaKml:true},FATORESTRELA:"10",INCLUISISTEMAS:true,INCLUIWMS:true,INCLUIESTRELAS:true,FILTRADOWNLOAD:false,FILTRAOGC:false,TIPOBOTAO:"checkbox",ATIVATEMA:"",ATIVATEMAIMEDIATO:false,IDSMENUS:[],RETORNAGUIA:"",IDHTML:"arvoreAdicionaTema",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<nraiz;i+=1){html="<span title='"+raiz[i].description+"'> "+raiz[i].title;if(raiz[i].nacessos>0){html+=" ("+((raiz[i].nacessosok*100)/(raiz[i].nacessos*1))+"%)</span>"}else{html+=" (% de acessos não definido)</span>"}html+="<hr>";tempNode=new YAHOO.widget.HTMLNode({html:html,id_ws:raiz[i].id_ws,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<n;i+=1){temp=retorno.data[i];cabeca=temp.nome+" - "+temp.titulo;if(cabeca!=="undefined - undefined"){tempNode=new YAHOO.widget.HTMLNode({html:"<span style='color:"+cor+"' >"+cabeca,url:node.data.url,nivel:(node.data.nivel*1+1),id_ws:"",layer:temp.nome,enableHighlight:false,expanded:false},node);if(!temp.estilos){tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS,1)}if(temp.estilos){ns=temp.estilos.length;for(j=0;j<ns;j+=1){tempNodeS=new YAHOO.widget.HTMLNode({html:i3GEO.arvoreDeTemas.montaTextoTemaWMS(node.data.url,temp.nome,temp.estilos[j].nome,temp.estilos[j].titulo,temp.srs.toString(),temp.formatsinfo.toString(),temp.version.toString(),temp.formats.toString(),cor),enableHighlight:false,expanded:false},tempNode);tempNode.isleaf=true}}cor=(cor==="rgb(51, 102, 102)")?"rgb(47, 70, 50)":"rgb(51, 102, 102)"}}node.loadComplete()};i3GEO.php.listaLayersWMS(monta,node.data.url,(node.data.nivel*1+1),node.data.id_ws,node.data.layer)},montaTextoTemaWMS:function(servico,layer,estilo,titulo,proj,formatoinfo,versao,formatoimg,cor){var html,temp,adiciona;html="<td style='vertical-align:top;padding-top:5px;'><span ><input style='cursor:pointer;border:solid 0 white;' ";temp=function(){i3GEO.janela.fechaAguarde("ajaxredesenha");i3GEO.atualiza()};adiciona="i3GEO.janela.abreAguarde(\"ajaxredesenha\",\""+$trad("o1")+"\");i3GEO.arvoreDeTemas.checked=false;i3GEO.php.adicionaTemaWMS("+temp+","+"\""+servico+"\","+"\""+layer+"\","+"\""+estilo+"\","+"\""+proj+"\","+"\""+formatoimg+"\","+"\""+versao+"\","+"\""+titulo+"\","+"\"\","+"\"nao\","+"\""+formatoinfo+"\")";html+="onclick='javascript:"+adiciona+"' "+" type='radio' /></td><td style='padding-top:4px;vertical-align:top;text-align:left;padding-left:3px;color:"+cor+";' >"+layer+" - "+titulo+"</td></span>";return(html)},listaMenus:function(g_sid,g_locaplic,funcao){var retorno=function(retorno){var c,m,i,k,jj,j;if(i3GEO.arvoreDeTemas.IDSMENUS.length===0){i3GEO.arvoreDeTemas.MENUS=retorno.data}else{i3GEO.arvoreDeTemas.MENUS=[];c=retorno.data.length;m=i3GEO.arvoreDeTemas.IDSMENUS.length;for(i=0,j=c;i<j;i+=1){for(k=0,jj=m;k<jj;k+=1){if(retorno.data[i].idmenu===i3GEO.arvoreDeTemas.IDSMENUS[k]){i3GEO.arvoreDeTemas.MENUS.push(retorno.data[i])}}}}if(funcao!==""){eval(funcao+"(retorno)")}};i3GEO.php.pegalistademenus(retorno)},listaGrupos:function(g_sid,g_locaplic,id_menu,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.GRUPOS=retorno.data;if(funcao!==""){funcao.call()}};if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD||i3GEO.arvoreDeTemas.FILTRAOGC){i3GEO.php.pegalistadegrupos(retorno,id_menu,"sim")}else{i3GEO.php.pegalistadegrupos(retorno,id_menu,"nao")}},listaSubGrupos:function(g_sid,g_locaplic,id_menu,id_grupo,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.SUBGRUPOS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegalistadeSubgrupos(retorno,id_menu,id_grupo)},listaTemas:function(g_sid,g_locaplic,id_menu,id_grupo,id_subgrupo,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.TEMAS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegalistadetemas(retorno,id_menu,id_grupo,id_subgrupo)},listaSistemas:function(g_sid,g_locaplic,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.SISTEMAS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegaSistemas(retorno)},listaDrives:function(g_sid,g_locaplic,funcao){var retorno=function(retorno){try{i3GEO.arvoreDeTemas.DRIVES=retorno.data[0];if(i3GEO.arvoreDeTemas.DRIVES==""){return}if(funcao!==""){funcao.call()}}catch(e){i3GEO.arvoreDeTemas.DRIVES=""}};i3GEO.php.listadrives(retorno)},listaEstrelas:function(node){var busca,root,montanos;montanos=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<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;try{if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}}catch(e){}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'>&nbsp;fonte</a>"}if(ngSgrupo[sg].subgrupo){d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>"}else{d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].grupo)+")"+lk+"</td>"}tempNode=new YAHOO.widget.HTMLNode({html:d,expanded:false,isLeaf:true,enableHighlight: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:"<span style='color:red'>Nada encontrado<br><br></span>",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(i3GEO.arvoreDeTemas.ARVORE){return}if(!idhtml){idhtml=""}if(idhtml!==""){i3GEO.arvoreDeTemas.IDHTML=idhtml}if(!funcaoTema){funcaoTema=""}if(funcaoTema!==""){i3GEO.arvoreDeTemas.ATIVATEMA=funcaoTema}if(!objOpcoes){objOpcoes=""}if(objOpcoes!==""){i3GEO.arvoreDeTemas.OPCOESADICIONAIS=objOpcoes}if(!tipoBotao){tipoBotao=""}if(tipoBotao!==""){i3GEO.arvoreDeTemas.TIPOBOTAO=tipoBotao}i3GEO.arvoreDeTemas.LOCAPLIC=g_locaplic;i3GEO.arvoreDeTemas.SID=g_sid;if(i3GEO.arvoreDeTemas.IDHTML===""){return}i3GEO.arvoreDeTemas.listaMenus(g_sid,g_locaplic,"i3GEO.arvoreDeTemas.montaArvore")},atualiza:function(){i3GEO.arvoreDeTemas.ARVORE=null;i3GEO.arvoreDeTemas.cria(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,i3GEO.arvoreDeTemas.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(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluibusca===true){insp="<br><br><table><tr>"+"<td><span style='font-size:12px'>&nbsp;"+$trad("a1")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=31' >&nbsp;&nbsp;&nbsp;</a></span></td>"+"<td><input onclick='javascript:i3GEO.arvoreDeTemas.select();' class='digitar' type='text' id='i3geo_buscatema' size='15' value='' /></td>"+"<td><img class='tic' ";if(navm){insp+="style='top:0px;'"}else{insp+="style='top:4px;'"}insp+=" src='"+i3GEO.util.$im("branco.gif")+"' onclick='i3GEO.arvoreDeTemas.buscaTema2(document.getElementById(\"i3geo_buscatema\").value)' /></td>";insp+="</tr></table>&nbsp;";tempNode=new YAHOO.widget.HTMLNode({html:insp,enableHighlight:false,expanded:false,hasIcon:false},root)}outrasOpcoes=i3GEO.arvoreDeTemas.outrasOpcoesHTML();if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde!==""){document.getElementById(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde).innerHTML=outrasOpcoes}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore===true){tempNode=new YAHOO.widget.HTMLNode({html:outrasOpcoes+"&nbsp;<br>",isLeaf:true,enableHighlight:false,expanded:false,hasIcon:false},root);if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir===true){retorno=function(){var drives,iglt,ig,drive;tempNode=new YAHOO.widget.HTMLNode({html:"&nbsp;"+$trad("a6")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=32' >&nbsp;&nbsp;&nbsp;</a>",enableHighlight: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(ig<iglt)};i3GEO.arvoreDeTemas.listaDrives(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,retorno)}}if(i3GEO.parametros.editor==="sim"){tempNode=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin' target=blank >Sistema de administração</a>",idmenu:"",enableHighlight:false,expanded:false},root);tempNode=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/arvore.html' target=blank >Editar árvore</a>",idmenu:"",enableHighlight:false,expanded:false},root);tempNode=new YAHOO.widget.HTMLNode({html:"<span style='color:red;cursor:pointer' title='opção visível apenas para editores' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/menus.html\")' target=blank >Editar menus</span>",idmenu:"",enableHighlight:false,expanded:false},root)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.googleearth===true){tempNode=new YAHOO.widget.HTMLNode({html:"<a href='"+i3GEO.configura.locaplic+"/kml.php' target=blank > <img src='"+i3GEO.configura.locaplic+"/imagens/visual/default/branco.gif' class='abregoogleearth'> "+$trad("a13")+"</a>",idmenu:"",enableHighlight:false,expanded:false},root)}if(i3GEO.arvoreDeTemas.INCLUIWMS===true){if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar lista' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/webservices.html?tipo=WMS\")' style='width:11px;position:relative;left:3px' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}tempNode=new YAHOO.widget.HTMLNode({html:"<b>&nbsp;OGC-WMS</b>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=33' >&nbsp;&nbsp;&nbsp;</a>"+editor,idwms:"raiz",expanded:false,enableHighlight:false},root);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaWMS,1)}if(i3GEO.arvoreDeTemas.INCLUIESTRELAS===true){tempNode=new YAHOO.widget.HTMLNode({expanded:false,html:"<b>&nbsp;"+$trad("t46")+"</b> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=95' >&nbsp;&nbsp;&nbsp;</a>",enableHighlight:false},root);ig=5;do{tempNode1=new YAHOO.widget.HTMLNode({expanded:false,html:"<img src='"+$im("e"+ig+".png")+"' />",enableHighlight:false,nivel:ig},tempNode);tempNode1.setDynamicLoad(i3GEO.arvoreDeTemas.listaEstrelas,1);ig-=1}while(ig>0)}dados=i3GEO.arvoreDeTemas.MENUS;c=dados.length;for(i=0,j=c;i<j;i+=1){if(!dados[i].nomemenu){dados[i].nomemenu=dados[i].idmenu}if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar grupos' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+dados[i].idmenu+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}if(!dados[i].publicado){dados[i].publicado="sim"}if(dados[i].publicado.toLowerCase()!=="nao"){conteudo="<b>&nbsp;<span title='"+(dados[i].desc)+"'>"+dados[i].nomemenu+"</span>"+editor}else{conteudo="<b>&nbsp;<span title='nao publicado' ><s>"+dados[i].nomemenu+"</s></span>"+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(i3GEO.arvoreDeTemas.INCLUISISTEMAS){retorno=function(){var sis,iglt,tempNode,ig,nomeSis,sisNode,funcoes,tempf,ig2,abre,nomeFunc,funcNode;try{sis=i3GEO.arvoreDeTemas.SISTEMAS;iglt=sis.length;tempNode=new YAHOO.widget.HTMLNode({html:"<b>Sistemas</b>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=34' >&nbsp;&nbsp;&nbsp;</a>",expanded:false,enableHighlight:false},root)}catch(e){i3GEO.arvoreDeTemas.ARVORE.draw();return}ig=0;do{nomeSis=sis[ig].NOME;if(sis[ig].PUBLICADO){if(sis[ig].PUBLICADO.toLowerCase()==="nao"){nomeSis="<s>"+sis[ig].NOME+"</s>"}}sisNode=new YAHOO.widget.HTMLNode({html:nomeSis,expanded:false,enableHighlight:false},tempNode);funcoes=sis[ig].FUNCOES;tempf=funcoes.length;for(ig2=0;ig2<tempf;ig2+=1){abre="i3GEO.janela.cria('"+(funcoes[ig2].W)+"px','"+(funcoes[ig2].H)+"px','"+(funcoes[ig2].ABRIR)+"','','','Sistemas')";nomeFunc="<a href='#' onclick=\""+abre+"\">"+funcoes[ig2].NOME+"</a>";funcNode=new YAHOO.widget.HTMLNode({html:nomeFunc,expanded:false,enableHighlight:false,isLeaf:true},sisNode)}ig+=1}while(ig<iglt);i3GEO.arvoreDeTemas.ARVORE.draw()};i3GEO.arvoreDeTemas.listaSistemas(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,retorno)}document.getElementById(i3GEO.arvoreDeTemas.IDHTML).style.textAlign="left";if(!i3GEO.arvoreDeTemas.INCLUISISTEMAS){i3GEO.arvoreDeTemas.ARVORE.draw()}},montaGrupos:function(node){var temp=function(){var grupos,c,raiz,nraiz,mostra,html,i,d,editor;grupos=i3GEO.arvoreDeTemas.GRUPOS.grupos;c=grupos.length-3;raiz=grupos[c].temasraiz;nraiz=raiz.length;for(i=0;i<nraiz;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&raiz[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&raiz[i].ogc==="nao"){mostra=false}if(mostra){tempNode=new YAHOO.widget.HTMLNode({isLeaf:false,enableHighlight:false,expanded:false,html:i3GEO.arvoreDeTemas.montaTextoTema("gray",raiz[i])},node)}}for(i=0;i<c;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&grupos[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&grupos[i].ogc==="nao"){mostra=false}if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar subgrupos' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+node.data.idmenu+"&id_grupo="+grupos[i].id_n1+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}if(mostra){if(grupos[i].publicado){if(grupos[i].publicado==="NAO"){grupos[i].nome="<span title='nao publicado' ><s>"+grupos[i].nome+"</s></span>"}}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(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,temp)},montaSubGrupos:function(node){var temp=function(){var i,c,mostra,d,html,tempNode,nraiz,subgrupos,raiz;subgrupos=i3GEO.arvoreDeTemas.SUBGRUPOS.subgrupo;c=subgrupos.length;raiz=i3GEO.arvoreDeTemas.SUBGRUPOS.temasgrupo;nraiz=raiz.length;for(i=0;i<nraiz;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&raiz[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&raiz[i].ogc==="nao"){mostra=false}if(mostra){tempNode=new YAHOO.widget.HTMLNode({nacessos:raiz[i].nacessos,html:i3GEO.arvoreDeTemas.montaTextoTema("gray",raiz[i]),idtema:raiz[i].tid,fonte:raiz[i].link,ogc:raiz[i].ogc,kmz:raiz[i].kmz,permitecomentario:raiz[i].permitecomentario,download:raiz[i].download,expanded:false,enableHighlight:false,isLeaf:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.propTemas,1)}}for(i=0;i<c;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&subgrupos[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&subgrupos[i].ogc==="nao"){mostra=false}if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar temas' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+node.data.idmenu+"&id_grupo="+node.data.idgrupo+"&id_subgrupo="+subgrupos[i].id_n2+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}if(mostra){if(subgrupos[i].publicado){if(subgrupos[i].publicado==="NAO"){subgrupos[i].nome="<span title='nao publicado' ><s>"+subgrupos[i].nome+"</s></span>"}}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(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,node.data.idgrupo,temp)},montaTemas:function(node){var temp=function(){var i,cor,temas,c,mostra,tempNode;temas=i3GEO.arvoreDeTemas.TEMAS.temas;c=temas.length;cor="rgb(51, 102, 102)";for(i=0;i<c;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&temas[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&temas[i].ogc==="nao"){mostra=false}if(mostra){if(temas[i].publicado){if(temas[i].publicado==="NAO"){temas[i].nome="<span title='nao publicado' ><s>"+temas[i].nome+"</s></span>"}}tempNode=new YAHOO.widget.HTMLNode({nacessos:temas[i].nacessos,html:i3GEO.arvoreDeTemas.montaTextoTema(cor,temas[i]),idtema:temas[i].tid,fonte:temas[i].link,ogc:temas[i].ogc,kmz:temas[i].kmz,download:temas[i].download,permitecomentario:temas[i].permitecomentario,bookmark:"sim",expanded:false,isLeaf:false,enableHighlight:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.propTemas,1);cor=(cor==="rgb(51, 102, 102)")?"rgb(47, 70, 50)":"rgb(51, 102, 102)"}}node.loadComplete()};i3GEO.arvoreDeTemas.listaTemas(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,node.data.idgrupo,node.data.idsubgrupo,temp)},montaDir:function(node){var montaLista=function(retorno){var ig,d,conteudo,dirs,tempNode,arquivos,nodeSHP;dirs=retorno.data.diretorios;for(ig=0;ig<dirs.length;ig+=1){tempNode=new YAHOO.widget.HTMLNode({html:dirs[ig],caminho:node.data.caminho+"/"+dirs[ig],expanded:false,enableHighlight:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaDir,1)}arquivos=retorno.data.arquivos;for(ig=0;ig<arquivos.length;ig+=1){conteudo=arquivos[ig];if(conteudo.search(".img")>1||conteudo.search(".tif")>1||conteudo.search(".TIF")>1||conteudo.search(".shp")>1||conteudo.search(".SHP")>1){conteudo="<a href='#' title='"+$trad("g2")+"' onclick='i3GEO.util.adicionaSHP(\""+node.data.caminho+"/"+conteudo+"\")' >"+conteudo+"</a>";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="<td style='"+estilo+"'><span>";if(i3GEO.arvoreDeTemas.TIPOBOTAO!=="download"){html+="<input title='"+tema.tid+"' style='width:12px;height:12px;cursor:pointer;border:solid 0 white;' "}else{html+="<img title='"+tema.tid+"' src='"+$im("down1.gif")+"'"}if(i3GEO.arvoreDeTemas.ATIVATEMA!==""){clique="onclick=\""+i3GEO.arvoreDeTemas.ATIVATEMA+"\""}else{if(i3GEO.arvoreDeTemas.ATIVATEMAIMEDIATO===false){clique="onclick='i3GEO.util.criaBotaoAplicar(\"i3GEO.arvoreDeTemas.adicionaTemas\",\""+$trad("p14")+"\",\"i3geoBotaoAplicar\",this)'"}else{clique="onclick='i3GEO.arvoreDeTemas.adicionaTemas([\""+tema.tid+"\"])'"}}html+=clique;if(i3GEO.arvoreDeTemas.TIPOBOTAO!=="download"){html+=" type='"+i3GEO.arvoreDeTemas.TIPOBOTAO+"' value='"+tema.tid+"' />"}else{html+=" /> "}html+="</td><td title='"+tema.tid+"' onmouseout='javascript:this.style.color=\""+cor+"\";' onmouseover='javascript:this.style.color=\"blue\";' style='cursor:pointer;font-size:11px;text-align:left;color:"+cor+";padding-left:0px;' "+clique+">";html+=tema.nome;html+="</td></span>";return(html)},propTemas:function(node){var d,tempNode,html,lkmini,lkmini1,lkgrcode,lkgrcode1,n,ogc;if(node.data.fonte&&node.data.fonte!==""&&node.data.fonte!==" "){tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' href='"+node.data.fonte+"' target='_blank' >Fonte</a>"},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.mini===true){lkmini=i3GEO.arvoreDeTemas.LOCAPLIC+"/testamapfile.php?map="+node.data.idtema+".map&tipo=mini";lkmini1=i3GEO.arvoreDeTemas.LOCAPLIC+"/testamapfile.php?map="+node.data.idtema+".map&tipo=grande";tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' onmouseover='i3GEO.ajuda.mostraJanela(\"<img src="+lkmini+" />\")' href='"+lkmini1+"' target='blank' >Miniatura</a>"},node)}if(node.data.ogc&&node.data.ogc!=="nao"){if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.kml===true){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.abreKml(\""+node.data.idtema+"\",\"kml\")' >Kml</a>";if(node.data.kmz.toLowerCase()==="sim"){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.abreKml(\""+node.data.idtema+"\",\"kmz\")' >Kml</a>"}tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}ogc=i3GEO.arvoreDeTemas.LOCAPLIC+"/ogc.php?tema="+node.data.idtema+"&service=wms&request=getcapabilities";tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='getcapabilities' href='"+ogc+"' target='blank' >WMS - OGC</a>"},node)}if(node.data.download&&node.data.download.toLowerCase()!=="nao"&&i3GEO.arvoreDeTemas.TIPOBOTAO!=="download"){html="<a href='"+i3GEO.configura.locaplic+"/datadownload.htm?"+node.data.idtema+"' target='_blank'>Download</a>";tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(node.data.permitecomentario&&node.data.permitecomentario!=="nao"&&i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios===true){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.comentario(\""+node.data.idtema+"\",\"comentario\")' >Comentário</a>";tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.qrcode===true){lkgrcode=i3GEO.arvoreDeTemas.LOCAPLIC+"/pacotes/qrcode/php/qr_html.php?d="+i3GEO.arvoreDeTemas.LOCAPLIC+"/mobile/index.php?temasa="+node.data.idtema;lkgrcode1=i3GEO.arvoreDeTemas.LOCAPLIC+"/pacotes/qrcode/php/qr_img.php?d="+i3GEO.arvoreDeTemas.LOCAPLIC+"/mobile/index.php?temasa="+node.data.idtema;tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' onmouseover='i3GEO.ajuda.mostraJanela(\"<img src="+lkgrcode1+" />\")' href='"+lkgrcode+"' target='blank' >Qrcode</a>"},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.estrelas===true){n=parseInt(node.data.nacessos/(i3GEO.arvoreDeTemas.FATORESTRELA*1),10);if(n>=5){n=5}html=(n>0)?"<img src='"+i3GEO.util.$im("e"+n+".png")+"'/>":"<img src='"+i3GEO.util.$im("e0.png")+"'/>";tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.bookmark===true){html=i3GEO.social.bookmark(i3GEO.configura.locaplic+"/ms_criamapa.php?layers="+node.data.idtema);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"),OPCOESADICIONAIS=i3GEO.arvoreDeTemas.OPCOESADICIONAIS;if(OPCOESADICIONAIS.refresh===true){ins+="<td><img class='refresh' onclick='i3GEO.arvoreDeTemas.atualiza()' src='"+imb+"' style='cursor:pointer;text-align:left' title='Refresh'/><td>";t+=20}if(OPCOESADICIONAIS.uploadgpx===true){ins+="<td><img class='uploadgpx' onclick='i3GEO.arvoreDeTemas.dialogo.uploadgpx()' src='"+imb+"' style='cursor:pointer;text-align:left' title='upload GPX'/><td>";t+=20}if(OPCOESADICIONAIS.uploaddbf===true){ins+="<td><img class='uploaddbf' onclick='i3GEO.arvoreDeTemas.dialogo.uploaddbf()' src='"+imb+"' style='cursor:pointer;text-align:left' title='"+$trad("a2b")+"'/><td>";t+=20}if(OPCOESADICIONAIS.uploadlocal===true){ins+="<td><img class='upload' onclick='i3GEO.arvoreDeTemas.dialogo.upload()' src='"+imb+"' style='cursor:pointer;text-align:left' title='"+$trad("a2")+"'/><td>";t+=20}if(OPCOESADICIONAIS.uploadarquivo===true){ins+="<td><img class='upload' onclick='i3GEO.arvoreDeTemas.dialogo.uploadarquivo()' src='"+imb+"' style='cursor:pointer;text-align:left' title='"+$trad("a14")+"'/><td>";t+=20}if(OPCOESADICIONAIS.downloadbase===true){ins+="<td><img onclick='i3GEO.arvoreDeTemas.dialogo.downloadbase()' class='download' src='"+imb+"' style='cursor:pointer;text-align:left' title='"+$trad("a3")+"'/><td>";t+=20}if(OPCOESADICIONAIS.importarwmc===true){ins+="<td><img onclick='i3GEO.arvoreDeTemas.dialogo.importarwmc()' class='importarwmc' src='"+imb+"' style='cursor:pointer;text-align:left' title='"+$trad("a3a")+"'/><td>";t+=20}if(OPCOESADICIONAIS.conectarwms===true){ins+="<td><img class='conectarwms' onclick='i3GEO.arvoreDeTemas.dialogo.conectarwms()' src='"+imb+"' style='cursor:pointer;text-align:left' title='"+$trad("a4")+"'/><td>";t+=20}if(OPCOESADICIONAIS.conectarwmst===true){ins+="<td><img class='conectarwmst' onclick='i3GEO.arvoreDeTemas.dialogo.conectarwmst()' src='"+imb+"' style='cursor:pointer;text-align:left' title='"+$trad("a4b")+"'/><td>";t+=20}if(OPCOESADICIONAIS.conectargeorss===true){ins+="<td><img class='conectargeorss' onclick='i3GEO.arvoreDeTemas.dialogo.conectargeorss()' src='"+imb+"' style='cursor:pointer;text-align:left' title='"+$trad("a5")+"'/><td>";t+=20}if(OPCOESADICIONAIS.nuvemTags===true){ins+="<td><img class='nuvemtags' onclick='i3GEO.arvoreDeTemas.dialogo.nuvemTags()' src='"+imb+"' style='cursor:pointer;text-align:left' title='"+$trad("a5a")+"'/><td>";t+=20}if(OPCOESADICIONAIS.nuvemTagsFlash===true){ins+="<td><img class='nuvemtags' onclick='i3GEO.arvoreDeTemas.dialogo.nuvemTagsFlash()' src='"+imb+"' style='cursor:pointer;text-align:left' title='"+$trad("a5a")+"'/><td>";t+=20}if(OPCOESADICIONAIS.carousel===true){ins+="<td><img class='carouselTemas' onclick='i3GEO.arvoreDeTemas.dialogo.carouselTemas()' src='"+imb+"' style='cursor:pointer;text-align:left' title='Miniaturas'/><td>";t+=20}if(OPCOESADICIONAIS.carregaKml===true){ins+="<td><img class='carregarKml' onclick='i3GEO.arvoreDeTemas.dialogo.carregaKml()' src='"+imb+"' style='cursor:pointer;text-align:left' title='Kml'/><td>";t+=20}return("<table width='"+t+"px' ><tr>"+ins+"</tr></table>")},desativaCheckbox:function(){var o,inputs,n,i;o=document.getElementById(i3GEO.arvoreDeTemas.ARVORE.id);inputs=o.getElementsByTagName("input");n=inputs.length;i=0;do{inputs[i].checked=false;i+=1}while(i<n)},listaTemasAtivos:function(){var o,inputs,n,i,lista;o=document.getElementById(i3GEO.arvoreDeTemas.ARVORE.id);inputs=o.getElementsByTagName("input");n=inputs.length;i=0;lista=[];do{if(inputs[i].checked===true){lista.push(inputs[i].value)}i+=1}while(i<n);return(lista)},buscaTema:function(palavra){if(palavra===""){return}var busca,root,nodePalavra;resultadoProcurar=function(retorno){var mostra,tempNode,d,conta,ig,ngSgrupo,tempn,sg,ngTema,tempng,st,lk;if(!retorno.data){alert("Ocorreu um erro")}else{retorno=retorno.data;conta=0;if((retorno!=="erro")&&(typeof(retorno)!=='undefined')){ig=retorno.length-1;if(ig>=0){do{ngSgrupo=retorno[ig].subgrupos;tempn=ngSgrupo.length;for(sg=0;sg<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'>&nbsp;fonte</a>"}d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>";tempNode=new YAHOO.widget.HTMLNode(d,nodePalavra,false,true);tempNode.isLeaf=true;tempNode.enableHighlight=false}conta+=1}}}while(ig--)}else{d="<span style='color:red'>Nada encontrado<br><br></span>";tempNode=new YAHOO.widget.HTMLNode(d,nodePalavra,false,true);tempNode.isLeaf=true;tempNode.enableHighlight=false}}}nodePalavra.loadComplete()};busca=function(){i3GEO.php.procurartemas2(resultadoProcurar,i3GEO.util.removeAcentos(palavra))};i3GEO.arvoreDeTemas.ARVORE.collapseAll();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(!i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")){tempNode=new YAHOO.widget.HTMLNode({html:"Temas encontrados",id:"temasEncontrados"},root,false,true);tempNode.enableHighlight=false}else{tempNode=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")}nodePalavra=new YAHOO.widget.HTMLNode({html:palavra},tempNode,false,true);nodePalavra.enableHighlight=false;i3GEO.arvoreDeTemas.ARVORE.draw();tempNode.expand();nodePalavra.setDynamicLoad(busca,1);nodePalavra.expand()},buscaTema2:function(palavra){if(palavra===""){return}var busca,root,nodePalavra;resultadoProcurar=function(retorno){var mostra,tempNode,d,ig,montaTexto=function(ngSgrupo){var tempn,ngTema,tempng,mostra,d,lk,tempNode,st,sg;tempn=ngSgrupo.length;for(sg=0;sg<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;try{if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}}catch(e){}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'>&nbsp;fonte</a>"}if(ngSgrupo[sg].subgrupo){d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>"}else{d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].grupo)+")"+lk+"</td>"}tempNode=new YAHOO.widget.HTMLNode({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:"<span style='color:red'>Nada encontrado<br><br></span>"},nodePalavra)}}}nodePalavra.loadComplete()};busca=function(){i3GEO.php.procurartemas2(resultadoProcurar,i3GEO.util.removeAcentos(palavra))};i3GEO.arvoreDeTemas.ARVORE.collapseAll();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(!i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")){tempNode=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:"Temas encontrados",id:"temasEncontrados"},root)}else{tempNode=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")}nodePalavra=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:palavra},tempNode);i3GEO.arvoreDeTemas.ARVORE.draw();tempNode.expand();nodePalavra.setDynamicLoad(busca,1);nodePalavra.expand()},adicionaTemas:function(tsl){var temp;try{clearTimeout(tempoBotaoAplicar)}catch(e){}tempoBotaoAplicar="";i3GEO.mapa.ativaTema("");if(arguments.length!==1){tsl=i3GEO.arvoreDeTemas.listaTemasAtivos()}if(tsl.length===1&&i3GEO.arvoreDeCamadas.pegaTema(tsl[0])!==""){temp=window.confirm("O tema já existe no mapa. Adiciona novamente?");if(!temp){return}}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="<select id='"+idCombo+"' SIZE="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(this.value)' ><option value='' >Escolha um menu:</option>";for(ig=0;ig<ob.length;ig+=1){if(ob[ig].publicado!=="nao"&&ob[ig].publicado!=="NAO"){if(ob[ig].nomemenu){ins+="<option value="+ob[ig].idmenu+" >"+ob[ig].nomemenu+"</option>"}}}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistademenus(combo)},comboGruposMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura,id_menu){i3GEO.configura.locaplic=locaplic;i3GEO.arvoreDeTemas.temasRaizGrupos=[];var combo=function(retorno){var ins,ig,obGrupos=retorno.data;ins="<select id='"+idCombo+"' SIZE="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(this.value)' ><option value='' >Escolha um grupo:</option>";for(ig=0;ig<obGrupos.grupos.length;ig+=1){if(obGrupos.grupos[ig].nome){ins+="<option value="+obGrupos.grupos[ig].id_n1+" >"+obGrupos.grupos[ig].nome+"</option>"}i3GEO.arvoreDeTemas.temasRaizGrupos[obGrupos.grupos[ig].id_n1]=obGrupos.grupos[ig].temasgrupo}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistadegrupos(combo,id_menu,"nao")},comboSubGruposMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,idGrupo,largura,altura){if(idGrupo!==""){var combo=function(retorno){var ins,sg,ig;ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(\""+idGrupo+"\",this.value)' ><option value='' >Escolha um sub-grupo:</option>";if(retorno.data.subgrupo){sg=retorno.data.subgrupo;for(ig=0;ig<sg.length;ig+=1){ins+="<option value="+sg[ig].id_n2+" >"+sg[ig].nome+"</option>"}}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistadeSubgrupos(combo,"",idGrupo)}},comboTemasMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,idGrupo,idSubGrupo,largura,altura,id_menu,temas){var combo=function(retorno){var ins,sg,ig,temas;if(idSubGrupo!=""){ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"("+idGrupo+","+idSubGrupo+",this.value)' ><option value='' >Escolha um tema:</option>"}else{ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"("+idGrupo+",\"\",this.value)' ><option value='' >Escolha um tema:</option>"}if(typeof(retorno.data)!=='undefined'){retorno=retorno.data.temas}sg=retorno.length;for(ig=0;ig<sg;ig+=1){ins+="<option value="+retorno[ig].tid+" >"+retorno[ig].nome+"</option>"}$i(idDestino).innerHTML=ins+"</select>"};if(typeof(temas)==='undefined'||temas===""){i3GEO.php.pegalistadetemas(combo,id_menu,idGrupo,idSubGrupo)}else{combo(temas)}},dialogo:{uploadarquivo:function(){var janela,ins,temp,titulo,cabecalho,minimiza;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOFuploadarquivo")};titulo="Upload de arquivo</a>";janela=i3GEO.janela.cria("250px","150px","","","",titulo,"i3GEOFuploadarquivo",false,"hd",cabecalho,minimiza);$i("i3GEOFuploadarquivo_corpo").style.backgroundColor="white";ins=""+" <p class=paragrafo style='width:90%' ><b>Tipo de arquivo</b><br><br>"+" <table class=lista6 style=left:20px;position:relative >"+" <tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.upload()' /></td>"+" <td>Shape file</td>"+" </tr>"+" <tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.uploaddbf()' /></td>"+" <td>DBF ou CSV</td>"+" </tr>"+" <tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.uploadgpx()' /></td>"+" <td>GPX</td>"+" </tr>"+" <tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.uploadkml()' /></td>"+" <td>KML ou KMZ</td>"+" </tr>"+" </table>";$i(janela[2].id).innerHTML=ins},carregaKml:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/carregakml/index.js.php","i3GEOF.carregakml.criaJanelaFlutuante()","i3GEOF.carregakml_script")},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&oacute;rios")},importarwmc:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/importarwmc/index.js.php","i3GEOF.importarwmc.criaJanelaFlutuante()","i3GEOF.importarwmc_script")},conectarwms:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwms/index.htm","","","Conexão WMS <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=28' >&nbsp;&nbsp;&nbsp;</a>")},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 <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=76' >&nbsp;&nbsp;&nbsp;</a>")},conectarwfs:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwfs/index.htm","","","WFS")},conectargeorss:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectargeorss/index.htm","","","Conexão GeoRSS <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=29' >&nbsp;&nbsp;&nbsp;</a>")},upload:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/upload/index.js.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")},uploadkml:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/uploadkml/index.js.php","i3GEOF.uploadkml.criaJanelaFlutuante()","i3GEOF.uploadkml_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)}};
374   -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.barraDeBotoes={TIPO:"yui",OFFSET:-205,AJUDA:true,ORIENTACAO:"vertical",HORIZONTALW:350,TIPOAJUDA:"balao",SOICONES:false,AUTOALTURA:false,TRANSICAOSUAVE:true,OPACIDADE:65,PERMITEFECHAR:true,PERMITEDESLOCAR:true,ATIVAMENUCONTEXTO:false,AUTO:false,LISTABOTOES:i3GEO.configura.funcoesBotoes.botoes,INCLUIBOTAO:{zoomli:true,pan:true,zoomtot:true,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},ICONEBOTAO:{zoomli:"/imagens/gisicons/eudock/zoom-region.png",pan:"/imagens/gisicons/eudock/pan.png",zoomtot:"/imagens/gisicons/eudock/zoom-extent.png",identifica:"/imagens/gisicons/eudock/identify.png",identificaBalao:"/imagens/gisicons/eudock/tips.png",mede:"/imagens/gisicons/eudock/length-measure.png",area:"/imagens/gisicons/eudock/area-measure.png",imprimir:"/imagens/gisicons/eudock/print.png",reinicia:"/imagens/gisicons/eudock/redraw.png",exten:"/imagens/gisicons/eudock/map-extent-info.png",referencia:"/imagens/gisicons/eudock/map-reference.png",inserexy:"/imagens/gisicons/eudock/point-create.png",textofid:"/imagens/gisicons/eudock/text-add.png",selecao:"/imagens/gisicons/eudock/select.png",google:"/imagens/gisicons/eudock/google-map.png",buscafotos:"/imagens/gisicons/eudock/fotos.png",wiki:"/imagens/gisicons/eudock/wiki.png",metar:"/imagens/gisicons/eudock/metar.png",lentei:"/imagens/gisicons/eudock/lente.png",confluence:"/imagens/gisicons/eudock/confluence.png",inseregrafico:"/imagens/gisicons/eudock/grafico.png",v3d:"/imagens/gisicons/eudock/v3d.png"},TEMPLATEBOTAO:"",BOTAOPADRAO:"pan",COMPORTAMENTO:"padrao",BARRAS:[],BOTAOCLICADO:"",ativaPadrao:function(){try{$i(i3GEO.barraDeBotoes.BOTAOPADRAO).onclick.apply()}catch(e){}},ativaIcone:function(icone){if(i3GEO.Interface.ATUAL==="openlayers"){try{i3GEO.Interface.openlayers.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"}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(e){i3GEO.barraDeBotoes.mostraJanela(this,"'+l[b].dica+'",e);}');eval('$i("'+l[b].iddiv+'").onmouseout = function(e){i3GEO.barraDeBotoes.mostraJanela(this,"",e);};')}if(l[b].funcaoonclick){temp.onclick=l[b].funcaoonclick;if(l[b].iddiv==padrao){l[b].funcaoonclick()}}if(l[b].constroiconteudo){eval(l[b].constroiconteudo)}}YAHOO.util.Event.addListener($i(l[b].iddiv),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addListener($i(l[b].iddiv),"click",YAHOO.util.Event.stopPropagation);YAHOO.util.Event.addFocusListener($i(l[b].iddiv),YAHOO.util.Event.preventDefault)}while(b--)}if(padrao===""){this.ativaIcone("")}},execBotao:function(id,x,y){var l,b,d,temp,n=38;i3GEO.barraDeBotoes.BOTAOCLICADO=id;l=i3GEO.barraDeBotoes.LISTABOTOES;b=l.length-1;if(b>=0){do{temp=l[b].iddiv;if(temp===id){try{if(l[b].tipo==="dinamico"){i3GEO.util.criaPin("i3geoMarcaIcone",i3GEO.configura.locaplic+"/imagens/gisicons/eudock/sobe1.png","10px","10px");temp=$i("i3geoMarcaIcone");temp.style.display="block"temp.style.top=(parseInt(y/n,10)*n)+40;temp.style.left=(parseInt(x/n,10)*n)+25}if(l[b].funcaoonclick){l[b].funcaoonclick.call();return}}catch(e){}}}while(b--)}},inicializaBarraOP:function(){euEnv.imageBasePath=i3GEO.configura.locaplic+"/pacotes/eudock/";var i,dock=new euDock(),temp="",chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length;dock.setObjectAlign(i3GEO.Interface.IDCORPO,euDOWN,(parseInt(document.body.style.height,10))*-1+i3GEO.barraDeBotoes.OFFSET,euUP);dock.setBar({left:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-l.png"}},horizontal:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-c-o.gif"}},right:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-r.png"}}});dock.setIconsOffset(5);for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]}}),{mouseInsideClick:function(x,y,id){i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao,x,y)},idBotao:chaves[i]})}}},inicializaBarra:function(idconteudo,idconteudonovo,barraZoom,x,y,onde){if(i3GEO.configura.map3d===""){i3GEO.barraDeBotoes.INCLUIBOTAO.v3d=false}if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){i3GEO.barraDeBotoes.inicializaBarraOP()}else{if(this.TEMPLATEBOTAO===""&&i3GEO.Interface.TABLET===false){this.TEMPLATEBOTAO="<div style='display:inline;background-color:rgb(250,250,250);'><img style='border:0px solid white;' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='$$'/></div>"}if(this.TEMPLATEBOTAO===""&&i3GEO.Interface.TABLET===true){this.TEMPLATEBOTAO="<div style='display:inline;background-color:rgb(250,250,250);'><img style='margin:4px;border:0px solid white;' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='$$'/></div>"}var ticone,tipo,mostra,i,temp,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(navm){i3GEO.barraDeBotoes.TRANSICAOSUAVE=false}if(this.AUTO===true){if(idconteudo==="barraDeBotoes1"){novoel=document.createElement("div");novoel.id="barraDeBotoes1";temp='<table style="width:100%"><tr><td style="background-color:rgb(250,250,250);"><div ID="historicozoom" ></div></td></tr><tr><td style=height:5px ></td></tr></table>'+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="zoom" alt="zoom" src="'+branco+'" id="zoomli"/>'+"</div>"+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="desloca" alt="desloca" src="'+branco+'" id="pan"/>'+"</div>"+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="geral" alt="geral" src="'+branco+'" id="zoomtot"/>'+"</div>";novoel.innerHTML=temp;document.body.appendChild(novoel)}if(idconteudo==="barraDeBotoes2"){temp="";chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO);n=chaves.length;for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){temp+=i3GEO.barraDeBotoes.TEMPLATEBOTAO.replace("$$",chaves[i])}}if(typeof(onde)==='undefined'){novoel=document.createElement("div");novoel.id="barraDeBotoes2";estilo="font-size:2px;";if(this.SOICONES===true){estilo="font-size:0px;"}novoel.innerHTML="<table style='width:100%'>"+"<tr><td style='background-color:rgb(250,250,250);'><img title='' alt='sobe' src='"+branco+"' id='sobeferramentas'/></td></tr>"+"</table>"+temp+"<table style='width:100%;'><tr><td style='background-color:rgb(250,250,250);'><img title='desce' alt='' src='"+branco+"' id='desceferramentas'/></td></tr></table>";document.body.appendChild(novoel)}else{$i(onde).innerHTML=temp;return}}}else{if(idconteudo==="barraDeBotoes2"&&onde!==undefined){$i(onde).innerHTML=$i(idconteudo)}}wj="36px";recuo="0px";novoel=document.createElement("div");novoel.id=idconteudonovo;novoel.style.display="block";if(this.SOICONES===false){novoel.style.border="1px solid gray";novoel.style.background="white"}else{novoel.style.border="0px solid white"}if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){Dom.setStyle(novoel,"opacity",this.OPACIDADE/100)}temp="";if(barraZoom===true){temp+=i3GEO.navega.barraDeZoom.cria()}temp+='<div id="'+idconteudonovo+'_" style="left:'+recuo+';top:0px;" ></div>';novoel.innerHTML=temp;novoel.onmouseover=function(){YAHOO.util.Dom.setStyle("i3geo_rosa","display","none");if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",1)}if(i3GEO.Interface.TABLET===true){}};novoel.onmouseout=function(){if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.barraDeBotoes.OPACIDADE/100)}if(i3GEO.Interface.TABLET===true){}};document.body.appendChild(novoel);if(this.ATIVAMENUCONTEXTO){i3GEO.util.mudaCursor(i3GEO.configura.cursores,"contexto",idconteudonovo,i3GEO.configura.locaplic)}ticone=28;alturadisponivel=i3GEO.parametros.h-i3GEO.Interface.BARRABOTOESTOP-ticone-38-38;if(this.AUTOALTURA===true){alturadisponivel+=28}numerobotoes=parseInt(alturadisponivel/ticone,10);if($i(idconteudo)){$i(idconteudonovo+"_").innerHTML=$i(idconteudo).innerHTML;$i(idconteudo).innerHTML="";elementos=$i(idconteudonovo+"_").getElementsByTagName("img");nelementos=elementos.length;if(i3GEO.barraDeBotoes.ORIENTACAO==="horizontal"){numerobotoes=100}if(this.AUTOALTURA===true||(numerobotoes<nelementos)){if(elementos[0].id==="sobeferramentas"){try{elementos=$i(idconteudonovo+"_").getElementsByTagName("div");nelementos=elementos.length;i=0;do{elementos[i].style.display="none";i=i+1}while(i<nelementos);i=0;do{if(elementos[i]!=undefined){elementos[i].style.display="inline"}i=i+1}while(i<numerobotoes-1)}catch(men){}}}if(elementos.length<=numerobotoes){Dom.setStyle(["sobeferramentas","desceferramentas"],"display","none")}}YAHOO.namespace("janelaBotoes.xp");if(i3GEO.barraDeBotoes.ORIENTACAO==="horizontal"){YAHOO.janelaBotoes.xp.panel=new YAHOO.widget.Panel(idconteudonovo,{zIndex:20000,height:40,width:i3GEO.barraDeBotoes.HORIZONTALW,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}else{if(this.AUTOALTURA===false||barraZoom===true||(elementos.length>numerobotoes)){YAHOO.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<nelementos);mostra.style.display="inline";i=nelementos+1;mostra=elementos[i];do{if(elementos[i]){if(elementos[i].style){if(elementos[i].style.display==="inline"){mostra=elementos[i];break}}}i=i-1}while(i>=0);mostra.style.display="none"}}}if($i("desceferramentas")){$i("desceferramentas").onclick=function(){tipo="inline";if($i(idconteudonovo+"_")){elementos=$i(idconteudonovo+"_").getElementsByTagName("div");if(elementos[elementos.length-1].style.display===tipo){return}nelementos=elementos.length;if(nelementos>0){i=0;do{e=elementos[i];if(e.style){if((e.style.display==="block")||(e.style.display==="inline")||(e.style.display==="")){if(e.id===""){e.style.display="none";break}}}i=i+1}while(i<nelementos);i=nelementos-1;var mostra=elementos[i];do{e=elementos[i];if(e.style){if(e.style.display===tipo){break}if(e.style.display==="none"){mostra=e}}i=i-1}while(i>=0);mostra.style.display=tipo}}}}this.BARRAS.push(YAHOO.janelaBotoes.xp.panel);YAHOO.janelaBotoes.xp.panel.show();if(i3GEO.Interface.TABLET===true){YAHOO.janelaBotoes.xp.panel.moveTo((i3GEO.parametros.w/2)-(i3GEO.barraDeBotoes.HORIZONTALW/2),"")}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:"&nbsp;<span class='container-close'></span>"},{text:"Fechar barra",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.fecha('"+idbarra+"')"}},{text:"Barra normal",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.AUTOALTURA=false;i3GEO.barraDeBotoes.PERMITEFECHAR=true;i3GEO.barraDeBotoes.PERMITEDESLOCAR=true;i3GEO.barraDeBotoes.recria('"+idbarra+"')"}},{text:"Barra fixa",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.AUTOALTURA=true;i3GEO.barraDeBotoes.PERMITEFECHAR=false;i3GEO.barraDeBotoes.PERMITEDESLOCAR=false;i3GEO.barraDeBotoes.recria('"+idbarra+"')"}},{text:"Remove transiçã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;i<n;i+=1){i3GEO.barraDeBotoes.BARRAS[i].show()}};try{if(arguments.length===1){i3GEO.barraDeBotoes.BARRAS[indice].show()}else{abre.call()}}catch(e){abre.call()}},recria:function(id){var n,temp,novoel,barraZoom,x,y,BARRAS=i3GEO.barraDeBotoes.BARRAS,iu=i3GEO.util;i3GEO.barraDeBotoes.BARRAS=[];n=BARRAS.length;for(i=0;i<n;i+=1){if(BARRAS[i].id===id){iu.removeChild("contexto_"+id);if(!$i("barraTemporaria"+i)){novoel=document.createElement("div");novoel.id="barraTemporaria"+i;document.body.appendChild(novoel)}novoel=$i("barraTemporaria"+i);novoel.innerHTML=$i(BARRAS[i].id+"_").innerHTML;barraZoom=false;temp=$i("vertMaisZoom");if(temp){temp=navm?temp.parentNode:temp.parentNode.parentNode;if(temp.id===id){barraZoom=true}}x=parseInt($i(BARRAS[i].id+"_c").style.left,10);y=parseInt($i(BARRAS[i].id+"_c").style.top,10);if(i3GEO.barraDeBotoes.PERMITEFECHAR===true){y=y-10}BARRAS[i].destroy();i3GEO.barraDeBotoes.inicializaBarra(novoel.id,BARRAS[i].id,barraZoom,x,y)}}i3GEO.barraDeBotoes.ativaBotoes()},fecha:function(id){var n=this.BARRAS.length;for(i=0;i<n;i+=1){if(this.BARRAS[i].id===id){$i(id+"_c").style.visibility="hidden"}}},mostraJanela:function(objeto,mensagem,evt){if(mensagem===""){try{clearTimeout(timeMostraAjudaBotoes)}catch(e){};return}var divmensagem=$i("divMensagemBarraDeBotoes"),balloonAjuda,pos=YAHOO.util.Dom.getXY(objeto);if(this.AJUDA===false||$i("janelaMenTexto")){i3GEO.ajuda.mostraJanela(mensagem);i3GEO.barraDeBotoes.escondeJanelaAjuda();return}if(i3GEO.Interface.ATUAL==="googleearth"){objeto.title=mensagem;return}if(!divmensagem&&this.TIPOAJUDA!=="balao"){divmensagem=document.createElement("div");divmensagem.id="divMensagemBarraDeBotoes";divmensagem.style.border="0px solid rgb(120 120 120)";divmensagem.style.position="absolute";divmensagem.style.zIndex=20000;if($i("i3geo")){$i("i3geo").appendChild(divmensagem)}else{document.body.appendChild(divmensagem)}if(this.TIPOAJUDA==="horizontal"){divmensagem.innerHTML="<table style='z-index:20000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='"+$im("left.png")+"' ></td><td style='text-align:left;border-left:1px solid rgb(210,210,210)'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'></div></td></tr></table>"}if(this.TIPOAJUDA==="vertical"){divmensagem.innerHTML="<table style='z-index:20000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='"+$im("top.png")+"' ></td><td style='text-align:left;border-left:1px solid rgb(210,210,210)'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'></div></td></tr></table>"}}if(mensagem!==""){if(this.TIPOAJUDA!=="balao"){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none");if(this.TIPOAJUDA==="horizontal"){divmensagem.style.left=parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)+pos[0]+10+"px";divmensagem.style.top=pos[1]-2+(parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)/2)+"px"}if(this.TIPOAJUDA==="vertical"){divmensagem.style.left=(parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)/2)+pos[0]-5+"px";divmensagem.style.top=pos[1]+5+parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)+"px"}try{clearTimeout(timeAjudaBotoes)}catch(e){}timeMostraAjudaBotoes=setTimeout("i3GEO.barraDeBotoes.mostraJanelaAjuda('"+mensagem+"');",5000)}else{hideAllTooltips();balloonAjuda=new Balloon();BalloonConfig(balloonAjuda,'GBubble');balloonAjuda.delayTime=0;balloonAjuda.stem=false;balloonAjuda.stemHeight=0;balloonAjuda.vOffset=-24;balloonAjuda.images=i3GEO.configura.locaplic+'/pacotes/balloon-tooltips/htdocs/images/GBubblec';mensagem="<table style='z-index:20000' ><tr><td style='text-align:left;'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'>"+mensagem+"</div></td></tr></table>";try{clearTimeout(timeAjudaBotoes)}catch(e){}timeMostraAjudaBotoes=setTimeout(function(){balloonAjuda.cleanup();balloonIsVisible=false;balloonAjuda.showTooltip(objeto,mensagem,null,null,null,pos[0]+12,pos[1]);try{clearTimeout(timeMostraAjudaBotoes)}catch(e){}timeAjudaBotoes=setTimeout(function(){balloonAjuda.cleanup()},4000)},4000)}}},mostraJanelaAjuda:function(mensagem){$i("divMensagemBarraDeBotoesCorpo").innerHTML=mensagem;YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","block");try{clearTimeout(timeMostraAjudaBotoes)}catch(e){}timeAjudaBotoes=setTimeout(function(){i3GEO.barraDeBotoes.escondeJanelaAjuda()},3000)},escondeJanelaAjuda:function(){try{clearTimeout(timeAjudaBotoes)}catch(e){}if($i("divMensagemBarraDeBotoes")){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none")}},editor:{inicia:function(){if(navm){alert("O editor não funciona corretamente nesse navegador.")}i3GEO.barraDeBotoes.editor.carregaJs()},carregaJs:function(idjanela){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/mashups/openlayers.js.php","i3GEO.barraDeBotoes.editor.ativaPainel('"+idjanela+"')","openlayers.js.php",true)},criaJanela:function(){if($i("i3GEOjanelaEditor")){return"i3GEOjanelaEditor"}var janela,divid,temp,titulo,cabecalho,minimiza;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOjanelaEditor")};titulo="Editor vetorial";janela=i3GEO.janela.cria("300px","200px","","","",titulo,"i3GEOjanelaEditor",false,"hd",cabecalho,minimiza);divid=janela[2].id;$i("i3GEOjanelaEditor_corpo").style.backgroundColor="white";$i("i3GEOjanelaEditor_corpo").style.textAlign="left";return divid},ativaPainel:function(idjanela){OpenLayers.ImgPath=i3GEO.configura.locaplic+"/pacotes/openlayers/img/";i3GEO.editorOL.fundo="";i3GEO.editorOL.mapa=i3geoOL;i3GEO.editorOL.maxext="";i3GEO.editorOL.controles=[];i3GEO.editorOL.botoes={'pan':false,'zoombox':false,'zoomtot':false,'legenda':false,'distancia':false,'area':false,'identifica':true,'linha':true,'ponto':true,'poligono':true,'texto':true,'edita':true,'selecao':true,'apaga':true,'procura':false,'propriedades':true,'salva':true,'ajuda':true,'fecha':true,'tools':true,'undo':true,'frente':true};var sketchSymbolizers={"Point":{fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}",strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",label:"${texto}",pointRadius:"${pointRadius}",graphicName:"${graphicName}",fontSize:"${fontSize}",fontColor:"rgb(${fontColor})",fontFamily:"Arial",fontWeight:"normal",labelAlign:"lb",labelXOffset:"3",labelYOffset:"3"},"Line":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})"},"Polygon":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}"}},style=new OpenLayers.Style(),styleMap1=new OpenLayers.StyleMap({"default":style});style.addRules([new OpenLayers.Rule({symbolizer:sketchSymbolizers})]);i3GEO.editorOL.layergrafico=new OpenLayers.Layer.Vector("Edição",{styleMap:styleMap1,displayInLayerSwitcher:false,visibility:true});i3GEO.editorOL.mapa.addLayers([i3GEO.editorOL.layergrafico]);i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}}};
375   -function RichDrawEditor(elem,renderer){this.container=elem;this.gridX=10;this.gridY=10;this.mouseDownX=0;this.mouseDownY=0;this.mode='';this.fillColor='';this.lineColor='';this.lineWidth='';this.circColor='';this.textColor='';this.selected=null;this.selectedBounds={x:0,y:0,width:0,height:0};this.onselect=function(){};this.onunselect=function(){};this.renderer=renderer;this.renderer.init(this.container);this.fecha=function(){elem.innerHTML="";elem.style.display="none"}}RichDrawEditor.prototype.clearWorkspace=function(){this.container.innerHTML=''};RichDrawEditor.prototype.deleteSelection=function(){if(this.selected){this.renderer.remove(this.container.ownerDocument.getElementById('tracker'));this.renderer.remove(this.selected);this.selected=null}};RichDrawEditor.prototype.select=function(elem){if(elem==this.selected)return;this.selected=elem;this.renderer.showTracker(this.selected);this.onselect(this)};RichDrawEditor.prototype.unselect=function(){if(this.selected){this.renderer.remove(this.container.ownerDocument.getElementById('tracker'));this.selected=null;this.onunselect(this)}};RichDrawEditor.prototype.getSelectedElement=function(){return this.selected};RichDrawEditor.prototype.setGrid=function(horizontal,vertical){this.gridX=horizontal;this.gridY=vertical};RichDrawEditor.prototype.editCommand=function(cmd,value){if(cmd=='mode'){this.mode=value}else if(this.selected==null){if(cmd=='fillcolor'){this.fillColor=value}else if(cmd=='linecolor'){this.lineColor=value}else if(cmd=='textcolor'){this.textColor=value}else if(cmd=='circcolor'){this.circColor=value}else if(cmd=='linewidth'){this.lineWidth=parseInt(value)+'px'}}else{this.renderer.editCommand(this.selected,cmd,value)}};RichDrawEditor.prototype.queryCommand=function(cmd){if(cmd=='mode'){return this.mode}else if(this.selected==null){if(cmd=='fillcolor'){return this.fillColor}else if(cmd=='linecolor'){return this.lineColor}else if(cmd=='textcolor'){return this.textColor}else if(cmd=='circcolor'){return this.circColor}else if(cmd=='linewidth'){return this.lineWidth}}else{return this.renderer.queryCommand(this.selected,cmd)}};RichDrawEditor.prototype.onSelectStart=function(event){return false};RichDrawEditor.prototype.onClick=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;if(this.mode!='select'){this.unselect();this.mouseDownX=snappedX;this.mouseDownY=snappedY;this.selected=this.renderer.create(this.mode,this.fillColor,this.lineColor,this.lineWidth,this.mouseDownX,this.mouseDownY,1,1);this.selected.id='shape:'+createUUID();Event.observe(this.selected,"mousemove",this.onHitListener);Event.observe(this.container,"mousemove",this.onDrawListener)}else{if(this.mouseDownX!=snappedX||this.mouseDownY!=snappedY)this.unselect()}return false};RichDrawEditor.prototype.onMouseDown=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;if(this.mode!='select'){this.unselect();this.mouseDownX=snappedX;this.mouseDownY=snappedY;this.selected=this.renderer.create(this.mode,this.fillColor,this.lineColor,this.lineWidth,this.mouseDownX,this.mouseDownY,1,1);this.selected.id='shape:'+createUUID();Event.observe(this.selected,"mousedown",this.onHitListener);Event.observe(this.container,"mousemove",this.onDrawListener)}else{if(this.mouseDownX!=snappedX||this.mouseDownY!=snappedY)this.unselect()}return false};RichDrawEditor.prototype.onMouseUp=function(event){Event.stopObserving(this.container,"mouseup",this.onDrawListener);Event.stopObserving(this.container,"mouseup",this.onDragListener);if(this.mode!='select'){this.selected=null}};RichDrawEditor.prototype.onDrag=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;var deltaX=snappedX-this.mouseDownX;var deltaY=snappedY-this.mouseDownY;this.renderer.move(this.selected,this.selectedBounds.x+deltaX,this.selectedBounds.y+deltaY);this.renderer.showTracker(this.selected)};RichDrawEditor.prototype.onResize=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;var deltaX=snappedX-this.mouseDownX;var deltaY=snappedY-this.mouseDownY;this.renderer.track(handle,deltaX,deltaY);show_tracker()};RichDrawEditor.prototype.onDraw=function(event){if(this.selected==null)return;var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;this.renderer.resize(this.selected,this.mouseDownX,this.mouseDownY,snappedX,snappedY)};RichDrawEditor.prototype.onHit=function(event){if(this.mode=='select'){this.select(Event.element(event));this.selectedBounds=this.renderer.bounds(this.selected);var offset=Position.cumulativeOffset(this.container);this.mouseDownX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;this.mouseDownY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;Event.observe(this.container,"mousemove",this.onDragListener)}};function createUUID(){return[4,2,2,2,6].map(function(length){var uuidpart="";for(var i=0;i<length;i++){var uuidchar=parseInt((Math.random()*256)).toString(16);if(uuidchar.length==1)uuidchar="0"+uuidchar;uuidpart+=uuidchar}return uuidpart}).join('-')}function AbstractRenderer(){};AbstractRenderer.prototype.init=function(elem){};AbstractRenderer.prototype.bounds=function(shape){return{x:0,y:0,width:0,height:0}};AbstractRenderer.prototype.create=function(shape,fillColor,lineColor,lineWidth,left,top,width,height,texto){};AbstractRenderer.prototype.remove=function(shape){};AbstractRenderer.prototype.move=function(shape,left,top){};AbstractRenderer.prototype.track=function(shape){};AbstractRenderer.prototype.resize=function(shape,fromX,fromY,toX,toY){};AbstractRenderer.prototype.editCommand=function(shape,cmd,value){};AbstractRenderer.prototype.queryCommand=function(shape,cmd){};AbstractRenderer.prototype.showTracker=function(shape){};AbstractRenderer.prototype.getMarkup=function(){return null};
376   -function SVGRenderer(){this.base=AbstractRenderer;this.svgRoot=null}SVGRenderer.prototype=new AbstractRenderer;SVGRenderer.prototype.init=function(elem){this.container=elem;this.container.style.MozUserSelect='none';var svgNamespace='http://www.w3.org/2000/svg';this.svgRoot=this.container.ownerDocument.createElementNS(svgNamespace,"svg");this.container.appendChild(this.svgRoot)};SVGRenderer.prototype.bounds=function(shape){var rect=new Object();var box=shape.getBBox();rect['x']=box.x;rect['y']=box.y;rect['width']=box.width;rect['height']=box.height;return rect};SVGRenderer.prototype.create=function(shape,fillColor,lineColor,lineWidth,left,top,width,height,texto){var svgNamespace='http://www.w3.org/2000/svg';var svg;if(shape=='rect'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'rect');svg.setAttributeNS(null,'x',left+'px');svg.setAttributeNS(null,'y',top+'px');svg.setAttributeNS(null,'width',width+'px');svg.setAttributeNS(null,'height',height+'px')}else if(shape=='ellipse'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'ellipse');svg.setAttributeNS(null,'cx',(left+width/2)+'px');svg.setAttributeNS(null,'cy',(top+height/2)+'px');svg.setAttributeNS(null,'rx',(width/2)+'px');svg.setAttributeNS(null,'ry',(height/2)+'px')}else if(shape=='circ'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'ellipse');svg.setAttributeNS(null,'cx',left+'px');svg.setAttributeNS(null,'cy',top+'px');svg.setAttributeNS(null,'rx',width+'px');svg.setAttributeNS(null,'ry',width+'px')}else if(shape=='roundrect'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'rect');svg.setAttributeNS(null,'x',left+'px');svg.setAttributeNS(null,'y',top+'px');svg.setAttributeNS(null,'rx','20px');svg.setAttributeNS(null,'ry','20px');svg.setAttributeNS(null,'width',width+'px');svg.setAttributeNS(null,'height',height+'px')}else if(shape=='line'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'line');svg.setAttributeNS(null,'x1',left+'px');svg.setAttributeNS(null,'y1',top+'px');svg.setAttributeNS(null,'x2',width+'px');svg.setAttributeNS(null,'y2',height+'px')}else if(shape=='text'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'text');var n=this.container.ownerDocument.createTextNode(texto);svg.appendChild(n);svg.setAttributeNS(null,'x',left+'px');svg.setAttributeNS(null,'y',top+'px');svg.setAttributeNS(null,'font-size','12px')}svg.style.position='absolute';if(fillColor.length==0)fillColor='none';svg.setAttributeNS(null,'fill',fillColor);if(lineColor.length==0)lineColor='none';svg.setAttributeNS(null,'stroke',lineColor);svg.setAttributeNS(null,'stroke-width',lineWidth);this.svgRoot.appendChild(svg);return svg};SVGRenderer.prototype.remove=function(shape){shape.parentNode.removeChild(shape)};SVGRenderer.prototype.move=function(shape,left,top){if(shape.tagName=='line'){var deltaX=shape.getBBox().width;var deltaY=shape.getBBox().height;shape.setAttributeNS(null,'x1',left);shape.setAttributeNS(null,'y1',top);shape.setAttributeNS(null,'x2',left+deltaX);shape.setAttributeNS(null,'y2',top+deltaY)}else if(shape.tagName=='ellipse'){shape.setAttributeNS(null,'cx',left+(shape.getBBox().width/2));shape.setAttributeNS(null,'cy',top+(shape.getBBox().height/2))}else{shape.setAttributeNS(null,'x',left);shape.setAttributeNS(null,'y',top)}};SVGRenderer.prototype.track=function(shape){};SVGRenderer.prototype.resize=function(shape,fromX,fromY,toX,toY){var deltaX=toX-fromX;var deltaY=toY-fromY;if(shape.tagName=='line'){shape.setAttributeNS(null,'x2',toX);shape.setAttributeNS(null,'y2',toY)}else if(shape.tagName=='ellipse'){if(deltaX<0){shape.setAttributeNS(null,'cx',(fromX+deltaX/2)+'px');shape.setAttributeNS(null,'rx',(-deltaX/2)+'px')}else{shape.setAttributeNS(null,'cx',(fromX+deltaX/2)+'px');shape.setAttributeNS(null,'rx',(deltaX/2)+'px')}if(deltaY<0){shape.setAttributeNS(null,'cy',(fromY+deltaY/2)+'px');shape.setAttributeNS(null,'ry',(-deltaY/2)+'px')}else{shape.setAttributeNS(null,'cy',(fromY+deltaY/2)+'px');shape.setAttributeNS(null,'ry',(deltaY/2)+'px')}}else{if(deltaX<0){shape.setAttributeNS(null,'x',toX+'px');shape.setAttributeNS(null,'width',-deltaX+'px')}else{shape.setAttributeNS(null,'width',deltaX+'px')}if(deltaY<0){shape.setAttributeNS(null,'y',toY+'px');shape.setAttributeNS(null,'height',-deltaY+'px')}else{shape.setAttributeNS(null,'height',deltaY+'px')}}};SVGRenderer.prototype.editCommand=function(shape,cmd,value){if(shape!=null){if(cmd=='fillcolor'){if(value!='')shape.setAttributeNS(null,'fill',value);else shape.setAttributeNS(null,'fill','none')}else if(cmd=='linecolor'){if(value!='')shape.setAttributeNS(null,'stroke',value);else shape.setAttributeNS(null,'stroke','none')}else if(cmd=='linewidth'){shape.setAttributeNS(null,'stroke-width',parseInt(value)+'px')}}};SVGRenderer.prototype.queryCommand=function(shape,cmd){var result='';if(shape!=null){if(cmd=='fillcolor'){result=shape.getAttributeNS(null,'fill');if(result=='none')result=''}else if(cmd=='linecolor'){result=shape.getAttributeNS(null,'stroke');if(result=='none')result=''}else if(cmd=='linewidth'){result=shape.getAttributeNS(null,'stroke');if(result=='none')result='';else result=shape.getAttributeNS(null,'stroke-width')}}return result};SVGRenderer.prototype.showTracker=function(shape){var box=shape.getBBox();var tracker=document.getElementById('tracker');if(tracker){this.remove(tracker)}var svgNamespace='http://www.w3.org/2000/svg';tracker=document.createElementNS(svgNamespace,'rect');tracker.setAttributeNS(null,'id','tracker');tracker.setAttributeNS(null,'x',box.x-10);tracker.setAttributeNS(null,'y',box.y-10);tracker.setAttributeNS(null,'width',box.width+20);tracker.setAttributeNS(null,'height',box.height+20);tracker.setAttributeNS(null,'fill','none');tracker.setAttributeNS(null,'stroke','blue');tracker.setAttributeNS(null,'stroke-width','1');this.svgRoot.appendChild(tracker)};SVGRenderer.prototype.getMarkup=function(){return this.container.innerHTML};
377   -function VMLRenderer(){this.base=AbstractRenderer}VMLRenderer.prototype=new AbstractRenderer;VMLRenderer.prototype.init=function(elem){this.container=elem;this.container.style.overflow='hidden';elem.ownerDocument.namespaces.add("v","urn:schemas-microsoft-com:vml");var style=elem.ownerDocument.createStyleSheet();style.addRule('v\\:*',"behavior: url(#default#VML);")};VMLRenderer.prototype.bounds=function(shape){var rect=new Object();rect['x']=shape.offsetLeft;rect['y']=shape.offsetTop;rect['width']=shape.offsetWidth;rect['height']=shape.offsetHeight;return rect};VMLRenderer.prototype.create=function(shape,fillColor,lineColor,lineWidth,left,top,width,height,texto){var vml;if(shape=='rect'){vml=this.container.ownerDocument.createElement('v:rect')}else if(shape=='roundrect'){vml=this.container.ownerDocument.createElement('v:roundrect')}else if(shape=='ellipse'){vml=this.container.ownerDocument.createElement('v:oval')}else if(shape=='circ'){vml=this.container.ownerDocument.createElement('v:oval')}else if(shape=='line'){vml=this.container.ownerDocument.createElement('v:line')}else if(shape=='text'){vml=this.container.ownerDocument.createElement('v:textbox');vml.innerHTML=texto}if(shape!='line'){vml.style.position='absolute';vml.style.left=left;vml.style.top=top;vml.style.width=width;vml.style.height=height;if(fillColor!=''){vml.setAttribute('filled','true');vml.setAttribute('fillcolor',fillColor)}else{vml.setAttribute('filled','false')}}else{vml.style.position='absolute';vml.setAttribute('from',left+'px,'+top+'px');vml.setAttribute('to',width+'px,'+height+'px')}if(lineColor!=''){vml.setAttribute('stroked','true');vml.setAttribute('strokecolor',lineColor);vml.setAttribute('strokeweight',lineWidth)}else{vml.setAttribute('stroked','false')}this.container.appendChild(vml);return vml};VMLRenderer.prototype.remove=function(shape){shape.removeNode(true)};VMLRenderer.prototype.move=function(shape,left,top){if(shape.tagName=='line'){shape.style.marginLeft=left;shape.style.marginTop=top}else{shape.style.left=left;shape.style.top=top}};VMLRenderer.prototype.track=function(shape){};VMLRenderer.prototype.resize=function(shape,fromX,fromY,toX,toY){shape.setAttribute('to',toX+'px,'+toY+'px')};VMLRenderer.prototype.editCommand=function(shape,cmd,value){if(shape!=null){if(cmd=='fillcolor'){if(value!=''){shape.filled='true';shape.fillcolor=value}else{shape.filled='false';shape.fillcolor=''}}else if(cmd=='linecolor'){if(value!=''){shape.stroked='true';shape.strokecolor=value}else{shape.stroked='false';shape.strokecolor=''}}else if(cmd=='linewidth'){shape.strokeweight=parseInt(value)+'px'}}};VMLRenderer.prototype.queryCommand=function(shape,cmd){if(shape!=null){if(cmd=='fillcolor'){if(shape.filled=='false')return'';else return shape.fillcolor}else if(cmd=='linecolor'){if(shape.stroked=='false')return'';else return shape.strokecolor}else if(cmd=='linewidth'){if(shape.stroked=='false'){return''}else{return(parseFloat(shape.strokeweight)*(screen.logicalXDPI/72))+'px'}}}};VMLRenderer.prototype.showTracker=function(shape){var box=this.bounds(shape);var tracker=document.getElementById('tracker');if(tracker){this.remove(tracker)}tracker=this.container.ownerDocument.createElement('v:rect');tracker.id='tracker';tracker.style.position='absolute';tracker.style.left=box.x-10;tracker.style.top=box.y-10;tracker.style.width=box.width+20;tracker.style.height=box.height+20;tracker.setAttribute('filled','false');tracker.setAttribute('stroked','true');tracker.setAttribute('strokecolor','blue');tracker.setAttribute('strokeweight','1px');this.container.appendChild(tracker)};VMLRenderer.prototype.getMarkup=function(){return this.container.innerHTML};
378   -
379   -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.coordenadas={formato:"bloco",padrao:"geoProj",defOrigem:"+proj=longlat +ellps=GRS67 +no_defs",config:{"geoProj":{idhtml:"localizarxy",tipo:"geo",titulo:"Geo",ativo:true,defepsg:""},"dd":{idhtml:"localizarxy",tipo:"metrica",titulo:"Déc. de grau",ativo:true,defepsg:""},"policonicaSad69":{idhtml:"localizarxy",tipo:"metrica",titulo:"Polic SAD-69",ativo:true,defepsg:"+proj=poly +lat_0=0 +lon_0=-54 +x_0=5000000 +y_0=10000000 +ellps=aust_SA +units=m +no_defs"},"utmSad69Proj":{idhtml:"localizarxy",tipo:"utm",titulo:"UTM Sad-69",ativo:true,defepsg:"",zona:{"19N":"+proj=utm +zone=19 +ellps=aust_SA +units=m +no_defs","20N":"+proj=utm +zone=20 +ellps=aust_SA +units=m +no_defs","21N":"+proj=utm +zone=21 +ellps=aust_SA +units=m +no_defs","22N":"+proj=utm +zone=22 +ellps=aust_SA +units=m +no_defs","17S":"+proj=utm +zone=17 +south +ellps=aust_SA +units=m +no_defs","18S":"+proj=utm +zone=18 +south +ellps=aust_SA +units=m +no_defs","19S":"+proj=utm +zone=19 +south +ellps=aust_SA +units=m +no_defs","20S":"+proj=utm +zone=20 +south +ellps=aust_SA +units=m +no_defs","21S":"+proj=utm +zone=21 +south +ellps=aust_SA +units=m +no_defs","22S":"+proj=utm +zone=22 +south +ellps=aust_SA +units=m +no_defs","23S":"+proj=utm +zone=23 +south +ellps=aust_SA +units=m +no_defs","24S":"+proj=utm +zone=24 +south +ellps=aust_SA +units=m +no_defs","25S":"+proj=utm +zone=25 +south +ellps=aust_SA +units=m +no_defs"}},"utmSirgas2000Proj":{idhtml:"localizarxy",tipo:"utm",titulo:"UTM Sirgas",ativo:true,defepsg:"",zona:{"11N":"+proj=utm +zone=11 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","12N":"+proj=utm +zone=12 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","13N":"+proj=utm +zone=13 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","14N":"+proj=utm +zone=14 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","15N":"+proj=utm +zone=15 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","16N":"+proj=utm +zone=16 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","17N":"+proj=utm +zone=17 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","18N":"+proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","19N":"+proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","20N":"+proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","21N":"+proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","22N":"+proj=utm +zone=22 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","17S":"+proj=utm +zone=17 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","18S":"+proj=utm +zone=18 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","19S":"+proj=utm +zone=19 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","20S":"+proj=utm +zone=20 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","21S":"+proj=utm +zone=21 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","22S":"+proj=utm +zone=22 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","23S":"+proj=utm +zone=23 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","24S":"+proj=utm +zone=24 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","25S":"+proj=utm +zone=25 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}}},PARAMETROS:{"mostraCoordenadasUTM":{idhtml:"localizarxy"},"mostraCoordenadasGEO":{idhtml:"localizarxy"}},MODOTEXTO:"",mostraCoordenadasUTM:function(id){try{if(arguments.length===0||id===""||typeof(id)==='undefined'){id=this.PARAMETROS.mostraCoordenadasUTM.idhtml}else{this.PARAMETROS.mostraCoordenadasUTM.idhtml=id}if(!$i(id)||this.PARAMETROS.mostraCoordenadasUTM.idhtml===""){if(i3GEO.eventos.MOUSEPARADO.toString().search("atualizaCoordenadasUTM()")>=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="<div onclick='javascript:clearTimeout(idSetTimeoutMostraUTM);i3GEO.coordenadas.PARAMETROS.mostraCoordenadasUTM.idhtml = \"\";i3GEO.coordenadas.mostraCoordenadasGEO();' style='width:300px;font-size:10px;' >UTM: x="+retorno.data.x+" y="+retorno.data.y+" zn="+retorno.data.zona+" "+retorno.data.datum+" &nbsp;<img class='x' src='"+i3GEO.util.$im("branco.gif")+"' /></div>";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.Interface.TABLET===true){if(i3GEO.eventos.MOUSECLIQUE.toString().search("atualizaLocalizarGeo()")<0){i3GEO.eventos.MOUSECLIQUE.push("atualizaLocalizarGeo()")}}else{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='<table id='+prefixo+' style=display:block;text-align:center;width:410px ><tr style="border-bottom:2px solid white" >'+'<td style=width:10px;text-align:right > X:</td>'+'<td>'+$inputText('','',prefixo+'xg','grau','2','-00')+'</td>'+'<td>'+$inputText('','',prefixo+'xm','minuto','2','00')+'</td>'+'<td>'+$inputText('','',prefixo+'xs','segundo','4','00.00')+'</td>'+'<td>Y:'+$inputText('','',prefixo+'yg','grau','2','-00')+'</td>'+'<td>'+$inputText('','',prefixo+'ym','minuto','2','00')+'</td>'+'<td>'+$inputText('','',prefixo+'ys','segundo','4','00.00')+'</td>',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+='<td><img class=tic title=zoom onclick="'+temp+'" src="'+i3GEO.util.$im("branco.gif")+'" /></td>'+"<td>"+caixa+"</td>"+"</tr></table>";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]+"<br>"},criaMascaraMetrica:function(prefixo,titulo,caixa){var ins="<table id="+prefixo+" style=display:block;text-align:center;;width:410px ><tr style='border-bottom:2px solid white' >"+"<td style=width:120px;text-align:right >"+titulo+" X:&nbsp;</td>"+"<td>"+$inputText("","",prefixo+"X","X","12","00")+"&nbsp;</td>"+"<td>Y:"+$inputText("","",prefixo+"Y","Y","12","00")+"&nbsp;</td>"+"<td>Zn:"+$inputText("","",prefixo+"ZN","Zona","2","--")+"&nbsp;</td>"+"<td>"+caixa+"<td>"+"</tr></table>";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+"<br>"},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<n;i++){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){if(tipos[i]===this.padrao){$i(prefixo+tipos[i]).style.display="block"}else{$i(prefixo+tipos[i]).style.display="none"}}}},mudaTipo:function(obj,onde){if(obj.value==="janela"){this.formato="janela";this.mostraCoordenadas();return}this.padrao=obj.value;obj.selectedIndex=0;i3GEO.coordenadas.ativaBloco(onde)},mostraCoordenadas:function(ativaMovimento,onde,x,y){try{var tipos=i3GEO.util.listaChaves(i3GEO.coordenadas.config),n=tipos.length,temp,ins="",i=0,caixa,janela;i3GEO.coordenadas.MODOTEXTO="";if(arguments.length===0){ativaMovimento=true;onde=""}if(onde===""){onde=i3GEO.coordenadas.config[tipos[0]].idhtml}caixa="<select onchange='javascript:i3GEO.coordenadas.mudaTipo(this,\""+onde+"\");' style='margin-left:3px;font-size:10px;height:16px;width:40px;' ><option>---</option><option value='janela' >janela</option>";for(i=0;i<n;i+=1){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){caixa+="<option value='"+tipos[i]+"'>"+temp.titulo+"</option>"}}caixa+="</select>";if(i3GEO.coordenadas.formato!=="bloco"){caixa=""}for(i=0;i<n;i+=1){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){if(temp.tipo==="geo"){ins+=i3GEO.coordenadas.criaMascaraDMS(onde+tipos[i],temp.titulo,caixa);if(i3GEO.coordenadas.formato==="separado"){try{$i(temp.idhtml).innerHTML=ins}catch(e){}ins=""}}else{ins+=i3GEO.coordenadas.criaMascaraMetrica(onde+tipos[i],temp.titulo,caixa)}}}if(this.formato==="janela"){janela=i3GEO.janela.cria("450px","120px","","","","Coordenadas aproximadas","i3GEOJanelaCoordenadas",false,"hd","","");YAHOO.util.Event.addListener(janela[0].close,"click",function(){i3GEO.coordenadas.formato="bloco",i3GEO.coordenadas.mostraCoordenadas()});temp=$i("i3GEOJanelaCoordenadas_corpo");temp.style.backgroundColor="white";temp.style.textAlign="left";temp=$i("i3GEOJanelaCoordenadas");temp.onmouseover="";temp.onmouseout="";if($i(onde)){$i(onde).innerHTML=""}onde="i3GEOJanelaCoordenadas_corpo";ins+="<br><a href='#' style='cursor:pointer;color:blue' onclick='new YAHOO.util.KeyListener(document.body,{alt:true,keys:67},{fn: function(type, args, obj){alert(i3GEO.coordenadas.MODOTEXTO);}}).enable();' >"+"Clique aqui para ativar Alt+C para poder capturar as coordenadas</a>"}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<n;i+=1){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){if(temp.tipo==="geo"){if(ativaMovimento===true){if(i3GEO.Interface.TABLET===true){if(i3GEO.eventos.MOUSECLIQUE.toString().search("atualizaLocalizarGeo('"+onde+tipos[i]+"')")<0){i3GEO.eventos.MOUSECLIQUE.push("atualizaLocalizarGeo('"+onde+tipos[i]+"')")}}else{if(i3GEO.eventos.MOUSEMOVE.toString().search("atualizaLocalizarGeo('"+onde+tipos[i]+"')")<0){i3GEO.eventos.MOUSEMOVE.push("atualizaLocalizarGeo('"+onde+tipos[i]+"')")}}}if(typeof(x)!=='undefined'){atualizaLocalizarGeo(onde+tipos[i],i3GEO.calculo.dd2dms(x)[0],i3GEO.calculo.dd2dms(y)[0])}}else{if(ativaMovimento===true){if(i3GEO.Interface.TABLET===true){if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')")}}else{if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')")}}}if(typeof(x)!=='undefined'){i3GEO.coordenadas.atualizaProj4(onde,tipos[i],x,y)}}}}if(ativaMovimento===true){if(i3GEO.Interface.TABLET===true){if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.coordenadas.limpaModoTexto()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.coordenadas.limpaModoTexto()")}}else{if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.coordenadas.limpaModoTexto()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.coordenadas.limpaModoTexto()")}}}if(i3GEO.coordenadas.formato==="bloco"){i3GEO.coordenadas.ativaBloco(onde)}}catch(men){}},limpaModoTexto:function(){i3GEO.coordenadas.MODOTEXTO=""}};
380   -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.gadgets={PARAMETROS:{"mostraInserirKml":{idhtml:"inserirKml"},"mostraEscalaNumerica":{idhtml:"escala"},"mostraEscalaGrafica":{idhtml:"escalaGrafica"},"mostraBuscaRapida":{idhtml:"buscaRapida",servicosexternos:true,temasmapa:false},"mostraVisual":{idhtml:"visual"},"mostraQuadros":{idhtml:"lugarquadros"},"mostraHistoricoZoom":{idhtml:"historicozoom"},"mostraMenuSuspenso":{idhtml:"menus",deslocaEsquerda:0},"mostraMenuLista":{idhtml:"menuLista"},"mostraVersao":{idhtml:"versaoi3geo"},"mostraEmail":{idhtml:"emailInstituicao"}},mostraEmail:function(id){if(arguments.length===0||id===""){id=i3GEO.gadgets.PARAMETROS.mostraEmail.idhtml}else{i3GEO.gadgets.PARAMETROS.mostraEmail.idhtml=id}i3GEO.util.defineValor(id,"innerHTML",i3GEO.parametros.emailInstituicao)},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,"290","i3geo_urlkml","kml url","40","");ins="<table><tr><td>Kml: "+i;temp='i3GEO.Interface.adicionaKml();';ins+="</td><td><img src='"+i3GEO.util.$im("branco.gif")+"' class='tic' onclick='"+temp+"' /></td></tr></table>";$i(id).innerHTML=ins}}},mostraEscalaNumerica:function(id){var i,ins,temp,onde;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraEscalaNumerica.idhtml}onde=$i(id);if(onde){if(onde.style.display=="none"){onde.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,"100","i3geo_escalanum",$trad("d10"),"9",parseInt(i3GEO.parametros.mapscale,10));ins="<table><tr><td>"+i;temp='var nova = document.getElementById("i3geo_escalanum").value;';temp+='i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,nova);';ins+="</td><td><img src='"+i3GEO.util.$im("branco.gif")+"' class='tic' onclick='"+temp+"' /></td></tr></table>";onde.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="<img class='menuarrow' src=\""+i3GEO.configura.locaplic+"/imagens/branco.gif\" title='op&ccedil;&otilde;es' onclick='i3GEO.mapa.dialogo.opcoesEscala()' style='cursor:pointer'/><img id=imagemEscalaGrafica src='' />";$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(){alert("i3geo_buscaRapida foi depreciada")};i=$inputText(id,"225","valorBuscaRapida","Município, cidade, UC, endereço...","30",$trad("o2"));ins="<table><tr><td><a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=8&idajuda=71' >&nbsp;&nbsp;&nbsp;</a></td><td>"+i+"</td>";ins+="<td><img src='"+i3GEO.util.$im("branco.gif")+"' title='"+$trad("p13")+"' class='ticPropriedades2' id=i3GEObotaoPropriedadesBuscaRapida /></td>";ins+="<td><img src='"+i3GEO.util.$im("branco.gif")+"' class='tic' id=i3GEObotaoBuscaRapida /></td></tr></table>";temp=$i(id);if(temp){temp.innerHTML=ins;$i("i3GEObotaoBuscaRapida").onclick=function(){if(i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.servicosexternos===false&&i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.temasmapa===false){alert("Escolha um tipo de busca nas propriedades");return}if($i("valorBuscaRapida").value===""){alert("Digite uma palavra para busca!");return}i3GEO.janela.cria("300px","280px",i3GEO.configura.locaplic+"/ferramentas/buscarapida/index.htm","","","Busca rapida")};$i("i3GEObotaoPropriedadesBuscaRapida").onclick=function(){var ins,interno="",externo="";i3GEO.janela.cria("300px","150px","","","","Propriedades","i3GEOpropriedadesBuscaRapida");if(i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.servicosexternos){externo="checked"}if(i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.temasmapa){interno="checked"}ins="<p class=paragrafo >Onde será feita a busca:</p>"+"<table class=lista3 >"+"<tr><td><input style=cursor:pointer onclick='i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.servicosexternos = this.checked' type=checkbox "+externo+" ></td><td>Serviços de busca externos (Google e MMA)</td></tr>"+"<tr><td><input style=cursor:pointer onclick='i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.temasmapa = this.checked' type=checkbox "+interno+" ></td><td>Temas existentes no mapa</td></tr>"+"</table><br>"+"<p class=paragrafo >Apenas os temas especialmente configurados pelo administrador do i3Geo podem receber operações de busca.</p>";$i("i3GEOpropriedadesBuscaRapida_corpo").innerHTML=ins}}}},mostraHistoricoZoom:function(id){if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraHistoricoZoom.idhtml}if($i(id)){marcadorZoom="";var ins="<table style='text-align:center;position:relative;left:";if(navm){ins+="0px;'>"}else{ins+="6px;'>"}ins+="<tr><td><img id='i3geo_zoomanterior' class='zoomAnterior' title='anterior' src='"+i3GEO.util.$im("branco.gif")+"' /></td>";ins+="<td>&nbsp;</td>";ins+="<td><img id='i3geo_zoomproximo' class='zoomProximo' title='proximo' src='"+i3GEO.util.$im("branco.gif")+"' /></td>";ins+="</tr></table>";$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<i3GEO.gadgets.quadros.quadrosfilme.length){marcadorZoom=marcadorZoom+1;if(marcadorZoom<i3GEO.gadgets.quadros.quadrosfilme.length){i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,"",i3GEO.gadgets.quadros.quadrosfilme[marcadorZoom].extensao)}}else{marcadorZoom=i3GEO.gadgets.quadros.quadrosfilme.length}}}},visual:{inicia:function(id){var l,visuais,li;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraVisual.idhtml}if($i(id)){if(i3GEO.parametros.listavisual!==""){l=i3GEO.parametros.listavisual.split(",");visuais="";li=l.length-1;if(li>=0){do{visuais+="<img title='"+l[li]+"' style=cursor:pointer onclick='i3GEO.gadgets.visual.troca(\""+l[li]+"\")' src='"+i3GEO.configura.locaplic+"/imagens/visual/"+l[li]+".png' />&nbsp;"}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<elt;i++){if((elementos[i].src.search("branco")>-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="<table class=tablefilme ><tr><td><div class='menuarrow' title='op&ccedil;&otilde;es' onclick='i3GEO.gadgets.quadros.opcoes(this)' style='cursor:pointer'></div></td>";for(i=0;i<qs;i++){q+="<td><img class='quadro' src=\""+i3GEO.configura.locaplic+"/imagens/branco.gif\" id='quadro"+i+"' ";q+="onmouseover='i3GEO.gadgets.quadros.trocaMapa(this.id);i3GEO.ajuda.mostraJanela(\"Clique para aplicar a extensão geográfica do quadro ao mapa\")' ";q+="onclick='i3GEO.gadgets.quadros.zoom(this.id)' /></td>";i3GEO.gadgets.quadros.quadrosfilme[i]=[]}q+="</tr></table>";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.toLowerCase()==="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.toLowerCase()==="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="<br><b>N&atilde;o existem imagens guardadas.";wi.document.write("<html><body><p style='font-size: 12px; font-family: verdana, arial, helvetica, sans-serif;'>Click com o bot&atilde;o da direita do mouse sobre a imagem para fazer o download<br>");i=i3GEO.gadgets.quadros.quadrosfilme.length-1;if(i>=0){do{if(i3GEO.gadgets.quadros.quadrosfilme[i].imagem){wi.document.write("<p style='font-size: 12px; font-family: verdana, arial, helvetica, sans-serif;'>Imagem: "+i+"<br>");wi.document.write("<p style='font-size: 12px; font-family: verdana, arial, helvetica, sans-serif;'>Abrangência: "+i3GEO.gadgets.quadros.quadrosfilme[i].extensao+"<br>");wi.document.write("<img src='"+i3GEO.gadgets.quadros.quadrosfilme[i].imagem+"' />");wi.document.write("<img src='"+i3GEO.gadgets.quadros.quadrosfilme[i].referencia+"' />");if(i3GEO.gadgets.quadros.geraLegenda===true){wi.document.write("<img src='"+i3GEO.gadgets.quadros.quadrosfilme[i].legenda+"' />")}}i--}while(i>=0)}wi.document.write("<br>Fim</body></html>");wi.document.close()}}},mostraMenuSuspenso:function(id){var objid,sobe,n,i,estilo,t,onMenuBarBeforeRender,temp,ifr,i3GEOoMenuBarLocal,ms=i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso,confm=i3GEO.configura.oMenuData,ins="",alinhamento="";i3GEOoMenuBar=YAHOO.widget.MenuManager;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+='<div class="bd" style="top:0px;'+alinhamento+'display:block;align:right;border: 0px solid white;z-index:6000;line-height:1.4" >'+'<ul class="first-of-type" style="display:block;border:0px solid white;top:10px;">';n=confm.menu.length;estilo="padding-bottom:3px;top:0px;border: 0px solid white;";for(i=0;i<n;i+=1){t="";if(confm.menu[i].target){t="target="+confm.menu[i].target}ins+='<li class="yuimenubaritem" style="padding-top:2px;"><a style="'+estilo+'" href="#" class="yuimenubaritemlabel" '+t+'id="menu'+confm.menu[i].id+'" >&nbsp;'+confm.menu[i].nome+'</a></li>'}ins+='</ul>';ins+='</div>';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!==""){i3GEOoMenuBarLocal.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}i3GEOoMenuBarLocal=new YAHOO.widget.MenuBar(id,{iframe:ifr,autosubmenudisplay:true,showdelay:100,hidedelay:500,lazyload:false});i3GEOoMenuBar.addMenu(i3GEOoMenuBarLocal);i3GEOoMenuBarLocal.beforeRenderEvent.subscribe(onMenuBarBeforeRender);i3GEOoMenuBarLocal.render();try{if(i3GEO.Interface.ATUAL==="padrao"){i3GEOoMenuBar.getMenuItem("omenudataInterface1").cfg.setProperty("checked",true)}if(i3GEO.Interface.ATUAL==="openlayers"){i3GEOoMenuBar.getMenuItem("omenudataInterface2").cfg.setProperty("checked",true)}if(i3GEO.Interface.ATUAL==="flamingo"){i3GEOoMenuBar.getMenuItem("omenudataInterface3").cfg.setProperty("checked",true)}if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEOoMenuBar.getMenuItem("omenudataInterface4").cfg.setProperty("checked",true)}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEOoMenuBar.getMenuItem("omenudataInterface5").cfg.setProperty("checked",true)}}catch(e){}if(i3GEO.Interface.ATUAL!=="padrao"&&$i("omenudataArquivos3")){i3GEOoMenuBar.getMenuItem("omenudataArquivos3").cfg.setProperty("disabled",true)}if(i3GEO.Interface.ATUAL==="googleearth"&&$i("omenudataJanelas1")){i3GEOoMenuBar.getMenuItem("omenudataJanelas1").cfg.setProperty("disabled",true)}if(i3GEO.Interface.ATUAL!=="openlayers"&&$i("omenudataJanelas3")){i3GEOoMenuBar.getMenuItem("omenudataJanelas3").cfg.setProperty("disabled",true)}temp=objid.style;temp.backgroundPosition="0px -1px";temp.border="0px solid white";if(navm){temp.borderBottom="2px solid white"}if(navm&&i3GEO.Interface.ATUAL==="googlemaps"){temp.border="2px dotted white"}if(ms.finaliza&&ms.finaliza!=""){eval(ms.finaliza)}}},mostraMenuLista:function(id){var objid,n,i,estilo,t,temp,nomeMenu,sub,ms=i3GEO.gadgets.PARAMETROS.mostraMenuLista,confm=i3GEO.configura.oMenuData,ins="",subs=i3GEO.configura.oMenuData.submenus;if(arguments.length===0){id=ms.idhtml}else{ms.idhtml=id}objid=$i(id);if(objid){n=confm.menu.length;for(i=0;i<n;i+=1){ins+='<div class="listaMenuTitulo" id=menulista_'+confm.menu[i].id+'>'+confm.menu[i].nome+'</div>'}objid.innerHTML=ins;for(nomeMenu in subs){if($i("menulista_"+nomeMenu)){sub=subs[nomeMenu];n=sub.length;ins="";for(i=0;i<n;i++){ins+="<p class='listaMenuItem' ><a href='"+sub[i].url+"' target='_blank'>"+sub[i].text+"</a>"}$i("menulista_"+nomeMenu).innerHTML+=ins}}}}};
381   -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.social={curtirFacebook:function(url,tipo){if(tipo==="comtotal"){return"<iframe src='http://www.facebook.com/plugins/like.php?href="+url+"&amp;layout=button_count&amp;show_faces=false&amp;width=160&amp;action=like&amp;colorscheme=light&amp;height=21' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:160px; height:21px;' allowTransparency='true'></iframe>"}if(tipo==="semtotal"){return"<iframe src='http://www.facebook.com/plugins/like.php?href="+url+"&amp;layout=button_count&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;height=21' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:100px; height:21px;' allowTransparency='true'></iframe>"}},publicarTwitter:function(url,tipo){var re=new RegExp("=","g");url=url.replace(re,'%3d');if(tipo==="comtotal"){return'<iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/tweet_button.html?count=horizontal&via=i3geo&url='+url+'" style="width:100px; height:21px;"></iframe>'}if(tipo==="semtotal"){return'<iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/tweet_button.html?count=none&via=i3geo&url='+url+'" style="width:55px; height:21px;"></iframe>'}},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+="<table style='width:250px' ><tr>"}if(tipo==="semtotal"){tabela+="<table style='width:115px' ><tr>"}if(onde||id===""){if(urlpt!==""){tabela+="<td>"+i3GEO.social.publicarTwitter(urlpt,tipo)+"</td>"}if(urlcf!==""){tabela+="<td>"+i3GEO.social.curtirFacebook(urlcf,tipo)+"</td>"}tabela+="</tr></table>";if(id!==""){onde.innerHTML=tabela}return tabela}else{return false}},bookmark:function(link,locaplic){if(!locaplic){locaplic=i3GEO.configura.locaplic}var ins="<img style='cursor:pointer' src='"+locaplic+"/imagens/delicious.gif' onclick='javascript:window.open(\"http://del.icio.us/post?url="+link+"\")' title='Delicious'/> ";ins+="<img style='cursor:pointer' src='"+locaplic+"/imagens/digg.gif' onclick='javascript:window.open(\"http://digg.com/submit/post?url="+link+"\")' title='Digg'/> ";ins+="<img style='cursor:pointer' src='"+locaplic+"/imagens/facebook.gif' onclick='javascript:window.open(\"http://www.facebook.com/sharer.php?u="+link+"\")' title='Facebook'/> ";ins+="<img style='cursor:pointer' src='"+locaplic+"/imagens/stumbleupon.gif' onclick='javascript:window.open(\"http://www.stumbleupon.com/submit?url="+link+"\")' title='StumbleUpon'/>";return ins}};
382   -
  328 +YAHOO.lang.JSON=(function(){var l=YAHOO.lang,_UNICODE_EXCEPTIONS=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,_ESCAPES=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,_VALUES=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,_BRACKETS=/(?:^|:|,)(?:\s*\[)+/g,_INVALID=/^[\],:{}\s]*$/,_SPECIAL_CHARS=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,_CHARS={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function _revive(data,reviver){var walk=function(o,key){var k,v,value=o[key];if(value&&typeof value==="object"){for(k in value){if(l.hasOwnProperty(value,k)){v=walk(value,k);if(v===undefined){delete value[k];}else{value[k]=v;}}}}return reviver.call(o,key,value);};return typeof reviver==="function"?walk({"":data},""):data;}function _char(c){if(!_CHARS[c]){_CHARS[c]="\\u"+("0000"+(+(c.charCodeAt(0))).toString(16)).slice(-4);}return _CHARS[c];}function _prepare(s){return s.replace(_UNICODE_EXCEPTIONS,_char);}function _isValid(str){return l.isString(str)&&_INVALID.test(str.replace(_ESCAPES,"@").replace(_VALUES,"]").replace(_BRACKETS,""));}function _string(s){return'"'+s.replace(_SPECIAL_CHARS,_char)+'"';}function _stringify(h,key,d,w,pstack){var o=typeof w==="function"?w.call(h,key,h[key]):h[key],i,len,j,k,v,isArray,a;if(o instanceof Date){o=l.JSON.dateToString(o);}else{if(o instanceof String||o instanceof Boolean||o instanceof Number){o=o.valueOf();}}switch(typeof o){case"string":return _string(o);case"number":return isFinite(o)?String(o):"null";case"boolean":return String(o);case"object":if(o===null){return"null";}for(i=pstack.length-1;i>=0;--i){if(pstack[i]===o){return"null";}}pstack[pstack.length]=o;a=[];isArray=l.isArray(o);if(d>0){if(isArray){for(i=o.length-1;i>=0;--i){a[i]=_stringify(o,i,d-1,w,pstack)||"null";}}else{j=0;if(l.isArray(w)){for(i=0,len=w.length;i<len;++i){k=w[i];v=_stringify(o,k,d-1,w,pstack);if(v){a[j++]=_string(k)+":"+v;}}}else{for(k in o){if(typeof k==="string"&&l.hasOwnProperty(o,k)){v=_stringify(o,k,d-1,w,pstack);if(v){a[j++]=_string(k)+":"+v;}}}}a.sort();}}pstack.pop();return isArray?"["+a.join(",")+"]":"{"+a.join(",")+"}";}return undefined;}return{isValid:function(s){return _isValid(_prepare(s));},parse:function(s,reviver){s=_prepare(s);if(_isValid(s)){return _revive(eval("("+s+")"),reviver);}throw new SyntaxError("parseJSON");},stringify:function(o,w,d){if(o!==undefined){if(l.isArray(w)){w=(function(a){var uniq=[],map={},v,i,j,len;for(i=0,j=0,len=a.length;i<len;++i){v=a[i];if(typeof v==="string"&&map[v]===undefined){uniq[(map[v]=j++)]=v;}}return uniq;})(w);}d=d>=0?d:1/0;return _stringify({"":o},"",d,w,[]);}return undefined;},dateToString:function(d){function _zeroPad(v){return v<10?"0"+v:v;}return d.getUTCFullYear()+"-"+_zeroPad(d.getUTCMonth()+1)+"-"+_zeroPad(d.getUTCDate())+"T"+_zeroPad(d.getUTCHours())+":"+_zeroPad(d.getUTCMinutes())+":"+_zeroPad(d.getUTCSeconds())+"Z";},stringToDate:function(str){if(/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})Z$/.test(str)){var d=new Date();d.setUTCFullYear(RegExp.$1,(RegExp.$2|0)-1,RegExp.$3);d.setUTCHours(RegExp.$4,RegExp.$5,RegExp.$6);return d;}return str;}};})();YAHOO.register("json",YAHOO.lang.JSON,{version:"2.7.0",build:"1799"});(function(){var E=YAHOO.util.Dom,A=YAHOO.util.Event,C=YAHOO.lang;var B=function(F,D){var G={element:F,attributes:D||{}};B.superclass.constructor.call(this,G.element,G.attributes)};B._instances={};B.getResizeById=function(D){if(B._instances[D]){return B._instances[D]}return false};YAHOO.extend(B,YAHOO.util.Element,{CSS_RESIZE:"yui-resize",CSS_DRAG:"yui-draggable",CSS_HOVER:"yui-resize-hover",CSS_PROXY:"yui-resize-proxy",CSS_WRAP:"yui-resize-wrap",CSS_KNOB:"yui-resize-knob",CSS_HIDDEN:"yui-resize-hidden",CSS_HANDLE:"yui-resize-handle",CSS_STATUS:"yui-resize-status",CSS_GHOST:"yui-resize-ghost",CSS_RESIZING:"yui-resize-resizing",_resizeEvent:null,dd:null,browser:YAHOO.env.ua,_locked:null,_positioned:null,_dds:null,_wrap:null,_proxy:null,_handles:null,_currentHandle:null,_currentDD:null,_cache:null,_active:null,_createProxy:function(){if(this.get("proxy")){this._proxy=document.createElement("div");this._proxy.className=this.CSS_PROXY;this._proxy.style.height=this.get("element").clientHeight+"px";this._proxy.style.width=this.get("element").clientWidth+"px";this._wrap.parentNode.appendChild(this._proxy)}else{this.set("animate",false)}},_createWrap:function(){this._positioned=false;if(this.get("wrap")===false){switch(this.get("element").tagName.toLowerCase()){case"img":case"textarea":case"input":case"iframe":case"select":this.set("wrap",true);break}}if(this.get("wrap")===true){this._wrap=document.createElement("div");this._wrap.id=this.get("element").id+"_wrap";this._wrap.className=this.CSS_WRAP;if(this.get("element").tagName.toLowerCase()=="textarea"){E.addClass(this._wrap,"yui-resize-textarea")}E.setStyle(this._wrap,"width",this.get("width")+"px");E.setStyle(this._wrap,"height",this.get("height")+"px");E.setStyle(this._wrap,"z-index",this.getStyle("z-index"));this.setStyle("z-index",0);var F=E.getStyle(this.get("element"),"position");E.setStyle(this._wrap,"position",((F=="static")?"relative":F));E.setStyle(this._wrap,"top",E.getStyle(this.get("element"),"top"));E.setStyle(this._wrap,"left",E.getStyle(this.get("element"),"left"));if(E.getStyle(this.get("element"),"position")=="absolute"){this._positioned=true;E.setStyle(this.get("element"),"position","relative");E.setStyle(this.get("element"),"top","0");E.setStyle(this.get("element"),"left","0")}var D=this.get("element").parentNode;D.replaceChild(this._wrap,this.get("element"));this._wrap.appendChild(this.get("element"))}else{this._wrap=this.get("element");if(E.getStyle(this._wrap,"position")=="absolute"){this._positioned=true}}if(this.get("draggable")){this._setupDragDrop()}if(this.get("hover")){E.addClass(this._wrap,this.CSS_HOVER)}if(this.get("knobHandles")){E.addClass(this._wrap,this.CSS_KNOB)}if(this.get("hiddenHandles")){E.addClass(this._wrap,this.CSS_HIDDEN)}E.addClass(this._wrap,this.CSS_RESIZE)},_setupDragDrop:function(){E.addClass(this._wrap,this.CSS_DRAG);this.dd=new YAHOO.util.DD(this._wrap,this.get("id")+"-resize",{dragOnly:true,useShim:this.get("useShim")});this.dd.on("dragEvent",function(){this.fireEvent("dragEvent",arguments)},this,true)},_createHandles:function(){this._handles={};this._dds={};var G=this.get("handles");for(var F=0;F<G.length;F++){this._handles[G[F]]=document.createElement("div");this._handles[G[F]].id=E.generateId(this._handles[G[F]]);this._handles[G[F]].className=this.CSS_HANDLE+" "+this.CSS_HANDLE+"-"+G[F];var D=document.createElement("div");D.className=this.CSS_HANDLE+"-inner-"+G[F];this._handles[G[F]].appendChild(D);this._wrap.appendChild(this._handles[G[F]]);A.on(this._handles[G[F]],"mouseover",this._handleMouseOver,this,true);A.on(this._handles[G[F]],"mouseout",this._handleMouseOut,this,true);this._dds[G[F]]=new YAHOO.util.DragDrop(this._handles[G[F]],this.get("id")+"-handle-"+G,{useShim:this.get("useShim")});this._dds[G[F]].setPadding(15,15,15,15);this._dds[G[F]].on("startDragEvent",this._handleStartDrag,this._dds[G[F]],this);this._dds[G[F]].on("mouseDownEvent",this._handleMouseDown,this._dds[G[F]],this)}this._status=document.createElement("span");this._status.className=this.CSS_STATUS;document.body.insertBefore(this._status,document.body.firstChild)},_ieSelectFix:function(){return false},_ieSelectBack:null,_setAutoRatio:function(D){if(this.get("autoRatio")){if(D&&D.shiftKey){this.set("ratio",true)}else{this.set("ratio",this._configs.ratio._initialConfig.value)}}},_handleMouseDown:function(D){if(this._locked){return false}if(E.getStyle(this._wrap,"position")=="absolute"){this._positioned=true}if(D){this._setAutoRatio(D)}if(this.browser.ie){this._ieSelectBack=document.body.onselectstart;document.body.onselectstart=this._ieSelectFix}},_handleMouseOver:function(G){if(this._locked){return false}E.removeClass(this._wrap,this.CSS_RESIZE);if(this.get("hover")){E.removeClass(this._wrap,this.CSS_HOVER)}var D=A.getTarget(G);if(!E.hasClass(D,this.CSS_HANDLE)){D=D.parentNode}if(E.hasClass(D,this.CSS_HANDLE)&&!this._active){E.addClass(D,this.CSS_HANDLE+"-active");for(var F in this._handles){if(C.hasOwnProperty(this._handles,F)){if(this._handles[F]==D){E.addClass(D,this.CSS_HANDLE+"-"+F+"-active");break}}}}E.addClass(this._wrap,this.CSS_RESIZE)},_handleMouseOut:function(G){E.removeClass(this._wrap,this.CSS_RESIZE);if(this.get("hover")&&!this._active){E.addClass(this._wrap,this.CSS_HOVER)}var D=A.getTarget(G);if(!E.hasClass(D,this.CSS_HANDLE)){D=D.parentNode}if(E.hasClass(D,this.CSS_HANDLE)&&!this._active){E.removeClass(D,this.CSS_HANDLE+"-active");for(var F in this._handles){if(C.hasOwnProperty(this._handles,F)){if(this._handles[F]==D){E.removeClass(D,this.CSS_HANDLE+"-"+F+"-active");break}}}}E.addClass(this._wrap,this.CSS_RESIZE)},_handleStartDrag:function(G,F){var D=F.getDragEl();if(E.hasClass(D,this.CSS_HANDLE)){if(E.getStyle(this._wrap,"position")=="absolute"){this._positioned=true}this._active=true;this._currentDD=F;if(this._proxy){this._proxy.style.visibility="visible";this._proxy.style.zIndex="1000";this._proxy.style.height=this.get("element").clientHeight+"px";this._proxy.style.width=this.get("element").clientWidth+"px"}for(var H in this._handles){if(C.hasOwnProperty(this._handles,H)){if(this._handles[H]==D){this._currentHandle=H;var I="_handle_for_"+H;E.addClass(D,this.CSS_HANDLE+"-"+H+"-active");F.on("dragEvent",this[I],this,true);F.on("mouseUpEvent",this._handleMouseUp,this,true);break}}}E.addClass(D,this.CSS_HANDLE+"-active");if(this.get("proxy")){var J=E.getXY(this.get("element"));E.setXY(this._proxy,J);if(this.get("ghost")){this.addClass(this.CSS_GHOST)}}E.addClass(this._wrap,this.CSS_RESIZING);this._setCache();this._updateStatus(this._cache.height,this._cache.width,this._cache.top,this._cache.left);this.fireEvent("startResize",{type:"startresize",target:this})}},_setCache:function(){this._cache.xy=E.getXY(this._wrap);E.setXY(this._wrap,this._cache.xy);this._cache.height=this.get("clientHeight");this._cache.width=this.get("clientWidth");this._cache.start.height=this._cache.height;this._cache.start.width=this._cache.width;this._cache.start.top=this._cache.xy[1];this._cache.start.left=this._cache.xy[0];this._cache.top=this._cache.xy[1];this._cache.left=this._cache.xy[0];this.set("height",this._cache.height,true);this.set("width",this._cache.width,true)},_handleMouseUp:function(F){this._active=false;var G="_handle_for_"+this._currentHandle;this._currentDD.unsubscribe("dragEvent",this[G],this,true);this._currentDD.unsubscribe("mouseUpEvent",this._handleMouseUp,this,true);if(this._proxy){this._proxy.style.visibility="hidden";this._proxy.style.zIndex="-1";if(this.get("setSize")){this.resize(F,this._cache.height,this._cache.width,this._cache.top,this._cache.left,true)}else{this.fireEvent("resize",{ev:"resize",target:this,height:this._cache.height,width:this._cache.width,top:this._cache.top,left:this._cache.left})}if(this.get("ghost")){this.removeClass(this.CSS_GHOST)}}if(this.get("hover")){E.addClass(this._wrap,this.CSS_HOVER)}if(this._status){E.setStyle(this._status,"display","none")}if(this.browser.ie){document.body.onselectstart=this._ieSelectBack}if(this.browser.ie){E.removeClass(this._wrap,this.CSS_RESIZE)}for(var D in this._handles){if(C.hasOwnProperty(this._handles,D)){E.removeClass(this._handles[D],this.CSS_HANDLE+"-active")}}if(this.get("hover")&&!this._active){E.addClass(this._wrap,this.CSS_HOVER)}E.removeClass(this._wrap,this.CSS_RESIZING);E.removeClass(this._handles[this._currentHandle],this.CSS_HANDLE+"-"+this._currentHandle+"-active");E.removeClass(this._handles[this._currentHandle],this.CSS_HANDLE+"-active");if(this.browser.ie){E.addClass(this._wrap,this.CSS_RESIZE)}this._resizeEvent=null;this._currentHandle=null;if(!this.get("animate")){this.set("height",this._cache.height,true);this.set("width",this._cache.width,true)}this.fireEvent("endResize",{ev:"endResize",target:this,height:this._cache.height,width:this._cache.width,top:this._cache.top,left:this._cache.left})},_setRatio:function(K,N,Q,I){var O=K,G=N;if(this.get("ratio")){var P=this._cache.height,H=this._cache.width,F=parseInt(this.get("height"),10),L=parseInt(this.get("width"),10),M=this.get("maxHeight"),R=this.get("minHeight"),D=this.get("maxWidth"),J=this.get("minWidth");switch(this._currentHandle){case"l":K=F*(N/L);K=Math.min(Math.max(R,K),M);N=L*(K/F);Q=(this._cache.start.top-(-((F-K)/2)));I=(this._cache.start.left-(-((L-N))));break;case"r":K=F*(N/L);K=Math.min(Math.max(R,K),M);N=L*(K/F);Q=(this._cache.start.top-(-((F-K)/2)));break;case"t":N=L*(K/F);K=F*(N/L);I=(this._cache.start.left-(-((L-N)/2)));Q=(this._cache.start.top-(-((F-K))));break;case"b":N=L*(K/F);K=F*(N/L);I=(this._cache.start.left-(-((L-N)/2)));break;case"bl":K=F*(N/L);N=L*(K/F);I=(this._cache.start.left-(-((L-N))));break;case"br":K=F*(N/L);N=L*(K/F);break;case"tl":K=F*(N/L);N=L*(K/F);I=(this._cache.start.left-(-((L-N))));Q=(this._cache.start.top-(-((F-K))));break;case"tr":K=F*(N/L);N=L*(K/F);I=(this._cache.start.left);Q=(this._cache.start.top-(-((F-K))));break}O=this._checkHeight(K);G=this._checkWidth(N);if((O!=K)||(G!=N)){Q=0;I=0;if(O!=K){G=this._cache.width}if(G!=N){O=this._cache.height}}}return[O,G,Q,I]},_updateStatus:function(K,G,J,F){if(this._resizeEvent&&(!C.isString(this._resizeEvent))){K=((K===0)?this._cache.start.height:K);G=((G===0)?this._cache.start.width:G);var I=parseInt(this.get("height"),10),D=parseInt(this.get("width"),10);if(isNaN(I)){I=parseInt(K,10)}if(isNaN(D)){D=parseInt(G,10)}var L=(parseInt(K,10)-I);var H=(parseInt(G,10)-D);this._cache.offsetHeight=L;this._cache.offsetWidth=H;if(this.get("status")){E.setStyle(this._status,"display","inline");this._status.innerHTML="<strong>"+parseInt(K,10)+" x "+parseInt(G,10)+"</strong><em>"+((L>0)?"+":"")+L+" x "+((H>0)?"+":"")+H+"</em>";E.setXY(this._status,[A.getPageX(this._resizeEvent)+12,A.getPageY(this._resizeEvent)+12])}}},lock:function(D){this._locked=true;if(D&&this.dd){E.removeClass(this._wrap,"yui-draggable");this.dd.lock()}return this},unlock:function(D){this._locked=false;if(D&&this.dd){E.addClass(this._wrap,"yui-draggable");this.dd.unlock()}return this},isLocked:function(){return this._locked},reset:function(){this.resize(null,this._cache.start.height,this._cache.start.width,this._cache.start.top,this._cache.start.left,true);return this},resize:function(M,J,P,Q,H,F,K){if(this._locked){return false}this._resizeEvent=M;var G=this._wrap,I=this.get("animate"),O=true;if(this._proxy&&!F){G=this._proxy;I=false}this._setAutoRatio(M);if(this._positioned){if(this._proxy){Q=this._cache.top-Q;H=this._cache.left-H}}var L=this._setRatio(J,P,Q,H);J=parseInt(L[0],10);P=parseInt(L[1],10);Q=parseInt(L[2],10);H=parseInt(L[3],10);if(Q==0){Q=E.getY(G)}if(H==0){H=E.getX(G)}if(this._positioned){if(this._proxy&&F){if(!I){G.style.top=this._proxy.style.top;G.style.left=this._proxy.style.left}else{Q=this._proxy.style.top;H=this._proxy.style.left}}else{if(!this.get("ratio")&&!this._proxy){Q=this._cache.top+-(Q);H=this._cache.left+-(H)}if(Q){if(this.get("minY")){if(Q<this.get("minY")){Q=this.get("minY")}}if(this.get("maxY")){if(Q>this.get("maxY")){Q=this.get("maxY")}}}if(H){if(this.get("minX")){if(H<this.get("minX")){H=this.get("minX")}}if(this.get("maxX")){if((H+P)>this.get("maxX")){H=(this.get("maxX")-P)}}}}}if(!K){var N=this.fireEvent("beforeResize",{ev:"beforeResize",target:this,height:J,width:P,top:Q,left:H});if(N===false){return false}}this._updateStatus(J,P,Q,H);if(this._positioned){if(this._proxy&&F){}else{if(Q){E.setY(G,Q);this._cache.top=Q}if(H){E.setX(G,H);this._cache.left=H}}}if(J){if(!I){O=true;if(this._proxy&&F){if(!this.get("setSize")){O=false}}if(O){G.style.height=J+"px"}if((this._proxy&&F)||!this._proxy){if(this._wrap!=this.get("element")){this.get("element").style.height=J+"px"}}}this._cache.height=J}if(P){this._cache.width=P;if(!I){O=true;if(this._proxy&&F){if(!this.get("setSize")){O=false}}if(O){G.style.width=P+"px"}if((this._proxy&&F)||!this._proxy){if(this._wrap!=this.get("element")){this.get("element").style.width=P+"px"}}}}if(I){if(YAHOO.util.Anim){var D=new YAHOO.util.Anim(G,{height:{to:this._cache.height},width:{to:this._cache.width}},this.get("animateDuration"),this.get("animateEasing"));if(this._positioned){if(Q){D.attributes.top={to:parseInt(Q,10)}}if(H){D.attributes.left={to:parseInt(H,10)}}}if(this._wrap!=this.get("element")){D.onTween.subscribe(function(){this.get("element").style.height=G.style.height;this.get("element").style.width=G.style.width},this,true)}D.onComplete.subscribe(function(){this.set("height",J);this.set("width",P);this.fireEvent("resize",{ev:"resize",target:this,height:J,width:P,top:Q,left:H})},this,true);D.animate()}}else{if(this._proxy&&!F){this.fireEvent("proxyResize",{ev:"proxyresize",target:this,height:J,width:P,top:Q,left:H})}else{this.fireEvent("resize",{ev:"resize",target:this,height:J,width:P,top:Q,left:H})}}return this},_handle_for_br:function(F){var G=this._setWidth(F.e);var D=this._setHeight(F.e);this.resize(F.e,D,G,0,0)},_handle_for_bl:function(G){var H=this._setWidth(G.e,true);var F=this._setHeight(G.e);var D=(H-this._cache.width);this.resize(G.e,F,H,0,D)},_handle_for_tl:function(G){var I=this._setWidth(G.e,true);var F=this._setHeight(G.e,true);var H=(F-this._cache.height);var D=(I-this._cache.width);this.resize(G.e,F,I,H,D)},_handle_for_tr:function(F){var H=this._setWidth(F.e);var D=this._setHeight(F.e,true);var G=(D-this._cache.height);this.resize(F.e,D,H,G,0)},_handle_for_r:function(D){this._dds.r.setYConstraint(0,0);var F=this._setWidth(D.e);this.resize(D.e,0,F,0,0)},_handle_for_l:function(F){this._dds.l.setYConstraint(0,0);var G=this._setWidth(F.e,true);var D=(G-this._cache.width);this.resize(F.e,0,G,0,D)},_handle_for_b:function(F){this._dds.b.setXConstraint(0,0);var D=this._setHeight(F.e);this.resize(F.e,D,0,0,0)},_handle_for_t:function(F){this._dds.t.setXConstraint(0,0);var D=this._setHeight(F.e,true);var G=(D-this._cache.height);this.resize(F.e,D,0,G,0)},_setWidth:function(H,J){var I=this._cache.xy[0],G=this._cache.width,D=A.getPageX(H),F=(D-I);if(J){F=(I-D)+parseInt(this.get("width"),10)}F=this._snapTick(F,this.get("xTicks"));F=this._checkWidth(F);return F},_checkWidth:function(D){if(this.get("minWidth")){if(D<=this.get("minWidth")){D=this.get("minWidth")}}if(this.get("maxWidth")){if(D>=this.get("maxWidth")){D=this.get("maxWidth")}}return D},_checkHeight:function(D){if(this.get("minHeight")){if(D<=this.get("minHeight")){D=this.get("minHeight")}}if(this.get("maxHeight")){if(D>=this.get("maxHeight")){D=this.get("maxHeight")}}return D},_setHeight:function(G,I){var H=this._cache.xy[1],F=this._cache.height,J=A.getPageY(G),D=(J-H);if(I){D=(H-J)+parseInt(this.get("height"),10)}D=this._snapTick(D,this.get("yTicks"));D=this._checkHeight(D);return D},_snapTick:function(G,F){if(!G||!F){return G}var H=G;var D=G%F;if(D>0){if(D>(F/2)){H=G+(F-D)}else{H=G-D}}return H},init:function(H,F){this._locked=false;this._cache={xy:[],height:0,width:0,top:0,left:0,offsetHeight:0,offsetWidth:0,start:{height:0,width:0,top:0,left:0}};B.superclass.init.call(this,H,F);this.set("setSize",this.get("setSize"));if(F.height){this.set("height",parseInt(F.height,10))}else{var G=this.getStyle("height");if(G=="auto"){this.set("height",parseInt(this.get("element").offsetHeight,10))}}if(F.width){this.set("width",parseInt(F.width,10))}else{var D=this.getStyle("width");if(D=="auto"){this.set("width",parseInt(this.get("element").offsetWidth,10))}}var I=H;if(!C.isString(I)){I=E.generateId(I)}B._instances[I]=this;this._active=false;this._createWrap();this._createProxy();this._createHandles()},getProxyEl:function(){return this._proxy},getWrapEl:function(){return this._wrap},getStatusEl:function(){return this._status},getActiveHandleEl:function(){return this._handles[this._currentHandle]},isActive:function(){return((this._active)?true:false)},initAttributes:function(D){B.superclass.initAttributes.call(this,D);this.setAttributeConfig("useShim",{value:((D.useShim===true)?true:false),validator:YAHOO.lang.isBoolean,method:function(F){for(var G in this._dds){if(C.hasOwnProperty(this._dds,G)){this._dds[G].useShim=F}}if(this.dd){this.dd.useShim=F}}});this.setAttributeConfig("setSize",{value:((D.setSize===false)?false:true),validator:YAHOO.lang.isBoolean});this.setAttributeConfig("wrap",{writeOnce:true,validator:YAHOO.lang.isBoolean,value:D.wrap||false});this.setAttributeConfig("handles",{writeOnce:true,value:D.handles||["r","b","br"],validator:function(F){if(C.isString(F)&&F.toLowerCase()=="all"){F=["t","b","r","l","bl","br","tl","tr"]}if(!C.isArray(F)){F=F.replace(/, /g,",");F=F.split(",")}this._configs.handles.value=F}});this.setAttributeConfig("width",{value:D.width||parseInt(this.getStyle("width"),10),validator:YAHOO.lang.isNumber,method:function(F){F=parseInt(F,10);if(F>0){if(this.get("setSize")){this.setStyle("width",F+"px")}this._cache.width=F;this._configs.width.value=F}}});this.setAttributeConfig("height",{value:D.height||parseInt(this.getStyle("height"),10),validator:YAHOO.lang.isNumber,method:function(F){F=parseInt(F,10);if(F>0){if(this.get("setSize")){this.setStyle("height",F+"px")}this._cache.height=F;this._configs.height.value=F}}});this.setAttributeConfig("minWidth",{value:D.minWidth||15,validator:YAHOO.lang.isNumber});this.setAttributeConfig("minHeight",{value:D.minHeight||15,validator:YAHOO.lang.isNumber});this.setAttributeConfig("maxWidth",{value:D.maxWidth||10000,validator:YAHOO.lang.isNumber});this.setAttributeConfig("maxHeight",{value:D.maxHeight||10000,validator:YAHOO.lang.isNumber});this.setAttributeConfig("minY",{value:D.minY||false});this.setAttributeConfig("minX",{value:D.minX||false});this.setAttributeConfig("maxY",{value:D.maxY||false});this.setAttributeConfig("maxX",{value:D.maxX||false});this.setAttributeConfig("animate",{value:D.animate||false,validator:function(G){var F=true;if(!YAHOO.util.Anim){F=false}return F}});this.setAttributeConfig("animateEasing",{value:D.animateEasing||function(){var F=false;if(YAHOO.util.Easing&&YAHOO.util.Easing.easeOut){F=YAHOO.util.Easing.easeOut}return F}()});this.setAttributeConfig("animateDuration",{value:D.animateDuration||0.5});this.setAttributeConfig("proxy",{value:D.proxy||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("ratio",{value:D.ratio||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("ghost",{value:D.ghost||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("draggable",{value:D.draggable||false,validator:YAHOO.lang.isBoolean,method:function(F){if(F&&this._wrap){this._setupDragDrop()}else{if(this.dd){E.removeClass(this._wrap,this.CSS_DRAG);this.dd.unreg()}}}});this.setAttributeConfig("hover",{value:D.hover||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("hiddenHandles",{value:D.hiddenHandles||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("knobHandles",{value:D.knobHandles||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("xTicks",{value:D.xTicks||false});this.setAttributeConfig("yTicks",{value:D.yTicks||false});this.setAttributeConfig("status",{value:D.status||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("autoRatio",{value:D.autoRatio||false,validator:YAHOO.lang.isBoolean})},destroy:function(){for(var F in this._handles){if(C.hasOwnProperty(this._handles,F)){A.purgeElement(this._handles[F]);this._handles[F].parentNode.removeChild(this._handles[F])}}if(this._proxy){this._proxy.parentNode.removeChild(this._proxy)}if(this._status){this._status.parentNode.removeChild(this._status)}if(this.dd){this.dd.unreg();E.removeClass(this._wrap,this.CSS_DRAG)}if(this._wrap!=this.get("element")){this.setStyle("position","");this.setStyle("top","");this.setStyle("left","");this._wrap.parentNode.replaceChild(this.get("element"),this._wrap)}this.removeClass(this.CSS_RESIZE);delete YAHOO.util.Resize._instances[this.get("id")];for(var D in this){if(C.hasOwnProperty(this,D)){this[D]=null;delete this[D]}}},toString:function(){if(this.get){return"Resize (#"+this.get("id")+")"}return"Resize Utility"}});YAHOO.util.Resize=B})();YAHOO.register("resize",YAHOO.util.Resize,{version:"2.7.0",build:"1799"});BalloonConfig=function(balloon,set){set=set||'';if(!balloon.configured||set=='GBubble'||set=='GBox'){balloon.fontColor='black';balloon.fontFamily='Arial, sans-serif';balloon.fontSize='12pt';balloon.minWidth=100;balloon.maxWidth=400;balloon.delayTime=750;balloon.vOffset=10;balloon.hOffset=10;balloon.stem=true;balloon.images=i3GEO.configura.locaplic+'/pacotes/balloon-tooltips/htdocs/images/GBubble';balloon.ieImage='balloon_ie.png';balloon.balloonImage='balloon.png';balloon.upLeftStem='up_left.png';balloon.downLeftStem='down_left.png';balloon.upRightStem='up_right.png';balloon.downRightStem='down_right.png';balloon.closeButton='close.png';balloon.closeButtonWidth=16;balloon.allowAJAX=true;balloon.allowIframes=true;balloon.trackCursor=true;balloon.shadow=20;balloon.padding=10;balloon.stemHeight=32;balloon.stemOverlap=3;balloon.vOffset=1;balloon.hOffset=1;balloon.opacity=0.9;balloon.configured=set||true}switch(set){case('GBoxxxx'):balloon.bgColor='whitesmoke';balloon.borderStyle='2px solid gray';balloon.padding=5;balloon.shadow=0;balloon.stem=true;balloon.opacity=0.8;balloon.hOffset=1;balloon.vOffset=1;balloon.allowFade=false;break;case('GPlain'):balloon.padding=5;balloon.images=i3GEO.configura.locaplic+'/pacotes/balloon-tooltips/htdocs/images/GPlain';balloon.ieImage=null;balloon.shadow=0;balloon.stemHeight=15;balloon.stemOverlap=1;balloon.opacity=0.85;break;case('GFade'):balloon.allowFade=true;balloon.fadeIn=1000;balloon.faedOut=200;break}};var currentBalloonClass;var balloonIsVisible;var balloonIsSticky;var balloonInvisibleSelects;var balloonIsSuppressed;var tooltipIsSuppressed;var Balloon=function(){this.trackCursor=true;document.onmousemove=this.setActiveCoordinates;var myObject=this.isIE()?window:document;myObject.onscroll=function(){Balloon.prototype.nukeTooltip()};window.onbeforeunload=function(){Balloon.prototype.nukeTooltip();balloonIsSuppressed=true};if(this.isIE()){this.suppress=true}return this};Balloon.prototype.showTooltip=function(evt,caption,sticky,width,height,x,y){if(!this.configured){BalloonConfig(this,'GBubble')}this.stopTrackingX=this.trackCursor?100:10;this.stopTrackingY=this.trackCursor?50:10;if(this.isIE()&&document.readyState.match(/complete/i)){this.suppress=false}if(this.suppress||balloonIsSuppressed){return false}if(tooltipIsSuppressed&&!sticky){return false}if(this.opacity&&this.opacity<1){this.opacity=parseInt(parseFloat(this.opacity)*100)}else if(this.opacity&&this.opacity==1){this.opacity=100}else if(!this.opacity){this.opacity==100}if(this.isKonqueror()){this.allowFade=false;this.opacity=100}if(this.isIE()&&this.allowFade){this.opacity=100}var mouseOver=true;try{var mouseOver=evt.type.match('mouseover','i')}catch(e){}if(!mouseOver){sticky=true;this.fadeOK=false;if(balloonIsVisible){this.hideTooltip()}}else{this.fadeOK=this.allowFade}if(balloonIsVisible&&!balloonIsSticky&&mouseOver){return false}if(balloonIsVisible&&balloonIsSticky&&!sticky){return false}try{var el=this.getEventTarget(evt)}catch(e){var el=evt}if(sticky&&mouseOver&&this.isSameElement(el,this.currentElement)){return false}this.currentElement=el;this.elCoords=this.getLoc(el,'region');if(!sticky){var mouseoutFunc=el.onmouseout;var closeBalloon=function(){Balloon.prototype.hideTooltip();if(mouseoutFunc){mouseoutFunc()}};if(!mouseOver){el.onmouseup=function(){return false}}}balloonIsSticky=sticky;this.hideTooltip();this.currentHelpText=this.getAndCheckContents(caption);if(!this.currentHelpText){return false}this.width=width;this.height=height;this.actualWidth=null;this.x=x;this.y=y;this.hideTooltip();this.container=document.createElement('div');this.container.id='balloonPreloadContainer';document.body.appendChild(this.container);this.setStyle(this.container,'position','absolute');this.setStyle(this.container,'top',-8888);this.setStyle(this.container,'font-family',this.fontFamily);this.setStyle(this.container,'font-size',this.fontSize);this.currentHelpText=this.currentHelpText.replace(/\&amp;/g,'&amp;amp');this.container.innerHTML=unescape(this.currentHelpText);if(this.images){this.balloonImage=this.balloonImage?this.images+'/'+this.balloonImage:false;this.ieImage=this.ieImage?this.images+'/'+this.ieImage:false;this.upLeftStem=this.upLeftStem?this.images+'/'+this.upLeftStem:false;this.upRightStem=this.upRightStem?this.images+'/'+this.upRightStem:false;this.downLeftStem=this.downLeftStem?this.images+'/'+this.downLeftStem:false;this.downRightStem=this.downRightStem?this.images+'/'+this.downRightStem:false;this.closeButton=this.closeButton?this.images+'/'+this.closeButton:false;this.images=false}if(this.ieImage&&(this.isIE()||this.isChrome())){if(this.isOldIE()||this.opacity||this.allowFade){this.balloonImage=this.ieImage}}if(!this.preloadedImages){var images=[this.balloonImage,this.closeButton];if(this.ieImage){images.push(this.ieImage)}if(this.stem){images.push(this.upLeftStem,this.upRightStem,this.downLeftStem,this.downRightStem)}var len=images.length;for(var i=0;i<len;i++){if(images[i]){this.preload(images[i])}}this.preloadedImages=true}currentBalloonClass=this;if(!mouseOver)el.onmouseup=function(){return false};this.currentEvent=evt;evt.cancelBubble=true;this.setActiveCoordinates([]);this.doShowTooltip();this.pending=true};Balloon.prototype.preload=function(src){var i=new Image;i.src=src;this.setStyle(i,'position','absolute');this.setStyle(i,'top',-8000);document.body.appendChild(i);document.body.removeChild(i)};Balloon.prototype.doShowTooltip=function(){var self=currentBalloonClass;if(balloonIsVisible){return false}if(!self.parent){if(self.parentID){self.parent=document.getElementById(self.parentID)}else{self.parent=document.body}self.xOffset=self.getLoc(self.parent,'x1');self.yOffset=self.getLoc(self.parent,'y1')}window.clearTimeout(self.timeoutFade);if(!balloonIsSticky){self.setStyle('visibleBalloonElement','display','none')}self.parseIntAll();var balloon=self.makeBalloon();var pageWidth=YAHOO.util.Dom.getViewportWidth();var pageCen=Math.round(pageWidth/2);var pageHeight=YAHOO.util.Dom.getViewportHeight();var pageLeft=YAHOO.util.Dom.getDocumentScrollLeft();var pageTop=YAHOO.util.Dom.getDocumentScrollTop();var pageMid=pageTop+Math.round(pageHeight/2);self.pageBottom=pageTop+pageHeight;self.pageTop=pageTop;self.pageLeft=pageLeft;self.pageRight=pageLeft+pageWidth;var vOrient=self.activeTop>pageMid?'up':'down';var hOrient=self.activeRight>pageCen?'left':'right';var helpText=self.container.innerHTML;self.actualWidth=self.getLoc(self.container,'width');if(!isNaN(self.actualWidth)){self.actualWidth+=10}self.parent.removeChild(self.container);var wrapper=document.createElement('div');wrapper.id='contentWrapper';self.contents.appendChild(wrapper);wrapper.innerHTML=helpText;self.setBalloonStyle(vOrient,hOrient,pageWidth,pageLeft);if(balloonIsSticky){self.addCloseButton()}balloonIsVisible=true;self.pending=false;self.showHide();self.startX=self.activeLeft;self.startY=self.activeTop;self.fade(0,self.opacity,self.fadeIn)};Balloon.prototype.addCloseButton=function(){var self=currentBalloonClass;var margin=Math.round(self.padding/2);var closeWidth=self.closeButtonWidth||16;var balloonTop=self.getLoc('visibleBalloonElement','y1')+margin+self.shadow;var BalloonLeft=self.getLoc('topRight','x2')-self.closeButtonWidth-self.shadow-margin;var closeButton=document.getElementById('closeButton');if(!closeButton){closeButton=new Image;closeButton.setAttribute('id','closeButton');closeButton.setAttribute('src',self.closeButton);closeButton.onclick=function(){Balloon.prototype.nukeTooltip();var temp=$i('marcaIdentifica');if(temp){temp.parentNode.removeChild(temp)}};self.setStyle(closeButton,'position','absolute');document.body.appendChild(closeButton)}if(self.isIE()){BalloonLeft=BalloonLeft-5}self.setStyle(closeButton,'top',balloonTop);self.setStyle(closeButton,'left',BalloonLeft);self.setStyle(closeButton,'display','inline');self.setStyle(closeButton,'cursor','pointer');self.setStyle(closeButton,'z-index',999999999)};Balloon.prototype.makeBalloon=function(){var self=currentBalloonClass;var balloon=document.getElementById('visibleBalloonElement');if(balloon){self.hideTooltip()}balloon=document.createElement('div');balloon.setAttribute('id','visibleBalloonElement');self.parent.appendChild(balloon);self.activeBalloon=balloon;self.parts=new Array();var parts=new Array('contents','topRight','bottomRight','bottomLeft');for(var i=0;i<parts.length;i++){var child=document.createElement('div');child.setAttribute('id',parts[i]);balloon.appendChild(child);if(parts[i]=='contents')self.contents=child;self.parts.push(child)}if(self.displayTime){self.timeoutAutoClose=window.setTimeout(this.hideTooltip,self.displayTime)}return balloon};Balloon.prototype.setBalloonStyle=function(vOrient,hOrient,pageWidth,pageLeft){var self=currentBalloonClass;var balloon=self.activeBalloon;if(typeof(self.shadow)!='number')self.shadow=0;if(!self.stem)self.stemHeight=0;var fullPadding=self.padding+self.shadow;var insidePadding=self.padding;var outerWidth=self.actualWidth+fullPadding;var innerWidth=self.actualWidth;self.setStyle(balloon,'position','absolute');self.setStyle(balloon,'top',-9999);self.setStyle(balloon,'z-index',1000000);if(self.height){self.setStyle('contentWrapper','height',self.height-fullPadding)}if(self.width){self.setStyle(balloon,'width',self.width);innerWidth=self.width-fullPadding;if(balloonIsSticky){innerWidth-=self.closeButtonWidth}self.setStyle('contentWrapper','width',innerWidth)}else{self.setStyle(balloon,'width',outerWidth);self.setStyle('contentWrapper','width',innerWidth)}if(!self.width&&self.maxWidth&&outerWidth>self.maxWidth){self.setStyle(balloon,'width',self.maxWidth);self.setStyle('contentWrapper','width',self.maxWidth-fullPadding)}if(!self.width&&self.minWidth&&outerWidth<self.minWidth){self.setStyle(balloon,'width',self.minWidth);self.setStyle('contentWrapper','width',self.minWidth-fullPadding)}self.setStyle('contents','z-index',2);self.setStyle('contents','color',self.fontColor);self.setStyle('contents','font-family',self.fontFamily);self.setStyle('contents','font-size',self.fontSize);self.setStyle('contents','background','url('+self.balloonImage+') top left no-repeat');self.setStyle('contents','padding-top',fullPadding);self.setStyle('contents','padding-left',fullPadding);self.setStyle('bottomRight','background','url('+self.balloonImage+') bottom right no-repeat');self.setStyle('bottomRight','position','absolute');self.setStyle('bottomRight','right',0-fullPadding);self.setStyle('bottomRight','bottom',0-fullPadding);self.setStyle('bottomRight','height',fullPadding);self.setStyle('bottomRight','width',fullPadding);self.setStyle('bottomRight','z-index',-1);self.setStyle('topRight','background','url('+self.balloonImage+') top right no-repeat');self.setStyle('topRight','position','absolute');self.setStyle('topRight','right',0-fullPadding);self.setStyle('topRight','top',0);self.setStyle('topRight','width',fullPadding);self.setStyle('bottomLeft','background','url('+self.balloonImage+') bottom left no-repeat');self.setStyle('bottomLeft','position','absolute');self.setStyle('bottomLeft','left',0);self.setStyle('bottomLeft','bottom',0-fullPadding);self.setStyle('bottomLeft','height',fullPadding);self.setStyle('bottomLeft','z-index',-1);if(this.stem){var stem=document.createElement('img');stem.style.zIndex=50000;self.setStyle(stem,'position','absolute');balloon.appendChild(stem);if(vOrient=='up'&&hOrient=='left'){stem.src=self.upLeftStem;var height=self.stemHeight+insidePadding-self.stemOverlap;self.setStyle(stem,'bottom',0-height);self.setStyle(stem,'right',0)}else if(vOrient=='down'&&hOrient=='left'){stem.src=self.downLeftStem;var height=self.stemHeight-(self.shadow+self.stemOverlap);self.setStyle(stem,'top',0-height);self.setStyle(stem,'right',0)}else if(vOrient=='up'&&hOrient=='right'){stem.src=self.upRightStem;var height=self.stemHeight+insidePadding-self.stemOverlap;self.setStyle(stem,'bottom',0-height);self.setStyle(stem,'left',self.shadow)}else if(vOrient=='down'&&hOrient=='right'){stem.src=self.downRightStem;var height=self.stemHeight-(self.shadow+self.stemOverlap);self.setStyle(stem,'top',0-height);self.setStyle(stem,'left',self.shadow)}if(self.fadeOK&&self.isIE()){self.parts.push(stem)}}if(self.allowFade){self.setOpacity(1)}else if(self.opacity){self.setOpacity(self.opacity)}if(hOrient=='left'){var pageWidth=self.pageRight-self.pageLeft;var activeRight=pageWidth-self.activeLeft;self.setStyle(balloon,'right',activeRight)}else{var activeLeft=self.activeRight-self.xOffset;self.setStyle(balloon,'left',activeLeft)}var overflow=balloonIsSticky?'auto':'hidden';self.setStyle('contentWrapper','overflow',overflow);if(balloonIsSticky){self.setStyle('contentWrapper','margin-right',self.closeButtonWidth)}var balloonLeft=self.getLoc(balloon,'x1');var balloonRight=self.getLoc(balloon,'x2');var scrollBar=20;if(hOrient=='right'&&balloonRight>(self.pageRight-fullPadding)){var width=(self.pageRight-balloonLeft)-fullPadding-scrollBar;self.setStyle(balloon,'width',width);self.setStyle('contentWrapper','width',width-fullPadding)}else if(hOrient=='left'&&balloonLeft<(self.pageLeft+fullPadding)){var width=(balloonRight-self.pageLeft)-fullPadding;self.setStyle(balloon,'width',width);self.setStyle('contentWrapper','width',width-fullPadding)}var balloonWidth=self.getLoc(balloon,'width');var balloonHeight=self.getLoc(balloon,'height');var vOverlap=self.isOverlap('topRight','bottomRight');var hOverlap=self.isOverlap('bottomLeft','bottomRight');if(vOverlap){self.setStyle('topRight','height',balloonHeight-vOverlap[1])}if(hOverlap){self.setStyle('bottomLeft','width',balloonWidth-hOverlap[0])}if(vOrient=='up'){var activeTop=self.activeTop-balloonHeight;self.setStyle(balloon,'top',activeTop)}else{var activeTop=self.activeBottom;self.setStyle(balloon,'top',activeTop)}var balloonTop=self.getLoc(balloon,'y1');var balloonBottom=self.height?balloonTop+self.height:self.getLoc(balloon,'y2');var deltaTop=balloonTop<self.pageTop?self.pageTop-balloonTop:0;var deltaBottom=balloonBottom>self.pageBottom?balloonBottom-self.pageBottom:0;if(vOrient=='up'&&deltaTop){var newHeight=balloonHeight-deltaTop;if(newHeight>(self.padding*2)){self.setStyle('contentWrapper','height',newHeight-fullPadding);self.setStyle(balloon,'top',self.pageTop+self.padding);self.setStyle(balloon,'height',newHeight)}}if(vOrient=='down'&&deltaBottom){var newHeight=balloonHeight-deltaBottom-scrollBar;if(newHeight>(self.padding*2)+scrollBar){self.setStyle('contentWrapper','height',newHeight-fullPadding);self.setStyle(balloon,'height',newHeight)}}var iframe=balloon.getElementsByTagName('iframe');if(iframe[0]){iframe=iframe[0];var w=self.getLoc('contentWrapper','width');if(balloonIsSticky&&!this.isIE()){w-=self.closeButtonWidth}var h=self.getLoc('contentWrapper','height');self.setStyle(iframe,'width',w);self.setStyle(iframe,'height',h);self.setStyle('contentWrapper','overflow','hidden')}self.setStyle('topRight','height',self.getLoc(balloon,'height'));self.setStyle('bottomLeft','width',self.getLoc(balloon,'width'));self.hOrient=hOrient;self.vOrient=vOrient};Balloon.prototype.fade=function(opacStart,opacEnd,millisec){var self=currentBalloonClass||new Balloon;if(!millisec||!self.allowFade){return false}opacEnd=opacEnd||100;var speed=Math.round(millisec/100);var timer=0;for(o=opacStart;o<=opacEnd;o++){self.timeoutFade=setTimeout('Balloon.prototype.setOpacity('+o+')',(timer*speed));timer++}};Balloon.prototype.setOpacity=function(opc){var self=currentBalloonClass;if(!self||!opc)return false;var o=parseFloat(opc/100);var parts=self.isIE()?self.parts:[self.activeBalloon];var len=parts.length;for(var i=0;i<len;i++){self.doOpacity(o,opc,parts[i])}};Balloon.prototype.doOpacity=function(op,opc,el){var self=currentBalloonClass;if(!el)return false;self.setStyle(el,'opacity',op);self.setStyle(el,'filter','alpha(opacity='+opc+')');self.setStyle(el,'MozOpacity',op);self.setStyle(el,'KhtmlOpacity',op)};Balloon.prototype.nukeTooltip=function(){this.hideTooltip(1)};Balloon.prototype.hideTooltip=function(override){if(override&&typeof override=='object')override=false;if(balloonIsSticky&&!override)return false;var self=currentBalloonClass;Balloon.prototype.showHide(1);Balloon.prototype.cleanup();if(self){window.clearTimeout(self.timeoutTooltip);window.clearTimeout(self.timeoutFade);window.clearTimeout(self.timeoutAutoClose);if(balloonIsSticky){self.currentElement=null}self.startX=0;self.startY=0}balloonIsVisible=false;balloonIsSticky=false};Balloon.prototype.cleanup=function(){var self=currentBalloonClass;var body;if(self){body=self.parent?self.parent:self.parentID?document.getElementById(self.parentID)||document.body:document.body}else{body=document.body}var bubble=document.getElementById('visibleBalloonElement');var close=document.getElementById('closeButton');var cont=document.getElementById('balloonPreloadContainer');if(bubble){body.removeChild(bubble)}if(close){body.removeChild(close)}if(cont){body.removeChild(cont)}};hideAllTooltips=function(){var self=currentBalloonClass;if(!self)return;window.clearTimeout(self.timeoutTooltip);if(self.activeBalloon)self.setStyle(self.activeBalloon,'display','none');balloonIsVisible=false;balloonIsSticky=false;currentBalloonClass=null};Balloon.prototype.setActiveCoordinates=function(evt){var self=currentBalloonClass;if(!self){return true}var evt=evt||window.event||self.currentEvent;if(!evt){return true}self.currentEvent={};for(var i in evt){self.currentEvent[i]=evt[i]}self.hOffset=self.hOffset||1;self.vOffset=self.vOffset||1;self.stemHeight=self.stem&&self.stemHeight?(self.stemHeight||0):0;var scrollTop=0;var scrollLeft=0;var XY=[self.x,self.y];adjustment=self.hOffset<20?10:0;self.activeTop=scrollTop+XY[1]-adjustment-self.vOffset-self.stemHeight;self.activeLeft=scrollLeft+XY[0]-adjustment-self.hOffset;self.activeRight=scrollLeft+XY[0];self.activeBottom=scrollTop+XY[1]+self.vOffset+2*adjustment;if(balloonIsVisible&&!balloonIsSticky){var deltaX=Math.abs(self.activeLeft-self.startX);var deltaY=Math.abs(self.activeTop-self.startY);if(XY[0]<self.elCoords.left||XY[0]>self.elCoords.right||XY[1]<self.elCoords.top||XY[1]>self.elCoords.bottom){}if(deltaX>self.stopTrackingX||deltaY>self.stopTrackingY){}else if(self.trackCursor){var b=self.activeBalloon;var bwidth=self.getLoc(b,'width');var bheight=self.getLoc(b,'height');var btop=self.getLoc(b,'y1');var bleft=self.getLoc(b,'x1');if(self.hOrient=='right'){self.setStyle(b,'left',self.activeRight)}else if(self.hOrient=='left'){self.setStyle(b,'right',null);var newLeft=self.activeLeft-bwidth;self.setStyle(b,'left',newLeft)}if(self.vOrient=='up'){self.setStyle(b,'top',self.activeTop-bheight)}else if(self.vOrient=='down'){self.setStyle(b,'top',self.activeBottom)}}}return true};Balloon.prototype.eventXY=function(event){var XY=new Array(2);var e=event||window.event;if(!e){return false}if(e.pageX||e.pageY){XY[0]=e.pageX;XY[1]=e.pageY;return XY}else if(e.clientX||e.clientY){XY[0]=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;XY[1]=e.clientY+document.body.scrollTop+document.documentElement.scrollTop;return XY}};Balloon.prototype.getEventTarget=function(event){var targ;var e=event||window.event;if(e.target)targ=e.target;else if(e.srcElement)targ=e.srcElement;if(targ.nodeType==3)targ=targ.parentNode;return targ};Balloon.prototype.setStyle=function(el,att,val){if(!el){return false}if(typeof(el)!='object'){el=document.getElementById(el)}if(!el){return false}var v=val;if(val&&att.match(/left|top|bottom|right|width|height|padding|margin/)){val=new String(val);if(!val.match(/auto/)){val+='px'}}if(att=='z-index'){if(el.style){el.style.zIndex=parseInt(val)}}else{if(this.isIE()&&att.match(/^left|right|top|bottom$/)&&!parseInt(val)&&val!=0){val=null}YAHOO.util.Dom.setStyle(el,att,val)}};Balloon.prototype.getLoc=function(el,request){var region=YAHOO.util.Dom.getRegion(el);switch(request){case('y1'):return parseInt(region.top);case('y2'):return parseInt(region.bottom);case('x1'):return parseInt(region.left);case('x2'):return parseInt(region.right);case('width'):return(parseInt(region.right)-parseInt(region.left));case('height'):return(parseInt(region.bottom)-parseInt(region.top));case('region'):return region}return region};Balloon.prototype.parseIntAll=function(){this.padding=parseInt(this.padding);this.shadow=parseInt(this.shadow);this.stemHeight=parseInt(this.stemHeight);this.stemOverlap=parseInt(this.stemOverlap);this.vOffset=parseInt(this.vOffset);this.delayTime=parseInt(this.delayTime);this.width=parseInt(this.width);this.maxWidth=parseInt(this.maxWidth);this.minWidth=parseInt(this.minWidth);this.fadeIn=parseInt(this.fadeIn)||1000};Balloon.prototype.showHide=function(visible){var self=currentBalloonClass||new Balloon;if(self.isOldIE()){var balloonContents=document.getElementById('contentWrapper');if(!visible&&balloonContents){var balloonSelects=balloonContents.getElementsByTagName('select');var myHash=new Object();for(var i=0;i<balloonSelects.length;i++){var id=balloonSelects[i].id||balloonSelects[i].name;myHash[id]=1}balloonInvisibleSelects=new Array();var allSelects=document.getElementsByTagName('select');for(var i=0;i<allSelects.length;i++){var id=allSelects[i].id||allSelects[i].name;if(self.isOverlap(allSelects[i],self.activeBalloon)&&!myHash[id]){balloonInvisibleSelects.push(allSelects[i]);self.setStyle(allSelects[i],'visibility','hidden')}}}else if(balloonInvisibleSelects){for(var i=0;i<balloonInvisibleSelects.length;i++){var id=balloonInvisibleSelects[i].id||balloonInvisibleSelects[i].name;self.setStyle(balloonInvisibleSelects[i],'visibility','visible')}balloonInvisibleSelects=null}}if(self.hide){var display=visible?'inline':'none';for(var n=0;n<self.hide.length;n++){if(self.isOverlap(self.activeBalloon,self.hide[n])){self.setStyle(self.hide[n],'display',display)}}}};Balloon.prototype.isOverlap=function(el1,el2){if(!el1||!el2)return false;var R1=this.getLoc(el1,'region');var R2=this.getLoc(el2,'region');if(!R1||!R2)return false;var intersect=R1.intersect(R2);if(intersect){intersect=new Array((intersect.right-intersect.left),(intersect.bottom-intersect.top))}return intersect};Balloon.prototype.isSameElement=function(el1,el2){if(!el1||!el2)return false;var R1=this.getLoc(el1,'region');var R2=this.getLoc(el2,'region');var same=R1.contains(R2)&&R2.contains(R1);return same?true:false};Balloon.prototype.getAndCheckContents=function(caption){this.currentHelpText=this.getContents(caption);this.loadedFromElement=false;return this.currentHelpText};Balloon.prototype.getContents=function(section){if(!this.helpUrl&&!this.activeUrl)return section;if(this.loadedFromElement)return section;var url=this.activeUrl||this.helpUrl;url+=this.activeUrl?'':'?section='+section;this.activeUrl=null;var ajax;if(window.XMLHttpRequest){ajax=new XMLHttpRequest()}else{ajax=new ActiveXObject("Microsoft.XMLHTTP")}if(ajax){ajax.open("GET",url,false);ajax.onreadystatechange=function(){};try{ajax.send(null)}catch(e){}var txt=this.escapeHTML?escape(ajax.responseText):ajax.responseText;return txt||section}else{return section}};Balloon.prototype.isIE=function(){return document.all&&!window.opera};Balloon.prototype.isOldIE=function(){if(navigator.appVersion.indexOf("MSIE")==-1)return false;var temp=navigator.appVersion.split("MSIE");return parseFloat(temp[1])<7};Balloon.prototype.isKonqueror=function(){return navigator.userAgent.toLowerCase().indexOf('konqueror')!=-1};Balloon.prototype.isChrome=function(){return navigator.userAgent.toLowerCase().indexOf('chrome')>-1};i3GEO={parametros:{mapexten:"",mapscale:"",mapres:"",pixelsize:"",mapfile:"",cgi:"",extentTotal:"",mapimagem:"",geoip:"",listavisual:"",utilizacgi:"",versaoms:"",versaomscompleta:"",mensagens:"",w:"",h:"",locsistemas:"",locidentifica:"",r:"",locmapas:"",celularef:"",kmlurl:"",mensageminicia:"",interfacePadrao:"geral.htm",embedLegenda:"nao",autenticadoopenid:"nao"},finaliza:"",temaAtivo:"",contadorAtualiza:0,cria:function(){var temp,i,tamanho;if(window.location.href.split("?")[1]){i3GEO.configura.sid=window.location.href.split("?")[1];if(i3GEO.configura.sid.split("#")[0]){i3GEO.configura.sid=i3GEO.configura.sid.split("#")[0]}}else{i3GEO.configura.sid=""}if(i3GEO.Interface.ALTTABLET!=""){if(i3GEO.util.detectaTablet()){return}}if(!i3GEO.configura.locaplic||i3GEO.configura.locaplic===""){i3GEO.util.localizai3GEO()}tamanho=i3GEO.calculaTamanho();i3GEO.Interface.cria(tamanho[0],tamanho[1]);if(tamanho[0]<550){i=$i(i3GEO.gadgets.PARAMETROS.mostraQuadros.idhtml);if(i){i.style.display="none"}}},inicia:function(retorno){var montaMapa,mashup,tamanho;if(typeof("i3GEOmantemCompatibilidade")==='function'){i3GEOmantemCompatibilidade()}montaMapa=function(retorno){try{var tempo,titulo,temp,abreJM;if(retorno===""){alert("Ocorreu um erro no mapa - montaMapa");retorno={data:{erro:"erro"}}}if(retorno.data.erro){document.body.style.backgroundColor="white";document.body.innerHTML="<br>Para abrir o i3Geo utilize o link:<br><a href="+i3GEO.configura.locaplic+"/ms_criamapa.php >"+i3GEO.configura.locaplic+"/ms_criamapa.php</a>";return("linkquebrado")}else{if(retorno.data.variaveis){i3GEO.parametros=retorno.data.variaveis;i3GEO.parametros.mapscale=i3GEO.parametros.mapscale*1;i3GEO.parametros.mapres=i3GEO.parametros.mapres*1;i3GEO.parametros.pixelsize=i3GEO.parametros.pixelsize*1;i3GEO.parametros.w=i3GEO.parametros.w*1;i3GEO.parametros.h=i3GEO.parametros.h*1;i3GEO.arvoreDeCamadas.CAMADAS=retorno.data.temas;if(retorno.data.variaveis.navegacaoDir.toLowerCase()==="sim"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir=true}if(i3GEO.Interface.ATUAL==="padrao"){i3GEO.atualiza(retorno)}temp=0;if($i("contemFerramentas")){temp=temp+parseInt($i("contemFerramentas").style.width,10)}if($i("ferramentas")){temp=temp+parseInt($i("ferramentas").style.width,10)}if($i("mst")){$i("mst").style.width=i3GEO.parametros.w+temp+"px"}i3GEO.Interface.inicia()}else{alert("Erro. Impossivel criar o mapa "+retorno.data);return}if($i("ajuda")){i3GEO.ajuda.DIVAJUDA="ajuda"}abreJM="sim";if(i3GEO.util.pegaCookie("botoesAjuda")){abreJM=i3GEO.util.pegaCookie("botoesAjuda");i3GEO.barraDeBotoes.AJUDA=(abreJM==="sim")?true:false}abreJM="sim";if(i3GEO.util.pegaCookie("g_janelaMen")){abreJM=i3GEO.util.pegaCookie("g_janelaMen");i3GEO.configura.iniciaJanelaMensagens=(abreJM==="sim")?true:false}if(i3GEO.configura.iniciaJanelaMensagens===true){i3GEO.ajuda.abreJanela()}if(i3GEO.configura.liberaGuias.toLowerCase()==="sim"){i3GEO.guias.libera()}}if($i("mst")){$i("mst").style.visibility="visible"}}catch(e){alert(e)}};if(!$i("i3geo")){document.body.id="i3geo"}$i("i3geo").className="yui-skin-sam";if(i3GEO.configura.sid===""){mashup=function(retorno){i3GEO.configura.sid=retorno.data;i3GEO.inicia(retorno)};if(i3GEO.Interface.ATUAL!=="padrao"){i3GEO.configura.mashuppar+="&interface="+i3GEO.Interface.ATUAL}i3GEO.php.criamapa(mashup,i3GEO.configura.mashuppar)}else{if(i3GEO.parametros.w===""||i3GEO.parametros.h===""){tamanho=i3GEO.calculaTamanho();i3GEO.parametros.w=tamanho[0];i3GEO.parametros.h=tamanho[1]}i3GEO.php.inicia(montaMapa,i3GEO.configura.embedLegenda,i3GEO.parametros.w,i3GEO.parametros.h)}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.janela.fechaAguarde()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.janela.fechaAguarde()")}if(i3GEO.mapa.AUTORESIZE===true){i3GEO.mapa.ativaAutoResize()}eval(i3GEO.finaliza)},atualiza:function(retorno){var corpoMapa,erro,tempo,mapscale,mapexten,temp;if(i3GEO.contadorAtualiza>1){i3GEO.contadorAtualiza--;return}if(i3GEO.contadorAtualiza>0){i3GEO.contadorAtualiza--}i3GEO.contadorAtualiza++;corpoMapa=function(){if($i("ajaxCorpoMapa")){return}i3GEO.janela.abreAguarde("ajaxCorpoMapa",$trad("o1")+" atualizando...");i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem)};if(arguments.length===0){i3GEO.janela.fechaAguarde("ajaxCorpoMapa");corpoMapa.call();return}if(retorno===""){corpoMapa.call();return}if(!retorno.data){alert(retorno);i3GEO.mapa.recupera.inicia();return}try{if(retorno.data==="erro"){alert("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia();return}else if(retorno.data==="ok"||retorno.data===""){corpoMapa.call();return}}catch(e){}erro=function(){var legimagem,c;legimagem="";c=confirm("Ocorreu um erro, quer tentar novamente?");if(c){corpoMapa.call()}else{i3GEO.janela.fechaAguarde()}return};if(arguments.length===0||retorno===""||retorno.data.variaveis===undefined){erro.call();return}else{if(arguments.length===0){return}i3GEO.mapa.verifica(retorno);tempo="";if(i3GEO.desenho.richdraw){i3GEO.desenho.richdraw.clearWorkspace()}mapscale=i3GEO.parametros.mapscale;i3GEO.atualizaParametros(retorno.data.variaveis);if(retorno.data.variaveis.erro!==""){alert(retorno.data.variaveis.erro)}try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas);if(i3GEO.parametros.mapscale!==mapscale){i3GEO.arvoreDeCamadas.atualizaFarol(i3GEO.parametros.mapscale)}}catch(e){}i3GEO.arvoreDeCamadas.CAMADAS=retorno.data.temas;i3GEO.Interface.redesenha();if($i("i3GEOidentificalistaTemas")){g_tipoacao="identifica";g_operacao='identifica'}else{g_operacao=""}if($i("mensagemt")){$i("mensagemt").value=i3GEO.parametros.mapexten}i3GEO.eventos.navegaMapa();if(i3GEO.configura.entorno.toLowerCase()==="sim"){i3GEO.navega.entorno.geraURL();i3GEO.navega.entorno.ajustaPosicao()}i3GEO.ajuda.mostraJanela("Tempo de redesenho em segundos: "+retorno.data.variaveis.tempo,"");temp=i3GEO.arvoreDeCamadas.verificaAplicaExtensao();if(temp!==""){i3GEO.tema.zoom(temp)}}},calculaTamanho:function(){var diminuix,diminuiy,menos,novow,novoh,w,h,temp;diminuix=(navm)?i3GEO.configura.diminuixM:i3GEO.configura.diminuixN;diminuiy=(navm)?i3GEO.configura.diminuiyM:i3GEO.configura.diminuiyN;menos=0;temp=$i("contemFerramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("contemFerramentas").style.width,10)}temp=$i("ferramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("ferramentas").style.width,10)}if(i3GEO.configura.autotamanho===true){if(window.top===window.self){window.resizeTo(screen.availWidth,screen.availHeight);window.moveTo(0,0)}}novow=YAHOO.util.Dom.getDocumentWidth()-i3GEO.util.getScrollerWidth();novoh=YAHOO.util.Dom.getDocumentHeight();document.body.style.width=novow;document.body.style.height=novoh;w=novow-menos-diminuix;h=novoh-diminuiy;temp=$i("corpoMapa");if(temp){if(temp.style){if(temp.style.width){w=parseInt(temp.style.width,10);h=parseInt(temp.style.width,10);i3GEO.parametros.w=w}if(temp.style.height){h=parseInt(temp.style.height,10);i3GEO.parametros.h=h}}}temp=$i("contemImg");if(temp){temp.style.height=h+"px";temp.style.width=w+"px"}return[w,h]},reCalculaTamanho:function(){var diminuix,diminuiy,menos,novow,novoh,w,h,temp,temp1,antigoh=i3GEO.parametros.h,antigow=i3GEO.parametros.w;diminuix=(navm)?i3GEO.configura.diminuixM:i3GEO.configura.diminuixN;diminuiy=(navm)?i3GEO.configura.diminuiyM:i3GEO.configura.diminuiyN;menos=0;temp=$i("contemFerramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("contemFerramentas").style.width,10)}temp=$i("ferramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("ferramentas").style.width,10)}document.body.style.width="100%";temp=i3GEO.util.tamanhoBrowser();novow=temp[0];novoh=temp[1];temp=(antigoh-(novoh-diminuiy));temp1=(antigow-(novow-diminuix));document.body.style.height=novoh;w=novow-menos-diminuix;h=novoh-diminuiy;temp=$i(i3GEO.Interface.IDMAPA);if(temp){temp.style.height=h+"px";temp.style.width=w+"px";YAHOO.util.Event.addListener(temp,"click",YAHOO.util.Event.stopEvent);YAHOO.util.Event.addFocusListener(temp,YAHOO.util.Event.preventDefault)}temp=$i(i3GEO.Interface.IDCORPO);if(temp){temp.style.height=h+"px";temp.style.width=w+"px";YAHOO.util.Event.addListener(temp,"click",YAHOO.util.Event.stopEvent);YAHOO.util.Event.addFocusListener(temp,YAHOO.util.Event.preventDefault)}temp=$i("mst");if(temp){temp.style.width="100%"}i3GEO.parametros.w=w;i3GEO.parametros.h=h;i3GEO.php.mudatamanho(i3GEO.atualiza,h,w);switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);break;case"googleearth":i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);break;case"openlayers":i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);i3geoOL.updateSize();break}if(i3GEO.guias.TIPO==="sanfona"){i3GEO.guias.ALTURACORPOGUIAS=h-(antigoh-i3GEO.guias.ALTURACORPOGUIAS)}else{i3GEO.guias.ALTURACORPOGUIAS=h}return[w,h]},atualizaParametros:function(variaveis){i3GEO.parametros.mapscale=variaveis.mapscale*1;i3GEO.parametros.mapres=variaveis.mapres*1;i3GEO.parametros.pixelsize=variaveis.pixelsize*1;i3GEO.parametros.mapexten=variaveis.mapexten;i3GEO.parametros.mapimagem=variaveis.mapimagem;i3GEO.parametros.w=variaveis.w*1;i3GEO.parametros.h=variaveis.h*1;i3GEO.parametros.mappath=variaveis.mappath;i3GEO.parametros.mapurl=variaveis.mapurl}};i3GEOF=[];if(typeof(i3GEO)==='undefined'){i3GEO=[]}navm=false;navn=false;chro=navigator.userAgent.toLowerCase().indexOf('chrome')>-1;opera=navigator.userAgent.toLowerCase().indexOf('opera')>-1;if(navigator.appName.substring(0,1)==='N'){navn=true}if(navigator.appName.substring(0,1)==='M'){navm=true}if(opera===true){navn=true}g_operacao="";g_tipoacao="zoomli";$i=function(id){return document.getElementById(id)};Array.prototype.remove=function(s){try{var n=this.length,i;for(i=0;i<n;i++){if(this[i]==s){this.splice(i,1)}}}catch(e){}};i3GEO.util={PINS:[],BOXES:[],escapeURL:function(sUrl){var re;sUrl=escape(sUrl);re=new RegExp("%3F","g");sUrl=sUrl.replace(re,'?');re=new RegExp("%3D","g");sUrl=sUrl.replace(re,'=');re=new RegExp("%26","g");sUrl=sUrl.replace(re,'&');return sUrl},insereCookie:function(nome,valor){var exdate=new Date();exdate.setDate(exdate.getDate()+10);document.cookie=nome+"="+valor+"; expires="+exdate.toUTCString()+";path=/"},pegaCookie:function(nome){var cookies,i,fim;cookies=document.cookie;i=cookies.indexOf(nome);if(i===-1){return null}fim=cookies.indexOf(";",i);if(fim===-1){fim=cookies.length}return(unescape(cookies.substring(i,fim))).split("=")[1]},listaChaves:function(obj){var keys,key;keys=[];for(key in obj){if(obj[key]){keys.push(key)}}return keys},criaBotaoAplicar:function(nomeFuncao,titulo,classe,obj){try{if(typeof(tempoBotaoAplicar)!=='undefined'){clearTimeout(tempoBotaoAplicar)}}catch(e){}var executar=new Function(nomeFuncao+"().call;clearTimeout(tempoBotaoAplicar);"),novoel,xy;tempoBotaoAplicar=setTimeout(executar,(i3GEO.configura.tempoAplicar));if(arguments.length===1){titulo="Aplicar"}if(arguments.length===1||arguments.length===2){classe="i3geoBotaoAplicar"}if(!document.getElementById("i3geo_aplicar")){novoel=document.createElement("input");novoel.id='i3geo_aplicar';novoel.type='button';novoel.value=titulo;novoel.style.cursor="pointer";novoel.style.fontSize="10px";novoel.style.zIndex=15000;novoel.style.position="absolute";novoel.style.display="none";novoel.onmouseover=function(){this.style.display="block"};novoel.onmouseout=function(){this.style.display="none"};novoel.className=classe;document.body.appendChild(novoel)}else{novoel=document.getElementById("i3geo_aplicar")}novoel.onclick=function(){clearTimeout(i3GEO.parametros.tempo);i3GEO.parametros.tempo="";this.style.display='none';eval(nomeFuncao+"\(\)")};if(arguments.length===4){novoel.style.display="block";xy=YAHOO.util.Dom.getXY(obj);YAHOO.util.Dom.setXY(novoel,xy)}return(novoel)},arvore:function(titulo,onde,obj){var arvore,root,tempNode,currentIconMode,d,c,i,linha,conteudo,j,temaNode;if(!$i(onde)){return}try{arvore=new YAHOO.widget.TreeView(onde);root=arvore.getRoot();tempNode=new YAHOO.widget.TextNode('',root,false);tempNode.isLeaf=false;tempNode.enableHighlight=false}catch(e){}titulo="<table><tr><td><b>"+titulo+"</b></td><td></td></tr></table>";d={html:titulo};tempNode=new YAHOO.widget.HTMLNode(d,root,true,true);tempNode.enableHighlight=false;c=obj.propriedades.length;for(i=0,j=c;i<j;i++){linha=obj.propriedades[i];if(linha.url!==""){conteudo="<a href='#' onclick='"+linha.url+"'>"+$trad(linha.text)+"</a>"}else{conteudo=linha.text}d={html:conteudo};temaNode=new YAHOO.widget.HTMLNode(d,tempNode,false,true);temaNode.enableHighlight=false}arvore.collapseAll();arvore.draw()},removeAcentos:function(palavra){var re;re=/ã|á|à|â/gi;palavra=palavra.replace(re,"a");re=/é|ê/gi;palavra=palavra.replace(re,"e");re=/í/gi;palavra=palavra.replace(re,"i");re=/ó|õ|ô/gi;palavra=palavra.replace(re,"o");re=/ç/gi;palavra=palavra.replace(re,"c");re=/ú/gi;palavra=palavra.replace(re,"u");return(palavra)},protocolo:function(){var u=window.location.href;u=u.split(":");return(u[0])},pegaPosicaoObjeto:function(obj){if(obj){if(!obj.style){return[0,0]}var curleft=0,curtop=0,teste;if(obj){if(obj.offsetParent){do{curleft+=obj.offsetLeft-obj.scrollLeft;curtop+=obj.offsetTop-obj.scrollTop;obj=obj.offsetParent}while(obj)}}return[curleft+document.body.scrollLeft,curtop+document.body.scrollTop]}else{return[0,0]}},pegaElementoPai:function(e){var targ;if(!e){e=window.event}if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}if(targ.nodeType===3){targ=targ.parentNode}tparent=targ.parentNode;return(tparent)},mudaCursor:function(cursores,tipo,idobjeto,locaplic){var os=[],o,i,c,n,layers,cursor="",ext=".ff";try{if(navm){ext=".ie"}os.push(document.getElementById(idobjeto));if(i3GEO.Interface.ATUAL==="openlayers"){os=YAHOO.util.Dom.getElementsByClassName('olTileImage','img')}if(i3GEO.Interface.ATUAL==="googlemaps"){os=document.getElementById(idobjeto).firstChild;os=os.getElementsByTagName("div")}n=os.length;if(tipo==="default"||tipo==="pointer"||tipo==="crosshair"||tipo==="help"||tipo==="move"||tipo==="text"){cursor=tipo}else{c=eval("cursores."+tipo+ext)}if(c==="default"||c==="pointer"||c==="crosshair"||c==="help"||c==="move"||c==="text"){cursor=c}if(cursor===""){cursor="URL(\""+locaplic+eval("cursores."+tipo+ext)+"\"),auto"}for(i=0;i<n;i++){o=os[i];if(o){o.style.cursor=cursor}}}catch(e){}},criaBox:function(id){if(arguments.length===0){id="boxg"}if(!$i(id)){var novoel=document.createElement("div");novoel.id=id;novoel.style.zIndex=1;novoel.innerHTML='<font face="Arial" size=0></font>';document.body.appendChild(novoel);novoel.onmouseover=function(){novoel.style.display='none'};novoel.onmouseout=function(){novoel.style.display='block'};i3GEO.util.BOXES.push(id)}else{$i(id).style.display="block"}},escondeBox:function(){var l,i;l=i3GEO.util.BOXES.length;for(i=0;i<l;i++){if($i(i3GEO.util.BOXES[i])){$i(i3GEO.util.BOXES[i]).style.display="none"}}},criaPin:function(id,imagem,w,h,mouseover){if(arguments.length<1||id===""){id="boxpin"}if(arguments.length<2||imagem===""){imagem=i3GEO.configura.locaplic+'/imagens/marker.png'}if(arguments.length<3||w===""){w="21px"}if(arguments.length<4||h===""){h="25px"}if(!$i(id)){var novoel=document.createElement("img");novoel.id=id;novoel.style.zIndex=10000;novoel.style.position="absolute";novoel.style.width=w;novoel.style.height=h;novoel.src=imagem;if(id==="boxpin"){novoel.onmouseover=function(){$i("boxpin").style.display="none"}}else if(mouseover){novoel.onmouseover=mouseover}document.body.appendChild(novoel);i3GEO.util.PINS.push(id)}},posicionaImagemNoMapa:function(id){var i,mx,my;i=$i(id);mx=parseInt(i.style.width,10)/2;my=parseInt(i.style.height,10)/2;i.style.position="absolute";i.style.top=objposicaocursor.telay-my;i.style.left=objposicaocursor.telax-mx;return[objposicaocursor.telay-my,objposicaocursor.telax-mx]},escondePin:function(){var l,i;l=i3GEO.util.PINS.length;for(i=0;i<l;i++){if($i(i3GEO.util.PINS[i])){$i(i3GEO.util.PINS[i]).style.display="none"}}},$im:function(g){return i3GEO.configura.locaplic+"/imagens/visual/"+i3GEO.configura.visual+"/"+g},$inputText:function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome){if(arguments.length===6){nome=""}if(idPai!==""){if(larguraIdPai!==""){$i(idPai).style.width=larguraIdPai+"px"}$i(idPai).style.padding="3";$i(idPai).style.textAlign="center";$i(idPai).onmouseover=function(){this.className="digitarMouseover"};$i(idPai).onmouseout=function(){this.className=""}}return"<input tabindex='0' onmouseover='javascript:this.className=\"digitarOver\";' onmouseout='javascript:this.className=\"digitar\";' onclick='javascript:this.select();this.className=\"digitarMouseclick\";' id='"+idInput+"' title='"+titulo+"' type='text' size='"+digitos+"' class='digitar' value='"+valor+"' name='"+nome+"' />"},$inputTextMudaCor:function(obj){var n=obj.value.split(" ");obj.style.color="rgb("+n[0]+","+n[1]+","+n[2]+")"},$top:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelTop){document.getElementById(id).style.pixelTop=valor}else{document.getElementById(id).style.top=valor+"px"}}},$left:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelLeft){document.getElementById(id).style.pixelLeft=valor}else{document.getElementById(id).style.left=valor+"px"}}},insereMarca:{CONTAINER:[],cria:function(xi,yi,funcaoOnclick,container,texto,srci){if(!srci){srci=i3GEO.configura.locaplic+"/imagens/dot2.gif"}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereMarca(texto,xi,yi,container);return}try{var novoel,i,novoimg,temp;if(i3GEO.util.insereMarca.CONTAINER.toString().search(container)<0){i3GEO.util.insereMarca.CONTAINER.push(container)}if(!$i(container)){novoel=document.createElement("div");novoel.id=container;i=novoel.style;i.position="absolute";if($i(i3GEO.Interface.IDCORPO)){i.top=parseInt($i(i3GEO.Interface.IDCORPO).style.top,10);i.left=parseInt($i(i3GEO.Interface.IDCORPO).style.left,10)}else{i.top=parseInt($i(i3GEO.Interface.IDMAPA).style.top,10);i.left=parseInt($i(i3GEO.Interface.IDMAPA).style.left,10)}document.body.appendChild(novoel)}container=$i(container);novoel=document.createElement("div");i=novoel.style;i.position="absolute";i.zIndex=2000;i.top=(yi-2)+"px";i.left=(xi-2)+"px";i.width="5px";i.height="5px";novoimg=document.createElement("img");if(funcaoOnclick!==""){novoimg.onclick=funcaoOnclick}else{novoimg.onclick=function(){i3GEO.util.insereMarca.limpa()}}novoimg.src=srci;temp=novoimg.style;temp.width="5px";temp.height="5px";temp.zIndex=2000;novoel.appendChild(novoimg);container.appendChild(novoel);if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.util.insereMarca.limpa()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.util.insereMarca.limpa()")}}catch(e){alert("Ocorreu um erro. inseremarca"+e)}},limpa:function(){try{var n,i;n=i3GEO.util.insereMarca.CONTAINER.length;for(i=0;i<n;i++){if($i(i3GEO.util.insereMarca.CONTAINER[i])){$i(i3GEO.util.insereMarca.CONTAINER[i]).innerHTML=""}}i3GEO.util.insereMarca.CONTAINER=[];i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.util.insereMarca.limpa()")}catch(e){}}},adicionaSHP:function(path){i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));var temp=path.split(".");if((temp[1]==="SHP")||(temp[1]==="shp")){i3GEO.php.adicionaTemaSHP(i3GEO.atualiza,path)}else{i3GEO.php.adicionaTemaIMG(i3GEO.atualiza,path)}},abreCor:function(janela,elemento,tipo){if(!i3GEO.configura){i3GEO.configura={locaplic:"../"}}if(arguments.length===2){tipo="rgb"}var ins,temp,novoel,wdocaiframe,fix=false,wlargura="300",waltura="250",wsrc=i3GEO.configura.locaplic+"/ferramentas/colorpicker/index.htm?doc="+janela+"&elemento="+elemento+"&tipo="+tipo,nx="",ny="",texto="Cor",id="i3geo_janelaCor",modal=true,classe="hd";YAHOO.namespace("janelaCor.xp");if($i(id)){YAHOO.janelaCor.xp.panel.destroy()}ins='<div id="'+id+'_cabecalho" class="hd">';ins+="<span><img id='i3geo_janelaCor_imagemCabecalho' style='visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span>";ins+=texto;ins+='</div><div id="i3geo_janelaCor_corpo" class="bd" style="padding:5px">';if(wsrc!==""){ins+='<iframe name="'+id+'i" id="i3geo_janelaCori" valign="top" style="height:230px,border:0px white solid"></iframe>'}ins+='</div>';novoel=document.createElement("div");novoel.id="i3geo_janelaCor";novoel.style.display="block";novoel.innerHTML=ins;if($i("i3geo")){$i("i3geo").appendChild(novoel)}else{document.body.appendChild(novoel)}wdocaiframe=$i("i3geo_janelaCori");if(wdocaiframe){wdocaiframe.style.display="block";wdocaiframe.src=wsrc;wdocaiframe.style.height="250px";wdocaiframe.style.width="325px";wdocaiframe.style.border="0px solid white"}if(nx===""||nx==="center"){fix=true}YAHOO.janelaCor.xp.panel=new YAHOO.widget.ResizePanel(id,{height:"300px",zIndex:5000,modal:modal,width:"350px",fixedcenter:fix,constraintoviewport:false,visible:true,iframe:false});YAHOO.janelaCor.xp.panel.render();$i(id+'_cabecalho').className=classe},ajaxhttp:function(){var objhttp1;try{objhttp1=new XMLHttpRequest()}catch(ee){try{objhttp1=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{objhttp1=new ActiveXObject("Microsoft.XMLHTTP")}catch(E){objhttp1=false}}}return(objhttp1)},ajaxexecASXml:function(programa,funcao){var h,ohttp,retorno;if(programa.search("http")===0){h=window.location.host;if(programa.search(h)<0){alert("OOps! Nao e possivel chamar um XML de outro host.\nContacte o administrador do sistema.\nConfigure corretamente o ms_configura.php");return}}ohttp=i3GEO.util.ajaxhttp();ohttp.open("GET",programa,true);retorno="";ohttp.onreadystatechange=function(){var retorno,parser,dom;if(ohttp.readyState===4){retorno=ohttp.responseText;if(retorno!==undefined){if(document.implementation.createDocument){parser=new DOMParser();dom=parser.parseFromString(retorno,"text/xml")}else{dom=new ActiveXObject("Microsoft.XMLDOM");dom.async="false";dom.load(programa)}}else{dom="erro"}if(funcao!=="volta"){eval(funcao+'(dom)')}else{return dom}}};ohttp.send(null)},aparece:function(id,tempo,intervalo){var n,obj,opacidade,fadei,tempoFadei;n=parseInt(tempo/intervalo,10);obj=$i(id);if(n===1){obj.style.display="block";if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}}tempo=n*intervalo;intervalo=(intervalo*100)/tempo;opacidade=0;if(navm){obj.style.filter='alpha(opacity=0)'}else{obj.style.opacity=0}obj.style.display="block";fadei=function(){opacidade+=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade<100){tempoFadei=setTimeout(fadei,tempo)}else{clearTimeout(tempoFadei);if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}}};tempoFadei=setTimeout(fadei,tempo)},desaparece:function(id,tempo,intervalo,removeobj){var n,obj,opacidade,fade,p,tempoFade;n=parseInt(tempo/intervalo,10);obj=$i(id);if(n===1){obj.style.display="none";if(removeobj){p=obj.parentNode;if(p){p.removeChild(obj)}}return}tempo=n*intervalo;intervalo=(intervalo*100)/tempo;opacidade=100;if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}obj.style.display="block";fade=function(){opacidade-=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade>0){tempoFade=setTimeout(fade,tempo)}else{clearTimeout(tempoFade);obj.style.display="none";if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}if(removeobj){p=obj.parentNode;if(p){p.removeChild(obj)}}}};tempoFade=setTimeout(fade,tempo)},wkt2ext:function(wkt,tipo){var re,x,y,w,xMin,xMax,yMin,yMax,temp;tipo=tipo.toLowerCase();ext=false;if(tipo==="polygon"){try{re=new RegExp("POLYGON","g");wkt=wkt.replace(re,"");wkt=wkt.split("(")[2].split(")")[0];wkt=wkt.split(",");x=[];y=[];for(w=0;w<wkt.length;w++){temp=wkt[w].split(" ");x.push(temp[0]);y.push(temp[1])}x.sort(i3GEO.util.sortNumber);xMin=x[0];xMax=x[(x.length)-1];y.sort(i3GEO.util.sortNumber);yMin=y[0];yMax=y[(y.length)-1];return xMin+" "+yMin+" "+xMax+" "+yMax}catch(e){}}if(tipo==="point"){try{re=new RegExp("POINT","g");wkt=wkt.replace(re,"");wkt=wkt.split("(")[1].split(")")[0];wkt=wkt.split(" ");return(wkt[0]*1-0.01)+" "+(wkt[1]*1-0.01)+" "+(wkt[0]*1+0.01)+" "+(wkt[1]*1+0.01)}catch(e){}}return ext},sortNumber:function(a,b){return a-b},getScrollerWidth:function(){var scr=null,inn=null,wNoScroll=0,wScroll=0;scr=document.createElement('div');scr.style.position='absolute';scr.style.top='-1000px';scr.style.left='-1000px';scr.style.width='100px';scr.style.height='50px';scr.style.overflow='hidden';inn=document.createElement('div');inn.style.width='100%';inn.style.height='200px';scr.appendChild(inn);document.body.appendChild(scr);wNoScroll=inn.offsetWidth;scr.style.overflow='auto';wScroll=inn.offsetWidth;document.body.removeChild(document.body.lastChild);return(wNoScroll-wScroll)},scriptTag:function(js,ini,id,aguarde){if(!aguarde){aguarde=true}var head,script,tipojanela=i3GEO.janela.ESTILOAGUARDE;if(!$i(id)||id===""){head=document.getElementsByTagName('head')[0];script=document.createElement('script');script.type='text/javascript';if(ini!==""){if(navm){script.onreadystatechange=function(){if(this.readyState==='loaded'||this.readyState==='complete'){i3GEO.janela.fechaAguarde(id+"aguarde");i3GEO.janela.ESTILOAGUARDE=tipojanela;eval(ini)}}}else{script.onload=function(){i3GEO.janela.fechaAguarde(id+"aguarde");i3GEO.janela.ESTILOAGUARDE=tipojanela;eval(ini)}}}script.src=js;if(id!==""){script.id=id}head.appendChild(script)}else{if(ini!==""){eval(ini)}}},removeScriptTag:function(id){try{old=$i("loadscriptI3GEO");if(old!==null){old.parentNode.removeChild(old);old=null;eval(id+" = null;")}old=$i(id);if(old!==null){old.parentNode.removeChild(old)}}catch(erro){}},verificaScriptTag:function(texto){var s=document.getElementsByTagName("script"),n=s.length,i,t;for(i=0;i<n;i++){t=s[i].id;t=t.split(".");if(t[0]===texto){return true}}return false},mensagemAjuda:function(onde,texto){var ins="<table style='width:100%;padding:2;vertical-align:top;background-color:#ffffff;' ><tr><th style='background-color: #cedff2; font-family:Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; border: 1px solid #B1CDEB; text-align: left; padding-left: 7px;padding-right: 11px;'>";ins+='<div style="float:right"><img src="'+i3GEO.configura.locaplic+'/imagens/question.gif" /></div>';ins+='<div style="text-align:left;">';if(texto===""){texto=$i(onde).innerHTML}ins+=texto;ins+='</div></th></tr></table>';if(onde!==""){$i(onde).innerHTML=ins}else{return(ins)}},randomRGB:function(){var v=Math.random(),r=parseInt(255*v,10),g;v=Math.random();g=parseInt(255*v,10);v=Math.random();b=parseInt(255*v,10);return(r+","+g+","+b)},rgb2hex:function(str){var re=new RegExp(" ","g"),s=str.replace(re,','),rgb=s.split(",");function hex(x){var hexDigits=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"];return hexDigits[(x-x%16)/16]+hexDigits[x%16]}return"#"+hex(rgb[0])+hex(rgb[1])+hex(rgb[2])},comboTemas:function(id,funcao,onde,nome,multiplo,tipoCombo){if(arguments.length>2){i3GEO.util.defineValor(onde,"innerHTML","<span style=color:red;font-size:10px; >buscando temas...</span>")}if(arguments.length===3){nome=""}if(arguments.length<5){multiplo=false}var monta,lista,temp;monta=function(retorno){var i,comboTemas,temp,n,nome;if(retorno!==undefined){if(retorno.data){retorno=retorno.data}n=retorno.length;if(n>0){if(multiplo){comboTemas="<select style='font-size:12px;' id='"+id+"' size='4' multiple='multiple' name='"+nome+"'>"}else{comboTemas="<select style='font-size:12px;' id='"+id+"' name='"+nome+"'>"}comboTemas+="<option value=''>----</option>";for(i=0;i<n;i++){if(retorno[i].nome){nome=retorno[i].nome;tema=retorno[i].tema}else{nome=retorno[i].tema;tema=retorno[i].name}if(retorno[i].escondido!=="sim"){comboTemas+="<option value="+tema+" >"+nome+"</option>"}}comboTemas+="</select>";temp={dados:comboTemas,tipo:"dados"}}else{if(tipoCombo==="poligonosSelecionados"||tipoCombo==="selecionados"||tipoCombo==="pontosSelecionados"){temp={dados:'<div class=alerta >Nenhum tema encontrado. <span style=cursor:pointer;color:blue onclick="i3GEO.mapa.dialogo.selecao()" > Selecionar...</span></div>',tipo:"mensagem"}}else{temp={dados:'<div class=alerta >Nenhum tema encontrado. </div>',tipo:"mensagem"}}}}else{temp={dados:"<p style=color:red >Ocorreu um erro<br>",tipo:"erro"}}eval("funcao(temp);")};if(tipoCombo==="ligados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="editaveis"){i3GEO.php.listaTemasEditaveis(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}if(tipoCombo==="selecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemasComSel(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="raster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listatemasTipo(monta,"raster",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="pontosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert("Arvore de camadas não encontrada")}}if(tipoCombo==="pontos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert("Arvore de camadas não encontrada")}}if(tipoCombo==="poligonos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert("Arvore de camadas não encontrada")}}if(tipoCombo==="poligonosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert("Arvore de camadas não encontrada")}}if(tipoCombo==="naolinearSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",1,"diferente",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert("Arvore de camadas não encontrada")}}if(tipoCombo==="linhaDoTempo"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("linhadotempo","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert("Arvore de camadas não encontrada")}}if(tipoCombo===""){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type","","diferente",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert("Arvore de camadas não encontrada")}}},checkTemas:function(id,funcao,onde,nome,tipoLista,prefixo,size){if(arguments.length>2){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando temas...</span>"}if(arguments.length===3){nome=""}var monta,lista,temp,temp1,n,i;monta=function(retorno){try{var i,comboTemas,temp,n,nome;if(retorno!==undefined){if(retorno.data){retorno=retorno.data}n=retorno.length;if(n>0){comboTemas="<table class=lista3 >";for(i=0;i<n;i++){if(retorno[i].nome){nome=retorno[i].nome;tema=retorno[i].tema}else{nome=retorno[i].tema;tema=retorno[i].name}comboTemas+="<tr><td><input size=2 style='cursor:pointer' type=checkbox name='"+tema+"' /></td>";comboTemas+="<td>&nbsp;<input style='text-align:left; cursor:text;' onclick='javascript:this.select();' id='"+prefixo+tema+"' type=text size='"+size+"' value='"+nome+"' /></td></tr>"}comboTemas+="</table>";temp={dados:comboTemas,tipo:"dados"}}else{temp={dados:'<div class=alerta >Nenhum tema encontrado.</div>',tipo:"mensagem"}}}else{temp={dados:"<p style=color:red >Ocorreu um erro<br>",tipo:"erro"}}eval("funcao(temp);")}catch(e){}};if(tipoLista==="ligados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="selecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemasComSel(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="raster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listatemasTipo(monta,"raster",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="polraster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS);temp1=i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);n=temp1.length;for(i=0;i<n;i++){temp.push(temp1[i])}monta(temp)}else{alert("Arvore de camadas não encontrada")}}if(tipoLista==="pontosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert("Arvore de camadas não encontrada")}}if(tipoLista==="pontos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert("Arvore de camadas não encontrada")}}},comboItens:function(id,tema,funcao,onde,nome){if(arguments.length>3){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando itens...</span>"}if(arguments.length!==5){nome=""}var monta=function(retorno){var ins,temp,i;if(retorno.data!==undefined){ins=[];ins.push("<select id='"+id+"' name='"+nome+"'>");ins.push("<option value='' >---</option>");temp=retorno.data.valores.length;for(i=0;i<temp;i++){if(retorno.data.valores[i].tema===tema){ins.push("<option value='"+retorno.data.valores[i].item+"' >"+retorno.data.valores[i].item+"</option>")}}ins.push("</select>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</div>',tipo:"erro"}}eval("funcao(temp)")};i3GEO.php.listaItensTema(monta,tema)},comboValoresItem:function(id,tema,itemTema,funcao,onde){if(arguments.length===5){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando valores...</span>"}var monta=function(retorno){var ins=[],i,pares,j,temp;if(retorno.data!==undefined){ins.push("<select id="+id+" >");ins.push("<option value='' >---</option>");for(i=0;i<retorno.data[1].registros.length;i++){pares=retorno.data[1].registros[i].valores;for(j=0;j<pares.length;j++){ins.push("<option value='"+pares[j].valor+"' >"+pares[j].valor+"</option>")}}ins.push("</select>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</erro>',tipo:"erro"}}eval("funcao(temp)")};i3GEO.php.listaValoresItensTema(monta,tema,itemTema)},comboFontes:function(id,onde){$i(onde).innerHTML="<span style=color:red >buscando fontes...</span>";var monta=function(retorno){var ins="",temp,i,dados;if(retorno.data!==undefined){ins+="<select id='"+id+"'>";ins+="<option value='bitmap' >bitmap</option>";dados=retorno.data.split(",");temp=dados.length;for(i=0;i<temp;i++){ins+="<option value='"+dados[i]+"' >"+dados[i]+"</option>"}ins+="</select>"}$i(onde).innerHTML=ins};i3GEO.php.listaFontesTexto(monta)},comboSimNao:function(id,selecionado){var combo="<select name="+id+" id="+id+" >";combo+="<option value='' >---</option>";if(selecionado.toLowerCase()==="sim"){combo+="<option value=TRUE selected >sim</option>"}else{combo+="<option value=TRUE >sim</option>"}if(selecionado==="nao"){combo+="<option value=FALSE selected >não</option>"}else{combo+="<option value=FALSE >não</option>"}combo+="</select>";return(combo)},checkItensEditaveis:function(tema,funcao,onde,size,prefixo){if(onde!==""){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando itens...</span>"}var monta=function(retorno){var ins=[],i,temp,n;if(retorno.data!==undefined){ins.push("<table class=lista3 >");n=retorno.data.valores.length;for(i=0;i<n;i++){ins.push("<tr><td><input size=2 style='cursor:pointer' name='"+retorno.data.valores[i].tema+"' type=checkbox id='"+prefixo+retorno.data.valores[i].item+"' /></td>");ins.push("<td><input style='text-align:left; cursor:text;' onclick='javascript:this.select();' id='"+prefixo+retorno.data.valores[i].item+retorno.data.valores[i].tema+"' type=text size='"+size+"' value='"+retorno.data.valores[i].item+"' /></td></tr>")}ins.push("</table>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</div>',tipo:"erro"}}eval("funcao(temp)")};i3GEO.php.listaItensTema(monta,tema)},radioEpsg:function(funcao,onde,prefixo){if(arguments.length===2){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando...</span>"}var cp,monta=function(retorno){var ins=[],i,n,temp;if(retorno.data!==undefined){ins.push("<table class=lista2 >");ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio checked value='' /></td>");ins.push("<td>"+retorno.data[0].nome+"</td></tr>");ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio value='' /></td>");ins.push("<td>"+retorno.data[1].nome+"</td></tr>");n=retorno.data.length;for(i=2;i<n;i++){ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio value='"+retorno.data[i].codigo+"' /></td>");ins.push("<td>"+retorno.data[i].nome+"</td></tr>")}ins.push("</table>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</erro>',tipo:"erro"}}eval("funcao(temp)")};i3GEO.php.listaEpsg(monta)},proximoAnterior:function(anterior,proxima,texto,idatual,container){var temp=$i(idatual),ndiv=document.createElement("div"),nids,i,fundo,b;if(temp){$i(container).removeChild(temp)}if(!document.getElementById(idatual)){fundo=$i(container).style.backgroundColor;ndiv.id=idatual;texto+="<br><br><table style='width:100%;background-color:"+fundo+";' ><tr style='width:100%'>";if(anterior!==""){texto+="<td style='border:0px solid white;text-align:left;cursor:pointer;background-color:"+fundo+";'><input id='"+idatual+"anterior_' onclick='"+anterior+"' type='button' value='&nbsp;&nbsp;' /></td>"}if(proxima!==""){texto+="<td style='border:0px solid white;text-align:right;cursor:pointer;background-color:"+fundo+";'><input id='"+idatual+"proxima_' onclick='"+proxima+"' type='button' value='&nbsp;&nbsp;' /></td>"}ndiv.innerHTML=texto+"</tr></table>";$i(container).appendChild(ndiv);b=new YAHOO.widget.Button(idatual+"anterior_",{onclick:{fn:function(){eval(anterior+"()")},lazyloadmenu:true}});b=new YAHOO.widget.Button(idatual+"proxima_",{onclick:{fn:function(){eval(proxima+"()")},lazyloadmenu:true}});i=$i(idatual+"proxima_-button");if(i){i.style.backgroundImage="url('"+i3GEO.configura.locaplic+"/imagens/player_avanca.png')";i.style.backgroundRepeat="no-repeat";i.style.backgroundPosition="center center"}i=$i(idatual+"anterior_-button");if(i){i.style.backgroundImage="url('"+i3GEO.configura.locaplic+"/imagens/player_volta.png')";i.style.backgroundRepeat="no-repeat";i.style.backgroundPosition="center center"}}temp=$i(container).getElementsByTagName("div");nids=temp.length;for(i=0;i<nids;i++){temp[i].style.display="none"}$i(idatual).style.display="block"},dialogoFerramenta:function(mensagem,dir,nome){var js=i3GEO.configura.locaplic+"/ferramentas/"+dir+"/index.js.php";if(!$i("i3GEOF."+nome+"_script")){i3GEO.janela.ESTILOAGUARDE="reduzida";i3GEO.util.multiStep([i3GEO.janela.abreAguarde,i3GEO.util.scriptTag],[["i3GEOF."+nome+"_script"+"aguarde","Carregando JS"],[js,"i3GEOF."+nome+".criaJanelaFlutuante()","i3GEOF."+nome+"_script"]],function(){})}else{i3GEO.util.scriptTag(js,"i3GEOF."+nome+".criaJanelaFlutuante()","i3GEOF."+nome+"_script")}},intersectaBox:function(box1,box2){box1=box1.split(" ");box2=box2.split(" ");var box1i=box2,box2i=box1,coordx,coordy,i;coordx=box1[0]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true;coordx=box1[0]*1;coordy=box1[3]*1}if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[3]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}box1=box1i;box2=box2i;coordx=box1[0]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true;coordx=box1[0]*1;coordy=box1[3]*1}if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[3]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}return false},abreColourRamp:function(janela,elemento,ncores){var ins,temp,novoel,wdocaiframe,fix=false,wlargura="300",waltura="480",wsrc=i3GEO.configura.locaplic+"/ferramentas/colourramp/index.php?ncores="+ncores+"&doc="+janela+"&elemento="+elemento,nx="",ny="",texto="Cor",id="i3geo_janelaCorRamp",modal=true,classe="hd";YAHOO.namespace("janelaCorRamp.xp");if($i(id)){YAHOO.janelaCorRamp.xp.panel.destroy()}ins='<div id="'+id+'_cabecalho" class="hd">';ins+="<span><img id='i3geo_janelaCorRamp_imagemCabecalho' style='visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span>";ins+=texto;ins+='</div><div id="i3geo_janelaCorRamp_corpo" class="bd" style="padding:5px">';ins+='<iframe name="'+id+'i" id="i3geo_janelaCorRampi" valign="top" ></iframe>';ins+='</div>';novoel=document.createElement("div");novoel.id="i3geo_janelaCorRamp";novoel.style.display="block";novoel.innerHTML=ins;if($i("i3geo")){$i("i3geo").appendChild(novoel)}else{document.body.appendChild(novoel)}wdocaiframe=$i("i3geo_janelaCorRampi");wdocaiframe.style.display="block";wdocaiframe.src=wsrc;wdocaiframe.style.height="430px";wdocaiframe.style.width="340px";wdocaiframe.style.border="0px solid white";if(nx===""||nx==="center"){fix=true}YAHOO.janelaCorRamp.xp.panel=new YAHOO.widget.ResizePanel(id,{height:"480px",zIndex:5000,modal:modal,width:"350px",fixedcenter:fix,constraintoviewport:false,visible:true,iframe:false});YAHOO.janelaCorRamp.xp.panel.render();$i(id+'_cabecalho').className=classe},localizai3GEO:function(){var scriptLocation="",scripts=document.getElementsByTagName('script'),i=0,index,ns=scripts.length,src;for(i=0;i<ns;i++){src=scripts[i].getAttribute('src');if(src){index=src.lastIndexOf("/classesjs/i3geo.js");if((index>-1)&&(index+"/classesjs/i3geo.js".length===src.length)){scriptLocation=src.slice(0,-"/classesjs/i3geo.js".length);break}index=src.lastIndexOf("/classesjs/i3geonaocompacto.js");if((index>-1)&&(index+"/classesjs/i3geonaocompacto.js".length===src.length)){scriptLocation=src.slice(0,-"/classesjs/i3geonaocompacto.js".length);break}}}if(i3GEO.configura){i3GEO.configura.locaplic=scriptLocation}return scriptLocation},removeChild:function(id,el){var j=$i(id);if(j){if(!el){el=j.parentNode}el.removeChild(j)}},defineValor:function(id,prop,valor){try{eval("$i('"+id+"')."+prop+"='"+valor+"';")}catch(e){}},in_array:function(x,matriz){var txt="¬"+matriz.join("¬")+"¬";var er=new RegExp("¬"+x+"¬","gim");return((txt.match(er))?true:false)},timedProcessArray:function(items,process,callback){var todo=items.concat();setTimeout(function(){var start=+new Date();do{process(todo.shift())}while(todo.length>0&&(+new date()-start<50));if(todo.length>0){setTimeout(arguments.callee,25)}else{callback(items)}},25)},multiStep:function(steps,args,callback){var tasks=steps.concat();setTimeout(function(){var task=tasks.shift(),a=args.shift();task.apply(null,a||[]);if(tasks.length>0){setTimeout(arguments.callee,25)}else{callback()}},25)},tamanhoBrowser:function(){var viewportwidth,viewportheight;if(typeof window.innerWidth!='undefined'){viewportwidth=window.innerWidth,viewportheight=window.innerHeight}else if(typeof document.documentElement!='undefined'&&typeof document.documentElement.clientWidth!='undefined'&&document.documentElement.clientWidth!=0){viewportwidth=document.documentElement.clientWidth,viewportheight=document.documentElement.clientHeight}else{viewportwidth=document.getElementsByTagName('body')[0].clientWidth,viewportheight=document.getElementsByTagName('body')[0].clientHeight}viewportwidth=viewportwidth-i3GEO.util.getScrollerWidth();return[viewportwidth,viewportheight]},detectaTablet:function(){var p,c=DetectaMobile("DetectMobileLong");if(c===false){return false}p=confirm("Direciona para a versão adaptada para tablets?");if(p){window.location=i3GEO.configura.locaplic+'/interface/'+i3GEO.Interface.ALTTABLET+'?'+i3GEO.configura.sid;return true}}};try{YAHOO.namespace("lutsr");YAHOO.lutsr.accordion={properties:{animation:true,animationDuration:10,multipleOpen:false,Id:"sanfona",altura:200,ativa:0},init:function(animation,animationDuration,multipleOpen,Id,altura,ativa){if(animation){this.properties.animation=animation}if(animationDuration){this.properties.animationDuration=animationDuration}if(multipleOpen){this.properties.multipleOpen=multipleOpen}if(Id){this.properties.Id=Id}if(altura){this.properties.altura=altura}if(ativa){this.properties.ativa=ativa}var accordionObject=document.getElementById(this.properties.Id),headers,bodies;if(accordionObject){if(accordionObject.nodeName==="DL"){headers=accordionObject.getElementsByTagName("dt");bodies=headers[0].parentNode.getElementsByTagName("dd")}this.attachEvents(headers,0)}},attachEvents:function(headers,nr){var i,headerProperties,parentObj,header;for(i=0;i<headers.length;i++){headerProperties={objRef:headers[i],nr:i,jsObj:this};YAHOO.util.Event.addListener(headers[i],"click",this.clickHeader,headerProperties)}parentObj=headers[this.properties.ativa].parentNode;headers=parentObj.getElementsByTagName("dd");header=headers[this.properties.ativa];this.expand(header)},clickHeader:function(e,headerProperties){var parentObj=headerProperties.objRef.parentNode,headers=parentObj.getElementsByTagName("dd"),header=headers[headerProperties.nr],i;if(YAHOO.util.Dom.hasClass(header,"open")){headerProperties.jsObj.collapse(header)}else{if(headerProperties.jsObj.properties.multipleOpen){headerProperties.jsObj.expand(header)}else{for(i=0;i<headers.length;i++){if(YAHOO.util.Dom.hasClass(headers[i],"open")){headerProperties.jsObj.collapse(headers[i])}}headerProperties.jsObj.expand(header)}}},collapse:function(header){YAHOO.util.Dom.removeClass(YAHOO.util.Dom.getPreviousSibling(header),"selected");if(!this.properties.animation){YAHOO.util.Dom.removeClass(header,"open")}else{this.initAnimation(header,"close")}},expand:function(header){YAHOO.util.Dom.addClass(YAHOO.util.Dom.getPreviousSibling(header),"selected");if(!this.properties.animation){YAHOO.util.Dom.addClass(header,"open")}else{this.initAnimation(header,"open")}},initAnimation:function(header,dir){var attributes,animation,animationEnd;if(dir==="open"){YAHOO.util.Dom.setStyle(header,"visibility","hidden");YAHOO.util.Dom.setStyle(header,"height",this.properties.altura);YAHOO.util.Dom.addClass(header,"open");attributes={height:{from:0,to:this.properties.altura}};YAHOO.util.Dom.setStyle(header,"height",0);YAHOO.util.Dom.setStyle(header,"visibility","visible");animation=new YAHOO.util.Anim(header,attributes);animationEnd=function(){header.style.height=this.properties.altura+"px"};animation.duration=this.properties.animationDuration;animation.useSeconds=false;animation.onComplete.subscribe(animationEnd);animation.animate()}else if("close"){attributes={height:{to:0}};animationEnd=function(){YAHOO.util.Dom.removeClass(header,"open")};animation=new YAHOO.util.Anim(header,attributes);animation.duration=this.properties.animationDuration;animation.useSeconds=false;animation.onComplete.subscribe(animationEnd);animation.animate()}}}}catch(e){}$im=function(g){return i3GEO.util.$im(g)};$inputText=function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome){if(arguments.length===6){nome=""}return i3GEO.util.$inputText(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome)};$top=function(id,valor){i3GEO.util.$top(id,valor)};$left=function(id,valor){i3GEO.util.$left(id,valor)};g_traducao={"p1":[{pt:"O i3Geo &eacute; software livre! Para download clique <a href='http://mapas.mma.gov.br/download' target=blank >aqui</a>. <b><a href='http://"+window.location.host+"/i3geo/mobile/qrcode.htm' target=blank >Qrcode mobile</a></b>",en:"I3geo is a open source software! <a href='http://mapas.mma.gov.br/download' target=blank >Click</a> to download.",es:"I3Geo es software libre. <a href='http://mapas.mma.gov.br/download' target=blank > Download</a>",it:"I3geo è un software libero! <a href='http://mapas.mma.gov.br/download' target=blank >clicca qui </a> per il download."}],"p2":[{pt:"Filtro de cores",en:"Image type",es:"Tipo de imagen",it:"Tipo di immagine"}],"p3":[{pt:"Legenda",en:"Legend",es:"Subt&iacute;tulo",it:"Legenda"}],"p4":[{pt:"Escala",en:"Scale",es:"Escala",it:"Scala"}],"p5":[{pt:"Tamanho",en:"Size",es:"Tama&ntilde;o",it:"Dimensione"}],"p6":[{pt:"Ativa/desativa entorno",en:"Enable/Disable surrounding",es:"Activar/desactivar entorno",it:"Attiva / Disattiva campo"}],"p7":[{pt:"Ativa/desativa logo",en:"Enable/Disable logo",es:"Activar/desactivar logomarca",it:"Attiva / disattiva logo"}],"p8":[{pt:"Cor da selecao",en:"Selection color",es:"Color de la selecci&oacute;n",it:"Colore della selezione"}],"p9":[{pt:"Cor do fundo",en:"Background color",es:"Color del fondo",it:"Colore dello sfondo"}],"p10":[{pt:"Grade de coordenadas",en:"Graticule",es:"Grado de coordenadas",it:"Reticolo"}],"p11":[{pt:"Template",en:"Template",es:"Template",it:"Template"}],"p12":[{pt:"Temporizador",en:"Timer",es:"Temporizador",it:"Temporizzazione"}],"p13":[{pt:"Propriedades",en:"Properties",es:"Propiedades",it:"Proprietà"}],"p14":[{pt:"Aplicar",en:"Apply",es:"Aplicar",it:"Applica"}],"p15":[{pt:"Formato da imagem do mapa",en:"Image map format",es:"Formato de la imagen del mapa",it:"Image map format"}],"p16":[{pt:"Camadas de fundo",en:"Base layers",es:"Base layers",it:"Base layers"}],"p17":[{pt:"Imprime legenda",en:"Enable legend",es:"Activar Subtitulo",it:"Attiva legenda"}],"p18":[{pt:"Não imprime a legenda",en:"Disable legend",es:"Desactivar Subtitulo",it:"Disattiva legenda"}],"p19":[{pt:"Ativa ou desativa a legenda de um tema na opção de impressão do mapa",en:"Ativa ou desativa a legenda de um tema na opção de impressão do mapa",es:"Ativa ou desativa a legenda de um tema na opção de impressão do mapa",it:"Ativa ou desativa a legenda de um tema na opção de impressão do mapa"}],"p20":[{pt:"Tela remota",en:"Tela remota",es:"Tela remota",it:"Tela remota"}],"s1":[{pt:"Ajuda",en:"Help",es:"Ayuda",it:"Aiuto?"}],"s2":[{pt:"An&aacute;lise",en:"Analysis",es:"An&aacute;lisis",it:"Analisi"}],"s3":[{pt:"Janelas",en:"Windows",es:"Ventanas",it:"Finestra"}],"s4":[{pt:"Arquivo",en:"Files",es:"Archivo",it:"Archivio"}],"s5":[{pt:"Propriedades",en:"Properties",es:"Propiedades",it:"Proprietà"}],"u1":[{pt:"Sobre o i3Geo",en:"About",es:"Sobre I3Geo",it:"Informazioni WebGis"}],"u2":[{pt:"Doc. dos c&oacute;digos",en:"Doc. of the codes",es:"Doc. de los c&oacute;digos",it:"Doc. dei codici"}],"u3":[{pt:"WikiBook",en:"WikiBook",es:"WikiBook",it:"WikiBook"}],"u4":[{pt:"Tutoriais",en:"Tutorials",es:"Tutoriales",it:"Guida"}],"u5":[{pt:"Blog",en:"Blog",es:"Blog",it:"Blog"}],"u5a":[{pt:"Software p&uacute;blico",en:"Software p&uacute;blico",es:"Software p&uacute;blico",it:"Software pubblico"}],"u5b":[{pt:"Lista de fun&ccedil;&otilde;es",en:"Function list",es:"Lista de funciones",it:"Lista delle funzioni"}],"u5c":[{pt:"Redes sociais",en:"Social networks",es:"Redes sociales",it:"Reti sociali"}],"u6":[{pt:"Geometrias",en:"Geometries",es:"Geometr&iacute;as",it:"Geometrie"}],"u7":[{pt:"Grade de poligonos",en:"Polygon grid",es:"Grado de pol&iacute;gonos",it:"Reticolo poligonale"}],"u8":[{pt:"Grade de pontos",en:"Grid of Points",es:"Grado de puntos",it:"Reticolo puntuale"}],"u9":[{pt:"Grade de hex&aacute;gonos",en:"Grid of Hexagons",es:"Grado de hex&aacute;gonos",it:"Reticolo Esagonale"}],"u10":[{pt:"Entorno(Buffer)",en:"Buffer",es:"Entorno (Buffer)",it:"Buffer"}],"u11":[{pt:"Centr&oacute;ide",en:"Centroid",es:"Centro geométrico",it:"Baricentro"}],"u11a":[{pt:"Dist&acirc;ncia entre pontos",en:"Point distance",es:"Distancia de puntos",it:"Distanza tra i punti"}],"u12":[{pt:"N pontos em poligono",en:"N point in polygon",es:"N puntos en pol&iacute;gono",it:"N punti nel Poligono"}],"u13":[{pt:"Ponto em poligono/raster",en:"Point in polygon/raster",es:"Punto en pol&iacute;gono/matriz",it:"Punto nel Poligono / raster"}],"u14":[{pt:"Distribui&ccedil;&atilde;o de pontos",en:"Point distribution",es:"Distribuci&oacute;n de puntos",it:"Distribuzione di punti"}],"u15":[{pt:"Barras de ferramentas",en:"Toolbars",es:"Barras de herramientas",it:"Barre Strumenti"}],"u16":[{pt:"Janela de mensagens",en:"Message window",es:"Ventana de mensajes",it:"Finestra messaggi"}],"u17":[{pt:"Salvar mapa",en:"Save map",es:"Guardar mapa",it:"Salva mappa"}],"u18":[{pt:"Carregar mapa",en:"Load map",es:"Cargar mapa",it:"Apri mappa"}],"u19":[{pt:"Pegar imagens",en:"Get pictures",es:"Tomar im&aacute;genes",it:"Apri immagine"}],"u20":[{pt:"Converter em WMS e WMC",en:"Convert to WMS and WMC",es:"Convertir en WMS y WMC",it:"Converti in WMS e WMC"}],"u20a":[{pt:"Converter em KML",en:"Convert to KML",es:"Convertir en KML",it:"Converti in KML"}],"u21":[{pt:"Gerador de links",en:"Link generator",es:"Generador de enlaces",it:"Genera collegamento"}],"u22":[{pt:"Grade",en:"Graticule",es:"Grado",it:"Reticolo"}],"u23":[{pt:"Ponto",en:"Point",es:"Punto",it:"Punto"}],"u24":[{pt:"Pol&iacute;gono",en:"Polygon",es:"Poligonos",it:"Poligono"}],"u25":[{pt:"Dissolve",en:"Dissolv",es:"Dissolve",it:"Dissolvi"}],"u26":[{pt:"Agrupa",en:"Group",es:"Agrupa",it:"Aggrega"}],"u27":[{pt:"Outros",en:"Others",es:"Otros",it:"Altri"}],"u28":[{pt:"Centro médio",en:"Centro médio",es:"Centro médio",it:"Centro médio"}],"u29":[{pt:"Editor vetorial",en:"Editor vetorial",es:"Editor vetorial",it:"Editor vetorial"}],"t1":[{pt:"Camadas",en:"Layers",es:"Capas",it:"Strati"}],"t2":[{pt:"Arraste o tema aqui para excluir",en:"Drag the layer here to remove",es:"Arrastre el tema aqui para excluirlo",it:"Trascina qui per rimuovere"}],"t2a":[{pt:"Filtra a lista de camadas",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&atilde;o no mapa. Ap&oacute;s alterar o estado do tema, aguarde alguns instantes para o mapa ser redesenhado, ou clique no bot&atilde;o aplicar que ser&aacute; mostrado.",en:"Turn the layer on/off on the map. Wait a few moments to get the map redesigned or press the button to apply it.",es:"Haga clic para conectar o desconectar este tema, mostr&aacute;ndolo o no en el mapa. Despu&eacute;s de alterar el estado del tema, espere algunos instantes para que el mapa sea redise&ntilde;ado, o haga clic en el bot&oacute;n aplicar que se mostrar&aacute;.",it:"Fare clic per attivare o disattivare questo tema. Dopo aver modificato lo stato del tema, La mappa aggiornata sarà visualizzata dopo qualche istante. Per visualizzare subito cliccare su Applica"}],"t3a":[{pt:"Clique para ligar todos os temas",en:"Turn all layers layer on",es:"Haga clic para conectar los temas",it:"Turn all layers on"}],"t3b":[{pt:"Clique para desligar todos os temas",en:"Turn all layers layer off",es:"Haga clic para desconectar los temas",it:"Turn all layers off"}],"t4":[{pt:"limpa sele&ccedil;&atilde;o",en:"Clear selection",es:"Limpia la selecci&oacute;n",it:"Pulizia della selezione"}],"t4a":[{pt:"zoom para a sele&ccedil;&atilde;o",en:"Zoom to selection",es:"Zoom a la selecci&oacute;n",it:"Zoom della selezione"}],"t5":[{pt:"Limpa sele&ccedil;&atilde;o existente nesse tema",en:"Clear selection",es:"Limpia la selecci&oacute;n existente en este tema",it:"Pulizia della selezione esistente in questo strato"}],"t6":[{pt:"Clique para fazer o download desse tema no formato shapefile",en:"Click to download in shapefile format",es:"Haga clic para hacer el download",it:"Clicca per il download di questo tema nel formato Shapefile"}],"t7":[{pt:"clique e arraste",en:"dragging",es:"Haga clic y arrastre",it:"Clicca e trascina"}],"t7a":[{pt:"Clique e arraste para mudar a ordem. Arraste e solte na lixeira para remover. Aguarde para ver a legenda.",en:"dragging or wait",es:"Haga clic y arrastre",it:"Clicca e trascina"}],"t8":[{pt:"arraste para mudar a ordem",en:"drag to change the draw order",es:"Arrastre para cambiar la orden",it:"Trascina per modificare l'ordine"}],"t9":[{pt:"A escala do tema &eacute; compat&iacute;vel com a escala do mapa",en:"The scale of the layer is compatible with the scale of the map",es:"La escala del tema es compatible con la escala del mapa",it:"La scala del tema è compatibile con la scala della mappa"}],"t10":[{pt:"A escala do tema &eacute incompat&iacute;vel com a escala do mapa",en:"The scale of the layer is incompatible with the scale of the map",es:"La escala del tema es incompatible con la escala del mapa",it:"La scala del tema è incompatibile con la scala della mappa"}],"t11":[{pt:"A escala do tema n&atilde;o &eacute conhecida",en:"The scale of the layer is not known",es:"La escala del tema no es conocida",it:"La scala del tema non è conosciuta"}],"t12":[{pt:"excluir",en:"delete",es:"Excluir",it:"Eliminare"}],"t12a":[{pt:"Clique para excluir esse tema do mapa.",en:"Delete layer of the map.",es:"Haga clic para excluir este tema del mapa",it:"Clicca per rimuovere questo strato della mappa"}],"t13":[{pt:"sobe",en:"up",es:"Sube",it:"Mettere sopra "}],"t14":[{pt:"Clique para subir esse tema na ordem de desenho",en:"Drag the layer up",es:"Haga clic para subir ese tema en la orden de dise&ntilde;o",it:"Clicca per sollevare questo tema nell’ordine di progettazione"}],"t15":[{pt:"desce",en:"down",es:"Baja",it:"scendere"}],"t16":[{pt:"Clique para descer esse tema na ordem de desenho",en:"Drag the layer down",es:"Haga clic para bajar este tema en la orden de dise&ntilde;o",it:"Clicca per scendere questo tema nell’ordine di progettazione."}],"t17":[{pt:"zoom para o tema",en:"zoom to a layer",es:"Zoom para el tema",it:"Zoom al tema"}],"t18":[{pt:"Clique para ajustar o mapa de forma a mostrar todo o tema",en:"Click to adjust the map in order to show the whole layer",es:"Haga clic para ajustar el mapa de forma para que muestre todo el tema",it:"Clicca per regolare la mappa per visualizzare tutto lo strato"}],"t18a":[{pt:"Op&ccedil;&otilde;es e propriedades",en:"Options",es:"Opciones",it:"Opzioni"}],"t18b":[{pt:"Legenda",en:"Legend",es:"Subtitulo",it:"Legenda"}],"t19":[{pt:"Altera a transparência do tema, possibilitando que as camadas inferiores possam ser vistas.",en:"Change the layer transparency.",es:"Altera la transparencia del tema, haciendo posible que las capas inferiores puedan verse",it:"Modifica la trasparenza del tema, consentendo che gli strati più bassi siano visti"}],"t20":[{pt:"Opacidade:",en:"Opacity",es:"Opacidad",it:"Opacità"}],"t21a":[{pt:"Muda o nome atual do tema. Utilize para melhorar a legenda do mapa.",en:"Change layer name.",es:"Cambia el nombre actual del tema. Utilice para mejorar el subtitulo del mapa.",it:"Cambia il nome del tema corrente. Utilizzare per migliorare la legenda della mappa."}],"t21":[{pt:"Novo nome:",en:"New name",es:"Nuevo nombre",it:"Nuovo nome"}],"t22":[{pt:"Localize elementos no tema com base em seus atributos descritivos.",en:"Find elements on the layer based on their descriptive attributes.",es:"Ubique elementos en el tema con base en sus atributos descriptivos",it:"Trova gli elementi nel tema secondo i suoi attributi descrittivi."}],"t23":[{pt:"Procurar",en:"Search...",es:"Buscar...",it:"Cerca..."}],"t24":[{pt:"Crie uma nova camada no mapa para apresentar textos descritivos sobre esse tema, tendo como base a tabela de atributos.",en:"Create a new layer to display descriptive texts on the subject, based on table of attributes.",es:"Crear una nueva capa en el mapa para presentar textos descriptivos sobre este tema, teniendo como base la tabla de atributos",it:"Creare un nuovo strato sulla mappa per visualizzare testi descrittivi sul tema, secondo la tabella di attributi."}],"t25":[{pt:"Texto (nomes ou valores)",en:"Label...",es:"Texto...",it:"Testo..."}],"t26":[{pt:"Defina as etiquetas que ser&atilde;o mostradas quando o mouse &eacute; estacionado sobre um elemento desse tema.",en:"Set the tooltips that will be shown when the mouse is over the element of that layer.",es:"Defina las etiquetas que se mostrar&aacute;n cuando el rat&oacute;n se estaciona sobre un elemento de este tema",it:"Definire le etichette da visualizzare quando il mouse si ferma su un elemento di questo tema."}],"t27":[{pt:"Ativar etiquetas",en:"Tooltip...",es:"Etiquetas...",it:"Descrizioni..."}],"t28":[{pt:"Insira um filtro nesse tema para mostrar apenas determinadas informa&ccedil;&otilde;es, com base na tabela de atributos.",en:"Filter based on the table of attributes.",es:"Inserte un filtro en este tema para mostrar solo determinadas informaciones, con base en la tabla de atributos",it:"Inserisci un filtro in questo tema per mostrare solo determinate informazioni, con base nella tabella di attributi"}],"t29":[{pt:"Filtrar",en:"Filter...",es:"Filtro...",it:"Filtro..."}],"t30":[{pt:"Veja a tabela de atributos relacionada a esse tema.",en:"See the table of attributes related to that layer.",es:"Vea la tabla de atributos relacionada con este tema",it:"Vedi la tabella degli attributi di questo tema."}],"t31":[{pt:"Tabela com os dados",en:"Table...",es:"Tabla...",it:"Tabella..."}],"t32":[{pt:"Abre o editor de legenda, permitindo a alteração da forma de representação desse tema.",en:"Opens the editor of legend, allowing the modification of the form of representation of this theme.",es:"Abre el editor de subtítulo, permitiendo la alteraci&oacute;n de la forma de representaci&oacute;n de este tema",it:"Aprire l'editor di legenda, che consente la modifica della forma di rappresentazione di questo tema "}],"t33":[{pt:"Editar legenda",en:"Legend edit...",es:"Editar subtítulo...",it:"Modifica la legenda"}],"t34":[{pt:"Mostra os dados desse tema em uma janela que acompanha o mouse.",en:"The data shows that layer in a window that tracks the mouse.",es:"Muestra los datos de este tema en una ventana que acompa&ntilde;a el rat&oacute;n",it:"Mostra i dati di questo tema in una finestra che accompagna il mouse."}],"t35":[{pt:"Mostra em janela",en:"Show in window",es:"Muestra en la ventana...",it:"Mostra nella finestra..."}],"t36":[{pt:"tema vis&iacute;vel apenas em determinadas escalas",en:"the layer is visible in specific scales",es:"capa visible en ciertas escalas",it:"Tema visibile solo a determinate scale"}],"t37":[{pt:"Gráfico",en:"Graphic",es:"Gr&aacute;fico",it:"Grafico"}],"t38":[{pt:"Exporta a legenda para o padrão SLD.",en:"Export the legend to SLD.",es:"Exporta a legenda para o padrão SLD.",it:"Exporta a legenda para o padrão SLD."}],"t39":[{pt:"Exportar SLD",en:"SLD...",es:"SLD...",it:"SLD..."}],"t40":[{pt:"Abre a ferramenta que permite alterar o SQL de acesso aos dados",en:"Abre a ferramenta que permite alterar o SQL de acesso aos dados",es:"Abre a ferramenta que permite alterar o SQL de acesso aos dados",it:"Abre a ferramenta que permite alterar o SQL de acesso aos dados"}],"t41":[{pt:"Editar SQL",en:"SQL...",es:"SQL...",it:"SQL..."}],"t42":[{pt:"Efeito cortina",en:"Curtain...",es:"Cortina...",it:"Tenda..."}],"t43":[{pt:"Aplicar SLD",en:"Aplicar SLD...",es:"Aplicar SLD...",it:"Aplicar SLD..."}],"t44":[{pt:"Salvar mapfile",en:"Save mapfile",es:"Guardar mapfile",it:"Salva mapfile"}],"t45":[{pt:"Comentar",en:"Comentar",es:"Comentar",it:"Comentar"}],"t46":[{pt:"Mais populares",en:"Mais populares",es:"Mais populares",it:"Mais populares"}],"t47":[{pt:"Intervalo em segundos após o qual a camada será atualizada. Para ignorar, deixe em branco",en:"Intervalo em segundos após o qual a camada será atualizada. Para ignorar, deixe em branco",es:"Intervalo em segundos após o qual a camada será atualizada. Para ignorar, deixe em branco",it:"Intervalo em segundos após o qual a camada será atualizada. Para ignorar, deixe em branco"}],"t48":[{pt:"Temporizador",en:"Temporizador",es:"Temporizador",it:"Temporizador"}],"a1":[{pt:"procurar tema:",en:"search layer:",es:"Buscar datos:",it:"Ricerca il tema:"}],"a2":[{pt:"Upload de shape file",en:"Upload shape file",es:"Upload de shape file",it:"Upload del shape file"}],"a2b":[{pt:"Upload de arquivo dbf ou CSV",en:"Upload dbf or CSV file",es:"Upload de archivo dbf o CSV",it:"Upload del file dbf o CSV"}],"a3":[{pt:"Download de dados",en:"Data download",es:"Download de datos",it:"Download dei dati"}],"a3a":[{pt:"Importar Web Map Context (WMC)",en:"Importar Web Map Context (WMC)",es:"Importar Web Map Context (WMC)",it:"Importar Web Map Context (WMC)"}],"a4":[{pt:"Conectar com servidor WMS",en:"WMS server connection",es:"Conectar con el servidor WMS",it:"Connetti con il server WMS"}],"a4b":[{pt:"Conectar com servidor WMS-T",en:"WMS-T server connection",es:"Conectar con el servidor WMS-T",it:"Connetti con il server WMS-T"}],"a5":[{pt:"Conectar com GeoRss",en:"GeoRss connection",es:"Conectar con GeoRss",it:"Connetti con il GeoRss"}],"a5a":[{pt:"Nuvem de tags",en:"Tags cloud",es:"Tags",it:"Tag"}],"a6":[{pt:"Acesso aos arquivos do servidor",en:"Access files in server directory",es:"Acceso a los archivos del servidor",it:"Accesso agli archivi del server"}],"a7":[{pt:"Temas",en:"Layers",es:"Temas",it:"Temi"}],"a8":[{pt:"Clique no box ao lado do tema para ligar ou desligar, mostrando-o ou nã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.",en:"Click to connect or disconnect layer, showing it or not on the map. After changing the layer status, wait a few moments to be redesigned the map, or click in the button apply that will be shown.",es:"Haga clic para conectar o desconectar este tema, mostr&aacute;ndolo o no en el mapa. Despu&eacute;s de alterar el estado del tema, espere algunos instantes para que el mapa sea redise&ntilde;ado, o haga clic en el bot&oacute;n aplicar que aparecer&aacute;",it:"Clicca sulla casella accanto al tema per attivare o disattivare, mostrandolo o meno sulla mappa. Dopo aver modificato lo stato del tema, attendere qualche istante per vedere ridisegnata la mappa, oppure fare clic sul pulsante Applica, che verrà visualizzato."}],"a9":[{pt:"fonte",en:"font",es:"Fuente",it:"Fonte"}],"a10":[{pt:"c&oacute;digo:",en:"code",es:"C&oacute;digo",it:"Codice"}],"a11":[{pt:"Sistemas",en:"Systems",es:"Sistemas",it:"Sistemi"}],"a12":[{pt:"Abrir sistema",en:"Open system",es:"Abrir sistema",it:"Aprire il sistema"}],"a13":[{pt:"Abrir no Google Earth",en:"Open in Google Earth",es:"Abrir no Google Earth",it:"Abrir no Google Earth"}],"a14":[{pt:"Upload SHP, CSV, DBF, GPX, KML",en:"Upload SHP, CSV, DBF, GPX, KML",es:"Upload SHP, CSV, DBF, GPX, KML",it:"Upload SHP, CSV, DBF, GPX, KML"}],"g1":[{pt:"Temas",en:"Layer",es:"Temas",it:"Temi"}],"g1a":[{pt:"Catálogo",en:"Catalog",es:"Catalogo",it:"Catalog"}],"g2":[{pt:"Adiciona",en:"Add",es:"Agrega",it:"Aggiunge"}],"g3":[{pt:"Legenda",en:"Legend",es:"Subtítulo",it:"Legenda"}],"g4":[{pt:"Mapas",en:"Maps",es:"Mapas",it:"Mappa"}],"g4a":[{pt:"Mapa",en:"Map",es:"Mapa",it:"Mappe"}],"o1":[{pt:"Aguarde...",en:"Wait...",es:"Espere...",it:"Attendere..."}],"o2":[{pt:"Busca r&aacute;pida...",en:"Quick search...",es:"B&uacute;squeda r&aacute;pida...",it:"Ricerca rapida ..."}],"o3":[{pt:"Lendo imagem...",en:"Loading images...",es:"Leyendo imagen...",it:"Lettura di immagini..."}],"o4":[{pt:"Aguarde...abrindo lente",en:"Wait...Opening lens...",es:"Espere...abriendo lente",it:"Attendere...apertura della lente"}],"o5":[{pt:"Aguarde...iniciando",en:"Wait...initializing",es:"Espere...iniciando",it:"Attendere...partenza"}],"o6":[{pt:"din&acirc;mico",en:"dynamic",es:"Din&aacute;mico",it:"Dinamico"}],"d1":[{pt:"Digite as coordenadas de um ponto (X=longitude e Y=latitude) para localiz&acute;-lo no mapa. O centro do mapa ser&acute; deslocado para o ponto digitado.",en:"Enter the coordinates of a point (X=longitude and Y=latitude) to localize it on the map. The center of the map is move to the point entered.",es:"Digite las coordenadas de un punto (X=longitud e Y=latitud) para ubicarlas en el mapa. El centro del mapa se desplazar&aacute; para el punto digitado.",it:"Inserisci le coordinate di un punto (X=longitudine e Y=latitudine) per individuarlo sulla mappa. Il centro della mappa viene spostato al punto digitato"}],"d2":[{pt:"Altera a escala do mapa ajustando-a para mostrar a mesma abrang&ecirc;ncia geogr&aacute;fica da inicializa&ccedil;&atilde;o.",en:"Change the scale of the map adjusting it to show the same initial geographical cover.",es:"Modifica la escala del mapa ajust&aacute;ndola para mostrar la misma &aacute;rea geogr&aacute;fica inicial",it:"Modificare la scala della mappa adeguandola per mostrare la stessa copertura geografica sin dall'inizializzazione"}],"d3":[{pt:"Amplia o mapa - desloca o ponto clicado para centro da tela ou amplia a regi&atilde;o indicada por um ret&acirc;ngulo. Ap&oacute;s ativada, clique e arraste o mouse sobre o mapa na &aacute;rea de zoom desejada.",en:"Extends the map - place the clicked point in the center of the screen or extends the region indicated by a rectangular.After enabled, click and drag the mouse over the map in the area of zoom desired.",es:"Ampl&iacute;a el mapa - coloca el punto donde se hizo clic en el centro de la pantalla o ampl&iacute;a la regi&oacute;n indicada por un rect&aacute;ngulo. Despu&eacute;s de activarla, haga clic y arrastre el rat&oacute;n sobre el mapa en el &aacute;rea de zoom deseada",it:"Ampliare la mappa - pone il punto cliccato nel centro dello schermo o ingrandisce la regione indicata con un rettangolo. Dopo aver attivata, cliccare e trascinare il mouse sopra la mappa nell’area di zoom desiderata."}],"d4":[{pt:"Desloca a regi&atilde;o vis&iacute;vel no mapa. Ap&oacute;s ativada, clique e arraste o mouse sobre o mapa para deslocar a regi&atilde;o vis&iacute;vel.",en:"Shifts the region visible on the map. Once activated, click and drag the mouse over the map to move the visible region.",es:"Desloca la regi&oacute;n visible en el mapa",it:"Sposta la regione visibile sulla mappa. Dopo averla attivata, cliccare e trascinare il mouse sulla mappa per spostare la regione visibile "}],"d5":[{pt:"Amplia o mapa tendo como refer&ecirc;ncia o centro atual.",en:"Magnify the map with the reference the current center.",es:"Ampl&iacute;a el mapa teniendo como referencia el centro actual",it:"Estendi la mappa tenendo come riferimento il centro corrente."}],"d6":[{pt:"Reduz o mapa tendo como refer&ecircncia o centro atual.",en:"Reduces the map as having reference the current center.",es:"Reduce el mapa teniendo como referencia el centro actual",it:"Riduci la mappa tenendo come referimento il centro corrente"}],"d7":[{pt:"Mostra informa&ccedil;&otilde;es sobre um ponto no mapa. Ap&oacute;s ativada, clique sobre o mapa.",en:"Displays information about a point on the map. Once activated, click on it.",es:"Muestra informaci&oacute;n sobre un punto en el mapa. Despu&eacute;s de activarla haga clic sobre el mismo.",it:"Mostra gli informazioni su un punto sulla mappa. Dopo averla attivata, fare clic su di esso."}],"d7a":[{pt:"Mostra informa&ccedil;&otilde;es sobre um ponto no mapa. Ap&oacute;s ativada, pare o mouse por alguns instantes no ponto desejado ou clique sobre o mesmo.",en:"Displays information about a point on the map. Once activated, stop the mouse for a few moments at the desired point or click on it.",es:"Muestra informaci&oacute;n sobre un punto en el mapa. Despu&eacute;s de activarla, pare el rat&oacute;n por algunos instantes en el punto deseado o haga clic sobre el mismo.",it:"Mostra gli informazioni su un punto sulla mappa. Dopo averla attivata, fermare il mouse per qualche istante nel punto desiderato o fare clic su di esso."}],"d8":[{pt:"Mostra a extens&atilde;o geogr&aacute;fica atual em coordenadas geogr&aacute;ficas",en:"It shows the extent of current geographic coordinates",es:"Muestra la extensi&oacute;n geográfica actual en coordenadas geogr&aacute;ficas",it:"Mostra la estensione geografica corrente in coordinate geografiche"}],"d9":[{pt:"Abre/fecha o mapa de refer&ecirc;ncia",en:"Open/close the reference map ",es:"Abre/cierra el mapa de referencia",it:"Apertura/chiusura della mappa di riferimento"}],"d10":[{pt:"Digite o novo valor de escala e clique no bot&atilde;o aplicar para alterar a escala do mapa",en:"Enter the new value of scale and click the button Apply to change the scale of the map",es:"Digite el nuevo valor de escala y haga clic en el bot&oacute;n aplicar para modificar la escala del mapa",it:"Immettere il nuovo valore di scala e clicca sul pulsante Applica per cambiare la scala della mappa"}],"d11":[{pt:"Busca dados na Wikipedia na abrang&ecirc;ncia atual do mapa. Fa&ccedil;a um zoom no mapa antes de abrir essa op&ccedil;&atilde;o. Regi&ocirc;es muito extensas podem tornar a busca muito demorada",en:"Search data on Wikipedia in the current scope of the map. Make a zoom on the map before opening this option. Regions very extensive can make a very long search ",es:"Busca datos en Wikipedia en el alcance actual del mapa. Haga zoom en el mapa antes de abrir esta opci&oacute;n. Regiones muy extensas pueden ocasionar una b&uacute;squeda muy lenta",it:"Ricerca dati su Wikipedia nell'ambito corrente della mappa. Fare uno zoom sulla mappa prima dell’apertura di questa opzione. Regioni molto ampie potrebbero causare una ricerca troppo lenta."}],"d12":[{pt:"Imprime o mapa",en:"Print the map",es:"Imprime el mapa",it:"Stampa la mappa"}],"d13":[{pt:"Localiza o IP do usu&aacute;rio no mapa",en:"Locates the user's IP on the map",es:"Ubica el IP del usuario en el mapa",it:"Trova IP dell'utente nella mappa"}],"d14":[{pt:"Gera arquivo para 3d",en:"Generates file for 3d",es:"Genera archivo para 3d",it:"Genera file per 3d"}],"d15":[{pt:"Abre o Google Maps, mostrando uma imagem de sat&eacute;lite da regi&atilde;o vista no mapa principal",en:"Open Google Maps, showing a satellite image of the region's main views on the map",es:"Abre Google Maps, mostrando una imagen de sat&eacute;lite de la regi&oacute;n en el mapa principal",it:"Apri Google Maps, mostrando un'immagine satellitare della regione vista sulla mappa principale."}],"d16":[{pt:"Pesquisa documentos na base de dados Scielo (dados preliminares)",en:"Search documents in the database Scielo (preliminary data)",es:"Busca documentos en la base de datos Scielo (datos preliminares)",it:"Ricerca dei documenti nella base di dati Scielo (dati preliminari)"}],"d17":[{pt:"Projeto Confluence. Pontos de intersec&ccedil;&atilde;o de coordenadas observadas em campo",en:"Confluence Project. Points of intersection of coordinates observed in field",es:"Proyecto Confluence. Puntos de intersecci&oacute;n de coordenadas observadas en campo",it:"Progetto di confluenza. Punti di intersezione delle coordinate osservate in campo"}],"d18":[{pt:"Abre lente de amplia&ccedil;&atilde;o",en:"Opens lens to expansion",es:"Abre lente de ampliaci&oacute;n",it:"Apri lente di ingrandimento"}],"d19":[{pt:"Coloca as guias em uma janela m&oacute;vel",en:"Open the tabs in a window mobile",es:"Coloca las gu&iacute;as en una ventana m&oacute;vil",it:"Aprire le schede in una finestra mobile."}],"d20":[{pt:"Redesenha o mapa com as configura&ccedil;&ocirc;es iniciais.",en:"Reload the map with the initial configurations.",es:"Redise&ntilde;a el mapa con las configuraciones iniciales",it:"Ricarica la mappa con la configurazione iniziale."}],"d21":[{pt:"Mede a dist&acirc;ncia entre dois ou mais pontos clicados no mapa (menor dist&acirc;ncia). O c&aacute;lculo de dist&acirc;ncia &eacute; aproximado e sua precis&atilde;o depende da escala do mapa.",en:"It measures the distance between two or more clicked points on the map (less distance). The calculation of distance is approximate and their accuracy depends on the scale of the map.",es:"Mide la distancia entre dos o m&aacute;s puntos marcados en el mapa (menor distancia). El c&aacute;lculo de distancia es aproximado y su precisi&oacute;n depende de la escala del mapa",it:"Misura la distanza tra due o più punti cliccati sulla mappa (minore distanza). Il calcolo della distanza è approssimativo e la sua precisione dipende dalla scala della mappa."}],"d21a":[{pt:"Mede a &aacute;rea de um pol&iacute;gono desenhado na tela. O c&aacute;lculo de &aacute;rea &eacute; aproximado e sua precis&atilde;o depende da escala do mapa.",en:"It measures the area on the map. The calculation of area is approximate and their accuracy depends on the scale of the map.",es:"Mede a &aacute;rea de um pol&iacute;gono desenhado na tela. O c&aacute;lculo de &aacute;rea &eacute; aproximado e sua precis&atilde;o depende da escala do mapa.",it:"Misura l'area di un poligono tracciato sullo schermo. Il calcolo della superficie è approssimativo e la sua precisione dipende dalla scala della mappa."}],"d22":[{pt:"Insere pontos no mapa em coordenadas geogr&aacute;ficas. Ospontos inclu&iacute;dos podem ser transformados em linhas ou pol&iacute;gonos. Os pontos s&atilde;o armazenados em um tema tempor&aacute;rio, podendo-se fazer o download do arquivo shapefile.",en:"Insert points on the map in geographical coordinates. Items included can be converted into lines or polygons. Items are stored in a temporary layer, can be to download shapefile.",es:"Inserte puntos en el mapa en coordenadas geogr&aacute;ficas. Los puntos incluidos pueden transformarse en l&iacute;neas o pol&iacute;gonos. Los puntos se almacenan en un tema temporal, pudiendo hacerse el download del archivo shapefile.",it:"Inserire punti sulla mappa in coordinate geografiche. I punti inseriti possono essere trasformati in linee o poligoni. I punti vengono memorizzati in un tema temporaneo, con la possibilità di effettuare il download del file Shapefile."}],"d23":[{pt:"Insere um gr&aacute;fico no ponto clicado conforme os atributos existentes no tema escolhido. O tema deve possuir itens com valores num&eacute;ricos na tabela de atributos.",en:"Insert a graphic in the clicked point as the exist attributes in the chosen layer. The layer must have items with numerical values in the table of attributes.",es:"Inserte un gr&aacute;fico en el punto marcado seg&uacute;n los atributos existentes en el tema elejido. El tema debe tener puntos con valores num&eacute;ricos en la tabla de atributos",it:"Inserire un grafico nel punto cliccato con gli attributi che esistono nel tema scelto. Il tema deve avere gli oggetti con valori numerici contenute nella tabella di attributi."}],"d24":[{pt:"Abre as ferramentas para sele&ccedil;&atilde;o de elementos de um tema. Os elementos selecionados podem ser utilizados em outras opera&ccedil;&ocirc;es, como buffer e sele&ccedil;&atilde;o por tema.",en:"Opens the tools to select elements of a layer. The elements selected can be used in other buffer or selection operation by layer .",es:"Abre las herramientas para selecci&oacute;n de elementos de un tema. Los elementos seleccionados pueden utilizarse en otras ",it:"Aprire gli strumenti per selezionare gli elementi di un tema. Gli elementi selezionati possono essere utilizzati in altre operazioni, come ad esempio buffer e selezione per tema."}],"d25":[{pt:"Insere texto no mapa clicando em um ponto. Utilize essa op&ccedil;&atilde;o para adicionar informa&ccedil;&ocirc;es ao mapa.",en:"Insert text on the map by clicking on a point. Use this option to add information on the map.",es:"Inserte texto en el mapa haciendo clic en un punto. Utilice esta opci&oacute;n para agregar informaci&oacute;n al mapa",it:"Inserisci il testo sulla mappa cliccando su un punto. Utilizzare questa opzione per aggiungere informazioni alla mappa."}],"d26":[{pt:"Escolha o visual para os botões e outras caracter&iacute;sticas visuais do mapa",en:"Choose look for the buttons and other map's visual characteristics",es:"Elija la vista para los botones y otras caracter&iacute;sticas visuales del mapa",it:"Scegli il visuale (??) per i pulsanti e le altre caratteristiche visive della mappa."}],"d27":[{pt:"Interface",en:"Interface",es:"Interface",it:"Interface"}],"d28":[{pt:"Aguarde...gerando os arquivos",en:"Wait...",es:"Espere...",it:"Attendere..."}],"d29":[{pt:"Estações metar",en:"Estações metar",es:"Estações metar",it:"Estações metar"}],"d30":[{pt:"Linha do tempo",en:"Time line",es:"Linha do tempo",it:"Linha do tempo"}],"d31":[{pt:"Não existe nenhuma camada com etiquetas ativas",en:"Não existe nenhuma camada com etiquetas ativas",es:"Não existe nenhuma camada com etiquetas ativas",it:"Não existe nenhuma camada com etiquetas ativas"}],"d32":[{pt:"Aplicativos",en:"Applications",es:"Aplicaciones",it:"Applicazioni"}],"ge1":[{pt:"Navegação com o mouse",en:"Navegação com o mouse",es:"Navegação com o mouse",it:"Navegação com o mouse"}],"ge2":[{pt:"Barra de status",en:"Barra de status",es:"Barra de status",it:"Barra de status"}],"ge3":[{pt:"Mapa de referência",en:"Mapa de referência",es:"Mapa de referência",it:"Mapa de referência"}],"ge4":[{pt:"Escala e legenda",en:"Escala e legenda",es:"Escala e legenda",it:"Escala e legenda"}],"ge5":[{pt:"Atmosfera",en:"Atmosfera",es:"Atmosfera",it:"Atmosfera"}],"ge6":[{pt:"Grade de coordenadas",en:"Grade de coordenadas",es:"Grade de coordenadas",it:"Grade de coordenadas"}],"ge7":[{pt:"Luz do sol",en:"Luz do sol",es:"Luz do sol",it:"Luz do sol"}],"ge8":[{pt:"Limites políticos",en:"Limites políticos",es:"Limites políticos",it:"Limites políticos"}],"ge9":[{pt:"Construções em 3d",en:"Construções em 3d",es:"Construções em 3d",it:"Construções em 3d"}],"ge10":[{pt:"Estradas",en:"Estradas",es:"Estradas",it:"Estradas"}],"ge11":[{pt:"Terreno",en:"Terreno",es:"Terreno",it:"Terreno"}]};if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.idioma={MOSTRASELETOR:true,IDSELETOR:"",SELETORES:["pt","en","es"],DICIONARIO:g_traducao,define:function(codigo){i3GEO.idioma.ATUAL=codigo;i3GEO.util.insereCookie("i3geolingua",codigo)},retornaAtual:function(){return(i3GEO.idioma.ATUAL)},defineDicionario:function(obj){i3GEO.idioma.DICIONARIO=obj},alteraDicionario:function(id,novo){i3GEO.idioma.DICIONARIO[id][0][i3GEO.idioma.ATUAL]=novo},traduzir:function(id){if(i3GEO.idioma.DICIONARIO[id]){var t=i3GEO.idioma.DICIONARIO[id][0];return t[i3GEO.idioma.ATUAL]}else{return}},adicionaDicionario:function(novodic){for(var k in novodic){if(novodic.hasOwnProperty(k)){i3GEO.idioma.DICIONARIO[k]=novodic[k]}}},mostraDicionario:function(){var w,k;w=window.open();for(k in i3GEO.idioma.DICIONARIO){if(i3GEO.idioma.DICIONARIO.hasOwnProperty(k)){w.document.write(k+" = "+i3GEO.idioma.traduzir(k)+"<br>")}}},trocaIdioma:function(codigo){i3GEO.util.insereCookie("i3geolingua",codigo);window.location.reload(true)},listaIdiomas:function(){for(var k in i3GEO.idioma.DICIONARIO){if(i3GEO.idioma.DICIONARIO.hasOwnProperty(k)){return(i3GEO.util.listaChaves(i3GEO.idioma.DICIONARIO[k][0]))}}},mostraSeletor:function(){if(!i3GEO.idioma.MOSTRASELETOR){return}var ins,n,w,i,pos,novoel,temp,iu=i3GEO.util;ins="";n=i3GEO.idioma.SELETORES.length;if($i("i3geo")&&i3GEO.parametros.w<550){w="width:12px;"}else{w=""}for(i=0;i<n;i++){temp=i3GEO.idioma.SELETORES[i];ins+='<img style="'+w+'padding:0 0px;top:-7px;padding-right:0px;border: 1px solid white;" src="'+iu.$im("branco.gif")+'" onclick="i3GEO.idioma.trocaIdioma(\''+temp+'\')" ';if(temp==="en"){ins+='alt="Ingles" id="uk" />'}if(temp==="pt"){ins+='alt="Portugues" id="brasil" />'}if(temp==="es"){ins+='alt="Espanhol" id="espanhol" />'}if(temp==="it"){ins+='alt="Italiano" id="italiano" />'}}if(i3GEO.idioma.IDSELETOR!==""&&$i(i3GEO.idioma.IDSELETOR)){$i(i3GEO.idioma.IDSELETOR).innerHTML=ins}else{pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if(!$i("i3geoseletoridiomas")){novoel=document.createElement("div");novoel.innerHTML=ins;novoel.id="i3geoseletoridiomas";document.body.appendChild(novoel)}else{novoel=$i("i3geoseletoridiomas")}novoel.style.position="absolute";novoel.style.top=pos[1]-17+"px";novoel.style.left=pos[0]+"px";novoel.style.zIndex=5000}}};var $trad=function(id){return(i3GEO.idioma.traduzir(id))};(function(){try{var c=i3GEO.util.pegaCookie("i3geolingua");if(c){i3GEO.idioma.define(c);g_linguagem=c}else{if(typeof(g_linguagem)!=="undefined"){i3GEO.idioma.define(g_linguagem)}else{g_linguagem="pt";i3GEO.idioma.define("pt")}}if(typeof('g_traducao')!=="undefined"){i3GEO.idioma.defineDicionario(g_traducao)}}catch(e){alert("Problemas com idiomas "+e)}})();if(typeof(i3GEO)==='undefined'){i3GEO=[]}cpJSON=new cpaint();cpJSON.set_response_type("JSON");i3GEO.php={verifica:function(){if(i3GEO.configura.locaplic===undefined){alert("i3GEO.php diz: variavel i3GEO.configura.locaplic não esta definida")}if(i3GEO.configura.sid===undefined){alert("i3GEO.php diz: variavel i3GEO.configura.sid não esta definida")}},insereSHPgrafico:function(funcao,tema,x,y,itens,shadow_height,width,inclinacao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=insereSHPgrafico&tipo=pizza&tema="+tema+"&x="+x+"&y="+y+"&itens="+itens+"&shadow_height="+shadow_height+"&width="+width+"&inclinacao="+inclinacao+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"insereSHPgrafico",funcao)},insereSHP:function(funcao,tema,item,valoritem,xy,projecao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=insereSHP&item="+item+"&valor="+valoritem+"&tema="+tema+"&xy="+xy+"&projecao="+projecao+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"insereSHP",funcao)},pegaMensagens:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegaMensagens&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaMensagem",funcao)},areaPixel:function(funcao,g_celula){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=areaPixel&celsize="+g_celula+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"areaPixel",funcao)},excluitema:function(funcao,temas){var layer,retorno,p,n,i;i3GEO.php.verifica();retorno=function(retorno){n=temas.length;for(i=0;i<n;i++){if(i3GEO.Interface.ATUAL==="openlayers"){layer=i3geoOL.getLayersByName(temas[i]);if(layer.length>0){i3geoOL.removeLayer(layer[0])}}if(i3GEO.Interface.ATUAL==="googlemaps"){indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(temas[i]);if(indice!==false){i3GeoMap.overlayMapTypes.removeAt(indice)}}if(i3GEO.Interface.ATUAL==="googleearth"){indice=i3GEO.Interface.googleearth.retornaObjetoLayer(temas[i]);i3GeoMap.getFeatures().removeChild(indice)}}funcao.call(retorno)};p=i3GEO.arvoreDeCamadas.LOCAPLIC+"/classesphp/mapa_controle.php?funcao=excluitema&temas="+temas+"&g_sid="+i3GEO.arvoreDeCamadas.SID;cpJSON.call(p,"excluitema",retorno)},reordenatemas:function(funcao,lista){i3GEO.php.verifica();var p=i3GEO.arvoreDeCamadas.LOCAPLIC+"/classesphp/mapa_controle.php?funcao=reordenatemas&lista="+lista+"&g_sid="+i3GEO.arvoreDeCamadas.SID;cpJSON.call(p,"reordenatemas",funcao)},criaLegendaHTML:function(funcao,tema,template){i3GEO.php.verifica();if(arguments.length===1){tema="";template="legenda2.htm"}if(arguments.length===2){template="legenda2.htm"}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=criaLegendaHTML&tema="+tema+"&templateLegenda="+template+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"criaLegendaHTML",funcao)},inverteStatusClasse:function(funcao,tema,classe){i3GEO.php.verifica();var p=i3GEO.arvoreDeCamadas.LOCAPLIC+"/classesphp/mapa_controle.php?funcao=inverteStatusClasse&g_sid="+i3GEO.arvoreDeCamadas.SID+"&tema="+tema+"&classe="+classe;cpJSON.call(p,"inverteStatusClasse",funcao)},ligatemas:function(funcao,desligar,ligar,adicionar){i3GEO.php.verifica();if(arguments.length===3){adicionar="nao"}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=ligatemas&desligar="+desligar+"&ligar="+ligar+"&adicionar="+adicionar+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"ligaDesligaTemas",funcao)},pegalistademenus:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegalistademenus&g_sid="+i3GEO.configura.sid+"&map_file=&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistademenus",funcao)},pegalistadegrupos:function(funcao,id_menu,listasgrupos){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegalistadegrupos&map_file=&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&listasistemas=nao&listasgrupos="+listasgrupos+"&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistadegrupos",funcao)},pegalistadeSubgrupos:function(funcao,id_menu,id_grupo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegalistadeSubgrupos&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&grupo="+id_grupo+"&map_file=&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistadeSubgrupos",funcao)},pegalistadetemas:function(funcao,id_menu,id_grupo,id_subgrupo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegalistadetemas&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&grupo="+id_grupo+"&subgrupo="+id_subgrupo+"&map_file=&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistadetemas",funcao)},listaTemas:function(funcao,tipo,locaplic,sid){if(arguments.length===2){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php?funcao=listatemas&g_sid="+sid+"&tipo="+tipo;cpJSON.call(p,"listaTemas",funcao)},listaTemasEditaveis:function(funcao,locaplic,sid){if(arguments.length===1){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php?funcao=listatemaslocais&g_sid="+sid;cpJSON.call(p,"listatemaslocais",funcao)},listaTemasComSel:function(funcao,locaplic,sid){if(arguments.length===1){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php?funcao=listatemascomsel&g_sid="+sid;cpJSON.call(p,"listaTemasComSel",funcao)},listatemasTipo:function(funcao,tipo,locaplic,sid){if(arguments.length===2){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php?funcao=&funcao=listatemasTipo&tipo="+tipo+"&g_sid="+sid;cpJSON.call(p,"listatemasTipo",funcao)},pegaSistemas:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegaSistemas&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaSistemas",funcao)},listadrives:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=listaDrives&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"listaDrives",funcao)},listaarquivos:function(funcao,caminho){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=listaArquivos&diretorio="+caminho;cpJSON.call(p,"listaArquivos",funcao)},geo2utm:function(funcao,x,y){i3GEO.php.verifica();if($i("aguardeGifAberto")||x<-180){return}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=geo2utm&x="+x+"&y="+y+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"geo2utm",funcao)},desativacgi:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=desativacgi&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"desativacgi",funcao)},pegaMapas:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegaMapas&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaSistemas",funcao)},mudatamanho:function(funcao,altura,largura){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=mudatamanho&altura="+altura+"&largura="+largura+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaSistemas",funcao)},ativalogo:function(funcao,altura,largura){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=ativalogo&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"ativalogo",funcao)},insereAnnotation:function(funcao,pin,xy,texto,position,partials,offsetx,offsety,minfeaturesize,mindistance,force,shadowcolor,shadowsizex,shadowsizey,outlinecolor,cor,sombray,sombrax,sombra,fundo,angulo,tamanho,fonte){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=inserefeature&pin="+pin+"&tipo=ANNOTATION&xy="+xy+"&texto="+texto+"&position="+position+"&partials="+partials+"&offsetx="+offsetx+"&offsety="+offsety+"&minfeaturesize="+minfeaturesize+"&mindistance="+mindistance+"&force="+force+"&shadowcolor="+shadowcolor+"&shadowsizex="+shadowsizex+"&shadowsizey="+shadowsizey+"&outlinecolor="+outlinecolor+"&cor="+cor+"&sombray="+sombray+"&sombrax="+sombrax+"&sombra="+sombra+"&fundo="+fundo+"&angulo="+angulo+"&tamanho="+tamanho+"&fonte="+fonte+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"inserefeature",funcao)},identificaunico:function(funcao,xy,tema,item){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=identificaunico&xy="+xy+"&resolucao=5&tema="+tema+"&item="+item+"&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"identificaunico",funcao)},recuperamapa:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=recuperamapa&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"recuperamapa",funcao)},criaLegendaImagem:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=criaLegendaImagem&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"criaLegendaImagem",funcao)},referenciadinamica:function(funcao,zoom,tipo){i3GEO.php.verifica();if(arguments.length===2){tipo="dinamico"}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=referenciadinamica&g_sid="+i3GEO.configura.sid+"&zoom="+zoom+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"retornaReferenciaDinamica",funcao)},referencia:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=referencia&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"retornaReferencia",funcao)},pan:function(funcao,escala,tipo,x,y){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pan&escala="+escala+"&tipo="+tipo+"&x="+x+"&y="+y+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pan",funcao)},aproxima:function(funcao,nivel){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=aproxima&nivel="+nivel+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"aproxima",funcao)},afasta:function(funcao,nivel){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=afasta&nivel="+nivel+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"afasta",funcao)},zoomponto:function(funcao,x,y,tamanho,simbolo,cor){i3GEO.php.verifica();if(!simbolo){simbolo="ponto"}if(!tamanho){tamanho=15}if(!cor){cor="255 0 0"}var retorno=function(retorno){if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.pan2ponto(x,y);i3GEO.janela.fechaAguarde()}if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.pan2ponto(x,y);i3GEO.janela.fechaAguarde()}funcao.call(retorno)},p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=zoomponto&pin=pin&xy="+x+" "+y+"&g_sid="+i3GEO.configura.sid+"&marca="+simbolo+"&tamanho="+tamanho+"&cor="+cor;cpJSON.call(p,"zoomponto",retorno)},localizaIP:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=localizaIP&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"localizaIP",funcao)},mudaext:function(funcao,tipoimagem,ext,locaplic,sid,atualiza,geo){var retorno,p;if(arguments.length===3){i3GEO.php.verifica();locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid;atualiza=true;geo=false}if(geo===undefined){geo=false}if(atualiza===undefined){atualiza=true}if(ext===undefined){alert("extensao nao definida");return}retorno=function(retorno){switch(i3GEO.Interface.ATUAL){case"googlemaps":if(atualiza===true){i3GEO.Interface.googlemaps.zoom2extent(ext)}break;case"googleearth":if(atualiza===true){i3GEO.Interface.googleearth.zoom2extent(ext)}break;case"openlayers":i3GEO.Interface.openlayers.zoom2ext(ext);break}i3GEO.janela.fechaAguarde();try{funcao.call(retorno)}catch(e){}};p=locaplic+"/classesphp/mapa_controle.php?funcao=mudaext&tipoimagem="+tipoimagem+"&ext="+ext+"&g_sid="+sid+"&geo="+geo;cpJSON.call(p,"mudaext",retorno)},mudaescala:function(funcao,escala){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=mudaescala&escala="+escala+"&g_sid="+i3GEO.configura.sid+"&tipoimagem="+i3GEO.configura.tipoimagem;cpJSON.call(p,"mudaescala",funcao)},aplicaResolucao:function(funcao,resolucao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=crialente&resolucao="+resolucao+"&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"crialente",funcao)},geradestaque:function(funcao,tema,ext){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=geradestaque&tema="+tema+"&g_sid="+i3GEO.configura.sid+"&ext="+ext;cpJSON.call(p,"geradestaque",funcao)},selecaopt:function(funcao,tema,xy,tipo,tolerancia){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=selecaopt&tema="+tema+"&tipo="+tipo+"&xy="+xy+"&tolerancia="+tolerancia+"&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaoPT",funcao)},selecaobox:function(funcao,tema,tipo,box){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=selecaobox&ext="+box+"&g_sid="+i3GEO.configura.sid+"&tipo="+tipo+"&tema="+tema+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaobox",funcao)},selecaoext:function(funcao,tema,tipo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=selecaoext&tema="+tema+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaobox",funcao)},selecaoatrib2:function(funcao,tema,filtro,tipo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=selecaoatrib2&tema="+tema+"&filtro="+filtro+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaoatrib2",funcao)},selecaotema:function(funcao,temao,tema,tipo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=selecaotema&temao="+temao+"&tema="+tema+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaotema",funcao)},sobetema:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=sobetema&tema="+tema+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"sobetema",funcao)},descetema:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?&funcao=descetema&tema="+tema+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"descetema",funcao)},fontetema:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=fontetema&tema="+tema+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"fontetema",funcao)},zoomtema:function(funcao,tema){i3GEO.php.verifica();var retorno,p;retorno=function(retorno){switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde();break;case"googleearth":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde();break;case"openlayers":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde();break;case"padrao":i3GEO.atualiza(retorno);break}};p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=zoomtema&tema="+tema+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"zoomtema",retorno)},zoomsel:function(funcao,tema){i3GEO.php.verifica();var retorno,p;retorno=function(retorno){switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde();break;case"googleearth":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde();break;case"openlayers":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde();break;case"padrao":i3GEO.atualiza(retorno);break}};p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=zoomsel&tema="+tema+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"zoomsel",retorno)},limpasel:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=limpasel&tema="+tema+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"limpasel",funcao)},invertestatuslegenda:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=invertestatuslegenda&tema="+tema+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"invertestatuslegenda",funcao)},aplicaCorClasseTema:function(funcao,idtema,idclasse,rgb){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=alteraclasse&opcao=alteracor&tema="+idtema+"&idclasse="+idclasse+"&cor="+rgb+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"aplicaCorClasseTema",funcao)},mudatransp:function(funcao,tema,valor){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=mudatransp&tema="+tema+"&valor="+valor+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"mudatransp",funcao)},mudanome:function(funcao,tema,valor){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=mudanome&tema="+tema+"&valor="+valor+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"mudanome",funcao)},adicionaTemaWMS:function(funcao,servico,tema,nome,proj,formato,versao,nomecamada,tiporep,suportasld,formatosinfo,locaplic,sid){if(arguments.length===11){i3GEO.php.verifica();locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php?g_sid="+sid+"&funcao=adicionatemawms&servico="+servico+"&tema="+tema+"&nome="+nome+"&proj="+proj+"&formato="+formato+"&versao="+versao+"&nomecamada="+nomecamada+"&tiporep="+tiporep+"&suportasld="+suportasld+"&formatosinfo="+formatosinfo;cpJSON.call(p,"adicionatemawms",funcao)},adicionaTemaSHP:function(funcao,path){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=adicionaTemaSHP&arq="+path;cpJSON.call(p,"adicionaTemaSHP",funcao)},adicionaTemaIMG:function(funcao,path){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=adicionaTemaIMG&arq="+path;cpJSON.call(p,"adicionaTemaIMG",funcao)},identifica:function(funcao,x,y,resolucao,locaplic,sid){var p=locaplic+"/classesphp/mapa_controle.php?funcao=identifica&opcao=tip&xy="+x+","+y+"&resolucao=5&g_sid="+sid;cpJSON.call(p,"identifica",funcao)},identifica2:function(funcao,x,y,resolucao,opcao,locaplic,sid,tema,ext,listaDeTemas){if(arguments.length===4){opcao="tip";locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid;ext="";listaDeTemas=""}if(arguments.length===5){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid;ext="";listaDeTemas=""}if(listaDeTemas===undefined){listaDeTemas=""}var p=locaplic+"/classesphp/mapa_controle.php?funcao=identifica2&opcao="+opcao+"&xy="+x+","+y+"&resolucao=5&g_sid="+sid+"&ext="+ext+"&listaDeTemas="+listaDeTemas;if(opcao!=="tip"){p+="&tema="+tema}cpJSON.call(p,"identifica",funcao)},reiniciaMapa:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=reiniciaMapa&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"reiniciaMapa",funcao)},procurartemas:function(funcao,procurar,locaplic){if(arguments.length===2){locaplic=i3GEO.configura.locaplic}try{var p=locaplic+"/classesphp/mapa_controle.php?funcao=procurartemas&map_file=&procurar="+procurar+"&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"procurartemas",funcao)}catch(e){}},procurartemas2:function(funcao,procurar,locaplic){if(arguments.length===2){locaplic=i3GEO.configura.locaplic}try{var p=locaplic+"/classesphp/mapa_controle.php?funcao=procurartemas2&map_file=&procurar="+procurar+"&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"procurartemas",funcao)}catch(e){}},procurartemasestrela:function(funcao,nivel,fatorestrela,locaplic){if(arguments.length===3){locaplic=i3GEO.configura.locaplic}try{var p=locaplic+"/classesphp/mapa_controle.php?funcao=procurartemasestrela&map_file=&nivel="+nivel+"&fatorestrela="+fatorestrela+"&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"foo",funcao)}catch(e){}},adtema:function(funcao,temas,locaplic,sid){if(arguments.length===2){i3GEO.php.verifica();locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php?funcao=adtema&temas="+temas+"&g_sid="+sid;cpJSON.call(p,"adtema",funcao)},escalagrafica:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=escalagrafica&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"escalagrafica",funcao)},flamingo:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=montaFlamingo&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"montaFlamingo",funcao)},googlemaps:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=googlemaps&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"googlemaps",funcao)},googleearth:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=googleearth&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"googleearth",funcao)},openlayers:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=openlayers&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"openlayers",funcao)},corpo:function(funcao,tipoimagem){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=corpo&tipoimagem="+tipoimagem+"&g_sid="+i3GEO.configura.sid+"&interface="+i3GEO.Interface.ATUAL;if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.recalcPar();p+="&mapexten="+i3GEO.parametros.mapexten}cpJSON.call(p,"corpo",funcao)},criamapa:function(funcao,parametros){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=criaMapa&"+parametros;cpJSON.call(p,"criaMapa",funcao)},inicia:function(funcao,embedLegenda,w,h){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=inicia&embedLegenda="+embedLegenda+"&w="+w+"&h="+h+"&g_sid="+i3GEO.configura.sid+"&interface="+i3GEO.Interface.ATUAL;cpJSON.call(p,"iniciaMapa",funcao)},chaveGoogle:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=chavegoogle&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"chavegoogle",funcao)},listaRSSwsARRAY:function(funcao,tipo){var p=i3GEO.configura.locaplic+"/classesphp/wscliente.php?funcao=listaRSSwsARRAY&rss="+["|"]+"&tipo="+tipo;cpJSON.call(p,"listaRSSwsARRAY",funcao)},listaLayersWMS:function(funcao,servico,nivel,id_ws,nomelayer){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=listaLayersWMS&servico="+servico+"&nivel="+nivel+"&id_ws="+id_ws+"&nomelayer="+nomelayer;cpJSON.call(p,"listaLayersWMS",funcao)},buscaRapida:function(funcao,locaplic,servico,palavra){var p=locaplic+"/classesphp/mapa_controle.php?map_file=&funcao=buscaRapida&palavra="+palavra+"&servico="+servico;cpJSON.call(p,"buscaRapida",funcao)},listaItensTema:function(funcao,tema){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=listaitens&tema="+tema+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"listaItensTema",funcao)},listaValoresItensTema:function(funcao,tema,itemTema){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=listaregistros&unico=sim&tema="+tema+"&itemtema="+itemTema+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"listaRegistros",funcao)},extRegistros:function(funcao,tema,reg){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=extregistros&registro="+reg+"&tema="+tema;cpJSON.call(p,"listaItensTema",funcao)},listaFontesTexto:function(funcao){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=listatruetype";cpJSON.call(p,"listaTrueType",funcao)},listaEpsg:function(funcao){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=listaEpsg";cpJSON.call(p,"listaEpsg",funcao)},criatemaSel:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=criatemasel&tema="+tema+"&nome=Novo tema "+tema;cpJSON.call(p,"chavegoogle",funcao)},pegaData:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=pegadata&tema="+tema;cpJSON.call(p,"pegadata",funcao)},alteraData:function(funcao,tema,data){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=alteradata&tema="+tema+"&novodata="+data;cpJSON.call(p,"alteradata",funcao)},dadosPerfilRelevo:function(funcao,opcao,pontos,amostragem,item){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=dadosPerfilRelevo&opcao="+opcao,cp=new cpaint();cp.set_transfer_mode('POST');cp.set_response_type("JSON");cp.call(p,"foo",funcao,"&pontos="+pontos+"&amostragem="+amostragem+"&item="+item)},funcoesGeometriasWkt:function(funcao,listaWkt,operacao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=funcoesGeometriasWkt&operacao="+operacao,cp=new cpaint();cp.set_transfer_mode('POST');cp.set_response_type("JSON");cp.call(p,"foo",funcao,"&geometrias="+listaWkt)}};if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.configura={grupoLayers:"",oMenuData:{menu:[{nome:$trad("s1"),id:"ajudaMenu"},{nome:$trad("s2"),id:"analise"},{nome:$trad("s3"),id:"janelas"},{nome:$trad("s4"),id:"arquivos"},{nome:$trad("d32"),id:"interface"}],submenus:{"ajudaMenu":[{id:"omenudataAjudamenu1",text:$trad("u1"),url:"http://www.softwarepublico.gov.br/spb/ver-comunidade?community_id=1444332",target:"_blank"},{id:"omenudataAjudamenu2",text:$trad("u2"),url:"javascript:i3GEO.ajuda.abreDoc()"},{id:"omenudataAjudamenu3",text:$trad("u3"),url:"http://pt.wikibooks.org/wiki/I3geo",target:"_blank"},{id:"omenudataAjudamenu4",text:$trad("u4"),url:"http://www.softwarepublico.gov.br/dotlrn/clubs/i3geo/file-storage/index?folder%5fid=22667525",target:"_blank"},{id:"omenudataAjudamenu5",text:$trad("u5a"),url:"http://www.softwarepublico.gov.br",target:"_blank"},{id:"omenudataAjudamenu7",text:$trad("u5b"),url:"../ajuda_usuario.php",target:"_blank"},{id:"omenudataAjudamenu8",text:$trad("u5c"),url:"javascript:i3GEO.ajuda.redesSociais()"}],"analise":[{id:"omenudataAnalise1",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u22")+'</b></span>',url:"#"},{id:"omenudataAnalise2",text:$trad("u7"),url:"javascript:i3GEO.analise.dialogo.gradePol()"},{id:"omenudataAnalise3",text:$trad("u8"),url:"javascript:i3GEO.analise.dialogo.gradePontos()"},{id:"omenudataAnalise4",text:$trad("u9"),url:"javascript:i3GEO.analise.dialogo.gradeHex()"},{id:"omenudataAnalise5",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u23")+'</b></span>',url:"#"},{id:"omenudataAnalise6",text:$trad("u11a"),url:"javascript:i3GEO.analise.dialogo.distanciaptpt()"},{id:"omenudataAnalise7",text:$trad("u12"),url:"javascript:i3GEO.analise.dialogo.nptPol()"},{id:"omenudataAnalise8",text:$trad("u13"),url:"javascript:i3GEO.analise.dialogo.pontoempoligono()"},{id:"omenudataAnalise9",text:$trad("u14"),url:"javascript:i3GEO.analise.dialogo.pontosdistri()"},{id:"omenudataAnalise9a",text:$trad("u28"),url:"javascript:i3GEO.analise.dialogo.centromassa()"},{id:"omenudataAnalise10",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u24")+'</b></span>',url:"#"},{id:"omenudataAnalise11",text:$trad("u25"),url:"javascript:i3GEO.analise.dialogo.dissolve()"},{id:"omenudataAnalise12",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u27")+'</b></span>',url:"#"},{id:"omenudataAnalise13",text:$trad("u6"),url:"javascript:i3GEO.analise.dialogo.analisaGeometrias()"},{id:"omenudataAnalise14",text:$trad("u10"),url:"javascript:i3GEO.analise.dialogo.buffer()"},{id:"omenudataAnalise15",text:$trad("u26"),url:"javascript:i3GEO.analise.dialogo.agrupaElementos()"},{id:"omenudataAnalise16",text:$trad("u11"),url:"javascript:i3GEO.analise.dialogo.centroide()"},{id:"omenudataAnalise17",text:$trad("t37"),url:"javascript:i3GEO.analise.dialogo.graficoInterativo()"},{id:"omenudataAnalise18",text:$trad("d30"),url:"javascript:i3GEO.analise.dialogo.linhaDoTempo()"}],"janelas":[{id:"omenudataJanelas1",text:$trad("u15"),url:"javascript:i3GEO.barraDeBotoes.reativa(0);i3GEO.barraDeBotoes.reativa(1)"},{id:"omenudataJanelas2",text:$trad("u16"),url:"javascript:i3GEO.ajuda.abreJanela()"},{id:"omenudataJanelas3",text:$trad("u29"),url:"javascript:i3GEO.barraDeBotoes.editor.inicia()"}],"arquivos":[{id:"omenudataArquivos1",text:$trad("u17"),url:"javascript:i3GEO.mapa.dialogo.salvaMapa()"},{id:"omenudataArquivos2",text:$trad("u18"),url:"javascript:i3GEO.mapa.dialogo.carregaMapa()"},{id:"omenudataArquivos3",text:$trad("u19"),url:"javascript:i3GEO.gadgets.quadros.listaImagens()"},{id:"omenudataArquivos4",text:$trad("u20"),url:"javascript:i3GEO.mapa.dialogo.convertews()"},{id:"omenudataArquivos5",text:$trad("u20a"),url:"javascript:i3GEO.mapa.dialogo.convertekml()"}],"interface":[{id:"omenudataInterface1",text:"Interface normal",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/geral.htm?'+i3GEO.configura.sid"},{id:"omenudataInterface2",text:"OpenLayers",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/openlayers.htm?'+i3GEO.configura.sid"},{id:"omenudataInterface10",text:"OpenLayers tablet",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/openlayers_t.htm?'+i3GEO.configura.sid"},{id:"omenudataInterface3",text:"Flash",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/flamingo.htm?'+i3GEO.configura.sid"},{id:"omenudataInterface4",text:"Google Maps",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/googlemaps.phtml?'+i3GEO.configura.sid"},{id:"omenudataInterface5",text:"Google Earth",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/googleearth.phtml?'+i3GEO.configura.sid"},{id:"omenudataInterface6",text:$trad("u21"),url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/geradordelinks.htm')"},{id:"omenudataInterface7",text:"Serviços WMS",url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/ogc.htm')"},{id:"omenudataInterface8",text:"Hiperbólica",url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/hiperbolica.html')"},{id:"omenudataInterface9",text:"Download de dados",url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/datadownload.htm')"},{id:"omenudataInterface11",text:$trad("p20"),url:"javascript:i3GEO.mapa.dialogo.telaRemota()"}]}},tipoimagem:"nenhum",tipotip:"balao",alturatip:"200px",larguratip:"200px",funcaoTip:"i3GEO.mapa.dialogo.verificaTipDefault()",funcaoIdentifica:"i3GEO.mapa.dialogo.cliqueIdentificaDefault()",diminuixM:0,diminuixN:0,diminuiyM:100,diminuiyN:70,autotamanho:false,map3d:"",embedLegenda:"nao",templateLegenda:"",mashuppar:"",sid:"",locaplic:"",mapaRefDisplay:"block",visual:"default",cursores:{"identifica":{ff:"pointer",ie:"pointer"},"pan":{ff:"/imagens/cursores/pan.png",ie:"/imagens/cursores/pan.cur"},"area":{ff:"crosshair",ie:"crosshair"},"distancia":{ff:"crosshair",ie:"crosshair"},"zoom":{ff:"/imagens/cursores/zoom.png",ie:"/imagens/cursores/zoom.cur"},"contexto":{ff:"/imagens/cursores/contexto.png",ie:"/imagens/cursores/contexto.cur"},"identifica_contexto":{ff:"pointer",ie:"pointer"},"pan_contexto":{ff:"/imagens/cursores/pan_contexto.png",ie:"/imagens/cursores/pan_contexto.cur"},"zoom_contexto":{ff:"/imagens/cursores/zoom_contexto.png",ie:"/imagens/cursores/zoom_contexto.cur"}},listaDePropriedadesDoMapa:{"propriedades":[{text:"p2",url:"javascript:i3GEO.mapa.dialogo.tipoimagem()"},{text:"p15",url:"javascript:i3GEO.mapa.dialogo.outputformat()"},{text:"p3",url:"javascript:i3GEO.mapa.dialogo.opcoesLegenda()"},{text:"p4",url:"javascript:i3GEO.mapa.dialogo.opcoesEscala()"},{text:"p5",url:"javascript:i3GEO.mapa.dialogo.tamanho()"},{text:"p6",url:"javascript:i3GEO.navega.entorno.ativaDesativa()"},{text:"p7",url:"javascript:i3GEO.mapa.ativaLogo()"},{text:"p8",url:"javascript:i3GEO.mapa.dialogo.queryMap()"},{text:"p9",url:"javascript:i3GEO.mapa.dialogo.corFundo()"},{text:"p10",url:"javascript:i3GEO.mapa.dialogo.gradeCoord()"},{text:"p12",url:"javascript:i3GEO.mapa.dialogo.autoredesenha()"}]},tempoAplicar:4000,tempoMouseParado:2500,iniciaJanelaMensagens:true,mostraRosaDosVentos:"nao",liberaGuias:"nao",entorno:"nao",funcoesBotoes:{"botoes":[{iddiv:"historicozoom",tipo:"",dica:$trad("d1"),constroiconteudo:'i3GEO.gadgets.mostraHistoricoZoom()'},{iddiv:"zoomtot",tipo:"",dica:$trad("d2"),funcaoonclick:function(){if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.extentTotal);return}if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.extentTotal);return}i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,i3GEO.configura.tipoimagem,i3GEO.parametros.extentTotal);marcadorZoom=""}},{iddiv:"zoomli",tipo:"dinamico",dica:$trad("d3"),funcaoonclick:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.janela.mensagemSimples("Pressione a tecla CTRL junto com o botão esquerdo do mouse e arraste para definir a área de zoom","?");g_tipoacao='pan';g_operacao='navega';i3GEO.barraDeBotoes.ativaIcone("pan");i3GEO.barraDeBotoes.BOTAOPADRAO="pan";i3GeoMap.setOptions({draggable:true});i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pan",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic);return}var temp;temp="zoom";if(i3GEO.Interface.ATIVAMENUCONTEXTO&&i3GEO.Interface.ATUAL==="padrao"){temp="zoom_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic);g_operacao='navega';g_tipoacao='zoomli';i3GEO.barraDeBotoes.ativaIcone("zoomli");marcadorZoom="";if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLzoom);return}if(!$i("i3geoboxZoom")){i3GEO.navega.zoomBox.criaBox()}if(i3GEO.eventos.MOUSEDOWN.toString().search("i3GEO.navega.zoomBox.inicia()")<0){i3GEO.eventos.MOUSEDOWN.push("i3GEO.navega.zoomBox.inicia()")}if(i3GEO.eventos.MOUSEUP.toString().search("i3GEO.navega.zoomBox.termina()")<0){i3GEO.eventos.MOUSEUP.push("i3GEO.navega.zoomBox.termina()")}i3GEO.barraDeBotoes.BOTAOPADRAO="zoomli"}},{iddiv:"pan",tipo:"dinamico",dica:$trad("d4"),funcaoonclick:function(){var temp;g_tipoacao='pan';g_operacao='navega';i3GEO.barraDeBotoes.ativaIcone("pan");i3GEO.barraDeBotoes.BOTAOPADRAO="pan";if(i3GEO.Interface.ATUAL==="googlemaps"){i3GeoMap.setOptions({draggable:true});i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pan",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic);return}if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="pan";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="pan_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}marcadorZoom="";if(i3GEO.Interface.ATUAL==="openlayers"){return}panMapaInicia=function(exy){var k;leftinicial=0;topinicial=0;if($i("img")&&(g_tipoacao==="pan")){try{if(arguments.length>0){if(navm){k=event.button}else{k=exy.button}if(k===2){return}}}catch(h){}g_panM="sim";if($i(i3GEO.Interface.IDCORPO)){leftinicial=parseInt($i(i3GEO.Interface.IDCORPO).style.left,10);topinicial=parseInt($i(i3GEO.Interface.IDCORPO).style.top,10)}clicinicialx=objposicaocursor.imgx;clicinicialy=objposicaocursor.imgy;ddinicialx=objposicaocursor.ddx;ddinicialy=objposicaocursor.ddy;boxrefObj=$i("boxref");if(boxrefObj){proporcaoBox=i3GEO.parametros.w/parseInt(boxrefObj.style.width,10);boxrefObjLeft=parseInt(boxrefObj.style.left,10);boxrefObjTop=parseInt(boxrefObj.style.top,10)}}};panMapaDesloca=function(){var nx,ny,l,t;if(typeof(g_panM)!=='undefined'&&$i(i3GEO.Interface.IDMAPA)&&(g_panM==="sim")){nx=objposicaocursor.telax-leftinicial-clicinicialx;ny=objposicaocursor.telay-topinicial-clicinicialy;if(i3GEO.configura.entorno==="nao"){l=0;if(parseInt($i("i3geo").style.left,10)){l=parseInt($i("i3geo").style.left,10)}$i(i3GEO.Interface.IDMAPA).style.left=nx-l;t=0;if(parseInt($i("i3geo").style.top,10)){t=parseInt($i("i3geo").style.top,10)}$i(i3GEO.Interface.IDMAPA).style.top=ny-t;if(boxrefObj){boxrefObj.style.left=boxrefObjLeft-(nx/proporcaoBox);boxrefObj.style.top=boxrefObjTop-(ny/proporcaoBox)}}else{$left("img",i3GEO.parametros.w*-1+nx);$left("imgS",i3GEO.parametros.w*-1+nx);$left("imgL",i3GEO.parametros.w+nx);$left("imgO",i3GEO.parametros.w*-3+nx);$left("imgN",i3GEO.parametros.w*-1+nx);$top("img",i3GEO.parametros.h*-1+ny);$top("imgS",i3GEO.parametros.h*-1+ny);$top("imgL",i3GEO.parametros.h*-1+ny);$top("imgN",i3GEO.parametros.h*-1+ny);$top("imgO",i3GEO.parametros.h*-1+ny)}}};panMapaTermina=function(){if(g_tipoacao==="pan"){marcadorZoom="";g_panM="nao";try{var f="i3GEO.navega.timerNavega = null;if("+"i3GEO.navega.xy2xy('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"',"+ddinicialx+","+ddinicialy+","+objposicaocursor.ddx+","+objposicaocursor.ddy+",'"+i3GEO.parametros.mapexten+"','"+i3GEO.configura.tipoimagem+"'"+") == false"+"){"+"i3GEO.navega.zoompontoIMG('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"',"+objposicaocursor.imgx+","+objposicaocursor.imgy+")"+"}";clearTimeout(i3GEO.navega.timerNavega);i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)}catch(e){}}};if(i3GEO.eventos.MOUSEDOWN.toString().search("panMapaInicia()")<0){i3GEO.eventos.MOUSEDOWN.push("panMapaInicia()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("panMapaDesloca()")<0){i3GEO.eventos.MOUSEMOVE.push("panMapaDesloca()")}if(i3GEO.eventos.MOUSEUP.toString().search("panMapaTermina()")<0){i3GEO.eventos.MOUSEUP.push("panMapaTermina()")}}},{iddiv:"zoomiauto",tipo:"",dica:$trad("d5"),funcaoonclick:function(){i3GEO.navega.zoomin(i3GEO.configura.locaplic,i3GEO.configura.sid);marcadorZoom=''}},{iddiv:"zoomoauto",tipo:"",dica:$trad("d6"),funcaoonclick:function(){i3GEO.navega.zoomout(i3GEO.configura.locaplic,i3GEO.configura.sid);marcadorZoom=""}},{iddiv:"identifica",tipo:"dinamico",dica:$trad("d7"),funcaoonclick:function(){var temp;if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO&&i3GEO.Interface.ATUAL!=="googlemaps"){temp="identifica_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}i3GEO.barraDeBotoes.ativaIcone("identifica");g_tipoacao='identifica';g_operacao='identifica';cliqueIdentifica=function(){if(g_operacao==="identifica"||i3GEO.barraDeBotoes.BOTAOPADRAO==="identifica"){g_operacao="identifica";eval(i3GEO.configura.funcaoIdentifica)}var temp=function(){$i("i3GEOmarcaIdentifica").style.display="none"},i;i3GEO.util.criaPin("i3GEOmarcaIdentifica",i3GEO.configura.locaplic+"/imagens/marcaidentify.png",48,48,temp);i3GEO.util.posicionaImagemNoMapa("i3GEOmarcaIdentifica");i=$i("i3GEOmarcaIdentifica");if(i){i.style.display="block"}};if(i3GEO.eventos.MOUSECLIQUE.toString().search("cliqueIdentifica()")<0){i3GEO.eventos.MOUSECLIQUE.push("cliqueIdentifica()")}if(i3GEO.eventos.MOUSECLIQUE.toString().search("verificaTip()")>0){i3GEO.eventos.MOUSECLIQUE.remove("verificaTip()")}if(i3GEO.eventos.MOUSEPARADO.toString().search("verificaTip()")>0){i3GEO.eventos.MOUSEPARADO.remove("verificaTip()")}}},{iddiv:"identificaBalao",tipo:"dinamico",dica:$trad("d7a"),funcaoonclick:function(){if(i3GEO.arvoreDeCamadas.filtraCamadas("etiquetas","","diferente",i3GEO.arvoreDeCamadas.CAMADAS)===""){alert($trad("d31"));return}var temp;if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}i3GEO.barraDeBotoes.ativaIcone("identificaBalao");g_tipoacao='identifica';g_operacao='identifica';verificaTip=function(){if(i3GEO.util.verificaScriptTag("i3GEOF")===true){return}if($i("marcaIdentifica")){return}if(g_operacao==="identifica"){eval(i3GEO.configura.funcaoTip)}};if(i3GEO.eventos.MOUSECLIQUE.toString().search("cliqueIdentifica()")>0){i3GEO.eventos.MOUSECLIQUE.remove("cliqueIdentifica()")}if(i3GEO.eventos.MOUSECLIQUE.toString().search("verificaTip()")<0){i3GEO.eventos.MOUSECLIQUE.push("verificaTip()")}if(i3GEO.eventos.MOUSEPARADO.toString().search("verificaTip()")<0){i3GEO.eventos.MOUSEPARADO.push("verificaTip()")}}},{iddiv:"exten",tipo:"",dica:$trad("d8"),funcaoonclick:function(){i3GEO.mapa.dialogo.mostraExten()}},{iddiv:"referencia",tipo:"",dica:$trad("d9"),funcaoonclick:function(){i3GEO.maparef.inicia()}},{iddiv:"wiki",tipo:"",dica:$trad("d11"),funcaoonclick:function(){i3GEO.navega.dialogo.wiki()}},{iddiv:"metar",tipo:"",dica:$trad("d29"),funcaoonclick:function(){i3GEO.navega.dialogo.metar()}},{iddiv:"buscafotos",tipo:"",dica:"Fotos",funcaoonclick:function(){i3GEO.navega.dialogo.buscaFotos()}},{iddiv:"imprimir",tipo:"",dica:$trad("d12"),funcaoonclick:function(){i3GEO.mapa.dialogo.imprimir()}},{iddiv:"ondeestou",tipo:"",dica:$trad("d13"),funcaoonclick:function(){i3GEO.navega.zoomIP(i3GEO.configura.locaplic,i3GEO.configura.sid)}},{iddiv:"v3d",tipo:"",dica:$trad("d14"),funcaoonclick:function(){i3GEO.mapa.dialogo.t3d()}},{iddiv:"google",tipo:"",dica:$trad("d15"),funcaoonclick:function(){i3GEO.navega.dialogo.google()}},{iddiv:"scielo",tipo:"",dica:$trad("d16"),funcaoonclick:function(){scieloAtivo=false;g_operacao="navega";i3GEO.janela.cria("450px","190px",i3GEO.configura.locaplic+"/ferramentas/scielo/index.htm","","","Scielo");atualizascielo=function(){var docel;try{docel=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;if(docel.getElementById("resultadoscielo")){$i("wdocai").src=i3GEO.configura.locaplic+"/ferramentas/scielo/index.htm"}else{i3GEO.eventos.NAVEGAMAPA.remove("atualizascielo()");if(i3GEO.Interface.ATUAL==="googlemaps"){GEvent.removeListener(scieloDragend);GEvent.removeListener(scieloZoomend)}}}catch(e){scieloAtivo=false;i3GEO.eventos.NAVEGAMAPA.remove("atualizascielo()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizascielo()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizascielo()");if(i3GEO.Interface.ATUAL==="googlemaps"){scieloDragend=GEvent.addListener(i3GeoMap,"dragend",function(){atualizascielo()});scieloZoomend=GEvent.addListener(i3GeoMap,"zoomend",function(){atualizascielo()})}}}},{iddiv:"confluence",tipo:"",dica:$trad("d17"),funcaoonclick:function(){i3GEO.navega.dialogo.confluence()}},{iddiv:"lentei",tipo:"",dica:$trad("d18"),funcaoonclick:function(){if(i3GEO.navega.lente.ESTAATIVA==="nao"){i3GEO.navega.lente.inicia()}else{i3GEO.navega.lente.desativa()}}},{iddiv:"encolheFerramentas",tipo:"",dica:$trad("d19"),funcaoonclick:function(){i3GEO.guias.libera()}},{iddiv:"reinicia",tipo:"",dica:$trad("d20"),funcaoonclick:function(){i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));var temp=function(){var url=(window.location.href.split("?"));window.location.href=url[0]+"?"+i3GEO.configura.sid};i3GEO.php.reiniciaMapa(temp)}},{iddiv:"mede",tipo:"dinamico",dica:$trad("d21"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("mede");if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";i3GEO.util.mudaCursor(i3GEO.configura.cursores,"distancia",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}g_tipoacao="";g_operacao="";i3GEO.analise.medeDistancia.inicia()}},{iddiv:"area",tipo:"dinamico",dica:$trad("d21a"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("area");if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";i3GEO.util.mudaCursor(i3GEO.configura.cursores,"area",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}g_tipoacao="";g_operacao="";i3GEO.analise.medeArea.inicia()}},{iddiv:"inserexy",tipo:"dinamico",dica:$trad("d22"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("inserexy");g_tipoacao="";i3GEO.mapa.dialogo.cliquePonto()}},{iddiv:"inseregrafico",tipo:"dinamico",dica:$trad("d23"),funcaoonclick:function(){g_tipoacao="";i3GEO.mapa.dialogo.cliqueGrafico();i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pointer",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}},{iddiv:"selecao",tipo:"dinamico",dica:$trad("d24"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("selecao");i3GEO.mapa.dialogo.selecao()}},{iddiv:"textofid",tipo:"dinamico",dica:$trad("d25"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("textofid");g_tipoacao="";i3GEO.mapa.dialogo.cliqueTexto()}},{iddiv:"rota",tipo:"",dica:"Rota",funcaoonclick:function(){if(i3GEO.Interface.ATUAL!=="googlemaps"){alert("Operacao disponivel apenas na interface Google Maps");return}counterClick=1;var parametrosRota=function(overlay,latlng){var temp,janela;if(counterClick===1){counterClick++;alert("Clique o ponto de destino da rota");pontoRota1=latlng;return}if(counterClick===2){pontoRota2=latlng;counterClick=0;GEvent.removeListener(rotaEvento);janela=i3GEO.janela.cria("300px","300px","","center","","Rota");janela[2].style.overflow="auto";janela[2].style.height="300px";directions=new GDirections(i3GeoMap,janela[2]);temp=function(){$i("wdoca_corpo").innerHTML="Não foi possível criar a rota"};GEvent.addListener(directions,"error",temp);directions.load("from: "+pontoRota1.lat()+","+pontoRota1.lng()+" to: "+pontoRota2.lat()+","+pontoRota2.lng())}};rotaEvento=GEvent.addListener(i3GeoMap,"click",parametrosRota);alert("Clique o ponto de origem da rota")}}]}};function i3GEOmantemCompatibilidade(){try{i3GEO.configura.oMenuData=oMenuData}catch(e){alert("funcao depreciada")}try{i3GEO.configura.tipoimagem=g_tipoimagem}catch(e){alert("funcao depreciada")}try{i3GEO.configura.tipotip=g_tipotip}catch(e){alert("funcao depreciada")}try{i3GEO.configura.funcaoTip=g_funcaoTip}catch(e){alert("funcao depreciada")}try{i3GEO.configura.map3d=g_3dmap}catch(e){alert("funcao depreciada")}try{i3GEO.configura.embedLegenda=g_embedLegenda}catch(e){alert("funcao depreciada")}try{i3GEO.configura.templateLegenda=g_templateLegenda}catch(e){alert("funcao depreciada")}try{if(objmapa.finaliza!="")i3GEO.finaliza=objmapa.finaliza}catch(e){alert("funcao depreciada")};g_arvoreClick="";g_arvoreClicks="";if($i("longlat")){atualizalonglat=function(){$i("longlat").innerHTML=objposicaocursor.dmsx+" "+objposicaocursor.dmsy};YAHOO.util.Event.addListener($i("img"),"mousemove",atualizalonglat)}try{if(g_opcoesTemas=="nao"){i3GEO.arvoreDeCamadas.OPCOESTEMAS=false}}catch(e){alert("funcao depreciada")};try{i3GEO.maparef.fatorZoomDinamico=g_zoomRefDinamico}catch(e){alert("funcao depreciada")};try{i3GEO.configura.mashuppar=g_mashuppar}catch(e){alert("funcao depreciada")};try{if(!$i("arvoreAdicionaTema")){i3GEO.arvoreDeTemas.IDHTML=objmapa.guiaMenu+"obj"}else{i3GEO.arvoreDeTemas.IDHTML="arvoreAdicionaTema"}}catch(e){alert("funcao depreciada")};try{if(g_uploaddbf=="nao"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.uploaddbf=false}}catch(e){alert("funcao depreciada")};try{if(g_uploadlocal=="nao"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.uploadlocal=false}}catch(e){alert("funcao depreciada")};try{if(g_downloadbase=="nao"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.downloadbase=false}}catch(e){alert("funcao depreciada")};try{if(g_conectarwms=="nao"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.conectarwms=false}}catch(e){alert("funcao depreciada")};try{if(g_conectargeorss=="nao"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.conectargeorss=false}}catch(e){alert("funcao depreciada")};try{if(g_nuvemTags=="nao"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.nuvemTags=false}}catch(e){alert("funcao depreciada")};try{if(g_kml=="nao"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.kml=false}}catch(e){alert("funcao depreciada")};try{if(g_qrcode=="nao"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.qrcode=false}}catch(e){alert("funcao depreciada")};try{if(g_tipoacao!=""){i3GEO.barraDeBotoes.BOTAOPADRAO=g_tipoacao}}catch(e){alert("funcao depreciada")}try{if(g_listaPropriedades){i3GEO.configura.listaDePropriedadesDoMapa=g_listaPropriedades}}catch(e){alert("funcao depreciada")};try{if(g_tempo_aplicar){i3GEO.configura.tempoAplicar=g_tempo_aplicar}}catch(e){alert("funcao depreciada")};try{if(g_janelaMen=="nao"){i3GEO.configura.iniciaJanelaMensagens=false}}catch(e){alert("funcao depreciada")};try{if(g_locaplic){i3GEO.configura.locaplic=g_locaplic}}catch(e){alert("funcao depreciada")};try{if(g_tempotip){i3GEO.configura.tempoMouseParado=g_tempotip}}catch(e){alert("funcao depreciada")};try{if(g_mostraRosa){i3GEO.configura.mostraRosaDosVentos=g_mostraRosa}}catch(e){alert("funcao depreciada")};try{if(g_visual){i3GEO.configura.visual=g_visual}}catch(e){alert("funcao depreciada")};try{if(g_mapaRefDisplay){i3GEO.configura.mapaRefDisplay=g_mapaRefDisplay}}catch(e){alert("funcao depreciada")};try{if(g_docaguias){i3GEO.configura.liberaGuias=g_docaguias}}catch(e){alert("funcao depreciada")};if(window.location.href.split("?")[1]){g_sid=window.location.href.split("?")[1];if(g_sid.split("#")[0]){g_sid=g_sid.split("#")[0]}}else{g_sid=""}i3GEO.configura.sid=g_sid;try{i3GEO.guias.ATUAL=g_guiaativa}catch(e){alert("funcao depreciada")}try{i3GEO.navega.autoRedesenho.INTERVALO=g_autoRedesenho}catch(e){alert("funcao depreciada")}try{i3GEO.eventos.NAVEGAMAPA=g_funcoesNavegaMapaDefault}catch(e){alert("funcao depreciada")}try{i3GEO.eventos.MOUSEMOVE=g_funcoesMousemoveMapaDefault}catch(e){alert("funcao depreciada")}try{i3GEO.eventos.MOUSECLIQUE=g_funcoesClickMapaDefault}catch(e){alert("funcao depreciada")}try{i3GEO.configura.entorno=g_entorno}catch(e){alert("funcao depreciada")}try{i3GEO.navega.lente.POSICAOX=g_posicaoLenteX=0}catch(e){alert("funcao depreciada")}try{i3GEO.navega.lente.POSICAOY=g_posicaoLenteY}catch(e){alert("funcao depreciada")}try{i3GEO.navega.destacaTema.TAMANHO=destacaTamanho}catch(e){alert("funcao depreciada")}if(!$i("tip")){var novoel=document.createElement("div");novoel.id="tip";novoel.style.position="absolute";novoel.style.zIndex=5000;if(navm){novoel.style.filter="alpha(opacity=90)"}document.body.appendChild(novoel)}try{objmapa.atualizaListaTemas=function(temas){alert("atualizaListaTemas foi depreciado. Utilize i3GEO.arvoreDeCamadas")}}catch(e){alert("funcao depreciada")}}if(typeof(i3GEO)=='undefined'){i3GEO=[]}cpObj=new cpaint();cpObj.set_async("true");cpObj.set_response_type("JSON");function Mapa(e,m){alert("Funcao Mapa foi depreciada. Utilize i3GEO.cria()");i3GEO.cria();this.inicializa=function(){i3GEO.finaliza=this.finaliza;i3GEO.inicia()}}objaguarde={abre:function(){alert("objaguarde foi depreciada. Utilize i3GEO.janela");i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"))},fecha:function(){alert("objaguarde foi depreciada. Utilize i3GEO.janela");i3GEO.janela.fechaAguarde("i3GEO.atualiza")}};function iCookie(nome,valor){alert("iCookie foi depreciado. Utilize i3GEO.util.insereCookie");i3GEO.util.insereCookie(nome,valor)}function pCookie(nome){alert("pCookie foi depreciado. Utilize i3GEO.util.pegaCookie");i3GEO.util.pegaCookie(nome)}function wdocaf(wlargura,waltura,wsrc,nx,ny,texto){var janela=i3GEO.janela.cria(wlargura,waltura,wsrc,nx,ny,texto)}function wdocaf2(wlargura,waltura,wsrc,nx,ny,texto){var id=YAHOO.util.Dom.generateId();i3GEO.janela.cria(wlargura,waltura,wsrc,nx,ny,texto,id,true)}function processevent1(exy1){alert("funcao depreciada")}function mensagemBanner(){alert("funcao depreciada")}function borra(){alert("funcao depreciada")}function movecursor(){alert("funcao depreciada");if($i("obj")){if($i("openlayers")||$i("flamingo")){$i("obj").style.display="none"}else{var obje=$i("obj").style;if($i("img")){eval("obje."+g_tipotop+"= objposicaocursor.telay + 9 + g_postpx");eval("obje."+g_tipoleft+"= objposicaocursor.telax + 9 + g_postpx")}else{eval("obje."+g_tipotop+"= objposicaocursor.telay - 15 + g_postpx");eval("obje."+g_tipoleft+"= objposicaocursor.telax + 15 + g_postpx")}}}if($i("box1")){var bx=$i("box1");if(bx.style.visibility!="visible"){bx.style.left=objposicaocursor.telax+g_postpx;bx.style.top=objposicaocursor.telay+g_postpx}}}function buscaRapida(){alert("funcao depreciada");i3geo_buscarapida()}function initJanelaZoom(qual){alert("funcao depreciada");i3GEO.barraDeBotoes.reativa(qual-1)}function sobeferramentas(){alert("funcao depreciada")}function desceferramentas(){alert("funcao depreciada")}function arvoreclick(itemID){alert("funcao depreciada");if(itemID.search("tema")==0){if($i(itemID).checked==true){$i(itemID).checked=false}else{$i(itemID).checked=true}}}function pegaTema(celula){alert("funcao depreciada");var nos=celula.parentNode.childNodes;var tempi=nos.length;for(var no=0;no<tempi;no++){if(nos[no].type=="checkbox"){return nos[no].value}}}function gerafilmef(qs){alert("funcao depreciada")}function gravaQuadro(variavel,valor){alert("funcao depreciada");i3GEO.gadgets.quadros.grava(variavel,valor)}function avancaQuadro(){alert("funcao depreciada");i3GEO.gadgets.quadros.avanca()}function zoomAnterior(){alert("funcao depreciada")}function zoomProximo(){alert("funcao depreciada")}function opcoesQuadros(){alert("funcao depreciada")}function filmef(o){alert("funcao depreciada")}function rebobinaf(){alert("funcao depreciada")}function filmezf(o){alert("funcao depreciada")}function quadrofilme(){alert("funcao depreciada")}function filmeanimaf(){alert("funcao depreciada")}function filmeanimarodaf(janima){alert("funcao depreciada")}function pegaimagens(){alert("funcao depreciada")}function calculaArea(pontos,pixel){alert("funcao depreciada");return(i3GEO.calculo.area(pontos,pixel))}function calculadistancia(lga,lta,lgb,ltb){alert("funcao depreciada");return(i3GEO.calculo.distancia(lga,lta,lgb,ltb))}function initJanelaRef(){alert("funcao depreciada");i3GEO.maparef.inicia()}function ajaxReferencia(retorno){alert("funcao depreciada");i3GEO.maparef.processaImagem(retorno)}function clicouRef(){alert("funcao depreciada")}function movimentoRef(obj){alert("funcao depreciada")}function mostraTip(retorno){alert("funcao depreciada");if(!$i("tip")){var novoel=document.createElement("div");novoel.id="tip";novoel.style.position="absolute";novoel.style.zIndex=5000;if(navm){novoel.style.filter="alpha(opacity=90)"}document.body.appendChild(novoel)}var i=$i("i3geo_rosa");if(i)i.style.display="none";var mostra=false;var retorno=retorno.data;if((retorno!="erro")&&(retorno!=undefined)){if($i("img")){$i("img").title=""}if(retorno!=""){var res="<div id='cabecatip' style='text-align:left;background-color:rgb(240,240,240)'><span style='color:navy;cursor:pointer;text-align:left' onclick='javascript:objmapaparado=\"cancela\"'>parar&nbsp;&nbsp;</span>";res+="<span style='color:navy;cursor:pointer;text-align:left' onclick='javascript:i3GEO.janela.TIPS.push($i(\"tip\"));$i(\"tip\").id=\"\";$i(\"cabecatip\").innerHTML =\"\";$i(\"cabecatip\").id =\"\"' >fixar</span></div>";var temas=retorno.split("!");var tema=temas.length-1;if(tema>=0){do{var titulo=temas[tema].split("@");if(g_tipotip=="completo"){res+="<span style='text-align:left;font-size:9pt'><b>"+titulo[0]+"</b></span><br>"}var ocorrencias=titulo[1].split("*");var ocorrencia=ocorrencias.length-1;if(ocorrencia>=0){do{if(ocorrencias[ocorrencia]!=""){var pares=ocorrencias[ocorrencia].split("##");var paresi=pares.length;for(var par=0;par<paresi;par++){var valores=pares[par].split("#");if(g_tipotip=="completo"){res=res+"<span class='tiptexto' style='text-align:left;font-size:9pt'>"+valores[0]+" <i>"+valores[1]+"</i></span><br>";var mostra=true}else{res=res+"<span class='tiptexto' style='text-align:left;font-size:9pt'><i>"+valores[1]+"</i></span><br>";var mostra=true}}}}while(ocorrencia--)}}while(tema--)}if(!mostra){$i("tip").style.display="none";return}if($i("janelaMen")){$i("janelaMenTexto").innerHTML=res}else{var i=$i("tip");i.innerHTML="<table style='text-align:left'><tr><td style='text-align:left'>"+res+"</td></tr></table>";ist=i.style;ist.top=objposicaocursor.telay-10;ist.left=objposicaocursor.telax-20;ist.display="block"}}}}function trataErro(){alert("funcao depreciada");i3GEO.janela.fechaAguarde()}function mostraguiaf(guia){alert("funcao depreciada");i3GEO.guias.mostra(guia)}function ativaGuias(){alert("funcao depreciada");for(var g=0;g<12;g++){if($i("guia"+g))var gpai=$i("guia"+g).parentNode}if(gpai){gpai.id="guiasYUI";gpai.className="yui-navset";var ins='<ul class="yui-nav" style="border-width:0pt 0pt 0px;border-color:rgb(240,240,240);border-bottom-color:white;">';try{if($i(objmapa.guiaTemas)){$i(objmapa.guiaTemas).innerHTML=$trad("g1")}if($i(objmapa.guiaMenu)){$i(objmapa.guiaMenu).innerHTML=$trad("g2")}if($i(objmapa.guiaLegenda)){$i(objmapa.guiaLegenda).innerHTML=$trad("g3")}if($i(objmapa.guiaListaMapas)){$i(objmapa.guiaListaMapas).innerHTML=$trad("g4")}}catch(e){alert("funcao depreciada")};for(var g=0;g<12;g++){if($i("guia"+g)){var tituloguia=$i("guia"+g).innerHTML;var re=new RegExp("&nbsp;","g");var tituloguia=tituloguia.replace(re,'');ins+='<li><a href="#"><em><div id="guia'+g+'" >'+tituloguia+'</div></em></a></li>'}}ins+="</ul>";gpai.innerHTML=ins;for(var g=0;g<12;g++){if($i("guia"+g)){eval('$i("guia'+g+'").onclick = function(){g_guiaativa = "guia'+g+'";mostraguiaf('+g+');}');$i("guia"+g).onmouseover=function(){var bcg=this.parentNode.parentNode.style;var cor=bcg.background.split(" ")[0];if(cor!="white")bcg.background="#bfdaff"};$i("guia"+g).onmouseout=function(){var bcg=this.parentNode.parentNode.style;var cor=bcg.background.split(" ")[0];if(cor!="white")bcg.background="transparent"};if($i("guia"+g+"obj")){$i("guia"+g+"obj").style.overflow="auto";$i("guia"+g+"obj").style.height=i3GEO.parametros.h}}}}if($i(objmapa.guiaTemas)){$i(objmapa.guiaTemas).onclick=function(){g_guiaativa=objmapa.guiaTemas;mostraguiaf(1)}}if($i(objmapa.guiaMenu)){$i(objmapa.guiaMenu).onclick=function(){g_guiaativa=objmapa.guiaMenu;mostraguiaf(2);if(!$i("arvoreAdicionaTema")){var ondeArvore=objmapa.guiaMenu+"obj"}else{var ondeArvore="arvoreAdicionaTema"}if(document.getElementById("outrasOpcoesAdiciona")){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde="outrasOpcoesAdiciona";i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore=false}i3GEO.arvoreDeTemas.cria(i3GEO.configura.sid,i3GEO.configura.locaplic,ondeArvore)}}if($i(objmapa.guiaLegenda)){$i(objmapa.guiaLegenda).onclick=function(){g_guiaativa=objmapa.guiaLegenda;mostraguiaf(4);objmapa.atualizaLegendaHTML()}}if($i(objmapa.guiaListaMapas)){$i(objmapa.guiaListaMapas).onclick=function(){g_guiaativa=objmapa.guiaListaMapas;mostraguiaf(5);if($i("banners")){$i("banners").innerHTML==$trad("o1");var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=pegaMapas&g_sid="+i3GEO.configura.sid;cpObj.call(p,"pegaMapas",pegaMapas)}else{alert("id banners nao encontrado")}}}}function docaguias(){alert("funcao depreciada");i3GEO.guias.libera()}function autoRedesenho(opcao){alert("funcao depreciada")}function selecao(){alert("funcao depreciada")}function cliqueSelecao(){alert("funcao depreciada")}function zoomboxf(tipo){alert("funcao depreciada")}function i3geo_comboGruposMenu(funcaoOnchange,idDestino,idCombo,largura,altura){alert("funcao depreciada")}function i3geo_comboSubGruposMenu(funcaoOnchange,idDestino,idCombo,idGrupo,largura,altura){alert("funcao depreciada")}function i3geo_comboTemasMenu(funcaoOnchange,idDestino,idCombo,idGrupo,idSubGrupo,largura,altura){alert("funcao depreciada")}function remapaf(){i3GEO.atualiza("");alert("funcao depreciada")}function limpacontainerf(){alert("funcao depreciada")}function inseremarcaf(xi,yi,funcaoOnclick,container){alert("funcao depreciada");i3GEO.utl.insereMarca.cria(xi,yi,funcaoOnclick,container)}function moveSelecaoPoli(){alert("funcao depreciada")}function cliqueSelecaoPoli(){alert("funcao depreciada")}function ativaEntorno(){alert("funcao depreciada")}function geraURLentorno(){alert("funcao depreciada")}function ajustaEntorno(){alert("funcao depreciada")}function ajaxabrelente(retorno){alert("funcao depreciada")}function movelentef(){alert("funcao depreciada")}function ativaClicks(docMapa){alert("funcao depreciada")}function incluir(path){i3GEO.util.adicionaSHP(path);alert("funcao depreciada")}function pontosdist(){this.xpt=[];this.ypt=[];this.dist=[];this.xtela=[];this.ytela=[];this.ximg=[];this.yimg=[];this.linhas=[];alert("funcao depreciada")}function mudaiconf(i){i3GEO.barraDeBotoes.ativaIcone(i);alert("funcao depreciada")}function calcposf(){i3GEO.mapa.ajustaPosicao();alert("funcao depreciada")}function recuperamapa(){alert("funcao depreciada")}function desenhoRichdraw(tipo,objeto,n){alert("funcao depreciada")}function ajaxhttp(){alert("funcao depreciada");try{var objhttp1=new XMLHttpRequest()}catch(ee){try{var objhttp1=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{var objhttp1=new ActiveXObject("Microsoft.XMLHTTP")}catch(E){var objhttp1=false}}}return(objhttp1)}function ajaxexecAS(programa,funcao){alert("funcao depreciada");var ohttp=ajaxhttp();ohttp.open("POST",programa,true);var retorno="";ohttp.onreadystatechange=function(){if(ohttp.readyState==4){retorno=ohttp.responseText;var reg=/Warning/gi;if(retorno.search(reg)!=-1){alert("OOps! Ocorreu um erro\n"+retorno);return}var reg=/erro/gi;if(retorno.search(reg)!=-1){alert("OOps! Ocorreu um erro\n"+retorno);return}if(funcao!="volta"){eval(funcao+'("'+retorno+'")')}}};ohttp.send(null)}function ajaxexec(programa,funcao){alert("funcao depreciada");var objhttp=ajaxhttp();objhttp.open('GET',programa,false);objhttp.send(null);if(objhttp.status==200){if(funcao!="volta"){eval(funcao+'("'+objhttp.responseText+'")')}else{return objhttp.responseText}}}function ajaxLegendaHTML(retorno){alert("funcao depreciada")}function ajaxLegendaImagem(retorno){alert("funcao depreciada")}function mede(){alert("funcao depreciada")}function cliqueMede(){alert("funcao depreciada")}function moveMede(){alert("funcao depreciada")}function area(){alert("funcao depreciada")}function cliqueArea(){alert("funcao depreciada")}function moveArea(){alert("funcao depreciada")}function textofid(){alert("funcao depreciada")}function inserexy(){alert("funcao depreciada")}function cliqueInseretoponimo(){alert("funcao depreciada")}function cliqueInserexy(){alert("funcao depreciada")}function inseregrafico(){alert("funcao depreciada")}function cliqueInseregrafico(){alert("funcao depreciada")}function ativaHistoricoZoom(iddiv){alert("funcao depreciada")}function ajaxhttp(){alert("funcao depreciada");return i3GEO.util.ajaxhttp()}function ajaxCorpoMapa(retorno){i3GEO.mapa.corpo.veirifca(retorno);alert("funcao depreciada")}function ajaxredesenha(retorno){i3GEO.atualiza(retorno);alert("funcao depreciada")}function ajaxIniciaParametros(retorno){i3GEO.atualiza(retorno);alert("funcao depreciada")}function montaMenuSuspenso(iddiv){i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.idhtml=iddiv;i3GEO.gadgets.mostraMenuSuspenso();alert("funcao depreciada")}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);if($i("localizarxygeoProjxg")){var temp=function(){i3GEO.coordenadas.atualizaGeo(objposicaocursor.dmsx,objposicaocursor.dmsy,"localizarxygeoProj")};YAHOO.util.Event.addListener(divgeo,"mousemove",temp)}}catch(men){alert("Erro ao tentar criar container richdraw "+men)}},criaDivContainer:function(){desenhoUltimaLinha="";desenhoUltimaLinhaPol="";if(!$i("divGeometriasTemp")){var pos,novoel,ne;pos=[0,0];pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));novoel=document.createElement("div");novoel.id="divGeometriasTemp";ne=novoel.style;ne.cursor="crosshair";ne.zIndex=0;if(i3GEO.Interface.TABLET===true){ne.zIndex=5000}ne.position="absolute";ne.width=i3GEO.parametros.w;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=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);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="<select onchange='i3GEO.desenho.definePadrao(this.value)'>";for(i=0;i<n;i+=1){sel="";if(lista[i]===i3GEO.desenho.estiloPadrao){sel="select"}caixa+="<option value='"+lista[i]+"' sel >"+lista[i]+"</option>"}caixa+="</select>";return caixa}};if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.Interface={TABLET:false,ALTTABLET:"openlayers_t.htm",OUTPUTFORMAT:"AGG_Q",BARRABOTOESTOP:12,BARRABOTOESLEFT:3,BARRADEZOOMTOP:7,BARRADEZOOMLEFT: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")}if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.adicionaKml("foo")}},cria:function(w,h){i3GEO.Interface[i3GEO.Interface.ATUAL].cria(w,h)},inicia:function(w,h){var temp=window.location.href.split("?")[0],gadgets=i3GEO.gadgets;if($i("i3GEOcompartilhar")){i3GEO.social.compartilhar("i3GEOcompartilhar",temp,temp,"semtotal")}gadgets.quadros.inicia(10);gadgets.quadros.grava("extensao",i3GEO.parametros.extentTotal);gadgets.mostraBuscaRapida();gadgets.mostraVersao();gadgets.mostraEmail();i3GEO.guias.cria();if($i("mst")){$i("mst").style.display="block"}if(i3GEO.configura.entorno.toLowerCase()==="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(){if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){i3GEO.barraDeBotoes.inicializaBarra()}else{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="<input style='position:relative;top:0px;left:0px;' type=image src='' id='img' />";$i(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:"&nbsp;<span class='container-close'></span>"},{text:"<img class='rosamais' style='height:18px;' src='"+$im("branco.gif")+"'><span style='position:relative;top:-4px;'> Aproxima</span>",onclick:{fn:i3GEO.navega.zoomin}},{text:"<img class='rosamenos' style='height:18px;' src='"+$im("branco.gif")+"'><span style='position:relative;top:-4px;'> Afasta</span>",onclick:{fn:i3GEO.navega.zoomout}},{text:"<img class='rosanorte' style='height:18px;' src='"+$im("branco.gif")+"'><span style='position:relative;top:-7px;'> Norte</span>",onclick:{fn:i3GEO.navega.panFixoNorte}},{text:"<img class='rosasul' style='height:18px;' src='"+$im("branco.gif")+"'><span style='position:relative;top:-7px;'> Sul</span>",onclick:{fn:i3GEO.navega.panFixoSul}},{text:"<img class='rosaleste' style='height:18px;' src='"+$im("branco.gif")+"'><span style='position:relative;top:-7px;'> Leste</span>",onclick:{fn:i3GEO.navega.panFixoLeste}},{text:"<img class='rosaoeste' style='height:18px;' src='"+$im("branco.gif")+"'><span style='position:relative;top:-7px;'> Oeste</span>",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();gadgets.mostraMenuLista();i3GEO.eventos.ativa(i);i3GEO.coordenadas.mostraCoordenadas();gadgets.mostraEscalaNumerica();gadgets.mostraEscalaGrafica();gadgets.visual.inicia();iu.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",configura.listaDePropriedadesDoMapa);i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,configura.sid,configura.locaplic);i3GEO.ajuda.ativaLetreiro(parametros.mensagens);i3GEO.Interface.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(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='<div id=flamingo style="width:0px;height:0px;text-align:left;background-image:url(/"'+i3GEO.configura.locaplic+'/imagens/i3geo1bw.jpg/")"></div>';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("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa)},ativaBotoes:function(){}},openlayers:{FUNDOTEMA:"yellow",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();openlayers.sobeLayersGraficos()},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='<div id=openlayers style="width:0px;height:0px;text-align:left;background-image:url('+i3GEO.configura.locaplic+'/imagens/i3geo1bw.jpg)"></div>';i.innerHTML=ins}f=$i("openlayers");f.style.width=w;f.style.height=h}i3GEO.Interface.IDMAPA="openlayers";if(i3GEO.Interface.TABLET===true){i3geoOL=new OpenLayers.Map({div:"openlayers",theme:null,controls:[new OpenLayers.Control.Attribution(),new OpenLayers.Control.TouchNavigation({dragPanOptions:{interval:100,enableKinetic:true}}),new OpenLayers.Control.ZoomPanel()]})}else{bb.INCLUIBOTAO.zoomli=true;bb.INCLUIBOTAO.pan=true;bb.INCLUIBOTAO.zoomtot=true;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,layersn,openlayers=i3GEO.Interface.openlayers;i3GEO.util.multiStep([openlayers.registraEventos,openlayers.zoom2ext],[null,[i3GEO.parametros.mapexten]],function(){});openlayers.criaLayers();if(openlayers.GADGETS.PanZoomBar===true){i3GEO.Interface.openlayers.OLpanzoombar=new OpenLayers.Control.PanZoomBar();i3geoOL.addControl(i3GEO.Interface.openlayers.OLpanzoombar);i3GEO.Interface.openlayers.OLpanzoombar.div.style.zIndex=5000;i3GEO.Interface.openlayers.OLpanzoombar.div.style.top=i3GEO.Interface.BARRADEZOOMTOP+"px";i3GEO.Interface.openlayers.OLpanzoombar.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+"px"}if(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<layersn;i++){texto="<input type=radio style='"+estilo+"' onclick='i3GEO.Interface.openlayers.ativaFundo(this.value)' name=i3GEObaseLayer value='"+layers[i].id+"' />"+layers[i].name;temp.propriedades.push({text:texto,url:""})}i3GEO.util.arvore("<b>"+$trad("p16")+"</b>","listaLayersBase",temp)}else{if(openlayers.GADGETS.LayerSwitcher===true){i3geoOL.addControl(new OpenLayers.Control.LayerSwitcher())}}if(openlayers.GADGETS.ScaleLine===true){pz=new OpenLayers.Control.ScaleLine();i3geoOL.addControl(pz);pz.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+5+"px"}if(openlayers.GADGETS.OverviewMap===true){i3geoOL.addControl(new OpenLayers.Control.OverviewMap())}if(i3GEO.Interface.TABLET===false){i3GEO.Interface.openlayers.OLpan=new OpenLayers.Control.Navigation();i3GEO.Interface.openlayers.OLzoom=new OpenLayers.Control.ZoomBox();i3GEO.Interface.openlayers.OLpanel=new OpenLayers.Control.Panel();i3GEO.Interface.openlayers.OLpanel.addControls([i3GEO.Interface.openlayers.OLpan,i3GEO.Interface.openlayers.OLzoom]);i3geoOL.addControl(i3GEO.Interface.openlayers.OLpanel)}if(i3GEO.configura.mapaRefDisplay!=="none"){if(i3GEO.util.pegaCookie("i3GEO.configura.mapaRefDisplay")){i3GEO.configura.mapaRefDisplay=i3GEO.util.pegaCookie("i3GEO.configura.mapaRefDisplay")}if(i3GEO.configura.mapaRefDisplay==="block"){i3GEO.maparef.inicia()}}if(i3GEO.Interface.TABLET===false){i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLpan)}i3GEO.Interface.ativaBotoes()};i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.openlayers.ligaDesliga(this);i3GEO.eventos.executaEventos(i3GEO.eventos.ATUALIZAARVORECAMADAS);";i3GEO.util.multiStep([i3GEO.coordenadas.mostraCoordenadas,montaMapa,i3GEO.gadgets.mostraMenuSuspenso,i3GEO.ajuda.ativaLetreiro,i3GEO.idioma.mostraSeletor,i3GEO.gadgets.mostraEscalaNumerica,i3GEO.util.arvore,i3GEO.gadgets.mostraMenuLista],[null,null,null,[i3GEO.parametros.mensagens],null,null,["<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa],null],function(){});i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===true){i3GEO.Interface.openlayers.adicionaListaKml()}if(i3GEO.parametros.kmlurl!==""){i3GEO.Interface.openlayers.adicionaKml(true,i3GEO.parametros.kmlurl)}},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.openlayers.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i,zoom;if(!$i("arvoreCamadasKml")){i3GEO.Interface.openlayers.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=true}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===false){i3GEO.arvoreDeCamadas.MOSTRALISTAKML=true;i3GEO.Interface.openlayers.criaArvoreKML()}i3GEO.Interface.openlayers.adicionaNoArvoreKml(url,titulo,ativo,ngeoxml)},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.openlayers.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.openlayers.ARVORE.getRoot();titulo="<table><tr><td><b>Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false;if(i3GEO.parametros.editor==="sim"){d=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/webservices.html' target=blank >Editar cadastro</a>",idmenu:"",enableHighlight:false,expanded:false},node)}},adicionaNoArvoreKml:function(url,nomeOverlay,ativo,id){var root,node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.openlayers.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}root=i3GEO.Interface.openlayers.ARVORE.getRoot();node=i3GEO.Interface.openlayers.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.openlayers.ativaDesativaCamadaKml(this,\""+url+"\")' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";if(navm){estilo="cursor:default;vertical-align:35%;padding-top:0px;"}else{estilo="cursor:default;vertical-align:top;"}html+="&nbsp;<span style='"+estilo+"'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.openlayers.ARVORE.draw();i3GEO.Interface.openlayers.ARVORE.collapseAll();node.expand();if(ativo===true){i3GEO.Interface.openlayers.insereLayerKml(id,url)}},insereLayerKml:function(id,url){var temp;eval(id+" = new OpenLayers.Layer.Vector('"+id+"', {displayOutsideMaxExtent:true,displayInLayerSwitcher:false,visibility:true, strategies: [new OpenLayers.Strategy.Fixed()],protocol: new OpenLayers.Protocol.HTTP({url: '"+url+"',format: new OpenLayers.Format.KML({extractStyles: true,extractAttributes: true,maxDepth: 5})})})");eval("i3geoOL.addLayer("+id+");");eval("temp = "+id+".div;");temp.onclick=function(e){var targ,id,temp,features,n,i,j,html="";if(!e){e=window.event}if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}temp=targ.id.split("_");if(temp[0]==="OpenLayers.Geometry.Point"){id=targ.id;temp=i3geoOL.getLayer(this.id);features=temp.features;n=features.length;for(i=0;i<n;i++){if(features[i].geometry.id===id){for(j in features[i].attributes){html+=j+": "+features[i].attributes[j]}g=features[i].geometry;i3geoOL.addPopup(new OpenLayers.Popup.FramedCloud("kml",new OpenLayers.LonLat(g.x,g.y),null,html,null,true))}}}}},ativaDesativaCamadaKml:function(obj,url){if(!obj.checked){eval(obj.value+".setVisibility(false);")}else{if(!(i3geoOL.getLayersByName(obj.value)[0])){i3GEO.Interface.openlayers.insereLayerKml(obj.value,url)}else{eval(obj.value+".setVisibility(true);")}}},criaLayers:function(){var configura=i3GEO.configura,url=configura.locaplic+"/classesphp/mapa_openlayers.php?g_sid="+i3GEO.configura.sid+"&TIPOIMAGEM="+configura.tipoimagem,urlfundo=configura.locaplic+"/classesphp/mapa_openlayers.php?g_sid="+i3GEO.configura.sid+"&layer=&tipolayer=fundo&TIPOIMAGEM="+configura.tipoimagem,nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,layer,layers,camada,urllayer,opcoes,i,n,temp,fundoIsBase=true;try{temp=i3GEO.Interface.openlayers.LAYERSADICIONAIS;n=temp.length;for(i=0;i<n;i++){if(temp[i].isBaseLayer===true&&temp[i].visibility===true){fundoIsBase=false}}}catch(e){}if(i3geoOL.getLayersByName("Nenhum").length===0&&fundoIsBase===true){layer=new OpenLayers.Layer.WMS("Nenhum",urlfundo,{map_imagetype:i3GEO.Interface.OUTPUTFORMAT},{ratio:1,singleTile:true,isBaseLayer:true,opacity:1,visibility:true});i3geoOL.addLayer(layer)}opcoes={gutter:0,isBaseLayer:false,displayInLayerSwitcher:false,opacity:1,singleTile:!(i3GEO.Interface.openlayers.TILES),ratio:1,buffer:i3GEO.Interface.openlayers.BUFFER,wrapDateLine:true,transitionEffect:"resize",eventListeners:{"loadstart":i3GEO.Interface.openlayers.loadStartLayer,"loadend":i3GEO.Interface.openlayers.loadStopLayer}};for(i=nlayers-1;i>=0;i--){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];if(i3geoOL.getLayersByName(camada.name).length===0){urllayer=url+"&layer="+camada.name+"&r="+Math.random();try{temp=camada.type===0?opcoes.gutter=20:opcoes.gutter=0;temp=camada.transitioneffect==="nao"?opcoes.transitionEffect="null":opcoes.transitionEffect="resize";if(camada.connectiontype===7&&camada.wmsurl!==""&&camada.usasld.toLowerCase()!="sim"){urllayer=camada.wmsurl+"&r="+Math.random();layer=new OpenLayers.Layer.WMS(camada.name,urllayer,{LAYERS:camada.name,format:camada.wmsformat,transparent:true},opcoes);if(camada.wmssrs!=""){layer.url=layer.url+"&SRS="+camada.wmssrs+"&CRS="+camada.wmssrs}}else{if(camada.tiles==="nao"||camada.escondido.toLowerCase()==="sim"||camada.connectiontype===10||camada.type===0||camada.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,{LAYERS:camada.name,map_imagetype:i3GEO.Interface.OUTPUTFORMAT},opcoes)}}catch(e){}if(camada.escondido.toLowerCase()==="sim"){layer.transitionEffect="null"}i3geoOL.addLayer(layer)}else{layer=i3geoOL.getLayersByName(camada.name)[0]}temp=camada.status==0?layer.setVisibility(false):layer.setVisibility(true)}try{i3geoOL.addLayers(i3GEO.Interface.openlayers.LAYERSADICIONAIS)}catch(e){}},sobeLayersGraficos:function(){var nlayers=i3geoOL.getNumLayers(),layers=i3geoOL.layers,i;for(i=0;i<nlayers;i++){if(layers[i].CLASS_NAME=="OpenLayers.Layer.Vector"){i3geoOL.raiseLayer(i3geoOL.layers[i],nlayers)}}},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}i3GEO.Interface.openlayers.removeTodosOsLayers();i3GEO.Interface.openlayers.criaLayers()},removeTodosOsLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,layer,i,camada;for(i=nlayers-1;i>=0;i--){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];layer=i3geoOL.getLayersByName(camada.name)[0];i3geoOL.removeLayer(layer,false)}},alteraParametroLayers:function(parametro,valor){var layers=i3geoOL.layers,nlayers=layers.length,i,url,reg;for(i=0;i<nlayers;i+=1){url=layers[i].url;reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");layers[i].url=url.replace(reg,"");eval("layers[i].mergeNewParams({"+parametro+":valor})");layers[i].redraw()}},loadStartLayer:function(event){i3GEO.Interface.STATUS.atualizando.push(event.object.name);YAHOO.util.Dom.setStyle("ArvoreTituloTema"+event.object.name,"background",i3GEO.Interface.openlayers.FUNDOTEMA)},loadStopLayer:function(event){i3GEO.Interface.STATUS.atualizando.remove(event.object.name);YAHOO.util.Dom.setStyle("ArvoreTituloTema"+event.object.name,"background","")},ordenaLayers:function(){var ordem=i3GEO.arvoreDeCamadas.CAMADAS,nordem=ordem.length,layer,layers,i,maiorindice;layers=i3geoOL.layers;maiorindice=i3geoOL.getLayerIndex(layers[(layers.length)-1]);for(i=nordem-1;i>=0;i--){layers=i3geoOL.getLayersByName(ordem[i].name);layer=layers[0];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));i3GEO.Interface.openlayers.OLpanzoombar.div.style.top=i3GEO.Interface.BARRADEZOOMTOP+"px";i3GEO.Interface.openlayers.OLpanzoombar.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+"px"},atualizaMapa:function(){var layers=i3geoOL.layers,nlayers=layers.length,i;for(i=0;i<nlayers;i++){layers[i].mergeNewParams({r:Math.random()});layers[i].url=layers[i].url.replace("&&&&&&&&&&&&&&","");layers[i].url=layers[i].url+"&&";if(layers[i].visibility===true){layers[i].redraw()}}},atualizaTema:function(retorno,tema){var layer=i3geoOL.getLayersByName(tema)[0];if(layer&&layer!=undefined){layer.mergeNewParams({r:Math.random()});layer.url=layer.url.replace("&&&&&&&&&&&&&&","");layer.url=layer.url+"&&";layer.redraw()}if(retorno===""){return}i3GEO.Interface.openlayers.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},registraEventos:function(){i3GEO.eventos.ativa($i("openlayers"));i3geoOL.events.register("moveend",i3geoOL,function(e){i3GEO.Interface.openlayers.recalcPar();i3GEO.eventos.navegaMapa()});i3geoOL.events.register("mousemove",i3geoOL,function(e){var p,lonlat,d,dc,imgp,targ,pos,mousex,mousey;p=e.xy;lonlat=i3geoOL.getLonLatFromPixel(p);if(!lonlat){return}d=i3GEO.calculo.dd2dms(lonlat.lon,lonlat.lat);try{objposicaocursor.ddx=lonlat.lon;objposicaocursor.ddy=lonlat.lat;objposicaocursor.dmsx=d[0];objposicaocursor.dmsy=d[1];objposicaocursor.imgx=p.x;objposicaocursor.imgy=p.y;pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));objposicaocursor.telax=p.x+pos[0];objposicaocursor.telay=p.y+pos[1]}catch(e){}})},ativaBotoes:function(){var imagemxy,x1,y1,x2,y2;imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){x2=imagemxy[0]+i3GEO.Interface.BARRABOTOESLEFT;y2=imagemxy[1]+i3GEO.Interface.BARRABOTOESTOP}if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","i3geo_barra2",false,x2,y2)}if(i3GEO.configura.visual!=="default"){i3GEO.gadgets.visual.troca(i3GEO.configura.visual)}i3GEO.barraDeBotoes.ativaBotoes()},recalcPar:function(){var bounds=i3geoOL.getExtent().toBBOX().split(","),escalaAtual=i3geoOL.getScale();if(i3GEO.parametros.mapscale!==escalaAtual){i3GEO.arvoreDeCamadas.atualizaFarol(escalaAtual)}i3GEO.parametros.mapexten=bounds[0]+" "+bounds[1]+" "+bounds[2]+" "+bounds[3];i3GEO.parametros.mapscale=escalaAtual;i3GEO.parametros.pixelsize=i3geoOL.getResolution();try{atualizaEscalaNumerica(parseInt(escalaAtual,10))}catch(e){}},zoom2ext:function(ext){var m,b;m=ext.split(" ");b=new OpenLayers.Bounds(m[0],m[1],m[2],m[3]);i3geoOL.zoomToExtent(b)},pan2ponto:function(x,y){i3geoOL.panTo(new OpenLayers.LonLat(x,y))}},googlemaps:{OPACIDADE:0.8,TIPOMAPA:"terrain",ZOOMSCALE:[591657550,295828775,147914387,73957193,36978596,18489298,9244649,4622324,2311162,1155581,577790,288895,144447,72223,36111,18055,9027,4513,2256,1128],PARAMETROSLAYER:"&TIPOIMAGEM="+i3GEO.configura.tipoimagem,posfixo:0,atualizaTema:function(retorno,tema){var indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(tema);i3GeoMap.overlayMapTypes.removeAt(indice);i3GEO.Interface.googlemaps.posfixo+=1;i3GEO.Interface.googlemaps.insereLayer(tema,indice);if(retorno===""){return}i3GEO.Interface.googlemaps.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},redesenha:function(){i3GEO.Interface.googlemaps.posfixo+=1;var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(camada.name);if(indice!==false){try{i3GeoMap.overlayMapTypes.removeAt(indice)}catch(e){}}}i3GEO.Interface.googlemaps.criaLayers()},cria:function(w,h){var i,f,ins,js;posfixo="&nd=0";i=$i(i3GEO.Interface.IDCORPO);if(i){f=$i("googlemapsdiv");if(!f){ins='<div id=googlemapsdiv style="width:0px;height:0px;text-align:left;background-image:url('+i3GEO.configura.locaplic+'/imagens/i3geo1bw.jpg)"></div>';i.innerHTML=ins}f=$i("googlemapsdiv");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.ativaBotoes();i3GEO.eventos.ativa($i(i3GEO.Interface.IDMAPA));i3GEO.coordenadas.mostraCoordenadas();i3GEO.gadgets.mostraEscalaNumerica();i3GEO.gadgets.mostraMenuSuspenso();i3GEO.gadgets.mostraMenuLista();i3GEO.idioma.mostraSeletor();g_operacao="";g_tipoacao="";i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.googlemaps.ligaDesliga(this)";i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);i3GEO.util.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===true){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<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(camada.name);if(!indice){if(camada.status!=0){i3GEO.Interface.googlemaps.insereLayer(camada.name,0)}}}},criaImageMap:function(nomeLayer){var i3GEOTileO,s;s="i3GEOTileO = new google.maps.ImageMapType({ "+"getTileUrl: function(coord, zoom) {"+" var url = '"+i3GEO.configura.locaplic+"/classesphp/mapa_googlemaps.php?g_sid="+i3GEO.configura.sid+"&Z=' + zoom + '&X=' + coord.x + '&Y=' + coord.y + '&layer="+nomeLayer+i3GEO.Interface.googlemaps.PARAMETROSLAYER+'&r='+Math.random()+"';"+" return url+'&nd='+i3GEO.Interface.googlemaps.posfixo; "+"}, "+"tileSize: new google.maps.Size(256, 256),"+"isPng: true,"+"name: '"+nomeLayer+"'"+"});";eval(s);return i3GEOTileO},insereLayer:function(nomeLayer,indice){var i=i3GEO.Interface.googlemaps.criaImageMap(nomeLayer);i3GeoMap.overlayMapTypes.insertAt(indice,i)},registraEventos:function(){var pos;google.maps.event.addListener(i3GeoMap,"dragstart",function(){g_operacao="";g_tipoacao=""});google.maps.event.addListener(i3GeoMap,"dragend",function(){i3GEO.Interface.googlemaps.recalcPar();i3GEO.eventos.navegaMapa()});google.maps.event.addListener(i3GeoMap,"tilesloaded",function(){i3GEO.Interface.googlemaps.recalcPar()});google.maps.event.addListener(i3GeoMap,"bounds_changed",function(){i3GEO.Interface.googlemaps.recalcPar();g_operacao="";g_tipoacao="";i3GEO.eventos.navegaMapa()});pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));google.maps.event.addListener(i3GeoMap,"mousemove",function(ponto){var teladms,tela;ponto=ponto.latLng;teladms=i3GEO.calculo.dd2dms(ponto.lng(),ponto.lat());tela=i3GeoMapOverlay.getProjection().fromLatLngToContainerPixel(ponto);objposicaocursor={ddx:ponto.lng(),ddy:ponto.lat(),dmsx:teladms[0],dmsy:teladms[1],imgx:tela.x,imgy:tela.y,telax:tela.x+pos[0],telay:tela.y+pos[1]}})},retornaIndiceLayer:function(nomeLayer){var i=false;try{i3GeoMap.overlayMapTypes.forEach(function(elemento,number){if(elemento.name===nomeLayer){i=number}});return i}catch(e){return false}},retornaObjetoLayer:function(nomeLayer){var i=false;try{i3GeoMap.overlayMapTypes.forEach(function(elemento,number){if(elemento.name===nomeLayer){i=elemento}});return i}catch(e){return false}},retornaDivLayer:function(nomeLayer){var i=false,divmapa=$i("googlemapsdiv"),divlayer=divmapa.firstChild.firstChild.firstChild.getElementsByTagName("div"),divs,divimg,j,ndivs=divlayer.length;for(j=0;j<ndivs;j++){divimg=divlayer[j].getElementsByTagName("img");if(divimg.length>0){if(divimg[0].src.search("&layer="+nomeLayer+"&")>0){return divimg[0].parentNode.parentNode.parentNode}}}},ligaDesliga:function(obj){var indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(obj.value),temp=function(){i3GEO.mapa.legendaHTML.atualiza()},desligar="",ligar="";if(obj.checked&&!indice){ligar=obj.value;i3GEO.Interface.googlemaps.insereLayer(obj.value,0);i3GEO.arvoreDeCamadas.alteraPropCamadas("status","2",obj.value)}else{if(indice!==false){desligar=obj.value;i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value);i3GeoMap.overlayMapTypes.removeAt(indice)}}if(desligar!==""||ligar!==""){i3GEO.php.ligatemas(temp,desligar,ligar)}},bbox:function(){var bd,so,ne,bbox;bd=i3GeoMap.getBounds();so=bd.getSouthWest();ne=bd.getNorthEast();bbox=so.lng()+" "+so.lat()+" "+ne.lng()+" "+ne.lat();return(bbox)},ativaBotoes:function(){var imagemxy,x1,y1,x2,y2;imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){x2=imagemxy[0]+i3GEO.Interface.BARRABOTOESLEFT;y2=imagemxy[1]+i3GEO.Interface.BARRABOTOESTOP}if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","i3geo_barra2",false,x2,y2)}if(i3GEO.configura.visual!=="default"){i3GEO.gadgets.visual.troca(i3GEO.configura.visual)}i3GEO.barraDeBotoes.ativaBotoes()},mudaOpacidade:function(valor){i3GEO.Interface.googlemaps.OPACIDADE=valor/200;i3GEO.Interface.googlemaps.redesenha()},recalcPar:function(){try{var bounds,sw,ne,escalaAtual=i3GEO.parametros.mapscale;sw=i3GeoMap.getBounds().getSouthWest();ne=i3GeoMap.getBounds().getNorthEast();i3GEO.parametros.mapexten=sw.lng()+" "+sw.lat()+" "+ne.lng()+" "+ne.lat();i3GEO.parametros.mapscale=i3GEO.Interface.googlemaps.calcescala();sw=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(0,1));ne=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(1,0));i3GEO.parametros.pixelsize=sw.lng()-ne.lng();if(i3GEO.parametros.pixelsize<0){i3GEO.parametros.pixelsize=i3GEO.parametros.pixelsize*-1}if(i3GEO.parametros.mapscale!==escalaAtual&&escalaAtual!==0){i3GEO.arvoreDeCamadas.atualizaFarol(i3GEO.parametros.mapscale)}}catch(e){i3GEO.parametros.mapexten="0 0 0 0";i3GEO.parametros.mapscale=0}},calcescala:function(){var zoom=i3GeoMap.getZoom();return(i3GEO.Interface.googlemaps.ZOOMSCALE[zoom])},escala2nzoom:function(escala){var n,i;n=i3GEO.Interface.googlemaps.ZOOMSCALE.length;for(i=0;i<n;i++){if(i3GEO.Interface.googlemaps.ZOOMSCALE[i]<escala){return(i)}}},zoom2extent:function(mapexten){var pol,ret,pt1,pt2,sw,ne,z;pol=mapexten;ret=pol.split(" ");pt1=(((ret[0]*-1)-(ret[2]*-1))/2)+ret[0]*1;pt2=(((ret[1]-ret[3])/2)*-1)+ret[1]*1;sw=new google.maps.LatLng(ret[1],ret[0]);ne=new google.maps.LatLng(ret[3],ret[2]);i3GeoMap.fitBounds(new google.maps.LatLngBounds(sw,ne))},pan2ponto:function(x,y){i3GeoMap.panTo(new google.maps.LatLng(y,x))},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i,zoom;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googlemaps.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=true}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===false){i3GEO.arvoreDeCamadas.MOSTRALISTAKML=true;i3GEO.Interface.googlemaps.criaArvoreKML()}i3GEO.Interface.googlemaps.adicionaNoArvoreGoogle(url,titulo,ativo,ngeoxml)},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.googlemaps.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaNoArvoreGoogle:function(url,nomeOverlay,ativo,id){var root,node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googlemaps.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}root=i3GEO.Interface.googlemaps.ARVORE.getRoot();node=i3GEO.Interface.googlemaps.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.googlemaps.ativaDesativaCamadaKml(this,\""+url+"\")' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";if(navm){estilo="cursor:default;vertical-align:35%;padding-top:0px;"}else{estilo="cursor:default;vertical-align:top;"}html+="&nbsp;<span style='"+estilo+"'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.googlemaps.ARVORE.draw();i3GEO.Interface.googlemaps.ARVORE.collapseAll();node.expand();if(ativo===true){eval(id+" = new google.maps.KmlLayer('"+url+"',{map:i3GeoMap,preserveViewport:true});")}},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.googlemaps.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.googlemaps.ARVORE.getRoot();titulo="<table><tr><td><b>Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false;if(i3GEO.parametros.editor==="sim"){d=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/webservices.html' target=blank >Editar cadastro</a>",idmenu:"",enableHighlight:false,expanded:false},node)}},ativaDesativaCamadaKml:function(obj,url){if(!obj.checked){eval(obj.value+".setMap(null);")}else{eval(obj.value+" = new google.maps.KmlLayer(url,{map:i3GeoMap,preserveViewport:true});")}},alteraParametroLayers:function(parametro,valor){parametro=parametro.toUpperCase();var reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");i3GEO.Interface.googlemaps.PARAMETROSLAYER=i3GEO.Interface.googlemaps.PARAMETROSLAYER.replace(reg,"");i3GEO.Interface.googlemaps.PARAMETROSLAYER+="&"+parametro+"="+valor;i3GEO.Interface.googlemaps.redesenha()}},googleearth:{PARAMETROSLAYER:"&TIPOIMAGEM="+i3GEO.configura.tipoimagem,posfixo:"",GADGETS:{setMouseNavigationEnabled:true,setStatusBarVisibility:true,setOverviewMapVisibility:true,setScaleLegendVisibility:true,setAtmosphereVisibility:true,setGridVisibility:false,getSun:false,LAYER_BORDERS:true,LAYER_BUILDINGS:false,LAYER_ROADS:false,LAYER_TERRAIN:true},POSICAOTELA:[0,0],aguarde:"",ligaDesliga:function(obj){var layer=i3GEO.Interface.googleearth.retornaObjetoLayer(obj.value),temp=function(){i3GEO.mapa.legendaHTML.atualiza()},desligar="",ligar="";if(obj.checked){i3GEO.arvoreDeCamadas.alteraPropCamadas("status","2",obj.value);ligar=obj.value}else{i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value);desligar=obj.value}layer.setVisibility(obj.checked);if(desligar!==""||ligar!==""){i3GEO.php.ligatemas(temp,desligar,ligar)}},atualizaTema:function(retorno,tema){var layer=i3GEO.Interface.googleearth.retornaObjetoLayer(tema),hr=layer.getLink().getHref();hr=hr.replace("&&&&&","");layer.getLink().setHref(hr+"&");if(retorno===""){return}i3GEO.Interface.googleearth.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},redesenha:function(){i3GEO.Interface.googleearth.posfixo+="&";var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googleearth.retornaObjetoLayer(camada.name);if(indice!==false){try{i3GeoMap.getFeatures().removeChild(indice)}catch(e){}}}i3GEO.Interface.googleearth.criaLayers()},cria:function(w,h){var i,i3GeoMap3d,i3GeoMap,texto;i3GEO.configura.listaDePropriedadesDoMapa={"propriedades":[{text:"p2",url:"javascript:i3GEO.mapa.dialogo.tipoimagem()"},{text:"p3",url:"javascript:i3GEO.mapa.dialogo.opcoesLegenda()"},{text:"p4",url:"javascript:i3GEO.mapa.dialogo.opcoesEscala()"},{text:"p8",url:"javascript:i3GEO.mapa.dialogo.queryMap()"},{text:"p9",url:"javascript:i3GEO.mapa.dialogo.corFundo()"},{text:"p10",url:"javascript:i3GEO.mapa.dialogo.gradeCoord()"}]};texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setMouseNavigationEnabled===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setMouseNavigationEnabled(this.checked)'";texto+="> "+$trad("ge1");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setStatusBarVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setStatusBarVisibility(this.checked)'";texto+="> "+$trad("ge2");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setOverviewMapVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setOverviewMapVisibility(this.checked)'";texto+="> "+$trad("ge3");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setScaleLegendVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setScaleLegendVisibility(this.checked)'";texto+="> "+$trad("ge4");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setAtmosphereVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setAtmosphereVisibility(this.checked)'";texto+="> "+$trad("ge5");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setGridVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setGridVisibility(this.checked)'";texto+="> "+$trad("ge6");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.getSun===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getSun().setVisibility(this.checked)'";texto+="> "+$trad("ge7");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_BORDERS===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_BORDERS, i3GEO.Interface.checked)'";texto+="> "+$trad("ge8");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_BUILDINGS===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_BUILDINGS, i3GEO.Interface.checked)'";texto+="> "+$trad("ge9");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_ROADS===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_ROADS, i3GEO.Interface.checked)'";texto+="> "+$trad("ge10");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_TERRAIN===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_TERRAIN, i3GEO.Interface.checked)'";texto+="> "+$trad("ge11");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});i3GEO.util.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa);i3GEO.barraDeBotoes.INCLUIBOTAO.zoomli=false;i3GEO.barraDeBotoes.INCLUIBOTAO.pan=false;i3GEO.barraDeBotoes.INCLUIBOTAO.zoomtot=false;i3GEO.Interface.IDMAPA="i3GeoMap3d";i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.googleearth.ligaDesliga(this)";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)}i3GeoMap=null;google.load("earth","1")},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.gadgets.mostraMenuLista();i3GEO.Interface.googleearth.ativaBotoes();i3GEO.gadgets.mostraInserirKml("inserirKml");if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===true){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<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googleearth.retornaIndiceLayer(camada.name);layer=i3GEO.Interface.googleearth.retornaObjetoLayer(camada.name);if(indice===false){layer=i3GEO.Interface.googleearth.insereLayer(camada.name)}try{if(camada.status!=0){layer.setVisibility(true)}else{layer.setVisibility(false)}}catch(e){}}},insereLayer:function(nomeLayer){var kmlUrl=i3GEO.configura.locaplic+"/classesphp/mapa_googleearth.php?REQUEST=GetKml&g_sid="+i3GEO.configura.sid+"&layer="+nomeLayer+i3GEO.Interface.googleearth.PARAMETROSLAYER+"&r="+Math.random(),linki3geo=i3GeoMap.createLink(''),nl=i3GeoMap.createNetworkLink('');linki3geo.setHref(kmlUrl+i3GEO.Interface.googleearth.posfixo);nl.setLink(linki3geo);nl.setFlyToView(false);nl.setName(nomeLayer);i3GeoMap.getFeatures().appendChild(nl);return nl},retornaIndiceLayer:function(nomeLayer){var n=i3GeoMap.getFeatures().getChildNodes().getLength(),indice=false;for(i=0;i<n;i++){if(i3GeoMap.getFeatures().getChildNodes().item(i).getName()===nomeLayer){indice=i}}return indice},retornaObjetoLayer:function(nomeLayer){var n=i3GeoMap.getFeatures().getChildNodes().getLength(),indice=false,i;for(i=0;i<n;i++){if(i3GeoMap.getFeatures().getChildNodes().item(i).getName()===nomeLayer){indice=i3GeoMap.getFeatures().getChildNodes().item(i)}}return indice},registraEventos:function(){google.earth.addEventListener(i3GeoMap.getView(),"viewchangeend",function(e){i3GEO.Interface.googleearth.recalcPar()});google.earth.addEventListener(i3GeoMap.getGlobe(),'mousemove',function(event){d=i3GEO.calculo.dd2dms(event.getLongitude(),event.getLatitude());objposicaocursor={ddx:event.getLongitude(),ddy:event.getLatitude(),dmsx:d[0],dmsy:d[1],imgx:event.getClientX(),imgy:event.getClientY(),telax:event.getClientX()+i3GEO.Interface.googleearth.POSICAOTELA[0],telay:event.getClientY()+i3GEO.Interface.googleearth.POSICAOTELA[1]};i3GEO.eventos.mousemoveMapa()});google.earth.addEventListener(i3GeoMap.getGlobe(),'click',function(event){if(i3GEO.Interface.googleearth.aguarde.visibility==="hidden"){i3GEO.eventos.mousecliqueMapa()}else{i3GEO.Interface.googleearth.aguarde.visibility="hidden"}})},recalcPar:function(){var bounds;bounds=i3GeoMap.getView().getViewportGlobeBounds();i3GEO.parametros.mapexten=bounds.getWest()+" "+bounds.getSouth()+" "+bounds.getEast()+" "+bounds.getNorth()},falha:function(){alert("Falhou. Vc precisa do plugin instalado")},ativaBotoes:function(){var cabecalho=function(){i3GEO.barraDeBotoes.ativaIcone("")},minimiza=function(){i3GEO.janela.minimiza("i3GEOF.ferramentasGE")},janela=i3GEO.janela.cria("230px","110px","","","","Ferramentas","i3GEOF.ferramentasGE",false,"hd",cabecalho,minimiza);i3GEO.barraDeBotoes.TEMPLATEBOTAO='<div style="display:inline;background-color:rgb(250,250,250);"><img src="'+i3GEO.configura.locaplic+'/imagens/branco.gif" id="$$"/></div>&nbsp;';i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","",false,"200","200",janela[2].id);i3GEO.barraDeBotoes.ativaBotoes();i3GEO.Interface.googleearth.aguarde=$i("i3GEOF.ferramentasGE_imagemCabecalho").style;$i("i3GEOF.ferramentasGE_minimizaCabecalho").style.right="0px";$i("i3GEOF.ferramentasGE").lastChild.style.display="none";i3GEO.ajuda.abreJanela()},balao:function(texto,ddx,ddy){var placemark=i3GeoMap.createPlacemark(''),point=i3GeoMap.createPoint(''),b;point.setLatitude(ddy);point.setLongitude(ddx);placemark.setGeometry(point);b=i3GeoMap.createHtmlStringBalloon('');b.setContentString("<div style=text-align:left >"+texto+"</div>");b.setFeature(placemark);i3GeoMap.setBalloon(b)},insereMarca:function(description,ddx,ddy,name,snippet){var placemark=i3GeoMap.createPlacemark(''),point=i3GeoMap.createPoint('');placemark.setName(name);point.setLatitude(ddy);point.setLongitude(ddx);placemark.setGeometry(point);if(description!==""){placemark.setDescription(description)}placemark.setSnippet(snippet);i3GeoMap.getFeatures().appendChild(placemark)},insereCirculo:function(centerLng,centerLat,radius,name,snippet){function makeCircle(centerLat,centerLng,radius){var ring=i3GeoMap.createLinearRing(''),steps=25,i,pi2=Math.PI*2,lat,lng;for(i=0;i<steps;i++){lat=centerLat+radius*Math.cos(i/steps*pi2);lng=centerLng+radius*Math.sin(i/steps*pi2);ring.getCoordinates().pushLatLngAlt(lat,lng,0)}return ring}var polygonPlacemark=i3GeoMap.createPlacemark(''),poly=i3GeoMap.createPolygon(''),outer,polyStyle;poly.setAltitudeMode(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND);polygonPlacemark.setGeometry(poly);outer=i3GeoMap.createLinearRing('');polygonPlacemark.getGeometry().setOuterBoundary(makeCircle(centerLat,centerLng,radius));polygonPlacemark.setName(name);polygonPlacemark.setSnippet(snippet);polygonPlacemark.setStyleSelector(i3GeoMap.createStyle(''));polyStyle=polygonPlacemark.getStyleSelector().getPolyStyle();polyStyle.setFill(0);i3GeoMap.getFeatures().appendChild(polygonPlacemark)},insereLinha:function(xi,yi,xf,yf,name,snippet){var lineStringPlacemark=i3GeoMap.createPlacemark(''),lineString,lineStyle;lineStringPlacemark.setName(name);lineString=i3GeoMap.createLineString('');lineString.setAltitudeMode(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND);lineStringPlacemark.setGeometry(lineString);lineString.getCoordinates().pushLatLngAlt(yi,xi,0);lineString.getCoordinates().pushLatLngAlt(yf,xf,0);lineStringPlacemark.setStyleSelector(i3GeoMap.createStyle(''));lineStringPlacemark.setSnippet(snippet);lineStyle=lineStringPlacemark.getStyleSelector().getLineStyle();lineStyle.setWidth(3);i3GeoMap.getFeatures().appendChild(lineStringPlacemark)},removePlacemark:function(nome){var features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i,nfeatures=[];for(i=0;i<n;i++){try{if(features.getChildNodes().item(i).getName()===nome||features.getChildNodes().item(i).getDescription()===nome||features.getChildNodes().item(i).getSnippet()===nome){nfeatures.push(features.getChildNodes().item(i))}}catch(e){}}n=nfeatures.length;for(i=0;i<n;i++){features.removeChild(nfeatures[i])}},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i,zoom;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googleearth.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=false}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(arguments.length===2){ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);linki3geokml=i3GeoMap.createLink('');if(url.split("http").length===1){url=i3GEO.util.protocolo()+"://"+window.location.host+url}linki3geokml.setHref(url);eval(ngeoxml+" = i3GeoMap.createNetworkLink('')");eval(ngeoxml+".setLink(linki3geokml)");if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===false){i3GEO.arvoreDeCamadas.MOSTRALISTAKML=true;i3GEO.Interface.googleearth.criaArvoreKML()}i3GEO.Interface.googleearth.adicionaNoArvoreGoogle(url,titulo,ativo,ngeoxml)},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.googleearth.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaNoArvoreGoogle:function(url,nomeOverlay,ativo,id){var root,node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googleearth.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}root=i3GEO.Interface.googleearth.ARVORE.getRoot();node=i3GEO.Interface.googleearth.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.googleearth.ativaDesativaCamadaKml(this)' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";html+="&nbsp;<span style='cursor:move'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.googleearth.ARVORE.draw();i3GEO.Interface.googleearth.ARVORE.collapseAll();node.expand()},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.googleearth.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.googleearth.ARVORE.getRoot();titulo="<table><tr><td><b>Google Earth Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false;if(i3GEO.parametros.editor==="sim"){d=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/webservices.html' target=blank >Editar cadastro</a>",idmenu:"",enableHighlight:false,expanded:false},node)}},existeLink:function(url){var existe=false,features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i;for(i=0;i<n;i++){try{if(features.getChildNodes().item(i).getLink().getHref()===url){existe=true}}catch(e){}}return(existe)},ativaDesativaLink:function(url,valor){var features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i;for(i=0;i<n;i++){try{if(features.getChildNodes().item(i).getLink().getHref()===url){features.getChildNodes().item(i).setVisibility(valor)}}catch(e){}}},ativaDesativaCamadaKml:function(obj){var url=eval(obj.value+".getLink().getHref()"),existe=i3GEO.Interface.googleearth.existeLink(url);if(!obj.checked){i3GEO.Interface.googleearth.ativaDesativaLink(url,false)}else{if(existe===false){eval("i3GeoMap.getFeatures().appendChild("+obj.value+")")}else{i3GEO.Interface.googleearth.ativaDesativaLink(url,true)}}},zoom2extent:function(mapexten){var r=6378700,lng2,lng1,lat1,lat2,ret=mapexten.split(" "),fov=32,camera=i3GeoMap.getView().copyAsCamera(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND),dy,dx,d,dist,alt;lng2=(ret[0]*1);lng1=(ret[2]*1);lat1=(ret[1]*1);lat2=(ret[3]*1);camera.setLatitude((lat1+lat2)/2.0);camera.setLongitude((lng1+lng2)/2.0);camera.setHeading(0.0);camera.setTilt(0.0);dy=Math.max(lat1,lat2)-Math.min(lat1,lat2);dx=Math.max(lng1,lng2)-Math.min(lng1,lng2);d=Math.max(dy,dx);d=d*Math.PI/180.0;dist=r*Math.tan(d/2);alt=dist/(Math.tan(fov*Math.PI/180.0));camera.setAltitude(alt);i3GeoMap.getView().setAbstractView(camera)},alteraParametroLayers:function(parametro,valor){parametro=parametro.toUpperCase();var reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");i3GEO.Interface.googleearth.PARAMETROSLAYER=i3GEO.Interface.googleearth.PARAMETROSLAYER.replace(reg,"");i3GEO.Interface.googleearth.PARAMETROSLAYER+="&"+parametro+"="+valor;i3GEO.Interface.googleearth.redesenha()}}};if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.mapa={AUTORESIZE:false,GEOXML:[],ativaAutoResize:function(){window.onresize=function(){var temp=setTimeout(function(){i3GEO.reCalculaTamanho();i3GEO.barraDeBotoes.recria("i3geo_barra2");if(i3GEO.Interface.TABLET===true){i3GEO.guias.escondeGuias()}else{i3GEO.guias.ajustaAltura()}},2000)}},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+='<div style="cursor: pointer; text-align: left; font-size: 10px; display: block; height: 35px;" onclick="i3GEO.mapa.legendaHTML.libera()"><img id="soltaLeg" src="../imagens/branco.gif" title="clique para liberar" style="margin: 5px; position: relative;"> <p style="position: relative; left: -30px; top: -22px;">Mostra a legenda em uma janela</p></div>'}ins+="<div id='corpoLegi' >"+retorno.data.legenda+"</div>";$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<elementos.length;i+=1){elementos[i].style.display="none"}}};if(i3GEO.mapa.legendaHTML.ID!==""){idleg=$i(i3GEO.mapa.legendaHTML.ID);if(idleg&&idleg.style.display==="block"){i3GEO.mapa.legendaHTML.obtem(temp)}}idleg=$i("wlegenda");if(idleg&&idleg.style.display==="block"){i3GEO.mapa.legendaHTML.obtem(temp)}},obtem:function(funcao){i3GEO.php.criaLegendaHTML(funcao,"",i3GEO.configura.templateLegenda)},ativaDesativaTema:function(inputbox){var temp=function(){i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem);i3GEO.arvoreDeCamadas.atualiza("");i3GEO.janela.fechaAguarde("redesenha")};i3GEO.janela.abreAguarde("redesenha",$trad("o1"));if(!inputbox.checked){i3GEO.php.ligatemas(temp,inputbox.value,"")}else{i3GEO.php.ligatemas(temp,"",inputbox.value)}},libera:function(){var temp=function(retorno){var novoel,temp,n,i;if(!$i("moveLegi")){novoel=document.createElement("div");novoel.id="moveLegi";novoel.style.display="block";temp='<div class="hd" style=background:white >Legenda</div>';temp+='<div id="wlegenda" style="display:block;text-align:left;background-color:white;height:300px;width:300px;overflow:auto" ></div>';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:true});YAHOO.moveLegi.xp.panel.render()}$i("wlegenda").innerHTML=retorno.data.legenda;temp=$i("wlegenda").getElementsByTagName("input");n=temp.length;for(i=0;i<n;i+=1){temp[i].style.display="none"}YAHOO.moveLegi.xp.panel.show();$i("moveLegi_c").style.zIndex=100000;$i("moveLegi").style.border="1px solid gray"};i3GEO.mapa.legendaHTML.obtem(temp)}},legendaIMAGEM:{obtem:function(funcao){i3GEO.php.criaLegendaImagem(funcao)}},dialogo:{telaRemota:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.telaremota()","telaremota","telaremota")},t3d:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.t3d()","3d","t3d")},imprimir:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.imprimir()","imprimir","imprimir")},mostraExten:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.mostraExten()","mostraexten","mostraExten")},outputformat:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.outputformat()","outputformat","outputformat")},autoredesenha:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.autoredesenha()","opcoes_autoredesenha","opcoesTempo")},salvaMapa:function(){if(i3GEO.parametros===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.salvaMapa()","salvamapa","salvaMapa")},carregaMapa:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.carregaMapa()","carregamapa","carregaMapa")},convertews:function(){if(i3GEO.parametros.mapfile===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.convertews()","convertews","converteMapaWS")},convertekml:function(){if(i3GEO.parametros.mapfile===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.convertekml()","convertemapakml","converteMapaKml")},queryMap:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.queryMap()","opcoes_querymap","opcoesQuery")},template:function(){i3GEO.janela.cria("300px","400px",i3GEO.configura.locaplic+"/ferramentas/template/index.htm","","","Template <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=1&idajuda=8' >&nbsp;&nbsp;&nbsp;</a>")},tamanho:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tamanho()","opcoes_tamanho","opcoesTamanho")},tipoimagem:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tipoimagem()","tipoimagem","tipoimagem")},corFundo:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.corFundo()","opcoes_fundo","opcoesFundo")},opcoesEscala:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesEscala()","opcoes_escala","opcoesEscala")},opcoesLegenda:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesLegenda()","opcoes_legenda","opcoesLegenda")},gradeCoord:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.gradeCoord()","gradecoord","gradeCoord")},cliqueTexto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueTexto()","inseretxt","inseretxt")},selecao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.selecao()","selecao","selecao")},cliquePonto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliquePonto()","inserexy2","inserexy")},cliqueGrafico:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueGrafico()","inseregrafico","insereGrafico")},cliqueIdentificaDefault:function(){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<ntemas;j+=1){if(i3GEO.arvoreDeCamadas.CAMADAS[j].etiquetas!==""){etiquetas=true}}if(etiquetas===false){return}if(i3GEO.Interface.ATUAL==="padrao"){$i("img").style.cursor="wait"}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.aguarde.visibility="visible"}retorna=function(retorno){var pos,temp,rfes,n,i,mostra,res,temas,ntemas,titulo,tips,j,ntips,ins,r,ds,nds,s,balloon,configura=i3GEO.configura,tipotip=configura.tipotip;i=$i("i3geo_rosa");if(i){i.style.display="none"}mostra=false;retorno=retorno.data;if(retorno!==""){res="";temas=retorno;if(!temas){return}ntemas=temas.length;for(j=0;j<ntemas;j+=1){titulo=temas[j].nome;if(tipotip==="completo"||tipotip==="balao"){titulo="<span style='text-decoration:underline;text-align:left;font-size:9pt'><b>"+titulo+"</b></span><br>"}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<nds;s+=1){for(r=0;r<ntips;r+=1){try{eval("var alias = ds[s]."+tips[r]+".alias");eval("var valor = ds[s]."+tips[r]+".valor");eval("var link = ds[s]."+tips[r]+".link");eval("var img = ds[s]."+tips[r]+".img");if(tipotip==="completo"||tipotip==="balao"){if(valor!==""&&link===""){ins+="<span class='tiptexto' style='text-align:left;font-size:8pt'>"+alias+" :"+valor+"</span><br>"}if(valor!==""&&link!==""){ins+="<span class='tiptexto' style='text-align:left;font-size:8pt'>"+alias+" : <a style='color:blue;cursor:pointer' target=_blanck href='"+link+"' >"+valor+"</a></span><br>"}if(img!==""){ins+=img+"<br>"}ins+="<nl>";mostra=true}else{ins+="<span class='tiptexto' style='text-align:left;font-size:8pt'>"+valor+"</span><br>";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.janela.TIPS.push('marcaIdentifica');pos=i3GEO.util.posicionaImagemNoMapa("marcaIdentifica");balloon=new Balloon();BalloonConfig(balloon,'GBox');balloon.delayTime=0;res="<div style=text-align:left;overflow:auto;height:"+configura.alturatip+";width:"+configura.larguratip+"; >"+res+"</div>";temp=$i('marcaIdentifica');if(temp){balloon.showTooltip(temp,res,null,null,null,pos[1],pos[0]);balloon.addCloseButton();temp.onclick=function(e){if(!e){e=window.event}document.body.removeChild(balloon.getEventTarget(e));balloon.hideTooltip()}}}}}}if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(configura.cursores,temp,i3GEO.Interface.IDMAPA,configura.locaplic)}};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={TEMPORIZADORESID:{},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"));i3GEO.php.excluitema(i3GEO.atualiza,[tema]);i3GEO.mapa.ativaTema("")},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)}},temporizador:function(idtema,tempo){if(!tempo){tempo=$i("temporizador"+idtema).value}if(tempo!=""&&parseInt(tempo,10)>0){eval('i3GEO.tema.TEMPORIZADORESID.'+idtema+' = {tempo: '+tempo+',idtemporizador: setInterval(function('+idtema+'){if(!$i("arrastar_'+idtema+'")){delete(i3GEO.tema.TEMPORIZADORESID.'+idtema+');return;}i3GEO.Interface.atualizaTema("",idtema);},parseInt('+tempo+',10)*1000)};')}else{try{window.clearInterval(i3GEO.tema.TEMPORIZADORESID[idtema].idtemporizador);delete(i3GEO.tema.TEMPORIZADORESID[idtema])}catch(e){}}},dialogo:{mostraWms:function(tema){i3GEO.janela.mensagemSimples(i3GEO.configura.locaplic+"/ogc.php?tema="+tema,"Endereço do WMS")},comentario:function(tema){i3GEO.janela.cria("530px","330px",i3GEO.configura.locaplic+"/ferramentas/comentarios/index.php?tema="+tema+"&g_sid="+i3GEO.configura.sid+"&locaplic="+i3GEO.configura.locaplic,"","","<img src='"+i3GEO.configura.locaplic+"/imagens/player_volta.png' style=cursor:pointer onclick='javascript:history.go(-1)'><span style=position:relative;top:-2px; > Comentários de "+tema+" </span><a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=7&idajuda=68' >&nbsp;&nbsp;&nbsp;</a>","comentario"+Math.random())},cortina:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.cortina()","cortina","cortina")},abreKml:function(tema,tipo){if(arguments.lenght===1){tipo="kml"}if(typeof(i3GEOF.converteKml)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/convertekml/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.converteKml.criaJanelaFlutuante('"+tema+"','"+tipo+"')","i3GEOF.converteKml_script")}else{i3GEOF.converteKml.criaJanelaFlutuante(tema,tipo)}},salvaMapfile:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.salvamapfile()","salvamapfile","salvamapfile")},graficotema:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.graficotema()","graficotema","graficoTema")},toponimia:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.toponimia()","toponimia","toponimia")},filtro:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.filtro()","filtro","filtro")},procuraratrib:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.procuraratrib()","busca","busca")},tabela:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.tabela()","tabela","tabela")},etiquetas:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.etiquetas()","etiqueta","etiqueta")},editaLegenda:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.editaLegenda()","legenda","legenda")},download:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.download()","download","download")},sld:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.janela.cria("500px","350px",i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=tema2sld&tema="+idtema+"&g_sid="+i3GEO.configura.sid,"","","SLD <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=41' >&nbsp;&nbsp;&nbsp;</a>")},aplicarsld:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.aplicarsld()","aplicarsld","aplicarsld")},editorsql:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.editorsql()","editorsql","editorsql")}}};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 <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=3&idajuda=88' >&nbsp;&nbsp;&nbsp;</a>");atualizaLinhaDoTempo=function(){var doc,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:{inicia:function(){pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[],linhastemp:[]};i3GEO.analise.medeDistancia.criaJanela();if(g_tipoacao!=="mede"){if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.analise.medeDistancia.clique()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.analise.medeDistancia.clique()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.analise.medeDistancia.movimento()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.analise.medeDistancia.movimento()")}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.analise.medeDistancia.fechaJanela()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.analise.medeDistancia.fechaJanela()")}$i("mostradistancia").style.display="block";if(i3GEO.Interface.ATUAL!=="googleearth"){i3GEO.desenho.criaContainerRichdraw();i3GEO.desenho.richdraw.lineColor="black";i3GEO.desenho.richdraw.lineWidth="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='<div class="hd" style="font-size:11px">&nbsp;Dist&acirc;ncia aproximada <a class=ajuda_usuario target=_blank href="'+i3GEO.configura.locaplic+'/ajuda_usuario.php?idcategoria=6&idajuda=50" >&nbsp;&nbsp;&nbsp;</a></div>'+'<div class="bd" style="text-align:left;padding:3px;" >'+'<div style="text-align:left;padding:3px;" id="mostradistancia_calculo" ></div>'+'<div style="text-align:left;font-size:10px" >'+'<span style="color:navy;cursor:pointer;text-align:left;" >'+'<table class=lista7 ><tr><td><input style="cursor:pointer" type="checkbox" id="pararraios" checked /></td><td>Raios</td><td>&nbsp;</td>'+'<td>'+'<input style="cursor:pointer" type="checkbox" id="parartextos" checked />'+'</td><td>Textos<td>'+'<td>&nbsp;Estilo:</td><td>'+i3GEO.desenho.caixaEstilos()+'</td>'+'<td>&nbsp;<input id=i3GEObotaoPerfil size="22" type="button" value="perfil"></td>'+'</tr></table></span>'+'</div>'+'</div>';novoel.innerHTML=ins;novoel.style.borderColor="gray";document.body.appendChild(novoel)}else{i3GEO.util.defineValor("mostradistancia_calculo","innerHTML","")}YAHOO.namespace("janelaDocamede.xp");YAHOO.janelaDocamede.xp.panel=new YAHOO.widget.Panel("mostradistancia",{iframe:true,width:330,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]);if(navm&&i3GEO.Interface.ATUAL==="googleearth"){YAHOO.janelaDocamede.xp.panel.moveTo(0,0);alert("Essa opção não funciona bem no Internet Explorer")}temp=$i("mostradistancia_c").style;i3GEO.janela.ULTIMOZINDEX++;temp.zIndex=21000+i3GEO.janela.ULTIMOZINDEX;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(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;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,calculo=i3GEO.calculo;if(g_tipoacao==="mede"){YAHOO.util.Dom.setStyle("mostradistancia","display","block");n=pontosdistobj.xpt.length;try{if(n>0){d=calculo.distancia(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);r=calculo.direcao(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);r=calculo.dd2dms(r,r);r=r[0];d=d+"";d=d.split(".");decimal=d[1].substr(0,5);d=d[0]+"."+decimal;d=d*1;da=d+pontosdistobj.dist[n-1];da=da+"";da=da.split(".");decimal=da[1].substr(0,5);da=da[0]+"."+decimal;da=da*1;mostra=$i("mostradistancia_calculo");if(mostra){texto=" Dist acum.= "+da+" km <br>atual= "+d+" km <br> Direção (DMS)= "+r;texto+="<br>Método cálculo de distâncias: "+calculo.metododistancia;mostra.innerHTML=texto}if(i3GEO.Interface.ATUAL!=="googleearth"&&navn){i3GEO.desenho.aplica("resizeLinha",pontosdistobj.linhas[n-1],n)}}}catch(e){}}}},medeArea:{inicia:function(){pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[],linhastemp:[]};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,temp;if(!$i("mostraarea")){novoel=document.createElement("div");novoel.id="mostraarea";ins='<div class="hd" >&Aacute;rea aproximada <a class=ajuda_usuario target=_blank href="'+i3GEO.configura.locaplic+'"/ajuda_usuario.php?idcategoria=6&idajuda=51" >&nbsp;&nbsp;&nbsp;</a></div>'+'<div class="bd" style="text-align:left;padding:3px;font-size:10px" >'+'Estilo: '+i3GEO.desenho.caixaEstilos()+'<br>'+'<div style="text-align:left;padding:3px;font-size:10px" id="mostraarea_calculo" ></div>'+'</div>';novoel.innerHTML=ins;novoel.style.borderColor="gray";document.body.appendChild(novoel)}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);temp=$i("mostraarea_c").style;i3GEO.janela.ULTIMOZINDEX++;temp.zIndex=21000+i3GEO.janela.ULTIMOZINDEX},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;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","<br>m2</b>= "+m.toFixed(2)+"<br><b>km2</b>= "+(m/1000000).toFixed(2)+"<br><b>ha</b>= "+(m/10000).toFixed(2));if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["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;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:85,TOP:4,RIGHT:0,inicia:function(){var r,pos,novoel,ins,temp,moveX,moveY,escondeRef;if(navm){i3GEO.maparef.TRANSICAOSUAVE=false}if(!$i("i3geo_winRef")){novoel=document.createElement("div");novoel.id="i3geo_winRef";novoel.style.display="none";novoel.style.borderColor="gray";ins="";if(this.PERMITEDESLOCAR){ins+='<div class="hd" style="text-align:left;z-index:20;padding-left: 0px;padding-bottom: 3px;padding-top: 1px;">';ins+='<span id=maparefmaismenosZoom style=display:none > ';temp="javascript:if(i3GEO.maparef.fatorZoomDinamico == -1){i3GEO.maparef.fatorZoomDinamico = 1};i3GEO.maparef.fatorZoomDinamico = i3GEO.maparef.fatorZoomDinamico + 1 ;$i(\"refDinamico\").checked = true;i3GEO.maparef.atualiza();";ins+="<img class=mais onclick='"+temp+"' src="+i3GEO.util.$im("branco.gif")+" />";temp="javascript:if(i3GEO.maparef.fatorZoomDinamico == 1){i3GEO.maparef.fatorZoomDinamico = -1};i3GEO.maparef.fatorZoomDinamico = i3GEO.maparef.fatorZoomDinamico - 1 ;$i(\"refDinamico\").checked = true;i3GEO.maparef.atualiza();";ins+="<img class=menos onclick='"+temp+"' src="+i3GEO.util.$im("branco.gif")+" /></span>&nbsp;";if(this.SELETORTIPO){ins+="<select style='font-size:9px;' id='refDinamico' onchange='javascript:i3GEO.parametros.celularef=\"\";i3GEO.maparef.atualiza()'>";ins+="<option value='fixo' select >fixo</option>";ins+="<option value='mapa' >mapa</option>";ins+="<option value='dinamico' >dinâmico</option>";ins+="</select>"}ins+="</div>"}ins+='<div class="bd" style="text-align:left;padding:3px;height: 150px;" id="mapaReferencia" onmouseover="this.onmousemove=function(exy){i3GEO.eventos.posicaoMouseMapa(exy)}" >';ins+='<img style="cursor:pointer;display:none" onload="javascript:this.style.display = \'block\'" id="imagemReferencia" src="" onclick="javascript:i3GEO.maparef.click()">';ins+='</div>';novoel.innerHTML=ins;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.maparef.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($i("localizarxygeoProjxg")){var temp=function(){i3GEO.coordenadas.atualizaGeo(objposicaocursor.dmsx,objposicaocursor.dmsy,"localizarxygeoProj")};YAHOO.util.Event.addListener($i("imagemReferencia"),"mousemove",temp)}}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.maparef.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.maparef.atualiza()")}this.atualiza(true);$i("i3geo_winRef_h").className="hd2";if(navm){$i("i3geo_winRef_h").style.width="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.toLowerCase()!=="sim"){if(i3GEO.parametros.celularef===""||$i("imagemReferencia").src===""||forca===true){i3GEO.php.referencia(i3GEO.maparef.processaImagem)}else{i3GEO.maparef.atualizaBox()}if(temp){temp.style.display="none"}}else{re=new RegExp("&mode=map","g");$i("imagemReferencia").src=$i(i3GEO.Interface.IDMAPA).src.replace(re,'&mode=reference');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")}}};if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.ajuda={ATIVAJANELA:true,DIVAJUDA:"i3geo_ajuda",DIVLETREIRO:"i3geo_letreiro",MENSAGEMPADRAO:$trad("p1"),TRANSICAOSUAVE:true,OPACIDADE:20,abreDoc:function(){window.open(i3GEO.configura.locaplic+"/documentacao/index.html")},abreJanela:function(){try{var nx,ny,pos,corpo,texto,janela,temp,largura=262,YU=YAHOO.util;if(this.ATIVAJANELA===false){return}temp=$i("contemFerramentas");if(temp){largura=parseInt(temp.style.width,10)-5}if(!$i("janelaMenTexto")){corpo=$i(i3GEO.Interface.IDCORPO);if(corpo){pos=YU.Dom.getXY(corpo);nx=pos[0]-largura-3;ny=i3GEO.parametros.h-78}texto='<div id="janelaMenTexto" style="text-align:left;font-size:10px;color:rgb(80,80,80)">'+i3GEO.ajuda.MENSAGEMPADRAO+'</div>';janela=i3GEO.janela.cria(largura-3,"auto","",nx,ny,"&nbsp;","i3geo_janelaMensagens",false,"hd","","",true);janela[2].innerHTML=texto;YU.Event.addListener(janela[0].close,"click",i3GEO.ajuda.fechaJanela);this.ativaCookie()}}catch(e){}},ativaCookie:function(){var i=i3GEO.util.insereCookie;i("g_janelaMen","sim");i("botoesAjuda","sim")},ativaLetreiro:function(mensagem){var l;if($i(i3GEO.ajuda.DIVLETREIRO)){if(arguments.length===0){mensagem=i3GEO.parametros.mensagens}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.ajuda.ativaLetreiro()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.ajuda.ativaLetreiro()")}try{clearTimeout(i3GEO.ajuda.tempoLetreiro)}catch(e){i3GEO.ajuda.tempoLetreiro=""}l=$i(i3GEO.ajuda.DIVLETREIRO);if(l.style.display==="none"){return}l.style.cursor="pointer";if(mensagem===""){l.value="";return}if(l.size===1){l.size=i3GEO.parametros.w/8}BMessage=mensagem+" ---Clique para parar--- ";l.onclick=function(){l.style.display="none"};if(BMessage!==" ---Clique para parar--- "){BQuantas=0;BSize=l.size;BPos=BSize;BSpeed=1;BSpaces="";i3GEO.ajuda.mostraLetreiro()}i3GEO.ajuda.mostraLetreiro(mensagem)}},desativaCookie:function(){i3GEO.util.insereCookie("g_janelaMen","nao")},fechaJanela:function(){i3GEO.ajuda.desativaCookie();i3GEO.util.removeChild("i3geo_janelaMensagens_c",document.body)},mostraJanela:function(texto){var j=$i(this.DIVAJUDA),k=$i("janelaMenTexto"),jm=$i("i3geo_janelaMensagens"),Dom=YAHOO.util.Dom,h=parseInt(Dom.getStyle(jm,"height"),10),temp;if(j){j.innerHTML=texto===""?"-":texto}else{if(h){Dom.setY("i3geo_janelaMensagens",Dom.getY(jm)+h)}if(k){k.innerHTML=texto}if(this.TRANSICAOSUAVE){temp=texto!==""?Dom.setStyle(jm,"opacity","1"):Dom.setStyle(jm,"opacity",(this.OPACIDADE/100))}h=parseInt(Dom.getStyle(jm,"height"),10);if(h){Dom.setY(jm,Dom.getY(jm)-h)}}},mostraLetreiro:function(){for(count=0;count<BPos;count+=1){BSpaces+=" "}if(BPos<1){$i(i3GEO.ajuda.DIVLETREIRO).value=BMessage.substring(Math.abs(BPos),BMessage.length);if(BPos+BMessage.length<1){BPos=BSize;BQuantas=BQuantas+1}}else{$i(i3GEO.ajuda.DIVLETREIRO).value=BSpaces+BMessage}BPos-=BSpeed;if(BQuantas<2){i3GEO.ajuda.tempoLetreiro=setTimeout(function(){i3GEO.ajuda.mostraLetreiro()},140)}},redesSociais:function(){i3GEO.janela.cria("400px","400px",i3GEO.configura.locaplic+"/ferramentas/redessociais/index.php","","",$trad("u5c"),YAHOO.util.Dom.generateId(null,"redes"))}};if(typeof(i3GEO)==='undefined'){i3GEO=[]}YAHOO.namespace("janelaDoca.xp");YAHOO.janelaDoca.xp.manager=new YAHOO.widget.OverlayManager();i3GEO.janela={ESTILOBD:"display:block;padding:5px 0px 5px 2px;",ESTILOAGUARDE:"normal",AGUARDEMODAL:false,ANTESCRIA:["i3GEO.janela.prepara()"],ANTESFECHA:[],TRANSICAOSUAVE:true,OPACIDADE:65,TIPS:[],ULTIMOZINDEX:0,JANELASAGUARDE:[],prepara:function(){var iu=i3GEO.util;iu.escondePin();iu.escondeBox()},cria:function(wlargura,waltura,wsrc,nx,ny,texto,id,modal,classe,funcaoCabecalho,funcaoMinimiza){var i,wlargurA,ins,novoel,wdocaiframe,pos,temp,fix,underlay,ifr;if(navm&&!chro){this.TRANSICAOSUAVE=false}if(this.ANTESCRIA){for(i=0;i<this.ANTESCRIA.length;i++){eval(this.ANTESCRIA[i])}}if(arguments.length<7||id===""){id="wdoca";modal=false;classe="hd";funcaoCabecalho=null;funcaoMinimiza=null}if(arguments.length===7){modal=false;classe="hd";funcaoCabecalho=null;funcaoMinimiza=null}if(arguments.length===8){classe="hd";funcaoCabecalho=null;funcaoMinimiza=null}if(arguments.length===9){funcaoCabecalho=null;funcaoMinimiza=null}if(arguments.length===10){funcaoMinimiza=null}if(i3GEO.Interface.ATUAL==="googleearth"){classe="hd";i3GEO.janela.TRANSICAOSUAVE=false}wlargurA=parseInt(wlargura,10)+2+"px";if($i(id)){YAHOO.janelaDoca.xp.panel.destroy()}i3GEO.util.removeChild(id+"_c");i3GEO.util.removeChild(id);ins='<div id="'+id+'_cabecalho" class="'+classe+'" style="background-color:white;">';if(i3GEO.configura!==undefined){ins+="<img id='"+id+"_imagemCabecalho' style='position:absolute;left:3px;top:2px;visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' />"}ins+=texto;if(funcaoMinimiza){ins+="<div id='"+id+"_minimizaCabecalho' class='container-minimiza'></div>"}ins+='</div><div id="'+id+'_corpo" class="bd" style="'+this.ESTILOBD+'">';if(wsrc!==""){ins+='<iframe name="'+id+'i" id="'+id+'i" valign="top" style="border:0px white solid"></iframe>'}ins+='</div>';novoel=document.createElement("div");novoel.id=id;novoel.style.display="block";novoel.style.border="1px solid rgb(120 120 120)";novoel.innerHTML=ins;if(this.TRANSICAOSUAVE){novoel.onmouseover=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",1)};novoel.onmouseout=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.janela.OPACIDADE/100)};YAHOO.util.Dom.setStyle(novoel,"opacity",1)}document.body.appendChild(novoel);wdocaiframe=$i(id+"i");if(wdocaiframe){temp=wdocaiframe.style;temp.width=parseInt(wlargura,10)-12;temp.height=waltura;temp.display="block";wdocaiframe.src=wsrc}else{if(waltura!=="auto"){$i(id+'_corpo').style.height=parseInt(waltura,10)}$i(id+'_corpo').style.width=parseInt(wlargura,10)}fix=false;if(nx===""||nx==="center"){fix=true}if(modal===true){underlay="none"}else{underlay="shadow"}if(i3GEO.Interface.ATUAL==="googleearth"||i3GEO.Interface.ATUAL==="flamingo"){ifr=true}else{ifr=false}if(waltura==="auto"){YAHOO.janelaDoca.xp.panel=new YAHOO.widget.Panel(id,{iframe:ifr,modal:modal,width:wlargurA,underlay:"none",fixedcenter:fix,constraintoviewport:false,visible:true,monitorresize:false,dragOnly:true,keylisteners:null})}else{YAHOO.janelaDoca.xp.panel=new YAHOO.widget.ResizePanel(id,{iframe:ifr,underlay:underlay,modal:modal,width:wlargurA,fixedcenter:fix,constraintoviewport:false,visible:true,monitorresize:false,dragOnly:true,keylisteners:null})}if(nx!==""&&nx!=="center"){YAHOO.janelaDoca.xp.panel.moveTo(nx,ny+50)}YAHOO.janelaDoca.xp.manager.register(YAHOO.janelaDoca.xp.panel);if(this.TRANSICAOSUAVE){YAHOO.janelaDoca.xp.panel.cfg.setProperty("effect",[{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.5}])}YAHOO.janelaDoca.xp.panel.render();if(navm&&id!=="i3geo_janelaMensagens"&&i3GEO.Interface.ATUAL==="googleearth"){YAHOO.janelaDoca.xp.panel.moveTo(0,0)}if(ifr===true){YAHOO.janelaDoca.xp.panel.iframe.style.zIndex=0}if(modal===true){if($i(id+"_mask")){$i(id+"_mask").style.zIndex=9000+i3GEO.janela.ULTIMOZINDEX+1;i3GEO.janela.ULTIMOZINDEX=9000+i3GEO.janela.ULTIMOZINDEX+1}}if($i(id+"_c")){$i(id+"_c").style.zIndex=23000+i3GEO.janela.ULTIMOZINDEX+1;i3GEO.janela.ULTIMOZINDEX=23000+i3GEO.janela.ULTIMOZINDEX+1}if(funcaoCabecalho){$i(id+'_cabecalho').onclick=funcaoCabecalho}if(funcaoMinimiza){$i(id+"_minimizaCabecalho").onclick=funcaoMinimiza}YAHOO.util.Event.addListener(YAHOO.janelaDoca.xp.panel.close,"click",i3GEO.janela.fecha,YAHOO.janelaDoca.xp.panel,{id:id},true);i3GEO.janela.ULTIMOZINDEX++;return([YAHOO.janelaDoca.xp.panel,$i(id+"_cabecalho"),$i(id+"_corpo")])},minimiza:function(id){var temp=$i(id+"_corpo"),n,i,m=YAHOO.janelaDoca.xp.manager.find(id);if(temp){if(temp.style.display==="block"){temp.style.display="none";if(m){m.hideIframe}}else{temp.style.display="block";if(m){m.showIframe}}}temp=$i(id+"_resizehandle");if(temp){if(temp.style.display==="none"){temp.style.display="block"}else{temp.style.display="none"}}temp=$i(id+"_c");if(temp){temp=temp.getElementsByTagName("div");n=temp.length;for(i=0;i<n;i++){if(temp[i].className==="underlay"||temp[i].className==="bd"){if(temp[i].style.display==="none"){temp[i].style.display="block"}else{temp[i].style.display="none"}}}}temp=$i(id+"_corpo");if(temp){if(temp.style.display==="none"){temp.style.display="block"}else{temp.style.display="none"}}},fecha:function(event){var i,old,id,iu=i3GEO.util;iu.escondePin();iu.escondeBox();if(this.ANTESFECHA){for(i=0;i<this.ANTESFECHA.length;i++){eval(this.ANTESFECHA[i])}}if(this.id){id=this.id}else{id=event.id}iu.removeChild(id+"_c");iu.removeChild(id);iu.removeChild(id+"_mask");iu.removeScriptTag(id+"_script");YAHOO.janelaDoca.xp.manager.remove(YAHOO.janelaDoca.xp.manager.find(id))},alteraTamanho:function(w,h,id){var i;if(arguments.length===3){i=$i(id)}else{i=$i("wdoca")}if(i){i.style.width=w;i.style.height=h}},abreAguarde:function(id,texto){var pos,index,contador,temp;document.body.style.cursor="wait";i3GEO.util.removeChild(id+"_mask");i3GEO.util.removeChild(id+"_c");YAHOO.namespace("aguarde."+id);pos=[0,0];if($i(i3GEO.Interface.IDCORPO)){pos=YAHOO.util.Dom.getXY($i(i3GEO.Interface.IDCORPO))}else if($i("contemImg")){pos=YAHOO.util.Dom.getXY($i("contemImg"))}texto+="<br><span style='color:navy;cursor:pointer;font-size:9px;' onclick='javascript:if(i3GEO.janela.AGUARDEMODAL == true){i3GEO.janela.AGUARDEMODAL = false;}else{i3GEO.janela.AGUARDEMODAL = true;}'>bloquear/desbloquear</span>";contador="";for(index=0;index<i3GEO.contadorAtualiza;index++){contador=contador+"."}eval('YAHOO.aguarde.'+id+' = new YAHOO.widget.Panel("'+id+'",{width:"240px",fixedcenter:false,underlay:"none",close:true,draggable:false,modal:'+i3GEO.janela.AGUARDEMODAL.toString()+',monitorresize:false})');i3GEO.janela.JANELASAGUARDE.push(id);if(i3GEO.janela.ESTILOAGUARDE==="normal"||i3GEO.janela.ESTILOAGUARDE==="reduzida"){eval('YAHOO.aguarde.'+id+'.setBody(texto)');eval('YAHOO.aguarde.'+id+'.body.style.padding="5px"')}if(i3GEO.janela.ESTILOAGUARDE==="normal"||i3GEO.janela.ESTILOAGUARDE==="minima"){eval('YAHOO.aguarde.'+id+'.setHeader("<span><img id=aguardeGifAberto src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span>&nbsp;<span style=font-size:8px >'+contador+'</span>")')}eval('YAHOO.aguarde.'+id+'.render(document.body)');if(i3GEO.parametros.w>0){eval('YAHOO.aguarde.'+id+'.moveTo('+(pos[0]+(i3GEO.parametros.w/2)-120)+','+pos[1]+')')}else{eval('YAHOO.aguarde.'+id+'.moveTo('+pos[0]+','+pos[1]+')')}eval('YAHOO.aguarde.'+id+'.show()');if($i(id+"_mask")){$i(id+"_mask").style.zIndex=25000}temp=$i(id+"_c");if(temp){temp.style.zIndex=26000;temp.style.backgroundColor=""}},ativaAlerta:function(){YAHOO.namespace("dialogInfo");YAHOO.dialogInfo=new YAHOO.widget.SimpleDialog("simpledialog1",{width:"300px",fixedcenter:true,visible:false,draggable:false,zIndex:100000,textAlign:"left",close:true,modal:true,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25},constraintoviewport:true,buttons:[{text:"fecha",handler:function(){this.hide()},isDefault:true}],icon:YAHOO.widget.SimpleDialog.ICON_WARN,text:""});YAHOO.dialogInfo.setHeader("Alerta");YAHOO.dialogInfo.render(document.body);window.alert=function(texto){YAHOO.dialogInfo.cfg.setProperty("text",texto);YAHOO.dialogInfo.show()}},mensagemSimples:function(texto,cabecalho){if(!$i("mensagemSimples1")){YAHOO.namespace("mensagemSimples");YAHOO.mensagemSimples=new YAHOO.widget.SimpleDialog("mensagemSimples1",{width:"300px",fixedcenter:true,visible:true,draggable:true,zIndex:100000,textAlign:"left",close:true,modal:false,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25},constraintoviewport:true,text:""})}YAHOO.mensagemSimples.setHeader(cabecalho);YAHOO.mensagemSimples.render(document.body);YAHOO.mensagemSimples.cfg.setProperty("text",texto);YAHOO.mensagemSimples.show()},tip:function(cabecalho){var Nid,i,novoel,res;if(arguments.length===0){cabecalho="fixar"}Nid=YAHOO.util.Dom.generateId();i=$i("i3geo_rosa");if(i){i.style.display="none"}if($i(i3GEO.Interface.IDCORPO)){$i("img").title=""}novoel=document.createElement("div");novoel.id=Nid;novoel.style.position="absolute";novoel.style.zIndex=5000;novoel.style.textAlign="left";novoel.style.background="white";if(navm){novoel.style.filter="alpha(opacity=90)"}else{novoel.style.opacity=".9"}document.body.appendChild(novoel);i3GEO.janela.TIPS.push($i(Nid));res="<div id='"+Nid+"cabecatip' style='text-align:left;background-color:rgb(240,240,240)'>";res+="<span style='color:navy;cursor:pointer;text-align:left' onclick='javascript:$i(\""+Nid+"cabecatip\").innerHTML =\"\";' >"+cabecalho+"</span></div>";novoel.innerHTML="<table style='text-align:left'><tr><td style='text-align:left'>"+res+"</td></tr></table>";ist=novoel.style;ist.top=objposicaocursor.telay-9;ist.left=objposicaocursor.telax-5;ist.display="block";if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.janela.excluiTips('todos')")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.janela.excluiTips('todos')")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.janela.excluiTips('naofixos')")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.janela.excluiTips('naofixos')")}return(Nid)},excluiTips:function(tipo){var ot,i;if(arguments.length===0){tipo="todos"}if(i3GEO.janela.TIPS.length>0){ot=i3GEO.janela.TIPS.length-1;if(ot>=0){do{if(tipo==='todos'){if(i3GEO.janela.TIPS[ot]){i=$i(i3GEO.janela.TIPS[ot].id);document.body.removeChild(i)}}if(tipo==='naofixos'){if($i(i3GEO.janela.TIPS[ot])){if($i(i3GEO.janela.TIPS[ot].id+"cabecatip").innerHTML!==""){document.body.removeChild($i(i3GEO.janela.TIPS[ot].id))}}}}while(ot--);if(tipo==="todos"){i3GEO.janela.TIPS=[]}}}},slider:function(funcao,inicial){var tickSize,keyIncrement,scaleFactor,bottomConstraint,topConstraint,janela,novoel,Event,Dom,lang,slider,bg,thumb,valuearea,textfield;janela=i3GEO.janela.cria(230,200,"","","","Opacidade","opacidadeG");novoel=document.createElement("div");novoel.id="slider-bg";novoel.tabindex="-1";novoel.innerHTML='<div style="cursor:default;position:absolute;top:4px" id="slider-thumb"><img src="'+i3GEO.configura.locaplic+'/imagens/thumb-n.gif"></div>';janela[2].appendChild(novoel);Event=YAHOO.util.Event;Dom=YAHOO.util.Dom;lang=YAHOO.lang;bg="slider-bg";thumb="slider-thumb";valuearea="slider-value";textfield="slider-converted-value";novoel.style.position="relative";novoel.style.background='url('+i3GEO.configura.locaplic+'/imagens/bg-fader.gif) 5px 0 no-repeat';novoel.style.height="28px";novoel.style.width="228px";topConstraint=0;bottomConstraint=200;scaleFactor=1;keyIncrement=20;tickSize=20;Event.onDOMReady(function(){slider=YAHOO.widget.Slider.getHorizSlider(bg,thumb,topConstraint,bottomConstraint,20);slider.setValue(parseInt(inicial,10));slider.getRealValue=function(){return Math.round(this.getValue()*scaleFactor)};slider.subscribe("slideEnd",function(offsetFromStart){var actualValue=slider.getRealValue();eval(funcao+"("+actualValue+")")})});Event.on("putval","click",function(e){slider.setValue(100,false)})},fechaAguarde:function(id){document.body.style.cursor="default";if(arguments.length>0&&typeof(id)!=='undefined'){try{if($i(id+"_c")){eval('YAHOO.aguarde.'+id+'.destroy()')}if($i(id+"_c")){$i("i3geo").removeChild($i(id+"_c"))}if($i(id+"_mask")){$i("i3geo").removeChild($i(id+"_mask"))}}catch(e){}}else{try{var id,i,n=this.JANELASAGUARDE.length,iu=i3GEO.util;for(i=0;i<n;i+=1){id=this.JANELASAGUARDE[i];if($i(id+"_c")){eval('YAHOO.aguarde.'+id+'.destroy()')}iu.removeChild(id+"_c");iu.removeChild(id+"_mask")}this.JANELASAGUARDE=[]}catch(e){}}}};try{YAHOO.widget.ResizePanel=function(el,userConfig){if(arguments.length>0){YAHOO.widget.ResizePanel.superclass.constructor.call(this,el,userConfig)}};YAHOO.widget.ResizePanel.CSS_PANEL_RESIZE="yui-resizepanel";YAHOO.widget.ResizePanel.CSS_RESIZE_HANDLE="resizehandle";YAHOO.extend(YAHOO.widget.ResizePanel,YAHOO.widget.Panel,{init:function(el,userConfig){YAHOO.widget.ResizePanel.superclass.init.call(this,el);this.beforeInitEvent.fire(YAHOO.widget.ResizePanel);var Dom=YAHOO.util.Dom,Event=YAHOO.util.Event,oInnerElement=this.innerElement,oResizeHandle=document.createElement("DIV"),sResizeHandleId=this.id+"_resizehandle";oResizeHandle.id=sResizeHandleId;oResizeHandle.className=YAHOO.widget.ResizePanel.CSS_RESIZE_HANDLE;Dom.addClass(oInnerElement,YAHOO.widget.ResizePanel.CSS_PANEL_RESIZE);this.resizeHandle=oResizeHandle;function initResizeFunctionality(){var me=this,oHeader=this.header,oBody=this.body,oFooter=this.footer,nStartWidth,nStartHeight,aStartPos,nBodyBorderTopWidth,nBodyBorderBottomWidth,nBodyTopPadding,nBodyBottomPadding,nBodyOffset;oInnerElement.appendChild(oResizeHandle);this.ddResize=new YAHOO.util.DragDrop(sResizeHandleId,this.id);this.ddResize.setHandleElId(sResizeHandleId);this.ddResize.onMouseDown=function(e){nStartWidth=oInnerElement.offsetWidth;nStartHeight=oInnerElement.offsetHeight;if(YAHOO.env.ua.ie&&document.compatMode==="BackCompat"){nBodyOffset=0}else{nBodyBorderTopWidth=parseInt(Dom.getStyle(oBody,"borderTopWidth"),10);nBodyBorderBottomWidth=parseInt(Dom.getStyle(oBody,"borderBottomWidth"),10);nBodyTopPadding=parseInt(Dom.getStyle(oBody,"paddingTop"),10);nBodyBottomPadding=parseInt(Dom.getStyle(oBody,"paddingBottom"),10);nBodyOffset=nBodyBorderTopWidth+nBodyBorderBottomWidth+nBodyTopPadding+nBodyBottomPadding}me.cfg.setProperty("width",nStartWidth+"px");aStartPos=[Event.getPageX(e),Event.getPageY(e)]};this.ddResize.onDrag=function(e){var aNewPos=[Event.getPageX(e),Event.getPageY(e)],nOffsetX=aNewPos[0]-aStartPos[0],nOffsetY=aNewPos[1]-aStartPos[1],nNewWidth=Math.max(nStartWidth+nOffsetX,10),nNewHeight=Math.max(nStartHeight+nOffsetY,10),nBodyHeight=(nNewHeight-(oFooter.offsetHeight+oHeader.offsetHeight+nBodyOffset));me.cfg.setProperty("width",nNewWidth+"px");if(navm){nNewWidth=nNewWidth-2}oBody.style.width=nNewWidth-2+"px";if(nBodyHeight<0){nBodyHeight=0}oBody.style.height=nBodyHeight+"px";if($i("wdocai")){$i("wdocai").style.height=nBodyHeight;$i("wdocai").style.width=oBody.style.width}};this.ddResize.onMouseUp=this.ddResize.onDrag.call()}function onBeforeShow(){initResizeFunctionality.call(this);this.unsubscribe("beforeShow",onBeforeShow)}function onBeforeRender(){if(!this.footer){this.setFooter("")}if(this.cfg.getProperty("visible")){initResizeFunctionality.call(this)}else{this.subscribe("beforeShow",onBeforeShow)}this.unsubscribe("beforeRender",onBeforeRender)}this.subscribe("beforeRender",onBeforeRender);if(userConfig){this.cfg.applyConfig(userConfig,true)}this.initEvent.fire(YAHOO.widget.ResizePanel)},toString:function(){return"ResizePanel "+this.id}})}catch(e){}if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.guias={ATUAL:"temas",ALTURACORPOGUIAS:0,CONFIGURA:{"temas":{titulo:$trad("g4a"),id:"guia1",idconteudo:"guia1obj",click:""},"adiciona":{titulo:$trad("g1a"),id:"guia2",idconteudo:"guia2obj",click:function(){var ondeArvore;i3GEO.guias.mostra("adiciona");if(!$i("arvoreAdicionaTema")){try{ondeArvore=objmapa.guiaMenu+"obj"}catch(e){ondeArvore="guia2obj"}}else{ondeArvore="arvoreAdicionaTema"}if(document.getElementById("outrasOpcoesAdiciona")){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde="outrasOpcoesAdiciona";i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore=false}i3GEO.arvoreDeTemas.cria(i3GEO.configura.sid,i3GEO.configura.locaplic,ondeArvore)}},"legenda":{titulo:$trad("g3"),id:"guia4",idconteudo:"guia4obj",click:function(){i3GEO.guias.mostra("legenda");i3GEO.mapa.legendaHTML.cria("guia4obj")}},"mapas":{titulo:"Links",id:"guia5",idconteudo:"guia5obj",click:function(){var pegaMapas=function(retorno){var ins,mapa,ig1lt,ig1,nome,lkd,link,temp;ins="<br><div id='banners' style='overflow:auto;text-align:left'>";mapa=retorno.data.mapas;ig1lt=mapa.length;ig1=0;if(ig1lt>0){do{temp=mapa[ig1];nome=temp.NOME;if(temp.PUBLICADO){if(temp.PUBLICADO.toLowerCase()==="nao"){nome="<s>"+nome+"</s>"}}lkd=temp.LINK;link=i3GEO.configura.locaplic+"/ms_criamapa.php?temasa="+temp.TEMAS+"&layers="+temp.LIGADOS;if(temp.EXTENSAO!==""){link+="&mapext="+temp.EXTENSAO}if(temp.OUTROS!==""){link+="&"+temp.OUTROS}if(lkd!==""){link=lkd}ins+="<div><a href='"+link+"'><img src='"+temp.IMAGEM+"'></a></div><br>";ins+="<div><p style=text-align:center >"+nome+"</p></div><br>";ig1++}while(ig1<ig1lt)}$i(i3GEO.guias.CONFIGURA.mapas.idconteudo).innerHTML=ins+"</div>"};$i(i3GEO.guias.CONFIGURA.mapas.idconteudo).innerHTML="Aguarde...";i3GEO.guias.mostra("mapas");i3GEO.php.pegaMapas(pegaMapas)}}},ORDEM:"",TIPO:"guia",IDGUIAS:"guiasYUI",cria:function(onde){var nguiasreal=0,onf,outf,guiaconteudo,id,guia,guias,nguias,g,re,ng,tituloguia,i,ins,largura,altura,temp,CONFIGURA=i3GEO.guias.CONFIGURA,guias=i3GEO.util.listaChaves(CONFIGURA);try{nguias=guias.length;for(g=0;g<12;g++){tituloguia="";if($i("guia"+g)){tituloguia=$i("guia"+g).innerHTML;re=new RegExp("&nbsp;","g");tituloguia=tituloguia.replace(re,'');for(ng=0;ng<nguias;ng++){if(CONFIGURA[guias[ng]].id==="guia"+g){tituloguia=""}}if(tituloguia!==""){i3GEO.guias.CONFIGURA["guia"+g]=[];i3GEO.guias.CONFIGURA["guia"+g].titulo=tituloguia;i3GEO.guias.CONFIGURA["guia"+g].id="guia"+g;i3GEO.guias.CONFIGURA["guia"+g].idconteudo="guia"+g+"obj";if($i('guia'+g).onclick){i3GEO.guias.CONFIGURA["guia"+g].click=$i("guia"+g).onclick}}}}if(i3GEO.guias.ORDEM===""){guias=i3GEO.util.listaChaves(CONFIGURA)}else{guias=i3GEO.guias.ORDEM}nguias=guias.length;if(arguments.length===0){for(ng=0;ng<nguias;ng++){i=$i(i3GEO.guias.CONFIGURA[guias[ng]].id);if(i){onde=i.parentNode}}}else{onde=$i(onde)}if(!onde){return}onde.id=i3GEO.guias.IDGUIAS;onde.className="yui-navset";if(i3GEO.guias.TIPO==="guia"||i3GEO.guias.TIPO==="tablet"){ins='<ul class="yui-nav" style="border-width:0pt 0pt 0px;border-color:rgb(240,240,240);border-bottom-color:white;text-align:center;">';for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){if($i(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo)){ins+='<li><a alt="" title=""><em><div id="'+i3GEO.guias.CONFIGURA[guias[ng]].id+'" >'+i3GEO.guias.CONFIGURA[guias[ng]].titulo+'</div></em></a></li>'}}}ins+="</ul>";onde.innerHTML=ins;onf=function(event){var bcg,cor;YAHOO.util.Event.stopEvent(event);bcg=this.parentNode.parentNode.style;cor=bcg.background.split(" ")[0];if(cor!=="white"&&bcg.backgroundColor!=="white"){bcg.background="#bfdaff"}};outf=function(event){var bcg,cor;YAHOO.util.Event.stopEvent(event);bcg=this.parentNode.parentNode.style;cor=bcg.background.split(" ")[0];if(cor!=="white"&&bcg.backgroundColor!=="white"){bcg.background="transparent"}}}if(i3GEO.guias.TIPO==="sanfona"){ins='<dl id=sanfona'+onde.id+' class="accordion" >';if(i3GEO.guias.ORDEM===""){for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){nguiasreal++}}}else{nguiasreal=i3GEO.guias.ORDEM.length}if(navn){altura=i3GEO.parametros.h-(nguiasreal*25)-1}else{altura=i3GEO.parametros.h-(nguiasreal*23)+1}for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){id=i3GEO.guias.CONFIGURA[guias[ng]].idconteudo;temp=$i(id);if(temp){guiaconteudo=temp.innerHTML;temp.innerHTML="";temp.style.display="none";temp.id="";ins+='<dt style=height:17px id="'+i3GEO.guias.CONFIGURA[guias[ng]].id+'" >'+'<table class=accordiontable ><tr><td width="98%" >'+i3GEO.guias.CONFIGURA[guias[ng]].titulo+'</td><td width="2%" ><img id="" src="'+i3GEO.configura.locaplic+'/imagens/branco.gif" style="width:10px;" /></td></tr></table>'+'<dd clas=close >'+'<div class=bd >'+'<div id="'+id+'" >'+guiaconteudo+'</div></div></dd>'}}}ins+="</dl>";onde.innerHTML=ins;onde.style.height=altura+"px";onf=function(){};outf=function(){};YAHOO.lutsr.accordion.init(true,5,false,"sanfona"+onde.id,altura);i3GEO.guias.ALTURACORPOGUIAS=altura}for(g=0;g<nguias;g++){guia=i3GEO.guias.CONFIGURA[guias[g]];id=guia.id;guiaconteudo=$i(id);if(guiaconteudo){if(guia.click===""||guia.click===undefined){eval('$i("'+id+'").onclick = function(event){i3GEO.guias.mostra("'+guias[g]+'");}')}else{guiaconteudo.onclick=guia.click}YAHOO.util.Event.addListener($i(id),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addListener($i(id),"click",YAHOO.util.Event.stopPropagation);YAHOO.util.Event.addFocusListener($i(id),YAHOO.util.Event.preventDefault);guiaconteudo.onmouseover=onf;guiaconteudo.onmouseout=outf;temp=$i(guia.idconteudo);if(temp){temp.style.overflow="auto";if(i3GEO.guias.TIPO==="guia"){if(i3GEO.guias.ALTURACORPOGUIAS===0){temp.style.height=i3GEO.parametros.h}else{temp.style.height=i3GEO.guias.ALTURACORPOGUIAS}}else{temp.style.height=onde.style.height}}}}}catch(e){}if(i3GEO.guias.TIPO!=="tablet"){i3GEO.guias.mostra(i3GEO.guias.ATUAL);i3GEO.guias.ativa(i3GEO.guias.ATUAL)}else{i3GEO.guias.escondeGuias()}},ajustaAltura:function(){var guia,guias,nguias,temp,temps,n,i,altura=0;if(i3GEO.guias.ALTURACORPOGUIAS!=0){altura=i3GEO.guias.ALTURACORPOGUIAS}guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){guia=$i(this.CONFIGURA[guias[g]].idconteudo);if(guia){guia.style.overflow="auto";if(this.TIPO==="guia"){guia.style.height=altura}if(this.TIPO==="sanfona"){guia.style.height=altura;temp=$i("guiasYUI");if(temp){temp.style.height=altura;temps=temp.getElementsByTagName("dd");n=temps.length;for(i=0;i<n;i++){if(temps[i].style.visibility=="visible"){temps[i].style.height=altura}}}YAHOO.lutsr.accordion.properties.altura=altura}}}},escondeGuias:function(){var guias,nguias,g,temp,attributes,anim;guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){temp=$i(this.CONFIGURA[guias[g]].idconteudo);if(temp){if(i3GEO.guias.TIPO==="tablet"&&temp.style.display==="block"){temp.style.overflow="hidden";attributes={height:{to:0},id:this.CONFIGURA[guias[g]].idconteudo};anim=new YAHOO.util.Anim(temp,attributes,1,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){var temp=$i(anim.attributes.id);temp.style.overflow="auto";temp.style.display="none";i3GEO.barraDeBotoes.BARRAS[0].show()});anim.animate()}else{temp.style.display="none"}}if($i(this.CONFIGURA[guias[g]].id)){$i(this.CONFIGURA[guias[g]].id).parentNode.parentNode.style.background="transparent"}}},mostra:function(guia){var guias,nguias,g,temp,temp1,attributes,anim;guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;if($i(this.CONFIGURA[guia].idconteudo).style.display==="block"&&i3GEO.guias.TIPO==="tablet"){i3GEO.guias.escondeGuias();return}for(g=0;g<nguias;g++){if($i(this.CONFIGURA[guias[g]].idconteudo)){$i(this.CONFIGURA[guias[g]].idconteudo).style.display="none"}if($i(this.CONFIGURA[guias[g]].id)){$i(this.CONFIGURA[guias[g]].id).parentNode.parentNode.style.background="transparent"}}if(this.CONFIGURA.toString().search(guia)<0){for(g=0;g<nguias;g++){if(this.CONFIGURA[guias[g]].id===guia){guia=guias[g]}}}if(this.CONFIGURA[guia]){temp=$i(this.CONFIGURA[guia].idconteudo);if(temp){if(i3GEO.guias.TIPO==="tablet"){i3GEO.barraDeBotoes.BARRAS[0].hide();temp.style.left=(i3GEO.parametros.w/2)-150+"px";temp.style.height=0;temp.style.display="block";temp.style.zIndex=9000;temp.style.overflow="hidden";attributes={height:{to:i3GEO.parametros.h-10}};anim=new YAHOO.util.Anim(temp,attributes,1,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){temp.style.overflow="auto";temp.style.display="block"});if(DetectaMobile("DetectAndroid")===true){temp.style.height="";temp.style.overflow="auto"}else{anim.animate()}}else{temp.style.display="block"}$i(this.CONFIGURA[guia].id).parentNode.parentNode.style.backgroundColor="white";this.ATUAL=guia}}},ativa:function(guia){try{if(this.CONFIGURA[this.ATUAL].click!==""){this.CONFIGURA[this.ATUAL].click.call()}}catch(e){}},libera:function(){if(!$i("conteudojanelaguias")){var i,w,pos,a,l,letras,temp;$i(i3GEO.Interface.IDCORPO).style.left="0px";if($i(this.IDGUIAS)){$i(this.IDGUIAS).style.display="none"}i=$i("contemFerramentas");w=parseInt($i("contemFerramentas").style.width,10);$i("contemFerramentas").style.width="0px";i=$i("visual");if(i){i.style.width="0px";i.innerHTML=""}pos="px";a=i3GEO.parametros.h;l=i3GEO.parametros.w+w;i3GEO.parametros.h=a;i3GEO.parametros.w=l;if(navm){pos=""}i=$i(i3GEO.Interface.IDCORPO);if(i){i.style.width=l+pos;i.style.height=a+pos}i=$i(i3GEO.Interface.IDMAPA);if(i){i.style.width=l+pos;i.style.height=a+pos;i.style.clip='rect('+0+" "+(l*1+2)+" "+(a*1+2)+" "+0+')'}i=$i("mst");if(i){i.style.width=l+1+pos}if(i3GEO.configura.entorno.toLowerCase()==="sim"){letras=["L","O"];for(l=0;l<2;l++){if($i("img"+letras[l])){$i("img"+letras[l]).style.width=i3GEO.parametros.w+pos;$i("img"+letras[l]).style.height=i3GEO.parametros.h+pos;$i("corpoMapa"+letras[l]).style.width=i3GEO.parametros.w+pos;$i("corpoMapa"+letras[l]).style.height=i3GEO.parametros.h+pos+pos;$i("corpoMapa"+letras[l]).style.clip='rect(0 0 0 0)'}}letras=["N","S"];for(l=0;l<2;l++){if($i("img"+letras[l])){$i("img"+letras[l]).style.width=i3GEO.parametros.w*2+pos;$i("img"+letras[l]).style.height=i3GEO.parametros.h*2+pos;$i("corpoMapa"+letras[l]).style.width=i3GEO.parametros.w*3+pos;$i("corpoMapa"+letras[l]).style.height=i3GEO.parametros.h+pos;$i("corpoMapa"+letras[l]).style.clip='rect(0 0 0 0)'}}}i3GEO.mapa.ajustaPosicao();temp=function(retorno){var novoel,temp,i,g,guias,nguias;novoel=document.createElement("div");novoel.id="janelaguias";novoel.style.display="block";novoel.innerHTML='<div class="hd">Guias <div onclick ="i3GEO.janela.minimiza(\'conteudojanelaguias\')" id="janelaguias_minimizaCabecalho" class="container-minimiza" ></div></div><div class="bd" id="conteudojanelaguias_corpo" style=padding:0px ></div>';temp=$i("i3geo")?$i("i3geo").appendChild(novoel):document.body.appendChild(novoel);YAHOO.namespace("janelaguias.xp");YAHOO.janelaguias.xp.panel=new YAHOO.widget.Panel("janelaguias",{width:"270px",fixedcenter:true,constraintoviewport:false,underlay:"none",close:false,visible:true,draggable:true,modal:false,iframe:true});YAHOO.janelaguias.xp.panel.render();YAHOO.janelaguias.xp.panel.cfg.setProperty("y",0);YAHOO.janelaDoca.xp.manager.register(YAHOO.janelaDoca.xp.panel);i=$i(i3GEO.guias.IDGUIAS);$i("conteudojanelaguias_corpo").appendChild(i);i.style.borderLeft="1px solid black";i.style.borderRight="1px solid black";guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){if($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo)){$i("conteudojanelaguias_corpo").appendChild($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo));temp=$i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo).style;temp.background="white";temp.border="1px solid black";temp.borderTop="0px solid black";temp.width="270px";temp.left="-1px";temp.height=i3GEO.parametros.h-90}}i3GEO.atualiza("");i.style.display="block";i.style.left="-1px";i.style.width="270px"};i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.php.mudatamanho(temp,a,l)}else{YAHOO.janelaguias.xp.panel.render();YAHOO.janelaguias.xp.panel.show()}},mostraGuiaFerramenta:function(guia,namespace){var g,Dom=YAHOO.util.Dom;if(!namespace){namespace="guia"}for(g=0;g<12;g++){Dom.setStyle(namespace+g+"obj","display","none")}Dom.setStyle(guia+"obj","display","block")}};if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.arvoreDeCamadas={MOSTRALISTAKML:false,FILTRO:"",VERIFICAABRANGENCIATEMAS:true,finaliza:"",EXPANDESOLEGENDA:false,PERMITEEXPANDIRTEMAS:true,ARRASTARORDEM:true,ARRASTARLIXEIRA:true,LIGARDESLIGARTODOS:true,FILTRAR:true,ABRELEGENDA:true,EXPANDIDA:false,LEGENDAEXPANDIDA:false,OPCOESICONES:true,OPCOESTEMAS:true,OPCOESLEGENDA:true,AGUARDALEGENDA:false,ICONETEMA:true,FUNCOES:{farolescala:true,excluir:true,sobe:true,desce:true,fonte:true,zoomtema:true,compartilhar:true,opacidade:true,mudanome:true,procurar:true,toponimia:true,etiquetas:true,filtrar:true,tabela:true,grafico:true,editorlegenda:true,destacar:true,cortina:true,sql:true,comentar:true,temporizador:true,wms:true},CAMADAS:"",ARVORE:null,IDHTML:"listaTemas",SID:null,LOCAPLIC:null,ATIVATEMA:"",cria:function(onde,temas,g_sid,g_locaplic,funcaoTema){if(!YAHOO.lang.isUndefined(funcaoTema)){i3GEO.arvoreDeCamadas.ATIVATEMA=funcaoTema}i3GEO.arvoreDeCamadas.SID=typeof(g_sid)!=='undefined'?g_sid:i3GEO.configura.sid;i3GEO.arvoreDeCamadas.LOCAPLIC=typeof(g_locaplic)!=='undefined'?g_locaplic:i3GEO.configura.locaplic;if(onde!==""){i3GEO.arvoreDeCamadas.IDHTML=onde}if(i3GEO.arvoreDeCamadas.IDHTML===""){return}if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return}if(YAHOO.lang.isUndefined(temas)||temas===""){temas=i3GEO.arvoreDeCamadas.CAMADAS}i3GEO.arvoreDeCamadas.atualiza(temas);if(i3GEO.arvoreDeCamadas.finaliza!==""){eval(i3GEO.arvoreDeCamadas.finaliza)}},atualiza:function(temas,forca){if(arguments.length===0){temas=i3GEO.arvoreDeCamadas.CAMADAS;i3GEO.arvoreDeCamadas.CAMADAS="";forca=false}var estilo,temp,currentIconMode,newVal,root,tempNode,titulo,d,c,ltema,temaNode,grupoNode,i,j,n,nk,k,incluidos=[],grupoLayers=i3GEO.configura.grupoLayers,textoTema="";temp=$i(i3GEO.arvoreDeCamadas.IDHTML);if(temp){if(forca===true){temp.innerHTML=""}if(temp.innerHTML!==""){if(i3GEO.arvoreDeCamadas.comparaTemas(temas,i3GEO.arvoreDeCamadas.CAMADAS)){return}}}else{return}i3GEO.util.defineValor(i3GEO.arvoreDeCamadas.IDHTML,"innerHTML","");i3GEO.arvoreDeCamadas.CAMADAS=temas;(function(){function changeIconMode(){newVal=parseInt(this.value,10);if(newVal!==currentIconMode){currentIconMode=newVal}buildTree()}function buildTree(){i3GEO.arvoreDeCamadas.ARVORE=new YAHOO.widget.TreeView(i3GEO.arvoreDeCamadas.IDHTML)}buildTree()})();root=i3GEO.arvoreDeCamadas.ARVORE.getRoot();titulo="<table><tr><td><b>"+$trad("a7")+"</b></td><td>";if(this.ARRASTARLIXEIRA===true){titulo+="<img id='i3geo_lixeira' title='"+$trad("t2")+"' src='"+i3GEO.util.$im("branco.gif")+"' />"}if(this.FILTRAR===true){titulo+="<img onclick='i3GEO.arvoreDeCamadas.dialogo.filtro();' id='i3geo_filtro' title='"+$trad("t2a")+"' src='"+i3GEO.util.$im("branco.gif")+"' />"}if(this.ABRELEGENDA===true){titulo+="<img onclick='i3GEO.mapa.legendaHTML.libera();' id='soltaleg2' title='"+$trad("t2b")+"' src='"+i3GEO.util.$im("branco.gif")+"' />"}if(this.LIGARDESLIGARTODOS===true){titulo+="&nbsp;<img onclick='i3GEO.arvoreDeCamadas.aplicaTemas(\"ligartodos\");' id='olhoAberto' title='"+$trad("t3a")+"' src='"+i3GEO.util.$im("branco.gif")+"' />";titulo+="&nbsp;<img onclick='i3GEO.arvoreDeCamadas.aplicaTemas(\"desligartodos\");' id='olhoFechado' title='"+$trad("t3b")+"' src='"+i3GEO.util.$im("branco.gif")+"' />"}titulo+="</td></tr></table>";tempNode=new YAHOO.widget.HTMLNode({expanded:true,html:titulo,hasIcon:true,enableHighlight:false},root);estilo=navm?"text-align:left;font-size:11px;vertical-align:middle;display:table-cell;":"text-align:left;font-size:11px;vertical-align:vertical-align:top;padding-top:4px;";if(grupoLayers===""){c=temas.length;for(i=0,j=c;i<j;i+=1){ltema=temas[i];try{if((ltema.escondido).toLowerCase()!=="sim"){textoTema=i3GEO.arvoreDeCamadas.montaTextoTema(ltema);if(textoTema!==""){temaNode=new YAHOO.widget.HTMLNode({expanded:this.EXPANDIDA,html:textoTema,id:ltema.name,tipo:"tema",enableHighlight:false},tempNode);if(this.PERMITEEXPANDIRTEMAS===true){if(this.EXPANDESOLEGENDA===false){temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1)}else{if(ltema.classe!=="NAO"){temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraLegenda,1)}}}}YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault)}}catch(e){}}}else{nk=temas.length;c=grupoLayers.length;for(i=0;i<c;i+=1){temp="";if(grupoLayers[i].icone&&grupoLayers[i].icone===true){temp+="<p style="+estilo+" ><input class=inputsb style=cursor:pointer onclick='i3GEO.arvoreDeCamadas.ligaDesligaTemas(\""+i3GEO.configura.grupoLayers[i].layers+"\",this.checked)' type=checkbox title='Ligar/desligar temas do grupo' />&nbsp;"}temp+="<span style="+estilo+";vertical-align:top ><b>"+grupoLayers[i].nome+"</b></span></p>";d=this.EXPANDIDA;if(grupoLayers[i].expandido&&grupoLayers[i].expandido===true){d=true}grupoNode=new YAHOO.widget.HTMLNode({enableHighlight:false,html:temp,expanded:d},tempNode);n=grupoLayers[i].layers.length;for(j=0;j<n;j+=1){for(k=0;k<nk;k+=1){ltema=temas[k];if(ltema.name===grupoLayers[i].layers[j]&&ltema.escondido==="nao"){textoTema=i3GEO.arvoreDeCamadas.montaTextoTema(ltema);if(textoTema!==""){d={enableHighlight:false,expanded:i3GEO.arvoreDeCamadas.EXPANDIDA,html:textoTema,id:ltema.name,tipo:"tema"};if(grupoLayers[i].dinamico&&grupoLayers[i].dinamico===true){temaNode=new YAHOO.widget.HTMLNode(d,grupoNode)}else{temaNode=new YAHOO.widget.HTMLNode(d,tempNode)}temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1);YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault);incluidos.push(ltema.name)}}}}}grupoNode=new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,html:"<b>Outros</b>"},tempNode);c=incluidos.length;for(k=0;k<nk;k+=1){ltema=temas[k];n=false;for(j=0;j<c;j+=1){if(incluidos[j]===ltema.name||ltema.escondido.toLowerCase()==="sim"){n=true}}if(n===false){temaNode=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:i3GEO.arvoreDeCamadas.montaTextoTema(ltema),id:ltema.name,tipo:"tema"},grupoNode,i3GEO.arvoreDeCamadas.EXPANDIDA,true);temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1);YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault)}}}document.getElementById(i3GEO.arvoreDeCamadas.IDHTML).style.textAlign="left";i3GEO.arvoreDeCamadas.ARVORE.draw();if(i3GEO.arvoreDeCamadas.ARRASTARORDEM===true||i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){i3GEO.arvoreDeCamadas.ativaDragDrop()}i3GEO.mapa.ativaTema(i3GEO.temaAtivo);i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas();if(i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS===true&&i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()")}i3GEO.eventos.executaEventos(i3GEO.eventos.ATUALIZAARVORECAMADAS)},ligaDesligaTemas:function(lista,status){var c,n,i,aplica=false;lista=lista.split(",");n=lista.length;for(i=0;i<n;i+=1){c=i3GEO.arvoreDeCamadas.capturaCheckBox(lista[i]);if(c.checked!==status){aplica=true}c.checked=status;if(aplica===true&&i3GEO.Interface.ATUAL!=="padrao"){c.onclick.call()}}if(aplica===true&&i3GEO.Interface.ATUAL==="padrao"){i3GEO.arvoreDeCamadas.aplicaTemas()}},ativaDragDrop:function(){var Dom=YAHOO.util.Dom,Event=YAHOO.util.Event,DDM=YAHOO.util.DragDropMgr;YAHOO.example.DDList="";YAHOO.example.DDApp={init:function(){var ddtarget,i,ltema,ddlist;if($i("i3geo_lixeira")&&i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){ddtarget=new YAHOO.util.DDTarget("i3geo_lixeira")}i=i3GEO.arvoreDeCamadas.CAMADAS.length-1;if(i3GEO.arvoreDeCamadas.CAMADAS.length-1>=0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if($i("arrastar_"+ltema.name)){ddlist=new YAHOO.example.DDList("arrastar_"+ltema.name)}}while(i--)}}};YAHOO.example.DDList=function(id,sGroup,config){YAHOO.example.DDList.superclass.constructor.call(this,id,sGroup,config);this.logger=this.logger||YAHOO;YAHOO.util.Dom.setStyle(this.getDragEl(),"opacity",0.67);this.goingUp=false;this.lastY=0};YAHOO.extend(YAHOO.example.DDList,YAHOO.util.DDProxy,{startDrag:function(x,y){var dragEl,clickEl,Dom=YAHOO.util.Dom;this.logger.log(this.id+" startDrag");dragEl=this.getDragEl();clickEl=this.getEl();Dom.setStyle(clickEl,"visibility","hidden");dragEl.innerHTML=clickEl.innerHTML;Dom.setStyle(dragEl,"color",Dom.getStyle(clickEl,"color"));Dom.setStyle(dragEl,"backgroundColor",Dom.getStyle(clickEl,"backgroundColor"));Dom.setStyle(dragEl,"border","4px solid gray");Dom.setStyle(dragEl,"z-index","5000")},endDrag:function(e){var srcEl,proxy,a,thisid,proxyid;srcEl=this.getEl();proxy=this.getDragEl();Dom.setStyle(proxy,"visibility","");a=new YAHOO.util.Motion(proxy,{points:{to:Dom.getXY(srcEl)}},0.2,YAHOO.util.Easing.easeOut);proxyid=proxy.id;thisid=this.id;a.onComplete.subscribe(function(){var Dom=YAHOO.util.Dom;Dom.setStyle(proxyid,"visibility","hidden");Dom.setStyle(thisid,"visibility","")});a.animate();YAHOO.util.Dom.setStyle('i3geo_lixeira','border','0px solid blue')},onDragDrop:function(e,id){var pt,region,tema,destEl,els,lista,noid,temp,DDM=YAHOO.util.DragDropMgr,Dom=YAHOO.util.Dom;if(DDM.interactionInfo.drop.length===1){pt=DDM.interactionInfo.point;region=DDM.interactionInfo.sourceRegion;if(!region.intersect(pt)){DDM.refreshCache();if(DDM.getDDById(id).id==="i3geo_lixeira"){if(i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){(new YAHOO.util.Anim("i3geo_lixeira",{opacity:{from:0,to:1}},3,YAHOO.util.Easing.easeOutStrong)).animate();tema=(this.getEl()).id.split("arrastar_")[1];i3GEO.tema.exclui(tema)}}else{if(i3GEO.arvoreDeCamadas.ARRASTARORDEM===true){i3GEO.janela.abreAguarde("i3GEO.atualiza",$trad("o1"));destEl=Dom.get(id);noid=id.split("arrastar_")[1];destEl.appendChild(this.getEl());els=i3GEO.arvoreDeCamadas.listaLigadosDesligados();lista=els[2].join(",");temp=function(retorno){i3GEO.atualiza(retorno);if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ordenaLayers()}};i3GEO.php.reordenatemas(temp,lista)}}}}},onDrag:function(e){var y;y=Event.getPageY(e);if(y<this.lastY){this.goingUp=true}else if(y>this.lastY){this.goingUp=false}this.lastY=y},onDragOver:function(e,id){var srcEl,destEl;srcEl=this.getEl();destEl=YAHOO.util.Dom.get(id);if($i("i3geo_lixeira")&&id==="i3geo_lixeira"){$i("i3geo_lixeira").style.border="1px solid red"}else{destEl.style.textDecoration="underline"}},onDragOut:function(e,id){$i(id).style.textDecoration="none"}});Event.onDOMReady(YAHOO.example.DDApp.init,YAHOO.example.DDApp,true)},montaOpcoes:function(node){var d,conteudo,opcoesNode,idtema,ltema,farol,mfarol,tnome="",iconesNode,imb=i3GEO.util.$im("branco.gif"),funcoes=i3GEO.arvoreDeCamadas.FUNCOES;idtema=node.data.id;ltema=i3GEO.arvoreDeCamadas.pegaTema(idtema);if(i3GEO.arvoreDeCamadas.OPCOESICONES===true){if(funcoes.farolescala===true){farol="maisamarelo.png";mfarol="";if(ltema.escala*1<i3GEO.parametros.mapscale*1){farol="maisverde.png";mfarol=$trad("t9")}if(ltema.escala*1>i3GEO.parametros.mapscale*1){farol="maisvermelho.png";mfarol=$trad("t10")}if(ltema.escala===0){farol="maisamarelo.png";mfarol=$trad("t11")}tnome+="&nbsp;<img id='farol"+ltema.name+"' src='"+i3GEO.util.$im(farol)+"' title='"+mfarol+"' />"}if(funcoes.excluir===true){tnome+="&nbsp;<img id='idx"+ltema.name+"' class='x' src='"+imb+"' title='"+$trad("t12")+"' onclick='i3GEO.tema.exclui(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t12a")+"','exclui')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(funcoes.sobe===true){tnome+="&nbsp;<img class='sobe' src='"+imb+"' title='"+$trad("t13")+"' onclick='i3GEO.tema.sobe(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t14")+"','sobe')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(funcoes.desce===true){tnome+="&nbsp;<img class='desce' src='"+imb+"' title='"+$trad("t15")+"' onclick='i3GEO.tema.desce(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t16")+"','desce')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(funcoes.fonte===true){tnome+="&nbsp;<img class='fonte' src='"+imb+"' title='"+$trad("a9")+"' onclick='i3GEO.tema.fonte(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("a9")+"','fonte')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if((ltema.zoomtema.toLowerCase()==="sim")&&(i3GEO.Interface.ATUAL!=="flamingo")&&(funcoes.zoomtema===true)){tnome+="&nbsp;<img class='extent' src='"+imb+"' title='"+$trad("t17")+"' onclick='i3GEO.tema.zoom(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t18")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}iconesNode=new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node);if(funcoes.compartilhar===true&&ltema.permitecomentario.toLowerCase()!=="nao"){temp=i3GEO.configura.locaplic+"/ms_criamapa.php?layers="+ltema.name+"&amp;temasa="+ltema.name;tnome=i3GEO.social.compartilhar("",temp,temp,"semtotal");iconesNode=new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node)}}if(i3GEO.arvoreDeCamadas.OPCOESTEMAS===true){opcoesNode=new YAHOO.widget.HTMLNode({html:$trad("t18a"),idopcoes:ltema.name,identifica:ltema.identifica,enableHighlight:false,expanded:false},node);opcoesNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraOpcoes,1)}if(i3GEO.arvoreDeCamadas.OPCOESLEGENDA===true&&ltema.classe!=="NAO"){opcoesNode=new YAHOO.widget.HTMLNode({html:$trad("p3"),idlegenda:ltema.name,enableHighlight:false,expanded:i3GEO.arvoreDeCamadas.LEGENDAEXPANDIDA},node);opcoesNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraLegenda,1)}node.loadComplete()},mostraOpcoes:function(node){var tnome,d,n,temp,idtema=node.data.idopcoes,ltema=i3GEO.arvoreDeCamadas.pegaTema(idtema),funcoes=i3GEO.arvoreDeCamadas.FUNCOES;if(funcoes.opacidade===true){if(navm){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t19")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t20")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=42' >&nbsp;&nbsp;&nbsp;</a>"+$inputText("","","tr"+ltema.name,"","3",ltema.transparency)+"&nbsp;<a class='tic' onclick='i3GEO.tema.mudatransp(\""+ltema.name+"\")' href='#' /a>"}else{tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t19")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t20")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=42' >&nbsp;&nbsp;&nbsp;</a>"+$inputText("","","tr"+ltema.name,"","3",ltema.transparency)+"<img class='tic' style='position:relative;top:3px;' onclick='i3GEO.tema.mudatransp(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />"}n=new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if(funcoes.temporizador===true&&i3GEO.Interface.ATUAL!="padrao"&&i3GEO.Interface.ATUAL!="flamingo"){if(navm){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t47")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t48")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=101' >&nbsp;&nbsp;&nbsp;</a>"+$inputText("","","temporizador"+ltema.name,"","3",ltema.temporizador)+"&nbsp;<a class='tic' onclick='i3GEO.tema.temporizador(\""+ltema.name+"\")' href='#' /a>"}else{tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t47")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t48")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=101' >&nbsp;&nbsp;&nbsp;</a>"+$inputText("","","temporizador"+ltema.name,"","3",ltema.temporizador)+"<img class='tic' style='position:relative;top:3px;' onclick='i3GEO.tema.temporizador(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />"}n=new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if(funcoes.mudanome===true){if(navm){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t21a")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"+$trad("t21")+" </span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=43' >&nbsp;&nbsp;&nbsp;</a>"+$inputText("","","nn"+ltema.name,"","8","")+"&nbsp;<a class='tic' onclick='i3GEO.tema.mudanome(\""+ltema.name+"\")' href='#' />"}else{tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t21a")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"+$trad("t21")+" </span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=43' >&nbsp;&nbsp;&nbsp;</a>"+$inputText("","","nn"+ltema.name,"","10","")+"<img class='tic' style='position:relative;top:3px;' onclick='i3GEO.tema.mudanome(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />"}n=new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if((ltema.type<3)&&(ltema.connectiontype!==7)){if(i3GEO.Interface.ATUAL!=="flamingo"&&funcoes.procurar===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t22"),$trad("t23"),'i3GEO.tema.dialogo.procuraratrib(\"'+ltema.name+'\")',node)}if(funcoes.toponimia===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t24"),$trad("t25"),'i3GEO.tema.dialogo.toponimia(\"'+ltema.name+'\")',node)}if(funcoes.etiquetas===true&&(ltema.identifica.toLowerCase()==="sim"||ltema.identifica==="")){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t26"),$trad("t27"),'i3GEO.tema.dialogo.etiquetas(\"'+ltema.name+'\")',node)}if(funcoes.filtrar===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t28"),$trad("t29"),'i3GEO.tema.dialogo.filtro(\"'+ltema.name+'\")',node)}if(funcoes.tabela===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t30"),$trad("t31"),'i3GEO.tema.dialogo.tabela(\"'+ltema.name+'\")',node)}if(i3GEO.parametros.versaoms>4&&funcoes.grafico===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t37"),$trad("t37"),'i3GEO.tema.dialogo.graficotema(\"'+ltema.name+'\")',node)}}if(ltema.type<4&&funcoes.editorlegenda===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t32"),$trad("t33"),'i3GEO.tema.dialogo.editaLegenda(\"'+ltema.name+'\")',node)}if(funcoes.destacar===true&&i3GEO.Interface.ATUAL!=="googlemaps"&&i3GEO.Interface.ATUAL!=="googleearth"&&i3GEO.Interface.ATUAL!=="flamingo"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t34"),$trad("t35"),'i3GEO.navega.destacaTema.inicia(\"'+ltema.name+'\")',node)}if(funcoes.cortina===true&&i3GEO.Interface.ATUAL!=="padrao"&&i3GEO.Interface.ATUAL!=="googleearth"&&i3GEO.Interface.ATUAL!=="flamingo"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t42"),$trad("t42"),'i3GEO.tema.dialogo.cortina(\"'+ltema.name+'\")',node)}if(funcoes.sql===true&&ltema.editorsql.toLowerCase()==="sim"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t40"),$trad("t41"),'i3GEO.tema.dialogo.editorsql(\"'+ltema.name+'\")',node)}if(funcoes.comentar===true&&ltema.permitecomentario.toLowerCase()!=="nao"&&i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t45"),$trad("t45"),'i3GEO.tema.dialogo.comentario(\"'+ltema.name+'\")',node)}if(funcoes.wms===true&&ltema.permiteogc.toLowerCase()!=="nao"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema("Getcapabilities",'WMS-OGC','i3GEO.tema.dialogo.mostraWms(\"'+ltema.name+'\")',node)}if(i3GEO.parametros.editor.toLowerCase()==="sim"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t44"),"<span style=color:red title='Apenas usuários editores podem ver essa opção' >"+$trad("t44")+"</span>",'i3GEO.tema.dialogo.salvaMapfile(\"'+ltema.name+'\")',node)}node.loadComplete()},adicionaOpcaoTema:function(dica,titulo,onclick,node){var tnome="<a href='#' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+dica+"','');\" onclick="+onclick+">"+titulo+" </a>",temp=new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node)},mostraLegenda:function(node){var retorna,idtema=node.data.idlegenda,ltema=i3GEO.arvoreDeCamadas.pegaTema(idtema);retorna=function(retorno){var original,i,re,tabela,linhas,linha,colunas,id,exp,incluir,d,nodeLeg,elementos,nelementos,inputs,desativar,nindices;if(retorno.data.legenda){original=retorno;retorno=retorno.data.legenda;if(retorno[0]){if((navn)&&(!retorno[0].imagem)){tabela=retorno}else{i=retorno[0].imagem;re=new RegExp("tiff","g");i=i.replace(re,'png');tabela="<img src='"+i+"' />"}retorno=""}else{linhas=retorno.split("#");if(linhas.length>1){linhas=retorno.split("|");tabela="<table>";linha=linhas.length-1;if(linha>=0){do{colunas=linhas[linha].split("#");id=colunas[0]+"-"+colunas[1];re=new RegExp("'","g");exp=colunas[3].replace(re,'"');tabela+="<tr style='border-top:1px solid rgb(240,240,240);'><td><img src='"+colunas[4]+"' </td><td style='text-align:left'>"+colunas[2]+"</td></tr>"}while(linha--)}tabela+="</table><br>"}else{tabela=retorno}}}else{tabela="<img src='"+retorno.data[0].imagem+"' />"}incluir="<div style='text-align:left' id='"+idtema+"verdiv"+"'>"+tabela+"</div>";nodeLeg=new YAHOO.widget.HTMLNode({html:incluir,enableHighlight:false,expanded:false},node);node.loadComplete();elementos=document.getElementById(idtema+"verdiv").getElementsByTagName("input");nelementos=elementos.length;inputs=[];i=0;if(nelementos>0){do{if(elementos[i].type==="checkbox"){inputs.push(elementos[i])}i++}while(i<nelementos)}if(original.data.desativar){desativar=original.data.desativar;nindices=desativar.length;i=0;if(nindices>0){do{inputs[desativar[i]].checked=false;i++}while(i<nindices)}}};if(i3GEO.configura.templateLegenda!==""){i3GEO.php.criaLegendaHTML(retorna,idtema,i3GEO.configura.templateLegenda)}else{i3GEO.php.criaLegendaHTML(retorna,idtema)}},atualizaLegenda:function(idtema){var node;if(document.getElementById(idtema+"verdiv")){node=i3GEO.arvoreDeCamadas.ARVORE.getNodeByProperty("idlegenda",idtema);if(node){i3GEO.arvoreDeCamadas.ARVORE.removeChildren(node);this.mostraLegenda(node);if($i("janelaLegenda"+idtema+"_corpo")){i3GEO.tema.mostralegendajanela(idtema,"","abrejanela")}}}},escolheCorClasse:function(leg){var obj,novoel;leg=leg.parentNode.getElementsByTagName("input")[0];if(!$i("tempinputcorclasse")){novoel=document.createElement("input");novoel.id="tempinputcorclasse";novoel.style.display="none";novoel.alt="objeto criado para guardar dados da funcao escolohercorclasse";novoel.onchange="";document.body.appendChild(novoel)}obj=$i("tempinputcorclasse");obj.value="";obj.tema=leg.name;obj.idclasse=leg.value;obj.onchange=function(){var obj=$i("tempinputcorclasse");i3GEO.tema.alteracorclasse(obj.tema,obj.idclasse,obj.value)};i3GEO.util.abreCor("","tempinputcorclasse")},inverteStatusClasse:function(leg){var temp=function(retorno){i3GEO.atualiza();i3GEO.Interface.atualizaTema(retorno,leg.name)};i3GEO.php.inverteStatusClasse(temp,leg.name,leg.value)},montaTextoTema:function(tema){var ck,html,display="none",estilo,iu=i3GEO.util;if(tema.status*1===2){ck=' CHECKED '}else{ck=""}if(this.FILTRO!==""){if(this.FILTRO==="desligados"&&ck!==""){return""}if(this.FILTRO==="ligados"&&ck===""){return""}if(this.FILTRO==="selecionados"&&tema.sel.toLowerCase()!=="sim"){return""}if(this.FILTRO==="download"&&tema.download.toLowerCase()!=="sim"){return""}if(this.FILTRO==="wms"&&tema.connectiontype*1!==7){return""}if(this.FILTRO==="raster"&&tema.type*1!==3){return""}if(this.FILTRO==="toponimia"&&tema.type*1!==4){return""}}estilo=navm?"text-align:left;font-size:11px;vertical-align:middle;display:table-cell;":"text-align:left;font-size:11px;vertical-align:vertical-align:top;padding-top:4px;";html="<p onclick='i3GEO.mapa.ativaTema(\""+tema.name+"\")' id='arrastar_"+tema.name+"' style='"+estilo+"' ><input class=inputsb style='cursor:pointer;' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t3")+"','ligadesliga')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" type='checkbox' name=\"layer\" value='"+tema.name+"' "+ck;if(i3GEO.arvoreDeCamadas.ATIVATEMA!==""){html+="onclick=\""+i3GEO.arvoreDeCamadas.ATIVATEMA+"\""}else{html+="onclick='i3GEO.util.criaBotaoAplicar(\"i3GEO.arvoreDeCamadas.aplicaTemas\",\""+$trad("p14")+"\",\"i3geoBotaoAplicarCamadas\",this)'"}html+=" />";estilo=navm?"cursor:pointer;vertical-align:35%;padding-top:0px;":"cursor:pointer;vertical-align:top;";if(tema.iconetema!==""&&i3GEO.arvoreDeCamadas.ICONETEMA===true){html+="&nbsp;<img style='"+estilo+"' src='"+tema.iconetema+"' />"}if(tema.contextoescala.toLowerCase()==="sim"){html+="&nbsp;<img style='"+estilo+"' src="+iu.$im("contextoescala.png")+" title='"+$trad("t36")+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t36")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(tema.sel.toLowerCase()==="sim"){html+="&nbsp;<img style='"+estilo+"' src="+iu.$im("estasel.png")+" title='"+$trad("t4")+"' onclick='i3GEO.tema.limpasel(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t5")+"','limpasel')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />";html+="&nbsp;<img style='"+estilo+"' src="+iu.$im("zoomsel.gif")+" title='"+$trad("t4a")+"' onclick='i3GEO.tema.zoomsel(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t5")+"','zoomsel')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(tema.download.toLowerCase()==="sim"){html+="&nbsp;<img style='"+estilo+"' src="+iu.$im("down1.gif")+" title='download' onclick='i3GEO.tema.dialogo.download(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t6")+"','download')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}estilo=navm?"cursor:move;vertical-align:35%;padding-top:0px;color:black;":"cursor:move;vertical-align:top;color:black;";if(i3GEO.arvoreDeCamadas.AGUARDALEGENDA){html+="&nbsp;<span id='ArvoreTituloTema"+tema.name+"' style='"+estilo+"' onclick=\"i3GEO.tema.mostralegendajanela('"+tema.name+"','"+tema.tema+"','abrejanela');\" onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t7a")+"','');i3GEO.tema.mostralegendajanela('"+tema.name+"','"+tema.tema+"','ativatimer');\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('');i3GEO.tema.mostralegendajanela('"+tema.name+"','','desativatimer');\" >"+tema.tema+"</span>"}else{html+="&nbsp;<span id='ArvoreTituloTema"+tema.name+"' style='"+estilo+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t7")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+tema.tema+"</span>"}html+="</p>";if(i3GEO.tema.TEMPORIZADORESID[tema.name]==undefined&&tema.temporizador!=""){i3GEO.tema.temporizador(tema.name,tema.temporizador)}return(html)},atualizaFarol:function(mapscale){var farol,l,ltema,escala,iu=i3GEO.util,im=i3GEO.configura.locaplic+"/imagens/",camadas=i3GEO.arvoreDeCamadas.CAMADAS;farol="maisamarelo.png";l=camadas.length-1;if(l>=0){do{ltema=camadas[l];escala=ltema.escala;if(escala*1<mapscale*1){farol="maisverde.png"}if(escala*1>mapscale*1){farol="maisvermelho.png"}if(escala*1===0){farol="maisamarelo.png"}iu.defineValor("farol"+ltema.name,"src",im+farol)}while(l--)}},aplicaTemas:function(tipo){if(arguments.length===0){tipo="normal"}var t,temp,ligar,desligar;if(tipo==="normal"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("mantem")}if(tipo==="ligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("marca");if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googleearth","openlayers","googlemaps"])){return}}if(tipo==="desligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("desmarca");if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googleearth","openlayers","googlemaps"])){return}}temp=function(){i3GEO.atualiza();i3GEO.janela.fechaAguarde("redesenha")};try{clearTimeout(tempoBotaoAplicar)}catch(erro){}tempoBotaoAplicar="";i3GEO.janela.abreAguarde("redesenha",$trad("o1"));if(tipo==="normal"){i3GEO.php.ligatemas(temp,t[1].toString(),t[0].toString());return}if(tipo==="ligartodos"){i3GEO.php.ligatemas(temp,"",t[2].toString());return}if(tipo==="desligartodos"){i3GEO.php.ligatemas(temp,t[2].toString(),"")}},listaLigadosDesligados:function(tipo){if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return[[],[],[]]}if(arguments.length===0){tipo="manter"}var no,cs,csn,j,c,temp,nos=i3GEO.arvoreDeCamadas.ARVORE.getNodesByProperty("tipo","tema"),ligados=[],desligados=[],todos=[],n=nos.length,i=0,ATUAL=i3GEO.Interface.ATUAL;do{try{no=nos[i].getEl();cs=no.getElementsByTagName("input");csn=cs.length;for(j=0;j<csn;j+=1){c=cs[j];if(c.name==="layer"){temp=c.checked===true?ligados.push(c.value):desligados.push(c.value);todos.push(c.value);if(tipo==="marca"){c.checked=true;if(i3GEO.util.in_array(ATUAL,["googleearth","openlayers","googlemaps"])){i3GEO.Interface[ATUAL].ligaDesliga(c)}}if(tipo==="desmarca"){c.checked=false;if(i3GEO.util.in_array(ATUAL,["googleearth","openlayers","googlemaps"])){i3GEO.Interface[ATUAL].ligaDesliga(c)}}}}i++}catch(e){i+=1}}while(i<n);return([ligados,desligados,todos])},capturaCheckBox:function(tema){if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return}var nos,ligados,desligados,todos,n,i,no,cs,csn,j,c;nos=i3GEO.arvoreDeCamadas.ARVORE.getNodesByProperty("tipo","tema");n=nos.length;i=0;do{try{no=nos[i].getEl();cs=no.getElementsByTagName("input");csn=cs.length;for(j=0;j<csn;j+=1){c=cs[j];if(c.name==="layer"&&c.value===tema){return c}}i+=1}catch(e){i+=1}}while(i<n);return(null)},comparaTemas:function(novo,atual){try{var novon=novo.length,i;if(novon!==atual.length){return(false)}for(i=0;i<novon;i+=1){if(novo[i].name!==atual[i].name){return(false)}if(novo[i].tema!==atual[i].tema){return(false)}if(novo[i].sel!==atual[i].sel){return(false)}if(novo[i].status!==atual[i].status){return(false)}}return(true)}catch(e){return true}},pegaTema:function(idtema){var i,v="",c=i3GEO.arvoreDeCamadas.CAMADAS.length;for(i=0;i<c;i+=1){if(i3GEO.arvoreDeCamadas.CAMADAS[i].name===idtema){v=i3GEO.arvoreDeCamadas.CAMADAS[i]}}return v},filtraCamadas:function(propriedade,valor,operador,camadas){var resultado=[],i=0,temp,nelementos=camadas.length,ltema;if(nelementos>0){do{ltema=camadas[i];if(ltema.escondido.toLowerCase()!=="sim"){temp=ltema[propriedade];if(operador==="igual"){if(temp==valor){resultado.push(ltema)}}if(operador==="diferente"){if(temp!=valor){resultado.push(ltema)}}}i+=1}while(i<nelementos)}return resultado},alteraPropCamadas:function(propriedade,valor,camada){var resultado=[],i=0,temp,nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if(ltema.name===camada){ltema[propriedade]=valor}i+=1}while(i<nelementos)}},verificaAbrangenciaTemas:function(){if(i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS===false){return}try{var resultado=[],i=0,temp,nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema,intersec,node;if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];temp=ltema.exttema;if(temp!==""){if(i3GEO.util.intersectaBox(temp,i3GEO.parametros.mapexten)===false){$i("ArvoreTituloTema"+ltema.name).style.color="gray"}else{$i("ArvoreTituloTema"+ltema.name).style.color="black"}}i+=1}while(i<nelementos)}}catch(e){}},verificaAplicaExtensao:function(){var i=0,temp="",nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;try{if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if(ltema.aplicaextensao.toLowerCase()==="sim"){temp=ltema.name}i+=1}while(i<nelementos)}}catch(e){return""}return temp},dialogo:{filtro:function(){i3GEO.util.dialogoFerramenta("i3GEO.arvoreDeCamadas.dialogo.filtro()","filtroarvore","filtroarvore")}}};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="<table id='rosaV' >";setas+="<tr onclick=\"javascript:i3GEO.configura.mostraRosaDosVentos='nao'\"><td></td><td></td><td style=cursor:pointer >x</td></tr><tr>";setas+="<td><img class='rosanoroeste' title='noroeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','noroeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosanorte' title='norte' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','norte','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosanordeste' title='nordeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','nordeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td></tr>";setas+="<tr><td><img class='rosaoeste' title='oeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','oeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><table><tr>";setas+="<td><img class='rosamais' title='aproxima' onclick=\"i3GEO.navega.zoomin('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"')\" src='"+$im("branco.gif")+"' </td>";setas+="<td><img class='rosamenos' title='afasta' onclick=\"i3GEO.navega.zoomout('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"')\" src='"+$im("branco.gif")+"' </td>";setas+="</tr></table></td>";setas+="<td><img class='rosaleste' title='leste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','leste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td></tr>";setas+="<tr><td><img class='rosasudoeste' title='sudoeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','sudoeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosasul' title='sul' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','sul','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosasudeste' title='sudeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','sudeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td></tr></table>";i=$i("i3geo_rosa");i.innerHTML=setas;i.style.top=objposicaocursor.telay-27;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(ppx<boxxini){bxs.left=ppx;bxs.width=boxxini-ppx+2}if(py<boxyini){bxs.top=py;bxs.height=boxyini-py+2}}else{if(ppx>boxxini){bxs.width=ppx-boxxini+"px"}if(py>boxyini){bxs.height=py-boxyini+"px"}if(ppx<boxxini){bxs.left=ppx+"px";bxs.width=boxxini-ppx+"px"}if(py<boxyini){bxs.top=py+"px";bxs.height=boxyini-py+"px"}}},termina:function(){var valor,v,x1,y1,x2,y2,limpa,f;if(g_tipoacao!=='zoomli'){i3GEO.eventos.MOUSEDOWN.remove("i3GEO.navega.zoomBox.inicia()");i3GEO.eventos.MOUSEUP.remove("i3GEO.navega.zoomBox.termina()");return}try{if(i3GEO.navega.timerNavega!==null){return}valor=i3GEO.calculo.rect2ext("i3geoboxZoom",i3GEO.parametros.mapexten,i3GEO.parametros.pixelsize);v=valor[0];x1=valor[1];y1=valor[2];x2=valor[3];y2=valor[4];limpa=function(){var bxs=$i("i3geoboxZoom").style;bxs.display="none";bxs.visibility="hidden";bxs.width=0;bxs.height=0};if((x1===x2)||(y1===y2)){limpa.call();return}i3GEO.parametros.mapexten=v;limpa.call();i3GEO.eventos.MOUSEMOVE.remove("i3GEO.navega.zoomBox.desloca()");i3GEO.eventos.MOUSEUP.remove("i3GEO.navega.zoomBox.termina()");if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.zoom2extent(v);return}f="i3GEO.navega.timerNavega = null;i3GEO.navega.zoomExt('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','"+i3GEO.configura.tipoimagem+"','"+v+"')";if(i3GEO.navega.timerNavega!==undefined){clearTimeout(i3GEO.navega.timerNavega)}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)}catch(e){limpa.call();return}}},entorno:{ativaDesativa:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){alert("Essa operação não funciona nessa interface");return}if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.inverteModoTile();return}var letras,l;if(i3GEO.parametros.mapfile===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}if(i3GEO.configura.entorno.toLowerCase()==="sim"){letras=["L","O","N","S"];for(l=0;l<4;l++){if($i("img"+letras[l])){$i("img"+letras[l]).style.display="none";$i("img"+letras[l]).src=""}}$left("img",0);$top("img",0);i3GEO.configura.entorno="nao";alert("Entorno desativado");$i("img").style.visibility="visible";$i("img").style.display="block"}else{i3GEO.navega.entorno.geraURL();letras=["L","O","N","S"];for(l=0;l<4;l++){if($i("img"+letras[l])){$i("img"+letras[l]).style.width=i3GEO.parametros.w;$i("img"+letras[l]).style.height=i3GEO.parametros.h;$i("img"+letras[l]).style.display="block"}}i3GEO.configura.entorno.toLowerCase()="sim";i3GEO.navega.entorno.ajustaPosicao();alert("Entorno ativado. o desenho do mapa pode demorar mais.")}},geraURL:function(){var nny,nnx,sy,sx,lx,ly,ox,oy,u,sul,norte,leste,oeste;nny=(i3GEO.parametros.h/2)*-1;nnx=i3GEO.parametros.w/2;sy=i3GEO.parametros.h+(i3GEO.parametros.h/2);sx=i3GEO.parametros.w/2;lx=i3GEO.parametros.w+(i3GEO.parametros.w/2);ly=i3GEO.parametros.h/2;ox=(parseInt(i3GEO.parametros.w/2,10))*-1;oy=i3GEO.parametros.h/2;u=window.location.protocol+"\/\/"+window.location.host+i3GEO.parametros.cgi+"?map="+i3GEO.parametros.mapfile;u+="&mode=map&imgext="+i3GEO.parametros.mapexten+"&mapsize="+nnx+" "+oy;sul=u+"&imgxy="+sx/2+" "+sy/2;norte=u+"&imgxy="+nnx/2+" "+nny/2;leste=u+"&imgxy="+lx/2+" "+ly/2;oeste=u+"&imgxy="+ox/2+" "+oy/2;$i("imgS").src=sul;$i("imgN").src=norte;$i("imgL").src=leste;$i("imgO").src=oeste},ajustaPosicao:function(){$left("img",i3GEO.parametros.w*-1);$left("imgS",i3GEO.parametros.w*-1);$left("imgL",i3GEO.parametros.w);$left("imgO",i3GEO.parametros.w*-3);$left("imgN",i3GEO.parametros.w*-1);$top("img",i3GEO.parametros.h*-1);$top("imgS",i3GEO.parametros.h*-1);$top("imgL",i3GEO.parametros.h*-1);$top("imgN",i3GEO.parametros.h*-1);$top("imgO",i3GEO.parametros.h*-1)}},lente:{POSICAOX:0,POSICAOY:0,ESTAATIVA:"nao",inicia:function(){var novoel,novoimg,temp;if(!$i("lente")){novoel=document.createElement("div");novoel.id='lente';novoel.style.clip='rect(0px,0px,0px,0px)';novoimg=document.createElement("img");novoimg.src="";novoimg.id='lenteimg';novoel.appendChild(novoimg);document.body.appendChild(novoel);novoel=document.createElement("div");novoel.id='boxlente';document.body.appendChild(novoel)}temp=$i('boxlente').style;temp.borderWidth='1';temp.borderColor="red";temp.display="block";$i("lente").style.display="block";i3GEO.navega.lente.ESTAATIVA="sim";i3GEO.navega.lente.atualiza();if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.navega.lente.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.navega.lente.atualiza()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.navega.lente.movimenta()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.navega.lente.movimenta()")}},atualiza:function(){var temp=function(retorno){try{var pos,volta,nimg,olente,oboxlente,olenteimg;retorno=retorno.data;if(retorno==="erro"){alert("A lente nao pode ser criada");return}volta=retorno.split(",");nimg=volta[2];olente=$i('lente');oboxlente=$i('boxlente');olenteimg=$i('lenteimg');olenteimg.src=nimg;olenteimg.style.width=volta[0]*1.5;olenteimg.style.height=volta[1]*1.5;olente.style.zIndex=1000;olenteimg.style.zIndex=1000;oboxlente.style.zIndex=1000;pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));olente.style.left=pos[0]+i3GEO.navega.lente.POSICAOX+"px";olente.style.top=pos[1]+i3GEO.navega.lente.POSICAOY+"px";oboxlente.style.left=pos[0]+i3GEO.navega.lente.POSICAOX+"px";oboxlente.style.top=pos[1]+i3GEO.navega.lente.POSICAOY+"px";oboxlente.style.display='block';oboxlente.style.visibility='visible';olente.style.display='block';olente.style.visibility='visible';i3GEO.janela.fechaAguarde("ajaxabrelente")}catch(e){i3GEO.janela.fechaAguarde()}};if(i3GEO.navega.lente.ESTAATIVA==="sim"){i3GEO.janela.abreAguarde("ajaxabrelente",$trad("o1"));i3GEO.php.aplicaResolucao(temp,1.5)}else{i3GEO.navega.lente.desativa()}},desativa:function(){$i("lente").style.display="none";$i("boxlente").style.display="none";$i('boxlente').style.borderWidth=0;i3GEO.navega.lente.ESTAATIVA="nao";i3GEO.eventos.MOUSEMOVE.remove("i3GEO.navega.lente.movimenta()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.navega.lente.atualiza()")},movimenta:function(){try{if(i3GEO.navega.lente.ESTAATIVA==="sim"){var pos,esq,topo,clipt,i;if($i("lente").style.visibility==="visible"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA))}esq=(objposicaocursor.telax-pos[0])*2.25;topo=(objposicaocursor.telay-pos[1])*2.25;clipt="rect("+(topo-120)+" "+(esq+120)+" "+(topo+120)+" "+(esq-120)+")";i=$i("lente").style;i.clip=clipt;i.top=pos[1]-(topo-120);i.left=pos[0]-(esq-120)}}catch(e){}}},destacaTema:{TAMANHO:75,ESTAATIVO:"nao",TEMA:"",inicia:function(tema){var novoel,novoeli,janela,pos;if(!$i("img_d")){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));novoel=document.createElement("div");novoel.id="div_d";novoel.style.zIndex=5000;document.body.appendChild(novoel);$i("div_d").innerHTML="<input style='position:relative;top:0px;left:0px'' type=image src='' id='img_d' />";$i("div_d").style.left=parseInt(pos[0],10);$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="<p style='position:absolute;top:0px;left:0px'>+-</p>"}i3GEO.navega.destacaTema.TEMA=tema;i3GEO.navega.destacaTema.ESTAATIVO="sim";i3GEO.navega.destacaTema.atualiza();janela=i3GEO.janela.cria(160,0,"","center","center","Feche para parar destaque&nbsp;&nbsp;","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+='<div style="text-align:center;position:relative;left:9px" >'}estilo="top:4px;";if(navm){estilo="top:4px;left:-2px;"}temp+='<div id="vertMaisZoom" style="'+estilo+'"></div><div id="vertBGDiv" name="vertBGDiv" tabindex="0" x2:role="role:slider" state:valuenow="0" state:valuemin="0" state:valuemax="200" title="Zoom" >';temp+='<div id="vertHandleDivZoom" ><img alt="" class="slider" src="'+i3GEO.util.$im("branco.gif")+'" /></div></div>';if(navm){temp+='<div id=vertMenosZoom style="left:-1px;" ></div>'}else{temp+='<div id=vertMenosZoom ></div>'}if(navn){temp+='</div>'}return temp},ativa:function(){var temp;$i("vertMaisZoom").onmouseover=function(){i3GEO.ajuda.mostraJanela('Amplia o mapa mantendo o centro atual.')};$i("vertMaisZoom").onclick=function(){if(!$i("imgtemp")){$i("vertHandleDivZoom").onmousedown.call();g_fatordezoom=0;$i("vertHandleDivZoom").onmousemove.call();g_fatordezoom=-1}$i("vertHandleDivZoom").onmousemove.call();i3GEO.barraDeBotoes.BOTAOCLICADO='zoomin';try{clearTimeout(i3GEO.navega.timerNavega)}catch(e){}i3GEO.navega.timerNavega=setTimeout("$i('vertBGDiv').onmouseup.call();",i3GEO.navega.TEMPONAVEGAR);if(g_fatordezoom<-6){$i("vertBGDiv").onmouseup.call()}};$i("vertMenosZoom").onmouseover=function(){i3GEO.ajuda.mostraJanela('Reduz o mapa mantendo o centro atual.')};$i("vertMenosZoom").onclick=function(){if(!$i("imgtemp")){$i("vertHandleDivZoom").onmousedown.call();g_fatordezoom=0;$i("vertHandleDivZoom").onmousemove.call();g_fatordezoom=1}$i("vertHandleDivZoom").onmousemove.call();i3GEO.barraDeBotoes.BOTAOCLICADO='zoomout';try{clearTimeout(i3GEO.navega.timerNavega)}catch(e){}i3GEO.navega.timerNavega=setTimeout("$i('vertBGDiv').onmouseup.call();",i3GEO.navega.TEMPONAVEGAR);if(g_fatordezoom>6){$i("vertBGDiv").onmouseup.call()}};verticalSlider=YAHOO.widget.Slider.getVertSlider("vertBGDiv","vertHandleDivZoom",0,70);verticalSlider.onChange=function(offsetFromStart){g_fatordezoom=(offsetFromStart-35)/5};verticalSlider.setValue(35,true);if($i("vertBGDiv")){$i("vertBGDiv").onmouseup=function(){verticalSlider.setValue(35,true);if(g_fatordezoom!==0){temp=i3GEO.navega.TEMPONAVEGAR;i3GEO.navega.TEMPONAVEGAR=0;i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,i3geo_ns);i3GEO.navega.TEMPONAVEGAR=temp}g_fatordezoom=0}}if($i("vertHandleDivZoom")){$i("vertHandleDivZoom").onmousedown=function(){var iclone,corpo;$i("vertHandleDivZoom").onmouseout=function(e){if(!e){e=window.event}if(g_fatordezoom!==0){$i("vertBGDiv").onmouseup.call()}e.onmouseup.returnValue=false;e.onmouseout.returnValue=false};i3GEO.barraDeBotoes.BOTAOCLICADO='slidezoom';if(!$i("imgtemp")){iclone=document.createElement('IMG');iclone.style.position="absolute";iclone.id="imgtemp";iclone.style.border="1px solid blue";$i("img").parentNode.appendChild(iclone);iclone=$i("imgtemp");corpo=$i("img");if(!corpo){return}iclone.src=corpo.src;iclone.style.width=i3GEO.parametros.w;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(coordenadas){i3GEO.navega.dialogo.google.coordenadas=coordenadas;if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizagoogle()")>0){i3GEO.eventos.NAVEGAMAPA.remove("atualizagoogle()")}i3GEO.util.criaBox();g_operacao="navega";var idgoogle="googlemaps"+Math.random();i3GEO.janela.cria((i3GEO.parametros.w/2)+25+"px",(i3GEO.parametros.h/2)+18+"px",i3GEO.configura.locaplic+"/ferramentas/googlemaps/index.php","","","Google maps <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=7&idajuda=68' >&nbsp;&nbsp;&nbsp;</a>",idgoogle);atualizagoogle=function(){try{parent.frames[idgoogle+"i"].panTogoogle()}catch(e){i3GEO.eventos.NAVEGAMAPA.remove("atualizagoogle()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizagoogle()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizagoogle()")}},confluence:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.confluence()","confluence","confluence")}}};if(typeof(i3GEO)==='undefined'){i3GEO=[]}objposicaocursor={ddx:"",ddy:"",dmsx:"",dmsy:"",telax:"",telay:"",imgx:"",imgy:"",refx:"",refy:""};i3GEO.eventos={ATUALIZAARVORECAMADAS:[],ATIVATEMA:[],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.toLowerCase()==="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:false,uploadlocal:false,uploadarquivo: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:false,comentarios:true,bookmark:true,importarwmc:true,googleearth:true,carregaKml:true},FATORESTRELA:"10",INCLUISISTEMAS:true,INCLUIWMS:true,INCLUIESTRELAS:true,FILTRADOWNLOAD:false,FILTRAOGC:false,TIPOBOTAO:"checkbox",ATIVATEMA:"",ATIVATEMAIMEDIATO:false,IDSMENUS:[],RETORNAGUIA:"",IDHTML:"arvoreAdicionaTema",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<nraiz;i+=1){html="<span title='"+raiz[i].description+"'> "+raiz[i].title;if(raiz[i].nacessos>0){html+=" ("+((raiz[i].nacessosok*100)/(raiz[i].nacessos*1))+"%)</span>"}else{html+=" (% de acessos não definido)</span>"}html+="<hr>";tempNode=new YAHOO.widget.HTMLNode({html:html,id_ws:raiz[i].id_ws,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<n;i+=1){temp=retorno.data[i];cabeca=temp.nome+" - "+temp.titulo;if(cabeca!=="undefined - undefined"){tempNode=new YAHOO.widget.HTMLNode({html:"<span style='color:"+cor+"' >"+cabeca,url:node.data.url,nivel:(node.data.nivel*1+1),id_ws:"",layer:temp.nome,enableHighlight:false,expanded:false},node);if(!temp.estilos){tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS,1)}if(temp.estilos){ns=temp.estilos.length;for(j=0;j<ns;j+=1){tempNodeS=new YAHOO.widget.HTMLNode({html:i3GEO.arvoreDeTemas.montaTextoTemaWMS(node.data.url,temp.nome,temp.estilos[j].nome,temp.estilos[j].titulo,temp.srs.toString(),temp.formatsinfo.toString(),temp.version.toString(),temp.formats.toString(),cor),enableHighlight:false,expanded:false},tempNode);tempNode.isleaf=true}}cor=(cor==="rgb(51, 102, 102)")?"rgb(47, 70, 50)":"rgb(51, 102, 102)"}}node.loadComplete()};i3GEO.php.listaLayersWMS(monta,node.data.url,(node.data.nivel*1+1),node.data.id_ws,node.data.layer)},montaTextoTemaWMS:function(servico,layer,estilo,titulo,proj,formatoinfo,versao,formatoimg,cor){var html,temp,adiciona;html="<td style='vertical-align:top;padding-top:5px;'><span ><input style='cursor:pointer;border:solid 0 white;' ";temp=function(){i3GEO.janela.fechaAguarde("ajaxredesenha");i3GEO.atualiza()};adiciona="i3GEO.janela.abreAguarde(\"ajaxredesenha\",\""+$trad("o1")+"\");i3GEO.arvoreDeTemas.checked=false;i3GEO.php.adicionaTemaWMS("+temp+","+"\""+servico+"\","+"\""+layer+"\","+"\""+estilo+"\","+"\""+proj+"\","+"\""+formatoimg+"\","+"\""+versao+"\","+"\""+titulo+"\","+"\"\","+"\"nao\","+"\""+formatoinfo+"\")";html+="onclick='javascript:"+adiciona+"' "+" type='radio' /></td><td style='padding-top:4px;vertical-align:top;text-align:left;padding-left:3px;color:"+cor+";' >"+layer+" - "+titulo+"</td></span>";return(html)},listaMenus:function(g_sid,g_locaplic,funcao){var retorno=function(retorno){var c,m,i,k,jj,j;if(i3GEO.arvoreDeTemas.IDSMENUS.length===0){i3GEO.arvoreDeTemas.MENUS=retorno.data}else{i3GEO.arvoreDeTemas.MENUS=[];c=retorno.data.length;m=i3GEO.arvoreDeTemas.IDSMENUS.length;for(i=0,j=c;i<j;i+=1){for(k=0,jj=m;k<jj;k+=1){if(retorno.data[i].idmenu===i3GEO.arvoreDeTemas.IDSMENUS[k]){i3GEO.arvoreDeTemas.MENUS.push(retorno.data[i])}}}}if(funcao!==""){eval(funcao+"(retorno)")}};i3GEO.php.pegalistademenus(retorno)},listaGrupos:function(g_sid,g_locaplic,id_menu,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.GRUPOS=retorno.data;if(funcao!==""){funcao.call()}};if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD||i3GEO.arvoreDeTemas.FILTRAOGC){i3GEO.php.pegalistadegrupos(retorno,id_menu,"sim")}else{i3GEO.php.pegalistadegrupos(retorno,id_menu,"nao")}},listaSubGrupos:function(g_sid,g_locaplic,id_menu,id_grupo,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.SUBGRUPOS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegalistadeSubgrupos(retorno,id_menu,id_grupo)},listaTemas:function(g_sid,g_locaplic,id_menu,id_grupo,id_subgrupo,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.TEMAS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegalistadetemas(retorno,id_menu,id_grupo,id_subgrupo)},listaSistemas:function(g_sid,g_locaplic,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.SISTEMAS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegaSistemas(retorno)},listaDrives:function(g_sid,g_locaplic,funcao){var retorno=function(retorno){try{i3GEO.arvoreDeTemas.DRIVES=retorno.data[0];if(i3GEO.arvoreDeTemas.DRIVES==""){return}if(funcao!==""){funcao.call()}}catch(e){i3GEO.arvoreDeTemas.DRIVES=""}};i3GEO.php.listadrives(retorno)},listaEstrelas:function(node){var busca,root,montanos;montanos=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<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;try{if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}}catch(e){}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'>&nbsp;fonte</a>"}if(ngSgrupo[sg].subgrupo){d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>"}else{d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].grupo)+")"+lk+"</td>"}tempNode=new YAHOO.widget.HTMLNode({html:d,expanded:false,isLeaf:true,enableHighlight: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:"<span style='color:red'>Nada encontrado<br><br></span>",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(i3GEO.arvoreDeTemas.ARVORE){return}if(!idhtml){idhtml=""}if(idhtml!==""){i3GEO.arvoreDeTemas.IDHTML=idhtml}if(!funcaoTema){funcaoTema=""}if(funcaoTema!==""){i3GEO.arvoreDeTemas.ATIVATEMA=funcaoTema}if(!objOpcoes){objOpcoes=""}if(objOpcoes!==""){i3GEO.arvoreDeTemas.OPCOESADICIONAIS=objOpcoes}if(!tipoBotao){tipoBotao=""}if(tipoBotao!==""){i3GEO.arvoreDeTemas.TIPOBOTAO=tipoBotao}i3GEO.arvoreDeTemas.LOCAPLIC=g_locaplic;i3GEO.arvoreDeTemas.SID=g_sid;if(i3GEO.arvoreDeTemas.IDHTML===""){return}i3GEO.arvoreDeTemas.listaMenus(g_sid,g_locaplic,"i3GEO.arvoreDeTemas.montaArvore")},atualiza:function(){i3GEO.arvoreDeTemas.ARVORE=null;i3GEO.arvoreDeTemas.cria(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,i3GEO.arvoreDeTemas.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(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluibusca===true){insp="<br><br><table><tr>"+"<td><span style='font-size:12px'>&nbsp;"+$trad("a1")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=31' >&nbsp;&nbsp;&nbsp;</a></span></td>"+"<td><input onclick='javascript:i3GEO.arvoreDeTemas.select();' class='digitar' type='text' id='i3geo_buscatema' size='15' value='' /></td>"+"<td><img class='tic' ";if(navm){insp+="style='top:0px;'"}else{insp+="style='top:4px;'"}insp+=" src='"+i3GEO.util.$im("branco.gif")+"' onclick='i3GEO.arvoreDeTemas.buscaTema2(document.getElementById(\"i3geo_buscatema\").value)' /></td>";insp+="</tr></table>&nbsp;";tempNode=new YAHOO.widget.HTMLNode({html:insp,enableHighlight:false,expanded:false,hasIcon:false},root)}outrasOpcoes=i3GEO.arvoreDeTemas.outrasOpcoesHTML();if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde!==""){document.getElementById(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde).innerHTML=outrasOpcoes}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore===true){tempNode=new YAHOO.widget.HTMLNode({html:outrasOpcoes+"&nbsp;<br>",isLeaf:true,enableHighlight:false,expanded:false,hasIcon:false},root);if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir===true){retorno=function(){var drives,iglt,ig,drive;tempNode=new YAHOO.widget.HTMLNode({html:"&nbsp;"+$trad("a6")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=32' >&nbsp;&nbsp;&nbsp;</a>",enableHighlight: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(ig<iglt)};i3GEO.arvoreDeTemas.listaDrives(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,retorno)}}if(i3GEO.parametros.editor==="sim"){tempNode=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin' target=blank >Sistema de administração</a>",idmenu:"",enableHighlight:false,expanded:false},root);tempNode=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/arvore.html' target=blank >Editar árvore</a>",idmenu:"",enableHighlight:false,expanded:false},root);tempNode=new YAHOO.widget.HTMLNode({html:"<span style='color:red;cursor:pointer' title='opção visível apenas para editores' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/menus.html\")' target=blank >Editar menus</span>",idmenu:"",enableHighlight:false,expanded:false},root)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.googleearth===true){tempNode=new YAHOO.widget.HTMLNode({html:"<a href='"+i3GEO.configura.locaplic+"/kml.php' target=blank > <img src='"+i3GEO.configura.locaplic+"/imagens/visual/default/branco.gif' class='abregoogleearth'> "+$trad("a13")+"</a>",idmenu:"",enableHighlight:false,expanded:false},root)}if(i3GEO.arvoreDeTemas.INCLUIWMS===true){if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar lista' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/webservices.html?tipo=WMS\")' style='width:11px;position:relative;left:3px' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}tempNode=new YAHOO.widget.HTMLNode({html:"<b>&nbsp;OGC-WMS</b>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=33' >&nbsp;&nbsp;&nbsp;</a>"+editor,idwms:"raiz",expanded:false,enableHighlight:false},root);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaWMS,1)}if(i3GEO.arvoreDeTemas.INCLUIESTRELAS===true){tempNode=new YAHOO.widget.HTMLNode({expanded:false,html:"<b>&nbsp;"+$trad("t46")+"</b> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=95' >&nbsp;&nbsp;&nbsp;</a>",enableHighlight:false},root);ig=5;do{tempNode1=new YAHOO.widget.HTMLNode({expanded:false,html:"<img src='"+$im("e"+ig+".png")+"' />",enableHighlight:false,nivel:ig},tempNode);tempNode1.setDynamicLoad(i3GEO.arvoreDeTemas.listaEstrelas,1);ig-=1}while(ig>0)}dados=i3GEO.arvoreDeTemas.MENUS;c=dados.length;for(i=0,j=c;i<j;i+=1){if(!dados[i].nomemenu){dados[i].nomemenu=dados[i].idmenu}if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar grupos' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+dados[i].idmenu+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}if(!dados[i].publicado){dados[i].publicado="sim"}if(dados[i].publicado.toLowerCase()!=="nao"){conteudo="<b>&nbsp;<span title='"+(dados[i].desc)+"'>"+dados[i].nomemenu+"</span>"+editor}else{conteudo="<b>&nbsp;<span title='nao publicado' ><s>"+dados[i].nomemenu+"</s></span>"+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(i3GEO.arvoreDeTemas.INCLUISISTEMAS){retorno=function(){var sis,iglt,tempNode,ig,nomeSis,sisNode,funcoes,tempf,ig2,abre,nomeFunc,funcNode;try{sis=i3GEO.arvoreDeTemas.SISTEMAS;iglt=sis.length;tempNode=new YAHOO.widget.HTMLNode({html:"<b>Sistemas</b>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=34' >&nbsp;&nbsp;&nbsp;</a>",expanded:false,enableHighlight:false},root)}catch(e){i3GEO.arvoreDeTemas.ARVORE.draw();return}ig=0;do{nomeSis=sis[ig].NOME;if(sis[ig].PUBLICADO){if(sis[ig].PUBLICADO.toLowerCase()==="nao"){nomeSis="<s>"+sis[ig].NOME+"</s>"}}sisNode=new YAHOO.widget.HTMLNode({html:nomeSis,expanded:false,enableHighlight:false},tempNode);funcoes=sis[ig].FUNCOES;tempf=funcoes.length;for(ig2=0;ig2<tempf;ig2+=1){abre="i3GEO.janela.cria('"+(funcoes[ig2].W)+"px','"+(funcoes[ig2].H)+"px','"+(funcoes[ig2].ABRIR)+"','','','Sistemas')";nomeFunc="<a href='#' onclick=\""+abre+"\">"+funcoes[ig2].NOME+"</a>";funcNode=new YAHOO.widget.HTMLNode({html:nomeFunc,expanded:false,enableHighlight:false,isLeaf:true},sisNode)}ig+=1}while(ig<iglt);i3GEO.arvoreDeTemas.ARVORE.draw()};i3GEO.arvoreDeTemas.listaSistemas(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,retorno)}document.getElementById(i3GEO.arvoreDeTemas.IDHTML).style.textAlign="left";if(!i3GEO.arvoreDeTemas.INCLUISISTEMAS){i3GEO.arvoreDeTemas.ARVORE.draw()}},montaGrupos:function(node){var temp=function(){var grupos,c,raiz,nraiz,mostra,html,i,d,editor;grupos=i3GEO.arvoreDeTemas.GRUPOS.grupos;c=grupos.length-3;raiz=grupos[c].temasraiz;nraiz=raiz.length;for(i=0;i<nraiz;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&raiz[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&raiz[i].ogc==="nao"){mostra=false}if(mostra){tempNode=new YAHOO.widget.HTMLNode({isLeaf:false,enableHighlight:false,expanded:false,html:i3GEO.arvoreDeTemas.montaTextoTema("gray",raiz[i])},node)}}for(i=0;i<c;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&grupos[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&grupos[i].ogc==="nao"){mostra=false}if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar subgrupos' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+node.data.idmenu+"&id_grupo="+grupos[i].id_n1+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}if(mostra){if(grupos[i].publicado){if(grupos[i].publicado==="NAO"){grupos[i].nome="<span title='nao publicado' ><s>"+grupos[i].nome+"</s></span>"}}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(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,temp)},montaSubGrupos:function(node){var temp=function(){var i,c,mostra,d,html,tempNode,nraiz,subgrupos,raiz;subgrupos=i3GEO.arvoreDeTemas.SUBGRUPOS.subgrupo;c=subgrupos.length;raiz=i3GEO.arvoreDeTemas.SUBGRUPOS.temasgrupo;nraiz=raiz.length;for(i=0;i<nraiz;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&raiz[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&raiz[i].ogc==="nao"){mostra=false}if(mostra){tempNode=new YAHOO.widget.HTMLNode({nacessos:raiz[i].nacessos,html:i3GEO.arvoreDeTemas.montaTextoTema("gray",raiz[i]),idtema:raiz[i].tid,fonte:raiz[i].link,ogc:raiz[i].ogc,kmz:raiz[i].kmz,permitecomentario:raiz[i].permitecomentario,download:raiz[i].download,expanded:false,enableHighlight:false,isLeaf:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.propTemas,1)}}for(i=0;i<c;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&subgrupos[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&subgrupos[i].ogc==="nao"){mostra=false}if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar temas' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+node.data.idmenu+"&id_grupo="+node.data.idgrupo+"&id_subgrupo="+subgrupos[i].id_n2+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}if(mostra){if(subgrupos[i].publicado){if(subgrupos[i].publicado==="NAO"){subgrupos[i].nome="<span title='nao publicado' ><s>"+subgrupos[i].nome+"</s></span>"}}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(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,node.data.idgrupo,temp)},montaTemas:function(node){var temp=function(){var i,cor,temas,c,mostra,tempNode;temas=i3GEO.arvoreDeTemas.TEMAS.temas;c=temas.length;cor="rgb(51, 102, 102)";for(i=0;i<c;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&temas[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&temas[i].ogc==="nao"){mostra=false}if(mostra){if(temas[i].publicado){if(temas[i].publicado==="NAO"){temas[i].nome="<span title='nao publicado' ><s>"+temas[i].nome+"</s></span>"}}tempNode=new YAHOO.widget.HTMLNode({nacessos:temas[i].nacessos,html:i3GEO.arvoreDeTemas.montaTextoTema(cor,temas[i]),idtema:temas[i].tid,fonte:temas[i].link,ogc:temas[i].ogc,kmz:temas[i].kmz,download:temas[i].download,permitecomentario:temas[i].permitecomentario,bookmark:"sim",expanded:false,isLeaf:false,enableHighlight:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.propTemas,1);cor=(cor==="rgb(51, 102, 102)")?"rgb(47, 70, 50)":"rgb(51, 102, 102)"}}node.loadComplete()};i3GEO.arvoreDeTemas.listaTemas(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,node.data.idgrupo,node.data.idsubgrupo,temp)},montaDir:function(node){var montaLista=function(retorno){var ig,d,conteudo,dirs,tempNode,arquivos,nodeSHP;dirs=retorno.data.diretorios;for(ig=0;ig<dirs.length;ig+=1){tempNode=new YAHOO.widget.HTMLNode({html:dirs[ig],caminho:node.data.caminho+"/"+dirs[ig],expanded:false,enableHighlight:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaDir,1)}arquivos=retorno.data.arquivos;for(ig=0;ig<arquivos.length;ig+=1){conteudo=arquivos[ig];if(conteudo.search(".img")>1||conteudo.search(".tif")>1||conteudo.search(".TIF")>1||conteudo.search(".shp")>1||conteudo.search(".SHP")>1){conteudo="<a href='#' title='"+$trad("g2")+"' onclick='i3GEO.util.adicionaSHP(\""+node.data.caminho+"/"+conteudo+"\")' >"+conteudo+"</a>";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="<td style='"+estilo+"'><span>";if(i3GEO.arvoreDeTemas.TIPOBOTAO!=="download"){html+="<input title='"+tema.tid+"' style='width:12px;height:12px;cursor:pointer;border:solid 0 white;' "}else{html+="<img title='"+tema.tid+"' src='"+$im("down1.gif")+"'"}if(i3GEO.arvoreDeTemas.ATIVATEMA!==""){clique="onclick=\""+i3GEO.arvoreDeTemas.ATIVATEMA+"\""}else{if(i3GEO.arvoreDeTemas.ATIVATEMAIMEDIATO===false){clique="onclick='i3GEO.util.criaBotaoAplicar(\"i3GEO.arvoreDeTemas.adicionaTemas\",\""+$trad("p14")+"\",\"i3geoBotaoAplicar\",this)'"}else{clique="onclick='i3GEO.arvoreDeTemas.adicionaTemas([\""+tema.tid+"\"])'"}}html+=clique;if(i3GEO.arvoreDeTemas.TIPOBOTAO!=="download"){html+=" type='"+i3GEO.arvoreDeTemas.TIPOBOTAO+"' value='"+tema.tid+"' />"}else{html+=" /> "}html+="</td><td title='"+tema.tid+"' onmouseout='javascript:this.style.color=\""+cor+"\";' onmouseover='javascript:this.style.color=\"blue\";' style='cursor:pointer;font-size:11px;text-align:left;color:"+cor+";padding-left:0px;' "+clique+">";html+=tema.nome;html+="</td></span>";return(html)},propTemas:function(node){var d,tempNode,html,lkmini,lkmini1,lkgrcode,lkgrcode1,n,ogc;if(node.data.fonte&&node.data.fonte!==""&&node.data.fonte!==" "){tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' href='"+node.data.fonte+"' target='_blank' >Fonte</a>"},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.mini===true){lkmini=i3GEO.arvoreDeTemas.LOCAPLIC+"/testamapfile.php?map="+node.data.idtema+".map&tipo=mini";lkmini1=i3GEO.arvoreDeTemas.LOCAPLIC+"/testamapfile.php?map="+node.data.idtema+".map&tipo=grande";tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' onmouseover='i3GEO.ajuda.mostraJanela(\"<img src="+lkmini+" />\")' href='"+lkmini1+"' target='blank' >Miniatura</a>"},node)}if(node.data.ogc&&node.data.ogc!=="nao"){if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.kml===true){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.abreKml(\""+node.data.idtema+"\",\"kml\")' >Kml</a>";if(node.data.kmz.toLowerCase()==="sim"){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.abreKml(\""+node.data.idtema+"\",\"kmz\")' >Kml</a>"}tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}ogc=i3GEO.arvoreDeTemas.LOCAPLIC+"/ogc.php?tema="+node.data.idtema+"&service=wms&request=getcapabilities";tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='getcapabilities' href='"+ogc+"' target='blank' >WMS - OGC</a>"},node)}if(node.data.download&&node.data.download.toLowerCase()!=="nao"&&i3GEO.arvoreDeTemas.TIPOBOTAO!=="download"){html="<a href='"+i3GEO.configura.locaplic+"/datadownload.htm?"+node.data.idtema+"' target='_blank'>Download</a>";tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(node.data.permitecomentario&&node.data.permitecomentario!=="nao"&&i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios===true){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.comentario(\""+node.data.idtema+"\",\"comentario\")' >Comentário</a>";tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.qrcode===true){lkgrcode=i3GEO.arvoreDeTemas.LOCAPLIC+"/pacotes/qrcode/php/qr_html.php?d="+i3GEO.arvoreDeTemas.LOCAPLIC+"/mobile/index.php?temasa="+node.data.idtema;lkgrcode1=i3GEO.arvoreDeTemas.LOCAPLIC+"/pacotes/qrcode/php/qr_img.php?d="+i3GEO.arvoreDeTemas.LOCAPLIC+"/mobile/index.php?temasa="+node.data.idtema;tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' onmouseover='i3GEO.ajuda.mostraJanela(\"<img src="+lkgrcode1+" />\")' href='"+lkgrcode+"' target='blank' >Qrcode</a>"},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.estrelas===true){n=parseInt(node.data.nacessos/(i3GEO.arvoreDeTemas.FATORESTRELA*1),10);if(n>=5){n=5}html=(n>0)?"<img src='"+i3GEO.util.$im("e"+n+".png")+"'/>":"<img src='"+i3GEO.util.$im("e0.png")+"'/>";tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.bookmark===true){html=i3GEO.social.bookmark(i3GEO.configura.locaplic+"/ms_criamapa.php?layers="+node.data.idtema);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"),OPCOESADICIONAIS=i3GEO.arvoreDeTemas.OPCOESADICIONAIS;if(OPCOESADICIONAIS.refresh===true){ins+="<td><img class='refresh' onclick='i3GEO.arvoreDeTemas.atualiza()' src='"+imb+"' style='cursor:pointer;text-align:left' title='Refresh'/><td>";t+=20}if(OPCOESADICIONAIS.uploadgpx===true){ins+="<td><img class='uploadgpx' onclick='i3GEO.arvoreDeTemas.dialogo.uploadgpx()' src='"+imb+"' style='cursor:pointer;text-align:left' title='upload GPX'/><td>";t+=20}if(OPCOESADICIONAIS.uploaddbf===true){ins+="<td><img class='uploaddbf' onclick='i3GEO.arvoreDeTemas.dialogo.uploaddbf()' src='"+imb+"' style='cursor:pointer;text-align:left' title='"+$trad("a2b")+"'/><td>";t+=20}if(OPCOESADICIONAIS.uploadlocal===true){ins+="<td><img class='upload' onclick='i3GEO.arvoreDeTemas.dialogo.upload()' src='"+imb+"' style='cursor:pointer;text-align:left' title='"+$trad("a2")+"'/><td>";t+=20}if(OPCOESADICIONAIS.uploadarquivo===true){ins+="<td><img class='upload' onclick='i3GEO.arvoreDeTemas.dialogo.uploadarquivo()' src='"+imb+"' style='cursor:pointer;text-align:left' title='"+$trad("a14")+"'/><td>";t+=20}if(OPCOESADICIONAIS.downloadbase===true){ins+="<td><img onclick='i3GEO.arvoreDeTemas.dialogo.downloadbase()' class='download' src='"+imb+"' style='cursor:pointer;text-align:left' title='"+$trad("a3")+"'/><td>";t+=20}if(OPCOESADICIONAIS.importarwmc===true){ins+="<td><img onclick='i3GEO.arvoreDeTemas.dialogo.importarwmc()' class='importarwmc' src='"+imb+"' style='cursor:pointer;text-align:left' title='"+$trad("a3a")+"'/><td>";t+=20}if(OPCOESADICIONAIS.conectarwms===true){ins+="<td><img class='conectarwms' onclick='i3GEO.arvoreDeTemas.dialogo.conectarwms()' src='"+imb+"' style='cursor:pointer;text-align:left' title='"+$trad("a4")+"'/><td>";t+=20}if(OPCOESADICIONAIS.conectarwmst===true){ins+="<td><img class='conectarwmst' onclick='i3GEO.arvoreDeTemas.dialogo.conectarwmst()' src='"+imb+"' style='cursor:pointer;text-align:left' title='"+$trad("a4b")+"'/><td>";t+=20}if(OPCOESADICIONAIS.conectargeorss===true){ins+="<td><img class='conectargeorss' onclick='i3GEO.arvoreDeTemas.dialogo.conectargeorss()' src='"+imb+"' style='cursor:pointer;text-align:left' title='"+$trad("a5")+"'/><td>";t+=20}if(OPCOESADICIONAIS.nuvemTags===true){ins+="<td><img class='nuvemtags' onclick='i3GEO.arvoreDeTemas.dialogo.nuvemTags()' src='"+imb+"' style='cursor:pointer;text-align:left' title='"+$trad("a5a")+"'/><td>";t+=20}if(OPCOESADICIONAIS.nuvemTagsFlash===true){ins+="<td><img class='nuvemtags' onclick='i3GEO.arvoreDeTemas.dialogo.nuvemTagsFlash()' src='"+imb+"' style='cursor:pointer;text-align:left' title='"+$trad("a5a")+"'/><td>";t+=20}if(OPCOESADICIONAIS.carousel===true){ins+="<td><img class='carouselTemas' onclick='i3GEO.arvoreDeTemas.dialogo.carouselTemas()' src='"+imb+"' style='cursor:pointer;text-align:left' title='Miniaturas'/><td>";t+=20}if(OPCOESADICIONAIS.carregaKml===true){ins+="<td><img class='carregarKml' onclick='i3GEO.arvoreDeTemas.dialogo.carregaKml()' src='"+imb+"' style='cursor:pointer;text-align:left' title='Kml'/><td>";t+=20}return("<table width='"+t+"px' ><tr>"+ins+"</tr></table>")},desativaCheckbox:function(){var o,inputs,n,i;o=document.getElementById(i3GEO.arvoreDeTemas.ARVORE.id);inputs=o.getElementsByTagName("input");n=inputs.length;i=0;do{inputs[i].checked=false;i+=1}while(i<n)},listaTemasAtivos:function(){var o,inputs,n,i,lista;o=document.getElementById(i3GEO.arvoreDeTemas.ARVORE.id);inputs=o.getElementsByTagName("input");n=inputs.length;i=0;lista=[];do{if(inputs[i].checked===true){lista.push(inputs[i].value)}i+=1}while(i<n);return(lista)},buscaTema:function(palavra){if(palavra===""){return}var busca,root,nodePalavra;resultadoProcurar=function(retorno){var mostra,tempNode,d,conta,ig,ngSgrupo,tempn,sg,ngTema,tempng,st,lk;if(!retorno.data){alert("Ocorreu um erro")}else{retorno=retorno.data;conta=0;if((retorno!=="erro")&&(typeof(retorno)!=='undefined')){ig=retorno.length-1;if(ig>=0){do{ngSgrupo=retorno[ig].subgrupos;tempn=ngSgrupo.length;for(sg=0;sg<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'>&nbsp;fonte</a>"}d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>";tempNode=new YAHOO.widget.HTMLNode(d,nodePalavra,false,true);tempNode.isLeaf=true;tempNode.enableHighlight=false}conta+=1}}}while(ig--)}else{d="<span style='color:red'>Nada encontrado<br><br></span>";tempNode=new YAHOO.widget.HTMLNode(d,nodePalavra,false,true);tempNode.isLeaf=true;tempNode.enableHighlight=false}}}nodePalavra.loadComplete()};busca=function(){i3GEO.php.procurartemas2(resultadoProcurar,i3GEO.util.removeAcentos(palavra))};i3GEO.arvoreDeTemas.ARVORE.collapseAll();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(!i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")){tempNode=new YAHOO.widget.HTMLNode({html:"Temas encontrados",id:"temasEncontrados"},root,false,true);tempNode.enableHighlight=false}else{tempNode=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")}nodePalavra=new YAHOO.widget.HTMLNode({html:palavra},tempNode,false,true);nodePalavra.enableHighlight=false;i3GEO.arvoreDeTemas.ARVORE.draw();tempNode.expand();nodePalavra.setDynamicLoad(busca,1);nodePalavra.expand()},buscaTema2:function(palavra){if(palavra===""){return}var busca,root,nodePalavra;resultadoProcurar=function(retorno){var mostra,tempNode,d,ig,montaTexto=function(ngSgrupo){var tempn,ngTema,tempng,mostra,d,lk,tempNode,st,sg;tempn=ngSgrupo.length;for(sg=0;sg<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;try{if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}}catch(e){}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'>&nbsp;fonte</a>"}if(ngSgrupo[sg].subgrupo){d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>"}else{d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].grupo)+")"+lk+"</td>"}tempNode=new YAHOO.widget.HTMLNode({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:"<span style='color:red'>Nada encontrado<br><br></span>"},nodePalavra)}}}nodePalavra.loadComplete()};busca=function(){i3GEO.php.procurartemas2(resultadoProcurar,i3GEO.util.removeAcentos(palavra))};i3GEO.arvoreDeTemas.ARVORE.collapseAll();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(!i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")){tempNode=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:"Temas encontrados",id:"temasEncontrados"},root)}else{tempNode=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")}nodePalavra=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:palavra},tempNode);i3GEO.arvoreDeTemas.ARVORE.draw();tempNode.expand();nodePalavra.setDynamicLoad(busca,1);nodePalavra.expand()},adicionaTemas:function(tsl){var temp;try{clearTimeout(tempoBotaoAplicar)}catch(e){}tempoBotaoAplicar="";i3GEO.mapa.ativaTema("");if(arguments.length!==1){tsl=i3GEO.arvoreDeTemas.listaTemasAtivos()}if(tsl.length===1&&i3GEO.arvoreDeCamadas.pegaTema(tsl[0])!==""){temp=window.confirm("O tema já existe no mapa. Adiciona novamente?");if(!temp){return}}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="<select id='"+idCombo+"' SIZE="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(this.value)' ><option value='' >Escolha um menu:</option>";for(ig=0;ig<ob.length;ig+=1){if(ob[ig].publicado!=="nao"&&ob[ig].publicado!=="NAO"){if(ob[ig].nomemenu){ins+="<option value="+ob[ig].idmenu+" >"+ob[ig].nomemenu+"</option>"}}}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistademenus(combo)},comboGruposMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura,id_menu){i3GEO.configura.locaplic=locaplic;i3GEO.arvoreDeTemas.temasRaizGrupos=[];var combo=function(retorno){var ins,ig,obGrupos=retorno.data;ins="<select id='"+idCombo+"' SIZE="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(this.value)' ><option value='' >Escolha um grupo:</option>";for(ig=0;ig<obGrupos.grupos.length;ig+=1){if(obGrupos.grupos[ig].nome){ins+="<option value="+obGrupos.grupos[ig].id_n1+" >"+obGrupos.grupos[ig].nome+"</option>"}i3GEO.arvoreDeTemas.temasRaizGrupos[obGrupos.grupos[ig].id_n1]=obGrupos.grupos[ig].temasgrupo}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistadegrupos(combo,id_menu,"nao")},comboSubGruposMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,idGrupo,largura,altura){if(idGrupo!==""){var combo=function(retorno){var ins,sg,ig;ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(\""+idGrupo+"\",this.value)' ><option value='' >Escolha um sub-grupo:</option>";if(retorno.data.subgrupo){sg=retorno.data.subgrupo;for(ig=0;ig<sg.length;ig+=1){ins+="<option value="+sg[ig].id_n2+" >"+sg[ig].nome+"</option>"}}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistadeSubgrupos(combo,"",idGrupo)}},comboTemasMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,idGrupo,idSubGrupo,largura,altura,id_menu,temas){var combo=function(retorno){var ins,sg,ig,temas;if(idSubGrupo!=""){ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"("+idGrupo+","+idSubGrupo+",this.value)' ><option value='' >Escolha um tema:</option>"}else{ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"("+idGrupo+",\"\",this.value)' ><option value='' >Escolha um tema:</option>"}if(typeof(retorno.data)!=='undefined'){retorno=retorno.data.temas}sg=retorno.length;for(ig=0;ig<sg;ig+=1){ins+="<option value="+retorno[ig].tid+" >"+retorno[ig].nome+"</option>"}$i(idDestino).innerHTML=ins+"</select>"};if(typeof(temas)==='undefined'||temas===""){i3GEO.php.pegalistadetemas(combo,id_menu,idGrupo,idSubGrupo)}else{combo(temas)}},dialogo:{uploadarquivo:function(){var janela,ins,temp,titulo,cabecalho,minimiza;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOFuploadarquivo")};titulo="Upload de arquivo</a>";janela=i3GEO.janela.cria("250px","150px","","","",titulo,"i3GEOFuploadarquivo",false,"hd",cabecalho,minimiza);$i("i3GEOFuploadarquivo_corpo").style.backgroundColor="white";ins=""+" <p class=paragrafo style='width:90%' ><b>Tipo de arquivo</b><br><br>"+" <table class=lista6 style=left:20px;position:relative >"+" <tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.upload()' /></td>"+" <td>Shape file</td>"+" </tr>"+" <tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.uploaddbf()' /></td>"+" <td>DBF ou CSV</td>"+" </tr>"+" <tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.uploadgpx()' /></td>"+" <td>GPX</td>"+" </tr>"+" <tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.uploadkml()' /></td>"+" <td>KML ou KMZ</td>"+" </tr>"+" </table>";$i(janela[2].id).innerHTML=ins},carregaKml:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/carregakml/index.js.php","i3GEOF.carregakml.criaJanelaFlutuante()","i3GEOF.carregakml_script")},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&oacute;rios")},importarwmc:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/importarwmc/index.js.php","i3GEOF.importarwmc.criaJanelaFlutuante()","i3GEOF.importarwmc_script")},conectarwms:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwms/index.htm","","","Conexão WMS <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=28' >&nbsp;&nbsp;&nbsp;</a>")},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 <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=76' >&nbsp;&nbsp;&nbsp;</a>")},conectarwfs:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwfs/index.htm","","","WFS")},conectargeorss:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectargeorss/index.htm","","","Conexão GeoRSS <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=29' >&nbsp;&nbsp;&nbsp;</a>")},upload:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/upload/index.js.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")},uploadkml:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/uploadkml/index.js.php","i3GEOF.uploadkml.criaJanelaFlutuante()","i3GEOF.uploadkml_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={TIPO:"yui",OFFSET:-205,MAXBOTOES:10,AJUDA:true,ORIENTACAO:"vertical",HORIZONTALW:350,TIPOAJUDA:"balao",SOICONES:false,AUTOALTURA:false,TRANSICAOSUAVE:true,OPACIDADE:65,PERMITEFECHAR:true,PERMITEDESLOCAR:true,ATIVAMENUCONTEXTO:false,AUTO:false,LISTABOTOES:i3GEO.configura.funcoesBotoes.botoes,INCLUIBOTAO:{zoomli:true,pan:true,zoomtot:true,identifica:true,identificaBalao:true,mede:true,area:true,imprimir:true,selecao:true,google:true,referencia:true,exten:true,inserexy:true,textofid:true,reinicia:true,buscafotos:true,wiki:true,metar:true,lentei:true,confluence:true,inseregrafico:true,v3d:true},ICONEBOTAO:{zoomli:"/imagens/gisicons/eudock/zoom-region.png",pan:"/imagens/gisicons/eudock/pan.png",zoomtot:"/imagens/gisicons/eudock/zoom-extent.png",identifica:"/imagens/gisicons/eudock/identify.png",identificaBalao:"/imagens/gisicons/eudock/tips.png",mede:"/imagens/gisicons/eudock/length-measure.png",area:"/imagens/gisicons/eudock/area-measure.png",imprimir:"/imagens/gisicons/eudock/print.png",reinicia:"/imagens/gisicons/eudock/redraw.png",exten:"/imagens/gisicons/eudock/map-extent-info.png",referencia:"/imagens/gisicons/eudock/map-reference.png",inserexy:"/imagens/gisicons/eudock/point-create.png",textofid:"/imagens/gisicons/eudock/text-add.png",selecao:"/imagens/gisicons/eudock/select.png",google:"/imagens/gisicons/eudock/google-map.png",buscafotos:"/imagens/gisicons/eudock/fotos.png",wiki:"/imagens/gisicons/eudock/wiki.png",metar:"/imagens/gisicons/eudock/metar.png",lentei:"/imagens/gisicons/eudock/lente.png",confluence:"/imagens/gisicons/eudock/confluence.png",inseregrafico:"/imagens/gisicons/eudock/grafico.png",v3d:"/imagens/gisicons/eudock/v3d.png"},TEMPLATEBOTAO:"",BOTAOPADRAO:"pan",COMPORTAMENTO:"padrao",BARRAS:[],BOTAOCLICADO:"",ativaPadrao:function(){try{$i(i3GEO.barraDeBotoes.BOTAOPADRAO).onclick.apply()}catch(e){}},ativaIcone:function(icone){if(i3GEO.Interface.ATUAL==="openlayers"){try{i3GEO.Interface.openlayers.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"}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(e){i3GEO.barraDeBotoes.mostraJanela(this,"'+l[b].dica+'",e);}');eval('$i("'+l[b].iddiv+'").onmouseout = function(e){i3GEO.barraDeBotoes.mostraJanela(this,"",e);};')}if(l[b].funcaoonclick){temp.onclick=l[b].funcaoonclick;if(l[b].iddiv==padrao){l[b].funcaoonclick()}}if(l[b].constroiconteudo){eval(l[b].constroiconteudo)}}YAHOO.util.Event.addListener($i(l[b].iddiv),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addListener($i(l[b].iddiv),"click",YAHOO.util.Event.stopPropagation);YAHOO.util.Event.addFocusListener($i(l[b].iddiv),YAHOO.util.Event.preventDefault)}while(b--)}if(padrao===""){this.ativaIcone("")}},execBotao:function(id,x,y,posX,posY){var temp,n=38,botao=i3GEO.barraDeBotoes.defBotao(id);i3GEO.barraDeBotoes.BOTAOCLICADO=id;if(botao===false){return}try{if(botao.tipo==="dinamico"&&x){i3GEO.util.criaPin("i3geoMarcaIcone",i3GEO.configura.locaplic+"/imagens/gisicons/eudock/sobe1.png","10px","10px");temp=$i("i3geoMarcaIcone");if(temp){temp.style.display="block";temp.style.top=posY+43;temp.style.left=posX+18}}if(botao.funcaoonclick){botao.funcaoonclick.call()}}catch(e){}},defBotao:function(iddiv){var l,b,d,temp;l=i3GEO.barraDeBotoes.LISTABOTOES;b=l.length-1;if(b>=0){do{temp=l[b].iddiv;if(l[b].iddiv===iddiv){return l[b]}}while(b--)}return false},inicializaBarraOP:function(){i3GEO.barraDeBotoes.AJUDA=false;euEnv.imageBasePath=i3GEO.configura.locaplic+"/pacotes/eudock/";var botao,i,dock=new euDock(),temp="",chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length;dock.setObjectAlign(i3GEO.Interface.IDCORPO,euDOWN,(parseInt(document.body.style.height,10))*-1+i3GEO.barraDeBotoes.OFFSET,euUP);dock.setBar({left:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-l.png"}},horizontal:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-c-o.gif"}},right:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-r.png"}}});dock.setIconsOffset(7);if(i3GEO.barraDeBotoes.MAXBOTOES>0){n=i3GEO.barraDeBotoes.MAXBOTOES}for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]&&i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){botao=i3GEO.barraDeBotoes.defBotao(chaves[i]);if(botao===false){temp=""}else{if(botao.dica){temp=botao.dica}else{temp=""}}dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]}}),{mouseInsideClick:function(x,y,id,posX,posY){i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao,x,y,posX,posY)},idBotao:chaves[i],dica:temp})}}$i(euEnv.euDockArray.euDock_0.bar.elementsArray.left.id).onclick=function(){i3GEO.ajuda.abreJanela()};$i(euEnv.euDockArray.euDock_0.bar.elementsArray.right.id).onclick=function(){var temp="",chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length,nb=euEnv.euDockArray.euDock_0.iconsArray.length,i;if($i("i3geoMarcaIcone")){$i("i3geoMarcaIcone").style.display="none"}if(i3GEO.barraDeBotoes.MAXBOTOES>0&&n>nb){for(i=nb;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]&&i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){botao=i3GEO.barraDeBotoes.defBotao(chaves[i]);if(botao===false){temp=""}else{if(botao.dica){temp=botao.dica}else{temp=""}}dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]}}),{mouseInsideClick:function(x,y,id,posX){i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao,x,y,posX)},idBotao:chaves[i],dica:temp})}}}}},inicializaBarra:function(idconteudo,idconteudonovo,barraZoom,x,y,onde){if(i3GEO.configura.map3d===""){i3GEO.barraDeBotoes.INCLUIBOTAO.v3d=false}if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){i3GEO.barraDeBotoes.inicializaBarraOP()}else{if(this.TEMPLATEBOTAO===""&&i3GEO.Interface.TABLET===false){this.TEMPLATEBOTAO="<div style='display:inline;background-color:rgb(250,250,250);'><img style='border:0px solid white;' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='$$'/></div>"}if(this.TEMPLATEBOTAO===""&&i3GEO.Interface.TABLET===true){this.TEMPLATEBOTAO="<div style='display:inline;background-color:rgb(250,250,250);'><img style='margin:4px;border:0px solid white;' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='$$'/></div>"}var ticone,tipo,mostra,i,temp,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(navm){i3GEO.barraDeBotoes.TRANSICAOSUAVE=false}if(this.AUTO===true){if(idconteudo==="barraDeBotoes1"){novoel=document.createElement("div");novoel.id="barraDeBotoes1";temp='<table style="width:100%"><tr><td style="background-color:rgb(250,250,250);"><div ID="historicozoom" ></div></td></tr><tr><td style=height:5px ></td></tr></table>'+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="zoom" alt="zoom" src="'+branco+'" id="zoomli"/>'+"</div>"+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="desloca" alt="desloca" src="'+branco+'" id="pan"/>'+"</div>"+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="geral" alt="geral" src="'+branco+'" id="zoomtot"/>'+"</div>";novoel.innerHTML=temp;document.body.appendChild(novoel)}if(idconteudo==="barraDeBotoes2"){temp="";chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO);n=chaves.length;for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){temp+=i3GEO.barraDeBotoes.TEMPLATEBOTAO.replace("$$",chaves[i])}}if(typeof(onde)==='undefined'){novoel=document.createElement("div");novoel.id="barraDeBotoes2";estilo="font-size:2px;";if(this.SOICONES===true){estilo="font-size:0px;"}novoel.innerHTML="<table style='width:100%'>"+"<tr><td style='background-color:rgb(250,250,250);'><img title='' alt='sobe' src='"+branco+"' id='sobeferramentas'/></td></tr>"+"</table>"+temp+"<table style='width:100%;'><tr><td style='background-color:rgb(250,250,250);'><img title='desce' alt='' src='"+branco+"' id='desceferramentas'/></td></tr></table>";document.body.appendChild(novoel)}else{$i(onde).innerHTML=temp;return}}}else{if(idconteudo==="barraDeBotoes2"&&onde!==undefined){$i(onde).innerHTML=$i(idconteudo)}}wj="36px";recuo="0px";novoel=document.createElement("div");novoel.id=idconteudonovo;novoel.style.display="block";if(this.SOICONES===false){novoel.style.border="1px solid gray";novoel.style.background="white"}else{novoel.style.border="0px solid white"}if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){Dom.setStyle(novoel,"opacity",this.OPACIDADE/100)}temp="";if(barraZoom===true){temp+=i3GEO.navega.barraDeZoom.cria()}temp+='<div id="'+idconteudonovo+'_" style="left:'+recuo+';top:0px;" ></div>';novoel.innerHTML=temp;novoel.onmouseover=function(){YAHOO.util.Dom.setStyle("i3geo_rosa","display","none");if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",1)}if(i3GEO.Interface.TABLET===true){}};novoel.onmouseout=function(){if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.barraDeBotoes.OPACIDADE/100)}if(i3GEO.Interface.TABLET===true){}};document.body.appendChild(novoel);if(this.ATIVAMENUCONTEXTO){i3GEO.util.mudaCursor(i3GEO.configura.cursores,"contexto",idconteudonovo,i3GEO.configura.locaplic)}ticone=28;alturadisponivel=i3GEO.parametros.h-i3GEO.Interface.BARRABOTOESTOP-ticone-38-38;if(this.AUTOALTURA===true){alturadisponivel+=28}numerobotoes=parseInt(alturadisponivel/ticone,10);if($i(idconteudo)){$i(idconteudonovo+"_").innerHTML=$i(idconteudo).innerHTML;$i(idconteudo).innerHTML="";elementos=$i(idconteudonovo+"_").getElementsByTagName("img");nelementos=elementos.length;if(i3GEO.barraDeBotoes.ORIENTACAO==="horizontal"){numerobotoes=100}if(this.AUTOALTURA===true||(numerobotoes<nelementos)){if(elementos[0].id==="sobeferramentas"){try{elementos=$i(idconteudonovo+"_").getElementsByTagName("div");nelementos=elementos.length;i=0;do{elementos[i].style.display="none";i=i+1}while(i<nelementos);i=0;do{if(elementos[i]!=undefined){elementos[i].style.display="inline"}i=i+1}while(i<numerobotoes-1)}catch(men){}}}if(elementos.length<=numerobotoes){Dom.setStyle(["sobeferramentas","desceferramentas"],"display","none")}}YAHOO.namespace("janelaBotoes.xp");if(i3GEO.barraDeBotoes.ORIENTACAO==="horizontal"){YAHOO.janelaBotoes.xp.panel=new YAHOO.widget.Panel(idconteudonovo,{zIndex:20000,height:40,width:i3GEO.barraDeBotoes.HORIZONTALW,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}else{if(this.AUTOALTURA===false||barraZoom===true||(elementos.length>numerobotoes)){YAHOO.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<nelementos);mostra.style.display="inline";i=nelementos+1;mostra=elementos[i];do{if(elementos[i]){if(elementos[i].style){if(elementos[i].style.display==="inline"){mostra=elementos[i];break}}}i=i-1}while(i>=0);mostra.style.display="none"}}}if($i("desceferramentas")){$i("desceferramentas").onclick=function(){tipo="inline";if($i(idconteudonovo+"_")){elementos=$i(idconteudonovo+"_").getElementsByTagName("div");if(elementos[elementos.length-1].style.display===tipo){return}nelementos=elementos.length;if(nelementos>0){i=0;do{e=elementos[i];if(e.style){if((e.style.display==="block")||(e.style.display==="inline")||(e.style.display==="")){if(e.id===""){e.style.display="none";break}}}i=i+1}while(i<nelementos);i=nelementos-1;var mostra=elementos[i];do{e=elementos[i];if(e.style){if(e.style.display===tipo){break}if(e.style.display==="none"){mostra=e}}i=i-1}while(i>=0);mostra.style.display=tipo}}}}this.BARRAS.push(YAHOO.janelaBotoes.xp.panel);YAHOO.janelaBotoes.xp.panel.show();if(i3GEO.Interface.TABLET===true){YAHOO.janelaBotoes.xp.panel.moveTo((i3GEO.parametros.w/2)-(i3GEO.barraDeBotoes.HORIZONTALW/2),"")}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:"&nbsp;<span class='container-close'></span>"},{text:"Fechar barra",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.fecha('"+idbarra+"')"}},{text:"Barra normal",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.AUTOALTURA=false;i3GEO.barraDeBotoes.PERMITEFECHAR=true;i3GEO.barraDeBotoes.PERMITEDESLOCAR=true;i3GEO.barraDeBotoes.recria('"+idbarra+"')"}},{text:"Barra fixa",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.AUTOALTURA=true;i3GEO.barraDeBotoes.PERMITEFECHAR=false;i3GEO.barraDeBotoes.PERMITEDESLOCAR=false;i3GEO.barraDeBotoes.recria('"+idbarra+"')"}},{text:"Remove transiçã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;i<n;i+=1){i3GEO.barraDeBotoes.BARRAS[i].show()}};try{if(arguments.length===1){i3GEO.barraDeBotoes.BARRAS[indice].show()}else{abre.call()}}catch(e){abre.call()}},recria:function(id){if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){euEnv.euDockArray=[];euEnv.Kost.num=0;if($i("euDock_0_bar")){document.body.removeChild($i("euDock_0_bar").parentNode)}i3GEO.barraDeBotoes.inicializaBarra();if($i("i3geoMarcaIcone")){$i("i3geoMarcaIcone").style.display="none"}return}var n,temp,novoel,barraZoom,x,y,BARRAS=i3GEO.barraDeBotoes.BARRAS,iu=i3GEO.util;i3GEO.barraDeBotoes.BARRAS=[];n=BARRAS.length;for(i=0;i<n;i+=1){if(BARRAS[i].id===id){iu.removeChild("contexto_"+id);if(!$i("barraTemporaria"+i)){novoel=document.createElement("div");novoel.id="barraTemporaria"+i;document.body.appendChild(novoel)}novoel=$i("barraTemporaria"+i);novoel.innerHTML=$i(BARRAS[i].id+"_").innerHTML;barraZoom=false;temp=$i("vertMaisZoom");if(temp){temp=navm?temp.parentNode:temp.parentNode.parentNode;if(temp.id===id){barraZoom=true}}x=parseInt($i(BARRAS[i].id+"_c").style.left,10);y=parseInt($i(BARRAS[i].id+"_c").style.top,10);if(i3GEO.barraDeBotoes.PERMITEFECHAR===true){y=y-10}BARRAS[i].destroy();i3GEO.barraDeBotoes.inicializaBarra(novoel.id,BARRAS[i].id,barraZoom,x,y)}}i3GEO.barraDeBotoes.ativaBotoes()},fecha:function(id){var n=this.BARRAS.length;for(i=0;i<n;i+=1){if(this.BARRAS[i].id===id){$i(id+"_c").style.visibility="hidden"}}},mostraJanela:function(objeto,mensagem,evt){if(mensagem===""){try{clearTimeout(timeMostraAjudaBotoes)}catch(e){}try{clearTimeout(timeAjudaBotoes)}catch(e){}return}var divmensagem=$i("divMensagemBarraDeBotoes"),balloonAjuda,pos=YAHOO.util.Dom.getXY(objeto);if(this.AJUDA===false||$i("janelaMenTexto")){i3GEO.ajuda.mostraJanela(mensagem);i3GEO.barraDeBotoes.escondeJanelaAjuda();return}if(i3GEO.Interface.ATUAL==="googleearth"){objeto.title=mensagem;return}if(!divmensagem&&this.TIPOAJUDA!=="balao"){divmensagem=document.createElement("div");divmensagem.id="divMensagemBarraDeBotoes";divmensagem.style.border="0px solid rgb(120 120 120)";divmensagem.style.position="absolute";divmensagem.style.zIndex=20000;if($i("i3geo")){$i("i3geo").appendChild(divmensagem)}else{document.body.appendChild(divmensagem)}if(this.TIPOAJUDA==="horizontal"){divmensagem.innerHTML="<table style='z-index:20000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='"+$im("left.png")+"' ></td><td style='text-align:left;border-left:1px solid rgb(210,210,210)'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'></div></td></tr></table>"}if(this.TIPOAJUDA==="vertical"){divmensagem.innerHTML="<table style='z-index:20000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='"+$im("top.png")+"' ></td><td style='text-align:left;border-left:1px solid rgb(210,210,210)'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'></div></td></tr></table>"}}if(mensagem!==""){if(this.TIPOAJUDA!=="balao"){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none");if(this.TIPOAJUDA==="horizontal"){divmensagem.style.left=parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)+pos[0]+10+"px";divmensagem.style.top=pos[1]-2+(parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)/2)+"px"}if(this.TIPOAJUDA==="vertical"){divmensagem.style.left=(parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)/2)+pos[0]-5+"px";divmensagem.style.top=pos[1]+5+parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)+"px"}try{clearTimeout(timeAjudaBotoes)}catch(e){}timeMostraAjudaBotoes=setTimeout("i3GEO.barraDeBotoes.mostraJanelaAjuda('"+mensagem+"');",5000)}else{hideAllTooltips();balloonAjuda=new Balloon();BalloonConfig(balloonAjuda,'GBubble');balloonAjuda.delayTime=0;balloonAjuda.stem=false;balloonAjuda.stemHeight=0;balloonAjuda.vOffset=-24;balloonAjuda.images=i3GEO.configura.locaplic+'/pacotes/balloon-tooltips/htdocs/images/GBubblec';mensagem="<table style='z-index:20000' ><tr><td style='text-align:left;'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'>"+mensagem+"</div></td></tr></table>";try{clearTimeout(timeAjudaBotoes)}catch(e){}timeMostraAjudaBotoes=setTimeout(function(){balloonAjuda.cleanup();balloonIsVisible=false;if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){balloonAjuda.showTooltip(objeto,mensagem,null,null,null,pos[0],pos[1]-40)}else{balloonAjuda.showTooltip(objeto,mensagem,null,null,null,pos[0]+12,pos[1])}try{clearTimeout(timeMostraAjudaBotoes)}catch(e){}timeAjudaBotoes=setTimeout(function(){balloonAjuda.cleanup()},4000)},4000)}}},mostraJanelaAjuda:function(mensagem){$i("divMensagemBarraDeBotoesCorpo").innerHTML=mensagem;YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","block");try{clearTimeout(timeMostraAjudaBotoes)}catch(e){}timeAjudaBotoes=setTimeout(function(){i3GEO.barraDeBotoes.escondeJanelaAjuda()},3000)},escondeJanelaAjuda:function(){try{clearTimeout(timeAjudaBotoes)}catch(e){}if($i("divMensagemBarraDeBotoes")){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none")}},editor:{inicia:function(){if(navm){alert("O editor não funciona corretamente nesse navegador.")}i3GEO.barraDeBotoes.editor.carregaJs()},carregaJs:function(idjanela){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/mashups/openlayers.js.php","i3GEO.barraDeBotoes.editor.ativaPainel('"+idjanela+"')","openlayers.js.php",true)},criaJanela:function(){if($i("i3GEOjanelaEditor")){return"i3GEOjanelaEditor"}var janela,divid,temp,titulo,cabecalho,minimiza;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOjanelaEditor")};titulo="Editor vetorial";janela=i3GEO.janela.cria("300px","200px","","","",titulo,"i3GEOjanelaEditor",false,"hd",cabecalho,minimiza);divid=janela[2].id;$i("i3GEOjanelaEditor_corpo").style.backgroundColor="white";$i("i3GEOjanelaEditor_corpo").style.textAlign="left";return divid},ativaPainel:function(idjanela){OpenLayers.ImgPath=i3GEO.configura.locaplic+"/pacotes/openlayers/img/";i3GEO.editorOL.fundo="";i3GEO.editorOL.mapa=i3geoOL;i3GEO.editorOL.maxext="";i3GEO.editorOL.controles=[];i3GEO.editorOL.botoes={'pan':false,'zoombox':false,'zoomtot':false,'legenda':false,'distancia':false,'area':false,'identifica':true,'linha':true,'ponto':true,'poligono':true,'texto':true,'edita':true,'selecao':true,'apaga':true,'procura':false,'propriedades':true,'salva':true,'ajuda':true,'fecha':true,'tools':true,'undo':true,'frente':true};var sketchSymbolizers={"Point":{fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}",strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",label:"${texto}",pointRadius:"${pointRadius}",graphicName:"${graphicName}",fontSize:"${fontSize}",fontColor:"rgb(${fontColor})",fontFamily:"Arial",fontWeight:"normal",labelAlign:"lb",labelXOffset:"3",labelYOffset:"3"},"Line":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})"},"Polygon":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}"}},style=new OpenLayers.Style(),styleMap1=new OpenLayers.StyleMap({"default":style});style.addRules([new OpenLayers.Rule({symbolizer:sketchSymbolizers})]);i3GEO.editorOL.layergrafico=new OpenLayers.Layer.Vector("Edição",{styleMap:styleMap1,displayInLayerSwitcher:false,visibility:true});i3GEO.editorOL.mapa.addLayers([i3GEO.editorOL.layergrafico]);i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}}};function RichDrawEditor(elem,renderer){this.container=elem;this.gridX=10;this.gridY=10;this.mouseDownX=0;this.mouseDownY=0;this.mode='';this.fillColor='';this.lineColor='';this.lineWidth='';this.circColor='';this.textColor='';this.selected=null;this.selectedBounds={x:0,y:0,width:0,height:0};this.onselect=function(){};this.onunselect=function(){};this.renderer=renderer;this.renderer.init(this.container);this.fecha=function(){elem.innerHTML="";elem.style.display="none"}}RichDrawEditor.prototype.clearWorkspace=function(){this.container.innerHTML=''};RichDrawEditor.prototype.deleteSelection=function(){if(this.selected){this.renderer.remove(this.container.ownerDocument.getElementById('tracker'));this.renderer.remove(this.selected);this.selected=null}};RichDrawEditor.prototype.select=function(elem){if(elem==this.selected)return;this.selected=elem;this.renderer.showTracker(this.selected);this.onselect(this)};RichDrawEditor.prototype.unselect=function(){if(this.selected){this.renderer.remove(this.container.ownerDocument.getElementById('tracker'));this.selected=null;this.onunselect(this)}};RichDrawEditor.prototype.getSelectedElement=function(){return this.selected};RichDrawEditor.prototype.setGrid=function(horizontal,vertical){this.gridX=horizontal;this.gridY=vertical};RichDrawEditor.prototype.editCommand=function(cmd,value){if(cmd=='mode'){this.mode=value}else if(this.selected==null){if(cmd=='fillcolor'){this.fillColor=value}else if(cmd=='linecolor'){this.lineColor=value}else if(cmd=='textcolor'){this.textColor=value}else if(cmd=='circcolor'){this.circColor=value}else if(cmd=='linewidth'){this.lineWidth=parseInt(value)+'px'}}else{this.renderer.editCommand(this.selected,cmd,value)}};RichDrawEditor.prototype.queryCommand=function(cmd){if(cmd=='mode'){return this.mode}else if(this.selected==null){if(cmd=='fillcolor'){return this.fillColor}else if(cmd=='linecolor'){return this.lineColor}else if(cmd=='textcolor'){return this.textColor}else if(cmd=='circcolor'){return this.circColor}else if(cmd=='linewidth'){return this.lineWidth}}else{return this.renderer.queryCommand(this.selected,cmd)}};RichDrawEditor.prototype.onSelectStart=function(event){return false};RichDrawEditor.prototype.onClick=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;if(this.mode!='select'){this.unselect();this.mouseDownX=snappedX;this.mouseDownY=snappedY;this.selected=this.renderer.create(this.mode,this.fillColor,this.lineColor,this.lineWidth,this.mouseDownX,this.mouseDownY,1,1);this.selected.id='shape:'+createUUID();Event.observe(this.selected,"mousemove",this.onHitListener);Event.observe(this.container,"mousemove",this.onDrawListener)}else{if(this.mouseDownX!=snappedX||this.mouseDownY!=snappedY)this.unselect()}return false};RichDrawEditor.prototype.onMouseDown=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;if(this.mode!='select'){this.unselect();this.mouseDownX=snappedX;this.mouseDownY=snappedY;this.selected=this.renderer.create(this.mode,this.fillColor,this.lineColor,this.lineWidth,this.mouseDownX,this.mouseDownY,1,1);this.selected.id='shape:'+createUUID();Event.observe(this.selected,"mousedown",this.onHitListener);Event.observe(this.container,"mousemove",this.onDrawListener)}else{if(this.mouseDownX!=snappedX||this.mouseDownY!=snappedY)this.unselect()}return false};RichDrawEditor.prototype.onMouseUp=function(event){Event.stopObserving(this.container,"mouseup",this.onDrawListener);Event.stopObserving(this.container,"mouseup",this.onDragListener);if(this.mode!='select'){this.selected=null}};RichDrawEditor.prototype.onDrag=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;var deltaX=snappedX-this.mouseDownX;var deltaY=snappedY-this.mouseDownY;this.renderer.move(this.selected,this.selectedBounds.x+deltaX,this.selectedBounds.y+deltaY);this.renderer.showTracker(this.selected)};RichDrawEditor.prototype.onResize=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;var deltaX=snappedX-this.mouseDownX;var deltaY=snappedY-this.mouseDownY;this.renderer.track(handle,deltaX,deltaY);show_tracker()};RichDrawEditor.prototype.onDraw=function(event){if(this.selected==null)return;var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;this.renderer.resize(this.selected,this.mouseDownX,this.mouseDownY,snappedX,snappedY)};RichDrawEditor.prototype.onHit=function(event){if(this.mode=='select'){this.select(Event.element(event));this.selectedBounds=this.renderer.bounds(this.selected);var offset=Position.cumulativeOffset(this.container);this.mouseDownX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;this.mouseDownY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;Event.observe(this.container,"mousemove",this.onDragListener)}};function createUUID(){return[4,2,2,2,6].map(function(length){var uuidpart="";for(var i=0;i<length;i++){var uuidchar=parseInt((Math.random()*256)).toString(16);if(uuidchar.length==1)uuidchar="0"+uuidchar;uuidpart+=uuidchar}return uuidpart}).join('-')}function AbstractRenderer(){};AbstractRenderer.prototype.init=function(elem){};AbstractRenderer.prototype.bounds=function(shape){return{x:0,y:0,width:0,height:0}};AbstractRenderer.prototype.create=function(shape,fillColor,lineColor,lineWidth,left,top,width,height,texto){};AbstractRenderer.prototype.remove=function(shape){};AbstractRenderer.prototype.move=function(shape,left,top){};AbstractRenderer.prototype.track=function(shape){};AbstractRenderer.prototype.resize=function(shape,fromX,fromY,toX,toY){};AbstractRenderer.prototype.editCommand=function(shape,cmd,value){};AbstractRenderer.prototype.queryCommand=function(shape,cmd){};AbstractRenderer.prototype.showTracker=function(shape){};AbstractRenderer.prototype.getMarkup=function(){return null};function SVGRenderer(){this.base=AbstractRenderer;this.svgRoot=null}SVGRenderer.prototype=new AbstractRenderer;SVGRenderer.prototype.init=function(elem){this.container=elem;this.container.style.MozUserSelect='none';var svgNamespace='http://www.w3.org/2000/svg';this.svgRoot=this.container.ownerDocument.createElementNS(svgNamespace,"svg");this.container.appendChild(this.svgRoot)};SVGRenderer.prototype.bounds=function(shape){var rect=new Object();var box=shape.getBBox();rect['x']=box.x;rect['y']=box.y;rect['width']=box.width;rect['height']=box.height;return rect};SVGRenderer.prototype.create=function(shape,fillColor,lineColor,lineWidth,left,top,width,height,texto){var svgNamespace='http://www.w3.org/2000/svg';var svg;if(shape=='rect'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'rect');svg.setAttributeNS(null,'x',left+'px');svg.setAttributeNS(null,'y',top+'px');svg.setAttributeNS(null,'width',width+'px');svg.setAttributeNS(null,'height',height+'px')}else if(shape=='ellipse'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'ellipse');svg.setAttributeNS(null,'cx',(left+width/2)+'px');svg.setAttributeNS(null,'cy',(top+height/2)+'px');svg.setAttributeNS(null,'rx',(width/2)+'px');svg.setAttributeNS(null,'ry',(height/2)+'px')}else if(shape=='circ'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'ellipse');svg.setAttributeNS(null,'cx',left+'px');svg.setAttributeNS(null,'cy',top+'px');svg.setAttributeNS(null,'rx',width+'px');svg.setAttributeNS(null,'ry',width+'px')}else if(shape=='roundrect'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'rect');svg.setAttributeNS(null,'x',left+'px');svg.setAttributeNS(null,'y',top+'px');svg.setAttributeNS(null,'rx','20px');svg.setAttributeNS(null,'ry','20px');svg.setAttributeNS(null,'width',width+'px');svg.setAttributeNS(null,'height',height+'px')}else if(shape=='line'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'line');svg.setAttributeNS(null,'x1',left+'px');svg.setAttributeNS(null,'y1',top+'px');svg.setAttributeNS(null,'x2',width+'px');svg.setAttributeNS(null,'y2',height+'px')}else if(shape=='text'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'text');var n=this.container.ownerDocument.createTextNode(texto);svg.appendChild(n);svg.setAttributeNS(null,'x',left+'px');svg.setAttributeNS(null,'y',top+'px');svg.setAttributeNS(null,'font-size','12px')}svg.style.position='absolute';if(fillColor.length==0)fillColor='none';svg.setAttributeNS(null,'fill',fillColor);if(lineColor.length==0)lineColor='none';svg.setAttributeNS(null,'stroke',lineColor);svg.setAttributeNS(null,'stroke-width',lineWidth);this.svgRoot.appendChild(svg);return svg};SVGRenderer.prototype.remove=function(shape){shape.parentNode.removeChild(shape)};SVGRenderer.prototype.move=function(shape,left,top){if(shape.tagName=='line'){var deltaX=shape.getBBox().width;var deltaY=shape.getBBox().height;shape.setAttributeNS(null,'x1',left);shape.setAttributeNS(null,'y1',top);shape.setAttributeNS(null,'x2',left+deltaX);shape.setAttributeNS(null,'y2',top+deltaY)}else if(shape.tagName=='ellipse'){shape.setAttributeNS(null,'cx',left+(shape.getBBox().width/2));shape.setAttributeNS(null,'cy',top+(shape.getBBox().height/2))}else{shape.setAttributeNS(null,'x',left);shape.setAttributeNS(null,'y',top)}};SVGRenderer.prototype.track=function(shape){};SVGRenderer.prototype.resize=function(shape,fromX,fromY,toX,toY){var deltaX=toX-fromX;var deltaY=toY-fromY;if(shape.tagName=='line'){shape.setAttributeNS(null,'x2',toX);shape.setAttributeNS(null,'y2',toY)}else if(shape.tagName=='ellipse'){if(deltaX<0){shape.setAttributeNS(null,'cx',(fromX+deltaX/2)+'px');shape.setAttributeNS(null,'rx',(-deltaX/2)+'px')}else{shape.setAttributeNS(null,'cx',(fromX+deltaX/2)+'px');shape.setAttributeNS(null,'rx',(deltaX/2)+'px')}if(deltaY<0){shape.setAttributeNS(null,'cy',(fromY+deltaY/2)+'px');shape.setAttributeNS(null,'ry',(-deltaY/2)+'px')}else{shape.setAttributeNS(null,'cy',(fromY+deltaY/2)+'px');shape.setAttributeNS(null,'ry',(deltaY/2)+'px')}}else{if(deltaX<0){shape.setAttributeNS(null,'x',toX+'px');shape.setAttributeNS(null,'width',-deltaX+'px')}else{shape.setAttributeNS(null,'width',deltaX+'px')}if(deltaY<0){shape.setAttributeNS(null,'y',toY+'px');shape.setAttributeNS(null,'height',-deltaY+'px')}else{shape.setAttributeNS(null,'height',deltaY+'px')}}};SVGRenderer.prototype.editCommand=function(shape,cmd,value){if(shape!=null){if(cmd=='fillcolor'){if(value!='')shape.setAttributeNS(null,'fill',value);else shape.setAttributeNS(null,'fill','none')}else if(cmd=='linecolor'){if(value!='')shape.setAttributeNS(null,'stroke',value);else shape.setAttributeNS(null,'stroke','none')}else if(cmd=='linewidth'){shape.setAttributeNS(null,'stroke-width',parseInt(value)+'px')}}};SVGRenderer.prototype.queryCommand=function(shape,cmd){var result='';if(shape!=null){if(cmd=='fillcolor'){result=shape.getAttributeNS(null,'fill');if(result=='none')result=''}else if(cmd=='linecolor'){result=shape.getAttributeNS(null,'stroke');if(result=='none')result=''}else if(cmd=='linewidth'){result=shape.getAttributeNS(null,'stroke');if(result=='none')result='';else result=shape.getAttributeNS(null,'stroke-width')}}return result};SVGRenderer.prototype.showTracker=function(shape){var box=shape.getBBox();var tracker=document.getElementById('tracker');if(tracker){this.remove(tracker)}var svgNamespace='http://www.w3.org/2000/svg';tracker=document.createElementNS(svgNamespace,'rect');tracker.setAttributeNS(null,'id','tracker');tracker.setAttributeNS(null,'x',box.x-10);tracker.setAttributeNS(null,'y',box.y-10);tracker.setAttributeNS(null,'width',box.width+20);tracker.setAttributeNS(null,'height',box.height+20);tracker.setAttributeNS(null,'fill','none');tracker.setAttributeNS(null,'stroke','blue');tracker.setAttributeNS(null,'stroke-width','1');this.svgRoot.appendChild(tracker)};SVGRenderer.prototype.getMarkup=function(){return this.container.innerHTML};function VMLRenderer(){this.base=AbstractRenderer}VMLRenderer.prototype=new AbstractRenderer;VMLRenderer.prototype.init=function(elem){this.container=elem;this.container.style.overflow='hidden';elem.ownerDocument.namespaces.add("v","urn:schemas-microsoft-com:vml");var style=elem.ownerDocument.createStyleSheet();style.addRule('v\\:*',"behavior: url(#default#VML);")};VMLRenderer.prototype.bounds=function(shape){var rect=new Object();rect['x']=shape.offsetLeft;rect['y']=shape.offsetTop;rect['width']=shape.offsetWidth;rect['height']=shape.offsetHeight;return rect};VMLRenderer.prototype.create=function(shape,fillColor,lineColor,lineWidth,left,top,width,height,texto){var vml;if(shape=='rect'){vml=this.container.ownerDocument.createElement('v:rect')}else if(shape=='roundrect'){vml=this.container.ownerDocument.createElement('v:roundrect')}else if(shape=='ellipse'){vml=this.container.ownerDocument.createElement('v:oval')}else if(shape=='circ'){vml=this.container.ownerDocument.createElement('v:oval')}else if(shape=='line'){vml=this.container.ownerDocument.createElement('v:line')}else if(shape=='text'){vml=this.container.ownerDocument.createElement('v:textbox');vml.innerHTML=texto}if(shape!='line'){vml.style.position='absolute';vml.style.left=left;vml.style.top=top;vml.style.width=width;vml.style.height=height;if(fillColor!=''){vml.setAttribute('filled','true');vml.setAttribute('fillcolor',fillColor)}else{vml.setAttribute('filled','false')}}else{vml.style.position='absolute';vml.setAttribute('from',left+'px,'+top+'px');vml.setAttribute('to',width+'px,'+height+'px')}if(lineColor!=''){vml.setAttribute('stroked','true');vml.setAttribute('strokecolor',lineColor);vml.setAttribute('strokeweight',lineWidth)}else{vml.setAttribute('stroked','false')}this.container.appendChild(vml);return vml};VMLRenderer.prototype.remove=function(shape){shape.removeNode(true)};VMLRenderer.prototype.move=function(shape,left,top){if(shape.tagName=='line'){shape.style.marginLeft=left;shape.style.marginTop=top}else{shape.style.left=left;shape.style.top=top}};VMLRenderer.prototype.track=function(shape){};VMLRenderer.prototype.resize=function(shape,fromX,fromY,toX,toY){shape.setAttribute('to',toX+'px,'+toY+'px')};VMLRenderer.prototype.editCommand=function(shape,cmd,value){if(shape!=null){if(cmd=='fillcolor'){if(value!=''){shape.filled='true';shape.fillcolor=value}else{shape.filled='false';shape.fillcolor=''}}else if(cmd=='linecolor'){if(value!=''){shape.stroked='true';shape.strokecolor=value}else{shape.stroked='false';shape.strokecolor=''}}else if(cmd=='linewidth'){shape.strokeweight=parseInt(value)+'px'}}};VMLRenderer.prototype.queryCommand=function(shape,cmd){if(shape!=null){if(cmd=='fillcolor'){if(shape.filled=='false')return'';else return shape.fillcolor}else if(cmd=='linecolor'){if(shape.stroked=='false')return'';else return shape.strokecolor}else if(cmd=='linewidth'){if(shape.stroked=='false'){return''}else{return(parseFloat(shape.strokeweight)*(screen.logicalXDPI/72))+'px'}}}};VMLRenderer.prototype.showTracker=function(shape){var box=this.bounds(shape);var tracker=document.getElementById('tracker');if(tracker){this.remove(tracker)}tracker=this.container.ownerDocument.createElement('v:rect');tracker.id='tracker';tracker.style.position='absolute';tracker.style.left=box.x-10;tracker.style.top=box.y-10;tracker.style.width=box.width+20;tracker.style.height=box.height+20;tracker.setAttribute('filled','false');tracker.setAttribute('stroked','true');tracker.setAttribute('strokecolor','blue');tracker.setAttribute('strokeweight','1px');this.container.appendChild(tracker)};VMLRenderer.prototype.getMarkup=function(){return this.container.innerHTML};if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.coordenadas={formato:"bloco",padrao:"geoProj",defOrigem:"+proj=longlat +ellps=GRS67 +no_defs",config:{"geoProj":{idhtml:"localizarxy",tipo:"geo",titulo:"Geo",ativo:true,defepsg:""},"dd":{idhtml:"localizarxy",tipo:"metrica",titulo:"Déc. de grau",ativo:true,defepsg:""},"policonicaSad69":{idhtml:"localizarxy",tipo:"metrica",titulo:"Polic SAD-69",ativo:true,defepsg:"+proj=poly +lat_0=0 +lon_0=-54 +x_0=5000000 +y_0=10000000 +ellps=aust_SA +units=m +no_defs"},"utmSad69Proj":{idhtml:"localizarxy",tipo:"utm",titulo:"UTM Sad-69",ativo:true,defepsg:"",zona:{"19N":"+proj=utm +zone=19 +ellps=aust_SA +units=m +no_defs","20N":"+proj=utm +zone=20 +ellps=aust_SA +units=m +no_defs","21N":"+proj=utm +zone=21 +ellps=aust_SA +units=m +no_defs","22N":"+proj=utm +zone=22 +ellps=aust_SA +units=m +no_defs","17S":"+proj=utm +zone=17 +south +ellps=aust_SA +units=m +no_defs","18S":"+proj=utm +zone=18 +south +ellps=aust_SA +units=m +no_defs","19S":"+proj=utm +zone=19 +south +ellps=aust_SA +units=m +no_defs","20S":"+proj=utm +zone=20 +south +ellps=aust_SA +units=m +no_defs","21S":"+proj=utm +zone=21 +south +ellps=aust_SA +units=m +no_defs","22S":"+proj=utm +zone=22 +south +ellps=aust_SA +units=m +no_defs","23S":"+proj=utm +zone=23 +south +ellps=aust_SA +units=m +no_defs","24S":"+proj=utm +zone=24 +south +ellps=aust_SA +units=m +no_defs","25S":"+proj=utm +zone=25 +south +ellps=aust_SA +units=m +no_defs"}},"utmSirgas2000Proj":{idhtml:"localizarxy",tipo:"utm",titulo:"UTM Sirgas",ativo:true,defepsg:"",zona:{"11N":"+proj=utm +zone=11 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","12N":"+proj=utm +zone=12 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","13N":"+proj=utm +zone=13 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","14N":"+proj=utm +zone=14 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","15N":"+proj=utm +zone=15 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","16N":"+proj=utm +zone=16 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","17N":"+proj=utm +zone=17 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","18N":"+proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","19N":"+proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","20N":"+proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","21N":"+proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","22N":"+proj=utm +zone=22 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","17S":"+proj=utm +zone=17 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","18S":"+proj=utm +zone=18 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","19S":"+proj=utm +zone=19 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","20S":"+proj=utm +zone=20 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","21S":"+proj=utm +zone=21 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","22S":"+proj=utm +zone=22 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","23S":"+proj=utm +zone=23 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","24S":"+proj=utm +zone=24 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","25S":"+proj=utm +zone=25 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}}},PARAMETROS:{"mostraCoordenadasUTM":{idhtml:"localizarxy"},"mostraCoordenadasGEO":{idhtml:"localizarxy"}},MODOTEXTO:"",mostraCoordenadasUTM:function(id){try{if(arguments.length===0||id===""||typeof(id)==='undefined'){id=this.PARAMETROS.mostraCoordenadasUTM.idhtml}else{this.PARAMETROS.mostraCoordenadasUTM.idhtml=id}if(!$i(id)||this.PARAMETROS.mostraCoordenadasUTM.idhtml===""){if(i3GEO.eventos.MOUSEPARADO.toString().search("atualizaCoordenadasUTM()")>=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="<div onclick='javascript:clearTimeout(idSetTimeoutMostraUTM);i3GEO.coordenadas.PARAMETROS.mostraCoordenadasUTM.idhtml = \"\";i3GEO.coordenadas.mostraCoordenadasGEO();' style='width:300px;font-size:10px;' >UTM: x="+retorno.data.x+" y="+retorno.data.y+" zn="+retorno.data.zona+" "+retorno.data.datum+" &nbsp;<img class='x' src='"+i3GEO.util.$im("branco.gif")+"' /></div>";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.Interface.TABLET===true){if(i3GEO.eventos.MOUSECLIQUE.toString().search("atualizaLocalizarGeo()")<0){i3GEO.eventos.MOUSECLIQUE.push("atualizaLocalizarGeo()")}}else{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='<table id='+prefixo+' style=display:block;text-align:center;width:410px ><tr style="border-bottom:2px solid white" >'+'<td style=width:10px;text-align:right > X:</td>'+'<td>'+$inputText('','',prefixo+'xg','grau','2','-00')+'</td>'+'<td>'+$inputText('','',prefixo+'xm','minuto','2','00')+'</td>'+'<td>'+$inputText('','',prefixo+'xs','segundo','4','00.00')+'</td>'+'<td>Y:'+$inputText('','',prefixo+'yg','grau','2','-00')+'</td>'+'<td>'+$inputText('','',prefixo+'ym','minuto','2','00')+'</td>'+'<td>'+$inputText('','',prefixo+'ys','segundo','4','00.00')+'</td>',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+='<td><img class=tic title=zoom onclick="'+temp+'" src="'+i3GEO.util.$im("branco.gif")+'" /></td>'+"<td>"+caixa+"</td>"+"</tr></table>";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]+"<br>"},criaMascaraMetrica:function(prefixo,titulo,caixa){var ins="<table id="+prefixo+" style=display:block;text-align:center;;width:410px ><tr style='border-bottom:2px solid white' >"+"<td style=width:120px;text-align:right >"+titulo+" X:&nbsp;</td>"+"<td>"+$inputText("","",prefixo+"X","X","12","00")+"&nbsp;</td>"+"<td>Y:"+$inputText("","",prefixo+"Y","Y","12","00")+"&nbsp;</td>"+"<td>Zn:"+$inputText("","",prefixo+"ZN","Zona","2","--")+"&nbsp;</td>"+"<td>"+caixa+"<td>"+"</tr></table>";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+"<br>"},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<n;i++){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){if(tipos[i]===this.padrao){$i(prefixo+tipos[i]).style.display="block"}else{$i(prefixo+tipos[i]).style.display="none"}}}},mudaTipo:function(obj,onde){if(obj.value==="janela"){this.formato="janela";this.mostraCoordenadas();return}this.padrao=obj.value;obj.selectedIndex=0;i3GEO.coordenadas.ativaBloco(onde)},mostraCoordenadas:function(ativaMovimento,onde,x,y){try{var tipos=i3GEO.util.listaChaves(i3GEO.coordenadas.config),n=tipos.length,temp,ins="",i=0,caixa,janela;i3GEO.coordenadas.MODOTEXTO="";if(arguments.length===0){ativaMovimento=true;onde=""}if(onde===""){onde=i3GEO.coordenadas.config[tipos[0]].idhtml}caixa="<select onchange='javascript:i3GEO.coordenadas.mudaTipo(this,\""+onde+"\");' style='margin-left:3px;font-size:10px;height:16px;width:40px;' ><option>---</option><option value='janela' >janela</option>";for(i=0;i<n;i+=1){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){caixa+="<option value='"+tipos[i]+"'>"+temp.titulo+"</option>"}}caixa+="</select>";if(i3GEO.coordenadas.formato!=="bloco"){caixa=""}for(i=0;i<n;i+=1){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){if(temp.tipo==="geo"){ins+=i3GEO.coordenadas.criaMascaraDMS(onde+tipos[i],temp.titulo,caixa);if(i3GEO.coordenadas.formato==="separado"){try{$i(temp.idhtml).innerHTML=ins}catch(e){}ins=""}}else{ins+=i3GEO.coordenadas.criaMascaraMetrica(onde+tipos[i],temp.titulo,caixa)}}}if(this.formato==="janela"){janela=i3GEO.janela.cria("450px","120px","","","","Coordenadas aproximadas","i3GEOJanelaCoordenadas",false,"hd","","");YAHOO.util.Event.addListener(janela[0].close,"click",function(){i3GEO.coordenadas.formato="bloco",i3GEO.coordenadas.mostraCoordenadas()});temp=$i("i3GEOJanelaCoordenadas_corpo");temp.style.backgroundColor="white";temp.style.textAlign="left";temp=$i("i3GEOJanelaCoordenadas");temp.onmouseover="";temp.onmouseout="";if($i(onde)){$i(onde).innerHTML=""}onde="i3GEOJanelaCoordenadas_corpo";ins+="<br><a href='#' style='cursor:pointer;color:blue' onclick='new YAHOO.util.KeyListener(document.body,{alt:true,keys:67},{fn: function(type, args, obj){alert(i3GEO.coordenadas.MODOTEXTO);}}).enable();' >"+"Clique aqui para ativar Alt+C para poder capturar as coordenadas</a>"}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<n;i+=1){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){if(temp.tipo==="geo"){if(ativaMovimento===true){if(i3GEO.Interface.TABLET===true){if(i3GEO.eventos.MOUSECLIQUE.toString().search("atualizaLocalizarGeo('"+onde+tipos[i]+"')")<0){i3GEO.eventos.MOUSECLIQUE.push("atualizaLocalizarGeo('"+onde+tipos[i]+"')")}}else{if(i3GEO.eventos.MOUSEMOVE.toString().search("atualizaLocalizarGeo('"+onde+tipos[i]+"')")<0){i3GEO.eventos.MOUSEMOVE.push("atualizaLocalizarGeo('"+onde+tipos[i]+"')")}}}if(typeof(x)!=='undefined'){atualizaLocalizarGeo(onde+tipos[i],i3GEO.calculo.dd2dms(x)[0],i3GEO.calculo.dd2dms(y)[0])}}else{if(ativaMovimento===true){if(i3GEO.Interface.TABLET===true){if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')")}}else{if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')")}}}if(typeof(x)!=='undefined'){i3GEO.coordenadas.atualizaProj4(onde,tipos[i],x,y)}}}}if(ativaMovimento===true){if(i3GEO.Interface.TABLET===true){if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.coordenadas.limpaModoTexto()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.coordenadas.limpaModoTexto()")}}else{if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.coordenadas.limpaModoTexto()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.coordenadas.limpaModoTexto()")}}}if(i3GEO.coordenadas.formato==="bloco"){i3GEO.coordenadas.ativaBloco(onde)}}catch(men){}},limpaModoTexto:function(){i3GEO.coordenadas.MODOTEXTO=""}};if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.gadgets={PARAMETROS:{"mostraInserirKml":{idhtml:"inserirKml"},"mostraEscalaNumerica":{idhtml:"escala"},"mostraEscalaGrafica":{idhtml:"escalaGrafica"},"mostraBuscaRapida":{idhtml:"buscaRapida",servicosexternos:true,temasmapa:false},"mostraVisual":{idhtml:"visual"},"mostraQuadros":{idhtml:"lugarquadros"},"mostraHistoricoZoom":{idhtml:"historicozoom"},"mostraMenuSuspenso":{idhtml:"menus",deslocaEsquerda:0},"mostraMenuLista":{idhtml:"menuLista"},"mostraVersao":{idhtml:"versaoi3geo"},"mostraEmail":{idhtml:"emailInstituicao"}},mostraEmail:function(id){if(arguments.length===0||id===""){id=i3GEO.gadgets.PARAMETROS.mostraEmail.idhtml}else{i3GEO.gadgets.PARAMETROS.mostraEmail.idhtml=id}i3GEO.util.defineValor(id,"innerHTML",i3GEO.parametros.emailInstituicao)},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,"290","i3geo_urlkml","kml url","40","");ins="<table><tr><td>Kml: "+i;temp='i3GEO.Interface.adicionaKml();';ins+="</td><td><img src='"+i3GEO.util.$im("branco.gif")+"' class='tic' onclick='"+temp+"' /></td></tr></table>";$i(id).innerHTML=ins}}},mostraEscalaNumerica:function(id){var i,ins,temp,onde;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraEscalaNumerica.idhtml}onde=$i(id);if(onde){if(onde.style.display=="none"){onde.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,"100","i3geo_escalanum",$trad("d10"),"9",parseInt(i3GEO.parametros.mapscale,10));ins="<table><tr><td>"+i;temp='var nova = document.getElementById("i3geo_escalanum").value;';temp+='i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,nova);';ins+="</td><td><img src='"+i3GEO.util.$im("branco.gif")+"' class='tic' onclick='"+temp+"' /></td></tr></table>";onde.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="<img class='menuarrow' src=\""+i3GEO.configura.locaplic+"/imagens/branco.gif\" title='op&ccedil;&otilde;es' onclick='i3GEO.mapa.dialogo.opcoesEscala()' style='cursor:pointer'/><img id=imagemEscalaGrafica src='' />";$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(){alert("i3geo_buscaRapida foi depreciada")};i=$inputText(id,"225","valorBuscaRapida","Município, cidade, UC, endereço...","30",$trad("o2"));ins="<table><tr><td><a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=8&idajuda=71' >&nbsp;&nbsp;&nbsp;</a></td><td>"+i+"</td>";ins+="<td><img src='"+i3GEO.util.$im("branco.gif")+"' title='"+$trad("p13")+"' class='ticPropriedades2' id=i3GEObotaoPropriedadesBuscaRapida /></td>";ins+="<td><img src='"+i3GEO.util.$im("branco.gif")+"' class='tic' id=i3GEObotaoBuscaRapida /></td></tr></table>";temp=$i(id);if(temp){temp.innerHTML=ins;$i("i3GEObotaoBuscaRapida").onclick=function(){if(i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.servicosexternos===false&&i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.temasmapa===false){alert("Escolha um tipo de busca nas propriedades");return}if($i("valorBuscaRapida").value===""){alert("Digite uma palavra para busca!");return}i3GEO.janela.cria("300px","280px",i3GEO.configura.locaplic+"/ferramentas/buscarapida/index.htm","","","Busca rapida")};$i("i3GEObotaoPropriedadesBuscaRapida").onclick=function(){var ins,interno="",externo="";i3GEO.janela.cria("300px","150px","","","","Propriedades","i3GEOpropriedadesBuscaRapida");if(i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.servicosexternos){externo="checked"}if(i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.temasmapa){interno="checked"}ins="<p class=paragrafo >Onde será feita a busca:</p>"+"<table class=lista3 >"+"<tr><td><input style=cursor:pointer onclick='i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.servicosexternos = this.checked' type=checkbox "+externo+" ></td><td>Serviços de busca externos (Google e MMA)</td></tr>"+"<tr><td><input style=cursor:pointer onclick='i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.temasmapa = this.checked' type=checkbox "+interno+" ></td><td>Temas existentes no mapa</td></tr>"+"</table><br>"+"<p class=paragrafo >Apenas os temas especialmente configurados pelo administrador do i3Geo podem receber operações de busca.</p>";$i("i3GEOpropriedadesBuscaRapida_corpo").innerHTML=ins}}}},mostraHistoricoZoom:function(id){if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraHistoricoZoom.idhtml}if($i(id)){marcadorZoom="";var ins="<table style='text-align:center;position:relative;left:";if(navm){ins+="0px;'>"}else{ins+="6px;'>"}ins+="<tr><td><img id='i3geo_zoomanterior' class='zoomAnterior' title='anterior' src='"+i3GEO.util.$im("branco.gif")+"' /></td>";ins+="<td>&nbsp;</td>";ins+="<td><img id='i3geo_zoomproximo' class='zoomProximo' title='proximo' src='"+i3GEO.util.$im("branco.gif")+"' /></td>";ins+="</tr></table>";$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<i3GEO.gadgets.quadros.quadrosfilme.length){marcadorZoom=marcadorZoom+1;if(marcadorZoom<i3GEO.gadgets.quadros.quadrosfilme.length){i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,"",i3GEO.gadgets.quadros.quadrosfilme[marcadorZoom].extensao)}}else{marcadorZoom=i3GEO.gadgets.quadros.quadrosfilme.length}}}},visual:{inicia:function(id){var l,visuais,li;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraVisual.idhtml}if($i(id)){if(i3GEO.parametros.listavisual!==""){l=i3GEO.parametros.listavisual.split(",");visuais="";li=l.length-1;if(li>=0){do{visuais+="<img title='"+l[li]+"' style=cursor:pointer onclick='i3GEO.gadgets.visual.troca(\""+l[li]+"\")' src='"+i3GEO.configura.locaplic+"/imagens/visual/"+l[li]+".png' />&nbsp;"}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<elt;i++){if((elementos[i].src.search("branco")>-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="<table class=tablefilme ><tr><td><div class='menuarrow' title='op&ccedil;&otilde;es' onclick='i3GEO.gadgets.quadros.opcoes(this)' style='cursor:pointer'></div></td>";for(i=0;i<qs;i++){q+="<td><img class='quadro' src=\""+i3GEO.configura.locaplic+"/imagens/branco.gif\" id='quadro"+i+"' ";q+="onmouseover='i3GEO.gadgets.quadros.trocaMapa(this.id);i3GEO.ajuda.mostraJanela(\"Clique para aplicar a extensão geográfica do quadro ao mapa\")' ";q+="onclick='i3GEO.gadgets.quadros.zoom(this.id)' /></td>";i3GEO.gadgets.quadros.quadrosfilme[i]=[]}q+="</tr></table>";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.toLowerCase()==="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.toLowerCase()==="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="<br><b>N&atilde;o existem imagens guardadas.";wi.document.write("<html><body><p style='font-size: 12px; font-family: verdana, arial, helvetica, sans-serif;'>Click com o bot&atilde;o da direita do mouse sobre a imagem para fazer o download<br>");i=i3GEO.gadgets.quadros.quadrosfilme.length-1;if(i>=0){do{if(i3GEO.gadgets.quadros.quadrosfilme[i].imagem){wi.document.write("<p style='font-size: 12px; font-family: verdana, arial, helvetica, sans-serif;'>Imagem: "+i+"<br>");wi.document.write("<p style='font-size: 12px; font-family: verdana, arial, helvetica, sans-serif;'>Abrangência: "+i3GEO.gadgets.quadros.quadrosfilme[i].extensao+"<br>");wi.document.write("<img src='"+i3GEO.gadgets.quadros.quadrosfilme[i].imagem+"' />");wi.document.write("<img src='"+i3GEO.gadgets.quadros.quadrosfilme[i].referencia+"' />");if(i3GEO.gadgets.quadros.geraLegenda===true){wi.document.write("<img src='"+i3GEO.gadgets.quadros.quadrosfilme[i].legenda+"' />")}}i--}while(i>=0)}wi.document.write("<br>Fim</body></html>");wi.document.close()}}},mostraMenuSuspenso:function(id){var objid,sobe,n,i,estilo,t,onMenuBarBeforeRender,temp,ifr,i3GEOoMenuBarLocal,ms=i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso,confm=i3GEO.configura.oMenuData,ins="",alinhamento="";i3GEOoMenuBar=YAHOO.widget.MenuManager;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+='<div class="bd" style="top:0px;'+alinhamento+'display:block;align:right;border: 0px solid white;z-index:6000;line-height:1.4" >'+'<ul class="first-of-type" style="display:block;border:0px solid white;top:10px;">';n=confm.menu.length;estilo="padding-bottom:3px;top:0px;border: 0px solid white;";for(i=0;i<n;i+=1){t="";if(confm.menu[i].target){t="target="+confm.menu[i].target}ins+='<li class="yuimenubaritem" style="padding-top:2px;"><a style="'+estilo+'" href="#" class="yuimenubaritemlabel" '+t+'id="menu'+confm.menu[i].id+'" >&nbsp;'+confm.menu[i].nome+'</a></li>'}ins+='</ul>';ins+='</div>';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!==""){i3GEOoMenuBarLocal.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}i3GEOoMenuBarLocal=new YAHOO.widget.MenuBar(id,{iframe:ifr,autosubmenudisplay:true,showdelay:100,hidedelay:500,lazyload:false});i3GEOoMenuBar.addMenu(i3GEOoMenuBarLocal);i3GEOoMenuBarLocal.beforeRenderEvent.subscribe(onMenuBarBeforeRender);i3GEOoMenuBarLocal.render();try{if(i3GEO.Interface.ATUAL==="padrao"){i3GEOoMenuBar.getMenuItem("omenudataInterface1").cfg.setProperty("checked",true)}if(i3GEO.Interface.ATUAL==="openlayers"){i3GEOoMenuBar.getMenuItem("omenudataInterface2").cfg.setProperty("checked",true)}if(i3GEO.Interface.ATUAL==="flamingo"){i3GEOoMenuBar.getMenuItem("omenudataInterface3").cfg.setProperty("checked",true)}if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEOoMenuBar.getMenuItem("omenudataInterface4").cfg.setProperty("checked",true)}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEOoMenuBar.getMenuItem("omenudataInterface5").cfg.setProperty("checked",true)}}catch(e){}if(i3GEO.Interface.ATUAL!=="padrao"&&$i("omenudataArquivos3")){i3GEOoMenuBar.getMenuItem("omenudataArquivos3").cfg.setProperty("disabled",true)}if(i3GEO.Interface.ATUAL==="googleearth"&&$i("omenudataJanelas1")){i3GEOoMenuBar.getMenuItem("omenudataJanelas1").cfg.setProperty("disabled",true)}if(i3GEO.Interface.ATUAL!=="openlayers"&&$i("omenudataJanelas3")){i3GEOoMenuBar.getMenuItem("omenudataJanelas3").cfg.setProperty("disabled",true)}temp=objid.style;temp.backgroundPosition="0px -1px";temp.border="0px solid white";if(navm){temp.borderBottom="2px solid white"}if(navm&&i3GEO.Interface.ATUAL==="googlemaps"){temp.border="2px dotted white"}if(ms.finaliza&&ms.finaliza!=""){eval(ms.finaliza)}}},mostraMenuLista:function(id){var objid,n,i,estilo,t,temp,nomeMenu,sub,ms=i3GEO.gadgets.PARAMETROS.mostraMenuLista,confm=i3GEO.configura.oMenuData,ins="",subs=i3GEO.configura.oMenuData.submenus;if(arguments.length===0){id=ms.idhtml}else{ms.idhtml=id}objid=$i(id);if(objid){n=confm.menu.length;for(i=0;i<n;i+=1){ins+='<div class="listaMenuTitulo" id=menulista_'+confm.menu[i].id+'>'+confm.menu[i].nome+'</div>'}objid.innerHTML=ins;for(nomeMenu in subs){if($i("menulista_"+nomeMenu)){sub=subs[nomeMenu];n=sub.length;ins="";for(i=0;i<n;i++){ins+="<p class='listaMenuItem' ><a href='"+sub[i].url+"' target='_blank'>"+sub[i].text+"</a>"}$i("menulista_"+nomeMenu).innerHTML+=ins}}}}};if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.social={curtirFacebook:function(url,tipo){if(tipo==="comtotal"){return"<iframe src='http://www.facebook.com/plugins/like.php?href="+url+"&amp;layout=button_count&amp;show_faces=false&amp;width=160&amp;action=like&amp;colorscheme=light&amp;height=21' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:160px; height:21px;' allowTransparency='true'></iframe>"}if(tipo==="semtotal"){return"<iframe src='http://www.facebook.com/plugins/like.php?href="+url+"&amp;layout=button_count&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;height=21' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:100px; height:21px;' allowTransparency='true'></iframe>"}},publicarTwitter:function(url,tipo){var re=new RegExp("=","g");url=url.replace(re,'%3d');if(tipo==="comtotal"){return'<iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/tweet_button.html?count=horizontal&via=i3geo&url='+url+'" style="width:100px; height:21px;"></iframe>'}if(tipo==="semtotal"){return'<iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/tweet_button.html?count=none&via=i3geo&url='+url+'" style="width:55px; height:21px;"></iframe>'}},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+="<table style='width:250px' ><tr>"}if(tipo==="semtotal"){tabela+="<table style='width:115px' ><tr>"}if(onde||id===""){if(urlpt!==""){tabela+="<td>"+i3GEO.social.publicarTwitter(urlpt,tipo)+"</td>"}if(urlcf!==""){tabela+="<td>"+i3GEO.social.curtirFacebook(urlcf,tipo)+"</td>"}tabela+="</tr></table>";if(id!==""){onde.innerHTML=tabela}return tabela}else{return false}},bookmark:function(link,locaplic){if(!locaplic){locaplic=i3GEO.configura.locaplic}var ins="<img style='cursor:pointer' src='"+locaplic+"/imagens/delicious.gif' onclick='javascript:window.open(\"http://del.icio.us/post?url="+link+"\")' title='Delicious'/> ";ins+="<img style='cursor:pointer' src='"+locaplic+"/imagens/digg.gif' onclick='javascript:window.open(\"http://digg.com/submit/post?url="+link+"\")' title='Digg'/> ";ins+="<img style='cursor:pointer' src='"+locaplic+"/imagens/facebook.gif' onclick='javascript:window.open(\"http://www.facebook.com/sharer.php?u="+link+"\")' title='Facebook'/> ";ins+="<img style='cursor:pointer' src='"+locaplic+"/imagens/stumbleupon.gif' onclick='javascript:window.open(\"http://www.stumbleupon.com/submit?url="+link+"\")' title='StumbleUpon'/>";return ins}};/*
  329 + * euDock - javascript Emulation of Dock style MAC OS X bar
  330 + *
  331 + * Version: 2.0.06
  332 + *
  333 + * Copyright (C) 2006 Parodi (Pier...) Eugenio <eudock@inwind.it>
  334 + * http://eudock.jules.it
  335 + *
  336 + * SPECIAL THANKS TO Tiago D'Herbe (tvidigal) FOR (Multiple Dock) INSPIRATION
  337 + *
  338 + * Mario Zaizar to suggest and help me for Pointer icon patch and Target function
  339 + *
  340 + * J?r?mie 'ahFeel' BORDIER to suggest and help me for DeleteIcon feature
  341 + *
  342 + *
  343 + *
  344 + *
  345 + * This library is free software; you can redistribute it and/or
  346 + * modify it under the terms of the GNU Lesser General Public
  347 + * License as published by the Free Software Foundation; either
  348 + * version 2.1 of the License, or (at your option) any later version.
  349 + *
  350 + * This library is distributed in the hope that it will be useful,
  351 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  352 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  353 + * Lesser General Public License for more details.
  354 + *
  355 + * You should have received a copy of the GNU Lesser General Public
  356 + * License along with this library; if not, write to the Free Software
  357 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  358 + *
  359 + */
  360 +
  361 + /*
  362 + *
  363 + * This program is absolutely free...
  364 + * ...BUT...
  365 + * If you modify(OR TRY TO DO THAT)this Source Code,
  366 + * my SOUL will carry you some monstrous Nightmares
  367 + *
  368 + * Have a nice day
  369 + * enjoy yourself.
  370 + * Pier...
  371 + *
  372 + * (Sorry but I'm Italian not an American writer)
  373 + * (...a day Maybe...)
  374 + */
  375 +
  376 +if (!euEnv)
  377 + var euEnv = new Array();
  378 +euEnv.Kost = new Array();
  379 +euEnv.Kost.num = 0;
  380 +euEnv.Kost.next = function(){return this.num++;}
  381 +euEnv.euDockArray = new Array();
  382 +euEnv.refreshTime = 35;
  383 +euEnv.exeThread = true;
  384 +euEnv.exeThreadWhiteLoop = 0;
  385 +euEnv.x = 0;
  386 +euEnv.y = 0;
  387 +euEnv.mouseMoved=false;
  388 +
  389 +var euUP = 1;
  390 +var euDOWN = 2;
  391 +var euLEFT = 3;
  392 +var euRIGHT = 4;
  393 +
  394 +var euICON = 5;
  395 +var euMOUSE = 6;
  396 +
  397 +var euSCREEN = 7;
  398 +var euOBJECT = 8;
  399 +var euABSOLUTE = 9;
  400 +var euRELATIVE = 10;
  401 +
  402 +var euHORIZONTAL = 11;
  403 +var euVERTICAL = 12;
  404 +var euCENTER = 13;
  405 +
  406 +var euTRANSPARENT = 14;
  407 +var euFIXED = 15;
  408 +var euOPAQUE = 16;
  409 +
  410 +
  411 +
  412 +/*
  413 + ****************************************
  414 + ****** Standard euDock Functions *******
  415 + ****** (BEGIN) *******
  416 + ****************************************
  417 + */
  418 + function euIdObjTop(euObj){
  419 + var ret = euObj.offsetTop;
  420 + while ((euObj = euObj.offsetParent)!=null)
  421 + ret += euObj.offsetTop;
  422 + return ret;
  423 + };
  424 +
  425 + function euIdObjLeft(euObj){
  426 + var ret = euObj.offsetLeft;
  427 + while ((euObj = euObj.offsetParent)!=null)
  428 + ret += euObj.offsetLeft;
  429 +
  430 +
  431 + return ret;
  432 + };
  433 +
  434 + function isEuInside(euObj,x,y){
  435 + var euTop = euIdObjTop(euObj);
  436 + var euLeft = euIdObjLeft(euObj);
  437 + return ((euTop<=y && (euTop+euObj.offsetHeight)>=y)&&(euLeft<=x && (euLeft+euObj.offsetWidth)>=x));
  438 + };
  439 +
  440 + /*
  441 + * euDimensioni()
  442 + *
  443 + * standard code fo retrieve width and Height of Screen
  444 + *
  445 + */
  446 + function euDimensioni(){
  447 + if( typeof( window.innerWidth ) == 'number' ) {
  448 + //Non-IE
  449 + euEnv.euFrameWidth = window.innerWidth-16;
  450 + euEnv.euFrameHeight = window.innerHeight;
  451 + } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
  452 + //IE 6+ in 'standards compliant mode'
  453 + euEnv.euFrameWidth = document.documentElement.clientWidth-16;
  454 + euEnv.euFrameHeight = document.documentElement.clientHeight;
  455 + } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
  456 + //IE 4 compatible
  457 + euEnv.euFrameWidth = document.body.clientWidth;
  458 + euEnv.euFrameHeight = document.body.clientHeight;
  459 + }
  460 + };
  461 +
  462 + function offsEut() {
  463 + euEnv.euScrOfY = 0;
  464 + euEnv.euScrOfX = 0;
  465 + if( typeof( window.pageYoffsEut ) == 'number' ) {
  466 + //Netscape compliant
  467 + euEnv.euScrOfY = window.pageYoffsEut;
  468 + euEnv.euScrOfX = window.pageXoffsEut;
  469 + } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
  470 + //DOM compliant
  471 + euEnv.euScrOfY = document.body.scrollTop;
  472 + euEnv.euScrOfX = document.body.scrollLeft;
  473 + } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
  474 + //IE6 standards compliant mode
  475 + euEnv.euScrOfY = document.documentElement.scrollTop;
  476 + euEnv.euScrOfX = document.documentElement.scrollLeft;
  477 + }
  478 + };
  479 +/*
  480 + ****************************************
  481 + ****** Standard euDock Functions *******
  482 + ****** (END) *******
  483 + ****************************************
  484 + */
  485 +
  486 +/*
  487 + ****************************************
  488 + ****** euDock Trans Functions *******
  489 + ****** (BEGIN) *******
  490 + ****************************************
  491 + */
  492 +
  493 + function euKostFunc30(x){
  494 + return 0.3;
  495 + };
  496 +
  497 + function euKostFunc100(x){
  498 + return 1;
  499 + };
  500 +
  501 + function euLinear(x){
  502 + return x;
  503 + };
  504 +
  505 + function euLinear30(x){
  506 + //return 1*(x+(1-x)*0.3);
  507 + var r = 1*(x+(1-x)*0.3);
  508 + //if(r < 1)
  509 + //{r = 1;}
  510 + return r;
  511 + };
  512 +
  513 + function euLinear20(x){
  514 + return x+(1-x)*0.2;
  515 + };
  516 +
  517 + function euExp30(x){
  518 + return euLinear30(x*x*x);
  519 + };
  520 +
  521 + function euLinear50(x){
  522 + return x+(1-x)*0.5;
  523 + };
  524 +
  525 + function euHarmonic(x){
  526 + return euLinear30((1-Math.cos(Math.PI*x))/2);
  527 + };
  528 +
  529 + function euSemiHarmonic(x){
  530 + return euLinear30(Math.cos(Math.PI*(1-x)/2));
  531 + };
  532 +
  533 +/*
  534 + ****************************************
  535 + ****** euDock Trans Functions *******
  536 + ****** (END) *******
  537 + ****************************************
  538 + */
  539 +
  540 +/*
  541 + ****************************************
  542 + ****** euDock Object *******
  543 + ****** (START) *******
  544 + ****************************************
  545 + */
  546 + function euDock(){
  547 + this.id = 'euDock_'+euEnv.Kost.next();
  548 + var novoel = document.createElement("div");
  549 + novoel.style.position = "absolute";
  550 + novoel.innerHTML = "<div id='"+this.id+"_bar' style='z-index:1000;position:absolute;border:0px solid black;'></div>" +
  551 + "<div onMouseOut='euEnv.euDockArray."+this.id+".mouseOut();' onMouseOver='euEnv.euDockArray."+this.id+".mouseOver();' id='"+this.id+"' style='z-index:1000;position:absolute;border:0px solid black; cursor: pointer;'></div>";
  552 + document.body.appendChild(novoel);
  553 +
  554 + this.div =document.getElementById(this.id);
  555 + this.divBar=document.getElementById(this.id+"_bar");
  556 + this.iconsArray=new Array();
  557 + this.isInside=false;
  558 + euEnv.euDockArray[this.id]=this;
  559 + this.bar=null;
  560 +
  561 + this.mouseX = 0;
  562 + this.mouseY = 0;
  563 +
  564 + this.centerPosX = 0;
  565 + this.centerPosY = 0;
  566 + this.offset = 0;
  567 + this.iconOffset = 0;
  568 +
  569 + this.venusHillSize = 3;//200;
  570 + this.venusHillTrans = euLinear;
  571 +
  572 + this.position = euUP;
  573 + this.align = euSCREEN;
  574 + this.objectAlign = euDOWN;
  575 + this.idObjectHook;
  576 + this.animaition = euICON;
  577 + this.animFading = euABSOLUTE;
  578 +
  579 + this.setIconsOffset = function(offset){
  580 + this.iconOffset=offset;
  581 + };
  582 +
  583 + this.setAnimation = function(anim,size){
  584 + this.animaition = anim;
  585 + this.venusHillSize = size;
  586 + };
  587 +
  588 + this.setPointAlign = function(x,y,pos){
  589 + this.offset = 0;
  590 + this.align = euABSOLUTE;
  591 + this.position = pos;
  592 + this.setCenterPos(x,y);
  593 + }
  594 +
  595 + this.setObjectAlign = function(idObj,align,offset,pos){
  596 + this.offset = offset;
  597 + this.align = euOBJECT;
  598 + this.objectAlign = align;
  599 + this.position = pos;
  600 + this.idObjectHook = document.getElementById(idObj);
  601 + this.setObjectCoord();
  602 + };
  603 +
  604 + this.setObjectCoord = function(){
  605 + var tempx,tempy;
  606 + if (this.objectAlign==euDOWN){
  607 + tempx = euIdObjLeft(this.idObjectHook) + (this.idObjectHook.offsetWidth/2);
  608 + tempy = euIdObjTop(this.idObjectHook) + this.idObjectHook.offsetHeight + this.offset
  609 + if(navm){
  610 + tempx = ((i3GEO.barraDeBotoes.MAXBOTOES * 30) / 2);
  611 + tempy = euIdObjTop(this.idObjectHook) + this.idObjectHook.offsetHeight + this.offset + 38;
  612 + }
  613 + this.setCenterPos(
  614 + tempx,
  615 + tempy
  616 + );
  617 + }
  618 + else if (this.objectAlign==euUP)
  619 + this.setCenterPos(
  620 + euIdObjLeft(this.idObjectHook) + (this.idObjectHook.offsetWidth/2),
  621 + euIdObjTop(this.idObjectHook) - this.offset);
  622 + else if (this.objectAlign==euLEFT)
  623 + this.setCenterPos(
  624 + euIdObjLeft(this.idObjectHook) - this.offset,
  625 + euIdObjTop(this.idObjectHook) + (this.idObjectHook.offsetHeight/2));
  626 + else if (this.objectAlign==euRIGHT)
  627 + this.setCenterPos(
  628 + euIdObjLeft(this.idObjectHook) + this.idObjectHook.offsetWidth + this.offset,
  629 + euIdObjTop(this.idObjectHook) + (this.idObjectHook.offsetHeight/2));
  630 + else if (this.objectAlign==euCENTER){
  631 + if (this.position==euUP || this.position==euDOWN || this.position==euHORIZONTAL)
  632 + this.setCenterPos(
  633 + euIdObjLeft(this.idObjectHook) + (this.idObjectHook.offsetWidth/2),
  634 + euIdObjTop(this.idObjectHook) + (this.idObjectHook.offsetHeight/2) - this.offset);
  635 + else
  636 + this.setCenterPos(
  637 + euIdObjLeft(this.idObjectHook) + (this.idObjectHook.offsetWidth/2) + this.offset,
  638 + euIdObjTop(this.idObjectHook) + (this.idObjectHook.offsetHeight/2));
  639 + }
  640 + };
  641 +
  642 + this.setScreenAlign = function(align,offset){
  643 + this.offset=offset;
  644 + this.align = euSCREEN;
  645 + if (align==euUP)
  646 + this.position=euDOWN;
  647 + else if (align==euDOWN)
  648 + this.position=euUP;
  649 + else if (align==euLEFT)
  650 + this.position=euRIGHT;
  651 + else if (align==euRIGHT)
  652 + this.position=euLEFT;
  653 + this.setScreenCoord();
  654 + };
  655 +
  656 + this.setScreenCoord = function(){
  657 + euDimensioni();
  658 + offsEut();
  659 + if (this.position==euDOWN)
  660 + this.setCenterPos(
  661 + euEnv.euScrOfX+euEnv.euFrameWidth/2,
  662 + euEnv.euScrOfY+this.offset);
  663 + else if (this.position==euUP)
  664 + this.setCenterPos(
  665 + euEnv.euScrOfX+euEnv.euFrameWidth/2,
  666 + euEnv.euScrOfY+euEnv.euFrameHeight-this.offset);
  667 + else if (this.position==euRIGHT)
  668 + this.setCenterPos(
  669 + euEnv.euScrOfX+this.offset,
  670 + euEnv.euScrOfY+euEnv.euFrameHeight/2);
  671 + else if (this.position==euLEFT)
  672 + this.setCenterPos(
  673 + euEnv.euScrOfX+euEnv.euFrameWidth-this.offset,
  674 + euEnv.euScrOfY+euEnv.euFrameHeight/2);
  675 + };
  676 +
  677 + this.refreshDiv = function(){
  678 + if (this.position==euDOWN){
  679 + this.setPos(this.centerPosX-this.getWidth()/2,this.centerPosY+this.iconOffset);
  680 + }else if (this.position==euUP){
  681 + this.setPos(this.centerPosX-this.getWidth()/2,this.centerPosY-this.getHeight()-this.iconOffset);
  682 + }else if (this.position==euRIGHT){
  683 + this.setPos(this.centerPosX+this.iconOffset,this.centerPosY-this.getHeight()/2);
  684 + }else if (this.position==euLEFT){
  685 + this.setPos(this.centerPosX-this.getWidth()-this.iconOffset,this.centerPosY-this.getHeight()/2);
  686 + }else if (this.position==euHORIZONTAL){
  687 + this.setPos(this.centerPosX-this.getWidth()/2,this.centerPosY-this.getHeight()/2+this.iconOffset);
  688 + }else if (this.position==euVERTICAL){
  689 + this.setPos(this.centerPosX-this.getWidth()/2+this.iconOffset,this.centerPosY-this.getHeight()/2);
  690 + }
  691 + if (this.bar){
  692 + if (this.position==euDOWN){
  693 + this.setBarPos(this.centerPosX-this.getWidth()/2,this.centerPosY);
  694 + }else if (this.position==euUP){
  695 + this.setBarPos(this.centerPosX-this.getWidth()/2,this.centerPosY-this.bar.getSize());
  696 + }else if (this.position==euRIGHT){
  697 + this.setBarPos(this.centerPosX,this.centerPosY-this.getHeight()/2);
  698 + }else if (this.position==euLEFT){
  699 + this.setBarPos(this.centerPosX-this.bar.getSize(),this.centerPosY-this.getHeight()/2);
  700 + }else if (this.position==euHORIZONTAL){
  701 + this.setBarPos(this.centerPosX-this.getWidth()/2,this.centerPosY-this.bar.getSize()/2);
  702 + }else if(this.position==euVERTICAL){
  703 + this.setBarPos(this.centerPosX-this.bar.getSize()/2,this.centerPosY-this.getHeight()/2);
  704 + }
  705 + }
  706 + }
  707 +
  708 + this.riposition = function(){
  709 + if (this.align == euSCREEN)
  710 + this.setScreenCoord();
  711 + else if (this.align == euOBJECT)
  712 + this.setObjectCoord();
  713 + };
  714 +
  715 + this.setCenterPos = function(x,y){
  716 + this.centerPosX = x;
  717 + this.centerPosY = y;
  718 + this.refreshDiv();
  719 + };
  720 +
  721 + this.setPos = function(x,y){
  722 + this.setPosX(x);
  723 + this.setPosY(y);
  724 + };
  725 +
  726 + this.setBarPos = function(x,y){
  727 + this.setBarPosX(x);
  728 + this.setBarPosY(y);
  729 + };
  730 +
  731 + this.setDim = function(w,h){
  732 + this.setWidth(w);
  733 + this.setHeight(h);
  734 + };
  735 +
  736 +
  737 + this.setBarPosX = function(x) {document.getElementById(this.id+"_bar").style.left=x+'px';};
  738 + this.setBarPosY = function(y) {document.getElementById(this.id+"_bar").style.top=y+'px';};
  739 +
  740 + this.getPosX = function() {return document.getElementById(this.id).style.left.replace(/[^0-9]/g,"");};
  741 + this.setPosX = function(x) {document.getElementById(this.id).style.left=x+'px';};
  742 + this.getPosY = function() {return document.getElementById(this.id).style.top.replace(/[^0-9]/g,"");};
  743 + this.setPosY = function(y) {document.getElementById(this.id).style.top=y+'px';};
  744 + this.getWidth = function() {return document.getElementById(this.id).style.width.replace(/[^0-9]/g,"");};
  745 + this.setWidth = function(w){document.getElementById(this.id).style.width=Math.round(w)+'px';};
  746 + this.getHeight = function() {return document.getElementById(this.id).style.height.replace(/[^0-9]/g,"");};
  747 + this.setHeight = function(h){document.getElementById(this.id).style.height=Math.round(h)+'px';};
  748 +
  749 + this.getVenusWidth = function() {return this.venusHillSize*this.getWidth();};
  750 + this.getVenusHeight = function() {return this.venusHillSize*this.getHeight();};
  751 +
  752 + this.getMouseRelativeX = function(){return this.mouseX-euIdObjLeft(this.div);};
  753 + this.getMouseRelativeY = function(){return this.mouseY-euIdObjTop(this.div);};
  754 +
  755 + this.updateDims = function(){
  756 + var bakWidth = 0;
  757 + var bakHeight = 0;
  758 + for (var i in this.iconsArray) if (this.iconsArray[i].id){
  759 + if (this.position==euUP || this.position==euDOWN || this.position==euHORIZONTAL){
  760 + bakWidth += this.iconsArray[i].getWidth();
  761 + bakHeight = (this.iconsArray[i].getHeight()>bakHeight)?this.iconsArray[i].getHeight():bakHeight;
  762 + bakHeight = Math.round(bakHeight);
  763 + }else{
  764 + bakHeight += this.iconsArray[i].getHeight();
  765 + bakWidth = (this.iconsArray[i].getWidth()>bakWidth)?this.iconsArray[i].getWidth():bakWidth;
  766 + bakWidth = Math.round(bakWidth);
  767 + }
  768 + }
  769 +
  770 + if (this.bar){
  771 + if (this.position==euUP || this.position==euDOWN || this.position==euHORIZONTAL)
  772 + this.bar.setProperties(bakWidth,this.position)
  773 + else
  774 + this.bar.setProperties(bakHeight,this.position)
  775 + this.bar.refresh();
  776 + }
  777 +
  778 + //bakWidth=Math.ceil(bakWidth);
  779 + //bakHeight=Math.ceil(bakHeight);
  780 +
  781 + var posx=0;
  782 + var posy=0;
  783 + var updPosX=0;
  784 + var updPosY=0;
  785 + for (var i in this.iconsArray) if (this.iconsArray[i].id){
  786 + if (this.position==euDOWN){
  787 + updPosX=posx;
  788 + updPosY=posy;
  789 + posx+=this.iconsArray[i].getWidth();
  790 + }else if (this.position==euUP){
  791 + updPosX=posx;
  792 + updPosY=bakHeight-this.iconsArray[i].getHeight();
  793 + posx+=this.iconsArray[i].getWidth();
  794 + }else if (this.position==euRIGHT){
  795 + updPosX=posx;
  796 + updPosY=posy;
  797 + posy+=this.iconsArray[i].getHeight();
  798 + }else if (this.position==euLEFT){
  799 + updPosX=bakWidth-this.iconsArray[i].getWidth();
  800 + updPosY=posy;
  801 + posy+=this.iconsArray[i].getHeight();
  802 + }else if (this.position==euHORIZONTAL){
  803 + updPosX=posx;
  804 + updPosY=(bakHeight-this.iconsArray[i].getHeight())/2;
  805 + posx+=this.iconsArray[i].getWidth();
  806 + }else if (this.position==euVERTICAL){
  807 + updPosX=(bakWidth-this.iconsArray[i].getWidth())/2;
  808 + updPosY=posy;
  809 + posy+=this.iconsArray[i].getHeight();
  810 + }
  811 + this.iconsArray[i].setPos(updPosX,updPosY);
  812 + this.iconsArray[i].refresh();
  813 +
  814 + }
  815 +
  816 + this.setDim(bakWidth,bakHeight);
  817 + this.refreshDiv();
  818 + };
  819 +
  820 + this.kernel = function(){
  821 + if (this.isInside)
  822 + return this.kernelMouseOver();
  823 + else
  824 + return this.kernelMouseOut();
  825 + };
  826 +
  827 + this.kernelMouseOver = function(){
  828 + var ret=false;
  829 + var overI = -1;
  830 + var mouseRelX = this.getMouseRelativeX();
  831 + var mouseRelY = this.getMouseRelativeY();
  832 + var mediana;
  833 + var border;
  834 + var frameTo;
  835 + var venusWidth;
  836 + var venusHeight;
  837 + var overIcon;
  838 + var temp;
  839 + if (this.position==euUP || this.position==euDOWN || this.position==euHORIZONTAL){
  840 + venusWidth = this.getVenusWidth();
  841 + for (var i in this.iconsArray) if (this.iconsArray[i].id)
  842 + if (this.iconsArray[i].isInsideX(mouseRelX)){
  843 + overIcon=i;
  844 + border=this.iconsArray[i].getWidth()/2;
  845 + if (this.animaition==euICON){
  846 + mouseRelX = this.iconsArray[i].posX+border;
  847 + border=0;
  848 + }
  849 + try{
  850 + temp = $i(this.iconsArray[i].elementsArray[0].id);
  851 + if(temp)
  852 + {i3GEO.barraDeBotoes.mostraJanela(temp,this.iconsArray[i].dica);}
  853 + }
  854 + catch(e){}
  855 + }
  856 + for (var i in this.iconsArray) if (this.iconsArray[i].id){
  857 + mediana = this.iconsArray[i].posX+this.iconsArray[i].getWidth()/2;
  858 + if (Math.abs(mediana-mouseRelX)<=border)
  859 + mediana=mouseRelX;
  860 + else if (mediana<mouseRelX)
  861 + mediana+=this.iconsArray[i].getWidth()/2;
  862 + else if (mediana>mouseRelX)
  863 + mediana-=this.iconsArray[i].getWidth()/2;
  864 + if (this.animaition==euICON && Math.abs(i-overIcon)<=this.venusHillSize)
  865 + frameTo = this.venusHillTrans(1-Math.abs(i-overIcon)/this.venusHillSize);
  866 + else if (this.animaition==euMOUSE && Math.abs(mediana-mouseRelX)<=venusWidth)
  867 + frameTo = this.venusHillTrans(1-Math.abs(mediana-mouseRelX)/venusWidth);
  868 + else
  869 + frameTo = 0;
  870 +
  871 + if (frameTo==0 || frameTo==1 || Math.abs(frameTo-this.iconsArray[i].frame)>0.01)
  872 + ret|=this.iconsArray[i].setFrameTo(frameTo);
  873 +
  874 + if (this.animFading==euABSOLUTE)
  875 + if (this.iconsArray[i].isInsideX(mouseRelX))
  876 + ret|=this.iconsArray[i].setFadingTo(1);
  877 + else
  878 + ret|=this.iconsArray[i].setFadingTo(0);
  879 + else
  880 + ret|=this.iconsArray[i].setFadingTo(frameTo);
  881 +
  882 + }
  883 + }else{
  884 + venusHeight = this.getVenusHeight();
  885 + for (var i in this.iconsArray) if (this.iconsArray[i].id)
  886 + if (this.iconsArray[i].isInsideY(mouseRelY)){
  887 + overIcon=i;
  888 + border=this.iconsArray[i].getHeight()/2;
  889 + if (this.animaition==euICON){
  890 + mouseRelY = this.iconsArray[i].posY+border;
  891 + border=0;
  892 + }
  893 + }
  894 + for (var i in this.iconsArray) if (this.iconsArray[i].id){
  895 + mediana = this.iconsArray[i].posY+this.iconsArray[i].getHeight()/2;
  896 + if (Math.abs(mediana-mouseRelY)<=border)
  897 + mediana=mouseRelY;
  898 + else if (mediana<mouseRelY)
  899 + mediana+=this.iconsArray[i].getHeight()/2;
  900 + else if (mediana>mouseRelY)
  901 + mediana-=this.iconsArray[i].getHeight()/2;
  902 + if (this.animaition==euICON && Math.abs(i-overIcon)<=this.venusHillSize)
  903 + frameTo = this.venusHillTrans(1-Math.abs(i-overIcon)/this.venusHillSize);
  904 + else if (this.animaition==euMOUSE && Math.abs(mediana-mouseRelY)<=venusHeight)
  905 + frameTo = this.venusHillTrans(1-Math.abs(mediana-mouseRelY)/venusHeight);
  906 + else
  907 + frameTo = 0;
  908 +
  909 + if (frameTo==0 || frameTo==1 || Math.abs(frameTo-this.iconsArray[i].frame)>0.01)
  910 + ret|=this.iconsArray[i].setFrameTo(frameTo);
  911 +
  912 + if (this.animFading==euABSOLUTE)
  913 + if (this.iconsArray[i].isInsideY(mouseRelY))
  914 + ret|=this.iconsArray[i].setFadingTo(1);
  915 + else
  916 + ret|=this.iconsArray[i].setFadingTo(0);
  917 + else
  918 + ret|=this.iconsArray[i].setFadingTo(frameTo);
  919 +
  920 + }
  921 + }
  922 + if (ret)
  923 + this.updateDims();
  924 + return ret;
  925 + };
  926 +
  927 + this.kernelMouseOut = function(){
  928 + //i3GEO.barraDeBotoes.mostraJanela("","");
  929 + var ret=false;
  930 + for (var i in this.iconsArray){
  931 + if (this.iconsArray[i].id)
  932 + ret|=this.iconsArray[i].setAllFrameTo(0);
  933 + if (ret){
  934 + this.updateDims();
  935 + }
  936 + }
  937 + return ret;
  938 + };
  939 +
  940 + this.mouseOut = function(){
  941 + this.isInside=false;
  942 + euEnv.exeThreadWhiteLoop=5;
  943 + };
  944 +
  945 + this.mouseOver = function(){
  946 + this.isInside=true;
  947 + euEnv.exeThreadWhiteLoop=5;
  948 + };
  949 +
  950 + this.mouseMove = function(x,y){
  951 + var inside = isEuInside(this.div,x,y);
  952 + var ret = (this.mouseX!=x || this.mouseY!=y) && inside;
  953 +
  954 + this.mouseX=x;
  955 + this.mouseY=y;
  956 +
  957 +
  958 + if (inside!=this.isInside){
  959 + this.isInside=inside;
  960 + ret=true;
  961 + }
  962 +
  963 + for (var i in this.iconsArray) if (this.iconsArray[i].id)
  964 + ret|=this.iconsArray[i].isRunning();
  965 + return ret;
  966 + };
  967 +
  968 + this.iconParams=new Array();
  969 + this.setAllFrameStep = function(step){
  970 + this.iconParams.frameStep=step;
  971 + for (var i in this.iconsArray) if (this.iconsArray[i].id)
  972 + this.iconsArray[i].frameStep=step;
  973 + };
  974 +
  975 + this.setAllZoomFunc = function(func){
  976 + this.setAllZoomFuncW(func);
  977 + this.setAllZoomFuncH(func);
  978 + };
  979 +
  980 + this.setAllZoomFuncW = function(func){
  981 + this.iconParams.zoomFuncW=func;
  982 + for (var i in this.iconsArray) if (this.iconsArray[i].id)
  983 + this.iconsArray[i].zoomFuncW=func;
  984 + };
  985 +
  986 + this.setAllZoomFuncH = function(func){
  987 + this.iconParams.zoomFuncH=func;
  988 + for (var i in this.iconsArray) if (this.iconsArray[i].id)
  989 + this.iconsArray[i].zoomFuncH=func;
  990 + };
  991 +
  992 + this.setBar = function(args){
  993 + var id = 'euDock_bar_'+euEnv.Kost.next();
  994 + euEnv.euDockArray[id] = new euDockBar(id,this);
  995 + euEnv.euDockArray[id].setElements(args);
  996 + this.bar=euEnv.euDockArray[id];
  997 + return euEnv.euDockArray[id];
  998 + };
  999 +
  1000 + this.addIcon = function(args,params){
  1001 + //if(!id)
  1002 + //{var id = 'euDock_icon_'+euEnv.Kost.next();}
  1003 + var id = params.id;
  1004 + var id = 'euDock_icon_'+euEnv.Kost.next();
  1005 + euEnv.euDockArray[id] = new euDockIcon(id,this);
  1006 + euEnv.euDockArray[id].addElement(args);
  1007 + this.iconsArray.push(euEnv.euDockArray[id]);
  1008 + for (i in this.iconParams)
  1009 + euEnv.euDockArray[id][i]=this.iconParams[i];
  1010 + for (i in params)
  1011 + euEnv.euDockArray[id][i]=params[i];
  1012 +
  1013 + return euEnv.euDockArray[id];
  1014 + };
  1015 +
  1016 + this.delIcon = function(elem) {
  1017 + euEnv.euDockArray.splice(elem);
  1018 + euEnv.euDockArray[elem.id]=0;
  1019 + for (var i in this.iconsArray) if (this.iconsArray[i] == elem)
  1020 + this.iconsArray.splice(i,1);
  1021 + elem.destroy();
  1022 + elem=null;
  1023 + this.updateDims();
  1024 + };
  1025 +
  1026 + };
  1027 +/*
  1028 + ****************************************
  1029 + ****** euDock Object *******
  1030 + ****** (END) *******
  1031 + ****************************************
  1032 + */
  1033 +
  1034 +/*
  1035 + ****************************************
  1036 + ****** euDock Icon Object *******
  1037 + ****** (START) *******
  1038 + ****************************************
  1039 + */
  1040 + function euDockIcon(id,dock){
  1041 + this.id = id;
  1042 +
  1043 + this.parentDock = dock;
  1044 +
  1045 + this.elementsArray;
  1046 +
  1047 + this.zoomFuncW=euLinear30;
  1048 + this.zoomFuncH=euLinear30;
  1049 +
  1050 + this.posX = 0;
  1051 + this.posY = 0;
  1052 + this.width = 0;
  1053 + this.height = 0;
  1054 + this.frame = 0;
  1055 + this.frameStep = 0.5;
  1056 + this.fadingFrame = 0;
  1057 + this.fadingStep = 1;
  1058 + this.fadingType = euTRANSPARENT;
  1059 +
  1060 + this.loaded = false;
  1061 + this.runningFrame = false;
  1062 + this.runningFading = false;
  1063 +
  1064 + this.updateDims = function(){
  1065 + if (!this.loaded)return;
  1066 +
  1067 + for (var i=0;i<this.elementsArray.length;i++)
  1068 + this.elementsArray[i].setProperties(this.posX,this.posY,this.getWidth(),this.getHeight());
  1069 + };
  1070 +
  1071 + this.updateFading = function(){
  1072 + if (!this.loaded)return;
  1073 + var stato = this.fadingFrame*(this.elementsArray.length-1);
  1074 + var prev = Math.floor(stato);
  1075 + var next = Math.ceil( stato);
  1076 + var fading=0;
  1077 + for (var i=0;i<this.elementsArray.length;i++){
  1078 + if (this.fadingType==euFIXED){
  1079 + if (i==next)
  1080 + fading=100-100*(i-stato);
  1081 + else if (i<next)
  1082 + fading=100;
  1083 + else
  1084 + fading=0;
  1085 + }else{
  1086 + if (i==next)
  1087 + fading=100-100*(i-stato);
  1088 + else if (i==prev){
  1089 + if (this.fadingType==euTRANSPARENT)
  1090 + fading=100-100*(stato-i);
  1091 + else
  1092 + fading=100;
  1093 + }else
  1094 + fading=0;
  1095 + }
  1096 + this.elementsArray[i].setFading(fading);
  1097 + }
  1098 + };
  1099 +
  1100 + this.refresh = function(){
  1101 + this.updateDims();
  1102 + this.updateFading();
  1103 + };
  1104 +
  1105 + this.isAbsoluteInside = function(x,y){
  1106 + x-=this.getAbsolutePosX();
  1107 + y-=this.getAbsolutePosY();
  1108 + return x>0 && y>0 && x<this.getWidth() && y<this.getHeight();
  1109 + };
  1110 +
  1111 + this.isInside = function(x,y){
  1112 + return this.isInsideX(x) && this.isInsideY(y);
  1113 + };
  1114 +
  1115 + this.isInsideX = function(x){
  1116 + return (this.loaded && (this.posX<=x) && ((this.posX+this.getWidth())>=x));
  1117 + };
  1118 +
  1119 + this.isInsideY = function(y){
  1120 + return (this.loaded && (this.posY<=y) && ((this.posY+this.getHeight())>=y));
  1121 + };
  1122 +
  1123 + this.retrieveLoadingDims = function(elem,num){
  1124 + if (elem.onLoadPrev)
  1125 + elem.onLoadPrev();
  1126 + if (num==0 && !this.loaded)
  1127 + this.setDim(elem.getWidth(),elem.getHeight());
  1128 + elem.loaded=true;
  1129 + var ret=true;
  1130 + for (var i in this.elementsArray) if (this.elementsArray[i].id)
  1131 + ret&=this.elementsArray[i].loaded
  1132 + this.loaded=ret;
  1133 + if (this.loaded){
  1134 + this.parentDock.updateDims();
  1135 + for (var i in this.elementsArray) if (this.elementsArray[i].id)
  1136 + this.elementsArray[i].show();
  1137 + }
  1138 + if (elem.onLoadNext)
  1139 + elem.onLoadNext();
  1140 + };
  1141 +
  1142 + this.setPos = function(x,y){
  1143 + this.posX = x;
  1144 + this.posY = y;
  1145 + };
  1146 +
  1147 + this.setDim = function(w,h){
  1148 + if (this.width==0)
  1149 + this.width = w;
  1150 + if (this.height==0)
  1151 + this.height = h;
  1152 + };
  1153 +
  1154 + this.getAbsolutePosX = function(){return euIdObjLeft(this.parentDock.div)+this.posX;};
  1155 + this.getAbsolutePosY = function(){return euIdObjTop(this.parentDock.div)+this.posY;};
  1156 +
  1157 + this.setPosX = function(x) {this.posX=x;};
  1158 + this.setPosY = function(y) {this.posY=y;};
  1159 + this.getWidth = function() {
  1160 + if (!this.loaded)return 0;
  1161 + var calc = this.width*this.zoomFuncW(this.frame);
  1162 + //calc -= 5;
  1163 + if (calc < 38)
  1164 + {calc = 38;}
  1165 + return calc;
  1166 + };
  1167 + this.getHeight = function() {
  1168 + if (!this.loaded)return 0;
  1169 + var calc = this.height*this.zoomFuncH(this.frame);
  1170 + //calc -= 5;
  1171 + if (calc < 38)
  1172 + {calc = 38;}
  1173 + return calc;
  1174 + };
  1175 +
  1176 + this.isRunning = function(){
  1177 + return this.runningFrame || this.runningFading;
  1178 + };
  1179 +
  1180 + this.setAllFrameTo = function(to){
  1181 + this.setFadingTo(to);
  1182 + this.setFrameTo(to) ;
  1183 + return this.isRunning();
  1184 + };
  1185 +
  1186 + this.setFadingTo = function(fadingTo){
  1187 + if (this.fadingFrame==fadingTo)
  1188 + this.runningFading = false;
  1189 + else{
  1190 + if (this.fadingFrame>fadingTo)
  1191 + this.fadingFrame-=this.fadingStep;
  1192 + else
  1193 + this.fadingFrame+=this.fadingStep;
  1194 +
  1195 + this.runningFading = true;
  1196 +
  1197 + if (Math.abs(this.fadingFrame-fadingTo)<this.fadingStep)
  1198 + this.fadingFrame=fadingTo;
  1199 +
  1200 + if (this.fadingFrame<0)
  1201 + this.fadingFrame = 0;
  1202 + if (this.fadingFrame>1)
  1203 + this.fadingFrame = 1;
  1204 + }
  1205 + return this.runningFading;
  1206 + };
  1207 +
  1208 + this.setFrameTo = function(frameTo){
  1209 + //frameTo=(Math.round(frameTo*100))/100;
  1210 + if (this.frame==frameTo)
  1211 + this.runningFrame = false;
  1212 + else{
  1213 + this.runningFrame = true;
  1214 +
  1215 + this.frame+=(frameTo-this.frame)*this.frameStep;
  1216 +
  1217 + if (Math.abs(this.frame-frameTo)<0.01)
  1218 + this.frame=frameTo;
  1219 +
  1220 +
  1221 + if (this.frame<0)
  1222 + this.frame = 0;
  1223 + if (this.frame>1)
  1224 + this.frame = 1;
  1225 + }
  1226 + return this.runningFrame;
  1227 + };
  1228 +
  1229 + this.addElement = function(args){
  1230 + if (typeof(args)!="undefined" && args!=null){
  1231 + this.elementsArray=new Array();
  1232 + this.fadingStep = 0.5/args.length;
  1233 +
  1234 + for (var i=0;i<args.length;i++)
  1235 + for (var ii in args[i]){
  1236 + var id = "euDock_"+ii+"_"+euEnv.Kost.next();
  1237 + euEnv.euDockArray[id]= new window[ii](id,args[i][ii],this.parentDock.div,"euEnv.euDockArray."+this.id+".retrieveLoadingDims(euEnv.euDockArray."+id+","+i+");");
  1238 + this.elementsArray.push(euEnv.euDockArray[id]);
  1239 + euEnv.euDockArray[id].loaded=false;
  1240 + }
  1241 + }
  1242 + };
  1243 +
  1244 + this.destroy = function() {
  1245 + for (var i in this.elementsArray) if (this.elementsArray[i].id){
  1246 + euEnv.euDockArray[this.elementsArray[i].id]=0;
  1247 + euEnv.euDockArray.splice(this.elementsArray[i],1);
  1248 + this.elementsArray[i].destroy();
  1249 + }
  1250 + this.elementsArray.splice(0,this.elementsArray.length);
  1251 + };
  1252 +
  1253 + this.mouseClick = function(x,y){
  1254 + if (this.isAbsoluteInside(x,y)){
  1255 + if (this.link)
  1256 + if (this.target){
  1257 + if (top.frames[this.target])
  1258 + top.frames[this.target].location.href=this.link;
  1259 + else
  1260 + top.frames[this.target] = window.open(this.link,this.target,"");
  1261 + }else
  1262 + document.location.href=this.link;
  1263 + else if (this.mouseInsideClick)
  1264 + this.mouseInsideClick(x,y,this.id,this.getAbsolutePosX(),this.getAbsolutePosY());
  1265 + }
  1266 + };
  1267 +
  1268 + };
  1269 +/*
  1270 + ****************************************
  1271 + ****** euDock Icon Object *******
  1272 + ****** (END) *******
  1273 + ****************************************
  1274 + */
  1275 +
  1276 + /*
  1277 + ****************************************
  1278 + ****** euDock Bar Object *******
  1279 + ****** (START) *******
  1280 + ****************************************
  1281 + */
  1282 + function euDockBar(id,dock){
  1283 + this.id = id;
  1284 +
  1285 + this.parentDock = dock;
  1286 +
  1287 + this.elementsArray=new Array();
  1288 +
  1289 + this.len=0;
  1290 + this.align=euUP;
  1291 +
  1292 + this.loaded = false;
  1293 +
  1294 + this.getSize = function(){
  1295 + if (!this.loaded)
  1296 + return 0;
  1297 + if (this.align==euUP || this.align==euDOWN || this.align==euHORIZONTAL)
  1298 + return this.elementsArray.left.getHeight();
  1299 + else
  1300 + return this.elementsArray.top.getWidth();
  1301 + };
  1302 +
  1303 + this.refresh = function(){
  1304 + if (!this.loaded)
  1305 + return;
  1306 + if (this.align==euUP || this.align==euDOWN || this.align==euHORIZONTAL){
  1307 + this.elementsArray.left.setPos(-this.elementsArray.left.getWidth(),0);
  1308 + this.elementsArray.horizontal.setProperties(0,0,Math.round(this.len),this.getSize());
  1309 + this.elementsArray.right.setPos(Math.round(this.len),0);
  1310 + this.elementsArray.left.show();
  1311 + this.elementsArray.horizontal.show();
  1312 + this.elementsArray.right.show();
  1313 + if (this.elementsArray.top)
  1314 + this.elementsArray.top.hide();
  1315 + if (this.elementsArray.bottom)
  1316 + this.elementsArray.bottom.hide();
  1317 + if (this.elementsArray.vertical){
  1318 + this.elementsArray.vertical.setProperties(0,0,0,0);
  1319 + this.elementsArray.vertical.hide();
  1320 + }
  1321 + }else{
  1322 + this.elementsArray.top.setPos(0,-this.elementsArray.top.getHeight());
  1323 + this.elementsArray.vertical.setProperties(0,0,this.getSize(),Math.round(this.len));
  1324 + this.elementsArray.bottom.setPos(0,Math.round(this.len));
  1325 + this.elementsArray.top.show();
  1326 + this.elementsArray.vertical.show();
  1327 + this.elementsArray.bottom.show();
  1328 + if (this.elementsArray.left)
  1329 + this.elementsArray.left.hide();
  1330 + if (this.elementsArray.right)
  1331 + this.elementsArray.right.hide();
  1332 + if (this.elementsArray.horizontal){
  1333 + this.elementsArray.horizontal.setProperties(0,0,0,0);
  1334 + this.elementsArray.horizontal.hide();
  1335 + }
  1336 + }
  1337 +
  1338 + };
  1339 +
  1340 + this.setProperties = function(len,align){
  1341 + this.len=len+1;
  1342 + this.align=align;
  1343 + this.refresh();
  1344 + };
  1345 +
  1346 + this.retrieveLoadingDims = function(elem){
  1347 + if (elem.onLoadPrev)
  1348 + elem.onLoadPrev();
  1349 + elem.loaded=true;
  1350 + var ret=true;
  1351 + for (var i in this.elementsArray) if (this.elementsArray[i].id)
  1352 + ret&=this.elementsArray[i].loaded
  1353 + this.loaded=ret;
  1354 + if (this.loaded){
  1355 + this.parentDock.updateDims();
  1356 + for (var i in this.elementsArray) if (this.elementsArray[i].id)
  1357 + this.elementsArray[i].show();
  1358 + }
  1359 + if (elem.onLoadNext)
  1360 + elem.onLoadNext();
  1361 + };
  1362 +
  1363 + this.setElements = function(args){
  1364 + if (typeof(args)!="undefined" && args!=null){
  1365 + for (var i in args)
  1366 + for (var ii in args[i]){
  1367 + var id = "euDock_"+ii+"_"+euEnv.Kost.next();
  1368 + //if (this.elementsArray[i]){
  1369 + // this.elementsArray[i].hide();
  1370 + // euEnv.euDockArray[this.elementsArray[i].id]=null;
  1371 + //}
  1372 + euEnv.euDockArray[id]=new window[ii](id,args[i][ii],this.parentDock.divBar,"euEnv.euDockArray."+this.id+".retrieveLoadingDims(euEnv.euDockArray."+id+");");
  1373 + this.elementsArray[i]=euEnv.euDockArray[id];
  1374 + euEnv.euDockArray[id].loaded=false;
  1375 + }
  1376 + }
  1377 + };
  1378 + };
  1379 +/*
  1380 + ****************************************
  1381 + ****** euDock Bar Object *******
  1382 + ****** (END) *******
  1383 + ****************************************
  1384 + */
  1385 +function euThread(){
  1386 + euDimensioni();
  1387 + offsEut();
  1388 + euEnv.timeout=window.setTimeout("euThread();",euEnv.refreshTime);
  1389 +
  1390 + euEnv.exeThread = false;
  1391 + if (euEnv.mouseMoved)
  1392 + for (var i in euEnv.euDockArray)
  1393 + if (euEnv.euDockArray[i].mouseMove)
  1394 + euEnv.exeThread |= euEnv.euDockArray[i].mouseMove(euEnv.euScrOfX+euEnv.x,euEnv.euScrOfY+euEnv.y);
  1395 + euEnv.mouseMoved=false;
  1396 + if (euEnv.exeThread)
  1397 + euEnv.exeThreadWhiteLoop=5;
  1398 +
  1399 + if(euEnv.exeThreadWhiteLoop>0)
  1400 + euKernel();
  1401 +
  1402 + for (var i in euEnv.euDockArray)
  1403 + if (euEnv.euDockArray[i].riposition)
  1404 + euEnv.euDockArray[i].riposition();
  1405 +};
  1406 +
  1407 +function euKernel(){
  1408 + euEnv.exeThread = false;
  1409 + for (var i in euEnv.euDockArray)
  1410 + if (euEnv.euDockArray[i].kernel)
  1411 + euEnv.exeThread |= euEnv.euDockArray[i].kernel();
  1412 +
  1413 + if (euEnv.exeThread)
  1414 + euEnv.exeThreadWhiteLoop=5;
  1415 + else
  1416 + euEnv.exeThreadWhiteLoop--;
  1417 +};
  1418 +
  1419 +function on_MouseMove(e) {
  1420 + if (!e) var e = window.event;
  1421 + euEnv.x = e.clientX;
  1422 + euEnv.y = e.clientY;
  1423 + euEnv.mouseMoved = true;
  1424 + if (euEnv.onmousemoveBK)
  1425 + return euEnv.onmousemoveBK(e);
  1426 + return true;
  1427 +};
  1428 +
  1429 +function on_MouseDown(e) {
  1430 + if (!e) var e = window.event;
  1431 + for (var i in euEnv.euDockArray)
  1432 + if (euEnv.euDockArray[i].mouseDown)
  1433 + euEnv.exeThread |= euEnv.euDockArray[i].mouseDown(euEnv.euScrOfX+e.clientX,euEnv.euScrOfY+e.clientY);
  1434 + if (euEnv.onmousedownBK)
  1435 + return euEnv.onmousedownBK(e);
  1436 + return true;
  1437 +};
  1438 +
  1439 +function on_MouseUp(e) {
  1440 + if (!e) var e = window.event;
  1441 + for (var i in euEnv.euDockArray)
  1442 + if (euEnv.euDockArray[i].mouseUp)
  1443 + euEnv.exeThread |= euEnv.euDockArray[i].mouseUp(euEnv.euScrOfX+e.clientX,euEnv.euScrOfY+e.clientY);
  1444 + if (euEnv.onmouseupBK)
  1445 + return euEnv.onmouseupBK(e);
  1446 + return true;
  1447 +};
  1448 +
  1449 +function on_MouseClick(e) {
  1450 + if (!e) var e = window.event;
  1451 + for (var i in euEnv.euDockArray)
  1452 + if (euEnv.euDockArray[i].mouseClick)
  1453 + euEnv.exeThread |= euEnv.euDockArray[i].mouseClick(euEnv.euScrOfX+e.clientX,euEnv.euScrOfY+e.clientY);
  1454 + if (euEnv.onclickBK)
  1455 + return euEnv.onclickBK(e);
  1456 + return true;
  1457 +};
  1458 +
  1459 +if (document.onmousemove)
  1460 + euEnv.onmousemoveBK = document.onmousemove;
  1461 +document.onmousemove = on_MouseMove;
  1462 +
  1463 +if (document.onmousedown)
  1464 + euEnv.onmousedownBK = document.onmousedown;
  1465 +document.onmousedown = on_MouseDown;
  1466 +
  1467 +if (document.onmouseup)
  1468 + euEnv.onmouseupBK = document.onmouseup;
  1469 +document.onmouseup = on_MouseUp;
  1470 +
  1471 +if (document.onclick)
  1472 + euEnv.onclickBK = document.onclick;
  1473 +document.onclick = on_MouseClick;
  1474 +
  1475 +euDimensioni();
  1476 +offsEut();
  1477 +euThread();
  1478 +
  1479 +
  1480 +
  1481 +/*
  1482 + * euDock.Image
  1483 + *
  1484 + * euDock 2.0.06 plugin
  1485 + *
  1486 + * Copyright (C) 2006 Parodi (Pier...) Eugenio <eudock@inwind.it>
  1487 + * http://eudock.jules.it
  1488 + *
  1489 + * This library is free software; you can redistribute it and/or
  1490 + * modify it under the terms of the GNU Lesser General Public
  1491 + * License as published by the Free Software Foundation; either
  1492 + * version 2.1 of the License, or (at your option) any later version.
  1493 + *
  1494 + * This library is distributed in the hope that it will be useful,
  1495 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  1496 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1497 + * Lesser General Public License for more details.
  1498 + *
  1499 + * You should have received a copy of the GNU Lesser General Public
  1500 + * License along with this library; if not, write to the Free Software
  1501 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  1502 + *
  1503 + */
  1504 +
  1505 + /*
  1506 + *
  1507 + * This program is absolutely free...
  1508 + * ...BUT...
  1509 + * If you modify(OR TRY TO DO THAT)this Source Code,
  1510 + * my SOUL will carry you some monstrous Nightmares
  1511 + *
  1512 + * Have a nice day
  1513 + * enjoy yourself.
  1514 + * Pier...
  1515 + *
  1516 + * (Sorry but I'm Italian not an American writer)
  1517 + * (...a day Maybe...)
  1518 + */
  1519 +
  1520 +
  1521 + function euPreloadImage(a) {
  1522 + var d=document;
  1523 + if(d.images){
  1524 + if(!d.p) d.p=new Array();
  1525 + d.p.push(new Image());
  1526 + d.p[d.p.length-1].src=a;
  1527 + }
  1528 + };
  1529 +
  1530 +if (!euEnv.imageBasePath)
  1531 + euEnv.imageBasePath = "./";
  1532 +/*
  1533 + ****************************************
  1534 + ****** euImage Object *******
  1535 + ****** (START) *******
  1536 + ****************************************
  1537 + */
  1538 + function euImage(id,args,container,onLoadFunc){
  1539 + if (!args.PngObjIE)
  1540 + args.PngObjIE=euImageIE_PNG;
  1541 + if (typeof( window.innerWidth ) != 'number' && args.image.toLowerCase().indexOf("png")!=-1)
  1542 + return new args.PngObjIE(id,args,container,onLoadFunc);
  1543 + this.id = id;
  1544 + //edmar
  1545 + //if(args.id !== undefined)
  1546 + //{this.id = args.id;}
  1547 + this.container = container;
  1548 +
  1549 + euPreloadImage(args.image);
  1550 +
  1551 + this.setProperties = function(x,y,w,h){
  1552 + this.setPos(x,y);
  1553 + this.setDim(w,h);
  1554 + };
  1555 +
  1556 + this.setPos = function(x,y){
  1557 + this.setPosX(x);
  1558 + this.setPosY(y);
  1559 + };
  1560 +
  1561 + this.setDim = function(w,h){
  1562 + this.setWidth(w);
  1563 + this.setHeight(h);
  1564 + };
  1565 +
  1566 + this.getPosX = function() {return document.getElementById(this.id).style.left.replace(/[^0-9]/g,"");};
  1567 + this.setPosX = function(x) {document.getElementById(this.id).style.left=x+'px';};
  1568 + this.getPosY = function() {return document.getElementById(this.id).style.top.replace(/[^0-9]/g,"");};
  1569 + this.setPosY = function(y) {document.getElementById(this.id).style.top=y+'px';};
  1570 + this.getWidth = function() {return document.getElementById(this.id).width;};
  1571 + this.setWidth = function(w){document.getElementById(this.id).width=Math.round(w);};
  1572 + this.getHeight = function() {return document.getElementById(this.id).height;};
  1573 + this.setHeight = function(h){document.getElementById(this.id).height=Math.round(h);};
  1574 +
  1575 + this.hide = function(){document.getElementById(this.id).style.visibility='hidden';};
  1576 + this.show = function(){document.getElementById(this.id).style.visibility='visible';};
  1577 +
  1578 + this.setFading = function(fad){
  1579 + fad=Math.round(fad);
  1580 + if (fad<0)
  1581 + fad=0;
  1582 + if (fad>100)
  1583 + fad=100;
  1584 + document.getElementById(this.id).style.opacity = (fad/100);
  1585 + document.getElementById(this.id).style.filter = "alpha(opacity="+(fad)+");";
  1586 + };
  1587 + //alert(id)
  1588 + this.container.innerHTML+="<img onLoad='"+onLoadFunc+";' id='"+this.id+"' src='"+args.image+"' style='position:absolute;visibility:hidden;'>";
  1589 +
  1590 + this.destroy = function(){
  1591 + this.container.removeChild(document.getElementById(this.id));
  1592 + };
  1593 + };
  1594 +/*
  1595 + ****************************************
  1596 + ****** euImage Object *******
  1597 + ****** (END) *******
  1598 + ****************************************
  1599 + */
  1600 +
  1601 + /*
  1602 + ****************************************
  1603 + ****** euImageIE_PNG Object *******
  1604 + ****** (START) *******
  1605 + ****************************************
  1606 + */
  1607 + function euImageIE_PNG(id,args,container,onLoadFunc){
  1608 + this.id = id;
  1609 + this.container = container;
  1610 +
  1611 + euPreloadImage(args.image);
  1612 +
  1613 + this.setProperties = function(x,y,w,h){
  1614 + this.setPos(x,y);
  1615 + this.setDim(w,h);
  1616 + };
  1617 +
  1618 + this.setPos = function(x,y){
  1619 + this.setPosX(x);
  1620 + this.setPosY(y);
  1621 + };
  1622 +
  1623 + this.setDim = function(w,h){
  1624 + this.setWidth(w);
  1625 + this.setHeight(h);
  1626 + };
  1627 +
  1628 + this.getPosX = function() {return document.getElementById(this.id).style.left.replace(/[^0-9]/g,"");};
  1629 + this.setPosX = function(x) {
  1630 + document.getElementById(this.id).style.left=x+'px';
  1631 + };
  1632 + this.getPosY = function() {return document.getElementById(this.id).style.top.replace(/[^0-9]/g,"");};
  1633 + this.setPosY = function(y) {
  1634 + document.getElementById(this.id).style.top=y+'px';
  1635 + };
  1636 +
  1637 +
  1638 + this.getWidth = function() {if (!this.width)return 0;return this.width;};
  1639 + this.setWidth = function(w){
  1640 + if (!this.width)return;
  1641 + this.width=Math.round(w);
  1642 + document.getElementById(this.id).style.width=Math.round(w)+'px';
  1643 + document.getElementById(this.id+"_IMG").style.width=Math.round(w)+'px';
  1644 + };
  1645 + this.getHeight = function() {if (!this.height)return 0;return this.height;};
  1646 + this.setHeight = function(h){
  1647 + if (!this.height)return;
  1648 + this.height=Math.round(h);
  1649 + document.getElementById(this.id).style.height=Math.round(h)+'px';
  1650 + document.getElementById(this.id+"_IMG").style.height=Math.round(h)+'px';
  1651 + };
  1652 +
  1653 + this.onLoadPrev = function(){
  1654 + if (this.width && this.height)return;
  1655 + this.width=document.getElementById(this.id+"_IMG_BAK").width;
  1656 + this.height=document.getElementById(this.id+"_IMG_BAK").height;
  1657 + document.getElementById(this.id+"_IMG_BAK").width=0;
  1658 + document.getElementById(this.id+"_IMG_BAK").height=0;
  1659 + this.setDim(this.width,this.height);
  1660 + };
  1661 +
  1662 + this.hide = function(){document.getElementById(this.id).style.visibility='hidden';};
  1663 + this.show = function(){document.getElementById(this.id).style.visibility='visible';if (this.width && this.height)this.setDim(this.width,this.height);};
  1664 +
  1665 + this.setFading = function(fad){
  1666 + fad=Math.round(fad);
  1667 + if (fad<0)
  1668 + fad=0;
  1669 + if (fad>100)
  1670 + fad=100;
  1671 + document.getElementById(this.id).style.opacity = (fad/100);
  1672 + document.getElementById(this.id).style.filter = "alpha(opacity="+(fad)+");";
  1673 + };
  1674 +
  1675 + this.container.innerHTML+="<div id='"+this.id+"' style='position:absolute;'></div>";
  1676 + document.getElementById(this.id).innerHTML= "<img src='"+euEnv.imageBasePath+"blank.gif' id='"+this.id+"_IMG' style=\"top:0px;left:0px;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+args.image+"',sizingMethod='scale');position:absolute;\">";
  1677 + this.container.innerHTML+="<img onLoad='"+onLoadFunc+";' id='"+this.id+"_IMG_BAK' src='"+args.image+"' style='visibility:hidden;position:absolute;'>";
  1678 +
  1679 + this.destroy = function(){
  1680 + this.container.removeChild(document.getElementById(this.id));
  1681 + this.container.removeChild(document.getElementById(this.id+"_IMG_BAK"));
  1682 + };
  1683 + };
  1684 +/*
  1685 + ****************************************
  1686 + ****** euImageIE_PNG Object *******
  1687 + ****** (END) *******
  1688 + ****************************************
  1689 + */
  1690 +
  1691 + /*
  1692 + ****************************************
  1693 + *****euImageNoFadingIE_PNG Object ******
  1694 + ****** (START) *******
  1695 + ****************************************
  1696 + */
  1697 + function euImageNoFadingIE_PNG(id,args,container,onLoadFunc){
  1698 + this.id = id;
  1699 + this.container = container;
  1700 +
  1701 + euPreloadImage(args.image);
  1702 +
  1703 + this.setProperties = function(x,y,w,h){
  1704 + this.setPos(x,y);
  1705 + this.setDim(w,h);
  1706 + };
  1707 +
  1708 + this.setPos = function(x,y){
  1709 + this.setPosX(x);
  1710 + this.setPosY(y);
  1711 + };
  1712 +
  1713 + this.setDim = function(w,h){
  1714 + this.setWidth(w);
  1715 + this.setHeight(h);
  1716 + };
  1717 +
  1718 + this.getPosX = function() {return document.getElementById(this.id).style.left.replace(/[^0-9]/g,"");};
  1719 + this.setPosX = function(x) {document.getElementById(this.id).style.left=x+'px';};
  1720 + this.getPosY = function() {return document.getElementById(this.id).style.top.replace(/[^0-9]/g,"");};
  1721 + this.setPosY = function(y) {document.getElementById(this.id).style.top=y+'px';};
  1722 +
  1723 + this.getWidth = function() {if (!this.width) return 0;return this.width;};
  1724 + this.setWidth = function(w){if (!this.width) return; this.width=Math.round(w);document.getElementById(this.id).style.width=Math.round(w)+'px';};
  1725 + this.getHeight = function(){if (!this.height)return 0;return this.height;};
  1726 + this.setHeight = function(h){if (!this.height)return; this.height=Math.round(h);document.getElementById(this.id).style.height=Math.round(h)+'px';};
  1727 +
  1728 + this.hide = function(){document.getElementById(this.id).style.visibility='hidden';};
  1729 + this.show = function(){document.getElementById(this.id).style.visibility='visible';};
  1730 +
  1731 + this.onLoadPrev = function(){
  1732 + if (this.width && this.height)return;
  1733 + this.width=document.getElementById(this.id+"_IMG_BAK").width;
  1734 + this.height=document.getElementById(this.id+"_IMG_BAK").height;
  1735 + document.getElementById(this.id+"_IMG_BAK").width=0;
  1736 + document.getElementById(this.id+"_IMG_BAK").height=0;
  1737 + this.setDim(this.width,this.height);
  1738 + };
  1739 +
  1740 + this.setFading = function(fad){};
  1741 +
  1742 + this.container.innerHTML+="<img src='"+euEnv.imageBasePath+"blank.gif' id='"+this.id+"' style='position:absolute;visibility:hidden;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\""+args.image+"\",sizingMethod=\"scale\");' >";
  1743 + this.container.innerHTML+="<img onLoad='"+onLoadFunc+";' id='"+this.id+"_IMG_BAK' src='"+args.image+"' style='position:absolute;visibility:hidden;'>";
  1744 +
  1745 + this.destroy = function(){
  1746 + this.container.removeChild(document.getElementById(this.id));
  1747 + this.container.removeChild(document.getElementById(this.id+"_IMG_BAK"));
  1748 + };
  1749 + };
  1750 +/*
  1751 + ****************************************
  1752 + *****euImageNoFadingIE_PNG Object ******
  1753 + ****** (END) *******
  1754 + ****************************************
  1755 + */
  1756 +
  1757 +
383 1758 <?php if(extension_loaded('zlib')){ob_end_flush();}?>
384 1759 \ No newline at end of file
... ...
css/i3geo45.css
... ... @@ -197,7 +197,6 @@ h1 {padding:.25em .5em;background-color:#ccc;}
197 197 { .inputsb {border:1px solid black} }
198 198  
199 199  
200   -
201 200 #abregoogleearth,#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
202 201 {margin:2px;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:24;height:24;z-index:1000;position:relative;}
203 202 #box1
... ... @@ -974,8 +973,7 @@ h1 {padding:.25em .5em;background-color:#ccc;}
974 973  
975 974 button{background:url(../imagens/tic2.png) 98% 50% no-repeat;}
976 975 #encolheFerramentas
977   -{background-image:URL('../imagens/encolhe.png');background-repeat: no-repeat;background-position:center;cursor:pointer;}
978   -ul {text-align:left;list-style-type:none;padding-left: 15px;margin-left:5px; margin-top:15px;}
  976 +{background-image:URL('../imagens/encolhe.png');background-repeat: no-repeat;background-position:center;cursor:pointer;}ul {text-align:left;list-style-type:none;padding-left: 15px;margin-left:5px; margin-top:15px;}
979 977 li {margin-top:-10px;margin-bottom:15px;}
980 978 .toc {margin-left: 15px;}
981 979 .details {margin-left: 5px;}
... ... @@ -992,7 +990,6 @@ th {font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 8pt;}
992 990 .ftable {padding-top:5px;padding-bottom:5px;padding-left:5px;padding-right:5px;}
993 991 input { font-size: 11px; }
994 992 select { font-size: 11px; }
995   -
996 993 /*
997 994 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
998 995 Code licensed under the BSD License:
... ... @@ -1000,36 +997,31 @@ http://developer.yahoo.net/yui/license.txt
1000 997 version: 2.7.0
1001 998 */
1002 999 .yui-skin-sam .yui-log{padding:1em;width:31em;background-color:#AAA;color:#000;border:1px solid black;font-family:monospace;font-size:77%;text-align:left;z-index:9000;}.yui-skin-sam .yui-log-container{position:absolute;top:1em;right:1em;}.yui-skin-sam .yui-log input{margin:0;padding:0;font-family:arial;font-size:100%;font-weight:normal;}.yui-skin-sam .yui-log .yui-log-btns{position:relative;float:right;bottom:.25em;}.yui-skin-sam .yui-log .yui-log-hd{margin-top:1em;padding:.5em;background-color:#575757;}.yui-skin-sam .yui-log .yui-log-hd h4{margin:0;padding:0;font-size:108%;font-weight:bold;color:#FFF;}.yui-skin-sam .yui-log .yui-log-bd{width:100%;height:20em;background-color:#FFF;border:1px solid gray;overflow:auto;}.yui-skin-sam .yui-log p{margin:1px;padding:.1em;}.yui-skin-sam .yui-log pre{margin:0;padding:0;}.yui-skin-sam .yui-log pre.yui-log-verbose{white-space:pre-wrap;white-space:-moz-pre-wrap !important;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;}.yui-skin-sam .yui-log .yui-log-ft{margin-top:.5em;}.yui-skin-sam .yui-log .yui-log-ft .yui-log-categoryfilters{}.yui-skin-sam .yui-log .yui-log-ft .yui-log-sourcefilters{width:100%;border-top:1px solid #575757;margin-top:.75em;padding-top:.75em;}.yui-skin-sam .yui-log .yui-log-filtergrp{margin-right:.5em;}.yui-skin-sam .yui-log .info{background-color:#A7CC25;}.yui-skin-sam .yui-log .warn{background-color:#F58516;}.yui-skin-sam .yui-log .error{background-color:#E32F0B;}.yui-skin-sam .yui-log .time{background-color:#A6C9D7;}.yui-skin-sam .yui-log .window{background-color:#F2E886;}
1003   -
1004 1000 /*
1005 1001 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
1006 1002 Code licensed under the BSD License:
1007 1003 http://developer.yahoo.net/yui/license.txt
1008 1004 version: 2.7.0
1009 1005 */
1010   -body{font:13px/1.231 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}select,input,button,textarea,button{font:99% arial,helvetica,clean,sans-serif;}table{font-size:inherit;font:100%;}pre,code,kbd,samp,tt{font-family:monospace;*font-size:108%;line-height:100%;}
1011   -/*
  1006 +body{font:13px/1.231 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}select,input,button,textarea,button{font:99% arial,helvetica,clean,sans-serif;}table{font-size:inherit;font:100%;}pre,code,kbd,samp,tt{font-family:monospace;*font-size:108%;line-height:100%;}/*
1012 1007 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
1013 1008 Code licensed under the BSD License:
1014 1009 http://developer.yahoo.net/yui/license.txt
1015 1010 version: 2.7.0
1016 1011 */
1017   -html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var,optgroup{font-style:inherit;font-weight:inherit;}del,ins{text-decoration:none;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:baseline;}sub{vertical-align:baseline;}legend{color:#000;}input,button,textarea,select,optgroup,option{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;}input,button,textarea,select{*font-size:100%;}body{font:13px/1.231 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}select,input,button,textarea,button{font:99% arial,helvetica,clean,sans-serif;}table{font-size:inherit;font:100%;}pre,code,kbd,samp,tt{font-family:monospace;*font-size:108%;line-height:100%;}body{text-align:center;}#doc,#doc2,#doc3,#doc4,.yui-t1,.yui-t2,.yui-t3,.yui-t4,.yui-t5,.yui-t6,.yui-t7{margin:auto;text-align:left;width:57.69em;*width:56.25em;}#doc2{width:73.076em;*width:71.25em;}#doc3{margin:auto 10px;width:auto;}#doc4{width:74.923em;*width:73.05em;}.yui-b{position:relative;}.yui-b{_position:static;}#yui-main .yui-b{position:static;}#yui-main,.yui-g .yui-u .yui-g{width:100%;}.yui-t1 #yui-main,.yui-t2 #yui-main,.yui-t3 #yui-main{float:right;margin-left:-25em;}.yui-t4 #yui-main,.yui-t5 #yui-main,.yui-t6 #yui-main{float:left;margin-right:-25em;}.yui-t1 .yui-b{float:left;width:12.30769em;*width:12.00em;}.yui-t1 #yui-main .yui-b{margin-left:13.30769em;*margin-left:13.05em;}.yui-t2 .yui-b{float:left;width:13.8461em;*width:13.50em;}.yui-t2 #yui-main .yui-b{margin-left:14.8461em;*margin-left:14.55em;}.yui-t3 .yui-b{float:left;width:23.0769em;*width:22.50em;}.yui-t3 #yui-main .yui-b{margin-left:24.0769em;*margin-left:23.62em;}.yui-t4 .yui-b{float:right;width:13.8456em;*width:13.50em;}.yui-t4 #yui-main .yui-b{margin-right:14.8456em;*margin-right:14.55em;}.yui-t5 .yui-b{float:right;width:18.4615em;*width:18.00em;}.yui-t5 #yui-main .yui-b{margin-right:19.4615em;*margin-right:19.125em;}.yui-t6 .yui-b{float:right;width:23.0769em;*width:22.50em;}.yui-t6 #yui-main .yui-b{margin-right:24.0769em;*margin-right:23.62em;}.yui-t7 #yui-main .yui-b{display:block;margin:0 0 1em 0;}#yui-main .yui-b{float:none;width:auto;}.yui-gb .yui-u,.yui-g .yui-gb .yui-u,.yui-gb .yui-g,.yui-gb .yui-gb,.yui-gb .yui-gc,.yui-gb .yui-gd,.yui-gb .yui-ge,.yui-gb .yui-gf,.yui-gc .yui-u,.yui-gc .yui-g,.yui-gd .yui-u{float:left;}.yui-g .yui-u,.yui-g .yui-g,.yui-g .yui-gb,.yui-g .yui-gc,.yui-g .yui-gd,.yui-g .yui-ge,.yui-g .yui-gf,.yui-gc .yui-u,.yui-gd .yui-g,.yui-g .yui-gc .yui-u,.yui-ge .yui-u,.yui-ge .yui-g,.yui-gf .yui-g,.yui-gf .yui-u{float:right;}.yui-g div.first,.yui-gb div.first,.yui-gc div.first,.yui-gd div.first,.yui-ge div.first,.yui-gf div.first,.yui-g .yui-gc div.first,.yui-g .yui-ge div.first,.yui-gc div.first div.first{float:left;}.yui-g .yui-u,.yui-g .yui-g,.yui-g .yui-gb,.yui-g .yui-gc,.yui-g .yui-gd,.yui-g .yui-ge,.yui-g .yui-gf{width:49.1%;}.yui-gb .yui-u,.yui-g .yui-gb .yui-u,.yui-gb .yui-g,.yui-gb .yui-gb,.yui-gb .yui-gc,.yui-gb .yui-gd,.yui-gb .yui-ge,.yui-gb .yui-gf,.yui-gc .yui-u,.yui-gc .yui-g,.yui-gd .yui-u{width:32%;margin-left:1.99%;}.yui-gb .yui-u{*margin-left:1.9%;*width:31.9%;}.yui-gc div.first,.yui-gd .yui-u{width:66%;}.yui-gd div.first{width:32%;}.yui-ge div.first,.yui-gf .yui-u{width:74.2%;}.yui-ge .yui-u,.yui-gf div.first{width:24%;}.yui-g .yui-gb div.first,.yui-gb div.first,.yui-gc div.first,.yui-gd div.first{margin-left:0;}.yui-g .yui-g .yui-u,.yui-gb .yui-g .yui-u,.yui-gc .yui-g .yui-u,.yui-gd .yui-g .yui-u,.yui-ge .yui-g .yui-u,.yui-gf .yui-g .yui-u{width:49%;*width:48.1%;*margin-left:0;}.yui-g .yui-g .yui-u{width:48.1%;}.yui-g .yui-gb div.first,.yui-gb .yui-gb div.first{*margin-right:0;*width:32%;_width:31.7%;}.yui-g .yui-gc div.first,.yui-gd .yui-g{width:66%;}.yui-gb .yui-g div.first{*margin-right:4%;_margin-right:1.3%;}.yui-gb .yui-gc div.first,.yui-gb .yui-gd div.first{*margin-right:0;}.yui-gb .yui-gb .yui-u,.yui-gb .yui-gc .yui-u{*margin-left:1.8%;_margin-left:4%;}.yui-g .yui-gb .yui-u{_margin-left:1.0%;}.yui-gb .yui-gd .yui-u{*width:66%;_width:61.2%;}.yui-gb .yui-gd div.first{*width:31%;_width:29.5%;}.yui-g .yui-gc .yui-u,.yui-gb .yui-gc .yui-u{width:32%;_float:right;margin-right:0;_margin-left:0;}.yui-gb .yui-gc div.first{width:66%;*float:left;*margin-left:0;}.yui-gb .yui-ge .yui-u,.yui-gb .yui-gf .yui-u{margin:0;}.yui-gb .yui-gb .yui-u{_margin-left:.7%;}.yui-gb .yui-g div.first,.yui-gb .yui-gb div.first{*margin-left:0;}.yui-gc .yui-g .yui-u,.yui-gd .yui-g .yui-u{*width:48.1%;*margin-left:0;}.yui-gb .yui-gd div.first{width:32%;}.yui-g .yui-gd div.first{_width:29.9%;}.yui-ge .yui-g{width:24%;}.yui-gf .yui-g{width:74.2%;}.yui-gb .yui-ge div.yui-u,.yui-gb .yui-gf div.yui-u{float:right;}.yui-gb .yui-ge div.first,.yui-gb .yui-gf div.first{float:left;}.yui-gb .yui-ge .yui-u,.yui-gb .yui-gf div.first{*width:24%;_width:20%;}.yui-gb .yui-ge div.first,.yui-gb .yui-gf .yui-u{*width:73.5%;_width:65.5%;}.yui-ge div.first .yui-gd .yui-u{width:65%;}.yui-ge div.first .yui-gd div.first{width:32%;}#hd:after,#bd:after,#ft:after,.yui-g:after,.yui-gb:after,.yui-gc:after,.yui-gd:after,.yui-ge:after,.yui-gf:after{content:".";display:block;height:0;clear:both;visibility:hidden;}#hd,#bd,#ft,.yui-g,.yui-gb,.yui-gc,.yui-gd,.yui-ge,.yui-gf{zoom:1;}
1018   -/*
  1012 +html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var,optgroup{font-style:inherit;font-weight:inherit;}del,ins{text-decoration:none;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:baseline;}sub{vertical-align:baseline;}legend{color:#000;}input,button,textarea,select,optgroup,option{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;}input,button,textarea,select{*font-size:100%;}body{font:13px/1.231 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}select,input,button,textarea,button{font:99% arial,helvetica,clean,sans-serif;}table{font-size:inherit;font:100%;}pre,code,kbd,samp,tt{font-family:monospace;*font-size:108%;line-height:100%;}body{text-align:center;}#doc,#doc2,#doc3,#doc4,.yui-t1,.yui-t2,.yui-t3,.yui-t4,.yui-t5,.yui-t6,.yui-t7{margin:auto;text-align:left;width:57.69em;*width:56.25em;}#doc2{width:73.076em;*width:71.25em;}#doc3{margin:auto 10px;width:auto;}#doc4{width:74.923em;*width:73.05em;}.yui-b{position:relative;}.yui-b{_position:static;}#yui-main .yui-b{position:static;}#yui-main,.yui-g .yui-u .yui-g{width:100%;}.yui-t1 #yui-main,.yui-t2 #yui-main,.yui-t3 #yui-main{float:right;margin-left:-25em;}.yui-t4 #yui-main,.yui-t5 #yui-main,.yui-t6 #yui-main{float:left;margin-right:-25em;}.yui-t1 .yui-b{float:left;width:12.30769em;*width:12.00em;}.yui-t1 #yui-main .yui-b{margin-left:13.30769em;*margin-left:13.05em;}.yui-t2 .yui-b{float:left;width:13.8461em;*width:13.50em;}.yui-t2 #yui-main .yui-b{margin-left:14.8461em;*margin-left:14.55em;}.yui-t3 .yui-b{float:left;width:23.0769em;*width:22.50em;}.yui-t3 #yui-main .yui-b{margin-left:24.0769em;*margin-left:23.62em;}.yui-t4 .yui-b{float:right;width:13.8456em;*width:13.50em;}.yui-t4 #yui-main .yui-b{margin-right:14.8456em;*margin-right:14.55em;}.yui-t5 .yui-b{float:right;width:18.4615em;*width:18.00em;}.yui-t5 #yui-main .yui-b{margin-right:19.4615em;*margin-right:19.125em;}.yui-t6 .yui-b{float:right;width:23.0769em;*width:22.50em;}.yui-t6 #yui-main .yui-b{margin-right:24.0769em;*margin-right:23.62em;}.yui-t7 #yui-main .yui-b{display:block;margin:0 0 1em 0;}#yui-main .yui-b{float:none;width:auto;}.yui-gb .yui-u,.yui-g .yui-gb .yui-u,.yui-gb .yui-g,.yui-gb .yui-gb,.yui-gb .yui-gc,.yui-gb .yui-gd,.yui-gb .yui-ge,.yui-gb .yui-gf,.yui-gc .yui-u,.yui-gc .yui-g,.yui-gd .yui-u{float:left;}.yui-g .yui-u,.yui-g .yui-g,.yui-g .yui-gb,.yui-g .yui-gc,.yui-g .yui-gd,.yui-g .yui-ge,.yui-g .yui-gf,.yui-gc .yui-u,.yui-gd .yui-g,.yui-g .yui-gc .yui-u,.yui-ge .yui-u,.yui-ge .yui-g,.yui-gf .yui-g,.yui-gf .yui-u{float:right;}.yui-g div.first,.yui-gb div.first,.yui-gc div.first,.yui-gd div.first,.yui-ge div.first,.yui-gf div.first,.yui-g .yui-gc div.first,.yui-g .yui-ge div.first,.yui-gc div.first div.first{float:left;}.yui-g .yui-u,.yui-g .yui-g,.yui-g .yui-gb,.yui-g .yui-gc,.yui-g .yui-gd,.yui-g .yui-ge,.yui-g .yui-gf{width:49.1%;}.yui-gb .yui-u,.yui-g .yui-gb .yui-u,.yui-gb .yui-g,.yui-gb .yui-gb,.yui-gb .yui-gc,.yui-gb .yui-gd,.yui-gb .yui-ge,.yui-gb .yui-gf,.yui-gc .yui-u,.yui-gc .yui-g,.yui-gd .yui-u{width:32%;margin-left:1.99%;}.yui-gb .yui-u{*margin-left:1.9%;*width:31.9%;}.yui-gc div.first,.yui-gd .yui-u{width:66%;}.yui-gd div.first{width:32%;}.yui-ge div.first,.yui-gf .yui-u{width:74.2%;}.yui-ge .yui-u,.yui-gf div.first{width:24%;}.yui-g .yui-gb div.first,.yui-gb div.first,.yui-gc div.first,.yui-gd div.first{margin-left:0;}.yui-g .yui-g .yui-u,.yui-gb .yui-g .yui-u,.yui-gc .yui-g .yui-u,.yui-gd .yui-g .yui-u,.yui-ge .yui-g .yui-u,.yui-gf .yui-g .yui-u{width:49%;*width:48.1%;*margin-left:0;}.yui-g .yui-g .yui-u{width:48.1%;}.yui-g .yui-gb div.first,.yui-gb .yui-gb div.first{*margin-right:0;*width:32%;_width:31.7%;}.yui-g .yui-gc div.first,.yui-gd .yui-g{width:66%;}.yui-gb .yui-g div.first{*margin-right:4%;_margin-right:1.3%;}.yui-gb .yui-gc div.first,.yui-gb .yui-gd div.first{*margin-right:0;}.yui-gb .yui-gb .yui-u,.yui-gb .yui-gc .yui-u{*margin-left:1.8%;_margin-left:4%;}.yui-g .yui-gb .yui-u{_margin-left:1.0%;}.yui-gb .yui-gd .yui-u{*width:66%;_width:61.2%;}.yui-gb .yui-gd div.first{*width:31%;_width:29.5%;}.yui-g .yui-gc .yui-u,.yui-gb .yui-gc .yui-u{width:32%;_float:right;margin-right:0;_margin-left:0;}.yui-gb .yui-gc div.first{width:66%;*float:left;*margin-left:0;}.yui-gb .yui-ge .yui-u,.yui-gb .yui-gf .yui-u{margin:0;}.yui-gb .yui-gb .yui-u{_margin-left:.7%;}.yui-gb .yui-g div.first,.yui-gb .yui-gb div.first{*margin-left:0;}.yui-gc .yui-g .yui-u,.yui-gd .yui-g .yui-u{*width:48.1%;*margin-left:0;}.yui-gb .yui-gd div.first{width:32%;}.yui-g .yui-gd div.first{_width:29.9%;}.yui-ge .yui-g{width:24%;}.yui-gf .yui-g{width:74.2%;}.yui-gb .yui-ge div.yui-u,.yui-gb .yui-gf div.yui-u{float:right;}.yui-gb .yui-ge div.first,.yui-gb .yui-gf div.first{float:left;}.yui-gb .yui-ge .yui-u,.yui-gb .yui-gf div.first{*width:24%;_width:20%;}.yui-gb .yui-ge div.first,.yui-gb .yui-gf .yui-u{*width:73.5%;_width:65.5%;}.yui-ge div.first .yui-gd .yui-u{width:65%;}.yui-ge div.first .yui-gd div.first{width:32%;}#hd:after,#bd:after,#ft:after,.yui-g:after,.yui-gb:after,.yui-gc:after,.yui-gd:after,.yui-ge:after,.yui-gf:after{content:".";display:block;height:0;clear:both;visibility:hidden;}#hd,#bd,#ft,.yui-g,.yui-gb,.yui-gc,.yui-gd,.yui-ge,.yui-gf{zoom:1;}/*
1019 1013 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
1020 1014 Code licensed under the BSD License:
1021 1015 http://developer.yahoo.net/yui/license.txt
1022 1016 version: 2.7.0
1023 1017 */
1024   -body{text-align:center;}#doc,#doc2,#doc3,#doc4,.yui-t1,.yui-t2,.yui-t3,.yui-t4,.yui-t5,.yui-t6,.yui-t7{margin:auto;text-align:left;width:57.69em;*width:56.25em;}#doc2{width:73.076em;*width:71.25em;}#doc3{margin:auto 10px;width:auto;}#doc4{width:74.923em;*width:73.05em;}.yui-b{position:relative;}.yui-b{_position:static;}#yui-main .yui-b{position:static;}#yui-main,.yui-g .yui-u .yui-g{width:100%;}.yui-t1 #yui-main,.yui-t2 #yui-main,.yui-t3 #yui-main{float:right;margin-left:-25em;}.yui-t4 #yui-main,.yui-t5 #yui-main,.yui-t6 #yui-main{float:left;margin-right:-25em;}.yui-t1 .yui-b{float:left;width:12.30769em;*width:12.00em;}.yui-t1 #yui-main .yui-b{margin-left:13.30769em;*margin-left:13.05em;}.yui-t2 .yui-b{float:left;width:13.8461em;*width:13.50em;}.yui-t2 #yui-main .yui-b{margin-left:14.8461em;*margin-left:14.55em;}.yui-t3 .yui-b{float:left;width:23.0769em;*width:22.50em;}.yui-t3 #yui-main .yui-b{margin-left:24.0769em;*margin-left:23.62em;}.yui-t4 .yui-b{float:right;width:13.8456em;*width:13.50em;}.yui-t4 #yui-main .yui-b{margin-right:14.8456em;*margin-right:14.55em;}.yui-t5 .yui-b{float:right;width:18.4615em;*width:18.00em;}.yui-t5 #yui-main .yui-b{margin-right:19.4615em;*margin-right:19.125em;}.yui-t6 .yui-b{float:right;width:23.0769em;*width:22.50em;}.yui-t6 #yui-main .yui-b{margin-right:24.0769em;*margin-right:23.62em;}.yui-t7 #yui-main .yui-b{display:block;margin:0 0 1em 0;}#yui-main .yui-b{float:none;width:auto;}.yui-gb .yui-u,.yui-g .yui-gb .yui-u,.yui-gb .yui-g,.yui-gb .yui-gb,.yui-gb .yui-gc,.yui-gb .yui-gd,.yui-gb .yui-ge,.yui-gb .yui-gf,.yui-gc .yui-u,.yui-gc .yui-g,.yui-gd .yui-u{float:left;}.yui-g .yui-u,.yui-g .yui-g,.yui-g .yui-gb,.yui-g .yui-gc,.yui-g .yui-gd,.yui-g .yui-ge,.yui-g .yui-gf,.yui-gc .yui-u,.yui-gd .yui-g,.yui-g .yui-gc .yui-u,.yui-ge .yui-u,.yui-ge .yui-g,.yui-gf .yui-g,.yui-gf .yui-u{float:right;}.yui-g div.first,.yui-gb div.first,.yui-gc div.first,.yui-gd div.first,.yui-ge div.first,.yui-gf div.first,.yui-g .yui-gc div.first,.yui-g .yui-ge div.first,.yui-gc div.first div.first{float:left;}.yui-g .yui-u,.yui-g .yui-g,.yui-g .yui-gb,.yui-g .yui-gc,.yui-g .yui-gd,.yui-g .yui-ge,.yui-g .yui-gf{width:49.1%;}.yui-gb .yui-u,.yui-g .yui-gb .yui-u,.yui-gb .yui-g,.yui-gb .yui-gb,.yui-gb .yui-gc,.yui-gb .yui-gd,.yui-gb .yui-ge,.yui-gb .yui-gf,.yui-gc .yui-u,.yui-gc .yui-g,.yui-gd .yui-u{width:32%;margin-left:1.99%;}.yui-gb .yui-u{*margin-left:1.9%;*width:31.9%;}.yui-gc div.first,.yui-gd .yui-u{width:66%;}.yui-gd div.first{width:32%;}.yui-ge div.first,.yui-gf .yui-u{width:74.2%;}.yui-ge .yui-u,.yui-gf div.first{width:24%;}.yui-g .yui-gb div.first,.yui-gb div.first,.yui-gc div.first,.yui-gd div.first{margin-left:0;}.yui-g .yui-g .yui-u,.yui-gb .yui-g .yui-u,.yui-gc .yui-g .yui-u,.yui-gd .yui-g .yui-u,.yui-ge .yui-g .yui-u,.yui-gf .yui-g .yui-u{width:49%;*width:48.1%;*margin-left:0;}.yui-g .yui-g .yui-u{width:48.1%;}.yui-g .yui-gb div.first,.yui-gb .yui-gb div.first{*margin-right:0;*width:32%;_width:31.7%;}.yui-g .yui-gc div.first,.yui-gd .yui-g{width:66%;}.yui-gb .yui-g div.first{*margin-right:4%;_margin-right:1.3%;}.yui-gb .yui-gc div.first,.yui-gb .yui-gd div.first{*margin-right:0;}.yui-gb .yui-gb .yui-u,.yui-gb .yui-gc .yui-u{*margin-left:1.8%;_margin-left:4%;}.yui-g .yui-gb .yui-u{_margin-left:1.0%;}.yui-gb .yui-gd .yui-u{*width:66%;_width:61.2%;}.yui-gb .yui-gd div.first{*width:31%;_width:29.5%;}.yui-g .yui-gc .yui-u,.yui-gb .yui-gc .yui-u{width:32%;_float:right;margin-right:0;_margin-left:0;}.yui-gb .yui-gc div.first{width:66%;*float:left;*margin-left:0;}.yui-gb .yui-ge .yui-u,.yui-gb .yui-gf .yui-u{margin:0;}.yui-gb .yui-gb .yui-u{_margin-left:.7%;}.yui-gb .yui-g div.first,.yui-gb .yui-gb div.first{*margin-left:0;}.yui-gc .yui-g .yui-u,.yui-gd .yui-g .yui-u{*width:48.1%;*margin-left:0;}.yui-gb .yui-gd div.first{width:32%;}.yui-g .yui-gd div.first{_width:29.9%;}.yui-ge .yui-g{width:24%;}.yui-gf .yui-g{width:74.2%;}.yui-gb .yui-ge div.yui-u,.yui-gb .yui-gf div.yui-u{float:right;}.yui-gb .yui-ge div.first,.yui-gb .yui-gf div.first{float:left;}.yui-gb .yui-ge .yui-u,.yui-gb .yui-gf div.first{*width:24%;_width:20%;}.yui-gb .yui-ge div.first,.yui-gb .yui-gf .yui-u{*width:73.5%;_width:65.5%;}.yui-ge div.first .yui-gd .yui-u{width:65%;}.yui-ge div.first .yui-gd div.first{width:32%;}#hd:after,#bd:after,#ft:after,.yui-g:after,.yui-gb:after,.yui-gc:after,.yui-gd:after,.yui-ge:after,.yui-gf:after{content:".";display:block;height:0;clear:both;visibility:hidden;}#hd,#bd,#ft,.yui-g,.yui-gb,.yui-gc,.yui-gd,.yui-ge,.yui-gf{zoom:1;}
1025   -/*
  1018 +body{text-align:center;}#doc,#doc2,#doc3,#doc4,.yui-t1,.yui-t2,.yui-t3,.yui-t4,.yui-t5,.yui-t6,.yui-t7{margin:auto;text-align:left;width:57.69em;*width:56.25em;}#doc2{width:73.076em;*width:71.25em;}#doc3{margin:auto 10px;width:auto;}#doc4{width:74.923em;*width:73.05em;}.yui-b{position:relative;}.yui-b{_position:static;}#yui-main .yui-b{position:static;}#yui-main,.yui-g .yui-u .yui-g{width:100%;}.yui-t1 #yui-main,.yui-t2 #yui-main,.yui-t3 #yui-main{float:right;margin-left:-25em;}.yui-t4 #yui-main,.yui-t5 #yui-main,.yui-t6 #yui-main{float:left;margin-right:-25em;}.yui-t1 .yui-b{float:left;width:12.30769em;*width:12.00em;}.yui-t1 #yui-main .yui-b{margin-left:13.30769em;*margin-left:13.05em;}.yui-t2 .yui-b{float:left;width:13.8461em;*width:13.50em;}.yui-t2 #yui-main .yui-b{margin-left:14.8461em;*margin-left:14.55em;}.yui-t3 .yui-b{float:left;width:23.0769em;*width:22.50em;}.yui-t3 #yui-main .yui-b{margin-left:24.0769em;*margin-left:23.62em;}.yui-t4 .yui-b{float:right;width:13.8456em;*width:13.50em;}.yui-t4 #yui-main .yui-b{margin-right:14.8456em;*margin-right:14.55em;}.yui-t5 .yui-b{float:right;width:18.4615em;*width:18.00em;}.yui-t5 #yui-main .yui-b{margin-right:19.4615em;*margin-right:19.125em;}.yui-t6 .yui-b{float:right;width:23.0769em;*width:22.50em;}.yui-t6 #yui-main .yui-b{margin-right:24.0769em;*margin-right:23.62em;}.yui-t7 #yui-main .yui-b{display:block;margin:0 0 1em 0;}#yui-main .yui-b{float:none;width:auto;}.yui-gb .yui-u,.yui-g .yui-gb .yui-u,.yui-gb .yui-g,.yui-gb .yui-gb,.yui-gb .yui-gc,.yui-gb .yui-gd,.yui-gb .yui-ge,.yui-gb .yui-gf,.yui-gc .yui-u,.yui-gc .yui-g,.yui-gd .yui-u{float:left;}.yui-g .yui-u,.yui-g .yui-g,.yui-g .yui-gb,.yui-g .yui-gc,.yui-g .yui-gd,.yui-g .yui-ge,.yui-g .yui-gf,.yui-gc .yui-u,.yui-gd .yui-g,.yui-g .yui-gc .yui-u,.yui-ge .yui-u,.yui-ge .yui-g,.yui-gf .yui-g,.yui-gf .yui-u{float:right;}.yui-g div.first,.yui-gb div.first,.yui-gc div.first,.yui-gd div.first,.yui-ge div.first,.yui-gf div.first,.yui-g .yui-gc div.first,.yui-g .yui-ge div.first,.yui-gc div.first div.first{float:left;}.yui-g .yui-u,.yui-g .yui-g,.yui-g .yui-gb,.yui-g .yui-gc,.yui-g .yui-gd,.yui-g .yui-ge,.yui-g .yui-gf{width:49.1%;}.yui-gb .yui-u,.yui-g .yui-gb .yui-u,.yui-gb .yui-g,.yui-gb .yui-gb,.yui-gb .yui-gc,.yui-gb .yui-gd,.yui-gb .yui-ge,.yui-gb .yui-gf,.yui-gc .yui-u,.yui-gc .yui-g,.yui-gd .yui-u{width:32%;margin-left:1.99%;}.yui-gb .yui-u{*margin-left:1.9%;*width:31.9%;}.yui-gc div.first,.yui-gd .yui-u{width:66%;}.yui-gd div.first{width:32%;}.yui-ge div.first,.yui-gf .yui-u{width:74.2%;}.yui-ge .yui-u,.yui-gf div.first{width:24%;}.yui-g .yui-gb div.first,.yui-gb div.first,.yui-gc div.first,.yui-gd div.first{margin-left:0;}.yui-g .yui-g .yui-u,.yui-gb .yui-g .yui-u,.yui-gc .yui-g .yui-u,.yui-gd .yui-g .yui-u,.yui-ge .yui-g .yui-u,.yui-gf .yui-g .yui-u{width:49%;*width:48.1%;*margin-left:0;}.yui-g .yui-g .yui-u{width:48.1%;}.yui-g .yui-gb div.first,.yui-gb .yui-gb div.first{*margin-right:0;*width:32%;_width:31.7%;}.yui-g .yui-gc div.first,.yui-gd .yui-g{width:66%;}.yui-gb .yui-g div.first{*margin-right:4%;_margin-right:1.3%;}.yui-gb .yui-gc div.first,.yui-gb .yui-gd div.first{*margin-right:0;}.yui-gb .yui-gb .yui-u,.yui-gb .yui-gc .yui-u{*margin-left:1.8%;_margin-left:4%;}.yui-g .yui-gb .yui-u{_margin-left:1.0%;}.yui-gb .yui-gd .yui-u{*width:66%;_width:61.2%;}.yui-gb .yui-gd div.first{*width:31%;_width:29.5%;}.yui-g .yui-gc .yui-u,.yui-gb .yui-gc .yui-u{width:32%;_float:right;margin-right:0;_margin-left:0;}.yui-gb .yui-gc div.first{width:66%;*float:left;*margin-left:0;}.yui-gb .yui-ge .yui-u,.yui-gb .yui-gf .yui-u{margin:0;}.yui-gb .yui-gb .yui-u{_margin-left:.7%;}.yui-gb .yui-g div.first,.yui-gb .yui-gb div.first{*margin-left:0;}.yui-gc .yui-g .yui-u,.yui-gd .yui-g .yui-u{*width:48.1%;*margin-left:0;}.yui-gb .yui-gd div.first{width:32%;}.yui-g .yui-gd div.first{_width:29.9%;}.yui-ge .yui-g{width:24%;}.yui-gf .yui-g{width:74.2%;}.yui-gb .yui-ge div.yui-u,.yui-gb .yui-gf div.yui-u{float:right;}.yui-gb .yui-ge div.first,.yui-gb .yui-gf div.first{float:left;}.yui-gb .yui-ge .yui-u,.yui-gb .yui-gf div.first{*width:24%;_width:20%;}.yui-gb .yui-ge div.first,.yui-gb .yui-gf .yui-u{*width:73.5%;_width:65.5%;}.yui-ge div.first .yui-gd .yui-u{width:65%;}.yui-ge div.first .yui-gd div.first{width:32%;}#hd:after,#bd:after,#ft:after,.yui-g:after,.yui-gb:after,.yui-gc:after,.yui-gd:after,.yui-ge:after,.yui-gf:after{content:".";display:block;height:0;clear:both;visibility:hidden;}#hd,#bd,#ft,.yui-g,.yui-gb,.yui-gc,.yui-gd,.yui-ge,.yui-gf{zoom:1;}/*
1026 1019 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
1027 1020 Code licensed under the BSD License:
1028 1021 http://developer.yahoo.net/yui/license.txt
1029 1022 version: 2.7.0
1030 1023 */
1031 1024 .yuimenu{top:-999em;left:-999em;}.yuimenubar{position:static;}.yuimenu .yuimenu,.yuimenubar .yuimenu{position:absolute;}.yuimenubar li,.yuimenu li{list-style-type:none;}.yuimenubar ul,.yuimenu ul,.yuimenubar li,.yuimenu li,.yuimenu h6,.yuimenubar h6{margin:0;padding:0;}.yuimenuitemlabel,.yuimenubaritemlabel{text-align:left;white-space:nowrap;}.yuimenubar ul{*zoom:1;}.yuimenubar .yuimenu ul{*zoom:normal;}.yuimenubar>.bd>ul:after{content:".";display:block;clear:both;visibility:hidden;height:0;line-height:0;}.yuimenubaritem{float:left;}.yuimenubaritemlabel,.yuimenuitemlabel{display:block;}.yuimenuitemlabel .helptext{font-style:normal;display:block;margin:-1em 0 0 10em;}.yui-menu-shadow{position:absolute;visibility:hidden;z-index:-1;}.yui-menu-shadow-visible{top:2px;right:-3px;left:-3px;bottom:-3px;visibility:visible;}.hide-scrollbars *{overflow:hidden;}.hide-scrollbars select{display:none;}.yuimenu.show-scrollbars,.yuimenubar.show-scrollbars{overflow:visible;}.yuimenu.hide-scrollbars .yui-menu-shadow,.yuimenubar.hide-scrollbars .yui-menu-shadow{overflow:hidden;}.yuimenu.show-scrollbars .yui-menu-shadow,.yuimenubar.show-scrollbars .yui-menu-shadow{overflow:auto;}.yui-overlay.yui-force-redraw{margin-bottom:1px;}.yui-skin-sam .yuimenubar{font-size:93%;line-height:2;*line-height:1.9;border:solid 1px #808080;background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0;}.yui-skin-sam .yuimenubarnav .yuimenubaritem{border-right:solid 1px #ccc;}.yui-skin-sam .yuimenubaritemlabel{padding:0 10px;color:#000;text-decoration:none;cursor:default;border-style:solid;border-color:#808080;border-width:1px 0;*position:relative;margin:-1px 0;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel{padding-right:20px;*display:inline-block;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel-hassubmenu{background:url(menubaritem_submenuindicator.png) right center no-repeat;}.yui-skin-sam .yuimenubaritem-selected{background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 -1700px;}.yui-skin-sam .yuimenubaritemlabel-selected{border-color:#7D98B8;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel-selected{border-left-width:1px;margin-left:-1px;*left:-1px;}.yui-skin-sam .yuimenubaritemlabel-disabled{cursor:default;color:#A6A6A6;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel-hassubmenu-disabled{background-image:url(menubaritem_submenuindicator_disabled.png);}.yui-skin-sam .yuimenu{font-size:93%;line-height:1.5;*line-height:1.45;}.yui-skin-sam .yuimenubar .yuimenu,.yui-skin-sam .yuimenu .yuimenu{font-size:100%;}.yui-skin-sam .yuimenu .bd{*zoom:1;_zoom:normal;border:solid 1px #808080;background-color:#fff;}.yui-skin-sam .yuimenu .yuimenu .bd{*zoom:normal;}.yui-skin-sam .yuimenu ul{padding:3px 0;border-width:1px 0 0 0;border-color:#ccc;border-style:solid;}.yui-skin-sam .yuimenu ul.first-of-type{border-width:0;}.yui-skin-sam .yuimenu h6{font-weight:bold;border-style:solid;border-color:#ccc;border-width:1px 0 0 0;color:#a4a4a4;padding:3px 10px 0 10px;}.yui-skin-sam .yuimenu ul.hastitle,.yui-skin-sam .yuimenu h6.first-of-type{border-width:0;}.yui-skin-sam .yuimenu .yui-menu-body-scrolled{border-color:#ccc #808080;overflow:hidden;}.yui-skin-sam .yuimenu .topscrollbar,.yui-skin-sam .yuimenu .bottomscrollbar{height:16px;border:solid 1px #808080;background:#fff url(../../../../assets/skins/sam/sprite.png) no-repeat 0 0;}.yui-skin-sam .yuimenu .topscrollbar{border-bottom-width:0;background-position:center -950px;}.yui-skin-sam .yuimenu .topscrollbar_disabled{background-position:center -975px;}.yui-skin-sam .yuimenu .bottomscrollbar{border-top-width:0;background-position:center -850px;}.yui-skin-sam .yuimenu .bottomscrollbar_disabled{background-position:center -875px;}.yui-skin-sam .yuimenuitem{_border-bottom:solid 1px #fff;}.yui-skin-sam .yuimenuitemlabel{padding:0 20px;color:#000;text-decoration:none;cursor:default;}.yui-skin-sam .yuimenuitemlabel .helptext{margin-top:-1.5em;*margin-top:-1.45em;}.yui-skin-sam .yuimenuitem-hassubmenu{background-image:url(menuitem_submenuindicator.png);background-position:right center;background-repeat:no-repeat;}.yui-skin-sam .yuimenuitem-checked{background-image:url(menuitem_checkbox.png);background-position:left center;background-repeat:no-repeat;}.yui-skin-sam .yui-menu-shadow-visible{background-color:#000;opacity:.12;filter:alpha(opacity=12);}.yui-skin-sam .yuimenuitem-selected{background-color:#B3D4FF;}.yui-skin-sam .yuimenuitemlabel-disabled{cursor:default;color:#A6A6A6;}.yui-skin-sam .yuimenuitem-hassubmenu-disabled{background-image:url(menuitem_submenuindicator_disabled.png);}.yui-skin-sam .yuimenuitem-checked-disabled{background-image:url(menuitem_checkbox_disabled.png);}
1032   -
1033 1025 /*
1034 1026 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
1035 1027 Code licensed under the BSD License:
... ... @@ -1037,7 +1029,6 @@ http://developer.yahoo.net/yui/license.txt
1037 1029 version: 2.7.0
1038 1030 */
1039 1031 .yui-skin-sam .yui-ac{position:relative;font-family:arial;font-size:100%;}.yui-skin-sam .yui-ac-input{position:absolute;width:100%;}.yui-skin-sam .yui-ac-container{position:absolute;top:1.6em;width:100%;}.yui-skin-sam .yui-ac-content{position:absolute;width:100%;border:1px solid #808080;background:#fff;overflow:hidden;z-index:9050;}.yui-skin-sam .yui-ac-shadow{position:absolute;margin:.3em;width:100%;background:#000;-moz-opacity:.10;opacity:.10;filter:alpha(opacity=10);z-index:9049;}.yui-skin-sam .yui-ac iframe{opacity:0;filter:alpha(opacity=0);padding-right:.3em;padding-bottom:.3em;}.yui-skin-sam .yui-ac-content ul{margin:0;padding:0;width:100%;}.yui-skin-sam .yui-ac-content li{margin:0;padding:2px 5px;cursor:default;white-space:nowrap;list-style:none;zoom:1;}.yui-skin-sam .yui-ac-content li.yui-ac-prehighlight{background:#B3D4FF;}.yui-skin-sam .yui-ac-content li.yui-ac-highlight{background:#426FD9;color:#FFF;}
1040   -
1041 1032 /*
1042 1033 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
1043 1034 Code licensed under the BSD License:
... ... @@ -1045,7 +1036,6 @@ http://developer.yahoo.net/yui/license.txt
1045 1036 version: 2.7.0
1046 1037 */
1047 1038 .yui-overlay,.yui-panel-container{visibility:hidden;position:absolute;z-index:2;}.yui-panel{position:relative;}.yui-panel-container form{margin:0;}.mask{z-index:1;display:none;position:absolute;top:0;left:0;right:0;bottom:0;}.mask.block-scrollbars{overflow:auto;}.masked select,.drag select,.hide-select select{_visibility:hidden;}.yui-panel-container select{_visibility:inherit;}.hide-scrollbars,.hide-scrollbars *{overflow:hidden;}.hide-scrollbars select{display:none;}.show-scrollbars{overflow:auto;}.yui-panel-container.show-scrollbars,.yui-tt.show-scrollbars{overflow:visible;}.yui-panel-container.show-scrollbars .underlay,.yui-tt.show-scrollbars .yui-tt-shadow{overflow:auto;}.yui-panel-container.shadow .underlay.yui-force-redraw{padding-bottom:1px;}.yui-effect-fade .underlay,.yui-effect-fade .yui-tt-shadow{display:none;}.yui-tt-shadow{position:absolute;}.yui-override-padding{padding:0!important;}.yui-panel-container .container-close{overflow:hidden;text-indent:-10000em;text-decoration:none;}.yui-overlay.yui-force-redraw,.yui-panel-container.yui-force-redraw{margin-bottom:1px;}.yui-skin-sam .mask{background-color:#000;opacity:.25;filter:alpha(opacity=25);}.yui-skin-sam .yui-panel-container{padding:0 1px;*padding:2px;}.yui-skin-sam .yui-panel{position:relative;left:0;top:0;border-style:solid;border-width:1px 0;border-color:#808080;z-index:1;*border-width:1px;*zoom:1;_zoom:normal;}.yui-skin-sam .yui-panel .hd,.yui-skin-sam .yui-panel .bd,.yui-skin-sam .yui-panel .ft{border-style:solid;border-width:0 1px;border-color:#808080;margin:0 -1px;*margin:0;*border:0;}.yui-skin-sam .yui-panel .hd{border-bottom:solid 1px #ccc;}.yui-skin-sam .yui-panel .bd,.yui-skin-sam .yui-panel .ft{background-color:#F2F2F2;}.yui-skin-sam .yui-panel .hd{padding:0 10px;font-size:93%;line-height:2;*line-height:1.9;font-weight:bold;color:#000;background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 -200px;}.yui-skin-sam .yui-panel .bd{padding:10px;}.yui-skin-sam .yui-panel .ft{border-top:solid 1px #808080;padding:5px 10px;font-size:77%;}.yui-skin-sam .container-close{position:absolute;top:5px;right:6px;width:25px;height:15px;background:url(../../../../assets/skins/sam/sprite.png) no-repeat 0 -300px;cursor:pointer;}.yui-skin-sam .yui-panel-container .underlay{right:-1px;left:-1px;}.yui-skin-sam .yui-panel-container.matte{padding:9px 10px;background-color:#fff;}.yui-skin-sam .yui-panel-container.shadow{_padding:2px 4px 0 2px;}.yui-skin-sam .yui-panel-container.shadow .underlay{position:absolute;top:2px;left:-3px;right:-3px;bottom:-3px;*top:4px;*left:-1px;*right:-1px;*bottom:-1px;_top:0;_left:0;_right:0;_bottom:0;_margin-top:3px;_margin-left:-1px;background-color:#000;opacity:.12;filter:alpha(opacity=12);}.yui-skin-sam .yui-dialog .ft{border-top:none;padding:0 10px 10px 10px;font-size:100%;}.yui-skin-sam .yui-dialog .ft .button-group{display:block;text-align:right;}.yui-skin-sam .yui-dialog .ft button.default{font-weight:bold;}.yui-skin-sam .yui-dialog .ft span.default{border-color:#304369;background-position:0 -1400px;}.yui-skin-sam .yui-dialog .ft span.default .first-child{border-color:#304369;}.yui-skin-sam .yui-dialog .ft span.default button{color:#fff;}.yui-skin-sam .yui-dialog .ft span.yui-button-disabled{background-position:0 -1500px;border-color:#ccc;}.yui-skin-sam .yui-dialog .ft span.yui-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-dialog .ft span.yui-button-disabled button{color:#a6a6a6;}.yui-skin-sam .yui-simple-dialog .bd .yui-icon{background:url(../../../../assets/skins/sam/sprite.png) no-repeat 0 0;width:16px;height:16px;margin-right:10px;float:left;}.yui-skin-sam .yui-simple-dialog .bd span.blckicon{background-position:0 -1100px;}.yui-skin-sam .yui-simple-dialog .bd span.alrticon{background-position:0 -1050px;}.yui-skin-sam .yui-simple-dialog .bd span.hlpicon{background-position:0 -1150px;}.yui-skin-sam .yui-simple-dialog .bd span.infoicon{background-position:0 -1200px;}.yui-skin-sam .yui-simple-dialog .bd span.warnicon{background-position:0 -1900px;}.yui-skin-sam .yui-simple-dialog .bd span.tipicon{background-position:0 -1250px;}.yui-skin-sam .yui-tt .bd{position:relative;top:0;left:0;z-index:1;color:#000;padding:2px 5px;border-color:#D4C237 #A6982B #A6982B #A6982B;border-width:1px;border-style:solid;background-color:#FFEE69;}.yui-skin-sam .yui-tt.show-scrollbars .bd{overflow:auto;}.yui-skin-sam .yui-tt-shadow{top:2px;right:-3px;left:-3px;bottom:-3px;background-color:#000;}.yui-skin-sam .yui-tt-shadow-visible{opacity:.12;filter:alpha(opacity=12);}
1048   -
1049 1039 /*
1050 1040 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
1051 1041 Code licensed under the BSD License:
... ... @@ -1054,7 +1044,6 @@ version: 2.7.0
1054 1044 */
1055 1045 .yui-navset .yui-nav li,.yui-navset .yui-navset-top .yui-nav li,.yui-navset .yui-navset-bottom .yui-nav li{margin:0 .5em 0 0;}.yui-navset-left .yui-nav li,.yui-navset-right .yui-nav li{margin:0 0 .5em;}.yui-navset .yui-content .yui-hidden{position:absolute;left:-999999px;visibility:hidden;}.yui-navset .yui-navset-left .yui-nav,.yui-navset .yui-navset-right .yui-nav,.yui-navset-left .yui-nav,.yui-navset-right .yui-nav{width:6em;}.yui-navset-top .yui-nav,.yui-navset-bottom .yui-nav{width:auto;}.yui-navset .yui-navset-left,.yui-navset-left{padding:0 0 0 6em;}.yui-navset-right{padding:0 6em 0 0;}.yui-navset-top,.yui-navset-bottom{padding:auto;}.yui-nav,.yui-nav li{margin:0;padding:0;list-style:none;}.yui-navset li em{font-style:normal;}.yui-navset{position:relative;zoom:1;}.yui-navset .yui-content,.yui-navset .yui-content div{zoom:1;}.yui-navset .yui-content:after{content:'';display:block;clear:both;}.yui-navset .yui-nav li,.yui-navset .yui-navset-top .yui-nav li,.yui-navset .yui-navset-bottom .yui-nav li{display:inline-block;display:-moz-inline-stack;*display:inline;vertical-align:bottom;cursor:pointer;zoom:1;}.yui-navset-left .yui-nav li,.yui-navset-right .yui-nav li{display:block;}.yui-navset .yui-nav a{position:relative;}.yui-navset .yui-nav li a,.yui-navset-top .yui-nav li a,.yui-navset-bottom .yui-nav li a{display:block;display:inline-block;vertical-align:bottom;zoom:1;}.yui-navset-left .yui-nav li a,.yui-navset-right .yui-nav li a{display:block;}.yui-navset-bottom .yui-nav li a{vertical-align:text-top;}.yui-navset .yui-nav li a em,.yui-navset-top .yui-nav li a em,.yui-navset-bottom .yui-nav li a em{display:block;}.yui-navset .yui-navset-left .yui-nav,.yui-navset .yui-navset-right .yui-nav,.yui-navset-left .yui-nav,.yui-navset-right .yui-nav{position:absolute;z-index:1;}.yui-navset-top .yui-nav,.yui-navset-bottom .yui-nav{position:static;}.yui-navset .yui-navset-left .yui-nav,.yui-navset-left .yui-nav{left:0;right:auto;}.yui-navset .yui-navset-right .yui-nav,.yui-navset-right .yui-nav{right:0;left:auto;}.yui-skin-sam .yui-navset .yui-nav,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav{border:solid #2647a0;border-width:0 0 5px;zoom:1;}.yui-skin-sam .yui-navset .yui-nav li,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav li{margin:0 .16em 0 0;padding:1px 0 0;zoom:1;}.yui-skin-sam .yui-navset .yui-nav .selected,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav .selected{margin:0 .16em -1px 0;}.yui-skin-sam .yui-navset .yui-nav a,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav a{background:#d8d8d8 url(../../../../assets/skins/sam/sprite.png) repeat-x;border:solid #a3a3a3;border-width:0 1px;color:#000;position:relative;text-decoration:none;}.yui-skin-sam .yui-navset .yui-nav a em,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav a em{border:solid #a3a3a3;border-width:1px 0 0;cursor:hand;padding:.25em .75em;left:0;right:0;bottom:0;top:-1px;position:relative;}.yui-skin-sam .yui-navset .yui-nav .selected a,.yui-skin-sam .yui-navset .yui-nav .selected a:focus,.yui-skin-sam .yui-navset .yui-nav .selected a:hover{background:#2647a0 url(../../../../assets/skins/sam/sprite.png) repeat-x left -1400px;color:#fff;}.yui-skin-sam .yui-navset .yui-nav a:hover,.yui-skin-sam .yui-navset .yui-nav a:focus{background:#bfdaff url(../../../../assets/skins/sam/sprite.png) repeat-x left -1300px;outline:0;}.yui-skin-sam .yui-navset .yui-nav .selected a em{padding:.35em .75em;}.yui-skin-sam .yui-navset .yui-nav .selected a,.yui-skin-sam .yui-navset .yui-nav .selected a em{border-color:#243356;}.yui-skin-sam .yui-navset .yui-content{background:#edf5ff;}.yui-skin-sam .yui-navset .yui-content,.yui-skin-sam .yui-navset .yui-navset-top .yui-content{border:1px solid #808080;border-top-color:#243356;padding:.25em .5em;}.yui-skin-sam .yui-navset-left .yui-nav,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav,.yui-skin-sam .yui-navset .yui-navset-right .yui-nav,.yui-skin-sam .yui-navset-right .yui-nav{border-width:0 5px 0 0;Xposition:absolute;top:0;bottom:0;}.yui-skin-sam .yui-navset .yui-navset-right .yui-nav,.yui-skin-sam .yui-navset-right .yui-nav{border-width:0 0 0 5px;}.yui-skin-sam .yui-navset-left .yui-nav li,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav li,.yui-skin-sam .yui-navset-right .yui-nav li{margin:0 0 .16em;padding:0 0 0 1px;}.yui-skin-sam .yui-navset-right .yui-nav li{padding:0 1px 0 0;}.yui-skin-sam .yui-navset-left .yui-nav .selected,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav .selected{margin:0 -1px .16em 0;}.yui-skin-sam .yui-navset-right .yui-nav .selected{margin:0 0 .16em -1px;}.yui-skin-sam .yui-navset-left .yui-nav a,.yui-skin-sam .yui-navset-right .yui-nav a{border-width:1px 0;}.yui-skin-sam .yui-navset-left .yui-nav a em,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav a em,.yui-skin-sam .yui-navset-right .yui-nav a em{border-width:0 0 0 1px;padding:.2em .75em;top:auto;left:-1px;}.yui-skin-sam .yui-navset-right .yui-nav a em{border-width:0 1px 0 0;left:auto;right:-1px;}.yui-skin-sam .yui-navset-left .yui-nav a,.yui-skin-sam .yui-navset-left .yui-nav .selected a,.yui-skin-sam .yui-navset-left .yui-nav a:hover,.yui-skin-sam .yui-navset-right .yui-nav a,.yui-skin-sam .yui-navset-right .yui-nav .selected a,.yui-skin-sam .yui-navset-right .yui-nav a:hover,.yui-skin-sam .yui-navset-bottom .yui-nav a,.yui-skin-sam .yui-navset-bottom .yui-nav .selected a,.yui-skin-sam .yui-navset-bottom .yui-nav a:hover{background-image:none;}.yui-skin-sam .yui-navset-left .yui-content{border:1px solid #808080;border-left-color:#243356;}.yui-skin-sam .yui-navset-bottom .yui-nav,.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav{border-width:5px 0 0;}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav .selected,.yui-skin-sam .yui-navset-bottom .yui-nav .selected{margin:-1px .16em 0 0;}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav li,.yui-skin-sam .yui-navset-bottom .yui-nav li{padding:0 0 1px 0;vertical-align:top;}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav a em,.yui-skin-sam .yui-navset-bottom .yui-nav a em{border-width:0 0 1px;top:auto;bottom:-1px;}
1056 1046 .yui-skin-sam .yui-navset-bottom .yui-content,.yui-skin-sam .yui-navset .yui-navset-bottom .yui-content{border:1px solid #808080;border-bottom-color:#243356;}
1057   -
1058 1047 /*
1059 1048 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
1060 1049 Code licensed under the BSD License:
... ... @@ -1062,7 +1051,6 @@ http://developer.yahoo.net/yui/license.txt
1062 1051 version: 2.7.0
1063 1052 */
1064 1053 .ygtvitem{}.ygtvitem table{margin-bottom:0;border:none;}.ygtvrow td{border:none;padding:0;}.ygtvrow td a{text-decoration:none;}.ygtvtn{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -5600px no-repeat;}.ygtvtm{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -4000px no-repeat;}.ygtvtmh,.ygtvtmhh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -4800px no-repeat;}.ygtvtp{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -6400px no-repeat;}.ygtvtph,.ygtvtphh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -7200px no-repeat;}.ygtvln{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -1600px no-repeat;}.ygtvlm{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 0px no-repeat;}.ygtvlmh,.ygtvlmhh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -800px no-repeat;}.ygtvlp{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -2400px no-repeat;}.ygtvlph,.ygtvlphh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -3200px no-repeat;}.ygtvloading{width:18px;height:22px;background:url(treeview-loading.gif) 0 0 no-repeat;}.ygtvdepthcell{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -8000px no-repeat;}.ygtvblankdepthcell{width:18px;height:22px;}.ygtvchildren{}* html .ygtvchildren{height:2%;}.ygtvlabel,.ygtvlabel:link,.ygtvlabel:visited,.ygtvlabel:hover{margin-left:2px;text-decoration:none;background-color:white;cursor:pointer;}.ygtvcontent{cursor:default;}.ygtvspacer{height:22px;width:12px;}.ygtvfocus{}.ygtvfocus .ygtvlabel,.ygtvfocus .ygtvlabel:link,.ygtvfocus .ygtvlabel:visited,.ygtvfocus .ygtvlabel:hover{}.ygtvfocus a,.ygtvrow td a{outline-style:none;}.ygtvok{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -8800px no-repeat;}.ygtvok:hover{background:url(treeview-sprite.gif) 0 -8844px no-repeat;}.ygtvcancel{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -8822px no-repeat;}.ygtvcancel:hover{background:url(treeview-sprite.gif) 0 -8866px no-repeat;}.ygtv-label-editor{background-color:#f2f2f2;border:1px solid silver;position:absolute;display:none;overflow:hidden;margin:auto;z-index:9000;}.ygtv-edit-TextNode{width:190px;}.ygtv-edit-TextNode .ygtvcancel,.ygtv-edit-TextNode .ygtvok{border:none;}.ygtv-edit-TextNode .ygtv-button-container{float:right;}.ygtv-edit-TextNode .ygtv-input input{width:140px;}.ygtv-edit-DateNode .ygtvcancel{border:none;}.ygtv-edit-DateNode .ygtvok{display:none;}.ygtv-edit-DateNode .ygtv-button-container{text-align:right;margin:auto;}
1065   -
1066 1054 /*
1067 1055 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
1068 1056 Code licensed under the BSD License:
... ... @@ -1070,7 +1058,6 @@ http://developer.yahoo.net/yui/license.txt
1070 1058 version: 2.7.0
1071 1059 */
1072 1060 .yui-carousel{visibility:hidden;overflow:hidden;position:relative;text-align:left;zoom:1;}.yui-carousel.yui-carousel-visible{visibility:visible;}.yui-carousel-content{overflow:hidden;position:relative;}.yui-carousel-element{margin:5px 0;overflow:hidden;padding:0;position:relative;width:32000px;z-index:1;}.yui-carousel-vertical .yui-carousel-element{margin:0 5px;}.yui-carousel-element li{border:1px solid #ccc;float:left;list-style:none;margin:1px;overflow:hidden;padding:0;text-align:center;*float:none;*display:inline-block;*zoom:1;*display:inline;}.yui-carousel .yui-carousel-item-selected{border:1px dashed #000;margin:1px;}.yui-carousel-vertical{height:32000px;margin:0 5px;width:auto;}.yui-carousel-vertical .yui-carousel-element li{display:block;float:none;}.yui-log .carousel{background:#f2e886;}.yui-carousel-nav{zoom:1;}.yui-carousel-nav:after{clear:both;content:"";display:block;}.yui-carousel-button-focus{outline:1px dotted #000;}.yui-carousel-min-width .yui-carousel-content{margin:0 auto;}.yui-skin-sam .yui-carousel,.yui-skin-sam .yui-carousel-vertical{border:1px solid #808080;}.yui-skin-sam .yui-carousel-nav{background:url(../pacotes/yui270/build/assets/skins/sam/sprite.png) repeat-x 0 0;padding:3px;text-align:right;}.yui-skin-sam .yui-carousel-button{background:url(../pacotes/yui270/build/assets/skins/sam/sprite.png) no-repeat 0 -600px;float:right;height:19px;margin:5px;overflow:hidden;width:40px;}.yui-skin-sam .yui-carousel-vertical .yui-carousel-button{background-position:0 -800px;}.yui-skin-sam .yui-carousel-button-disabled{background-position:0 -2000px;}.yui-skin-sam .yui-carousel-vertical .yui-carousel-button-disabled{background-position:0 -2100px;}.yui-skin-sam .yui-carousel-button input,.yui-skin-sam .yui-carousel-button button{background-color:transparent;border:0;cursor:pointer;display:block;height:44px;margin:-2px 0 0 -2px;padding:0 0 0 50px;}.yui-skin-sam span.yui-carousel-first-button{background-position:0 -550px;margin-left:-100px;margin-right:50px;*margin:5px 5px 5px -90px;}.yui-skin-sam .yui-carousel-vertical span.yui-carousel-first-button{background-position:0 -750px;}.yui-skin-sam span.yui-carousel-first-button-disabled{background-position:0 -1950px;}.yui-skin-sam .yui-carousel-vertical span.yui-carousel-first-button-disabled{background-position:0 -2050px;}.yui-skin-sam .yui-carousel-nav ul{float:right;height:19px;margin:0;margin-left:-220px;margin-right:100px;*margin-left:-160px;*margin-right:0;padding:0;}.yui-skin-sam .yui-carousel-min-width .yui-carousel-nav ul{*margin-left:-170px;}.yui-skin-sam .yui-carousel-nav select{position:relative;*right:50px;top:4px;}.yui-skin-sam .yui-carousel-vertical .yui-carousel-nav ul,.yui-skin-sam .yui-carousel-vertical .yui-carousel-nav select{float:none;margin:0;*zoom:1;}.yui-skin-sam .yui-carousel-nav ul li{background:url(../pacotes/yui270/build/assets/skins/sam/sprite.png) no-repeat 0 -650px;cursor:pointer;float:left;height:9px;list-style:none;margin:10px 0 0 5px;overflow:hidden;padding:0;width:9px;}.yui-skin-sam .yui-carousel-nav ul:after{clear:both;content:"";display:block;}.yui-skin-sam .yui-carousel-nav ul li a{left:-10000px;position:absolute;}.yui-skin-sam .yui-carousel-nav ul li.yui-carousel-nav-page-focus{outline:1px dotted #000;}.yui-skin-sam .yui-carousel-nav ul li.yui-carousel-nav-page-selected{background-position:0 -700px;}.yui-skin-sam .yui-carousel-item-loading{background:url(ajax-loader.gif) no-repeat 50% 50%;position:relative;text-indent:-150px;}
1073   -
1074 1061 /*
1075 1062 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
1076 1063 Code licensed under the BSD License:
... ... @@ -1082,7 +1069,6 @@ version: 2.7.0
1082 1069 .yui-h-slider .yui-slider-thumb,
1083 1070 .yui-v-slider .yui-slider-thumb{position:absolute;cursor:default;}
1084 1071 .yui-skin-sam .yui-h-slider .yui-slider-thumb{top:4px;}
1085   -
1086 1072 /*
1087 1073 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
1088 1074 Code licensed under the BSD License:
... ... @@ -1090,7 +1076,6 @@ http://developer.yahoo.net/yui/license.txt
1090 1076 version: 2.7.0
1091 1077 */
1092 1078 .yui-resize{position:relative;zoom:1;z-index:0;}.yui-resize-wrap{zoom:1;}.yui-draggable{cursor:move;}.yui-resize .yui-resize-handle{position:absolute;z-index:1;font-size:0;margin:0;padding:0;zoom:1;height:1px;width:1px;}.yui-resize .yui-resize-handle-br{height:5px;width:5px;bottom:0;right:0;cursor:se-resize;z-index:2;zoom:1;}.yui-resize .yui-resize-handle-bl{height:5px;width:5px;bottom:0;left:0;cursor:sw-resize;z-index:2;zoom:1;}.yui-resize .yui-resize-handle-tl{height:5px;width:5px;top:0;left:0;cursor:nw-resize;z-index:2;zoom:1;}.yui-resize .yui-resize-handle-tr{height:5px;width:5px;top:0;right:0;cursor:ne-resize;z-index:2;zoom:1;}.yui-resize .yui-resize-handle-r{width:5px;height:100%;top:0;right:0;cursor:e-resize;zoom:1;}.yui-resize .yui-resize-handle-l{height:100%;width:5px;top:0;left:0;cursor:w-resize;zoom:1;}.yui-resize .yui-resize-handle-b{width:100%;height:5px;bottom:0;right:0;cursor:s-resize;zoom:1;}.yui-resize .yui-resize-handle-t{width:100%;height:5px;top:0;right:0;cursor:n-resize;zoom:1;}.yui-resize-proxy{position:absolute;border:1px dashed #000;visibility:hidden;z-index:1000;}.yui-resize-hover .yui-resize-handle,.yui-resize-hidden .yui-resize-handle{opacity:0;filter:alpha(opacity=0);}.yui-resize-ghost{opacity:.5;filter:alpha(opacity=50);}.yui-resize-knob .yui-resize-handle{height:6px;width:6px;}.yui-resize-knob .yui-resize-handle-tr{right:-3px;top:-3px;}.yui-resize-knob .yui-resize-handle-tl{left:-3px;top:-3px;}.yui-resize-knob .yui-resize-handle-bl{left:-3px;bottom:-3px;}.yui-resize-knob .yui-resize-handle-br{right:-3px;bottom:-3px;}.yui-resize-knob .yui-resize-handle-t{left:45%;top:-3px;}.yui-resize-knob .yui-resize-handle-r{right:-3px;top:45%;}.yui-resize-knob .yui-resize-handle-l{left:-3px;top:45%;}.yui-resize-knob .yui-resize-handle-b{left:45%;bottom:-3px;}.yui-resize-status{position:absolute;top:-999px;left:-999px;padding:2px;font-size:80%;display:none;zoom:1;z-index:9999;}.yui-resize-status strong,.yui-resize-status em{font-weight:normal;font-style:normal;padding:1px;zoom:1;}.yui-skin-sam .yui-resize .yui-resize-handle{background-color:#F2F2F2;zoom:1;}.yui-skin-sam .yui-resize .yui-resize-handle-active{background-color:#7D98B8;zoom:1;}.yui-skin-sam .yui-resize .yui-resize-handle-l,.yui-skin-sam .yui-resize .yui-resize-handle-r,.yui-skin-sam .yui-resize .yui-resize-handle-l-active,.yui-skin-sam .yui-resize .yui-resize-handle-r-active{height:100%;zoom:1;}.yui-skin-sam .yui-resize-knob .yui-resize-handle{border:1px solid #808080;}.yui-skin-sam .yui-resize-hover .yui-resize-handle-active{opacity:1;filter:alpha(opacity=100);}.yui-skin-sam .yui-resize-proxy{border:1px dashed #426FD9;}.yui-skin-sam .yui-resize-status{border:1px solid #A6982B;border-top:1px solid #D4C237;background-color:#FFEE69;color:#000;}.yui-skin-sam .yui-resize-status strong,.yui-skin-sam .yui-resize-status em{float:left;display:block;clear:both;padding:1px;text-align:center;}.yui-skin-sam .yui-resize .yui-resize-handle-inner-r,.yui-skin-sam .yui-resize .yui-resize-handle-inner-l{background:transparent url(layout_sprite.png) no-repeat 0 -5px;height:16px;width:5px;position:absolute;top:45%;}.yui-skin-sam .yui-resize .yui-resize-handle-inner-t,.yui-skin-sam .yui-resize .yui-resize-handle-inner-b{background:transparent url(layout_sprite.png) no-repeat -20px 0;height:5px;width:16px;position:absolute;left:50%;}.yui-skin-sam .yui-resize .yui-resize-handle-br{background-image:url(layout_sprite.png);background-repeat:no-repeat;background-position:-22px -62px;}.yui-skin-sam .yui-resize .yui-resize-handle-tr{background-image:url(layout_sprite.png);background-repeat:no-repeat;background-position:-22px -42px;}.yui-skin-sam .yui-resize .yui-resize-handle-tl{background-image:url(layout_sprite.png);background-repeat:no-repeat;background-position:-22px -82px;}.yui-skin-sam .yui-resize .yui-resize-handle-bl{background-image:url(layout_sprite.png);background-repeat:no-repeat;background-position:-22px -23px;}.yui-skin-sam .yui-resize-knob .yui-resize-handle-t,.yui-skin-sam .yui-resize-knob .yui-resize-handle-r,.yui-skin-sam .yui-resize-knob .yui-resize-handle-b,.yui-skin-sam .yui-resize-knob .yui-resize-handle-l,.yui-skin-sam .yui-resize-knob .yui-resize-handle-tl,.yui-skin-sam .yui-resize-knob .yui-resize-handle-tr,.yui-skin-sam .yui-resize-knob .yui-resize-handle-bl,.yui-skin-sam .yui-resize-knob .yui-resize-handle-br,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-t,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-r,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-b,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-l,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-tl,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-tr,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-bl,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-br{background-image:none;}.yui-skin-sam .yui-resize-knob .yui-resize-handle-l,.yui-skin-sam .yui-resize-knob .yui-resize-handle-r,.yui-skin-sam .yui-resize-knob .yui-resize-handle-l-active,.yui-skin-sam .yui-resize-knob .yui-resize-handle-r-active{height:6px;width:6px;}.yui-skin-sam .yui-resize-textarea .yui-resize-handle-r{right:-8px;}.yui-skin-sam .yui-resize-textarea .yui-resize-handle-b{bottom:-8px;}.yui-skin-sam .yui-resize-textarea .yui-resize-handle-br{right:-8px;bottom:-8px;}
1093   -
1094 1079 .yui-skin-sam .yuimenubar {
1095 1080 background:transparent url(../pacotes/yui270/build/assets/skins/sam/sprite.png) repeat-x scroll 0 0;
1096 1081 border:1px solid #808080;
... ... @@ -1312,7 +1297,6 @@ width:16px;
1312 1297 padding:0 10px;
1313 1298 }
1314 1299 .yui-resize .yui-resize-handle{position:absolute;z-index:1;font-size:0;margin:0;padding:0;zoom:1;height:250px;width:5px;}
1315   -
1316 1300 .olControlEditingToolbar1 .editorOLpanItemInactive {
1317 1301 background-position:-0px 0;
1318 1302 }
... ... @@ -1474,4 +1458,4 @@ background-position:-522px -28px;
1474 1458 pre{
1475 1459 font-family: Verdana, Arial, Helvetica, sans-serif;
1476 1460 font-size: 9px;
1477   -}
  1461 +}
1478 1462 \ No newline at end of file
... ...
css/i3geo45.css.php
... ... @@ -197,7 +197,6 @@ h1 {padding:.25em .5em;background-color:#ccc;}
197 197 { .inputsb {border:1px solid black} }
198 198  
199 199  
200   -
201 200 #abregoogleearth,#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
202 201 {margin:2px;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:24;height:24;z-index:1000;position:relative;}
203 202 #box1
... ... @@ -974,8 +973,7 @@ h1 {padding:.25em .5em;background-color:#ccc;}
974 973  
975 974 button{background:url(../imagens/tic2.png) 98% 50% no-repeat;}
976 975 #encolheFerramentas
977   -{background-image:URL('../imagens/encolhe.png');background-repeat: no-repeat;background-position:center;cursor:pointer;}
978   -ul {text-align:left;list-style-type:none;padding-left: 15px;margin-left:5px; margin-top:15px;}
  976 +{background-image:URL('../imagens/encolhe.png');background-repeat: no-repeat;background-position:center;cursor:pointer;}ul {text-align:left;list-style-type:none;padding-left: 15px;margin-left:5px; margin-top:15px;}
979 977 li {margin-top:-10px;margin-bottom:15px;}
980 978 .toc {margin-left: 15px;}
981 979 .details {margin-left: 5px;}
... ... @@ -992,7 +990,6 @@ th {font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 8pt;}
992 990 .ftable {padding-top:5px;padding-bottom:5px;padding-left:5px;padding-right:5px;}
993 991 input { font-size: 11px; }
994 992 select { font-size: 11px; }
995   -
996 993 /*
997 994 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
998 995 Code licensed under the BSD License:
... ... @@ -1000,36 +997,31 @@ http://developer.yahoo.net/yui/license.txt
1000 997 version: 2.7.0
1001 998 */
1002 999 .yui-skin-sam .yui-log{padding:1em;width:31em;background-color:#AAA;color:#000;border:1px solid black;font-family:monospace;font-size:77%;text-align:left;z-index:9000;}.yui-skin-sam .yui-log-container{position:absolute;top:1em;right:1em;}.yui-skin-sam .yui-log input{margin:0;padding:0;font-family:arial;font-size:100%;font-weight:normal;}.yui-skin-sam .yui-log .yui-log-btns{position:relative;float:right;bottom:.25em;}.yui-skin-sam .yui-log .yui-log-hd{margin-top:1em;padding:.5em;background-color:#575757;}.yui-skin-sam .yui-log .yui-log-hd h4{margin:0;padding:0;font-size:108%;font-weight:bold;color:#FFF;}.yui-skin-sam .yui-log .yui-log-bd{width:100%;height:20em;background-color:#FFF;border:1px solid gray;overflow:auto;}.yui-skin-sam .yui-log p{margin:1px;padding:.1em;}.yui-skin-sam .yui-log pre{margin:0;padding:0;}.yui-skin-sam .yui-log pre.yui-log-verbose{white-space:pre-wrap;white-space:-moz-pre-wrap !important;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;}.yui-skin-sam .yui-log .yui-log-ft{margin-top:.5em;}.yui-skin-sam .yui-log .yui-log-ft .yui-log-categoryfilters{}.yui-skin-sam .yui-log .yui-log-ft .yui-log-sourcefilters{width:100%;border-top:1px solid #575757;margin-top:.75em;padding-top:.75em;}.yui-skin-sam .yui-log .yui-log-filtergrp{margin-right:.5em;}.yui-skin-sam .yui-log .info{background-color:#A7CC25;}.yui-skin-sam .yui-log .warn{background-color:#F58516;}.yui-skin-sam .yui-log .error{background-color:#E32F0B;}.yui-skin-sam .yui-log .time{background-color:#A6C9D7;}.yui-skin-sam .yui-log .window{background-color:#F2E886;}
1003   -
1004 1000 /*
1005 1001 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
1006 1002 Code licensed under the BSD License:
1007 1003 http://developer.yahoo.net/yui/license.txt
1008 1004 version: 2.7.0
1009 1005 */
1010   -body{font:13px/1.231 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}select,input,button,textarea,button{font:99% arial,helvetica,clean,sans-serif;}table{font-size:inherit;font:100%;}pre,code,kbd,samp,tt{font-family:monospace;*font-size:108%;line-height:100%;}
1011   -/*
  1006 +body{font:13px/1.231 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}select,input,button,textarea,button{font:99% arial,helvetica,clean,sans-serif;}table{font-size:inherit;font:100%;}pre,code,kbd,samp,tt{font-family:monospace;*font-size:108%;line-height:100%;}/*
1012 1007 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
1013 1008 Code licensed under the BSD License:
1014 1009 http://developer.yahoo.net/yui/license.txt
1015 1010 version: 2.7.0
1016 1011 */
1017   -html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var,optgroup{font-style:inherit;font-weight:inherit;}del,ins{text-decoration:none;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:baseline;}sub{vertical-align:baseline;}legend{color:#000;}input,button,textarea,select,optgroup,option{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;}input,button,textarea,select{*font-size:100%;}body{font:13px/1.231 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}select,input,button,textarea,button{font:99% arial,helvetica,clean,sans-serif;}table{font-size:inherit;font:100%;}pre,code,kbd,samp,tt{font-family:monospace;*font-size:108%;line-height:100%;}body{text-align:center;}#doc,#doc2,#doc3,#doc4,.yui-t1,.yui-t2,.yui-t3,.yui-t4,.yui-t5,.yui-t6,.yui-t7{margin:auto;text-align:left;width:57.69em;*width:56.25em;}#doc2{width:73.076em;*width:71.25em;}#doc3{margin:auto 10px;width:auto;}#doc4{width:74.923em;*width:73.05em;}.yui-b{position:relative;}.yui-b{_position:static;}#yui-main .yui-b{position:static;}#yui-main,.yui-g .yui-u .yui-g{width:100%;}.yui-t1 #yui-main,.yui-t2 #yui-main,.yui-t3 #yui-main{float:right;margin-left:-25em;}.yui-t4 #yui-main,.yui-t5 #yui-main,.yui-t6 #yui-main{float:left;margin-right:-25em;}.yui-t1 .yui-b{float:left;width:12.30769em;*width:12.00em;}.yui-t1 #yui-main .yui-b{margin-left:13.30769em;*margin-left:13.05em;}.yui-t2 .yui-b{float:left;width:13.8461em;*width:13.50em;}.yui-t2 #yui-main .yui-b{margin-left:14.8461em;*margin-left:14.55em;}.yui-t3 .yui-b{float:left;width:23.0769em;*width:22.50em;}.yui-t3 #yui-main .yui-b{margin-left:24.0769em;*margin-left:23.62em;}.yui-t4 .yui-b{float:right;width:13.8456em;*width:13.50em;}.yui-t4 #yui-main .yui-b{margin-right:14.8456em;*margin-right:14.55em;}.yui-t5 .yui-b{float:right;width:18.4615em;*width:18.00em;}.yui-t5 #yui-main .yui-b{margin-right:19.4615em;*margin-right:19.125em;}.yui-t6 .yui-b{float:right;width:23.0769em;*width:22.50em;}.yui-t6 #yui-main .yui-b{margin-right:24.0769em;*margin-right:23.62em;}.yui-t7 #yui-main .yui-b{display:block;margin:0 0 1em 0;}#yui-main .yui-b{float:none;width:auto;}.yui-gb .yui-u,.yui-g .yui-gb .yui-u,.yui-gb .yui-g,.yui-gb .yui-gb,.yui-gb .yui-gc,.yui-gb .yui-gd,.yui-gb .yui-ge,.yui-gb .yui-gf,.yui-gc .yui-u,.yui-gc .yui-g,.yui-gd .yui-u{float:left;}.yui-g .yui-u,.yui-g .yui-g,.yui-g .yui-gb,.yui-g .yui-gc,.yui-g .yui-gd,.yui-g .yui-ge,.yui-g .yui-gf,.yui-gc .yui-u,.yui-gd .yui-g,.yui-g .yui-gc .yui-u,.yui-ge .yui-u,.yui-ge .yui-g,.yui-gf .yui-g,.yui-gf .yui-u{float:right;}.yui-g div.first,.yui-gb div.first,.yui-gc div.first,.yui-gd div.first,.yui-ge div.first,.yui-gf div.first,.yui-g .yui-gc div.first,.yui-g .yui-ge div.first,.yui-gc div.first div.first{float:left;}.yui-g .yui-u,.yui-g .yui-g,.yui-g .yui-gb,.yui-g .yui-gc,.yui-g .yui-gd,.yui-g .yui-ge,.yui-g .yui-gf{width:49.1%;}.yui-gb .yui-u,.yui-g .yui-gb .yui-u,.yui-gb .yui-g,.yui-gb .yui-gb,.yui-gb .yui-gc,.yui-gb .yui-gd,.yui-gb .yui-ge,.yui-gb .yui-gf,.yui-gc .yui-u,.yui-gc .yui-g,.yui-gd .yui-u{width:32%;margin-left:1.99%;}.yui-gb .yui-u{*margin-left:1.9%;*width:31.9%;}.yui-gc div.first,.yui-gd .yui-u{width:66%;}.yui-gd div.first{width:32%;}.yui-ge div.first,.yui-gf .yui-u{width:74.2%;}.yui-ge .yui-u,.yui-gf div.first{width:24%;}.yui-g .yui-gb div.first,.yui-gb div.first,.yui-gc div.first,.yui-gd div.first{margin-left:0;}.yui-g .yui-g .yui-u,.yui-gb .yui-g .yui-u,.yui-gc .yui-g .yui-u,.yui-gd .yui-g .yui-u,.yui-ge .yui-g .yui-u,.yui-gf .yui-g .yui-u{width:49%;*width:48.1%;*margin-left:0;}.yui-g .yui-g .yui-u{width:48.1%;}.yui-g .yui-gb div.first,.yui-gb .yui-gb div.first{*margin-right:0;*width:32%;_width:31.7%;}.yui-g .yui-gc div.first,.yui-gd .yui-g{width:66%;}.yui-gb .yui-g div.first{*margin-right:4%;_margin-right:1.3%;}.yui-gb .yui-gc div.first,.yui-gb .yui-gd div.first{*margin-right:0;}.yui-gb .yui-gb .yui-u,.yui-gb .yui-gc .yui-u{*margin-left:1.8%;_margin-left:4%;}.yui-g .yui-gb .yui-u{_margin-left:1.0%;}.yui-gb .yui-gd .yui-u{*width:66%;_width:61.2%;}.yui-gb .yui-gd div.first{*width:31%;_width:29.5%;}.yui-g .yui-gc .yui-u,.yui-gb .yui-gc .yui-u{width:32%;_float:right;margin-right:0;_margin-left:0;}.yui-gb .yui-gc div.first{width:66%;*float:left;*margin-left:0;}.yui-gb .yui-ge .yui-u,.yui-gb .yui-gf .yui-u{margin:0;}.yui-gb .yui-gb .yui-u{_margin-left:.7%;}.yui-gb .yui-g div.first,.yui-gb .yui-gb div.first{*margin-left:0;}.yui-gc .yui-g .yui-u,.yui-gd .yui-g .yui-u{*width:48.1%;*margin-left:0;}.yui-gb .yui-gd div.first{width:32%;}.yui-g .yui-gd div.first{_width:29.9%;}.yui-ge .yui-g{width:24%;}.yui-gf .yui-g{width:74.2%;}.yui-gb .yui-ge div.yui-u,.yui-gb .yui-gf div.yui-u{float:right;}.yui-gb .yui-ge div.first,.yui-gb .yui-gf div.first{float:left;}.yui-gb .yui-ge .yui-u,.yui-gb .yui-gf div.first{*width:24%;_width:20%;}.yui-gb .yui-ge div.first,.yui-gb .yui-gf .yui-u{*width:73.5%;_width:65.5%;}.yui-ge div.first .yui-gd .yui-u{width:65%;}.yui-ge div.first .yui-gd div.first{width:32%;}#hd:after,#bd:after,#ft:after,.yui-g:after,.yui-gb:after,.yui-gc:after,.yui-gd:after,.yui-ge:after,.yui-gf:after{content:".";display:block;height:0;clear:both;visibility:hidden;}#hd,#bd,#ft,.yui-g,.yui-gb,.yui-gc,.yui-gd,.yui-ge,.yui-gf{zoom:1;}
1018   -/*
  1012 +html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var,optgroup{font-style:inherit;font-weight:inherit;}del,ins{text-decoration:none;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:baseline;}sub{vertical-align:baseline;}legend{color:#000;}input,button,textarea,select,optgroup,option{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;}input,button,textarea,select{*font-size:100%;}body{font:13px/1.231 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}select,input,button,textarea,button{font:99% arial,helvetica,clean,sans-serif;}table{font-size:inherit;font:100%;}pre,code,kbd,samp,tt{font-family:monospace;*font-size:108%;line-height:100%;}body{text-align:center;}#doc,#doc2,#doc3,#doc4,.yui-t1,.yui-t2,.yui-t3,.yui-t4,.yui-t5,.yui-t6,.yui-t7{margin:auto;text-align:left;width:57.69em;*width:56.25em;}#doc2{width:73.076em;*width:71.25em;}#doc3{margin:auto 10px;width:auto;}#doc4{width:74.923em;*width:73.05em;}.yui-b{position:relative;}.yui-b{_position:static;}#yui-main .yui-b{position:static;}#yui-main,.yui-g .yui-u .yui-g{width:100%;}.yui-t1 #yui-main,.yui-t2 #yui-main,.yui-t3 #yui-main{float:right;margin-left:-25em;}.yui-t4 #yui-main,.yui-t5 #yui-main,.yui-t6 #yui-main{float:left;margin-right:-25em;}.yui-t1 .yui-b{float:left;width:12.30769em;*width:12.00em;}.yui-t1 #yui-main .yui-b{margin-left:13.30769em;*margin-left:13.05em;}.yui-t2 .yui-b{float:left;width:13.8461em;*width:13.50em;}.yui-t2 #yui-main .yui-b{margin-left:14.8461em;*margin-left:14.55em;}.yui-t3 .yui-b{float:left;width:23.0769em;*width:22.50em;}.yui-t3 #yui-main .yui-b{margin-left:24.0769em;*margin-left:23.62em;}.yui-t4 .yui-b{float:right;width:13.8456em;*width:13.50em;}.yui-t4 #yui-main .yui-b{margin-right:14.8456em;*margin-right:14.55em;}.yui-t5 .yui-b{float:right;width:18.4615em;*width:18.00em;}.yui-t5 #yui-main .yui-b{margin-right:19.4615em;*margin-right:19.125em;}.yui-t6 .yui-b{float:right;width:23.0769em;*width:22.50em;}.yui-t6 #yui-main .yui-b{margin-right:24.0769em;*margin-right:23.62em;}.yui-t7 #yui-main .yui-b{display:block;margin:0 0 1em 0;}#yui-main .yui-b{float:none;width:auto;}.yui-gb .yui-u,.yui-g .yui-gb .yui-u,.yui-gb .yui-g,.yui-gb .yui-gb,.yui-gb .yui-gc,.yui-gb .yui-gd,.yui-gb .yui-ge,.yui-gb .yui-gf,.yui-gc .yui-u,.yui-gc .yui-g,.yui-gd .yui-u{float:left;}.yui-g .yui-u,.yui-g .yui-g,.yui-g .yui-gb,.yui-g .yui-gc,.yui-g .yui-gd,.yui-g .yui-ge,.yui-g .yui-gf,.yui-gc .yui-u,.yui-gd .yui-g,.yui-g .yui-gc .yui-u,.yui-ge .yui-u,.yui-ge .yui-g,.yui-gf .yui-g,.yui-gf .yui-u{float:right;}.yui-g div.first,.yui-gb div.first,.yui-gc div.first,.yui-gd div.first,.yui-ge div.first,.yui-gf div.first,.yui-g .yui-gc div.first,.yui-g .yui-ge div.first,.yui-gc div.first div.first{float:left;}.yui-g .yui-u,.yui-g .yui-g,.yui-g .yui-gb,.yui-g .yui-gc,.yui-g .yui-gd,.yui-g .yui-ge,.yui-g .yui-gf{width:49.1%;}.yui-gb .yui-u,.yui-g .yui-gb .yui-u,.yui-gb .yui-g,.yui-gb .yui-gb,.yui-gb .yui-gc,.yui-gb .yui-gd,.yui-gb .yui-ge,.yui-gb .yui-gf,.yui-gc .yui-u,.yui-gc .yui-g,.yui-gd .yui-u{width:32%;margin-left:1.99%;}.yui-gb .yui-u{*margin-left:1.9%;*width:31.9%;}.yui-gc div.first,.yui-gd .yui-u{width:66%;}.yui-gd div.first{width:32%;}.yui-ge div.first,.yui-gf .yui-u{width:74.2%;}.yui-ge .yui-u,.yui-gf div.first{width:24%;}.yui-g .yui-gb div.first,.yui-gb div.first,.yui-gc div.first,.yui-gd div.first{margin-left:0;}.yui-g .yui-g .yui-u,.yui-gb .yui-g .yui-u,.yui-gc .yui-g .yui-u,.yui-gd .yui-g .yui-u,.yui-ge .yui-g .yui-u,.yui-gf .yui-g .yui-u{width:49%;*width:48.1%;*margin-left:0;}.yui-g .yui-g .yui-u{width:48.1%;}.yui-g .yui-gb div.first,.yui-gb .yui-gb div.first{*margin-right:0;*width:32%;_width:31.7%;}.yui-g .yui-gc div.first,.yui-gd .yui-g{width:66%;}.yui-gb .yui-g div.first{*margin-right:4%;_margin-right:1.3%;}.yui-gb .yui-gc div.first,.yui-gb .yui-gd div.first{*margin-right:0;}.yui-gb .yui-gb .yui-u,.yui-gb .yui-gc .yui-u{*margin-left:1.8%;_margin-left:4%;}.yui-g .yui-gb .yui-u{_margin-left:1.0%;}.yui-gb .yui-gd .yui-u{*width:66%;_width:61.2%;}.yui-gb .yui-gd div.first{*width:31%;_width:29.5%;}.yui-g .yui-gc .yui-u,.yui-gb .yui-gc .yui-u{width:32%;_float:right;margin-right:0;_margin-left:0;}.yui-gb .yui-gc div.first{width:66%;*float:left;*margin-left:0;}.yui-gb .yui-ge .yui-u,.yui-gb .yui-gf .yui-u{margin:0;}.yui-gb .yui-gb .yui-u{_margin-left:.7%;}.yui-gb .yui-g div.first,.yui-gb .yui-gb div.first{*margin-left:0;}.yui-gc .yui-g .yui-u,.yui-gd .yui-g .yui-u{*width:48.1%;*margin-left:0;}.yui-gb .yui-gd div.first{width:32%;}.yui-g .yui-gd div.first{_width:29.9%;}.yui-ge .yui-g{width:24%;}.yui-gf .yui-g{width:74.2%;}.yui-gb .yui-ge div.yui-u,.yui-gb .yui-gf div.yui-u{float:right;}.yui-gb .yui-ge div.first,.yui-gb .yui-gf div.first{float:left;}.yui-gb .yui-ge .yui-u,.yui-gb .yui-gf div.first{*width:24%;_width:20%;}.yui-gb .yui-ge div.first,.yui-gb .yui-gf .yui-u{*width:73.5%;_width:65.5%;}.yui-ge div.first .yui-gd .yui-u{width:65%;}.yui-ge div.first .yui-gd div.first{width:32%;}#hd:after,#bd:after,#ft:after,.yui-g:after,.yui-gb:after,.yui-gc:after,.yui-gd:after,.yui-ge:after,.yui-gf:after{content:".";display:block;height:0;clear:both;visibility:hidden;}#hd,#bd,#ft,.yui-g,.yui-gb,.yui-gc,.yui-gd,.yui-ge,.yui-gf{zoom:1;}/*
1019 1013 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
1020 1014 Code licensed under the BSD License:
1021 1015 http://developer.yahoo.net/yui/license.txt
1022 1016 version: 2.7.0
1023 1017 */
1024   -body{text-align:center;}#doc,#doc2,#doc3,#doc4,.yui-t1,.yui-t2,.yui-t3,.yui-t4,.yui-t5,.yui-t6,.yui-t7{margin:auto;text-align:left;width:57.69em;*width:56.25em;}#doc2{width:73.076em;*width:71.25em;}#doc3{margin:auto 10px;width:auto;}#doc4{width:74.923em;*width:73.05em;}.yui-b{position:relative;}.yui-b{_position:static;}#yui-main .yui-b{position:static;}#yui-main,.yui-g .yui-u .yui-g{width:100%;}.yui-t1 #yui-main,.yui-t2 #yui-main,.yui-t3 #yui-main{float:right;margin-left:-25em;}.yui-t4 #yui-main,.yui-t5 #yui-main,.yui-t6 #yui-main{float:left;margin-right:-25em;}.yui-t1 .yui-b{float:left;width:12.30769em;*width:12.00em;}.yui-t1 #yui-main .yui-b{margin-left:13.30769em;*margin-left:13.05em;}.yui-t2 .yui-b{float:left;width:13.8461em;*width:13.50em;}.yui-t2 #yui-main .yui-b{margin-left:14.8461em;*margin-left:14.55em;}.yui-t3 .yui-b{float:left;width:23.0769em;*width:22.50em;}.yui-t3 #yui-main .yui-b{margin-left:24.0769em;*margin-left:23.62em;}.yui-t4 .yui-b{float:right;width:13.8456em;*width:13.50em;}.yui-t4 #yui-main .yui-b{margin-right:14.8456em;*margin-right:14.55em;}.yui-t5 .yui-b{float:right;width:18.4615em;*width:18.00em;}.yui-t5 #yui-main .yui-b{margin-right:19.4615em;*margin-right:19.125em;}.yui-t6 .yui-b{float:right;width:23.0769em;*width:22.50em;}.yui-t6 #yui-main .yui-b{margin-right:24.0769em;*margin-right:23.62em;}.yui-t7 #yui-main .yui-b{display:block;margin:0 0 1em 0;}#yui-main .yui-b{float:none;width:auto;}.yui-gb .yui-u,.yui-g .yui-gb .yui-u,.yui-gb .yui-g,.yui-gb .yui-gb,.yui-gb .yui-gc,.yui-gb .yui-gd,.yui-gb .yui-ge,.yui-gb .yui-gf,.yui-gc .yui-u,.yui-gc .yui-g,.yui-gd .yui-u{float:left;}.yui-g .yui-u,.yui-g .yui-g,.yui-g .yui-gb,.yui-g .yui-gc,.yui-g .yui-gd,.yui-g .yui-ge,.yui-g .yui-gf,.yui-gc .yui-u,.yui-gd .yui-g,.yui-g .yui-gc .yui-u,.yui-ge .yui-u,.yui-ge .yui-g,.yui-gf .yui-g,.yui-gf .yui-u{float:right;}.yui-g div.first,.yui-gb div.first,.yui-gc div.first,.yui-gd div.first,.yui-ge div.first,.yui-gf div.first,.yui-g .yui-gc div.first,.yui-g .yui-ge div.first,.yui-gc div.first div.first{float:left;}.yui-g .yui-u,.yui-g .yui-g,.yui-g .yui-gb,.yui-g .yui-gc,.yui-g .yui-gd,.yui-g .yui-ge,.yui-g .yui-gf{width:49.1%;}.yui-gb .yui-u,.yui-g .yui-gb .yui-u,.yui-gb .yui-g,.yui-gb .yui-gb,.yui-gb .yui-gc,.yui-gb .yui-gd,.yui-gb .yui-ge,.yui-gb .yui-gf,.yui-gc .yui-u,.yui-gc .yui-g,.yui-gd .yui-u{width:32%;margin-left:1.99%;}.yui-gb .yui-u{*margin-left:1.9%;*width:31.9%;}.yui-gc div.first,.yui-gd .yui-u{width:66%;}.yui-gd div.first{width:32%;}.yui-ge div.first,.yui-gf .yui-u{width:74.2%;}.yui-ge .yui-u,.yui-gf div.first{width:24%;}.yui-g .yui-gb div.first,.yui-gb div.first,.yui-gc div.first,.yui-gd div.first{margin-left:0;}.yui-g .yui-g .yui-u,.yui-gb .yui-g .yui-u,.yui-gc .yui-g .yui-u,.yui-gd .yui-g .yui-u,.yui-ge .yui-g .yui-u,.yui-gf .yui-g .yui-u{width:49%;*width:48.1%;*margin-left:0;}.yui-g .yui-g .yui-u{width:48.1%;}.yui-g .yui-gb div.first,.yui-gb .yui-gb div.first{*margin-right:0;*width:32%;_width:31.7%;}.yui-g .yui-gc div.first,.yui-gd .yui-g{width:66%;}.yui-gb .yui-g div.first{*margin-right:4%;_margin-right:1.3%;}.yui-gb .yui-gc div.first,.yui-gb .yui-gd div.first{*margin-right:0;}.yui-gb .yui-gb .yui-u,.yui-gb .yui-gc .yui-u{*margin-left:1.8%;_margin-left:4%;}.yui-g .yui-gb .yui-u{_margin-left:1.0%;}.yui-gb .yui-gd .yui-u{*width:66%;_width:61.2%;}.yui-gb .yui-gd div.first{*width:31%;_width:29.5%;}.yui-g .yui-gc .yui-u,.yui-gb .yui-gc .yui-u{width:32%;_float:right;margin-right:0;_margin-left:0;}.yui-gb .yui-gc div.first{width:66%;*float:left;*margin-left:0;}.yui-gb .yui-ge .yui-u,.yui-gb .yui-gf .yui-u{margin:0;}.yui-gb .yui-gb .yui-u{_margin-left:.7%;}.yui-gb .yui-g div.first,.yui-gb .yui-gb div.first{*margin-left:0;}.yui-gc .yui-g .yui-u,.yui-gd .yui-g .yui-u{*width:48.1%;*margin-left:0;}.yui-gb .yui-gd div.first{width:32%;}.yui-g .yui-gd div.first{_width:29.9%;}.yui-ge .yui-g{width:24%;}.yui-gf .yui-g{width:74.2%;}.yui-gb .yui-ge div.yui-u,.yui-gb .yui-gf div.yui-u{float:right;}.yui-gb .yui-ge div.first,.yui-gb .yui-gf div.first{float:left;}.yui-gb .yui-ge .yui-u,.yui-gb .yui-gf div.first{*width:24%;_width:20%;}.yui-gb .yui-ge div.first,.yui-gb .yui-gf .yui-u{*width:73.5%;_width:65.5%;}.yui-ge div.first .yui-gd .yui-u{width:65%;}.yui-ge div.first .yui-gd div.first{width:32%;}#hd:after,#bd:after,#ft:after,.yui-g:after,.yui-gb:after,.yui-gc:after,.yui-gd:after,.yui-ge:after,.yui-gf:after{content:".";display:block;height:0;clear:both;visibility:hidden;}#hd,#bd,#ft,.yui-g,.yui-gb,.yui-gc,.yui-gd,.yui-ge,.yui-gf{zoom:1;}
1025   -/*
  1018 +body{text-align:center;}#doc,#doc2,#doc3,#doc4,.yui-t1,.yui-t2,.yui-t3,.yui-t4,.yui-t5,.yui-t6,.yui-t7{margin:auto;text-align:left;width:57.69em;*width:56.25em;}#doc2{width:73.076em;*width:71.25em;}#doc3{margin:auto 10px;width:auto;}#doc4{width:74.923em;*width:73.05em;}.yui-b{position:relative;}.yui-b{_position:static;}#yui-main .yui-b{position:static;}#yui-main,.yui-g .yui-u .yui-g{width:100%;}.yui-t1 #yui-main,.yui-t2 #yui-main,.yui-t3 #yui-main{float:right;margin-left:-25em;}.yui-t4 #yui-main,.yui-t5 #yui-main,.yui-t6 #yui-main{float:left;margin-right:-25em;}.yui-t1 .yui-b{float:left;width:12.30769em;*width:12.00em;}.yui-t1 #yui-main .yui-b{margin-left:13.30769em;*margin-left:13.05em;}.yui-t2 .yui-b{float:left;width:13.8461em;*width:13.50em;}.yui-t2 #yui-main .yui-b{margin-left:14.8461em;*margin-left:14.55em;}.yui-t3 .yui-b{float:left;width:23.0769em;*width:22.50em;}.yui-t3 #yui-main .yui-b{margin-left:24.0769em;*margin-left:23.62em;}.yui-t4 .yui-b{float:right;width:13.8456em;*width:13.50em;}.yui-t4 #yui-main .yui-b{margin-right:14.8456em;*margin-right:14.55em;}.yui-t5 .yui-b{float:right;width:18.4615em;*width:18.00em;}.yui-t5 #yui-main .yui-b{margin-right:19.4615em;*margin-right:19.125em;}.yui-t6 .yui-b{float:right;width:23.0769em;*width:22.50em;}.yui-t6 #yui-main .yui-b{margin-right:24.0769em;*margin-right:23.62em;}.yui-t7 #yui-main .yui-b{display:block;margin:0 0 1em 0;}#yui-main .yui-b{float:none;width:auto;}.yui-gb .yui-u,.yui-g .yui-gb .yui-u,.yui-gb .yui-g,.yui-gb .yui-gb,.yui-gb .yui-gc,.yui-gb .yui-gd,.yui-gb .yui-ge,.yui-gb .yui-gf,.yui-gc .yui-u,.yui-gc .yui-g,.yui-gd .yui-u{float:left;}.yui-g .yui-u,.yui-g .yui-g,.yui-g .yui-gb,.yui-g .yui-gc,.yui-g .yui-gd,.yui-g .yui-ge,.yui-g .yui-gf,.yui-gc .yui-u,.yui-gd .yui-g,.yui-g .yui-gc .yui-u,.yui-ge .yui-u,.yui-ge .yui-g,.yui-gf .yui-g,.yui-gf .yui-u{float:right;}.yui-g div.first,.yui-gb div.first,.yui-gc div.first,.yui-gd div.first,.yui-ge div.first,.yui-gf div.first,.yui-g .yui-gc div.first,.yui-g .yui-ge div.first,.yui-gc div.first div.first{float:left;}.yui-g .yui-u,.yui-g .yui-g,.yui-g .yui-gb,.yui-g .yui-gc,.yui-g .yui-gd,.yui-g .yui-ge,.yui-g .yui-gf{width:49.1%;}.yui-gb .yui-u,.yui-g .yui-gb .yui-u,.yui-gb .yui-g,.yui-gb .yui-gb,.yui-gb .yui-gc,.yui-gb .yui-gd,.yui-gb .yui-ge,.yui-gb .yui-gf,.yui-gc .yui-u,.yui-gc .yui-g,.yui-gd .yui-u{width:32%;margin-left:1.99%;}.yui-gb .yui-u{*margin-left:1.9%;*width:31.9%;}.yui-gc div.first,.yui-gd .yui-u{width:66%;}.yui-gd div.first{width:32%;}.yui-ge div.first,.yui-gf .yui-u{width:74.2%;}.yui-ge .yui-u,.yui-gf div.first{width:24%;}.yui-g .yui-gb div.first,.yui-gb div.first,.yui-gc div.first,.yui-gd div.first{margin-left:0;}.yui-g .yui-g .yui-u,.yui-gb .yui-g .yui-u,.yui-gc .yui-g .yui-u,.yui-gd .yui-g .yui-u,.yui-ge .yui-g .yui-u,.yui-gf .yui-g .yui-u{width:49%;*width:48.1%;*margin-left:0;}.yui-g .yui-g .yui-u{width:48.1%;}.yui-g .yui-gb div.first,.yui-gb .yui-gb div.first{*margin-right:0;*width:32%;_width:31.7%;}.yui-g .yui-gc div.first,.yui-gd .yui-g{width:66%;}.yui-gb .yui-g div.first{*margin-right:4%;_margin-right:1.3%;}.yui-gb .yui-gc div.first,.yui-gb .yui-gd div.first{*margin-right:0;}.yui-gb .yui-gb .yui-u,.yui-gb .yui-gc .yui-u{*margin-left:1.8%;_margin-left:4%;}.yui-g .yui-gb .yui-u{_margin-left:1.0%;}.yui-gb .yui-gd .yui-u{*width:66%;_width:61.2%;}.yui-gb .yui-gd div.first{*width:31%;_width:29.5%;}.yui-g .yui-gc .yui-u,.yui-gb .yui-gc .yui-u{width:32%;_float:right;margin-right:0;_margin-left:0;}.yui-gb .yui-gc div.first{width:66%;*float:left;*margin-left:0;}.yui-gb .yui-ge .yui-u,.yui-gb .yui-gf .yui-u{margin:0;}.yui-gb .yui-gb .yui-u{_margin-left:.7%;}.yui-gb .yui-g div.first,.yui-gb .yui-gb div.first{*margin-left:0;}.yui-gc .yui-g .yui-u,.yui-gd .yui-g .yui-u{*width:48.1%;*margin-left:0;}.yui-gb .yui-gd div.first{width:32%;}.yui-g .yui-gd div.first{_width:29.9%;}.yui-ge .yui-g{width:24%;}.yui-gf .yui-g{width:74.2%;}.yui-gb .yui-ge div.yui-u,.yui-gb .yui-gf div.yui-u{float:right;}.yui-gb .yui-ge div.first,.yui-gb .yui-gf div.first{float:left;}.yui-gb .yui-ge .yui-u,.yui-gb .yui-gf div.first{*width:24%;_width:20%;}.yui-gb .yui-ge div.first,.yui-gb .yui-gf .yui-u{*width:73.5%;_width:65.5%;}.yui-ge div.first .yui-gd .yui-u{width:65%;}.yui-ge div.first .yui-gd div.first{width:32%;}#hd:after,#bd:after,#ft:after,.yui-g:after,.yui-gb:after,.yui-gc:after,.yui-gd:after,.yui-ge:after,.yui-gf:after{content:".";display:block;height:0;clear:both;visibility:hidden;}#hd,#bd,#ft,.yui-g,.yui-gb,.yui-gc,.yui-gd,.yui-ge,.yui-gf{zoom:1;}/*
1026 1019 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
1027 1020 Code licensed under the BSD License:
1028 1021 http://developer.yahoo.net/yui/license.txt
1029 1022 version: 2.7.0
1030 1023 */
1031 1024 .yuimenu{top:-999em;left:-999em;}.yuimenubar{position:static;}.yuimenu .yuimenu,.yuimenubar .yuimenu{position:absolute;}.yuimenubar li,.yuimenu li{list-style-type:none;}.yuimenubar ul,.yuimenu ul,.yuimenubar li,.yuimenu li,.yuimenu h6,.yuimenubar h6{margin:0;padding:0;}.yuimenuitemlabel,.yuimenubaritemlabel{text-align:left;white-space:nowrap;}.yuimenubar ul{*zoom:1;}.yuimenubar .yuimenu ul{*zoom:normal;}.yuimenubar>.bd>ul:after{content:".";display:block;clear:both;visibility:hidden;height:0;line-height:0;}.yuimenubaritem{float:left;}.yuimenubaritemlabel,.yuimenuitemlabel{display:block;}.yuimenuitemlabel .helptext{font-style:normal;display:block;margin:-1em 0 0 10em;}.yui-menu-shadow{position:absolute;visibility:hidden;z-index:-1;}.yui-menu-shadow-visible{top:2px;right:-3px;left:-3px;bottom:-3px;visibility:visible;}.hide-scrollbars *{overflow:hidden;}.hide-scrollbars select{display:none;}.yuimenu.show-scrollbars,.yuimenubar.show-scrollbars{overflow:visible;}.yuimenu.hide-scrollbars .yui-menu-shadow,.yuimenubar.hide-scrollbars .yui-menu-shadow{overflow:hidden;}.yuimenu.show-scrollbars .yui-menu-shadow,.yuimenubar.show-scrollbars .yui-menu-shadow{overflow:auto;}.yui-overlay.yui-force-redraw{margin-bottom:1px;}.yui-skin-sam .yuimenubar{font-size:93%;line-height:2;*line-height:1.9;border:solid 1px #808080;background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0;}.yui-skin-sam .yuimenubarnav .yuimenubaritem{border-right:solid 1px #ccc;}.yui-skin-sam .yuimenubaritemlabel{padding:0 10px;color:#000;text-decoration:none;cursor:default;border-style:solid;border-color:#808080;border-width:1px 0;*position:relative;margin:-1px 0;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel{padding-right:20px;*display:inline-block;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel-hassubmenu{background:url(menubaritem_submenuindicator.png) right center no-repeat;}.yui-skin-sam .yuimenubaritem-selected{background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 -1700px;}.yui-skin-sam .yuimenubaritemlabel-selected{border-color:#7D98B8;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel-selected{border-left-width:1px;margin-left:-1px;*left:-1px;}.yui-skin-sam .yuimenubaritemlabel-disabled{cursor:default;color:#A6A6A6;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel-hassubmenu-disabled{background-image:url(menubaritem_submenuindicator_disabled.png);}.yui-skin-sam .yuimenu{font-size:93%;line-height:1.5;*line-height:1.45;}.yui-skin-sam .yuimenubar .yuimenu,.yui-skin-sam .yuimenu .yuimenu{font-size:100%;}.yui-skin-sam .yuimenu .bd{*zoom:1;_zoom:normal;border:solid 1px #808080;background-color:#fff;}.yui-skin-sam .yuimenu .yuimenu .bd{*zoom:normal;}.yui-skin-sam .yuimenu ul{padding:3px 0;border-width:1px 0 0 0;border-color:#ccc;border-style:solid;}.yui-skin-sam .yuimenu ul.first-of-type{border-width:0;}.yui-skin-sam .yuimenu h6{font-weight:bold;border-style:solid;border-color:#ccc;border-width:1px 0 0 0;color:#a4a4a4;padding:3px 10px 0 10px;}.yui-skin-sam .yuimenu ul.hastitle,.yui-skin-sam .yuimenu h6.first-of-type{border-width:0;}.yui-skin-sam .yuimenu .yui-menu-body-scrolled{border-color:#ccc #808080;overflow:hidden;}.yui-skin-sam .yuimenu .topscrollbar,.yui-skin-sam .yuimenu .bottomscrollbar{height:16px;border:solid 1px #808080;background:#fff url(../../../../assets/skins/sam/sprite.png) no-repeat 0 0;}.yui-skin-sam .yuimenu .topscrollbar{border-bottom-width:0;background-position:center -950px;}.yui-skin-sam .yuimenu .topscrollbar_disabled{background-position:center -975px;}.yui-skin-sam .yuimenu .bottomscrollbar{border-top-width:0;background-position:center -850px;}.yui-skin-sam .yuimenu .bottomscrollbar_disabled{background-position:center -875px;}.yui-skin-sam .yuimenuitem{_border-bottom:solid 1px #fff;}.yui-skin-sam .yuimenuitemlabel{padding:0 20px;color:#000;text-decoration:none;cursor:default;}.yui-skin-sam .yuimenuitemlabel .helptext{margin-top:-1.5em;*margin-top:-1.45em;}.yui-skin-sam .yuimenuitem-hassubmenu{background-image:url(menuitem_submenuindicator.png);background-position:right center;background-repeat:no-repeat;}.yui-skin-sam .yuimenuitem-checked{background-image:url(menuitem_checkbox.png);background-position:left center;background-repeat:no-repeat;}.yui-skin-sam .yui-menu-shadow-visible{background-color:#000;opacity:.12;filter:alpha(opacity=12);}.yui-skin-sam .yuimenuitem-selected{background-color:#B3D4FF;}.yui-skin-sam .yuimenuitemlabel-disabled{cursor:default;color:#A6A6A6;}.yui-skin-sam .yuimenuitem-hassubmenu-disabled{background-image:url(menuitem_submenuindicator_disabled.png);}.yui-skin-sam .yuimenuitem-checked-disabled{background-image:url(menuitem_checkbox_disabled.png);}
1032   -
1033 1025 /*
1034 1026 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
1035 1027 Code licensed under the BSD License:
... ... @@ -1037,7 +1029,6 @@ http://developer.yahoo.net/yui/license.txt
1037 1029 version: 2.7.0
1038 1030 */
1039 1031 .yui-skin-sam .yui-ac{position:relative;font-family:arial;font-size:100%;}.yui-skin-sam .yui-ac-input{position:absolute;width:100%;}.yui-skin-sam .yui-ac-container{position:absolute;top:1.6em;width:100%;}.yui-skin-sam .yui-ac-content{position:absolute;width:100%;border:1px solid #808080;background:#fff;overflow:hidden;z-index:9050;}.yui-skin-sam .yui-ac-shadow{position:absolute;margin:.3em;width:100%;background:#000;-moz-opacity:.10;opacity:.10;filter:alpha(opacity=10);z-index:9049;}.yui-skin-sam .yui-ac iframe{opacity:0;filter:alpha(opacity=0);padding-right:.3em;padding-bottom:.3em;}.yui-skin-sam .yui-ac-content ul{margin:0;padding:0;width:100%;}.yui-skin-sam .yui-ac-content li{margin:0;padding:2px 5px;cursor:default;white-space:nowrap;list-style:none;zoom:1;}.yui-skin-sam .yui-ac-content li.yui-ac-prehighlight{background:#B3D4FF;}.yui-skin-sam .yui-ac-content li.yui-ac-highlight{background:#426FD9;color:#FFF;}
1040   -
1041 1032 /*
1042 1033 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
1043 1034 Code licensed under the BSD License:
... ... @@ -1045,7 +1036,6 @@ http://developer.yahoo.net/yui/license.txt
1045 1036 version: 2.7.0
1046 1037 */
1047 1038 .yui-overlay,.yui-panel-container{visibility:hidden;position:absolute;z-index:2;}.yui-panel{position:relative;}.yui-panel-container form{margin:0;}.mask{z-index:1;display:none;position:absolute;top:0;left:0;right:0;bottom:0;}.mask.block-scrollbars{overflow:auto;}.masked select,.drag select,.hide-select select{_visibility:hidden;}.yui-panel-container select{_visibility:inherit;}.hide-scrollbars,.hide-scrollbars *{overflow:hidden;}.hide-scrollbars select{display:none;}.show-scrollbars{overflow:auto;}.yui-panel-container.show-scrollbars,.yui-tt.show-scrollbars{overflow:visible;}.yui-panel-container.show-scrollbars .underlay,.yui-tt.show-scrollbars .yui-tt-shadow{overflow:auto;}.yui-panel-container.shadow .underlay.yui-force-redraw{padding-bottom:1px;}.yui-effect-fade .underlay,.yui-effect-fade .yui-tt-shadow{display:none;}.yui-tt-shadow{position:absolute;}.yui-override-padding{padding:0!important;}.yui-panel-container .container-close{overflow:hidden;text-indent:-10000em;text-decoration:none;}.yui-overlay.yui-force-redraw,.yui-panel-container.yui-force-redraw{margin-bottom:1px;}.yui-skin-sam .mask{background-color:#000;opacity:.25;filter:alpha(opacity=25);}.yui-skin-sam .yui-panel-container{padding:0 1px;*padding:2px;}.yui-skin-sam .yui-panel{position:relative;left:0;top:0;border-style:solid;border-width:1px 0;border-color:#808080;z-index:1;*border-width:1px;*zoom:1;_zoom:normal;}.yui-skin-sam .yui-panel .hd,.yui-skin-sam .yui-panel .bd,.yui-skin-sam .yui-panel .ft{border-style:solid;border-width:0 1px;border-color:#808080;margin:0 -1px;*margin:0;*border:0;}.yui-skin-sam .yui-panel .hd{border-bottom:solid 1px #ccc;}.yui-skin-sam .yui-panel .bd,.yui-skin-sam .yui-panel .ft{background-color:#F2F2F2;}.yui-skin-sam .yui-panel .hd{padding:0 10px;font-size:93%;line-height:2;*line-height:1.9;font-weight:bold;color:#000;background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 -200px;}.yui-skin-sam .yui-panel .bd{padding:10px;}.yui-skin-sam .yui-panel .ft{border-top:solid 1px #808080;padding:5px 10px;font-size:77%;}.yui-skin-sam .container-close{position:absolute;top:5px;right:6px;width:25px;height:15px;background:url(../../../../assets/skins/sam/sprite.png) no-repeat 0 -300px;cursor:pointer;}.yui-skin-sam .yui-panel-container .underlay{right:-1px;left:-1px;}.yui-skin-sam .yui-panel-container.matte{padding:9px 10px;background-color:#fff;}.yui-skin-sam .yui-panel-container.shadow{_padding:2px 4px 0 2px;}.yui-skin-sam .yui-panel-container.shadow .underlay{position:absolute;top:2px;left:-3px;right:-3px;bottom:-3px;*top:4px;*left:-1px;*right:-1px;*bottom:-1px;_top:0;_left:0;_right:0;_bottom:0;_margin-top:3px;_margin-left:-1px;background-color:#000;opacity:.12;filter:alpha(opacity=12);}.yui-skin-sam .yui-dialog .ft{border-top:none;padding:0 10px 10px 10px;font-size:100%;}.yui-skin-sam .yui-dialog .ft .button-group{display:block;text-align:right;}.yui-skin-sam .yui-dialog .ft button.default{font-weight:bold;}.yui-skin-sam .yui-dialog .ft span.default{border-color:#304369;background-position:0 -1400px;}.yui-skin-sam .yui-dialog .ft span.default .first-child{border-color:#304369;}.yui-skin-sam .yui-dialog .ft span.default button{color:#fff;}.yui-skin-sam .yui-dialog .ft span.yui-button-disabled{background-position:0 -1500px;border-color:#ccc;}.yui-skin-sam .yui-dialog .ft span.yui-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-dialog .ft span.yui-button-disabled button{color:#a6a6a6;}.yui-skin-sam .yui-simple-dialog .bd .yui-icon{background:url(../../../../assets/skins/sam/sprite.png) no-repeat 0 0;width:16px;height:16px;margin-right:10px;float:left;}.yui-skin-sam .yui-simple-dialog .bd span.blckicon{background-position:0 -1100px;}.yui-skin-sam .yui-simple-dialog .bd span.alrticon{background-position:0 -1050px;}.yui-skin-sam .yui-simple-dialog .bd span.hlpicon{background-position:0 -1150px;}.yui-skin-sam .yui-simple-dialog .bd span.infoicon{background-position:0 -1200px;}.yui-skin-sam .yui-simple-dialog .bd span.warnicon{background-position:0 -1900px;}.yui-skin-sam .yui-simple-dialog .bd span.tipicon{background-position:0 -1250px;}.yui-skin-sam .yui-tt .bd{position:relative;top:0;left:0;z-index:1;color:#000;padding:2px 5px;border-color:#D4C237 #A6982B #A6982B #A6982B;border-width:1px;border-style:solid;background-color:#FFEE69;}.yui-skin-sam .yui-tt.show-scrollbars .bd{overflow:auto;}.yui-skin-sam .yui-tt-shadow{top:2px;right:-3px;left:-3px;bottom:-3px;background-color:#000;}.yui-skin-sam .yui-tt-shadow-visible{opacity:.12;filter:alpha(opacity=12);}
1048   -
1049 1039 /*
1050 1040 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
1051 1041 Code licensed under the BSD License:
... ... @@ -1054,7 +1044,6 @@ version: 2.7.0
1054 1044 */
1055 1045 .yui-navset .yui-nav li,.yui-navset .yui-navset-top .yui-nav li,.yui-navset .yui-navset-bottom .yui-nav li{margin:0 .5em 0 0;}.yui-navset-left .yui-nav li,.yui-navset-right .yui-nav li{margin:0 0 .5em;}.yui-navset .yui-content .yui-hidden{position:absolute;left:-999999px;visibility:hidden;}.yui-navset .yui-navset-left .yui-nav,.yui-navset .yui-navset-right .yui-nav,.yui-navset-left .yui-nav,.yui-navset-right .yui-nav{width:6em;}.yui-navset-top .yui-nav,.yui-navset-bottom .yui-nav{width:auto;}.yui-navset .yui-navset-left,.yui-navset-left{padding:0 0 0 6em;}.yui-navset-right{padding:0 6em 0 0;}.yui-navset-top,.yui-navset-bottom{padding:auto;}.yui-nav,.yui-nav li{margin:0;padding:0;list-style:none;}.yui-navset li em{font-style:normal;}.yui-navset{position:relative;zoom:1;}.yui-navset .yui-content,.yui-navset .yui-content div{zoom:1;}.yui-navset .yui-content:after{content:'';display:block;clear:both;}.yui-navset .yui-nav li,.yui-navset .yui-navset-top .yui-nav li,.yui-navset .yui-navset-bottom .yui-nav li{display:inline-block;display:-moz-inline-stack;*display:inline;vertical-align:bottom;cursor:pointer;zoom:1;}.yui-navset-left .yui-nav li,.yui-navset-right .yui-nav li{display:block;}.yui-navset .yui-nav a{position:relative;}.yui-navset .yui-nav li a,.yui-navset-top .yui-nav li a,.yui-navset-bottom .yui-nav li a{display:block;display:inline-block;vertical-align:bottom;zoom:1;}.yui-navset-left .yui-nav li a,.yui-navset-right .yui-nav li a{display:block;}.yui-navset-bottom .yui-nav li a{vertical-align:text-top;}.yui-navset .yui-nav li a em,.yui-navset-top .yui-nav li a em,.yui-navset-bottom .yui-nav li a em{display:block;}.yui-navset .yui-navset-left .yui-nav,.yui-navset .yui-navset-right .yui-nav,.yui-navset-left .yui-nav,.yui-navset-right .yui-nav{position:absolute;z-index:1;}.yui-navset-top .yui-nav,.yui-navset-bottom .yui-nav{position:static;}.yui-navset .yui-navset-left .yui-nav,.yui-navset-left .yui-nav{left:0;right:auto;}.yui-navset .yui-navset-right .yui-nav,.yui-navset-right .yui-nav{right:0;left:auto;}.yui-skin-sam .yui-navset .yui-nav,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav{border:solid #2647a0;border-width:0 0 5px;zoom:1;}.yui-skin-sam .yui-navset .yui-nav li,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav li{margin:0 .16em 0 0;padding:1px 0 0;zoom:1;}.yui-skin-sam .yui-navset .yui-nav .selected,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav .selected{margin:0 .16em -1px 0;}.yui-skin-sam .yui-navset .yui-nav a,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav a{background:#d8d8d8 url(../../../../assets/skins/sam/sprite.png) repeat-x;border:solid #a3a3a3;border-width:0 1px;color:#000;position:relative;text-decoration:none;}.yui-skin-sam .yui-navset .yui-nav a em,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav a em{border:solid #a3a3a3;border-width:1px 0 0;cursor:hand;padding:.25em .75em;left:0;right:0;bottom:0;top:-1px;position:relative;}.yui-skin-sam .yui-navset .yui-nav .selected a,.yui-skin-sam .yui-navset .yui-nav .selected a:focus,.yui-skin-sam .yui-navset .yui-nav .selected a:hover{background:#2647a0 url(../../../../assets/skins/sam/sprite.png) repeat-x left -1400px;color:#fff;}.yui-skin-sam .yui-navset .yui-nav a:hover,.yui-skin-sam .yui-navset .yui-nav a:focus{background:#bfdaff url(../../../../assets/skins/sam/sprite.png) repeat-x left -1300px;outline:0;}.yui-skin-sam .yui-navset .yui-nav .selected a em{padding:.35em .75em;}.yui-skin-sam .yui-navset .yui-nav .selected a,.yui-skin-sam .yui-navset .yui-nav .selected a em{border-color:#243356;}.yui-skin-sam .yui-navset .yui-content{background:#edf5ff;}.yui-skin-sam .yui-navset .yui-content,.yui-skin-sam .yui-navset .yui-navset-top .yui-content{border:1px solid #808080;border-top-color:#243356;padding:.25em .5em;}.yui-skin-sam .yui-navset-left .yui-nav,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav,.yui-skin-sam .yui-navset .yui-navset-right .yui-nav,.yui-skin-sam .yui-navset-right .yui-nav{border-width:0 5px 0 0;Xposition:absolute;top:0;bottom:0;}.yui-skin-sam .yui-navset .yui-navset-right .yui-nav,.yui-skin-sam .yui-navset-right .yui-nav{border-width:0 0 0 5px;}.yui-skin-sam .yui-navset-left .yui-nav li,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav li,.yui-skin-sam .yui-navset-right .yui-nav li{margin:0 0 .16em;padding:0 0 0 1px;}.yui-skin-sam .yui-navset-right .yui-nav li{padding:0 1px 0 0;}.yui-skin-sam .yui-navset-left .yui-nav .selected,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav .selected{margin:0 -1px .16em 0;}.yui-skin-sam .yui-navset-right .yui-nav .selected{margin:0 0 .16em -1px;}.yui-skin-sam .yui-navset-left .yui-nav a,.yui-skin-sam .yui-navset-right .yui-nav a{border-width:1px 0;}.yui-skin-sam .yui-navset-left .yui-nav a em,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav a em,.yui-skin-sam .yui-navset-right .yui-nav a em{border-width:0 0 0 1px;padding:.2em .75em;top:auto;left:-1px;}.yui-skin-sam .yui-navset-right .yui-nav a em{border-width:0 1px 0 0;left:auto;right:-1px;}.yui-skin-sam .yui-navset-left .yui-nav a,.yui-skin-sam .yui-navset-left .yui-nav .selected a,.yui-skin-sam .yui-navset-left .yui-nav a:hover,.yui-skin-sam .yui-navset-right .yui-nav a,.yui-skin-sam .yui-navset-right .yui-nav .selected a,.yui-skin-sam .yui-navset-right .yui-nav a:hover,.yui-skin-sam .yui-navset-bottom .yui-nav a,.yui-skin-sam .yui-navset-bottom .yui-nav .selected a,.yui-skin-sam .yui-navset-bottom .yui-nav a:hover{background-image:none;}.yui-skin-sam .yui-navset-left .yui-content{border:1px solid #808080;border-left-color:#243356;}.yui-skin-sam .yui-navset-bottom .yui-nav,.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav{border-width:5px 0 0;}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav .selected,.yui-skin-sam .yui-navset-bottom .yui-nav .selected{margin:-1px .16em 0 0;}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav li,.yui-skin-sam .yui-navset-bottom .yui-nav li{padding:0 0 1px 0;vertical-align:top;}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav a em,.yui-skin-sam .yui-navset-bottom .yui-nav a em{border-width:0 0 1px;top:auto;bottom:-1px;}
1056 1046 .yui-skin-sam .yui-navset-bottom .yui-content,.yui-skin-sam .yui-navset .yui-navset-bottom .yui-content{border:1px solid #808080;border-bottom-color:#243356;}
1057   -
1058 1047 /*
1059 1048 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
1060 1049 Code licensed under the BSD License:
... ... @@ -1062,7 +1051,6 @@ http://developer.yahoo.net/yui/license.txt
1062 1051 version: 2.7.0
1063 1052 */
1064 1053 .ygtvitem{}.ygtvitem table{margin-bottom:0;border:none;}.ygtvrow td{border:none;padding:0;}.ygtvrow td a{text-decoration:none;}.ygtvtn{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -5600px no-repeat;}.ygtvtm{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -4000px no-repeat;}.ygtvtmh,.ygtvtmhh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -4800px no-repeat;}.ygtvtp{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -6400px no-repeat;}.ygtvtph,.ygtvtphh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -7200px no-repeat;}.ygtvln{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -1600px no-repeat;}.ygtvlm{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 0px no-repeat;}.ygtvlmh,.ygtvlmhh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -800px no-repeat;}.ygtvlp{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -2400px no-repeat;}.ygtvlph,.ygtvlphh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -3200px no-repeat;}.ygtvloading{width:18px;height:22px;background:url(treeview-loading.gif) 0 0 no-repeat;}.ygtvdepthcell{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -8000px no-repeat;}.ygtvblankdepthcell{width:18px;height:22px;}.ygtvchildren{}* html .ygtvchildren{height:2%;}.ygtvlabel,.ygtvlabel:link,.ygtvlabel:visited,.ygtvlabel:hover{margin-left:2px;text-decoration:none;background-color:white;cursor:pointer;}.ygtvcontent{cursor:default;}.ygtvspacer{height:22px;width:12px;}.ygtvfocus{}.ygtvfocus .ygtvlabel,.ygtvfocus .ygtvlabel:link,.ygtvfocus .ygtvlabel:visited,.ygtvfocus .ygtvlabel:hover{}.ygtvfocus a,.ygtvrow td a{outline-style:none;}.ygtvok{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -8800px no-repeat;}.ygtvok:hover{background:url(treeview-sprite.gif) 0 -8844px no-repeat;}.ygtvcancel{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -8822px no-repeat;}.ygtvcancel:hover{background:url(treeview-sprite.gif) 0 -8866px no-repeat;}.ygtv-label-editor{background-color:#f2f2f2;border:1px solid silver;position:absolute;display:none;overflow:hidden;margin:auto;z-index:9000;}.ygtv-edit-TextNode{width:190px;}.ygtv-edit-TextNode .ygtvcancel,.ygtv-edit-TextNode .ygtvok{border:none;}.ygtv-edit-TextNode .ygtv-button-container{float:right;}.ygtv-edit-TextNode .ygtv-input input{width:140px;}.ygtv-edit-DateNode .ygtvcancel{border:none;}.ygtv-edit-DateNode .ygtvok{display:none;}.ygtv-edit-DateNode .ygtv-button-container{text-align:right;margin:auto;}
1065   -
1066 1054 /*
1067 1055 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
1068 1056 Code licensed under the BSD License:
... ... @@ -1070,7 +1058,6 @@ http://developer.yahoo.net/yui/license.txt
1070 1058 version: 2.7.0
1071 1059 */
1072 1060 .yui-carousel{visibility:hidden;overflow:hidden;position:relative;text-align:left;zoom:1;}.yui-carousel.yui-carousel-visible{visibility:visible;}.yui-carousel-content{overflow:hidden;position:relative;}.yui-carousel-element{margin:5px 0;overflow:hidden;padding:0;position:relative;width:32000px;z-index:1;}.yui-carousel-vertical .yui-carousel-element{margin:0 5px;}.yui-carousel-element li{border:1px solid #ccc;float:left;list-style:none;margin:1px;overflow:hidden;padding:0;text-align:center;*float:none;*display:inline-block;*zoom:1;*display:inline;}.yui-carousel .yui-carousel-item-selected{border:1px dashed #000;margin:1px;}.yui-carousel-vertical{height:32000px;margin:0 5px;width:auto;}.yui-carousel-vertical .yui-carousel-element li{display:block;float:none;}.yui-log .carousel{background:#f2e886;}.yui-carousel-nav{zoom:1;}.yui-carousel-nav:after{clear:both;content:"";display:block;}.yui-carousel-button-focus{outline:1px dotted #000;}.yui-carousel-min-width .yui-carousel-content{margin:0 auto;}.yui-skin-sam .yui-carousel,.yui-skin-sam .yui-carousel-vertical{border:1px solid #808080;}.yui-skin-sam .yui-carousel-nav{background:url(../pacotes/yui270/build/assets/skins/sam/sprite.png) repeat-x 0 0;padding:3px;text-align:right;}.yui-skin-sam .yui-carousel-button{background:url(../pacotes/yui270/build/assets/skins/sam/sprite.png) no-repeat 0 -600px;float:right;height:19px;margin:5px;overflow:hidden;width:40px;}.yui-skin-sam .yui-carousel-vertical .yui-carousel-button{background-position:0 -800px;}.yui-skin-sam .yui-carousel-button-disabled{background-position:0 -2000px;}.yui-skin-sam .yui-carousel-vertical .yui-carousel-button-disabled{background-position:0 -2100px;}.yui-skin-sam .yui-carousel-button input,.yui-skin-sam .yui-carousel-button button{background-color:transparent;border:0;cursor:pointer;display:block;height:44px;margin:-2px 0 0 -2px;padding:0 0 0 50px;}.yui-skin-sam span.yui-carousel-first-button{background-position:0 -550px;margin-left:-100px;margin-right:50px;*margin:5px 5px 5px -90px;}.yui-skin-sam .yui-carousel-vertical span.yui-carousel-first-button{background-position:0 -750px;}.yui-skin-sam span.yui-carousel-first-button-disabled{background-position:0 -1950px;}.yui-skin-sam .yui-carousel-vertical span.yui-carousel-first-button-disabled{background-position:0 -2050px;}.yui-skin-sam .yui-carousel-nav ul{float:right;height:19px;margin:0;margin-left:-220px;margin-right:100px;*margin-left:-160px;*margin-right:0;padding:0;}.yui-skin-sam .yui-carousel-min-width .yui-carousel-nav ul{*margin-left:-170px;}.yui-skin-sam .yui-carousel-nav select{position:relative;*right:50px;top:4px;}.yui-skin-sam .yui-carousel-vertical .yui-carousel-nav ul,.yui-skin-sam .yui-carousel-vertical .yui-carousel-nav select{float:none;margin:0;*zoom:1;}.yui-skin-sam .yui-carousel-nav ul li{background:url(../pacotes/yui270/build/assets/skins/sam/sprite.png) no-repeat 0 -650px;cursor:pointer;float:left;height:9px;list-style:none;margin:10px 0 0 5px;overflow:hidden;padding:0;width:9px;}.yui-skin-sam .yui-carousel-nav ul:after{clear:both;content:"";display:block;}.yui-skin-sam .yui-carousel-nav ul li a{left:-10000px;position:absolute;}.yui-skin-sam .yui-carousel-nav ul li.yui-carousel-nav-page-focus{outline:1px dotted #000;}.yui-skin-sam .yui-carousel-nav ul li.yui-carousel-nav-page-selected{background-position:0 -700px;}.yui-skin-sam .yui-carousel-item-loading{background:url(ajax-loader.gif) no-repeat 50% 50%;position:relative;text-indent:-150px;}
1073   -
1074 1061 /*
1075 1062 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
1076 1063 Code licensed under the BSD License:
... ... @@ -1082,7 +1069,6 @@ version: 2.7.0
1082 1069 .yui-h-slider .yui-slider-thumb,
1083 1070 .yui-v-slider .yui-slider-thumb{position:absolute;cursor:default;}
1084 1071 .yui-skin-sam .yui-h-slider .yui-slider-thumb{top:4px;}
1085   -
1086 1072 /*
1087 1073 Copyright (c) 2009, Yahoo! Inc. All rights reserved.
1088 1074 Code licensed under the BSD License:
... ... @@ -1090,7 +1076,6 @@ http://developer.yahoo.net/yui/license.txt
1090 1076 version: 2.7.0
1091 1077 */
1092 1078 .yui-resize{position:relative;zoom:1;z-index:0;}.yui-resize-wrap{zoom:1;}.yui-draggable{cursor:move;}.yui-resize .yui-resize-handle{position:absolute;z-index:1;font-size:0;margin:0;padding:0;zoom:1;height:1px;width:1px;}.yui-resize .yui-resize-handle-br{height:5px;width:5px;bottom:0;right:0;cursor:se-resize;z-index:2;zoom:1;}.yui-resize .yui-resize-handle-bl{height:5px;width:5px;bottom:0;left:0;cursor:sw-resize;z-index:2;zoom:1;}.yui-resize .yui-resize-handle-tl{height:5px;width:5px;top:0;left:0;cursor:nw-resize;z-index:2;zoom:1;}.yui-resize .yui-resize-handle-tr{height:5px;width:5px;top:0;right:0;cursor:ne-resize;z-index:2;zoom:1;}.yui-resize .yui-resize-handle-r{width:5px;height:100%;top:0;right:0;cursor:e-resize;zoom:1;}.yui-resize .yui-resize-handle-l{height:100%;width:5px;top:0;left:0;cursor:w-resize;zoom:1;}.yui-resize .yui-resize-handle-b{width:100%;height:5px;bottom:0;right:0;cursor:s-resize;zoom:1;}.yui-resize .yui-resize-handle-t{width:100%;height:5px;top:0;right:0;cursor:n-resize;zoom:1;}.yui-resize-proxy{position:absolute;border:1px dashed #000;visibility:hidden;z-index:1000;}.yui-resize-hover .yui-resize-handle,.yui-resize-hidden .yui-resize-handle{opacity:0;filter:alpha(opacity=0);}.yui-resize-ghost{opacity:.5;filter:alpha(opacity=50);}.yui-resize-knob .yui-resize-handle{height:6px;width:6px;}.yui-resize-knob .yui-resize-handle-tr{right:-3px;top:-3px;}.yui-resize-knob .yui-resize-handle-tl{left:-3px;top:-3px;}.yui-resize-knob .yui-resize-handle-bl{left:-3px;bottom:-3px;}.yui-resize-knob .yui-resize-handle-br{right:-3px;bottom:-3px;}.yui-resize-knob .yui-resize-handle-t{left:45%;top:-3px;}.yui-resize-knob .yui-resize-handle-r{right:-3px;top:45%;}.yui-resize-knob .yui-resize-handle-l{left:-3px;top:45%;}.yui-resize-knob .yui-resize-handle-b{left:45%;bottom:-3px;}.yui-resize-status{position:absolute;top:-999px;left:-999px;padding:2px;font-size:80%;display:none;zoom:1;z-index:9999;}.yui-resize-status strong,.yui-resize-status em{font-weight:normal;font-style:normal;padding:1px;zoom:1;}.yui-skin-sam .yui-resize .yui-resize-handle{background-color:#F2F2F2;zoom:1;}.yui-skin-sam .yui-resize .yui-resize-handle-active{background-color:#7D98B8;zoom:1;}.yui-skin-sam .yui-resize .yui-resize-handle-l,.yui-skin-sam .yui-resize .yui-resize-handle-r,.yui-skin-sam .yui-resize .yui-resize-handle-l-active,.yui-skin-sam .yui-resize .yui-resize-handle-r-active{height:100%;zoom:1;}.yui-skin-sam .yui-resize-knob .yui-resize-handle{border:1px solid #808080;}.yui-skin-sam .yui-resize-hover .yui-resize-handle-active{opacity:1;filter:alpha(opacity=100);}.yui-skin-sam .yui-resize-proxy{border:1px dashed #426FD9;}.yui-skin-sam .yui-resize-status{border:1px solid #A6982B;border-top:1px solid #D4C237;background-color:#FFEE69;color:#000;}.yui-skin-sam .yui-resize-status strong,.yui-skin-sam .yui-resize-status em{float:left;display:block;clear:both;padding:1px;text-align:center;}.yui-skin-sam .yui-resize .yui-resize-handle-inner-r,.yui-skin-sam .yui-resize .yui-resize-handle-inner-l{background:transparent url(layout_sprite.png) no-repeat 0 -5px;height:16px;width:5px;position:absolute;top:45%;}.yui-skin-sam .yui-resize .yui-resize-handle-inner-t,.yui-skin-sam .yui-resize .yui-resize-handle-inner-b{background:transparent url(layout_sprite.png) no-repeat -20px 0;height:5px;width:16px;position:absolute;left:50%;}.yui-skin-sam .yui-resize .yui-resize-handle-br{background-image:url(layout_sprite.png);background-repeat:no-repeat;background-position:-22px -62px;}.yui-skin-sam .yui-resize .yui-resize-handle-tr{background-image:url(layout_sprite.png);background-repeat:no-repeat;background-position:-22px -42px;}.yui-skin-sam .yui-resize .yui-resize-handle-tl{background-image:url(layout_sprite.png);background-repeat:no-repeat;background-position:-22px -82px;}.yui-skin-sam .yui-resize .yui-resize-handle-bl{background-image:url(layout_sprite.png);background-repeat:no-repeat;background-position:-22px -23px;}.yui-skin-sam .yui-resize-knob .yui-resize-handle-t,.yui-skin-sam .yui-resize-knob .yui-resize-handle-r,.yui-skin-sam .yui-resize-knob .yui-resize-handle-b,.yui-skin-sam .yui-resize-knob .yui-resize-handle-l,.yui-skin-sam .yui-resize-knob .yui-resize-handle-tl,.yui-skin-sam .yui-resize-knob .yui-resize-handle-tr,.yui-skin-sam .yui-resize-knob .yui-resize-handle-bl,.yui-skin-sam .yui-resize-knob .yui-resize-handle-br,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-t,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-r,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-b,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-l,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-tl,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-tr,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-bl,.yui-skin-sam .yui-resize-knob .yui-resize-handle-inner-br{background-image:none;}.yui-skin-sam .yui-resize-knob .yui-resize-handle-l,.yui-skin-sam .yui-resize-knob .yui-resize-handle-r,.yui-skin-sam .yui-resize-knob .yui-resize-handle-l-active,.yui-skin-sam .yui-resize-knob .yui-resize-handle-r-active{height:6px;width:6px;}.yui-skin-sam .yui-resize-textarea .yui-resize-handle-r{right:-8px;}.yui-skin-sam .yui-resize-textarea .yui-resize-handle-b{bottom:-8px;}.yui-skin-sam .yui-resize-textarea .yui-resize-handle-br{right:-8px;bottom:-8px;}
1093   -
1094 1079 .yui-skin-sam .yuimenubar {
1095 1080 background:transparent url(../pacotes/yui270/build/assets/skins/sam/sprite.png) repeat-x scroll 0 0;
1096 1081 border:1px solid #808080;
... ... @@ -1312,7 +1297,6 @@ width:16px;
1312 1297 padding:0 10px;
1313 1298 }
1314 1299 .yui-resize .yui-resize-handle{position:absolute;z-index:1;font-size:0;margin:0;padding:0;zoom:1;height:250px;width:5px;}
1315   -
1316 1300 .olControlEditingToolbar1 .editorOLpanItemInactive {
1317 1301 background-position:-0px 0;
1318 1302 }
... ... @@ -1474,6 +1458,5 @@ background-position:-522px -28px;
1474 1458 pre{
1475 1459 font-family: Verdana, Arial, Helvetica, sans-serif;
1476 1460 font-size: 9px;
1477   -}
1478   -
  1461 +}
1479 1462 <?php if(extension_loaded('zlib')){ob_end_flush();}?>
1480 1463 \ No newline at end of file
... ...
interface/googlemaps.phtml
... ... @@ -135,16 +135,21 @@ i3GEO.configura.diminuixN = 20;
135 135  
136 136 i3GEO.cria();
137 137  
  138 +i3GEO.barraDeBotoes.TIPO = "olhodepeixe";
  139 +i3GEO.barraDeBotoes.OFFSET = -220;
  140 +i3GEO.barraDeBotoes.MAXBOTOES = 10;
  141 +//barra de botoes normal. descomente para usar
  142 +/*
  143 +i3GEO.barraDeBotoes.TIPO = "yui";
138 144 i3GEO.barraDeBotoes.AUTOALTURA = false;
139 145 i3GEO.barraDeBotoes.ATIVAMENUCONTEXTO = false;
140 146 i3GEO.barraDeBotoes.PERMITEFECHAR = true;
141 147 i3GEO.barraDeBotoes.PERMITEDESLOCAR = true;
142 148 i3GEO.barraDeBotoes.AUTO = true;
143 149 i3GEO.barraDeBotoes.COMPORTAMENTO = "laranja";
144   -
145 150 i3GEO.Interface.BARRABOTOESLEFT = 80;
146 151 i3GEO.Interface.BARRABOTOESTOP = 20;
147   -
  152 +*/
148 153 i3GEO.idioma.IDSELETOR = "seletorIdiomas";
149 154 i3GEO.Interface.ATIVAMENUCONTEXTO = true;
150 155 i3GEO.arvoreDeTemas.TIPOBOTAO = "radio";
... ...
interface/openlayers.htm
... ... @@ -147,7 +147,7 @@
147 147 </tr>
148 148 </table>
149 149  
150   -<script src="../classesjs/i3geonaocompacto.js"></script>
  150 +<script src="../classesjs/i3geo.js"></script>
151 151 <script src="../pacotes/openlayers/OpenLayers29.js.php"></script>
152 152 <!-- estilo necessário para a ferramenta de edição -->
153 153 <style>
... ...
pacotes/eudock/js/euDock.2.0.js
... ... @@ -10,7 +10,7 @@
10 10 *
11 11 * Mario Zaizar to suggest and help me for Pointer icon patch and Target function
12 12 *
13   - * Jérémie 'ahFeel' BORDIER to suggest and help me for DeleteIcon feature
  13 + * J?r?mie 'ahFeel' BORDIER to suggest and help me for DeleteIcon feature
14 14 *
15 15 *
16 16 *
... ... @@ -99,7 +99,9 @@ var euOPAQUE = 16;
99 99 var ret = euObj.offsetLeft;
100 100 while ((euObj = euObj.offsetParent)!=null)
101 101 ret += euObj.offsetLeft;
102   - return ret;
  102 +
  103 +
  104 + return ret;
103 105 };
104 106  
105 107 function isEuInside(euObj,x,y){
... ... @@ -273,10 +275,19 @@ var euOPAQUE = 16;
273 275 };
274 276  
275 277 this.setObjectCoord = function(){
276   - if (this.objectAlign==euDOWN)
  278 + var tempx,tempy;
  279 + if (this.objectAlign==euDOWN){
  280 + tempx = euIdObjLeft(this.idObjectHook) + (this.idObjectHook.offsetWidth/2);
  281 + tempy = euIdObjTop(this.idObjectHook) + this.idObjectHook.offsetHeight + this.offset
  282 + if(navm){
  283 + tempx = ((i3GEO.barraDeBotoes.MAXBOTOES * 30) / 2);
  284 + tempy = euIdObjTop(this.idObjectHook) + this.idObjectHook.offsetHeight + this.offset + 38;
  285 + }
277 286 this.setCenterPos(
278   - euIdObjLeft(this.idObjectHook) + (this.idObjectHook.offsetWidth/2),
279   - euIdObjTop(this.idObjectHook) + this.idObjectHook.offsetHeight + this.offset);
  287 + tempx,
  288 + tempy
  289 + );
  290 + }
280 291 else if (this.objectAlign==euUP)
281 292 this.setCenterPos(
282 293 euIdObjLeft(this.idObjectHook) + (this.idObjectHook.offsetWidth/2),
... ... @@ -1137,3 +1148,4 @@ document.onclick = on_MouseClick;
1137 1148 euDimensioni();
1138 1149 offsEut();
1139 1150 euThread();
  1151 +
... ...
pacotes/eudock/js/euDock.2.0_compacto.js
1   -if(!euEnv)var euEnv=new Array();euEnv.Kost=new Array();euEnv.Kost.num=0;euEnv.Kost.next=function(){return this.num++}euEnv.euDockArray=new Array();euEnv.refreshTime=35;euEnv.exeThread=true;euEnv.exeThreadWhiteLoop=0;euEnv.x=0;euEnv.y=0;euEnv.mouseMoved=false;var euUP=1;var euDOWN=2;var euLEFT=3;var euRIGHT=4;var euICON=5;var euMOUSE=6;var euSCREEN=7;var euOBJECT=8;var euABSOLUTE=9;var euRELATIVE=10;var euHORIZONTAL=11;var euVERTICAL=12;var euCENTER=13;var euTRANSPARENT=14;var euFIXED=15;var euOPAQUE=16;function euIdObjTop(euObj){var ret=euObj.offsetTop;while((euObj=euObj.offsetParent)!=null)ret+=euObj.offsetTop;return ret};function euIdObjLeft(euObj){var ret=euObj.offsetLeft;while((euObj=euObj.offsetParent)!=null)ret+=euObj.offsetLeft;return ret};function isEuInside(euObj,x,y){var euTop=euIdObjTop(euObj);var euLeft=euIdObjLeft(euObj);return((euTop<=y&&(euTop+euObj.offsetHeight)>=y)&&(euLeft<=x&&(euLeft+euObj.offsetWidth)>=x))};function euDimensioni(){if(typeof(window.innerWidth)=='number'){euEnv.euFrameWidth=window.innerWidth-16;euEnv.euFrameHeight=window.innerHeight}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){euEnv.euFrameWidth=document.documentElement.clientWidth-16;euEnv.euFrameHeight=document.documentElement.clientHeight}else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){euEnv.euFrameWidth=document.body.clientWidth;euEnv.euFrameHeight=document.body.clientHeight}};function offsEut(){euEnv.euScrOfY=0;euEnv.euScrOfX=0;if(typeof(window.pageYoffsEut)=='number'){euEnv.euScrOfY=window.pageYoffsEut;euEnv.euScrOfX=window.pageXoffsEut}else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){euEnv.euScrOfY=document.body.scrollTop;euEnv.euScrOfX=document.body.scrollLeft}else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){euEnv.euScrOfY=document.documentElement.scrollTop;euEnv.euScrOfX=document.documentElement.scrollLeft}};function euKostFunc30(x){return 0.3};function euKostFunc100(x){return 1};function euLinear(x){return x};function euLinear30(x){var r=1*(x+(1-x)*0.3);return r};function euLinear20(x){return x+(1-x)*0.2};function euExp30(x){return euLinear30(x*x*x)};function euLinear50(x){return x+(1-x)*0.5};function euHarmonic(x){return euLinear30((1-Math.cos(Math.PI*x))/2)};function euSemiHarmonic(x){return euLinear30(Math.cos(Math.PI*(1-x)/2))};function euDock(){this.id='euDock_'+euEnv.Kost.next();var novoel=document.createElement("div");novoel.style.position="absolute";novoel.innerHTML="<div id='"+this.id+"_bar' style='z-index:1000;position:absolute;border:0px solid black;'></div>"+"<div onMouseOut='euEnv.euDockArray."+this.id+".mouseOut();' onMouseOver='euEnv.euDockArray."+this.id+".mouseOver();' id='"+this.id+"' style='z-index:1000;position:absolute;border:0px solid black; cursor: pointer;'></div>";document.body.appendChild(novoel);this.div=document.getElementById(this.id);this.divBar=document.getElementById(this.id+"_bar");this.iconsArray=new Array();this.isInside=false;euEnv.euDockArray[this.id]=this;this.bar=null;this.mouseX=0;this.mouseY=0;this.centerPosX=0;this.centerPosY=0;this.offset=0;this.iconOffset=0;this.venusHillSize=3;this.venusHillTrans=euLinear;this.position=euUP;this.align=euSCREEN;this.objectAlign=euDOWN;this.idObjectHook;this.animaition=euICON;this.animFading=euABSOLUTE;this.setIconsOffset=function(offset){this.iconOffset=offset};this.setAnimation=function(anim,size){this.animaition=anim;this.venusHillSize=size};this.setPointAlign=function(x,y,pos){this.offset=0;this.align=euABSOLUTE;this.position=pos;this.setCenterPos(x,y)}this.setObjectAlign=function(idObj,align,offset,pos){this.offset=offset;this.align=euOBJECT;this.objectAlign=align;this.position=pos;this.idObjectHook=document.getElementById(idObj);this.setObjectCoord()};this.setObjectCoord=function(){if(this.objectAlign==euDOWN)this.setCenterPos(euIdObjLeft(this.idObjectHook)+(this.idObjectHook.offsetWidth/2),euIdObjTop(this.idObjectHook)+this.idObjectHook.offsetHeight+this.offset);else if(this.objectAlign==euUP)this.setCenterPos(euIdObjLeft(this.idObjectHook)+(this.idObjectHook.offsetWidth/2),euIdObjTop(this.idObjectHook)-this.offset);else if(this.objectAlign==euLEFT)this.setCenterPos(euIdObjLeft(this.idObjectHook)-this.offset,euIdObjTop(this.idObjectHook)+(this.idObjectHook.offsetHeight/2));else if(this.objectAlign==euRIGHT)this.setCenterPos(euIdObjLeft(this.idObjectHook)+this.idObjectHook.offsetWidth+this.offset,euIdObjTop(this.idObjectHook)+(this.idObjectHook.offsetHeight/2));else if(this.objectAlign==euCENTER){if(this.position==euUP||this.position==euDOWN||this.position==euHORIZONTAL)this.setCenterPos(euIdObjLeft(this.idObjectHook)+(this.idObjectHook.offsetWidth/2),euIdObjTop(this.idObjectHook)+(this.idObjectHook.offsetHeight/2)-this.offset);else this.setCenterPos(euIdObjLeft(this.idObjectHook)+(this.idObjectHook.offsetWidth/2)+this.offset,euIdObjTop(this.idObjectHook)+(this.idObjectHook.offsetHeight/2))}};this.setScreenAlign=function(align,offset){this.offset=offset;this.align=euSCREEN;if(align==euUP)this.position=euDOWN;else if(align==euDOWN)this.position=euUP;else if(align==euLEFT)this.position=euRIGHT;else if(align==euRIGHT)this.position=euLEFT;this.setScreenCoord()};this.setScreenCoord=function(){euDimensioni();offsEut();if(this.position==euDOWN)this.setCenterPos(euEnv.euScrOfX+euEnv.euFrameWidth/2,euEnv.euScrOfY+this.offset);else if(this.position==euUP)this.setCenterPos(euEnv.euScrOfX+euEnv.euFrameWidth/2,euEnv.euScrOfY+euEnv.euFrameHeight-this.offset);else if(this.position==euRIGHT)this.setCenterPos(euEnv.euScrOfX+this.offset,euEnv.euScrOfY+euEnv.euFrameHeight/2);else if(this.position==euLEFT)this.setCenterPos(euEnv.euScrOfX+euEnv.euFrameWidth-this.offset,euEnv.euScrOfY+euEnv.euFrameHeight/2)};this.refreshDiv=function(){if(this.position==euDOWN){this.setPos(this.centerPosX-this.getWidth()/2,this.centerPosY+this.iconOffset)}else if(this.position==euUP){this.setPos(this.centerPosX-this.getWidth()/2,this.centerPosY-this.getHeight()-this.iconOffset)}else if(this.position==euRIGHT){this.setPos(this.centerPosX+this.iconOffset,this.centerPosY-this.getHeight()/2)}else if(this.position==euLEFT){this.setPos(this.centerPosX-this.getWidth()-this.iconOffset,this.centerPosY-this.getHeight()/2)}else if(this.position==euHORIZONTAL){this.setPos(this.centerPosX-this.getWidth()/2,this.centerPosY-this.getHeight()/2+this.iconOffset)}else if(this.position==euVERTICAL){this.setPos(this.centerPosX-this.getWidth()/2+this.iconOffset,this.centerPosY-this.getHeight()/2)}if(this.bar){if(this.position==euDOWN){this.setBarPos(this.centerPosX-this.getWidth()/2,this.centerPosY)}else if(this.position==euUP){this.setBarPos(this.centerPosX-this.getWidth()/2,this.centerPosY-this.bar.getSize())}else if(this.position==euRIGHT){this.setBarPos(this.centerPosX,this.centerPosY-this.getHeight()/2)}else if(this.position==euLEFT){this.setBarPos(this.centerPosX-this.bar.getSize(),this.centerPosY-this.getHeight()/2)}else if(this.position==euHORIZONTAL){this.setBarPos(this.centerPosX-this.getWidth()/2,this.centerPosY-this.bar.getSize()/2)}else if(this.position==euVERTICAL){this.setBarPos(this.centerPosX-this.bar.getSize()/2,this.centerPosY-this.getHeight()/2)}}}this.riposition=function(){if(this.align==euSCREEN)this.setScreenCoord();else if(this.align==euOBJECT)this.setObjectCoord()};this.setCenterPos=function(x,y){this.centerPosX=x;this.centerPosY=y;this.refreshDiv()};this.setPos=function(x,y){this.setPosX(x);this.setPosY(y)};this.setBarPos=function(x,y){this.setBarPosX(x);this.setBarPosY(y)};this.setDim=function(w,h){this.setWidth(w);this.setHeight(h)};this.setBarPosX=function(x){document.getElementById(this.id+"_bar").style.left=x+'px'};this.setBarPosY=function(y){document.getElementById(this.id+"_bar").style.top=y+'px'};this.getPosX=function(){return document.getElementById(this.id).style.left.replace(/[^0-9]/g,"")};this.setPosX=function(x){document.getElementById(this.id).style.left=x+'px'};this.getPosY=function(){return document.getElementById(this.id).style.top.replace(/[^0-9]/g,"")};this.setPosY=function(y){document.getElementById(this.id).style.top=y+'px'};this.getWidth=function(){return document.getElementById(this.id).style.width.replace(/[^0-9]/g,"")};this.setWidth=function(w){document.getElementById(this.id).style.width=Math.round(w)+'px'};this.getHeight=function(){return document.getElementById(this.id).style.height.replace(/[^0-9]/g,"")};this.setHeight=function(h){document.getElementById(this.id).style.height=Math.round(h)+'px'};this.getVenusWidth=function(){return this.venusHillSize*this.getWidth()};this.getVenusHeight=function(){return this.venusHillSize*this.getHeight()};this.getMouseRelativeX=function(){return this.mouseX-euIdObjLeft(this.div)};this.getMouseRelativeY=function(){return this.mouseY-euIdObjTop(this.div)};this.updateDims=function(){var bakWidth=0;var bakHeight=0;for(var i in this.iconsArray)if(this.iconsArray[i].id){if(this.position==euUP||this.position==euDOWN||this.position==euHORIZONTAL){bakWidth+=this.iconsArray[i].getWidth();bakHeight=(this.iconsArray[i].getHeight()>bakHeight)?this.iconsArray[i].getHeight():bakHeight;bakHeight=Math.round(bakHeight)}else{bakHeight+=this.iconsArray[i].getHeight();bakWidth=(this.iconsArray[i].getWidth()>bakWidth)?this.iconsArray[i].getWidth():bakWidth;bakWidth=Math.round(bakWidth)}}if(this.bar){if(this.position==euUP||this.position==euDOWN||this.position==euHORIZONTAL)this.bar.setProperties(bakWidth,this.position)else this.bar.setProperties(bakHeight,this.position)this.bar.refresh()}var posx=0;var posy=0;var updPosX=0;var updPosY=0;for(var i in this.iconsArray)if(this.iconsArray[i].id){if(this.position==euDOWN){updPosX=posx;updPosY=posy;posx+=this.iconsArray[i].getWidth()}else if(this.position==euUP){updPosX=posx;updPosY=bakHeight-this.iconsArray[i].getHeight();posx+=this.iconsArray[i].getWidth()}else if(this.position==euRIGHT){updPosX=posx;updPosY=posy;posy+=this.iconsArray[i].getHeight()}else if(this.position==euLEFT){updPosX=bakWidth-this.iconsArray[i].getWidth();updPosY=posy;posy+=this.iconsArray[i].getHeight()}else if(this.position==euHORIZONTAL){updPosX=posx;updPosY=(bakHeight-this.iconsArray[i].getHeight())/2;posx+=this.iconsArray[i].getWidth()}else if(this.position==euVERTICAL){updPosX=(bakWidth-this.iconsArray[i].getWidth())/2;updPosY=posy;posy+=this.iconsArray[i].getHeight()}this.iconsArray[i].setPos(updPosX,updPosY);this.iconsArray[i].refresh()}this.setDim(bakWidth,bakHeight);this.refreshDiv()};this.kernel=function(){if(this.isInside)return this.kernelMouseOver();else return this.kernelMouseOut()};this.kernelMouseOver=function(){var ret=false;var overI=-1;var mouseRelX=this.getMouseRelativeX();var mouseRelY=this.getMouseRelativeY();var mediana;var border;var frameTo;var venusWidth;var venusHeight;var overIcon;if(this.position==euUP||this.position==euDOWN||this.position==euHORIZONTAL){venusWidth=this.getVenusWidth();for(var i in this.iconsArray)if(this.iconsArray[i].id)if(this.iconsArray[i].isInsideX(mouseRelX)){overIcon=i;border=this.iconsArray[i].getWidth()/2;if(this.animaition==euICON){mouseRelX=this.iconsArray[i].posX+border;border=0}}for(var i in this.iconsArray)if(this.iconsArray[i].id){mediana=this.iconsArray[i].posX+this.iconsArray[i].getWidth()/2;if(Math.abs(mediana-mouseRelX)<=border)mediana=mouseRelX;else if(mediana<mouseRelX)mediana+=this.iconsArray[i].getWidth()/2;else if(mediana>mouseRelX)mediana-=this.iconsArray[i].getWidth()/2;if(this.animaition==euICON&&Math.abs(i-overIcon)<=this.venusHillSize)frameTo=this.venusHillTrans(1-Math.abs(i-overIcon)/this.venusHillSize);else if(this.animaition==euMOUSE&&Math.abs(mediana-mouseRelX)<=venusWidth)frameTo=this.venusHillTrans(1-Math.abs(mediana-mouseRelX)/venusWidth);else frameTo=0;if(frameTo==0||frameTo==1||Math.abs(frameTo-this.iconsArray[i].frame)>0.01)ret|=this.iconsArray[i].setFrameTo(frameTo);if(this.animFading==euABSOLUTE)if(this.iconsArray[i].isInsideX(mouseRelX))ret|=this.iconsArray[i].setFadingTo(1);else ret|=this.iconsArray[i].setFadingTo(0);else ret|=this.iconsArray[i].setFadingTo(frameTo)}}else{venusHeight=this.getVenusHeight();for(var i in this.iconsArray)if(this.iconsArray[i].id)if(this.iconsArray[i].isInsideY(mouseRelY)){overIcon=i;border=this.iconsArray[i].getHeight()/2;if(this.animaition==euICON){mouseRelY=this.iconsArray[i].posY+border;border=0}}for(var i in this.iconsArray)if(this.iconsArray[i].id){mediana=this.iconsArray[i].posY+this.iconsArray[i].getHeight()/2;if(Math.abs(mediana-mouseRelY)<=border)mediana=mouseRelY;else if(mediana<mouseRelY)mediana+=this.iconsArray[i].getHeight()/2;else if(mediana>mouseRelY)mediana-=this.iconsArray[i].getHeight()/2;if(this.animaition==euICON&&Math.abs(i-overIcon)<=this.venusHillSize)frameTo=this.venusHillTrans(1-Math.abs(i-overIcon)/this.venusHillSize);else if(this.animaition==euMOUSE&&Math.abs(mediana-mouseRelY)<=venusHeight)frameTo=this.venusHillTrans(1-Math.abs(mediana-mouseRelY)/venusHeight);else frameTo=0;if(frameTo==0||frameTo==1||Math.abs(frameTo-this.iconsArray[i].frame)>0.01)ret|=this.iconsArray[i].setFrameTo(frameTo);if(this.animFading==euABSOLUTE)if(this.iconsArray[i].isInsideY(mouseRelY))ret|=this.iconsArray[i].setFadingTo(1);else ret|=this.iconsArray[i].setFadingTo(0);else ret|=this.iconsArray[i].setFadingTo(frameTo)}}if(ret)this.updateDims();return ret};this.kernelMouseOut=function(){var ret=false;for(var i in this.iconsArray)if(this.iconsArray[i].id)ret|=this.iconsArray[i].setAllFrameTo(0);if(ret)this.updateDims();return ret};this.mouseOut=function(){this.isInside=false;euEnv.exeThreadWhiteLoop=5};this.mouseOver=function(){this.isInside=true;euEnv.exeThreadWhiteLoop=5};this.mouseMove=function(x,y){var inside=isEuInside(this.div,x,y);var ret=(this.mouseX!=x||this.mouseY!=y)&&inside;this.mouseX=x;this.mouseY=y;if(inside!=this.isInside){this.isInside=inside;ret=true}for(var i in this.iconsArray)if(this.iconsArray[i].id)ret|=this.iconsArray[i].isRunning();return ret};this.iconParams=new Array();this.setAllFrameStep=function(step){this.iconParams.frameStep=step;for(var i in this.iconsArray)if(this.iconsArray[i].id)this.iconsArray[i].frameStep=step};this.setAllZoomFunc=function(func){this.setAllZoomFuncW(func);this.setAllZoomFuncH(func)};this.setAllZoomFuncW=function(func){this.iconParams.zoomFuncW=func;for(var i in this.iconsArray)if(this.iconsArray[i].id)this.iconsArray[i].zoomFuncW=func};this.setAllZoomFuncH=function(func){this.iconParams.zoomFuncH=func;for(var i in this.iconsArray)if(this.iconsArray[i].id)this.iconsArray[i].zoomFuncH=func};this.setBar=function(args){var id='euDock_bar_'+euEnv.Kost.next();euEnv.euDockArray[id]=new euDockBar(id,this);euEnv.euDockArray[id].setElements(args);this.bar=euEnv.euDockArray[id];return euEnv.euDockArray[id]};this.addIcon=function(args,params){var id=params.id;var id='euDock_icon_'+euEnv.Kost.next();euEnv.euDockArray[id]=new euDockIcon(id,this);euEnv.euDockArray[id].addElement(args);this.iconsArray.push(euEnv.euDockArray[id]);for(i in this.iconParams)euEnv.euDockArray[id][i]=this.iconParams[i];for(i in params)euEnv.euDockArray[id][i]=params[i];return euEnv.euDockArray[id]};this.delIcon=function(elem){euEnv.euDockArray.splice(elem);euEnv.euDockArray[elem.id]=0;for(var i in this.iconsArray)if(this.iconsArray[i]==elem)this.iconsArray.splice(i,1);elem.destroy();elem=null;this.updateDims()}};function euDockIcon(id,dock){this.id=id;this.parentDock=dock;this.elementsArray;this.zoomFuncW=euLinear30;this.zoomFuncH=euLinear30;this.posX=0;this.posY=0;this.width=0;this.height=0;this.frame=0;this.frameStep=0.5;this.fadingFrame=0;this.fadingStep=1;this.fadingType=euTRANSPARENT;this.loaded=false;this.runningFrame=false;this.runningFading=false;this.updateDims=function(){if(!this.loaded)return;for(var i=0;i<this.elementsArray.length;i++)this.elementsArray[i].setProperties(this.posX,this.posY,this.getWidth(),this.getHeight())};this.updateFading=function(){if(!this.loaded)return;var stato=this.fadingFrame*(this.elementsArray.length-1);var prev=Math.floor(stato);var next=Math.ceil(stato);var fading=0;for(var i=0;i<this.elementsArray.length;i++){if(this.fadingType==euFIXED){if(i==next)fading=100-100*(i-stato);else if(i<next)fading=100;else fading=0}else{if(i==next)fading=100-100*(i-stato);else if(i==prev){if(this.fadingType==euTRANSPARENT)fading=100-100*(stato-i);else fading=100}else fading=0}this.elementsArray[i].setFading(fading)}};this.refresh=function(){this.updateDims();this.updateFading()};this.isAbsoluteInside=function(x,y){x-=this.getAbsolutePosX();y-=this.getAbsolutePosY();return x>0&&y>0&&x<this.getWidth()&&y<this.getHeight()};this.isInside=function(x,y){return this.isInsideX(x)&&this.isInsideY(y)};this.isInsideX=function(x){return(this.loaded&&(this.posX<=x)&&((this.posX+this.getWidth())>=x))};this.isInsideY=function(y){return(this.loaded&&(this.posY<=y)&&((this.posY+this.getHeight())>=y))};this.retrieveLoadingDims=function(elem,num){if(elem.onLoadPrev)elem.onLoadPrev();if(num==0&&!this.loaded)this.setDim(elem.getWidth(),elem.getHeight());elem.loaded=true;var ret=true;for(var i in this.elementsArray)if(this.elementsArray[i].id)ret&=this.elementsArray[i].loaded this.loaded=ret;if(this.loaded){this.parentDock.updateDims();for(var i in this.elementsArray)if(this.elementsArray[i].id)this.elementsArray[i].show()}if(elem.onLoadNext)elem.onLoadNext()};this.setPos=function(x,y){this.posX=x;this.posY=y};this.setDim=function(w,h){if(this.width==0)this.width=w;if(this.height==0)this.height=h};this.getAbsolutePosX=function(){return euIdObjLeft(this.parentDock.div)+this.posX};this.getAbsolutePosY=function(){return euIdObjTop(this.parentDock.div)+this.posY};this.setPosX=function(x){this.posX=x};this.setPosY=function(y){this.posY=y};this.getWidth=function(){if(!this.loaded)return 0;var calc=this.width*this.zoomFuncW(this.frame);if(calc<38){calc=38}return calc};this.getHeight=function(){if(!this.loaded)return 0;var calc=this.height*this.zoomFuncH(this.frame);if(calc<38){calc=38}return calc};this.isRunning=function(){return this.runningFrame||this.runningFading};this.setAllFrameTo=function(to){this.setFadingTo(to);this.setFrameTo(to);return this.isRunning()};this.setFadingTo=function(fadingTo){if(this.fadingFrame==fadingTo)this.runningFading=false;else{if(this.fadingFrame>fadingTo)this.fadingFrame-=this.fadingStep;else this.fadingFrame+=this.fadingStep;this.runningFading=true;if(Math.abs(this.fadingFrame-fadingTo)<this.fadingStep)this.fadingFrame=fadingTo;if(this.fadingFrame<0)this.fadingFrame=0;if(this.fadingFrame>1)this.fadingFrame=1}return this.runningFading};this.setFrameTo=function(frameTo){if(this.frame==frameTo)this.runningFrame=false;else{this.runningFrame=true;this.frame+=(frameTo-this.frame)*this.frameStep;if(Math.abs(this.frame-frameTo)<0.01)this.frame=frameTo;if(this.frame<0)this.frame=0;if(this.frame>1)this.frame=1}return this.runningFrame};this.addElement=function(args){if(typeof(args)!="undefined"&&args!=null){this.elementsArray=new Array();this.fadingStep=0.5/args.length;for(var i=0;i<args.length;i++)for(var ii in args[i]){var id="euDock_"+ii+"_"+euEnv.Kost.next();euEnv.euDockArray[id]=new window[ii](id,args[i][ii],this.parentDock.div,"euEnv.euDockArray."+this.id+".retrieveLoadingDims(euEnv.euDockArray."+id+","+i+");");this.elementsArray.push(euEnv.euDockArray[id]);euEnv.euDockArray[id].loaded=false}}};this.destroy=function(){for(var i in this.elementsArray)if(this.elementsArray[i].id){euEnv.euDockArray[this.elementsArray[i].id]=0;euEnv.euDockArray.splice(this.elementsArray[i],1);this.elementsArray[i].destroy()}this.elementsArray.splice(0,this.elementsArray.length)};this.mouseClick=function(x,y){if(this.isAbsoluteInside(x,y)){if(this.link)if(this.target){if(top.frames[this.target])top.frames[this.target].location.href=this.link;else top.frames[this.target]=window.open(this.link,this.target,"")}else document.location.href=this.link;else if(this.mouseInsideClick)this.mouseInsideClick(x,y,this.id)}}};function euDockBar(id,dock){this.id=id;this.parentDock=dock;this.elementsArray=new Array();this.len=0;this.align=euUP;this.loaded=false;this.getSize=function(){if(!this.loaded)return 0;if(this.align==euUP||this.align==euDOWN||this.align==euHORIZONTAL)return this.elementsArray.left.getHeight();else return this.elementsArray.top.getWidth()};this.refresh=function(){if(!this.loaded)return;if(this.align==euUP||this.align==euDOWN||this.align==euHORIZONTAL){this.elementsArray.left.setPos(-this.elementsArray.left.getWidth(),0);this.elementsArray.horizontal.setProperties(0,0,Math.round(this.len),this.getSize());this.elementsArray.right.setPos(Math.round(this.len),0);this.elementsArray.left.show();this.elementsArray.horizontal.show();this.elementsArray.right.show();if(this.elementsArray.top)this.elementsArray.top.hide();if(this.elementsArray.bottom)this.elementsArray.bottom.hide();if(this.elementsArray.vertical){this.elementsArray.vertical.setProperties(0,0,0,0);this.elementsArray.vertical.hide()}}else{this.elementsArray.top.setPos(0,-this.elementsArray.top.getHeight());this.elementsArray.vertical.setProperties(0,0,this.getSize(),Math.round(this.len));this.elementsArray.bottom.setPos(0,Math.round(this.len));this.elementsArray.top.show();this.elementsArray.vertical.show();this.elementsArray.bottom.show();if(this.elementsArray.left)this.elementsArray.left.hide();if(this.elementsArray.right)this.elementsArray.right.hide();if(this.elementsArray.horizontal){this.elementsArray.horizontal.setProperties(0,0,0,0);this.elementsArray.horizontal.hide()}}};this.setProperties=function(len,align){this.len=len+1;this.align=align;this.refresh()};this.retrieveLoadingDims=function(elem){if(elem.onLoadPrev)elem.onLoadPrev();elem.loaded=true;var ret=true;for(var i in this.elementsArray)if(this.elementsArray[i].id)ret&=this.elementsArray[i].loaded this.loaded=ret;if(this.loaded){this.parentDock.updateDims();for(var i in this.elementsArray)if(this.elementsArray[i].id)this.elementsArray[i].show()}if(elem.onLoadNext)elem.onLoadNext()};this.setElements=function(args){if(typeof(args)!="undefined"&&args!=null){for(var i in args)for(var ii in args[i]){var id="euDock_"+ii+"_"+euEnv.Kost.next();euEnv.euDockArray[id]=new window[ii](id,args[i][ii],this.parentDock.divBar,"euEnv.euDockArray."+this.id+".retrieveLoadingDims(euEnv.euDockArray."+id+");");this.elementsArray[i]=euEnv.euDockArray[id];euEnv.euDockArray[id].loaded=false}}}};function euThread(){euDimensioni();offsEut();euEnv.timeout=window.setTimeout("euThread();",euEnv.refreshTime);euEnv.exeThread=false;if(euEnv.mouseMoved)for(var i in euEnv.euDockArray)if(euEnv.euDockArray[i].mouseMove)euEnv.exeThread|=euEnv.euDockArray[i].mouseMove(euEnv.euScrOfX+euEnv.x,euEnv.euScrOfY+euEnv.y);euEnv.mouseMoved=false;if(euEnv.exeThread)euEnv.exeThreadWhiteLoop=5;if(euEnv.exeThreadWhiteLoop>0)euKernel();for(var i in euEnv.euDockArray)if(euEnv.euDockArray[i].riposition)euEnv.euDockArray[i].riposition()};function euKernel(){euEnv.exeThread=false;for(var i in euEnv.euDockArray)if(euEnv.euDockArray[i].kernel)euEnv.exeThread|=euEnv.euDockArray[i].kernel();if(euEnv.exeThread)euEnv.exeThreadWhiteLoop=5;else euEnv.exeThreadWhiteLoop--};function on_MouseMove(e){if(!e)var e=window.event;euEnv.x=e.clientX;euEnv.y=e.clientY;euEnv.mouseMoved=true;if(euEnv.onmousemoveBK)return euEnv.onmousemoveBK(e);return true};function on_MouseDown(e){if(!e)var e=window.event;for(var i in euEnv.euDockArray)if(euEnv.euDockArray[i].mouseDown)euEnv.exeThread|=euEnv.euDockArray[i].mouseDown(euEnv.euScrOfX+e.clientX,euEnv.euScrOfY+e.clientY);if(euEnv.onmousedownBK)return euEnv.onmousedownBK(e);return true};function on_MouseUp(e){if(!e)var e=window.event;for(var i in euEnv.euDockArray)if(euEnv.euDockArray[i].mouseUp)euEnv.exeThread|=euEnv.euDockArray[i].mouseUp(euEnv.euScrOfX+e.clientX,euEnv.euScrOfY+e.clientY);if(euEnv.onmouseupBK)return euEnv.onmouseupBK(e);return true};function on_MouseClick(e){if(!e)var e=window.event;for(var i in euEnv.euDockArray)if(euEnv.euDockArray[i].mouseClick)euEnv.exeThread|=euEnv.euDockArray[i].mouseClick(euEnv.euScrOfX+e.clientX,euEnv.euScrOfY+e.clientY);if(euEnv.onclickBK)return euEnv.onclickBK(e);return true};if(document.onmousemove)euEnv.onmousemoveBK=document.onmousemove;document.onmousemove=on_MouseMove;if(document.onmousedown)euEnv.onmousedownBK=document.onmousedown;document.onmousedown=on_MouseDown;if(document.onmouseup)euEnv.onmouseupBK=document.onmouseup;document.onmouseup=on_MouseUp;if(document.onclick)euEnv.onclickBK=document.onclick;document.onclick=on_MouseClick;euDimensioni();offsEut();euThread();
2 1 \ No newline at end of file
  2 +if(!euEnv){var euEnv=[]}euEnv.Kost=[];euEnv.Kost.num=0;euEnv.Kost.next=function(){return this.num+1};euEnv.euDockArray=[];euEnv.refreshTime=35;euEnv.exeThread=true;euEnv.exeThreadWhiteLoop=0;euEnv.x=0;euEnv.y=0;euEnv.mouseMoved=false;var euUP=1;var euDOWN=2;var euLEFT=3;var euRIGHT=4;var euICON=5;var euMOUSE=6;var euSCREEN=7;var euOBJECT=8;var euABSOLUTE=9;var euRELATIVE=10;var euHORIZONTAL=11;var euVERTICAL=12;var euCENTER=13;var euTRANSPARENT=14;var euFIXED=15;var euOPAQUE=16;function euIdObjTop(euObj){var ret=euObj.offsetTop;while((euObj=euObj.offsetParent)!==null){ret+=euObj.offsetTop}return ret}function euIdObjLeft(euObj){var ret=euObj.offsetLeft;while((euObj=euObj.offsetParent)!=null){ret+=euObj.offsetLeft}return ret}function isEuInside(euObj,x,y){var euTop=euIdObjTop(euObj);var euLeft=euIdObjLeft(euObj);return((euTop<=y&&(euTop+euObj.offsetHeight)>=y)&&(euLeft<=x&&(euLeft+euObj.offsetWidth)>=x))}function euDimensioni(){if(typeof(window.innerWidth)=='number'){euEnv.euFrameWidth=window.innerWidth-16;euEnv.euFrameHeight=window.innerHeight}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){euEnv.euFrameWidth=document.documentElement.clientWidth-16;euEnv.euFrameHeight=document.documentElement.clientHeight}else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){euEnv.euFrameWidth=document.body.clientWidth;euEnv.euFrameHeight=document.body.clientHeight}}function offsEut(){euEnv.euScrOfY=0;euEnv.euScrOfX=0;if(typeof(window.pageYoffsEut)=='number'){euEnv.euScrOfY=window.pageYoffsEut;euEnv.euScrOfX=window.pageXoffsEut}else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){euEnv.euScrOfY=document.body.scrollTop;euEnv.euScrOfX=document.body.scrollLeft}else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){euEnv.euScrOfY=document.documentElement.scrollTop;euEnv.euScrOfX=document.documentElement.scrollLeft}}function euKostFunc30(x){return 0.3}function euKostFunc100(x){return 1}function euLinear(x){return x}function euLinear30(x){var r=1*(x+(1-x)*0.3);return r}function euLinear20(x){return x+(1-x)*0.2}function euExp30(x){return euLinear30(x*x*x)}function euLinear50(x){return x+(1-x)*0.5}function euHarmonic(x){return euLinear30((1-Math.cos(Math.PI*x))/2)}function euSemiHarmonic(x){return euLinear30(Math.cos(Math.PI*(1-x)/2))}function euDock(){this.id='euDock_'+euEnv.Kost.next();var novoel=document.createElement("div");novoel.style.position="absolute";novoel.innerHTML="<div id='"+this.id+"_bar' style='z-index:1000;position:absolute;border:0px solid black;'></div>"+"<div onMouseOut='euEnv.euDockArray."+this.id+".mouseOut();' onMouseOver='euEnv.euDockArray."+this.id+".mouseOver();' id='"+this.id+"' style='z-index:1000;position:absolute;border:0px solid black; cursor: pointer;'></div>";document.body.appendChild(novoel);this.div=document.getElementById(this.id);this.divBar=document.getElementById(this.id+"_bar");this.iconsArray=[];this.isInside=false;euEnv.euDockArray[this.id]=this;this.bar=null;this.mouseX=0;this.mouseY=0;this.centerPosX=0;this.centerPosY=0;this.offset=0;this.iconOffset=0;this.venusHillSize=3;this.venusHillTrans=euLinear;this.position=euUP;this.align=euSCREEN;this.objectAlign=euDOWN;this.idObjectHook;this.animaition=euICON;this.animFading=euABSOLUTE;this.setIconsOffset=function(offset){this.iconOffset=offset};this.setAnimation=function(anim,size){this.animaition=anim;this.venusHillSize=size};this.setPointAlign=function(x,y,pos){this.offset=0;this.align=euABSOLUTE;this.position=pos;this.setCenterPos(x,y)};this.setObjectAlign=function(idObj,align,offset,pos){this.offset=offset;this.align=euOBJECT;this.objectAlign=align;this.position=pos;this.idObjectHook=document.getElementById(idObj);this.setObjectCoord()};this.setObjectCoord=function(){if(this.objectAlign==euDOWN)this.setCenterPos(euIdObjLeft(this.idObjectHook)+(this.idObjectHook.offsetWidth/2),euIdObjTop(this.idObjectHook)+this.idObjectHook.offsetHeight+this.offset);else if(this.objectAlign==euUP)this.setCenterPos(euIdObjLeft(this.idObjectHook)+(this.idObjectHook.offsetWidth/2),euIdObjTop(this.idObjectHook)-this.offset);else if(this.objectAlign==euLEFT)this.setCenterPos(euIdObjLeft(this.idObjectHook)-this.offset,euIdObjTop(this.idObjectHook)+(this.idObjectHook.offsetHeight/2));else if(this.objectAlign==euRIGHT)this.setCenterPos(euIdObjLeft(this.idObjectHook)+this.idObjectHook.offsetWidth+this.offset,euIdObjTop(this.idObjectHook)+(this.idObjectHook.offsetHeight/2));else if(this.objectAlign==euCENTER){if(this.position==euUP||this.position==euDOWN||this.position==euHORIZONTAL)this.setCenterPos(euIdObjLeft(this.idObjectHook)+(this.idObjectHook.offsetWidth/2),euIdObjTop(this.idObjectHook)+(this.idObjectHook.offsetHeight/2)-this.offset);else this.setCenterPos(euIdObjLeft(this.idObjectHook)+(this.idObjectHook.offsetWidth/2)+this.offset,euIdObjTop(this.idObjectHook)+(this.idObjectHook.offsetHeight/2))}};this.setScreenAlign=function(align,offset){this.offset=offset;this.align=euSCREEN;if(align==euUP)this.position=euDOWN;else if(align==euDOWN)this.position=euUP;else if(align==euLEFT)this.position=euRIGHT;else if(align==euRIGHT)this.position=euLEFT;this.setScreenCoord()};this.setScreenCoord=function(){euDimensioni();offsEut();if(this.position==euDOWN)this.setCenterPos(euEnv.euScrOfX+euEnv.euFrameWidth/2,euEnv.euScrOfY+this.offset);else if(this.position==euUP)this.setCenterPos(euEnv.euScrOfX+euEnv.euFrameWidth/2,euEnv.euScrOfY+euEnv.euFrameHeight-this.offset);else if(this.position==euRIGHT)this.setCenterPos(euEnv.euScrOfX+this.offset,euEnv.euScrOfY+euEnv.euFrameHeight/2);else if(this.position==euLEFT)this.setCenterPos(euEnv.euScrOfX+euEnv.euFrameWidth-this.offset,euEnv.euScrOfY+euEnv.euFrameHeight/2)};this.refreshDiv=function(){if(this.position==euDOWN){this.setPos(this.centerPosX-this.getWidth()/2,this.centerPosY+this.iconOffset)}else if(this.position==euUP){this.setPos(this.centerPosX-this.getWidth()/2,this.centerPosY-this.getHeight()-this.iconOffset)}else if(this.position==euRIGHT){this.setPos(this.centerPosX+this.iconOffset,this.centerPosY-this.getHeight()/2)}else if(this.position==euLEFT){this.setPos(this.centerPosX-this.getWidth()-this.iconOffset,this.centerPosY-this.getHeight()/2)}else if(this.position==euHORIZONTAL){this.setPos(this.centerPosX-this.getWidth()/2,this.centerPosY-this.getHeight()/2+this.iconOffset)}else if(this.position==euVERTICAL){this.setPos(this.centerPosX-this.getWidth()/2+this.iconOffset,this.centerPosY-this.getHeight()/2)}if(this.bar){if(this.position==euDOWN){this.setBarPos(this.centerPosX-this.getWidth()/2,this.centerPosY)}else if(this.position==euUP){this.setBarPos(this.centerPosX-this.getWidth()/2,this.centerPosY-this.bar.getSize())}else if(this.position==euRIGHT){this.setBarPos(this.centerPosX,this.centerPosY-this.getHeight()/2)}else if(this.position==euLEFT){this.setBarPos(this.centerPosX-this.bar.getSize(),this.centerPosY-this.getHeight()/2)}else if(this.position==euHORIZONTAL){this.setBarPos(this.centerPosX-this.getWidth()/2,this.centerPosY-this.bar.getSize()/2)}else if(this.position==euVERTICAL){this.setBarPos(this.centerPosX-this.bar.getSize()/2,this.centerPosY-this.getHeight()/2)}}}this.riposition=function(){if(this.align==euSCREEN)this.setScreenCoord();else if(this.align==euOBJECT)this.setObjectCoord()};this.setCenterPos=function(x,y){this.centerPosX=x;this.centerPosY=y;this.refreshDiv()};this.setPos=function(x,y){this.setPosX(x);this.setPosY(y)};this.setBarPos=function(x,y){this.setBarPosX(x);this.setBarPosY(y)};this.setDim=function(w,h){this.setWidth(w);this.setHeight(h)};this.setBarPosX=function(x){document.getElementById(this.id+"_bar").style.left=x+'px'};this.setBarPosY=function(y){document.getElementById(this.id+"_bar").style.top=y+'px'};this.getPosX=function(){return document.getElementById(this.id).style.left.replace(/[^0-9]/g,"")};this.setPosX=function(x){document.getElementById(this.id).style.left=x+'px'};this.getPosY=function(){return document.getElementById(this.id).style.top.replace(/[^0-9]/g,"")};this.setPosY=function(y){document.getElementById(this.id).style.top=y+'px'};this.getWidth=function(){return document.getElementById(this.id).style.width.replace(/[^0-9]/g,"")};this.setWidth=function(w){document.getElementById(this.id).style.width=Math.round(w)+'px'};this.getHeight=function(){return document.getElementById(this.id).style.height.replace(/[^0-9]/g,"")};this.setHeight=function(h){document.getElementById(this.id).style.height=Math.round(h)+'px'};this.getVenusWidth=function(){return this.venusHillSize*this.getWidth()};this.getVenusHeight=function(){return this.venusHillSize*this.getHeight()};this.getMouseRelativeX=function(){return this.mouseX-euIdObjLeft(this.div)};this.getMouseRelativeY=function(){return this.mouseY-euIdObjTop(this.div)};this.updateDims=function(){var bakWidth=0;var bakHeight=0;for(var i in this.iconsArray)if(this.iconsArray[i].id){if(this.position==euUP||this.position==euDOWN||this.position==euHORIZONTAL){bakWidth+=this.iconsArray[i].getWidth();bakHeight=(this.iconsArray[i].getHeight()>bakHeight)?this.iconsArray[i].getHeight():bakHeight;bakHeight=Math.round(bakHeight)}else{bakHeight+=this.iconsArray[i].getHeight();bakWidth=(this.iconsArray[i].getWidth()>bakWidth)?this.iconsArray[i].getWidth():bakWidth;bakWidth=Math.round(bakWidth)}}if(this.bar){if(this.position==euUP||this.position==euDOWN||this.position==euHORIZONTAL)this.bar.setProperties(bakWidth,this.position);else this.bar.setProperties(bakHeight,this.position);this.bar.refresh()}var posx=0;var posy=0;var updPosX=0;var updPosY=0;for(var i in this.iconsArray)if(this.iconsArray[i].id){if(this.position==euDOWN){updPosX=posx;updPosY=posy;posx+=this.iconsArray[i].getWidth()}else if(this.position==euUP){updPosX=posx;updPosY=bakHeight-this.iconsArray[i].getHeight();posx+=this.iconsArray[i].getWidth()}else if(this.position==euRIGHT){updPosX=posx;updPosY=posy;posy+=this.iconsArray[i].getHeight()}else if(this.position==euLEFT){updPosX=bakWidth-this.iconsArray[i].getWidth();updPosY=posy;posy+=this.iconsArray[i].getHeight()}else if(this.position==euHORIZONTAL){updPosX=posx;updPosY=(bakHeight-this.iconsArray[i].getHeight())/2;posx+=this.iconsArray[i].getWidth()}else if(this.position==euVERTICAL){updPosX=(bakWidth-this.iconsArray[i].getWidth())/2;updPosY=posy;posy+=this.iconsArray[i].getHeight()}this.iconsArray[i].setPos(updPosX,updPosY);this.iconsArray[i].refresh()}this.setDim(bakWidth,bakHeight);this.refreshDiv()};this.kernel=function(){if(this.isInside)return this.kernelMouseOver();else return this.kernelMouseOut()};this.kernelMouseOver=function(){var ret=false;var overI=-1;var mouseRelX=this.getMouseRelativeX();var mouseRelY=this.getMouseRelativeY();var mediana;var border;var frameTo;var venusWidth;var venusHeight;var overIcon;var temp;if(this.position==euUP||this.position==euDOWN||this.position==euHORIZONTAL){venusWidth=this.getVenusWidth();for(var i in this.iconsArray)if(this.iconsArray[i].id)if(this.iconsArray[i].isInsideX(mouseRelX)){overIcon=i;border=this.iconsArray[i].getWidth()/2;if(this.animaition==euICON){mouseRelX=this.iconsArray[i].posX+border;border=0}try{temp=$i(this.iconsArray[i].elementsArray[0].id);if(temp){i3GEO.barraDeBotoes.mostraJanela(temp,this.iconsArray[i].dica)}}catch(e){}}for(var i in this.iconsArray)if(this.iconsArray[i].id){mediana=this.iconsArray[i].posX+this.iconsArray[i].getWidth()/2;if(Math.abs(mediana-mouseRelX)<=border)mediana=mouseRelX;else if(mediana<mouseRelX)mediana+=this.iconsArray[i].getWidth()/2;else if(mediana>mouseRelX)mediana-=this.iconsArray[i].getWidth()/2;if(this.animaition==euICON&&Math.abs(i-overIcon)<=this.venusHillSize)frameTo=this.venusHillTrans(1-Math.abs(i-overIcon)/this.venusHillSize);else if(this.animaition==euMOUSE&&Math.abs(mediana-mouseRelX)<=venusWidth)frameTo=this.venusHillTrans(1-Math.abs(mediana-mouseRelX)/venusWidth);else frameTo=0;if(frameTo==0||frameTo==1||Math.abs(frameTo-this.iconsArray[i].frame)>0.01)ret|=this.iconsArray[i].setFrameTo(frameTo);if(this.animFading==euABSOLUTE)if(this.iconsArray[i].isInsideX(mouseRelX))ret|=this.iconsArray[i].setFadingTo(1);else ret|=this.iconsArray[i].setFadingTo(0);else ret|=this.iconsArray[i].setFadingTo(frameTo)}}else{venusHeight=this.getVenusHeight();for(var i in this.iconsArray)if(this.iconsArray[i].id)if(this.iconsArray[i].isInsideY(mouseRelY)){overIcon=i;border=this.iconsArray[i].getHeight()/2;if(this.animaition==euICON){mouseRelY=this.iconsArray[i].posY+border;border=0}}for(var i in this.iconsArray)if(this.iconsArray[i].id){mediana=this.iconsArray[i].posY+this.iconsArray[i].getHeight()/2;if(Math.abs(mediana-mouseRelY)<=border)mediana=mouseRelY;else if(mediana<mouseRelY)mediana+=this.iconsArray[i].getHeight()/2;else if(mediana>mouseRelY)mediana-=this.iconsArray[i].getHeight()/2;if(this.animaition==euICON&&Math.abs(i-overIcon)<=this.venusHillSize)frameTo=this.venusHillTrans(1-Math.abs(i-overIcon)/this.venusHillSize);else if(this.animaition==euMOUSE&&Math.abs(mediana-mouseRelY)<=venusHeight)frameTo=this.venusHillTrans(1-Math.abs(mediana-mouseRelY)/venusHeight);else frameTo=0;if(frameTo==0||frameTo==1||Math.abs(frameTo-this.iconsArray[i].frame)>0.01)ret|=this.iconsArray[i].setFrameTo(frameTo);if(this.animFading==euABSOLUTE)if(this.iconsArray[i].isInsideY(mouseRelY))ret|=this.iconsArray[i].setFadingTo(1);else ret|=this.iconsArray[i].setFadingTo(0);else ret|=this.iconsArray[i].setFadingTo(frameTo)}}if(ret)this.updateDims();return ret};this.kernelMouseOut=function(){var ret=false;for(var i in this.iconsArray){if(this.iconsArray[i].id)ret|=this.iconsArray[i].setAllFrameTo(0);if(ret){this.updateDims()}}return ret};this.mouseOut=function(){this.isInside=false;euEnv.exeThreadWhiteLoop=5};this.mouseOver=function(){this.isInside=true;euEnv.exeThreadWhiteLoop=5};this.mouseMove=function(x,y){var inside=isEuInside(this.div,x,y);var ret=(this.mouseX!=x||this.mouseY!=y)&&inside;this.mouseX=x;this.mouseY=y;if(inside!=this.isInside){this.isInside=inside;ret=true}for(var i in this.iconsArray)if(this.iconsArray[i].id)ret|=this.iconsArray[i].isRunning();return ret};this.iconParams=new Array();this.setAllFrameStep=function(step){this.iconParams.frameStep=step;for(var i in this.iconsArray)if(this.iconsArray[i].id)this.iconsArray[i].frameStep=step};this.setAllZoomFunc=function(func){this.setAllZoomFuncW(func);this.setAllZoomFuncH(func)};this.setAllZoomFuncW=function(func){this.iconParams.zoomFuncW=func;for(var i in this.iconsArray)if(this.iconsArray[i].id)this.iconsArray[i].zoomFuncW=func};this.setAllZoomFuncH=function(func){this.iconParams.zoomFuncH=func;for(var i in this.iconsArray)if(this.iconsArray[i].id)this.iconsArray[i].zoomFuncH=func};this.setBar=function(args){var id='euDock_bar_'+euEnv.Kost.next();euEnv.euDockArray[id]=new euDockBar(id,this);euEnv.euDockArray[id].setElements(args);this.bar=euEnv.euDockArray[id];return euEnv.euDockArray[id]};this.addIcon=function(args,params){var id=params.id;var id='euDock_icon_'+euEnv.Kost.next();euEnv.euDockArray[id]=new euDockIcon(id,this);euEnv.euDockArray[id].addElement(args);this.iconsArray.push(euEnv.euDockArray[id]);for(i in this.iconParams)euEnv.euDockArray[id][i]=this.iconParams[i];for(i in params)euEnv.euDockArray[id][i]=params[i];return euEnv.euDockArray[id]};this.delIcon=function(elem){euEnv.euDockArray.splice(elem);euEnv.euDockArray[elem.id]=0;for(var i in this.iconsArray)if(this.iconsArray[i]==elem)this.iconsArray.splice(i,1);elem.destroy();elem=null;this.updateDims()}}function euDockIcon(id,dock){this.id=id;this.parentDock=dock;this.elementsArray;this.zoomFuncW=euLinear30;this.zoomFuncH=euLinear30;this.posX=0;this.posY=0;this.width=0;this.height=0;this.frame=0;this.frameStep=0.5;this.fadingFrame=0;this.fadingStep=1;this.fadingType=euTRANSPARENT;this.loaded=false;this.runningFrame=false;this.runningFading=false;this.updateDims=function(){var i;if(!this.loaded){return}for(i=0;i<this.elementsArray.length;i++)this.elementsArray[i].setProperties(this.posX,this.posY,this.getWidth(),this.getHeight())};this.updateFading=function(){if(!this.loaded)return;var stato=this.fadingFrame*(this.elementsArray.length-1);var prev=Math.floor(stato);var next=Math.ceil(stato);var fading=0;for(var i=0;i<this.elementsArray.length;i++){if(this.fadingType==euFIXED){if(i==next)fading=100-100*(i-stato);else if(i<next)fading=100;else fading=0}else{if(i==next)fading=100-100*(i-stato);else if(i==prev){if(this.fadingType==euTRANSPARENT)fading=100-100*(stato-i);else fading=100}else fading=0}this.elementsArray[i].setFading(fading)}};this.refresh=function(){this.updateDims();this.updateFading()};this.isAbsoluteInside=function(x,y){x-=this.getAbsolutePosX();y-=this.getAbsolutePosY();return x>0&&y>0&&x<this.getWidth()&&y<this.getHeight()};this.isInside=function(x,y){return this.isInsideX(x)&&this.isInsideY(y)};this.isInsideX=function(x){return(this.loaded&&(this.posX<=x)&&((this.posX+this.getWidth())>=x))};this.isInsideY=function(y){return(this.loaded&&(this.posY<=y)&&((this.posY+this.getHeight())>=y))};this.retrieveLoadingDims=function(elem,num){if(elem.onLoadPrev)elem.onLoadPrev();if(num==0&&!this.loaded)this.setDim(elem.getWidth(),elem.getHeight());elem.loaded=true;var ret=true;for(var i in this.elementsArray)if(this.elementsArray[i].id)ret&=this.elementsArray[i].loaded;this.loaded=ret;if(this.loaded){this.parentDock.updateDims();for(var i in this.elementsArray)if(this.elementsArray[i].id)this.elementsArray[i].show()}if(elem.onLoadNext)elem.onLoadNext()};this.setPos=function(x,y){this.posX=x;this.posY=y};this.setDim=function(w,h){if(this.width==0)this.width=w;if(this.height==0)this.height=h};this.getAbsolutePosX=function(){return euIdObjLeft(this.parentDock.div)+this.posX};this.getAbsolutePosY=function(){return euIdObjTop(this.parentDock.div)+this.posY};this.setPosX=function(x){this.posX=x};this.setPosY=function(y){this.posY=y};this.getWidth=function(){if(!this.loaded)return 0;var calc=this.width*this.zoomFuncW(this.frame);if(calc<38){calc=38}return calc};this.getHeight=function(){if(!this.loaded)return 0;var calc=this.height*this.zoomFuncH(this.frame);if(calc<38){calc=38}return calc};this.isRunning=function(){return this.runningFrame||this.runningFading};this.setAllFrameTo=function(to){this.setFadingTo(to);this.setFrameTo(to);return this.isRunning()};this.setFadingTo=function(fadingTo){if(this.fadingFrame==fadingTo)this.runningFading=false;else{if(this.fadingFrame>fadingTo)this.fadingFrame-=this.fadingStep;else this.fadingFrame+=this.fadingStep;this.runningFading=true;if(Math.abs(this.fadingFrame-fadingTo)<this.fadingStep)this.fadingFrame=fadingTo;if(this.fadingFrame<0)this.fadingFrame=0;if(this.fadingFrame>1)this.fadingFrame=1}return this.runningFading};this.setFrameTo=function(frameTo){if(this.frame==frameTo)this.runningFrame=false;else{this.runningFrame=true;this.frame+=(frameTo-this.frame)*this.frameStep;if(Math.abs(this.frame-frameTo)<0.01)this.frame=frameTo;if(this.frame<0)this.frame=0;if(this.frame>1)this.frame=1}return this.runningFrame};this.addElement=function(args){if(typeof(args)!="undefined"&&args!=null){this.elementsArray=new Array();this.fadingStep=0.5/args.length;for(var i=0;i<args.length;i++)for(var ii in args[i]){var id="euDock_"+ii+"_"+euEnv.Kost.next();euEnv.euDockArray[id]=new window[ii](id,args[i][ii],this.parentDock.div,"euEnv.euDockArray."+this.id+".retrieveLoadingDims(euEnv.euDockArray."+id+","+i+");");this.elementsArray.push(euEnv.euDockArray[id]);euEnv.euDockArray[id].loaded=false}}};this.destroy=function(){for(var i in this.elementsArray)if(this.elementsArray[i].id){euEnv.euDockArray[this.elementsArray[i].id]=0;euEnv.euDockArray.splice(this.elementsArray[i],1);this.elementsArray[i].destroy()}this.elementsArray.splice(0,this.elementsArray.length)};this.mouseClick=function(x,y){if(this.isAbsoluteInside(x,y)){if(this.link)if(this.target){if(top.frames[this.target])top.frames[this.target].location.href=this.link;else top.frames[this.target]=window.open(this.link,this.target,"")}else document.location.href=this.link;else if(this.mouseInsideClick)this.mouseInsideClick(x,y,this.id,this.getAbsolutePosX(),this.getAbsolutePosY())}}}function euDockBar(id,dock){this.id=id;this.parentDock=dock;this.elementsArray=[];this.len=0;this.align=euUP;this.loaded=false;this.getSize=function(){if(!this.loaded){return 0}if(this.align==euUP||this.align==euDOWN||this.align==euHORIZONTAL){return this.elementsArray.left.getHeight()}else{return this.elementsArray.top.getWidth()}};this.refresh=function(){if(!this.loaded){return}if(this.align==euUP||this.align==euDOWN||this.align==euHORIZONTAL){this.elementsArray.left.setPos(-this.elementsArray.left.getWidth(),0);this.elementsArray.horizontal.setProperties(0,0,Math.round(this.len),this.getSize());this.elementsArray.right.setPos(Math.round(this.len),0);this.elementsArray.left.show();this.elementsArray.horizontal.show();this.elementsArray.right.show();if(this.elementsArray.top){this.elementsArray.top.hide()}if(this.elementsArray.bottom){this.elementsArray.bottom.hide()}if(this.elementsArray.vertical){this.elementsArray.vertical.setProperties(0,0,0,0);this.elementsArray.vertical.hide()}}else{this.elementsArray.top.setPos(0,-this.elementsArray.top.getHeight());this.elementsArray.vertical.setProperties(0,0,this.getSize(),Math.round(this.len));this.elementsArray.bottom.setPos(0,Math.round(this.len));this.elementsArray.top.show();this.elementsArray.vertical.show();this.elementsArray.bottom.show();if(this.elementsArray.left){this.elementsArray.left.hide()}if(this.elementsArray.right){this.elementsArray.right.hide()}if(this.elementsArray.horizontal){this.elementsArray.horizontal.setProperties(0,0,0,0);this.elementsArray.horizontal.hide()}}};this.setProperties=function(len,align){this.len=len+1;this.align=align;this.refresh()};this.retrieveLoadingDims=function(elem){if(elem.onLoadPrev)elem.onLoadPrev();elem.loaded=true;var ret=true;for(var i in this.elementsArray)if(this.elementsArray[i].id)ret&=this.elementsArray[i].loaded;this.loaded=ret;if(this.loaded){this.parentDock.updateDims();for(var i in this.elementsArray)if(this.elementsArray[i].id)this.elementsArray[i].show()}if(elem.onLoadNext)elem.onLoadNext()};this.setElements=function(args){if(typeof(args)!="undefined"&&args!=null){for(var i in args)for(var ii in args[i]){var id="euDock_"+ii+"_"+euEnv.Kost.next();euEnv.euDockArray[id]=new window[ii](id,args[i][ii],this.parentDock.divBar,"euEnv.euDockArray."+this.id+".retrieveLoadingDims(euEnv.euDockArray."+id+");");this.elementsArray[i]=euEnv.euDockArray[id];euEnv.euDockArray[id].loaded=false}}}}function euThread(){var i;euDimensioni();offsEut();euEnv.timeout=window.setTimeout("euThread();",euEnv.refreshTime);euEnv.exeThread=false;if(euEnv.mouseMoved){for(i in euEnv.euDockArray){if(euEnv.euDockArray[i].mouseMove){euEnv.exeThread|=euEnv.euDockArray[i].mouseMove(euEnv.euScrOfX+euEnv.x,euEnv.euScrOfY+euEnv.y)}}}euEnv.mouseMoved=false;if(euEnv.exeThread){euEnv.exeThreadWhiteLoop=5}if(euEnv.exeThreadWhiteLoop>0){euKernel()}for(i in euEnv.euDockArray){if(euEnv.euDockArray[i].riposition){euEnv.euDockArray[i].riposition()}}}function euKernel(){var i;euEnv.exeThread=false;for(i in euEnv.euDockArray)if(euEnv.euDockArray[i].kernel)euEnv.exeThread|=euEnv.euDockArray[i].kernel();if(euEnv.exeThread)euEnv.exeThreadWhiteLoop=5;else euEnv.exeThreadWhiteLoop--}function on_MouseMove(e){if(!e)var e=window.event;euEnv.x=e.clientX;euEnv.y=e.clientY;euEnv.mouseMoved=true;if(euEnv.onmousemoveBK)return euEnv.onmousemoveBK(e);return true}function on_MouseDown(e){if(!e)var e=window.event;for(var i in euEnv.euDockArray)if(euEnv.euDockArray[i].mouseDown)euEnv.exeThread|=euEnv.euDockArray[i].mouseDown(euEnv.euScrOfX+e.clientX,euEnv.euScrOfY+e.clientY);if(euEnv.onmousedownBK)return euEnv.onmousedownBK(e);return true}function on_MouseUp(e){if(!e)var e=window.event;for(var i in euEnv.euDockArray)if(euEnv.euDockArray[i].mouseUp)euEnv.exeThread|=euEnv.euDockArray[i].mouseUp(euEnv.euScrOfX+e.clientX,euEnv.euScrOfY+e.clientY);if(euEnv.onmouseupBK)return euEnv.onmouseupBK(e);return true}function on_MouseClick(e){var i;if(!e)var e=window.event;for(i in euEnv.euDockArray){if(euEnv.euDockArray[i].mouseClick){euEnv.exeThread|=euEnv.euDockArray[i].mouseClick(euEnv.euScrOfX+e.clientX,euEnv.euScrOfY+e.clientY)}}if(euEnv.onclickBK){return euEnv.onclickBK(e)}return true}if(document.onmousemove){euEnv.onmousemoveBK=document.onmousemove}document.onmousemove=on_MouseMove;if(document.onmousedown){euEnv.onmousedownBK=document.onmousedown}document.onmousedown=on_MouseDown;if(document.onmouseup){euEnv.onmouseupBK=document.onmouseup}document.onmouseup=on_MouseUp;if(document.onclick){euEnv.onclickBK=document.onclick}document.onclick=on_MouseClick;euDimensioni();offsEut();euThread();
3 3 \ No newline at end of file
... ...
pacotes/eudock/js/euDock.Image.js
  1 +
  2 +
1 3 /*
2 4 * euDock.Image
3 5 *
... ... @@ -272,4 +274,6 @@ if (!euEnv.imageBasePath)
272 274 *****euImageNoFadingIE_PNG Object ******
273 275 ****** (END) *******
274 276 ****************************************
275   - */
276 277 \ No newline at end of file
  278 + */
  279 +
  280 +
277 281 \ No newline at end of file
... ...
pacotes/richdraw/richdraw_tudo_compacto.js
1   -function RichDrawEditor(elem,renderer){this.container=elem;this.gridX=10;this.gridY=10;this.mouseDownX=0;this.mouseDownY=0;this.mode='';this.fillColor='';this.lineColor='';this.lineWidth='';this.circColor='';this.textColor='';this.selected=null;this.selectedBounds={x:0,y:0,width:0,height:0};this.onselect=function(){};this.onunselect=function(){};this.renderer=renderer;this.renderer.init(this.container);this.fecha=function(){elem.innerHTML="";elem.style.display="none"}}RichDrawEditor.prototype.clearWorkspace=function(){this.container.innerHTML=''};RichDrawEditor.prototype.deleteSelection=function(){if(this.selected){this.renderer.remove(this.container.ownerDocument.getElementById('tracker'));this.renderer.remove(this.selected);this.selected=null}};RichDrawEditor.prototype.select=function(elem){if(elem==this.selected)return;this.selected=elem;this.renderer.showTracker(this.selected);this.onselect(this)};RichDrawEditor.prototype.unselect=function(){if(this.selected){this.renderer.remove(this.container.ownerDocument.getElementById('tracker'));this.selected=null;this.onunselect(this)}};RichDrawEditor.prototype.getSelectedElement=function(){return this.selected};RichDrawEditor.prototype.setGrid=function(horizontal,vertical){this.gridX=horizontal;this.gridY=vertical};RichDrawEditor.prototype.editCommand=function(cmd,value){if(cmd=='mode'){this.mode=value}else if(this.selected==null){if(cmd=='fillcolor'){this.fillColor=value}else if(cmd=='linecolor'){this.lineColor=value}else if(cmd=='textcolor'){this.textColor=value}else if(cmd=='circcolor'){this.circColor=value}else if(cmd=='linewidth'){this.lineWidth=parseInt(value)+'px'}}else{this.renderer.editCommand(this.selected,cmd,value)}};RichDrawEditor.prototype.queryCommand=function(cmd){if(cmd=='mode'){return this.mode}else if(this.selected==null){if(cmd=='fillcolor'){return this.fillColor}else if(cmd=='linecolor'){return this.lineColor}else if(cmd=='textcolor'){return this.textColor}else if(cmd=='circcolor'){return this.circColor}else if(cmd=='linewidth'){return this.lineWidth}}else{return this.renderer.queryCommand(this.selected,cmd)}};RichDrawEditor.prototype.onSelectStart=function(event){return false};RichDrawEditor.prototype.onClick=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;if(this.mode!='select'){this.unselect();this.mouseDownX=snappedX;this.mouseDownY=snappedY;this.selected=this.renderer.create(this.mode,this.fillColor,this.lineColor,this.lineWidth,this.mouseDownX,this.mouseDownY,1,1);this.selected.id='shape:'+createUUID();Event.observe(this.selected,"mousemove",this.onHitListener);Event.observe(this.container,"mousemove",this.onDrawListener)}else{if(this.mouseDownX!=snappedX||this.mouseDownY!=snappedY)this.unselect()}return false};RichDrawEditor.prototype.onMouseDown=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;if(this.mode!='select'){this.unselect();this.mouseDownX=snappedX;this.mouseDownY=snappedY;this.selected=this.renderer.create(this.mode,this.fillColor,this.lineColor,this.lineWidth,this.mouseDownX,this.mouseDownY,1,1);this.selected.id='shape:'+createUUID();Event.observe(this.selected,"mousedown",this.onHitListener);Event.observe(this.container,"mousemove",this.onDrawListener)}else{if(this.mouseDownX!=snappedX||this.mouseDownY!=snappedY)this.unselect()}return false};RichDrawEditor.prototype.onMouseUp=function(event){Event.stopObserving(this.container,"mouseup",this.onDrawListener);Event.stopObserving(this.container,"mouseup",this.onDragListener);if(this.mode!='select'){this.selected=null}};RichDrawEditor.prototype.onDrag=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;var deltaX=snappedX-this.mouseDownX;var deltaY=snappedY-this.mouseDownY;this.renderer.move(this.selected,this.selectedBounds.x+deltaX,this.selectedBounds.y+deltaY);this.renderer.showTracker(this.selected)};RichDrawEditor.prototype.onResize=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;var deltaX=snappedX-this.mouseDownX;var deltaY=snappedY-this.mouseDownY;this.renderer.track(handle,deltaX,deltaY);show_tracker()};RichDrawEditor.prototype.onDraw=function(event){if(this.selected==null)return;var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;this.renderer.resize(this.selected,this.mouseDownX,this.mouseDownY,snappedX,snappedY)};RichDrawEditor.prototype.onHit=function(event){if(this.mode=='select'){this.select(Event.element(event));this.selectedBounds=this.renderer.bounds(this.selected);var offset=Position.cumulativeOffset(this.container);this.mouseDownX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;this.mouseDownY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;Event.observe(this.container,"mousemove",this.onDragListener)}};function createUUID(){return[4,2,2,2,6].map(function(length){var uuidpart="";for(var i=0;i<length;i++){var uuidchar=parseInt((Math.random()*256)).toString(16);if(uuidchar.length==1)uuidchar="0"+uuidchar;uuidpart+=uuidchar}return uuidpart}).join('-')}function AbstractRenderer(){};AbstractRenderer.prototype.init=function(elem){};AbstractRenderer.prototype.bounds=function(shape){return{x:0,y:0,width:0,height:0}};AbstractRenderer.prototype.create=function(shape,fillColor,lineColor,lineWidth,left,top,width,height,texto){};AbstractRenderer.prototype.remove=function(shape){};AbstractRenderer.prototype.move=function(shape,left,top){};AbstractRenderer.prototype.track=function(shape){};AbstractRenderer.prototype.resize=function(shape,fromX,fromY,toX,toY){};AbstractRenderer.prototype.editCommand=function(shape,cmd,value){};AbstractRenderer.prototype.queryCommand=function(shape,cmd){};AbstractRenderer.prototype.showTracker=function(shape){};AbstractRenderer.prototype.getMarkup=function(){return null};
2   -function SVGRenderer(){this.base=AbstractRenderer;this.svgRoot=null}SVGRenderer.prototype=new AbstractRenderer;SVGRenderer.prototype.init=function(elem){this.container=elem;this.container.style.MozUserSelect='none';var svgNamespace='http://www.w3.org/2000/svg';this.svgRoot=this.container.ownerDocument.createElementNS(svgNamespace,"svg");this.container.appendChild(this.svgRoot)};SVGRenderer.prototype.bounds=function(shape){var rect=new Object();var box=shape.getBBox();rect['x']=box.x;rect['y']=box.y;rect['width']=box.width;rect['height']=box.height;return rect};SVGRenderer.prototype.create=function(shape,fillColor,lineColor,lineWidth,left,top,width,height,texto){var svgNamespace='http://www.w3.org/2000/svg';var svg;if(shape=='rect'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'rect');svg.setAttributeNS(null,'x',left+'px');svg.setAttributeNS(null,'y',top+'px');svg.setAttributeNS(null,'width',width+'px');svg.setAttributeNS(null,'height',height+'px')}else if(shape=='ellipse'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'ellipse');svg.setAttributeNS(null,'cx',(left+width/2)+'px');svg.setAttributeNS(null,'cy',(top+height/2)+'px');svg.setAttributeNS(null,'rx',(width/2)+'px');svg.setAttributeNS(null,'ry',(height/2)+'px')}else if(shape=='circ'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'ellipse');svg.setAttributeNS(null,'cx',left+'px');svg.setAttributeNS(null,'cy',top+'px');svg.setAttributeNS(null,'rx',width+'px');svg.setAttributeNS(null,'ry',width+'px')}else if(shape=='roundrect'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'rect');svg.setAttributeNS(null,'x',left+'px');svg.setAttributeNS(null,'y',top+'px');svg.setAttributeNS(null,'rx','20px');svg.setAttributeNS(null,'ry','20px');svg.setAttributeNS(null,'width',width+'px');svg.setAttributeNS(null,'height',height+'px')}else if(shape=='line'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'line');svg.setAttributeNS(null,'x1',left+'px');svg.setAttributeNS(null,'y1',top+'px');svg.setAttributeNS(null,'x2',width+'px');svg.setAttributeNS(null,'y2',height+'px')}else if(shape=='text'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'text');var n=this.container.ownerDocument.createTextNode(texto);svg.appendChild(n);svg.setAttributeNS(null,'x',left+'px');svg.setAttributeNS(null,'y',top+'px');svg.setAttributeNS(null,'font-size','12px')}svg.style.position='absolute';if(fillColor.length==0)fillColor='none';svg.setAttributeNS(null,'fill',fillColor);if(lineColor.length==0)lineColor='none';svg.setAttributeNS(null,'stroke',lineColor);svg.setAttributeNS(null,'stroke-width',lineWidth);this.svgRoot.appendChild(svg);return svg};SVGRenderer.prototype.remove=function(shape){shape.parentNode.removeChild(shape)};SVGRenderer.prototype.move=function(shape,left,top){if(shape.tagName=='line'){var deltaX=shape.getBBox().width;var deltaY=shape.getBBox().height;shape.setAttributeNS(null,'x1',left);shape.setAttributeNS(null,'y1',top);shape.setAttributeNS(null,'x2',left+deltaX);shape.setAttributeNS(null,'y2',top+deltaY)}else if(shape.tagName=='ellipse'){shape.setAttributeNS(null,'cx',left+(shape.getBBox().width/2));shape.setAttributeNS(null,'cy',top+(shape.getBBox().height/2))}else{shape.setAttributeNS(null,'x',left);shape.setAttributeNS(null,'y',top)}};SVGRenderer.prototype.track=function(shape){};SVGRenderer.prototype.resize=function(shape,fromX,fromY,toX,toY){var deltaX=toX-fromX;var deltaY=toY-fromY;if(shape.tagName=='line'){shape.setAttributeNS(null,'x2',toX);shape.setAttributeNS(null,'y2',toY)}else if(shape.tagName=='ellipse'){if(deltaX<0){shape.setAttributeNS(null,'cx',(fromX+deltaX/2)+'px');shape.setAttributeNS(null,'rx',(-deltaX/2)+'px')}else{shape.setAttributeNS(null,'cx',(fromX+deltaX/2)+'px');shape.setAttributeNS(null,'rx',(deltaX/2)+'px')}if(deltaY<0){shape.setAttributeNS(null,'cy',(fromY+deltaY/2)+'px');shape.setAttributeNS(null,'ry',(-deltaY/2)+'px')}else{shape.setAttributeNS(null,'cy',(fromY+deltaY/2)+'px');shape.setAttributeNS(null,'ry',(deltaY/2)+'px')}}else{if(deltaX<0){shape.setAttributeNS(null,'x',toX+'px');shape.setAttributeNS(null,'width',-deltaX+'px')}else{shape.setAttributeNS(null,'width',deltaX+'px')}if(deltaY<0){shape.setAttributeNS(null,'y',toY+'px');shape.setAttributeNS(null,'height',-deltaY+'px')}else{shape.setAttributeNS(null,'height',deltaY+'px')}}};SVGRenderer.prototype.editCommand=function(shape,cmd,value){if(shape!=null){if(cmd=='fillcolor'){if(value!='')shape.setAttributeNS(null,'fill',value);else shape.setAttributeNS(null,'fill','none')}else if(cmd=='linecolor'){if(value!='')shape.setAttributeNS(null,'stroke',value);else shape.setAttributeNS(null,'stroke','none')}else if(cmd=='linewidth'){shape.setAttributeNS(null,'stroke-width',parseInt(value)+'px')}}};SVGRenderer.prototype.queryCommand=function(shape,cmd){var result='';if(shape!=null){if(cmd=='fillcolor'){result=shape.getAttributeNS(null,'fill');if(result=='none')result=''}else if(cmd=='linecolor'){result=shape.getAttributeNS(null,'stroke');if(result=='none')result=''}else if(cmd=='linewidth'){result=shape.getAttributeNS(null,'stroke');if(result=='none')result='';else result=shape.getAttributeNS(null,'stroke-width')}}return result};SVGRenderer.prototype.showTracker=function(shape){var box=shape.getBBox();var tracker=document.getElementById('tracker');if(tracker){this.remove(tracker)}var svgNamespace='http://www.w3.org/2000/svg';tracker=document.createElementNS(svgNamespace,'rect');tracker.setAttributeNS(null,'id','tracker');tracker.setAttributeNS(null,'x',box.x-10);tracker.setAttributeNS(null,'y',box.y-10);tracker.setAttributeNS(null,'width',box.width+20);tracker.setAttributeNS(null,'height',box.height+20);tracker.setAttributeNS(null,'fill','none');tracker.setAttributeNS(null,'stroke','blue');tracker.setAttributeNS(null,'stroke-width','1');this.svgRoot.appendChild(tracker)};SVGRenderer.prototype.getMarkup=function(){return this.container.innerHTML};
3   -function VMLRenderer(){this.base=AbstractRenderer}VMLRenderer.prototype=new AbstractRenderer;VMLRenderer.prototype.init=function(elem){this.container=elem;this.container.style.overflow='hidden';elem.ownerDocument.namespaces.add("v","urn:schemas-microsoft-com:vml");var style=elem.ownerDocument.createStyleSheet();style.addRule('v\\:*',"behavior: url(#default#VML);")};VMLRenderer.prototype.bounds=function(shape){var rect=new Object();rect['x']=shape.offsetLeft;rect['y']=shape.offsetTop;rect['width']=shape.offsetWidth;rect['height']=shape.offsetHeight;return rect};VMLRenderer.prototype.create=function(shape,fillColor,lineColor,lineWidth,left,top,width,height,texto){var vml;if(shape=='rect'){vml=this.container.ownerDocument.createElement('v:rect')}else if(shape=='roundrect'){vml=this.container.ownerDocument.createElement('v:roundrect')}else if(shape=='ellipse'){vml=this.container.ownerDocument.createElement('v:oval')}else if(shape=='circ'){vml=this.container.ownerDocument.createElement('v:oval')}else if(shape=='line'){vml=this.container.ownerDocument.createElement('v:line')}else if(shape=='text'){vml=this.container.ownerDocument.createElement('v:textbox');vml.innerHTML=texto}if(shape!='line'){vml.style.position='absolute';vml.style.left=left;vml.style.top=top;vml.style.width=width;vml.style.height=height;if(fillColor!=''){vml.setAttribute('filled','true');vml.setAttribute('fillcolor',fillColor)}else{vml.setAttribute('filled','false')}}else{vml.style.position='absolute';vml.setAttribute('from',left+'px,'+top+'px');vml.setAttribute('to',width+'px,'+height+'px')}if(lineColor!=''){vml.setAttribute('stroked','true');vml.setAttribute('strokecolor',lineColor);vml.setAttribute('strokeweight',lineWidth)}else{vml.setAttribute('stroked','false')}this.container.appendChild(vml);return vml};VMLRenderer.prototype.remove=function(shape){shape.removeNode(true)};VMLRenderer.prototype.move=function(shape,left,top){if(shape.tagName=='line'){shape.style.marginLeft=left;shape.style.marginTop=top}else{shape.style.left=left;shape.style.top=top}};VMLRenderer.prototype.track=function(shape){};VMLRenderer.prototype.resize=function(shape,fromX,fromY,toX,toY){shape.setAttribute('to',toX+'px,'+toY+'px')};VMLRenderer.prototype.editCommand=function(shape,cmd,value){if(shape!=null){if(cmd=='fillcolor'){if(value!=''){shape.filled='true';shape.fillcolor=value}else{shape.filled='false';shape.fillcolor=''}}else if(cmd=='linecolor'){if(value!=''){shape.stroked='true';shape.strokecolor=value}else{shape.stroked='false';shape.strokecolor=''}}else if(cmd=='linewidth'){shape.strokeweight=parseInt(value)+'px'}}};VMLRenderer.prototype.queryCommand=function(shape,cmd){if(shape!=null){if(cmd=='fillcolor'){if(shape.filled=='false')return'';else return shape.fillcolor}else if(cmd=='linecolor'){if(shape.stroked=='false')return'';else return shape.strokecolor}else if(cmd=='linewidth'){if(shape.stroked=='false'){return''}else{return(parseFloat(shape.strokeweight)*(screen.logicalXDPI/72))+'px'}}}};VMLRenderer.prototype.showTracker=function(shape){var box=this.bounds(shape);var tracker=document.getElementById('tracker');if(tracker){this.remove(tracker)}tracker=this.container.ownerDocument.createElement('v:rect');tracker.id='tracker';tracker.style.position='absolute';tracker.style.left=box.x-10;tracker.style.top=box.y-10;tracker.style.width=box.width+20;tracker.style.height=box.height+20;tracker.setAttribute('filled','false');tracker.setAttribute('stroked','true');tracker.setAttribute('strokecolor','blue');tracker.setAttribute('strokeweight','1px');this.container.appendChild(tracker)};VMLRenderer.prototype.getMarkup=function(){return this.container.innerHTML};
  1 +function RichDrawEditor(elem,renderer){this.container=elem;this.gridX=10;this.gridY=10;this.mouseDownX=0;this.mouseDownY=0;this.mode='';this.fillColor='';this.lineColor='';this.lineWidth='';this.circColor='';this.textColor='';this.selected=null;this.selectedBounds={x:0,y:0,width:0,height:0};this.onselect=function(){};this.onunselect=function(){};this.renderer=renderer;this.renderer.init(this.container);this.fecha=function(){elem.innerHTML="";elem.style.display="none"}}RichDrawEditor.prototype.clearWorkspace=function(){this.container.innerHTML=''};RichDrawEditor.prototype.deleteSelection=function(){if(this.selected){this.renderer.remove(this.container.ownerDocument.getElementById('tracker'));this.renderer.remove(this.selected);this.selected=null}};RichDrawEditor.prototype.select=function(elem){if(elem==this.selected)return;this.selected=elem;this.renderer.showTracker(this.selected);this.onselect(this)};RichDrawEditor.prototype.unselect=function(){if(this.selected){this.renderer.remove(this.container.ownerDocument.getElementById('tracker'));this.selected=null;this.onunselect(this)}};RichDrawEditor.prototype.getSelectedElement=function(){return this.selected};RichDrawEditor.prototype.setGrid=function(horizontal,vertical){this.gridX=horizontal;this.gridY=vertical};RichDrawEditor.prototype.editCommand=function(cmd,value){if(cmd=='mode'){this.mode=value}else if(this.selected==null){if(cmd=='fillcolor'){this.fillColor=value}else if(cmd=='linecolor'){this.lineColor=value}else if(cmd=='textcolor'){this.textColor=value}else if(cmd=='circcolor'){this.circColor=value}else if(cmd=='linewidth'){this.lineWidth=parseInt(value)+'px'}}else{this.renderer.editCommand(this.selected,cmd,value)}};RichDrawEditor.prototype.queryCommand=function(cmd){if(cmd=='mode'){return this.mode}else if(this.selected==null){if(cmd=='fillcolor'){return this.fillColor}else if(cmd=='linecolor'){return this.lineColor}else if(cmd=='textcolor'){return this.textColor}else if(cmd=='circcolor'){return this.circColor}else if(cmd=='linewidth'){return this.lineWidth}}else{return this.renderer.queryCommand(this.selected,cmd)}};RichDrawEditor.prototype.onSelectStart=function(event){return false};RichDrawEditor.prototype.onClick=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;if(this.mode!='select'){this.unselect();this.mouseDownX=snappedX;this.mouseDownY=snappedY;this.selected=this.renderer.create(this.mode,this.fillColor,this.lineColor,this.lineWidth,this.mouseDownX,this.mouseDownY,1,1);this.selected.id='shape:'+createUUID();Event.observe(this.selected,"mousemove",this.onHitListener);Event.observe(this.container,"mousemove",this.onDrawListener)}else{if(this.mouseDownX!=snappedX||this.mouseDownY!=snappedY)this.unselect()}return false};RichDrawEditor.prototype.onMouseDown=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;if(this.mode!='select'){this.unselect();this.mouseDownX=snappedX;this.mouseDownY=snappedY;this.selected=this.renderer.create(this.mode,this.fillColor,this.lineColor,this.lineWidth,this.mouseDownX,this.mouseDownY,1,1);this.selected.id='shape:'+createUUID();Event.observe(this.selected,"mousedown",this.onHitListener);Event.observe(this.container,"mousemove",this.onDrawListener)}else{if(this.mouseDownX!=snappedX||this.mouseDownY!=snappedY)this.unselect()}return false};RichDrawEditor.prototype.onMouseUp=function(event){Event.stopObserving(this.container,"mouseup",this.onDrawListener);Event.stopObserving(this.container,"mouseup",this.onDragListener);if(this.mode!='select'){this.selected=null}};RichDrawEditor.prototype.onDrag=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;var deltaX=snappedX-this.mouseDownX;var deltaY=snappedY-this.mouseDownY;this.renderer.move(this.selected,this.selectedBounds.x+deltaX,this.selectedBounds.y+deltaY);this.renderer.showTracker(this.selected)};RichDrawEditor.prototype.onResize=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;var deltaX=snappedX-this.mouseDownX;var deltaY=snappedY-this.mouseDownY;this.renderer.track(handle,deltaX,deltaY);show_tracker()};RichDrawEditor.prototype.onDraw=function(event){if(this.selected==null)return;var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;this.renderer.resize(this.selected,this.mouseDownX,this.mouseDownY,snappedX,snappedY)};RichDrawEditor.prototype.onHit=function(event){if(this.mode=='select'){this.select(Event.element(event));this.selectedBounds=this.renderer.bounds(this.selected);var offset=Position.cumulativeOffset(this.container);this.mouseDownX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;this.mouseDownY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;Event.observe(this.container,"mousemove",this.onDragListener)}};function createUUID(){return[4,2,2,2,6].map(function(length){var uuidpart="";for(var i=0;i<length;i++){var uuidchar=parseInt((Math.random()*256)).toString(16);if(uuidchar.length==1)uuidchar="0"+uuidchar;uuidpart+=uuidchar}return uuidpart}).join('-')}function AbstractRenderer(){};AbstractRenderer.prototype.init=function(elem){};AbstractRenderer.prototype.bounds=function(shape){return{x:0,y:0,width:0,height:0}};AbstractRenderer.prototype.create=function(shape,fillColor,lineColor,lineWidth,left,top,width,height,texto){};AbstractRenderer.prototype.remove=function(shape){};AbstractRenderer.prototype.move=function(shape,left,top){};AbstractRenderer.prototype.track=function(shape){};AbstractRenderer.prototype.resize=function(shape,fromX,fromY,toX,toY){};AbstractRenderer.prototype.editCommand=function(shape,cmd,value){};AbstractRenderer.prototype.queryCommand=function(shape,cmd){};AbstractRenderer.prototype.showTracker=function(shape){};AbstractRenderer.prototype.getMarkup=function(){return null};function SVGRenderer(){this.base=AbstractRenderer;this.svgRoot=null}SVGRenderer.prototype=new AbstractRenderer;SVGRenderer.prototype.init=function(elem){this.container=elem;this.container.style.MozUserSelect='none';var svgNamespace='http://www.w3.org/2000/svg';this.svgRoot=this.container.ownerDocument.createElementNS(svgNamespace,"svg");this.container.appendChild(this.svgRoot)};SVGRenderer.prototype.bounds=function(shape){var rect=new Object();var box=shape.getBBox();rect['x']=box.x;rect['y']=box.y;rect['width']=box.width;rect['height']=box.height;return rect};SVGRenderer.prototype.create=function(shape,fillColor,lineColor,lineWidth,left,top,width,height,texto){var svgNamespace='http://www.w3.org/2000/svg';var svg;if(shape=='rect'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'rect');svg.setAttributeNS(null,'x',left+'px');svg.setAttributeNS(null,'y',top+'px');svg.setAttributeNS(null,'width',width+'px');svg.setAttributeNS(null,'height',height+'px')}else if(shape=='ellipse'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'ellipse');svg.setAttributeNS(null,'cx',(left+width/2)+'px');svg.setAttributeNS(null,'cy',(top+height/2)+'px');svg.setAttributeNS(null,'rx',(width/2)+'px');svg.setAttributeNS(null,'ry',(height/2)+'px')}else if(shape=='circ'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'ellipse');svg.setAttributeNS(null,'cx',left+'px');svg.setAttributeNS(null,'cy',top+'px');svg.setAttributeNS(null,'rx',width+'px');svg.setAttributeNS(null,'ry',width+'px')}else if(shape=='roundrect'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'rect');svg.setAttributeNS(null,'x',left+'px');svg.setAttributeNS(null,'y',top+'px');svg.setAttributeNS(null,'rx','20px');svg.setAttributeNS(null,'ry','20px');svg.setAttributeNS(null,'width',width+'px');svg.setAttributeNS(null,'height',height+'px')}else if(shape=='line'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'line');svg.setAttributeNS(null,'x1',left+'px');svg.setAttributeNS(null,'y1',top+'px');svg.setAttributeNS(null,'x2',width+'px');svg.setAttributeNS(null,'y2',height+'px')}else if(shape=='text'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'text');var n=this.container.ownerDocument.createTextNode(texto);svg.appendChild(n);svg.setAttributeNS(null,'x',left+'px');svg.setAttributeNS(null,'y',top+'px');svg.setAttributeNS(null,'font-size','12px')}svg.style.position='absolute';if(fillColor.length==0)fillColor='none';svg.setAttributeNS(null,'fill',fillColor);if(lineColor.length==0)lineColor='none';svg.setAttributeNS(null,'stroke',lineColor);svg.setAttributeNS(null,'stroke-width',lineWidth);this.svgRoot.appendChild(svg);return svg};SVGRenderer.prototype.remove=function(shape){shape.parentNode.removeChild(shape)};SVGRenderer.prototype.move=function(shape,left,top){if(shape.tagName=='line'){var deltaX=shape.getBBox().width;var deltaY=shape.getBBox().height;shape.setAttributeNS(null,'x1',left);shape.setAttributeNS(null,'y1',top);shape.setAttributeNS(null,'x2',left+deltaX);shape.setAttributeNS(null,'y2',top+deltaY)}else if(shape.tagName=='ellipse'){shape.setAttributeNS(null,'cx',left+(shape.getBBox().width/2));shape.setAttributeNS(null,'cy',top+(shape.getBBox().height/2))}else{shape.setAttributeNS(null,'x',left);shape.setAttributeNS(null,'y',top)}};SVGRenderer.prototype.track=function(shape){};SVGRenderer.prototype.resize=function(shape,fromX,fromY,toX,toY){var deltaX=toX-fromX;var deltaY=toY-fromY;if(shape.tagName=='line'){shape.setAttributeNS(null,'x2',toX);shape.setAttributeNS(null,'y2',toY)}else if(shape.tagName=='ellipse'){if(deltaX<0){shape.setAttributeNS(null,'cx',(fromX+deltaX/2)+'px');shape.setAttributeNS(null,'rx',(-deltaX/2)+'px')}else{shape.setAttributeNS(null,'cx',(fromX+deltaX/2)+'px');shape.setAttributeNS(null,'rx',(deltaX/2)+'px')}if(deltaY<0){shape.setAttributeNS(null,'cy',(fromY+deltaY/2)+'px');shape.setAttributeNS(null,'ry',(-deltaY/2)+'px')}else{shape.setAttributeNS(null,'cy',(fromY+deltaY/2)+'px');shape.setAttributeNS(null,'ry',(deltaY/2)+'px')}}else{if(deltaX<0){shape.setAttributeNS(null,'x',toX+'px');shape.setAttributeNS(null,'width',-deltaX+'px')}else{shape.setAttributeNS(null,'width',deltaX+'px')}if(deltaY<0){shape.setAttributeNS(null,'y',toY+'px');shape.setAttributeNS(null,'height',-deltaY+'px')}else{shape.setAttributeNS(null,'height',deltaY+'px')}}};SVGRenderer.prototype.editCommand=function(shape,cmd,value){if(shape!=null){if(cmd=='fillcolor'){if(value!='')shape.setAttributeNS(null,'fill',value);else shape.setAttributeNS(null,'fill','none')}else if(cmd=='linecolor'){if(value!='')shape.setAttributeNS(null,'stroke',value);else shape.setAttributeNS(null,'stroke','none')}else if(cmd=='linewidth'){shape.setAttributeNS(null,'stroke-width',parseInt(value)+'px')}}};SVGRenderer.prototype.queryCommand=function(shape,cmd){var result='';if(shape!=null){if(cmd=='fillcolor'){result=shape.getAttributeNS(null,'fill');if(result=='none')result=''}else if(cmd=='linecolor'){result=shape.getAttributeNS(null,'stroke');if(result=='none')result=''}else if(cmd=='linewidth'){result=shape.getAttributeNS(null,'stroke');if(result=='none')result='';else result=shape.getAttributeNS(null,'stroke-width')}}return result};SVGRenderer.prototype.showTracker=function(shape){var box=shape.getBBox();var tracker=document.getElementById('tracker');if(tracker){this.remove(tracker)}var svgNamespace='http://www.w3.org/2000/svg';tracker=document.createElementNS(svgNamespace,'rect');tracker.setAttributeNS(null,'id','tracker');tracker.setAttributeNS(null,'x',box.x-10);tracker.setAttributeNS(null,'y',box.y-10);tracker.setAttributeNS(null,'width',box.width+20);tracker.setAttributeNS(null,'height',box.height+20);tracker.setAttributeNS(null,'fill','none');tracker.setAttributeNS(null,'stroke','blue');tracker.setAttributeNS(null,'stroke-width','1');this.svgRoot.appendChild(tracker)};SVGRenderer.prototype.getMarkup=function(){return this.container.innerHTML};function VMLRenderer(){this.base=AbstractRenderer}VMLRenderer.prototype=new AbstractRenderer;VMLRenderer.prototype.init=function(elem){this.container=elem;this.container.style.overflow='hidden';elem.ownerDocument.namespaces.add("v","urn:schemas-microsoft-com:vml");var style=elem.ownerDocument.createStyleSheet();style.addRule('v\\:*',"behavior: url(#default#VML);")};VMLRenderer.prototype.bounds=function(shape){var rect=new Object();rect['x']=shape.offsetLeft;rect['y']=shape.offsetTop;rect['width']=shape.offsetWidth;rect['height']=shape.offsetHeight;return rect};VMLRenderer.prototype.create=function(shape,fillColor,lineColor,lineWidth,left,top,width,height,texto){var vml;if(shape=='rect'){vml=this.container.ownerDocument.createElement('v:rect')}else if(shape=='roundrect'){vml=this.container.ownerDocument.createElement('v:roundrect')}else if(shape=='ellipse'){vml=this.container.ownerDocument.createElement('v:oval')}else if(shape=='circ'){vml=this.container.ownerDocument.createElement('v:oval')}else if(shape=='line'){vml=this.container.ownerDocument.createElement('v:line')}else if(shape=='text'){vml=this.container.ownerDocument.createElement('v:textbox');vml.innerHTML=texto}if(shape!='line'){vml.style.position='absolute';vml.style.left=left;vml.style.top=top;vml.style.width=width;vml.style.height=height;if(fillColor!=''){vml.setAttribute('filled','true');vml.setAttribute('fillcolor',fillColor)}else{vml.setAttribute('filled','false')}}else{vml.style.position='absolute';vml.setAttribute('from',left+'px,'+top+'px');vml.setAttribute('to',width+'px,'+height+'px')}if(lineColor!=''){vml.setAttribute('stroked','true');vml.setAttribute('strokecolor',lineColor);vml.setAttribute('strokeweight',lineWidth)}else{vml.setAttribute('stroked','false')}this.container.appendChild(vml);return vml};VMLRenderer.prototype.remove=function(shape){shape.removeNode(true)};VMLRenderer.prototype.move=function(shape,left,top){if(shape.tagName=='line'){shape.style.marginLeft=left;shape.style.marginTop=top}else{shape.style.left=left;shape.style.top=top}};VMLRenderer.prototype.track=function(shape){};VMLRenderer.prototype.resize=function(shape,fromX,fromY,toX,toY){shape.setAttribute('to',toX+'px,'+toY+'px')};VMLRenderer.prototype.editCommand=function(shape,cmd,value){if(shape!=null){if(cmd=='fillcolor'){if(value!=''){shape.filled='true';shape.fillcolor=value}else{shape.filled='false';shape.fillcolor=''}}else if(cmd=='linecolor'){if(value!=''){shape.stroked='true';shape.strokecolor=value}else{shape.stroked='false';shape.strokecolor=''}}else if(cmd=='linewidth'){shape.strokeweight=parseInt(value)+'px'}}};VMLRenderer.prototype.queryCommand=function(shape,cmd){if(shape!=null){if(cmd=='fillcolor'){if(shape.filled=='false')return'';else return shape.fillcolor}else if(cmd=='linecolor'){if(shape.stroked=='false')return'';else return shape.strokecolor}else if(cmd=='linewidth'){if(shape.stroked=='false'){return''}else{return(parseFloat(shape.strokeweight)*(screen.logicalXDPI/72))+'px'}}}};VMLRenderer.prototype.showTracker=function(shape){var box=this.bounds(shape);var tracker=document.getElementById('tracker');if(tracker){this.remove(tracker)}tracker=this.container.ownerDocument.createElement('v:rect');tracker.id='tracker';tracker.style.position='absolute';tracker.style.left=box.x-10;tracker.style.top=box.y-10;tracker.style.width=box.width+20;tracker.style.height=box.height+20;tracker.setAttribute('filled','false');tracker.setAttribute('stroked','true');tracker.setAttribute('strokecolor','blue');tracker.setAttribute('strokeweight','1px');this.container.appendChild(tracker)};VMLRenderer.prototype.getMarkup=function(){return this.container.innerHTML};
4 2 \ No newline at end of file
... ...
pacotes/richdraw/richdraw_tudo_compacto.js.php
1   -<?php error_reporting(0);if(extension_loaded('zlib')){ob_start('ob_gzhandler');} header("Content-type: text/javascript"); ?>function RichDrawEditor(elem,renderer){this.container=elem;this.gridX=10;this.gridY=10;this.mouseDownX=0;this.mouseDownY=0;this.mode='';this.fillColor='';this.lineColor='';this.lineWidth='';this.circColor='';this.textColor='';this.selected=null;this.selectedBounds={x:0,y:0,width:0,height:0};this.onselect=function(){};this.onunselect=function(){};this.renderer=renderer;this.renderer.init(this.container);this.fecha=function(){elem.innerHTML="";elem.style.display="none"}}RichDrawEditor.prototype.clearWorkspace=function(){this.container.innerHTML=''};RichDrawEditor.prototype.deleteSelection=function(){if(this.selected){this.renderer.remove(this.container.ownerDocument.getElementById('tracker'));this.renderer.remove(this.selected);this.selected=null}};RichDrawEditor.prototype.select=function(elem){if(elem==this.selected)return;this.selected=elem;this.renderer.showTracker(this.selected);this.onselect(this)};RichDrawEditor.prototype.unselect=function(){if(this.selected){this.renderer.remove(this.container.ownerDocument.getElementById('tracker'));this.selected=null;this.onunselect(this)}};RichDrawEditor.prototype.getSelectedElement=function(){return this.selected};RichDrawEditor.prototype.setGrid=function(horizontal,vertical){this.gridX=horizontal;this.gridY=vertical};RichDrawEditor.prototype.editCommand=function(cmd,value){if(cmd=='mode'){this.mode=value}else if(this.selected==null){if(cmd=='fillcolor'){this.fillColor=value}else if(cmd=='linecolor'){this.lineColor=value}else if(cmd=='textcolor'){this.textColor=value}else if(cmd=='circcolor'){this.circColor=value}else if(cmd=='linewidth'){this.lineWidth=parseInt(value)+'px'}}else{this.renderer.editCommand(this.selected,cmd,value)}};RichDrawEditor.prototype.queryCommand=function(cmd){if(cmd=='mode'){return this.mode}else if(this.selected==null){if(cmd=='fillcolor'){return this.fillColor}else if(cmd=='linecolor'){return this.lineColor}else if(cmd=='textcolor'){return this.textColor}else if(cmd=='circcolor'){return this.circColor}else if(cmd=='linewidth'){return this.lineWidth}}else{return this.renderer.queryCommand(this.selected,cmd)}};RichDrawEditor.prototype.onSelectStart=function(event){return false};RichDrawEditor.prototype.onClick=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;if(this.mode!='select'){this.unselect();this.mouseDownX=snappedX;this.mouseDownY=snappedY;this.selected=this.renderer.create(this.mode,this.fillColor,this.lineColor,this.lineWidth,this.mouseDownX,this.mouseDownY,1,1);this.selected.id='shape:'+createUUID();Event.observe(this.selected,"mousemove",this.onHitListener);Event.observe(this.container,"mousemove",this.onDrawListener)}else{if(this.mouseDownX!=snappedX||this.mouseDownY!=snappedY)this.unselect()}return false};RichDrawEditor.prototype.onMouseDown=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;if(this.mode!='select'){this.unselect();this.mouseDownX=snappedX;this.mouseDownY=snappedY;this.selected=this.renderer.create(this.mode,this.fillColor,this.lineColor,this.lineWidth,this.mouseDownX,this.mouseDownY,1,1);this.selected.id='shape:'+createUUID();Event.observe(this.selected,"mousedown",this.onHitListener);Event.observe(this.container,"mousemove",this.onDrawListener)}else{if(this.mouseDownX!=snappedX||this.mouseDownY!=snappedY)this.unselect()}return false};RichDrawEditor.prototype.onMouseUp=function(event){Event.stopObserving(this.container,"mouseup",this.onDrawListener);Event.stopObserving(this.container,"mouseup",this.onDragListener);if(this.mode!='select'){this.selected=null}};RichDrawEditor.prototype.onDrag=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;var deltaX=snappedX-this.mouseDownX;var deltaY=snappedY-this.mouseDownY;this.renderer.move(this.selected,this.selectedBounds.x+deltaX,this.selectedBounds.y+deltaY);this.renderer.showTracker(this.selected)};RichDrawEditor.prototype.onResize=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;var deltaX=snappedX-this.mouseDownX;var deltaY=snappedY-this.mouseDownY;this.renderer.track(handle,deltaX,deltaY);show_tracker()};RichDrawEditor.prototype.onDraw=function(event){if(this.selected==null)return;var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;this.renderer.resize(this.selected,this.mouseDownX,this.mouseDownY,snappedX,snappedY)};RichDrawEditor.prototype.onHit=function(event){if(this.mode=='select'){this.select(Event.element(event));this.selectedBounds=this.renderer.bounds(this.selected);var offset=Position.cumulativeOffset(this.container);this.mouseDownX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;this.mouseDownY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;Event.observe(this.container,"mousemove",this.onDragListener)}};function createUUID(){return[4,2,2,2,6].map(function(length){var uuidpart="";for(var i=0;i<length;i++){var uuidchar=parseInt((Math.random()*256)).toString(16);if(uuidchar.length==1)uuidchar="0"+uuidchar;uuidpart+=uuidchar}return uuidpart}).join('-')}function AbstractRenderer(){};AbstractRenderer.prototype.init=function(elem){};AbstractRenderer.prototype.bounds=function(shape){return{x:0,y:0,width:0,height:0}};AbstractRenderer.prototype.create=function(shape,fillColor,lineColor,lineWidth,left,top,width,height,texto){};AbstractRenderer.prototype.remove=function(shape){};AbstractRenderer.prototype.move=function(shape,left,top){};AbstractRenderer.prototype.track=function(shape){};AbstractRenderer.prototype.resize=function(shape,fromX,fromY,toX,toY){};AbstractRenderer.prototype.editCommand=function(shape,cmd,value){};AbstractRenderer.prototype.queryCommand=function(shape,cmd){};AbstractRenderer.prototype.showTracker=function(shape){};AbstractRenderer.prototype.getMarkup=function(){return null};
2   -function SVGRenderer(){this.base=AbstractRenderer;this.svgRoot=null}SVGRenderer.prototype=new AbstractRenderer;SVGRenderer.prototype.init=function(elem){this.container=elem;this.container.style.MozUserSelect='none';var svgNamespace='http://www.w3.org/2000/svg';this.svgRoot=this.container.ownerDocument.createElementNS(svgNamespace,"svg");this.container.appendChild(this.svgRoot)};SVGRenderer.prototype.bounds=function(shape){var rect=new Object();var box=shape.getBBox();rect['x']=box.x;rect['y']=box.y;rect['width']=box.width;rect['height']=box.height;return rect};SVGRenderer.prototype.create=function(shape,fillColor,lineColor,lineWidth,left,top,width,height,texto){var svgNamespace='http://www.w3.org/2000/svg';var svg;if(shape=='rect'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'rect');svg.setAttributeNS(null,'x',left+'px');svg.setAttributeNS(null,'y',top+'px');svg.setAttributeNS(null,'width',width+'px');svg.setAttributeNS(null,'height',height+'px')}else if(shape=='ellipse'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'ellipse');svg.setAttributeNS(null,'cx',(left+width/2)+'px');svg.setAttributeNS(null,'cy',(top+height/2)+'px');svg.setAttributeNS(null,'rx',(width/2)+'px');svg.setAttributeNS(null,'ry',(height/2)+'px')}else if(shape=='circ'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'ellipse');svg.setAttributeNS(null,'cx',left+'px');svg.setAttributeNS(null,'cy',top+'px');svg.setAttributeNS(null,'rx',width+'px');svg.setAttributeNS(null,'ry',width+'px')}else if(shape=='roundrect'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'rect');svg.setAttributeNS(null,'x',left+'px');svg.setAttributeNS(null,'y',top+'px');svg.setAttributeNS(null,'rx','20px');svg.setAttributeNS(null,'ry','20px');svg.setAttributeNS(null,'width',width+'px');svg.setAttributeNS(null,'height',height+'px')}else if(shape=='line'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'line');svg.setAttributeNS(null,'x1',left+'px');svg.setAttributeNS(null,'y1',top+'px');svg.setAttributeNS(null,'x2',width+'px');svg.setAttributeNS(null,'y2',height+'px')}else if(shape=='text'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'text');var n=this.container.ownerDocument.createTextNode(texto);svg.appendChild(n);svg.setAttributeNS(null,'x',left+'px');svg.setAttributeNS(null,'y',top+'px');svg.setAttributeNS(null,'font-size','12px')}svg.style.position='absolute';if(fillColor.length==0)fillColor='none';svg.setAttributeNS(null,'fill',fillColor);if(lineColor.length==0)lineColor='none';svg.setAttributeNS(null,'stroke',lineColor);svg.setAttributeNS(null,'stroke-width',lineWidth);this.svgRoot.appendChild(svg);return svg};SVGRenderer.prototype.remove=function(shape){shape.parentNode.removeChild(shape)};SVGRenderer.prototype.move=function(shape,left,top){if(shape.tagName=='line'){var deltaX=shape.getBBox().width;var deltaY=shape.getBBox().height;shape.setAttributeNS(null,'x1',left);shape.setAttributeNS(null,'y1',top);shape.setAttributeNS(null,'x2',left+deltaX);shape.setAttributeNS(null,'y2',top+deltaY)}else if(shape.tagName=='ellipse'){shape.setAttributeNS(null,'cx',left+(shape.getBBox().width/2));shape.setAttributeNS(null,'cy',top+(shape.getBBox().height/2))}else{shape.setAttributeNS(null,'x',left);shape.setAttributeNS(null,'y',top)}};SVGRenderer.prototype.track=function(shape){};SVGRenderer.prototype.resize=function(shape,fromX,fromY,toX,toY){var deltaX=toX-fromX;var deltaY=toY-fromY;if(shape.tagName=='line'){shape.setAttributeNS(null,'x2',toX);shape.setAttributeNS(null,'y2',toY)}else if(shape.tagName=='ellipse'){if(deltaX<0){shape.setAttributeNS(null,'cx',(fromX+deltaX/2)+'px');shape.setAttributeNS(null,'rx',(-deltaX/2)+'px')}else{shape.setAttributeNS(null,'cx',(fromX+deltaX/2)+'px');shape.setAttributeNS(null,'rx',(deltaX/2)+'px')}if(deltaY<0){shape.setAttributeNS(null,'cy',(fromY+deltaY/2)+'px');shape.setAttributeNS(null,'ry',(-deltaY/2)+'px')}else{shape.setAttributeNS(null,'cy',(fromY+deltaY/2)+'px');shape.setAttributeNS(null,'ry',(deltaY/2)+'px')}}else{if(deltaX<0){shape.setAttributeNS(null,'x',toX+'px');shape.setAttributeNS(null,'width',-deltaX+'px')}else{shape.setAttributeNS(null,'width',deltaX+'px')}if(deltaY<0){shape.setAttributeNS(null,'y',toY+'px');shape.setAttributeNS(null,'height',-deltaY+'px')}else{shape.setAttributeNS(null,'height',deltaY+'px')}}};SVGRenderer.prototype.editCommand=function(shape,cmd,value){if(shape!=null){if(cmd=='fillcolor'){if(value!='')shape.setAttributeNS(null,'fill',value);else shape.setAttributeNS(null,'fill','none')}else if(cmd=='linecolor'){if(value!='')shape.setAttributeNS(null,'stroke',value);else shape.setAttributeNS(null,'stroke','none')}else if(cmd=='linewidth'){shape.setAttributeNS(null,'stroke-width',parseInt(value)+'px')}}};SVGRenderer.prototype.queryCommand=function(shape,cmd){var result='';if(shape!=null){if(cmd=='fillcolor'){result=shape.getAttributeNS(null,'fill');if(result=='none')result=''}else if(cmd=='linecolor'){result=shape.getAttributeNS(null,'stroke');if(result=='none')result=''}else if(cmd=='linewidth'){result=shape.getAttributeNS(null,'stroke');if(result=='none')result='';else result=shape.getAttributeNS(null,'stroke-width')}}return result};SVGRenderer.prototype.showTracker=function(shape){var box=shape.getBBox();var tracker=document.getElementById('tracker');if(tracker){this.remove(tracker)}var svgNamespace='http://www.w3.org/2000/svg';tracker=document.createElementNS(svgNamespace,'rect');tracker.setAttributeNS(null,'id','tracker');tracker.setAttributeNS(null,'x',box.x-10);tracker.setAttributeNS(null,'y',box.y-10);tracker.setAttributeNS(null,'width',box.width+20);tracker.setAttributeNS(null,'height',box.height+20);tracker.setAttributeNS(null,'fill','none');tracker.setAttributeNS(null,'stroke','blue');tracker.setAttributeNS(null,'stroke-width','1');this.svgRoot.appendChild(tracker)};SVGRenderer.prototype.getMarkup=function(){return this.container.innerHTML};
3   -function VMLRenderer(){this.base=AbstractRenderer}VMLRenderer.prototype=new AbstractRenderer;VMLRenderer.prototype.init=function(elem){this.container=elem;this.container.style.overflow='hidden';elem.ownerDocument.namespaces.add("v","urn:schemas-microsoft-com:vml");var style=elem.ownerDocument.createStyleSheet();style.addRule('v\\:*',"behavior: url(#default#VML);")};VMLRenderer.prototype.bounds=function(shape){var rect=new Object();rect['x']=shape.offsetLeft;rect['y']=shape.offsetTop;rect['width']=shape.offsetWidth;rect['height']=shape.offsetHeight;return rect};VMLRenderer.prototype.create=function(shape,fillColor,lineColor,lineWidth,left,top,width,height,texto){var vml;if(shape=='rect'){vml=this.container.ownerDocument.createElement('v:rect')}else if(shape=='roundrect'){vml=this.container.ownerDocument.createElement('v:roundrect')}else if(shape=='ellipse'){vml=this.container.ownerDocument.createElement('v:oval')}else if(shape=='circ'){vml=this.container.ownerDocument.createElement('v:oval')}else if(shape=='line'){vml=this.container.ownerDocument.createElement('v:line')}else if(shape=='text'){vml=this.container.ownerDocument.createElement('v:textbox');vml.innerHTML=texto}if(shape!='line'){vml.style.position='absolute';vml.style.left=left;vml.style.top=top;vml.style.width=width;vml.style.height=height;if(fillColor!=''){vml.setAttribute('filled','true');vml.setAttribute('fillcolor',fillColor)}else{vml.setAttribute('filled','false')}}else{vml.style.position='absolute';vml.setAttribute('from',left+'px,'+top+'px');vml.setAttribute('to',width+'px,'+height+'px')}if(lineColor!=''){vml.setAttribute('stroked','true');vml.setAttribute('strokecolor',lineColor);vml.setAttribute('strokeweight',lineWidth)}else{vml.setAttribute('stroked','false')}this.container.appendChild(vml);return vml};VMLRenderer.prototype.remove=function(shape){shape.removeNode(true)};VMLRenderer.prototype.move=function(shape,left,top){if(shape.tagName=='line'){shape.style.marginLeft=left;shape.style.marginTop=top}else{shape.style.left=left;shape.style.top=top}};VMLRenderer.prototype.track=function(shape){};VMLRenderer.prototype.resize=function(shape,fromX,fromY,toX,toY){shape.setAttribute('to',toX+'px,'+toY+'px')};VMLRenderer.prototype.editCommand=function(shape,cmd,value){if(shape!=null){if(cmd=='fillcolor'){if(value!=''){shape.filled='true';shape.fillcolor=value}else{shape.filled='false';shape.fillcolor=''}}else if(cmd=='linecolor'){if(value!=''){shape.stroked='true';shape.strokecolor=value}else{shape.stroked='false';shape.strokecolor=''}}else if(cmd=='linewidth'){shape.strokeweight=parseInt(value)+'px'}}};VMLRenderer.prototype.queryCommand=function(shape,cmd){if(shape!=null){if(cmd=='fillcolor'){if(shape.filled=='false')return'';else return shape.fillcolor}else if(cmd=='linecolor'){if(shape.stroked=='false')return'';else return shape.strokecolor}else if(cmd=='linewidth'){if(shape.stroked=='false'){return''}else{return(parseFloat(shape.strokeweight)*(screen.logicalXDPI/72))+'px'}}}};VMLRenderer.prototype.showTracker=function(shape){var box=this.bounds(shape);var tracker=document.getElementById('tracker');if(tracker){this.remove(tracker)}tracker=this.container.ownerDocument.createElement('v:rect');tracker.id='tracker';tracker.style.position='absolute';tracker.style.left=box.x-10;tracker.style.top=box.y-10;tracker.style.width=box.width+20;tracker.style.height=box.height+20;tracker.setAttribute('filled','false');tracker.setAttribute('stroked','true');tracker.setAttribute('strokecolor','blue');tracker.setAttribute('strokeweight','1px');this.container.appendChild(tracker)};VMLRenderer.prototype.getMarkup=function(){return this.container.innerHTML};
4   -
  1 +<?php error_reporting(0);if(extension_loaded('zlib')){ob_start('ob_gzhandler');} header("Content-type: text/javascript"); ?>function RichDrawEditor(elem,renderer){this.container=elem;this.gridX=10;this.gridY=10;this.mouseDownX=0;this.mouseDownY=0;this.mode='';this.fillColor='';this.lineColor='';this.lineWidth='';this.circColor='';this.textColor='';this.selected=null;this.selectedBounds={x:0,y:0,width:0,height:0};this.onselect=function(){};this.onunselect=function(){};this.renderer=renderer;this.renderer.init(this.container);this.fecha=function(){elem.innerHTML="";elem.style.display="none"}}RichDrawEditor.prototype.clearWorkspace=function(){this.container.innerHTML=''};RichDrawEditor.prototype.deleteSelection=function(){if(this.selected){this.renderer.remove(this.container.ownerDocument.getElementById('tracker'));this.renderer.remove(this.selected);this.selected=null}};RichDrawEditor.prototype.select=function(elem){if(elem==this.selected)return;this.selected=elem;this.renderer.showTracker(this.selected);this.onselect(this)};RichDrawEditor.prototype.unselect=function(){if(this.selected){this.renderer.remove(this.container.ownerDocument.getElementById('tracker'));this.selected=null;this.onunselect(this)}};RichDrawEditor.prototype.getSelectedElement=function(){return this.selected};RichDrawEditor.prototype.setGrid=function(horizontal,vertical){this.gridX=horizontal;this.gridY=vertical};RichDrawEditor.prototype.editCommand=function(cmd,value){if(cmd=='mode'){this.mode=value}else if(this.selected==null){if(cmd=='fillcolor'){this.fillColor=value}else if(cmd=='linecolor'){this.lineColor=value}else if(cmd=='textcolor'){this.textColor=value}else if(cmd=='circcolor'){this.circColor=value}else if(cmd=='linewidth'){this.lineWidth=parseInt(value)+'px'}}else{this.renderer.editCommand(this.selected,cmd,value)}};RichDrawEditor.prototype.queryCommand=function(cmd){if(cmd=='mode'){return this.mode}else if(this.selected==null){if(cmd=='fillcolor'){return this.fillColor}else if(cmd=='linecolor'){return this.lineColor}else if(cmd=='textcolor'){return this.textColor}else if(cmd=='circcolor'){return this.circColor}else if(cmd=='linewidth'){return this.lineWidth}}else{return this.renderer.queryCommand(this.selected,cmd)}};RichDrawEditor.prototype.onSelectStart=function(event){return false};RichDrawEditor.prototype.onClick=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;if(this.mode!='select'){this.unselect();this.mouseDownX=snappedX;this.mouseDownY=snappedY;this.selected=this.renderer.create(this.mode,this.fillColor,this.lineColor,this.lineWidth,this.mouseDownX,this.mouseDownY,1,1);this.selected.id='shape:'+createUUID();Event.observe(this.selected,"mousemove",this.onHitListener);Event.observe(this.container,"mousemove",this.onDrawListener)}else{if(this.mouseDownX!=snappedX||this.mouseDownY!=snappedY)this.unselect()}return false};RichDrawEditor.prototype.onMouseDown=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;if(this.mode!='select'){this.unselect();this.mouseDownX=snappedX;this.mouseDownY=snappedY;this.selected=this.renderer.create(this.mode,this.fillColor,this.lineColor,this.lineWidth,this.mouseDownX,this.mouseDownY,1,1);this.selected.id='shape:'+createUUID();Event.observe(this.selected,"mousedown",this.onHitListener);Event.observe(this.container,"mousemove",this.onDrawListener)}else{if(this.mouseDownX!=snappedX||this.mouseDownY!=snappedY)this.unselect()}return false};RichDrawEditor.prototype.onMouseUp=function(event){Event.stopObserving(this.container,"mouseup",this.onDrawListener);Event.stopObserving(this.container,"mouseup",this.onDragListener);if(this.mode!='select'){this.selected=null}};RichDrawEditor.prototype.onDrag=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;var deltaX=snappedX-this.mouseDownX;var deltaY=snappedY-this.mouseDownY;this.renderer.move(this.selected,this.selectedBounds.x+deltaX,this.selectedBounds.y+deltaY);this.renderer.showTracker(this.selected)};RichDrawEditor.prototype.onResize=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;var deltaX=snappedX-this.mouseDownX;var deltaY=snappedY-this.mouseDownY;this.renderer.track(handle,deltaX,deltaY);show_tracker()};RichDrawEditor.prototype.onDraw=function(event){if(this.selected==null)return;var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;this.renderer.resize(this.selected,this.mouseDownX,this.mouseDownY,snappedX,snappedY)};RichDrawEditor.prototype.onHit=function(event){if(this.mode=='select'){this.select(Event.element(event));this.selectedBounds=this.renderer.bounds(this.selected);var offset=Position.cumulativeOffset(this.container);this.mouseDownX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;this.mouseDownY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;Event.observe(this.container,"mousemove",this.onDragListener)}};function createUUID(){return[4,2,2,2,6].map(function(length){var uuidpart="";for(var i=0;i<length;i++){var uuidchar=parseInt((Math.random()*256)).toString(16);if(uuidchar.length==1)uuidchar="0"+uuidchar;uuidpart+=uuidchar}return uuidpart}).join('-')}function AbstractRenderer(){};AbstractRenderer.prototype.init=function(elem){};AbstractRenderer.prototype.bounds=function(shape){return{x:0,y:0,width:0,height:0}};AbstractRenderer.prototype.create=function(shape,fillColor,lineColor,lineWidth,left,top,width,height,texto){};AbstractRenderer.prototype.remove=function(shape){};AbstractRenderer.prototype.move=function(shape,left,top){};AbstractRenderer.prototype.track=function(shape){};AbstractRenderer.prototype.resize=function(shape,fromX,fromY,toX,toY){};AbstractRenderer.prototype.editCommand=function(shape,cmd,value){};AbstractRenderer.prototype.queryCommand=function(shape,cmd){};AbstractRenderer.prototype.showTracker=function(shape){};AbstractRenderer.prototype.getMarkup=function(){return null};function SVGRenderer(){this.base=AbstractRenderer;this.svgRoot=null}SVGRenderer.prototype=new AbstractRenderer;SVGRenderer.prototype.init=function(elem){this.container=elem;this.container.style.MozUserSelect='none';var svgNamespace='http://www.w3.org/2000/svg';this.svgRoot=this.container.ownerDocument.createElementNS(svgNamespace,"svg");this.container.appendChild(this.svgRoot)};SVGRenderer.prototype.bounds=function(shape){var rect=new Object();var box=shape.getBBox();rect['x']=box.x;rect['y']=box.y;rect['width']=box.width;rect['height']=box.height;return rect};SVGRenderer.prototype.create=function(shape,fillColor,lineColor,lineWidth,left,top,width,height,texto){var svgNamespace='http://www.w3.org/2000/svg';var svg;if(shape=='rect'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'rect');svg.setAttributeNS(null,'x',left+'px');svg.setAttributeNS(null,'y',top+'px');svg.setAttributeNS(null,'width',width+'px');svg.setAttributeNS(null,'height',height+'px')}else if(shape=='ellipse'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'ellipse');svg.setAttributeNS(null,'cx',(left+width/2)+'px');svg.setAttributeNS(null,'cy',(top+height/2)+'px');svg.setAttributeNS(null,'rx',(width/2)+'px');svg.setAttributeNS(null,'ry',(height/2)+'px')}else if(shape=='circ'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'ellipse');svg.setAttributeNS(null,'cx',left+'px');svg.setAttributeNS(null,'cy',top+'px');svg.setAttributeNS(null,'rx',width+'px');svg.setAttributeNS(null,'ry',width+'px')}else if(shape=='roundrect'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'rect');svg.setAttributeNS(null,'x',left+'px');svg.setAttributeNS(null,'y',top+'px');svg.setAttributeNS(null,'rx','20px');svg.setAttributeNS(null,'ry','20px');svg.setAttributeNS(null,'width',width+'px');svg.setAttributeNS(null,'height',height+'px')}else if(shape=='line'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'line');svg.setAttributeNS(null,'x1',left+'px');svg.setAttributeNS(null,'y1',top+'px');svg.setAttributeNS(null,'x2',width+'px');svg.setAttributeNS(null,'y2',height+'px')}else if(shape=='text'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'text');var n=this.container.ownerDocument.createTextNode(texto);svg.appendChild(n);svg.setAttributeNS(null,'x',left+'px');svg.setAttributeNS(null,'y',top+'px');svg.setAttributeNS(null,'font-size','12px')}svg.style.position='absolute';if(fillColor.length==0)fillColor='none';svg.setAttributeNS(null,'fill',fillColor);if(lineColor.length==0)lineColor='none';svg.setAttributeNS(null,'stroke',lineColor);svg.setAttributeNS(null,'stroke-width',lineWidth);this.svgRoot.appendChild(svg);return svg};SVGRenderer.prototype.remove=function(shape){shape.parentNode.removeChild(shape)};SVGRenderer.prototype.move=function(shape,left,top){if(shape.tagName=='line'){var deltaX=shape.getBBox().width;var deltaY=shape.getBBox().height;shape.setAttributeNS(null,'x1',left);shape.setAttributeNS(null,'y1',top);shape.setAttributeNS(null,'x2',left+deltaX);shape.setAttributeNS(null,'y2',top+deltaY)}else if(shape.tagName=='ellipse'){shape.setAttributeNS(null,'cx',left+(shape.getBBox().width/2));shape.setAttributeNS(null,'cy',top+(shape.getBBox().height/2))}else{shape.setAttributeNS(null,'x',left);shape.setAttributeNS(null,'y',top)}};SVGRenderer.prototype.track=function(shape){};SVGRenderer.prototype.resize=function(shape,fromX,fromY,toX,toY){var deltaX=toX-fromX;var deltaY=toY-fromY;if(shape.tagName=='line'){shape.setAttributeNS(null,'x2',toX);shape.setAttributeNS(null,'y2',toY)}else if(shape.tagName=='ellipse'){if(deltaX<0){shape.setAttributeNS(null,'cx',(fromX+deltaX/2)+'px');shape.setAttributeNS(null,'rx',(-deltaX/2)+'px')}else{shape.setAttributeNS(null,'cx',(fromX+deltaX/2)+'px');shape.setAttributeNS(null,'rx',(deltaX/2)+'px')}if(deltaY<0){shape.setAttributeNS(null,'cy',(fromY+deltaY/2)+'px');shape.setAttributeNS(null,'ry',(-deltaY/2)+'px')}else{shape.setAttributeNS(null,'cy',(fromY+deltaY/2)+'px');shape.setAttributeNS(null,'ry',(deltaY/2)+'px')}}else{if(deltaX<0){shape.setAttributeNS(null,'x',toX+'px');shape.setAttributeNS(null,'width',-deltaX+'px')}else{shape.setAttributeNS(null,'width',deltaX+'px')}if(deltaY<0){shape.setAttributeNS(null,'y',toY+'px');shape.setAttributeNS(null,'height',-deltaY+'px')}else{shape.setAttributeNS(null,'height',deltaY+'px')}}};SVGRenderer.prototype.editCommand=function(shape,cmd,value){if(shape!=null){if(cmd=='fillcolor'){if(value!='')shape.setAttributeNS(null,'fill',value);else shape.setAttributeNS(null,'fill','none')}else if(cmd=='linecolor'){if(value!='')shape.setAttributeNS(null,'stroke',value);else shape.setAttributeNS(null,'stroke','none')}else if(cmd=='linewidth'){shape.setAttributeNS(null,'stroke-width',parseInt(value)+'px')}}};SVGRenderer.prototype.queryCommand=function(shape,cmd){var result='';if(shape!=null){if(cmd=='fillcolor'){result=shape.getAttributeNS(null,'fill');if(result=='none')result=''}else if(cmd=='linecolor'){result=shape.getAttributeNS(null,'stroke');if(result=='none')result=''}else if(cmd=='linewidth'){result=shape.getAttributeNS(null,'stroke');if(result=='none')result='';else result=shape.getAttributeNS(null,'stroke-width')}}return result};SVGRenderer.prototype.showTracker=function(shape){var box=shape.getBBox();var tracker=document.getElementById('tracker');if(tracker){this.remove(tracker)}var svgNamespace='http://www.w3.org/2000/svg';tracker=document.createElementNS(svgNamespace,'rect');tracker.setAttributeNS(null,'id','tracker');tracker.setAttributeNS(null,'x',box.x-10);tracker.setAttributeNS(null,'y',box.y-10);tracker.setAttributeNS(null,'width',box.width+20);tracker.setAttributeNS(null,'height',box.height+20);tracker.setAttributeNS(null,'fill','none');tracker.setAttributeNS(null,'stroke','blue');tracker.setAttributeNS(null,'stroke-width','1');this.svgRoot.appendChild(tracker)};SVGRenderer.prototype.getMarkup=function(){return this.container.innerHTML};function VMLRenderer(){this.base=AbstractRenderer}VMLRenderer.prototype=new AbstractRenderer;VMLRenderer.prototype.init=function(elem){this.container=elem;this.container.style.overflow='hidden';elem.ownerDocument.namespaces.add("v","urn:schemas-microsoft-com:vml");var style=elem.ownerDocument.createStyleSheet();style.addRule('v\\:*',"behavior: url(#default#VML);")};VMLRenderer.prototype.bounds=function(shape){var rect=new Object();rect['x']=shape.offsetLeft;rect['y']=shape.offsetTop;rect['width']=shape.offsetWidth;rect['height']=shape.offsetHeight;return rect};VMLRenderer.prototype.create=function(shape,fillColor,lineColor,lineWidth,left,top,width,height,texto){var vml;if(shape=='rect'){vml=this.container.ownerDocument.createElement('v:rect')}else if(shape=='roundrect'){vml=this.container.ownerDocument.createElement('v:roundrect')}else if(shape=='ellipse'){vml=this.container.ownerDocument.createElement('v:oval')}else if(shape=='circ'){vml=this.container.ownerDocument.createElement('v:oval')}else if(shape=='line'){vml=this.container.ownerDocument.createElement('v:line')}else if(shape=='text'){vml=this.container.ownerDocument.createElement('v:textbox');vml.innerHTML=texto}if(shape!='line'){vml.style.position='absolute';vml.style.left=left;vml.style.top=top;vml.style.width=width;vml.style.height=height;if(fillColor!=''){vml.setAttribute('filled','true');vml.setAttribute('fillcolor',fillColor)}else{vml.setAttribute('filled','false')}}else{vml.style.position='absolute';vml.setAttribute('from',left+'px,'+top+'px');vml.setAttribute('to',width+'px,'+height+'px')}if(lineColor!=''){vml.setAttribute('stroked','true');vml.setAttribute('strokecolor',lineColor);vml.setAttribute('strokeweight',lineWidth)}else{vml.setAttribute('stroked','false')}this.container.appendChild(vml);return vml};VMLRenderer.prototype.remove=function(shape){shape.removeNode(true)};VMLRenderer.prototype.move=function(shape,left,top){if(shape.tagName=='line'){shape.style.marginLeft=left;shape.style.marginTop=top}else{shape.style.left=left;shape.style.top=top}};VMLRenderer.prototype.track=function(shape){};VMLRenderer.prototype.resize=function(shape,fromX,fromY,toX,toY){shape.setAttribute('to',toX+'px,'+toY+'px')};VMLRenderer.prototype.editCommand=function(shape,cmd,value){if(shape!=null){if(cmd=='fillcolor'){if(value!=''){shape.filled='true';shape.fillcolor=value}else{shape.filled='false';shape.fillcolor=''}}else if(cmd=='linecolor'){if(value!=''){shape.stroked='true';shape.strokecolor=value}else{shape.stroked='false';shape.strokecolor=''}}else if(cmd=='linewidth'){shape.strokeweight=parseInt(value)+'px'}}};VMLRenderer.prototype.queryCommand=function(shape,cmd){if(shape!=null){if(cmd=='fillcolor'){if(shape.filled=='false')return'';else return shape.fillcolor}else if(cmd=='linecolor'){if(shape.stroked=='false')return'';else return shape.strokecolor}else if(cmd=='linewidth'){if(shape.stroked=='false'){return''}else{return(parseFloat(shape.strokeweight)*(screen.logicalXDPI/72))+'px'}}}};VMLRenderer.prototype.showTracker=function(shape){var box=this.bounds(shape);var tracker=document.getElementById('tracker');if(tracker){this.remove(tracker)}tracker=this.container.ownerDocument.createElement('v:rect');tracker.id='tracker';tracker.style.position='absolute';tracker.style.left=box.x-10;tracker.style.top=box.y-10;tracker.style.width=box.width+20;tracker.style.height=box.height+20;tracker.setAttribute('filled','false');tracker.setAttribute('stroked','true');tracker.setAttribute('strokecolor','blue');tracker.setAttribute('strokeweight','1px');this.container.appendChild(tracker)};VMLRenderer.prototype.getMarkup=function(){return this.container.innerHTML};
5 2 <?php if(extension_loaded('zlib')){ob_end_flush();}?>
6 3 \ No newline at end of file
... ...