Commit 7c17eb5f9be21e0ac34c18d0c22d532d7cf56189
1 parent
ec4d3e7c
Exists in
master
and in
7 other branches
Exclusão do grafico em flash
Showing
3 changed files
with
0 additions
and
1308 deletions
Show diff stats
ferramentas/graficointerativo/dicionario.js
@@ -1,53 +0,0 @@ | @@ -1,53 +0,0 @@ | ||
1 | -//+$trad(1,i3GEOF.graficointerativo.dicionario)+ | ||
2 | -i3GEOF.graficointerativo.dicionario = { | ||
3 | -1: [{ | ||
4 | -pt:"", | ||
5 | -en:"", | ||
6 | -es:"" | ||
7 | -}], | ||
8 | -2: [{ | ||
9 | -pt:"", | ||
10 | -en:"", | ||
11 | -es:"" | ||
12 | -}], | ||
13 | -3: [{ | ||
14 | -pt:"", | ||
15 | -en:"", | ||
16 | -es:"" | ||
17 | -}], | ||
18 | -4: [{ | ||
19 | -pt:"", | ||
20 | -en:"", | ||
21 | -es:"" | ||
22 | -}], | ||
23 | -5: [{ | ||
24 | -pt:"", | ||
25 | -en:"", | ||
26 | -es:"" | ||
27 | -}], | ||
28 | -6: [{ | ||
29 | -pt:"", | ||
30 | -en:"", | ||
31 | -es:"" | ||
32 | -}], | ||
33 | -7: [{ | ||
34 | -pt:"", | ||
35 | -en:"", | ||
36 | -es:"" | ||
37 | -}], | ||
38 | -8: [{ | ||
39 | -pt:"", | ||
40 | -en:"", | ||
41 | -es:"" | ||
42 | -}], | ||
43 | -9: [{ | ||
44 | -pt:"", | ||
45 | -en:"", | ||
46 | -es:"" | ||
47 | -}], | ||
48 | -10: [{ | ||
49 | -pt:"", | ||
50 | -en:"", | ||
51 | -es:"" | ||
52 | -}] | ||
53 | -}; | ||
54 | \ No newline at end of file | 0 | \ No newline at end of file |
ferramentas/graficointerativo/exec.php
@@ -1,34 +0,0 @@ | @@ -1,34 +0,0 @@ | ||
1 | -<?php | ||
2 | -include_once(dirname(__FILE__)."/../inicia.php"); | ||
3 | -// | ||
4 | -//faz a busca da função que deve ser executada | ||
5 | -// | ||
6 | -$retorno = ""; //string que será retornada ao browser via JSON | ||
7 | -switch (strtoupper($funcao)) | ||
8 | -{ | ||
9 | -/* | ||
10 | -Valor: GRAFICOSELECAO | ||
11 | - | ||
12 | -Pega os dados necessários para a geração dos gráficos da ferramenta seleção | ||
13 | - | ||
14 | -<iniciaDadosGrafico> | ||
15 | -*/ | ||
16 | - case "GRAFICOSELECAO": | ||
17 | - include(dirname(__FILE__)."/../../classesphp/graficos.php"); | ||
18 | - if(!isset($exclui)) | ||
19 | - {$exclui = "";} | ||
20 | - if(!isset($tipo)) | ||
21 | - {$tipo = "nenhum";} | ||
22 | - if(!isset($ordenax)) | ||
23 | - {$ordenax = "nao";} | ||
24 | - $retorno = iniciaDadosGrafico($map_file,$tema,$exclui,$itemclasses,$itemvalores,$tipo,false,$ext,true,$ordenax); | ||
25 | - break; | ||
26 | -} | ||
27 | -if (!connection_aborted()){ | ||
28 | - if(isset($map_file) && isset($postgis_mapa) && $map_file != "") | ||
29 | - restauraCon($map_file,$postgis_mapa); | ||
30 | - cpjson($retorno); | ||
31 | -} | ||
32 | -else | ||
33 | -{exit();} | ||
34 | -?> | ||
35 | \ No newline at end of file | 0 | \ No newline at end of file |
ferramentas/graficointerativo/index.js
@@ -1,1221 +0,0 @@ | @@ -1,1221 +0,0 @@ | ||
1 | - | ||
2 | -/*jslint plusplus:false,white:false,undef: false, rhino: true, onevar: true, evil: true */ | ||
3 | -/* | ||
4 | -Title: Gráfico interativo | ||
5 | - | ||
6 | -Representação gráfica de dados. O gráfico é construído tendo como base os atributos de um tema e é modificado | ||
7 | -conforme o usuário navega pelo mapa. A renderização do gráfico é feito pelo navegador por meio do aplicativo openflashchart. | ||
8 | -Os dados que serão utilizados no gráfico são baseados em um elemento TABLE. Esse elemento pode ser montado com base na tabela | ||
9 | -de atributos e editada pelo usuário. Os dados podem também ser inseridos como par�metros na inicialização da ferramenta, | ||
10 | -permitindo que o gráfico seja utilizado por outras ferramentas. | ||
11 | - | ||
12 | -Veja: | ||
13 | - | ||
14 | -<i3GEO.analise.dialogo.graficoInterativo> | ||
15 | - | ||
16 | -Arquivo: | ||
17 | - | ||
18 | -i3geo/ferramentas/graficointerativo/index.js.php | ||
19 | - | ||
20 | -Licenca: | ||
21 | - | ||
22 | -GPL2 | ||
23 | - | ||
24 | -i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet | ||
25 | - | ||
26 | -Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente Brasil | ||
27 | -Desenvolvedor: Edmar Moretti edmar.moretti@gmail.com | ||
28 | - | ||
29 | -Este programa é software livre; você pode redistribuí-lo | ||
30 | -e/ou modificá-lo sob os termos da Licença Pública Geral | ||
31 | -GNU conforme publicada pela Free Software Foundation; | ||
32 | - | ||
33 | -Este programa é distribuído na expectativa de que seja útil, | ||
34 | -porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita | ||
35 | -de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. | ||
36 | -Consulte a Licença Pública Geral do GNU para mais detalhes. | ||
37 | -Você deve ter recebido uma cópia da Licença Pública Geral do | ||
38 | -GNU junto com este programa; se não, escreva para a | ||
39 | -Free Software Foundation, Inc., no endereço | ||
40 | -59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. | ||
41 | -*/ | ||
42 | -if(typeof(i3GEOF) === 'undefined'){ | ||
43 | - var i3GEOF = {}; | ||
44 | -} | ||
45 | -/* | ||
46 | -Classe: i3GEOF.graficointerativo (Versao em flash. Depreciado. Utilize graficointerativo1) | ||
47 | - | ||
48 | -*/ | ||
49 | -i3GEOF.graficointerativo = { | ||
50 | - /* | ||
51 | - Variavel: aguarde | ||
52 | - | ||
53 | - Estilo do objeto DOM com a imagem de aguarde existente no cabeçalho da janela. | ||
54 | - */ | ||
55 | - aguarde: "", | ||
56 | - /* | ||
57 | - Propriedade: dados | ||
58 | - | ||
59 | - Dados que serao utilizados. Pode ser passado como parametro. | ||
60 | - | ||
61 | - Default: | ||
62 | - {false} | ||
63 | - */ | ||
64 | - dados:false, | ||
65 | - /* | ||
66 | - Propriedade: titulo | ||
67 | - | ||
68 | - Título do gráfico. Se for vazio, será obtido do nome do tema selecionado | ||
69 | - */ | ||
70 | - titulo: "", | ||
71 | - /* | ||
72 | - Propriedade: tipo | ||
73 | - | ||
74 | - Tipo de gráfico escolhido pelo usuário. | ||
75 | - */ | ||
76 | - tipo: "", | ||
77 | - /* | ||
78 | - Propriedade: acumula | ||
79 | - | ||
80 | - Acumula os valores ao gerar o gráfico | ||
81 | - | ||
82 | - Type: | ||
83 | - {boolean} | ||
84 | - | ||
85 | - Default: | ||
86 | - {false} | ||
87 | - */ | ||
88 | - acumula: false, | ||
89 | - /* | ||
90 | - Propriedade: relativa | ||
91 | - | ||
92 | - Utiliza valores relativos ao criar o gráfico | ||
93 | - | ||
94 | - Type: | ||
95 | - {boolean} | ||
96 | - | ||
97 | - Default: | ||
98 | - {false} | ||
99 | - */ | ||
100 | - relativa: false, | ||
101 | - /* | ||
102 | - Propriedade: dadospuros | ||
103 | - | ||
104 | - Não faz nenhum tipo de processamento nos dados antes de gerar o gráfico | ||
105 | - | ||
106 | - Type: | ||
107 | - {boolean} | ||
108 | - | ||
109 | - Default: | ||
110 | - {false} | ||
111 | - */ | ||
112 | - dadospuros: false, | ||
113 | - /* | ||
114 | - Propriedade: navegacao | ||
115 | - | ||
116 | - Ativa ou não a navegação din�mica do mapa | ||
117 | - | ||
118 | - Type: | ||
119 | - {boolean} | ||
120 | - | ||
121 | - Default: | ||
122 | - {false} | ||
123 | - */ | ||
124 | - navegacao:false, | ||
125 | - | ||
126 | - /* | ||
127 | - Para efeitos de compatibilidade antes da versão 4.7 que não tinha dicionário | ||
128 | - */ | ||
129 | - criaJanelaFlutuante: function(dados){ | ||
130 | - if(dados){ | ||
131 | - i3GEOF.graficointerativo.dados = dados; | ||
132 | - } | ||
133 | - i3GEOF.graficointerativo.iniciaDicionario(); | ||
134 | - }, | ||
135 | - /* | ||
136 | - Function: iniciaDicionario | ||
137 | - | ||
138 | - Carrega o dicionário e chama a função que inicia a ferramenta | ||
139 | - | ||
140 | - O Javascript é carregado com o id i3GEOF.nomedaferramenta.dicionario_script | ||
141 | - */ | ||
142 | - iniciaDicionario: function(dados){ | ||
143 | - if(dados){ | ||
144 | - i3GEOF.graficointerativo.dados = dados; | ||
145 | - } | ||
146 | - if(typeof(i3GEOF.graficointerativo.dicionario) === 'undefined'){ | ||
147 | - i3GEO.util.scriptTag( | ||
148 | - i3GEO.configura.locaplic+"/ferramentas/graficointerativo/dicionario.js", | ||
149 | - "i3GEOF.graficointerativo.iniciaJanelaFlutuante()", | ||
150 | - "i3GEOF.graficointerativo.dicionario_script" | ||
151 | - ); | ||
152 | - } | ||
153 | - else{ | ||
154 | - i3GEOF.graficointerativo.iniciaJanelaFlutuante(dados); | ||
155 | - } | ||
156 | - }, | ||
157 | - /* | ||
158 | - Function: inicia | ||
159 | - | ||
160 | - Inicia a ferramenta. É chamado por criaJanelaFlutuante | ||
161 | - | ||
162 | - Parametros: | ||
163 | - | ||
164 | - iddiv {String} - id do div que receberá o conteudo HTML da ferramenta | ||
165 | - | ||
166 | - dados {JSON} - dados para o gráfico (opcional) exemplo ["n;x","'Argentina';33796870","'Paraguay';4773464","'Brazil';151525400","'Chile';13772710"] | ||
167 | - */ | ||
168 | - inicia: function(iddiv){ | ||
169 | - //try{ | ||
170 | - $i(iddiv).innerHTML += i3GEOF.graficointerativo.html(); | ||
171 | - $i("i3GEOgraficointerativoAcumula").checked = i3GEOF.graficointerativo.acumula; | ||
172 | - $i("i3GEOgraficointerativoRelativa").checked = i3GEOF.graficointerativo.relativa; | ||
173 | - $i("i3GEOgraficointerativoDadosPuros").checked = i3GEOF.graficointerativo.dadospuros; | ||
174 | - if(i3GEOF.graficointerativo.navegacao === true) | ||
175 | - {i3GEOF.graficointerativo.ativaNavegacao(true);} | ||
176 | - //eventos das guias | ||
177 | - $i("i3GEOgraficointerativoguia1").onclick = function(){ | ||
178 | - i3GEO.guias.mostraGuiaFerramenta("i3GEOgraficointerativoguia1","i3GEOgraficointerativoguia"); | ||
179 | - $i("i3GEOgraficointerativoGrafico").style.display = "none"; | ||
180 | - }; | ||
181 | - $i("i3GEOgraficointerativoguia2").onclick = function(){ | ||
182 | - i3GEO.guias.mostraGuiaFerramenta("i3GEOgraficointerativoguia2","i3GEOgraficointerativoguia"); | ||
183 | - i3GEOF.graficointerativo.configuraDados(); | ||
184 | - $i("i3GEOgraficointerativoGrafico").style.display = "none"; | ||
185 | - }; | ||
186 | - $i("i3GEOgraficointerativoguia3").onclick = function(){ | ||
187 | - i3GEO.guias.mostraGuiaFerramenta("i3GEOgraficointerativoguia3","i3GEOgraficointerativoguia"); | ||
188 | - $i("i3GEOgraficointerativoGrafico").style.display = "none"; | ||
189 | - }; | ||
190 | - $i("i3GEOgraficointerativoguia4").onclick = function(){ | ||
191 | - i3GEO.guias.mostraGuiaFerramenta("i3GEOgraficointerativoguia4","i3GEOgraficointerativoguia"); | ||
192 | - function outputStatus(e) { | ||
193 | - //alert("oi"); | ||
194 | - } | ||
195 | - swfobject.embedSWF( | ||
196 | - i3GEO.configura.locaplic+"/pacotes/openflashchart/open-flash-chart.swf", | ||
197 | - "i3GEOgraficointerativoGrafico", | ||
198 | - "95%", | ||
199 | - "88%", | ||
200 | - "9.0.0", | ||
201 | - "expressInstall.swf", | ||
202 | - { | ||
203 | - "get-data":"i3GEOF.graficointerativo.tabela2dados", | ||
204 | - "loading":"Criando grafico..." | ||
205 | - }, | ||
206 | - false, | ||
207 | - false, | ||
208 | - outputStatus | ||
209 | - ); | ||
210 | - var t = $i("i3GEOgraficointerativoGrafico"); | ||
211 | - t.style.display = "block"; | ||
212 | - t.style.position = "relative"; | ||
213 | - t.style.top = "-5px"; | ||
214 | - t.visibility = "visible"; | ||
215 | - }; | ||
216 | - $i("i3GEOgraficointerativoguia5").onclick = function(){ | ||
217 | - i3GEO.guias.mostraGuiaFerramenta("i3GEOgraficointerativoguia5","i3GEOgraficointerativoguia"); | ||
218 | - $i("i3GEOgraficointerativoGrafico").style.display = "none"; | ||
219 | - $i("i3GEOgraficointerativoguia5obj").innerHTML = "<textarea rows='20' cols='52' >"+(i3GEOF.graficointerativo.tabela2csv()).join("\n")+"</textarea>"; | ||
220 | - }; | ||
221 | - | ||
222 | - i3GEOF.graficointerativo.ativaFoco(); | ||
223 | - i3GEOF.graficointerativo.comboTemas(); | ||
224 | - new YAHOO.widget.Button( | ||
225 | - "i3GEOgraficointerativobotao1", | ||
226 | - {onclick:{fn: i3GEOF.graficointerativo.obterDados}} | ||
227 | - ); | ||
228 | - if(i3GEOF.graficointerativo.dados && i3GEOF.graficointerativo.dados != "undefined"){ | ||
229 | - //i3GEOF.graficointerativo.tipo = "pizza2d"; | ||
230 | - //var retorno = {"attributes":{"id":""},"data":{"dados":["n;x","'4';3839572","'8';81710320","'7';24631314","'2';10967753","'1';24496400","'3';18752482","'5';13574480","'6';216507515"]}}; | ||
231 | - i3GEOF.graficointerativo.montaTabelaDados(i3GEOF.graficointerativo.dados); | ||
232 | - $i("i3GEOgraficointerativoguia4").onclick.call(); | ||
233 | - } | ||
234 | - else{ | ||
235 | - i3GEO.guias.mostraGuiaFerramenta("i3GEOgraficointerativoguia1","i3GEOgraficointerativoguia"); | ||
236 | - } | ||
237 | - //} | ||
238 | - //catch(erro){i3GEO.janela.tempoMsg(erro);} | ||
239 | - }, | ||
240 | - /* | ||
241 | - Function: html | ||
242 | - | ||
243 | - Gera o código html para apresentação das opções da ferramenta | ||
244 | - | ||
245 | - Retorno: | ||
246 | - | ||
247 | - String com o código html | ||
248 | - */ | ||
249 | - html:function(){ | ||
250 | - var locaplic = i3GEO.configura.locaplic, | ||
251 | - ins = '' + | ||
252 | - '<div id=i3GEOgraficointerativoguiasYUI class="yui-navset" style="top:0px;cursor:pointer;left:0px;">' + | ||
253 | - ' <ul class="yui-nav" style="border-width:0pt 0pt 0px;border-color:rgb(240,240,240);border-bottom-color:white;">' + | ||
254 | - ' <li><a ><em><div id="i3GEOgraficointerativoguia3" style="text-align:center;left:0px;" ><img class="ticPropriedades2" style="height:14px" title="'+$trad("p13")+'" src="'+i3GEO.configura.locaplic+'/imagens/visual/default/branco.gif"></div></em></a></li>' + | ||
255 | - ' <li><a ><em><div id="i3GEOgraficointerativoguia1" style="text-align:center;left:0px;" >Tipo</div></em></a></li>' + | ||
256 | - ' <li><a ><em><div id="i3GEOgraficointerativoguia2" style="text-align:center;left:0px;" >Dados</div></em></a></li>' + | ||
257 | - ' <li><a ><em><div id="i3GEOgraficointerativoguia4" style="text-align:center;left:0px;" >Gráfico</div></em></a></li>' + | ||
258 | - ' <li><a ><em><div id="i3GEOgraficointerativoguia5" style="text-align:center;left:0px;" >CSV</div></em></a></li>' + | ||
259 | - ' </ul>' + | ||
260 | - '</div><br>' + | ||
261 | - '<div class=guiaobj id="i3GEOgraficointerativoguia1obj" style="left:1px;display:none;">' + | ||
262 | - ' <p class=paragrafo >Escolha o tipo de gráfico: </p>' + | ||
263 | - ' <table class=lista6 >' + | ||
264 | - ' <tr><td><img style=cursor:text; src="'+locaplic+'/imagens/oxygen/22x22/Actions-office-chart-pie-icon.png" /></td><td><input type=radio onclick="i3GEOF.graficointerativo.ativaTipo(this)" value="pizza2d" name="tipoGrafico" style="border:0px solid white;cursor:pointer" > </td><td>pizza 2d</td></tr>' + | ||
265 | - ' <tr><td> </td></tr>' + | ||
266 | - ' <tr><td><img style=cursor:text; src="'+locaplic+'/imagens/oxygen/22x22/Actions-office-chart-area-stacked-icon.png" /></td><td><input type=radio onclick="i3GEOF.graficointerativo.ativaTipo(this)" value="area" name="tipoGrafico" style="border:0px solid white;cursor:pointer" > </td><td>área 2d</td></tr>' + | ||
267 | - ' <tr><td> </td></tr>' + | ||
268 | - ' <tr><td><img style=cursor:text; src="'+locaplic+'/imagens/oxygen/22x22/Actions-office-chart-scatter-icon.png" /></td><td><input type=radio onclick="i3GEOF.graficointerativo.ativaTipo(this)" value="scatter" name="tipoGrafico" style="border:0px solid white;cursor:pointer" > </td><td>distribuição de pontos</td></tr>' + | ||
269 | - ' <tr><td> </td></tr>' + | ||
270 | - ' <tr><td><img style=cursor:text; src="'+locaplic+'/imagens/oxygen/22x22/Actions-office-chart-line-stacked-icon.png" /></td><td><input type=radio onclick="i3GEOF.graficointerativo.ativaTipo(this)" value="line" name="tipoGrafico" style="border:0px solid white;cursor:pointer" > </td><td>linha</td></tr>' + | ||
271 | - ' <tr><td> </td></tr>' + | ||
272 | - ' <tr><td><img style=cursor:text; src="'+locaplic+'/imagens/oxygen/22x22/Actions-office-chart-polar-icon.png" /></td><td><input type=radio onclick="i3GEOF.graficointerativo.ativaTipo(this)" value="radar" name="tipoGrafico" style="border:0px solid white;cursor:pointer" > </td><td>radar</td></tr>' + | ||
273 | - ' <tr><td> </td></tr>' + | ||
274 | - ' <tr><td><img style=cursor:text; src="'+locaplic+'/imagens/oxygen/22x22/Actions-office-chart-bar-icon.png" /></td><td><input type=radio onclick="i3GEOF.graficointerativo.ativaTipo(this)" value="bar_filled" name="tipoGrafico" style="border:0px solid white;cursor:pointer" > </td><td>barras simples</td></tr>' + | ||
275 | - ' <tr><td> </td></tr>' + | ||
276 | - ' <tr><td><img style=cursor:text; src="'+locaplic+'/imagens/oxygen/22x22/Actions-office-chart-bar-icon.png" /></td><td><input type=radio onclick="i3GEOF.graficointerativo.ativaTipo(this)" value="bar_glass" name="tipoGrafico" style="border:0px solid white;cursor:pointer" > </td><td>barras 2 cores</td></tr>' + | ||
277 | - ' <tr><td> </td></tr>' + | ||
278 | - ' <tr><td><img style=cursor:text; src="'+locaplic+'/imagens/oxygen/22x22/Actions-office-chart-bar-icon.png" /></td><td><input type=radio onclick="i3GEOF.graficointerativo.ativaTipo(this)" value="bar_3d" name="tipoGrafico" style="border:0px solid white;cursor:pointer" > </td><td>barras 3d</td></tr>' + | ||
279 | - ' <tr><td> </td></tr>' + | ||
280 | - ' <tr><td><img style=cursor:text; src="'+locaplic+'/imagens/oxygen/22x22/Actions-office-chart-bar-icon.png" /></td><td><input type=radio onclick="i3GEOF.graficointerativo.ativaTipo(this)" value="bar_sketch" name="tipoGrafico" style="border:0px solid white;cursor:pointer" > </td><td>barras rascunho</td></tr>' + | ||
281 | - ' <tr><td> </td></tr>' + | ||
282 | - ' <tr><td><img style=cursor:text; src="'+locaplic+'/imagens/oxygen/22x22/Actions-office-chart-bar-icon.png" /></td><td><input type=radio onclick="i3GEOF.graficointerativo.ativaTipo(this)" value="bar_cylinder" name="tipoGrafico" style="border:0px solid white;cursor:pointer" > </td><td>barras cilindro</td></tr>' + | ||
283 | - ' <tr><td> </td></tr>' + | ||
284 | - ' <tr><td><img style=cursor:text; src="'+locaplic+'/imagens/oxygen/22x22/Actions-office-chart-bar-icon.png" /></td><td><input type=radio onclick="i3GEOF.graficointerativo.ativaTipo(this)" value="bar_cylinder_outline" name="tipoGrafico" style="border:0px solid white;cursor:pointer" > </td><td>barras cilindro com contorno</td></tr>' + | ||
285 | - ' <tr><td> </td></tr>' + | ||
286 | - ' <tr><td><img style=cursor:text; src="'+locaplic+'/imagens/oxygen/22x22/Actions-office-chart-bar-icon.png" /></td><td><input type=radio onclick="i3GEOF.graficointerativo.ativaTipo(this)" value="bar_round_glass" name="tipoGrafico" style="border:0px solid white;cursor:pointer" > </td><td>barras cúpula</td></tr>' + | ||
287 | - ' <tr><td> </td></tr>' + | ||
288 | - ' <tr><td><img style=cursor:text; src="'+locaplic+'/imagens/oxygen/22x22/Actions-office-chart-bar-icon.png" /></td><td><input type=radio onclick="i3GEOF.graficointerativo.ativaTipo(this)" value="bar_round" name="tipoGrafico" style="border:0px solid white;cursor:pointer" > </td><td>barras pílula</td></tr>' + | ||
289 | - ' <tr><td> </td></tr>' + | ||
290 | - ' <tr><td><img style=cursor:text; src="'+locaplic+'/imagens/oxygen/22x22/Actions-office-chart-bar-icon.png" /></td><td><input type=radio onclick="i3GEOF.graficointerativo.ativaTipo(this)" value="hbar" name="tipoGrafico" style="border:0px solid white;cursor:pointer" > </td><td>barras horizontais</td></tr>' + | ||
291 | - ' </table>' + | ||
292 | - '</div> ' + | ||
293 | - '<div class=guiaobj id="i3GEOgraficointerativoguia2obj" style="left:1px;display:none;top:-5px">' + | ||
294 | - ' <p class=paragrafo >Escolha os dados que comporão o gráfico: </p>' + | ||
295 | - ' <p class=paragrafo >Tema:</p>' + | ||
296 | - ' <div class=paragrafo id=i3GEOgraficointerativoComboTemas ></div>' + | ||
297 | - ' <div class=paragrafo id=i3GEOgraficointerativoComboXlinha >' + | ||
298 | - ' <p class=paragrafo >Item com as classes ou eixo X:</p>' + | ||
299 | - ' <div class=paragrafo id=i3GEOgraficointerativoComboX ></div>' + | ||
300 | - ' </div>'+ | ||
301 | - ' <div id=i3GEOgraficointerativoComboYlinha style=display:block >'+ | ||
302 | - ' <p class=paragrafo >Item com os valores ou eixo Y: </p>'+ | ||
303 | - ' <div class=paragrafo id=i3GEOgraficointerativoComboY ></div>' + | ||
304 | - ' </div>' + | ||
305 | - ' <p class=paragrafo >Excluir o seguinte valor: ' + | ||
306 | - $inputText("","","i3GEOgraficointerativoexcluir","",3,"") + | ||
307 | - ' <p class=paragrafo ><input type=checkbox style="cursor:pointer;top:3px;position:relative;" id=i3GEOgraficointerativoCoresA /> gera cores aleatórias</p>' + | ||
308 | - ' <p class=paragrafo ><input id=i3GEOgraficointerativobotao1 type="buttom" value="Obter dados" /></p>'+ | ||
309 | - ' <div id=i3GEOgraficointerativoDados ></div>'+ | ||
310 | - ' <div class=paragrafo id=i3GEOgraficointerativoAjudaPizza >Se vc escolher para X e Y o mesmo item, será considerada a frequência das ocorrências para compor cada parte da pizza. Caso contrário, será feita a soma dos valores existentes em Y para cada ocorrência existente em X.</div>' + | ||
311 | - '</div>' + | ||
312 | - '<div class=guiaobj id="i3GEOgraficointerativoguia3obj" style="left:1px;display:none;top:-5px">' + | ||
313 | - ' <p class=paragrafo ><input style=cursor:pointer type=checkbox id=i3GEOgraficointerativoAdLinhas checked /> Adiciona as linhas em gráficos de barras</p>' + | ||
314 | - ' <p class=paragrafo ><input style=cursor:pointer type=checkbox id=i3GEOgraficointerativoAcumula /> Utiliza valores acumulados</p>' + | ||
315 | - ' <p class=paragrafo ><input style=cursor:pointer type=checkbox id=i3GEOgraficointerativoRelativa /> Utiliza valores relativos (%)</p>' + | ||
316 | - ' <p class=paragrafo ><input style=cursor:pointer type=checkbox id=i3GEOgraficointerativoOrdenaX checked /> Ordena o eixo X</p>' + | ||
317 | - ' <p class=paragrafo ><input style=cursor:pointer type=checkbox id=i3GEOgraficointerativoDadosPuros /> Não processa os valores ao obter os dados (mantém os dados como estão na tabela de atributos) - essa opção é útil nos gráficos de distribuição de pontos</p>' + | ||
318 | - ' <p class=paragrafo ><input style=cursor:pointer type=checkbox onclick="i3GEOF.graficointerativo.ativaNavegacao(this.checked)" /> Atualiza o gráfico ao navegar pelo mapa</p>' + | ||
319 | - ' <p class=paragrafo ><select onchange="i3GEOF.graficointerativo.obterDados()" id="i3GEOgraficointerativoTipoAgregacao" ><option value="soma">Soma</option><option value="media">Média</option></select> Tipo de agregação dos valores do eixo Y</p>' + | ||
320 | - '</div>'+ | ||
321 | - '<div class=guiaobj id="i3GEOgraficointerativoguia4obj" style="left:1px;display:none;top:-10px">' + | ||
322 | - ' <a href="#" onclick="i3GEOF.graficointerativo.novaJanela()" >abrir em uma janela separada</a>' + | ||
323 | - '</div>' + | ||
324 | - '<div class=guiaobj id="i3GEOgraficointerativoguia5obj" style="font-size:10px;left:10px;display:none;top:-0px">' + | ||
325 | - '</div>' + | ||
326 | - '<div id="i3GEOgraficointerativoGrafico" style="position:relative;top:-5px;display:none"></div>'; | ||
327 | - return ins; | ||
328 | - }, | ||
329 | - /* | ||
330 | - Function: iniciaJanelaFlutuante | ||
331 | - | ||
332 | - Cria a janela flutuante para controle da ferramenta. | ||
333 | - | ||
334 | - Parametro | ||
335 | - | ||
336 | - dados {JSON} - dados para o gráfico | ||
337 | - */ | ||
338 | - iniciaJanelaFlutuante: function(dados){ | ||
339 | - if(dados){ | ||
340 | - i3GEOF.graficointerativo.dados = dados; | ||
341 | - } | ||
342 | - var minimiza,cabecalho,janela,divid,temp,titulo; | ||
343 | - //cria a janela flutuante | ||
344 | - cabecalho = function(){ | ||
345 | - i3GEOF.graficointerativo.ativaFoco(); | ||
346 | - }; | ||
347 | - minimiza = function(){ | ||
348 | - i3GEO.janela.minimiza("i3GEOF.graficointerativo"); | ||
349 | - }; | ||
350 | - titulo = " "+$trad("t37b")+" <a class=ajuda_usuario target=_blank href='" + i3GEO.configura.locaplic + "/ajuda_usuario.php?idcategoria=3&idajuda=84' > </a>"; | ||
351 | - janela = i3GEO.janela.cria( | ||
352 | - "380px", | ||
353 | - "310px", | ||
354 | - "", | ||
355 | - "", | ||
356 | - "", | ||
357 | - titulo, | ||
358 | - "i3GEOF.graficointerativo", | ||
359 | - false, | ||
360 | - "hd", | ||
361 | - cabecalho, | ||
362 | - minimiza, | ||
363 | - "", | ||
364 | - true, | ||
365 | - i3GEO.configura.locaplic+"/imagens/oxygen/16x16/view-statistics.png" | ||
366 | - ); | ||
367 | - if(!janela){ | ||
368 | - return; | ||
369 | - } | ||
370 | - divid = janela[2].id; | ||
371 | - i3GEOF.graficointerativo.aguarde = $i("i3GEOF.graficointerativo_imagemCabecalho").style; | ||
372 | - $i("i3GEOF.graficointerativo_corpo").style.backgroundColor = "white"; | ||
373 | - $i("i3GEOF.graficointerativo_corpo").style.overflow = "auto"; | ||
374 | - i3GEOF.graficointerativo.inicia(divid); | ||
375 | - if(i3GEO.Interface){ | ||
376 | - temp = function(){ | ||
377 | - if(i3GEO.Interface.ATUAL !== "googlemaps" && i3GEO.Interface.ATUAL !== "googleearth"){ | ||
378 | - i3GEO.eventos.NAVEGAMAPA.remove("i3GEOF.graficointerativo.obterDados()"); | ||
379 | - } | ||
380 | - if(i3GEO.Interface.ATUAL == "googlemaps"){ | ||
381 | - google.maps.event.removeListener(graficointerativoDragend); | ||
382 | - google.maps.event.removeListener(graficointerativoZoomend); | ||
383 | - } | ||
384 | - if(i3GEO.Interface.ATUAL === "googleearth"){ | ||
385 | - google.earth.removeEventListener(graficointerativoDragend); | ||
386 | - } | ||
387 | - if(i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search("i3GEOF.graficointerativo.comboTemas()") > 0) | ||
388 | - {i3GEO.eventos.ATUALIZAARVORECAMADAS.remove("i3GEOF.graficointerativo.comboTemas()");} | ||
389 | - }; | ||
390 | - YAHOO.util.Event.addListener(janela[0].close, "click", temp); | ||
391 | - if(i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search("i3GEOF.graficointerativo.comboTemas()") < 0) | ||
392 | - {i3GEO.eventos.ATUALIZAARVORECAMADAS.push("i3GEOF.graficointerativo.comboTemas()");} | ||
393 | - } | ||
394 | - }, | ||
395 | - /* | ||
396 | - Function: ativaFoco | ||
397 | - | ||
398 | - Refaz a interface da ferramenta quando a janela flutuante tem seu foco ativado | ||
399 | - */ | ||
400 | - ativaFoco: function(){ | ||
401 | - if(i3GEO.Interface){ | ||
402 | - i3GEO.barraDeBotoes.ativaIcone("graficointerativo"); | ||
403 | - } | ||
404 | - var i = $i("i3GEOF.graficointerativo_c").style; | ||
405 | - i3GEO.janela.ULTIMOZINDEX++; | ||
406 | - i.zIndex = i3GEO.janela.ULTIMOZINDEX; | ||
407 | - }, | ||
408 | - novaJanela: function(){ | ||
409 | - var janela = "", | ||
410 | - divid, | ||
411 | - g = $i("i3GEOgraficointerativoGrafico"), | ||
412 | - v = g.cloneNode(true), | ||
413 | - cabecalho = function(){}, | ||
414 | - id = YAHOO.util.Dom.generateId(), | ||
415 | - minimiza = function(){ | ||
416 | - i3GEO.janela.minimiza(id); | ||
417 | - }, | ||
418 | - titulo = " "+i3GEOF.graficointerativo.titulo; | ||
419 | - janela = i3GEO.janela.cria( | ||
420 | - "380px", | ||
421 | - "280px", | ||
422 | - "", | ||
423 | - "", | ||
424 | - "", | ||
425 | - titulo, | ||
426 | - id, | ||
427 | - false, | ||
428 | - "hd", | ||
429 | - cabecalho, | ||
430 | - minimiza | ||
431 | - ); | ||
432 | - divid = janela[2].id; | ||
433 | - $i(divid).style.marginTop = "0px"; | ||
434 | - v = g.cloneNode(true); | ||
435 | - v.id = id+"ngrafico"; | ||
436 | - v.style.marginTop = "0px"; | ||
437 | - $i(divid).appendChild(v); | ||
438 | - }, | ||
439 | - /* | ||
440 | - Function: comboTemas | ||
441 | - | ||
442 | - Monta o combo para escolha do tema que será utilizado no gráfico | ||
443 | - */ | ||
444 | - comboTemas: function(){ | ||
445 | - if(!i3GEO.Interface){return;} | ||
446 | - i3GEO.util.comboTemas( | ||
447 | - "i3GEOgraficointerativoComboTemasId", | ||
448 | - function(retorno){ | ||
449 | - $i("i3GEOgraficointerativoComboTemas").innerHTML = retorno.dados; | ||
450 | - $i("i3GEOgraficointerativoComboTemas").style.display = "block"; | ||
451 | - if ($i("i3GEOgraficointerativoComboTemasId")){ | ||
452 | - $i("i3GEOgraficointerativoComboTemasId").onchange = function(){ | ||
453 | - i3GEO.mapa.ativaTema($i("i3GEOgraficointerativoComboTemasId").value); | ||
454 | - i3GEOF.graficointerativo.comboItensSel(); | ||
455 | - }; | ||
456 | - } | ||
457 | - if(i3GEO.temaAtivo !== ""){ | ||
458 | - $i("i3GEOgraficointerativoComboTemasId").value = i3GEO.temaAtivo; | ||
459 | - $i("i3GEOgraficointerativoComboTemasId").onchange.call(); | ||
460 | - } | ||
461 | - }, | ||
462 | - "i3GEOgraficointerativoComboTemas", | ||
463 | - "", | ||
464 | - false, | ||
465 | - "ligados", | ||
466 | - "font-size:12px;width:350px" | ||
467 | - ); | ||
468 | - }, | ||
469 | - /* | ||
470 | - Function: ativaTipo | ||
471 | - | ||
472 | - Define a variável com o tipo de gráfico e mostra a guia 2 | ||
473 | - */ | ||
474 | - ativaTipo: function(obj){ | ||
475 | - i3GEOF.graficointerativo.tipo = obj.value; | ||
476 | - if($i("i3GEOgraficointerativoGrafico").innerHTML === "" || $i("i3GEOgraficointerativotabeladados").innerHTML == "") | ||
477 | - {$i("i3GEOgraficointerativoguia2").onclick.call();} | ||
478 | - else | ||
479 | - {$i("i3GEOgraficointerativoguia4").onclick.call();} | ||
480 | - }, | ||
481 | - /* | ||
482 | - Function: configuraDados | ||
483 | - | ||
484 | - Configura o formulário para obtenção dos dados para cada tipo de gráfico | ||
485 | - */ | ||
486 | - configuraDados: function(){ | ||
487 | - var ativa = function(comboxlinha,comboylinha,ajudapizza){ | ||
488 | - try{ | ||
489 | - $i("i3GEOgraficointerativoComboXlinha").style.display = comboxlinha; | ||
490 | - $i("i3GEOgraficointerativoComboYlinha").style.display = comboylinha; | ||
491 | - $i("i3GEOgraficointerativoAjudaPizza").style.display = ajudapizza; | ||
492 | - }catch(e){} | ||
493 | - }; | ||
494 | - if (i3GEOF.graficointerativo.tipo === ""){ | ||
495 | - i3GEO.janela.tempoMsg("Escolha um tipo de grafico"); | ||
496 | - i3GEO.guias.mostraGuiaFerramenta("i3GEOgraficointerativoguia1","i3GEOgraficointerativoguia"); | ||
497 | - return; | ||
498 | - } | ||
499 | - if(i3GEOF.graficointerativo.tipo === "pizza2d"){ | ||
500 | - ativa.call("block","block","block"); | ||
501 | - } | ||
502 | - }, | ||
503 | - /* | ||
504 | - Function: comboItensSel | ||
505 | - | ||
506 | - Cria um combo para selecionar os itens do tema escolhido | ||
507 | - | ||
508 | - Veja: | ||
509 | - | ||
510 | - <i3GEO.util.comboItens> | ||
511 | - */ | ||
512 | - comboItensSel: function(){ | ||
513 | - var tema = $i("i3GEOgraficointerativoComboTemasId").value; | ||
514 | - i3GEO.util.comboItens( | ||
515 | - "i3GEOgraficointerativoComboXid", | ||
516 | - tema, | ||
517 | - function(retorno){ | ||
518 | - if(retorno.tipo === "erro"){ | ||
519 | - $i("i3GEOgraficointerativoComboX").innerHTML = "<br><br><span style='color:red'>erro ao ler os itens do tema de origem</span><br><br>"; | ||
520 | - $i("i3GEOgraficointerativoComboY").innerHTML = "<br><br><span style='color:red'>erro ao ler os itens do tema de origem</span><br><br>"; | ||
521 | - } | ||
522 | - else{ | ||
523 | - $i("i3GEOgraficointerativoComboY").innerHTML = retorno.dados + " <input title='Digite o título' class=digitar type=text size=20 id=i3GEOgraficointerativoComboYidTitulo value='' />"; | ||
524 | - $i("i3GEOgraficointerativoComboXid").id = "i3GEOgraficointerativoComboYid"; | ||
525 | - $i("i3GEOgraficointerativoComboX").innerHTML = retorno.dados + " <input title='Digite o título' class=digitar type=text size=20 id=i3GEOgraficointerativoComboXidTitulo value='' />"; | ||
526 | - $i("i3GEOgraficointerativoComboXid").style.width = "160px"; | ||
527 | - $i("i3GEOgraficointerativoComboYid").style.width = "160px"; | ||
528 | - $i("i3GEOgraficointerativoComboXid").onchange = function(){ | ||
529 | - var combo = $i("i3GEOgraficointerativoComboXid"); | ||
530 | - $i("i3GEOgraficointerativoComboXidTitulo").value = combo.options[combo.selectedIndex].label; | ||
531 | - }; | ||
532 | - $i("i3GEOgraficointerativoComboYid").onchange = function(){ | ||
533 | - var combo = $i("i3GEOgraficointerativoComboYid"); | ||
534 | - $i("i3GEOgraficointerativoComboYidTitulo").value = combo.options[combo.selectedIndex].label; | ||
535 | - }; | ||
536 | - } | ||
537 | - }, | ||
538 | - "i3GEOgraficointerativoComboX", | ||
539 | - "" | ||
540 | - ); | ||
541 | - }, | ||
542 | - /* | ||
543 | - Function: obterDados | ||
544 | - | ||
545 | - Obtém os dados que serão utilizados no gráfico | ||
546 | - | ||
547 | - Veja: | ||
548 | - | ||
549 | - <GRAFICOSELECAO> | ||
550 | - */ | ||
551 | - obterDados: function(){ | ||
552 | - if(!i3GEO.Interface){ | ||
553 | - return; | ||
554 | - } | ||
555 | - if(i3GEOF.graficointerativo.aguarde.visibility === "visible") | ||
556 | - {return;} | ||
557 | - var tema = $i("i3GEOgraficointerativoComboTemasId").value, | ||
558 | - x = $i("i3GEOgraficointerativoComboXid").value, | ||
559 | - y = $i("i3GEOgraficointerativoComboYid").value, | ||
560 | - excluir = $i("i3GEOgraficointerativoexcluir").value, | ||
561 | - p = i3GEO.configura.locaplic+"/ferramentas/graficointerativo/exec.php?g_sid="+i3GEO.configura.sid+"&funcao=graficoSelecao&tema="+tema+"&itemclasses="+x+"&itemvalores="+y+"&exclui="+excluir+"&ext="+i3GEO.parametros.mapexten, | ||
562 | - cp = new cpaint(), | ||
563 | - tipo = $i("i3GEOgraficointerativoTipoAgregacao").value, | ||
564 | - ordenax = "sim", | ||
565 | - monta; | ||
566 | - | ||
567 | - if(i3GEOF.graficointerativo.tipo == "scatter"){ | ||
568 | - $i("i3GEOgraficointerativoDadosPuros").checked = true; | ||
569 | - } | ||
570 | - if($i("i3GEOgraficointerativoDadosPuros").checked){ | ||
571 | - tipo = "nenhum"; | ||
572 | - } | ||
573 | - else{ | ||
574 | - if(x === y) | ||
575 | - {tipo = "conta";} | ||
576 | - } | ||
577 | - if(!$i("i3GEOgraficointerativoOrdenaX").checked) | ||
578 | - {ordenax = "nao";} | ||
579 | - | ||
580 | - if(tema === "") | ||
581 | - {i3GEO.janela.tempoMsg("Escolha um tema");return;} | ||
582 | - if(x === "") | ||
583 | - {i3GEO.janela.tempoMsg("Escolha um item para X");return;} | ||
584 | - if(y === "") | ||
585 | - {i3GEO.janela.tempoMsg("Escolha um item para Y");return;} | ||
586 | - monta = function(retorno){ | ||
587 | - i3GEOF.graficointerativo.aguarde.visibility = "hidden"; | ||
588 | - i3GEOF.graficointerativo.montaTabelaDados(retorno); | ||
589 | - $i("i3GEOgraficointerativoguia4").onclick.call(); | ||
590 | - i3GEO.janela.tempoMsg("Os dados utilizados referem-se apenas à região atual mostrada no mapa"); | ||
591 | - }; | ||
592 | - i3GEOF.graficointerativo.aguarde.visibility = "visible"; | ||
593 | - cp.set_response_type("JSON"); | ||
594 | - cp.call(p+"&tipo="+tipo+"&ordenax="+ordenax,"graficoSelecao",monta); | ||
595 | - }, | ||
596 | - /* | ||
597 | - Function: montaTabelaDados | ||
598 | - | ||
599 | - Monta a tabela com os dados que serão utilizados no gráfico | ||
600 | - | ||
601 | - Parametro: | ||
602 | - | ||
603 | - retorno {JSON} - dados no formato JSON | ||
604 | - */ | ||
605 | - montaTabelaDados: function(retorno){ | ||
606 | - var dados, | ||
607 | - n, | ||
608 | - v, | ||
609 | - ins = [], | ||
610 | - i, | ||
611 | - id, | ||
612 | - cor = "#C11515"; | ||
613 | - if(!retorno.dados && retorno.data != undefined) | ||
614 | - {dados = retorno.data.dados;} | ||
615 | - else | ||
616 | - {dados = retorno;} | ||
617 | - n = dados.length; | ||
618 | - ins.push("<p class=paragrafo >Tabela de dados para o gráfico. Os valores podem ser editados</p><table class=lista4 id=i3GEOgraficointerativotabeladados ><tr><td></td>"); | ||
619 | - ins.push("<td style=background-color:yellow > <img style=cursor:pointer onclick='i3GEOF.graficointerativo.ordenaColuna(this,1)' src='"+i3GEO.configura.locaplic+"/imagens/ordena1.gif' title='ordena' /> nome</td>"); | ||
620 | - ins.push("<td style=background-color:yellow > <img style=cursor:pointer onclick='i3GEOF.graficointerativo.ordenaColuna(this,2)' src='"+i3GEO.configura.locaplic+"/imagens/ordena1.gif' title='ordena' /> valor</td>"); | ||
621 | - ins.push("<td style=background-color:yellow >cor</td><td></td></tr>"); | ||
622 | - for (i=1;i<n; i++){ | ||
623 | - v = dados[i].split(";"); | ||
624 | - v[0] = v[0].replace("'",""); | ||
625 | - v[0] = v[0].replace("'",""); | ||
626 | - //ins += v[0]+" "+v[1]; | ||
627 | - id = "i3GEOgraficointerativoDados"+i; //layer+indice da classe | ||
628 | - ins.push("<tr><td>"); | ||
629 | - ins.push("<img style='cursor:pointer' title='clique para excluir' onclick='i3GEOF.graficointerativo.excluilinha(this)' src='"+i3GEO.configura.locaplic+"/imagens/x.gif' title='excluir' /></td>"); | ||
630 | - ins.push("</td><td>"); | ||
631 | - ins.push($inputText("","",id+"_nome","digite o novo nome",20,v[0],"nome")); | ||
632 | - ins.push("</td><td>"); | ||
633 | - ins.push($inputText("","",id+"_valor","digite o novo valor",12,v[1],"valor")); | ||
634 | - ins.push("</td><td>"); | ||
635 | - if($i("i3GEOgraficointerativoCoresA").checked){ | ||
636 | - cor = i3GEO.util.rgb2hex(i3GEO.util.randomRGB()); | ||
637 | - } | ||
638 | - //verifica se no objeto com os dados existe um terceiro valor com as cores | ||
639 | - if(v[2]){ | ||
640 | - cor = i3GEO.util.rgb2hex(v[2]); | ||
641 | - } | ||
642 | - ins.push($inputText("","",id+"_cor","",12,cor,"cor")); | ||
643 | - ins.push("</td><td>"); | ||
644 | - ins.push("<img alt='aquarela.gif' style=cursor:pointer src='"+i3GEO.configura.locaplic+"/imagens/aquarela.gif' onclick='i3GEOF.graficointerativo.corj(\""+id+"_cor\")' />"); | ||
645 | - ins.push("</td></tr>"); | ||
646 | - } | ||
647 | - ins.push("</table><br>"); | ||
648 | - $i("i3GEOgraficointerativoDados").innerHTML = ins.join(""); | ||
649 | - }, | ||
650 | - /* | ||
651 | - Function: tabela2csv | ||
652 | - | ||
653 | - Obtém os dados da tabela em CSV | ||
654 | - */ | ||
655 | - tabela2csv: function(){ | ||
656 | - var inputs = $i("i3GEOgraficointerativoDados").getElementsByTagName("input"), | ||
657 | - ninputs = inputs.length, | ||
658 | - i, | ||
659 | - legendaX = "", | ||
660 | - legendaY = "", | ||
661 | - csv = []; | ||
662 | - if($i("i3GEOgraficointerativoComboXid")) | ||
663 | - {legendaX = $i("i3GEOgraficointerativoComboXid").value;} | ||
664 | - if($i("i3GEOgraficointerativoComboYid")) | ||
665 | - {legendaY = $i("i3GEOgraficointerativoComboYid").value;} | ||
666 | - csv.push(legendaX+";"+legendaY); | ||
667 | - for(i=0;i<ninputs;i = i + 3){ | ||
668 | - csv.push(inputs[i].value+";"+inputs[i+1].value * 1); | ||
669 | - } | ||
670 | - return csv; | ||
671 | - }, | ||
672 | - /* | ||
673 | - Function: tabela2dados | ||
674 | - | ||
675 | - Obtém os dados da tabela para compor o gráfico | ||
676 | - */ | ||
677 | - tabela2dados: function(){ | ||
678 | - var temp = 0, | ||
679 | - ultimo = 0, | ||
680 | - inputs = $i("i3GEOgraficointerativoDados").getElementsByTagName("input"), | ||
681 | - ninputs = inputs.length, | ||
682 | - n, | ||
683 | - i, | ||
684 | - parametros = [], | ||
685 | - valores = [], | ||
686 | - valoresS = [], | ||
687 | - acumulado = [], | ||
688 | - acum, | ||
689 | - nomes = [], | ||
690 | - cores = [], | ||
691 | - indice = "", | ||
692 | - titulo = "", | ||
693 | - par = [], | ||
694 | - parcor = [], | ||
695 | - soma = 0, | ||
696 | - total = 0, | ||
697 | - menor = inputs[1].value * 1, | ||
698 | - maior = 0, | ||
699 | - menorNome = inputs[0].value * 1, | ||
700 | - maiorNome = 0, | ||
701 | - alpha = 0.8, | ||
702 | - stroke = 2, | ||
703 | - gradient = true, | ||
704 | - tituloSize = "15px", | ||
705 | - tituloCor = "#000000", | ||
706 | - tituloAlinhamento = "center", | ||
707 | - corunica = "#C11515", | ||
708 | - outlinecolor = "#577261", | ||
709 | - corGrid = "#D7E4A3", | ||
710 | - divisoesY = 10, | ||
711 | - rotacaoX = 270, | ||
712 | - legendaX = "", | ||
713 | - legendaY = "", | ||
714 | - fill = "#C4B86A", | ||
715 | - pointSize = 4; | ||
716 | - if($i("i3GEOgraficointerativoComboTemasId")){ | ||
717 | - indice = $i("i3GEOgraficointerativoComboTemasId").options.selectedIndex; | ||
718 | - titulo = $i("i3GEOgraficointerativoComboTemasId").options[indice].text; | ||
719 | - } | ||
720 | - if(i3GEOF.graficointerativo.titulo != "") | ||
721 | - {titulo = i3GEOF.graficointerativo.titulo;} | ||
722 | - if($i("i3GEOgraficointerativoComboXid")) | ||
723 | - {legendaX = $i("i3GEOgraficointerativoComboXidTitulo").value;} | ||
724 | - if($i("i3GEOgraficointerativoComboYid")) | ||
725 | - {legendaY = $i("i3GEOgraficointerativoComboYidTitulo").value;} | ||
726 | - for(i=0;i<ninputs;i = i + 3){ | ||
727 | - temp = inputs[i+1].value * 1; | ||
728 | - total += temp; | ||
729 | - } | ||
730 | - for(i=0;i<ninputs;i = i + 3){ | ||
731 | - nomes.push(inputs[i].value+" "); | ||
732 | - cores.push(inputs[i+2].value); | ||
733 | - temp = inputs[i+1].value * 1; | ||
734 | - valores.push(temp); | ||
735 | - valoresS.push(temp+" "); | ||
736 | - acum = ultimo + temp; | ||
737 | - acumulado.push(acum); | ||
738 | - ultimo = ultimo + temp; | ||
739 | - soma += temp; | ||
740 | - if(temp > maior) | ||
741 | - {maior = temp;} | ||
742 | - if(temp < menor) | ||
743 | - {menor = temp;} | ||
744 | - temp = inputs[i].value * 1; | ||
745 | - if(temp > maiorNome) | ||
746 | - {maiorNome = temp;} | ||
747 | - if(temp < menorNome) | ||
748 | - {menorNome = temp;} | ||
749 | - par.push({"value":inputs[i+1].value * 1,"label":inputs[i].value+" "}); | ||
750 | - | ||
751 | - temp = inputs[i+1].value * 1; | ||
752 | - if($i("i3GEOgraficointerativoAcumula").checked) | ||
753 | - {temp = acum;} | ||
754 | - if($i("i3GEOgraficointerativoRelativa").checked) | ||
755 | - {temp = (temp * 100) / total;} | ||
756 | - parcor.push({"colour":inputs[i+2].value,"value":temp,"label":inputs[i].value+" "}); | ||
757 | - } | ||
758 | - if($i("i3GEOgraficointerativoAcumula").checked){ | ||
759 | - valores = acumulado; | ||
760 | - maior = soma; | ||
761 | - } | ||
762 | - if(legendaX == legendaY){ | ||
763 | - menor = 0; | ||
764 | - legendaX += " (casos)"; | ||
765 | - legendaY += " (n. de casos)"; | ||
766 | - } | ||
767 | - if($i("i3GEOgraficointerativoRelativa").checked){ | ||
768 | - n = valores.length; | ||
769 | - for(i=0;i<n;i++){ | ||
770 | - valores[i] = (valores[i] * 100) / soma; | ||
771 | - } | ||
772 | - maior = 100; | ||
773 | - menor = 0; | ||
774 | - } | ||
775 | - if(i3GEOF.graficointerativo.tipo === "pizza2d"){ | ||
776 | - parametros = { | ||
777 | - "elements":[{ | ||
778 | - "type": "pie", | ||
779 | - "start-angle": 180, | ||
780 | - "colours": cores, | ||
781 | - "alpha": alpha, | ||
782 | - "stroke": stroke, | ||
783 | - "animate": 1, | ||
784 | - "values" : par, | ||
785 | - "tip": "#val# de #total#<br>#percent# de 100%", | ||
786 | - "gradient-fill": gradient | ||
787 | - }], | ||
788 | - "title":{ | ||
789 | - "text": titulo, | ||
790 | - "style": "{font-size: "+tituloSize+"; color:"+tituloCor+"; text-align: "+tituloAlinhamento+";}" | ||
791 | - }, | ||
792 | - "num_decimals": 2, | ||
793 | - "is_fixed_num_decimals_forced": true, | ||
794 | - "is_decimal_separator_comma": true, | ||
795 | - "is_thousand_separator_disabled": true, | ||
796 | - "x_axis": null | ||
797 | - }; | ||
798 | - } | ||
799 | - if(i3GEOF.graficointerativo.tipo === "line" || i3GEOF.graficointerativo.tipo === "scatter" || i3GEOF.graficointerativo.tipo === "hbar" || i3GEOF.graficointerativo.tipo === "area" || i3GEOF.graficointerativo.tipo === "bar_round" || i3GEOF.graficointerativo.tipo === "bar_round_glass" || i3GEOF.graficointerativo.tipo === "bar_filled" || i3GEOF.graficointerativo.tipo === "bar_glass" || i3GEOF.graficointerativo.tipo === "bar_3d" || i3GEOF.graficointerativo.tipo === "bar_sketch" || i3GEOF.graficointerativo.tipo === "bar_cylinder" || i3GEOF.graficointerativo.tipo === "bar_cylinder_outline"){ | ||
800 | - temp = valores; | ||
801 | - if(i3GEOF.graficointerativo.tipo === "line" || i3GEOF.graficointerativo.tipo === "scatter" || i3GEOF.graficointerativo.tipo === "area") | ||
802 | - {temp = parcor;} | ||
803 | - parametros = { | ||
804 | - "elements":[ | ||
805 | - { | ||
806 | - "type": i3GEOF.graficointerativo.tipo, | ||
807 | - "start-angle": 180, | ||
808 | - "colour": corunica, | ||
809 | - "outlinecolor": outlinecolor, | ||
810 | - "alpha": alpha, | ||
811 | - "stroke": stroke, | ||
812 | - "animate": 1, | ||
813 | - "values" : temp, | ||
814 | - "tip": "#val#", | ||
815 | - "gradient-fill": gradient, | ||
816 | - "fill": fill, | ||
817 | - "fill-alpha": alpha, | ||
818 | - "dot-style": { "type": "solid-dot", "colour": "#9C0E57", "dot-size": pointSize } | ||
819 | - } | ||
820 | - ], | ||
821 | - "x_axis": { | ||
822 | - "colour": "#A2ACBA", | ||
823 | - "grid-colour": corGrid, | ||
824 | - "offset": true, | ||
825 | - "steps": 1, | ||
826 | - "labels": { | ||
827 | - "steps": 1, | ||
828 | - "rotate": rotacaoX, | ||
829 | - "colour": "#000000", | ||
830 | - "labels": nomes | ||
831 | - } | ||
832 | - }, | ||
833 | - "y_axis": { | ||
834 | - "min": menor, | ||
835 | - "max": maior, | ||
836 | - "steps": parseInt((parseInt(maior - menor,10) / divisoesY),10) | ||
837 | - }, | ||
838 | - "x_legend": { | ||
839 | - "text": legendaX, | ||
840 | - "style": "{font-size: 12px; color: #778877}" | ||
841 | - }, | ||
842 | - "y_legend": { | ||
843 | - "text": legendaY, | ||
844 | - "style": "{font-size: 12px; color: #778877}" | ||
845 | - }, | ||
846 | - "title":{ | ||
847 | - "text": titulo, | ||
848 | - "style": "{font-size: "+tituloSize+"; color:"+tituloCor+"; text-align: "+tituloAlinhamento+";}" | ||
849 | - } | ||
850 | - }; | ||
851 | - if($i("i3GEOgraficointerativoAdLinhas").checked){ | ||
852 | - parametros.elements.push({ | ||
853 | - "type": "line", | ||
854 | - "colour": "#FFFFFF", | ||
855 | - "start-angle": 180, | ||
856 | - "alpha": 0, | ||
857 | - "stroke": 0, | ||
858 | - "width": 0, | ||
859 | - "animate": 1, | ||
860 | - "values" : parcor, | ||
861 | - "dot-style": { "type": "solid-dot", "colour": "#9C0E57", "dot-size": pointSize } | ||
862 | - }); | ||
863 | - } | ||
864 | - if(i3GEOF.graficointerativo.tipo === "hbar"){ | ||
865 | - n = valores.length; | ||
866 | - temp = []; | ||
867 | - for(i=0;i<n;i++){ | ||
868 | - temp.push({"left":0,right:valores[i]}); | ||
869 | - } | ||
870 | - parametros.elements[0].values = temp; | ||
871 | - | ||
872 | - parametros.x_axis = { | ||
873 | - "min": 0, | ||
874 | - "max": maior, | ||
875 | - "steps": parseInt((maior / divisoesY),10) | ||
876 | - }; | ||
877 | - parametros.y_axis = { | ||
878 | - "offset": 1, | ||
879 | - "labels": nomes | ||
880 | - }; | ||
881 | - parametros.x_legend.text = legendaY; | ||
882 | - parametros.y_legend.text = legendaX; | ||
883 | - } | ||
884 | - if(i3GEOF.graficointerativo.tipo === "scatter"){ | ||
885 | - n = valores.length; | ||
886 | - temp = []; | ||
887 | - for(i=0;i<n;i++){ | ||
888 | - temp.push({"x":nomes[i],"y":valores[i]}); | ||
889 | - } | ||
890 | - parametros.elements[0].values = temp; | ||
891 | - parametros.x_axis = { | ||
892 | - "min": menor, | ||
893 | - "max": maior, | ||
894 | - "steps": parseInt(((maior - menor) / divisoesY),10) | ||
895 | - }; | ||
896 | - parametros.x_axis = { | ||
897 | - "min": menorNome, | ||
898 | - "max": maiorNome, | ||
899 | - "steps": parseInt(((maiorNome - menorNome) / divisoesY),10) | ||
900 | - }; | ||
901 | - parametros.elements[0].tip = "#x# - #y#"; | ||
902 | - } | ||
903 | - } | ||
904 | - if(i3GEOF.graficointerativo.tipo === "radar"){ | ||
905 | - parametros = { | ||
906 | - "elements": [{ | ||
907 | - "type": "area", | ||
908 | - "width": 1, | ||
909 | - "dot-style": { "type": "anchor", "colour": "#9C0E57", "dot-size": pointSize }, | ||
910 | - "colour": "#45909F", | ||
911 | - "fill": "#45909F", | ||
912 | - "fill-alpha": 0.4, | ||
913 | - "loop": true, | ||
914 | - "values": parcor | ||
915 | - }], | ||
916 | - "radar_axis": { | ||
917 | - "max": maior, | ||
918 | - "steps": parseInt(((maior - menor) / divisoesY),10), | ||
919 | - "colour": "#EFD1EF", | ||
920 | - "grid-colour": "#EFD1EF", | ||
921 | - "spoke-labels": { | ||
922 | - "labels": nomes, | ||
923 | - "colour": "#9F819F" | ||
924 | - } | ||
925 | - }, | ||
926 | - "title":{ | ||
927 | - "text": titulo, | ||
928 | - "style": "{font-size: "+tituloSize+"; color:"+tituloCor+"; text-align: "+tituloAlinhamento+";}" | ||
929 | - }, | ||
930 | - "bg_colour": "#DFFFEC" | ||
931 | - }; | ||
932 | - } | ||
933 | - return( JSON1.stringify(parametros)); | ||
934 | - }, | ||
935 | - /* | ||
936 | - Function: excluilinha | ||
937 | - | ||
938 | - Exclui uma linha da tabela de dados | ||
939 | - */ | ||
940 | - excluilinha: function(celula){ | ||
941 | - var p = celula.parentNode.parentNode; | ||
942 | - do{ | ||
943 | - p.removeChild(p.childNodes[0]); | ||
944 | - } while (p.childNodes.length > 0); | ||
945 | - p.parentNode.removeChild(p); | ||
946 | - }, | ||
947 | - /* | ||
948 | - Function: corj | ||
949 | - | ||
950 | - Abre a janela para o usuário selecionar uma cor interativamente | ||
951 | - */ | ||
952 | - corj: function(obj) | ||
953 | - {i3GEO.util.abreCor("",obj,"hex");}, | ||
954 | - /* | ||
955 | - Function: ordenaColuna | ||
956 | - | ||
957 | - Ordena uma coluna da tabela | ||
958 | - */ | ||
959 | - ordenaColuna: function(coluna,cid){ | ||
960 | - | ||
961 | - var tabela = $i("i3GEOgraficointerativoDados").getElementsByTagName("table")[0], | ||
962 | - trs = tabela.getElementsByTagName("tr"), | ||
963 | - ntrs = trs.length, | ||
964 | - psort = [], | ||
965 | - t, | ||
966 | - psortfim, | ||
967 | - npsortfim, | ||
968 | - ins, | ||
969 | - p, | ||
970 | - e, | ||
971 | - temp, | ||
972 | - chaves = [], | ||
973 | - numero = false; | ||
974 | - | ||
975 | - function sortNumber(a,b) | ||
976 | - {return a - b;} | ||
977 | - | ||
978 | - for (t=1;t<ntrs;t++) | ||
979 | - { | ||
980 | - temp = trs[t].childNodes[cid]; | ||
981 | - if (temp){ | ||
982 | - psort.push(temp.childNodes[0].value); | ||
983 | - chaves[temp.childNodes[0].value] = t; | ||
984 | - if(temp.childNodes[0].value *1) | ||
985 | - {numero = true;} | ||
986 | - } | ||
987 | - } | ||
988 | - //recosntroi a tabela | ||
989 | - if(numero) | ||
990 | - {psortfim = psort.sort(sortNumber);} | ||
991 | - else | ||
992 | - {psortfim = psort.sort();} | ||
993 | - ins = "<tr>" + trs[0].innerHTML + "</tr>"; | ||
994 | - npsortfim = psortfim.length; | ||
995 | - for (p=0;p<npsortfim;p++) | ||
996 | - { | ||
997 | - e = chaves[psortfim[p]]; | ||
998 | - //e = psortfim[p].split("+")[1] * 1; | ||
999 | - if (trs[e] !== undefined) | ||
1000 | - {ins += "<tr>" + trs[e].innerHTML + "</tr>";} | ||
1001 | - } | ||
1002 | - tabela.innerHTML = ins; | ||
1003 | - | ||
1004 | - }, | ||
1005 | - /* | ||
1006 | - Function: ativaNavegacao | ||
1007 | - | ||
1008 | - Ativa ou desativa a atualização automática ao navegar no mapa | ||
1009 | - */ | ||
1010 | - ativaNavegacao: function(obj){ | ||
1011 | - if(!i3GEO.Interface){ | ||
1012 | - return; | ||
1013 | - } | ||
1014 | - if(obj === true){ | ||
1015 | - if(i3GEO.Interface.ATUAL !== "googlemaps" && i3GEO.Interface.ATUAL !== "googleearth"){ | ||
1016 | - i3GEO.eventos.NAVEGAMAPA.push("i3GEOF.graficointerativo.obterDados()"); | ||
1017 | - } | ||
1018 | - if(i3GEO.Interface.ATUAL === "googlemaps"){ | ||
1019 | - graficointerativoDragend = GEvent.addListener(i3GeoMap, "dragend", function() {i3GEOF.graficointerativo.obterDados();}); | ||
1020 | - graficointerativoZoomend = GEvent.addListener(i3GeoMap, "zoomend", function() {i3GEOF.graficointerativo.obterDados();}); | ||
1021 | - } | ||
1022 | - if(i3GEO.Interface.ATUAL === "googleearth"){ | ||
1023 | - graficointerativoDragend = google.earth.addEventListener(i3GeoMap.getView(), "viewchangeend", function() {i3GEOF.graficointerativo.obterDados();}); | ||
1024 | - } | ||
1025 | - } | ||
1026 | - else{ | ||
1027 | - if(i3GEO.Interface.ATUAL !== "googlemaps" && i3GEO.Interface.ATUAL !== "googleearth"){ | ||
1028 | - i3GEO.eventos.NAVEGAMAPA.remove("i3GEOF.graficointerativo.obterDados()"); | ||
1029 | - } | ||
1030 | - if(i3GEO.Interface.ATUAL === "googlemaps"){ | ||
1031 | - GEvent.removeListener(graficointerativoDragend); | ||
1032 | - GEvent.removeListener(graficointerativoZoomend); | ||
1033 | - } | ||
1034 | - if(i3GEO.Interface.ATUAL === "googleearth"){ | ||
1035 | - google.earth.removeEventListener(graficointerativoDragend); | ||
1036 | - } | ||
1037 | - } | ||
1038 | - } | ||
1039 | -}; | ||
1040 | -//pacotes/openflashchart/json2.js | ||
1041 | -if (!this.JSON1) { | ||
1042 | - JSON1 = function () { | ||
1043 | - | ||
1044 | - function f(n) { // Format integers to have at least two digits. | ||
1045 | - return n < 10 ? '0' + n : n; | ||
1046 | - } | ||
1047 | - Date.prototype.toJSON = function () { | ||
1048 | - return this.getUTCFullYear() + '-' + | ||
1049 | - f(this.getUTCMonth() + 1) + '-' + | ||
1050 | - f(this.getUTCDate()) + 'T' + | ||
1051 | - f(this.getUTCHours()) + ':' + | ||
1052 | - f(this.getUTCMinutes()) + ':' + | ||
1053 | - f(this.getUTCSeconds()) + 'Z'; | ||
1054 | - }; | ||
1055 | - var escapeable = /["\\\x00-\x1f\x7f-\x9f]/g, | ||
1056 | - gap = 0, | ||
1057 | - indent, | ||
1058 | - meta = { // table of character substitutions | ||
1059 | - '\b': '\\b', | ||
1060 | - '\t': '\\t', | ||
1061 | - '\n': '\\n', | ||
1062 | - '\f': '\\f', | ||
1063 | - '\r': '\\r', | ||
1064 | - '"' : '\\"', | ||
1065 | - '\\': '\\\\' | ||
1066 | - }, | ||
1067 | - rep = 0; | ||
1068 | - function quote(string) { | ||
1069 | - return escapeable.test(string) ? | ||
1070 | - '"' + string.replace(escapeable, function (a) { | ||
1071 | - var c = meta[a]; | ||
1072 | - if (typeof c === 'string') { | ||
1073 | - return c; | ||
1074 | - } | ||
1075 | - c = a.charCodeAt(); | ||
1076 | - return '\\u00' + Math.floor(c / 16).toString(16) + | ||
1077 | - (c % 16).toString(16); | ||
1078 | - }) + '"' : | ||
1079 | - '"' + string + '"'; | ||
1080 | - } | ||
1081 | - function str(key, holder) { | ||
1082 | - var i, // The loop counter. | ||
1083 | - k, // The member key. | ||
1084 | - v, // The member value. | ||
1085 | - length, | ||
1086 | - mind = gap, | ||
1087 | - partial, | ||
1088 | - value = holder[key]; | ||
1089 | - if (value && typeof value === 'object' && | ||
1090 | - typeof value.toJSON === 'function') { | ||
1091 | - value = value.toJSON(key); | ||
1092 | - } | ||
1093 | - if (typeof rep === 'function') { | ||
1094 | - value = rep.call(holder, key, value); | ||
1095 | - } | ||
1096 | - switch (typeof value) { | ||
1097 | - case 'string': | ||
1098 | - return quote(value); | ||
1099 | - | ||
1100 | - case 'number': | ||
1101 | - return isFinite(value) ? String(value) : 'null'; | ||
1102 | - | ||
1103 | - case 'boolean': | ||
1104 | - case 'null': | ||
1105 | - return String(value); | ||
1106 | - case 'object': | ||
1107 | - if (!value) { | ||
1108 | - return 'null'; | ||
1109 | - } | ||
1110 | - gap += indent; | ||
1111 | - partial = []; | ||
1112 | - if (typeof value.length === 'number' && | ||
1113 | - !(value.propertyIsEnumerable('length'))) { | ||
1114 | - length = value.length; | ||
1115 | - for (i = 0; i < length; i += 1) { | ||
1116 | - partial[i] = str(i, value) || 'null'; | ||
1117 | - } | ||
1118 | - v = partial.length === 0 ? '[]' : | ||
1119 | - gap ? '[\n' + gap + partial.join(',\n' + gap) + | ||
1120 | - '\n' + mind + ']' : | ||
1121 | - '[' + partial.join(',') + ']'; | ||
1122 | - gap = mind; | ||
1123 | - return v; | ||
1124 | - } | ||
1125 | - if (typeof rep === 'object') { | ||
1126 | - length = rep.length; | ||
1127 | - for (i = 0; i < length; i += 1) { | ||
1128 | - k = rep[i]; | ||
1129 | - if (typeof k === 'string') { | ||
1130 | - v = str(k, value, rep); | ||
1131 | - if (v) { | ||
1132 | - partial.push(quote(k) + (gap ? ': ' : ':') + v); | ||
1133 | - } | ||
1134 | - } | ||
1135 | - } | ||
1136 | - } else { | ||
1137 | - for (k in value) { | ||
1138 | - v = str(k, value, rep); | ||
1139 | - if (v) { | ||
1140 | - partial.push(quote(k) + (gap ? ': ' : ':') + v); | ||
1141 | - } | ||
1142 | - } | ||
1143 | - } | ||
1144 | - v = partial.length === 0 ? '{}' : | ||
1145 | - gap ? '{\n' + gap + partial.join(',\n' + gap) + | ||
1146 | - '\n' + mind + '}' : | ||
1147 | - '{' + partial.join(',') + '}'; | ||
1148 | - gap = mind; | ||
1149 | - return v; | ||
1150 | - } | ||
1151 | - } | ||
1152 | - return { | ||
1153 | - stringify: function (value, replacer, space) { | ||
1154 | - var i; | ||
1155 | - gap = ''; | ||
1156 | - indent = ''; | ||
1157 | - if (space) { | ||
1158 | - if (typeof space === 'number') { | ||
1159 | - for (i = 0; i < space; i += 1) { | ||
1160 | - indent += ' '; | ||
1161 | - } | ||
1162 | - } else if (typeof space === 'string') { | ||
1163 | - indent = space; | ||
1164 | - } | ||
1165 | - } | ||
1166 | - if (!replacer) { | ||
1167 | - rep = function (key, value) { | ||
1168 | - if (!Object.hasOwnProperty.call(this, key)) { | ||
1169 | - return undefined; | ||
1170 | - } | ||
1171 | - return value; | ||
1172 | - }; | ||
1173 | - } else if (typeof replacer === 'function' || | ||
1174 | - (typeof replacer === 'object' && | ||
1175 | - typeof replacer.length === 'number')) { | ||
1176 | - rep = replacer; | ||
1177 | - } else { | ||
1178 | - throw new Error('JSON.stringify'); | ||
1179 | - } | ||
1180 | - return str('', {'': value}); | ||
1181 | - }, | ||
1182 | - parse: function (text, reviver) { | ||
1183 | - var j; | ||
1184 | - | ||
1185 | - function walk(holder, key) { | ||
1186 | - var k, v, value = holder[key]; | ||
1187 | - if (value && typeof value === 'object') { | ||
1188 | - for (k in value) { | ||
1189 | - if (Object.hasOwnProperty.call(value, k)) { | ||
1190 | - v = walk(value, k); | ||
1191 | - if (v !== undefined) { | ||
1192 | - value[k] = v; | ||
1193 | - } else { | ||
1194 | - delete value[k]; | ||
1195 | - } | ||
1196 | - } | ||
1197 | - } | ||
1198 | - } | ||
1199 | - return reviver.call(holder, key, value); | ||
1200 | - } | ||
1201 | - if (/^[\],:{}\s]*$/.test(text.replace(/\\["\\\/bfnrtu]/g, '@'). | ||
1202 | -replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']'). | ||
1203 | -replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) { | ||
1204 | - j = eval('(' + text + ')'); | ||
1205 | - return typeof reviver === 'function' ? | ||
1206 | - walk({'': j}, '') : j; | ||
1207 | - } | ||
1208 | - throw new SyntaxError('JSON.parse'); | ||
1209 | - }, | ||
1210 | - quote: quote | ||
1211 | - }; | ||
1212 | - }(); | ||
1213 | -} | ||
1214 | - | ||
1215 | - | ||
1216 | - | ||
1217 | - | ||
1218 | -/* SWFObject v2.2 <http://code.google.com/p/swfobject/> | ||
1219 | - is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> | ||
1220 | -*/ | ||
1221 | -swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}(); |