Commit 3f796bc48d63b0963528a53979b6acf1d4d431a3
1 parent
c30565e2
Exists in
master
and in
7 other branches
Correção nas mensagens de ajuda da barra de botões
Showing
14 changed files
with
374 additions
and
410 deletions
Show diff stats
classesjs/classe_barradebotoes.js
| ... | ... | @@ -24,16 +24,16 @@ |
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | 26 | * Licença |
| 27 | - * | |
| 27 | + * | |
| 28 | 28 | * GPL2 |
| 29 | - * | |
| 29 | + * | |
| 30 | 30 | * i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet |
| 31 | - * | |
| 31 | + * | |
| 32 | 32 | * Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente Brasil Desenvolvedor: Edmar Moretti edmar.moretti@gmail.com |
| 33 | - * | |
| 33 | + * | |
| 34 | 34 | * Este programa é software livre; você pode redistribuí-lo e/ou modificá-lo sob os termos da Licença |
| 35 | 35 | * Pública Geral GNU conforme publicada pela Free Software Foundation; |
| 36 | - * | |
| 36 | + * | |
| 37 | 37 | * Este programa é distribuído na expectativa de que seja útil, porém, SEM NENHUMA GARANTIA; nem mesmo a |
| 38 | 38 | * garantia implícita de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. Consulte a Licença |
| 39 | 39 | * Pública Geral do GNU para mais detalhes. Você deve ter recebido uma cópia da Licença Pública Geral do |
| ... | ... | @@ -47,262 +47,262 @@ i3GEO.barraDeBotoes = |
| 47 | 47 | { |
| 48 | 48 | /** |
| 49 | 49 | * Variavel: BARRAS |
| 50 | - * | |
| 50 | + * | |
| 51 | 51 | * Array com os objetos YAHOO.i3GEO.janela.botoes criados |
| 52 | - * | |
| 52 | + * | |
| 53 | 53 | * Tipo: |
| 54 | - * | |
| 54 | + * | |
| 55 | 55 | * {array} |
| 56 | 56 | */ |
| 57 | 57 | BARRAS : [], |
| 58 | 58 | /** |
| 59 | 59 | * Variavel: BOTAOCLICADO |
| 60 | - * | |
| 60 | + * | |
| 61 | 61 | * Último icone que foi clicado |
| 62 | - * | |
| 62 | + * | |
| 63 | 63 | * Tipo: |
| 64 | - * | |
| 64 | + * | |
| 65 | 65 | * {String} |
| 66 | 66 | */ |
| 67 | 67 | BOTAOCLICADO : "", |
| 68 | 68 | /** |
| 69 | 69 | * Propriedade: ATIVA |
| 70 | - * | |
| 70 | + * | |
| 71 | 71 | * Indica se a barra de botões será ou não cosntruída automaticamente no processo de |
| 72 | 72 | * inicialização do mapa. |
| 73 | - * | |
| 73 | + * | |
| 74 | 74 | * Tipo: |
| 75 | - * | |
| 75 | + * | |
| 76 | 76 | * {boolean} |
| 77 | - * | |
| 77 | + * | |
| 78 | 78 | * Default: |
| 79 | - * | |
| 79 | + * | |
| 80 | 80 | * true |
| 81 | 81 | */ |
| 82 | 82 | ATIVA : true, |
| 83 | 83 | /** |
| 84 | 84 | * Propriedade: TIPO |
| 85 | - * | |
| 85 | + * | |
| 86 | 86 | * Tipo de barra. |
| 87 | - * | |
| 87 | + * | |
| 88 | 88 | * Por padrão, utiliza a biblioteca YUI para construir a barra, opcionalmente pode-se utilizar outro tipo. |
| 89 | - * | |
| 89 | + * | |
| 90 | 90 | * Se for utilizado o padrão YUI e os elementos para compor a barra não forem encontrados, a barra não |
| 91 | 91 | * será criada. |
| 92 | - * | |
| 92 | + * | |
| 93 | 93 | * O tipo emlinha insere os botões em um elemento html qualquer já existente na página. Nesse caso a barra |
| 94 | 94 | * não é iniciada automaticamente, sendo necessário usar a função |
| 95 | - * | |
| 95 | + * | |
| 96 | 96 | * i3GEO.barraDeBotoes.inicializaBarra("","",false,0,0,onde) |
| 97 | - * | |
| 97 | + * | |
| 98 | 98 | * Caso o parâmetro "onde" seja omitido ou o o elemento HTML com esse ID não for encontrado, será |
| 99 | 99 | * criado um elemento do tipo DIV no contexto do mapa. |
| 100 | - * | |
| 100 | + * | |
| 101 | 101 | * Se você quer usar a barra do tipo olho de peixe e seu mapa tiver tamanho fixo, utilize o tipo "olhodepeixe1" |
| 102 | - * | |
| 102 | + * | |
| 103 | 103 | * Tipo: |
| 104 | - * | |
| 104 | + * | |
| 105 | 105 | * {string} |
| 106 | - * | |
| 106 | + * | |
| 107 | 107 | * Default: |
| 108 | - * | |
| 108 | + * | |
| 109 | 109 | * {yui} |
| 110 | - * | |
| 110 | + * | |
| 111 | 111 | * Valores: |
| 112 | - * | |
| 112 | + * | |
| 113 | 113 | * {"yui","olhodepeixe","olhodepeixe1","emlinha"} |
| 114 | 114 | */ |
| 115 | 115 | TIPO : "yui", |
| 116 | 116 | /** |
| 117 | 117 | * Propriedade: OFFSET |
| 118 | - * | |
| 118 | + * | |
| 119 | 119 | * Ajuste do deslocamento vertical da barra (válido apenas para o tipo "olhodepeixe") |
| 120 | - * | |
| 120 | + * | |
| 121 | 121 | * Desloca a barra em uma determinada quantidade de pixels. Valores negativos fazem a barra subir. |
| 122 | - * | |
| 122 | + * | |
| 123 | 123 | * Tipo: |
| 124 | - * | |
| 124 | + * | |
| 125 | 125 | * {numeric} |
| 126 | - * | |
| 126 | + * | |
| 127 | 127 | * Default: |
| 128 | - * | |
| 128 | + * | |
| 129 | 129 | * {-205} |
| 130 | 130 | */ |
| 131 | 131 | OFFSET : -205, |
| 132 | 132 | /** |
| 133 | 133 | * Propriedade: POSICAO |
| 134 | - * | |
| 134 | + * | |
| 135 | 135 | * Define o posicionamento da barra de botões do tipo olhodepeixe |
| 136 | - * | |
| 136 | + * | |
| 137 | 137 | * Valores: |
| 138 | - * | |
| 138 | + * | |
| 139 | 139 | * {"top","bottom"} |
| 140 | - * | |
| 140 | + * | |
| 141 | 141 | * Tipo: |
| 142 | - * | |
| 142 | + * | |
| 143 | 143 | * {string} |
| 144 | - * | |
| 144 | + * | |
| 145 | 145 | * Default: |
| 146 | - * | |
| 146 | + * | |
| 147 | 147 | * {"bottom"} |
| 148 | 148 | */ |
| 149 | 149 | POSICAO : "bottom", |
| 150 | 150 | /** |
| 151 | 151 | * Propriedade: MAXBOTOES |
| 152 | - * | |
| 152 | + * | |
| 153 | 153 | * Número de botões iniciais (válido apenas para os tipos olho de peixe) |
| 154 | - * | |
| 154 | + * | |
| 155 | 155 | * Se for 0, todos os botões serão mostrados |
| 156 | - * | |
| 156 | + * | |
| 157 | 157 | * Tipo: |
| 158 | - * | |
| 158 | + * | |
| 159 | 159 | * {numeric} |
| 160 | - * | |
| 160 | + * | |
| 161 | 161 | * Default: |
| 162 | - * | |
| 162 | + * | |
| 163 | 163 | * {13} |
| 164 | 164 | */ |
| 165 | 165 | MAXBOTOES : 13, |
| 166 | 166 | /** |
| 167 | 167 | * Propriedade: AJUDA |
| 168 | - * | |
| 168 | + * | |
| 169 | 169 | * Mostra um texto de ajuda colado ao ícone da ferramenta |
| 170 | - * | |
| 170 | + * | |
| 171 | 171 | * Tipo: |
| 172 | - * | |
| 172 | + * | |
| 173 | 173 | * {boolean} |
| 174 | - * | |
| 174 | + * | |
| 175 | 175 | * Default: |
| 176 | - * | |
| 176 | + * | |
| 177 | 177 | * {true} |
| 178 | 178 | */ |
| 179 | 179 | AJUDA : true, |
| 180 | 180 | /** |
| 181 | 181 | * Propriedade: ORIENTACAO |
| 182 | - * | |
| 182 | + * | |
| 183 | 183 | * Orientação vertical ou horizontal da barra (não se aplica aos tipos olhos de peixe) |
| 184 | - * | |
| 184 | + * | |
| 185 | 185 | * Tipo: |
| 186 | - * | |
| 186 | + * | |
| 187 | 187 | * {string} |
| 188 | - * | |
| 188 | + * | |
| 189 | 189 | * Valores: |
| 190 | - * | |
| 190 | + * | |
| 191 | 191 | * {"horizontal","vertical"} |
| 192 | - * | |
| 192 | + * | |
| 193 | 193 | * Default: |
| 194 | - * | |
| 194 | + * | |
| 195 | 195 | * {"vertical"} |
| 196 | 196 | */ |
| 197 | 197 | ORIENTACAO : "vertical", |
| 198 | 198 | /** |
| 199 | 199 | * Propriedade: HORIZONTALW |
| 200 | - * | |
| 200 | + * | |
| 201 | 201 | * Largura da barra quando ORIENTACAO = "horizontal" (não se aplica aos tipos olhos de peixe) |
| 202 | - * | |
| 202 | + * | |
| 203 | 203 | * Tipo: |
| 204 | - * | |
| 204 | + * | |
| 205 | 205 | * {numeric} |
| 206 | - * | |
| 206 | + * | |
| 207 | 207 | * Default: |
| 208 | - * | |
| 208 | + * | |
| 209 | 209 | * {350} |
| 210 | 210 | */ |
| 211 | 211 | HORIZONTALW : 350, |
| 212 | 212 | /** |
| 213 | 213 | * Propriedade: TIPOAJUDA |
| 214 | - * | |
| 214 | + * | |
| 215 | 215 | * Tipo do balão de ajuda que é mostrado colado ao ícone da ferramenta |
| 216 | - * | |
| 216 | + * | |
| 217 | 217 | * Tipo: |
| 218 | - * | |
| 218 | + * | |
| 219 | 219 | * {string} |
| 220 | - * | |
| 220 | + * | |
| 221 | 221 | * Valores: |
| 222 | - * | |
| 222 | + * | |
| 223 | 223 | * {"horizontal","vertical","balao"} |
| 224 | - * | |
| 224 | + * | |
| 225 | 225 | * Default: |
| 226 | - * | |
| 226 | + * | |
| 227 | 227 | * {"horizontal"} |
| 228 | 228 | */ |
| 229 | 229 | TIPOAJUDA : "balao", |
| 230 | 230 | /** |
| 231 | 231 | * Propriedade: SOICONES |
| 232 | - * | |
| 232 | + * | |
| 233 | 233 | * Esconde as bordas das barras e o fundo, mostrando apenas os ícones (não se aplica aos tipos olhos de peixe) |
| 234 | - * | |
| 234 | + * | |
| 235 | 235 | * Default: |
| 236 | - * | |
| 236 | + * | |
| 237 | 237 | * {false} |
| 238 | - * | |
| 238 | + * | |
| 239 | 239 | * Tipo: |
| 240 | - * | |
| 240 | + * | |
| 241 | 241 | * {boolean} |
| 242 | 242 | */ |
| 243 | 243 | SOICONES : false, |
| 244 | 244 | /** |
| 245 | 245 | * Propriedade: AUTOALTURA |
| 246 | - * | |
| 246 | + * | |
| 247 | 247 | * Ajusta automaticamente a altura das barras conforme a altura do mapa. |
| 248 | - * | |
| 248 | + * | |
| 249 | 249 | * Esta opção não tem efeito se a barra contiver a barra de zoom (isso ocorre em função de um bug |
| 250 | 250 | * do YIU, que causa erro na barra nessas condições) |
| 251 | - * | |
| 251 | + * | |
| 252 | 252 | * Tipo: |
| 253 | - * | |
| 253 | + * | |
| 254 | 254 | * {boolean} |
| 255 | 255 | */ |
| 256 | 256 | AUTOALTURA : false, |
| 257 | 257 | /** |
| 258 | 258 | * Propriedade: TRANSICAOSUAVE |
| 259 | - * | |
| 259 | + * | |
| 260 | 260 | * Altera a transparência das barras quando o mouse sobrepõe a barra e quando sai da barra (não se aplica aos |
| 261 | 261 | * tipos olhos de peixe) |
| 262 | - * | |
| 262 | + * | |
| 263 | 263 | * Tipo: |
| 264 | - * | |
| 264 | + * | |
| 265 | 265 | * {boolean} |
| 266 | - * | |
| 266 | + * | |
| 267 | 267 | * Default: |
| 268 | - * | |
| 268 | + * | |
| 269 | 269 | * {true} |
| 270 | 270 | */ |
| 271 | 271 | TRANSICAOSUAVE : true, |
| 272 | 272 | /** |
| 273 | 273 | * Propriedade: OPACIDADE |
| 274 | - * | |
| 274 | + * | |
| 275 | 275 | * Valor da opacidade miníma utilizada quando TRANSICAOSUAVE for igual a true. (não se aplica aos tipos olhos de |
| 276 | 276 | * peixe) |
| 277 | - * | |
| 277 | + * | |
| 278 | 278 | * Varia de 0 a 100 |
| 279 | - * | |
| 279 | + * | |
| 280 | 280 | * Tipo: |
| 281 | - * | |
| 281 | + * | |
| 282 | 282 | * {numeric} |
| 283 | - * | |
| 283 | + * | |
| 284 | 284 | * Default: |
| 285 | - * | |
| 285 | + * | |
| 286 | 286 | * {65} |
| 287 | 287 | */ |
| 288 | 288 | OPACIDADE : 65, |
| 289 | 289 | /** |
| 290 | 290 | * Propriedade: PERMITEFECHAR |
| 291 | - * | |
| 291 | + * | |
| 292 | 292 | * Mostra o botão para fechar as barras ou não. |
| 293 | - * | |
| 293 | + * | |
| 294 | 294 | * Tipo: |
| 295 | - * | |
| 295 | + * | |
| 296 | 296 | * {boolean} |
| 297 | 297 | */ |
| 298 | 298 | PERMITEFECHAR : true, |
| 299 | 299 | /** |
| 300 | 300 | * Propriedade: PERMITEDESLOCAR |
| 301 | - * | |
| 301 | + * | |
| 302 | 302 | * Permite deslocar as barras ou não. |
| 303 | - * | |
| 303 | + * | |
| 304 | 304 | * Tipo: |
| 305 | - * | |
| 305 | + * | |
| 306 | 306 | * {boolean} |
| 307 | 307 | */ |
| 308 | 308 | PERMITEDESLOCAR : true, |
| ... | ... | @@ -312,118 +312,118 @@ i3GEO.barraDeBotoes = |
| 312 | 312 | ATIVAMENUCONTEXTO : false, |
| 313 | 313 | /** |
| 314 | 314 | * Propriedade: AUTO |
| 315 | - * | |
| 315 | + * | |
| 316 | 316 | * Cria as barras de botões automaticamente, utilizando os botões padrão sem considerar a lista de |
| 317 | 317 | * botões definidas no HTML da interface. |
| 318 | - * | |
| 318 | + * | |
| 319 | 319 | * A lista de botões é definida em i3GEO.configura |
| 320 | - * | |
| 320 | + * | |
| 321 | 321 | * Tipo: |
| 322 | - * | |
| 322 | + * | |
| 323 | 323 | * {Boolean} |
| 324 | - * | |
| 324 | + * | |
| 325 | 325 | * Default: |
| 326 | - * | |
| 326 | + * | |
| 327 | 327 | * {false} |
| 328 | 328 | */ |
| 329 | 329 | AUTO : false, |
| 330 | 330 | /** |
| 331 | 331 | * Propriedade: LISTABOTOES |
| 332 | - * | |
| 332 | + * | |
| 333 | 333 | * Objeto com a lista de botões e suas propriedades, como por exemplo, a função a ser executada ao se clicar no |
| 334 | 334 | * botão. |
| 335 | - * | |
| 335 | + * | |
| 336 | 336 | * Essa lista não indica quais os botões que serão inseridos. Para definir os botões que serão |
| 337 | 337 | * inseridos, inclua no HTML da interface os botões desejados (veja em i3geo/exemplos). Se vc utilizar a opção |
| 338 | 338 | * i3GEO.barraDeBotoes.AUTO = true , os botões serão inseridos automaticamente. Nesse caso, utilize a |
| 339 | 339 | * opção i3GEO.barraDeBotoes.INCLUIRBOTOES para indicar os botões desejados. |
| 340 | - * | |
| 340 | + * | |
| 341 | 341 | * Por default utiliza os botoes definidos em i3GEO.configura.funcoesBotoes.botoes |
| 342 | - * | |
| 342 | + * | |
| 343 | 343 | * Tipo: |
| 344 | - * | |
| 344 | + * | |
| 345 | 345 | * {objeto} |
| 346 | 346 | */ |
| 347 | 347 | LISTABOTOES : i3GEO.configura.funcoesBotoes.botoes, |
| 348 | 348 | /** |
| 349 | 349 | * Propriedade: INCLUIBOTAO |
| 350 | - * | |
| 350 | + * | |
| 351 | 351 | * Objeto que indica quais os botões que serão inseridos na barra de botões 2. |
| 352 | - * | |
| 352 | + * | |
| 353 | 353 | * Essa opção só funciona se i3GEO.barraDeBotoes.AUTO = true |
| 354 | - * | |
| 354 | + * | |
| 355 | 355 | * Vc pode também alterar a ordem dos botoes ou adicionar novos |
| 356 | - * | |
| 356 | + * | |
| 357 | 357 | * Na barra de botões do tipo "yui", as chaves serão adicionadas como o atributo "id" em cada botão. Nesse |
| 358 | 358 | * caso, é possível definir o estilo CSS para cada botão (veja em i3geo/css/botoes2.css). |
| 359 | - * | |
| 359 | + * | |
| 360 | 360 | * A ativação de cada botão, ou seja, a função que é executada ao ser feito o clique, |
| 361 | 361 | * é definida em i3GEO.configura.funcoesBotoes |
| 362 | - * | |
| 362 | + * | |
| 363 | 363 | * Default: |
| 364 | - * | |
| 364 | + * | |
| 365 | 365 | * INCLUIBOTAO: { |
| 366 | - * | |
| 366 | + * | |
| 367 | 367 | * abreJanelaLegenda: false, |
| 368 | - * | |
| 368 | + * | |
| 369 | 369 | * zoomli: false, |
| 370 | - * | |
| 370 | + * | |
| 371 | 371 | * zoomiauto: false, |
| 372 | - * | |
| 372 | + * | |
| 373 | 373 | * zoomoauto: false |
| 374 | - * | |
| 374 | + * | |
| 375 | 375 | * pan: false, |
| 376 | - * | |
| 376 | + * | |
| 377 | 377 | * zoomtot:false, |
| 378 | - * | |
| 378 | + * | |
| 379 | 379 | * identifica: true, |
| 380 | - * | |
| 380 | + * | |
| 381 | 381 | * identificaBalao: true, |
| 382 | - * | |
| 382 | + * | |
| 383 | 383 | * mede: true, |
| 384 | - * | |
| 384 | + * | |
| 385 | 385 | * area: true, |
| 386 | - * | |
| 386 | + * | |
| 387 | 387 | * imprimir: true, |
| 388 | - * | |
| 388 | + * | |
| 389 | 389 | * reinicia: true, |
| 390 | - * | |
| 390 | + * | |
| 391 | 391 | * exten: true, |
| 392 | - * | |
| 392 | + * | |
| 393 | 393 | * referencia: true, |
| 394 | - * | |
| 394 | + * | |
| 395 | 395 | * inserexy: true, |
| 396 | - * | |
| 396 | + * | |
| 397 | 397 | * textofid: true, |
| 398 | - * | |
| 398 | + * | |
| 399 | 399 | * selecao: true, |
| 400 | - * | |
| 400 | + * | |
| 401 | 401 | * barraedicao: false, |
| 402 | - * | |
| 402 | + * | |
| 403 | 403 | * google: true, |
| 404 | - * | |
| 404 | + * | |
| 405 | 405 | * buscafotos: true, |
| 406 | - * | |
| 406 | + * | |
| 407 | 407 | * wiki: true, |
| 408 | - * | |
| 408 | + * | |
| 409 | 409 | * metar: true, |
| 410 | - * | |
| 410 | + * | |
| 411 | 411 | * lentei: true, |
| 412 | - * | |
| 412 | + * | |
| 413 | 413 | * confluence: true, |
| 414 | - * | |
| 414 | + * | |
| 415 | 415 | * inseregrafico: true, |
| 416 | - * | |
| 416 | + * | |
| 417 | 417 | * v3d: true, |
| 418 | - * | |
| 418 | + * | |
| 419 | 419 | * localizar: true, |
| 420 | - * | |
| 420 | + * | |
| 421 | 421 | * zoomproximo: true, |
| 422 | - * | |
| 422 | + * | |
| 423 | 423 | * zoomanterior: true } |
| 424 | - * | |
| 424 | + * | |
| 425 | 425 | * Tipo: |
| 426 | - * | |
| 426 | + * | |
| 427 | 427 | * {objeto} |
| 428 | 428 | */ |
| 429 | 429 | INCLUIBOTAO : { |
| ... | ... | @@ -457,77 +457,77 @@ i3GEO.barraDeBotoes = |
| 457 | 457 | inseregrafico : true, |
| 458 | 458 | v3d : false |
| 459 | 459 | }, |
| 460 | - //TODO colocar os icones como propriedade das definicoes do botao | |
| 460 | + // TODO colocar os icones como propriedade das definicoes do botao | |
| 461 | 461 | /** |
| 462 | 462 | * Propriedade: ICONEBOTAO |
| 463 | - * | |
| 463 | + * | |
| 464 | 464 | * Ícones utilizados em cada um dos botões da barra. |
| 465 | - * | |
| 465 | + * | |
| 466 | 466 | * Esses ícones são utilizados apenas se i3GEO.barraDeBotoes.TIPO = "olhodepeixe" e "olhodepeixe1". Para cada elemento |
| 467 | 467 | * existente em i3GEO.barraDeBotoes.INCLUIBOTAO deve existir um elemento nesse objeto. A chave de cada elemento é a mesma do |
| 468 | 468 | * objeto INCLUIBOTAO. O endereço da imagem será complementado pelo i3geo, adicionando no início da string o |
| 469 | 469 | * valor da variável i3GEO.configura.locaplic |
| 470 | - * | |
| 470 | + * | |
| 471 | 471 | * Default: |
| 472 | - * | |
| 472 | + * | |
| 473 | 473 | * ICONEBOTAO: { |
| 474 | - * | |
| 474 | + * | |
| 475 | 475 | * zoomli: "/imagens/gisicons/eudock/zoom-region.png", |
| 476 | - * | |
| 476 | + * | |
| 477 | 477 | * zoomproximo: "/imagens/gisicons/eudock/zoom-next.png", |
| 478 | - * | |
| 478 | + * | |
| 479 | 479 | * zoomanterior: "/imagens/gisicons/eudock/zoom-last.png", |
| 480 | - * | |
| 480 | + * | |
| 481 | 481 | * pan: "/imagens/gisicons/eudock/pan.png", |
| 482 | - * | |
| 482 | + * | |
| 483 | 483 | * zoomtot: "/imagens/gisicons/eudock/zoom-extent.png", |
| 484 | - * | |
| 484 | + * | |
| 485 | 485 | * identifica: "/imagens/gisicons/eudock/identify.png", |
| 486 | - * | |
| 486 | + * | |
| 487 | 487 | * identificaBalao: "/imagens/gisicons/eudock/tips.png", |
| 488 | - * | |
| 488 | + * | |
| 489 | 489 | * mede: "/imagens/gisicons/eudock/length-measure.png", |
| 490 | - * | |
| 490 | + * | |
| 491 | 491 | * area: "/imagens/gisicons/eudock/area-measure.png", |
| 492 | - * | |
| 492 | + * | |
| 493 | 493 | * imprimir: "/imagens/gisicons/eudock/print.png", |
| 494 | - * | |
| 494 | + * | |
| 495 | 495 | * reinicia: "/imagens/gisicons/eudock/redraw.png", |
| 496 | - * | |
| 496 | + * | |
| 497 | 497 | * exten: "/imagens/gisicons/eudock/map-extent-info.png", |
| 498 | - * | |
| 498 | + * | |
| 499 | 499 | * referencia: "/imagens/gisicons/eudock/map-reference.png", |
| 500 | - * | |
| 500 | + * | |
| 501 | 501 | * inserexy: "/imagens/gisicons/eudock/point-create.png", |
| 502 | - * | |
| 502 | + * | |
| 503 | 503 | * textofid: "/imagens/gisicons/eudock/text-add.png", |
| 504 | - * | |
| 504 | + * | |
| 505 | 505 | * selecao: "/imagens/gisicons/eudock/select.png", |
| 506 | - * | |
| 506 | + * | |
| 507 | 507 | * google: "/imagens/gisicons/eudock/google-map.png", |
| 508 | - * | |
| 508 | + * | |
| 509 | 509 | * buscafotos: "/imagens/gisicons/eudock/fotos.png", |
| 510 | - * | |
| 510 | + * | |
| 511 | 511 | * wiki: "/imagens/gisicons/eudock/wiki.png", |
| 512 | - * | |
| 512 | + * | |
| 513 | 513 | * metar: "/imagens/gisicons/eudock/metar.png", |
| 514 | - * | |
| 514 | + * | |
| 515 | 515 | * lentei: "/imagens/gisicons/eudock/lente.png", |
| 516 | - * | |
| 516 | + * | |
| 517 | 517 | * confluence: "/imagens/gisicons/eudock/confluence.png", |
| 518 | - * | |
| 518 | + * | |
| 519 | 519 | * inseregrafico: "/imagens/gisicons/eudock/grafico.png", |
| 520 | - * | |
| 520 | + * | |
| 521 | 521 | * v3d: "/imagens/gisicons/eudock/v3d.png", |
| 522 | - * | |
| 522 | + * | |
| 523 | 523 | * barraedicao: "/imagens/gisicons/eudock/editopen.png", |
| 524 | - * | |
| 524 | + * | |
| 525 | 525 | * localizar: "/imagens/gisicons/eudock/search.png", |
| 526 | - * | |
| 526 | + * | |
| 527 | 527 | * abreJanelaLegenda: "/imagens/gisicons/eudock/legenda.png" } |
| 528 | - * | |
| 528 | + * | |
| 529 | 529 | * Type: |
| 530 | - * | |
| 530 | + * | |
| 531 | 531 | * {objeto} |
| 532 | 532 | */ |
| 533 | 533 | ICONEBOTAO : { |
| ... | ... | @@ -563,64 +563,64 @@ i3GEO.barraDeBotoes = |
| 563 | 563 | }, |
| 564 | 564 | /** |
| 565 | 565 | * Propriedade: TEMPLATEBOTAO |
| 566 | - * | |
| 566 | + * | |
| 567 | 567 | * Template HTML que será utilizado na construção automática dos botões da barra 2. |
| 568 | - * | |
| 568 | + * | |
| 569 | 569 | * Utilize a string $$ para indicar onde será incluído o código do botão. |
| 570 | - * | |
| 570 | + * | |
| 571 | 571 | * Default: "<div style='display:inline;background-color:rgb(250,250,250);'> |
| 572 | 572 | * <p style='font-size:2px;'> |
| 573 | 573 | * |
| 574 | 574 | * </p> |
| 575 | 575 | * <img src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='$$'/></div>" |
| 576 | - * | |
| 576 | + * | |
| 577 | 577 | * Tipo: |
| 578 | - * | |
| 578 | + * | |
| 579 | 579 | * {string} |
| 580 | 580 | */ |
| 581 | 581 | TEMPLATEBOTAO : "", |
| 582 | 582 | /** |
| 583 | 583 | * Propriedade: BOTAOPADRAO |
| 584 | - * | |
| 584 | + * | |
| 585 | 585 | * Botão que será ativado ao inicializar os botões com ativaBotoes. |
| 586 | - * | |
| 586 | + * | |
| 587 | 587 | * Correpsonde ao item iddiv de LISTABOTOES |
| 588 | - * | |
| 588 | + * | |
| 589 | 589 | * Tipo: |
| 590 | - * | |
| 590 | + * | |
| 591 | 591 | * {String} |
| 592 | 592 | */ |
| 593 | 593 | BOTAOPADRAO : "pan", |
| 594 | 594 | /** |
| 595 | 595 | * Propriedade: COMPORTAMENTO |
| 596 | - * | |
| 596 | + * | |
| 597 | 597 | * Define o comportamento dos botões quando é pressionado |
| 598 | - * | |
| 598 | + * | |
| 599 | 599 | * Tipo: |
| 600 | - * | |
| 600 | + * | |
| 601 | 601 | * {String} |
| 602 | - * | |
| 602 | + * | |
| 603 | 603 | * Valores: |
| 604 | - * | |
| 604 | + * | |
| 605 | 605 | * "padrao" - comportamento padrão, com bordas da esquerda e inferiores ativadas |
| 606 | - * | |
| 606 | + * | |
| 607 | 607 | * "destacado" - destaca apenas o botão atualmente pressionado |
| 608 | - * | |
| 608 | + * | |
| 609 | 609 | * "vermelho" - destaca com fundo vermelho |
| 610 | - * | |
| 610 | + * | |
| 611 | 611 | * "laranja" - destaca com fundo laranja |
| 612 | - * | |
| 612 | + * | |
| 613 | 613 | * "cinza" - destaca com fundo cinza |
| 614 | - * | |
| 614 | + * | |
| 615 | 615 | */ |
| 616 | 616 | COMPORTAMENTO : "padrao", |
| 617 | 617 | /** |
| 618 | 618 | * Function: adicionaBotao |
| 619 | - * | |
| 619 | + * | |
| 620 | 620 | * Adiciona um novo botao nas definicoes da barra de botoes |
| 621 | - * | |
| 621 | + * | |
| 622 | 622 | * O Objeto deve ser como no exemplo abaixo |
| 623 | - * | |
| 623 | + * | |
| 624 | 624 | * i3GEO.barraDeBotoes.adicionaBotao( { iddiv:"meubotao", tipo:"", dica:"Meu Botão", titulo: "Meu Botão", icone: |
| 625 | 625 | * "/imagens/oxygen/22x22/user-online.png", funcaoonclick:function(){ alert("Meu novo botao com ID = meubotao"); } } ); |
| 626 | 626 | */ |
| ... | ... | @@ -631,9 +631,9 @@ i3GEO.barraDeBotoes = |
| 631 | 631 | }, |
| 632 | 632 | /** |
| 633 | 633 | * Function: ativaPadrao |
| 634 | - * | |
| 634 | + * | |
| 635 | 635 | * Ativa o botão definido como padrão, executando a função definida em onclick |
| 636 | - * | |
| 636 | + * | |
| 637 | 637 | * Utilizado para restaurar o status padrão da barra, principalmente por ferramentas que alteram ícones e outras |
| 638 | 638 | * propriedades do mapa |
| 639 | 639 | */ |
| ... | ... | @@ -650,14 +650,14 @@ i3GEO.barraDeBotoes = |
| 650 | 650 | }, |
| 651 | 651 | /** |
| 652 | 652 | * Function: ativaIcone |
| 653 | - * | |
| 653 | + * | |
| 654 | 654 | * Altera as bordas de um ícone aplicando um efeito de ícone realçado. |
| 655 | - * | |
| 655 | + * | |
| 656 | 656 | * Todos os demais ícones definidos em LISTABOTOES e que tiverem o tipo = "dinamico" serão processados para alterar as |
| 657 | 657 | * bordas dando o efeito de não ativo. |
| 658 | - * | |
| 658 | + * | |
| 659 | 659 | * Parametro: |
| 660 | - * | |
| 660 | + * | |
| 661 | 661 | * {String} - id do icone que será ativado. Esse id é o mesmo definido em LISTABOTOES |
| 662 | 662 | */ |
| 663 | 663 | ativaIcone : function(icone) { |
| ... | ... | @@ -718,9 +718,7 @@ i3GEO.barraDeBotoes = |
| 718 | 718 | } |
| 719 | 719 | } |
| 720 | 720 | if (i3GEO.util.in_array(i3GEO.barraDeBotoes.COMPORTAMENTO, [ |
| 721 | - "laranja", | |
| 722 | - "vermelho", | |
| 723 | - "cinza" | |
| 721 | + "laranja", "vermelho", "cinza" | |
| 724 | 722 | ])) { |
| 725 | 723 | if (ko >= 0) { |
| 726 | 724 | do { |
| ... | ... | @@ -770,13 +768,13 @@ i3GEO.barraDeBotoes = |
| 770 | 768 | }, |
| 771 | 769 | /** |
| 772 | 770 | * Function: ativaBotoes |
| 773 | - * | |
| 771 | + * | |
| 774 | 772 | * Ativa os botoes definidos em LISTABOTOES |
| 775 | - * | |
| 773 | + * | |
| 776 | 774 | * Os botoes são construídos e as funções definidas são embutidas no evento onclick |
| 777 | - * | |
| 775 | + * | |
| 778 | 776 | * Parametro: |
| 779 | - * | |
| 777 | + * | |
| 780 | 778 | * {String} - botao que será mostrado como ativo (opcional). Se não for definido, será utilizado o botão |
| 781 | 779 | * especificado em BOTAOPADRAO. O nome do botao deve estar em LISTABOTOES na propriedade iddiv |
| 782 | 780 | */ |
| ... | ... | @@ -784,7 +782,7 @@ i3GEO.barraDeBotoes = |
| 784 | 782 | if (typeof (console) !== 'undefined') |
| 785 | 783 | console.info("i3GEO.barraDeBotoes.ativaBotoes()"); |
| 786 | 784 | |
| 787 | - var l, b, temp; | |
| 785 | + var atrib, l, b, temp; | |
| 788 | 786 | if (arguments.length === 0) { |
| 789 | 787 | padrao = this.BOTAOPADRAO; |
| 790 | 788 | } |
| ... | ... | @@ -794,13 +792,19 @@ i3GEO.barraDeBotoes = |
| 794 | 792 | if (b >= 0) { |
| 795 | 793 | do { |
| 796 | 794 | temp = $i(l[b].iddiv); |
| 795 | + atrib = document.createAttribute("indxBotao"); | |
| 796 | + atrib.value = b; | |
| 797 | 797 | if (temp) { |
| 798 | + temp.setAttributeNode(atrib); | |
| 798 | 799 | if (l[b].conteudo) { |
| 799 | 800 | temp.innerHTML = l[b].conteudo; |
| 800 | 801 | } |
| 801 | 802 | if (l[b] && l[b].dica && i3GEO.barraDeBotoes.TIPO != "emlinha") { |
| 802 | 803 | $i(l[b].iddiv).onmouseover = function(e) { |
| 803 | - i3GEO.barraDeBotoes.mostraJanela(this, l[b].dica, e); | |
| 804 | + var i = this.attributes["indxBotao"].value, l = i3GEO.barraDeBotoes.LISTABOTOES; | |
| 805 | + if (l && l[i] && l[i].dica) { | |
| 806 | + i3GEO.barraDeBotoes.mostraJanela(this, l[i].dica, e); | |
| 807 | + } | |
| 804 | 808 | }; |
| 805 | 809 | $i(l[b].iddiv).onmouseout = function(e) { |
| 806 | 810 | i3GEO.barraDeBotoes.mostraJanela(this, "", e); |
| ... | ... | @@ -818,6 +822,7 @@ i3GEO.barraDeBotoes = |
| 818 | 822 | l[b].funcaoonclick(); |
| 819 | 823 | } |
| 820 | 824 | } |
| 825 | + // TODO remover eval | |
| 821 | 826 | if (l[b] && l[b].constroiconteudo) { |
| 822 | 827 | eval(l[b].constroiconteudo); |
| 823 | 828 | } |
| ... | ... | @@ -833,16 +838,16 @@ i3GEO.barraDeBotoes = |
| 833 | 838 | }, |
| 834 | 839 | /** |
| 835 | 840 | * Function: execBotao |
| 836 | - * | |
| 841 | + * | |
| 837 | 842 | * Com base no código de um botão (iddiv), obtém a função armazenada em |
| 838 | 843 | * i3GEO.barraDeBotoes.LISTABOTOES e executa. |
| 839 | - * | |
| 844 | + * | |
| 840 | 845 | * Parametros: |
| 841 | - * | |
| 846 | + * | |
| 842 | 847 | * {string} - identificador do botão, conforme definido no elemento iddiv de i3GEO.barraDeBotoes.LISTABOTOES |
| 843 | - * | |
| 848 | + * | |
| 844 | 849 | * {numeric} - (opcional) posição em pixels da tela onde foi feito o clique do mouse |
| 845 | - * | |
| 850 | + * | |
| 846 | 851 | * {numeric} - (opcional) posição em pixels da tela onde foi feito o clique do mouse |
| 847 | 852 | */ |
| 848 | 853 | execBotao : function(id, x, y, posX, posY) { |
| ... | ... | @@ -856,16 +861,10 @@ i3GEO.barraDeBotoes = |
| 856 | 861 | } |
| 857 | 862 | try { |
| 858 | 863 | /* |
| 859 | - if (x) { | |
| 860 | - i3GEO.util.criaPin("i3geoMarcaIcone", i3GEO.configura.locaplic + "/imagens/dot1cinza.gif", "38px", "4px"); | |
| 861 | - temp = $i("i3geoMarcaIcone"); | |
| 862 | - if (temp) { | |
| 863 | - temp.style.display = "block"; | |
| 864 | - temp.style.top = posY + 28 + "px"; | |
| 865 | - temp.style.left = posX + "px"; | |
| 866 | - } | |
| 867 | - } | |
| 868 | - */ | |
| 864 | + * if (x) { i3GEO.util.criaPin("i3geoMarcaIcone", i3GEO.configura.locaplic + "/imagens/dot1cinza.gif", "38px", "4px"); temp = | |
| 865 | + * $i("i3geoMarcaIcone"); if (temp) { temp.style.display = "block"; temp.style.top = posY + 28 + "px"; temp.style.left = | |
| 866 | + * posX + "px"; } } | |
| 867 | + */ | |
| 869 | 868 | if (botao.funcaoonclick) { |
| 870 | 869 | botao.funcaoonclick.call(); |
| 871 | 870 | } |
| ... | ... | @@ -876,11 +875,11 @@ i3GEO.barraDeBotoes = |
| 876 | 875 | }, |
| 877 | 876 | /** |
| 878 | 877 | * Function: defBotao |
| 879 | - * | |
| 878 | + * | |
| 880 | 879 | * Obtém as definições de um botão conforme o seu código (iddiv) |
| 881 | - * | |
| 880 | + * | |
| 882 | 881 | * Retorno: |
| 883 | - * | |
| 882 | + * | |
| 884 | 883 | * {objeto} - ver i3GEO.barraDeBotoes.LISTABOTOES |
| 885 | 884 | */ |
| 886 | 885 | defBotao : function(iddiv) { |
| ... | ... | @@ -897,34 +896,18 @@ i3GEO.barraDeBotoes = |
| 897 | 896 | }, |
| 898 | 897 | /** |
| 899 | 898 | * Function: inicializaBarraOP |
| 900 | - * | |
| 899 | + * | |
| 901 | 900 | * Inicializa a barra de botões quando for do tipo "olhodepeixe" ou "olhodepeixe1" |
| 902 | - * | |
| 901 | + * | |
| 903 | 902 | * O objeto euEnv armazena todas as características da barra |
| 904 | - * | |
| 903 | + * | |
| 905 | 904 | * "olhodepeixe1" substitui a antiga "olhodepeixe" e nao precisa de ajustes de posicionamento |
| 906 | - * | |
| 905 | + * | |
| 907 | 906 | */ |
| 908 | 907 | inicializaBarraOP : function(onde) { |
| 909 | 908 | if (i3GEO.barraDeBotoes.ATIVA === false || !$i(i3GEO.Interface.IDCORPO)) { |
| 910 | 909 | return; |
| 911 | 910 | } |
| 912 | - // isso veio do js do eudock | |
| 913 | - /* | |
| 914 | - if (document.onmousemove) | |
| 915 | - euEnv.onmousemoveBK = document.onmousemove; | |
| 916 | - | |
| 917 | - document.onmousemove = on_MouseMove; | |
| 918 | - | |
| 919 | - if (document.onmousedown) | |
| 920 | - euEnv.onmousedownBK = document.onmousedown; | |
| 921 | - document.onmousedown = on_MouseDown; | |
| 922 | - | |
| 923 | - if (document.onmouseup) | |
| 924 | - euEnv.onmouseupBK = document.onmouseup; | |
| 925 | - document.onmouseup = on_MouseUp; | |
| 926 | - */ | |
| 927 | - | |
| 928 | 911 | if (document.onclick) |
| 929 | 912 | euEnv.onclickBK = document.onclick; |
| 930 | 913 | |
| ... | ... | @@ -971,7 +954,7 @@ i3GEO.barraDeBotoes = |
| 971 | 954 | } |
| 972 | 955 | } |
| 973 | 956 | }); |
| 974 | - i3GEO.barraDeBotoes.AJUDA = false; | |
| 957 | + //i3GEO.barraDeBotoes.AJUDA = false; | |
| 975 | 958 | dock.setIconsOffset(7); |
| 976 | 959 | if (i3GEO.barraDeBotoes.MAXBOTOES > 0) { |
| 977 | 960 | n = i3GEO.barraDeBotoes.MAXBOTOES; |
| ... | ... | @@ -979,7 +962,7 @@ i3GEO.barraDeBotoes = |
| 979 | 962 | for (i = 0; i < n; i += 1) { |
| 980 | 963 | if (i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]] && i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]] === true) { |
| 981 | 964 | botao = i3GEO.barraDeBotoes.defBotao(chaves[i]); |
| 982 | - if (botao === false) { | |
| 965 | + if (botao === false || i3GEO.barraDeBotoes.AJUDA === false) { | |
| 983 | 966 | dica = ""; |
| 984 | 967 | titulo = ""; |
| 985 | 968 | } else { |
| ... | ... | @@ -988,18 +971,18 @@ i3GEO.barraDeBotoes = |
| 988 | 971 | } else { |
| 989 | 972 | dica = ""; |
| 990 | 973 | } |
| 991 | - if (botao.titulo != undefined) { | |
| 974 | + if (botao.titulo != undefined && i3GEO.barraDeBotoes.AJUDA === true) { | |
| 992 | 975 | titulo = botao.titulo; |
| 993 | 976 | } else { |
| 994 | 977 | titulo = ""; |
| 995 | 978 | } |
| 996 | 979 | } |
| 997 | - dock.addIcon( | |
| 998 | - new Array({ | |
| 999 | - euImage : { | |
| 1000 | - image : i3GEO.configura.locaplic + i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]] | |
| 1001 | - } | |
| 1002 | - }), { | |
| 980 | + dock.addIcon(new Array({ | |
| 981 | + euImage : { | |
| 982 | + image : i3GEO.configura.locaplic + i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]], | |
| 983 | + titulo : titulo | |
| 984 | + } | |
| 985 | + }), { | |
| 1003 | 986 | mouseInsideClick : function(x, y, id, posX, posY) { |
| 1004 | 987 | i3GEO.util.animaClique($i(euEnv.euDockArray[id].elementsArray[0].id)); |
| 1005 | 988 | i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao, x, y, posX, posY); |
| ... | ... | @@ -1011,25 +994,20 @@ i3GEO.barraDeBotoes = |
| 1011 | 994 | } |
| 1012 | 995 | } |
| 1013 | 996 | $i(euEnv.euDockArray.euDock_0.bar.elementsArray.left.id).onclick = function() { |
| 1014 | - //i3GEO.ajuda.ATIVAJANELA = true; | |
| 1015 | - //i3GEO.ajuda.abreJanela(); | |
| 997 | + // i3GEO.ajuda.ATIVAJANELA = true; | |
| 998 | + // i3GEO.ajuda.abreJanela(); | |
| 1016 | 999 | i3GEO.barraDeBotoes.ajudaEmLista(); |
| 1017 | 1000 | }; |
| 1018 | 1001 | /* |
| 1019 | - $i("euDock_0").onmouseout = function(){ | |
| 1020 | - var temp = $i("i3geoMarcaIcone"); | |
| 1021 | - if(temp){ | |
| 1022 | - temp.style.display = "none"; | |
| 1023 | - } | |
| 1024 | - }; | |
| 1025 | - */ | |
| 1002 | + * $i("euDock_0").onmouseout = function(){ var temp = $i("i3geoMarcaIcone"); if(temp){ temp.style.display = "none"; } }; | |
| 1003 | + */ | |
| 1026 | 1004 | $i(euEnv.euDockArray.euDock_0.bar.elementsArray.right.id).onclick = |
| 1027 | 1005 | function() { |
| 1028 | 1006 | var dica, titulo, chaves = i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO), n = chaves.length, nb = |
| 1029 | 1007 | euEnv.euDockArray.euDock_0.iconsArray.length, i; |
| 1030 | - //if ($i("i3geoMarcaIcone")) { | |
| 1031 | - // $i("i3geoMarcaIcone").style.display = "none"; | |
| 1032 | - //} | |
| 1008 | + // if ($i("i3geoMarcaIcone")) { | |
| 1009 | + // $i("i3geoMarcaIcone").style.display = "none"; | |
| 1010 | + // } | |
| 1033 | 1011 | // a barra já foi expandida |
| 1034 | 1012 | if (nb !== i3GEO.barraDeBotoes.MAXBOTOES) { |
| 1035 | 1013 | i3GEO.barraDeBotoes.recria(); |
| ... | ... | @@ -1055,7 +1033,8 @@ i3GEO.barraDeBotoes = |
| 1055 | 1033 | } |
| 1056 | 1034 | dock.addIcon(new Array({ |
| 1057 | 1035 | euImage : { |
| 1058 | - image : i3GEO.configura.locaplic + i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]] | |
| 1036 | + image : i3GEO.configura.locaplic + i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]], | |
| 1037 | + titulo : titulo | |
| 1059 | 1038 | } |
| 1060 | 1039 | }), { |
| 1061 | 1040 | mouseInsideClick : function(x, y, id, posX) { |
| ... | ... | @@ -1072,39 +1051,39 @@ i3GEO.barraDeBotoes = |
| 1072 | 1051 | }, |
| 1073 | 1052 | /** |
| 1074 | 1053 | * Function: inicializaBarra |
| 1075 | - * | |
| 1054 | + * | |
| 1076 | 1055 | * Inicializa a barra de botões |
| 1077 | - * | |
| 1056 | + * | |
| 1078 | 1057 | * A barra de zoom é inserida automaticamente na barra de botoes 1 se esta existir |
| 1079 | - * | |
| 1058 | + * | |
| 1080 | 1059 | * Caso i3GEO.barraDeBotoes.TIPO === "olhodepeixe" os parâmetros são ignorados. |
| 1081 | - * | |
| 1060 | + * | |
| 1082 | 1061 | * Exemplo: |
| 1083 | - * | |
| 1062 | + * | |
| 1084 | 1063 | * if ($i("barraDeBotoes1")) |
| 1085 | - * | |
| 1064 | + * | |
| 1086 | 1065 | * i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes1","i3geo_barra1",true,x1,y1); |
| 1087 | - * | |
| 1066 | + * | |
| 1088 | 1067 | * if ($i("barraDeBotoes2")) |
| 1089 | - * | |
| 1068 | + * | |
| 1090 | 1069 | * i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","i3geo_barra2",false,x2,y2); |
| 1091 | - * | |
| 1070 | + * | |
| 1092 | 1071 | * Os objetos criados são armazenados no array BARRAS, dessa forma, para acessar uma barra utilize por exemplo: |
| 1093 | - * | |
| 1072 | + * | |
| 1094 | 1073 | * i3GEO.barraDeBotoes.BARRAS[1].show(); |
| 1095 | - * | |
| 1074 | + * | |
| 1096 | 1075 | * Parametros: |
| 1097 | - * | |
| 1076 | + * | |
| 1098 | 1077 | * {String} - id do elemento existente no HTML e que contém as definições dos botões |
| 1099 | - * | |
| 1078 | + * | |
| 1100 | 1079 | * {String} - id do elemento que será criado para adicionar os botoões |
| 1101 | - * | |
| 1080 | + * | |
| 1102 | 1081 | * {boolean} - indica se a barra de zoom será incluída |
| 1103 | - * | |
| 1082 | + * | |
| 1104 | 1083 | * {Numeric} - posição x (pixels) da barra em relação ao mapa |
| 1105 | - * | |
| 1084 | + * | |
| 1106 | 1085 | * {Numeric} - posição y (pixels) da barra em relação ao mapa |
| 1107 | - * | |
| 1086 | + * | |
| 1108 | 1087 | * {String} - (opcional) id do elemento HTML onde os botões serão inseridos |
| 1109 | 1088 | */ |
| 1110 | 1089 | inicializaBarra : function(idconteudo, idconteudonovo, barraZoom, x, y, onde) { |
| ... | ... | @@ -1125,13 +1104,13 @@ i3GEO.barraDeBotoes = |
| 1125 | 1104 | } else { |
| 1126 | 1105 | if (this.TEMPLATEBOTAO === "" && i3GEO.Interface.TABLET === false) { |
| 1127 | 1106 | this.TEMPLATEBOTAO = |
| 1128 | - "<div style='display:inline;background-color:rgb(250,250,250);'><img style='border:0px solid white;' src='" | |
| 1129 | - + i3GEO.configura.locaplic + "/imagens/branco.gif' id='$$'/></div>"; | |
| 1107 | + "<div style='display:inline;background-color:rgb(250,250,250);'><img style='border:0px solid white;' src='" + i3GEO.configura.locaplic | |
| 1108 | + + "/imagens/branco.gif' id='$$'/></div>"; | |
| 1130 | 1109 | } |
| 1131 | 1110 | if (this.TEMPLATEBOTAO === "" && i3GEO.Interface.TABLET === true) { |
| 1132 | 1111 | this.TEMPLATEBOTAO = |
| 1133 | - "<div style='display:inline;background-color:rgb(250,250,250);'><img style='margin:4px;border:0px solid white;' src='" | |
| 1134 | - + i3GEO.configura.locaplic + "/imagens/branco.gif' id='$$'/></div>"; | |
| 1112 | + "<div style='display:inline;background-color:rgb(250,250,250);'><img style='margin:4px;border:0px solid white;' src='" + i3GEO.configura.locaplic | |
| 1113 | + + "/imagens/branco.gif' id='$$'/></div>"; | |
| 1135 | 1114 | } |
| 1136 | 1115 | |
| 1137 | 1116 | if (navm) { |
| ... | ... | @@ -1144,8 +1123,14 @@ i3GEO.barraDeBotoes = |
| 1144 | 1123 | for (i = 0; i < n; i += 1) { |
| 1145 | 1124 | if (i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]] === true) { |
| 1146 | 1125 | temp += |
| 1147 | - "<img id='" + chaves[i] + "_iconeId' onclick='i3GEO.util.animaClique(this);i3GEO.barraDeBotoes.execBotao(\"" + chaves[i] + "\")' src='" | |
| 1148 | - + i3GEO.configura.locaplic + "/" + i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]] + "' />"; | |
| 1126 | + "<img id='" + chaves[i] | |
| 1127 | + + "_iconeId' onclick='i3GEO.util.animaClique(this);i3GEO.barraDeBotoes.execBotao(\"" | |
| 1128 | + + chaves[i] | |
| 1129 | + + "\")' src='" | |
| 1130 | + + i3GEO.configura.locaplic | |
| 1131 | + + "/" | |
| 1132 | + + i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]] | |
| 1133 | + + "' />"; | |
| 1149 | 1134 | } |
| 1150 | 1135 | } |
| 1151 | 1136 | // |
| ... | ... | @@ -1175,8 +1160,7 @@ i3GEO.barraDeBotoes = |
| 1175 | 1160 | novoel = document.createElement("div"); |
| 1176 | 1161 | novoel.id = "barraDeBotoes1"; |
| 1177 | 1162 | temp = |
| 1178 | - '<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>' | |
| 1179 | - + "<div style='display:inline;background-color:rgb(250,250,250);'>" | |
| 1163 | + '<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);'>" | |
| 1180 | 1164 | + '<img title="zoom" alt="zoom" src="' |
| 1181 | 1165 | + branco |
| 1182 | 1166 | + '" id="zoomli"/>' |
| ... | ... | @@ -1187,7 +1171,10 @@ i3GEO.barraDeBotoes = |
| 1187 | 1171 | + '" id="pan"/>' |
| 1188 | 1172 | + "</div>" |
| 1189 | 1173 | + "<div style='display:inline;background-color:rgb(250,250,250);'>" |
| 1190 | - + '<img title="geral" alt="geral" src="' + branco + '" id="zoomtot"/>' + "</div>"; | |
| 1174 | + + '<img title="geral" alt="geral" src="' | |
| 1175 | + + branco | |
| 1176 | + + '" id="zoomtot"/>' | |
| 1177 | + + "</div>"; | |
| 1191 | 1178 | novoel.innerHTML = temp; |
| 1192 | 1179 | document.body.appendChild(novoel); |
| 1193 | 1180 | } |
| ... | ... | @@ -1205,14 +1192,14 @@ i3GEO.barraDeBotoes = |
| 1205 | 1192 | novoel = document.createElement("div"); |
| 1206 | 1193 | novoel.id = "barraDeBotoes2"; |
| 1207 | 1194 | novoel.innerHTML = |
| 1208 | - "<table style='width:100%'>" | |
| 1209 | - + "<tr><td style='background-color:rgb(250,250,250);'><img title='' alt='sobe' src='" | |
| 1195 | + "<table style='width:100%'>" + "<tr><td style='background-color:rgb(250,250,250);'><img title='' alt='sobe' src='" | |
| 1210 | 1196 | + branco |
| 1211 | 1197 | + "' id='sobeferramentas'/></td></tr>" |
| 1212 | 1198 | + "</table>" |
| 1213 | 1199 | + temp |
| 1214 | 1200 | + "<table style='width:100%;'><tr><td style='background-color:rgb(250,250,250);'><img title='desce' alt='' src='" |
| 1215 | - + branco + "' id='desceferramentas'/></td></tr></table>"; | |
| 1201 | + + branco | |
| 1202 | + + "' id='desceferramentas'/></td></tr></table>"; | |
| 1216 | 1203 | document.body.appendChild(novoel); |
| 1217 | 1204 | } else { |
| 1218 | 1205 | $i(onde).innerHTML = temp; |
| ... | ... | @@ -1250,19 +1237,19 @@ i3GEO.barraDeBotoes = |
| 1250 | 1237 | if (i3GEO.barraDeBotoes.TRANSICAOSUAVE) { |
| 1251 | 1238 | YAHOO.util.Dom.setStyle(novoel, "opacity", 1); |
| 1252 | 1239 | } |
| 1253 | - //if (i3GEO.Interface.TABLET === true) { | |
| 1254 | - // i3GEO.barraDeBotoes.BARRAS[0].cfg.setProperty("height", ""); | |
| 1255 | - // $i(i3GEO.barraDeBotoes.BARRAS[0].id+"_").style.top = "0px"; | |
| 1256 | - //} | |
| 1240 | + // if (i3GEO.Interface.TABLET === true) { | |
| 1241 | + // i3GEO.barraDeBotoes.BARRAS[0].cfg.setProperty("height", ""); | |
| 1242 | + // $i(i3GEO.barraDeBotoes.BARRAS[0].id+"_").style.top = "0px"; | |
| 1243 | + // } | |
| 1257 | 1244 | }; |
| 1258 | 1245 | novoel.onmouseout = function() { |
| 1259 | 1246 | if (i3GEO.barraDeBotoes.TRANSICAOSUAVE) { |
| 1260 | 1247 | YAHOO.util.Dom.setStyle(novoel, "opacity", i3GEO.barraDeBotoes.OPACIDADE / 100); |
| 1261 | 1248 | } |
| 1262 | - //if (i3GEO.Interface.TABLET === true) { | |
| 1263 | - // i3GEO.barraDeBotoes.BARRAS[0].cfg.setProperty("height", "10px"); | |
| 1264 | - // $i(i3GEO.barraDeBotoes.BARRAS[0].id+"_").style.top = "-200px"; | |
| 1265 | - //} | |
| 1249 | + // if (i3GEO.Interface.TABLET === true) { | |
| 1250 | + // i3GEO.barraDeBotoes.BARRAS[0].cfg.setProperty("height", "10px"); | |
| 1251 | + // $i(i3GEO.barraDeBotoes.BARRAS[0].id+"_").style.top = "-200px"; | |
| 1252 | + // } | |
| 1266 | 1253 | }; |
| 1267 | 1254 | document.body.appendChild(novoel); |
| 1268 | 1255 | } |
| ... | ... | @@ -1308,8 +1295,7 @@ i3GEO.barraDeBotoes = |
| 1308 | 1295 | } |
| 1309 | 1296 | if (elementos.length <= numerobotoes) { |
| 1310 | 1297 | Dom.setStyle([ |
| 1311 | - "sobeferramentas", | |
| 1312 | - "desceferramentas" | |
| 1298 | + "sobeferramentas", "desceferramentas" | |
| 1313 | 1299 | ], "display", "none"); |
| 1314 | 1300 | } |
| 1315 | 1301 | } |
| ... | ... | @@ -1361,8 +1347,7 @@ i3GEO.barraDeBotoes = |
| 1361 | 1347 | } |
| 1362 | 1348 | if (this.SOICONES === true) { |
| 1363 | 1349 | Dom.setStyle([ |
| 1364 | - "i3geo_barra2", | |
| 1365 | - "i3geo_barra1" | |
| 1350 | + "i3geo_barra2", "i3geo_barra1" | |
| 1366 | 1351 | ], "borderWidth", "0 0 0 0"); |
| 1367 | 1352 | } |
| 1368 | 1353 | YAHOO.i3GEO.janela.botoes.render(); |
| ... | ... | @@ -1464,15 +1449,15 @@ i3GEO.barraDeBotoes = |
| 1464 | 1449 | }, |
| 1465 | 1450 | /** |
| 1466 | 1451 | * Function: reativa |
| 1467 | - * | |
| 1452 | + * | |
| 1468 | 1453 | * Reativa as barras de ferramentas já criadas |
| 1469 | - * | |
| 1454 | + * | |
| 1470 | 1455 | * Essa opção apenas aplica o método "show" aos objetos armazenados em i3GEO.barraDeBotoes.BARRAS |
| 1471 | - * | |
| 1456 | + * | |
| 1472 | 1457 | * Se a barra não existir previamente, nada irá contecer |
| 1473 | - * | |
| 1458 | + * | |
| 1474 | 1459 | * Parametro: |
| 1475 | - * | |
| 1460 | + * | |
| 1476 | 1461 | * {Integer} - índice do array BARRAS que guarda os objetos YAHOO com as barras Se não for definido, todas as barras |
| 1477 | 1462 | * serão reativadas |
| 1478 | 1463 | */ |
| ... | ... | @@ -1503,12 +1488,12 @@ i3GEO.barraDeBotoes = |
| 1503 | 1488 | }, |
| 1504 | 1489 | /** |
| 1505 | 1490 | * Function: recria |
| 1506 | - * | |
| 1491 | + * | |
| 1507 | 1492 | * Recria uma barra de ferramentas já aberta aplicando os parâmetros de configuração definidos |
| 1508 | 1493 | * (variáveis) |
| 1509 | - * | |
| 1494 | + * | |
| 1510 | 1495 | * Parametro: |
| 1511 | - * | |
| 1496 | + * | |
| 1512 | 1497 | * {String} - id da barra |
| 1513 | 1498 | */ |
| 1514 | 1499 | recria : function(id) { |
| ... | ... | @@ -1525,9 +1510,9 @@ i3GEO.barraDeBotoes = |
| 1525 | 1510 | $i("euDock_0_bar").parentNode.parentNode.removeChild($i("euDock_0_bar").parentNode); |
| 1526 | 1511 | } |
| 1527 | 1512 | i3GEO.barraDeBotoes.inicializaBarra(); |
| 1528 | - //if ($i("i3geoMarcaIcone")) { | |
| 1529 | - // $i("i3geoMarcaIcone").style.display = "none"; | |
| 1530 | - //} | |
| 1513 | + // if ($i("i3geoMarcaIcone")) { | |
| 1514 | + // $i("i3geoMarcaIcone").style.display = "none"; | |
| 1515 | + // } | |
| 1531 | 1516 | return; |
| 1532 | 1517 | } |
| 1533 | 1518 | var i, n, temp, novoel, barraZoom, x, y, BARRAS = i3GEO.barraDeBotoes.BARRAS, iu = i3GEO.util; |
| ... | ... | @@ -1567,11 +1552,11 @@ i3GEO.barraDeBotoes = |
| 1567 | 1552 | }, |
| 1568 | 1553 | /** |
| 1569 | 1554 | * Function: fecha |
| 1570 | - * | |
| 1555 | + * | |
| 1571 | 1556 | * Fecha uma barra de ferramentas |
| 1572 | - * | |
| 1557 | + * | |
| 1573 | 1558 | * Parametro: |
| 1574 | - * | |
| 1559 | + * | |
| 1575 | 1560 | * {String} - id que identifica a barra. Corresponde ao parametro idconteudonovo da função de |
| 1576 | 1561 | * inicialização das barras |
| 1577 | 1562 | */ |
| ... | ... | @@ -1598,7 +1583,7 @@ i3GEO.barraDeBotoes = |
| 1598 | 1583 | } |
| 1599 | 1584 | return; |
| 1600 | 1585 | } |
| 1601 | - var divmensagem = $i("divMensagemBarraDeBotoes"), balloonAjuda, pos = YAHOO.util.Dom.getXY(objeto); | |
| 1586 | + var divmensagem = $i("divMensagemBarraDeBotoes"), pos = YAHOO.util.Dom.getXY(objeto); | |
| 1602 | 1587 | if (this.AJUDA === false || $i("janelaMenTexto")) { |
| 1603 | 1588 | i3GEO.ajuda.mostraJanela(mensagem); |
| 1604 | 1589 | i3GEO.barraDeBotoes.escondeJanelaAjuda(); |
| ... | ... | @@ -1621,15 +1606,13 @@ i3GEO.barraDeBotoes = |
| 1621 | 1606 | } |
| 1622 | 1607 | if (this.TIPOAJUDA === "horizontal") { |
| 1623 | 1608 | divmensagem.innerHTML = |
| 1624 | - "<table style='z-index:20000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='" | |
| 1625 | - + i3GEO.configura.locaplic | |
| 1609 | + "<table style='z-index:20000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='" + i3GEO.configura.locaplic | |
| 1626 | 1610 | + "/imagens/left.png" |
| 1627 | 1611 | + "' ></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>"; |
| 1628 | 1612 | } |
| 1629 | 1613 | if (this.TIPOAJUDA === "vertical") { |
| 1630 | 1614 | divmensagem.innerHTML = |
| 1631 | - "<table style='z-index:20000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='" | |
| 1632 | - + i3GEO.configura.locaplic | |
| 1615 | + "<table style='z-index:20000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='" + i3GEO.configura.locaplic | |
| 1633 | 1616 | + "/imagens/top.png" |
| 1634 | 1617 | + "' ></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>"; |
| 1635 | 1618 | } |
| ... | ... | @@ -1651,39 +1634,14 @@ i3GEO.barraDeBotoes = |
| 1651 | 1634 | } |
| 1652 | 1635 | i3GEO.barraDeBotoes.timeMostraAjudaBotoes = |
| 1653 | 1636 | setTimeout("i3GEO.barraDeBotoes.mostraJanelaAjuda('" + mensagem + "');", 5000); |
| 1654 | - } else { | |
| 1655 | - hideAllTooltips(); | |
| 1656 | - balloonAjuda = new Balloon(); | |
| 1657 | - BalloonConfig(balloonAjuda, 'GBubble'); | |
| 1658 | - balloonAjuda.delayTime = 0; | |
| 1659 | - balloonAjuda.stem = false; | |
| 1660 | - balloonAjuda.stemHeight = 0; | |
| 1661 | - balloonAjuda.vOffset = -24; | |
| 1662 | - balloonAjuda.images = i3GEO.configura.locaplic + '/pacotes/balloon-tooltips/htdocs/images/GBubblec'; | |
| 1663 | - mensagem = | |
| 1664 | - "<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'>" | |
| 1665 | - + mensagem + "</div></td></tr></table>"; | |
| 1666 | - try { | |
| 1667 | - clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes); | |
| 1668 | - } catch (e) { | |
| 1669 | - } | |
| 1670 | - i3GEO.barraDeBotoes.timeMostraAjudaBotoes = setTimeout(function() { | |
| 1671 | - balloonAjuda.cleanup(); | |
| 1672 | - balloonIsVisible = false; | |
| 1673 | - // alert(mensagem); | |
| 1674 | - if (i3GEO.barraDeBotoes.TIPO === "olhodepeixe" || i3GEO.barraDeBotoes.TIPO === "olhodepeixe1") { | |
| 1675 | - balloonAjuda.showTooltip(objeto, mensagem, null, null, null, pos[0], pos[1] - 40); | |
| 1676 | - } else { | |
| 1677 | - balloonAjuda.showTooltip(objeto, mensagem, null, null, null, pos[0] + 12, pos[1]); | |
| 1678 | - } | |
| 1679 | - try { | |
| 1680 | - clearTimeout(timeMostraAjudaBotoes); | |
| 1681 | - } catch (e) { | |
| 1682 | - } | |
| 1683 | - i3GEO.barraDeBotoes.timeAjudaBotoes = setTimeout(function() { | |
| 1684 | - balloonAjuda.cleanup(); | |
| 1685 | - }, 4000); | |
| 1686 | - }, 4000); | |
| 1637 | + } | |
| 1638 | + else{ | |
| 1639 | + /* | |
| 1640 | + new YAHOO.widget.Tooltip(objeto.id + "_tip", { | |
| 1641 | + context : objeto, | |
| 1642 | + text : mensagem | |
| 1643 | + }); | |
| 1644 | + */ | |
| 1687 | 1645 | } |
| 1688 | 1646 | } |
| 1689 | 1647 | }, |
| ... | ... | @@ -1712,30 +1670,36 @@ i3GEO.barraDeBotoes = |
| 1712 | 1670 | /** |
| 1713 | 1671 | * Abre uma janela com a descricao de cada botao |
| 1714 | 1672 | */ |
| 1715 | - ajudaEmLista : function(){ | |
| 1716 | - var n,i, ins = "",b; | |
| 1673 | + ajudaEmLista : function() { | |
| 1674 | + var n, i, ins = "", b; | |
| 1717 | 1675 | n = i3GEO.barraDeBotoes.LISTABOTOES.length; |
| 1718 | 1676 | ins += "<table class=lista8 >"; |
| 1719 | - for(i = 0; i < n; i++){ | |
| 1677 | + for (i = 0; i < n; i++) { | |
| 1720 | 1678 | b = i3GEO.barraDeBotoes.LISTABOTOES[i]; |
| 1721 | - if(i3GEO.barraDeBotoes.INCLUIBOTAO[b.iddiv] === true){ | |
| 1722 | - if(b.dica != ""){ | |
| 1723 | - ins += "<tr><td><img src='" + i3GEO.configura.locaplic + "/" + i3GEO.barraDeBotoes.ICONEBOTAO[b.iddiv] + "' /></td><td>" + b.dica + "</td></tr>"; | |
| 1679 | + if (i3GEO.barraDeBotoes.INCLUIBOTAO[b.iddiv] === true) { | |
| 1680 | + if (b.dica != "") { | |
| 1681 | + ins += | |
| 1682 | + "<tr><td><img src='" + i3GEO.configura.locaplic | |
| 1683 | + + "/" | |
| 1684 | + + i3GEO.barraDeBotoes.ICONEBOTAO[b.iddiv] | |
| 1685 | + + "' /></td><td>" | |
| 1686 | + + b.dica | |
| 1687 | + + "</td></tr>"; | |
| 1724 | 1688 | } |
| 1725 | 1689 | } |
| 1726 | 1690 | } |
| 1727 | 1691 | ins += "</table>"; |
| 1728 | - i3GEO.janela.mensagemSimples("<div style='overflow:auto;height:100%'>"+ins+"</div>",""); | |
| 1692 | + i3GEO.janela.mensagemSimples("<div style='overflow:auto;height:100%'>" + ins + "</div>", ""); | |
| 1729 | 1693 | }, |
| 1730 | 1694 | /** |
| 1731 | 1695 | * Section: i3GEO.barraDeBotoes.editor |
| 1732 | - * | |
| 1696 | + * | |
| 1733 | 1697 | * Editor vetorial |
| 1734 | 1698 | */ |
| 1735 | 1699 | editor : { |
| 1736 | 1700 | /** |
| 1737 | 1701 | * Function: inicia |
| 1738 | - * | |
| 1702 | + * | |
| 1739 | 1703 | * Abre as opções do editor conforme a interface em uso |
| 1740 | 1704 | */ |
| 1741 | 1705 | inicia : function() { | ... | ... |
classesjs/classe_editorgm.js
classesjs/classe_guias.js
| ... | ... | @@ -338,7 +338,7 @@ i3GEO.guias = |
| 338 | 338 | // |
| 339 | 339 | // obtém outras guias que podem existir no mapa |
| 340 | 340 | // |
| 341 | - var nguiasreal = 0, guiaconteudo, id, guia, g, re, ng, tituloguia, i, ins, altura, temp, CONFIGURA = i3GEO.guias.CONFIGURA, guias = | |
| 341 | + var atrib, nguiasreal = 0, guiaconteudo, id, guia, g, re, ng, tituloguia, i, ins, altura, temp, CONFIGURA = i3GEO.guias.CONFIGURA, guias = | |
| 342 | 342 | i3GEO.util.listaChaves(CONFIGURA), nguias = guias.length; |
| 343 | 343 | // |
| 344 | 344 | // no caso de TIPO === "movel", as guias não são |
| ... | ... | @@ -483,12 +483,13 @@ i3GEO.guias = |
| 483 | 483 | guiaconteudo = $i(id); |
| 484 | 484 | if (guiaconteudo) { |
| 485 | 485 | if (guia.click === "" || guia.click === undefined) { |
| 486 | - //TODO remover eval | |
| 487 | - eval('$i("' + id + '").onclick = function(event){i3GEO.guias.mostra("' + guias[g] + '");}'); | |
| 488 | - //nao funcionou! verificar em guias antigas | |
| 489 | - //$i(id).onclick = function(event){ | |
| 490 | - // i3GEO.guias.mostra(guias[g]); | |
| 491 | - //}; | |
| 486 | + //eval('$i("' + id + '").onclick = function(event){i3GEO.guias.mostra("' + guias[g] + '");}'); | |
| 487 | + atrib = document.createAttribute("nomeGuia"); | |
| 488 | + atrib.value = guias[g]; | |
| 489 | + $i(id).setAttributeNode(atrib); | |
| 490 | + $i(id).onclick = function(event){ | |
| 491 | + i3GEO.guias.mostra(this.attributes["nomeGuia"].value); | |
| 492 | + }; | |
| 492 | 493 | } else { |
| 493 | 494 | guiaconteudo.onclick = guia.click; |
| 494 | 495 | } | ... | ... |
classesjs/classe_interface.js
| ... | ... | @@ -48,7 +48,6 @@ |
| 48 | 48 | if (typeof (i3GEO) === 'undefined') { |
| 49 | 49 | var i3GEO = {}; |
| 50 | 50 | } |
| 51 | -//TODO incluir opcao para usar o modo notile no googlemaps e openlayers conforme for definido na configuracao do LAYER | |
| 52 | 51 | //TODO integrar Cesium http://cesiumjs.org/2013/04/12/Cesium-up-and-running/ |
| 53 | 52 | i3GEO.Interface = |
| 54 | 53 | { | ... | ... |
classesjs/compactados/classe_barradebotoes_compacto.js
| 1 | -if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.barraDeBotoes={BARRAS:[],BOTAOCLICADO:"",ATIVA:true,TIPO:"yui",OFFSET:-205,POSICAO:"bottom",MAXBOTOES:13,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:{abreJanelaLegenda:true,localizar:true,zoomanterior:true,zoomli:true,zoomproximo:true,zoomiauto:false,zoomoauto:false,pan:true,zoomtot:true,identifica:true,identificaBalao:true,mede:true,area:true,selecao:true,barraedicao:true,imprimir: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:false},ICONEBOTAO:{zoomli:"/imagens/gisicons/eudock/zoom-region.png",zoomproximo:"/imagens/gisicons/eudock/zoom-next.png",zoomanterior:"/imagens/gisicons/eudock/zoom-last.png",zoomiauto:"/imagens/gisicons/eudock/zoom-in.png",zoomoauto:"/imagens/gisicons/eudock/zoom-out.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",barraedicao:"/imagens/gisicons/eudock/editopen.png",localizar:"/imagens/gisicons/eudock/search.png",abreJanelaLegenda:"/imagens/gisicons/eudock/show-legend.png"},TEMPLATEBOTAO:"",BOTAOPADRAO:"pan",COMPORTAMENTO:"padrao",adicionaBotao:function(obj){i3GEO.barraDeBotoes.LISTABOTOES.push(obj);i3GEO.barraDeBotoes.ICONEBOTAO[obj.iddiv]="/imagens/oxygen/22x22/user-online.png";i3GEO.barraDeBotoes.INCLUIBOTAO[obj.iddiv]=true},ativaPadrao:function(){if(i3GEO.barraDeBotoes.ATIVA===true){try{var botao=i3GEO.barraDeBotoes.defBotao(i3GEO.barraDeBotoes.BOTAOPADRAO);if(botao.funcaoonclick){botao.funcaoonclick.call()}}catch(e){}}},ativaIcone:function(icone){if(i3GEO.barraDeBotoes.ATIVA===false){return}var estilo,temp,ist,cor,ko,estiloatual="white";if($i(icone)){estiloatual=$i(icone).style.backgroundColor}i3GEO.barraDeBotoes.BOTAOCLICADO=icone;ko=i3GEO.barraDeBotoes.LISTABOTOES.length-1;if(i3GEO.barraDeBotoes.COMPORTAMENTO==="padrao"){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(i3GEO.barraDeBotoes.LISTABOTOES[ko].tipo==="dinamico"&&temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white';if(i3GEO.barraDeBotoes.SOICONES===true){ist.borderLeftColor='rgb(50,50,50)';ist.borderBottomColor='rgb(50,50,50)'}}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='white';estilo.borderWidth="1px"}}}if(i3GEO.barraDeBotoes.COMPORTAMENTO==="destacado"){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white'}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}}}if(i3GEO.util.in_array(i3GEO.barraDeBotoes.COMPORTAMENTO,["laranja","vermelho","cinza"])){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;if(i3GEO.barraDeBotoes.SOICONES===false){ist.borderWidth="1px";ist.borderColor='white';ist.backgroundColor='white'}else{ist.backgroundColor=''}}}while(ko--)}switch(i3GEO.barraDeBotoes.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(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}if(estiloatual==cor){estilo.backgroundColor='white'}else{estilo.backgroundColor=cor}}}},ativaBotoes:function(padrao){var l,b,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]&&l[b].dica&&i3GEO.barraDeBotoes.TIPO!="emlinha"){$i(l[b].iddiv).onmouseover=function(e){i3GEO.barraDeBotoes.mostraJanela(this,l[b].dica,e)};$i(l[b].iddiv).onmouseout=function(e){i3GEO.barraDeBotoes.mostraJanela(this,"",e)}}if(l[b]&&l[b].titulo&&i3GEO.barraDeBotoes.TIPO==="emlinha"){new YAHOO.widget.Tooltip(l[b].iddiv+"_tip",{context:l[b].iddiv,text:l[b].titulo})}if(l[b]&&l[b].funcaoonclick){temp.onclick=l[b].funcaoonclick;if(l[b].iddiv==padrao){l[b].funcaoonclick()}}if(l[b]&&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){if(i3GEO.barraDeBotoes.ATIVA===false){return}var botao=i3GEO.barraDeBotoes.defBotao(id);i3GEO.barraDeBotoes.BOTAOCLICADO=id;if(botao===false){return}try{if(botao.funcaoonclick){botao.funcaoonclick.call()}}catch(e){}},defBotao:function(iddiv){var l=i3GEO.barraDeBotoes.LISTABOTOES,b=l.length-1;if(b>=0){do{if(l[b].iddiv===iddiv){return l[b]}}while(b--)}return false},inicializaBarraOP:function(onde){if(i3GEO.barraDeBotoes.ATIVA===false||!$i(i3GEO.Interface.IDCORPO)){return}if(document.onclick)euEnv.onclickBK=document.onclick;document.onclick=on_MouseClick;euDimensioni();offsEut();euThread();euEnv.imageBasePath=i3GEO.configura.locaplic+"/pacotes/eudock/";var botao,dica,titulo,i,dock=new euDock(onde),temp="dockBg-r.png",tempAjuda="dockBg-l.png",chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length,preload;preload=new Image();preload.src=i3GEO.configura.locaplic+"/imagens/gisicons/eudock/sobe1.png";if(i3GEO.barraDeBotoes.POSICAO==="top"){dock.setObjectAlign(i3GEO.Interface.IDCORPO,euUP,(i3GEO.parametros.h)*1+i3GEO.barraDeBotoes.OFFSET,euDOWN)}else{if(onde){dock.setObjectAlign(i3GEO.Interface.IDCORPO,euDOWN,i3GEO.barraDeBotoes.OFFSET,euUP)}else{dock.setObjectAlign(i3GEO.Interface.IDCORPO,euDOWN,(parseInt(document.body.style.height,10))*-1+i3GEO.barraDeBotoes.OFFSET,euUP)}}if(i3GEO.barraDeBotoes.MAXBOTOES>=chaves.length){temp="vazio.png"}if(i3GEO.barraDeBotoes.AJUDA===false){tempAjuda="vazio.png"}dock.setBar({left:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/"+tempAjuda}},horizontal:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-c-o.png"}},right:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/"+temp}}});i3GEO.barraDeBotoes.AJUDA=false;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){dica="";titulo=""}else{if(botao.dica){dica=botao.dica}else{dica=""}if(botao.titulo!=undefined){titulo=botao.titulo}else{titulo=""}}dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]}}),{mouseInsideClick:function(x,y,id,posX,posY){i3GEO.util.animaClique($i(euEnv.euDockArray[id].elementsArray[0].id));i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao,x,y,posX,posY)},idBotao:chaves[i],dica:dica,titulo:titulo})}}$i(euEnv.euDockArray.euDock_0.bar.elementsArray.left.id).onclick=function(){i3GEO.barraDeBotoes.ajudaEmLista()};$i(euEnv.euDockArray.euDock_0.bar.elementsArray.right.id).onclick=function(){var dica,titulo,chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length,nb=euEnv.euDockArray.euDock_0.iconsArray.length,i;if(nb!==i3GEO.barraDeBotoes.MAXBOTOES){i3GEO.barraDeBotoes.recria()}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){dica="";titulo=""}else{if(botao.dica){dica=botao.dica}else{dica=""}if(botao.titulo!=undefined){titulo=botao.titulo}else{titulo=""}}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:dica,titulo:titulo})}}}}},inicializaBarra:function(idconteudo,idconteudonovo,barraZoom,x,y,onde){if(i3GEO.barraDeBotoes.ATIVA===false){return}var ticone,tipo,mostra,i,temp,e,wj,recuo,alturadisponivel,n,chaves,elementos="",numerobotoes=0,nelementos=0,Dom=YAHOO.util.Dom,branco=i3GEO.configura.locaplic+'/imagens/branco.gif',novoel;if(i3GEO.configura.map3d===""){i3GEO.barraDeBotoes.INCLUIBOTAO.v3d=false}if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"||i3GEO.barraDeBotoes.TIPO==="olhodepeixe1"){if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe1"&&$i(i3GEO.Interface.IDMAPA)){i3GEO.barraDeBotoes.inicializaBarraOP($i(i3GEO.Interface.IDMAPA))}else{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>"}if(navm){i3GEO.barraDeBotoes.TRANSICAOSUAVE=false}if(i3GEO.barraDeBotoes.TIPO==="emlinha"){temp="<div id='"+onde+"_mascara'></div>";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+="<img id='"+chaves[i]+"_iconeId' onclick='i3GEO.util.animaClique(this);i3GEO.barraDeBotoes.execBotao(\""+chaves[i]+"\")' src='"+i3GEO.configura.locaplic+"/"+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]+"' />"}}if(!$i(onde)){novoel=document.createElement("div");novoel.id=onde;novoel.innerHTML=temp;$i(i3GEO.Interface.IDMAPA).appendChild(novoel)}else{$i(onde).innerHTML=temp}for(i=0;i<n;i+=1){temp=i3GEO.barraDeBotoes.defBotao(chaves[i]).titulo;if(temp!=""){new YAHOO.widget.Tooltip(chaves[i]+"_tip",{context:chaves[i]+"_iconeId",text:temp})}}}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";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";if(idconteudonovo!=""){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)}};novoel.onmouseout=function(){if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.barraDeBotoes.OPACIDADE/100)}};document.body.appendChild(novoel)}ticone=28;alturadisponivel=i3GEO.parametros.h-i3GEO.Interface.BARRABOTOESTOP-ticone-38-38;if(this.AUTOALTURA===true){alturadisponivel+=28}numerobotoes=parseInt(alturadisponivel/ticone,10);if(idconteudo!=""&&$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")}}if(i3GEO.barraDeBotoes.TIPO!="emlinha"){YAHOO.namespace("i3GEO.janela.botoes");if(i3GEO.barraDeBotoes.ORIENTACAO==="horizontal"){YAHOO.i3GEO.janela.botoes=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.i3GEO.janela.botoes=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.i3GEO.janela.botoes=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")}YAHOO.i3GEO.janela.botoes.render();YAHOO.i3GEO.janela.botoes.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.i3GEO.janela.botoes);YAHOO.i3GEO.janela.botoes.show();if(i3GEO.Interface.TABLET===true){YAHOO.i3GEO.janela.botoes.moveTo((i3GEO.parametros.w/2)-(i3GEO.barraDeBotoes.HORIZONTALW/2),"")}Dom.replaceClass(idconteudonovo+"_h","hd2")}}},reativa:function(indice){if(i3GEO.barraDeBotoes.ATIVA===false){return}var abre=function(){var i,n=i3GEO.barraDeBotoes.BARRAS.length;for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.BARRAS[i]){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.ATIVA===false){return}if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"||i3GEO.barraDeBotoes.TIPO==="olhodepeixe1"){euEnv.euDockArray=[];euEnv.Kost.num=0;if($i("euDock_0_bar")){$i("euDock_0_bar").parentNode.parentNode.removeChild($i("euDock_0_bar").parentNode)}i3GEO.barraDeBotoes.inicializaBarra();return}var i,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]&&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 i,n=this.BARRAS.length;for(i=0;i<n;i+=1){if(this.BARRAS[i]&&this.BARRAS[i].id===id){$i(id+"_c").style.visibility="hidden"}}},mostraJanela:function(objeto,mensagem,evt){if(mensagem===""){try{clearTimeout(i3GEO.barraDeBotoes.timeMostraAjudaBotoes)}catch(e){}try{clearTimeout(i3GEO.barraDeBotoes.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='"+i3GEO.configura.locaplic+"/imagens/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='"+i3GEO.configura.locaplic+"/imagens/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(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.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(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeMostraAjudaBotoes=setTimeout(function(){balloonAjuda.cleanup();balloonIsVisible=false;if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"||i3GEO.barraDeBotoes.TIPO==="olhodepeixe1"){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){}i3GEO.barraDeBotoes.timeAjudaBotoes=setTimeout(function(){balloonAjuda.cleanup()},4000)},4000)}}},mostraJanelaAjuda:function(mensagem){$i("divMensagemBarraDeBotoesCorpo").innerHTML=mensagem;YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","block");try{clearTimeout(i3GEO.barraDeBotoes.timeMostraAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeAjudaBotoes=setTimeout(function(){i3GEO.barraDeBotoes.escondeJanelaAjuda()},3000)},escondeJanelaAjuda:function(){try{if(i3GEO.barraDeBotoes.timeAjudaBotoes){clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}}catch(e){}if($i("divMensagemBarraDeBotoes")){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none")}},ajudaEmLista:function(){var n,i,ins="",b;n=i3GEO.barraDeBotoes.LISTABOTOES.length;ins+="<table class=lista8 >";for(i=0;i<n;i++){b=i3GEO.barraDeBotoes.LISTABOTOES[i];if(i3GEO.barraDeBotoes.INCLUIBOTAO[b.iddiv]===true){if(b.dica!=""){ins+="<tr><td><img src='"+i3GEO.configura.locaplic+"/"+i3GEO.barraDeBotoes.ICONEBOTAO[b.iddiv]+"' /></td><td>"+b.dica+"</td></tr>"}}}ins+="</table>";i3GEO.janela.mensagemSimples("<div style='overflow:auto;height:100%'>"+ins+"</div>","")},editor:{inicia:function(){i3GEO.eventos.cliquePerm.desativa();i3GEO.barraDeBotoes.editor[i3GEO.Interface.ATUAL].inicia("janelaEditorVetorial")},googlemaps:{inicia:function(idjanela){var temp=function(){var cabecalho,minimiza,fecha,janela=YAHOO.i3GEO.janela.manager.find("i3GEOjanelaEditor");if(janela){janela.destroy()}cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOjanelaEditor")};janela=i3GEO.janela.cria("350px","100px","","","","Editor","i3GEOjanelaEditor",false,"hd",cabecalho,minimiza);$i("i3GEOjanelaEditor_corpo").style.backgroundColor="white";i3GEO.editorGM.inicia("i3GEOjanelaEditor_corpo");fecha=function(){var temp=window.confirm($trad("x94"));if(i3GEO.eventos){i3GEO.eventos.cliquePerm.ativa()}if(temp===true){i3GEO.desenho.googlemaps.destroyFeatures(i3GEO.desenho.googlemaps.shapes)}};YAHOO.util.Event.addListener(janela[0].close,"click",fecha)};if(!i3GEO.editorGM){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/classesjs/compactados/classe_editorgm_compacto.js",temp,"editorgm.js",true)}else{temp.call()}}},openlayers:{inicia:function(idjanela){if(!i3GEO.editorOL){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/classesjs/compactados/classe_editorol_compacto.js","i3GEO.barraDeBotoes.editor.openlayers.ativaPainel('"+idjanela+"')","editorol.js",true)}else{if(!i3GEO.desenho.layergrafico){i3GEO.desenho.openlayers.criaLayerGrafico();i3GEO.editorOL.mapa.addLayers([i3GEO.desenho.layergrafico])}if(!i3GEO.editorOL.backup){i3GEO.editorOL.backup=new OpenLayers.Layer.Vector("Backup",{displayInLayerSwitcher:false,visibility:false})}i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}},criaJanela:function(){if($i("i3GEOjanelaEditor")){return"i3GEOjanelaEditor"}var janela,divid,titulo,cabecalho,minimiza;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOjanelaEditor")};titulo=$trad("u29");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,'corta':true,'edita':true,'listag':true,'selecao':true,'selecaotudo':true,'apaga':true,'procura':false,'propriedades':true,'salva':true,'ajuda':true,'fecha':true,'tools':true,'undo':true,'frente':true};if(!i3GEO.desenho.layergrafico){i3GEO.desenho.openlayers.criaLayerGrafico()}if(idjanela){i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}}}}}; | |
| 2 | 1 | \ No newline at end of file |
| 2 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.barraDeBotoes={BARRAS:[],BOTAOCLICADO:"",ATIVA:true,TIPO:"yui",OFFSET:-205,POSICAO:"bottom",MAXBOTOES:13,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:{abreJanelaLegenda:true,localizar:true,zoomanterior:true,zoomli:true,zoomproximo:true,zoomiauto:false,zoomoauto:false,pan:true,zoomtot:true,identifica:true,identificaBalao:true,mede:true,area:true,selecao:true,barraedicao:true,imprimir: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:false},ICONEBOTAO:{zoomli:"/imagens/gisicons/eudock/zoom-region.png",zoomproximo:"/imagens/gisicons/eudock/zoom-next.png",zoomanterior:"/imagens/gisicons/eudock/zoom-last.png",zoomiauto:"/imagens/gisicons/eudock/zoom-in.png",zoomoauto:"/imagens/gisicons/eudock/zoom-out.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",barraedicao:"/imagens/gisicons/eudock/editopen.png",localizar:"/imagens/gisicons/eudock/search.png",abreJanelaLegenda:"/imagens/gisicons/eudock/show-legend.png"},TEMPLATEBOTAO:"",BOTAOPADRAO:"pan",COMPORTAMENTO:"padrao",adicionaBotao:function(obj){i3GEO.barraDeBotoes.LISTABOTOES.push(obj);i3GEO.barraDeBotoes.ICONEBOTAO[obj.iddiv]="/imagens/oxygen/22x22/user-online.png";i3GEO.barraDeBotoes.INCLUIBOTAO[obj.iddiv]=true},ativaPadrao:function(){if(i3GEO.barraDeBotoes.ATIVA===true){try{var botao=i3GEO.barraDeBotoes.defBotao(i3GEO.barraDeBotoes.BOTAOPADRAO);if(botao.funcaoonclick){botao.funcaoonclick.call()}}catch(e){}}},ativaIcone:function(icone){if(i3GEO.barraDeBotoes.ATIVA===false){return}var estilo,temp,ist,cor,ko,estiloatual="white";if($i(icone)){estiloatual=$i(icone).style.backgroundColor}i3GEO.barraDeBotoes.BOTAOCLICADO=icone;ko=i3GEO.barraDeBotoes.LISTABOTOES.length-1;if(i3GEO.barraDeBotoes.COMPORTAMENTO==="padrao"){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(i3GEO.barraDeBotoes.LISTABOTOES[ko].tipo==="dinamico"&&temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white';if(i3GEO.barraDeBotoes.SOICONES===true){ist.borderLeftColor='rgb(50,50,50)';ist.borderBottomColor='rgb(50,50,50)'}}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='white';estilo.borderWidth="1px"}}}if(i3GEO.barraDeBotoes.COMPORTAMENTO==="destacado"){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white'}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}}}if(i3GEO.util.in_array(i3GEO.barraDeBotoes.COMPORTAMENTO,["laranja","vermelho","cinza"])){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;if(i3GEO.barraDeBotoes.SOICONES===false){ist.borderWidth="1px";ist.borderColor='white';ist.backgroundColor='white'}else{ist.backgroundColor=''}}}while(ko--)}switch(i3GEO.barraDeBotoes.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(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}if(estiloatual==cor){estilo.backgroundColor='white'}else{estilo.backgroundColor=cor}}}},ativaBotoes:function(padrao){var atrib,l,b,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);atrib=document.createAttribute("indxBotao");atrib.value=b;if(temp){temp.setAttributeNode(atrib);if(l[b].conteudo){temp.innerHTML=l[b].conteudo}if(l[b]&&l[b].dica&&i3GEO.barraDeBotoes.TIPO!="emlinha"){$i(l[b].iddiv).onmouseover=function(e){var i=this.attributes["indxBotao"].value,l=i3GEO.barraDeBotoes.LISTABOTOES;if(l&&l[i]&&l[i].dica){i3GEO.barraDeBotoes.mostraJanela(this,l[i].dica,e)}};$i(l[b].iddiv).onmouseout=function(e){i3GEO.barraDeBotoes.mostraJanela(this,"",e)}}if(l[b]&&l[b].titulo&&i3GEO.barraDeBotoes.TIPO==="emlinha"){new YAHOO.widget.Tooltip(l[b].iddiv+"_tip",{context:l[b].iddiv,text:l[b].titulo})}if(l[b]&&l[b].funcaoonclick){temp.onclick=l[b].funcaoonclick;if(l[b].iddiv==padrao){l[b].funcaoonclick()}}if(l[b]&&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){if(i3GEO.barraDeBotoes.ATIVA===false){return}var botao=i3GEO.barraDeBotoes.defBotao(id);i3GEO.barraDeBotoes.BOTAOCLICADO=id;if(botao===false){return}try{if(botao.funcaoonclick){botao.funcaoonclick.call()}}catch(e){}},defBotao:function(iddiv){var l=i3GEO.barraDeBotoes.LISTABOTOES,b=l.length-1;if(b>=0){do{if(l[b].iddiv===iddiv){return l[b]}}while(b--)}return false},inicializaBarraOP:function(onde){if(i3GEO.barraDeBotoes.ATIVA===false||!$i(i3GEO.Interface.IDCORPO)){return}if(document.onclick)euEnv.onclickBK=document.onclick;document.onclick=on_MouseClick;euDimensioni();offsEut();euThread();euEnv.imageBasePath=i3GEO.configura.locaplic+"/pacotes/eudock/";var botao,dica,titulo,i,dock=new euDock(onde),temp="dockBg-r.png",tempAjuda="dockBg-l.png",chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length,preload;preload=new Image();preload.src=i3GEO.configura.locaplic+"/imagens/gisicons/eudock/sobe1.png";if(i3GEO.barraDeBotoes.POSICAO==="top"){dock.setObjectAlign(i3GEO.Interface.IDCORPO,euUP,(i3GEO.parametros.h)*1+i3GEO.barraDeBotoes.OFFSET,euDOWN)}else{if(onde){dock.setObjectAlign(i3GEO.Interface.IDCORPO,euDOWN,i3GEO.barraDeBotoes.OFFSET,euUP)}else{dock.setObjectAlign(i3GEO.Interface.IDCORPO,euDOWN,(parseInt(document.body.style.height,10))*-1+i3GEO.barraDeBotoes.OFFSET,euUP)}}if(i3GEO.barraDeBotoes.MAXBOTOES>=chaves.length){temp="vazio.png"}if(i3GEO.barraDeBotoes.AJUDA===false){tempAjuda="vazio.png"}dock.setBar({left:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/"+tempAjuda}},horizontal:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-c-o.png"}},right:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/"+temp}}});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||i3GEO.barraDeBotoes.AJUDA===false){dica="";titulo=""}else{if(botao.dica){dica=botao.dica}else{dica=""}if(botao.titulo!=undefined&&i3GEO.barraDeBotoes.AJUDA===true){titulo=botao.titulo}else{titulo=""}}dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]],titulo:titulo}}),{mouseInsideClick:function(x,y,id,posX,posY){i3GEO.util.animaClique($i(euEnv.euDockArray[id].elementsArray[0].id));i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao,x,y,posX,posY)},idBotao:chaves[i],dica:dica,titulo:titulo})}}$i(euEnv.euDockArray.euDock_0.bar.elementsArray.left.id).onclick=function(){i3GEO.barraDeBotoes.ajudaEmLista()};$i(euEnv.euDockArray.euDock_0.bar.elementsArray.right.id).onclick=function(){var dica,titulo,chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length,nb=euEnv.euDockArray.euDock_0.iconsArray.length,i;if(nb!==i3GEO.barraDeBotoes.MAXBOTOES){i3GEO.barraDeBotoes.recria()}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){dica="";titulo=""}else{if(botao.dica){dica=botao.dica}else{dica=""}if(botao.titulo!=undefined){titulo=botao.titulo}else{titulo=""}}dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]],titulo:titulo}}),{mouseInsideClick:function(x,y,id,posX){i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao,x,y,posX)},idBotao:chaves[i],dica:dica,titulo:titulo})}}}}},inicializaBarra:function(idconteudo,idconteudonovo,barraZoom,x,y,onde){if(i3GEO.barraDeBotoes.ATIVA===false){return}var ticone,tipo,mostra,i,temp,e,wj,recuo,alturadisponivel,n,chaves,elementos="",numerobotoes=0,nelementos=0,Dom=YAHOO.util.Dom,branco=i3GEO.configura.locaplic+'/imagens/branco.gif',novoel;if(i3GEO.configura.map3d===""){i3GEO.barraDeBotoes.INCLUIBOTAO.v3d=false}if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"||i3GEO.barraDeBotoes.TIPO==="olhodepeixe1"){if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe1"&&$i(i3GEO.Interface.IDMAPA)){i3GEO.barraDeBotoes.inicializaBarraOP($i(i3GEO.Interface.IDMAPA))}else{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>"}if(navm){i3GEO.barraDeBotoes.TRANSICAOSUAVE=false}if(i3GEO.barraDeBotoes.TIPO==="emlinha"){temp="<div id='"+onde+"_mascara'></div>";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+="<img id='"+chaves[i]+"_iconeId' onclick='i3GEO.util.animaClique(this);i3GEO.barraDeBotoes.execBotao(\""+chaves[i]+"\")' src='"+i3GEO.configura.locaplic+"/"+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]+"' />"}}if(!$i(onde)){novoel=document.createElement("div");novoel.id=onde;novoel.innerHTML=temp;$i(i3GEO.Interface.IDMAPA).appendChild(novoel)}else{$i(onde).innerHTML=temp}for(i=0;i<n;i+=1){temp=i3GEO.barraDeBotoes.defBotao(chaves[i]).titulo;if(temp!=""){new YAHOO.widget.Tooltip(chaves[i]+"_tip",{context:chaves[i]+"_iconeId",text:temp})}}}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";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";if(idconteudonovo!=""){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)}};novoel.onmouseout=function(){if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.barraDeBotoes.OPACIDADE/100)}};document.body.appendChild(novoel)}ticone=28;alturadisponivel=i3GEO.parametros.h-i3GEO.Interface.BARRABOTOESTOP-ticone-38-38;if(this.AUTOALTURA===true){alturadisponivel+=28}numerobotoes=parseInt(alturadisponivel/ticone,10);if(idconteudo!=""&&$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")}}if(i3GEO.barraDeBotoes.TIPO!="emlinha"){YAHOO.namespace("i3GEO.janela.botoes");if(i3GEO.barraDeBotoes.ORIENTACAO==="horizontal"){YAHOO.i3GEO.janela.botoes=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.i3GEO.janela.botoes=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.i3GEO.janela.botoes=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")}YAHOO.i3GEO.janela.botoes.render();YAHOO.i3GEO.janela.botoes.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.i3GEO.janela.botoes);YAHOO.i3GEO.janela.botoes.show();if(i3GEO.Interface.TABLET===true){YAHOO.i3GEO.janela.botoes.moveTo((i3GEO.parametros.w/2)-(i3GEO.barraDeBotoes.HORIZONTALW/2),"")}Dom.replaceClass(idconteudonovo+"_h","hd2")}}},reativa:function(indice){if(i3GEO.barraDeBotoes.ATIVA===false){return}var abre=function(){var i,n=i3GEO.barraDeBotoes.BARRAS.length;for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.BARRAS[i]){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.ATIVA===false){return}if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"||i3GEO.barraDeBotoes.TIPO==="olhodepeixe1"){euEnv.euDockArray=[];euEnv.Kost.num=0;if($i("euDock_0_bar")){$i("euDock_0_bar").parentNode.parentNode.removeChild($i("euDock_0_bar").parentNode)}i3GEO.barraDeBotoes.inicializaBarra();return}var i,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]&&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 i,n=this.BARRAS.length;for(i=0;i<n;i+=1){if(this.BARRAS[i]&&this.BARRAS[i].id===id){$i(id+"_c").style.visibility="hidden"}}},mostraJanela:function(objeto,mensagem,evt){if(mensagem===""){try{clearTimeout(i3GEO.barraDeBotoes.timeMostraAjudaBotoes)}catch(e){}try{clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}return}var divmensagem=$i("divMensagemBarraDeBotoes"),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='"+i3GEO.configura.locaplic+"/imagens/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='"+i3GEO.configura.locaplic+"/imagens/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(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeMostraAjudaBotoes=setTimeout("i3GEO.barraDeBotoes.mostraJanelaAjuda('"+mensagem+"');",5000)}else{}}},mostraJanelaAjuda:function(mensagem){$i("divMensagemBarraDeBotoesCorpo").innerHTML=mensagem;YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","block");try{clearTimeout(i3GEO.barraDeBotoes.timeMostraAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeAjudaBotoes=setTimeout(function(){i3GEO.barraDeBotoes.escondeJanelaAjuda()},3000)},escondeJanelaAjuda:function(){try{if(i3GEO.barraDeBotoes.timeAjudaBotoes){clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}}catch(e){}if($i("divMensagemBarraDeBotoes")){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none")}},ajudaEmLista:function(){var n,i,ins="",b;n=i3GEO.barraDeBotoes.LISTABOTOES.length;ins+="<table class=lista8 >";for(i=0;i<n;i++){b=i3GEO.barraDeBotoes.LISTABOTOES[i];if(i3GEO.barraDeBotoes.INCLUIBOTAO[b.iddiv]===true){if(b.dica!=""){ins+="<tr><td><img src='"+i3GEO.configura.locaplic+"/"+i3GEO.barraDeBotoes.ICONEBOTAO[b.iddiv]+"' /></td><td>"+b.dica+"</td></tr>"}}}ins+="</table>";i3GEO.janela.mensagemSimples("<div style='overflow:auto;height:100%'>"+ins+"</div>","")},editor:{inicia:function(){i3GEO.eventos.cliquePerm.desativa();i3GEO.barraDeBotoes.editor[i3GEO.Interface.ATUAL].inicia("janelaEditorVetorial")},googlemaps:{inicia:function(idjanela){var temp=function(){var cabecalho,minimiza,fecha,janela=YAHOO.i3GEO.janela.manager.find("i3GEOjanelaEditor");if(janela){janela.destroy()}cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOjanelaEditor")};janela=i3GEO.janela.cria("350px","100px","","","","Editor","i3GEOjanelaEditor",false,"hd",cabecalho,minimiza);$i("i3GEOjanelaEditor_corpo").style.backgroundColor="white";i3GEO.editorGM.inicia("i3GEOjanelaEditor_corpo");fecha=function(){var temp=window.confirm($trad("x94"));if(i3GEO.eventos){i3GEO.eventos.cliquePerm.ativa()}if(temp===true){i3GEO.desenho.googlemaps.destroyFeatures(i3GEO.desenho.googlemaps.shapes)}};YAHOO.util.Event.addListener(janela[0].close,"click",fecha)};if(!i3GEO.editorGM){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/classesjs/compactados/classe_editorgm_compacto.js",temp,"editorgm.js",true)}else{temp.call()}}},openlayers:{inicia:function(idjanela){if(!i3GEO.editorOL){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/classesjs/compactados/classe_editorol_compacto.js","i3GEO.barraDeBotoes.editor.openlayers.ativaPainel('"+idjanela+"')","editorol.js",true)}else{if(!i3GEO.desenho.layergrafico){i3GEO.desenho.openlayers.criaLayerGrafico();i3GEO.editorOL.mapa.addLayers([i3GEO.desenho.layergrafico])}if(!i3GEO.editorOL.backup){i3GEO.editorOL.backup=new OpenLayers.Layer.Vector("Backup",{displayInLayerSwitcher:false,visibility:false})}i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}},criaJanela:function(){if($i("i3GEOjanelaEditor")){return"i3GEOjanelaEditor"}var janela,divid,titulo,cabecalho,minimiza;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOjanelaEditor")};titulo=$trad("u29");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,'corta':true,'edita':true,'listag':true,'selecao':true,'selecaotudo':true,'apaga':true,'procura':false,'propriedades':true,'salva':true,'ajuda':true,'fecha':true,'tools':true,'undo':true,'frente':true};if(!i3GEO.desenho.layergrafico){i3GEO.desenho.openlayers.criaLayerGrafico()}if(idjanela){i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}}}}}; | |
| 3 | 3 | \ No newline at end of file | ... | ... |
classesjs/compactados/classe_guias_compacto.js
| 1 | -if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.guias={ATUAL:"temas",ALTURACORPOGUIAS:0,CONFIGURA:{"temas":{icone:"imagens/layer.png",titulo:$trad("g4a"),id:"guia1",idconteudo:"guia1obj",click:""},"adiciona":{icone:"imagens/catalogo.png",titulo:$trad("g1a"),id:"guia2",idconteudo:"guia2obj",click:function(){var ondeArvore;i3GEO.guias.mostra("adiciona");if(!$i("arvoreAdicionaTema")){try{ondeArvore=objmapa.guiaMenu+"obj"}catch(e){ondeArvore="guia2obj"}}else{ondeArvore="arvoreAdicionaTema"}if(document.getElementById("outrasOpcoesAdiciona")){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde="outrasOpcoesAdiciona";i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore=false}i3GEO.arvoreDeTemas.cria(i3GEO.configura.sid,i3GEO.configura.locaplic,ondeArvore)}},"legenda":{icone:"imagens/legenda.png",titulo:$trad("g3"),id:"guia4",idconteudo:"guia4obj",click:function(){i3GEO.guias.mostra("legenda");i3GEO.util.defineValor(i3GEO.mapa.legendaHTML.ID,"innerHTML","");i3GEO.mapa.legendaHTML.cria("guia4obj")}},"mapas":{icone:"imagens/gisicons/show-links.png",titulo:"Links",id:"guia5",idconteudo:"guia5obj",mostraLink:function(id,url){$i("i3geoMapasLink_"+id).innerHTML="<a href='"+url+"' target=_blank >"+url+"</a>"},click:function(onde){if(!onde){onde=i3GEO.guias.CONFIGURA.mapas.idconteudo}var pegaMapas=function(retorno){var ins,mapa,ig1lt,ig1,nome,lkd,link,temp,combo,urlinterface;ins="<br><div id='banners' style='overflow:auto;text-align:center'>"+"<a href='"+i3GEO.configura.locaplic+"/admin/html/mapas.html' target=_blank >"+$trad("x89")+"</a><br><br>";mapa=retorno.data.mapas;ig1lt=mapa.length;ig1=0;urlinterface=window.location.origin+window.location.pathname;if(ig1lt>0){do{temp=mapa[ig1];nome=temp.NOME;if(temp.PUBLICADO){if(temp.PUBLICADO.toLowerCase()==="nao"){nome="<s>"+nome+"</s>"}}lkd=temp.LINK;link=i3GEO.configura.locaplic+"/ms_criamapa.php?temasa="+temp.TEMAS+"&layers="+temp.LIGADOS;if(temp.EXTENSAO!==""){link+="&mapext="+temp.EXTENSAO}if(temp.OUTROS!==""){link+="&"+temp.OUTROS}if(lkd!==""){link=lkd}ins+="<div style='width:170px;background-color:white;padding:5px;margin:auto;border: 1px solid #F0F0F0;border-radius: 5px;box-shadow: 1px 1px 1px 1px #D3D3D3;' >";if(temp.IMAGEM&&temp.IMAGEM!=""){ins+="<div style=text-align:center ><a href='"+link+"' style=text-align:center;text-decoration:none; >"+"<img src='"+temp.IMAGEM+"'></a></div><br>"}if(temp.CONTEMMAPFILE=="nao"){ins+="<div><p class=paragrafo style=text-align:center;cursor:pointer >"+"<a href='"+link+"' style=text-align:center;text-decoration:none; >"+nome+" ("+temp.ID_MAPA+")</a></p></div>"}else{combo="<select style='width:170px;' onchange='i3GEO.guias.CONFIGURA.mapas.mostraLink("+ig1+",this.value)'>"+"<option value=''>"+$trad("x103")+":</option>"+"<option value='"+link+"'>Como foi salvo</option>"+"<option value='"+link+"&interface="+urlinterface+"'>Com a interface atual</option>"+"<option value='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?restauramapa="+temp.ID_MAPA+"&fundo=e_wsm'>Openlayers com todos os botoes</option>"+"<option value='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?restauramapa="+temp.ID_MAPA+"&fundo=est_wms'>Sem o fundo</option>"+"<option value='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?restauramapa="+temp.ID_MAPA+"&fundo=e_wsm&botoes=legenda pan zoombox zoomtot zoomin zoomout distancia area identifica'>Com booes principais</option>"+"<option value='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?restauramapa="+temp.ID_MAPA+"&botoes=legenda pan zoombox zoomtot zoomin zoomout'>Botoes de navegacao</option>"+"</select>";ins+="<div>"+"<p class=paragrafo style=text-align:center;cursor:pointer >"+"<img style=text-align:center src='"+i3GEO.configura.locaplic+"/ferramentas/salvamapa/geraminiatura.php?w=100&h=67&restauramapa="+temp.ID_MAPA+"'><br><br>"+"<a href='"+link+"' style=text-align:center;text-decoration:none; >"+nome+" ("+temp.ID_MAPA+")</a>"+"<br>"+combo+"<br><div style='cursor:pointer;' id='i3geoMapasLink_"+ig1+"' ></div>"+"</p></div>"}ins+="</div><br>";ig1++}while(ig1<ig1lt)}$i(onde).innerHTML=ins+"</div>"};if($i(i3GEO.guias.CONFIGURA.mapas.idconteudo)){$i(i3GEO.guias.CONFIGURA.mapas.idconteudo).innerHTML="Aguarde..."}i3GEO.guias.mostra("mapas");i3GEO.php.pegaMapas(pegaMapas);i3GEO.navega.removeCookieExtensao()}}},ORDEM:"",TIPO:"guia",IDGUIAS:"guiasYUI",cria:function(onde){var nguiasreal=0,guiaconteudo,id,guia,g,re,ng,tituloguia,i,ins,altura,temp,CONFIGURA=i3GEO.guias.CONFIGURA,guias=i3GEO.util.listaChaves(CONFIGURA),nguias=guias.length;if(i3GEO.guias.TIPO==="movel"){i3GEO.guias.IDGUIAS="i3GEOguiaMovelConteudo";for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo)){i3GEO.guias.guiaMovel.config.guias.ids.push(i3GEO.guias.CONFIGURA[guias[ng]].id);i3GEO.guias.guiaMovel.config.guias.idsconteudos.push(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo);if(i3GEO.guias.CONFIGURA[guias[ng]].icone!==undefined){i3GEO.guias.guiaMovel.config.guias.icones.push(i3GEO.guias.CONFIGURA[guias[ng]].icone)}else{i3GEO.guias.guiaMovel.config.guias.icones.push("imagens/gisicons/open1.png")}i3GEO.guias.guiaMovel.config.guias.titulos.push(i3GEO.guias.CONFIGURA[guias[ng]].titulo);i3GEO.guias.guiaMovel.config.guias.chaves.push(guias[ng])}}return}try{for(g=0;g<12;g++){tituloguia="";if($i("guia"+g)){tituloguia=$i("guia"+g).innerHTML;re=new RegExp(" ","g");tituloguia=tituloguia.replace(re,'');for(ng=0;ng<nguias;ng++){if(CONFIGURA[guias[ng]].id==="guia"+g){tituloguia=""}}if(tituloguia!==""){i3GEO.guias.CONFIGURA["guia"+g]=[];i3GEO.guias.CONFIGURA["guia"+g].titulo=tituloguia;i3GEO.guias.CONFIGURA["guia"+g].id="guia"+g;i3GEO.guias.CONFIGURA["guia"+g].idconteudo="guia"+g+"obj";if($i('guia'+g).onclick){i3GEO.guias.CONFIGURA["guia"+g].click=$i("guia"+g).onclick}}}}if(i3GEO.guias.ORDEM===""){guias=i3GEO.util.listaChaves(CONFIGURA)}else{guias=i3GEO.guias.ORDEM}nguias=guias.length;if(arguments.length===0){for(ng=0;ng<nguias;ng++){if(i3GEO.guias.CONFIGURA[guias[ng]]){i=$i(i3GEO.guias.CONFIGURA[guias[ng]].id);if(i){onde=i.parentNode}}}}else{onde=$i(onde)}if(!onde){return}onde.id=i3GEO.guias.IDGUIAS;onde.className="yui-navset";if(i3GEO.guias.TIPO==="guia"||i3GEO.guias.TIPO==="tablet"){ins='<ul class="yui-nav" style="border-width:0pt 0pt 0px;border-color:rgb(240,240,240);border-bottom-color:white;text-align:center;">';for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){if($i(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo)){ins+='<li><a alt="" title=""><em><div id="'+i3GEO.guias.CONFIGURA[guias[ng]].id+'" >'+i3GEO.guias.CONFIGURA[guias[ng]].titulo+'</div></em></a></li>'}}}ins+="</ul>";onde.innerHTML=ins}if(i3GEO.guias.TIPO==="sanfona"){ins='<dl id=sanfona'+onde.id+' class="accordion" >';if(i3GEO.guias.ORDEM===""){for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){nguiasreal++}}}else{nguiasreal=i3GEO.guias.ORDEM.length}if(navn){altura=i3GEO.parametros.h-(nguiasreal*25)-1}else{altura=i3GEO.parametros.h-(nguiasreal*23)+1}for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){id=i3GEO.guias.CONFIGURA[guias[ng]].idconteudo;temp=$i(id);if(temp){guiaconteudo=temp.innerHTML;temp.innerHTML="";temp.style.display="none";temp.id="";ins+='<dt style=height:17px id="'+i3GEO.guias.CONFIGURA[guias[ng]].id+'" >'+'<table class=accordiontable ><tr><td width="98%" >'+i3GEO.guias.CONFIGURA[guias[ng]].titulo+'</td><td width="2%" ><img id="" src="'+i3GEO.configura.locaplic+'/imagens/branco.gif" style="width:10px;" /></td></tr></table>'+'<dd clas=close >'+'<div class=bd >'+'<div id="'+id+'" >'+guiaconteudo+'</div></div></dd>'}}}ins+="</dl>";onde.innerHTML=ins;onde.style.height=altura+"px";YAHOO.lutsr.accordion.init(true,5,false,"sanfona"+onde.id,altura);i3GEO.guias.ALTURACORPOGUIAS=altura}for(g=0;g<nguias;g++){guia=i3GEO.guias.CONFIGURA[guias[g]];id=guia.id;guiaconteudo=$i(id);if(guiaconteudo){if(guia.click===""||guia.click===undefined){eval('$i("'+id+'").onclick = function(event){i3GEO.guias.mostra("'+guias[g]+'");}')}else{guiaconteudo.onclick=guia.click}YAHOO.util.Event.addListener($i(id),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addListener($i(id),"click",YAHOO.util.Event.stopPropagation);YAHOO.util.Event.addFocusListener($i(id),YAHOO.util.Event.preventDefault);guiaconteudo.onmouseover=function(){};guiaconteudo.onmouseout=function(){};temp=$i(guia.idconteudo);if(temp){temp.style.overflow="auto";if(i3GEO.guias.TIPO==="guia"){if(i3GEO.guias.ALTURACORPOGUIAS===0){temp.style.height=i3GEO.parametros.h+"px"}else{temp.style.height=i3GEO.guias.ALTURACORPOGUIAS+"px"}}else{temp.style.height=onde.style.height}}}}}catch(e){}if(i3GEO.guias.TIPO!=="tablet"){i3GEO.guias.mostra(i3GEO.guias.ATUAL);i3GEO.guias.ativa(i3GEO.guias.ATUAL)}else{i3GEO.guias.escondeGuias()}},ajustaAltura:function(){var guia,guias,nguias,temp,temps,n,i,g,altura=0;if(i3GEO.guias.ALTURACORPOGUIAS!=0){altura=i3GEO.guias.ALTURACORPOGUIAS}guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){guia=$i(this.CONFIGURA[guias[g]].idconteudo);if(guia){guia.style.overflow="auto";if(this.TIPO==="guia"){if(altura===0){guia.style.height=i3GEO.parametros.h+"px"}else{guia.style.height=altura+"px"}}if(this.TIPO==="sanfona"){guia.style.height=altura+"px";temp=$i("guiasYUI");if(temp){temp.style.height=altura+"px";temps=temp.getElementsByTagName("dd");n=temps.length;for(i=0;i<n;i++){if(temps[i].style.visibility=="visible"){temps[i].style.height=altura+"px"}}}YAHOO.lutsr.accordion.properties.altura=altura}}}},escondeGuias:function(){var guias,nguias,g,temp,attributes,anim;guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){temp=$i(this.CONFIGURA[guias[g]].idconteudo);if(temp){if(i3GEO.guias.TIPO==="tablet"&&temp.style.display==="block"){temp.style.overflow="hidden";attributes={height:{to:0},id:this.CONFIGURA[guias[g]].idconteudo};anim=new YAHOO.util.Anim(temp,attributes,1,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){var temp=$i(anim.attributes.id);temp.style.overflow="auto";temp.style.display="none";if(i3GEO.barraDeBotoes.BARRAS[0]){i3GEO.barraDeBotoes.BARRAS[0].show()}});anim.animate()}else{temp.style.display="none"}}if($i(this.CONFIGURA[guias[g]].id)&&i3GEO.guias.TIPO!=="movel"){$i(this.CONFIGURA[guias[g]].id).parentNode.parentNode.style.background="transparent"}}},mostra:function(guia){var guias,nguias,g,temp,attributes,anim;guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;if(!$i(i3GEO.guias.CONFIGURA[guia].id)){return}if(!$i(i3GEO.guias.CONFIGURA[guia].idconteudo)){return}if($i(i3GEO.guias.CONFIGURA[guia].idconteudo).style.display==="block"&&i3GEO.guias.TIPO==="tablet"){i3GEO.guias.escondeGuias();return}if(i3GEO.guias.TIPO!=="movel"){for(g=0;g<nguias;g++){if($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo)){$i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo).style.display="none"}if($i(i3GEO.guias.CONFIGURA[guias[g]].id)){$i(i3GEO.guias.CONFIGURA[guias[g]].id).parentNode.parentNode.style.background="transparent"}}}if(i3GEO.guias.CONFIGURA.toString().search(guia)<0){for(g=0;g<nguias;g++){if(i3GEO.guias.CONFIGURA[guias[g]].id===guia){guia=guias[g]}}}if(i3GEO.guias.CONFIGURA[guia]){temp=$i(i3GEO.guias.CONFIGURA[guia].idconteudo);if(temp){if(i3GEO.guias.TIPO==="tablet"){if(i3GEO.barraDeBotoes.BARRAS[0]){i3GEO.barraDeBotoes.BARRAS[0].hide()}temp.style.left=(i3GEO.parametros.w/2)-150+"px";temp.style.height=0;temp.style.display="block";temp.style.zIndex=9000;temp.style.overflow="hidden";attributes={height:{to:i3GEO.parametros.h-10}};anim=new YAHOO.util.Anim(temp,attributes,1,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){temp.style.overflow="auto";temp.style.display="block"});if(DetectaMobile("DetectAndroid")===true){temp.style.height="";temp.style.overflow="auto"}else{anim.animate()}}else{temp.style.display="block"}if(i3GEO.guias.TIPO!=="movel"){$i(i3GEO.guias.CONFIGURA[guia].id).parentNode.parentNode.style.backgroundColor="white"}i3GEO.guias.ATUAL=guia}}},ativa:function(guia){try{i3GEO.guias.ATUAL=guia;if(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].click!==""){i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].click.call()}}catch(e){}},libera:function(){if(!$i("conteudojanelaguias")){var i,w,pos,a,l,temp;$i(i3GEO.Interface.IDCORPO).style.left="0px";if($i(this.IDGUIAS)){$i(this.IDGUIAS).style.display="none"}i=$i("contemFerramentas");w=parseInt($i("contemFerramentas").style.width,10);$i("contemFerramentas").style.width="0px";pos="px";a=i3GEO.parametros.h;l=i3GEO.parametros.w+w;i3GEO.parametros.h=a;i3GEO.parametros.w=l;i=$i(i3GEO.Interface.IDCORPO);if(i){i.style.width=l+pos;i.style.height=a+pos}i=$i(i3GEO.Interface.IDMAPA);if(i){i.style.width=l+pos;i.style.height=a+pos;i.style.clip='rect('+0+" "+(l*1+2)+" "+(a*1+2)+" "+0+')'}i=$i("mst");if(i){i.style.width=l+1+pos}i3GEO.mapa.ajustaPosicao();temp=function(retorno){var novoel,temp,i,g,guias,nguias,janela;novoel=document.createElement("div");novoel.id="janelaguias";novoel.style.display="block";novoel.innerHTML='<div class="hd">Guias <div onclick ="i3GEO.janela.minimiza(\'conteudojanelaguias\')" id="janelaguias_minimizaCabecalho" class="container-minimiza" ></div></div><div class="bd" id="conteudojanelaguias_corpo" style=padding:0px ></div>';temp=$i("i3geo")?$i("i3geo").appendChild(novoel):document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("janelaguias",{width:"270px",fixedcenter:true,constraintoviewport:false,underlay:"none",close:false,visible:true,draggable:true,modal:false,iframe:true});YAHOO.i3GEO.janela.manager.register(janela);janela.render();janela.show();janela.cfg.setProperty("y",0);i=$i(i3GEO.guias.IDGUIAS);$i("conteudojanelaguias_corpo").appendChild(i);i.style.borderLeft="1px solid black";i.style.borderRight="1px solid black";guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){if($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo)){$i("conteudojanelaguias_corpo").appendChild($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo));temp=$i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo).style;temp.background="white";temp.border="1px solid black";temp.borderTop="0px solid black";temp.width="270px";temp.left="-1px";temp.height=i3GEO.parametros.h-90+"px"}}i3GEO.atualiza("");i.style.display="block";i.style.left="-1px";i.style.width="270px"};i3GEO.php.mudatamanho(temp,a,l)}else{janela=YAHOO.i3GEO.janela.manager.find(id);janela.show();janela.bringToTop()}},mostraGuiaFerramenta:function(guia,namespace){var g,Dom=YAHOO.util.Dom;if(!namespace){namespace="guia"}for(g=0;g<12;g++){Dom.setStyle(namespace+g+"obj","display","none")}Dom.setStyle(guia+"obj","display","block")},ajustaGuiaFerramenta:function(idjanela,namespace){var c=$i(idjanela+"_corpo"),h,g,temp;c.style.overflow="unset";c.style.overflow="none";h=c.style.height;h=parseInt(h,10)-40+"px";for(g=0;g<12;g++){temp=$i(namespace+"guia"+g+"obj");if(temp){temp.style.height=h;temp.style.width="100%";temp.style.overflow="auto"}}},guiaMovel:{ABERTA:false,config:{larguraPuxador:50,alturaPuxador:319,alturaGuiaMovel:0,larguraGuiaMovel:320,topGuiaMovel:0,guias:{icones:[],ids:[],idsconteudos:[],titulos:[],chaves:[]},posicao:["c","r"]},left:0,inicia:function(){var posMapa=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA)),centroY=posMapa[1]+(i3GEO.parametros.h/2),config=i3GEO.guias.guiaMovel.config,temp;if(i3GEO.guias.ALTURACORPOGUIAS===0&&config.alturaGuiaMovel===0){i3GEO.guias.guiaMovel.config.alturaGuiaMovel=i3GEO.parametros.h}else{i3GEO.guias.guiaMovel.config.alturaGuiaMovel=i3GEO.guias.ALTURACORPOGUIAS}config=i3GEO.guias.guiaMovel.config;temp=$i("i3GEOguiaMovel").style;if(config.posicao[1]==="r"){temp.left=(posMapa[0]+i3GEO.parametros.w-config.larguraPuxador)+"px";i3GEO.guias.guiaMovel.left=parseInt(temp.left,10)+"px"}if(config.posicao[1]==="l"){temp.left=posMapa[0]+"px";i3GEO.guias.guiaMovel.left=parseInt(temp.left,10)+"px"}if(config.topGuiaMovel===0){temp.top=(centroY-((config.alturaGuiaMovel-42)/2))+"px"}else{temp.top=config.topGuiaMovel+"px"}temp.width=config.larguraPuxador+"px";temp.height=config.alturaGuiaMovel+"px";temp=$i("i3GEOguiaMovelMolde").style;temp.top="0px";if(config.posicao[1]==="r"){temp.left=config.larguraPuxador+"px"}if(config.posicao[1]==="l"){temp.left="1px"}temp.height=config.alturaGuiaMovel+"px";temp.backgroundColor="white";if($i("i3GEOguiaMovelPuxador")){temp=$i("i3GEOguiaMovelPuxador").style;temp.top=((config.alturaGuiaMovel-config.alturaPuxador)/2)+"px";temp.left="0px";temp.width=config.larguraPuxador+"px";temp.height=config.alturaPuxador+"px"}temp=$i("i3GEOguiaMovelIcones");if(temp){temp=temp.style;temp.left="1px";temp.top="1px";temp.width=(config.larguraGuiaMovel-1)+"px";temp.height="35px";if(navm){temp.height="37px"}temp.zIndex=5;temp.paddingTop="2px";YAHOO.util.Dom.setStyle("i3GEOguiaMovelIcones","opacity",0.60)}temp=$i("i3GEOguiaMovelConteudo").style;temp.left="1px";if(temp.top==""){temp.top="38px"}temp.height=(config.alturaGuiaMovel-39)+"px";if(navm){temp.width=(config.larguraGuiaMovel-1)+"px"}else{temp.width=(config.larguraGuiaMovel-5)+"px"}temp.paddingLeft="4px";YAHOO.util.Dom.setStyle("i3GEOguiaMovelConteudo","opacity",0.70);YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.10);$i("i3GEOguiaMovelMolde").onmouseover=function(){if($i("i3GEOguiaMovelConteudo").style.display==="block"){YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.9)}if($i("i3GEOguiaMovelIcones")&&$i("i3GEOguiaMovelIcones").innerHTML===""){i3GEO.guias.guiaMovel.mostraIcones()}};$i("i3GEOguiaMovelMolde").onmouseout=function(){YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.90);if($i("i3GEOguiaMovelIcones")&&$i("i3GEOguiaMovelIcones").innerHTML===""){i3GEO.guias.guiaMovel.mostraIcones()}};if(i3GEO.guias.guiaMovel.ABERTA===true){i3GEO.guias.guiaMovel.ativa(i3GEO.guias.ATUAL)}i3GEO.guias.guiaMovel.mostraIcones();temp=$i("i3GEOguiaMovel");temp.style.visibility="visible";temp.style.height=parseInt(temp.style.height)-20+"px";i3GEO.util.aparece("i3GEOguiaMovel",300,100)},mostraIcones:function(){if($i("i3GEOguiaMovelIcones")&&$i("i3GEOguiaMovelIcones").innerHTML!=""){return}var n=i3GEO.guias.guiaMovel.config.guias.icones.length,i,temp=i3GEO.guias.guiaMovel.config.guias,ins="",ico;if(i3GEO.guias.ORDEM!==""){temp.chaves=i3GEO.guias.ORDEM}for(i=0;i<n;i++){if(temp.chaves[i]){ico="<button title='"+temp.titulos[i]+"' onmouseout='javascript:this.className = \"iconeGuiaMovel iconeGuiaMovelMouseOut\"' onmouseover='javascript:this.className = \"iconeGuiaMovel iconeGuiaMovelMouseOver\"' onclick='i3GEO.guias.guiaMovel.ativa(\""+temp.chaves[i]+"\")' class=iconeGuiaMovel ><img id='"+temp.ids[i]+"' src='"+i3GEO.configura.locaplic+"/"+temp.icones[i]+"' style='cursor:pointer;' /></button>";if(!$i("iconeGuia_"+temp.chaves[i])){ins+=ico}else{$i("iconeGuia_"+temp.chaves[i]).innerHTML=ico}}}if($i("i3GEOguiaMovelIcones")){$i("i3GEOguiaMovelIcones").innerHTML=ins}ins="1.2px";if(navn&&chro===false){ins="0px"}for(i=0;i<n;i++){ico=$i(temp.ids[i]);if(ico){YAHOO.util.Dom.setStyle(ico,"padding",ins)}}i3GEO.guias.guiaMovel.desativaIcones();if(i3GEO.guias.ATUAL!=""){ico=$i(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].id);if(ico){YAHOO.util.Dom.setStyle(ico,"opacity",0.9);ico.parentNode.style.boxShadow="none"}}},desativaIcones:function(o){var ims,n,i;if(!o){o=0.9}ims=$i("i3GEOguiaMovelIcones");if(ims){ims=ims.getElementsByTagName("button");n=ims.length;for(i=0;i<n;i++){YAHOO.util.Dom.setStyle(ims[i],"opacity",o);ims[i].style.boxShadow="none"}}n=i3GEO.guias.guiaMovel.config.guias.icones.length;temp=i3GEO.guias.guiaMovel.config.guias;for(i=0;i<n;i++){if($i("iconeGuia_"+temp.chaves[i])){ims=$i("iconeGuia_"+temp.chaves[i]).getElementsByTagName("button");if(ims.length>0){ims[0].style.backgroundColor="white";ims[0].style.boxShadow="none";ims[0].style.margin="0px";ims[0].style.border="1px solid gray";if(i3GEO.guias.guiaMovel.config.posicao[1]==="l"){ims[0].style.borderLeft="2px solid white"}else{ims[0].style.borderRight="2px solid white"}YAHOO.util.Dom.setStyle(ims[0],"opacity",o);ims[0].blur()}}}},ativa:function(chave){if(chave===""){i3GEO.guias.guiaMovel.desativaIcones();return}i3GEO.guias.escondeGuias();i3GEO.guias.guiaMovel.desativaIcones(0.5);if(i3GEO.guias.ATUAL===chave&&$i("i3GEOguiaMovelMolde").style.display==="block"){i3GEO.guias.ATUAL="";i3GEO.guias.guiaMovel.desativaIcones(0.9);i3GEO.guias.guiaMovel.abreFecha("fecha")}else{i3GEO.guias.ATUAL=chave;i3GEO.guias.guiaMovel.abreFecha("abre");if(i3GEO.guias.CONFIGURA[chave].click){i3GEO.guias.CONFIGURA[chave].click.call()}i3GEO.guias.mostra(chave);var ico=$i(i3GEO.guias.CONFIGURA[chave].id);if(ico){ico.parentNode.blur();YAHOO.util.Dom.setStyle(ico.parentNode,"opacity",0.9);ico.parentNode.style.boxShadow="none";if($i("iconeGuia_"+chave)){if(i3GEO.guias.guiaMovel.config.posicao[1]==="l"){ico.parentNode.style.borderLeft="2px solid white"}else{ico.parentNode.style.borderRight="2px solid white"}}}}},reposiciona:function(){var temp=$i("i3GEOguiaMovel").style.top;i3GEO.guias.guiaMovel.config.alturaGuiaMovel=0;i3GEO.guias.ALTURACORPOGUIAS=0;if($i("i3GEOguiaMovelIcones")){$i("i3GEOguiaMovelIcones").style.display="none"}$i("i3GEOguiaMovelConteudo").style.display="none";$i("i3GEOguiaMovelMolde").style.display="none";i3GEO.guias.escondeGuias();i3GEO.guias.guiaMovel.inicia();$i("i3GEOguiaMovel").style.top=temp},abreFecha:function(forca){var molde=$i("i3GEOguiaMovelMolde"),guia=$i("i3GEOguiaMovel"),attributes,anim,anim1,anim2,temp;if(!forca){if(molde.style.display==="block"){forca="fecha"}else{temp=i3GEO.guias.ATUAL;i3GEO.guias.ATUAL="";i3GEO.guias.guiaMovel.ativa(temp);return}}if(forca==="fecha"){if($i("i3GEOguiaMovelIcones")){$i("i3GEOguiaMovelIcones").style.display="none"}$i("i3GEOguiaMovelConteudo").style.display="none";attributes={left:{to:parseInt(i3GEO.guias.guiaMovel.left,10)},id:"i3GEOguiaMovel"};anim=new YAHOO.util.Anim(guia,attributes,1,YAHOO.util.Easing.easeNone);attributes={width:{to:0},id:"i3GEOguiaMovelMolde"};anim1=new YAHOO.util.Anim(molde,attributes,1,YAHOO.util.Easing.easeNone);anim.duration=0.5;anim1.duration=0.5;anim1.onComplete.subscribe(function(){molde.style.display="none"});if(i3GEO.guias.guiaMovel.config.posicao[1]==="l"&&$i("i3GEOguiaMovelIconesPuxador")){attributes={left:{to:0}};anim2=new YAHOO.util.Anim("i3GEOguiaMovelIconesPuxador",attributes,1,YAHOO.util.Easing.easeNone);anim2.duration=0.5;anim2.animate()}anim.animate();anim1.animate()}else if(molde.style.display!="block"){molde.style.display="block";if(i3GEO.guias.guiaMovel.config.posicao[1]==="l"){attributes={rigth:{to:(parseInt(guia.style.left,10)-i3GEO.guias.guiaMovel.config.larguraGuiaMovel)*-1},id:"i3GEOguiaMovel"}}else{attributes={left:{to:parseInt(guia.style.left,10)-i3GEO.guias.guiaMovel.config.larguraGuiaMovel},id:"i3GEOguiaMovel"}}anim=new YAHOO.util.Anim(guia,attributes,1,YAHOO.util.Easing.easeNone);attributes={width:{to:i3GEO.guias.guiaMovel.config.larguraGuiaMovel},id:"i3GEOguiaMovelMolde"};anim1=new YAHOO.util.Anim(molde,attributes,1,YAHOO.util.Easing.easeNone);anim.duration=0.5;anim1.duration=0.5;anim1.onComplete.subscribe(function(){if($i("i3GEOguiaMovelIcones")){$i("i3GEOguiaMovelIcones").style.display="block"}$i("i3GEOguiaMovelConteudo").style.display="block";YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.9)});if(i3GEO.guias.guiaMovel.config.posicao[1]==="l"&&$i("i3GEOguiaMovelIconesPuxador")){attributes={left:{to:i3GEO.guias.guiaMovel.config.larguraGuiaMovel}};anim2=new YAHOO.util.Anim("i3GEOguiaMovelIconesPuxador",attributes,1,YAHOO.util.Easing.easeNone);anim2.duration=0.5;anim2.animate()}anim.animate();anim1.animate()}}}}; | |
| 2 | 1 | \ No newline at end of file |
| 2 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.guias={ATUAL:"temas",ALTURACORPOGUIAS:0,CONFIGURA:{"temas":{icone:"imagens/layer.png",titulo:$trad("g4a"),id:"guia1",idconteudo:"guia1obj",click:""},"adiciona":{icone:"imagens/catalogo.png",titulo:$trad("g1a"),id:"guia2",idconteudo:"guia2obj",click:function(){var ondeArvore;i3GEO.guias.mostra("adiciona");if(!$i("arvoreAdicionaTema")){try{ondeArvore=objmapa.guiaMenu+"obj"}catch(e){ondeArvore="guia2obj"}}else{ondeArvore="arvoreAdicionaTema"}if(document.getElementById("outrasOpcoesAdiciona")){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde="outrasOpcoesAdiciona";i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore=false}i3GEO.arvoreDeTemas.cria(i3GEO.configura.sid,i3GEO.configura.locaplic,ondeArvore)}},"legenda":{icone:"imagens/legenda.png",titulo:$trad("g3"),id:"guia4",idconteudo:"guia4obj",click:function(){i3GEO.guias.mostra("legenda");i3GEO.util.defineValor(i3GEO.mapa.legendaHTML.ID,"innerHTML","");i3GEO.mapa.legendaHTML.cria("guia4obj")}},"mapas":{icone:"imagens/gisicons/show-links.png",titulo:"Links",id:"guia5",idconteudo:"guia5obj",mostraLink:function(id,url){$i("i3geoMapasLink_"+id).innerHTML="<a href='"+url+"' target=_blank >"+url+"</a>"},click:function(onde){if(!onde){onde=i3GEO.guias.CONFIGURA.mapas.idconteudo}var pegaMapas=function(retorno){var ins,mapa,ig1lt,ig1,nome,lkd,link,temp,combo,urlinterface;ins="<br><div id='banners' style='overflow:auto;text-align:center'>"+"<a href='"+i3GEO.configura.locaplic+"/admin/html/mapas.html' target=_blank >"+$trad("x89")+"</a><br><br>";mapa=retorno.data.mapas;ig1lt=mapa.length;ig1=0;urlinterface=window.location.origin+window.location.pathname;if(ig1lt>0){do{temp=mapa[ig1];nome=temp.NOME;if(temp.PUBLICADO){if(temp.PUBLICADO.toLowerCase()==="nao"){nome="<s>"+nome+"</s>"}}lkd=temp.LINK;link=i3GEO.configura.locaplic+"/ms_criamapa.php?temasa="+temp.TEMAS+"&layers="+temp.LIGADOS;if(temp.EXTENSAO!==""){link+="&mapext="+temp.EXTENSAO}if(temp.OUTROS!==""){link+="&"+temp.OUTROS}if(lkd!==""){link=lkd}ins+="<div style='width:170px;background-color:white;padding:5px;margin:auto;border: 1px solid #F0F0F0;border-radius: 5px;box-shadow: 1px 1px 1px 1px #D3D3D3;' >";if(temp.IMAGEM&&temp.IMAGEM!=""){ins+="<div style=text-align:center ><a href='"+link+"' style=text-align:center;text-decoration:none; >"+"<img src='"+temp.IMAGEM+"'></a></div><br>"}if(temp.CONTEMMAPFILE=="nao"){ins+="<div><p class=paragrafo style=text-align:center;cursor:pointer >"+"<a href='"+link+"' style=text-align:center;text-decoration:none; >"+nome+" ("+temp.ID_MAPA+")</a></p></div>"}else{combo="<select style='width:170px;' onchange='i3GEO.guias.CONFIGURA.mapas.mostraLink("+ig1+",this.value)'>"+"<option value=''>"+$trad("x103")+":</option>"+"<option value='"+link+"'>Como foi salvo</option>"+"<option value='"+link+"&interface="+urlinterface+"'>Com a interface atual</option>"+"<option value='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?restauramapa="+temp.ID_MAPA+"&fundo=e_wsm'>Openlayers com todos os botoes</option>"+"<option value='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?restauramapa="+temp.ID_MAPA+"&fundo=est_wms'>Sem o fundo</option>"+"<option value='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?restauramapa="+temp.ID_MAPA+"&fundo=e_wsm&botoes=legenda pan zoombox zoomtot zoomin zoomout distancia area identifica'>Com booes principais</option>"+"<option value='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?restauramapa="+temp.ID_MAPA+"&botoes=legenda pan zoombox zoomtot zoomin zoomout'>Botoes de navegacao</option>"+"</select>";ins+="<div>"+"<p class=paragrafo style=text-align:center;cursor:pointer >"+"<img style=text-align:center src='"+i3GEO.configura.locaplic+"/ferramentas/salvamapa/geraminiatura.php?w=100&h=67&restauramapa="+temp.ID_MAPA+"'><br><br>"+"<a href='"+link+"' style=text-align:center;text-decoration:none; >"+nome+" ("+temp.ID_MAPA+")</a>"+"<br>"+combo+"<br><div style='cursor:pointer;' id='i3geoMapasLink_"+ig1+"' ></div>"+"</p></div>"}ins+="</div><br>";ig1++}while(ig1<ig1lt)}$i(onde).innerHTML=ins+"</div>"};if($i(i3GEO.guias.CONFIGURA.mapas.idconteudo)){$i(i3GEO.guias.CONFIGURA.mapas.idconteudo).innerHTML="Aguarde..."}i3GEO.guias.mostra("mapas");i3GEO.php.pegaMapas(pegaMapas);i3GEO.navega.removeCookieExtensao()}}},ORDEM:"",TIPO:"guia",IDGUIAS:"guiasYUI",cria:function(onde){var atrib,nguiasreal=0,guiaconteudo,id,guia,g,re,ng,tituloguia,i,ins,altura,temp,CONFIGURA=i3GEO.guias.CONFIGURA,guias=i3GEO.util.listaChaves(CONFIGURA),nguias=guias.length;if(i3GEO.guias.TIPO==="movel"){i3GEO.guias.IDGUIAS="i3GEOguiaMovelConteudo";for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo)){i3GEO.guias.guiaMovel.config.guias.ids.push(i3GEO.guias.CONFIGURA[guias[ng]].id);i3GEO.guias.guiaMovel.config.guias.idsconteudos.push(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo);if(i3GEO.guias.CONFIGURA[guias[ng]].icone!==undefined){i3GEO.guias.guiaMovel.config.guias.icones.push(i3GEO.guias.CONFIGURA[guias[ng]].icone)}else{i3GEO.guias.guiaMovel.config.guias.icones.push("imagens/gisicons/open1.png")}i3GEO.guias.guiaMovel.config.guias.titulos.push(i3GEO.guias.CONFIGURA[guias[ng]].titulo);i3GEO.guias.guiaMovel.config.guias.chaves.push(guias[ng])}}return}try{for(g=0;g<12;g++){tituloguia="";if($i("guia"+g)){tituloguia=$i("guia"+g).innerHTML;re=new RegExp(" ","g");tituloguia=tituloguia.replace(re,'');for(ng=0;ng<nguias;ng++){if(CONFIGURA[guias[ng]].id==="guia"+g){tituloguia=""}}if(tituloguia!==""){i3GEO.guias.CONFIGURA["guia"+g]=[];i3GEO.guias.CONFIGURA["guia"+g].titulo=tituloguia;i3GEO.guias.CONFIGURA["guia"+g].id="guia"+g;i3GEO.guias.CONFIGURA["guia"+g].idconteudo="guia"+g+"obj";if($i('guia'+g).onclick){i3GEO.guias.CONFIGURA["guia"+g].click=$i("guia"+g).onclick}}}}if(i3GEO.guias.ORDEM===""){guias=i3GEO.util.listaChaves(CONFIGURA)}else{guias=i3GEO.guias.ORDEM}nguias=guias.length;if(arguments.length===0){for(ng=0;ng<nguias;ng++){if(i3GEO.guias.CONFIGURA[guias[ng]]){i=$i(i3GEO.guias.CONFIGURA[guias[ng]].id);if(i){onde=i.parentNode}}}}else{onde=$i(onde)}if(!onde){return}onde.id=i3GEO.guias.IDGUIAS;onde.className="yui-navset";if(i3GEO.guias.TIPO==="guia"||i3GEO.guias.TIPO==="tablet"){ins='<ul class="yui-nav" style="border-width:0pt 0pt 0px;border-color:rgb(240,240,240);border-bottom-color:white;text-align:center;">';for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){if($i(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo)){ins+='<li><a alt="" title=""><em><div id="'+i3GEO.guias.CONFIGURA[guias[ng]].id+'" >'+i3GEO.guias.CONFIGURA[guias[ng]].titulo+'</div></em></a></li>'}}}ins+="</ul>";onde.innerHTML=ins}if(i3GEO.guias.TIPO==="sanfona"){ins='<dl id=sanfona'+onde.id+' class="accordion" >';if(i3GEO.guias.ORDEM===""){for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){nguiasreal++}}}else{nguiasreal=i3GEO.guias.ORDEM.length}if(navn){altura=i3GEO.parametros.h-(nguiasreal*25)-1}else{altura=i3GEO.parametros.h-(nguiasreal*23)+1}for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){id=i3GEO.guias.CONFIGURA[guias[ng]].idconteudo;temp=$i(id);if(temp){guiaconteudo=temp.innerHTML;temp.innerHTML="";temp.style.display="none";temp.id="";ins+='<dt style=height:17px id="'+i3GEO.guias.CONFIGURA[guias[ng]].id+'" >'+'<table class=accordiontable ><tr><td width="98%" >'+i3GEO.guias.CONFIGURA[guias[ng]].titulo+'</td><td width="2%" ><img id="" src="'+i3GEO.configura.locaplic+'/imagens/branco.gif" style="width:10px;" /></td></tr></table>'+'<dd clas=close >'+'<div class=bd >'+'<div id="'+id+'" >'+guiaconteudo+'</div></div></dd>'}}}ins+="</dl>";onde.innerHTML=ins;onde.style.height=altura+"px";YAHOO.lutsr.accordion.init(true,5,false,"sanfona"+onde.id,altura);i3GEO.guias.ALTURACORPOGUIAS=altura}for(g=0;g<nguias;g++){guia=i3GEO.guias.CONFIGURA[guias[g]];id=guia.id;guiaconteudo=$i(id);if(guiaconteudo){if(guia.click===""||guia.click===undefined){atrib=document.createAttribute("nomeGuia");atrib.value=guias[g];$i(id).setAttributeNode(atrib);$i(id).onclick=function(event){i3GEO.guias.mostra(this.attributes["nomeGuia"].value)}}else{guiaconteudo.onclick=guia.click}YAHOO.util.Event.addListener($i(id),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addListener($i(id),"click",YAHOO.util.Event.stopPropagation);YAHOO.util.Event.addFocusListener($i(id),YAHOO.util.Event.preventDefault);guiaconteudo.onmouseover=function(){};guiaconteudo.onmouseout=function(){};temp=$i(guia.idconteudo);if(temp){temp.style.overflow="auto";if(i3GEO.guias.TIPO==="guia"){if(i3GEO.guias.ALTURACORPOGUIAS===0){temp.style.height=i3GEO.parametros.h+"px"}else{temp.style.height=i3GEO.guias.ALTURACORPOGUIAS+"px"}}else{temp.style.height=onde.style.height}}}}}catch(e){}if(i3GEO.guias.TIPO!=="tablet"){i3GEO.guias.mostra(i3GEO.guias.ATUAL);i3GEO.guias.ativa(i3GEO.guias.ATUAL)}else{i3GEO.guias.escondeGuias()}},ajustaAltura:function(){var guia,guias,nguias,temp,temps,n,i,g,altura=0;if(i3GEO.guias.ALTURACORPOGUIAS!=0){altura=i3GEO.guias.ALTURACORPOGUIAS}guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){guia=$i(this.CONFIGURA[guias[g]].idconteudo);if(guia){guia.style.overflow="auto";if(this.TIPO==="guia"){if(altura===0){guia.style.height=i3GEO.parametros.h+"px"}else{guia.style.height=altura+"px"}}if(this.TIPO==="sanfona"){guia.style.height=altura+"px";temp=$i("guiasYUI");if(temp){temp.style.height=altura+"px";temps=temp.getElementsByTagName("dd");n=temps.length;for(i=0;i<n;i++){if(temps[i].style.visibility=="visible"){temps[i].style.height=altura+"px"}}}YAHOO.lutsr.accordion.properties.altura=altura}}}},escondeGuias:function(){var guias,nguias,g,temp,attributes,anim;guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){temp=$i(this.CONFIGURA[guias[g]].idconteudo);if(temp){if(i3GEO.guias.TIPO==="tablet"&&temp.style.display==="block"){temp.style.overflow="hidden";attributes={height:{to:0},id:this.CONFIGURA[guias[g]].idconteudo};anim=new YAHOO.util.Anim(temp,attributes,1,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){var temp=$i(anim.attributes.id);temp.style.overflow="auto";temp.style.display="none";if(i3GEO.barraDeBotoes.BARRAS[0]){i3GEO.barraDeBotoes.BARRAS[0].show()}});anim.animate()}else{temp.style.display="none"}}if($i(this.CONFIGURA[guias[g]].id)&&i3GEO.guias.TIPO!=="movel"){$i(this.CONFIGURA[guias[g]].id).parentNode.parentNode.style.background="transparent"}}},mostra:function(guia){var guias,nguias,g,temp,attributes,anim;guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;if(!$i(i3GEO.guias.CONFIGURA[guia].id)){return}if(!$i(i3GEO.guias.CONFIGURA[guia].idconteudo)){return}if($i(i3GEO.guias.CONFIGURA[guia].idconteudo).style.display==="block"&&i3GEO.guias.TIPO==="tablet"){i3GEO.guias.escondeGuias();return}if(i3GEO.guias.TIPO!=="movel"){for(g=0;g<nguias;g++){if($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo)){$i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo).style.display="none"}if($i(i3GEO.guias.CONFIGURA[guias[g]].id)){$i(i3GEO.guias.CONFIGURA[guias[g]].id).parentNode.parentNode.style.background="transparent"}}}if(i3GEO.guias.CONFIGURA.toString().search(guia)<0){for(g=0;g<nguias;g++){if(i3GEO.guias.CONFIGURA[guias[g]].id===guia){guia=guias[g]}}}if(i3GEO.guias.CONFIGURA[guia]){temp=$i(i3GEO.guias.CONFIGURA[guia].idconteudo);if(temp){if(i3GEO.guias.TIPO==="tablet"){if(i3GEO.barraDeBotoes.BARRAS[0]){i3GEO.barraDeBotoes.BARRAS[0].hide()}temp.style.left=(i3GEO.parametros.w/2)-150+"px";temp.style.height=0;temp.style.display="block";temp.style.zIndex=9000;temp.style.overflow="hidden";attributes={height:{to:i3GEO.parametros.h-10}};anim=new YAHOO.util.Anim(temp,attributes,1,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){temp.style.overflow="auto";temp.style.display="block"});if(DetectaMobile("DetectAndroid")===true){temp.style.height="";temp.style.overflow="auto"}else{anim.animate()}}else{temp.style.display="block"}if(i3GEO.guias.TIPO!=="movel"){$i(i3GEO.guias.CONFIGURA[guia].id).parentNode.parentNode.style.backgroundColor="white"}i3GEO.guias.ATUAL=guia}}},ativa:function(guia){try{i3GEO.guias.ATUAL=guia;if(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].click!==""){i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].click.call()}}catch(e){}},libera:function(){if(!$i("conteudojanelaguias")){var i,w,pos,a,l,temp;$i(i3GEO.Interface.IDCORPO).style.left="0px";if($i(this.IDGUIAS)){$i(this.IDGUIAS).style.display="none"}i=$i("contemFerramentas");w=parseInt($i("contemFerramentas").style.width,10);$i("contemFerramentas").style.width="0px";pos="px";a=i3GEO.parametros.h;l=i3GEO.parametros.w+w;i3GEO.parametros.h=a;i3GEO.parametros.w=l;i=$i(i3GEO.Interface.IDCORPO);if(i){i.style.width=l+pos;i.style.height=a+pos}i=$i(i3GEO.Interface.IDMAPA);if(i){i.style.width=l+pos;i.style.height=a+pos;i.style.clip='rect('+0+" "+(l*1+2)+" "+(a*1+2)+" "+0+')'}i=$i("mst");if(i){i.style.width=l+1+pos}i3GEO.mapa.ajustaPosicao();temp=function(retorno){var novoel,temp,i,g,guias,nguias,janela;novoel=document.createElement("div");novoel.id="janelaguias";novoel.style.display="block";novoel.innerHTML='<div class="hd">Guias <div onclick ="i3GEO.janela.minimiza(\'conteudojanelaguias\')" id="janelaguias_minimizaCabecalho" class="container-minimiza" ></div></div><div class="bd" id="conteudojanelaguias_corpo" style=padding:0px ></div>';temp=$i("i3geo")?$i("i3geo").appendChild(novoel):document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("janelaguias",{width:"270px",fixedcenter:true,constraintoviewport:false,underlay:"none",close:false,visible:true,draggable:true,modal:false,iframe:true});YAHOO.i3GEO.janela.manager.register(janela);janela.render();janela.show();janela.cfg.setProperty("y",0);i=$i(i3GEO.guias.IDGUIAS);$i("conteudojanelaguias_corpo").appendChild(i);i.style.borderLeft="1px solid black";i.style.borderRight="1px solid black";guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){if($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo)){$i("conteudojanelaguias_corpo").appendChild($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo));temp=$i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo).style;temp.background="white";temp.border="1px solid black";temp.borderTop="0px solid black";temp.width="270px";temp.left="-1px";temp.height=i3GEO.parametros.h-90+"px"}}i3GEO.atualiza("");i.style.display="block";i.style.left="-1px";i.style.width="270px"};i3GEO.php.mudatamanho(temp,a,l)}else{janela=YAHOO.i3GEO.janela.manager.find(id);janela.show();janela.bringToTop()}},mostraGuiaFerramenta:function(guia,namespace){var g,Dom=YAHOO.util.Dom;if(!namespace){namespace="guia"}for(g=0;g<12;g++){Dom.setStyle(namespace+g+"obj","display","none")}Dom.setStyle(guia+"obj","display","block")},ajustaGuiaFerramenta:function(idjanela,namespace){var c=$i(idjanela+"_corpo"),h,g,temp;c.style.overflow="unset";c.style.overflow="none";h=c.style.height;h=parseInt(h,10)-40+"px";for(g=0;g<12;g++){temp=$i(namespace+"guia"+g+"obj");if(temp){temp.style.height=h;temp.style.width="100%";temp.style.overflow="auto"}}},guiaMovel:{ABERTA:false,config:{larguraPuxador:50,alturaPuxador:319,alturaGuiaMovel:0,larguraGuiaMovel:320,topGuiaMovel:0,guias:{icones:[],ids:[],idsconteudos:[],titulos:[],chaves:[]},posicao:["c","r"]},left:0,inicia:function(){var posMapa=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA)),centroY=posMapa[1]+(i3GEO.parametros.h/2),config=i3GEO.guias.guiaMovel.config,temp;if(i3GEO.guias.ALTURACORPOGUIAS===0&&config.alturaGuiaMovel===0){i3GEO.guias.guiaMovel.config.alturaGuiaMovel=i3GEO.parametros.h}else{i3GEO.guias.guiaMovel.config.alturaGuiaMovel=i3GEO.guias.ALTURACORPOGUIAS}config=i3GEO.guias.guiaMovel.config;temp=$i("i3GEOguiaMovel").style;if(config.posicao[1]==="r"){temp.left=(posMapa[0]+i3GEO.parametros.w-config.larguraPuxador)+"px";i3GEO.guias.guiaMovel.left=parseInt(temp.left,10)+"px"}if(config.posicao[1]==="l"){temp.left=posMapa[0]+"px";i3GEO.guias.guiaMovel.left=parseInt(temp.left,10)+"px"}if(config.topGuiaMovel===0){temp.top=(centroY-((config.alturaGuiaMovel-42)/2))+"px"}else{temp.top=config.topGuiaMovel+"px"}temp.width=config.larguraPuxador+"px";temp.height=config.alturaGuiaMovel+"px";temp=$i("i3GEOguiaMovelMolde").style;temp.top="0px";if(config.posicao[1]==="r"){temp.left=config.larguraPuxador+"px"}if(config.posicao[1]==="l"){temp.left="1px"}temp.height=config.alturaGuiaMovel+"px";temp.backgroundColor="white";if($i("i3GEOguiaMovelPuxador")){temp=$i("i3GEOguiaMovelPuxador").style;temp.top=((config.alturaGuiaMovel-config.alturaPuxador)/2)+"px";temp.left="0px";temp.width=config.larguraPuxador+"px";temp.height=config.alturaPuxador+"px"}temp=$i("i3GEOguiaMovelIcones");if(temp){temp=temp.style;temp.left="1px";temp.top="1px";temp.width=(config.larguraGuiaMovel-1)+"px";temp.height="35px";if(navm){temp.height="37px"}temp.zIndex=5;temp.paddingTop="2px";YAHOO.util.Dom.setStyle("i3GEOguiaMovelIcones","opacity",0.60)}temp=$i("i3GEOguiaMovelConteudo").style;temp.left="1px";if(temp.top==""){temp.top="38px"}temp.height=(config.alturaGuiaMovel-39)+"px";if(navm){temp.width=(config.larguraGuiaMovel-1)+"px"}else{temp.width=(config.larguraGuiaMovel-5)+"px"}temp.paddingLeft="4px";YAHOO.util.Dom.setStyle("i3GEOguiaMovelConteudo","opacity",0.70);YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.10);$i("i3GEOguiaMovelMolde").onmouseover=function(){if($i("i3GEOguiaMovelConteudo").style.display==="block"){YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.9)}if($i("i3GEOguiaMovelIcones")&&$i("i3GEOguiaMovelIcones").innerHTML===""){i3GEO.guias.guiaMovel.mostraIcones()}};$i("i3GEOguiaMovelMolde").onmouseout=function(){YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.90);if($i("i3GEOguiaMovelIcones")&&$i("i3GEOguiaMovelIcones").innerHTML===""){i3GEO.guias.guiaMovel.mostraIcones()}};if(i3GEO.guias.guiaMovel.ABERTA===true){i3GEO.guias.guiaMovel.ativa(i3GEO.guias.ATUAL)}i3GEO.guias.guiaMovel.mostraIcones();temp=$i("i3GEOguiaMovel");temp.style.visibility="visible";temp.style.height=parseInt(temp.style.height)-20+"px";i3GEO.util.aparece("i3GEOguiaMovel",300,100)},mostraIcones:function(){if($i("i3GEOguiaMovelIcones")&&$i("i3GEOguiaMovelIcones").innerHTML!=""){return}var n=i3GEO.guias.guiaMovel.config.guias.icones.length,i,temp=i3GEO.guias.guiaMovel.config.guias,ins="",ico;if(i3GEO.guias.ORDEM!==""){temp.chaves=i3GEO.guias.ORDEM}for(i=0;i<n;i++){if(temp.chaves[i]){ico="<button title='"+temp.titulos[i]+"' onmouseout='javascript:this.className = \"iconeGuiaMovel iconeGuiaMovelMouseOut\"' onmouseover='javascript:this.className = \"iconeGuiaMovel iconeGuiaMovelMouseOver\"' onclick='i3GEO.guias.guiaMovel.ativa(\""+temp.chaves[i]+"\")' class=iconeGuiaMovel ><img id='"+temp.ids[i]+"' src='"+i3GEO.configura.locaplic+"/"+temp.icones[i]+"' style='cursor:pointer;' /></button>";if(!$i("iconeGuia_"+temp.chaves[i])){ins+=ico}else{$i("iconeGuia_"+temp.chaves[i]).innerHTML=ico}}}if($i("i3GEOguiaMovelIcones")){$i("i3GEOguiaMovelIcones").innerHTML=ins}ins="1.2px";if(navn&&chro===false){ins="0px"}for(i=0;i<n;i++){ico=$i(temp.ids[i]);if(ico){YAHOO.util.Dom.setStyle(ico,"padding",ins)}}i3GEO.guias.guiaMovel.desativaIcones();if(i3GEO.guias.ATUAL!=""){ico=$i(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].id);if(ico){YAHOO.util.Dom.setStyle(ico,"opacity",0.9);ico.parentNode.style.boxShadow="none"}}},desativaIcones:function(o){var ims,n,i;if(!o){o=0.9}ims=$i("i3GEOguiaMovelIcones");if(ims){ims=ims.getElementsByTagName("button");n=ims.length;for(i=0;i<n;i++){YAHOO.util.Dom.setStyle(ims[i],"opacity",o);ims[i].style.boxShadow="none"}}n=i3GEO.guias.guiaMovel.config.guias.icones.length;temp=i3GEO.guias.guiaMovel.config.guias;for(i=0;i<n;i++){if($i("iconeGuia_"+temp.chaves[i])){ims=$i("iconeGuia_"+temp.chaves[i]).getElementsByTagName("button");if(ims.length>0){ims[0].style.backgroundColor="white";ims[0].style.boxShadow="none";ims[0].style.margin="0px";ims[0].style.border="1px solid gray";if(i3GEO.guias.guiaMovel.config.posicao[1]==="l"){ims[0].style.borderLeft="2px solid white"}else{ims[0].style.borderRight="2px solid white"}YAHOO.util.Dom.setStyle(ims[0],"opacity",o);ims[0].blur()}}}},ativa:function(chave){if(chave===""){i3GEO.guias.guiaMovel.desativaIcones();return}i3GEO.guias.escondeGuias();i3GEO.guias.guiaMovel.desativaIcones(0.5);if(i3GEO.guias.ATUAL===chave&&$i("i3GEOguiaMovelMolde").style.display==="block"){i3GEO.guias.ATUAL="";i3GEO.guias.guiaMovel.desativaIcones(0.9);i3GEO.guias.guiaMovel.abreFecha("fecha")}else{i3GEO.guias.ATUAL=chave;i3GEO.guias.guiaMovel.abreFecha("abre");if(i3GEO.guias.CONFIGURA[chave].click){i3GEO.guias.CONFIGURA[chave].click.call()}i3GEO.guias.mostra(chave);var ico=$i(i3GEO.guias.CONFIGURA[chave].id);if(ico){ico.parentNode.blur();YAHOO.util.Dom.setStyle(ico.parentNode,"opacity",0.9);ico.parentNode.style.boxShadow="none";if($i("iconeGuia_"+chave)){if(i3GEO.guias.guiaMovel.config.posicao[1]==="l"){ico.parentNode.style.borderLeft="2px solid white"}else{ico.parentNode.style.borderRight="2px solid white"}}}}},reposiciona:function(){var temp=$i("i3GEOguiaMovel").style.top;i3GEO.guias.guiaMovel.config.alturaGuiaMovel=0;i3GEO.guias.ALTURACORPOGUIAS=0;if($i("i3GEOguiaMovelIcones")){$i("i3GEOguiaMovelIcones").style.display="none"}$i("i3GEOguiaMovelConteudo").style.display="none";$i("i3GEOguiaMovelMolde").style.display="none";i3GEO.guias.escondeGuias();i3GEO.guias.guiaMovel.inicia();$i("i3GEOguiaMovel").style.top=temp},abreFecha:function(forca){var molde=$i("i3GEOguiaMovelMolde"),guia=$i("i3GEOguiaMovel"),attributes,anim,anim1,anim2,temp;if(!forca){if(molde.style.display==="block"){forca="fecha"}else{temp=i3GEO.guias.ATUAL;i3GEO.guias.ATUAL="";i3GEO.guias.guiaMovel.ativa(temp);return}}if(forca==="fecha"){if($i("i3GEOguiaMovelIcones")){$i("i3GEOguiaMovelIcones").style.display="none"}$i("i3GEOguiaMovelConteudo").style.display="none";attributes={left:{to:parseInt(i3GEO.guias.guiaMovel.left,10)},id:"i3GEOguiaMovel"};anim=new YAHOO.util.Anim(guia,attributes,1,YAHOO.util.Easing.easeNone);attributes={width:{to:0},id:"i3GEOguiaMovelMolde"};anim1=new YAHOO.util.Anim(molde,attributes,1,YAHOO.util.Easing.easeNone);anim.duration=0.5;anim1.duration=0.5;anim1.onComplete.subscribe(function(){molde.style.display="none"});if(i3GEO.guias.guiaMovel.config.posicao[1]==="l"&&$i("i3GEOguiaMovelIconesPuxador")){attributes={left:{to:0}};anim2=new YAHOO.util.Anim("i3GEOguiaMovelIconesPuxador",attributes,1,YAHOO.util.Easing.easeNone);anim2.duration=0.5;anim2.animate()}anim.animate();anim1.animate()}else if(molde.style.display!="block"){molde.style.display="block";if(i3GEO.guias.guiaMovel.config.posicao[1]==="l"){attributes={rigth:{to:(parseInt(guia.style.left,10)-i3GEO.guias.guiaMovel.config.larguraGuiaMovel)*-1},id:"i3GEOguiaMovel"}}else{attributes={left:{to:parseInt(guia.style.left,10)-i3GEO.guias.guiaMovel.config.larguraGuiaMovel},id:"i3GEOguiaMovel"}}anim=new YAHOO.util.Anim(guia,attributes,1,YAHOO.util.Easing.easeNone);attributes={width:{to:i3GEO.guias.guiaMovel.config.larguraGuiaMovel},id:"i3GEOguiaMovelMolde"};anim1=new YAHOO.util.Anim(molde,attributes,1,YAHOO.util.Easing.easeNone);anim.duration=0.5;anim1.duration=0.5;anim1.onComplete.subscribe(function(){if($i("i3GEOguiaMovelIcones")){$i("i3GEOguiaMovelIcones").style.display="block"}$i("i3GEOguiaMovelConteudo").style.display="block";YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.9)});if(i3GEO.guias.guiaMovel.config.posicao[1]==="l"&&$i("i3GEOguiaMovelIconesPuxador")){attributes={left:{to:i3GEO.guias.guiaMovel.config.larguraGuiaMovel}};anim2=new YAHOO.util.Anim("i3GEOguiaMovelIconesPuxador",attributes,1,YAHOO.util.Easing.easeNone);anim2.duration=0.5;anim2.animate()}anim.animate();anim1.animate()}}}}; | |
| 3 | 3 | \ No newline at end of file | ... | ... |
classesjs/compactados/euDock.2.0.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(onde){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:1;position:absolute;border:0px solid black;'></div>"+"<div id='"+this.id+"' style='z-index:1;position:absolute;border:0px solid black; cursor: pointer;'></div>";if(onde){novoel.style.zIndex=100000;onde.appendChild(novoel)}else{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(){var tempx,tempy;if(this.objectAlign==euDOWN){if(onde){tempx=(this.idObjectHook.offsetWidth/2);tempy=0}else{tempx=euIdObjLeft(this.idObjectHook)+(this.idObjectHook.offsetWidth/2);tempy=euIdObjTop(this.idObjectHook)+this.idObjectHook.offsetHeight+this.offset;if(navm&&!document.doctype||(navm&&document.doctype&&document.doctype.systemId=="")){tempx=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA))[0]+(euIdObjLeft(this.idObjectHook)/2)}if(navm&&i3GEO.util.versaoNavegador()==="IE8"&&tempx<this.idObjectHook.offsetWidth){tempx=i3GEO.parametros.w/2;if(i3GEO.guias.TIPO==="guia"||i3GEO.guias.TIPO==="sanfona"&&$i("contemFerramentas")){tempx+=parseInt($i("contemFerramentas").style.width,10)}}}this.setCenterPos(tempx,tempy)}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(){};this.kernelMouseOver=function(){};this.kernelMouseOut=function(){};this.mouseOut=function(){};this.mouseOver=function(){};this.mouseMove=function(x,y){};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=function(func){};this.setAllZoomFuncH=function(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 i,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(){};this.refresh=function(){this.updateDims()};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);return 38};this.getHeight=function(){if(!this.loaded)return 0;return 38};this.isRunning=function(){return this.runningFrame||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)){this.mouseInsideClick(x,y,this.id,this.getAbsolutePosX(),this.getAbsolutePosY())}}};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(){};function euKernel(){};function on_MouseMove(e){return true};function on_MouseDown(e){return true};function on_MouseUp(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);return true}; | |
| 2 | 1 | \ No newline at end of file |
| 2 | +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(onde){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:1;position:absolute;border:0px solid black;'></div>"+"<div id='"+this.id+"' style='z-index:1;position:absolute;border:0px solid black; cursor: pointer;'></div>";if(onde){novoel.style.zIndex=100000;onde.appendChild(novoel)}else{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(){var tempx,tempy;if(this.objectAlign==euDOWN){if(onde){tempx=(this.idObjectHook.offsetWidth/2);tempy=0}else{tempx=euIdObjLeft(this.idObjectHook)+(this.idObjectHook.offsetWidth/2);tempy=euIdObjTop(this.idObjectHook)+this.idObjectHook.offsetHeight+this.offset;if(navm&&!document.doctype||(navm&&document.doctype&&document.doctype.systemId=="")){tempx=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA))[0]+(euIdObjLeft(this.idObjectHook)/2)}if(navm&&i3GEO.util.versaoNavegador()==="IE8"&&tempx<this.idObjectHook.offsetWidth){tempx=i3GEO.parametros.w/2;if(i3GEO.guias.TIPO==="guia"||i3GEO.guias.TIPO==="sanfona"&&$i("contemFerramentas")){tempx+=parseInt($i("contemFerramentas").style.width,10)}}}this.setCenterPos(tempx,tempy)}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(){};this.kernelMouseOver=function(){};this.kernelMouseOut=function(){};this.mouseOut=function(){};this.mouseOver=function(){};this.mouseMove=function(x,y){};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=function(func){};this.setAllZoomFuncH=function(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 i,id=params.id;var id='euDock_icon_'+euEnv.Kost.next();euEnv.euDockArray[id]=new euDockIcon(id,this,params.titulo);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,titulo){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(){};this.refresh=function(){this.updateDims()};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);return 38};this.getHeight=function(){if(!this.loaded)return 0;return 38};this.isRunning=function(){return this.runningFrame||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)){this.mouseInsideClick(x,y,this.id,this.getAbsolutePosX(),this.getAbsolutePosY())}}};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(){};function euKernel(){};function on_MouseMove(e){return true};function on_MouseDown(e){return true};function on_MouseUp(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);return true}; | |
| 3 | 3 | \ No newline at end of file | ... | ... |
classesjs/compactados/euDock.Image.js
| 1 | -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;container.className="noprint";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){if(container.id==="euDock_0"){document.getElementById(this.id).style.top=(y-10)+'px'}else{document.getElementById(this.id).style.top=y+'px'}};this.getWidth=function(){if(document.getElementById(this.id)){return document.getElementById(this.id).width}};this.setWidth=function(w){document.getElementById(this.id).width=Math.round(w)};this.getHeight=function(){if(document.getElementById(this.id)){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'};if(container.id==="euDock_0"){var classe="eudockImagemBottom";if(i3GEO.barraDeBotoes.POSICAO==="top"){classe="eudockImagemTop"}this.container.innerHTML+="<img onLoad='"+onLoadFunc+";' id='"+this.id+"' src='"+args.image+"' style='position:absolute;visibility:hidden;' class='"+classe+"' >"}else{this.container.innerHTML+="<img onLoad='"+onLoadFunc+";' id='"+this.id+"' src='"+args.image+"' style='position:absolute;visibility:hidden;' class='noprint' >"}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.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.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"))}}; | |
| 2 | 1 | \ No newline at end of file |
| 2 | +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;container.className="noprint";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){if(container.id==="euDock_0"){document.getElementById(this.id).style.top=(y-10)+'px'}else{document.getElementById(this.id).style.top=y+'px'}};this.getWidth=function(){if(document.getElementById(this.id)){return document.getElementById(this.id).width}};this.setWidth=function(w){document.getElementById(this.id).width=Math.round(w)};this.getHeight=function(){if(document.getElementById(this.id)){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'};if(container.id==="euDock_0"){var classe="eudockImagemBottom";if(i3GEO.barraDeBotoes.POSICAO==="top"){classe="eudockImagemTop"}var alt="";if(args.titulo&&args.titulo!=""){alt=args.titulo}this.container.innerHTML+="<img title='"+alt+"' onLoad='"+onLoadFunc+";' id='"+this.id+"' src='"+args.image+"' style='position:absolute;visibility:hidden;' class='"+classe+"' >"}else{this.container.innerHTML+="<img onLoad='"+onLoadFunc+";' id='"+this.id+"' src='"+args.image+"' style='position:absolute;visibility:hidden;' class='noprint' >"}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.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.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"))}}; | |
| 3 | 3 | \ No newline at end of file | ... | ... |
classesjs/i3geo_tudo_compacto6.js
| ... | ... | @@ -252,7 +252,7 @@ if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.ajuda={ATIVAJANELA:true,DIVAJ |
| 252 | 252 | if(typeof(i3GEO)==='undefined'){var i3GEO={}}YAHOO.namespace("i3GEO.janela");YAHOO.i3GEO.janela.manager=new YAHOO.widget.OverlayManager();YAHOO.namespace("janelaDoca.xp");YAHOO.janelaDoca.xp.manager=new YAHOO.widget.OverlayManager();YAHOO.i3GEO.janela.managerAguarde=new YAHOO.widget.OverlayManager();i3GEO.janela={ESTILOBD:"display:block;padding:5px 1px 5px 1px;",ESTILOAGUARDE:"normal",AGUARDEMODAL:false,ANTESCRIA:["i3GEO.janela.prepara()"],ANTESFECHA:[],TRANSICAOSUAVE:true,OPACIDADE:65,OPACIDADEAGUARDE:50,TIPS:[],ULTIMOZINDEX:5,prepara:function(){var iu=i3GEO.util;iu.escondeBox()},cria:function(wlargura,waltura,wsrc,nx,ny,texto,id,modal,classe,funcaoCabecalho,funcaoMinimiza,funcaoAposRedim,dimensionavel,icone,funcaoDuplica,transicao){if(!transicao){transicao="sim"}if(!dimensionavel){dimensionavel=true}if(!icone){icone=""}var i,wlargurA,ins,novoel,wdocaiframe,temp,fix,underlay,ifr,janela;if($i(id)){janela=YAHOO.i3GEO.janela.manager.find(id);janela.show();janela.bringToTop();return}if(navm&&!chro){this.TRANSICAOSUAVE=false}if(this.ANTESCRIA){for(i=0;i<this.ANTESCRIA.length;i++){eval(this.ANTESCRIA[i])}}if(!classe||classe==""){classe="hd"}if(!id||id===""){id="wdoca"}if(!modal||modal===""){modal=false}ifr=false;if(i3GEO.Interface&&i3GEO.Interface!=undefined&&i3GEO.Interface.ATUAL==="googleearth"){i3GEO.janela.TRANSICAOSUAVE=false;ifr=true}fix="contained";if(nx===""||nx==="center"){fix=true}if(modal===true){underlay="none"}else{underlay="shadow"}temp=navm?0:2;wlargurA=parseInt(wlargura,10)+temp+"px";ins='<div id="'+id+'_cabecalho" class="'+classe+'" >';if(i3GEO.configura!==undefined){ins+="<img id='"+id+"_imagemCabecalho' class='i3GeoAguardeJanela' style='visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde2.gif\' />"}if(icone!=""){ins+="<img class='i3GeoIconeJanela' src='"+icone+"' >"}ins+="<span style='font-size:10px;'>"+texto+"</span>";if(funcaoDuplica){ins+="<div id='"+id+"_duplicaJanela' class='container-duplica'></div>"}if(funcaoMinimiza){ins+="<div id='"+id+"_minimizaCabecalho' class='container-minimiza'></div>"}ins+='</div><div id="'+id+'_corpo" class="bd" style="'+this.ESTILOBD+'">';if(wsrc!==""){ins+='<iframe name="'+id+'i" id="'+id+'i" valign="top" style="border:0px white solid;width:100%"></iframe>'}ins+='</div>';ins+='<div class="ft"></div>';novoel=document.createElement("div");novoel.id=id;novoel.style.display="block";novoel.innerHTML=ins;if(this.TRANSICAOSUAVE&&transicao==="sim"){novoel.onmouseover=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",1)};novoel.onmouseout=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.janela.OPACIDADE/100)};YAHOO.util.Dom.setStyle(novoel,"opacity",1)}document.body.appendChild(novoel);wdocaiframe=$i(id+"i");if(wdocaiframe){temp=wdocaiframe.style;temp.height=waltura;temp.display="block";wdocaiframe.src=wsrc}else{if(waltura!=="auto"){$i(id+'_corpo').style.height=parseInt(waltura,10)+"px"}$i(id+'_corpo').style.width='100%';$i(id+'_corpo').style.overflow="auto"}if(waltura==="auto"||dimensionavel==false){janela=new YAHOO.widget.Panel(id,{iframe:ifr,modal:modal,width:wlargurA,underlay:underlay,fixedcenter:fix,constraintoviewport:true,visible:true,monitorresize:false,dragOnly:true,keylisteners:null})}else{janela=new YAHOO.widget.Panel(id,{hideMode:'offsets',iframe:ifr,underlay:underlay,modal:modal,width:wlargurA,fixedcenter:fix,constraintoviewport:true,visible:true,monitorresize:false,dragOnly:true,keylisteners:null});if(YAHOO.util.Resize){var resize=new YAHOO.util.Resize(id,{handles:['br'],autoRatio:false,minWidth:10,minHeight:10,status:false,proxy:true,ghost:false,animate:false,useShim:true});resize.on('resize',function(args){this.cfg.setProperty("height",args.height+"px");if(wdocaiframe){wdocaiframe.style.height=args.height-50+"px"}},janela,true);if(funcaoAposRedim&&funcaoAposRedim!=""){resize.on('endResize',function(args){funcaoAposRedim.call();i3GEO.janela.minimiza()},janela,true)}resize.getProxyEl().style.height="0px"}}if(nx!==""&&nx!=="center"){janela.moveTo(nx,ny+50)}YAHOO.i3GEO.janela.manager.register(janela);if(this.TRANSICAOSUAVE){janela.cfg.setProperty("effect",[{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.5}])}janela.cfg.setProperty("zIndex",[4]);janela.render();janela.bringToTop();if(navm&&id!=="i3geo_janelaMensagens"&&i3GEO.Interface&&i3GEO.Interface!=undefined&&i3GEO.Interface.ATUAL==="googleearth"){janela.moveTo(0,0)}if(ifr===true){janela.iframe.style.zIndex=4}YAHOO.util.Event.addListener($i(id+'_corpo'),"click",YAHOO.util.Event.stopPropagation);if(funcaoDuplica){$i(id+'_duplicaJanela').onclick=funcaoDuplica}if(funcaoCabecalho){$i(id+'_cabecalho').onclick=funcaoCabecalho}if(funcaoMinimiza){$i(id+"_minimizaCabecalho").onclick=funcaoMinimiza}YAHOO.util.Event.addListener(janela.close,"click",i3GEO.janela.fecha,janela,{id:id},true);temp=$i(id+"_corpo");return([janela,$i(id+"_cabecalho"),temp])},minimiza:function(id,min){var temp=$i(id+"_corpo"),n,i,m=YAHOO.i3GEO.janela.manager.find(id),c=$i(id),t="min";if(temp){if(temp.style.display==="block"){temp.style.display="none";if(m){m.hideIframe()}m.winicial=c.style.width;if(min){c.style.width=min}}else{temp.style.display="block";if(m){m.showIframe()}c.style.width=m.winicial;t="max"}}temp=$i(id+"_resizehandle");if(temp){if(temp.style.display==="none"){temp.style.display="block"}else{temp.style.display="none"}}temp=$i(id+"_c");if(temp){temp=temp.getElementsByTagName("div");n=temp.length;for(i=0;i<n;i++){if(temp[i].className==="underlay"||temp[i].className==="bd"){if(temp[i].style.display==="none"){temp[i].style.display="block"}else{temp[i].style.display="none"}}}}temp=$i(id+"_corpo");if(temp){if(temp.style.display==="none"){temp.style.display="block"}else{temp.style.display="none"}}temp=$i(id);if(temp){if(temp.style.display==="none"){temp.style.height="100%"}else{temp.style.height="10%"}}return t},fecha:function(event,args){var i,id;i3GEO.util.escondeBox();if(i3GEO.janela.ANTESFECHA){for(i=0;i<i3GEO.janela.ANTESFECHA.length;i++){eval(i3GEO.janela.ANTESFECHA[i])}}if(i3GEO.janela.id){id=i3GEO.janela.id}else{id=event.id}if(id==undefined){id=args.id}i3GEO.janela.destroi(id)},destroi:function(id){var janela=YAHOO.i3GEO.janela.manager.find(id);i3GEO.util.removeScriptTag(id+"_script");i3GEO.util.removeScriptTag(id+".dicionario_script");if(janela){YAHOO.i3GEO.janela.manager.remove(janela);janela=$i(id+"_c");janela.parentNode.removeChild(janela)}},alteraTamanho:function(w,h,id){var i;if(arguments.length===3){i=$i(id)}else{i=$i("wdoca")}if(i){i.style.width=w+"px";i.style.height=h+"px"}},abreAguarde:function(id,texto){var pos,temp,janela;if(!id||id==undefined){return}janela=YAHOO.i3GEO.janela.managerAguarde.find(id);pos=[0,0];if(i3GEO.Interface&&$i(i3GEO.Interface.IDCORPO)){pos=YAHOO.util.Dom.getXY($i(i3GEO.Interface.IDCORPO))}else if($i("contemImg")){pos=YAHOO.util.Dom.getXY($i("contemImg"))}if(i3GEO.janela.AGUARDEMODAL==true){texto+="<br><span style='color:navy;cursor:pointer;font-size:9px;' onclick='javascript:if(i3GEO.janela.AGUARDEMODAL == true){i3GEO.janela.AGUARDEMODAL = false;}else{i3GEO.janela.AGUARDEMODAL = true;}'>bloquear/desbloquear</span>"}if(!janela){janela=new YAHOO.widget.Panel(id,{width:"240px",fixedcenter:false,underlay:"none",close:true,draggable:false,modal:i3GEO.janela.AGUARDEMODAL,monitorresize:false});janela.render(document.body);YAHOO.i3GEO.janela.managerAguarde.register(janela)}if(i3GEO.janela.ESTILOAGUARDE==="normal"||i3GEO.janela.ESTILOAGUARDE==="reduzida"){janela.setBody(texto);janela.body.style.padding="5px"}if(i3GEO.janela.ESTILOAGUARDE==="normal"||i3GEO.janela.ESTILOAGUARDE==="minima"){janela.setHeader("<span><img id=aguardeGifAberto src='"+i3GEO.configura.locaplic+"/imagens/aguarde.gif' /></span> <span style=font-size:8px >"+YAHOO.i3GEO.janela.managerAguarde.overlays.length+"</span>")}if(i3GEO.parametros&&i3GEO.parametros.w>0){janela.moveTo(pos[0]+(i3GEO.parametros.w/2)-120,pos[1])}else{janela.moveTo(pos[0],pos[1])}janela.show();if(janela.header){janela.header.style.height="20px"}temp=$i(id+"_c");if(temp){temp.style.backgroundColor=""}YAHOO.util.Dom.setStyle(temp,"opacity",i3GEO.janela.OPACIDADEAGUARDE/100)},fechaAguarde:function(id){if(id!=undefined){var janela=YAHOO.i3GEO.janela.managerAguarde.find(id);if(janela){YAHOO.i3GEO.janela.managerAguarde.remove(janela);janela.destroy()}}},tempoMsg:function(texto,tempo){if(!YAHOO.util.Easing){return}var pos,janela,attributes,anim,altura=40;janela=YAHOO.i3GEO.janela.managerAguarde.find("i3geoTempoMsg");pos=[0,0];if(i3GEO.Interface&&$i(i3GEO.Interface.IDCORPO)){pos=YAHOO.util.Dom.getXY($i(i3GEO.Interface.IDCORPO))}else if($i("contemImg")){pos=YAHOO.util.Dom.getXY($i("contemImg"))}if(!janela){janela=new YAHOO.widget.Panel("i3geoTempoMsg",{width:"220px",fixedcenter:false,underlay:"none",close:false,draggable:false,modal:false,monitorresize:false,iframe:true});janela.render(document.body);YAHOO.i3GEO.janela.managerAguarde.register(janela)}$i("i3geoTempoMsg_c").style.zIndex=100000;janela.setBody(texto);altura=70;janela.body.style.padding="5px";janela.body.style.backgroundColor="yellow";if(i3GEO.Interface&&i3GEO.Interface.ATUAL!="googleearth"){janela.body.style.height="0px"}else{janela.body.style.height=altura+"px"}janela.body.style.overflow="hidden";janela.body.onclick=function(){var janela=YAHOO.i3GEO.janela.managerAguarde.find("i3geoTempoMsg");if(janela){janela.destroy()}};if(i3GEO.parametros&&i3GEO.parametros.w>0){janela.moveTo(pos[0]+(i3GEO.parametros.w/2)-120,pos[1])}else{janela.moveTo(pos[0],pos[1])}janela.show();if(i3GEO.Interface&&i3GEO.Interface.ATUAL!="googleearth"){attributes={height:{to:altura}};anim=new YAHOO.util.Anim(janela.body,attributes,.5,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){janela.body.style.overflow="auto";janela.body.style.display="block";$i("i3geoTempoMsg_c").style.zIndex=100000});anim.animate()}if(!tempo){tempo=4000}setTimeout(function(){var attributes,anim,janela=YAHOO.i3GEO.janela.managerAguarde.find("i3geoTempoMsg");if(i3GEO.Interface&&i3GEO.Interface.ATUAL!="googleearth"){if(janela){janela.body.style.overflow="hidden";attributes={height:{to:0}};anim=new YAHOO.util.Anim(janela.body,attributes,.5,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){janela.destroy()});anim.animate()}}else{janela.destroy()}},tempo)},ativaAlerta:function(){window.alert=function(texto){var textoI,janela=YAHOO.i3GEO.janela.managerAguarde.find("alerta");if(!janela){janela=new YAHOO.widget.SimpleDialog("alerta",{width:"300px",fixedcenter:true,visible:false,draggable:false,zIndex:100000,textAlign:"left",close:true,modal:false,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25},constraintoviewport:true,buttons:[{text:$trad("x74"),handler:function(){this.destroy()},isDefault:true}],icon:YAHOO.widget.SimpleDialog.ICON_WARN,text:""});YAHOO.i3GEO.janela.managerAguarde.register(janela);janela.setHeader(" ");janela.render(document.body)}textoI=janela.cfg.getProperty("text");if(textoI!=""){textoI+="<br>"}texto=textoI+texto;janela.cfg.setProperty("text",texto);janela.show()}},confirma:function(pergunta,w,resposta1,resposta2,funcao1,funcao2){var b,f1,f2,f3,janela=YAHOO.i3GEO.janela.managerAguarde.find("confirma");if(!w||w==""){w=300}if(!funcao1||funcao1==""){f1=function(){YAHOO.i3GEO.janela.managerAguarde.find("confirma").destroy();return true}}else{f1=function(){funcao1.call();YAHOO.i3GEO.janela.managerAguarde.find("confirma").destroy()}}if(!funcao2||funcao2==""){f2=function(){YAHOO.i3GEO.janela.managerAguarde.find("confirma").destroy();return false}}else{f2=function(){funcao2.call();YAHOO.i3GEO.janela.managerAguarde.find("confirma").destroy()}}f3=function(){YAHOO.i3GEO.janela.managerAguarde.find("confirma").destroy()};if(!resposta1||resposta1==""){resposta1=$trad("x58")}if(janela){janela.destroy()}b=[{text:$trad("x75"),handler:f3},{text:resposta1,handler:f1}];if(resposta2&&resposta2!=""){b.push({text:resposta2,handler:f2})}janela=new YAHOO.widget.SimpleDialog("confirma",{width:w+"px",fixedcenter:true,visible:false,draggable:false,zIndex:100000,textAlign:"left",close:false,modal:false,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25},constraintoviewport:true,buttons:b,icon:YAHOO.widget.SimpleDialog.ICON_HELP,text:"<p class=paragrafo >"+pergunta});YAHOO.i3GEO.janela.managerAguarde.register(janela);janela.setHeader(" ");janela.render(document.body);janela.show()},prompt:function(pergunta,funcaoOk,valorDefault){if($i("i3GEOjanelaprompt")){return}if(!valorDefault){valorDefault=""}var i="<br><div class='i3geoForm i3geoFormIconeEdita' ><input id='i3GEOjanelaprompt' type=text value='"+valorDefault+"' />";i3GEO.janela.confirma(pergunta+i,"","","",funcaoOk)},mensagemSimples:function(texto,cabecalho,largura,altura){var janela;if(!largura){largura=300}if(!altura){altura=300}if(!cabecalho){cabecalho=""}janela=new YAHOO.widget.SimpleDialog(YAHOO.util.Dom.generateId(),{width:parseInt(largura,10)+"px",height:parseInt(altura,10)+"px",fixedcenter:true,visible:true,draggable:true,zIndex:100000,textAlign:"left",close:true,modal:false,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25},constraintoviewport:true,text:""});YAHOO.i3GEO.janela.manager.register(janela);janela.setHeader(cabecalho);janela.render(document.body);janela.setHeader(cabecalho);janela.cfg.setProperty("text",texto);janela.bringToTop();janela.show();return janela},tip:function(){var Nid,novoel,res;Nid=YAHOO.util.Dom.generateId();novoel=document.createElement("div");novoel.className="i3GEObalaoInfo";novoel.id=Nid;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)'></div>";novoel.innerHTML="<table style='text-align:left'><tr><td style='text-align:left'>"+res+"</td></tr></table>";ist=novoel.style;ist.top=objposicaocursor.telay-9+"px";ist.left=objposicaocursor.telax-5+"px";ist.display="block";i3GEO.eventos.adicionaEventos("NAVEGAMAPA",["i3GEO.janela.excluiTips('todos')"]);return(Nid)},excluiTips:function(tipo){var ot,i;if(arguments.length===0){tipo="todos"}if(i3GEO.janela.TIPS.length>0){ot=i3GEO.janela.TIPS.length-1;if(ot>=0){do{if(tipo==='todos'){if(i3GEO.janela.TIPS[ot]){i=$i(i3GEO.janela.TIPS[ot].id);document.body.removeChild(i)}}if(tipo==='naofixos'){if($i(i3GEO.janela.TIPS[ot])){if($i(i3GEO.janela.TIPS[ot].id+"cabecatip").innerHTML!==""){document.body.removeChild($i(i3GEO.janela.TIPS[ot].id))}}}}while(ot--);if(tipo==="todos"){i3GEO.janela.TIPS=[]}}}},slider:function(funcao,inicial){var scaleFactor,bottomConstraint,topConstraint,janela,novoel,Event,slider="",bg,thumb;janela=i3GEO.janela.cria(230,200,"","","",$trad("t20"),"opacidadeG");novoel=document.createElement("div");novoel.id="slider-bg";novoel.tabindex="-1";novoel.innerHTML='<div style="cursor:default;position:absolute;top:4px" id="slider-thumb"><img src="'+i3GEO.configura.locaplic+'/imagens/thumb-n.gif"></div>';janela[2].appendChild(novoel);Event=YAHOO.util.Event;bg="slider-bg";thumb="slider-thumb";novoel.style.position="relative";novoel.style.background='url('+i3GEO.configura.locaplic+'/imagens/bg-fader.gif) 5px 0 no-repeat';novoel.style.height="28px";novoel.style.width="228px";topConstraint=0;bottomConstraint=200;scaleFactor=1;Event.onDOMReady(function(){slider=YAHOO.widget.Slider.getHorizSlider(bg,thumb,topConstraint,bottomConstraint,20);slider.setValue(parseInt(inicial,10));slider.getRealValue=function(){return Math.round(this.getValue()*scaleFactor)};slider.subscribe("slideEnd",function(offsetFromStart){var actualValue=slider.getRealValue();eval(funcao+"("+actualValue+")")})});Event.on("putval","click",function(e){slider.setValue(100,false)})},comboCabecalhoTemas:function(idDiv,idCombo,ferramenta,tipo,onButtonClick,temaSel){var temp=$i(idDiv);if(!temaSel){temaSel=""}if(temaSel==""&&i3GEOF[ferramenta]&&i3GEOF[ferramenta].tema&&i3GEOF[ferramenta].tema!=""){temaSel=i3GEOF[ferramenta].tema}if(temp){i3GEO.util.comboTemas(temp.id+"Sel",function(retorno){var tema,container=$i(idDiv),botao;container.innerHTML=retorno.dados;botao=new YAHOO.widget.Button(idCombo,{type:"menu",menu:idCombo+"select"});if(temaSel!=""){tema=i3GEO.arvoreDeCamadas.pegaTema(temaSel);if(tema&&tema!=undefined){botao.set("label","<span class='cabecalhoTemas' >"+tema.tema+"</span> ")}else{botao.set("label","<span class='cabecalhoTemas' >"+$trad("x92")+"</span> ")}}else{botao.set("label","<span class='cabecalhoTemas' >"+$trad("x92")+"</span> ")}if(!onButtonClick){onButtonClick=function(p_sType,p_aArgs){var oMenuItem=p_aArgs[1];if(oMenuItem){i3GEO.mapa.ativaTema(oMenuItem.value);if(oMenuItem.value===""){i3GEO.temaAtivo="";botao.set("label","<span class='cabecalhoTemas' >"+$trad("x92")+"</span> ")}else{botao.set("label","<span class='cabecalhoTemas' >"+oMenuItem.cfg.getProperty("text")+"</span> ")}if(i3GEOF[ferramenta]){i3GEOF[ferramenta].tema=oMenuItem.value;if($i("i3GEOF."+ferramenta+"_corpo")){$i("i3GEOF."+ferramenta+"_corpo").innerHTML="";eval("i3GEOF."+ferramenta+".inicia('i3GEOF."+ferramenta+"_corpo');")}}}};if(i3GEO.eventos.ATUALIZAARVORECAMADAS.length>20){i3GEO.eventos.ATUALIZAARVORECAMADAS=[]}i3GEO.eventos.adicionaEventos("ATUALIZAARVORECAMADAS",["i3GEO.janela.comboCabecalhoTemas('"+idDiv+"','"+idCombo+"','"+ferramenta+"','"+tipo+"')"])}botao.getMenu().subscribe("click",onButtonClick,botao)},temp.id,"",false,tipo,"",true,true)}}}; |
| 253 | 253 | // |
| 254 | 254 | //compactados/classe_guias_compacto.js |
| 255 | -if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.guias={ATUAL:"temas",ALTURACORPOGUIAS:0,CONFIGURA:{"temas":{icone:"imagens/layer.png",titulo:$trad("g4a"),id:"guia1",idconteudo:"guia1obj",click:""},"adiciona":{icone:"imagens/catalogo.png",titulo:$trad("g1a"),id:"guia2",idconteudo:"guia2obj",click:function(){var ondeArvore;i3GEO.guias.mostra("adiciona");if(!$i("arvoreAdicionaTema")){try{ondeArvore=objmapa.guiaMenu+"obj"}catch(e){ondeArvore="guia2obj"}}else{ondeArvore="arvoreAdicionaTema"}if(document.getElementById("outrasOpcoesAdiciona")){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde="outrasOpcoesAdiciona";i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore=false}i3GEO.arvoreDeTemas.cria(i3GEO.configura.sid,i3GEO.configura.locaplic,ondeArvore)}},"legenda":{icone:"imagens/legenda.png",titulo:$trad("g3"),id:"guia4",idconteudo:"guia4obj",click:function(){i3GEO.guias.mostra("legenda");i3GEO.util.defineValor(i3GEO.mapa.legendaHTML.ID,"innerHTML","");i3GEO.mapa.legendaHTML.cria("guia4obj")}},"mapas":{icone:"imagens/gisicons/show-links.png",titulo:"Links",id:"guia5",idconteudo:"guia5obj",mostraLink:function(id,url){$i("i3geoMapasLink_"+id).innerHTML="<a href='"+url+"' target=_blank >"+url+"</a>"},click:function(onde){if(!onde){onde=i3GEO.guias.CONFIGURA.mapas.idconteudo}var pegaMapas=function(retorno){var ins,mapa,ig1lt,ig1,nome,lkd,link,temp,combo,urlinterface;ins="<br><div id='banners' style='overflow:auto;text-align:center'>"+"<a href='"+i3GEO.configura.locaplic+"/admin/html/mapas.html' target=_blank >"+$trad("x89")+"</a><br><br>";mapa=retorno.data.mapas;ig1lt=mapa.length;ig1=0;urlinterface=window.location.origin+window.location.pathname;if(ig1lt>0){do{temp=mapa[ig1];nome=temp.NOME;if(temp.PUBLICADO){if(temp.PUBLICADO.toLowerCase()==="nao"){nome="<s>"+nome+"</s>"}}lkd=temp.LINK;link=i3GEO.configura.locaplic+"/ms_criamapa.php?temasa="+temp.TEMAS+"&layers="+temp.LIGADOS;if(temp.EXTENSAO!==""){link+="&mapext="+temp.EXTENSAO}if(temp.OUTROS!==""){link+="&"+temp.OUTROS}if(lkd!==""){link=lkd}ins+="<div style='width:170px;background-color:white;padding:5px;margin:auto;border: 1px solid #F0F0F0;border-radius: 5px;box-shadow: 1px 1px 1px 1px #D3D3D3;' >";if(temp.IMAGEM&&temp.IMAGEM!=""){ins+="<div style=text-align:center ><a href='"+link+"' style=text-align:center;text-decoration:none; >"+"<img src='"+temp.IMAGEM+"'></a></div><br>"}if(temp.CONTEMMAPFILE=="nao"){ins+="<div><p class=paragrafo style=text-align:center;cursor:pointer >"+"<a href='"+link+"' style=text-align:center;text-decoration:none; >"+nome+" ("+temp.ID_MAPA+")</a></p></div>"}else{combo="<select style='width:170px;' onchange='i3GEO.guias.CONFIGURA.mapas.mostraLink("+ig1+",this.value)'>"+"<option value=''>"+$trad("x103")+":</option>"+"<option value='"+link+"'>Como foi salvo</option>"+"<option value='"+link+"&interface="+urlinterface+"'>Com a interface atual</option>"+"<option value='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?restauramapa="+temp.ID_MAPA+"&fundo=e_wsm'>Openlayers com todos os botoes</option>"+"<option value='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?restauramapa="+temp.ID_MAPA+"&fundo=est_wms'>Sem o fundo</option>"+"<option value='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?restauramapa="+temp.ID_MAPA+"&fundo=e_wsm&botoes=legenda pan zoombox zoomtot zoomin zoomout distancia area identifica'>Com booes principais</option>"+"<option value='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?restauramapa="+temp.ID_MAPA+"&botoes=legenda pan zoombox zoomtot zoomin zoomout'>Botoes de navegacao</option>"+"</select>";ins+="<div>"+"<p class=paragrafo style=text-align:center;cursor:pointer >"+"<img style=text-align:center src='"+i3GEO.configura.locaplic+"/ferramentas/salvamapa/geraminiatura.php?w=100&h=67&restauramapa="+temp.ID_MAPA+"'><br><br>"+"<a href='"+link+"' style=text-align:center;text-decoration:none; >"+nome+" ("+temp.ID_MAPA+")</a>"+"<br>"+combo+"<br><div style='cursor:pointer;' id='i3geoMapasLink_"+ig1+"' ></div>"+"</p></div>"}ins+="</div><br>";ig1++}while(ig1<ig1lt)}$i(onde).innerHTML=ins+"</div>"};if($i(i3GEO.guias.CONFIGURA.mapas.idconteudo)){$i(i3GEO.guias.CONFIGURA.mapas.idconteudo).innerHTML="Aguarde..."}i3GEO.guias.mostra("mapas");i3GEO.php.pegaMapas(pegaMapas);i3GEO.navega.removeCookieExtensao()}}},ORDEM:"",TIPO:"guia",IDGUIAS:"guiasYUI",cria:function(onde){var nguiasreal=0,guiaconteudo,id,guia,g,re,ng,tituloguia,i,ins,altura,temp,CONFIGURA=i3GEO.guias.CONFIGURA,guias=i3GEO.util.listaChaves(CONFIGURA),nguias=guias.length;if(i3GEO.guias.TIPO==="movel"){i3GEO.guias.IDGUIAS="i3GEOguiaMovelConteudo";for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo)){i3GEO.guias.guiaMovel.config.guias.ids.push(i3GEO.guias.CONFIGURA[guias[ng]].id);i3GEO.guias.guiaMovel.config.guias.idsconteudos.push(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo);if(i3GEO.guias.CONFIGURA[guias[ng]].icone!==undefined){i3GEO.guias.guiaMovel.config.guias.icones.push(i3GEO.guias.CONFIGURA[guias[ng]].icone)}else{i3GEO.guias.guiaMovel.config.guias.icones.push("imagens/gisicons/open1.png")}i3GEO.guias.guiaMovel.config.guias.titulos.push(i3GEO.guias.CONFIGURA[guias[ng]].titulo);i3GEO.guias.guiaMovel.config.guias.chaves.push(guias[ng])}}return}try{for(g=0;g<12;g++){tituloguia="";if($i("guia"+g)){tituloguia=$i("guia"+g).innerHTML;re=new RegExp(" ","g");tituloguia=tituloguia.replace(re,'');for(ng=0;ng<nguias;ng++){if(CONFIGURA[guias[ng]].id==="guia"+g){tituloguia=""}}if(tituloguia!==""){i3GEO.guias.CONFIGURA["guia"+g]=[];i3GEO.guias.CONFIGURA["guia"+g].titulo=tituloguia;i3GEO.guias.CONFIGURA["guia"+g].id="guia"+g;i3GEO.guias.CONFIGURA["guia"+g].idconteudo="guia"+g+"obj";if($i('guia'+g).onclick){i3GEO.guias.CONFIGURA["guia"+g].click=$i("guia"+g).onclick}}}}if(i3GEO.guias.ORDEM===""){guias=i3GEO.util.listaChaves(CONFIGURA)}else{guias=i3GEO.guias.ORDEM}nguias=guias.length;if(arguments.length===0){for(ng=0;ng<nguias;ng++){if(i3GEO.guias.CONFIGURA[guias[ng]]){i=$i(i3GEO.guias.CONFIGURA[guias[ng]].id);if(i){onde=i.parentNode}}}}else{onde=$i(onde)}if(!onde){return}onde.id=i3GEO.guias.IDGUIAS;onde.className="yui-navset";if(i3GEO.guias.TIPO==="guia"||i3GEO.guias.TIPO==="tablet"){ins='<ul class="yui-nav" style="border-width:0pt 0pt 0px;border-color:rgb(240,240,240);border-bottom-color:white;text-align:center;">';for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){if($i(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo)){ins+='<li><a alt="" title=""><em><div id="'+i3GEO.guias.CONFIGURA[guias[ng]].id+'" >'+i3GEO.guias.CONFIGURA[guias[ng]].titulo+'</div></em></a></li>'}}}ins+="</ul>";onde.innerHTML=ins}if(i3GEO.guias.TIPO==="sanfona"){ins='<dl id=sanfona'+onde.id+' class="accordion" >';if(i3GEO.guias.ORDEM===""){for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){nguiasreal++}}}else{nguiasreal=i3GEO.guias.ORDEM.length}if(navn){altura=i3GEO.parametros.h-(nguiasreal*25)-1}else{altura=i3GEO.parametros.h-(nguiasreal*23)+1}for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){id=i3GEO.guias.CONFIGURA[guias[ng]].idconteudo;temp=$i(id);if(temp){guiaconteudo=temp.innerHTML;temp.innerHTML="";temp.style.display="none";temp.id="";ins+='<dt style=height:17px id="'+i3GEO.guias.CONFIGURA[guias[ng]].id+'" >'+'<table class=accordiontable ><tr><td width="98%" >'+i3GEO.guias.CONFIGURA[guias[ng]].titulo+'</td><td width="2%" ><img id="" src="'+i3GEO.configura.locaplic+'/imagens/branco.gif" style="width:10px;" /></td></tr></table>'+'<dd clas=close >'+'<div class=bd >'+'<div id="'+id+'" >'+guiaconteudo+'</div></div></dd>'}}}ins+="</dl>";onde.innerHTML=ins;onde.style.height=altura+"px";YAHOO.lutsr.accordion.init(true,5,false,"sanfona"+onde.id,altura);i3GEO.guias.ALTURACORPOGUIAS=altura}for(g=0;g<nguias;g++){guia=i3GEO.guias.CONFIGURA[guias[g]];id=guia.id;guiaconteudo=$i(id);if(guiaconteudo){if(guia.click===""||guia.click===undefined){eval('$i("'+id+'").onclick = function(event){i3GEO.guias.mostra("'+guias[g]+'");}')}else{guiaconteudo.onclick=guia.click}YAHOO.util.Event.addListener($i(id),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addListener($i(id),"click",YAHOO.util.Event.stopPropagation);YAHOO.util.Event.addFocusListener($i(id),YAHOO.util.Event.preventDefault);guiaconteudo.onmouseover=function(){};guiaconteudo.onmouseout=function(){};temp=$i(guia.idconteudo);if(temp){temp.style.overflow="auto";if(i3GEO.guias.TIPO==="guia"){if(i3GEO.guias.ALTURACORPOGUIAS===0){temp.style.height=i3GEO.parametros.h+"px"}else{temp.style.height=i3GEO.guias.ALTURACORPOGUIAS+"px"}}else{temp.style.height=onde.style.height}}}}}catch(e){}if(i3GEO.guias.TIPO!=="tablet"){i3GEO.guias.mostra(i3GEO.guias.ATUAL);i3GEO.guias.ativa(i3GEO.guias.ATUAL)}else{i3GEO.guias.escondeGuias()}},ajustaAltura:function(){var guia,guias,nguias,temp,temps,n,i,g,altura=0;if(i3GEO.guias.ALTURACORPOGUIAS!=0){altura=i3GEO.guias.ALTURACORPOGUIAS}guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){guia=$i(this.CONFIGURA[guias[g]].idconteudo);if(guia){guia.style.overflow="auto";if(this.TIPO==="guia"){if(altura===0){guia.style.height=i3GEO.parametros.h+"px"}else{guia.style.height=altura+"px"}}if(this.TIPO==="sanfona"){guia.style.height=altura+"px";temp=$i("guiasYUI");if(temp){temp.style.height=altura+"px";temps=temp.getElementsByTagName("dd");n=temps.length;for(i=0;i<n;i++){if(temps[i].style.visibility=="visible"){temps[i].style.height=altura+"px"}}}YAHOO.lutsr.accordion.properties.altura=altura}}}},escondeGuias:function(){var guias,nguias,g,temp,attributes,anim;guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){temp=$i(this.CONFIGURA[guias[g]].idconteudo);if(temp){if(i3GEO.guias.TIPO==="tablet"&&temp.style.display==="block"){temp.style.overflow="hidden";attributes={height:{to:0},id:this.CONFIGURA[guias[g]].idconteudo};anim=new YAHOO.util.Anim(temp,attributes,1,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){var temp=$i(anim.attributes.id);temp.style.overflow="auto";temp.style.display="none";if(i3GEO.barraDeBotoes.BARRAS[0]){i3GEO.barraDeBotoes.BARRAS[0].show()}});anim.animate()}else{temp.style.display="none"}}if($i(this.CONFIGURA[guias[g]].id)&&i3GEO.guias.TIPO!=="movel"){$i(this.CONFIGURA[guias[g]].id).parentNode.parentNode.style.background="transparent"}}},mostra:function(guia){var guias,nguias,g,temp,attributes,anim;guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;if(!$i(i3GEO.guias.CONFIGURA[guia].id)){return}if(!$i(i3GEO.guias.CONFIGURA[guia].idconteudo)){return}if($i(i3GEO.guias.CONFIGURA[guia].idconteudo).style.display==="block"&&i3GEO.guias.TIPO==="tablet"){i3GEO.guias.escondeGuias();return}if(i3GEO.guias.TIPO!=="movel"){for(g=0;g<nguias;g++){if($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo)){$i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo).style.display="none"}if($i(i3GEO.guias.CONFIGURA[guias[g]].id)){$i(i3GEO.guias.CONFIGURA[guias[g]].id).parentNode.parentNode.style.background="transparent"}}}if(i3GEO.guias.CONFIGURA.toString().search(guia)<0){for(g=0;g<nguias;g++){if(i3GEO.guias.CONFIGURA[guias[g]].id===guia){guia=guias[g]}}}if(i3GEO.guias.CONFIGURA[guia]){temp=$i(i3GEO.guias.CONFIGURA[guia].idconteudo);if(temp){if(i3GEO.guias.TIPO==="tablet"){if(i3GEO.barraDeBotoes.BARRAS[0]){i3GEO.barraDeBotoes.BARRAS[0].hide()}temp.style.left=(i3GEO.parametros.w/2)-150+"px";temp.style.height=0;temp.style.display="block";temp.style.zIndex=9000;temp.style.overflow="hidden";attributes={height:{to:i3GEO.parametros.h-10}};anim=new YAHOO.util.Anim(temp,attributes,1,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){temp.style.overflow="auto";temp.style.display="block"});if(DetectaMobile("DetectAndroid")===true){temp.style.height="";temp.style.overflow="auto"}else{anim.animate()}}else{temp.style.display="block"}if(i3GEO.guias.TIPO!=="movel"){$i(i3GEO.guias.CONFIGURA[guia].id).parentNode.parentNode.style.backgroundColor="white"}i3GEO.guias.ATUAL=guia}}},ativa:function(guia){try{i3GEO.guias.ATUAL=guia;if(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].click!==""){i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].click.call()}}catch(e){}},libera:function(){if(!$i("conteudojanelaguias")){var i,w,pos,a,l,temp;$i(i3GEO.Interface.IDCORPO).style.left="0px";if($i(this.IDGUIAS)){$i(this.IDGUIAS).style.display="none"}i=$i("contemFerramentas");w=parseInt($i("contemFerramentas").style.width,10);$i("contemFerramentas").style.width="0px";pos="px";a=i3GEO.parametros.h;l=i3GEO.parametros.w+w;i3GEO.parametros.h=a;i3GEO.parametros.w=l;i=$i(i3GEO.Interface.IDCORPO);if(i){i.style.width=l+pos;i.style.height=a+pos}i=$i(i3GEO.Interface.IDMAPA);if(i){i.style.width=l+pos;i.style.height=a+pos;i.style.clip='rect('+0+" "+(l*1+2)+" "+(a*1+2)+" "+0+')'}i=$i("mst");if(i){i.style.width=l+1+pos}i3GEO.mapa.ajustaPosicao();temp=function(retorno){var novoel,temp,i,g,guias,nguias,janela;novoel=document.createElement("div");novoel.id="janelaguias";novoel.style.display="block";novoel.innerHTML='<div class="hd">Guias <div onclick ="i3GEO.janela.minimiza(conteudojanelaguias)" id="janelaguias_minimizaCabecalho" class="container-minimiza" ></div></div><div class="bd" id="conteudojanelaguias_corpo" style=padding:0px ></div>';temp=$i("i3geo")?$i("i3geo").appendChild(novoel):document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("janelaguias",{width:"270px",fixedcenter:true,constraintoviewport:false,underlay:"none",close:false,visible:true,draggable:true,modal:false,iframe:true});YAHOO.i3GEO.janela.manager.register(janela);janela.render();janela.show();janela.cfg.setProperty("y",0);i=$i(i3GEO.guias.IDGUIAS);$i("conteudojanelaguias_corpo").appendChild(i);i.style.borderLeft="1px solid black";i.style.borderRight="1px solid black";guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){if($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo)){$i("conteudojanelaguias_corpo").appendChild($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo));temp=$i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo).style;temp.background="white";temp.border="1px solid black";temp.borderTop="0px solid black";temp.width="270px";temp.left="-1px";temp.height=i3GEO.parametros.h-90+"px"}}i3GEO.atualiza("");i.style.display="block";i.style.left="-1px";i.style.width="270px"};i3GEO.php.mudatamanho(temp,a,l)}else{janela=YAHOO.i3GEO.janela.manager.find(id);janela.show();janela.bringToTop()}},mostraGuiaFerramenta:function(guia,namespace){var g,Dom=YAHOO.util.Dom;if(!namespace){namespace="guia"}for(g=0;g<12;g++){Dom.setStyle(namespace+g+"obj","display","none")}Dom.setStyle(guia+"obj","display","block")},ajustaGuiaFerramenta:function(idjanela,namespace){var c=$i(idjanela+"_corpo"),h,g,temp;c.style.overflow="unset";c.style.overflow="none";h=c.style.height;h=parseInt(h,10)-40+"px";for(g=0;g<12;g++){temp=$i(namespace+"guia"+g+"obj");if(temp){temp.style.height=h;temp.style.width="100%";temp.style.overflow="auto"}}},guiaMovel:{ABERTA:false,config:{larguraPuxador:50,alturaPuxador:319,alturaGuiaMovel:0,larguraGuiaMovel:320,topGuiaMovel:0,guias:{icones:[],ids:[],idsconteudos:[],titulos:[],chaves:[]},posicao:["c","r"]},left:0,inicia:function(){var posMapa=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA)),centroY=posMapa[1]+(i3GEO.parametros.h/2),config=i3GEO.guias.guiaMovel.config,temp;if(i3GEO.guias.ALTURACORPOGUIAS===0&&config.alturaGuiaMovel===0){i3GEO.guias.guiaMovel.config.alturaGuiaMovel=i3GEO.parametros.h}else{i3GEO.guias.guiaMovel.config.alturaGuiaMovel=i3GEO.guias.ALTURACORPOGUIAS}config=i3GEO.guias.guiaMovel.config;temp=$i("i3GEOguiaMovel").style;if(config.posicao[1]==="r"){temp.left=(posMapa[0]+i3GEO.parametros.w-config.larguraPuxador)+"px";i3GEO.guias.guiaMovel.left=parseInt(temp.left,10)+"px"}if(config.posicao[1]==="l"){temp.left=posMapa[0]+"px";i3GEO.guias.guiaMovel.left=parseInt(temp.left,10)+"px"}if(config.topGuiaMovel===0){temp.top=(centroY-((config.alturaGuiaMovel-42)/2))+"px"}else{temp.top=config.topGuiaMovel+"px"}temp.width=config.larguraPuxador+"px";temp.height=config.alturaGuiaMovel+"px";temp=$i("i3GEOguiaMovelMolde").style;temp.top="0px";if(config.posicao[1]==="r"){temp.left=config.larguraPuxador+"px"}if(config.posicao[1]==="l"){temp.left="1px"}temp.height=config.alturaGuiaMovel+"px";temp.backgroundColor="white";if($i("i3GEOguiaMovelPuxador")){temp=$i("i3GEOguiaMovelPuxador").style;temp.top=((config.alturaGuiaMovel-config.alturaPuxador)/2)+"px";temp.left="0px";temp.width=config.larguraPuxador+"px";temp.height=config.alturaPuxador+"px"}temp=$i("i3GEOguiaMovelIcones");if(temp){temp=temp.style;temp.left="1px";temp.top="1px";temp.width=(config.larguraGuiaMovel-1)+"px";temp.height="35px";if(navm){temp.height="37px"}temp.zIndex=5;temp.paddingTop="2px";YAHOO.util.Dom.setStyle("i3GEOguiaMovelIcones","opacity",0.60)}temp=$i("i3GEOguiaMovelConteudo").style;temp.left="1px";if(temp.top==""){temp.top="38px"}temp.height=(config.alturaGuiaMovel-39)+"px";if(navm){temp.width=(config.larguraGuiaMovel-1)+"px"}else{temp.width=(config.larguraGuiaMovel-5)+"px"}temp.paddingLeft="4px";YAHOO.util.Dom.setStyle("i3GEOguiaMovelConteudo","opacity",0.70);YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.10);$i("i3GEOguiaMovelMolde").onmouseover=function(){if($i("i3GEOguiaMovelConteudo").style.display==="block"){YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.9)}if($i("i3GEOguiaMovelIcones")&&$i("i3GEOguiaMovelIcones").innerHTML===""){i3GEO.guias.guiaMovel.mostraIcones()}};$i("i3GEOguiaMovelMolde").onmouseout=function(){YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.90);if($i("i3GEOguiaMovelIcones")&&$i("i3GEOguiaMovelIcones").innerHTML===""){i3GEO.guias.guiaMovel.mostraIcones()}};if(i3GEO.guias.guiaMovel.ABERTA===true){i3GEO.guias.guiaMovel.ativa(i3GEO.guias.ATUAL)}i3GEO.guias.guiaMovel.mostraIcones();temp=$i("i3GEOguiaMovel");temp.style.visibility="visible";temp.style.height=parseInt(temp.style.height)-20+"px";i3GEO.util.aparece("i3GEOguiaMovel",300,100)},mostraIcones:function(){if($i("i3GEOguiaMovelIcones")&&$i("i3GEOguiaMovelIcones").innerHTML!=""){return}var n=i3GEO.guias.guiaMovel.config.guias.icones.length,i,temp=i3GEO.guias.guiaMovel.config.guias,ins="",ico;if(i3GEO.guias.ORDEM!==""){temp.chaves=i3GEO.guias.ORDEM}for(i=0;i<n;i++){if(temp.chaves[i]){ico="<button title='"+temp.titulos[i]+"' onmouseout='javascript:this.className = \"iconeGuiaMovel iconeGuiaMovelMouseOut\"' onmouseover='javascript:this.className = \"iconeGuiaMovel iconeGuiaMovelMouseOver\"' onclick='i3GEO.guias.guiaMovel.ativa(\""+temp.chaves[i]+"\")' class=iconeGuiaMovel ><img id='"+temp.ids[i]+"' src='"+i3GEO.configura.locaplic+"/"+temp.icones[i]+"' style='cursor:pointer;' /></button>";if(!$i("iconeGuia_"+temp.chaves[i])){ins+=ico}else{$i("iconeGuia_"+temp.chaves[i]).innerHTML=ico}}}if($i("i3GEOguiaMovelIcones")){$i("i3GEOguiaMovelIcones").innerHTML=ins}ins="1.2px";if(navn&&chro===false){ins="0px"}for(i=0;i<n;i++){ico=$i(temp.ids[i]);if(ico){YAHOO.util.Dom.setStyle(ico,"padding",ins)}}i3GEO.guias.guiaMovel.desativaIcones();if(i3GEO.guias.ATUAL!=""){ico=$i(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].id);if(ico){YAHOO.util.Dom.setStyle(ico,"opacity",0.9);ico.parentNode.style.boxShadow="none"}}},desativaIcones:function(o){var ims,n,i;if(!o){o=0.9}ims=$i("i3GEOguiaMovelIcones");if(ims){ims=ims.getElementsByTagName("button");n=ims.length;for(i=0;i<n;i++){YAHOO.util.Dom.setStyle(ims[i],"opacity",o);ims[i].style.boxShadow="none"}}n=i3GEO.guias.guiaMovel.config.guias.icones.length;temp=i3GEO.guias.guiaMovel.config.guias;for(i=0;i<n;i++){if($i("iconeGuia_"+temp.chaves[i])){ims=$i("iconeGuia_"+temp.chaves[i]).getElementsByTagName("button");if(ims.length>0){ims[0].style.backgroundColor="white";ims[0].style.boxShadow="none";ims[0].style.margin="0px";ims[0].style.border="1px solid gray";if(i3GEO.guias.guiaMovel.config.posicao[1]==="l"){ims[0].style.borderLeft="2px solid white"}else{ims[0].style.borderRight="2px solid white"}YAHOO.util.Dom.setStyle(ims[0],"opacity",o);ims[0].blur()}}}},ativa:function(chave){if(chave===""){i3GEO.guias.guiaMovel.desativaIcones();return}i3GEO.guias.escondeGuias();i3GEO.guias.guiaMovel.desativaIcones(0.5);if(i3GEO.guias.ATUAL===chave&&$i("i3GEOguiaMovelMolde").style.display==="block"){i3GEO.guias.ATUAL="";i3GEO.guias.guiaMovel.desativaIcones(0.9);i3GEO.guias.guiaMovel.abreFecha("fecha")}else{i3GEO.guias.ATUAL=chave;i3GEO.guias.guiaMovel.abreFecha("abre");if(i3GEO.guias.CONFIGURA[chave].click){i3GEO.guias.CONFIGURA[chave].click.call()}i3GEO.guias.mostra(chave);var ico=$i(i3GEO.guias.CONFIGURA[chave].id);if(ico){ico.parentNode.blur();YAHOO.util.Dom.setStyle(ico.parentNode,"opacity",0.9);ico.parentNode.style.boxShadow="none";if($i("iconeGuia_"+chave)){if(i3GEO.guias.guiaMovel.config.posicao[1]==="l"){ico.parentNode.style.borderLeft="2px solid white"}else{ico.parentNode.style.borderRight="2px solid white"}}}}},reposiciona:function(){var temp=$i("i3GEOguiaMovel").style.top;i3GEO.guias.guiaMovel.config.alturaGuiaMovel=0;i3GEO.guias.ALTURACORPOGUIAS=0;if($i("i3GEOguiaMovelIcones")){$i("i3GEOguiaMovelIcones").style.display="none"}$i("i3GEOguiaMovelConteudo").style.display="none";$i("i3GEOguiaMovelMolde").style.display="none";i3GEO.guias.escondeGuias();i3GEO.guias.guiaMovel.inicia();$i("i3GEOguiaMovel").style.top=temp},abreFecha:function(forca){var molde=$i("i3GEOguiaMovelMolde"),guia=$i("i3GEOguiaMovel"),attributes,anim,anim1,anim2,temp;if(!forca){if(molde.style.display==="block"){forca="fecha"}else{temp=i3GEO.guias.ATUAL;i3GEO.guias.ATUAL="";i3GEO.guias.guiaMovel.ativa(temp);return}}if(forca==="fecha"){if($i("i3GEOguiaMovelIcones")){$i("i3GEOguiaMovelIcones").style.display="none"}$i("i3GEOguiaMovelConteudo").style.display="none";attributes={left:{to:parseInt(i3GEO.guias.guiaMovel.left,10)},id:"i3GEOguiaMovel"};anim=new YAHOO.util.Anim(guia,attributes,1,YAHOO.util.Easing.easeNone);attributes={width:{to:0},id:"i3GEOguiaMovelMolde"};anim1=new YAHOO.util.Anim(molde,attributes,1,YAHOO.util.Easing.easeNone);anim.duration=0.5;anim1.duration=0.5;anim1.onComplete.subscribe(function(){molde.style.display="none"});if(i3GEO.guias.guiaMovel.config.posicao[1]==="l"&&$i("i3GEOguiaMovelIconesPuxador")){attributes={left:{to:0}};anim2=new YAHOO.util.Anim("i3GEOguiaMovelIconesPuxador",attributes,1,YAHOO.util.Easing.easeNone);anim2.duration=0.5;anim2.animate()}anim.animate();anim1.animate()}else if(molde.style.display!="block"){molde.style.display="block";if(i3GEO.guias.guiaMovel.config.posicao[1]==="l"){attributes={rigth:{to:(parseInt(guia.style.left,10)-i3GEO.guias.guiaMovel.config.larguraGuiaMovel)*-1},id:"i3GEOguiaMovel"}}else{attributes={left:{to:parseInt(guia.style.left,10)-i3GEO.guias.guiaMovel.config.larguraGuiaMovel},id:"i3GEOguiaMovel"}}anim=new YAHOO.util.Anim(guia,attributes,1,YAHOO.util.Easing.easeNone);attributes={width:{to:i3GEO.guias.guiaMovel.config.larguraGuiaMovel},id:"i3GEOguiaMovelMolde"};anim1=new YAHOO.util.Anim(molde,attributes,1,YAHOO.util.Easing.easeNone);anim.duration=0.5;anim1.duration=0.5;anim1.onComplete.subscribe(function(){if($i("i3GEOguiaMovelIcones")){$i("i3GEOguiaMovelIcones").style.display="block"}$i("i3GEOguiaMovelConteudo").style.display="block";YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.9)});if(i3GEO.guias.guiaMovel.config.posicao[1]==="l"&&$i("i3GEOguiaMovelIconesPuxador")){attributes={left:{to:i3GEO.guias.guiaMovel.config.larguraGuiaMovel}};anim2=new YAHOO.util.Anim("i3GEOguiaMovelIconesPuxador",attributes,1,YAHOO.util.Easing.easeNone);anim2.duration=0.5;anim2.animate()}anim.animate();anim1.animate()}}}}; | |
| 255 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.guias={ATUAL:"temas",ALTURACORPOGUIAS:0,CONFIGURA:{"temas":{icone:"imagens/layer.png",titulo:$trad("g4a"),id:"guia1",idconteudo:"guia1obj",click:""},"adiciona":{icone:"imagens/catalogo.png",titulo:$trad("g1a"),id:"guia2",idconteudo:"guia2obj",click:function(){var ondeArvore;i3GEO.guias.mostra("adiciona");if(!$i("arvoreAdicionaTema")){try{ondeArvore=objmapa.guiaMenu+"obj"}catch(e){ondeArvore="guia2obj"}}else{ondeArvore="arvoreAdicionaTema"}if(document.getElementById("outrasOpcoesAdiciona")){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde="outrasOpcoesAdiciona";i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore=false}i3GEO.arvoreDeTemas.cria(i3GEO.configura.sid,i3GEO.configura.locaplic,ondeArvore)}},"legenda":{icone:"imagens/legenda.png",titulo:$trad("g3"),id:"guia4",idconteudo:"guia4obj",click:function(){i3GEO.guias.mostra("legenda");i3GEO.util.defineValor(i3GEO.mapa.legendaHTML.ID,"innerHTML","");i3GEO.mapa.legendaHTML.cria("guia4obj")}},"mapas":{icone:"imagens/gisicons/show-links.png",titulo:"Links",id:"guia5",idconteudo:"guia5obj",mostraLink:function(id,url){$i("i3geoMapasLink_"+id).innerHTML="<a href='"+url+"' target=_blank >"+url+"</a>"},click:function(onde){if(!onde){onde=i3GEO.guias.CONFIGURA.mapas.idconteudo}var pegaMapas=function(retorno){var ins,mapa,ig1lt,ig1,nome,lkd,link,temp,combo,urlinterface;ins="<br><div id='banners' style='overflow:auto;text-align:center'>"+"<a href='"+i3GEO.configura.locaplic+"/admin/html/mapas.html' target=_blank >"+$trad("x89")+"</a><br><br>";mapa=retorno.data.mapas;ig1lt=mapa.length;ig1=0;urlinterface=window.location.origin+window.location.pathname;if(ig1lt>0){do{temp=mapa[ig1];nome=temp.NOME;if(temp.PUBLICADO){if(temp.PUBLICADO.toLowerCase()==="nao"){nome="<s>"+nome+"</s>"}}lkd=temp.LINK;link=i3GEO.configura.locaplic+"/ms_criamapa.php?temasa="+temp.TEMAS+"&layers="+temp.LIGADOS;if(temp.EXTENSAO!==""){link+="&mapext="+temp.EXTENSAO}if(temp.OUTROS!==""){link+="&"+temp.OUTROS}if(lkd!==""){link=lkd}ins+="<div style='width:170px;background-color:white;padding:5px;margin:auto;border: 1px solid #F0F0F0;border-radius: 5px;box-shadow: 1px 1px 1px 1px #D3D3D3;' >";if(temp.IMAGEM&&temp.IMAGEM!=""){ins+="<div style=text-align:center ><a href='"+link+"' style=text-align:center;text-decoration:none; >"+"<img src='"+temp.IMAGEM+"'></a></div><br>"}if(temp.CONTEMMAPFILE=="nao"){ins+="<div><p class=paragrafo style=text-align:center;cursor:pointer >"+"<a href='"+link+"' style=text-align:center;text-decoration:none; >"+nome+" ("+temp.ID_MAPA+")</a></p></div>"}else{combo="<select style='width:170px;' onchange='i3GEO.guias.CONFIGURA.mapas.mostraLink("+ig1+",this.value)'>"+"<option value=''>"+$trad("x103")+":</option>"+"<option value='"+link+"'>Como foi salvo</option>"+"<option value='"+link+"&interface="+urlinterface+"'>Com a interface atual</option>"+"<option value='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?restauramapa="+temp.ID_MAPA+"&fundo=e_wsm'>Openlayers com todos os botoes</option>"+"<option value='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?restauramapa="+temp.ID_MAPA+"&fundo=est_wms'>Sem o fundo</option>"+"<option value='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?restauramapa="+temp.ID_MAPA+"&fundo=e_wsm&botoes=legenda pan zoombox zoomtot zoomin zoomout distancia area identifica'>Com booes principais</option>"+"<option value='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?restauramapa="+temp.ID_MAPA+"&botoes=legenda pan zoombox zoomtot zoomin zoomout'>Botoes de navegacao</option>"+"</select>";ins+="<div>"+"<p class=paragrafo style=text-align:center;cursor:pointer >"+"<img style=text-align:center src='"+i3GEO.configura.locaplic+"/ferramentas/salvamapa/geraminiatura.php?w=100&h=67&restauramapa="+temp.ID_MAPA+"'><br><br>"+"<a href='"+link+"' style=text-align:center;text-decoration:none; >"+nome+" ("+temp.ID_MAPA+")</a>"+"<br>"+combo+"<br><div style='cursor:pointer;' id='i3geoMapasLink_"+ig1+"' ></div>"+"</p></div>"}ins+="</div><br>";ig1++}while(ig1<ig1lt)}$i(onde).innerHTML=ins+"</div>"};if($i(i3GEO.guias.CONFIGURA.mapas.idconteudo)){$i(i3GEO.guias.CONFIGURA.mapas.idconteudo).innerHTML="Aguarde..."}i3GEO.guias.mostra("mapas");i3GEO.php.pegaMapas(pegaMapas);i3GEO.navega.removeCookieExtensao()}}},ORDEM:"",TIPO:"guia",IDGUIAS:"guiasYUI",cria:function(onde){var atrib,nguiasreal=0,guiaconteudo,id,guia,g,re,ng,tituloguia,i,ins,altura,temp,CONFIGURA=i3GEO.guias.CONFIGURA,guias=i3GEO.util.listaChaves(CONFIGURA),nguias=guias.length;if(i3GEO.guias.TIPO==="movel"){i3GEO.guias.IDGUIAS="i3GEOguiaMovelConteudo";for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo)){i3GEO.guias.guiaMovel.config.guias.ids.push(i3GEO.guias.CONFIGURA[guias[ng]].id);i3GEO.guias.guiaMovel.config.guias.idsconteudos.push(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo);if(i3GEO.guias.CONFIGURA[guias[ng]].icone!==undefined){i3GEO.guias.guiaMovel.config.guias.icones.push(i3GEO.guias.CONFIGURA[guias[ng]].icone)}else{i3GEO.guias.guiaMovel.config.guias.icones.push("imagens/gisicons/open1.png")}i3GEO.guias.guiaMovel.config.guias.titulos.push(i3GEO.guias.CONFIGURA[guias[ng]].titulo);i3GEO.guias.guiaMovel.config.guias.chaves.push(guias[ng])}}return}try{for(g=0;g<12;g++){tituloguia="";if($i("guia"+g)){tituloguia=$i("guia"+g).innerHTML;re=new RegExp(" ","g");tituloguia=tituloguia.replace(re,'');for(ng=0;ng<nguias;ng++){if(CONFIGURA[guias[ng]].id==="guia"+g){tituloguia=""}}if(tituloguia!==""){i3GEO.guias.CONFIGURA["guia"+g]=[];i3GEO.guias.CONFIGURA["guia"+g].titulo=tituloguia;i3GEO.guias.CONFIGURA["guia"+g].id="guia"+g;i3GEO.guias.CONFIGURA["guia"+g].idconteudo="guia"+g+"obj";if($i('guia'+g).onclick){i3GEO.guias.CONFIGURA["guia"+g].click=$i("guia"+g).onclick}}}}if(i3GEO.guias.ORDEM===""){guias=i3GEO.util.listaChaves(CONFIGURA)}else{guias=i3GEO.guias.ORDEM}nguias=guias.length;if(arguments.length===0){for(ng=0;ng<nguias;ng++){if(i3GEO.guias.CONFIGURA[guias[ng]]){i=$i(i3GEO.guias.CONFIGURA[guias[ng]].id);if(i){onde=i.parentNode}}}}else{onde=$i(onde)}if(!onde){return}onde.id=i3GEO.guias.IDGUIAS;onde.className="yui-navset";if(i3GEO.guias.TIPO==="guia"||i3GEO.guias.TIPO==="tablet"){ins='<ul class="yui-nav" style="border-width:0pt 0pt 0px;border-color:rgb(240,240,240);border-bottom-color:white;text-align:center;">';for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){if($i(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo)){ins+='<li><a alt="" title=""><em><div id="'+i3GEO.guias.CONFIGURA[guias[ng]].id+'" >'+i3GEO.guias.CONFIGURA[guias[ng]].titulo+'</div></em></a></li>'}}}ins+="</ul>";onde.innerHTML=ins}if(i3GEO.guias.TIPO==="sanfona"){ins='<dl id=sanfona'+onde.id+' class="accordion" >';if(i3GEO.guias.ORDEM===""){for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){nguiasreal++}}}else{nguiasreal=i3GEO.guias.ORDEM.length}if(navn){altura=i3GEO.parametros.h-(nguiasreal*25)-1}else{altura=i3GEO.parametros.h-(nguiasreal*23)+1}for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){id=i3GEO.guias.CONFIGURA[guias[ng]].idconteudo;temp=$i(id);if(temp){guiaconteudo=temp.innerHTML;temp.innerHTML="";temp.style.display="none";temp.id="";ins+='<dt style=height:17px id="'+i3GEO.guias.CONFIGURA[guias[ng]].id+'" >'+'<table class=accordiontable ><tr><td width="98%" >'+i3GEO.guias.CONFIGURA[guias[ng]].titulo+'</td><td width="2%" ><img id="" src="'+i3GEO.configura.locaplic+'/imagens/branco.gif" style="width:10px;" /></td></tr></table>'+'<dd clas=close >'+'<div class=bd >'+'<div id="'+id+'" >'+guiaconteudo+'</div></div></dd>'}}}ins+="</dl>";onde.innerHTML=ins;onde.style.height=altura+"px";YAHOO.lutsr.accordion.init(true,5,false,"sanfona"+onde.id,altura);i3GEO.guias.ALTURACORPOGUIAS=altura}for(g=0;g<nguias;g++){guia=i3GEO.guias.CONFIGURA[guias[g]];id=guia.id;guiaconteudo=$i(id);if(guiaconteudo){if(guia.click===""||guia.click===undefined){atrib=document.createAttribute("nomeGuia");atrib.value=guias[g];$i(id).setAttributeNode(atrib);$i(id).onclick=function(event){i3GEO.guias.mostra(this.attributes["nomeGuia"].value)}}else{guiaconteudo.onclick=guia.click}YAHOO.util.Event.addListener($i(id),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addListener($i(id),"click",YAHOO.util.Event.stopPropagation);YAHOO.util.Event.addFocusListener($i(id),YAHOO.util.Event.preventDefault);guiaconteudo.onmouseover=function(){};guiaconteudo.onmouseout=function(){};temp=$i(guia.idconteudo);if(temp){temp.style.overflow="auto";if(i3GEO.guias.TIPO==="guia"){if(i3GEO.guias.ALTURACORPOGUIAS===0){temp.style.height=i3GEO.parametros.h+"px"}else{temp.style.height=i3GEO.guias.ALTURACORPOGUIAS+"px"}}else{temp.style.height=onde.style.height}}}}}catch(e){}if(i3GEO.guias.TIPO!=="tablet"){i3GEO.guias.mostra(i3GEO.guias.ATUAL);i3GEO.guias.ativa(i3GEO.guias.ATUAL)}else{i3GEO.guias.escondeGuias()}},ajustaAltura:function(){var guia,guias,nguias,temp,temps,n,i,g,altura=0;if(i3GEO.guias.ALTURACORPOGUIAS!=0){altura=i3GEO.guias.ALTURACORPOGUIAS}guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){guia=$i(this.CONFIGURA[guias[g]].idconteudo);if(guia){guia.style.overflow="auto";if(this.TIPO==="guia"){if(altura===0){guia.style.height=i3GEO.parametros.h+"px"}else{guia.style.height=altura+"px"}}if(this.TIPO==="sanfona"){guia.style.height=altura+"px";temp=$i("guiasYUI");if(temp){temp.style.height=altura+"px";temps=temp.getElementsByTagName("dd");n=temps.length;for(i=0;i<n;i++){if(temps[i].style.visibility=="visible"){temps[i].style.height=altura+"px"}}}YAHOO.lutsr.accordion.properties.altura=altura}}}},escondeGuias:function(){var guias,nguias,g,temp,attributes,anim;guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){temp=$i(this.CONFIGURA[guias[g]].idconteudo);if(temp){if(i3GEO.guias.TIPO==="tablet"&&temp.style.display==="block"){temp.style.overflow="hidden";attributes={height:{to:0},id:this.CONFIGURA[guias[g]].idconteudo};anim=new YAHOO.util.Anim(temp,attributes,1,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){var temp=$i(anim.attributes.id);temp.style.overflow="auto";temp.style.display="none";if(i3GEO.barraDeBotoes.BARRAS[0]){i3GEO.barraDeBotoes.BARRAS[0].show()}});anim.animate()}else{temp.style.display="none"}}if($i(this.CONFIGURA[guias[g]].id)&&i3GEO.guias.TIPO!=="movel"){$i(this.CONFIGURA[guias[g]].id).parentNode.parentNode.style.background="transparent"}}},mostra:function(guia){var guias,nguias,g,temp,attributes,anim;guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;if(!$i(i3GEO.guias.CONFIGURA[guia].id)){return}if(!$i(i3GEO.guias.CONFIGURA[guia].idconteudo)){return}if($i(i3GEO.guias.CONFIGURA[guia].idconteudo).style.display==="block"&&i3GEO.guias.TIPO==="tablet"){i3GEO.guias.escondeGuias();return}if(i3GEO.guias.TIPO!=="movel"){for(g=0;g<nguias;g++){if($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo)){$i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo).style.display="none"}if($i(i3GEO.guias.CONFIGURA[guias[g]].id)){$i(i3GEO.guias.CONFIGURA[guias[g]].id).parentNode.parentNode.style.background="transparent"}}}if(i3GEO.guias.CONFIGURA.toString().search(guia)<0){for(g=0;g<nguias;g++){if(i3GEO.guias.CONFIGURA[guias[g]].id===guia){guia=guias[g]}}}if(i3GEO.guias.CONFIGURA[guia]){temp=$i(i3GEO.guias.CONFIGURA[guia].idconteudo);if(temp){if(i3GEO.guias.TIPO==="tablet"){if(i3GEO.barraDeBotoes.BARRAS[0]){i3GEO.barraDeBotoes.BARRAS[0].hide()}temp.style.left=(i3GEO.parametros.w/2)-150+"px";temp.style.height=0;temp.style.display="block";temp.style.zIndex=9000;temp.style.overflow="hidden";attributes={height:{to:i3GEO.parametros.h-10}};anim=new YAHOO.util.Anim(temp,attributes,1,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){temp.style.overflow="auto";temp.style.display="block"});if(DetectaMobile("DetectAndroid")===true){temp.style.height="";temp.style.overflow="auto"}else{anim.animate()}}else{temp.style.display="block"}if(i3GEO.guias.TIPO!=="movel"){$i(i3GEO.guias.CONFIGURA[guia].id).parentNode.parentNode.style.backgroundColor="white"}i3GEO.guias.ATUAL=guia}}},ativa:function(guia){try{i3GEO.guias.ATUAL=guia;if(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].click!==""){i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].click.call()}}catch(e){}},libera:function(){if(!$i("conteudojanelaguias")){var i,w,pos,a,l,temp;$i(i3GEO.Interface.IDCORPO).style.left="0px";if($i(this.IDGUIAS)){$i(this.IDGUIAS).style.display="none"}i=$i("contemFerramentas");w=parseInt($i("contemFerramentas").style.width,10);$i("contemFerramentas").style.width="0px";pos="px";a=i3GEO.parametros.h;l=i3GEO.parametros.w+w;i3GEO.parametros.h=a;i3GEO.parametros.w=l;i=$i(i3GEO.Interface.IDCORPO);if(i){i.style.width=l+pos;i.style.height=a+pos}i=$i(i3GEO.Interface.IDMAPA);if(i){i.style.width=l+pos;i.style.height=a+pos;i.style.clip='rect('+0+" "+(l*1+2)+" "+(a*1+2)+" "+0+')'}i=$i("mst");if(i){i.style.width=l+1+pos}i3GEO.mapa.ajustaPosicao();temp=function(retorno){var novoel,temp,i,g,guias,nguias,janela;novoel=document.createElement("div");novoel.id="janelaguias";novoel.style.display="block";novoel.innerHTML='<div class="hd">Guias <div onclick ="i3GEO.janela.minimiza(conteudojanelaguias)" id="janelaguias_minimizaCabecalho" class="container-minimiza" ></div></div><div class="bd" id="conteudojanelaguias_corpo" style=padding:0px ></div>';temp=$i("i3geo")?$i("i3geo").appendChild(novoel):document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("janelaguias",{width:"270px",fixedcenter:true,constraintoviewport:false,underlay:"none",close:false,visible:true,draggable:true,modal:false,iframe:true});YAHOO.i3GEO.janela.manager.register(janela);janela.render();janela.show();janela.cfg.setProperty("y",0);i=$i(i3GEO.guias.IDGUIAS);$i("conteudojanelaguias_corpo").appendChild(i);i.style.borderLeft="1px solid black";i.style.borderRight="1px solid black";guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){if($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo)){$i("conteudojanelaguias_corpo").appendChild($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo));temp=$i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo).style;temp.background="white";temp.border="1px solid black";temp.borderTop="0px solid black";temp.width="270px";temp.left="-1px";temp.height=i3GEO.parametros.h-90+"px"}}i3GEO.atualiza("");i.style.display="block";i.style.left="-1px";i.style.width="270px"};i3GEO.php.mudatamanho(temp,a,l)}else{janela=YAHOO.i3GEO.janela.manager.find(id);janela.show();janela.bringToTop()}},mostraGuiaFerramenta:function(guia,namespace){var g,Dom=YAHOO.util.Dom;if(!namespace){namespace="guia"}for(g=0;g<12;g++){Dom.setStyle(namespace+g+"obj","display","none")}Dom.setStyle(guia+"obj","display","block")},ajustaGuiaFerramenta:function(idjanela,namespace){var c=$i(idjanela+"_corpo"),h,g,temp;c.style.overflow="unset";c.style.overflow="none";h=c.style.height;h=parseInt(h,10)-40+"px";for(g=0;g<12;g++){temp=$i(namespace+"guia"+g+"obj");if(temp){temp.style.height=h;temp.style.width="100%";temp.style.overflow="auto"}}},guiaMovel:{ABERTA:false,config:{larguraPuxador:50,alturaPuxador:319,alturaGuiaMovel:0,larguraGuiaMovel:320,topGuiaMovel:0,guias:{icones:[],ids:[],idsconteudos:[],titulos:[],chaves:[]},posicao:["c","r"]},left:0,inicia:function(){var posMapa=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA)),centroY=posMapa[1]+(i3GEO.parametros.h/2),config=i3GEO.guias.guiaMovel.config,temp;if(i3GEO.guias.ALTURACORPOGUIAS===0&&config.alturaGuiaMovel===0){i3GEO.guias.guiaMovel.config.alturaGuiaMovel=i3GEO.parametros.h}else{i3GEO.guias.guiaMovel.config.alturaGuiaMovel=i3GEO.guias.ALTURACORPOGUIAS}config=i3GEO.guias.guiaMovel.config;temp=$i("i3GEOguiaMovel").style;if(config.posicao[1]==="r"){temp.left=(posMapa[0]+i3GEO.parametros.w-config.larguraPuxador)+"px";i3GEO.guias.guiaMovel.left=parseInt(temp.left,10)+"px"}if(config.posicao[1]==="l"){temp.left=posMapa[0]+"px";i3GEO.guias.guiaMovel.left=parseInt(temp.left,10)+"px"}if(config.topGuiaMovel===0){temp.top=(centroY-((config.alturaGuiaMovel-42)/2))+"px"}else{temp.top=config.topGuiaMovel+"px"}temp.width=config.larguraPuxador+"px";temp.height=config.alturaGuiaMovel+"px";temp=$i("i3GEOguiaMovelMolde").style;temp.top="0px";if(config.posicao[1]==="r"){temp.left=config.larguraPuxador+"px"}if(config.posicao[1]==="l"){temp.left="1px"}temp.height=config.alturaGuiaMovel+"px";temp.backgroundColor="white";if($i("i3GEOguiaMovelPuxador")){temp=$i("i3GEOguiaMovelPuxador").style;temp.top=((config.alturaGuiaMovel-config.alturaPuxador)/2)+"px";temp.left="0px";temp.width=config.larguraPuxador+"px";temp.height=config.alturaPuxador+"px"}temp=$i("i3GEOguiaMovelIcones");if(temp){temp=temp.style;temp.left="1px";temp.top="1px";temp.width=(config.larguraGuiaMovel-1)+"px";temp.height="35px";if(navm){temp.height="37px"}temp.zIndex=5;temp.paddingTop="2px";YAHOO.util.Dom.setStyle("i3GEOguiaMovelIcones","opacity",0.60)}temp=$i("i3GEOguiaMovelConteudo").style;temp.left="1px";if(temp.top==""){temp.top="38px"}temp.height=(config.alturaGuiaMovel-39)+"px";if(navm){temp.width=(config.larguraGuiaMovel-1)+"px"}else{temp.width=(config.larguraGuiaMovel-5)+"px"}temp.paddingLeft="4px";YAHOO.util.Dom.setStyle("i3GEOguiaMovelConteudo","opacity",0.70);YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.10);$i("i3GEOguiaMovelMolde").onmouseover=function(){if($i("i3GEOguiaMovelConteudo").style.display==="block"){YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.9)}if($i("i3GEOguiaMovelIcones")&&$i("i3GEOguiaMovelIcones").innerHTML===""){i3GEO.guias.guiaMovel.mostraIcones()}};$i("i3GEOguiaMovelMolde").onmouseout=function(){YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.90);if($i("i3GEOguiaMovelIcones")&&$i("i3GEOguiaMovelIcones").innerHTML===""){i3GEO.guias.guiaMovel.mostraIcones()}};if(i3GEO.guias.guiaMovel.ABERTA===true){i3GEO.guias.guiaMovel.ativa(i3GEO.guias.ATUAL)}i3GEO.guias.guiaMovel.mostraIcones();temp=$i("i3GEOguiaMovel");temp.style.visibility="visible";temp.style.height=parseInt(temp.style.height)-20+"px";i3GEO.util.aparece("i3GEOguiaMovel",300,100)},mostraIcones:function(){if($i("i3GEOguiaMovelIcones")&&$i("i3GEOguiaMovelIcones").innerHTML!=""){return}var n=i3GEO.guias.guiaMovel.config.guias.icones.length,i,temp=i3GEO.guias.guiaMovel.config.guias,ins="",ico;if(i3GEO.guias.ORDEM!==""){temp.chaves=i3GEO.guias.ORDEM}for(i=0;i<n;i++){if(temp.chaves[i]){ico="<button title='"+temp.titulos[i]+"' onmouseout='javascript:this.className = \"iconeGuiaMovel iconeGuiaMovelMouseOut\"' onmouseover='javascript:this.className = \"iconeGuiaMovel iconeGuiaMovelMouseOver\"' onclick='i3GEO.guias.guiaMovel.ativa(\""+temp.chaves[i]+"\")' class=iconeGuiaMovel ><img id='"+temp.ids[i]+"' src='"+i3GEO.configura.locaplic+"/"+temp.icones[i]+"' style='cursor:pointer;' /></button>";if(!$i("iconeGuia_"+temp.chaves[i])){ins+=ico}else{$i("iconeGuia_"+temp.chaves[i]).innerHTML=ico}}}if($i("i3GEOguiaMovelIcones")){$i("i3GEOguiaMovelIcones").innerHTML=ins}ins="1.2px";if(navn&&chro===false){ins="0px"}for(i=0;i<n;i++){ico=$i(temp.ids[i]);if(ico){YAHOO.util.Dom.setStyle(ico,"padding",ins)}}i3GEO.guias.guiaMovel.desativaIcones();if(i3GEO.guias.ATUAL!=""){ico=$i(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].id);if(ico){YAHOO.util.Dom.setStyle(ico,"opacity",0.9);ico.parentNode.style.boxShadow="none"}}},desativaIcones:function(o){var ims,n,i;if(!o){o=0.9}ims=$i("i3GEOguiaMovelIcones");if(ims){ims=ims.getElementsByTagName("button");n=ims.length;for(i=0;i<n;i++){YAHOO.util.Dom.setStyle(ims[i],"opacity",o);ims[i].style.boxShadow="none"}}n=i3GEO.guias.guiaMovel.config.guias.icones.length;temp=i3GEO.guias.guiaMovel.config.guias;for(i=0;i<n;i++){if($i("iconeGuia_"+temp.chaves[i])){ims=$i("iconeGuia_"+temp.chaves[i]).getElementsByTagName("button");if(ims.length>0){ims[0].style.backgroundColor="white";ims[0].style.boxShadow="none";ims[0].style.margin="0px";ims[0].style.border="1px solid gray";if(i3GEO.guias.guiaMovel.config.posicao[1]==="l"){ims[0].style.borderLeft="2px solid white"}else{ims[0].style.borderRight="2px solid white"}YAHOO.util.Dom.setStyle(ims[0],"opacity",o);ims[0].blur()}}}},ativa:function(chave){if(chave===""){i3GEO.guias.guiaMovel.desativaIcones();return}i3GEO.guias.escondeGuias();i3GEO.guias.guiaMovel.desativaIcones(0.5);if(i3GEO.guias.ATUAL===chave&&$i("i3GEOguiaMovelMolde").style.display==="block"){i3GEO.guias.ATUAL="";i3GEO.guias.guiaMovel.desativaIcones(0.9);i3GEO.guias.guiaMovel.abreFecha("fecha")}else{i3GEO.guias.ATUAL=chave;i3GEO.guias.guiaMovel.abreFecha("abre");if(i3GEO.guias.CONFIGURA[chave].click){i3GEO.guias.CONFIGURA[chave].click.call()}i3GEO.guias.mostra(chave);var ico=$i(i3GEO.guias.CONFIGURA[chave].id);if(ico){ico.parentNode.blur();YAHOO.util.Dom.setStyle(ico.parentNode,"opacity",0.9);ico.parentNode.style.boxShadow="none";if($i("iconeGuia_"+chave)){if(i3GEO.guias.guiaMovel.config.posicao[1]==="l"){ico.parentNode.style.borderLeft="2px solid white"}else{ico.parentNode.style.borderRight="2px solid white"}}}}},reposiciona:function(){var temp=$i("i3GEOguiaMovel").style.top;i3GEO.guias.guiaMovel.config.alturaGuiaMovel=0;i3GEO.guias.ALTURACORPOGUIAS=0;if($i("i3GEOguiaMovelIcones")){$i("i3GEOguiaMovelIcones").style.display="none"}$i("i3GEOguiaMovelConteudo").style.display="none";$i("i3GEOguiaMovelMolde").style.display="none";i3GEO.guias.escondeGuias();i3GEO.guias.guiaMovel.inicia();$i("i3GEOguiaMovel").style.top=temp},abreFecha:function(forca){var molde=$i("i3GEOguiaMovelMolde"),guia=$i("i3GEOguiaMovel"),attributes,anim,anim1,anim2,temp;if(!forca){if(molde.style.display==="block"){forca="fecha"}else{temp=i3GEO.guias.ATUAL;i3GEO.guias.ATUAL="";i3GEO.guias.guiaMovel.ativa(temp);return}}if(forca==="fecha"){if($i("i3GEOguiaMovelIcones")){$i("i3GEOguiaMovelIcones").style.display="none"}$i("i3GEOguiaMovelConteudo").style.display="none";attributes={left:{to:parseInt(i3GEO.guias.guiaMovel.left,10)},id:"i3GEOguiaMovel"};anim=new YAHOO.util.Anim(guia,attributes,1,YAHOO.util.Easing.easeNone);attributes={width:{to:0},id:"i3GEOguiaMovelMolde"};anim1=new YAHOO.util.Anim(molde,attributes,1,YAHOO.util.Easing.easeNone);anim.duration=0.5;anim1.duration=0.5;anim1.onComplete.subscribe(function(){molde.style.display="none"});if(i3GEO.guias.guiaMovel.config.posicao[1]==="l"&&$i("i3GEOguiaMovelIconesPuxador")){attributes={left:{to:0}};anim2=new YAHOO.util.Anim("i3GEOguiaMovelIconesPuxador",attributes,1,YAHOO.util.Easing.easeNone);anim2.duration=0.5;anim2.animate()}anim.animate();anim1.animate()}else if(molde.style.display!="block"){molde.style.display="block";if(i3GEO.guias.guiaMovel.config.posicao[1]==="l"){attributes={rigth:{to:(parseInt(guia.style.left,10)-i3GEO.guias.guiaMovel.config.larguraGuiaMovel)*-1},id:"i3GEOguiaMovel"}}else{attributes={left:{to:parseInt(guia.style.left,10)-i3GEO.guias.guiaMovel.config.larguraGuiaMovel},id:"i3GEOguiaMovel"}}anim=new YAHOO.util.Anim(guia,attributes,1,YAHOO.util.Easing.easeNone);attributes={width:{to:i3GEO.guias.guiaMovel.config.larguraGuiaMovel},id:"i3GEOguiaMovelMolde"};anim1=new YAHOO.util.Anim(molde,attributes,1,YAHOO.util.Easing.easeNone);anim.duration=0.5;anim1.duration=0.5;anim1.onComplete.subscribe(function(){if($i("i3GEOguiaMovelIcones")){$i("i3GEOguiaMovelIcones").style.display="block"}$i("i3GEOguiaMovelConteudo").style.display="block";YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.9)});if(i3GEO.guias.guiaMovel.config.posicao[1]==="l"&&$i("i3GEOguiaMovelIconesPuxador")){attributes={left:{to:i3GEO.guias.guiaMovel.config.larguraGuiaMovel}};anim2=new YAHOO.util.Anim("i3GEOguiaMovelIconesPuxador",attributes,1,YAHOO.util.Easing.easeNone);anim2.duration=0.5;anim2.animate()}anim.animate();anim1.animate()}}}}; | |
| 256 | 256 | // |
| 257 | 257 | //compactados/classe_arvoredecamadas_compacto.js |
| 258 | 258 | if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.arvoreDeCamadas={ARVORE:null,IDHTML:"listaTemas",CAMADASINICIAIS:"",CAMADAS:"",FINALIZA:"",finaliza:"",NOTEMA:{expanded:true,hasIcon:false,enableHighlight:false},NOTEMAICONES:{expanded:false,hasIcon:true,enableHighlight:false},INCLUILFUNDO:true,ATIVATEMA:"",TEMPLATELEGENDA:"legenda5.htm",BARRAPROGRESSO:true,MOSTRALISTAKML:false,FILTRO:"",VERIFICAABRANGENCIATEMAS:false,EXPANDESOLEGENDA:false,PERMITEEXPANDIRTEMAS:true,ARRASTARORDEM:true,REFRESH:true,ARRASTARLIXEIRA:true,ALTERAOPACIDADE:false,FERRAMENTAS:true,IMPRIMIR:false,ANIMAMAPA:false,LIGARDESLIGARTODOS:true,FILTRAR:true,ABRELEGENDA:true,EXPANDIDA:false,LEGENDAEXPANDIDA:false,MOSTRATITULO:true,OPCOESICONES:true,OPCOESTEMAS:true,OPCOESLEGENDA:true,OPCOESARVORE:true,AGUARDALEGENDA:false,ICONETEMA:true,FUNCOES:{farolescala:true,excluir:true,sobe:true,desce:true,fonte:true,zoomtema:true,compartilhar:true,opacidade:true,mudanome:true,procurar:true,toponimia:true,etiquetas:true,filtrar:true,tabela:true,grafico:true,editorlegenda:true,destacar:true,cortina:true,sql:true,comentar:true,temporizador:true,wms:true,tme:true,copia:true},SID:null,LOCAPLIC:null,CONFIGICONES:{"refresh":{tipo:"arvore",icone:"",classe:"i3geo_refresh2",funcao:"i3GEO.arvoreDeCamadas.atualiza(i3GEO.arvoreDeCamadas.CAMADAS,true)",title:"Refresh",dica:$trad("refresh"),id:"i3geo_refresh",status:true},"lixeira":{tipo:"arvore",icone:"",classe:"i3geo_lixeira",funcao:"i3GEO.arvoreDeCamadas.dialogo.excluir()",title:$trad("t2"),dica:$trad("lixeira"),id:"i3geo_lixeira",status:true},"filtro":{tipo:"arvore",icone:"",classe:"i3geo_filtro",funcao:"i3GEO.arvoreDeCamadas.dialogo.filtro()",title:$trad("t2a"),dica:$trad("filtraCam"),id:"i3geo_filtro",status:true},"legenda":{tipo:"arvore",icone:"",classe:"soltaleg2",funcao:"i3GEO.mapa.legendaHTML.libera()",title:$trad("t2b"),dica:$trad("legenda"),id:"soltaleg2",status:true},"opacidade":{tipo:"arvore",icone:"",classe:"opacidadeMapa",funcao:"i3GEO.mapa.dialogo.opacidade()",title:$trad("t20"),dica:"",id:"opacidadeMapa",status:false},"animacao":{tipo:"arvore",icone:"",classe:"animaMapa",funcao:"i3GEO.mapa.dialogo.animacao()",title:$trad("p21"),dica:"",id:"animaMapa",status:false},"imprimir":{tipo:"arvore",icone:"",classe:"imprimirMapa",funcao:"i3GEO.mapa.dialogo.imprimir()",title:$trad("d12"),dica:"",id:"imprimirMapa",status:false},"ferramentas":{tipo:"arvore",icone:"",classe:"ferramentasMapa",funcao:"i3GEO.mapa.dialogo.ferramentas()",title:$trad("u15a"),dica:$trad("ferramMapa"),id:"ferramentasMapa",status:true},"ajuda":{tipo:"arvore",icone:"",classe:"ajudaMapa",funcao:"i3GEO.arvoreDeCamadas.ajudaEmLista()",title:$trad("s1"),dica:"",id:"ajudaMapa",status:true},"olhoaberto":{tipo:"arvore",icone:"",classe:"olhoAberto",funcao:"i3GEO.arvoreDeCamadas.aplicaTemas(\"ligartodos\")",title:$trad("t3a"),dica:$trad("t3a"),id:"olhoAberto",status:true},"olhofechado":{tipo:"arvore",icone:"",classe:"olhoFechado",funcao:"i3GEO.arvoreDeCamadas.aplicaTemas(\"desligartodos\")",title:$trad("t3b"),dica:$trad("t3b"),id:"olhoFechado",status:true},"ferramentasTema":{tipo:"tema",icone:"imagens/oxygen/16x16/configure-shortcuts.png",classe:"arvCamFerramentas",funcao:"i3GEO.tema.dialogo.atalhoscamada",title:$trad("u15a"),dica:$trad("ferramCamadas"),id:"",status:true,flag:true},"removerTema":{tipo:"tema",icone:"imagens/oxygen/16x16/draw-x.png",classe:"arvCamRemoveLayer",funcao:"i3GEO.tema.exclui",title:$trad("t12"),dica:$trad("t12a"),id:"",status:true,flag:true},"zoomtema":{tipo:"tema",icone:"imagens/gisicons/zoom-layer.png",classe:"arvCamZoomLayer",funcao:"i3GEO.tema.zoom",title:$trad("t17"),dica:$trad("t18"),id:"",status:true,flag:true},"sobe":{tipo:"tema",icone:"imagens/oxygen/16x16/draw-triangle3.png",classe:"arvCamSobeLayer",funcao:"i3GEO.tema.sobe",title:$trad("t13"),dica:$trad("t14"),id:"",status:true,flag:true},"desce":{tipo:"tema",icone:"imagens/oxygen/16x16/draw-triangle4.png",classe:"arvCamDesceLayer",funcao:"i3GEO.tema.desce",title:$trad("t15"),dica:$trad("t16"),id:"",status:true,flag:true},"contextoescala":{tipo:"tema",icone:"imagens/oxygen/16x16/task-attempt.png",classe:"arvCamDependeEscala",funcao:"",title:$trad("t36"),dica:$trad("t36"),id:"",status:true,flag:true},"selecionado":{tipo:"tema",icone:"imagens/gisicons/select-cancel.png",classe:"arvCamSelecionado",funcao:"i3GEO.tema.limpasel",title:$trad("t4"),dica:$trad("t5"),id:"",status:true,flag:true},"zoomsel":{tipo:"tema",icone:"imagens/gisicons/zoom-selection.png",classe:"arvCamZoomSelecionado",funcao:"i3GEO.tema.zoomsel",title:$trad("t4a"),dica:$trad("t5"),id:"",status:true,flag:true},"link":{tipo:"tema",icone:"imagens/oxygen/16x16/help-about.png",classe:"arvCamFonte",funcao:"i3GEO.tema.fonte",title:$trad("a9"),dica:$trad("a9"),id:"",status:true,flag:true},"download":{tipo:"tema",icone:"imagens/oxygen/16x16/download.png",classe:"arvCamDownload",funcao:"i3GEO.tema.dialogo.download",title:"Download",dica:$trad("t6"),id:"",status:true,flag:true}},cria:function(onde,temas,g_sid,g_locaplic,funcaoTema){if(!YAHOO.lang.isUndefined(funcaoTema)){i3GEO.arvoreDeCamadas.ATIVATEMA=funcaoTema}var novoel,temp;if(i3GEO.arvoreDeCamadas.BARRAPROGRESSO===true&&i3GEO.Interface.ATUAL==="openlayers"){if(!$i("i3GEOprogressoDiv")){novoel=document.createElement("div");novoel.id="i3GEOprogressoDiv";novoel.style.position="absolute";novoel.style.top="0px";novoel.style.zIndex="50000";novoel.style.left=((i3GEO.parametros.w/2)-75)+"px";$i(i3GEO.Interface.IDMAPA).appendChild(novoel);i3GEO.arvoreDeCamadas.progressBar=new YAHOO.widget.ProgressBar({height:5,width:150,minValue:1,maxValue:0,value:0}).render("i3GEOprogressoDiv")}}i3GEO.arvoreDeCamadas.SID=typeof(g_sid)!=='undefined'?g_sid:i3GEO.configura.sid;i3GEO.arvoreDeCamadas.LOCAPLIC=typeof(g_locaplic)!=='undefined'?g_locaplic:i3GEO.configura.locaplic;if(onde!==""){i3GEO.arvoreDeCamadas.IDHTML=onde}if(i3GEO.arvoreDeCamadas.IDHTML===""){return}temp=$i(i3GEO.arvoreDeCamadas.IDHTML);if(!temp){return}if(temp.className===""){temp.className="i3GEOarvCam"}if(YAHOO.lang.isUndefined(temas)||temas===""){temas=i3GEO.arvoreDeCamadas.CAMADAS}i3GEO.arvoreDeCamadas.atualiza(temas);if(i3GEO.arvoreDeCamadas.finaliza!==""){alert("i3GEO.arvoreDeCamadas.finaliza depreciado. Utilize i3GEO.arvoreDeCamadas.FINALIZA");i3GEO.arvoreDeCamadas.FINALIZA=i3GEO.arvoreDeCamadas.finaliza;eval(i3GEO.arvoreDeCamadas.finaliza)}if(i3GEO.arvoreDeCamadas.FINALIZA!==""){if(YAHOO.lang.isFunction(i3GEO.arvoreDeCamadas.FINALIZA)){i3GEO.arvoreDeCamadas.FINALIZA.call()}else{if(i3GEO.arvoreDeCamadas.FINALIZA!=""){eval(i3GEO.arvoreDeCamadas.FINALIZA)}}}},inicia:function(id){i3GEO.arvoreDeCamadas.cria(id);i3GEO.arvoreDeCamadas.atualiza();if(i3GEO.arvoreDeCamadas.FINALIZA!==""){if(YAHOO.lang.isFunction(i3GEO.arvoreDeCamadas.FINALIZA)){i3GEO.arvoreDeCamadas.FINALIZA.call()}else{if(i3GEO.arvoreDeCamadas.FINALIZA!=""){eval(i3GEO.arvoreDeCamadas.FINALIZA)}}}},atualiza:function(temas,forca){if(arguments.length===0){temas=i3GEO.arvoreDeCamadas.CAMADAS;i3GEO.arvoreDeCamadas.CAMADAS="";forca=false}var temp,newVal,root,tempNode,titulo="",d,c,ltema,temaNode,temaNodeFilho="",i,j,n,nk,k,noGrupo,incluidos=[],grupoNode="",grupoLayers=i3GEO.configura.grupoLayers,textoTema="";temp=$i(i3GEO.arvoreDeCamadas.IDHTML);if(temp){if(forca===true){temp.innerHTML=""}if(temp.innerHTML!==""){if(i3GEO.arvoreDeCamadas.comparaTemas(temas,i3GEO.arvoreDeCamadas.CAMADAS)){i3GEO.arvoreDeCamadas.CAMADAS=temas;return}}}else{return}i3GEO.util.defineValor(i3GEO.arvoreDeCamadas.IDHTML,"innerHTML","");i3GEO.arvoreDeCamadas.CAMADAS=temas;if(i3GEO.arvoreDeCamadas.CAMADASINICIAIS===""){i3GEO.arvoreDeCamadas.CAMADASINICIAIS=temas}(function(){function changeIconMode(){var currentIconMode="";newVal=parseInt(this.value,10);if(newVal!==currentIconMode){currentIconMode=newVal}buildTree()}function buildTree(){i3GEO.arvoreDeCamadas.ARVORE=new YAHOO.widget.TreeView(i3GEO.arvoreDeCamadas.IDHTML)}buildTree()})();root=i3GEO.arvoreDeCamadas.ARVORE.getRoot();if(i3GEO.arvoreDeCamadas.MOSTRATITULO===true){titulo=$trad("t1")}tempNode=new YAHOO.widget.HTMLNode({expanded:true,html:titulo,hasIcon:i3GEO.arvoreDeCamadas.MOSTRATITULO,enableHighlight:true},root);if(i3GEO.arvoreDeCamadas.OPCOESARVORE===true){new YAHOO.widget.HTMLNode({expanded:false,html:i3GEO.arvoreDeCamadas.montaOpcoesArvore(),hasIcon:false,enableHighlight:false},tempNode)}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!==""){temp=i3GEO.arvoreDeCamadas.NOTEMA;temp.html=textoTema;temp.idlegenda=ltema.name;temp.tipo="tema";temaNode=new YAHOO.widget.HTMLNode(temp,tempNode);if(i3GEO.arvoreDeCamadas.OPCOESICONES===true){textoTema=i3GEO.arvoreDeCamadas.montaIconesTema(ltema);temp=i3GEO.arvoreDeCamadas.NOTEMAICONES;temp.id=ltema.name;temp.html=textoTema;temp.isLeaf=!i3GEO.arvoreDeCamadas.PERMITEEXPANDIRTEMAS;temaNodeFilho=new YAHOO.widget.HTMLNode(temp,temaNode)}if(ltema.classe!=="NAO"&&this.PERMITEEXPANDIRTEMAS){temaNodeFilho.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraLegenda,1);if(i3GEO.arvoreDeCamadas.LEGENDAEXPANDIDA===true){temaNodeFilho.expand()}}}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){}}if(i3GEO.Interface.ATUAL==="openlayers"&&i3GEO.arvoreDeCamadas.INCLUILFUNDO===true){c=i3GEO.Interface.openlayers.LAYERSADICIONAIS;n=c.length;k="i3GEOarvCamTema";if(navm&&parseInt(YAHOO.env.ua.ie,10)<9){k="i3GEOarvCamTemaIE"}temaNode=new YAHOO.widget.HTMLNode({html:$trad("p16"),isLeaf:false,hasIcon:true},root);for(i=0;i<n;i++){temp="<div class='"+k+"' onclick='i3GEO.Interface.openlayers.ativaFundo(\""+c[i].name+"\")'>"+"<input name=layer type=checkbox ";if(c[i].visibility===true){temp+=" checked "}temp+=" value='"+c[i].name+"' id='CK"+c[i].id+"'/>"+" <label for='CK"+c[i].id+"'>"+c[i].name+"</label></div>";new YAHOO.widget.HTMLNode({html:temp,tipo:"fundo",isLeaf:true,hasIcon:false},temaNode)}}}else{nk=temas.length;c=grupoLayers.length;for(i=0;i<c;i+=1){noGrupo="";if(grupoLayers[i].icone&&grupoLayers[i].icone===true){noGrupo+="<p><input class=inputsb style=cursor:pointer onclick='i3GEO.arvoreDeCamadas.ligaDesligaTemas(\""+i3GEO.configura.grupoLayers[i].layers+"\",this.checked)' type=checkbox title='Ligar/desligar temas do grupo' /> "}noGrupo+="<div class='i3GEOarvCamGrupo'>"+grupoLayers[i].nome+"</div>";n=grupoLayers[i].layers.length;for(j=0;j<n;j+=1){for(k=0;k<nk;k+=1){ltema=temas[k];if(ltema.name===grupoLayers[i].layers[j]&<ema.escondido==="nao"){if(noGrupo!==""){grupoNode=new YAHOO.widget.HTMLNode({enableHighlight:false,hasIcon:false,html:noGrupo,expanded:true},tempNode);noGrupo=""}textoTema=i3GEO.arvoreDeCamadas.montaTextoTema(ltema);if(textoTema!==""){d={expanded:true,hasIcon:false,html:textoTema,idlegenda:ltema.name,tipo:"tema",enableHighlight:false};temaNode=new YAHOO.widget.HTMLNode(d,grupoNode);textoTema=i3GEO.arvoreDeCamadas.montaIconesTema(ltema);temaNodeFilho=new YAHOO.widget.HTMLNode({id:ltema.name,expanded:false,html:textoTema,enableHighlight:false,isLeaf:!this.PERMITEEXPANDIRTEMAS},temaNode);if(ltema.classe!=="NAO"&&this.PERMITEEXPANDIRTEMAS){temaNodeFilho.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraLegenda,1);if(i3GEO.arvoreDeCamadas.LEGENDAEXPANDIDA===true){temaNodeFilho.expand()}}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:true,hasIcon:false,enableHighlight:false,html:"<div class='i3GEOarvCamGrupo'>Outros</div>"},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){textoTema=i3GEO.arvoreDeCamadas.montaTextoTema(ltema);if(textoTema!==""){d={expanded:true,hasIcon:false,html:textoTema,idlegenda:ltema.name,tipo:"tema",enableHighlight:false};temaNode=new YAHOO.widget.HTMLNode(d,grupoNode);textoTema=i3GEO.arvoreDeCamadas.montaIconesTema(ltema);temaNodeFilho=new YAHOO.widget.HTMLNode({id:ltema.name,expanded:false,html:textoTema,enableHighlight:false,isLeaf:!this.PERMITEEXPANDIRTEMAS},temaNode);if(ltema.classe!=="NAO"&&this.PERMITEEXPANDIRTEMAS){temaNodeFilho.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraLegenda,1);if(i3GEO.arvoreDeCamadas.LEGENDAEXPANDIDA===true){temaNodeFilho.expand()}}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)}}}}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.adicionaEventos("NAVEGAMAPA",["i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()"])}i3GEO.eventos.executaEventos(i3GEO.eventos.ATUALIZAARVORECAMADAS)},montaOpcoesArvore:function(){var n,i=null,c,ins="",imb=i3GEO.configura.locaplic+"/imagens/branco.gif",estilo=function(i){return" onmouseout='javascript:this.className = \""+i+" iconeMini iconeGuiaMovelMouseOut\";' onmouseover='javascript:this.className = \""+i+" iconeMini iconeGuiaMovelMouseOver\";' class='"+i+" iconeMini iconeGuiaMovelMouseOut' src='"+imb+"' style='cursor:pointer;text-align:left' "};n=this.CONFIGICONES;for(i in n){c=n[i];if(c.status===true&&c.tipo==="arvore"){ins+="<img "+estilo(c.classe)+" onclick='i3GEO.util.animaClique(this);"+c.funcao+"' title='"+c.title+"' id='"+c.id+"'/>"}}return ins},ligaDesligaTemas:function(lista,status){var c,n,i,aplica=false;lista=lista.split(",");n=lista.length;for(i=0;i<n;i+=1){c=i3GEO.arvoreDeCamadas.capturaCheckBox(lista[i]);if(c){if(c.checked!==status){aplica=true}c.checked=status;if(aplica===true){c.onclick()}}}},ativaDragDrop:function(){var Dom=YAHOO.util.Dom,Event=YAHOO.util.Event;YAHOO.example.DDList="";YAHOO.example.DDApp={init:function(){var i,ltema;if($i("i3geo_lixeira")&&i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){new YAHOO.util.DDTarget("i3geo_lixeira")}i=i3GEO.arvoreDeCamadas.CAMADAS.length-1;if(i3GEO.arvoreDeCamadas.CAMADAS.length-1>=0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if($i("arrastar_"+ltema.name)){new YAHOO.example.DDList("arrastar_"+ltema.name)}}while(i--)}}};YAHOO.example.DDList=function(id,sGroup,config){YAHOO.example.DDList.superclass.constructor.call(this,id,sGroup,config);this.logger=this.logger||YAHOO;YAHOO.util.Dom.setStyle(this.getDragEl(),"opacity",0.67);this.goingUp=false;this.lastY=0};YAHOO.extend(YAHOO.example.DDList,YAHOO.util.DDProxy,{startDrag:function(x,y){var dragEl,clickEl,Dom=YAHOO.util.Dom;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,"padding","5px");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","");$i(proxyid).innerHTML=""});a.animate();YAHOO.util.Dom.setStyle('i3geo_lixeira','border','0px solid blue')},onDragDrop:function(e,id){var pt,region,tema,destEl,els,lista,temp,DDM=YAHOO.util.DragDropMgr,Dom=YAHOO.util.Dom;if(DDM.interactionInfo.drop.length===1){pt=DDM.interactionInfo.point;region=DDM.interactionInfo.sourceRegion;if(!region.intersect(pt)){DDM.refreshCache();if(DDM.getDDById(id).id==="i3geo_lixeira"){if(i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){(new YAHOO.util.Anim("i3geo_lixeira",{opacity:{from:0,to:1}},3,YAHOO.util.Easing.easeOutStrong)).animate();tema=(this.getEl()).id.split("arrastar_")[1];i3GEO.tema.exclui(tema)}}else{if(i3GEO.arvoreDeCamadas.ARRASTARORDEM===true){destEl=Dom.get(id);destEl.appendChild(this.getEl());els=i3GEO.arvoreDeCamadas.listaLigadosDesligados();lista=els[2].join(",");temp=function(retorno){i3GEO.atualiza(retorno);if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ordenaLayers()}i3GEO.arvoreDeCamadas.atualiza(i3GEO.arvoreDeCamadas.CAMADAS,true)};i3GEO.php.reordenatemas(temp,lista)}else{i3GEO.arvoreDeCamadas.atualiza(i3GEO.arvoreDeCamadas.CAMADAS,true)}}}}},onDrag:function(e){var y;y=Event.getPageY(e);if(y<this.lastY){this.goingUp=true}else if(y>this.lastY){this.goingUp=false}this.lastY=y;if(i3GEO.guias.TIPO==="movel"){YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.9)}},onDragOver:function(e,id){var destEl;destEl=YAHOO.util.Dom.get(id);var dragEl=this.getDragEl();Dom.setStyle(dragEl,"border","4px solid red");if($i("i3geo_lixeira")&&id==="i3geo_lixeira"){$i("i3geo_lixeira").style.border="2px solid red"}else{destEl.style.textDecoration="underline"}},onDragOut:function(e,id){$i(id).style.textDecoration="none";var dragEl=this.getDragEl();Dom.setStyle(dragEl,"border","4px solid gray")}});Event.onDOMReady(YAHOO.example.DDApp.init,YAHOO.example.DDApp,true)},montaOpcoes:function(node){},mostraOpcoes:function(node){},adicionaOpcaoTema:function(dica,titulo,onclick,node){var tnome="<a href='#' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+dica+"','');\" onclick="+onclick+">"+titulo+" </a>";new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node)},mostraLegenda:function(node){var retorna,idtema=node.data.id;retorna=function(retorno){var original={data:""},i,re,tabela,linhas,linha,colunas,incluir,elementos,nelementos,inputs,desativar,nindices;if(retorno.data.legenda){original=retorno;retorno=retorno.data.legenda;if(retorno[0]){if((navn)&&(!retorno[0].imagem)){tabela=retorno}else{i=retorno[0].imagem;re=new RegExp("tiff","g");i=i.replace(re,'png');tabela="<img src='"+i+"' />"}retorno=""}else{linhas=retorno.split("#");if(linhas.length>1){linhas=retorno.split("|");tabela="<table>";linha=linhas.length-1;if(linha>=0){do{colunas=linhas[linha].split("#");re=new RegExp("'","g");tabela+="<tr style='border-top:1px solid rgb(240,240,240);'><td><img src='"+colunas[4]+"' </td><td style='text-align:left'>"+colunas[2]+"</td></tr>"}while(linha--)}tabela+="</table><br>"}else{tabela=retorno}}}else{tabela="<img src='"+retorno.data[0].imagem+"' />"}incluir="<div style='text-align:left' id='"+idtema+"verdiv"+"'>"+tabela+"</div>";new YAHOO.widget.HTMLNode({html:incluir,enableHighlight:false,expanded:false},node);node.loadComplete();elementos=document.getElementById(idtema+"verdiv").getElementsByTagName("input");nelementos=elementos.length;inputs=[];i=0;if(nelementos>0){do{if(elementos[i].type==="checkbox"){inputs.push(elementos[i])}i++}while(i<nelementos)}if(original.data.desativar[idtema]){desativar=original.data.desativar[idtema];nindices=desativar.length;i=0;if(nindices>0){do{inputs[desativar[i]].checked=false;i++}while(i<nindices)}}};if(i3GEO.arvoreDeCamadas.TEMPLATELEGENDA!==""){i3GEO.php.criaLegendaHTML(retorna,idtema,i3GEO.arvoreDeCamadas.TEMPLATELEGENDA)}else{i3GEO.php.criaLegendaHTML(retorna,idtema)}},atualizaLegenda:function(idtema){var node;if(document.getElementById(idtema+"verdiv")){node=i3GEO.arvoreDeCamadas.ARVORE.getNodeByProperty("id",idtema);if(node){i3GEO.arvoreDeCamadas.ARVORE.removeChildren(node);this.mostraLegenda(node);if($i("janelaLegenda"+idtema+"_corpo")){i3GEO.tema.mostralegendajanela(idtema,"","abrejanela")}}}},escolheCorClasse:function(leg){var obj,novoel;leg=leg.parentNode.getElementsByTagName("input")[0];if(!$i("tempinputcorclasse")){novoel=document.createElement("input");novoel.id="tempinputcorclasse";novoel.style.display="none";novoel.alt="objeto criado para guardar dados da funcao escolohercorclasse";novoel.onchange="";document.body.appendChild(novoel)}obj=$i("tempinputcorclasse");obj.value="";obj.tema=leg.name;obj.idclasse=leg.value;obj.onchange=function(){var obj=$i("tempinputcorclasse");i3GEO.tema.alteracorclasse(obj.tema,obj.idclasse,obj.value)};i3GEO.util.abreCor("","tempinputcorclasse")},inverteStatusClasse:function(leg){var temp=function(retorno){i3GEO.atualiza();i3GEO.Interface.atualizaTema(retorno,leg.name);var ck="";if(leg.id&&leg.id==="legendack_"+leg.name+"_"+leg.value){ck=$i("liblegendack_"+leg.name+"_"+leg.value)}else if(leg.id&&leg.id==="liblegendack_"+leg.name+"_"+leg.value){ck=$i("legendack_"+leg.name+"_"+leg.value)}if(ck&&ck!=""){ck.checked=leg.checked}};i3GEO.php.inverteStatusClasse(temp,leg.name,leg.value)},montaTextoTema:function(tema){var ck,html,estilo,f;if(tema.status*1===2){ck=' CHECKED '}else{ck=""}f=this.FILTRO;if(f!==""){if(f==="desligados"&&ck!==""){return""}if(f==="ligados"&&ck===""){return""}if(f==="selecionados"&&tema.sel.toLowerCase()!=="sim"){return""}if(f==="download"&&tema.download.toLowerCase()!=="sim"){return""}if(f==="wms"&&tema.connectiontype*1!==7){return""}if(f==="raster"&&tema.type*1!==3){return""}if(f==="toponimia"&&tema.type*1!==4){return""}}estilo="i3GEOarvCamTema";if(navm&&parseInt(YAHOO.env.ua.ie,10)<9){estilo="i3GEOarvCamTemaIE"}html="<div onclick='i3GEO.mapa.ativaTema(\""+tema.name+"\")' id='arrastar_"+tema.name+"' class='"+estilo+"' >";html+="<input type='checkbox' name=\"layer\" value='"+tema.name+"' "+"id='"+tema.name+"ckbox'"+ck+"onclick=\""+i3GEO.arvoreDeCamadas.ATIVATEMA+"\""+" /><label for='"+tema.name+"ckbox' ";if(tema.iconetema!==""&&i3GEO.arvoreDeCamadas.ICONETEMA===true){html+=" <img class='i3GEOiconeTema' src='"+tema.iconetema+"' />"}tema.AGUARDALEGENDA=i3GEO.arvoreDeCamadas.AGUARDALEGENDA;tema=i3GEO.pluginI3geo.aplicaPropriedades(tema);estilo="";if(tema.AGUARDALEGENDA){html+=" id='ArvoreTituloTema"+tema.name+"' style='position:relative;top:2px;'"+" 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}else{html+=" id='ArvoreTituloTema"+tema.name+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t7")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+tema.tema}html+="</label></div>";if(i3GEO.tema.TEMPORIZADORESID[tema.name]==undefined&&tema.temporizador!=""){i3GEO.tema.temporizador(tema.name,tema.temporizador)}return(html)},montaIconesTema:function(tema){var iconePlugin,n,i=null,c,html,estilo,farol,mfarol,imb=i3GEO.configura.locaplic+"/imagens/branco.gif";estilo="i3GEOarvCamTemaIco";if(navm&&parseInt(YAHOO.env.ua.ie,10)<9){estilo="i3GEOarvCamTemaIcoIE"}html="<div class='"+estilo+"' >";tema=i3GEO.pluginI3geo.aplicaPropriedades(tema);if(tema.escala!=0){farol="maisamarelo.png";mfarol="";if(tema.escala*1<i3GEO.parametros.mapscale*1){farol="maisverde.png";mfarol=$trad("t9")}if(tema.escala*1>i3GEO.parametros.mapscale*1){farol="maisvermelho.png";mfarol=$trad("t10")}if(tema.escala===0){farol="maisamarelo.png";mfarol=$trad("t11")}html+=" <img class='arvCamFarol' id='farol"+tema.name+"' src='"+i3GEO.configura.locaplic+"/imagens/"+farol+"' title='"+mfarol+"' />"}this.CONFIGICONES.zoomtema.flag=false;if(tema.zoomtema.toLowerCase()==="sim"){this.CONFIGICONES.zoomtema.flag=true}this.CONFIGICONES.contextoescala.flag=false;if(tema.contextoescala.toLowerCase()==="sim"){this.CONFIGICONES.contextoescala.flag=true}this.CONFIGICONES.selecionado.flag=false;this.CONFIGICONES.zoomsel.flag=false;if(tema.sel.toLowerCase()==="sim"){this.CONFIGICONES.selecionado.flag=true;this.CONFIGICONES.zoomsel.flag=true}this.CONFIGICONES.link.flag=false;if(tema.link_tema!=""&&tema.features.toLowerCase()!=="sim"&&tema.name!="mundo"){this.CONFIGICONES.link.flag=true}this.CONFIGICONES.download.flag=false;if(tema.download.toLowerCase()==="sim"||tema.download===""&&tema.features.toLowerCase()!=="sim"){this.CONFIGICONES.download.flag=true}n=this.CONFIGICONES;for(i in n){c=n[i];if(c.status===true&&c.tipo==="tema"&&c.flag===true){html+="<img "+"class='"+c.classe+"' onclick='i3GEO.util.animaClique(this);"+c.funcao+"(\""+tema.name+"\",true,\""+tema.link_tema+"\")"+"' title='"+c.title+"' id='"+c.id+"' src='"+imb+"'/>"}}if(tema.plugini3geo){iconePlugin=i3GEO.pluginI3geo.iconeArvoreDeCamadas(tema);if(iconePlugin){html+=iconePlugin}}html+="</div>";return(html)},atualizaFarol:function(mapscale){var farol,l,ltema,escala,iu=i3GEO.util,im=i3GEO.configura.locaplic+"/imagens/",camadas=i3GEO.arvoreDeCamadas.CAMADAS;farol="maisamarelo.png";l=camadas.length-1;if(l>=0){do{ltema=camadas[l];escala=ltema.escala;if(escala*1<mapscale*1){farol="maisverde.png"}if(escala*1>mapscale*1){farol="maisvermelho.png"}if(escala*1===0){farol="maisamarelo.png"}iu.defineValor("farol"+ltema.name,"src",im+farol)}while(l--)}},aplicaTemas:function(tipo){if(arguments.length===0){tipo="normal"}var t="",temp;if(tipo==="normal"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("mantem")}if(tipo==="ligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("marca");if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googleearth","openlayers","googlemaps"])){return}}if(tipo==="desligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("desmarca");if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googleearth","openlayers","googlemaps"])){return}}temp=function(){i3GEO.atualiza();i3GEO.janela.fechaAguarde("redesenha")};if(tipo==="normal"){i3GEO.php.ligatemas(temp,t[1].toString(),t[0].toString());return}if(tipo==="ligartodos"){i3GEO.php.ligatemas(temp,"",t[2].toString());return}if(tipo==="desligartodos"){i3GEO.php.ligatemas(temp,t[2].toString(),"")}},listaLigadosDesligados:function(tipo){if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return[[],[],[]]}if(arguments.length===0){tipo="manter"}var no,cs,csn,j,c,nos=i3GEO.arvoreDeCamadas.ARVORE.getNodesByProperty("tipo","tema"),ligados=[],desligados=[],todos=[],n=nos.length,i=0,ATUAL=i3GEO.Interface.ATUAL;do{try{no=nos[i].getEl();cs=no.getElementsByTagName("input");csn=cs.length;for(j=0;j<csn;j+=1){c=cs[j];if(c.name==="layer"){c.checked===true?ligados.push(c.value):desligados.push(c.value);todos.push(c.value);if(tipo==="marca"){c.checked=true;if(i3GEO.util.in_array(ATUAL,["googleearth","openlayers","googlemaps"])){i3GEO.Interface[ATUAL].ligaDesliga(c)}}if(tipo==="desmarca"){c.checked=false;if(i3GEO.util.in_array(ATUAL,["googleearth","openlayers","googlemaps"])){i3GEO.Interface[ATUAL].ligaDesliga(c)}}}}i++}catch(e){i+=1}}while(i<n);return([ligados,desligados,todos])},capturaCheckBox:function(tema){if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return}var nos,n,i,no,cs,csn,j,c;nos=i3GEO.arvoreDeCamadas.ARVORE.getNodesByProperty("tipo","tema");n=nos.length;i=0;do{try{no=nos[i].getEl();cs=no.getElementsByTagName("input");csn=cs.length;for(j=0;j<csn;j+=1){c=cs[j];if(c.name==="layer"&&c.value===tema){return c}}i+=1}catch(e){i+=1}}while(i<n);return(null)},comparaTemas:function(novo,atual){try{var novon=novo.length,i;if(novon!==atual.length){return(false)}for(i=0;i<novon;i+=1){if(novo[i].name!==atual[i].name){return(false)}if(novo[i].tema!==atual[i].tema){return(false)}if(novo[i].sel!==atual[i].sel){return(false)}if(novo[i].status!==atual[i].status){return(false)}}return(true)}catch(e){return true}},pegaTema:function(valor,camadas,parametro){var i;if(!camadas||camadas==""){camadas=i3GEO.arvoreDeCamadas.CAMADAS}else{camadas=i3GEO.arvoreDeCamadas.converteChaveValor2normal(camadas)}if(!parametro){parametro="name"}i=camadas.length;while(i>0){i-=1;if(camadas[i][parametro]===valor){return camadas[i]}}return""},filtraCamadas:function(propriedade,valor,operador,camadas){if(!camadas){camadas=i3GEO.arvoreDeCamadas.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+"".toLowerCase()==valor+"".toLowerCase()){resultado.push(ltema)}}if(operador==="diferente"){if(temp+"".toLowerCase()!==valor+"".toLowerCase()){resultado.push(ltema)}}if(operador==="menor"){if(temp+"".toLowerCase()<valor+"".toLowerCase()){resultado.push(ltema)}}}i+=1}while(i<nelementos)}return resultado},alteraPropCamadas:function(propriedade,valor,camada){var i=0,nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if(ltema.name===camada){ltema[propriedade]=valor}i+=1}while(i<nelementos)}},verificaAbrangenciaTemas:function(){if(i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS===false){return}try{var i=0,temp,nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];temp=ltema.exttema;if(temp!==""){if(i3GEO.util.intersectaBox(temp,i3GEO.parametros.mapexten)===false){$i("ArvoreTituloTema"+ltema.name).style.color="gray"}else{$i("ArvoreTituloTema"+ltema.name).style.color="black"}}i+=1}while(i<nelementos)}}catch(e){}},verificaAplicaExtensao:function(){var i=0,temp="",nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;try{if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if(ltema.aplicaextensao.toLowerCase()==="sim"){temp=ltema.name}i+=1}while(i<nelementos)}}catch(e){return""}return temp},converteChaveValor2normal:function(obj){if(obj.chaves){var i,tema,j,t,chaves=obj.chaves,temas=obj.valores,ntemas=temas.length,nchaves=chaves.length,novo=[];for(i=0;i<ntemas;i++){tema=temas[i];t={};for(j=0;j<nchaves;j++){t[chaves[j]]=tema[j]}novo.push(t)}return novo}else{return obj}},registaCamadas:function(obj){obj=i3GEO.arvoreDeCamadas.converteChaveValor2normal(obj);i3GEO.arvoreDeCamadas.CAMADAS=obj},ajudaEmLista:function(){var n,i=null,ins="",b,imb=i3GEO.configura.locaplic+"/imagens/branco.gif",g;n=i3GEO.arvoreDeCamadas.CONFIGICONES;ins+="<table class=lista8 >";for(i in n){b=n[i];if(b.dica!=""){if(b.icone!=""){g="<img src='"+i3GEO.configura.locaplic+"/"+b.icone+"' />"}else{g="<img src='"+imb+"' class='"+b.classe+"'/>"}ins+="<tr><td>"+g+"</td><td>"+b.dica+"</td></tr>"}}ins+="</table>";i3GEO.janela.mensagemSimples("<div style='overflow:auto;height:100%'>"+ins+"</div>","")},dialogo:{filtro:function(){i3GEO.util.dialogoFerramenta("i3GEO.arvoreDeCamadas.dialogo.filtro()","filtroarvore","filtroarvore","dependencias.php","i3GEOF.filtroarvore.iniciaJanelaFlutuante()")},excluir:function(){i3GEO.util.dialogoFerramenta("i3GEO.arvoreDeCamadas.dialogo.excluir()","excluirarvore","excluirarvore")}}}; |
| ... | ... | @@ -267,7 +267,7 @@ if(typeof(i3GEO)==='undefined'){var i3GEO={}}objposicaocursor={ddx:"",ddy:"",dms |
| 267 | 267 | if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.arvoreDeTemas={IDHTML:"arvoreAdicionaTema",ARVORE:null,FATORESTRELA:10,OPCOESADICIONAIS:{incluiArvore:true,uploaddbf:true,uploadlocal:true,uploadarquivo:true,downloadbase:true,conectarwms:true,conectarwmst:true,conectargeorss:true,conectargeojson:true,nuvemTags:true,nuvemTagsFlash:false,navegacaoDir:true,incluibusca:true,kml:true,qrcode:true,mini:true,estrelas:true,refresh:true,carousel:true,inde:true,uploadgpx:true,comentarios:true,bookmark:true,importarwmc:true,googleearth:true,carregaKml:true,flutuante:true,metaestat:true,idonde:""},INCLUISISTEMAS:true,INCLUIWMS:true,INCLUIREGIOES:true,INCLUIINDIBR:true,INCLUIWMSMETAESTAT:true,INCLUIMAPASCADASTRADOS:true,INCLUIESTRELAS:true,FILTRADOWNLOAD:false,FILTRAOGC:false,TIPOBOTAO:"checkbox",ATIVATEMA:"",IDSMENUS:[],RETORNAGUIA:"",DRIVES:null,SISTEMAS:null,MENUS:null,GRUPOS:null,SUBGRUPOS:null,TEMAS:null,LOCAPLIC:null,SID:null,flutuante:function(){var janela,temp,cabecalho,minimiza,idold,corpo,altura;cabecalho=function(){};if($i("i3GEOFcatalogo_corpo")){return}minimiza=function(){i3GEO.janela.minimiza("i3GEOFcatalogo")};altura=i3GEO.parametros.w-150;if(altura>500){altura=500}janela=i3GEO.janela.cria("360px",altura+"px","","","","<span class='i3GEOiconeFerramenta i3GEOiconeCatalogo'></span>"+$trad("g1a"),"i3GEOFcatalogo",false,"hd",cabecalho,minimiza);temp=function(){delete(i3GEO.arvoreDeTemas.ARVORE)};YAHOO.util.Event.addListener(janela[0].close,"click",temp);corpo=$i("i3GEOFcatalogo_corpo");corpo.style.backgroundColor="white";corpo.innerHTML=$trad("o1");corpo.style.overflow="auto";if($i(i3GEO.arvoreDeTemas.IDHTML)){$i(i3GEO.arvoreDeTemas.IDHTML).innerHTML=""}idold=i3GEO.arvoreDeTemas.IDHTML;delete(i3GEO.arvoreDeTemas.ARVORE);i3GEO.arvoreDeTemas.IDHTML="i3GEOFcatalogo_corpo";i3GEO.arvoreDeTemas.cria(i3GEO.configura.sid,i3GEO.configura.locaplic,"");window.setTimeout("i3GEO.arvoreDeTemas.IDHTML = '"+idold+"';",520)},listaWMS:function(){var monta=function(retorno){var node,raiz,nraiz,i,html,tempNode;node=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("idwms","raiz");raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i+=1){html="<span title='"+raiz[i].description+"'> "+raiz[i].title;if(raiz[i].nacessos>0){html+=" ("+((raiz[i].nacessosok*100)/(raiz[i].nacessos*1))+"%)</span>"}else{html+=" (% de acessos não definido)</span>"}html+="<hr>";tempNode=new YAHOO.widget.HTMLNode({html:html,id_ws:raiz[i].id_ws,tipo_ws:raiz[i].tipo_ws,url:raiz[i].link,nivel:0,expanded:false,hasIcon:true,enableHighlight:true,className:"i3GeoFolder"},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS,1)}node.loadComplete()};i3GEO.php.listaRSSwsARRAY(monta,"WMS")},listaRegioes:function(){var monta=function(retorno){var node,nraiz,i,html;node=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("idregioes","raiz");nraiz=retorno.length;for(i=0;i<nraiz;i+=1){tema={"nameInput":"regioesmetaestat","tid":"metaregiao_"+retorno[i].codigo_tipo_regiao,"nome":retorno[i].nome_tipo_regiao},html=i3GEO.arvoreDeTemas.montaTextoTema("gray",tema),new YAHOO.widget.HTMLNode({isleaf:true,html:html,expanded:false,hasIcon:true,className:"i3GeoFolder",enableHighlight:false,tipoa_tema:"METAREGIAO",codigo_tipo_regiao:retorno[i].codigo_tipo_regiao,idtema:"metaregiao_"+retorno[i].codigo_tipo_regiao},node)}node.loadComplete()};i3GEO.php.listaTipoRegiao(monta)},listaMapasCadastrados:function(){var monta=function(retorno){var node,nraiz,i,html,tema;retorno=retorno.data.mapas;node=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("idmapacadastrado","raiz");nraiz=retorno.length;for(i=0;i<nraiz;i+=1){tema={"nameInput":"mapaCadastrado","tid":"mapaCadastrado_"+retorno[i].ID_MAPA,"nome":retorno[i].NOME},html=i3GEO.arvoreDeTemas.montaTextoTema("gray",tema),new YAHOO.widget.HTMLNode({id_mapaCadastrado:retorno[i].ID_MAPA,html:html,expanded:false,hasIcon:true,enableHighlight:true},node)}node.loadComplete()};i3GEO.php.pegaMapas(monta)},listaVariaveisMetaestat:function(){var monta=function(retorno){var node,nraiz,i,html,tempNode;node=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("idwmsmetaestat","raiz");nraiz=retorno.length;for(i=0;i<nraiz;i+=1){html="<span title='"+retorno[i].descricao+"'> "+retorno[i].nome;html+="<hr>";tempNode=new YAHOO.widget.HTMLNode({codigo_variavel:retorno[i].codigo_variavel,html:html,expanded:false,hasIcon:true,enableHighlight:true,className:"i3GeoFolder"},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaMedidasVariavel,1)}node.loadComplete()};i3GEO.php.listaVariavel(monta)},listaMedidasVariavel:function(node){var monta=function(retorno){var tema,html,i,n;n=retorno.length;for(i=0;i<n;i++){tema={"nameInput":"metaestat","id_medida_variavel":retorno[i].id_medida_variavel,"tid":"metaestat_"+retorno[i].id_medida_variavel,"nome":retorno[i].nomemedida},html=i3GEO.arvoreDeTemas.montaTextoTema("gray",tema),new YAHOO.widget.HTMLNode({isleaf:true,html:html,expanded:false,hasIcon:true,enableHighlight:true,tipoa_tema:"META",idtema:"metaestat_"+retorno[i].id_medida_variavel,id_medida_variavel:retorno[i].id_medida_variavel},node)}node.loadComplete()};i3GEO.php.listaMedidaVariavel(node.data.codigo_variavel,monta)},listaLayersWMS:function(node){var monta=function(retorno){var n,cor,i,cabeca,tempNode,ns,j,temp;n=0;try{n=retorno.data.length}catch(m){node.loadComplete();return}cor="rgb(51, 102, 102)";html="";for(i=0;i<n;i+=1){temp=retorno.data[i];cabeca=temp.nome+" - "+temp.titulo;if(cabeca!=="undefined - undefined"){tempNode=new YAHOO.widget.HTMLNode({html:"<span style='color:"+cor+"' >"+cabeca,url:node.data.url,nivel:(node.data.nivel*1+1),id_ws:"",layer:temp.nome,enableHighlight:false,expanded:false,hasIcon:true},node);if(!temp.estilos){tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS,1)}if(temp.estilos){ns=temp.estilos.length;for(j=0;j<ns;j+=1){new YAHOO.widget.HTMLNode({html:i3GEO.arvoreDeTemas.montaTextoTemaWMS(node.data.url,temp.nome,temp.estilos[j].nome,temp.estilos[j].titulo,temp.srs.toString(),temp.formatsinfo.toString(),temp.version.toString(),temp.formats.toString(),cor),enableHighlight:false,expanded:false,hasIcon:true},tempNode);tempNode.isleaf=true}}cor=(cor==="rgb(51, 102, 102)")?"rgb(47, 70, 50)":"rgb(51, 102, 102)"}}node.loadComplete()};i3GEO.php.listaLayersWMS(monta,node.data.url,(node.data.nivel*1+1),node.data.id_ws,node.data.layer,node.data.tipo_ws)},montaTextoTemaWMS:function(servico,layer,estilo,titulo,proj,formatoinfo,versao,formatoimg,cor,link){var html,temp,adiciona;html="<td style='vertical-align:top;padding-top:5px;'><span ><input style='cursor:pointer;border:solid 0 white;' ";temp=function(){i3GEO.janela.fechaAguarde("ajaxredesenha");i3GEO.atualiza()};adiciona="i3GEO.php.adicionaTemaWMS("+temp+","+"\""+servico+"\","+"\""+layer+"\","+"\""+estilo+"\","+"\""+proj+"\","+"\""+formatoimg+"\","+"\""+versao+"\","+"\""+titulo+"\","+"\"\","+"\"nao\","+"\""+formatoinfo+"\","+"\"\","+"\"\","+"this.checked)";html+="onclick='javascript:"+adiciona+"' "+" type='radio' /></td><td style='padding-top:4px;vertical-align:top;text-align:left;padding-left:3px;color:"+cor+";' >";if(link){html+="<a href='"+link+"' target=_blank >"+layer+" - "+titulo+"</a>"}else{html+=layer+" - "+titulo}html+="</td></span>";return(html)},listaMenus:function(g_sid,g_locaplic,funcao){var r=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+"(arguments[0]);")}};i3GEO.php.pegalistademenus(r)},listaGrupos:function(g_sid,g_locaplic,id_menu,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.GRUPOS=retorno.data;if(funcao!==""){funcao.call()}};if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD||i3GEO.arvoreDeTemas.FILTRAOGC){i3GEO.php.pegalistadegrupos(retorno,id_menu,"sim")}else{i3GEO.php.pegalistadegrupos(retorno,id_menu,"nao")}},listaSubGrupos:function(g_sid,g_locaplic,id_menu,id_grupo,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.SUBGRUPOS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegalistadeSubgrupos(retorno,id_menu,id_grupo)},listaTemas:function(g_sid,g_locaplic,id_menu,id_grupo,id_subgrupo,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.TEMAS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegalistadetemas(retorno,id_menu,id_grupo,id_subgrupo)},listaSistemas:function(g_sid,g_locaplic,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.SISTEMAS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegaSistemas(retorno)},listaDrives:function(g_sid,g_locaplic,funcao){var retorno=function(retorno){try{i3GEO.arvoreDeTemas.DRIVES=retorno.data.drives;if(i3GEO.arvoreDeTemas.DRIVES==""){return}if(funcao!==""){funcao.call()}}catch(e){i3GEO.arvoreDeTemas.DRIVES=""}};i3GEO.php.listadrives(retorno)},listaEstrelas:function(node){var montanos=function(retorno){try{var ig,montaTexto=function(ngSgrupo){var tempn,ngTema,tempng,mostra,d,lk="",st,sg;tempn=ngSgrupo.length;for(sg=0;sg<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;try{if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}}catch(e){}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'> fonte</a>"}if(ngSgrupo[sg].subgrupo){d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>"}else{d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].grupo)+")"+lk+"</td>"}tempNode=new YAHOO.widget.HTMLNode({html:d,expanded:false,hasIcon:true,isLeaf:true,enableHighlight:true},node)}conta+=1}}};if(!retorno.data){i3GEO.janela.tempoMsg("Ocorreu um erro")}else{retorno=retorno.data;conta=0;if((retorno!=="erro")&&(typeof(retorno)!=='undefined')){ig=retorno.length-1;if(ig>=0){do{montaTexto([retorno[ig]]);montaTexto(retorno[ig].subgrupos)}while(ig--)}else{tempNode=new YAHOO.widget.HTMLNode({html:"<span style='color:red'>Nada encontrado<br><br></span>",isLeaf:true,expanded:false,hasIcon:true,enableHighlight:false},node)}}}node.loadComplete()}catch(e){}};i3GEO.php.procurartemasestrela(montanos,node.data.nivel,i3GEO.arvoreDeTemas.FATORESTRELA*1)},cria:function(g_sid,g_locaplic,idhtml,funcaoTema,objOpcoes,tipoBotao){if(i3GEO.arvoreDeTemas.ARVORE){return}if(!idhtml){idhtml=""}if(idhtml!==""){i3GEO.arvoreDeTemas.IDHTML=idhtml}if(!funcaoTema){funcaoTema=""}if(funcaoTema!==""){i3GEO.arvoreDeTemas.ATIVATEMA=funcaoTema}if(!objOpcoes){objOpcoes=""}if(objOpcoes!==""){i3GEO.arvoreDeTemas.OPCOESADICIONAIS=objOpcoes}if(!tipoBotao){tipoBotao=""}if(tipoBotao!==""){i3GEO.arvoreDeTemas.TIPOBOTAO=tipoBotao}i3GEO.arvoreDeTemas.LOCAPLIC=g_locaplic;i3GEO.arvoreDeTemas.SID=g_sid;if(i3GEO.arvoreDeTemas.IDHTML===""){return}i3GEO.arvoreDeTemas.listaMenus(g_sid,g_locaplic,"i3GEO.arvoreDeTemas.montaArvore")},atualiza:function(){if($i(i3GEO.arvoreDeTemas.IDHTML)){i3GEO.arvoreDeTemas.ARVORE=null;i3GEO.arvoreDeTemas.cria(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,i3GEO.arvoreDeTemas.IDHTML)}},montaArvore:function(){var mais="",tempNode,tempNode1,retorno,root,insp,outrasOpcoes,dados,c,i,j,conteudo,editor;(function(){function changeIconMode(){buildTree()}function buildTree(){i3GEO.arvoreDeTemas.ARVORE=new YAHOO.widget.TreeView(i3GEO.arvoreDeTemas.IDHTML)}buildTree()})();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluibusca===true){insp="<table><tr>"+"<td><span style='font-size:12px'> "+$trad("a1")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=31' > </a></span></td>"+"<td>"+"<div><input onclick='javascript:this.select();' class='digitar' type='text' id='i3geo_buscatema' style=width:112px; value='' /></div>"+"</td>"+"<td><img class='tic' ";if(navm){insp+="style='top:0px;'"}else{insp+="style='top:4px;'"}insp+=" src='"+i3GEO.configura.locaplic+"/imagens/branco.gif"+"' onclick='i3GEO.util.animaClique(this);i3GEO.arvoreDeTemas.buscaTema2(document.getElementById(\"i3geo_buscatema\").value)' /></td>";insp+="</tr></table> ";tempNode=new YAHOO.widget.HTMLNode({html:insp,enableHighlight:false,expanded:false,hasIcon:false},root)}tempNode=new YAHOO.widget.HTMLNode({html:"<b>"+$trad("g1a")+"</b>",idmenu:"",enableHighlight:false,expanded:false,hasIcon:false},root);outrasOpcoes=i3GEO.arvoreDeTemas.outrasOpcoesHTML();if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde!==""){document.getElementById(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde).innerHTML=outrasOpcoes}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore===true){tempNode=new YAHOO.widget.HTMLNode({html:outrasOpcoes+" <br>",isLeaf:true,enableHighlight:true,expanded:false,hasIcon:true},root)}if(i3GEO.parametros.editor==="sim"){tempNode=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='"+$trad("x7")+"' href='../admin' target=blank >"+$trad("x8")+"</a>",idmenu:"",enableHighlight:false,expanded:false},root);tempNode=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='"+$trad("x7")+"' href='../admin/html/arvore.html' target=blank >"+$trad("x9")+"</a>",idmenu:"",enableHighlight:false,expanded:false},root);tempNode=new YAHOO.widget.HTMLNode({html:"<span style='color:red;cursor:pointer' title='"+$trad("x7")+"' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/menus.html\")' target=blank >"+$trad("x10")+"</span>",idmenu:"",enableHighlight:false,expanded:false},root)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.googleearth===true){tempNode=new YAHOO.widget.HTMLNode({html:"<a href='"+i3GEO.configura.locaplic+"/kml.php?tipoxml=kml' target=blank > <img src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' class='abregoogleearth'> "+$trad("a13")+"</a>",idmenu:"",enableHighlight:false,expanded:false,hasIcon:true},root)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.flutuante===true){tempNode=new YAHOO.widget.HTMLNode({html:"<a href='#' onclick='i3GEO.arvoreDeTemas.flutuante()' >Abrir em janela flutuante</a><br>",idmenu:"",enableHighlight:false,expanded:false,hasIcon:true},root)}if(i3GEO.arvoreDeTemas.INCLUISISTEMAS===true||i3GEO.arvoreDeTemas.INCLUIESTRELAS===true||i3GEO.arvoreDeTemas.INCLUIMAPASCADASTRADOS===true||i3GEO.arvoreDeTemas.INCLUIWMS===true||i3GEO.arvoreDeTemas.INCLUIREGIOES===true||i3GEO.arvoreDeTemas.INCLUIWMSMETAESTAT===true){mais=new YAHOO.widget.HTMLNode({html:$trad("mais"),enableHighlight:false,expanded:false,idmais:"idmais",className:"i3GeoFolder"},root);if(i3GEO.arvoreDeTemas.INCLUIWMS===true){if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar lista' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/webservices.html?tipo=WMS\")' style='width:11px;position:relative;left:3px' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}tempNode=new YAHOO.widget.HTMLNode({html:"<span style='position:relative;'>OGC-WMS</span>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=33' > </a>"+editor,idwms:"raiz",expanded:false,className:"i3GeoFolder",enableHighlight:true},mais);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaWMS,1)}if(i3GEO.arvoreDeTemas.INCLUIREGIOES===true){tempNode=new YAHOO.widget.HTMLNode({html:"<span style='position:relative;'>"+$trad("x87")+"</span>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=33' > </a>",idregioes:"raiz",expanded:false,className:"i3GeoFolder",enableHighlight:true},mais);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaRegioes,1)}if(i3GEO.arvoreDeTemas.INCLUIWMSMETAESTAT===true){tempNode=new YAHOO.widget.HTMLNode({html:"<span style='position:relative;'>"+$trad("x57")+"</span>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=112' > </a>",idwmsmetaestat:"raiz",expanded:false,className:"i3GeoFolder",enableHighlight:true},mais);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaVariaveisMetaestat,1)}if(i3GEO.arvoreDeTemas.INCLUIMAPASCADASTRADOS===true){tempNode=new YAHOO.widget.HTMLNode({html:"<span style='position:relative;'>"+$trad("x90")+"</span>",idmapacadastrado:"raiz",expanded:false,className:"i3GeoFolder",enableHighlight:true},mais);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaMapasCadastrados,1)}if(i3GEO.arvoreDeTemas.INCLUIESTRELAS===true){tempNode=new YAHOO.widget.HTMLNode({expanded:false,html:"<span style='position:relative;' >"+$trad("t46")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=95' > </a>",enableHighlight:false,className:"i3GeoFolder"},mais);ig=5;do{tempNode1=new YAHOO.widget.HTMLNode({expanded:false,html:"<img src='"+i3GEO.configura.locaplic+"/imagens/e"+ig+".png ' />",enableHighlight:true,nivel:ig},tempNode);tempNode1.setDynamicLoad(i3GEO.arvoreDeTemas.listaEstrelas,1);ig-=1}while(ig>0)}if(i3GEO.arvoreDeTemas.INCLUISISTEMAS){retorno=function(){var sis,iglt,tempNode,ig,nomeSis,sisNode,funcoes,tempf,ig2,abre,nomeFunc;try{sis=i3GEO.arvoreDeTemas.SISTEMAS;iglt=sis.length;tempNode=new YAHOO.widget.HTMLNode({html:$trad("a11")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=34' > </a>",expanded:false,enableHighlight:false},mais)}catch(e){i3GEO.arvoreDeTemas.ARVORE.draw();return}ig=0;if(sis.length>0){do{nomeSis=sis[ig].NOME;if(sis[ig].PUBLICADO){if(sis[ig].PUBLICADO.toLowerCase()==="nao"){nomeSis="<span style='color:red'>"+sis[ig].NOME+"</span>"}}sisNode=new YAHOO.widget.HTMLNode({html:nomeSis,expanded:false,enableHighlight:false},tempNode);funcoes=sis[ig].FUNCOES;tempf=funcoes.length;for(ig2=0;ig2<tempf;ig2+=1){abre="i3GEO.janela.cria('"+(funcoes[ig2].W)+"px','"+(funcoes[ig2].H)+"px','"+(funcoes[ig2].ABRIR)+"','','','"+$trad("a11")+"')";nomeFunc="<a href='#' onclick=\""+abre+"\">"+funcoes[ig2].NOME+"</a>";new YAHOO.widget.HTMLNode({html:nomeFunc,expanded:false,enableHighlight:false,isLeaf:true},sisNode)}ig+=1}while(ig<iglt)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir===false){i3GEO.arvoreDeTemas.ARVORE.draw()}else{i3GEO.arvoreDeTemas.adicionaNoNavegacaoDir()}};i3GEO.arvoreDeTemas.listaSistemas(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,retorno)}}if(i3GEO.arvoreDeTemas.INCLUIINDIBR===true){var temp=function(){i3GEOF.vinde.inicia("",i3GEO.arvoreDeTemas.ARVORE)};i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/vinde/index.js",temp,"i3GEOF.vinde_script")}dados=i3GEO.arvoreDeTemas.MENUS;c=dados.length;for(i=0,j=c;i<j;i+=1){if(!dados[i].nomemenu){dados[i].nomemenu=dados[i].idmenu}if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar grupos' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+dados[i].idmenu+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}if(!dados[i].publicado){dados[i].publicado="sim"}if(dados[i].publicado.toLowerCase()!=="nao"){conteudo="<span style='position:relative;' title='"+(dados[i].desc)+"'>"+dados[i].nomemenu+"</span>"+editor}else{conteudo="<span title='nao publicado' style='color:red'>"+dados[i].nomemenu+"</span>"+editor}tempNode=new YAHOO.widget.HTMLNode({html:conteudo,idmenu:dados[i].idmenu,enableHighlight:true,expanded:false,className:"i3GeoFolder"},root);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaGrupos,1);if(dados[i].status==="aberto"){tempNode.expand()}}document.getElementById(i3GEO.arvoreDeTemas.IDHTML).style.textAlign="left";if(!i3GEO.arvoreDeTemas.INCLUISISTEMAS){if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir===false){i3GEO.arvoreDeTemas.ARVORE.draw()}else if(mais!=""){i3GEO.arvoreDeTemas.adicionaNoNavegacaoDir()}}},adicionaNoNavegacaoDir:function(drives,arvore){var temp=function(){var iglt,ig,drive,tempNode;if(!drives){drives=i3GEO.arvoreDeTemas.DRIVES}if(!arvore){arvore=i3GEO.arvoreDeTemas.ARVORE}if(drives==undefined||drives==""||drives.length===0){arvore.draw();return}iglt=drives.length;tempNode=new YAHOO.widget.HTMLNode({html:""+$trad("a6")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=32' > </a>",enableHighlight:true,expanded:false,className:"i3GeoFolder"},i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("idmais","idmais"));ig=0;do{drive=new YAHOO.widget.HTMLNode({listaShp:true,listaImg:true,listaFig:false,html:drives[ig].nome,caminho:drives[ig].caminho,enableHighlight:true,expanded:false,className:"i3GeoFolder"},tempNode);drive.setDynamicLoad(i3GEO.arvoreDeTemas.montaDir,1);ig+=1}while(ig<iglt);arvore.draw()};i3GEO.arvoreDeTemas.listaDrives(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,temp)},montaGrupos:function(node){var temp=function(){var grupos,c,raiz,nraiz,mostra,i,d,editor;grupos=i3GEO.arvoreDeTemas.GRUPOS.grupos;c=grupos.length-3;raiz=grupos[c].temasraiz;nraiz=raiz.length;for(i=0;i<nraiz;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&raiz[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&raiz[i].ogc==="nao"){mostra=false}if(mostra&&raiz[i].nome!=""){tempNode=new YAHOO.widget.HTMLNode({isLeaf:false,enableHighlight:false,expanded:false,html:i3GEO.arvoreDeTemas.montaTextoTema("gray",raiz[i])},node)}}for(i=0;i<c;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&grupos[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&grupos[i].ogc==="nao"){mostra=false}if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar subgrupos' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+node.data.idmenu+"&id_grupo="+grupos[i].id_n1+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}if(mostra&&grupos[i].nome!=undefined){if(grupos[i].publicado){if(grupos[i].publicado==="NAO"){grupos[i].nome="<span title='nao publicado' style='color:red'>"+grupos[i].nome+"</span>"}}d={html:"<span style='position:relative;'>"+grupos[i].nome+editor+"</span>",idmenu:node.data.idmenu,className:"i3GeoFolder",idgrupo:i};if(grupos[i].id_n1){d={html:grupos[i].nome+editor,idmenu:node.data.idmenu,className:"i3GeoFolder",idgrupo:grupos[i].id_n1}}tempNode=new YAHOO.widget.HTMLNode(d,node,false,true);tempNode.enableHighlight=true;tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaSubGrupos,1);tempNode.isLeaf=false}}node.loadComplete()};i3GEO.arvoreDeTemas.listaGrupos(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,temp)},montaSubGrupos:function(node){var temp=function(){var i,c,mostra,d,tempNode,nraiz,subgrupos,raiz;subgrupos=i3GEO.arvoreDeTemas.SUBGRUPOS.subgrupo;c=subgrupos.length;raiz=i3GEO.arvoreDeTemas.SUBGRUPOS.temasgrupo;nraiz=raiz.length;for(i=0;i<nraiz;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&raiz[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&raiz[i].ogc==="nao"){mostra=false}if(mostra){tempNode=new YAHOO.widget.HTMLNode({nacessos:raiz[i].nacessos,html:i3GEO.arvoreDeTemas.montaTextoTema("gray",raiz[i]),idtema:raiz[i].tid,fonte:raiz[i].link,ogc:raiz[i].ogc,kmz:raiz[i].kmz,permitecomentario:raiz[i].permitecomentario,download:raiz[i].download,expanded:false,enableHighlight:false,isLeaf:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.propTemas,1)}}for(i=0;i<c;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&subgrupos[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&subgrupos[i].ogc==="nao"){mostra=false}if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar temas' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+node.data.idmenu+"&id_grupo="+node.data.idgrupo+"&id_subgrupo="+subgrupos[i].id_n2+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}if(mostra&&subgrupos[i].nome!=undefined){if(subgrupos[i].publicado){if(subgrupos[i].publicado==="NAO"){subgrupos[i].nome="<span title='nao publicado' style='color:red'>"+subgrupos[i].nome+"</span>"}}d={html:"<span style='position:relative;'>"+subgrupos[i].nome+editor+"</span>",idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,className:"i3GeoFolder",idsubgrupo:i};if(subgrupos[i].id_n2){d={html:subgrupos[i].nome+editor,idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,idsubgrupo:subgrupos[i].id_n2,className:"i3GeoFolder"}}tempNode=new YAHOO.widget.HTMLNode(d,node,false,true);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaTemas,1);tempNode.isLeaf=false;tempNode.enableHighlight=true}}node.loadComplete()};i3GEO.arvoreDeTemas.listaSubGrupos(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,node.data.idgrupo,temp)},montaTemas:function(node){var temp=function(){var i,cor,temas,c,mostra,tempNode;temas=i3GEO.arvoreDeTemas.TEMAS.temas;c=temas.length;cor="rgb(51, 102, 102)";for(i=0;i<c;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&temas[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&temas[i].ogc==="nao"){mostra=false}if(mostra){if(temas[i].publicado){if(temas[i].publicado==="NAO"){temas[i].nome="<span title='nao publicado' style='color:red' >"+temas[i].nome+"</span>"}}tempNode=new YAHOO.widget.HTMLNode({nacessos:temas[i].nacessos,html:i3GEO.arvoreDeTemas.montaTextoTema(cor,temas[i]),idtema:temas[i].tid,fonte:temas[i].link,ogc:temas[i].ogc,kmz:temas[i].kmz,download:temas[i].download,permitecomentario:temas[i].permitecomentario,tipoa_tema:temas[i].tipoa_tema,bookmark:"sim",expanded:false,isLeaf:false,enableHighlight:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.propTemas,1);cor=(cor==="rgb(51, 102, 102)")?"rgb(47, 70, 50)":"rgb(51, 102, 102)"}}node.loadComplete()};i3GEO.arvoreDeTemas.listaTemas(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,node.data.idgrupo,node.data.idsubgrupo,temp)},montaDir:function(node){var montaLista=function(retorno){var ig,conteudo,dirs,tempNode,arquivos,prefixo="",funcaoClick="i3GEO.util.adicionaSHP";dirs=retorno.data.diretorios;if(!node.data.retornaDir){node.data.retornaDir=false}for(ig=0;ig<dirs.length;ig+=1){if(node.data.funcaoClick){funcaoClick=node.data.funcaoClick}if(node.data.retornaDir===true){prefixo="<input type=radio onclick='i3GEOF.navegarquivos.retorna(\""+node.data.caminho+"/"+dirs[ig]+"\")' />"}tempNode=new YAHOO.widget.HTMLNode({html:prefixo+dirs[ig],caminho:node.data.caminho+"/"+dirs[ig],expanded:false,enableHighlight:false,listaImg:node.data.listaImg,listaFig:node.data.listaFig,listaShp:node.data.listaShp,retornaDir:node.data.retornaDir,funcaoClick:funcaoClick,className:"i3GeoFolder"},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaDir,1)}arquivos=retorno.data.arquivos;for(ig=0;ig<arquivos.length;ig+=1){conteudo=arquivos[ig];if(node.data.funcaoClick){funcaoClick=node.data.funcaoClick}if((node.data.listaFig===true&&(conteudo.search(".png")>1||conteudo.search(".jpg")>1||conteudo.search(".PNG")>1))||(node.data.listaImg===true&&(conteudo.search(".img")>1||conteudo.search(".tif")>1||conteudo.search(".TIF")>1))||(node.data.listaShp===true&&(conteudo.search(".shp")>1||conteudo.search(".SHP")>1))){conteudo="<a href='#' title='"+$trad("g2")+"' onclick='"+funcaoClick+"(\""+node.data.caminho+"/"+conteudo+"\")' >"+conteudo+"</a>";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:conteudo,caminho:node.data.caminho+"/"+conteudo},node)}}node.loadComplete()};i3GEO.php.listaarquivos(montaLista,node.data.caminho)},montaTextoTema:function(cor,tema){var html,clique;html="<td class='ygtvcontent' style='text-align:left;'>";if(i3GEO.arvoreDeTemas.TIPOBOTAO!=="download"){html+="<input title='"+tema.tid+"' style='position:relative;top:3px;width:12px;height:12px;cursor:pointer;border:solid 0 white;' "}else{html+="<img style='position:relative;top:3px;' title='"+tema.tid+"' src='"+i3GEO.configura.locaplic+"/imagens/down1.gif'"}if(i3GEO.arvoreDeTemas.ATIVATEMA!==""){clique="onclick=\""+i3GEO.arvoreDeTemas.ATIVATEMA+"\""}else{clique="onclick='i3GEO.arvoreDeTemas.verificaStatusTema(this,\""+tema.tid+"\")'"}html+=clique;if(tema.nameInput){html+=" name='"+tema.nameInput+"' "}if(i3GEO.arvoreDeTemas.TIPOBOTAO!=="download"){html+=" type='"+i3GEO.arvoreDeTemas.TIPOBOTAO+"' value='"+tema.tid+"' />"}else{html+=" /> "}html+="<span title='"+tema.tid+"' onmouseout='javascript:this.style.color=\""+cor+"\";' onmouseover='javascript:this.style.color=\"blue\";' style='left:4px;cursor:pointer;text-align:left;color:"+cor+";padding-left:0px;position:relative;top:1px;' "+clique+">";html+=tema.nome;html+="</span></td>";return(html)},verificaStatusTema:function(obj,tid){if(i3GEO.arvoreDeCamadas.pegaTema(tid)!==""){if(i3GEO.arvoreDeCamadas.ARVORE){i3GEO.arvoreDeCamadas.ligaDesligaTemas(tid,obj.checked)}else{var temp=function(){i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem);i3GEO.janela.fechaAguarde("redesenha")};if(!obj.checked){i3GEO.php.ligatemas(temp,tid,"")}else{i3GEO.php.ligatemas(temp,"",tid)}}}else{i3GEO.arvoreDeTemas.adicionaTemas([tid])}},propTemas:function(node){var html,lkmini,lkmini1,lkgrcode,lkgrcode1,n,ogc;if(node.data.fonte&&node.data.fonte!==""&&node.data.fonte!==" "){tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' href='"+node.data.fonte+"' target='_blank' >Fonte</a>"},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.mini===true){lkmini=i3GEO.arvoreDeTemas.LOCAPLIC+"/testamapfile.php?map="+node.data.idtema+".map&tipo=mini";lkmini1=i3GEO.arvoreDeTemas.LOCAPLIC+"/testamapfile.php?map="+node.data.idtema+".map&tipo=grande";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' onmouseover='i3GEO.ajuda.mostraJanela(\"<img src="+lkmini+" />\")' href='"+lkmini1+"' target='blank' >Miniatura</a>"},node)}if(node.data.ogc&&node.data.ogc!=="nao"){if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.kml===true){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.abreKml(\""+node.data.idtema+"\",\"kml\")' >Kml</a>";if(node.data.kmz.toLowerCase()==="sim"){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.abreKml(\""+node.data.idtema+"\",\"kmz\")' >Kml</a>"}new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}ogc=i3GEO.arvoreDeTemas.LOCAPLIC+"/ogc.php?tema="+node.data.idtema+"&service=wms&request=getcapabilities";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='getcapabilities' href='"+ogc+"' target='blank' >WMS - OGC</a>"},node)}if(node.data.download&&node.data.download.toLowerCase()!=="nao"&&i3GEO.arvoreDeTemas.TIPOBOTAO!=="download"){html="<a href='"+i3GEO.configura.locaplic+"/datadownload.htm?"+node.data.idtema+"' target='_blank'>Download</a>";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(node.data.permitecomentario&&node.data.permitecomentario!=="nao"&&i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios===true){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.comentario(\""+node.data.idtema+"\",\"comentario\")' >"+$trad("x19")+"</a>";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.qrcode===true){lkgrcode=i3GEO.arvoreDeTemas.LOCAPLIC+"/pacotes/qrcode/php/qr_html.php?d="+i3GEO.arvoreDeTemas.LOCAPLIC+"/ms_criamapa.php?interface="+i3GEO.parametros.interfacePadrao+"&temasa="+node.data.idtema+"&layers="+node.data.idtema;lkgrcode1=i3GEO.arvoreDeTemas.LOCAPLIC+"/pacotes/qrcode/php/qr_img.php?d="+i3GEO.arvoreDeTemas.LOCAPLIC+"/ms_criamapa.php?interface="+i3GEO.parametros.interfacePadrao+"&temasa="+node.data.idtema+"&layers="+node.data.idtema;new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' onmouseover='i3GEO.ajuda.mostraJanela(\"<img src="+lkgrcode1+" />\")' href='"+lkgrcode+"' target='blank' >Qrcode</a>"},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.estrelas===true){n=parseInt(node.data.nacessos/(i3GEO.arvoreDeTemas.FATORESTRELA*1),10);if(n>=5){n=5}html=(n>0)?"<img src='"+i3GEO.configura.locaplic+"/imagens/e"+n+".png"+"'/>":"<img src='"+i3GEO.configura.locaplic+"/imagens/e0.png'/>";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.bookmark===true){html=i3GEO.social.bookmark(i3GEO.configura.locaplic+"/ms_criamapa.php?layers="+node.data.idtema);new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}node.loadComplete()},outrasOpcoesHTML:function(){var ins="",t=0,imb=i3GEO.configura.locaplic+"/imagens/branco.gif",OPCOESADICIONAIS=i3GEO.arvoreDeTemas.OPCOESADICIONAIS,estilo=function(i){return" onmouseout='javascript:this.className = \""+i+" iconeMini iconeGuiaMovelMouseOut\";' onmouseover='javascript:this.className = \""+i+" iconeMini iconeGuiaMovelMouseOver\";' class='"+i+" iconeMini iconeGuiaMovelMouseOut' src='"+imb+"' style='cursor:pointer;text-align:left' "};if(OPCOESADICIONAIS.refresh===true){ins+="<td><img "+estilo("i3geo_refresh2")+" onclick='i3GEO.util.animaClique(this);i3GEO.util.animaClique(this);i3GEO.arvoreDeTemas.atualiza()' title='Refresh'/></td>";t+=20}if(OPCOESADICIONAIS.uploadarquivo===true){ins+="<td><img "+estilo("conectarwms")+" onclick='i3GEO.util.animaClique(this);i3GEO.util.animaClique(this);i3GEO.arvoreDeTemas.dialogo.conectaservico()' title='"+$trad("a15")+"'/></td>";t+=20;ins+="<td><img "+estilo("upload")+" onclick='i3GEO.util.animaClique(this);i3GEO.util.animaClique(this);i3GEO.arvoreDeTemas.dialogo.uploadarquivo()' title='"+$trad("a14")+"'/></td>";t+=20}else{}if(OPCOESADICIONAIS.downloadbase===true){ins+="<td><img "+estilo("download")+" onclick='i3GEO.util.animaClique(this);i3GEO.arvoreDeTemas.dialogo.downloadbase()' title='"+$trad("a3")+"'/></td>";t+=20}if(OPCOESADICIONAIS.importarwmc===true){ins+="<td><img "+estilo("importarwmc")+" onclick='i3GEO.util.animaClique(this);i3GEO.arvoreDeTemas.dialogo.importarwmc()' title='"+$trad("a3a")+"'/></td>";t+=20}if(OPCOESADICIONAIS.nuvemTags===true){ins+="<td><img "+estilo("nuvemtags")+" onclick='i3GEO.util.animaClique(this);i3GEO.arvoreDeTemas.dialogo.nuvemTags()' title='"+$trad("a5a")+"'/></td>";t+=20}if(OPCOESADICIONAIS.nuvemTagsFlash===true){ins+="<td><img "+estilo("nuvemtags")+" onclick='i3GEO.util.animaClique(this);i3GEO.arvoreDeTemas.dialogo.nuvemTagsFlash()' title='"+$trad("a5a")+"'/></td>";t+=20}if(OPCOESADICIONAIS.carousel===true){ins+="<td><img "+estilo("carouselTemas")+" onclick='i3GEO.util.animaClique(this);i3GEO.arvoreDeTemas.dialogo.carouselTemas()' title='Miniaturas'/></td>";t+=20}if(OPCOESADICIONAIS.inde===true){ins+="<td><img "+estilo("buscaInde")+" onclick='i3GEO.util.animaClique(this);i3GEO.arvoreDeTemas.dialogo.buscaInde()' title='Pesquisa na INDE'/></td>";t+=20}if(OPCOESADICIONAIS.metaestat===true){ins+="<td><img "+estilo("iconeMetaestat")+" onclick='i3GEO.util.animaClique(this);i3GEO.mapa.dialogo.metaestat()' title='Cartogramas estatisticos'/></td>";t+=20}return("<table width='"+t+"px' ><tr>"+ins+"</tr></table>")},desativaCheckbox:function(valor){var o,inputs,n,i;o=document.getElementById(i3GEO.arvoreDeTemas.ARVORE.id);inputs=o.getElementsByTagName("input");n=inputs.length;i=0;do{inputs[i].checked=false;i+=1}while(i<n)},buscaCheckbox:function(valor){var o,inputs,n,i;if(i3GEO.arvoreDeTemas.ARVORE){o=document.getElementById(i3GEO.arvoreDeTemas.ARVORE.id);if(o){inputs=o.getElementsByTagName("input");n=inputs.length;i=0;do{if(inputs[i].value===valor){return inputs[i]}i+=1}while(i<n)}}return false},listaTemasAtivos:function(){var o,inputs,n,i,lista;o=document.getElementById(i3GEO.arvoreDeTemas.ARVORE.id);inputs=o.getElementsByTagName("input");n=inputs.length;i=0;lista=[];do{if(inputs[i].checked===true){lista.push(inputs[i].value)}i+=1}while(i<n);return(lista)},buscaTema:function(palavra){if(palavra===""){return}var busca,root,nodePalavra="";resultadoProcurar=function(retorno){var mostra,tempNode,d,conta,ig,ngSgrupo,tempn,sg,ngTema,tempng,st,lk="";if(!retorno.data){i3GEO.janela.tempoMsg("Ocorreu um erro")}else{retorno=retorno.data;conta=0;if((retorno!=="erro")&&(typeof(retorno)!=='undefined')){ig=retorno.length-1;if(ig>=0){do{ngSgrupo=retorno[ig].subgrupos;tempn=ngSgrupo.length;for(sg=0;sg<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'> fonte</a>"}d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>";tempNode=new YAHOO.widget.HTMLNode(d,nodePalavra,false,true);tempNode.isLeaf=true;tempNode.enableHighlight=false}conta+=1}}}while(ig--)}else{d="<span style='color:red'>Nada encontrado<br><br></span>";tempNode=new YAHOO.widget.HTMLNode(d,nodePalavra,false,true);tempNode.isLeaf=true;tempNode.enableHighlight=false}}}nodePalavra.loadComplete()};busca=function(){i3GEO.php.procurartemas2(resultadoProcurar,i3GEO.util.removeAcentos(palavra))};i3GEO.arvoreDeTemas.ARVORE.collapseAll();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(!i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")){tempNode=new YAHOO.widget.HTMLNode({html:"Temas encontrados",id:"temasEncontrados"},root,false,true);tempNode.enableHighlight=false}else{tempNode=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")}nodePalavra=new YAHOO.widget.HTMLNode({html:palavra},tempNode,false,true);nodePalavra.enableHighlight=false;i3GEO.arvoreDeTemas.ARVORE.draw();tempNode.expand();nodePalavra.setDynamicLoad(busca,1);nodePalavra.expand()},buscaTema2:function(palavra){if(palavra===""){return}var busca,root,nodePalavra="";resultadoProcurar=function(retorno){var ig,montaTexto=function(ngSgrupo){var tempn,ngTema,tempng,mostra,d,lk="",st,sg;tempn=ngSgrupo.length;for(sg=0;sg<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;try{if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}}catch(e){}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'> fonte</a>"}if(ngSgrupo[sg].subgrupo){d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>"}else{d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].grupo)+")"+lk+"</td>"}new YAHOO.widget.HTMLNode({enableHighlight:false,isLeaf:true,html:d,expanded:false},nodePalavra)}conta+=1}}};if(!retorno.data){i3GEO.janela.tempoMsg("Ocorreu um erro")}else{retorno=retorno.data;conta=0;if((retorno!=="erro")&&(typeof(retorno)!=='undefined')){ig=retorno.length-1;if(ig>=0){do{montaTexto([retorno[ig]]);montaTexto(retorno[ig].subgrupos)}while(ig--)}else{new YAHOO.widget.HTMLNode({enableHighlight:false,isLeaf:true,expanded:false,html:"<span style='color:red'>Nada encontrado<br><br></span>"},nodePalavra)}}}nodePalavra.loadComplete()};busca=function(){i3GEO.php.procurartemas2(resultadoProcurar,i3GEO.util.removeAcentos(palavra))};i3GEO.arvoreDeTemas.ARVORE.collapseAll();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(!i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")){tempNode=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:"Temas encontrados",id:"temasEncontrados"},root)}else{tempNode=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")}nodePalavra=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:palavra},tempNode);i3GEO.arvoreDeTemas.ARVORE.draw();tempNode.expand();nodePalavra.setDynamicLoad(busca,1);nodePalavra.expand()},adicionaTemas:function(tsl){var exec,tempAdiciona=function(retorno){i3GEO.atualiza();if(i3GEO.arvoreDeTemas.RETORNAGUIA!==""){if(i3GEO.arvoreDeTemas.RETORNAGUIA!==i3GEO.guias.ATUAL){i3GEO.guias.escondeGuias();i3GEO.guias.mostra(i3GEO.arvoreDeTemas.RETORNAGUIA)}}try{if($i("i3GEOidentificalistaTemas")){i3GEOF.identifica.listaTemas()}}catch(r){}};i3GEO.mapa.ativaTema("");if(arguments.length!==1){tsl=i3GEO.arvoreDeTemas.listaTemasAtivos()}if(tsl.length>0){exec=function(tsl){var no,p,funcao;if(i3GEO.arvoreDeTemas.ARVORE){no=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("idtema",tsl[0]);if(no&&no.data.tipoa_tema==="META"){if(no.data.id_medida_variavel!=undefined&&no.data.id_medida_variavel!=""){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.metaestat()","metaestat","metaestat","index.js","i3GEOF.metaestat.inicia('flutuanteSimples','',"+no.data.id_medida_variavel+")")}else{p=i3GEO.configura.locaplic+"/ferramentas/metaestat/analise.php?funcao=pegaMetadadosMapfile"+"&idtema="+no.data.idtema+"&g_sid="+i3GEO.configura.sid;funcao=function(retorno){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.metaestat()","metaestat","metaestat","index.js","i3GEOF.metaestat.inicia('flutuanteSimples','',"+retorno.data.id_medida_variavel+")")};cpJSON.call(p,"foo",funcao)}}else if(no&&no.data.tipoa_tema==="METAREGIAO"){p=i3GEO.configura.locaplic+"/ferramentas/metaestat/analise.php?funcao=adicionaLimiteRegiao"+"&codigo_tipo_regiao="+no.data.codigo_tipo_regiao+"&g_sid="+i3GEO.configura.sid;funcao=function(){i3GEO.atualiza()};cpJSON.call(p,"foo",funcao)}else{i3GEO.php.adtema(tempAdiciona,tsl.toString())}}else{i3GEO.php.adtema(tempAdiciona,tsl.toString())}};if(i3GEO.arvoreDeCamadas.pegaTema(tsl[0])!==""){i3GEO.janela.confirma($trad("x76"),300,$trad("x14"),$trad("x15"),function(){exec(tsl)})}else{exec.call(this,tsl)}}},comboMenus:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura){i3GEO.configura.locaplic=locaplic;var combo=function(retorno){var ob,ins,ig;ob=retorno.data;ins="<select id='"+idCombo+"' SIZE="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(this.value)' ><option value='' >Escolha um menu:</option>";for(ig=0;ig<ob.length;ig+=1){if(ob[ig].publicado!=="nao"&&ob[ig].publicado!=="NAO"){if(ob[ig].nomemenu){ins+="<option value="+ob[ig].idmenu+" >"+ob[ig].nomemenu+"</option>"}}}$i(idDestino).innerHTML=ins+"</select>";return retorno.data};i3GEO.php.pegalistademenus(combo)},comboGruposMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura,id_menu){i3GEO.configura.locaplic=locaplic;i3GEO.arvoreDeTemas.temasRaizGrupos=[];var combo=function(retorno){var ins,ig,obGrupos=retorno.data;ins="<select id='"+idCombo+"' SIZE="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(this.value)' ><option value='' >Escolha um grupo:</option>";for(ig=0;ig<obGrupos.grupos.length;ig+=1){if(obGrupos.grupos[ig].nome){ins+="<option value="+obGrupos.grupos[ig].id_n1+" >"+obGrupos.grupos[ig].nome+"</option>"}i3GEO.arvoreDeTemas.temasRaizGrupos[obGrupos.grupos[ig].id_n1]=obGrupos.grupos[ig].temasgrupo}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistadegrupos(combo,id_menu,"nao")},comboSubGruposMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,idGrupo,largura,altura){if(idGrupo!==""){var combo=function(retorno){var ins,sg,ig;ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(\""+idGrupo+"\",this.value)' ><option value='' >Escolha um sub-grupo:</option>";if(retorno.data.subgrupo){sg=retorno.data.subgrupo;for(ig=0;ig<sg.length;ig+=1){ins+="<option value="+sg[ig].id_n2+" >"+sg[ig].nome+"</option>"}}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistadeSubgrupos(combo,"",idGrupo)}},comboTemasMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,idGrupo,idSubGrupo,largura,altura,id_menu,temas){var combo=function(retorno){var ins,sg,ig;if(idSubGrupo!=""){ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"("+idGrupo+","+idSubGrupo+",this.value)' ><option value='' >Escolha um tema:</option>"}else{ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"("+idGrupo+",\"\",this.value)' ><option value='' >Escolha um tema:</option>"}if(typeof(retorno.data)!=='undefined'){retorno=retorno.data.temas}sg=retorno.length;for(ig=0;ig<sg;ig++){ins+="<option value="+retorno[ig].tid+" >"+retorno[ig].nome+"</option>"}$i(idDestino).innerHTML=ins+"</select>"};if(typeof(temas)==='undefined'||temas===""){i3GEO.php.pegalistadetemas(combo,id_menu,idGrupo,idSubGrupo)}else{combo(temas)}},abrejanelaIframe:function(w,h,s){var i=parseInt(Math.random()*100,10),janelaeditor=i3GEO.janela.cria(w,h,s,i,10,s,"janela"+i,false),wdocaiframe="";wdocaiframe=$i("janela"+i+"i");if(wdocaiframe){wdocaiframe.style.width="100%";wdocaiframe.style.height="100%"}YAHOO.util.Event.addListener(janelaeditor[0].close,"click",i3GEO.arvoreDeTemas.atualiza,janelaeditor[0].panel,{id:janelaeditor[0].id},true)},dialogo:{uploadarquivo:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/uploadarquivos/dependencias.php","i3GEOF.uploadarquivos.iniciaJanelaFlutuante()","i3GEOF.uploadarquivos_script")},conectaservico:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/conectarservicos/dependencias.php","i3GEOF.conectarservicos.iniciaJanelaFlutuante()","i3GEOF.conectarservicos_script")},carouselTemas:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/carouseltemas/index.js","i3GEOF.carouseltemas.criaJanelaFlutuante()","i3GEOF.carouseltemas_script")},buscaInde:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/buscainde/dependencias.php","i3GEOF.buscainde.iniciaJanelaFlutuante()","i3GEOF.buscainde_script")},vinde:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/vinde/dependencias.php","i3GEOF.vinde.iniciaJanelaFlutuante()","i3GEOF.vinde_script")},nuvemTags:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/nuvemtags/dependencias.php","i3GEOF.nuvemtags.iniciaJanelaFlutuante()","i3GEOF.nuvemtags_script")},nuvemTagsFlash:function(){i3GEO.janela.cria("550px","350px",i3GEO.configura.locaplic+"/ferramentas/nuvemtagsflash/index.htm","","",$trad("x44"))},navegacaoDir:function(){i3GEO.janela.cria("550px","350px",i3GEO.configura.locaplic+"/ferramentas/navegacaodir/index.htm","","",$trad("x45"))},importarwmc:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/importarwmc/dependencias.php","i3GEOF.importarwmc.iniciaJanelaFlutuante()","i3GEOF.importarwmc_script")},conectarwfs:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwfs/index.htm","","","WFS")},downloadbase:function(){window.open(i3GEO.configura.locaplic+"/datadownload.htm")}}}; |
| 268 | 268 | // |
| 269 | 269 | //compactados/classe_barradebotoes_compacto.js |
| 270 | -if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.barraDeBotoes={BARRAS:[],BOTAOCLICADO:"",ATIVA:true,TIPO:"yui",OFFSET:-205,POSICAO:"bottom",MAXBOTOES:13,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:{abreJanelaLegenda:true,localizar:true,zoomanterior:true,zoomli:true,zoomproximo:true,zoomiauto:false,zoomoauto:false,pan:true,zoomtot:true,identifica:true,identificaBalao:true,mede:true,area:true,selecao:true,barraedicao:true,imprimir: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:false},ICONEBOTAO:{zoomli:"/imagens/gisicons/eudock/zoom-region.png",zoomproximo:"/imagens/gisicons/eudock/zoom-next.png",zoomanterior:"/imagens/gisicons/eudock/zoom-last.png",zoomiauto:"/imagens/gisicons/eudock/zoom-in.png",zoomoauto:"/imagens/gisicons/eudock/zoom-out.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",barraedicao:"/imagens/gisicons/eudock/editopen.png",localizar:"/imagens/gisicons/eudock/search.png",abreJanelaLegenda:"/imagens/gisicons/eudock/show-legend.png"},TEMPLATEBOTAO:"",BOTAOPADRAO:"pan",COMPORTAMENTO:"padrao",adicionaBotao:function(obj){i3GEO.barraDeBotoes.LISTABOTOES.push(obj);i3GEO.barraDeBotoes.ICONEBOTAO[obj.iddiv]="/imagens/oxygen/22x22/user-online.png";i3GEO.barraDeBotoes.INCLUIBOTAO[obj.iddiv]=true},ativaPadrao:function(){if(i3GEO.barraDeBotoes.ATIVA===true){try{var botao=i3GEO.barraDeBotoes.defBotao(i3GEO.barraDeBotoes.BOTAOPADRAO);if(botao.funcaoonclick){botao.funcaoonclick.call()}}catch(e){}}},ativaIcone:function(icone){if(i3GEO.barraDeBotoes.ATIVA===false){return}var estilo,temp,ist,cor,ko,estiloatual="white";if($i(icone)){estiloatual=$i(icone).style.backgroundColor}i3GEO.barraDeBotoes.BOTAOCLICADO=icone;ko=i3GEO.barraDeBotoes.LISTABOTOES.length-1;if(i3GEO.barraDeBotoes.COMPORTAMENTO==="padrao"){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(i3GEO.barraDeBotoes.LISTABOTOES[ko].tipo==="dinamico"&&temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white';if(i3GEO.barraDeBotoes.SOICONES===true){ist.borderLeftColor='rgb(50,50,50)';ist.borderBottomColor='rgb(50,50,50)'}}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='white';estilo.borderWidth="1px"}}}if(i3GEO.barraDeBotoes.COMPORTAMENTO==="destacado"){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white'}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}}}if(i3GEO.util.in_array(i3GEO.barraDeBotoes.COMPORTAMENTO,["laranja","vermelho","cinza"])){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;if(i3GEO.barraDeBotoes.SOICONES===false){ist.borderWidth="1px";ist.borderColor='white';ist.backgroundColor='white'}else{ist.backgroundColor=''}}}while(ko--)}switch(i3GEO.barraDeBotoes.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(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}if(estiloatual==cor){estilo.backgroundColor='white'}else{estilo.backgroundColor=cor}}}},ativaBotoes:function(padrao){var l,b,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]&&l[b].dica&&i3GEO.barraDeBotoes.TIPO!="emlinha"){$i(l[b].iddiv).onmouseover=function(e){i3GEO.barraDeBotoes.mostraJanela(this,l[b].dica,e)};$i(l[b].iddiv).onmouseout=function(e){i3GEO.barraDeBotoes.mostraJanela(this,"",e)}}if(l[b]&&l[b].titulo&&i3GEO.barraDeBotoes.TIPO==="emlinha"){new YAHOO.widget.Tooltip(l[b].iddiv+"_tip",{context:l[b].iddiv,text:l[b].titulo})}if(l[b]&&l[b].funcaoonclick){temp.onclick=l[b].funcaoonclick;if(l[b].iddiv==padrao){l[b].funcaoonclick()}}if(l[b]&&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){if(i3GEO.barraDeBotoes.ATIVA===false){return}var botao=i3GEO.barraDeBotoes.defBotao(id);i3GEO.barraDeBotoes.BOTAOCLICADO=id;if(botao===false){return}try{if(botao.funcaoonclick){botao.funcaoonclick.call()}}catch(e){}},defBotao:function(iddiv){var l=i3GEO.barraDeBotoes.LISTABOTOES,b=l.length-1;if(b>=0){do{if(l[b].iddiv===iddiv){return l[b]}}while(b--)}return false},inicializaBarraOP:function(onde){if(i3GEO.barraDeBotoes.ATIVA===false||!$i(i3GEO.Interface.IDCORPO)){return}if(document.onclick)euEnv.onclickBK=document.onclick;document.onclick=on_MouseClick;euDimensioni();offsEut();euThread();euEnv.imageBasePath=i3GEO.configura.locaplic+"/pacotes/eudock/";var botao,dica,titulo,i,dock=new euDock(onde),temp="dockBg-r.png",tempAjuda="dockBg-l.png",chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length,preload;preload=new Image();preload.src=i3GEO.configura.locaplic+"/imagens/gisicons/eudock/sobe1.png";if(i3GEO.barraDeBotoes.POSICAO==="top"){dock.setObjectAlign(i3GEO.Interface.IDCORPO,euUP,(i3GEO.parametros.h)*1+i3GEO.barraDeBotoes.OFFSET,euDOWN)}else{if(onde){dock.setObjectAlign(i3GEO.Interface.IDCORPO,euDOWN,i3GEO.barraDeBotoes.OFFSET,euUP)}else{dock.setObjectAlign(i3GEO.Interface.IDCORPO,euDOWN,(parseInt(document.body.style.height,10))*-1+i3GEO.barraDeBotoes.OFFSET,euUP)}}if(i3GEO.barraDeBotoes.MAXBOTOES>=chaves.length){temp="vazio.png"}if(i3GEO.barraDeBotoes.AJUDA===false){tempAjuda="vazio.png"}dock.setBar({left:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/"+tempAjuda}},horizontal:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-c-o.png"}},right:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/"+temp}}});i3GEO.barraDeBotoes.AJUDA=false;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){dica="";titulo=""}else{if(botao.dica){dica=botao.dica}else{dica=""}if(botao.titulo!=undefined){titulo=botao.titulo}else{titulo=""}}dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]}}),{mouseInsideClick:function(x,y,id,posX,posY){i3GEO.util.animaClique($i(euEnv.euDockArray[id].elementsArray[0].id));i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao,x,y,posX,posY)},idBotao:chaves[i],dica:dica,titulo:titulo})}}$i(euEnv.euDockArray.euDock_0.bar.elementsArray.left.id).onclick=function(){i3GEO.barraDeBotoes.ajudaEmLista()};$i(euEnv.euDockArray.euDock_0.bar.elementsArray.right.id).onclick=function(){var dica,titulo,chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length,nb=euEnv.euDockArray.euDock_0.iconsArray.length,i;if(nb!==i3GEO.barraDeBotoes.MAXBOTOES){i3GEO.barraDeBotoes.recria()}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){dica="";titulo=""}else{if(botao.dica){dica=botao.dica}else{dica=""}if(botao.titulo!=undefined){titulo=botao.titulo}else{titulo=""}}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:dica,titulo:titulo})}}}}},inicializaBarra:function(idconteudo,idconteudonovo,barraZoom,x,y,onde){if(i3GEO.barraDeBotoes.ATIVA===false){return}var ticone,tipo,mostra,i,temp,e,wj,recuo,alturadisponivel,n,chaves,elementos="",numerobotoes=0,nelementos=0,Dom=YAHOO.util.Dom,branco=i3GEO.configura.locaplic+'/imagens/branco.gif',novoel;if(i3GEO.configura.map3d===""){i3GEO.barraDeBotoes.INCLUIBOTAO.v3d=false}if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"||i3GEO.barraDeBotoes.TIPO==="olhodepeixe1"){if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe1"&&$i(i3GEO.Interface.IDMAPA)){i3GEO.barraDeBotoes.inicializaBarraOP($i(i3GEO.Interface.IDMAPA))}else{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>"}if(navm){i3GEO.barraDeBotoes.TRANSICAOSUAVE=false}if(i3GEO.barraDeBotoes.TIPO==="emlinha"){temp="<div id='"+onde+"_mascara'></div>";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+="<img id='"+chaves[i]+"_iconeId' onclick='i3GEO.util.animaClique(this);i3GEO.barraDeBotoes.execBotao(\""+chaves[i]+"\")' src='"+i3GEO.configura.locaplic+"/"+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]+"' />"}}if(!$i(onde)){novoel=document.createElement("div");novoel.id=onde;novoel.innerHTML=temp;$i(i3GEO.Interface.IDMAPA).appendChild(novoel)}else{$i(onde).innerHTML=temp}for(i=0;i<n;i+=1){temp=i3GEO.barraDeBotoes.defBotao(chaves[i]).titulo;if(temp!=""){new YAHOO.widget.Tooltip(chaves[i]+"_tip",{context:chaves[i]+"_iconeId",text:temp})}}}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";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";if(idconteudonovo!=""){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)}};novoel.onmouseout=function(){if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.barraDeBotoes.OPACIDADE/100)}};document.body.appendChild(novoel)}ticone=28;alturadisponivel=i3GEO.parametros.h-i3GEO.Interface.BARRABOTOESTOP-ticone-38-38;if(this.AUTOALTURA===true){alturadisponivel+=28}numerobotoes=parseInt(alturadisponivel/ticone,10);if(idconteudo!=""&&$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")}}if(i3GEO.barraDeBotoes.TIPO!="emlinha"){YAHOO.namespace("i3GEO.janela.botoes");if(i3GEO.barraDeBotoes.ORIENTACAO==="horizontal"){YAHOO.i3GEO.janela.botoes=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.i3GEO.janela.botoes=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.i3GEO.janela.botoes=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")}YAHOO.i3GEO.janela.botoes.render();YAHOO.i3GEO.janela.botoes.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.i3GEO.janela.botoes);YAHOO.i3GEO.janela.botoes.show();if(i3GEO.Interface.TABLET===true){YAHOO.i3GEO.janela.botoes.moveTo((i3GEO.parametros.w/2)-(i3GEO.barraDeBotoes.HORIZONTALW/2),"")}Dom.replaceClass(idconteudonovo+"_h","hd2")}}},reativa:function(indice){if(i3GEO.barraDeBotoes.ATIVA===false){return}var abre=function(){var i,n=i3GEO.barraDeBotoes.BARRAS.length;for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.BARRAS[i]){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.ATIVA===false){return}if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"||i3GEO.barraDeBotoes.TIPO==="olhodepeixe1"){euEnv.euDockArray=[];euEnv.Kost.num=0;if($i("euDock_0_bar")){$i("euDock_0_bar").parentNode.parentNode.removeChild($i("euDock_0_bar").parentNode)}i3GEO.barraDeBotoes.inicializaBarra();return}var i,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]&&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 i,n=this.BARRAS.length;for(i=0;i<n;i+=1){if(this.BARRAS[i]&&this.BARRAS[i].id===id){$i(id+"_c").style.visibility="hidden"}}},mostraJanela:function(objeto,mensagem,evt){if(mensagem===""){try{clearTimeout(i3GEO.barraDeBotoes.timeMostraAjudaBotoes)}catch(e){}try{clearTimeout(i3GEO.barraDeBotoes.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='"+i3GEO.configura.locaplic+"/imagens/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='"+i3GEO.configura.locaplic+"/imagens/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(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.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(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeMostraAjudaBotoes=setTimeout(function(){balloonAjuda.cleanup();balloonIsVisible=false;if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"||i3GEO.barraDeBotoes.TIPO==="olhodepeixe1"){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){}i3GEO.barraDeBotoes.timeAjudaBotoes=setTimeout(function(){balloonAjuda.cleanup()},4000)},4000)}}},mostraJanelaAjuda:function(mensagem){$i("divMensagemBarraDeBotoesCorpo").innerHTML=mensagem;YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","block");try{clearTimeout(i3GEO.barraDeBotoes.timeMostraAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeAjudaBotoes=setTimeout(function(){i3GEO.barraDeBotoes.escondeJanelaAjuda()},3000)},escondeJanelaAjuda:function(){try{if(i3GEO.barraDeBotoes.timeAjudaBotoes){clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}}catch(e){}if($i("divMensagemBarraDeBotoes")){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none")}},ajudaEmLista:function(){var n,i,ins="",b;n=i3GEO.barraDeBotoes.LISTABOTOES.length;ins+="<table class=lista8 >";for(i=0;i<n;i++){b=i3GEO.barraDeBotoes.LISTABOTOES[i];if(i3GEO.barraDeBotoes.INCLUIBOTAO[b.iddiv]===true){if(b.dica!=""){ins+="<tr><td><img src='"+i3GEO.configura.locaplic+"/"+i3GEO.barraDeBotoes.ICONEBOTAO[b.iddiv]+"' /></td><td>"+b.dica+"</td></tr>"}}}ins+="</table>";i3GEO.janela.mensagemSimples("<div style='overflow:auto;height:100%'>"+ins+"</div>","")},editor:{inicia:function(){i3GEO.eventos.cliquePerm.desativa();i3GEO.barraDeBotoes.editor[i3GEO.Interface.ATUAL].inicia("janelaEditorVetorial")},googlemaps:{inicia:function(idjanela){var temp=function(){var cabecalho,minimiza,fecha,janela=YAHOO.i3GEO.janela.manager.find("i3GEOjanelaEditor");if(janela){janela.destroy()}cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOjanelaEditor")};janela=i3GEO.janela.cria("350px","100px","","","","Editor","i3GEOjanelaEditor",false,"hd",cabecalho,minimiza);$i("i3GEOjanelaEditor_corpo").style.backgroundColor="white";i3GEO.editorGM.inicia("i3GEOjanelaEditor_corpo");fecha=function(){var temp=window.confirm($trad("x94"));if(i3GEO.eventos){i3GEO.eventos.cliquePerm.ativa()}if(temp===true){i3GEO.desenho.googlemaps.destroyFeatures(i3GEO.desenho.googlemaps.shapes)}};YAHOO.util.Event.addListener(janela[0].close,"click",fecha)};if(!i3GEO.editorGM){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/classesjs/compactados/classe_editorgm_compacto.js",temp,"editorgm.js",true)}else{temp.call()}}},openlayers:{inicia:function(idjanela){if(!i3GEO.editorOL){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/classesjs/compactados/classe_editorol_compacto.js","i3GEO.barraDeBotoes.editor.openlayers.ativaPainel('"+idjanela+"')","editorol.js",true)}else{if(!i3GEO.desenho.layergrafico){i3GEO.desenho.openlayers.criaLayerGrafico();i3GEO.editorOL.mapa.addLayers([i3GEO.desenho.layergrafico])}if(!i3GEO.editorOL.backup){i3GEO.editorOL.backup=new OpenLayers.Layer.Vector("Backup",{displayInLayerSwitcher:false,visibility:false})}i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}},criaJanela:function(){if($i("i3GEOjanelaEditor")){return"i3GEOjanelaEditor"}var janela,divid,titulo,cabecalho,minimiza;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOjanelaEditor")};titulo=$trad("u29");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,'corta':true,'edita':true,'listag':true,'selecao':true,'selecaotudo':true,'apaga':true,'procura':false,'propriedades':true,'salva':true,'ajuda':true,'fecha':true,'tools':true,'undo':true,'frente':true};if(!i3GEO.desenho.layergrafico){i3GEO.desenho.openlayers.criaLayerGrafico()}if(idjanela){i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}}}}}; | |
| 270 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.barraDeBotoes={BARRAS:[],BOTAOCLICADO:"",ATIVA:true,TIPO:"yui",OFFSET:-205,POSICAO:"bottom",MAXBOTOES:13,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:{abreJanelaLegenda:true,localizar:true,zoomanterior:true,zoomli:true,zoomproximo:true,zoomiauto:false,zoomoauto:false,pan:true,zoomtot:true,identifica:true,identificaBalao:true,mede:true,area:true,selecao:true,barraedicao:true,imprimir: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:false},ICONEBOTAO:{zoomli:"/imagens/gisicons/eudock/zoom-region.png",zoomproximo:"/imagens/gisicons/eudock/zoom-next.png",zoomanterior:"/imagens/gisicons/eudock/zoom-last.png",zoomiauto:"/imagens/gisicons/eudock/zoom-in.png",zoomoauto:"/imagens/gisicons/eudock/zoom-out.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",barraedicao:"/imagens/gisicons/eudock/editopen.png",localizar:"/imagens/gisicons/eudock/search.png",abreJanelaLegenda:"/imagens/gisicons/eudock/show-legend.png"},TEMPLATEBOTAO:"",BOTAOPADRAO:"pan",COMPORTAMENTO:"padrao",adicionaBotao:function(obj){i3GEO.barraDeBotoes.LISTABOTOES.push(obj);i3GEO.barraDeBotoes.ICONEBOTAO[obj.iddiv]="/imagens/oxygen/22x22/user-online.png";i3GEO.barraDeBotoes.INCLUIBOTAO[obj.iddiv]=true},ativaPadrao:function(){if(i3GEO.barraDeBotoes.ATIVA===true){try{var botao=i3GEO.barraDeBotoes.defBotao(i3GEO.barraDeBotoes.BOTAOPADRAO);if(botao.funcaoonclick){botao.funcaoonclick.call()}}catch(e){}}},ativaIcone:function(icone){if(i3GEO.barraDeBotoes.ATIVA===false){return}var estilo,temp,ist,cor,ko,estiloatual="white";if($i(icone)){estiloatual=$i(icone).style.backgroundColor}i3GEO.barraDeBotoes.BOTAOCLICADO=icone;ko=i3GEO.barraDeBotoes.LISTABOTOES.length-1;if(i3GEO.barraDeBotoes.COMPORTAMENTO==="padrao"){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(i3GEO.barraDeBotoes.LISTABOTOES[ko].tipo==="dinamico"&&temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white';if(i3GEO.barraDeBotoes.SOICONES===true){ist.borderLeftColor='rgb(50,50,50)';ist.borderBottomColor='rgb(50,50,50)'}}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='white';estilo.borderWidth="1px"}}}if(i3GEO.barraDeBotoes.COMPORTAMENTO==="destacado"){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white'}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}}}if(i3GEO.util.in_array(i3GEO.barraDeBotoes.COMPORTAMENTO,["laranja","vermelho","cinza"])){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;if(i3GEO.barraDeBotoes.SOICONES===false){ist.borderWidth="1px";ist.borderColor='white';ist.backgroundColor='white'}else{ist.backgroundColor=''}}}while(ko--)}switch(i3GEO.barraDeBotoes.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(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}if(estiloatual==cor){estilo.backgroundColor='white'}else{estilo.backgroundColor=cor}}}},ativaBotoes:function(padrao){var atrib,l,b,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);atrib=document.createAttribute("indxBotao");atrib.value=b;if(temp){temp.setAttributeNode(atrib);if(l[b].conteudo){temp.innerHTML=l[b].conteudo}if(l[b]&&l[b].dica&&i3GEO.barraDeBotoes.TIPO!="emlinha"){$i(l[b].iddiv).onmouseover=function(e){var i=this.attributes["indxBotao"].value,l=i3GEO.barraDeBotoes.LISTABOTOES;if(l&&l[i]&&l[i].dica){i3GEO.barraDeBotoes.mostraJanela(this,l[i].dica,e)}};$i(l[b].iddiv).onmouseout=function(e){i3GEO.barraDeBotoes.mostraJanela(this,"",e)}}if(l[b]&&l[b].titulo&&i3GEO.barraDeBotoes.TIPO==="emlinha"){new YAHOO.widget.Tooltip(l[b].iddiv+"_tip",{context:l[b].iddiv,text:l[b].titulo})}if(l[b]&&l[b].funcaoonclick){temp.onclick=l[b].funcaoonclick;if(l[b].iddiv==padrao){l[b].funcaoonclick()}}if(l[b]&&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){if(i3GEO.barraDeBotoes.ATIVA===false){return}var botao=i3GEO.barraDeBotoes.defBotao(id);i3GEO.barraDeBotoes.BOTAOCLICADO=id;if(botao===false){return}try{if(botao.funcaoonclick){botao.funcaoonclick.call()}}catch(e){}},defBotao:function(iddiv){var l=i3GEO.barraDeBotoes.LISTABOTOES,b=l.length-1;if(b>=0){do{if(l[b].iddiv===iddiv){return l[b]}}while(b--)}return false},inicializaBarraOP:function(onde){if(i3GEO.barraDeBotoes.ATIVA===false||!$i(i3GEO.Interface.IDCORPO)){return}if(document.onclick)euEnv.onclickBK=document.onclick;document.onclick=on_MouseClick;euDimensioni();offsEut();euThread();euEnv.imageBasePath=i3GEO.configura.locaplic+"/pacotes/eudock/";var botao,dica,titulo,i,dock=new euDock(onde),temp="dockBg-r.png",tempAjuda="dockBg-l.png",chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length,preload;preload=new Image();preload.src=i3GEO.configura.locaplic+"/imagens/gisicons/eudock/sobe1.png";if(i3GEO.barraDeBotoes.POSICAO==="top"){dock.setObjectAlign(i3GEO.Interface.IDCORPO,euUP,(i3GEO.parametros.h)*1+i3GEO.barraDeBotoes.OFFSET,euDOWN)}else{if(onde){dock.setObjectAlign(i3GEO.Interface.IDCORPO,euDOWN,i3GEO.barraDeBotoes.OFFSET,euUP)}else{dock.setObjectAlign(i3GEO.Interface.IDCORPO,euDOWN,(parseInt(document.body.style.height,10))*-1+i3GEO.barraDeBotoes.OFFSET,euUP)}}if(i3GEO.barraDeBotoes.MAXBOTOES>=chaves.length){temp="vazio.png"}if(i3GEO.barraDeBotoes.AJUDA===false){tempAjuda="vazio.png"}dock.setBar({left:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/"+tempAjuda}},horizontal:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-c-o.png"}},right:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/"+temp}}});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||i3GEO.barraDeBotoes.AJUDA===false){dica="";titulo=""}else{if(botao.dica){dica=botao.dica}else{dica=""}if(botao.titulo!=undefined&&i3GEO.barraDeBotoes.AJUDA===true){titulo=botao.titulo}else{titulo=""}}dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]],titulo:titulo}}),{mouseInsideClick:function(x,y,id,posX,posY){i3GEO.util.animaClique($i(euEnv.euDockArray[id].elementsArray[0].id));i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao,x,y,posX,posY)},idBotao:chaves[i],dica:dica,titulo:titulo})}}$i(euEnv.euDockArray.euDock_0.bar.elementsArray.left.id).onclick=function(){i3GEO.barraDeBotoes.ajudaEmLista()};$i(euEnv.euDockArray.euDock_0.bar.elementsArray.right.id).onclick=function(){var dica,titulo,chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length,nb=euEnv.euDockArray.euDock_0.iconsArray.length,i;if(nb!==i3GEO.barraDeBotoes.MAXBOTOES){i3GEO.barraDeBotoes.recria()}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){dica="";titulo=""}else{if(botao.dica){dica=botao.dica}else{dica=""}if(botao.titulo!=undefined){titulo=botao.titulo}else{titulo=""}}dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]],titulo:titulo}}),{mouseInsideClick:function(x,y,id,posX){i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao,x,y,posX)},idBotao:chaves[i],dica:dica,titulo:titulo})}}}}},inicializaBarra:function(idconteudo,idconteudonovo,barraZoom,x,y,onde){if(i3GEO.barraDeBotoes.ATIVA===false){return}var ticone,tipo,mostra,i,temp,e,wj,recuo,alturadisponivel,n,chaves,elementos="",numerobotoes=0,nelementos=0,Dom=YAHOO.util.Dom,branco=i3GEO.configura.locaplic+'/imagens/branco.gif',novoel;if(i3GEO.configura.map3d===""){i3GEO.barraDeBotoes.INCLUIBOTAO.v3d=false}if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"||i3GEO.barraDeBotoes.TIPO==="olhodepeixe1"){if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe1"&&$i(i3GEO.Interface.IDMAPA)){i3GEO.barraDeBotoes.inicializaBarraOP($i(i3GEO.Interface.IDMAPA))}else{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>"}if(navm){i3GEO.barraDeBotoes.TRANSICAOSUAVE=false}if(i3GEO.barraDeBotoes.TIPO==="emlinha"){temp="<div id='"+onde+"_mascara'></div>";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+="<img id='"+chaves[i]+"_iconeId' onclick='i3GEO.util.animaClique(this);i3GEO.barraDeBotoes.execBotao(\""+chaves[i]+"\")' src='"+i3GEO.configura.locaplic+"/"+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]+"' />"}}if(!$i(onde)){novoel=document.createElement("div");novoel.id=onde;novoel.innerHTML=temp;$i(i3GEO.Interface.IDMAPA).appendChild(novoel)}else{$i(onde).innerHTML=temp}for(i=0;i<n;i+=1){temp=i3GEO.barraDeBotoes.defBotao(chaves[i]).titulo;if(temp!=""){new YAHOO.widget.Tooltip(chaves[i]+"_tip",{context:chaves[i]+"_iconeId",text:temp})}}}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";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";if(idconteudonovo!=""){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)}};novoel.onmouseout=function(){if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.barraDeBotoes.OPACIDADE/100)}};document.body.appendChild(novoel)}ticone=28;alturadisponivel=i3GEO.parametros.h-i3GEO.Interface.BARRABOTOESTOP-ticone-38-38;if(this.AUTOALTURA===true){alturadisponivel+=28}numerobotoes=parseInt(alturadisponivel/ticone,10);if(idconteudo!=""&&$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")}}if(i3GEO.barraDeBotoes.TIPO!="emlinha"){YAHOO.namespace("i3GEO.janela.botoes");if(i3GEO.barraDeBotoes.ORIENTACAO==="horizontal"){YAHOO.i3GEO.janela.botoes=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.i3GEO.janela.botoes=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.i3GEO.janela.botoes=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")}YAHOO.i3GEO.janela.botoes.render();YAHOO.i3GEO.janela.botoes.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.i3GEO.janela.botoes);YAHOO.i3GEO.janela.botoes.show();if(i3GEO.Interface.TABLET===true){YAHOO.i3GEO.janela.botoes.moveTo((i3GEO.parametros.w/2)-(i3GEO.barraDeBotoes.HORIZONTALW/2),"")}Dom.replaceClass(idconteudonovo+"_h","hd2")}}},reativa:function(indice){if(i3GEO.barraDeBotoes.ATIVA===false){return}var abre=function(){var i,n=i3GEO.barraDeBotoes.BARRAS.length;for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.BARRAS[i]){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.ATIVA===false){return}if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"||i3GEO.barraDeBotoes.TIPO==="olhodepeixe1"){euEnv.euDockArray=[];euEnv.Kost.num=0;if($i("euDock_0_bar")){$i("euDock_0_bar").parentNode.parentNode.removeChild($i("euDock_0_bar").parentNode)}i3GEO.barraDeBotoes.inicializaBarra();return}var i,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]&&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 i,n=this.BARRAS.length;for(i=0;i<n;i+=1){if(this.BARRAS[i]&&this.BARRAS[i].id===id){$i(id+"_c").style.visibility="hidden"}}},mostraJanela:function(objeto,mensagem,evt){if(mensagem===""){try{clearTimeout(i3GEO.barraDeBotoes.timeMostraAjudaBotoes)}catch(e){}try{clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}return}var divmensagem=$i("divMensagemBarraDeBotoes"),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='"+i3GEO.configura.locaplic+"/imagens/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='"+i3GEO.configura.locaplic+"/imagens/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(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeMostraAjudaBotoes=setTimeout("i3GEO.barraDeBotoes.mostraJanelaAjuda('"+mensagem+"');",5000)}else{}}},mostraJanelaAjuda:function(mensagem){$i("divMensagemBarraDeBotoesCorpo").innerHTML=mensagem;YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","block");try{clearTimeout(i3GEO.barraDeBotoes.timeMostraAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeAjudaBotoes=setTimeout(function(){i3GEO.barraDeBotoes.escondeJanelaAjuda()},3000)},escondeJanelaAjuda:function(){try{if(i3GEO.barraDeBotoes.timeAjudaBotoes){clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}}catch(e){}if($i("divMensagemBarraDeBotoes")){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none")}},ajudaEmLista:function(){var n,i,ins="",b;n=i3GEO.barraDeBotoes.LISTABOTOES.length;ins+="<table class=lista8 >";for(i=0;i<n;i++){b=i3GEO.barraDeBotoes.LISTABOTOES[i];if(i3GEO.barraDeBotoes.INCLUIBOTAO[b.iddiv]===true){if(b.dica!=""){ins+="<tr><td><img src='"+i3GEO.configura.locaplic+"/"+i3GEO.barraDeBotoes.ICONEBOTAO[b.iddiv]+"' /></td><td>"+b.dica+"</td></tr>"}}}ins+="</table>";i3GEO.janela.mensagemSimples("<div style='overflow:auto;height:100%'>"+ins+"</div>","")},editor:{inicia:function(){i3GEO.eventos.cliquePerm.desativa();i3GEO.barraDeBotoes.editor[i3GEO.Interface.ATUAL].inicia("janelaEditorVetorial")},googlemaps:{inicia:function(idjanela){var temp=function(){var cabecalho,minimiza,fecha,janela=YAHOO.i3GEO.janela.manager.find("i3GEOjanelaEditor");if(janela){janela.destroy()}cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOjanelaEditor")};janela=i3GEO.janela.cria("350px","100px","","","","Editor","i3GEOjanelaEditor",false,"hd",cabecalho,minimiza);$i("i3GEOjanelaEditor_corpo").style.backgroundColor="white";i3GEO.editorGM.inicia("i3GEOjanelaEditor_corpo");fecha=function(){var temp=window.confirm($trad("x94"));if(i3GEO.eventos){i3GEO.eventos.cliquePerm.ativa()}if(temp===true){i3GEO.desenho.googlemaps.destroyFeatures(i3GEO.desenho.googlemaps.shapes)}};YAHOO.util.Event.addListener(janela[0].close,"click",fecha)};if(!i3GEO.editorGM){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/classesjs/compactados/classe_editorgm_compacto.js",temp,"editorgm.js",true)}else{temp.call()}}},openlayers:{inicia:function(idjanela){if(!i3GEO.editorOL){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/classesjs/compactados/classe_editorol_compacto.js","i3GEO.barraDeBotoes.editor.openlayers.ativaPainel('"+idjanela+"')","editorol.js",true)}else{if(!i3GEO.desenho.layergrafico){i3GEO.desenho.openlayers.criaLayerGrafico();i3GEO.editorOL.mapa.addLayers([i3GEO.desenho.layergrafico])}if(!i3GEO.editorOL.backup){i3GEO.editorOL.backup=new OpenLayers.Layer.Vector("Backup",{displayInLayerSwitcher:false,visibility:false})}i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}},criaJanela:function(){if($i("i3GEOjanelaEditor")){return"i3GEOjanelaEditor"}var janela,divid,titulo,cabecalho,minimiza;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOjanelaEditor")};titulo=$trad("u29");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,'corta':true,'edita':true,'listag':true,'selecao':true,'selecaotudo':true,'apaga':true,'procura':false,'propriedades':true,'salva':true,'ajuda':true,'fecha':true,'tools':true,'undo':true,'frente':true};if(!i3GEO.desenho.layergrafico){i3GEO.desenho.openlayers.criaLayerGrafico()}if(idjanela){i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}}}}}; | |
| 271 | 271 | // |
| 272 | 272 | //compactados/classe_coordenadas_compacto.js |
| 273 | 273 | if(typeof(i3GEO)==='undefined'){var 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:""},"geohash":{idhtml:"localizarxy",tipo:"codigo",tipoCodigo:"geohash",titulo:"GeoHash",ativo:true},"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"},"mostraCoordenadasGeohash":{idhtml:"localizarxy"}},MODOTEXTO:"",mostraCoordenadasGEO:function(id){try{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");if(i3GEO.Interface.TABLET===true){i3GEO.eventos.adicionaEventos("MOUSECLIQUE",["i3GEO.coordenadas.atualizaLocalizarGeo()"])}else{i3GEO.eventos.adicionaEventos("MOUSEMOVE",["i3GEO.coordenadas.atualizaLocalizarGeo()"])}}}}catch(e){i3GEO.janela.tempoMsg("mostraCoordenadasGeo: "+e.description)}},atualizaLocalizarGeo:function(id,x,y){if(!id){id="coordgeotabela"}if(typeof(x)==='undefined'){x=objposicaocursor.dmsx}if(typeof(y)==='undefined'){y=objposicaocursor.dmsy}var temp=$i(id);if(temp&&temp.style.display==="block"){i3GEO.coordenadas.atualizaGeo(x,y,id)}},geo2zonaUtm:function(l){l=(l*1)+180;l=l/6;return parseInt(l,10)+1},criaMascaraDMS:function(prefixo,titulo,caixa){var ins='<table class="i3GeoMascaraCoord" id='+prefixo+' ><tr>'+"<td>"+caixa+" </td>"+'<td style=width:10px;text-align:right > X: </td>'+'<td>'+$inputText('','',prefixo+'xg','grau','3','-00')+'</td>'+'<td>'+$inputText('','',prefixo+'xm','minuto','2','00')+'</td>'+'<td>'+$inputText('','',prefixo+'xs','segundo','5','00.00')+'</td>'+'<td> Y: '+$inputText('','',prefixo+'yg','grau','3','-00')+'</td>'+'<td>'+$inputText('','',prefixo+'ym','minuto','2','00')+'</td>'+'<td>'+$inputText('','',prefixo+'ys','segundo','5','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=ticfind style="margin-left:8px;" title=zoom onclick="'+temp+'" src="'+i3GEO.configura.locaplic+"/imagens/branco.gif"+'" /></td>'+"</tr></table>";return ins},atualizaGeo:function(dmsx,dmsy,prefixo){var x=dmsx.split(" "),y=dmsy.split(" ");if($i(prefixo+"xg")){$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><br>"},criaMascaraMetrica:function(prefixo,titulo,caixa){var ins="<table id="+prefixo+" class='i3GeoMascaraCoord' ><tr>"+"<td>"+caixa+" <td>"+"<td style=width:100px;text-align:right >"+titulo+" X: </td>"+"<td>"+$inputText("","",prefixo+"X","X","12","00")+" </td>"+"<td>Y:"+$inputText("","",prefixo+"Y","Y","12","00")+" </td>"+"<td>Zn:"+$inputText("","",prefixo+"ZN","Zona","2","--")+" </td>"+"</tr></table>";return ins},criaMascaraCodigo:function(prefixo,titulo,caixa,tipoCodigo){var funcao="",ins="";if(tipoCodigo==="geohash"){funcao="i3GEO.coordenadas.geohash.zoomCodigo(\'"+prefixo+"Codigo\')"}ins="<table id="+prefixo+" class='i3GeoMascaraCoord' ><tr>"+"<td>"+caixa+" <td>"+"<td style=width:100px;text-align:right >"+titulo+" : </td>"+"<td>"+$inputText("","",prefixo+"Codigo","Cod","12","00")+" </td>"+'<td><img class=tic title=zoom onclick="'+funcao+'" src="'+i3GEO.configura.locaplic+"/imagens/branco.gif"+'" /></td>'+"</tr></table>";return ins},atualizaCodigo:function(onde,configProj,x,y){var ondeValor=$i(onde+configProj+"Codigo");onde=$i(onde),temp=i3GEO.coordenadas.config[configProj],codigo="";if(onde&&onde.style.display==="none"){return}if(typeof(x)==='undefined'){x=objposicaocursor.ddx}if(typeof(y)==='undefined'){y=objposicaocursor.ddy}if(temp.tipoCodigo==="geohash"){codigo=i3GEO.coordenadas.geohash.encodeGeoHash(y,x)}i3GEO.coordenadas.MODOTEXTO+=temp.titulo+" : "+codigo+"<br><br>";if(ondeValor){ondeValor.value=codigo}},atualizaProj4:function(onde,configProj,x,y){if(i3GEO.coordenadas.formato==="bloco"&&i3GEO.coordenadas.padrao!==configProj){return}var zona,temp,p,destino="",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><br>"},calculaProj4:function(origem,destino,x,y){Proj4js.defs={'ORIGEM':origem,'DESTINO':destino};Proj4js.getScriptLocation=function(){return i3GEO.configura.locaplic+"/pacotes/proj4js/lib/"};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){if(i3GEO.Interface.openlayers.googleLike===true){i3GEO.coordenadas.config={"geoProj":{idhtml:"localizarxy",tipo:"geo",titulo:"Geo",ativo:true,defepsg:""},"dd":{idhtml:"localizarxy",tipo:"metrica",titulo:"Déc. de grau",ativo:true,defepsg:""}}}try{var tipos=i3GEO.util.listaChaves(i3GEO.coordenadas.config),n=tipos.length,temp,ins="",i=0,caixa,janela,nomeFunc;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+"\");' class='i3geoCoordenadasComboTipo' ><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{if(temp.tipo==="codigo"){ins+=i3GEO.coordenadas.criaMascaraCodigo(onde+tipos[i],temp.titulo,caixa,temp.tipoCodigo)}else{ins+=i3GEO.coordenadas.criaMascaraMetrica(onde+tipos[i],temp.titulo,caixa)}}}}if(this.formato==="janela"){janela=i3GEO.janela.cria("450px","120px","","","",$trad("x49"),"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){i3GEO.janela.tempoMsg(i3GEO.coordenadas.MODOTEXTO);}}).enable();' >"+"Clique aqui para ativar Alt+C para poder capturar as coordenadas</a>"}if(onde!==""&&$i(onde)){$i(onde).innerHTML=ins}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){i3GEO.eventos.adicionaEventos("MOUSECLIQUE",["i3GEO.coordenadas.atualizaLocalizarGeo('"+onde+tipos[i]+"')"])}else{i3GEO.eventos.adicionaEventos("MOUSEMOVE",["i3GEO.coordenadas.atualizaLocalizarGeo('"+onde+tipos[i]+"')"])}}if(typeof(x)!=='undefined'){i3GEO.coordenadas.atualizaLocalizarGeo(onde+tipos[i],i3GEO.calculo.dd2dms(x)[0],i3GEO.calculo.dd2dms(y)[0])}}else{nomeFunc="i3GEO.coordenadas.atualizaProj4";if(temp.tipo==="codigo"){nomeFunc="i3GEO.coordenadas.atualizaCodigo"}if(ativaMovimento===true){if(i3GEO.Interface.TABLET===true){i3GEO.eventos.adicionaEventos("MOUSECLIQUE",[nomeFunc+"('"+onde+"','"+tipos[i]+"')"])}else{i3GEO.eventos.adicionaEventos("MOUSEMOVE",[nomeFunc+"('"+onde+"','"+tipos[i]+"')"])}}if(typeof(x)!=='undefined'){eval(nomeFunc+"(onde,tipos[i],x,y);")}}}}if(ativaMovimento===true){if(i3GEO.Interface.TABLET===true){i3GEO.eventos.adicionaEventos("MOUSECLIQUE",["i3GEO.coordenadas.limpaModoTexto()"])}else{i3GEO.eventos.adicionaEventos("MOUSEMOVE",["i3GEO.coordenadas.limpaModoTexto()"])}}if(i3GEO.coordenadas.formato==="bloco"){i3GEO.coordenadas.ativaBloco(onde)}}catch(men){}},limpaModoTexto:function(){i3GEO.coordenadas.MODOTEXTO=""},geohash:{BITS:[16,8,4,2,1],BASE32:"0123456789bcdefghjkmnpqrstuvwxyz",refine_interval:function(interval,cd,mask){if(cd&mask)interval[0]=(interval[0]+interval[1])/2;else interval[1]=(interval[0]+interval[1])/2},decodeGeoHash:function(geohash){var is_even=1,lat=[],lon=[],i,j,x,y;lat[0]=-90.0;lat[1]=90.0;lon[0]=-180.0;lon[1]=180.0;lat_err=90.0;lon_err=180.0;for(i=0;i<geohash.length;i++){c=geohash[i];cd=i3GEO.coordenadas.geohash.BASE32.indexOf(c);for(j=0;j<5;j++){mask=i3GEO.coordenadas.geohash.BITS[j];if(is_even){lon_err/=2;i3GEO.coordenadas.geohash.refine_interval(lon,cd,mask)}else{lat_err/=2;i3GEO.coordenadas.geohash.refine_interval(lat,cd,mask)}is_even=!is_even}}lat[2]=(lat[0]+lat[1])/2;lon[2]=(lon[0]+lon[1])/2;y=(lat[0]+lat[1])/2;x=(lon[0]+lon[1])/2;return{latitude:y,longitude:x}},encodeGeoHash:function(latitude,longitude){var is_even=1,lat=[],lon=[],bit=0,ch=0,precision=12,geohash="";lat[0]=-90.0;lat[1]=90.0;lon[0]=-180.0;lon[1]=180.0;while(geohash.length<precision){if(is_even){mid=(lon[0]+lon[1])/2;if(longitude>mid){ch|=i3GEO.coordenadas.geohash.BITS[bit];lon[0]=mid}else lon[1]=mid}else{mid=(lat[0]+lat[1])/2;if(latitude>mid){ch|=i3GEO.coordenadas.geohash.BITS[bit];lat[0]=mid}else lat[1]=mid}is_even=!is_even;if(bit<4)bit++;else{geohash+=i3GEO.coordenadas.geohash.BASE32[ch];bit=0;ch=0}}return geohash},zoomCodigo:function(idobj){var codigo;if($i(idobj)){codigo=$i(idobj).value}else{codigo=idobj}codigo=i3GEO.coordenadas.geohash.decodeGeoHash(codigo);i3GEO.navega.zoomponto(i3GEO.configura.locaplic,i3GEO.configura.sid,codigo.longitude,codigo.latitude)}}}; |
| ... | ... | @@ -288,10 +288,10 @@ if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.marcador={prompt:function(){i |
| 288 | 288 | if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.pluginI3geo={OBJETOS:{},PLUGINS:[{"classe":"heatmap","nome":"Mapa de calor","editor":true},{"classe":"markercluster","nome":"Agrupamento de pontos (cluster)","editor":true},{"classe":"layerkml","nome":"Camada Kml","editor":true},{"classe":"parametrossql","nome":"SQL parametrizado","editor":true}],inicia:function(camada){if(i3GEO.janela){i3GEO.janela.AGUARDEMODAL=true;i3GEO.janela.abreAguarde("aguardePlugin","Plugin...");i3GEO.janela.AGUARDEMODAL=false}i3GEO.pluginI3geo[camada.plugini3geo.plugin][i3GEO.Interface.ATUAL].inicia(camada)},formAdmin:function(plugin,configString){return i3GEO.pluginI3geo[plugin].formAdmin(configString)},iconeArvoreDeCamadas:function(camada){if(camada.plugini3geo&&camada.plugini3geo!=""){return i3GEO.pluginI3geo[camada.plugini3geo.plugin].iconeArvoreDeCamadas(camada.name)}else{return false}},linkAjuda:function(plugin){return i3GEO.pluginI3geo[plugin].linkAjuda()},ligaCamada:function(nomecamada){if(i3GEO.pluginI3geo.OBJETOS[nomecamada]&&i3GEO.pluginI3geo.OBJETOS[nomecamada].ligaCamada){i3GEO.pluginI3geo.OBJETOS[nomecamada].ligaCamada();return true}return false},desligaCamada:function(nomecamada){if(i3GEO.pluginI3geo.OBJETOS[nomecamada]&&i3GEO.pluginI3geo.OBJETOS[nomecamada].desLigaCamada){i3GEO.pluginI3geo.OBJETOS[nomecamada].desLigaCamada();return true}return false},removeCamada:function(nomecamada){if(i3GEO.pluginI3geo.OBJETOS[nomecamada]&&i3GEO.pluginI3geo.OBJETOS[nomecamada].removeCamada){i3GEO.pluginI3geo.OBJETOS[nomecamada].removeCamada();delete(i3GEO.pluginI3geo.OBJETOS[nomecamada]);return true}return false},atualizaCamada:function(nomecamada){if(i3GEO.pluginI3geo.OBJETOS[nomecamada]&&i3GEO.pluginI3geo.OBJETOS[nomecamada].atualizaCamada){i3GEO.pluginI3geo.OBJETOS[nomecamada].atualizaCamada();return true}return false},existeObjeto:function(nomecamada){if(i3GEO.pluginI3geo.OBJETOS[nomecamada]&&i3GEO.pluginI3geo.OBJETOS[nomecamada].atualizaCamada){return true}return false},aplicaPropriedades:function(camada){if(camada.plugini3geo&&camada.plugini3geo!=""){camada=i3GEO.pluginI3geo[camada.plugini3geo.plugin][i3GEO.Interface.ATUAL].aplicaPropriedades(camada)}return camada},layerMashup:function(Interface,camada,epsg){if(camada.plugini3geo&&camada.plugini3geo!=""&&i3GEO.pluginI3geo[camada.plugini3geo.plugin][Interface].layerMashup){var l=i3GEO.pluginI3geo[camada.plugini3geo.plugin][Interface].layerMashup(camada,epsg);return l}else{return[false]}},heatmap:{linkAjuda:function(){return i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=3&idajuda=121"},formAdmin:function(config){var parametros,ins="",configDefault='{"plugin":"heatmap","parametros":{"tipoGradiente": "default","valorPonto":1,"coluna":"","radius":15}}';if(config===""){config=configDefault}config=YAHOO.lang.JSON.parse(config);if(config.plugin!="heatmap"){config=YAHOO.lang.JSON.parse(configDefault)}parametros=config.parametros;ins+=""+"<p>Coluna que contém os dados:"+"<br><input name='coluna' type='text' value='"+parametros.coluna+"' size='30'></p>"+"<p>Ou valor numérico para cada ponto:"+"<br><input name='valorPonto' type='text' value='"+parametros.valorPonto+"' size='30'></p>"+"<p>Raio de cada ponto em pixels:"+"<br><input name='radius' type='text' value='"+parametros.radius+"' size='30'></p>"+"<p>Tipo de gradiente (deixe vazio para utilizar as classes definidas no Layer ou escreva 'default' para usar o normal):"+"<br><input name='tipoGradiente' type='text' value='"+parametros.tipoGradiente+"' size='30'></p>"+"<p>Para definir os cortes no gradiente de cores utilize valores entre 0 e 1."+" As cores são definidas nas classes do LAYER, sendo que o nome define o valor superior do gradiente e COLOR define a cor."+" Veja o exemplo utilizado no tema _lmapadecalor.map</p>";return ins},iconeArvoreDeCamadas:function(nomecamada){return false},googlemaps:{aplicaPropriedades:function(camada){camada.sel="nao";camada.download="nao";camada.AGUARDALEGENDA=false;camada.temporizador="";camada.copia=false;camada.procurar=false;camada.toponimia=false;camada.etiquetas=false;camada.tabela=false;camada.grafico=false;camada.destacar=false;camada.wms=false;camada.classe="NAO";return camada},inicia:function(camada){var nomeScript="heatmap_script",p=i3GEO.configura.locaplic+"/ferramentas/heatmap/googlemaps_js.php",carregaJs="nao",criaLayer;criaLayer=function(){var heatmap,pontos;heatmap=new HeatmapOverlay(i3GeoMap,camada.name,{"radius":camada.plugini3geo.parametros.radius,"visible":true,"opacity":camada.transparency,"gradient":heatmap_config.gradient,"legend":{"title":camada.tema,"position":"bl","offset":[5,50]}});pontos={max:camada.plugini3geo.parametros.max,data:heatmap_dados};i3GEO.janela.fechaAguarde("aguardePlugin");heatmap.setDataSet(pontos);heatmap.ligaCamada=function(){this.liga()};heatmap.desLigaCamada=function(){this.desliga()};heatmap.removeCamada=function(){this.destroy()};heatmap.atualizaCamada=function(){this.draw()};i3GEO.pluginI3geo.OBJETOS[camada.name]=heatmap;heatmap_dados=null};if(!$i(nomeScript)){carregaJs="sim"}else{nomeScript=""}p+="?carregajs="+carregaJs+"&layer="+camada.name+"&coluna="+camada.plugini3geo.parametros.coluna+"&tipoGradiente="+camada.plugini3geo.parametros.tipoGradiente+"&g_sid="+i3GEO.configura.sid+"&nomevariavel=heatmap_dados&nomevariavelConfig=heatmap_config";i3GEO.util.scriptTag(p,criaLayer,nomeScript)}},openlayers:{aplicaPropriedades:function(camada){camada.sel="nao";camada.download="nao";camada.AGUARDALEGENDA=false;camada.temporizador="";camada.copia=false;camada.procurar=false;camada.toponimia=false;camada.etiquetas=false;camada.tabela=false;camada.grafico=false;camada.destacar=false;camada.wms=false;camada.classe="NAO";return camada},layerMashup:function(camada,epsg){i3GEO.pluginI3geo.heatmap.openlayers.inicia(camada,i3GEO.editorOL.mapa);return[]},inicia:function(camada,objMapa){var nomeScript="heatmap_script",p=i3GEO.configura.locaplic+"/ferramentas/heatmap/openlayers_js.php",carregaJs="nao",criaLayer;criaLayer=function(){var temp,heatmap,transformedTestData={max:1,data:[]},data=heatmap_dados,datalen=heatmap_dados.length,nudata=[],max=0;if(!objMapa){objMapa=i3geoOL}while(datalen--){temp=heatmap_dados[datalen].count;nudata.push({lonlat:new OpenLayers.LonLat(data[datalen].lng,heatmap_dados[datalen].lat),count:temp});max=Math.max(max,temp)}transformedTestData.max=max;transformedTestData.data=nudata;heatmap=new OpenLayers.Layer.Heatmap(camada.name,objMapa,objMapa.baseLayer,{"visible":true,"opacity":camada.transparency,"radius":camada.plugini3geo.parametros.radius,"gradient":heatmap_config.gradient,"legend":{"title":camada.tema,"position":"bl","offset":[5,50]}},{isBaseLayer:false,projection:new OpenLayers.Projection("EPSG:4326"),displayInLayerSwitcher:true});heatmap.ligaCamada=function(){this.toggle();this.updateLayer()};heatmap.desLigaCamada=function(){this.toggle();this.updateLayer()};heatmap.removeCamada=function(){this.destroy()};heatmap.atualizaCamada=function(){this.updateLayer()};i3GEO.pluginI3geo.OBJETOS[camada.name]=heatmap;objMapa.addLayer(heatmap);heatmap.setDataSet(transformedTestData);heatmap_dados=null;if(i3GEO.janela){i3GEO.janela.fechaAguarde("aguardePlugin")}};if(!$i(nomeScript)){carregaJs="sim"}else{nomeScript=""}if(!i3GEO.configura||!i3GEO.configura.sid){i3GEO.configura.sid=""}p+="?carregajs="+carregaJs+"&layer="+camada.name+"&coluna="+camada.plugini3geo.parametros.coluna+"&tipoGradiente="+camada.plugini3geo.parametros.tipoGradiente+"&g_sid="+i3GEO.configura.sid+"&nomevariavel=heatmap_dados&nomevariavelConfig=heatmap_config";i3GEO.util.scriptTag(p,criaLayer,nomeScript)}},googleearth:{inicia:function(){alert("Plugin nao disponivel")}}},markercluster:{linkAjuda:function(){return i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=3&idajuda=121"},formAdmin:function(config){var parametros,ins="",configDefault='{"plugin":"markercluster","parametros":{"tipoEstilos": "default","gridSize":50}}';if(config===""){config=configDefault}config=YAHOO.lang.JSON.parse(config);if(config.plugin!="markercluster"){config=YAHOO.lang.JSON.parse(configDefault)}parametros=config.parametros;ins+=""+"<p>Distância máxima entre ponto em pixels:"+"<br><input name='gridSize' type='text' value='"+parametros.gridSize+"' size='30'></p>"+"<p>Tipo de estilos (deixe vazio para utilizar as classes definidas no Layer ou escreva 'default' para usar o normal):"+"<br><input name='tipoEstilos' type='text' value='"+parametros.tipoEstilos+"' size='30'></p>"+"<p>Os símbolos utilizados podem ser customizados alterando-se as classes do Mapfile</p>"+"<p>Veja o exemplo utilizado no tema _lmapadecluster.map</p>";return ins},iconeArvoreDeCamadas:function(nomecamada){return false},googlemaps:{aplicaPropriedades:function(camada){camada.sel="nao";camada.download="nao";camada.AGUARDALEGENDA=false;camada.temporizador="";camada.copia=false;camada.procurar=false;camada.toponimia=false;camada.etiquetas=false;camada.tabela=false;camada.grafico=false;camada.destacar=false;camada.wms=false;camada.classe="NAO";return camada},inicia:function(camada){var nomeScript="markercluster_script",p=i3GEO.configura.locaplic+"/ferramentas/markercluster/googlemaps_js.php",carregaJs="nao",criaLayer;criaLayer=function(){var markercluster,marcas,latLng,marker,n,i;n=markercluster_dados.length;marcas=[];for(i=0;i<n;i++){latLng=new google.maps.LatLng(markercluster_dados[i].lat,markercluster_dados[i].lng);marker=new google.maps.Marker({'position':latLng,icon:{url:markercluster_config.ponto.url,scaledSize:new google.maps.Size(markercluster_config.ponto.width,markercluster_config.ponto.height)}});marcas.push(marker)}markercluster=new MarkerClusterer(i3GeoMap,marcas,{"gridSize":parseInt(camada.plugini3geo.parametros.gridSize,10),"visible":true,"opacity":camada.transparency,"name":camada.name,"styles":markercluster_config.estilos});i3GEO.janela.fechaAguarde("aguardePlugin");i3GEO.eventos.cliquePerm.ativo=false;markercluster.ligaCamada=function(){i3GEO.pluginI3geo.OBJETOS[camada.name].ready_=true;i3GEO.pluginI3geo.OBJETOS[camada.name].redraw();i3GEO.eventos.cliquePerm.ativo=false};markercluster.desLigaCamada=function(){i3GEO.pluginI3geo.OBJETOS[camada.name].resetViewport(true);i3GEO.pluginI3geo.OBJETOS[camada.name].ready_=false;i3GEO.eventos.cliquePerm.ativo=true};markercluster.removeCamada=function(){i3GEO.pluginI3geo.OBJETOS[camada.name].clearMarkers();i3GEO.eventos.cliquePerm.ativo=true};markercluster.atualizaCamada=function(){i3GEO.pluginI3geo.OBJETOS[camada.name].ready_=true;i3GEO.pluginI3geo.OBJETOS[camada.name].redraw();i3GEO.eventos.cliquePerm.ativo=false};i3GEO.pluginI3geo.OBJETOS[camada.name]=markercluster;markercluster_dados=null};if(!$i(nomeScript)){carregaJs="sim"}else{nomeScript=""}p+="?carregajs="+carregaJs+"&layer="+camada.name+"&g_sid="+i3GEO.configura.sid+"&tipoEstilos="+camada.plugini3geo.parametros.tipoEstilos+"&nomevariavel=markercluster_dados&nomevariavelConfig=markercluster_config";i3GEO.util.scriptTag(p,criaLayer,nomeScript)}},openlayers:{aplicaPropriedades:function(camada){camada.sel="nao";camada.download="nao";camada.AGUARDALEGENDA=false;camada.temporizador="";camada.copia=false;camada.procurar=false;camada.toponimia=false;camada.etiquetas=false;camada.tabela=false;camada.grafico=false;camada.destacar=false;camada.wms=false;camada.classe="NAO";return camada},layerMashup:function(camada,epsg){i3GEO.pluginI3geo.markercluster.openlayers.inicia(camada,i3GEO.editorOL.mapa);return[]},inicia:function(camada,objMapa){var nomeScript="markercluster_script",p=i3GEO.configura.locaplic+"/ferramentas/markercluster/openlayers_js.php",carregaJs="nao",criaLayer;criaLayer=function(){var layerListeners,logMax,logMin,classes,min,max,markercluster,marcas,lonlat,n,i,style,nestilos,intervalo,regra,regras=[];nestilos=markercluster_config.estilos.length;n=markercluster_dados.length;classes=Array();logMax=Math.log(n)/Math.LN10; logMin=Math.log(1)/Math.LN10;intervalo=(logMax-logMin)/nestilos;for(i=0;i<nestilos;i++){if(i==0){classes[i]=logMin}else{classes[i]=classes[i-1]+intervalo}}classes=classes.map(function(x){return Math.pow(10,x)});classes.push(n);regra=new OpenLayers.Rule({filter:new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.LESS_THAN,property:"count",value:2}),symbolizer:{externalGraphic:markercluster_config.ponto.url,graphicWidth:markercluster_config.ponto.width,graphicHeight:markercluster_config.ponto.height,graphicYOffset:(markercluster_config.ponto.height/2)*-1}});regras.push(regra);min=2;for(i=0;i<nestilos;i++){max=classes[i+1];regra=new OpenLayers.Rule({filter:new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.BETWEEN,property:"count",lowerBoundary:min,upperBoundary:max}),symbolizer:{externalGraphic:markercluster_config.estilos[i].url,graphicWidth:markercluster_config.estilos[i].width,graphicHeight:markercluster_config.estilos[i].height,label:"${count}",labelOutlineWidth:1,fontColor:"#000000",fontOpacity:1,fontSize:"12px"}});regras.push(regra);min=max}style=new OpenLayers.Style(null,{rules:regras});if(!objMapa){objMapa=i3geoOL}layerListeners={featureclick:function(e){if(e.feature.cluster.length>1){objMapa.setCenter([e.feature.geometry.x,e.feature.geometry.y],objMapa.getZoom()+1,false,false)}return false}};markercluster=new OpenLayers.Layer.Vector(camada.name,{renderers:['Canvas','SVG'],strategies:[new OpenLayers.Strategy.AnimatedCluster({distance:parseInt(camada.plugini3geo.parametros.gridSize,10)})],styleMap:new OpenLayers.StyleMap(style),eventListeners:layerListeners});objMapa.addLayer(markercluster);marcas=[];for(i=0;i<n;i++){lonlat=new OpenLayers.LonLat(markercluster_dados[i].lng,markercluster_dados[i].lat);if(i3GEO.Interface.openlayers.googleLike===true){lonlat.transform(new OpenLayers.Projection("EPSG:4326"),new OpenLayers.Projection("EPSG:900913"))}marcas.push(new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(lonlat.lon,lonlat.lat)))}markercluster.addFeatures(marcas);i3GEO.janela.fechaAguarde("aguardePlugin");i3GEO.eventos.cliquePerm.ativo=false;markercluster.ligaCamada=function(){i3GEO.eventos.cliquePerm.ativo=false};markercluster.desLigaCamada=function(){i3GEO.eventos.cliquePerm.ativo=true};markercluster.removeCamada=function(){i3GEO.eventos.cliquePerm.ativo=true};markercluster.atualizaCamada=function(){i3GEO.eventos.cliquePerm.ativo=false};i3GEO.pluginI3geo.OBJETOS[camada.name]=markercluster;markercluster_dados=null};if(!$i(nomeScript)){carregaJs="sim"}else{nomeScript=""}p+="?carregajs="+carregaJs+"&layer="+camada.name+"&g_sid="+i3GEO.configura.sid+"&tipoEstilos="+camada.plugini3geo.parametros.tipoEstilos+"&nomevariavel=markercluster_dados&nomevariavelConfig=markercluster_config";i3GEO.util.scriptTag(p,criaLayer,nomeScript)}}},layerkml:{linkAjuda:function(){return i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=3&idajuda=121"},formAdmin:function(config){var parametros,ins="",configDefault='{"plugin":"layerkml","parametros":{"url": ""}}';if(config===""){config=configDefault}config=YAHOO.lang.JSON.parse(config);if(config.plugin!="layerkml"){config=YAHOO.lang.JSON.parse(configDefault)}parametros=config.parametros;ins+="<p>Url do arquivo Kml:<br><input name='url' type='text' value='"+parametros.url+"'/></p>"+"<p>Veja o exemplo utilizado no tema _lmapakml.map</p>";return ins},iconeArvoreDeCamadas:function(nomecamada){return false},googlemaps:{aplicaPropriedades:function(camada){camada.sel="nao";camada.download="nao";camada.AGUARDALEGENDA=false;camada.temporizador="";camada.copia=false;camada.procurar=false;camada.toponimia=false;camada.etiquetas=false;camada.tabela=false;camada.grafico=false;camada.destacar=false;camada.wms=false;camada.classe="NAO";return camada},inicia:function(camada){var layerkml=new google.maps.KmlLayer(camada.plugini3geo.parametros.url,{map:i3GeoMap,preserveViewport:true,name:camada.name});i3GEO.janela.fechaAguarde("aguardePlugin");layerkml.ligaCamada=function(){i3GEO.pluginI3geo.OBJETOS[camada.name].setMap(i3GeoMap)};layerkml.desLigaCamada=function(){i3GEO.pluginI3geo.OBJETOS[camada.name].setMap(null)};layerkml.removeCamada=function(){i3GEO.pluginI3geo.OBJETOS[camada.name].setMap(null);i3GEO.pluginI3geo.OBJETOS[camada.name].resetViewport(true)};layerkml.atualizaCamada=function(){i3GEO.pluginI3geo.OBJETOS[camada.name].setMap(null);i3GEO.pluginI3geo.OBJETOS[camada.name].resetViewport(true);i3GEO.pluginI3geo.OBJETOS[camada.name].setMap(i3GeoMap)};i3GEO.pluginI3geo.OBJETOS[camada.name]=layerkml}},openlayers:{aplicaPropriedades:function(camada){camada.sel="nao";camada.download="nao";camada.AGUARDALEGENDA=false;camada.temporizador="";camada.copia=false;camada.procurar=false;camada.toponimia=false;camada.etiquetas=false;camada.tabela=false;camada.grafico=false;camada.destacar=false;camada.wms=false;camada.classe="NAO";return camada},layerMashup:function(camada,epsg){i3GEO.pluginI3geo.layerkml.openlayers.inicia(camada,i3GEO.editorOL.mapa);return[]},inicia:function(camada,objMapa){var layerkml;url=i3GEO.configura.locaplic+"/classesphp/proxy.php?url="+camada.plugini3geo.parametros.url;layerkml=new OpenLayers.Layer.Vector(camada.name,{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})})});i3geoOL.addLayer(layerkml);if(!objMapa){objMapa=i3geoOL}layerkml.div.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}if(targ.id){temp=targ.id.split("_Point");if(temp[0]==="OpenLayers_Geometry"){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))}}}}};i3GEO.janela.fechaAguarde("aguardePlugin");i3GEO.eventos.cliquePerm.ativo=false;layerkml.ligaCamada=function(){i3GEO.eventos.cliquePerm.ativo=false};layerkml.desLigaCamada=function(){i3GEO.eventos.cliquePerm.ativo=true};layerkml.removeCamada=function(){i3GEO.eventos.cliquePerm.ativo=true};layerkml.atualizaCamada=function(){i3GEO.eventos.cliquePerm.ativo=false};i3GEO.pluginI3geo.OBJETOS[camada.name]=layerkml}}},parametrossql:{linkAjuda:function(){return i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=3&idajuda=127"},formAdmin:function(config){var n,i,parametros,ins="",configDefault='{"plugin":"parametrossql","ativo":"sim","parametros":[{"titulo":"","tipo":"input","valores":[],"chave":"","prog":""},{"titulo":"","tipo":"input","valores":[],"chave":"","prog":""},{"titulo":"","tipo":"input","valores":[],"chave":"","prog":""},{"titulo":"","tipo":"input","valores":[],"chave":"","prog":""}]}';if(config===""){config=configDefault}config=YAHOO.lang.JSON.parse(config);if(config.plugin!="parametrossql"){config=YAHOO.lang.JSON.parse(configDefault)}parametros=config.parametros;n=4;if(config.ativo==undefined){config.ativo="sim"}ins+="<p class='paragrafo'>Abre o formulário quando a camada é adicionada ao mapa: (true ou false)</p>";ins+="<select style='width:200px' id='parametrosSqlAtivo' ><option value='' ></option>";if(config.ativo==="nao"){ins+="<option value=sim >sim</option><option value=nao selected >nao</option></select>"}else{ins+="<option value=sim selected >sim</option><option value=nao >nao</option></select>"}ins+="<table><tr><td>Título</td><td>Chave</td><td>Tipo (input ou select)</td><td>Valores</td><td>PHP que retorna os valores (opcional)</td></tr>";for(i=0;i<n;i++){ins+="<tr><td><input name='titulo' type=text size=20 value='"+parametros[i].titulo+"' /></td>"+"<td><input name='chave' type=text size=20 value='"+parametros[i].chave+"' /></td>"+"<td><input name='tipo' type=text size=20 value='"+parametros[i].tipo+"' /></td> "+"<td><input name='valores' type=text size=20 value='"+parametros[i].valores+"' /></td> "+"<td><input name='prog' type=text size=20 value='"+parametros[i].prog+"' /></td> "+"<td></tr>"}ins+="</table>"+"<p class='paragrafo'>As chaves são palavras que devem existir no SQL definido em DATA e/ou no filtro (FILTER)."+"<br>O usuário irá fornecer os valores que serão então utilizados para substituir as chaves de forma dinâmica"+"<br>Será mostrado ao usuário um formulário com opções. Cada opção conterá um título e um campo de formulário"+"<br>Cada campo de formulário pode ser dos tipos input (para digitar um valor) ou select (caixa de opções)."+"<br>Em valores deve ser definida a lista ou o valor default que será mostrado. No caso de listas, utilize vírgula para separar os valores."+"<br>Em ativo, é indicado com sim ou nao se o formulário será aberto quando a camada for adicionada ao mapa."+"<br>Como opcional, pode ser definido o endereço de um programa PHP que retorna a lista de nomes e valores que serão utilizados para preencher "+"o campo de escolha. Para mais informações, veja o mapfile i3geo/temas/_llocaliphp.map. O caminho desse arquivo PHP é relativo à pasta i3geo.";return ins},parametrosFormAdmin:function(onde){var campo=0,nlinhas=4,ncampos=5,campos=onde.getElementsByTagName("input"),par=[],temp=[],i,j;for(j=0;j<nlinhas;j++){temp=[];for(i=0;i<ncampos;i++){if(campos[campo]&&campos[campo].name!=""){temp.push('"'+campos[campo].name+'" : "'+campos[campo].value+'"')}campo++}par.push("{"+temp.join(",")+"}")}return'{"plugin":"parametrossql","ativo":"'+$i("parametrosSqlAtivo").value+'","parametros":['+par.join(",")+']}'},iconeArvoreDeCamadas:function(nomecamada){var icone="<img class='pluginParametrossql' "+"onclick='i3GEO.util.animaClique(this);"+"i3GEO.pluginI3geo.parametrossql.buscaParForm(\""+nomecamada+"\");return false;'"+"title='Variaveis' "+"src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' />";return icone},buscaParForm:function(nomecamada){var p,cp,temp,s;temp=function(retorno){var camada;retorno.data.ativo="sim";if(i3GEO.arvoreDeCamadas){camada=i3GEO.arvoreDeCamadas.pegaTema(nomecamada);camada.plugini3geo=retorno.data}else{camada={plugini3geo:retorno.data,name:nomecamada}}i3GEO.pluginI3geo.parametrossql.inicia(camada)};s=i3GEO.configura.sid;if(s===undefined){s=""}p=i3GEO.configura.locaplic+"/ferramentas/parametrossql/exec.php?g_sid="+s+"&funcao=PARAMETROSPLUGIN&tema="+nomecamada;cp=new cpaint();cp.set_response_type("JSON");cp.call(p,"foo",temp)},inicia:function(camada){i3GEO.janela.fechaAguarde("aguardePlugin");var iniciaform=function(){i3GEOF.parametrossql.iniciaJanelaFlutuante(camada)};i3GEO.util.scriptTag((i3GEO.configura.locaplic+"/ferramentas/parametrossql/dependencias.php"),iniciaform,"parametrossql_script")},googlemaps:{inicia:function(camada){i3GEO.pluginI3geo.parametrossql.inicia(camada)},aplicaPropriedades:function(camada){return camada}},openlayers:{inicia:function(camada){i3GEO.pluginI3geo.parametrossql.inicia(camada)},aplicaPropriedades:function(camada){return camada},layerMashup:function(camada,epsg){var p=[];if(!camada.cache){camada["cache"]="NAO"}if(!camada.transitioneffect){camada["transitioneffect"]="SIM"}if(camada["transitioneffect"]==="SIM"){camada["transitioneffect"]="resize"}else{camada["transitioneffect"]=null}if(camada.cache==="NAO"){p.push(new OpenLayers.Layer.WMS(camada.tema,i3GEO.configura.locaplic+"ferramentas/parametrossql/ogc.php?tema="+camada.name+"&",{layers:camada.name,SRS:'EPSG:'+epsg,FORMAT:'image/png'},{singleTile:false,isBaseLayer:false,visibility:true,transitionEffect:camada["transitioneffect"],plugini3geo:"parametrossql","pluginparametros":camada.plugini3geo.parametros}))}else{p.push(new OpenLayers.Layer.TMS(camada.tema,i3GEO.configura.locaplic+"ferramentas/parametrossql/ogc.php?tema="+camada.name+"&",{singleTile:false,isBaseLayer:false,layers:camada.name,visibility:true,serviceVersion:"&tms=",tileOrigin:new OpenLayers.LonLat(-180,-90),layername:camada.name,type:"png",transitionEffect:camada["transitioneffect"],plugini3geo:"parametrossql","pluginparametros":camada.plugini3geo.parametros}));p.push(new OpenLayers.Layer.WMS(camada.tema,i3GEO.configura.locaplic+"ferramentas/parametrossql/ogc.php?tema="+camada.name+"&",{layers:camada.name,SRS:'EPSG:'+epsg,FORMAT:'image/png'},{singleTile:true,isBaseLayer:false,visibility:false,displayInLayerSwitcher:false,transitionEffect:null,plugini3geo:"parametrossql","pluginparametros":camada.plugini3geo.parametros}))}return p}}}}; |
| 289 | 289 | // |
| 290 | 290 | //compactados/euDock.2.0.js |
| 291 | -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(onde){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:1;position:absolute;border:0px solid black;'></div>"+"<div id='"+this.id+"' style='z-index:1;position:absolute;border:0px solid black; cursor: pointer;'></div>";if(onde){novoel.style.zIndex=100000;onde.appendChild(novoel)}else{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(){var tempx,tempy;if(this.objectAlign==euDOWN){if(onde){tempx=(this.idObjectHook.offsetWidth/2);tempy=0}else{tempx=euIdObjLeft(this.idObjectHook)+(this.idObjectHook.offsetWidth/2);tempy=euIdObjTop(this.idObjectHook)+this.idObjectHook.offsetHeight+this.offset;if(navm&&!document.doctype||(navm&&document.doctype&&document.doctype.systemId=="")){tempx=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA))[0]+(euIdObjLeft(this.idObjectHook)/2)}if(navm&&i3GEO.util.versaoNavegador()==="IE8"&&tempx<this.idObjectHook.offsetWidth){tempx=i3GEO.parametros.w/2;if(i3GEO.guias.TIPO==="guia"||i3GEO.guias.TIPO==="sanfona"&&$i("contemFerramentas")){tempx+=parseInt($i("contemFerramentas").style.width,10)}}}this.setCenterPos(tempx,tempy)}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(){};this.kernelMouseOver=function(){};this.kernelMouseOut=function(){};this.mouseOut=function(){};this.mouseOver=function(){};this.mouseMove=function(x,y){};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=function(func){};this.setAllZoomFuncH=function(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 i,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(){};this.refresh=function(){this.updateDims()};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);return 38};this.getHeight=function(){if(!this.loaded)return 0;return 38};this.isRunning=function(){return this.runningFrame||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)){this.mouseInsideClick(x,y,this.id,this.getAbsolutePosX(),this.getAbsolutePosY())}}};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(){};function euKernel(){};function on_MouseMove(e){return true};function on_MouseDown(e){return true};function on_MouseUp(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);return true}; | |
| 291 | +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(onde){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:1;position:absolute;border:0px solid black;'></div>"+"<div id='"+this.id+"' style='z-index:1;position:absolute;border:0px solid black; cursor: pointer;'></div>";if(onde){novoel.style.zIndex=100000;onde.appendChild(novoel)}else{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(){var tempx,tempy;if(this.objectAlign==euDOWN){if(onde){tempx=(this.idObjectHook.offsetWidth/2);tempy=0}else{tempx=euIdObjLeft(this.idObjectHook)+(this.idObjectHook.offsetWidth/2);tempy=euIdObjTop(this.idObjectHook)+this.idObjectHook.offsetHeight+this.offset;if(navm&&!document.doctype||(navm&&document.doctype&&document.doctype.systemId=="")){tempx=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA))[0]+(euIdObjLeft(this.idObjectHook)/2)}if(navm&&i3GEO.util.versaoNavegador()==="IE8"&&tempx<this.idObjectHook.offsetWidth){tempx=i3GEO.parametros.w/2;if(i3GEO.guias.TIPO==="guia"||i3GEO.guias.TIPO==="sanfona"&&$i("contemFerramentas")){tempx+=parseInt($i("contemFerramentas").style.width,10)}}}this.setCenterPos(tempx,tempy)}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(){};this.kernelMouseOver=function(){};this.kernelMouseOut=function(){};this.mouseOut=function(){};this.mouseOver=function(){};this.mouseMove=function(x,y){};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=function(func){};this.setAllZoomFuncH=function(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 i,id=params.id;var id='euDock_icon_'+euEnv.Kost.next();euEnv.euDockArray[id]=new euDockIcon(id,this,params.titulo);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,titulo){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(){};this.refresh=function(){this.updateDims()};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);return 38};this.getHeight=function(){if(!this.loaded)return 0;return 38};this.isRunning=function(){return this.runningFrame||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)){this.mouseInsideClick(x,y,this.id,this.getAbsolutePosX(),this.getAbsolutePosY())}}};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(){};function euKernel(){};function on_MouseMove(e){return true};function on_MouseDown(e){return true};function on_MouseUp(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);return true}; | |
| 292 | 292 | // |
| 293 | 293 | //compactados/euDock.Image.js |
| 294 | -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;container.className="noprint";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){if(container.id==="euDock_0"){document.getElementById(this.id).style.top=(y-10)+'px'}else{document.getElementById(this.id).style.top=y+'px'}};this.getWidth=function(){if(document.getElementById(this.id)){return document.getElementById(this.id).width}};this.setWidth=function(w){document.getElementById(this.id).width=Math.round(w)};this.getHeight=function(){if(document.getElementById(this.id)){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'};if(container.id==="euDock_0"){var classe="eudockImagemBottom";if(i3GEO.barraDeBotoes.POSICAO==="top"){classe="eudockImagemTop"}this.container.innerHTML+="<img onLoad='"+onLoadFunc+";' id='"+this.id+"' src='"+args.image+"' style='position:absolute;visibility:hidden;' class='"+classe+"' >"}else{this.container.innerHTML+="<img onLoad='"+onLoadFunc+";' id='"+this.id+"' src='"+args.image+"' style='position:absolute;visibility:hidden;' class='noprint' >"}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.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.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"))}}; | |
| 294 | +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;container.className="noprint";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){if(container.id==="euDock_0"){document.getElementById(this.id).style.top=(y-10)+'px'}else{document.getElementById(this.id).style.top=y+'px'}};this.getWidth=function(){if(document.getElementById(this.id)){return document.getElementById(this.id).width}};this.setWidth=function(w){document.getElementById(this.id).width=Math.round(w)};this.getHeight=function(){if(document.getElementById(this.id)){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'};if(container.id==="euDock_0"){var classe="eudockImagemBottom";if(i3GEO.barraDeBotoes.POSICAO==="top"){classe="eudockImagemTop"}var alt="";if(args.titulo&&args.titulo!=""){alt=args.titulo}this.container.innerHTML+="<img title='"+alt+"' onLoad='"+onLoadFunc+";' id='"+this.id+"' src='"+args.image+"' style='position:absolute;visibility:hidden;' class='"+classe+"' >"}else{this.container.innerHTML+="<img onLoad='"+onLoadFunc+";' id='"+this.id+"' src='"+args.image+"' style='position:absolute;visibility:hidden;' class='noprint' >"}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.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.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"))}}; | |
| 295 | 295 | // |
| 296 | 296 | //compactados/mustache.js |
| 297 | 297 | (function(global,factory){if(typeof exports==="object"&&exports){factory(exports)}else if(typeof define==="function"&&define.amd){define(['exports'],factory)}else{factory(global.Mustache={})}}(this,function(mustache){var Object_toString=Object.prototype.toString;var isArray=Array.isArray||function(object){return Object_toString.call(object)==='[object Array]'};function isFunction(object){return typeof object==='function'}function escapeRegExp(string){return string.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var RegExp_test=RegExp.prototype.test;function testRegExp(re,string){return RegExp_test.call(re,string)}var nonSpaceRe=/\S/;function isWhitespace(string){return!testRegExp(nonSpaceRe,string)}var entityMap={"&":"&","<":"<",">":">",'"':'"',"'":''',"/":'/'};function escapeHtml(string){return String(string).replace(/[&<>"'\/]/g,function(s){return entityMap[s]})}var whiteRe=/\s*/;var spaceRe=/\s+/;var equalsRe=/\s*=/;var curlyRe=/\s*\}/;var tagRe=/#|\^|\/|>|\{|&|=|!/;function parseTemplate(template,tags){if(!template)return[];var sections=[];var tokens=[];var spaces=[];var hasTag=false;var nonSpace=false;function stripSpace(){if(hasTag&&!nonSpace){while(spaces.length)delete tokens[spaces.pop()]}else{spaces=[]}hasTag=false;nonSpace=false}var openingTagRe,closingTagRe,closingCurlyRe;function compileTags(tags){if(typeof tags==='string')tags=tags.split(spaceRe,2);if(!isArray(tags)||tags.length!==2)throw new Error('Invalid tags: '+tags);openingTagRe=new RegExp(escapeRegExp(tags[0])+'\\s*');closingTagRe=new RegExp('\\s*'+escapeRegExp(tags[1]));closingCurlyRe=new RegExp('\\s*'+escapeRegExp('}'+tags[1]))}compileTags(tags||mustache.tags);var scanner=new Scanner(template);var start,type,value,chr,token,openSection;while(!scanner.eos()){start=scanner.pos;value=scanner.scanUntil(openingTagRe);if(value){for(var i=0,valueLength=value.length;i<valueLength;++i){chr=value.charAt(i);if(isWhitespace(chr)){spaces.push(tokens.length)}else{nonSpace=true}tokens.push(['text',chr,start,start+1]);start+=1;if(chr==='\n')stripSpace()}}if(!scanner.scan(openingTagRe))break;hasTag=true;type=scanner.scan(tagRe)||'name';scanner.scan(whiteRe);if(type==='='){value=scanner.scanUntil(equalsRe);scanner.scan(equalsRe);scanner.scanUntil(closingTagRe)}else if(type==='{'){value=scanner.scanUntil(closingCurlyRe);scanner.scan(curlyRe);scanner.scanUntil(closingTagRe);type='&'}else{value=scanner.scanUntil(closingTagRe)}if(!scanner.scan(closingTagRe))throw new Error('Unclosed tag at '+scanner.pos);token=[type,value,start,scanner.pos];tokens.push(token);if(type==='#'||type==='^'){sections.push(token)}else if(type==='/'){openSection=sections.pop();if(!openSection)throw new Error('Unopened section "'+value+'" at '+start);if(openSection[1]!==value)throw new Error('Unclosed section "'+openSection[1]+'" at '+start)}else if(type==='name'||type==='{'||type==='&'){nonSpace=true}else if(type==='='){compileTags(value)}}openSection=sections.pop();if(openSection)throw new Error('Unclosed section "'+openSection[1]+'" at '+scanner.pos);return nestTokens(squashTokens(tokens))}function squashTokens(tokens){var squashedTokens=[];var token,lastToken;for(var i=0,numTokens=tokens.length;i<numTokens;++i){token=tokens[i];if(token){if(token[0]==='text'&&lastToken&&lastToken[0]==='text'){lastToken[1]+=token[1];lastToken[3]=token[3]}else{squashedTokens.push(token);lastToken=token}}}return squashedTokens}function nestTokens(tokens){var nestedTokens=[];var collector=nestedTokens;var sections=[];var token,section;for(var i=0,numTokens=tokens.length;i<numTokens;++i){token=tokens[i];switch(token[0]){case'#':case'^':collector.push(token);sections.push(token);collector=token[4]=[];break;case'/':section=sections.pop();section[5]=token[2];collector=sections.length>0?sections[sections.length-1][4]:nestedTokens;break;default:collector.push(token)}}return nestedTokens}function Scanner(string){this.string=string;this.tail=string;this.pos=0}Scanner.prototype.eos=function(){return this.tail===""};Scanner.prototype.scan=function(re){var match=this.tail.match(re);if(!match||match.index!==0)return'';var string=match[0];this.tail=this.tail.substring(string.length);this.pos+=string.length;return string};Scanner.prototype.scanUntil=function(re){var index=this.tail.search(re),match;switch(index){case-1:match=this.tail;this.tail="";break;case 0:match="";break;default:match=this.tail.substring(0,index);this.tail=this.tail.substring(index)}this.pos+=match.length;return match};function Context(view,parentContext){this.view=view==null?{}:view;this.cache={'.':this.view};this.parent=parentContext}Context.prototype.push=function(view){return new Context(view,this)};Context.prototype.lookup=function(name){var cache=this.cache;var value;if(name in cache){value=cache[name]}else{var context=this,names,index;while(context){if(name.indexOf('.')>0){value=context.view;names=name.split('.');index=0;while(value!=null&&index<names.length)value=value[names[index++]]}else{value=context.view[name]}if(value!=null)break;context=context.parent}cache[name]=value}if(isFunction(value))value=value.call(this.view);return value};function Writer(){this.cache={}}Writer.prototype.clearCache=function(){this.cache={}};Writer.prototype.parse=function(template,tags){var cache=this.cache;var tokens=cache[template];if(tokens==null)tokens=cache[template]=parseTemplate(template,tags);return tokens};Writer.prototype.render=function(template,view,partials){var tokens=this.parse(template);var context=(view instanceof Context)?view:new Context(view);return this.renderTokens(tokens,context,partials,template)};Writer.prototype.renderTokens=function(tokens,context,partials,originalTemplate){var buffer='';var self=this;function subRender(template){return self.render(template,context,partials)}var token,value;for(var i=0,numTokens=tokens.length;i<numTokens;++i){token=tokens[i];switch(token[0]){case'#':value=context.lookup(token[1]);if(!value)continue;if(isArray(value)){for(var j=0,valueLength=value.length;j<valueLength;++j){buffer+=this.renderTokens(token[4],context.push(value[j]),partials,originalTemplate)}}else if(typeof value==='object'||typeof value==='string'){buffer+=this.renderTokens(token[4],context.push(value),partials,originalTemplate)}else if(isFunction(value)){if(typeof originalTemplate!=='string')throw new Error('Cannot use higher-order sections without the original template');value=value.call(context.view,originalTemplate.slice(token[3],token[5]),subRender);if(value!=null)buffer+=value}else{buffer+=this.renderTokens(token[4],context,partials,originalTemplate)}break;case'^':value=context.lookup(token[1]);if(!value||(isArray(value)&&value.length===0))buffer+=this.renderTokens(token[4],context,partials,originalTemplate);break;case'>':if(!partials)continue;value=isFunction(partials)?partials(token[1]):partials[token[1]];if(value!=null)buffer+=this.renderTokens(this.parse(value),context,partials,value);break;case'&':value=context.lookup(token[1]);if(value!=null)buffer+=value;break;case'name':value=context.lookup(token[1]);if(value!=null)buffer+=mustache.escape(value);break;case'text':buffer+=token[1];break}}return buffer};mustache.name="mustache.js";mustache.version="0.8.1";mustache.tags=["{{","}}"];var defaultWriter=new Writer();mustache.clearCache=function(){return defaultWriter.clearCache()};mustache.parse=function(template,tags){return defaultWriter.parse(template,tags)};mustache.render=function(template,view,partials){return defaultWriter.render(template,view,partials)};mustache.to_html=function(template,view,partials,send){var result=mustache.render(template,view,partials);if(isFunction(send)){send(result)}else{return result}};mustache.escape=escapeHtml;mustache.Scanner=Scanner;mustache.Context=Context;mustache.Writer=Writer})); | ... | ... |
classesjs/i3geo_tudo_compacto6.js.php
| ... | ... | @@ -252,7 +252,7 @@ if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.ajuda={ATIVAJANELA:true,DIVAJ |
| 252 | 252 | if(typeof(i3GEO)==='undefined'){var i3GEO={}}YAHOO.namespace("i3GEO.janela");YAHOO.i3GEO.janela.manager=new YAHOO.widget.OverlayManager();YAHOO.namespace("janelaDoca.xp");YAHOO.janelaDoca.xp.manager=new YAHOO.widget.OverlayManager();YAHOO.i3GEO.janela.managerAguarde=new YAHOO.widget.OverlayManager();i3GEO.janela={ESTILOBD:"display:block;padding:5px 1px 5px 1px;",ESTILOAGUARDE:"normal",AGUARDEMODAL:false,ANTESCRIA:["i3GEO.janela.prepara()"],ANTESFECHA:[],TRANSICAOSUAVE:true,OPACIDADE:65,OPACIDADEAGUARDE:50,TIPS:[],ULTIMOZINDEX:5,prepara:function(){var iu=i3GEO.util;iu.escondeBox()},cria:function(wlargura,waltura,wsrc,nx,ny,texto,id,modal,classe,funcaoCabecalho,funcaoMinimiza,funcaoAposRedim,dimensionavel,icone,funcaoDuplica,transicao){if(!transicao){transicao="sim"}if(!dimensionavel){dimensionavel=true}if(!icone){icone=""}var i,wlargurA,ins,novoel,wdocaiframe,temp,fix,underlay,ifr,janela;if($i(id)){janela=YAHOO.i3GEO.janela.manager.find(id);janela.show();janela.bringToTop();return}if(navm&&!chro){this.TRANSICAOSUAVE=false}if(this.ANTESCRIA){for(i=0;i<this.ANTESCRIA.length;i++){eval(this.ANTESCRIA[i])}}if(!classe||classe==""){classe="hd"}if(!id||id===""){id="wdoca"}if(!modal||modal===""){modal=false}ifr=false;if(i3GEO.Interface&&i3GEO.Interface!=undefined&&i3GEO.Interface.ATUAL==="googleearth"){i3GEO.janela.TRANSICAOSUAVE=false;ifr=true}fix="contained";if(nx===""||nx==="center"){fix=true}if(modal===true){underlay="none"}else{underlay="shadow"}temp=navm?0:2;wlargurA=parseInt(wlargura,10)+temp+"px";ins='<div id="'+id+'_cabecalho" class="'+classe+'" >';if(i3GEO.configura!==undefined){ins+="<img id='"+id+"_imagemCabecalho' class='i3GeoAguardeJanela' style='visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde2.gif\' />"}if(icone!=""){ins+="<img class='i3GeoIconeJanela' src='"+icone+"' >"}ins+="<span style='font-size:10px;'>"+texto+"</span>";if(funcaoDuplica){ins+="<div id='"+id+"_duplicaJanela' class='container-duplica'></div>"}if(funcaoMinimiza){ins+="<div id='"+id+"_minimizaCabecalho' class='container-minimiza'></div>"}ins+='</div><div id="'+id+'_corpo" class="bd" style="'+this.ESTILOBD+'">';if(wsrc!==""){ins+='<iframe name="'+id+'i" id="'+id+'i" valign="top" style="border:0px white solid;width:100%"></iframe>'}ins+='</div>';ins+='<div class="ft"></div>';novoel=document.createElement("div");novoel.id=id;novoel.style.display="block";novoel.innerHTML=ins;if(this.TRANSICAOSUAVE&&transicao==="sim"){novoel.onmouseover=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",1)};novoel.onmouseout=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.janela.OPACIDADE/100)};YAHOO.util.Dom.setStyle(novoel,"opacity",1)}document.body.appendChild(novoel);wdocaiframe=$i(id+"i");if(wdocaiframe){temp=wdocaiframe.style;temp.height=waltura;temp.display="block";wdocaiframe.src=wsrc}else{if(waltura!=="auto"){$i(id+'_corpo').style.height=parseInt(waltura,10)+"px"}$i(id+'_corpo').style.width='100%';$i(id+'_corpo').style.overflow="auto"}if(waltura==="auto"||dimensionavel==false){janela=new YAHOO.widget.Panel(id,{iframe:ifr,modal:modal,width:wlargurA,underlay:underlay,fixedcenter:fix,constraintoviewport:true,visible:true,monitorresize:false,dragOnly:true,keylisteners:null})}else{janela=new YAHOO.widget.Panel(id,{hideMode:'offsets',iframe:ifr,underlay:underlay,modal:modal,width:wlargurA,fixedcenter:fix,constraintoviewport:true,visible:true,monitorresize:false,dragOnly:true,keylisteners:null});if(YAHOO.util.Resize){var resize=new YAHOO.util.Resize(id,{handles:['br'],autoRatio:false,minWidth:10,minHeight:10,status:false,proxy:true,ghost:false,animate:false,useShim:true});resize.on('resize',function(args){this.cfg.setProperty("height",args.height+"px");if(wdocaiframe){wdocaiframe.style.height=args.height-50+"px"}},janela,true);if(funcaoAposRedim&&funcaoAposRedim!=""){resize.on('endResize',function(args){funcaoAposRedim.call();i3GEO.janela.minimiza()},janela,true)}resize.getProxyEl().style.height="0px"}}if(nx!==""&&nx!=="center"){janela.moveTo(nx,ny+50)}YAHOO.i3GEO.janela.manager.register(janela);if(this.TRANSICAOSUAVE){janela.cfg.setProperty("effect",[{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.5}])}janela.cfg.setProperty("zIndex",[4]);janela.render();janela.bringToTop();if(navm&&id!=="i3geo_janelaMensagens"&&i3GEO.Interface&&i3GEO.Interface!=undefined&&i3GEO.Interface.ATUAL==="googleearth"){janela.moveTo(0,0)}if(ifr===true){janela.iframe.style.zIndex=4}YAHOO.util.Event.addListener($i(id+'_corpo'),"click",YAHOO.util.Event.stopPropagation);if(funcaoDuplica){$i(id+'_duplicaJanela').onclick=funcaoDuplica}if(funcaoCabecalho){$i(id+'_cabecalho').onclick=funcaoCabecalho}if(funcaoMinimiza){$i(id+"_minimizaCabecalho").onclick=funcaoMinimiza}YAHOO.util.Event.addListener(janela.close,"click",i3GEO.janela.fecha,janela,{id:id},true);temp=$i(id+"_corpo");return([janela,$i(id+"_cabecalho"),temp])},minimiza:function(id,min){var temp=$i(id+"_corpo"),n,i,m=YAHOO.i3GEO.janela.manager.find(id),c=$i(id),t="min";if(temp){if(temp.style.display==="block"){temp.style.display="none";if(m){m.hideIframe()}m.winicial=c.style.width;if(min){c.style.width=min}}else{temp.style.display="block";if(m){m.showIframe()}c.style.width=m.winicial;t="max"}}temp=$i(id+"_resizehandle");if(temp){if(temp.style.display==="none"){temp.style.display="block"}else{temp.style.display="none"}}temp=$i(id+"_c");if(temp){temp=temp.getElementsByTagName("div");n=temp.length;for(i=0;i<n;i++){if(temp[i].className==="underlay"||temp[i].className==="bd"){if(temp[i].style.display==="none"){temp[i].style.display="block"}else{temp[i].style.display="none"}}}}temp=$i(id+"_corpo");if(temp){if(temp.style.display==="none"){temp.style.display="block"}else{temp.style.display="none"}}temp=$i(id);if(temp){if(temp.style.display==="none"){temp.style.height="100%"}else{temp.style.height="10%"}}return t},fecha:function(event,args){var i,id;i3GEO.util.escondeBox();if(i3GEO.janela.ANTESFECHA){for(i=0;i<i3GEO.janela.ANTESFECHA.length;i++){eval(i3GEO.janela.ANTESFECHA[i])}}if(i3GEO.janela.id){id=i3GEO.janela.id}else{id=event.id}if(id==undefined){id=args.id}i3GEO.janela.destroi(id)},destroi:function(id){var janela=YAHOO.i3GEO.janela.manager.find(id);i3GEO.util.removeScriptTag(id+"_script");i3GEO.util.removeScriptTag(id+".dicionario_script");if(janela){YAHOO.i3GEO.janela.manager.remove(janela);janela=$i(id+"_c");janela.parentNode.removeChild(janela)}},alteraTamanho:function(w,h,id){var i;if(arguments.length===3){i=$i(id)}else{i=$i("wdoca")}if(i){i.style.width=w+"px";i.style.height=h+"px"}},abreAguarde:function(id,texto){var pos,temp,janela;if(!id||id==undefined){return}janela=YAHOO.i3GEO.janela.managerAguarde.find(id);pos=[0,0];if(i3GEO.Interface&&$i(i3GEO.Interface.IDCORPO)){pos=YAHOO.util.Dom.getXY($i(i3GEO.Interface.IDCORPO))}else if($i("contemImg")){pos=YAHOO.util.Dom.getXY($i("contemImg"))}if(i3GEO.janela.AGUARDEMODAL==true){texto+="<br><span style='color:navy;cursor:pointer;font-size:9px;' onclick='javascript:if(i3GEO.janela.AGUARDEMODAL == true){i3GEO.janela.AGUARDEMODAL = false;}else{i3GEO.janela.AGUARDEMODAL = true;}'>bloquear/desbloquear</span>"}if(!janela){janela=new YAHOO.widget.Panel(id,{width:"240px",fixedcenter:false,underlay:"none",close:true,draggable:false,modal:i3GEO.janela.AGUARDEMODAL,monitorresize:false});janela.render(document.body);YAHOO.i3GEO.janela.managerAguarde.register(janela)}if(i3GEO.janela.ESTILOAGUARDE==="normal"||i3GEO.janela.ESTILOAGUARDE==="reduzida"){janela.setBody(texto);janela.body.style.padding="5px"}if(i3GEO.janela.ESTILOAGUARDE==="normal"||i3GEO.janela.ESTILOAGUARDE==="minima"){janela.setHeader("<span><img id=aguardeGifAberto src='"+i3GEO.configura.locaplic+"/imagens/aguarde.gif' /></span> <span style=font-size:8px >"+YAHOO.i3GEO.janela.managerAguarde.overlays.length+"</span>")}if(i3GEO.parametros&&i3GEO.parametros.w>0){janela.moveTo(pos[0]+(i3GEO.parametros.w/2)-120,pos[1])}else{janela.moveTo(pos[0],pos[1])}janela.show();if(janela.header){janela.header.style.height="20px"}temp=$i(id+"_c");if(temp){temp.style.backgroundColor=""}YAHOO.util.Dom.setStyle(temp,"opacity",i3GEO.janela.OPACIDADEAGUARDE/100)},fechaAguarde:function(id){if(id!=undefined){var janela=YAHOO.i3GEO.janela.managerAguarde.find(id);if(janela){YAHOO.i3GEO.janela.managerAguarde.remove(janela);janela.destroy()}}},tempoMsg:function(texto,tempo){if(!YAHOO.util.Easing){return}var pos,janela,attributes,anim,altura=40;janela=YAHOO.i3GEO.janela.managerAguarde.find("i3geoTempoMsg");pos=[0,0];if(i3GEO.Interface&&$i(i3GEO.Interface.IDCORPO)){pos=YAHOO.util.Dom.getXY($i(i3GEO.Interface.IDCORPO))}else if($i("contemImg")){pos=YAHOO.util.Dom.getXY($i("contemImg"))}if(!janela){janela=new YAHOO.widget.Panel("i3geoTempoMsg",{width:"220px",fixedcenter:false,underlay:"none",close:false,draggable:false,modal:false,monitorresize:false,iframe:true});janela.render(document.body);YAHOO.i3GEO.janela.managerAguarde.register(janela)}$i("i3geoTempoMsg_c").style.zIndex=100000;janela.setBody(texto);altura=70;janela.body.style.padding="5px";janela.body.style.backgroundColor="yellow";if(i3GEO.Interface&&i3GEO.Interface.ATUAL!="googleearth"){janela.body.style.height="0px"}else{janela.body.style.height=altura+"px"}janela.body.style.overflow="hidden";janela.body.onclick=function(){var janela=YAHOO.i3GEO.janela.managerAguarde.find("i3geoTempoMsg");if(janela){janela.destroy()}};if(i3GEO.parametros&&i3GEO.parametros.w>0){janela.moveTo(pos[0]+(i3GEO.parametros.w/2)-120,pos[1])}else{janela.moveTo(pos[0],pos[1])}janela.show();if(i3GEO.Interface&&i3GEO.Interface.ATUAL!="googleearth"){attributes={height:{to:altura}};anim=new YAHOO.util.Anim(janela.body,attributes,.5,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){janela.body.style.overflow="auto";janela.body.style.display="block";$i("i3geoTempoMsg_c").style.zIndex=100000});anim.animate()}if(!tempo){tempo=4000}setTimeout(function(){var attributes,anim,janela=YAHOO.i3GEO.janela.managerAguarde.find("i3geoTempoMsg");if(i3GEO.Interface&&i3GEO.Interface.ATUAL!="googleearth"){if(janela){janela.body.style.overflow="hidden";attributes={height:{to:0}};anim=new YAHOO.util.Anim(janela.body,attributes,.5,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){janela.destroy()});anim.animate()}}else{janela.destroy()}},tempo)},ativaAlerta:function(){window.alert=function(texto){var textoI,janela=YAHOO.i3GEO.janela.managerAguarde.find("alerta");if(!janela){janela=new YAHOO.widget.SimpleDialog("alerta",{width:"300px",fixedcenter:true,visible:false,draggable:false,zIndex:100000,textAlign:"left",close:true,modal:false,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25},constraintoviewport:true,buttons:[{text:$trad("x74"),handler:function(){this.destroy()},isDefault:true}],icon:YAHOO.widget.SimpleDialog.ICON_WARN,text:""});YAHOO.i3GEO.janela.managerAguarde.register(janela);janela.setHeader(" ");janela.render(document.body)}textoI=janela.cfg.getProperty("text");if(textoI!=""){textoI+="<br>"}texto=textoI+texto;janela.cfg.setProperty("text",texto);janela.show()}},confirma:function(pergunta,w,resposta1,resposta2,funcao1,funcao2){var b,f1,f2,f3,janela=YAHOO.i3GEO.janela.managerAguarde.find("confirma");if(!w||w==""){w=300}if(!funcao1||funcao1==""){f1=function(){YAHOO.i3GEO.janela.managerAguarde.find("confirma").destroy();return true}}else{f1=function(){funcao1.call();YAHOO.i3GEO.janela.managerAguarde.find("confirma").destroy()}}if(!funcao2||funcao2==""){f2=function(){YAHOO.i3GEO.janela.managerAguarde.find("confirma").destroy();return false}}else{f2=function(){funcao2.call();YAHOO.i3GEO.janela.managerAguarde.find("confirma").destroy()}}f3=function(){YAHOO.i3GEO.janela.managerAguarde.find("confirma").destroy()};if(!resposta1||resposta1==""){resposta1=$trad("x58")}if(janela){janela.destroy()}b=[{text:$trad("x75"),handler:f3},{text:resposta1,handler:f1}];if(resposta2&&resposta2!=""){b.push({text:resposta2,handler:f2})}janela=new YAHOO.widget.SimpleDialog("confirma",{width:w+"px",fixedcenter:true,visible:false,draggable:false,zIndex:100000,textAlign:"left",close:false,modal:false,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25},constraintoviewport:true,buttons:b,icon:YAHOO.widget.SimpleDialog.ICON_HELP,text:"<p class=paragrafo >"+pergunta});YAHOO.i3GEO.janela.managerAguarde.register(janela);janela.setHeader(" ");janela.render(document.body);janela.show()},prompt:function(pergunta,funcaoOk,valorDefault){if($i("i3GEOjanelaprompt")){return}if(!valorDefault){valorDefault=""}var i="<br><div class='i3geoForm i3geoFormIconeEdita' ><input id='i3GEOjanelaprompt' type=text value='"+valorDefault+"' />";i3GEO.janela.confirma(pergunta+i,"","","",funcaoOk)},mensagemSimples:function(texto,cabecalho,largura,altura){var janela;if(!largura){largura=300}if(!altura){altura=300}if(!cabecalho){cabecalho=""}janela=new YAHOO.widget.SimpleDialog(YAHOO.util.Dom.generateId(),{width:parseInt(largura,10)+"px",height:parseInt(altura,10)+"px",fixedcenter:true,visible:true,draggable:true,zIndex:100000,textAlign:"left",close:true,modal:false,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25},constraintoviewport:true,text:""});YAHOO.i3GEO.janela.manager.register(janela);janela.setHeader(cabecalho);janela.render(document.body);janela.setHeader(cabecalho);janela.cfg.setProperty("text",texto);janela.bringToTop();janela.show();return janela},tip:function(){var Nid,novoel,res;Nid=YAHOO.util.Dom.generateId();novoel=document.createElement("div");novoel.className="i3GEObalaoInfo";novoel.id=Nid;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)'></div>";novoel.innerHTML="<table style='text-align:left'><tr><td style='text-align:left'>"+res+"</td></tr></table>";ist=novoel.style;ist.top=objposicaocursor.telay-9+"px";ist.left=objposicaocursor.telax-5+"px";ist.display="block";i3GEO.eventos.adicionaEventos("NAVEGAMAPA",["i3GEO.janela.excluiTips('todos')"]);return(Nid)},excluiTips:function(tipo){var ot,i;if(arguments.length===0){tipo="todos"}if(i3GEO.janela.TIPS.length>0){ot=i3GEO.janela.TIPS.length-1;if(ot>=0){do{if(tipo==='todos'){if(i3GEO.janela.TIPS[ot]){i=$i(i3GEO.janela.TIPS[ot].id);document.body.removeChild(i)}}if(tipo==='naofixos'){if($i(i3GEO.janela.TIPS[ot])){if($i(i3GEO.janela.TIPS[ot].id+"cabecatip").innerHTML!==""){document.body.removeChild($i(i3GEO.janela.TIPS[ot].id))}}}}while(ot--);if(tipo==="todos"){i3GEO.janela.TIPS=[]}}}},slider:function(funcao,inicial){var scaleFactor,bottomConstraint,topConstraint,janela,novoel,Event,slider="",bg,thumb;janela=i3GEO.janela.cria(230,200,"","","",$trad("t20"),"opacidadeG");novoel=document.createElement("div");novoel.id="slider-bg";novoel.tabindex="-1";novoel.innerHTML='<div style="cursor:default;position:absolute;top:4px" id="slider-thumb"><img src="'+i3GEO.configura.locaplic+'/imagens/thumb-n.gif"></div>';janela[2].appendChild(novoel);Event=YAHOO.util.Event;bg="slider-bg";thumb="slider-thumb";novoel.style.position="relative";novoel.style.background='url('+i3GEO.configura.locaplic+'/imagens/bg-fader.gif) 5px 0 no-repeat';novoel.style.height="28px";novoel.style.width="228px";topConstraint=0;bottomConstraint=200;scaleFactor=1;Event.onDOMReady(function(){slider=YAHOO.widget.Slider.getHorizSlider(bg,thumb,topConstraint,bottomConstraint,20);slider.setValue(parseInt(inicial,10));slider.getRealValue=function(){return Math.round(this.getValue()*scaleFactor)};slider.subscribe("slideEnd",function(offsetFromStart){var actualValue=slider.getRealValue();eval(funcao+"("+actualValue+")")})});Event.on("putval","click",function(e){slider.setValue(100,false)})},comboCabecalhoTemas:function(idDiv,idCombo,ferramenta,tipo,onButtonClick,temaSel){var temp=$i(idDiv);if(!temaSel){temaSel=""}if(temaSel==""&&i3GEOF[ferramenta]&&i3GEOF[ferramenta].tema&&i3GEOF[ferramenta].tema!=""){temaSel=i3GEOF[ferramenta].tema}if(temp){i3GEO.util.comboTemas(temp.id+"Sel",function(retorno){var tema,container=$i(idDiv),botao;container.innerHTML=retorno.dados;botao=new YAHOO.widget.Button(idCombo,{type:"menu",menu:idCombo+"select"});if(temaSel!=""){tema=i3GEO.arvoreDeCamadas.pegaTema(temaSel);if(tema&&tema!=undefined){botao.set("label","<span class='cabecalhoTemas' >"+tema.tema+"</span> ")}else{botao.set("label","<span class='cabecalhoTemas' >"+$trad("x92")+"</span> ")}}else{botao.set("label","<span class='cabecalhoTemas' >"+$trad("x92")+"</span> ")}if(!onButtonClick){onButtonClick=function(p_sType,p_aArgs){var oMenuItem=p_aArgs[1];if(oMenuItem){i3GEO.mapa.ativaTema(oMenuItem.value);if(oMenuItem.value===""){i3GEO.temaAtivo="";botao.set("label","<span class='cabecalhoTemas' >"+$trad("x92")+"</span> ")}else{botao.set("label","<span class='cabecalhoTemas' >"+oMenuItem.cfg.getProperty("text")+"</span> ")}if(i3GEOF[ferramenta]){i3GEOF[ferramenta].tema=oMenuItem.value;if($i("i3GEOF."+ferramenta+"_corpo")){$i("i3GEOF."+ferramenta+"_corpo").innerHTML="";eval("i3GEOF."+ferramenta+".inicia('i3GEOF."+ferramenta+"_corpo');")}}}};if(i3GEO.eventos.ATUALIZAARVORECAMADAS.length>20){i3GEO.eventos.ATUALIZAARVORECAMADAS=[]}i3GEO.eventos.adicionaEventos("ATUALIZAARVORECAMADAS",["i3GEO.janela.comboCabecalhoTemas('"+idDiv+"','"+idCombo+"','"+ferramenta+"','"+tipo+"')"])}botao.getMenu().subscribe("click",onButtonClick,botao)},temp.id,"",false,tipo,"",true,true)}}}; |
| 253 | 253 | // |
| 254 | 254 | //compactados/classe_guias_compacto.js |
| 255 | -if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.guias={ATUAL:"temas",ALTURACORPOGUIAS:0,CONFIGURA:{"temas":{icone:"imagens/layer.png",titulo:$trad("g4a"),id:"guia1",idconteudo:"guia1obj",click:""},"adiciona":{icone:"imagens/catalogo.png",titulo:$trad("g1a"),id:"guia2",idconteudo:"guia2obj",click:function(){var ondeArvore;i3GEO.guias.mostra("adiciona");if(!$i("arvoreAdicionaTema")){try{ondeArvore=objmapa.guiaMenu+"obj"}catch(e){ondeArvore="guia2obj"}}else{ondeArvore="arvoreAdicionaTema"}if(document.getElementById("outrasOpcoesAdiciona")){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde="outrasOpcoesAdiciona";i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore=false}i3GEO.arvoreDeTemas.cria(i3GEO.configura.sid,i3GEO.configura.locaplic,ondeArvore)}},"legenda":{icone:"imagens/legenda.png",titulo:$trad("g3"),id:"guia4",idconteudo:"guia4obj",click:function(){i3GEO.guias.mostra("legenda");i3GEO.util.defineValor(i3GEO.mapa.legendaHTML.ID,"innerHTML","");i3GEO.mapa.legendaHTML.cria("guia4obj")}},"mapas":{icone:"imagens/gisicons/show-links.png",titulo:"Links",id:"guia5",idconteudo:"guia5obj",mostraLink:function(id,url){$i("i3geoMapasLink_"+id).innerHTML="<a href='"+url+"' target=_blank >"+url+"</a>"},click:function(onde){if(!onde){onde=i3GEO.guias.CONFIGURA.mapas.idconteudo}var pegaMapas=function(retorno){var ins,mapa,ig1lt,ig1,nome,lkd,link,temp,combo,urlinterface;ins="<br><div id='banners' style='overflow:auto;text-align:center'>"+"<a href='"+i3GEO.configura.locaplic+"/admin/html/mapas.html' target=_blank >"+$trad("x89")+"</a><br><br>";mapa=retorno.data.mapas;ig1lt=mapa.length;ig1=0;urlinterface=window.location.origin+window.location.pathname;if(ig1lt>0){do{temp=mapa[ig1];nome=temp.NOME;if(temp.PUBLICADO){if(temp.PUBLICADO.toLowerCase()==="nao"){nome="<s>"+nome+"</s>"}}lkd=temp.LINK;link=i3GEO.configura.locaplic+"/ms_criamapa.php?temasa="+temp.TEMAS+"&layers="+temp.LIGADOS;if(temp.EXTENSAO!==""){link+="&mapext="+temp.EXTENSAO}if(temp.OUTROS!==""){link+="&"+temp.OUTROS}if(lkd!==""){link=lkd}ins+="<div style='width:170px;background-color:white;padding:5px;margin:auto;border: 1px solid #F0F0F0;border-radius: 5px;box-shadow: 1px 1px 1px 1px #D3D3D3;' >";if(temp.IMAGEM&&temp.IMAGEM!=""){ins+="<div style=text-align:center ><a href='"+link+"' style=text-align:center;text-decoration:none; >"+"<img src='"+temp.IMAGEM+"'></a></div><br>"}if(temp.CONTEMMAPFILE=="nao"){ins+="<div><p class=paragrafo style=text-align:center;cursor:pointer >"+"<a href='"+link+"' style=text-align:center;text-decoration:none; >"+nome+" ("+temp.ID_MAPA+")</a></p></div>"}else{combo="<select style='width:170px;' onchange='i3GEO.guias.CONFIGURA.mapas.mostraLink("+ig1+",this.value)'>"+"<option value=''>"+$trad("x103")+":</option>"+"<option value='"+link+"'>Como foi salvo</option>"+"<option value='"+link+"&interface="+urlinterface+"'>Com a interface atual</option>"+"<option value='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?restauramapa="+temp.ID_MAPA+"&fundo=e_wsm'>Openlayers com todos os botoes</option>"+"<option value='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?restauramapa="+temp.ID_MAPA+"&fundo=est_wms'>Sem o fundo</option>"+"<option value='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?restauramapa="+temp.ID_MAPA+"&fundo=e_wsm&botoes=legenda pan zoombox zoomtot zoomin zoomout distancia area identifica'>Com booes principais</option>"+"<option value='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?restauramapa="+temp.ID_MAPA+"&botoes=legenda pan zoombox zoomtot zoomin zoomout'>Botoes de navegacao</option>"+"</select>";ins+="<div>"+"<p class=paragrafo style=text-align:center;cursor:pointer >"+"<img style=text-align:center src='"+i3GEO.configura.locaplic+"/ferramentas/salvamapa/geraminiatura.php?w=100&h=67&restauramapa="+temp.ID_MAPA+"'><br><br>"+"<a href='"+link+"' style=text-align:center;text-decoration:none; >"+nome+" ("+temp.ID_MAPA+")</a>"+"<br>"+combo+"<br><div style='cursor:pointer;' id='i3geoMapasLink_"+ig1+"' ></div>"+"</p></div>"}ins+="</div><br>";ig1++}while(ig1<ig1lt)}$i(onde).innerHTML=ins+"</div>"};if($i(i3GEO.guias.CONFIGURA.mapas.idconteudo)){$i(i3GEO.guias.CONFIGURA.mapas.idconteudo).innerHTML="Aguarde..."}i3GEO.guias.mostra("mapas");i3GEO.php.pegaMapas(pegaMapas);i3GEO.navega.removeCookieExtensao()}}},ORDEM:"",TIPO:"guia",IDGUIAS:"guiasYUI",cria:function(onde){var nguiasreal=0,guiaconteudo,id,guia,g,re,ng,tituloguia,i,ins,altura,temp,CONFIGURA=i3GEO.guias.CONFIGURA,guias=i3GEO.util.listaChaves(CONFIGURA),nguias=guias.length;if(i3GEO.guias.TIPO==="movel"){i3GEO.guias.IDGUIAS="i3GEOguiaMovelConteudo";for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo)){i3GEO.guias.guiaMovel.config.guias.ids.push(i3GEO.guias.CONFIGURA[guias[ng]].id);i3GEO.guias.guiaMovel.config.guias.idsconteudos.push(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo);if(i3GEO.guias.CONFIGURA[guias[ng]].icone!==undefined){i3GEO.guias.guiaMovel.config.guias.icones.push(i3GEO.guias.CONFIGURA[guias[ng]].icone)}else{i3GEO.guias.guiaMovel.config.guias.icones.push("imagens/gisicons/open1.png")}i3GEO.guias.guiaMovel.config.guias.titulos.push(i3GEO.guias.CONFIGURA[guias[ng]].titulo);i3GEO.guias.guiaMovel.config.guias.chaves.push(guias[ng])}}return}try{for(g=0;g<12;g++){tituloguia="";if($i("guia"+g)){tituloguia=$i("guia"+g).innerHTML;re=new RegExp(" ","g");tituloguia=tituloguia.replace(re,'');for(ng=0;ng<nguias;ng++){if(CONFIGURA[guias[ng]].id==="guia"+g){tituloguia=""}}if(tituloguia!==""){i3GEO.guias.CONFIGURA["guia"+g]=[];i3GEO.guias.CONFIGURA["guia"+g].titulo=tituloguia;i3GEO.guias.CONFIGURA["guia"+g].id="guia"+g;i3GEO.guias.CONFIGURA["guia"+g].idconteudo="guia"+g+"obj";if($i('guia'+g).onclick){i3GEO.guias.CONFIGURA["guia"+g].click=$i("guia"+g).onclick}}}}if(i3GEO.guias.ORDEM===""){guias=i3GEO.util.listaChaves(CONFIGURA)}else{guias=i3GEO.guias.ORDEM}nguias=guias.length;if(arguments.length===0){for(ng=0;ng<nguias;ng++){if(i3GEO.guias.CONFIGURA[guias[ng]]){i=$i(i3GEO.guias.CONFIGURA[guias[ng]].id);if(i){onde=i.parentNode}}}}else{onde=$i(onde)}if(!onde){return}onde.id=i3GEO.guias.IDGUIAS;onde.className="yui-navset";if(i3GEO.guias.TIPO==="guia"||i3GEO.guias.TIPO==="tablet"){ins='<ul class="yui-nav" style="border-width:0pt 0pt 0px;border-color:rgb(240,240,240);border-bottom-color:white;text-align:center;">';for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){if($i(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo)){ins+='<li><a alt="" title=""><em><div id="'+i3GEO.guias.CONFIGURA[guias[ng]].id+'" >'+i3GEO.guias.CONFIGURA[guias[ng]].titulo+'</div></em></a></li>'}}}ins+="</ul>";onde.innerHTML=ins}if(i3GEO.guias.TIPO==="sanfona"){ins='<dl id=sanfona'+onde.id+' class="accordion" >';if(i3GEO.guias.ORDEM===""){for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){nguiasreal++}}}else{nguiasreal=i3GEO.guias.ORDEM.length}if(navn){altura=i3GEO.parametros.h-(nguiasreal*25)-1}else{altura=i3GEO.parametros.h-(nguiasreal*23)+1}for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){id=i3GEO.guias.CONFIGURA[guias[ng]].idconteudo;temp=$i(id);if(temp){guiaconteudo=temp.innerHTML;temp.innerHTML="";temp.style.display="none";temp.id="";ins+='<dt style=height:17px id="'+i3GEO.guias.CONFIGURA[guias[ng]].id+'" >'+'<table class=accordiontable ><tr><td width="98%" >'+i3GEO.guias.CONFIGURA[guias[ng]].titulo+'</td><td width="2%" ><img id="" src="'+i3GEO.configura.locaplic+'/imagens/branco.gif" style="width:10px;" /></td></tr></table>'+'<dd clas=close >'+'<div class=bd >'+'<div id="'+id+'" >'+guiaconteudo+'</div></div></dd>'}}}ins+="</dl>";onde.innerHTML=ins;onde.style.height=altura+"px";YAHOO.lutsr.accordion.init(true,5,false,"sanfona"+onde.id,altura);i3GEO.guias.ALTURACORPOGUIAS=altura}for(g=0;g<nguias;g++){guia=i3GEO.guias.CONFIGURA[guias[g]];id=guia.id;guiaconteudo=$i(id);if(guiaconteudo){if(guia.click===""||guia.click===undefined){eval('$i("'+id+'").onclick = function(event){i3GEO.guias.mostra("'+guias[g]+'");}')}else{guiaconteudo.onclick=guia.click}YAHOO.util.Event.addListener($i(id),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addListener($i(id),"click",YAHOO.util.Event.stopPropagation);YAHOO.util.Event.addFocusListener($i(id),YAHOO.util.Event.preventDefault);guiaconteudo.onmouseover=function(){};guiaconteudo.onmouseout=function(){};temp=$i(guia.idconteudo);if(temp){temp.style.overflow="auto";if(i3GEO.guias.TIPO==="guia"){if(i3GEO.guias.ALTURACORPOGUIAS===0){temp.style.height=i3GEO.parametros.h+"px"}else{temp.style.height=i3GEO.guias.ALTURACORPOGUIAS+"px"}}else{temp.style.height=onde.style.height}}}}}catch(e){}if(i3GEO.guias.TIPO!=="tablet"){i3GEO.guias.mostra(i3GEO.guias.ATUAL);i3GEO.guias.ativa(i3GEO.guias.ATUAL)}else{i3GEO.guias.escondeGuias()}},ajustaAltura:function(){var guia,guias,nguias,temp,temps,n,i,g,altura=0;if(i3GEO.guias.ALTURACORPOGUIAS!=0){altura=i3GEO.guias.ALTURACORPOGUIAS}guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){guia=$i(this.CONFIGURA[guias[g]].idconteudo);if(guia){guia.style.overflow="auto";if(this.TIPO==="guia"){if(altura===0){guia.style.height=i3GEO.parametros.h+"px"}else{guia.style.height=altura+"px"}}if(this.TIPO==="sanfona"){guia.style.height=altura+"px";temp=$i("guiasYUI");if(temp){temp.style.height=altura+"px";temps=temp.getElementsByTagName("dd");n=temps.length;for(i=0;i<n;i++){if(temps[i].style.visibility=="visible"){temps[i].style.height=altura+"px"}}}YAHOO.lutsr.accordion.properties.altura=altura}}}},escondeGuias:function(){var guias,nguias,g,temp,attributes,anim;guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){temp=$i(this.CONFIGURA[guias[g]].idconteudo);if(temp){if(i3GEO.guias.TIPO==="tablet"&&temp.style.display==="block"){temp.style.overflow="hidden";attributes={height:{to:0},id:this.CONFIGURA[guias[g]].idconteudo};anim=new YAHOO.util.Anim(temp,attributes,1,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){var temp=$i(anim.attributes.id);temp.style.overflow="auto";temp.style.display="none";if(i3GEO.barraDeBotoes.BARRAS[0]){i3GEO.barraDeBotoes.BARRAS[0].show()}});anim.animate()}else{temp.style.display="none"}}if($i(this.CONFIGURA[guias[g]].id)&&i3GEO.guias.TIPO!=="movel"){$i(this.CONFIGURA[guias[g]].id).parentNode.parentNode.style.background="transparent"}}},mostra:function(guia){var guias,nguias,g,temp,attributes,anim;guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;if(!$i(i3GEO.guias.CONFIGURA[guia].id)){return}if(!$i(i3GEO.guias.CONFIGURA[guia].idconteudo)){return}if($i(i3GEO.guias.CONFIGURA[guia].idconteudo).style.display==="block"&&i3GEO.guias.TIPO==="tablet"){i3GEO.guias.escondeGuias();return}if(i3GEO.guias.TIPO!=="movel"){for(g=0;g<nguias;g++){if($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo)){$i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo).style.display="none"}if($i(i3GEO.guias.CONFIGURA[guias[g]].id)){$i(i3GEO.guias.CONFIGURA[guias[g]].id).parentNode.parentNode.style.background="transparent"}}}if(i3GEO.guias.CONFIGURA.toString().search(guia)<0){for(g=0;g<nguias;g++){if(i3GEO.guias.CONFIGURA[guias[g]].id===guia){guia=guias[g]}}}if(i3GEO.guias.CONFIGURA[guia]){temp=$i(i3GEO.guias.CONFIGURA[guia].idconteudo);if(temp){if(i3GEO.guias.TIPO==="tablet"){if(i3GEO.barraDeBotoes.BARRAS[0]){i3GEO.barraDeBotoes.BARRAS[0].hide()}temp.style.left=(i3GEO.parametros.w/2)-150+"px";temp.style.height=0;temp.style.display="block";temp.style.zIndex=9000;temp.style.overflow="hidden";attributes={height:{to:i3GEO.parametros.h-10}};anim=new YAHOO.util.Anim(temp,attributes,1,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){temp.style.overflow="auto";temp.style.display="block"});if(DetectaMobile("DetectAndroid")===true){temp.style.height="";temp.style.overflow="auto"}else{anim.animate()}}else{temp.style.display="block"}if(i3GEO.guias.TIPO!=="movel"){$i(i3GEO.guias.CONFIGURA[guia].id).parentNode.parentNode.style.backgroundColor="white"}i3GEO.guias.ATUAL=guia}}},ativa:function(guia){try{i3GEO.guias.ATUAL=guia;if(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].click!==""){i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].click.call()}}catch(e){}},libera:function(){if(!$i("conteudojanelaguias")){var i,w,pos,a,l,temp;$i(i3GEO.Interface.IDCORPO).style.left="0px";if($i(this.IDGUIAS)){$i(this.IDGUIAS).style.display="none"}i=$i("contemFerramentas");w=parseInt($i("contemFerramentas").style.width,10);$i("contemFerramentas").style.width="0px";pos="px";a=i3GEO.parametros.h;l=i3GEO.parametros.w+w;i3GEO.parametros.h=a;i3GEO.parametros.w=l;i=$i(i3GEO.Interface.IDCORPO);if(i){i.style.width=l+pos;i.style.height=a+pos}i=$i(i3GEO.Interface.IDMAPA);if(i){i.style.width=l+pos;i.style.height=a+pos;i.style.clip='rect('+0+" "+(l*1+2)+" "+(a*1+2)+" "+0+')'}i=$i("mst");if(i){i.style.width=l+1+pos}i3GEO.mapa.ajustaPosicao();temp=function(retorno){var novoel,temp,i,g,guias,nguias,janela;novoel=document.createElement("div");novoel.id="janelaguias";novoel.style.display="block";novoel.innerHTML='<div class="hd">Guias <div onclick ="i3GEO.janela.minimiza(conteudojanelaguias)" id="janelaguias_minimizaCabecalho" class="container-minimiza" ></div></div><div class="bd" id="conteudojanelaguias_corpo" style=padding:0px ></div>';temp=$i("i3geo")?$i("i3geo").appendChild(novoel):document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("janelaguias",{width:"270px",fixedcenter:true,constraintoviewport:false,underlay:"none",close:false,visible:true,draggable:true,modal:false,iframe:true});YAHOO.i3GEO.janela.manager.register(janela);janela.render();janela.show();janela.cfg.setProperty("y",0);i=$i(i3GEO.guias.IDGUIAS);$i("conteudojanelaguias_corpo").appendChild(i);i.style.borderLeft="1px solid black";i.style.borderRight="1px solid black";guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){if($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo)){$i("conteudojanelaguias_corpo").appendChild($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo));temp=$i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo).style;temp.background="white";temp.border="1px solid black";temp.borderTop="0px solid black";temp.width="270px";temp.left="-1px";temp.height=i3GEO.parametros.h-90+"px"}}i3GEO.atualiza("");i.style.display="block";i.style.left="-1px";i.style.width="270px"};i3GEO.php.mudatamanho(temp,a,l)}else{janela=YAHOO.i3GEO.janela.manager.find(id);janela.show();janela.bringToTop()}},mostraGuiaFerramenta:function(guia,namespace){var g,Dom=YAHOO.util.Dom;if(!namespace){namespace="guia"}for(g=0;g<12;g++){Dom.setStyle(namespace+g+"obj","display","none")}Dom.setStyle(guia+"obj","display","block")},ajustaGuiaFerramenta:function(idjanela,namespace){var c=$i(idjanela+"_corpo"),h,g,temp;c.style.overflow="unset";c.style.overflow="none";h=c.style.height;h=parseInt(h,10)-40+"px";for(g=0;g<12;g++){temp=$i(namespace+"guia"+g+"obj");if(temp){temp.style.height=h;temp.style.width="100%";temp.style.overflow="auto"}}},guiaMovel:{ABERTA:false,config:{larguraPuxador:50,alturaPuxador:319,alturaGuiaMovel:0,larguraGuiaMovel:320,topGuiaMovel:0,guias:{icones:[],ids:[],idsconteudos:[],titulos:[],chaves:[]},posicao:["c","r"]},left:0,inicia:function(){var posMapa=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA)),centroY=posMapa[1]+(i3GEO.parametros.h/2),config=i3GEO.guias.guiaMovel.config,temp;if(i3GEO.guias.ALTURACORPOGUIAS===0&&config.alturaGuiaMovel===0){i3GEO.guias.guiaMovel.config.alturaGuiaMovel=i3GEO.parametros.h}else{i3GEO.guias.guiaMovel.config.alturaGuiaMovel=i3GEO.guias.ALTURACORPOGUIAS}config=i3GEO.guias.guiaMovel.config;temp=$i("i3GEOguiaMovel").style;if(config.posicao[1]==="r"){temp.left=(posMapa[0]+i3GEO.parametros.w-config.larguraPuxador)+"px";i3GEO.guias.guiaMovel.left=parseInt(temp.left,10)+"px"}if(config.posicao[1]==="l"){temp.left=posMapa[0]+"px";i3GEO.guias.guiaMovel.left=parseInt(temp.left,10)+"px"}if(config.topGuiaMovel===0){temp.top=(centroY-((config.alturaGuiaMovel-42)/2))+"px"}else{temp.top=config.topGuiaMovel+"px"}temp.width=config.larguraPuxador+"px";temp.height=config.alturaGuiaMovel+"px";temp=$i("i3GEOguiaMovelMolde").style;temp.top="0px";if(config.posicao[1]==="r"){temp.left=config.larguraPuxador+"px"}if(config.posicao[1]==="l"){temp.left="1px"}temp.height=config.alturaGuiaMovel+"px";temp.backgroundColor="white";if($i("i3GEOguiaMovelPuxador")){temp=$i("i3GEOguiaMovelPuxador").style;temp.top=((config.alturaGuiaMovel-config.alturaPuxador)/2)+"px";temp.left="0px";temp.width=config.larguraPuxador+"px";temp.height=config.alturaPuxador+"px"}temp=$i("i3GEOguiaMovelIcones");if(temp){temp=temp.style;temp.left="1px";temp.top="1px";temp.width=(config.larguraGuiaMovel-1)+"px";temp.height="35px";if(navm){temp.height="37px"}temp.zIndex=5;temp.paddingTop="2px";YAHOO.util.Dom.setStyle("i3GEOguiaMovelIcones","opacity",0.60)}temp=$i("i3GEOguiaMovelConteudo").style;temp.left="1px";if(temp.top==""){temp.top="38px"}temp.height=(config.alturaGuiaMovel-39)+"px";if(navm){temp.width=(config.larguraGuiaMovel-1)+"px"}else{temp.width=(config.larguraGuiaMovel-5)+"px"}temp.paddingLeft="4px";YAHOO.util.Dom.setStyle("i3GEOguiaMovelConteudo","opacity",0.70);YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.10);$i("i3GEOguiaMovelMolde").onmouseover=function(){if($i("i3GEOguiaMovelConteudo").style.display==="block"){YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.9)}if($i("i3GEOguiaMovelIcones")&&$i("i3GEOguiaMovelIcones").innerHTML===""){i3GEO.guias.guiaMovel.mostraIcones()}};$i("i3GEOguiaMovelMolde").onmouseout=function(){YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.90);if($i("i3GEOguiaMovelIcones")&&$i("i3GEOguiaMovelIcones").innerHTML===""){i3GEO.guias.guiaMovel.mostraIcones()}};if(i3GEO.guias.guiaMovel.ABERTA===true){i3GEO.guias.guiaMovel.ativa(i3GEO.guias.ATUAL)}i3GEO.guias.guiaMovel.mostraIcones();temp=$i("i3GEOguiaMovel");temp.style.visibility="visible";temp.style.height=parseInt(temp.style.height)-20+"px";i3GEO.util.aparece("i3GEOguiaMovel",300,100)},mostraIcones:function(){if($i("i3GEOguiaMovelIcones")&&$i("i3GEOguiaMovelIcones").innerHTML!=""){return}var n=i3GEO.guias.guiaMovel.config.guias.icones.length,i,temp=i3GEO.guias.guiaMovel.config.guias,ins="",ico;if(i3GEO.guias.ORDEM!==""){temp.chaves=i3GEO.guias.ORDEM}for(i=0;i<n;i++){if(temp.chaves[i]){ico="<button title='"+temp.titulos[i]+"' onmouseout='javascript:this.className = \"iconeGuiaMovel iconeGuiaMovelMouseOut\"' onmouseover='javascript:this.className = \"iconeGuiaMovel iconeGuiaMovelMouseOver\"' onclick='i3GEO.guias.guiaMovel.ativa(\""+temp.chaves[i]+"\")' class=iconeGuiaMovel ><img id='"+temp.ids[i]+"' src='"+i3GEO.configura.locaplic+"/"+temp.icones[i]+"' style='cursor:pointer;' /></button>";if(!$i("iconeGuia_"+temp.chaves[i])){ins+=ico}else{$i("iconeGuia_"+temp.chaves[i]).innerHTML=ico}}}if($i("i3GEOguiaMovelIcones")){$i("i3GEOguiaMovelIcones").innerHTML=ins}ins="1.2px";if(navn&&chro===false){ins="0px"}for(i=0;i<n;i++){ico=$i(temp.ids[i]);if(ico){YAHOO.util.Dom.setStyle(ico,"padding",ins)}}i3GEO.guias.guiaMovel.desativaIcones();if(i3GEO.guias.ATUAL!=""){ico=$i(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].id);if(ico){YAHOO.util.Dom.setStyle(ico,"opacity",0.9);ico.parentNode.style.boxShadow="none"}}},desativaIcones:function(o){var ims,n,i;if(!o){o=0.9}ims=$i("i3GEOguiaMovelIcones");if(ims){ims=ims.getElementsByTagName("button");n=ims.length;for(i=0;i<n;i++){YAHOO.util.Dom.setStyle(ims[i],"opacity",o);ims[i].style.boxShadow="none"}}n=i3GEO.guias.guiaMovel.config.guias.icones.length;temp=i3GEO.guias.guiaMovel.config.guias;for(i=0;i<n;i++){if($i("iconeGuia_"+temp.chaves[i])){ims=$i("iconeGuia_"+temp.chaves[i]).getElementsByTagName("button");if(ims.length>0){ims[0].style.backgroundColor="white";ims[0].style.boxShadow="none";ims[0].style.margin="0px";ims[0].style.border="1px solid gray";if(i3GEO.guias.guiaMovel.config.posicao[1]==="l"){ims[0].style.borderLeft="2px solid white"}else{ims[0].style.borderRight="2px solid white"}YAHOO.util.Dom.setStyle(ims[0],"opacity",o);ims[0].blur()}}}},ativa:function(chave){if(chave===""){i3GEO.guias.guiaMovel.desativaIcones();return}i3GEO.guias.escondeGuias();i3GEO.guias.guiaMovel.desativaIcones(0.5);if(i3GEO.guias.ATUAL===chave&&$i("i3GEOguiaMovelMolde").style.display==="block"){i3GEO.guias.ATUAL="";i3GEO.guias.guiaMovel.desativaIcones(0.9);i3GEO.guias.guiaMovel.abreFecha("fecha")}else{i3GEO.guias.ATUAL=chave;i3GEO.guias.guiaMovel.abreFecha("abre");if(i3GEO.guias.CONFIGURA[chave].click){i3GEO.guias.CONFIGURA[chave].click.call()}i3GEO.guias.mostra(chave);var ico=$i(i3GEO.guias.CONFIGURA[chave].id);if(ico){ico.parentNode.blur();YAHOO.util.Dom.setStyle(ico.parentNode,"opacity",0.9);ico.parentNode.style.boxShadow="none";if($i("iconeGuia_"+chave)){if(i3GEO.guias.guiaMovel.config.posicao[1]==="l"){ico.parentNode.style.borderLeft="2px solid white"}else{ico.parentNode.style.borderRight="2px solid white"}}}}},reposiciona:function(){var temp=$i("i3GEOguiaMovel").style.top;i3GEO.guias.guiaMovel.config.alturaGuiaMovel=0;i3GEO.guias.ALTURACORPOGUIAS=0;if($i("i3GEOguiaMovelIcones")){$i("i3GEOguiaMovelIcones").style.display="none"}$i("i3GEOguiaMovelConteudo").style.display="none";$i("i3GEOguiaMovelMolde").style.display="none";i3GEO.guias.escondeGuias();i3GEO.guias.guiaMovel.inicia();$i("i3GEOguiaMovel").style.top=temp},abreFecha:function(forca){var molde=$i("i3GEOguiaMovelMolde"),guia=$i("i3GEOguiaMovel"),attributes,anim,anim1,anim2,temp;if(!forca){if(molde.style.display==="block"){forca="fecha"}else{temp=i3GEO.guias.ATUAL;i3GEO.guias.ATUAL="";i3GEO.guias.guiaMovel.ativa(temp);return}}if(forca==="fecha"){if($i("i3GEOguiaMovelIcones")){$i("i3GEOguiaMovelIcones").style.display="none"}$i("i3GEOguiaMovelConteudo").style.display="none";attributes={left:{to:parseInt(i3GEO.guias.guiaMovel.left,10)},id:"i3GEOguiaMovel"};anim=new YAHOO.util.Anim(guia,attributes,1,YAHOO.util.Easing.easeNone);attributes={width:{to:0},id:"i3GEOguiaMovelMolde"};anim1=new YAHOO.util.Anim(molde,attributes,1,YAHOO.util.Easing.easeNone);anim.duration=0.5;anim1.duration=0.5;anim1.onComplete.subscribe(function(){molde.style.display="none"});if(i3GEO.guias.guiaMovel.config.posicao[1]==="l"&&$i("i3GEOguiaMovelIconesPuxador")){attributes={left:{to:0}};anim2=new YAHOO.util.Anim("i3GEOguiaMovelIconesPuxador",attributes,1,YAHOO.util.Easing.easeNone);anim2.duration=0.5;anim2.animate()}anim.animate();anim1.animate()}else if(molde.style.display!="block"){molde.style.display="block";if(i3GEO.guias.guiaMovel.config.posicao[1]==="l"){attributes={rigth:{to:(parseInt(guia.style.left,10)-i3GEO.guias.guiaMovel.config.larguraGuiaMovel)*-1},id:"i3GEOguiaMovel"}}else{attributes={left:{to:parseInt(guia.style.left,10)-i3GEO.guias.guiaMovel.config.larguraGuiaMovel},id:"i3GEOguiaMovel"}}anim=new YAHOO.util.Anim(guia,attributes,1,YAHOO.util.Easing.easeNone);attributes={width:{to:i3GEO.guias.guiaMovel.config.larguraGuiaMovel},id:"i3GEOguiaMovelMolde"};anim1=new YAHOO.util.Anim(molde,attributes,1,YAHOO.util.Easing.easeNone);anim.duration=0.5;anim1.duration=0.5;anim1.onComplete.subscribe(function(){if($i("i3GEOguiaMovelIcones")){$i("i3GEOguiaMovelIcones").style.display="block"}$i("i3GEOguiaMovelConteudo").style.display="block";YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.9)});if(i3GEO.guias.guiaMovel.config.posicao[1]==="l"&&$i("i3GEOguiaMovelIconesPuxador")){attributes={left:{to:i3GEO.guias.guiaMovel.config.larguraGuiaMovel}};anim2=new YAHOO.util.Anim("i3GEOguiaMovelIconesPuxador",attributes,1,YAHOO.util.Easing.easeNone);anim2.duration=0.5;anim2.animate()}anim.animate();anim1.animate()}}}}; | |
| 255 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.guias={ATUAL:"temas",ALTURACORPOGUIAS:0,CONFIGURA:{"temas":{icone:"imagens/layer.png",titulo:$trad("g4a"),id:"guia1",idconteudo:"guia1obj",click:""},"adiciona":{icone:"imagens/catalogo.png",titulo:$trad("g1a"),id:"guia2",idconteudo:"guia2obj",click:function(){var ondeArvore;i3GEO.guias.mostra("adiciona");if(!$i("arvoreAdicionaTema")){try{ondeArvore=objmapa.guiaMenu+"obj"}catch(e){ondeArvore="guia2obj"}}else{ondeArvore="arvoreAdicionaTema"}if(document.getElementById("outrasOpcoesAdiciona")){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde="outrasOpcoesAdiciona";i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore=false}i3GEO.arvoreDeTemas.cria(i3GEO.configura.sid,i3GEO.configura.locaplic,ondeArvore)}},"legenda":{icone:"imagens/legenda.png",titulo:$trad("g3"),id:"guia4",idconteudo:"guia4obj",click:function(){i3GEO.guias.mostra("legenda");i3GEO.util.defineValor(i3GEO.mapa.legendaHTML.ID,"innerHTML","");i3GEO.mapa.legendaHTML.cria("guia4obj")}},"mapas":{icone:"imagens/gisicons/show-links.png",titulo:"Links",id:"guia5",idconteudo:"guia5obj",mostraLink:function(id,url){$i("i3geoMapasLink_"+id).innerHTML="<a href='"+url+"' target=_blank >"+url+"</a>"},click:function(onde){if(!onde){onde=i3GEO.guias.CONFIGURA.mapas.idconteudo}var pegaMapas=function(retorno){var ins,mapa,ig1lt,ig1,nome,lkd,link,temp,combo,urlinterface;ins="<br><div id='banners' style='overflow:auto;text-align:center'>"+"<a href='"+i3GEO.configura.locaplic+"/admin/html/mapas.html' target=_blank >"+$trad("x89")+"</a><br><br>";mapa=retorno.data.mapas;ig1lt=mapa.length;ig1=0;urlinterface=window.location.origin+window.location.pathname;if(ig1lt>0){do{temp=mapa[ig1];nome=temp.NOME;if(temp.PUBLICADO){if(temp.PUBLICADO.toLowerCase()==="nao"){nome="<s>"+nome+"</s>"}}lkd=temp.LINK;link=i3GEO.configura.locaplic+"/ms_criamapa.php?temasa="+temp.TEMAS+"&layers="+temp.LIGADOS;if(temp.EXTENSAO!==""){link+="&mapext="+temp.EXTENSAO}if(temp.OUTROS!==""){link+="&"+temp.OUTROS}if(lkd!==""){link=lkd}ins+="<div style='width:170px;background-color:white;padding:5px;margin:auto;border: 1px solid #F0F0F0;border-radius: 5px;box-shadow: 1px 1px 1px 1px #D3D3D3;' >";if(temp.IMAGEM&&temp.IMAGEM!=""){ins+="<div style=text-align:center ><a href='"+link+"' style=text-align:center;text-decoration:none; >"+"<img src='"+temp.IMAGEM+"'></a></div><br>"}if(temp.CONTEMMAPFILE=="nao"){ins+="<div><p class=paragrafo style=text-align:center;cursor:pointer >"+"<a href='"+link+"' style=text-align:center;text-decoration:none; >"+nome+" ("+temp.ID_MAPA+")</a></p></div>"}else{combo="<select style='width:170px;' onchange='i3GEO.guias.CONFIGURA.mapas.mostraLink("+ig1+",this.value)'>"+"<option value=''>"+$trad("x103")+":</option>"+"<option value='"+link+"'>Como foi salvo</option>"+"<option value='"+link+"&interface="+urlinterface+"'>Com a interface atual</option>"+"<option value='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?restauramapa="+temp.ID_MAPA+"&fundo=e_wsm'>Openlayers com todos os botoes</option>"+"<option value='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?restauramapa="+temp.ID_MAPA+"&fundo=est_wms'>Sem o fundo</option>"+"<option value='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?restauramapa="+temp.ID_MAPA+"&fundo=e_wsm&botoes=legenda pan zoombox zoomtot zoomin zoomout distancia area identifica'>Com booes principais</option>"+"<option value='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?restauramapa="+temp.ID_MAPA+"&botoes=legenda pan zoombox zoomtot zoomin zoomout'>Botoes de navegacao</option>"+"</select>";ins+="<div>"+"<p class=paragrafo style=text-align:center;cursor:pointer >"+"<img style=text-align:center src='"+i3GEO.configura.locaplic+"/ferramentas/salvamapa/geraminiatura.php?w=100&h=67&restauramapa="+temp.ID_MAPA+"'><br><br>"+"<a href='"+link+"' style=text-align:center;text-decoration:none; >"+nome+" ("+temp.ID_MAPA+")</a>"+"<br>"+combo+"<br><div style='cursor:pointer;' id='i3geoMapasLink_"+ig1+"' ></div>"+"</p></div>"}ins+="</div><br>";ig1++}while(ig1<ig1lt)}$i(onde).innerHTML=ins+"</div>"};if($i(i3GEO.guias.CONFIGURA.mapas.idconteudo)){$i(i3GEO.guias.CONFIGURA.mapas.idconteudo).innerHTML="Aguarde..."}i3GEO.guias.mostra("mapas");i3GEO.php.pegaMapas(pegaMapas);i3GEO.navega.removeCookieExtensao()}}},ORDEM:"",TIPO:"guia",IDGUIAS:"guiasYUI",cria:function(onde){var atrib,nguiasreal=0,guiaconteudo,id,guia,g,re,ng,tituloguia,i,ins,altura,temp,CONFIGURA=i3GEO.guias.CONFIGURA,guias=i3GEO.util.listaChaves(CONFIGURA),nguias=guias.length;if(i3GEO.guias.TIPO==="movel"){i3GEO.guias.IDGUIAS="i3GEOguiaMovelConteudo";for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo)){i3GEO.guias.guiaMovel.config.guias.ids.push(i3GEO.guias.CONFIGURA[guias[ng]].id);i3GEO.guias.guiaMovel.config.guias.idsconteudos.push(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo);if(i3GEO.guias.CONFIGURA[guias[ng]].icone!==undefined){i3GEO.guias.guiaMovel.config.guias.icones.push(i3GEO.guias.CONFIGURA[guias[ng]].icone)}else{i3GEO.guias.guiaMovel.config.guias.icones.push("imagens/gisicons/open1.png")}i3GEO.guias.guiaMovel.config.guias.titulos.push(i3GEO.guias.CONFIGURA[guias[ng]].titulo);i3GEO.guias.guiaMovel.config.guias.chaves.push(guias[ng])}}return}try{for(g=0;g<12;g++){tituloguia="";if($i("guia"+g)){tituloguia=$i("guia"+g).innerHTML;re=new RegExp(" ","g");tituloguia=tituloguia.replace(re,'');for(ng=0;ng<nguias;ng++){if(CONFIGURA[guias[ng]].id==="guia"+g){tituloguia=""}}if(tituloguia!==""){i3GEO.guias.CONFIGURA["guia"+g]=[];i3GEO.guias.CONFIGURA["guia"+g].titulo=tituloguia;i3GEO.guias.CONFIGURA["guia"+g].id="guia"+g;i3GEO.guias.CONFIGURA["guia"+g].idconteudo="guia"+g+"obj";if($i('guia'+g).onclick){i3GEO.guias.CONFIGURA["guia"+g].click=$i("guia"+g).onclick}}}}if(i3GEO.guias.ORDEM===""){guias=i3GEO.util.listaChaves(CONFIGURA)}else{guias=i3GEO.guias.ORDEM}nguias=guias.length;if(arguments.length===0){for(ng=0;ng<nguias;ng++){if(i3GEO.guias.CONFIGURA[guias[ng]]){i=$i(i3GEO.guias.CONFIGURA[guias[ng]].id);if(i){onde=i.parentNode}}}}else{onde=$i(onde)}if(!onde){return}onde.id=i3GEO.guias.IDGUIAS;onde.className="yui-navset";if(i3GEO.guias.TIPO==="guia"||i3GEO.guias.TIPO==="tablet"){ins='<ul class="yui-nav" style="border-width:0pt 0pt 0px;border-color:rgb(240,240,240);border-bottom-color:white;text-align:center;">';for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){if($i(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo)){ins+='<li><a alt="" title=""><em><div id="'+i3GEO.guias.CONFIGURA[guias[ng]].id+'" >'+i3GEO.guias.CONFIGURA[guias[ng]].titulo+'</div></em></a></li>'}}}ins+="</ul>";onde.innerHTML=ins}if(i3GEO.guias.TIPO==="sanfona"){ins='<dl id=sanfona'+onde.id+' class="accordion" >';if(i3GEO.guias.ORDEM===""){for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){nguiasreal++}}}else{nguiasreal=i3GEO.guias.ORDEM.length}if(navn){altura=i3GEO.parametros.h-(nguiasreal*25)-1}else{altura=i3GEO.parametros.h-(nguiasreal*23)+1}for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){id=i3GEO.guias.CONFIGURA[guias[ng]].idconteudo;temp=$i(id);if(temp){guiaconteudo=temp.innerHTML;temp.innerHTML="";temp.style.display="none";temp.id="";ins+='<dt style=height:17px id="'+i3GEO.guias.CONFIGURA[guias[ng]].id+'" >'+'<table class=accordiontable ><tr><td width="98%" >'+i3GEO.guias.CONFIGURA[guias[ng]].titulo+'</td><td width="2%" ><img id="" src="'+i3GEO.configura.locaplic+'/imagens/branco.gif" style="width:10px;" /></td></tr></table>'+'<dd clas=close >'+'<div class=bd >'+'<div id="'+id+'" >'+guiaconteudo+'</div></div></dd>'}}}ins+="</dl>";onde.innerHTML=ins;onde.style.height=altura+"px";YAHOO.lutsr.accordion.init(true,5,false,"sanfona"+onde.id,altura);i3GEO.guias.ALTURACORPOGUIAS=altura}for(g=0;g<nguias;g++){guia=i3GEO.guias.CONFIGURA[guias[g]];id=guia.id;guiaconteudo=$i(id);if(guiaconteudo){if(guia.click===""||guia.click===undefined){atrib=document.createAttribute("nomeGuia");atrib.value=guias[g];$i(id).setAttributeNode(atrib);$i(id).onclick=function(event){i3GEO.guias.mostra(this.attributes["nomeGuia"].value)}}else{guiaconteudo.onclick=guia.click}YAHOO.util.Event.addListener($i(id),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addListener($i(id),"click",YAHOO.util.Event.stopPropagation);YAHOO.util.Event.addFocusListener($i(id),YAHOO.util.Event.preventDefault);guiaconteudo.onmouseover=function(){};guiaconteudo.onmouseout=function(){};temp=$i(guia.idconteudo);if(temp){temp.style.overflow="auto";if(i3GEO.guias.TIPO==="guia"){if(i3GEO.guias.ALTURACORPOGUIAS===0){temp.style.height=i3GEO.parametros.h+"px"}else{temp.style.height=i3GEO.guias.ALTURACORPOGUIAS+"px"}}else{temp.style.height=onde.style.height}}}}}catch(e){}if(i3GEO.guias.TIPO!=="tablet"){i3GEO.guias.mostra(i3GEO.guias.ATUAL);i3GEO.guias.ativa(i3GEO.guias.ATUAL)}else{i3GEO.guias.escondeGuias()}},ajustaAltura:function(){var guia,guias,nguias,temp,temps,n,i,g,altura=0;if(i3GEO.guias.ALTURACORPOGUIAS!=0){altura=i3GEO.guias.ALTURACORPOGUIAS}guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){guia=$i(this.CONFIGURA[guias[g]].idconteudo);if(guia){guia.style.overflow="auto";if(this.TIPO==="guia"){if(altura===0){guia.style.height=i3GEO.parametros.h+"px"}else{guia.style.height=altura+"px"}}if(this.TIPO==="sanfona"){guia.style.height=altura+"px";temp=$i("guiasYUI");if(temp){temp.style.height=altura+"px";temps=temp.getElementsByTagName("dd");n=temps.length;for(i=0;i<n;i++){if(temps[i].style.visibility=="visible"){temps[i].style.height=altura+"px"}}}YAHOO.lutsr.accordion.properties.altura=altura}}}},escondeGuias:function(){var guias,nguias,g,temp,attributes,anim;guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){temp=$i(this.CONFIGURA[guias[g]].idconteudo);if(temp){if(i3GEO.guias.TIPO==="tablet"&&temp.style.display==="block"){temp.style.overflow="hidden";attributes={height:{to:0},id:this.CONFIGURA[guias[g]].idconteudo};anim=new YAHOO.util.Anim(temp,attributes,1,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){var temp=$i(anim.attributes.id);temp.style.overflow="auto";temp.style.display="none";if(i3GEO.barraDeBotoes.BARRAS[0]){i3GEO.barraDeBotoes.BARRAS[0].show()}});anim.animate()}else{temp.style.display="none"}}if($i(this.CONFIGURA[guias[g]].id)&&i3GEO.guias.TIPO!=="movel"){$i(this.CONFIGURA[guias[g]].id).parentNode.parentNode.style.background="transparent"}}},mostra:function(guia){var guias,nguias,g,temp,attributes,anim;guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;if(!$i(i3GEO.guias.CONFIGURA[guia].id)){return}if(!$i(i3GEO.guias.CONFIGURA[guia].idconteudo)){return}if($i(i3GEO.guias.CONFIGURA[guia].idconteudo).style.display==="block"&&i3GEO.guias.TIPO==="tablet"){i3GEO.guias.escondeGuias();return}if(i3GEO.guias.TIPO!=="movel"){for(g=0;g<nguias;g++){if($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo)){$i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo).style.display="none"}if($i(i3GEO.guias.CONFIGURA[guias[g]].id)){$i(i3GEO.guias.CONFIGURA[guias[g]].id).parentNode.parentNode.style.background="transparent"}}}if(i3GEO.guias.CONFIGURA.toString().search(guia)<0){for(g=0;g<nguias;g++){if(i3GEO.guias.CONFIGURA[guias[g]].id===guia){guia=guias[g]}}}if(i3GEO.guias.CONFIGURA[guia]){temp=$i(i3GEO.guias.CONFIGURA[guia].idconteudo);if(temp){if(i3GEO.guias.TIPO==="tablet"){if(i3GEO.barraDeBotoes.BARRAS[0]){i3GEO.barraDeBotoes.BARRAS[0].hide()}temp.style.left=(i3GEO.parametros.w/2)-150+"px";temp.style.height=0;temp.style.display="block";temp.style.zIndex=9000;temp.style.overflow="hidden";attributes={height:{to:i3GEO.parametros.h-10}};anim=new YAHOO.util.Anim(temp,attributes,1,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){temp.style.overflow="auto";temp.style.display="block"});if(DetectaMobile("DetectAndroid")===true){temp.style.height="";temp.style.overflow="auto"}else{anim.animate()}}else{temp.style.display="block"}if(i3GEO.guias.TIPO!=="movel"){$i(i3GEO.guias.CONFIGURA[guia].id).parentNode.parentNode.style.backgroundColor="white"}i3GEO.guias.ATUAL=guia}}},ativa:function(guia){try{i3GEO.guias.ATUAL=guia;if(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].click!==""){i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].click.call()}}catch(e){}},libera:function(){if(!$i("conteudojanelaguias")){var i,w,pos,a,l,temp;$i(i3GEO.Interface.IDCORPO).style.left="0px";if($i(this.IDGUIAS)){$i(this.IDGUIAS).style.display="none"}i=$i("contemFerramentas");w=parseInt($i("contemFerramentas").style.width,10);$i("contemFerramentas").style.width="0px";pos="px";a=i3GEO.parametros.h;l=i3GEO.parametros.w+w;i3GEO.parametros.h=a;i3GEO.parametros.w=l;i=$i(i3GEO.Interface.IDCORPO);if(i){i.style.width=l+pos;i.style.height=a+pos}i=$i(i3GEO.Interface.IDMAPA);if(i){i.style.width=l+pos;i.style.height=a+pos;i.style.clip='rect('+0+" "+(l*1+2)+" "+(a*1+2)+" "+0+')'}i=$i("mst");if(i){i.style.width=l+1+pos}i3GEO.mapa.ajustaPosicao();temp=function(retorno){var novoel,temp,i,g,guias,nguias,janela;novoel=document.createElement("div");novoel.id="janelaguias";novoel.style.display="block";novoel.innerHTML='<div class="hd">Guias <div onclick ="i3GEO.janela.minimiza(conteudojanelaguias)" id="janelaguias_minimizaCabecalho" class="container-minimiza" ></div></div><div class="bd" id="conteudojanelaguias_corpo" style=padding:0px ></div>';temp=$i("i3geo")?$i("i3geo").appendChild(novoel):document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("janelaguias",{width:"270px",fixedcenter:true,constraintoviewport:false,underlay:"none",close:false,visible:true,draggable:true,modal:false,iframe:true});YAHOO.i3GEO.janela.manager.register(janela);janela.render();janela.show();janela.cfg.setProperty("y",0);i=$i(i3GEO.guias.IDGUIAS);$i("conteudojanelaguias_corpo").appendChild(i);i.style.borderLeft="1px solid black";i.style.borderRight="1px solid black";guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){if($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo)){$i("conteudojanelaguias_corpo").appendChild($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo));temp=$i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo).style;temp.background="white";temp.border="1px solid black";temp.borderTop="0px solid black";temp.width="270px";temp.left="-1px";temp.height=i3GEO.parametros.h-90+"px"}}i3GEO.atualiza("");i.style.display="block";i.style.left="-1px";i.style.width="270px"};i3GEO.php.mudatamanho(temp,a,l)}else{janela=YAHOO.i3GEO.janela.manager.find(id);janela.show();janela.bringToTop()}},mostraGuiaFerramenta:function(guia,namespace){var g,Dom=YAHOO.util.Dom;if(!namespace){namespace="guia"}for(g=0;g<12;g++){Dom.setStyle(namespace+g+"obj","display","none")}Dom.setStyle(guia+"obj","display","block")},ajustaGuiaFerramenta:function(idjanela,namespace){var c=$i(idjanela+"_corpo"),h,g,temp;c.style.overflow="unset";c.style.overflow="none";h=c.style.height;h=parseInt(h,10)-40+"px";for(g=0;g<12;g++){temp=$i(namespace+"guia"+g+"obj");if(temp){temp.style.height=h;temp.style.width="100%";temp.style.overflow="auto"}}},guiaMovel:{ABERTA:false,config:{larguraPuxador:50,alturaPuxador:319,alturaGuiaMovel:0,larguraGuiaMovel:320,topGuiaMovel:0,guias:{icones:[],ids:[],idsconteudos:[],titulos:[],chaves:[]},posicao:["c","r"]},left:0,inicia:function(){var posMapa=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA)),centroY=posMapa[1]+(i3GEO.parametros.h/2),config=i3GEO.guias.guiaMovel.config,temp;if(i3GEO.guias.ALTURACORPOGUIAS===0&&config.alturaGuiaMovel===0){i3GEO.guias.guiaMovel.config.alturaGuiaMovel=i3GEO.parametros.h}else{i3GEO.guias.guiaMovel.config.alturaGuiaMovel=i3GEO.guias.ALTURACORPOGUIAS}config=i3GEO.guias.guiaMovel.config;temp=$i("i3GEOguiaMovel").style;if(config.posicao[1]==="r"){temp.left=(posMapa[0]+i3GEO.parametros.w-config.larguraPuxador)+"px";i3GEO.guias.guiaMovel.left=parseInt(temp.left,10)+"px"}if(config.posicao[1]==="l"){temp.left=posMapa[0]+"px";i3GEO.guias.guiaMovel.left=parseInt(temp.left,10)+"px"}if(config.topGuiaMovel===0){temp.top=(centroY-((config.alturaGuiaMovel-42)/2))+"px"}else{temp.top=config.topGuiaMovel+"px"}temp.width=config.larguraPuxador+"px";temp.height=config.alturaGuiaMovel+"px";temp=$i("i3GEOguiaMovelMolde").style;temp.top="0px";if(config.posicao[1]==="r"){temp.left=config.larguraPuxador+"px"}if(config.posicao[1]==="l"){temp.left="1px"}temp.height=config.alturaGuiaMovel+"px";temp.backgroundColor="white";if($i("i3GEOguiaMovelPuxador")){temp=$i("i3GEOguiaMovelPuxador").style;temp.top=((config.alturaGuiaMovel-config.alturaPuxador)/2)+"px";temp.left="0px";temp.width=config.larguraPuxador+"px";temp.height=config.alturaPuxador+"px"}temp=$i("i3GEOguiaMovelIcones");if(temp){temp=temp.style;temp.left="1px";temp.top="1px";temp.width=(config.larguraGuiaMovel-1)+"px";temp.height="35px";if(navm){temp.height="37px"}temp.zIndex=5;temp.paddingTop="2px";YAHOO.util.Dom.setStyle("i3GEOguiaMovelIcones","opacity",0.60)}temp=$i("i3GEOguiaMovelConteudo").style;temp.left="1px";if(temp.top==""){temp.top="38px"}temp.height=(config.alturaGuiaMovel-39)+"px";if(navm){temp.width=(config.larguraGuiaMovel-1)+"px"}else{temp.width=(config.larguraGuiaMovel-5)+"px"}temp.paddingLeft="4px";YAHOO.util.Dom.setStyle("i3GEOguiaMovelConteudo","opacity",0.70);YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.10);$i("i3GEOguiaMovelMolde").onmouseover=function(){if($i("i3GEOguiaMovelConteudo").style.display==="block"){YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.9)}if($i("i3GEOguiaMovelIcones")&&$i("i3GEOguiaMovelIcones").innerHTML===""){i3GEO.guias.guiaMovel.mostraIcones()}};$i("i3GEOguiaMovelMolde").onmouseout=function(){YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.90);if($i("i3GEOguiaMovelIcones")&&$i("i3GEOguiaMovelIcones").innerHTML===""){i3GEO.guias.guiaMovel.mostraIcones()}};if(i3GEO.guias.guiaMovel.ABERTA===true){i3GEO.guias.guiaMovel.ativa(i3GEO.guias.ATUAL)}i3GEO.guias.guiaMovel.mostraIcones();temp=$i("i3GEOguiaMovel");temp.style.visibility="visible";temp.style.height=parseInt(temp.style.height)-20+"px";i3GEO.util.aparece("i3GEOguiaMovel",300,100)},mostraIcones:function(){if($i("i3GEOguiaMovelIcones")&&$i("i3GEOguiaMovelIcones").innerHTML!=""){return}var n=i3GEO.guias.guiaMovel.config.guias.icones.length,i,temp=i3GEO.guias.guiaMovel.config.guias,ins="",ico;if(i3GEO.guias.ORDEM!==""){temp.chaves=i3GEO.guias.ORDEM}for(i=0;i<n;i++){if(temp.chaves[i]){ico="<button title='"+temp.titulos[i]+"' onmouseout='javascript:this.className = \"iconeGuiaMovel iconeGuiaMovelMouseOut\"' onmouseover='javascript:this.className = \"iconeGuiaMovel iconeGuiaMovelMouseOver\"' onclick='i3GEO.guias.guiaMovel.ativa(\""+temp.chaves[i]+"\")' class=iconeGuiaMovel ><img id='"+temp.ids[i]+"' src='"+i3GEO.configura.locaplic+"/"+temp.icones[i]+"' style='cursor:pointer;' /></button>";if(!$i("iconeGuia_"+temp.chaves[i])){ins+=ico}else{$i("iconeGuia_"+temp.chaves[i]).innerHTML=ico}}}if($i("i3GEOguiaMovelIcones")){$i("i3GEOguiaMovelIcones").innerHTML=ins}ins="1.2px";if(navn&&chro===false){ins="0px"}for(i=0;i<n;i++){ico=$i(temp.ids[i]);if(ico){YAHOO.util.Dom.setStyle(ico,"padding",ins)}}i3GEO.guias.guiaMovel.desativaIcones();if(i3GEO.guias.ATUAL!=""){ico=$i(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].id);if(ico){YAHOO.util.Dom.setStyle(ico,"opacity",0.9);ico.parentNode.style.boxShadow="none"}}},desativaIcones:function(o){var ims,n,i;if(!o){o=0.9}ims=$i("i3GEOguiaMovelIcones");if(ims){ims=ims.getElementsByTagName("button");n=ims.length;for(i=0;i<n;i++){YAHOO.util.Dom.setStyle(ims[i],"opacity",o);ims[i].style.boxShadow="none"}}n=i3GEO.guias.guiaMovel.config.guias.icones.length;temp=i3GEO.guias.guiaMovel.config.guias;for(i=0;i<n;i++){if($i("iconeGuia_"+temp.chaves[i])){ims=$i("iconeGuia_"+temp.chaves[i]).getElementsByTagName("button");if(ims.length>0){ims[0].style.backgroundColor="white";ims[0].style.boxShadow="none";ims[0].style.margin="0px";ims[0].style.border="1px solid gray";if(i3GEO.guias.guiaMovel.config.posicao[1]==="l"){ims[0].style.borderLeft="2px solid white"}else{ims[0].style.borderRight="2px solid white"}YAHOO.util.Dom.setStyle(ims[0],"opacity",o);ims[0].blur()}}}},ativa:function(chave){if(chave===""){i3GEO.guias.guiaMovel.desativaIcones();return}i3GEO.guias.escondeGuias();i3GEO.guias.guiaMovel.desativaIcones(0.5);if(i3GEO.guias.ATUAL===chave&&$i("i3GEOguiaMovelMolde").style.display==="block"){i3GEO.guias.ATUAL="";i3GEO.guias.guiaMovel.desativaIcones(0.9);i3GEO.guias.guiaMovel.abreFecha("fecha")}else{i3GEO.guias.ATUAL=chave;i3GEO.guias.guiaMovel.abreFecha("abre");if(i3GEO.guias.CONFIGURA[chave].click){i3GEO.guias.CONFIGURA[chave].click.call()}i3GEO.guias.mostra(chave);var ico=$i(i3GEO.guias.CONFIGURA[chave].id);if(ico){ico.parentNode.blur();YAHOO.util.Dom.setStyle(ico.parentNode,"opacity",0.9);ico.parentNode.style.boxShadow="none";if($i("iconeGuia_"+chave)){if(i3GEO.guias.guiaMovel.config.posicao[1]==="l"){ico.parentNode.style.borderLeft="2px solid white"}else{ico.parentNode.style.borderRight="2px solid white"}}}}},reposiciona:function(){var temp=$i("i3GEOguiaMovel").style.top;i3GEO.guias.guiaMovel.config.alturaGuiaMovel=0;i3GEO.guias.ALTURACORPOGUIAS=0;if($i("i3GEOguiaMovelIcones")){$i("i3GEOguiaMovelIcones").style.display="none"}$i("i3GEOguiaMovelConteudo").style.display="none";$i("i3GEOguiaMovelMolde").style.display="none";i3GEO.guias.escondeGuias();i3GEO.guias.guiaMovel.inicia();$i("i3GEOguiaMovel").style.top=temp},abreFecha:function(forca){var molde=$i("i3GEOguiaMovelMolde"),guia=$i("i3GEOguiaMovel"),attributes,anim,anim1,anim2,temp;if(!forca){if(molde.style.display==="block"){forca="fecha"}else{temp=i3GEO.guias.ATUAL;i3GEO.guias.ATUAL="";i3GEO.guias.guiaMovel.ativa(temp);return}}if(forca==="fecha"){if($i("i3GEOguiaMovelIcones")){$i("i3GEOguiaMovelIcones").style.display="none"}$i("i3GEOguiaMovelConteudo").style.display="none";attributes={left:{to:parseInt(i3GEO.guias.guiaMovel.left,10)},id:"i3GEOguiaMovel"};anim=new YAHOO.util.Anim(guia,attributes,1,YAHOO.util.Easing.easeNone);attributes={width:{to:0},id:"i3GEOguiaMovelMolde"};anim1=new YAHOO.util.Anim(molde,attributes,1,YAHOO.util.Easing.easeNone);anim.duration=0.5;anim1.duration=0.5;anim1.onComplete.subscribe(function(){molde.style.display="none"});if(i3GEO.guias.guiaMovel.config.posicao[1]==="l"&&$i("i3GEOguiaMovelIconesPuxador")){attributes={left:{to:0}};anim2=new YAHOO.util.Anim("i3GEOguiaMovelIconesPuxador",attributes,1,YAHOO.util.Easing.easeNone);anim2.duration=0.5;anim2.animate()}anim.animate();anim1.animate()}else if(molde.style.display!="block"){molde.style.display="block";if(i3GEO.guias.guiaMovel.config.posicao[1]==="l"){attributes={rigth:{to:(parseInt(guia.style.left,10)-i3GEO.guias.guiaMovel.config.larguraGuiaMovel)*-1},id:"i3GEOguiaMovel"}}else{attributes={left:{to:parseInt(guia.style.left,10)-i3GEO.guias.guiaMovel.config.larguraGuiaMovel},id:"i3GEOguiaMovel"}}anim=new YAHOO.util.Anim(guia,attributes,1,YAHOO.util.Easing.easeNone);attributes={width:{to:i3GEO.guias.guiaMovel.config.larguraGuiaMovel},id:"i3GEOguiaMovelMolde"};anim1=new YAHOO.util.Anim(molde,attributes,1,YAHOO.util.Easing.easeNone);anim.duration=0.5;anim1.duration=0.5;anim1.onComplete.subscribe(function(){if($i("i3GEOguiaMovelIcones")){$i("i3GEOguiaMovelIcones").style.display="block"}$i("i3GEOguiaMovelConteudo").style.display="block";YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.9)});if(i3GEO.guias.guiaMovel.config.posicao[1]==="l"&&$i("i3GEOguiaMovelIconesPuxador")){attributes={left:{to:i3GEO.guias.guiaMovel.config.larguraGuiaMovel}};anim2=new YAHOO.util.Anim("i3GEOguiaMovelIconesPuxador",attributes,1,YAHOO.util.Easing.easeNone);anim2.duration=0.5;anim2.animate()}anim.animate();anim1.animate()}}}}; | |
| 256 | 256 | // |
| 257 | 257 | //compactados/classe_arvoredecamadas_compacto.js |
| 258 | 258 | if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.arvoreDeCamadas={ARVORE:null,IDHTML:"listaTemas",CAMADASINICIAIS:"",CAMADAS:"",FINALIZA:"",finaliza:"",NOTEMA:{expanded:true,hasIcon:false,enableHighlight:false},NOTEMAICONES:{expanded:false,hasIcon:true,enableHighlight:false},INCLUILFUNDO:true,ATIVATEMA:"",TEMPLATELEGENDA:"legenda5.htm",BARRAPROGRESSO:true,MOSTRALISTAKML:false,FILTRO:"",VERIFICAABRANGENCIATEMAS:false,EXPANDESOLEGENDA:false,PERMITEEXPANDIRTEMAS:true,ARRASTARORDEM:true,REFRESH:true,ARRASTARLIXEIRA:true,ALTERAOPACIDADE:false,FERRAMENTAS:true,IMPRIMIR:false,ANIMAMAPA:false,LIGARDESLIGARTODOS:true,FILTRAR:true,ABRELEGENDA:true,EXPANDIDA:false,LEGENDAEXPANDIDA:false,MOSTRATITULO:true,OPCOESICONES:true,OPCOESTEMAS:true,OPCOESLEGENDA:true,OPCOESARVORE:true,AGUARDALEGENDA:false,ICONETEMA:true,FUNCOES:{farolescala:true,excluir:true,sobe:true,desce:true,fonte:true,zoomtema:true,compartilhar:true,opacidade:true,mudanome:true,procurar:true,toponimia:true,etiquetas:true,filtrar:true,tabela:true,grafico:true,editorlegenda:true,destacar:true,cortina:true,sql:true,comentar:true,temporizador:true,wms:true,tme:true,copia:true},SID:null,LOCAPLIC:null,CONFIGICONES:{"refresh":{tipo:"arvore",icone:"",classe:"i3geo_refresh2",funcao:"i3GEO.arvoreDeCamadas.atualiza(i3GEO.arvoreDeCamadas.CAMADAS,true)",title:"Refresh",dica:$trad("refresh"),id:"i3geo_refresh",status:true},"lixeira":{tipo:"arvore",icone:"",classe:"i3geo_lixeira",funcao:"i3GEO.arvoreDeCamadas.dialogo.excluir()",title:$trad("t2"),dica:$trad("lixeira"),id:"i3geo_lixeira",status:true},"filtro":{tipo:"arvore",icone:"",classe:"i3geo_filtro",funcao:"i3GEO.arvoreDeCamadas.dialogo.filtro()",title:$trad("t2a"),dica:$trad("filtraCam"),id:"i3geo_filtro",status:true},"legenda":{tipo:"arvore",icone:"",classe:"soltaleg2",funcao:"i3GEO.mapa.legendaHTML.libera()",title:$trad("t2b"),dica:$trad("legenda"),id:"soltaleg2",status:true},"opacidade":{tipo:"arvore",icone:"",classe:"opacidadeMapa",funcao:"i3GEO.mapa.dialogo.opacidade()",title:$trad("t20"),dica:"",id:"opacidadeMapa",status:false},"animacao":{tipo:"arvore",icone:"",classe:"animaMapa",funcao:"i3GEO.mapa.dialogo.animacao()",title:$trad("p21"),dica:"",id:"animaMapa",status:false},"imprimir":{tipo:"arvore",icone:"",classe:"imprimirMapa",funcao:"i3GEO.mapa.dialogo.imprimir()",title:$trad("d12"),dica:"",id:"imprimirMapa",status:false},"ferramentas":{tipo:"arvore",icone:"",classe:"ferramentasMapa",funcao:"i3GEO.mapa.dialogo.ferramentas()",title:$trad("u15a"),dica:$trad("ferramMapa"),id:"ferramentasMapa",status:true},"ajuda":{tipo:"arvore",icone:"",classe:"ajudaMapa",funcao:"i3GEO.arvoreDeCamadas.ajudaEmLista()",title:$trad("s1"),dica:"",id:"ajudaMapa",status:true},"olhoaberto":{tipo:"arvore",icone:"",classe:"olhoAberto",funcao:"i3GEO.arvoreDeCamadas.aplicaTemas(\"ligartodos\")",title:$trad("t3a"),dica:$trad("t3a"),id:"olhoAberto",status:true},"olhofechado":{tipo:"arvore",icone:"",classe:"olhoFechado",funcao:"i3GEO.arvoreDeCamadas.aplicaTemas(\"desligartodos\")",title:$trad("t3b"),dica:$trad("t3b"),id:"olhoFechado",status:true},"ferramentasTema":{tipo:"tema",icone:"imagens/oxygen/16x16/configure-shortcuts.png",classe:"arvCamFerramentas",funcao:"i3GEO.tema.dialogo.atalhoscamada",title:$trad("u15a"),dica:$trad("ferramCamadas"),id:"",status:true,flag:true},"removerTema":{tipo:"tema",icone:"imagens/oxygen/16x16/draw-x.png",classe:"arvCamRemoveLayer",funcao:"i3GEO.tema.exclui",title:$trad("t12"),dica:$trad("t12a"),id:"",status:true,flag:true},"zoomtema":{tipo:"tema",icone:"imagens/gisicons/zoom-layer.png",classe:"arvCamZoomLayer",funcao:"i3GEO.tema.zoom",title:$trad("t17"),dica:$trad("t18"),id:"",status:true,flag:true},"sobe":{tipo:"tema",icone:"imagens/oxygen/16x16/draw-triangle3.png",classe:"arvCamSobeLayer",funcao:"i3GEO.tema.sobe",title:$trad("t13"),dica:$trad("t14"),id:"",status:true,flag:true},"desce":{tipo:"tema",icone:"imagens/oxygen/16x16/draw-triangle4.png",classe:"arvCamDesceLayer",funcao:"i3GEO.tema.desce",title:$trad("t15"),dica:$trad("t16"),id:"",status:true,flag:true},"contextoescala":{tipo:"tema",icone:"imagens/oxygen/16x16/task-attempt.png",classe:"arvCamDependeEscala",funcao:"",title:$trad("t36"),dica:$trad("t36"),id:"",status:true,flag:true},"selecionado":{tipo:"tema",icone:"imagens/gisicons/select-cancel.png",classe:"arvCamSelecionado",funcao:"i3GEO.tema.limpasel",title:$trad("t4"),dica:$trad("t5"),id:"",status:true,flag:true},"zoomsel":{tipo:"tema",icone:"imagens/gisicons/zoom-selection.png",classe:"arvCamZoomSelecionado",funcao:"i3GEO.tema.zoomsel",title:$trad("t4a"),dica:$trad("t5"),id:"",status:true,flag:true},"link":{tipo:"tema",icone:"imagens/oxygen/16x16/help-about.png",classe:"arvCamFonte",funcao:"i3GEO.tema.fonte",title:$trad("a9"),dica:$trad("a9"),id:"",status:true,flag:true},"download":{tipo:"tema",icone:"imagens/oxygen/16x16/download.png",classe:"arvCamDownload",funcao:"i3GEO.tema.dialogo.download",title:"Download",dica:$trad("t6"),id:"",status:true,flag:true}},cria:function(onde,temas,g_sid,g_locaplic,funcaoTema){if(!YAHOO.lang.isUndefined(funcaoTema)){i3GEO.arvoreDeCamadas.ATIVATEMA=funcaoTema}var novoel,temp;if(i3GEO.arvoreDeCamadas.BARRAPROGRESSO===true&&i3GEO.Interface.ATUAL==="openlayers"){if(!$i("i3GEOprogressoDiv")){novoel=document.createElement("div");novoel.id="i3GEOprogressoDiv";novoel.style.position="absolute";novoel.style.top="0px";novoel.style.zIndex="50000";novoel.style.left=((i3GEO.parametros.w/2)-75)+"px";$i(i3GEO.Interface.IDMAPA).appendChild(novoel);i3GEO.arvoreDeCamadas.progressBar=new YAHOO.widget.ProgressBar({height:5,width:150,minValue:1,maxValue:0,value:0}).render("i3GEOprogressoDiv")}}i3GEO.arvoreDeCamadas.SID=typeof(g_sid)!=='undefined'?g_sid:i3GEO.configura.sid;i3GEO.arvoreDeCamadas.LOCAPLIC=typeof(g_locaplic)!=='undefined'?g_locaplic:i3GEO.configura.locaplic;if(onde!==""){i3GEO.arvoreDeCamadas.IDHTML=onde}if(i3GEO.arvoreDeCamadas.IDHTML===""){return}temp=$i(i3GEO.arvoreDeCamadas.IDHTML);if(!temp){return}if(temp.className===""){temp.className="i3GEOarvCam"}if(YAHOO.lang.isUndefined(temas)||temas===""){temas=i3GEO.arvoreDeCamadas.CAMADAS}i3GEO.arvoreDeCamadas.atualiza(temas);if(i3GEO.arvoreDeCamadas.finaliza!==""){alert("i3GEO.arvoreDeCamadas.finaliza depreciado. Utilize i3GEO.arvoreDeCamadas.FINALIZA");i3GEO.arvoreDeCamadas.FINALIZA=i3GEO.arvoreDeCamadas.finaliza;eval(i3GEO.arvoreDeCamadas.finaliza)}if(i3GEO.arvoreDeCamadas.FINALIZA!==""){if(YAHOO.lang.isFunction(i3GEO.arvoreDeCamadas.FINALIZA)){i3GEO.arvoreDeCamadas.FINALIZA.call()}else{if(i3GEO.arvoreDeCamadas.FINALIZA!=""){eval(i3GEO.arvoreDeCamadas.FINALIZA)}}}},inicia:function(id){i3GEO.arvoreDeCamadas.cria(id);i3GEO.arvoreDeCamadas.atualiza();if(i3GEO.arvoreDeCamadas.FINALIZA!==""){if(YAHOO.lang.isFunction(i3GEO.arvoreDeCamadas.FINALIZA)){i3GEO.arvoreDeCamadas.FINALIZA.call()}else{if(i3GEO.arvoreDeCamadas.FINALIZA!=""){eval(i3GEO.arvoreDeCamadas.FINALIZA)}}}},atualiza:function(temas,forca){if(arguments.length===0){temas=i3GEO.arvoreDeCamadas.CAMADAS;i3GEO.arvoreDeCamadas.CAMADAS="";forca=false}var temp,newVal,root,tempNode,titulo="",d,c,ltema,temaNode,temaNodeFilho="",i,j,n,nk,k,noGrupo,incluidos=[],grupoNode="",grupoLayers=i3GEO.configura.grupoLayers,textoTema="";temp=$i(i3GEO.arvoreDeCamadas.IDHTML);if(temp){if(forca===true){temp.innerHTML=""}if(temp.innerHTML!==""){if(i3GEO.arvoreDeCamadas.comparaTemas(temas,i3GEO.arvoreDeCamadas.CAMADAS)){i3GEO.arvoreDeCamadas.CAMADAS=temas;return}}}else{return}i3GEO.util.defineValor(i3GEO.arvoreDeCamadas.IDHTML,"innerHTML","");i3GEO.arvoreDeCamadas.CAMADAS=temas;if(i3GEO.arvoreDeCamadas.CAMADASINICIAIS===""){i3GEO.arvoreDeCamadas.CAMADASINICIAIS=temas}(function(){function changeIconMode(){var currentIconMode="";newVal=parseInt(this.value,10);if(newVal!==currentIconMode){currentIconMode=newVal}buildTree()}function buildTree(){i3GEO.arvoreDeCamadas.ARVORE=new YAHOO.widget.TreeView(i3GEO.arvoreDeCamadas.IDHTML)}buildTree()})();root=i3GEO.arvoreDeCamadas.ARVORE.getRoot();if(i3GEO.arvoreDeCamadas.MOSTRATITULO===true){titulo=$trad("t1")}tempNode=new YAHOO.widget.HTMLNode({expanded:true,html:titulo,hasIcon:i3GEO.arvoreDeCamadas.MOSTRATITULO,enableHighlight:true},root);if(i3GEO.arvoreDeCamadas.OPCOESARVORE===true){new YAHOO.widget.HTMLNode({expanded:false,html:i3GEO.arvoreDeCamadas.montaOpcoesArvore(),hasIcon:false,enableHighlight:false},tempNode)}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!==""){temp=i3GEO.arvoreDeCamadas.NOTEMA;temp.html=textoTema;temp.idlegenda=ltema.name;temp.tipo="tema";temaNode=new YAHOO.widget.HTMLNode(temp,tempNode);if(i3GEO.arvoreDeCamadas.OPCOESICONES===true){textoTema=i3GEO.arvoreDeCamadas.montaIconesTema(ltema);temp=i3GEO.arvoreDeCamadas.NOTEMAICONES;temp.id=ltema.name;temp.html=textoTema;temp.isLeaf=!i3GEO.arvoreDeCamadas.PERMITEEXPANDIRTEMAS;temaNodeFilho=new YAHOO.widget.HTMLNode(temp,temaNode)}if(ltema.classe!=="NAO"&&this.PERMITEEXPANDIRTEMAS){temaNodeFilho.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraLegenda,1);if(i3GEO.arvoreDeCamadas.LEGENDAEXPANDIDA===true){temaNodeFilho.expand()}}}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){}}if(i3GEO.Interface.ATUAL==="openlayers"&&i3GEO.arvoreDeCamadas.INCLUILFUNDO===true){c=i3GEO.Interface.openlayers.LAYERSADICIONAIS;n=c.length;k="i3GEOarvCamTema";if(navm&&parseInt(YAHOO.env.ua.ie,10)<9){k="i3GEOarvCamTemaIE"}temaNode=new YAHOO.widget.HTMLNode({html:$trad("p16"),isLeaf:false,hasIcon:true},root);for(i=0;i<n;i++){temp="<div class='"+k+"' onclick='i3GEO.Interface.openlayers.ativaFundo(\""+c[i].name+"\")'>"+"<input name=layer type=checkbox ";if(c[i].visibility===true){temp+=" checked "}temp+=" value='"+c[i].name+"' id='CK"+c[i].id+"'/>"+" <label for='CK"+c[i].id+"'>"+c[i].name+"</label></div>";new YAHOO.widget.HTMLNode({html:temp,tipo:"fundo",isLeaf:true,hasIcon:false},temaNode)}}}else{nk=temas.length;c=grupoLayers.length;for(i=0;i<c;i+=1){noGrupo="";if(grupoLayers[i].icone&&grupoLayers[i].icone===true){noGrupo+="<p><input class=inputsb style=cursor:pointer onclick='i3GEO.arvoreDeCamadas.ligaDesligaTemas(\""+i3GEO.configura.grupoLayers[i].layers+"\",this.checked)' type=checkbox title='Ligar/desligar temas do grupo' /> "}noGrupo+="<div class='i3GEOarvCamGrupo'>"+grupoLayers[i].nome+"</div>";n=grupoLayers[i].layers.length;for(j=0;j<n;j+=1){for(k=0;k<nk;k+=1){ltema=temas[k];if(ltema.name===grupoLayers[i].layers[j]&<ema.escondido==="nao"){if(noGrupo!==""){grupoNode=new YAHOO.widget.HTMLNode({enableHighlight:false,hasIcon:false,html:noGrupo,expanded:true},tempNode);noGrupo=""}textoTema=i3GEO.arvoreDeCamadas.montaTextoTema(ltema);if(textoTema!==""){d={expanded:true,hasIcon:false,html:textoTema,idlegenda:ltema.name,tipo:"tema",enableHighlight:false};temaNode=new YAHOO.widget.HTMLNode(d,grupoNode);textoTema=i3GEO.arvoreDeCamadas.montaIconesTema(ltema);temaNodeFilho=new YAHOO.widget.HTMLNode({id:ltema.name,expanded:false,html:textoTema,enableHighlight:false,isLeaf:!this.PERMITEEXPANDIRTEMAS},temaNode);if(ltema.classe!=="NAO"&&this.PERMITEEXPANDIRTEMAS){temaNodeFilho.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraLegenda,1);if(i3GEO.arvoreDeCamadas.LEGENDAEXPANDIDA===true){temaNodeFilho.expand()}}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:true,hasIcon:false,enableHighlight:false,html:"<div class='i3GEOarvCamGrupo'>Outros</div>"},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){textoTema=i3GEO.arvoreDeCamadas.montaTextoTema(ltema);if(textoTema!==""){d={expanded:true,hasIcon:false,html:textoTema,idlegenda:ltema.name,tipo:"tema",enableHighlight:false};temaNode=new YAHOO.widget.HTMLNode(d,grupoNode);textoTema=i3GEO.arvoreDeCamadas.montaIconesTema(ltema);temaNodeFilho=new YAHOO.widget.HTMLNode({id:ltema.name,expanded:false,html:textoTema,enableHighlight:false,isLeaf:!this.PERMITEEXPANDIRTEMAS},temaNode);if(ltema.classe!=="NAO"&&this.PERMITEEXPANDIRTEMAS){temaNodeFilho.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraLegenda,1);if(i3GEO.arvoreDeCamadas.LEGENDAEXPANDIDA===true){temaNodeFilho.expand()}}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)}}}}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.adicionaEventos("NAVEGAMAPA",["i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()"])}i3GEO.eventos.executaEventos(i3GEO.eventos.ATUALIZAARVORECAMADAS)},montaOpcoesArvore:function(){var n,i=null,c,ins="",imb=i3GEO.configura.locaplic+"/imagens/branco.gif",estilo=function(i){return" onmouseout='javascript:this.className = \""+i+" iconeMini iconeGuiaMovelMouseOut\";' onmouseover='javascript:this.className = \""+i+" iconeMini iconeGuiaMovelMouseOver\";' class='"+i+" iconeMini iconeGuiaMovelMouseOut' src='"+imb+"' style='cursor:pointer;text-align:left' "};n=this.CONFIGICONES;for(i in n){c=n[i];if(c.status===true&&c.tipo==="arvore"){ins+="<img "+estilo(c.classe)+" onclick='i3GEO.util.animaClique(this);"+c.funcao+"' title='"+c.title+"' id='"+c.id+"'/>"}}return ins},ligaDesligaTemas:function(lista,status){var c,n,i,aplica=false;lista=lista.split(",");n=lista.length;for(i=0;i<n;i+=1){c=i3GEO.arvoreDeCamadas.capturaCheckBox(lista[i]);if(c){if(c.checked!==status){aplica=true}c.checked=status;if(aplica===true){c.onclick()}}}},ativaDragDrop:function(){var Dom=YAHOO.util.Dom,Event=YAHOO.util.Event;YAHOO.example.DDList="";YAHOO.example.DDApp={init:function(){var i,ltema;if($i("i3geo_lixeira")&&i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){new YAHOO.util.DDTarget("i3geo_lixeira")}i=i3GEO.arvoreDeCamadas.CAMADAS.length-1;if(i3GEO.arvoreDeCamadas.CAMADAS.length-1>=0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if($i("arrastar_"+ltema.name)){new YAHOO.example.DDList("arrastar_"+ltema.name)}}while(i--)}}};YAHOO.example.DDList=function(id,sGroup,config){YAHOO.example.DDList.superclass.constructor.call(this,id,sGroup,config);this.logger=this.logger||YAHOO;YAHOO.util.Dom.setStyle(this.getDragEl(),"opacity",0.67);this.goingUp=false;this.lastY=0};YAHOO.extend(YAHOO.example.DDList,YAHOO.util.DDProxy,{startDrag:function(x,y){var dragEl,clickEl,Dom=YAHOO.util.Dom;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,"padding","5px");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","");$i(proxyid).innerHTML=""});a.animate();YAHOO.util.Dom.setStyle('i3geo_lixeira','border','0px solid blue')},onDragDrop:function(e,id){var pt,region,tema,destEl,els,lista,temp,DDM=YAHOO.util.DragDropMgr,Dom=YAHOO.util.Dom;if(DDM.interactionInfo.drop.length===1){pt=DDM.interactionInfo.point;region=DDM.interactionInfo.sourceRegion;if(!region.intersect(pt)){DDM.refreshCache();if(DDM.getDDById(id).id==="i3geo_lixeira"){if(i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){(new YAHOO.util.Anim("i3geo_lixeira",{opacity:{from:0,to:1}},3,YAHOO.util.Easing.easeOutStrong)).animate();tema=(this.getEl()).id.split("arrastar_")[1];i3GEO.tema.exclui(tema)}}else{if(i3GEO.arvoreDeCamadas.ARRASTARORDEM===true){destEl=Dom.get(id);destEl.appendChild(this.getEl());els=i3GEO.arvoreDeCamadas.listaLigadosDesligados();lista=els[2].join(",");temp=function(retorno){i3GEO.atualiza(retorno);if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ordenaLayers()}i3GEO.arvoreDeCamadas.atualiza(i3GEO.arvoreDeCamadas.CAMADAS,true)};i3GEO.php.reordenatemas(temp,lista)}else{i3GEO.arvoreDeCamadas.atualiza(i3GEO.arvoreDeCamadas.CAMADAS,true)}}}}},onDrag:function(e){var y;y=Event.getPageY(e);if(y<this.lastY){this.goingUp=true}else if(y>this.lastY){this.goingUp=false}this.lastY=y;if(i3GEO.guias.TIPO==="movel"){YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.9)}},onDragOver:function(e,id){var destEl;destEl=YAHOO.util.Dom.get(id);var dragEl=this.getDragEl();Dom.setStyle(dragEl,"border","4px solid red");if($i("i3geo_lixeira")&&id==="i3geo_lixeira"){$i("i3geo_lixeira").style.border="2px solid red"}else{destEl.style.textDecoration="underline"}},onDragOut:function(e,id){$i(id).style.textDecoration="none";var dragEl=this.getDragEl();Dom.setStyle(dragEl,"border","4px solid gray")}});Event.onDOMReady(YAHOO.example.DDApp.init,YAHOO.example.DDApp,true)},montaOpcoes:function(node){},mostraOpcoes:function(node){},adicionaOpcaoTema:function(dica,titulo,onclick,node){var tnome="<a href='#' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+dica+"','');\" onclick="+onclick+">"+titulo+" </a>";new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node)},mostraLegenda:function(node){var retorna,idtema=node.data.id;retorna=function(retorno){var original={data:""},i,re,tabela,linhas,linha,colunas,incluir,elementos,nelementos,inputs,desativar,nindices;if(retorno.data.legenda){original=retorno;retorno=retorno.data.legenda;if(retorno[0]){if((navn)&&(!retorno[0].imagem)){tabela=retorno}else{i=retorno[0].imagem;re=new RegExp("tiff","g");i=i.replace(re,'png');tabela="<img src='"+i+"' />"}retorno=""}else{linhas=retorno.split("#");if(linhas.length>1){linhas=retorno.split("|");tabela="<table>";linha=linhas.length-1;if(linha>=0){do{colunas=linhas[linha].split("#");re=new RegExp("'","g");tabela+="<tr style='border-top:1px solid rgb(240,240,240);'><td><img src='"+colunas[4]+"' </td><td style='text-align:left'>"+colunas[2]+"</td></tr>"}while(linha--)}tabela+="</table><br>"}else{tabela=retorno}}}else{tabela="<img src='"+retorno.data[0].imagem+"' />"}incluir="<div style='text-align:left' id='"+idtema+"verdiv"+"'>"+tabela+"</div>";new YAHOO.widget.HTMLNode({html:incluir,enableHighlight:false,expanded:false},node);node.loadComplete();elementos=document.getElementById(idtema+"verdiv").getElementsByTagName("input");nelementos=elementos.length;inputs=[];i=0;if(nelementos>0){do{if(elementos[i].type==="checkbox"){inputs.push(elementos[i])}i++}while(i<nelementos)}if(original.data.desativar[idtema]){desativar=original.data.desativar[idtema];nindices=desativar.length;i=0;if(nindices>0){do{inputs[desativar[i]].checked=false;i++}while(i<nindices)}}};if(i3GEO.arvoreDeCamadas.TEMPLATELEGENDA!==""){i3GEO.php.criaLegendaHTML(retorna,idtema,i3GEO.arvoreDeCamadas.TEMPLATELEGENDA)}else{i3GEO.php.criaLegendaHTML(retorna,idtema)}},atualizaLegenda:function(idtema){var node;if(document.getElementById(idtema+"verdiv")){node=i3GEO.arvoreDeCamadas.ARVORE.getNodeByProperty("id",idtema);if(node){i3GEO.arvoreDeCamadas.ARVORE.removeChildren(node);this.mostraLegenda(node);if($i("janelaLegenda"+idtema+"_corpo")){i3GEO.tema.mostralegendajanela(idtema,"","abrejanela")}}}},escolheCorClasse:function(leg){var obj,novoel;leg=leg.parentNode.getElementsByTagName("input")[0];if(!$i("tempinputcorclasse")){novoel=document.createElement("input");novoel.id="tempinputcorclasse";novoel.style.display="none";novoel.alt="objeto criado para guardar dados da funcao escolohercorclasse";novoel.onchange="";document.body.appendChild(novoel)}obj=$i("tempinputcorclasse");obj.value="";obj.tema=leg.name;obj.idclasse=leg.value;obj.onchange=function(){var obj=$i("tempinputcorclasse");i3GEO.tema.alteracorclasse(obj.tema,obj.idclasse,obj.value)};i3GEO.util.abreCor("","tempinputcorclasse")},inverteStatusClasse:function(leg){var temp=function(retorno){i3GEO.atualiza();i3GEO.Interface.atualizaTema(retorno,leg.name);var ck="";if(leg.id&&leg.id==="legendack_"+leg.name+"_"+leg.value){ck=$i("liblegendack_"+leg.name+"_"+leg.value)}else if(leg.id&&leg.id==="liblegendack_"+leg.name+"_"+leg.value){ck=$i("legendack_"+leg.name+"_"+leg.value)}if(ck&&ck!=""){ck.checked=leg.checked}};i3GEO.php.inverteStatusClasse(temp,leg.name,leg.value)},montaTextoTema:function(tema){var ck,html,estilo,f;if(tema.status*1===2){ck=' CHECKED '}else{ck=""}f=this.FILTRO;if(f!==""){if(f==="desligados"&&ck!==""){return""}if(f==="ligados"&&ck===""){return""}if(f==="selecionados"&&tema.sel.toLowerCase()!=="sim"){return""}if(f==="download"&&tema.download.toLowerCase()!=="sim"){return""}if(f==="wms"&&tema.connectiontype*1!==7){return""}if(f==="raster"&&tema.type*1!==3){return""}if(f==="toponimia"&&tema.type*1!==4){return""}}estilo="i3GEOarvCamTema";if(navm&&parseInt(YAHOO.env.ua.ie,10)<9){estilo="i3GEOarvCamTemaIE"}html="<div onclick='i3GEO.mapa.ativaTema(\""+tema.name+"\")' id='arrastar_"+tema.name+"' class='"+estilo+"' >";html+="<input type='checkbox' name=\"layer\" value='"+tema.name+"' "+"id='"+tema.name+"ckbox'"+ck+"onclick=\""+i3GEO.arvoreDeCamadas.ATIVATEMA+"\""+" /><label for='"+tema.name+"ckbox' ";if(tema.iconetema!==""&&i3GEO.arvoreDeCamadas.ICONETEMA===true){html+=" <img class='i3GEOiconeTema' src='"+tema.iconetema+"' />"}tema.AGUARDALEGENDA=i3GEO.arvoreDeCamadas.AGUARDALEGENDA;tema=i3GEO.pluginI3geo.aplicaPropriedades(tema);estilo="";if(tema.AGUARDALEGENDA){html+=" id='ArvoreTituloTema"+tema.name+"' style='position:relative;top:2px;'"+" 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}else{html+=" id='ArvoreTituloTema"+tema.name+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t7")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+tema.tema}html+="</label></div>";if(i3GEO.tema.TEMPORIZADORESID[tema.name]==undefined&&tema.temporizador!=""){i3GEO.tema.temporizador(tema.name,tema.temporizador)}return(html)},montaIconesTema:function(tema){var iconePlugin,n,i=null,c,html,estilo,farol,mfarol,imb=i3GEO.configura.locaplic+"/imagens/branco.gif";estilo="i3GEOarvCamTemaIco";if(navm&&parseInt(YAHOO.env.ua.ie,10)<9){estilo="i3GEOarvCamTemaIcoIE"}html="<div class='"+estilo+"' >";tema=i3GEO.pluginI3geo.aplicaPropriedades(tema);if(tema.escala!=0){farol="maisamarelo.png";mfarol="";if(tema.escala*1<i3GEO.parametros.mapscale*1){farol="maisverde.png";mfarol=$trad("t9")}if(tema.escala*1>i3GEO.parametros.mapscale*1){farol="maisvermelho.png";mfarol=$trad("t10")}if(tema.escala===0){farol="maisamarelo.png";mfarol=$trad("t11")}html+=" <img class='arvCamFarol' id='farol"+tema.name+"' src='"+i3GEO.configura.locaplic+"/imagens/"+farol+"' title='"+mfarol+"' />"}this.CONFIGICONES.zoomtema.flag=false;if(tema.zoomtema.toLowerCase()==="sim"){this.CONFIGICONES.zoomtema.flag=true}this.CONFIGICONES.contextoescala.flag=false;if(tema.contextoescala.toLowerCase()==="sim"){this.CONFIGICONES.contextoescala.flag=true}this.CONFIGICONES.selecionado.flag=false;this.CONFIGICONES.zoomsel.flag=false;if(tema.sel.toLowerCase()==="sim"){this.CONFIGICONES.selecionado.flag=true;this.CONFIGICONES.zoomsel.flag=true}this.CONFIGICONES.link.flag=false;if(tema.link_tema!=""&&tema.features.toLowerCase()!=="sim"&&tema.name!="mundo"){this.CONFIGICONES.link.flag=true}this.CONFIGICONES.download.flag=false;if(tema.download.toLowerCase()==="sim"||tema.download===""&&tema.features.toLowerCase()!=="sim"){this.CONFIGICONES.download.flag=true}n=this.CONFIGICONES;for(i in n){c=n[i];if(c.status===true&&c.tipo==="tema"&&c.flag===true){html+="<img "+"class='"+c.classe+"' onclick='i3GEO.util.animaClique(this);"+c.funcao+"(\""+tema.name+"\",true,\""+tema.link_tema+"\")"+"' title='"+c.title+"' id='"+c.id+"' src='"+imb+"'/>"}}if(tema.plugini3geo){iconePlugin=i3GEO.pluginI3geo.iconeArvoreDeCamadas(tema);if(iconePlugin){html+=iconePlugin}}html+="</div>";return(html)},atualizaFarol:function(mapscale){var farol,l,ltema,escala,iu=i3GEO.util,im=i3GEO.configura.locaplic+"/imagens/",camadas=i3GEO.arvoreDeCamadas.CAMADAS;farol="maisamarelo.png";l=camadas.length-1;if(l>=0){do{ltema=camadas[l];escala=ltema.escala;if(escala*1<mapscale*1){farol="maisverde.png"}if(escala*1>mapscale*1){farol="maisvermelho.png"}if(escala*1===0){farol="maisamarelo.png"}iu.defineValor("farol"+ltema.name,"src",im+farol)}while(l--)}},aplicaTemas:function(tipo){if(arguments.length===0){tipo="normal"}var t="",temp;if(tipo==="normal"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("mantem")}if(tipo==="ligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("marca");if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googleearth","openlayers","googlemaps"])){return}}if(tipo==="desligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("desmarca");if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googleearth","openlayers","googlemaps"])){return}}temp=function(){i3GEO.atualiza();i3GEO.janela.fechaAguarde("redesenha")};if(tipo==="normal"){i3GEO.php.ligatemas(temp,t[1].toString(),t[0].toString());return}if(tipo==="ligartodos"){i3GEO.php.ligatemas(temp,"",t[2].toString());return}if(tipo==="desligartodos"){i3GEO.php.ligatemas(temp,t[2].toString(),"")}},listaLigadosDesligados:function(tipo){if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return[[],[],[]]}if(arguments.length===0){tipo="manter"}var no,cs,csn,j,c,nos=i3GEO.arvoreDeCamadas.ARVORE.getNodesByProperty("tipo","tema"),ligados=[],desligados=[],todos=[],n=nos.length,i=0,ATUAL=i3GEO.Interface.ATUAL;do{try{no=nos[i].getEl();cs=no.getElementsByTagName("input");csn=cs.length;for(j=0;j<csn;j+=1){c=cs[j];if(c.name==="layer"){c.checked===true?ligados.push(c.value):desligados.push(c.value);todos.push(c.value);if(tipo==="marca"){c.checked=true;if(i3GEO.util.in_array(ATUAL,["googleearth","openlayers","googlemaps"])){i3GEO.Interface[ATUAL].ligaDesliga(c)}}if(tipo==="desmarca"){c.checked=false;if(i3GEO.util.in_array(ATUAL,["googleearth","openlayers","googlemaps"])){i3GEO.Interface[ATUAL].ligaDesliga(c)}}}}i++}catch(e){i+=1}}while(i<n);return([ligados,desligados,todos])},capturaCheckBox:function(tema){if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return}var nos,n,i,no,cs,csn,j,c;nos=i3GEO.arvoreDeCamadas.ARVORE.getNodesByProperty("tipo","tema");n=nos.length;i=0;do{try{no=nos[i].getEl();cs=no.getElementsByTagName("input");csn=cs.length;for(j=0;j<csn;j+=1){c=cs[j];if(c.name==="layer"&&c.value===tema){return c}}i+=1}catch(e){i+=1}}while(i<n);return(null)},comparaTemas:function(novo,atual){try{var novon=novo.length,i;if(novon!==atual.length){return(false)}for(i=0;i<novon;i+=1){if(novo[i].name!==atual[i].name){return(false)}if(novo[i].tema!==atual[i].tema){return(false)}if(novo[i].sel!==atual[i].sel){return(false)}if(novo[i].status!==atual[i].status){return(false)}}return(true)}catch(e){return true}},pegaTema:function(valor,camadas,parametro){var i;if(!camadas||camadas==""){camadas=i3GEO.arvoreDeCamadas.CAMADAS}else{camadas=i3GEO.arvoreDeCamadas.converteChaveValor2normal(camadas)}if(!parametro){parametro="name"}i=camadas.length;while(i>0){i-=1;if(camadas[i][parametro]===valor){return camadas[i]}}return""},filtraCamadas:function(propriedade,valor,operador,camadas){if(!camadas){camadas=i3GEO.arvoreDeCamadas.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+"".toLowerCase()==valor+"".toLowerCase()){resultado.push(ltema)}}if(operador==="diferente"){if(temp+"".toLowerCase()!==valor+"".toLowerCase()){resultado.push(ltema)}}if(operador==="menor"){if(temp+"".toLowerCase()<valor+"".toLowerCase()){resultado.push(ltema)}}}i+=1}while(i<nelementos)}return resultado},alteraPropCamadas:function(propriedade,valor,camada){var i=0,nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if(ltema.name===camada){ltema[propriedade]=valor}i+=1}while(i<nelementos)}},verificaAbrangenciaTemas:function(){if(i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS===false){return}try{var i=0,temp,nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];temp=ltema.exttema;if(temp!==""){if(i3GEO.util.intersectaBox(temp,i3GEO.parametros.mapexten)===false){$i("ArvoreTituloTema"+ltema.name).style.color="gray"}else{$i("ArvoreTituloTema"+ltema.name).style.color="black"}}i+=1}while(i<nelementos)}}catch(e){}},verificaAplicaExtensao:function(){var i=0,temp="",nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;try{if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if(ltema.aplicaextensao.toLowerCase()==="sim"){temp=ltema.name}i+=1}while(i<nelementos)}}catch(e){return""}return temp},converteChaveValor2normal:function(obj){if(obj.chaves){var i,tema,j,t,chaves=obj.chaves,temas=obj.valores,ntemas=temas.length,nchaves=chaves.length,novo=[];for(i=0;i<ntemas;i++){tema=temas[i];t={};for(j=0;j<nchaves;j++){t[chaves[j]]=tema[j]}novo.push(t)}return novo}else{return obj}},registaCamadas:function(obj){obj=i3GEO.arvoreDeCamadas.converteChaveValor2normal(obj);i3GEO.arvoreDeCamadas.CAMADAS=obj},ajudaEmLista:function(){var n,i=null,ins="",b,imb=i3GEO.configura.locaplic+"/imagens/branco.gif",g;n=i3GEO.arvoreDeCamadas.CONFIGICONES;ins+="<table class=lista8 >";for(i in n){b=n[i];if(b.dica!=""){if(b.icone!=""){g="<img src='"+i3GEO.configura.locaplic+"/"+b.icone+"' />"}else{g="<img src='"+imb+"' class='"+b.classe+"'/>"}ins+="<tr><td>"+g+"</td><td>"+b.dica+"</td></tr>"}}ins+="</table>";i3GEO.janela.mensagemSimples("<div style='overflow:auto;height:100%'>"+ins+"</div>","")},dialogo:{filtro:function(){i3GEO.util.dialogoFerramenta("i3GEO.arvoreDeCamadas.dialogo.filtro()","filtroarvore","filtroarvore","dependencias.php","i3GEOF.filtroarvore.iniciaJanelaFlutuante()")},excluir:function(){i3GEO.util.dialogoFerramenta("i3GEO.arvoreDeCamadas.dialogo.excluir()","excluirarvore","excluirarvore")}}}; |
| ... | ... | @@ -267,7 +267,7 @@ if(typeof(i3GEO)==='undefined'){var i3GEO={}}objposicaocursor={ddx:"",ddy:"",dms |
| 267 | 267 | if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.arvoreDeTemas={IDHTML:"arvoreAdicionaTema",ARVORE:null,FATORESTRELA:10,OPCOESADICIONAIS:{incluiArvore:true,uploaddbf:true,uploadlocal:true,uploadarquivo:true,downloadbase:true,conectarwms:true,conectarwmst:true,conectargeorss:true,conectargeojson:true,nuvemTags:true,nuvemTagsFlash:false,navegacaoDir:true,incluibusca:true,kml:true,qrcode:true,mini:true,estrelas:true,refresh:true,carousel:true,inde:true,uploadgpx:true,comentarios:true,bookmark:true,importarwmc:true,googleearth:true,carregaKml:true,flutuante:true,metaestat:true,idonde:""},INCLUISISTEMAS:true,INCLUIWMS:true,INCLUIREGIOES:true,INCLUIINDIBR:true,INCLUIWMSMETAESTAT:true,INCLUIMAPASCADASTRADOS:true,INCLUIESTRELAS:true,FILTRADOWNLOAD:false,FILTRAOGC:false,TIPOBOTAO:"checkbox",ATIVATEMA:"",IDSMENUS:[],RETORNAGUIA:"",DRIVES:null,SISTEMAS:null,MENUS:null,GRUPOS:null,SUBGRUPOS:null,TEMAS:null,LOCAPLIC:null,SID:null,flutuante:function(){var janela,temp,cabecalho,minimiza,idold,corpo,altura;cabecalho=function(){};if($i("i3GEOFcatalogo_corpo")){return}minimiza=function(){i3GEO.janela.minimiza("i3GEOFcatalogo")};altura=i3GEO.parametros.w-150;if(altura>500){altura=500}janela=i3GEO.janela.cria("360px",altura+"px","","","","<span class='i3GEOiconeFerramenta i3GEOiconeCatalogo'></span>"+$trad("g1a"),"i3GEOFcatalogo",false,"hd",cabecalho,minimiza);temp=function(){delete(i3GEO.arvoreDeTemas.ARVORE)};YAHOO.util.Event.addListener(janela[0].close,"click",temp);corpo=$i("i3GEOFcatalogo_corpo");corpo.style.backgroundColor="white";corpo.innerHTML=$trad("o1");corpo.style.overflow="auto";if($i(i3GEO.arvoreDeTemas.IDHTML)){$i(i3GEO.arvoreDeTemas.IDHTML).innerHTML=""}idold=i3GEO.arvoreDeTemas.IDHTML;delete(i3GEO.arvoreDeTemas.ARVORE);i3GEO.arvoreDeTemas.IDHTML="i3GEOFcatalogo_corpo";i3GEO.arvoreDeTemas.cria(i3GEO.configura.sid,i3GEO.configura.locaplic,"");window.setTimeout("i3GEO.arvoreDeTemas.IDHTML = '"+idold+"';",520)},listaWMS:function(){var monta=function(retorno){var node,raiz,nraiz,i,html,tempNode;node=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("idwms","raiz");raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i+=1){html="<span title='"+raiz[i].description+"'> "+raiz[i].title;if(raiz[i].nacessos>0){html+=" ("+((raiz[i].nacessosok*100)/(raiz[i].nacessos*1))+"%)</span>"}else{html+=" (% de acessos não definido)</span>"}html+="<hr>";tempNode=new YAHOO.widget.HTMLNode({html:html,id_ws:raiz[i].id_ws,tipo_ws:raiz[i].tipo_ws,url:raiz[i].link,nivel:0,expanded:false,hasIcon:true,enableHighlight:true,className:"i3GeoFolder"},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS,1)}node.loadComplete()};i3GEO.php.listaRSSwsARRAY(monta,"WMS")},listaRegioes:function(){var monta=function(retorno){var node,nraiz,i,html;node=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("idregioes","raiz");nraiz=retorno.length;for(i=0;i<nraiz;i+=1){tema={"nameInput":"regioesmetaestat","tid":"metaregiao_"+retorno[i].codigo_tipo_regiao,"nome":retorno[i].nome_tipo_regiao},html=i3GEO.arvoreDeTemas.montaTextoTema("gray",tema),new YAHOO.widget.HTMLNode({isleaf:true,html:html,expanded:false,hasIcon:true,className:"i3GeoFolder",enableHighlight:false,tipoa_tema:"METAREGIAO",codigo_tipo_regiao:retorno[i].codigo_tipo_regiao,idtema:"metaregiao_"+retorno[i].codigo_tipo_regiao},node)}node.loadComplete()};i3GEO.php.listaTipoRegiao(monta)},listaMapasCadastrados:function(){var monta=function(retorno){var node,nraiz,i,html,tema;retorno=retorno.data.mapas;node=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("idmapacadastrado","raiz");nraiz=retorno.length;for(i=0;i<nraiz;i+=1){tema={"nameInput":"mapaCadastrado","tid":"mapaCadastrado_"+retorno[i].ID_MAPA,"nome":retorno[i].NOME},html=i3GEO.arvoreDeTemas.montaTextoTema("gray",tema),new YAHOO.widget.HTMLNode({id_mapaCadastrado:retorno[i].ID_MAPA,html:html,expanded:false,hasIcon:true,enableHighlight:true},node)}node.loadComplete()};i3GEO.php.pegaMapas(monta)},listaVariaveisMetaestat:function(){var monta=function(retorno){var node,nraiz,i,html,tempNode;node=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("idwmsmetaestat","raiz");nraiz=retorno.length;for(i=0;i<nraiz;i+=1){html="<span title='"+retorno[i].descricao+"'> "+retorno[i].nome;html+="<hr>";tempNode=new YAHOO.widget.HTMLNode({codigo_variavel:retorno[i].codigo_variavel,html:html,expanded:false,hasIcon:true,enableHighlight:true,className:"i3GeoFolder"},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaMedidasVariavel,1)}node.loadComplete()};i3GEO.php.listaVariavel(monta)},listaMedidasVariavel:function(node){var monta=function(retorno){var tema,html,i,n;n=retorno.length;for(i=0;i<n;i++){tema={"nameInput":"metaestat","id_medida_variavel":retorno[i].id_medida_variavel,"tid":"metaestat_"+retorno[i].id_medida_variavel,"nome":retorno[i].nomemedida},html=i3GEO.arvoreDeTemas.montaTextoTema("gray",tema),new YAHOO.widget.HTMLNode({isleaf:true,html:html,expanded:false,hasIcon:true,enableHighlight:true,tipoa_tema:"META",idtema:"metaestat_"+retorno[i].id_medida_variavel,id_medida_variavel:retorno[i].id_medida_variavel},node)}node.loadComplete()};i3GEO.php.listaMedidaVariavel(node.data.codigo_variavel,monta)},listaLayersWMS:function(node){var monta=function(retorno){var n,cor,i,cabeca,tempNode,ns,j,temp;n=0;try{n=retorno.data.length}catch(m){node.loadComplete();return}cor="rgb(51, 102, 102)";html="";for(i=0;i<n;i+=1){temp=retorno.data[i];cabeca=temp.nome+" - "+temp.titulo;if(cabeca!=="undefined - undefined"){tempNode=new YAHOO.widget.HTMLNode({html:"<span style='color:"+cor+"' >"+cabeca,url:node.data.url,nivel:(node.data.nivel*1+1),id_ws:"",layer:temp.nome,enableHighlight:false,expanded:false,hasIcon:true},node);if(!temp.estilos){tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS,1)}if(temp.estilos){ns=temp.estilos.length;for(j=0;j<ns;j+=1){new YAHOO.widget.HTMLNode({html:i3GEO.arvoreDeTemas.montaTextoTemaWMS(node.data.url,temp.nome,temp.estilos[j].nome,temp.estilos[j].titulo,temp.srs.toString(),temp.formatsinfo.toString(),temp.version.toString(),temp.formats.toString(),cor),enableHighlight:false,expanded:false,hasIcon:true},tempNode);tempNode.isleaf=true}}cor=(cor==="rgb(51, 102, 102)")?"rgb(47, 70, 50)":"rgb(51, 102, 102)"}}node.loadComplete()};i3GEO.php.listaLayersWMS(monta,node.data.url,(node.data.nivel*1+1),node.data.id_ws,node.data.layer,node.data.tipo_ws)},montaTextoTemaWMS:function(servico,layer,estilo,titulo,proj,formatoinfo,versao,formatoimg,cor,link){var html,temp,adiciona;html="<td style='vertical-align:top;padding-top:5px;'><span ><input style='cursor:pointer;border:solid 0 white;' ";temp=function(){i3GEO.janela.fechaAguarde("ajaxredesenha");i3GEO.atualiza()};adiciona="i3GEO.php.adicionaTemaWMS("+temp+","+"\""+servico+"\","+"\""+layer+"\","+"\""+estilo+"\","+"\""+proj+"\","+"\""+formatoimg+"\","+"\""+versao+"\","+"\""+titulo+"\","+"\"\","+"\"nao\","+"\""+formatoinfo+"\","+"\"\","+"\"\","+"this.checked)";html+="onclick='javascript:"+adiciona+"' "+" type='radio' /></td><td style='padding-top:4px;vertical-align:top;text-align:left;padding-left:3px;color:"+cor+";' >";if(link){html+="<a href='"+link+"' target=_blank >"+layer+" - "+titulo+"</a>"}else{html+=layer+" - "+titulo}html+="</td></span>";return(html)},listaMenus:function(g_sid,g_locaplic,funcao){var r=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+"(arguments[0]);")}};i3GEO.php.pegalistademenus(r)},listaGrupos:function(g_sid,g_locaplic,id_menu,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.GRUPOS=retorno.data;if(funcao!==""){funcao.call()}};if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD||i3GEO.arvoreDeTemas.FILTRAOGC){i3GEO.php.pegalistadegrupos(retorno,id_menu,"sim")}else{i3GEO.php.pegalistadegrupos(retorno,id_menu,"nao")}},listaSubGrupos:function(g_sid,g_locaplic,id_menu,id_grupo,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.SUBGRUPOS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegalistadeSubgrupos(retorno,id_menu,id_grupo)},listaTemas:function(g_sid,g_locaplic,id_menu,id_grupo,id_subgrupo,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.TEMAS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegalistadetemas(retorno,id_menu,id_grupo,id_subgrupo)},listaSistemas:function(g_sid,g_locaplic,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.SISTEMAS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegaSistemas(retorno)},listaDrives:function(g_sid,g_locaplic,funcao){var retorno=function(retorno){try{i3GEO.arvoreDeTemas.DRIVES=retorno.data.drives;if(i3GEO.arvoreDeTemas.DRIVES==""){return}if(funcao!==""){funcao.call()}}catch(e){i3GEO.arvoreDeTemas.DRIVES=""}};i3GEO.php.listadrives(retorno)},listaEstrelas:function(node){var montanos=function(retorno){try{var ig,montaTexto=function(ngSgrupo){var tempn,ngTema,tempng,mostra,d,lk="",st,sg;tempn=ngSgrupo.length;for(sg=0;sg<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;try{if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}}catch(e){}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'> fonte</a>"}if(ngSgrupo[sg].subgrupo){d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>"}else{d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].grupo)+")"+lk+"</td>"}tempNode=new YAHOO.widget.HTMLNode({html:d,expanded:false,hasIcon:true,isLeaf:true,enableHighlight:true},node)}conta+=1}}};if(!retorno.data){i3GEO.janela.tempoMsg("Ocorreu um erro")}else{retorno=retorno.data;conta=0;if((retorno!=="erro")&&(typeof(retorno)!=='undefined')){ig=retorno.length-1;if(ig>=0){do{montaTexto([retorno[ig]]);montaTexto(retorno[ig].subgrupos)}while(ig--)}else{tempNode=new YAHOO.widget.HTMLNode({html:"<span style='color:red'>Nada encontrado<br><br></span>",isLeaf:true,expanded:false,hasIcon:true,enableHighlight:false},node)}}}node.loadComplete()}catch(e){}};i3GEO.php.procurartemasestrela(montanos,node.data.nivel,i3GEO.arvoreDeTemas.FATORESTRELA*1)},cria:function(g_sid,g_locaplic,idhtml,funcaoTema,objOpcoes,tipoBotao){if(i3GEO.arvoreDeTemas.ARVORE){return}if(!idhtml){idhtml=""}if(idhtml!==""){i3GEO.arvoreDeTemas.IDHTML=idhtml}if(!funcaoTema){funcaoTema=""}if(funcaoTema!==""){i3GEO.arvoreDeTemas.ATIVATEMA=funcaoTema}if(!objOpcoes){objOpcoes=""}if(objOpcoes!==""){i3GEO.arvoreDeTemas.OPCOESADICIONAIS=objOpcoes}if(!tipoBotao){tipoBotao=""}if(tipoBotao!==""){i3GEO.arvoreDeTemas.TIPOBOTAO=tipoBotao}i3GEO.arvoreDeTemas.LOCAPLIC=g_locaplic;i3GEO.arvoreDeTemas.SID=g_sid;if(i3GEO.arvoreDeTemas.IDHTML===""){return}i3GEO.arvoreDeTemas.listaMenus(g_sid,g_locaplic,"i3GEO.arvoreDeTemas.montaArvore")},atualiza:function(){if($i(i3GEO.arvoreDeTemas.IDHTML)){i3GEO.arvoreDeTemas.ARVORE=null;i3GEO.arvoreDeTemas.cria(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,i3GEO.arvoreDeTemas.IDHTML)}},montaArvore:function(){var mais="",tempNode,tempNode1,retorno,root,insp,outrasOpcoes,dados,c,i,j,conteudo,editor;(function(){function changeIconMode(){buildTree()}function buildTree(){i3GEO.arvoreDeTemas.ARVORE=new YAHOO.widget.TreeView(i3GEO.arvoreDeTemas.IDHTML)}buildTree()})();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluibusca===true){insp="<table><tr>"+"<td><span style='font-size:12px'> "+$trad("a1")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=31' > </a></span></td>"+"<td>"+"<div><input onclick='javascript:this.select();' class='digitar' type='text' id='i3geo_buscatema' style=width:112px; value='' /></div>"+"</td>"+"<td><img class='tic' ";if(navm){insp+="style='top:0px;'"}else{insp+="style='top:4px;'"}insp+=" src='"+i3GEO.configura.locaplic+"/imagens/branco.gif"+"' onclick='i3GEO.util.animaClique(this);i3GEO.arvoreDeTemas.buscaTema2(document.getElementById(\"i3geo_buscatema\").value)' /></td>";insp+="</tr></table> ";tempNode=new YAHOO.widget.HTMLNode({html:insp,enableHighlight:false,expanded:false,hasIcon:false},root)}tempNode=new YAHOO.widget.HTMLNode({html:"<b>"+$trad("g1a")+"</b>",idmenu:"",enableHighlight:false,expanded:false,hasIcon:false},root);outrasOpcoes=i3GEO.arvoreDeTemas.outrasOpcoesHTML();if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde!==""){document.getElementById(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde).innerHTML=outrasOpcoes}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore===true){tempNode=new YAHOO.widget.HTMLNode({html:outrasOpcoes+" <br>",isLeaf:true,enableHighlight:true,expanded:false,hasIcon:true},root)}if(i3GEO.parametros.editor==="sim"){tempNode=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='"+$trad("x7")+"' href='../admin' target=blank >"+$trad("x8")+"</a>",idmenu:"",enableHighlight:false,expanded:false},root);tempNode=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='"+$trad("x7")+"' href='../admin/html/arvore.html' target=blank >"+$trad("x9")+"</a>",idmenu:"",enableHighlight:false,expanded:false},root);tempNode=new YAHOO.widget.HTMLNode({html:"<span style='color:red;cursor:pointer' title='"+$trad("x7")+"' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/menus.html\")' target=blank >"+$trad("x10")+"</span>",idmenu:"",enableHighlight:false,expanded:false},root)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.googleearth===true){tempNode=new YAHOO.widget.HTMLNode({html:"<a href='"+i3GEO.configura.locaplic+"/kml.php?tipoxml=kml' target=blank > <img src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' class='abregoogleearth'> "+$trad("a13")+"</a>",idmenu:"",enableHighlight:false,expanded:false,hasIcon:true},root)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.flutuante===true){tempNode=new YAHOO.widget.HTMLNode({html:"<a href='#' onclick='i3GEO.arvoreDeTemas.flutuante()' >Abrir em janela flutuante</a><br>",idmenu:"",enableHighlight:false,expanded:false,hasIcon:true},root)}if(i3GEO.arvoreDeTemas.INCLUISISTEMAS===true||i3GEO.arvoreDeTemas.INCLUIESTRELAS===true||i3GEO.arvoreDeTemas.INCLUIMAPASCADASTRADOS===true||i3GEO.arvoreDeTemas.INCLUIWMS===true||i3GEO.arvoreDeTemas.INCLUIREGIOES===true||i3GEO.arvoreDeTemas.INCLUIWMSMETAESTAT===true){mais=new YAHOO.widget.HTMLNode({html:$trad("mais"),enableHighlight:false,expanded:false,idmais:"idmais",className:"i3GeoFolder"},root);if(i3GEO.arvoreDeTemas.INCLUIWMS===true){if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar lista' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/webservices.html?tipo=WMS\")' style='width:11px;position:relative;left:3px' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}tempNode=new YAHOO.widget.HTMLNode({html:"<span style='position:relative;'>OGC-WMS</span>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=33' > </a>"+editor,idwms:"raiz",expanded:false,className:"i3GeoFolder",enableHighlight:true},mais);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaWMS,1)}if(i3GEO.arvoreDeTemas.INCLUIREGIOES===true){tempNode=new YAHOO.widget.HTMLNode({html:"<span style='position:relative;'>"+$trad("x87")+"</span>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=33' > </a>",idregioes:"raiz",expanded:false,className:"i3GeoFolder",enableHighlight:true},mais);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaRegioes,1)}if(i3GEO.arvoreDeTemas.INCLUIWMSMETAESTAT===true){tempNode=new YAHOO.widget.HTMLNode({html:"<span style='position:relative;'>"+$trad("x57")+"</span>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=112' > </a>",idwmsmetaestat:"raiz",expanded:false,className:"i3GeoFolder",enableHighlight:true},mais);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaVariaveisMetaestat,1)}if(i3GEO.arvoreDeTemas.INCLUIMAPASCADASTRADOS===true){tempNode=new YAHOO.widget.HTMLNode({html:"<span style='position:relative;'>"+$trad("x90")+"</span>",idmapacadastrado:"raiz",expanded:false,className:"i3GeoFolder",enableHighlight:true},mais);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaMapasCadastrados,1)}if(i3GEO.arvoreDeTemas.INCLUIESTRELAS===true){tempNode=new YAHOO.widget.HTMLNode({expanded:false,html:"<span style='position:relative;' >"+$trad("t46")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=95' > </a>",enableHighlight:false,className:"i3GeoFolder"},mais);ig=5;do{tempNode1=new YAHOO.widget.HTMLNode({expanded:false,html:"<img src='"+i3GEO.configura.locaplic+"/imagens/e"+ig+".png ' />",enableHighlight:true,nivel:ig},tempNode);tempNode1.setDynamicLoad(i3GEO.arvoreDeTemas.listaEstrelas,1);ig-=1}while(ig>0)}if(i3GEO.arvoreDeTemas.INCLUISISTEMAS){retorno=function(){var sis,iglt,tempNode,ig,nomeSis,sisNode,funcoes,tempf,ig2,abre,nomeFunc;try{sis=i3GEO.arvoreDeTemas.SISTEMAS;iglt=sis.length;tempNode=new YAHOO.widget.HTMLNode({html:$trad("a11")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=34' > </a>",expanded:false,enableHighlight:false},mais)}catch(e){i3GEO.arvoreDeTemas.ARVORE.draw();return}ig=0;if(sis.length>0){do{nomeSis=sis[ig].NOME;if(sis[ig].PUBLICADO){if(sis[ig].PUBLICADO.toLowerCase()==="nao"){nomeSis="<span style='color:red'>"+sis[ig].NOME+"</span>"}}sisNode=new YAHOO.widget.HTMLNode({html:nomeSis,expanded:false,enableHighlight:false},tempNode);funcoes=sis[ig].FUNCOES;tempf=funcoes.length;for(ig2=0;ig2<tempf;ig2+=1){abre="i3GEO.janela.cria('"+(funcoes[ig2].W)+"px','"+(funcoes[ig2].H)+"px','"+(funcoes[ig2].ABRIR)+"','','','"+$trad("a11")+"')";nomeFunc="<a href='#' onclick=\""+abre+"\">"+funcoes[ig2].NOME+"</a>";new YAHOO.widget.HTMLNode({html:nomeFunc,expanded:false,enableHighlight:false,isLeaf:true},sisNode)}ig+=1}while(ig<iglt)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir===false){i3GEO.arvoreDeTemas.ARVORE.draw()}else{i3GEO.arvoreDeTemas.adicionaNoNavegacaoDir()}};i3GEO.arvoreDeTemas.listaSistemas(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,retorno)}}if(i3GEO.arvoreDeTemas.INCLUIINDIBR===true){var temp=function(){i3GEOF.vinde.inicia("",i3GEO.arvoreDeTemas.ARVORE)};i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/vinde/index.js",temp,"i3GEOF.vinde_script")}dados=i3GEO.arvoreDeTemas.MENUS;c=dados.length;for(i=0,j=c;i<j;i+=1){if(!dados[i].nomemenu){dados[i].nomemenu=dados[i].idmenu}if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar grupos' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+dados[i].idmenu+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}if(!dados[i].publicado){dados[i].publicado="sim"}if(dados[i].publicado.toLowerCase()!=="nao"){conteudo="<span style='position:relative;' title='"+(dados[i].desc)+"'>"+dados[i].nomemenu+"</span>"+editor}else{conteudo="<span title='nao publicado' style='color:red'>"+dados[i].nomemenu+"</span>"+editor}tempNode=new YAHOO.widget.HTMLNode({html:conteudo,idmenu:dados[i].idmenu,enableHighlight:true,expanded:false,className:"i3GeoFolder"},root);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaGrupos,1);if(dados[i].status==="aberto"){tempNode.expand()}}document.getElementById(i3GEO.arvoreDeTemas.IDHTML).style.textAlign="left";if(!i3GEO.arvoreDeTemas.INCLUISISTEMAS){if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir===false){i3GEO.arvoreDeTemas.ARVORE.draw()}else if(mais!=""){i3GEO.arvoreDeTemas.adicionaNoNavegacaoDir()}}},adicionaNoNavegacaoDir:function(drives,arvore){var temp=function(){var iglt,ig,drive,tempNode;if(!drives){drives=i3GEO.arvoreDeTemas.DRIVES}if(!arvore){arvore=i3GEO.arvoreDeTemas.ARVORE}if(drives==undefined||drives==""||drives.length===0){arvore.draw();return}iglt=drives.length;tempNode=new YAHOO.widget.HTMLNode({html:""+$trad("a6")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=32' > </a>",enableHighlight:true,expanded:false,className:"i3GeoFolder"},i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("idmais","idmais"));ig=0;do{drive=new YAHOO.widget.HTMLNode({listaShp:true,listaImg:true,listaFig:false,html:drives[ig].nome,caminho:drives[ig].caminho,enableHighlight:true,expanded:false,className:"i3GeoFolder"},tempNode);drive.setDynamicLoad(i3GEO.arvoreDeTemas.montaDir,1);ig+=1}while(ig<iglt);arvore.draw()};i3GEO.arvoreDeTemas.listaDrives(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,temp)},montaGrupos:function(node){var temp=function(){var grupos,c,raiz,nraiz,mostra,i,d,editor;grupos=i3GEO.arvoreDeTemas.GRUPOS.grupos;c=grupos.length-3;raiz=grupos[c].temasraiz;nraiz=raiz.length;for(i=0;i<nraiz;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&raiz[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&raiz[i].ogc==="nao"){mostra=false}if(mostra&&raiz[i].nome!=""){tempNode=new YAHOO.widget.HTMLNode({isLeaf:false,enableHighlight:false,expanded:false,html:i3GEO.arvoreDeTemas.montaTextoTema("gray",raiz[i])},node)}}for(i=0;i<c;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&grupos[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&grupos[i].ogc==="nao"){mostra=false}if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar subgrupos' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+node.data.idmenu+"&id_grupo="+grupos[i].id_n1+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}if(mostra&&grupos[i].nome!=undefined){if(grupos[i].publicado){if(grupos[i].publicado==="NAO"){grupos[i].nome="<span title='nao publicado' style='color:red'>"+grupos[i].nome+"</span>"}}d={html:"<span style='position:relative;'>"+grupos[i].nome+editor+"</span>",idmenu:node.data.idmenu,className:"i3GeoFolder",idgrupo:i};if(grupos[i].id_n1){d={html:grupos[i].nome+editor,idmenu:node.data.idmenu,className:"i3GeoFolder",idgrupo:grupos[i].id_n1}}tempNode=new YAHOO.widget.HTMLNode(d,node,false,true);tempNode.enableHighlight=true;tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaSubGrupos,1);tempNode.isLeaf=false}}node.loadComplete()};i3GEO.arvoreDeTemas.listaGrupos(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,temp)},montaSubGrupos:function(node){var temp=function(){var i,c,mostra,d,tempNode,nraiz,subgrupos,raiz;subgrupos=i3GEO.arvoreDeTemas.SUBGRUPOS.subgrupo;c=subgrupos.length;raiz=i3GEO.arvoreDeTemas.SUBGRUPOS.temasgrupo;nraiz=raiz.length;for(i=0;i<nraiz;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&raiz[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&raiz[i].ogc==="nao"){mostra=false}if(mostra){tempNode=new YAHOO.widget.HTMLNode({nacessos:raiz[i].nacessos,html:i3GEO.arvoreDeTemas.montaTextoTema("gray",raiz[i]),idtema:raiz[i].tid,fonte:raiz[i].link,ogc:raiz[i].ogc,kmz:raiz[i].kmz,permitecomentario:raiz[i].permitecomentario,download:raiz[i].download,expanded:false,enableHighlight:false,isLeaf:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.propTemas,1)}}for(i=0;i<c;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&subgrupos[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&subgrupos[i].ogc==="nao"){mostra=false}if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar temas' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+node.data.idmenu+"&id_grupo="+node.data.idgrupo+"&id_subgrupo="+subgrupos[i].id_n2+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}if(mostra&&subgrupos[i].nome!=undefined){if(subgrupos[i].publicado){if(subgrupos[i].publicado==="NAO"){subgrupos[i].nome="<span title='nao publicado' style='color:red'>"+subgrupos[i].nome+"</span>"}}d={html:"<span style='position:relative;'>"+subgrupos[i].nome+editor+"</span>",idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,className:"i3GeoFolder",idsubgrupo:i};if(subgrupos[i].id_n2){d={html:subgrupos[i].nome+editor,idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,idsubgrupo:subgrupos[i].id_n2,className:"i3GeoFolder"}}tempNode=new YAHOO.widget.HTMLNode(d,node,false,true);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaTemas,1);tempNode.isLeaf=false;tempNode.enableHighlight=true}}node.loadComplete()};i3GEO.arvoreDeTemas.listaSubGrupos(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,node.data.idgrupo,temp)},montaTemas:function(node){var temp=function(){var i,cor,temas,c,mostra,tempNode;temas=i3GEO.arvoreDeTemas.TEMAS.temas;c=temas.length;cor="rgb(51, 102, 102)";for(i=0;i<c;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&temas[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&temas[i].ogc==="nao"){mostra=false}if(mostra){if(temas[i].publicado){if(temas[i].publicado==="NAO"){temas[i].nome="<span title='nao publicado' style='color:red' >"+temas[i].nome+"</span>"}}tempNode=new YAHOO.widget.HTMLNode({nacessos:temas[i].nacessos,html:i3GEO.arvoreDeTemas.montaTextoTema(cor,temas[i]),idtema:temas[i].tid,fonte:temas[i].link,ogc:temas[i].ogc,kmz:temas[i].kmz,download:temas[i].download,permitecomentario:temas[i].permitecomentario,tipoa_tema:temas[i].tipoa_tema,bookmark:"sim",expanded:false,isLeaf:false,enableHighlight:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.propTemas,1);cor=(cor==="rgb(51, 102, 102)")?"rgb(47, 70, 50)":"rgb(51, 102, 102)"}}node.loadComplete()};i3GEO.arvoreDeTemas.listaTemas(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,node.data.idgrupo,node.data.idsubgrupo,temp)},montaDir:function(node){var montaLista=function(retorno){var ig,conteudo,dirs,tempNode,arquivos,prefixo="",funcaoClick="i3GEO.util.adicionaSHP";dirs=retorno.data.diretorios;if(!node.data.retornaDir){node.data.retornaDir=false}for(ig=0;ig<dirs.length;ig+=1){if(node.data.funcaoClick){funcaoClick=node.data.funcaoClick}if(node.data.retornaDir===true){prefixo="<input type=radio onclick='i3GEOF.navegarquivos.retorna(\""+node.data.caminho+"/"+dirs[ig]+"\")' />"}tempNode=new YAHOO.widget.HTMLNode({html:prefixo+dirs[ig],caminho:node.data.caminho+"/"+dirs[ig],expanded:false,enableHighlight:false,listaImg:node.data.listaImg,listaFig:node.data.listaFig,listaShp:node.data.listaShp,retornaDir:node.data.retornaDir,funcaoClick:funcaoClick,className:"i3GeoFolder"},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaDir,1)}arquivos=retorno.data.arquivos;for(ig=0;ig<arquivos.length;ig+=1){conteudo=arquivos[ig];if(node.data.funcaoClick){funcaoClick=node.data.funcaoClick}if((node.data.listaFig===true&&(conteudo.search(".png")>1||conteudo.search(".jpg")>1||conteudo.search(".PNG")>1))||(node.data.listaImg===true&&(conteudo.search(".img")>1||conteudo.search(".tif")>1||conteudo.search(".TIF")>1))||(node.data.listaShp===true&&(conteudo.search(".shp")>1||conteudo.search(".SHP")>1))){conteudo="<a href='#' title='"+$trad("g2")+"' onclick='"+funcaoClick+"(\""+node.data.caminho+"/"+conteudo+"\")' >"+conteudo+"</a>";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:conteudo,caminho:node.data.caminho+"/"+conteudo},node)}}node.loadComplete()};i3GEO.php.listaarquivos(montaLista,node.data.caminho)},montaTextoTema:function(cor,tema){var html,clique;html="<td class='ygtvcontent' style='text-align:left;'>";if(i3GEO.arvoreDeTemas.TIPOBOTAO!=="download"){html+="<input title='"+tema.tid+"' style='position:relative;top:3px;width:12px;height:12px;cursor:pointer;border:solid 0 white;' "}else{html+="<img style='position:relative;top:3px;' title='"+tema.tid+"' src='"+i3GEO.configura.locaplic+"/imagens/down1.gif'"}if(i3GEO.arvoreDeTemas.ATIVATEMA!==""){clique="onclick=\""+i3GEO.arvoreDeTemas.ATIVATEMA+"\""}else{clique="onclick='i3GEO.arvoreDeTemas.verificaStatusTema(this,\""+tema.tid+"\")'"}html+=clique;if(tema.nameInput){html+=" name='"+tema.nameInput+"' "}if(i3GEO.arvoreDeTemas.TIPOBOTAO!=="download"){html+=" type='"+i3GEO.arvoreDeTemas.TIPOBOTAO+"' value='"+tema.tid+"' />"}else{html+=" /> "}html+="<span title='"+tema.tid+"' onmouseout='javascript:this.style.color=\""+cor+"\";' onmouseover='javascript:this.style.color=\"blue\";' style='left:4px;cursor:pointer;text-align:left;color:"+cor+";padding-left:0px;position:relative;top:1px;' "+clique+">";html+=tema.nome;html+="</span></td>";return(html)},verificaStatusTema:function(obj,tid){if(i3GEO.arvoreDeCamadas.pegaTema(tid)!==""){if(i3GEO.arvoreDeCamadas.ARVORE){i3GEO.arvoreDeCamadas.ligaDesligaTemas(tid,obj.checked)}else{var temp=function(){i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem);i3GEO.janela.fechaAguarde("redesenha")};if(!obj.checked){i3GEO.php.ligatemas(temp,tid,"")}else{i3GEO.php.ligatemas(temp,"",tid)}}}else{i3GEO.arvoreDeTemas.adicionaTemas([tid])}},propTemas:function(node){var html,lkmini,lkmini1,lkgrcode,lkgrcode1,n,ogc;if(node.data.fonte&&node.data.fonte!==""&&node.data.fonte!==" "){tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' href='"+node.data.fonte+"' target='_blank' >Fonte</a>"},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.mini===true){lkmini=i3GEO.arvoreDeTemas.LOCAPLIC+"/testamapfile.php?map="+node.data.idtema+".map&tipo=mini";lkmini1=i3GEO.arvoreDeTemas.LOCAPLIC+"/testamapfile.php?map="+node.data.idtema+".map&tipo=grande";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' onmouseover='i3GEO.ajuda.mostraJanela(\"<img src="+lkmini+" />\")' href='"+lkmini1+"' target='blank' >Miniatura</a>"},node)}if(node.data.ogc&&node.data.ogc!=="nao"){if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.kml===true){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.abreKml(\""+node.data.idtema+"\",\"kml\")' >Kml</a>";if(node.data.kmz.toLowerCase()==="sim"){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.abreKml(\""+node.data.idtema+"\",\"kmz\")' >Kml</a>"}new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}ogc=i3GEO.arvoreDeTemas.LOCAPLIC+"/ogc.php?tema="+node.data.idtema+"&service=wms&request=getcapabilities";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='getcapabilities' href='"+ogc+"' target='blank' >WMS - OGC</a>"},node)}if(node.data.download&&node.data.download.toLowerCase()!=="nao"&&i3GEO.arvoreDeTemas.TIPOBOTAO!=="download"){html="<a href='"+i3GEO.configura.locaplic+"/datadownload.htm?"+node.data.idtema+"' target='_blank'>Download</a>";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(node.data.permitecomentario&&node.data.permitecomentario!=="nao"&&i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios===true){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.comentario(\""+node.data.idtema+"\",\"comentario\")' >"+$trad("x19")+"</a>";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.qrcode===true){lkgrcode=i3GEO.arvoreDeTemas.LOCAPLIC+"/pacotes/qrcode/php/qr_html.php?d="+i3GEO.arvoreDeTemas.LOCAPLIC+"/ms_criamapa.php?interface="+i3GEO.parametros.interfacePadrao+"&temasa="+node.data.idtema+"&layers="+node.data.idtema;lkgrcode1=i3GEO.arvoreDeTemas.LOCAPLIC+"/pacotes/qrcode/php/qr_img.php?d="+i3GEO.arvoreDeTemas.LOCAPLIC+"/ms_criamapa.php?interface="+i3GEO.parametros.interfacePadrao+"&temasa="+node.data.idtema+"&layers="+node.data.idtema;new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' onmouseover='i3GEO.ajuda.mostraJanela(\"<img src="+lkgrcode1+" />\")' href='"+lkgrcode+"' target='blank' >Qrcode</a>"},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.estrelas===true){n=parseInt(node.data.nacessos/(i3GEO.arvoreDeTemas.FATORESTRELA*1),10);if(n>=5){n=5}html=(n>0)?"<img src='"+i3GEO.configura.locaplic+"/imagens/e"+n+".png"+"'/>":"<img src='"+i3GEO.configura.locaplic+"/imagens/e0.png'/>";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.bookmark===true){html=i3GEO.social.bookmark(i3GEO.configura.locaplic+"/ms_criamapa.php?layers="+node.data.idtema);new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}node.loadComplete()},outrasOpcoesHTML:function(){var ins="",t=0,imb=i3GEO.configura.locaplic+"/imagens/branco.gif",OPCOESADICIONAIS=i3GEO.arvoreDeTemas.OPCOESADICIONAIS,estilo=function(i){return" onmouseout='javascript:this.className = \""+i+" iconeMini iconeGuiaMovelMouseOut\";' onmouseover='javascript:this.className = \""+i+" iconeMini iconeGuiaMovelMouseOver\";' class='"+i+" iconeMini iconeGuiaMovelMouseOut' src='"+imb+"' style='cursor:pointer;text-align:left' "};if(OPCOESADICIONAIS.refresh===true){ins+="<td><img "+estilo("i3geo_refresh2")+" onclick='i3GEO.util.animaClique(this);i3GEO.util.animaClique(this);i3GEO.arvoreDeTemas.atualiza()' title='Refresh'/></td>";t+=20}if(OPCOESADICIONAIS.uploadarquivo===true){ins+="<td><img "+estilo("conectarwms")+" onclick='i3GEO.util.animaClique(this);i3GEO.util.animaClique(this);i3GEO.arvoreDeTemas.dialogo.conectaservico()' title='"+$trad("a15")+"'/></td>";t+=20;ins+="<td><img "+estilo("upload")+" onclick='i3GEO.util.animaClique(this);i3GEO.util.animaClique(this);i3GEO.arvoreDeTemas.dialogo.uploadarquivo()' title='"+$trad("a14")+"'/></td>";t+=20}else{}if(OPCOESADICIONAIS.downloadbase===true){ins+="<td><img "+estilo("download")+" onclick='i3GEO.util.animaClique(this);i3GEO.arvoreDeTemas.dialogo.downloadbase()' title='"+$trad("a3")+"'/></td>";t+=20}if(OPCOESADICIONAIS.importarwmc===true){ins+="<td><img "+estilo("importarwmc")+" onclick='i3GEO.util.animaClique(this);i3GEO.arvoreDeTemas.dialogo.importarwmc()' title='"+$trad("a3a")+"'/></td>";t+=20}if(OPCOESADICIONAIS.nuvemTags===true){ins+="<td><img "+estilo("nuvemtags")+" onclick='i3GEO.util.animaClique(this);i3GEO.arvoreDeTemas.dialogo.nuvemTags()' title='"+$trad("a5a")+"'/></td>";t+=20}if(OPCOESADICIONAIS.nuvemTagsFlash===true){ins+="<td><img "+estilo("nuvemtags")+" onclick='i3GEO.util.animaClique(this);i3GEO.arvoreDeTemas.dialogo.nuvemTagsFlash()' title='"+$trad("a5a")+"'/></td>";t+=20}if(OPCOESADICIONAIS.carousel===true){ins+="<td><img "+estilo("carouselTemas")+" onclick='i3GEO.util.animaClique(this);i3GEO.arvoreDeTemas.dialogo.carouselTemas()' title='Miniaturas'/></td>";t+=20}if(OPCOESADICIONAIS.inde===true){ins+="<td><img "+estilo("buscaInde")+" onclick='i3GEO.util.animaClique(this);i3GEO.arvoreDeTemas.dialogo.buscaInde()' title='Pesquisa na INDE'/></td>";t+=20}if(OPCOESADICIONAIS.metaestat===true){ins+="<td><img "+estilo("iconeMetaestat")+" onclick='i3GEO.util.animaClique(this);i3GEO.mapa.dialogo.metaestat()' title='Cartogramas estatisticos'/></td>";t+=20}return("<table width='"+t+"px' ><tr>"+ins+"</tr></table>")},desativaCheckbox:function(valor){var o,inputs,n,i;o=document.getElementById(i3GEO.arvoreDeTemas.ARVORE.id);inputs=o.getElementsByTagName("input");n=inputs.length;i=0;do{inputs[i].checked=false;i+=1}while(i<n)},buscaCheckbox:function(valor){var o,inputs,n,i;if(i3GEO.arvoreDeTemas.ARVORE){o=document.getElementById(i3GEO.arvoreDeTemas.ARVORE.id);if(o){inputs=o.getElementsByTagName("input");n=inputs.length;i=0;do{if(inputs[i].value===valor){return inputs[i]}i+=1}while(i<n)}}return false},listaTemasAtivos:function(){var o,inputs,n,i,lista;o=document.getElementById(i3GEO.arvoreDeTemas.ARVORE.id);inputs=o.getElementsByTagName("input");n=inputs.length;i=0;lista=[];do{if(inputs[i].checked===true){lista.push(inputs[i].value)}i+=1}while(i<n);return(lista)},buscaTema:function(palavra){if(palavra===""){return}var busca,root,nodePalavra="";resultadoProcurar=function(retorno){var mostra,tempNode,d,conta,ig,ngSgrupo,tempn,sg,ngTema,tempng,st,lk="";if(!retorno.data){i3GEO.janela.tempoMsg("Ocorreu um erro")}else{retorno=retorno.data;conta=0;if((retorno!=="erro")&&(typeof(retorno)!=='undefined')){ig=retorno.length-1;if(ig>=0){do{ngSgrupo=retorno[ig].subgrupos;tempn=ngSgrupo.length;for(sg=0;sg<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'> fonte</a>"}d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>";tempNode=new YAHOO.widget.HTMLNode(d,nodePalavra,false,true);tempNode.isLeaf=true;tempNode.enableHighlight=false}conta+=1}}}while(ig--)}else{d="<span style='color:red'>Nada encontrado<br><br></span>";tempNode=new YAHOO.widget.HTMLNode(d,nodePalavra,false,true);tempNode.isLeaf=true;tempNode.enableHighlight=false}}}nodePalavra.loadComplete()};busca=function(){i3GEO.php.procurartemas2(resultadoProcurar,i3GEO.util.removeAcentos(palavra))};i3GEO.arvoreDeTemas.ARVORE.collapseAll();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(!i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")){tempNode=new YAHOO.widget.HTMLNode({html:"Temas encontrados",id:"temasEncontrados"},root,false,true);tempNode.enableHighlight=false}else{tempNode=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")}nodePalavra=new YAHOO.widget.HTMLNode({html:palavra},tempNode,false,true);nodePalavra.enableHighlight=false;i3GEO.arvoreDeTemas.ARVORE.draw();tempNode.expand();nodePalavra.setDynamicLoad(busca,1);nodePalavra.expand()},buscaTema2:function(palavra){if(palavra===""){return}var busca,root,nodePalavra="";resultadoProcurar=function(retorno){var ig,montaTexto=function(ngSgrupo){var tempn,ngTema,tempng,mostra,d,lk="",st,sg;tempn=ngSgrupo.length;for(sg=0;sg<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;try{if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}}catch(e){}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'> fonte</a>"}if(ngSgrupo[sg].subgrupo){d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>"}else{d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].grupo)+")"+lk+"</td>"}new YAHOO.widget.HTMLNode({enableHighlight:false,isLeaf:true,html:d,expanded:false},nodePalavra)}conta+=1}}};if(!retorno.data){i3GEO.janela.tempoMsg("Ocorreu um erro")}else{retorno=retorno.data;conta=0;if((retorno!=="erro")&&(typeof(retorno)!=='undefined')){ig=retorno.length-1;if(ig>=0){do{montaTexto([retorno[ig]]);montaTexto(retorno[ig].subgrupos)}while(ig--)}else{new YAHOO.widget.HTMLNode({enableHighlight:false,isLeaf:true,expanded:false,html:"<span style='color:red'>Nada encontrado<br><br></span>"},nodePalavra)}}}nodePalavra.loadComplete()};busca=function(){i3GEO.php.procurartemas2(resultadoProcurar,i3GEO.util.removeAcentos(palavra))};i3GEO.arvoreDeTemas.ARVORE.collapseAll();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(!i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")){tempNode=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:"Temas encontrados",id:"temasEncontrados"},root)}else{tempNode=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")}nodePalavra=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:palavra},tempNode);i3GEO.arvoreDeTemas.ARVORE.draw();tempNode.expand();nodePalavra.setDynamicLoad(busca,1);nodePalavra.expand()},adicionaTemas:function(tsl){var exec,tempAdiciona=function(retorno){i3GEO.atualiza();if(i3GEO.arvoreDeTemas.RETORNAGUIA!==""){if(i3GEO.arvoreDeTemas.RETORNAGUIA!==i3GEO.guias.ATUAL){i3GEO.guias.escondeGuias();i3GEO.guias.mostra(i3GEO.arvoreDeTemas.RETORNAGUIA)}}try{if($i("i3GEOidentificalistaTemas")){i3GEOF.identifica.listaTemas()}}catch(r){}};i3GEO.mapa.ativaTema("");if(arguments.length!==1){tsl=i3GEO.arvoreDeTemas.listaTemasAtivos()}if(tsl.length>0){exec=function(tsl){var no,p,funcao;if(i3GEO.arvoreDeTemas.ARVORE){no=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("idtema",tsl[0]);if(no&&no.data.tipoa_tema==="META"){if(no.data.id_medida_variavel!=undefined&&no.data.id_medida_variavel!=""){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.metaestat()","metaestat","metaestat","index.js","i3GEOF.metaestat.inicia('flutuanteSimples','',"+no.data.id_medida_variavel+")")}else{p=i3GEO.configura.locaplic+"/ferramentas/metaestat/analise.php?funcao=pegaMetadadosMapfile"+"&idtema="+no.data.idtema+"&g_sid="+i3GEO.configura.sid;funcao=function(retorno){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.metaestat()","metaestat","metaestat","index.js","i3GEOF.metaestat.inicia('flutuanteSimples','',"+retorno.data.id_medida_variavel+")")};cpJSON.call(p,"foo",funcao)}}else if(no&&no.data.tipoa_tema==="METAREGIAO"){p=i3GEO.configura.locaplic+"/ferramentas/metaestat/analise.php?funcao=adicionaLimiteRegiao"+"&codigo_tipo_regiao="+no.data.codigo_tipo_regiao+"&g_sid="+i3GEO.configura.sid;funcao=function(){i3GEO.atualiza()};cpJSON.call(p,"foo",funcao)}else{i3GEO.php.adtema(tempAdiciona,tsl.toString())}}else{i3GEO.php.adtema(tempAdiciona,tsl.toString())}};if(i3GEO.arvoreDeCamadas.pegaTema(tsl[0])!==""){i3GEO.janela.confirma($trad("x76"),300,$trad("x14"),$trad("x15"),function(){exec(tsl)})}else{exec.call(this,tsl)}}},comboMenus:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura){i3GEO.configura.locaplic=locaplic;var combo=function(retorno){var ob,ins,ig;ob=retorno.data;ins="<select id='"+idCombo+"' SIZE="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(this.value)' ><option value='' >Escolha um menu:</option>";for(ig=0;ig<ob.length;ig+=1){if(ob[ig].publicado!=="nao"&&ob[ig].publicado!=="NAO"){if(ob[ig].nomemenu){ins+="<option value="+ob[ig].idmenu+" >"+ob[ig].nomemenu+"</option>"}}}$i(idDestino).innerHTML=ins+"</select>";return retorno.data};i3GEO.php.pegalistademenus(combo)},comboGruposMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura,id_menu){i3GEO.configura.locaplic=locaplic;i3GEO.arvoreDeTemas.temasRaizGrupos=[];var combo=function(retorno){var ins,ig,obGrupos=retorno.data;ins="<select id='"+idCombo+"' SIZE="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(this.value)' ><option value='' >Escolha um grupo:</option>";for(ig=0;ig<obGrupos.grupos.length;ig+=1){if(obGrupos.grupos[ig].nome){ins+="<option value="+obGrupos.grupos[ig].id_n1+" >"+obGrupos.grupos[ig].nome+"</option>"}i3GEO.arvoreDeTemas.temasRaizGrupos[obGrupos.grupos[ig].id_n1]=obGrupos.grupos[ig].temasgrupo}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistadegrupos(combo,id_menu,"nao")},comboSubGruposMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,idGrupo,largura,altura){if(idGrupo!==""){var combo=function(retorno){var ins,sg,ig;ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(\""+idGrupo+"\",this.value)' ><option value='' >Escolha um sub-grupo:</option>";if(retorno.data.subgrupo){sg=retorno.data.subgrupo;for(ig=0;ig<sg.length;ig+=1){ins+="<option value="+sg[ig].id_n2+" >"+sg[ig].nome+"</option>"}}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistadeSubgrupos(combo,"",idGrupo)}},comboTemasMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,idGrupo,idSubGrupo,largura,altura,id_menu,temas){var combo=function(retorno){var ins,sg,ig;if(idSubGrupo!=""){ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"("+idGrupo+","+idSubGrupo+",this.value)' ><option value='' >Escolha um tema:</option>"}else{ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"("+idGrupo+",\"\",this.value)' ><option value='' >Escolha um tema:</option>"}if(typeof(retorno.data)!=='undefined'){retorno=retorno.data.temas}sg=retorno.length;for(ig=0;ig<sg;ig++){ins+="<option value="+retorno[ig].tid+" >"+retorno[ig].nome+"</option>"}$i(idDestino).innerHTML=ins+"</select>"};if(typeof(temas)==='undefined'||temas===""){i3GEO.php.pegalistadetemas(combo,id_menu,idGrupo,idSubGrupo)}else{combo(temas)}},abrejanelaIframe:function(w,h,s){var i=parseInt(Math.random()*100,10),janelaeditor=i3GEO.janela.cria(w,h,s,i,10,s,"janela"+i,false),wdocaiframe="";wdocaiframe=$i("janela"+i+"i");if(wdocaiframe){wdocaiframe.style.width="100%";wdocaiframe.style.height="100%"}YAHOO.util.Event.addListener(janelaeditor[0].close,"click",i3GEO.arvoreDeTemas.atualiza,janelaeditor[0].panel,{id:janelaeditor[0].id},true)},dialogo:{uploadarquivo:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/uploadarquivos/dependencias.php","i3GEOF.uploadarquivos.iniciaJanelaFlutuante()","i3GEOF.uploadarquivos_script")},conectaservico:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/conectarservicos/dependencias.php","i3GEOF.conectarservicos.iniciaJanelaFlutuante()","i3GEOF.conectarservicos_script")},carouselTemas:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/carouseltemas/index.js","i3GEOF.carouseltemas.criaJanelaFlutuante()","i3GEOF.carouseltemas_script")},buscaInde:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/buscainde/dependencias.php","i3GEOF.buscainde.iniciaJanelaFlutuante()","i3GEOF.buscainde_script")},vinde:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/vinde/dependencias.php","i3GEOF.vinde.iniciaJanelaFlutuante()","i3GEOF.vinde_script")},nuvemTags:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/nuvemtags/dependencias.php","i3GEOF.nuvemtags.iniciaJanelaFlutuante()","i3GEOF.nuvemtags_script")},nuvemTagsFlash:function(){i3GEO.janela.cria("550px","350px",i3GEO.configura.locaplic+"/ferramentas/nuvemtagsflash/index.htm","","",$trad("x44"))},navegacaoDir:function(){i3GEO.janela.cria("550px","350px",i3GEO.configura.locaplic+"/ferramentas/navegacaodir/index.htm","","",$trad("x45"))},importarwmc:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/importarwmc/dependencias.php","i3GEOF.importarwmc.iniciaJanelaFlutuante()","i3GEOF.importarwmc_script")},conectarwfs:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwfs/index.htm","","","WFS")},downloadbase:function(){window.open(i3GEO.configura.locaplic+"/datadownload.htm")}}}; |
| 268 | 268 | // |
| 269 | 269 | //compactados/classe_barradebotoes_compacto.js |
| 270 | -if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.barraDeBotoes={BARRAS:[],BOTAOCLICADO:"",ATIVA:true,TIPO:"yui",OFFSET:-205,POSICAO:"bottom",MAXBOTOES:13,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:{abreJanelaLegenda:true,localizar:true,zoomanterior:true,zoomli:true,zoomproximo:true,zoomiauto:false,zoomoauto:false,pan:true,zoomtot:true,identifica:true,identificaBalao:true,mede:true,area:true,selecao:true,barraedicao:true,imprimir: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:false},ICONEBOTAO:{zoomli:"/imagens/gisicons/eudock/zoom-region.png",zoomproximo:"/imagens/gisicons/eudock/zoom-next.png",zoomanterior:"/imagens/gisicons/eudock/zoom-last.png",zoomiauto:"/imagens/gisicons/eudock/zoom-in.png",zoomoauto:"/imagens/gisicons/eudock/zoom-out.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",barraedicao:"/imagens/gisicons/eudock/editopen.png",localizar:"/imagens/gisicons/eudock/search.png",abreJanelaLegenda:"/imagens/gisicons/eudock/show-legend.png"},TEMPLATEBOTAO:"",BOTAOPADRAO:"pan",COMPORTAMENTO:"padrao",adicionaBotao:function(obj){i3GEO.barraDeBotoes.LISTABOTOES.push(obj);i3GEO.barraDeBotoes.ICONEBOTAO[obj.iddiv]="/imagens/oxygen/22x22/user-online.png";i3GEO.barraDeBotoes.INCLUIBOTAO[obj.iddiv]=true},ativaPadrao:function(){if(i3GEO.barraDeBotoes.ATIVA===true){try{var botao=i3GEO.barraDeBotoes.defBotao(i3GEO.barraDeBotoes.BOTAOPADRAO);if(botao.funcaoonclick){botao.funcaoonclick.call()}}catch(e){}}},ativaIcone:function(icone){if(i3GEO.barraDeBotoes.ATIVA===false){return}var estilo,temp,ist,cor,ko,estiloatual="white";if($i(icone)){estiloatual=$i(icone).style.backgroundColor}i3GEO.barraDeBotoes.BOTAOCLICADO=icone;ko=i3GEO.barraDeBotoes.LISTABOTOES.length-1;if(i3GEO.barraDeBotoes.COMPORTAMENTO==="padrao"){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(i3GEO.barraDeBotoes.LISTABOTOES[ko].tipo==="dinamico"&&temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white';if(i3GEO.barraDeBotoes.SOICONES===true){ist.borderLeftColor='rgb(50,50,50)';ist.borderBottomColor='rgb(50,50,50)'}}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='white';estilo.borderWidth="1px"}}}if(i3GEO.barraDeBotoes.COMPORTAMENTO==="destacado"){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white'}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}}}if(i3GEO.util.in_array(i3GEO.barraDeBotoes.COMPORTAMENTO,["laranja","vermelho","cinza"])){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;if(i3GEO.barraDeBotoes.SOICONES===false){ist.borderWidth="1px";ist.borderColor='white';ist.backgroundColor='white'}else{ist.backgroundColor=''}}}while(ko--)}switch(i3GEO.barraDeBotoes.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(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}if(estiloatual==cor){estilo.backgroundColor='white'}else{estilo.backgroundColor=cor}}}},ativaBotoes:function(padrao){var l,b,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]&&l[b].dica&&i3GEO.barraDeBotoes.TIPO!="emlinha"){$i(l[b].iddiv).onmouseover=function(e){i3GEO.barraDeBotoes.mostraJanela(this,l[b].dica,e)};$i(l[b].iddiv).onmouseout=function(e){i3GEO.barraDeBotoes.mostraJanela(this,"",e)}}if(l[b]&&l[b].titulo&&i3GEO.barraDeBotoes.TIPO==="emlinha"){new YAHOO.widget.Tooltip(l[b].iddiv+"_tip",{context:l[b].iddiv,text:l[b].titulo})}if(l[b]&&l[b].funcaoonclick){temp.onclick=l[b].funcaoonclick;if(l[b].iddiv==padrao){l[b].funcaoonclick()}}if(l[b]&&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){if(i3GEO.barraDeBotoes.ATIVA===false){return}var botao=i3GEO.barraDeBotoes.defBotao(id);i3GEO.barraDeBotoes.BOTAOCLICADO=id;if(botao===false){return}try{if(botao.funcaoonclick){botao.funcaoonclick.call()}}catch(e){}},defBotao:function(iddiv){var l=i3GEO.barraDeBotoes.LISTABOTOES,b=l.length-1;if(b>=0){do{if(l[b].iddiv===iddiv){return l[b]}}while(b--)}return false},inicializaBarraOP:function(onde){if(i3GEO.barraDeBotoes.ATIVA===false||!$i(i3GEO.Interface.IDCORPO)){return}if(document.onclick)euEnv.onclickBK=document.onclick;document.onclick=on_MouseClick;euDimensioni();offsEut();euThread();euEnv.imageBasePath=i3GEO.configura.locaplic+"/pacotes/eudock/";var botao,dica,titulo,i,dock=new euDock(onde),temp="dockBg-r.png",tempAjuda="dockBg-l.png",chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length,preload;preload=new Image();preload.src=i3GEO.configura.locaplic+"/imagens/gisicons/eudock/sobe1.png";if(i3GEO.barraDeBotoes.POSICAO==="top"){dock.setObjectAlign(i3GEO.Interface.IDCORPO,euUP,(i3GEO.parametros.h)*1+i3GEO.barraDeBotoes.OFFSET,euDOWN)}else{if(onde){dock.setObjectAlign(i3GEO.Interface.IDCORPO,euDOWN,i3GEO.barraDeBotoes.OFFSET,euUP)}else{dock.setObjectAlign(i3GEO.Interface.IDCORPO,euDOWN,(parseInt(document.body.style.height,10))*-1+i3GEO.barraDeBotoes.OFFSET,euUP)}}if(i3GEO.barraDeBotoes.MAXBOTOES>=chaves.length){temp="vazio.png"}if(i3GEO.barraDeBotoes.AJUDA===false){tempAjuda="vazio.png"}dock.setBar({left:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/"+tempAjuda}},horizontal:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-c-o.png"}},right:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/"+temp}}});i3GEO.barraDeBotoes.AJUDA=false;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){dica="";titulo=""}else{if(botao.dica){dica=botao.dica}else{dica=""}if(botao.titulo!=undefined){titulo=botao.titulo}else{titulo=""}}dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]}}),{mouseInsideClick:function(x,y,id,posX,posY){i3GEO.util.animaClique($i(euEnv.euDockArray[id].elementsArray[0].id));i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao,x,y,posX,posY)},idBotao:chaves[i],dica:dica,titulo:titulo})}}$i(euEnv.euDockArray.euDock_0.bar.elementsArray.left.id).onclick=function(){i3GEO.barraDeBotoes.ajudaEmLista()};$i(euEnv.euDockArray.euDock_0.bar.elementsArray.right.id).onclick=function(){var dica,titulo,chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length,nb=euEnv.euDockArray.euDock_0.iconsArray.length,i;if(nb!==i3GEO.barraDeBotoes.MAXBOTOES){i3GEO.barraDeBotoes.recria()}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){dica="";titulo=""}else{if(botao.dica){dica=botao.dica}else{dica=""}if(botao.titulo!=undefined){titulo=botao.titulo}else{titulo=""}}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:dica,titulo:titulo})}}}}},inicializaBarra:function(idconteudo,idconteudonovo,barraZoom,x,y,onde){if(i3GEO.barraDeBotoes.ATIVA===false){return}var ticone,tipo,mostra,i,temp,e,wj,recuo,alturadisponivel,n,chaves,elementos="",numerobotoes=0,nelementos=0,Dom=YAHOO.util.Dom,branco=i3GEO.configura.locaplic+'/imagens/branco.gif',novoel;if(i3GEO.configura.map3d===""){i3GEO.barraDeBotoes.INCLUIBOTAO.v3d=false}if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"||i3GEO.barraDeBotoes.TIPO==="olhodepeixe1"){if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe1"&&$i(i3GEO.Interface.IDMAPA)){i3GEO.barraDeBotoes.inicializaBarraOP($i(i3GEO.Interface.IDMAPA))}else{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>"}if(navm){i3GEO.barraDeBotoes.TRANSICAOSUAVE=false}if(i3GEO.barraDeBotoes.TIPO==="emlinha"){temp="<div id='"+onde+"_mascara'></div>";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+="<img id='"+chaves[i]+"_iconeId' onclick='i3GEO.util.animaClique(this);i3GEO.barraDeBotoes.execBotao(\""+chaves[i]+"\")' src='"+i3GEO.configura.locaplic+"/"+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]+"' />"}}if(!$i(onde)){novoel=document.createElement("div");novoel.id=onde;novoel.innerHTML=temp;$i(i3GEO.Interface.IDMAPA).appendChild(novoel)}else{$i(onde).innerHTML=temp}for(i=0;i<n;i+=1){temp=i3GEO.barraDeBotoes.defBotao(chaves[i]).titulo;if(temp!=""){new YAHOO.widget.Tooltip(chaves[i]+"_tip",{context:chaves[i]+"_iconeId",text:temp})}}}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";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";if(idconteudonovo!=""){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)}};novoel.onmouseout=function(){if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.barraDeBotoes.OPACIDADE/100)}};document.body.appendChild(novoel)}ticone=28;alturadisponivel=i3GEO.parametros.h-i3GEO.Interface.BARRABOTOESTOP-ticone-38-38;if(this.AUTOALTURA===true){alturadisponivel+=28}numerobotoes=parseInt(alturadisponivel/ticone,10);if(idconteudo!=""&&$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")}}if(i3GEO.barraDeBotoes.TIPO!="emlinha"){YAHOO.namespace("i3GEO.janela.botoes");if(i3GEO.barraDeBotoes.ORIENTACAO==="horizontal"){YAHOO.i3GEO.janela.botoes=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.i3GEO.janela.botoes=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.i3GEO.janela.botoes=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")}YAHOO.i3GEO.janela.botoes.render();YAHOO.i3GEO.janela.botoes.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.i3GEO.janela.botoes);YAHOO.i3GEO.janela.botoes.show();if(i3GEO.Interface.TABLET===true){YAHOO.i3GEO.janela.botoes.moveTo((i3GEO.parametros.w/2)-(i3GEO.barraDeBotoes.HORIZONTALW/2),"")}Dom.replaceClass(idconteudonovo+"_h","hd2")}}},reativa:function(indice){if(i3GEO.barraDeBotoes.ATIVA===false){return}var abre=function(){var i,n=i3GEO.barraDeBotoes.BARRAS.length;for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.BARRAS[i]){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.ATIVA===false){return}if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"||i3GEO.barraDeBotoes.TIPO==="olhodepeixe1"){euEnv.euDockArray=[];euEnv.Kost.num=0;if($i("euDock_0_bar")){$i("euDock_0_bar").parentNode.parentNode.removeChild($i("euDock_0_bar").parentNode)}i3GEO.barraDeBotoes.inicializaBarra();return}var i,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]&&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 i,n=this.BARRAS.length;for(i=0;i<n;i+=1){if(this.BARRAS[i]&&this.BARRAS[i].id===id){$i(id+"_c").style.visibility="hidden"}}},mostraJanela:function(objeto,mensagem,evt){if(mensagem===""){try{clearTimeout(i3GEO.barraDeBotoes.timeMostraAjudaBotoes)}catch(e){}try{clearTimeout(i3GEO.barraDeBotoes.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='"+i3GEO.configura.locaplic+"/imagens/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='"+i3GEO.configura.locaplic+"/imagens/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(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.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(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeMostraAjudaBotoes=setTimeout(function(){balloonAjuda.cleanup();balloonIsVisible=false;if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"||i3GEO.barraDeBotoes.TIPO==="olhodepeixe1"){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){}i3GEO.barraDeBotoes.timeAjudaBotoes=setTimeout(function(){balloonAjuda.cleanup()},4000)},4000)}}},mostraJanelaAjuda:function(mensagem){$i("divMensagemBarraDeBotoesCorpo").innerHTML=mensagem;YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","block");try{clearTimeout(i3GEO.barraDeBotoes.timeMostraAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeAjudaBotoes=setTimeout(function(){i3GEO.barraDeBotoes.escondeJanelaAjuda()},3000)},escondeJanelaAjuda:function(){try{if(i3GEO.barraDeBotoes.timeAjudaBotoes){clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}}catch(e){}if($i("divMensagemBarraDeBotoes")){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none")}},ajudaEmLista:function(){var n,i,ins="",b;n=i3GEO.barraDeBotoes.LISTABOTOES.length;ins+="<table class=lista8 >";for(i=0;i<n;i++){b=i3GEO.barraDeBotoes.LISTABOTOES[i];if(i3GEO.barraDeBotoes.INCLUIBOTAO[b.iddiv]===true){if(b.dica!=""){ins+="<tr><td><img src='"+i3GEO.configura.locaplic+"/"+i3GEO.barraDeBotoes.ICONEBOTAO[b.iddiv]+"' /></td><td>"+b.dica+"</td></tr>"}}}ins+="</table>";i3GEO.janela.mensagemSimples("<div style='overflow:auto;height:100%'>"+ins+"</div>","")},editor:{inicia:function(){i3GEO.eventos.cliquePerm.desativa();i3GEO.barraDeBotoes.editor[i3GEO.Interface.ATUAL].inicia("janelaEditorVetorial")},googlemaps:{inicia:function(idjanela){var temp=function(){var cabecalho,minimiza,fecha,janela=YAHOO.i3GEO.janela.manager.find("i3GEOjanelaEditor");if(janela){janela.destroy()}cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOjanelaEditor")};janela=i3GEO.janela.cria("350px","100px","","","","Editor","i3GEOjanelaEditor",false,"hd",cabecalho,minimiza);$i("i3GEOjanelaEditor_corpo").style.backgroundColor="white";i3GEO.editorGM.inicia("i3GEOjanelaEditor_corpo");fecha=function(){var temp=window.confirm($trad("x94"));if(i3GEO.eventos){i3GEO.eventos.cliquePerm.ativa()}if(temp===true){i3GEO.desenho.googlemaps.destroyFeatures(i3GEO.desenho.googlemaps.shapes)}};YAHOO.util.Event.addListener(janela[0].close,"click",fecha)};if(!i3GEO.editorGM){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/classesjs/compactados/classe_editorgm_compacto.js",temp,"editorgm.js",true)}else{temp.call()}}},openlayers:{inicia:function(idjanela){if(!i3GEO.editorOL){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/classesjs/compactados/classe_editorol_compacto.js","i3GEO.barraDeBotoes.editor.openlayers.ativaPainel('"+idjanela+"')","editorol.js",true)}else{if(!i3GEO.desenho.layergrafico){i3GEO.desenho.openlayers.criaLayerGrafico();i3GEO.editorOL.mapa.addLayers([i3GEO.desenho.layergrafico])}if(!i3GEO.editorOL.backup){i3GEO.editorOL.backup=new OpenLayers.Layer.Vector("Backup",{displayInLayerSwitcher:false,visibility:false})}i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}},criaJanela:function(){if($i("i3GEOjanelaEditor")){return"i3GEOjanelaEditor"}var janela,divid,titulo,cabecalho,minimiza;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOjanelaEditor")};titulo=$trad("u29");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,'corta':true,'edita':true,'listag':true,'selecao':true,'selecaotudo':true,'apaga':true,'procura':false,'propriedades':true,'salva':true,'ajuda':true,'fecha':true,'tools':true,'undo':true,'frente':true};if(!i3GEO.desenho.layergrafico){i3GEO.desenho.openlayers.criaLayerGrafico()}if(idjanela){i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}}}}}; | |
| 270 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.barraDeBotoes={BARRAS:[],BOTAOCLICADO:"",ATIVA:true,TIPO:"yui",OFFSET:-205,POSICAO:"bottom",MAXBOTOES:13,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:{abreJanelaLegenda:true,localizar:true,zoomanterior:true,zoomli:true,zoomproximo:true,zoomiauto:false,zoomoauto:false,pan:true,zoomtot:true,identifica:true,identificaBalao:true,mede:true,area:true,selecao:true,barraedicao:true,imprimir: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:false},ICONEBOTAO:{zoomli:"/imagens/gisicons/eudock/zoom-region.png",zoomproximo:"/imagens/gisicons/eudock/zoom-next.png",zoomanterior:"/imagens/gisicons/eudock/zoom-last.png",zoomiauto:"/imagens/gisicons/eudock/zoom-in.png",zoomoauto:"/imagens/gisicons/eudock/zoom-out.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",barraedicao:"/imagens/gisicons/eudock/editopen.png",localizar:"/imagens/gisicons/eudock/search.png",abreJanelaLegenda:"/imagens/gisicons/eudock/show-legend.png"},TEMPLATEBOTAO:"",BOTAOPADRAO:"pan",COMPORTAMENTO:"padrao",adicionaBotao:function(obj){i3GEO.barraDeBotoes.LISTABOTOES.push(obj);i3GEO.barraDeBotoes.ICONEBOTAO[obj.iddiv]="/imagens/oxygen/22x22/user-online.png";i3GEO.barraDeBotoes.INCLUIBOTAO[obj.iddiv]=true},ativaPadrao:function(){if(i3GEO.barraDeBotoes.ATIVA===true){try{var botao=i3GEO.barraDeBotoes.defBotao(i3GEO.barraDeBotoes.BOTAOPADRAO);if(botao.funcaoonclick){botao.funcaoonclick.call()}}catch(e){}}},ativaIcone:function(icone){if(i3GEO.barraDeBotoes.ATIVA===false){return}var estilo,temp,ist,cor,ko,estiloatual="white";if($i(icone)){estiloatual=$i(icone).style.backgroundColor}i3GEO.barraDeBotoes.BOTAOCLICADO=icone;ko=i3GEO.barraDeBotoes.LISTABOTOES.length-1;if(i3GEO.barraDeBotoes.COMPORTAMENTO==="padrao"){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(i3GEO.barraDeBotoes.LISTABOTOES[ko].tipo==="dinamico"&&temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white';if(i3GEO.barraDeBotoes.SOICONES===true){ist.borderLeftColor='rgb(50,50,50)';ist.borderBottomColor='rgb(50,50,50)'}}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='white';estilo.borderWidth="1px"}}}if(i3GEO.barraDeBotoes.COMPORTAMENTO==="destacado"){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white'}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}}}if(i3GEO.util.in_array(i3GEO.barraDeBotoes.COMPORTAMENTO,["laranja","vermelho","cinza"])){if(ko>=0){do{temp=$i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;if(i3GEO.barraDeBotoes.SOICONES===false){ist.borderWidth="1px";ist.borderColor='white';ist.backgroundColor='white'}else{ist.backgroundColor=''}}}while(ko--)}switch(i3GEO.barraDeBotoes.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(i3GEO.barraDeBotoes.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}if(estiloatual==cor){estilo.backgroundColor='white'}else{estilo.backgroundColor=cor}}}},ativaBotoes:function(padrao){var atrib,l,b,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);atrib=document.createAttribute("indxBotao");atrib.value=b;if(temp){temp.setAttributeNode(atrib);if(l[b].conteudo){temp.innerHTML=l[b].conteudo}if(l[b]&&l[b].dica&&i3GEO.barraDeBotoes.TIPO!="emlinha"){$i(l[b].iddiv).onmouseover=function(e){var i=this.attributes["indxBotao"].value,l=i3GEO.barraDeBotoes.LISTABOTOES;if(l&&l[i]&&l[i].dica){i3GEO.barraDeBotoes.mostraJanela(this,l[i].dica,e)}};$i(l[b].iddiv).onmouseout=function(e){i3GEO.barraDeBotoes.mostraJanela(this,"",e)}}if(l[b]&&l[b].titulo&&i3GEO.barraDeBotoes.TIPO==="emlinha"){new YAHOO.widget.Tooltip(l[b].iddiv+"_tip",{context:l[b].iddiv,text:l[b].titulo})}if(l[b]&&l[b].funcaoonclick){temp.onclick=l[b].funcaoonclick;if(l[b].iddiv==padrao){l[b].funcaoonclick()}}if(l[b]&&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){if(i3GEO.barraDeBotoes.ATIVA===false){return}var botao=i3GEO.barraDeBotoes.defBotao(id);i3GEO.barraDeBotoes.BOTAOCLICADO=id;if(botao===false){return}try{if(botao.funcaoonclick){botao.funcaoonclick.call()}}catch(e){}},defBotao:function(iddiv){var l=i3GEO.barraDeBotoes.LISTABOTOES,b=l.length-1;if(b>=0){do{if(l[b].iddiv===iddiv){return l[b]}}while(b--)}return false},inicializaBarraOP:function(onde){if(i3GEO.barraDeBotoes.ATIVA===false||!$i(i3GEO.Interface.IDCORPO)){return}if(document.onclick)euEnv.onclickBK=document.onclick;document.onclick=on_MouseClick;euDimensioni();offsEut();euThread();euEnv.imageBasePath=i3GEO.configura.locaplic+"/pacotes/eudock/";var botao,dica,titulo,i,dock=new euDock(onde),temp="dockBg-r.png",tempAjuda="dockBg-l.png",chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length,preload;preload=new Image();preload.src=i3GEO.configura.locaplic+"/imagens/gisicons/eudock/sobe1.png";if(i3GEO.barraDeBotoes.POSICAO==="top"){dock.setObjectAlign(i3GEO.Interface.IDCORPO,euUP,(i3GEO.parametros.h)*1+i3GEO.barraDeBotoes.OFFSET,euDOWN)}else{if(onde){dock.setObjectAlign(i3GEO.Interface.IDCORPO,euDOWN,i3GEO.barraDeBotoes.OFFSET,euUP)}else{dock.setObjectAlign(i3GEO.Interface.IDCORPO,euDOWN,(parseInt(document.body.style.height,10))*-1+i3GEO.barraDeBotoes.OFFSET,euUP)}}if(i3GEO.barraDeBotoes.MAXBOTOES>=chaves.length){temp="vazio.png"}if(i3GEO.barraDeBotoes.AJUDA===false){tempAjuda="vazio.png"}dock.setBar({left:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/"+tempAjuda}},horizontal:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-c-o.png"}},right:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/"+temp}}});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||i3GEO.barraDeBotoes.AJUDA===false){dica="";titulo=""}else{if(botao.dica){dica=botao.dica}else{dica=""}if(botao.titulo!=undefined&&i3GEO.barraDeBotoes.AJUDA===true){titulo=botao.titulo}else{titulo=""}}dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]],titulo:titulo}}),{mouseInsideClick:function(x,y,id,posX,posY){i3GEO.util.animaClique($i(euEnv.euDockArray[id].elementsArray[0].id));i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao,x,y,posX,posY)},idBotao:chaves[i],dica:dica,titulo:titulo})}}$i(euEnv.euDockArray.euDock_0.bar.elementsArray.left.id).onclick=function(){i3GEO.barraDeBotoes.ajudaEmLista()};$i(euEnv.euDockArray.euDock_0.bar.elementsArray.right.id).onclick=function(){var dica,titulo,chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length,nb=euEnv.euDockArray.euDock_0.iconsArray.length,i;if(nb!==i3GEO.barraDeBotoes.MAXBOTOES){i3GEO.barraDeBotoes.recria()}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){dica="";titulo=""}else{if(botao.dica){dica=botao.dica}else{dica=""}if(botao.titulo!=undefined){titulo=botao.titulo}else{titulo=""}}dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]],titulo:titulo}}),{mouseInsideClick:function(x,y,id,posX){i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao,x,y,posX)},idBotao:chaves[i],dica:dica,titulo:titulo})}}}}},inicializaBarra:function(idconteudo,idconteudonovo,barraZoom,x,y,onde){if(i3GEO.barraDeBotoes.ATIVA===false){return}var ticone,tipo,mostra,i,temp,e,wj,recuo,alturadisponivel,n,chaves,elementos="",numerobotoes=0,nelementos=0,Dom=YAHOO.util.Dom,branco=i3GEO.configura.locaplic+'/imagens/branco.gif',novoel;if(i3GEO.configura.map3d===""){i3GEO.barraDeBotoes.INCLUIBOTAO.v3d=false}if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"||i3GEO.barraDeBotoes.TIPO==="olhodepeixe1"){if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe1"&&$i(i3GEO.Interface.IDMAPA)){i3GEO.barraDeBotoes.inicializaBarraOP($i(i3GEO.Interface.IDMAPA))}else{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>"}if(navm){i3GEO.barraDeBotoes.TRANSICAOSUAVE=false}if(i3GEO.barraDeBotoes.TIPO==="emlinha"){temp="<div id='"+onde+"_mascara'></div>";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+="<img id='"+chaves[i]+"_iconeId' onclick='i3GEO.util.animaClique(this);i3GEO.barraDeBotoes.execBotao(\""+chaves[i]+"\")' src='"+i3GEO.configura.locaplic+"/"+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]+"' />"}}if(!$i(onde)){novoel=document.createElement("div");novoel.id=onde;novoel.innerHTML=temp;$i(i3GEO.Interface.IDMAPA).appendChild(novoel)}else{$i(onde).innerHTML=temp}for(i=0;i<n;i+=1){temp=i3GEO.barraDeBotoes.defBotao(chaves[i]).titulo;if(temp!=""){new YAHOO.widget.Tooltip(chaves[i]+"_tip",{context:chaves[i]+"_iconeId",text:temp})}}}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";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";if(idconteudonovo!=""){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)}};novoel.onmouseout=function(){if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.barraDeBotoes.OPACIDADE/100)}};document.body.appendChild(novoel)}ticone=28;alturadisponivel=i3GEO.parametros.h-i3GEO.Interface.BARRABOTOESTOP-ticone-38-38;if(this.AUTOALTURA===true){alturadisponivel+=28}numerobotoes=parseInt(alturadisponivel/ticone,10);if(idconteudo!=""&&$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")}}if(i3GEO.barraDeBotoes.TIPO!="emlinha"){YAHOO.namespace("i3GEO.janela.botoes");if(i3GEO.barraDeBotoes.ORIENTACAO==="horizontal"){YAHOO.i3GEO.janela.botoes=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.i3GEO.janela.botoes=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.i3GEO.janela.botoes=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")}YAHOO.i3GEO.janela.botoes.render();YAHOO.i3GEO.janela.botoes.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.i3GEO.janela.botoes);YAHOO.i3GEO.janela.botoes.show();if(i3GEO.Interface.TABLET===true){YAHOO.i3GEO.janela.botoes.moveTo((i3GEO.parametros.w/2)-(i3GEO.barraDeBotoes.HORIZONTALW/2),"")}Dom.replaceClass(idconteudonovo+"_h","hd2")}}},reativa:function(indice){if(i3GEO.barraDeBotoes.ATIVA===false){return}var abre=function(){var i,n=i3GEO.barraDeBotoes.BARRAS.length;for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.BARRAS[i]){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.ATIVA===false){return}if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"||i3GEO.barraDeBotoes.TIPO==="olhodepeixe1"){euEnv.euDockArray=[];euEnv.Kost.num=0;if($i("euDock_0_bar")){$i("euDock_0_bar").parentNode.parentNode.removeChild($i("euDock_0_bar").parentNode)}i3GEO.barraDeBotoes.inicializaBarra();return}var i,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]&&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 i,n=this.BARRAS.length;for(i=0;i<n;i+=1){if(this.BARRAS[i]&&this.BARRAS[i].id===id){$i(id+"_c").style.visibility="hidden"}}},mostraJanela:function(objeto,mensagem,evt){if(mensagem===""){try{clearTimeout(i3GEO.barraDeBotoes.timeMostraAjudaBotoes)}catch(e){}try{clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}return}var divmensagem=$i("divMensagemBarraDeBotoes"),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='"+i3GEO.configura.locaplic+"/imagens/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='"+i3GEO.configura.locaplic+"/imagens/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(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeMostraAjudaBotoes=setTimeout("i3GEO.barraDeBotoes.mostraJanelaAjuda('"+mensagem+"');",5000)}else{}}},mostraJanelaAjuda:function(mensagem){$i("divMensagemBarraDeBotoesCorpo").innerHTML=mensagem;YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","block");try{clearTimeout(i3GEO.barraDeBotoes.timeMostraAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeAjudaBotoes=setTimeout(function(){i3GEO.barraDeBotoes.escondeJanelaAjuda()},3000)},escondeJanelaAjuda:function(){try{if(i3GEO.barraDeBotoes.timeAjudaBotoes){clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}}catch(e){}if($i("divMensagemBarraDeBotoes")){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none")}},ajudaEmLista:function(){var n,i,ins="",b;n=i3GEO.barraDeBotoes.LISTABOTOES.length;ins+="<table class=lista8 >";for(i=0;i<n;i++){b=i3GEO.barraDeBotoes.LISTABOTOES[i];if(i3GEO.barraDeBotoes.INCLUIBOTAO[b.iddiv]===true){if(b.dica!=""){ins+="<tr><td><img src='"+i3GEO.configura.locaplic+"/"+i3GEO.barraDeBotoes.ICONEBOTAO[b.iddiv]+"' /></td><td>"+b.dica+"</td></tr>"}}}ins+="</table>";i3GEO.janela.mensagemSimples("<div style='overflow:auto;height:100%'>"+ins+"</div>","")},editor:{inicia:function(){i3GEO.eventos.cliquePerm.desativa();i3GEO.barraDeBotoes.editor[i3GEO.Interface.ATUAL].inicia("janelaEditorVetorial")},googlemaps:{inicia:function(idjanela){var temp=function(){var cabecalho,minimiza,fecha,janela=YAHOO.i3GEO.janela.manager.find("i3GEOjanelaEditor");if(janela){janela.destroy()}cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOjanelaEditor")};janela=i3GEO.janela.cria("350px","100px","","","","Editor","i3GEOjanelaEditor",false,"hd",cabecalho,minimiza);$i("i3GEOjanelaEditor_corpo").style.backgroundColor="white";i3GEO.editorGM.inicia("i3GEOjanelaEditor_corpo");fecha=function(){var temp=window.confirm($trad("x94"));if(i3GEO.eventos){i3GEO.eventos.cliquePerm.ativa()}if(temp===true){i3GEO.desenho.googlemaps.destroyFeatures(i3GEO.desenho.googlemaps.shapes)}};YAHOO.util.Event.addListener(janela[0].close,"click",fecha)};if(!i3GEO.editorGM){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/classesjs/compactados/classe_editorgm_compacto.js",temp,"editorgm.js",true)}else{temp.call()}}},openlayers:{inicia:function(idjanela){if(!i3GEO.editorOL){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/classesjs/compactados/classe_editorol_compacto.js","i3GEO.barraDeBotoes.editor.openlayers.ativaPainel('"+idjanela+"')","editorol.js",true)}else{if(!i3GEO.desenho.layergrafico){i3GEO.desenho.openlayers.criaLayerGrafico();i3GEO.editorOL.mapa.addLayers([i3GEO.desenho.layergrafico])}if(!i3GEO.editorOL.backup){i3GEO.editorOL.backup=new OpenLayers.Layer.Vector("Backup",{displayInLayerSwitcher:false,visibility:false})}i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}},criaJanela:function(){if($i("i3GEOjanelaEditor")){return"i3GEOjanelaEditor"}var janela,divid,titulo,cabecalho,minimiza;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOjanelaEditor")};titulo=$trad("u29");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,'corta':true,'edita':true,'listag':true,'selecao':true,'selecaotudo':true,'apaga':true,'procura':false,'propriedades':true,'salva':true,'ajuda':true,'fecha':true,'tools':true,'undo':true,'frente':true};if(!i3GEO.desenho.layergrafico){i3GEO.desenho.openlayers.criaLayerGrafico()}if(idjanela){i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}}}}}; | |
| 271 | 271 | // |
| 272 | 272 | //compactados/classe_coordenadas_compacto.js |
| 273 | 273 | if(typeof(i3GEO)==='undefined'){var 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:""},"geohash":{idhtml:"localizarxy",tipo:"codigo",tipoCodigo:"geohash",titulo:"GeoHash",ativo:true},"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"},"mostraCoordenadasGeohash":{idhtml:"localizarxy"}},MODOTEXTO:"",mostraCoordenadasGEO:function(id){try{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");if(i3GEO.Interface.TABLET===true){i3GEO.eventos.adicionaEventos("MOUSECLIQUE",["i3GEO.coordenadas.atualizaLocalizarGeo()"])}else{i3GEO.eventos.adicionaEventos("MOUSEMOVE",["i3GEO.coordenadas.atualizaLocalizarGeo()"])}}}}catch(e){i3GEO.janela.tempoMsg("mostraCoordenadasGeo: "+e.description)}},atualizaLocalizarGeo:function(id,x,y){if(!id){id="coordgeotabela"}if(typeof(x)==='undefined'){x=objposicaocursor.dmsx}if(typeof(y)==='undefined'){y=objposicaocursor.dmsy}var temp=$i(id);if(temp&&temp.style.display==="block"){i3GEO.coordenadas.atualizaGeo(x,y,id)}},geo2zonaUtm:function(l){l=(l*1)+180;l=l/6;return parseInt(l,10)+1},criaMascaraDMS:function(prefixo,titulo,caixa){var ins='<table class="i3GeoMascaraCoord" id='+prefixo+' ><tr>'+"<td>"+caixa+" </td>"+'<td style=width:10px;text-align:right > X: </td>'+'<td>'+$inputText('','',prefixo+'xg','grau','3','-00')+'</td>'+'<td>'+$inputText('','',prefixo+'xm','minuto','2','00')+'</td>'+'<td>'+$inputText('','',prefixo+'xs','segundo','5','00.00')+'</td>'+'<td> Y: '+$inputText('','',prefixo+'yg','grau','3','-00')+'</td>'+'<td>'+$inputText('','',prefixo+'ym','minuto','2','00')+'</td>'+'<td>'+$inputText('','',prefixo+'ys','segundo','5','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=ticfind style="margin-left:8px;" title=zoom onclick="'+temp+'" src="'+i3GEO.configura.locaplic+"/imagens/branco.gif"+'" /></td>'+"</tr></table>";return ins},atualizaGeo:function(dmsx,dmsy,prefixo){var x=dmsx.split(" "),y=dmsy.split(" ");if($i(prefixo+"xg")){$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><br>"},criaMascaraMetrica:function(prefixo,titulo,caixa){var ins="<table id="+prefixo+" class='i3GeoMascaraCoord' ><tr>"+"<td>"+caixa+" <td>"+"<td style=width:100px;text-align:right >"+titulo+" X: </td>"+"<td>"+$inputText("","",prefixo+"X","X","12","00")+" </td>"+"<td>Y:"+$inputText("","",prefixo+"Y","Y","12","00")+" </td>"+"<td>Zn:"+$inputText("","",prefixo+"ZN","Zona","2","--")+" </td>"+"</tr></table>";return ins},criaMascaraCodigo:function(prefixo,titulo,caixa,tipoCodigo){var funcao="",ins="";if(tipoCodigo==="geohash"){funcao="i3GEO.coordenadas.geohash.zoomCodigo(\'"+prefixo+"Codigo\')"}ins="<table id="+prefixo+" class='i3GeoMascaraCoord' ><tr>"+"<td>"+caixa+" <td>"+"<td style=width:100px;text-align:right >"+titulo+" : </td>"+"<td>"+$inputText("","",prefixo+"Codigo","Cod","12","00")+" </td>"+'<td><img class=tic title=zoom onclick="'+funcao+'" src="'+i3GEO.configura.locaplic+"/imagens/branco.gif"+'" /></td>'+"</tr></table>";return ins},atualizaCodigo:function(onde,configProj,x,y){var ondeValor=$i(onde+configProj+"Codigo");onde=$i(onde),temp=i3GEO.coordenadas.config[configProj],codigo="";if(onde&&onde.style.display==="none"){return}if(typeof(x)==='undefined'){x=objposicaocursor.ddx}if(typeof(y)==='undefined'){y=objposicaocursor.ddy}if(temp.tipoCodigo==="geohash"){codigo=i3GEO.coordenadas.geohash.encodeGeoHash(y,x)}i3GEO.coordenadas.MODOTEXTO+=temp.titulo+" : "+codigo+"<br><br>";if(ondeValor){ondeValor.value=codigo}},atualizaProj4:function(onde,configProj,x,y){if(i3GEO.coordenadas.formato==="bloco"&&i3GEO.coordenadas.padrao!==configProj){return}var zona,temp,p,destino="",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><br>"},calculaProj4:function(origem,destino,x,y){Proj4js.defs={'ORIGEM':origem,'DESTINO':destino};Proj4js.getScriptLocation=function(){return i3GEO.configura.locaplic+"/pacotes/proj4js/lib/"};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){if(i3GEO.Interface.openlayers.googleLike===true){i3GEO.coordenadas.config={"geoProj":{idhtml:"localizarxy",tipo:"geo",titulo:"Geo",ativo:true,defepsg:""},"dd":{idhtml:"localizarxy",tipo:"metrica",titulo:"Déc. de grau",ativo:true,defepsg:""}}}try{var tipos=i3GEO.util.listaChaves(i3GEO.coordenadas.config),n=tipos.length,temp,ins="",i=0,caixa,janela,nomeFunc;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+"\");' class='i3geoCoordenadasComboTipo' ><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{if(temp.tipo==="codigo"){ins+=i3GEO.coordenadas.criaMascaraCodigo(onde+tipos[i],temp.titulo,caixa,temp.tipoCodigo)}else{ins+=i3GEO.coordenadas.criaMascaraMetrica(onde+tipos[i],temp.titulo,caixa)}}}}if(this.formato==="janela"){janela=i3GEO.janela.cria("450px","120px","","","",$trad("x49"),"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){i3GEO.janela.tempoMsg(i3GEO.coordenadas.MODOTEXTO);}}).enable();' >"+"Clique aqui para ativar Alt+C para poder capturar as coordenadas</a>"}if(onde!==""&&$i(onde)){$i(onde).innerHTML=ins}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){i3GEO.eventos.adicionaEventos("MOUSECLIQUE",["i3GEO.coordenadas.atualizaLocalizarGeo('"+onde+tipos[i]+"')"])}else{i3GEO.eventos.adicionaEventos("MOUSEMOVE",["i3GEO.coordenadas.atualizaLocalizarGeo('"+onde+tipos[i]+"')"])}}if(typeof(x)!=='undefined'){i3GEO.coordenadas.atualizaLocalizarGeo(onde+tipos[i],i3GEO.calculo.dd2dms(x)[0],i3GEO.calculo.dd2dms(y)[0])}}else{nomeFunc="i3GEO.coordenadas.atualizaProj4";if(temp.tipo==="codigo"){nomeFunc="i3GEO.coordenadas.atualizaCodigo"}if(ativaMovimento===true){if(i3GEO.Interface.TABLET===true){i3GEO.eventos.adicionaEventos("MOUSECLIQUE",[nomeFunc+"('"+onde+"','"+tipos[i]+"')"])}else{i3GEO.eventos.adicionaEventos("MOUSEMOVE",[nomeFunc+"('"+onde+"','"+tipos[i]+"')"])}}if(typeof(x)!=='undefined'){eval(nomeFunc+"(onde,tipos[i],x,y);")}}}}if(ativaMovimento===true){if(i3GEO.Interface.TABLET===true){i3GEO.eventos.adicionaEventos("MOUSECLIQUE",["i3GEO.coordenadas.limpaModoTexto()"])}else{i3GEO.eventos.adicionaEventos("MOUSEMOVE",["i3GEO.coordenadas.limpaModoTexto()"])}}if(i3GEO.coordenadas.formato==="bloco"){i3GEO.coordenadas.ativaBloco(onde)}}catch(men){}},limpaModoTexto:function(){i3GEO.coordenadas.MODOTEXTO=""},geohash:{BITS:[16,8,4,2,1],BASE32:"0123456789bcdefghjkmnpqrstuvwxyz",refine_interval:function(interval,cd,mask){if(cd&mask)interval[0]=(interval[0]+interval[1])/2;else interval[1]=(interval[0]+interval[1])/2},decodeGeoHash:function(geohash){var is_even=1,lat=[],lon=[],i,j,x,y;lat[0]=-90.0;lat[1]=90.0;lon[0]=-180.0;lon[1]=180.0;lat_err=90.0;lon_err=180.0;for(i=0;i<geohash.length;i++){c=geohash[i];cd=i3GEO.coordenadas.geohash.BASE32.indexOf(c);for(j=0;j<5;j++){mask=i3GEO.coordenadas.geohash.BITS[j];if(is_even){lon_err/=2;i3GEO.coordenadas.geohash.refine_interval(lon,cd,mask)}else{lat_err/=2;i3GEO.coordenadas.geohash.refine_interval(lat,cd,mask)}is_even=!is_even}}lat[2]=(lat[0]+lat[1])/2;lon[2]=(lon[0]+lon[1])/2;y=(lat[0]+lat[1])/2;x=(lon[0]+lon[1])/2;return{latitude:y,longitude:x}},encodeGeoHash:function(latitude,longitude){var is_even=1,lat=[],lon=[],bit=0,ch=0,precision=12,geohash="";lat[0]=-90.0;lat[1]=90.0;lon[0]=-180.0;lon[1]=180.0;while(geohash.length<precision){if(is_even){mid=(lon[0]+lon[1])/2;if(longitude>mid){ch|=i3GEO.coordenadas.geohash.BITS[bit];lon[0]=mid}else lon[1]=mid}else{mid=(lat[0]+lat[1])/2;if(latitude>mid){ch|=i3GEO.coordenadas.geohash.BITS[bit];lat[0]=mid}else lat[1]=mid}is_even=!is_even;if(bit<4)bit++;else{geohash+=i3GEO.coordenadas.geohash.BASE32[ch];bit=0;ch=0}}return geohash},zoomCodigo:function(idobj){var codigo;if($i(idobj)){codigo=$i(idobj).value}else{codigo=idobj}codigo=i3GEO.coordenadas.geohash.decodeGeoHash(codigo);i3GEO.navega.zoomponto(i3GEO.configura.locaplic,i3GEO.configura.sid,codigo.longitude,codigo.latitude)}}}; |
| ... | ... | @@ -288,10 +288,10 @@ if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.marcador={prompt:function(){i |
| 288 | 288 | if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.pluginI3geo={OBJETOS:{},PLUGINS:[{"classe":"heatmap","nome":"Mapa de calor","editor":true},{"classe":"markercluster","nome":"Agrupamento de pontos (cluster)","editor":true},{"classe":"layerkml","nome":"Camada Kml","editor":true},{"classe":"parametrossql","nome":"SQL parametrizado","editor":true}],inicia:function(camada){if(i3GEO.janela){i3GEO.janela.AGUARDEMODAL=true;i3GEO.janela.abreAguarde("aguardePlugin","Plugin...");i3GEO.janela.AGUARDEMODAL=false}i3GEO.pluginI3geo[camada.plugini3geo.plugin][i3GEO.Interface.ATUAL].inicia(camada)},formAdmin:function(plugin,configString){return i3GEO.pluginI3geo[plugin].formAdmin(configString)},iconeArvoreDeCamadas:function(camada){if(camada.plugini3geo&&camada.plugini3geo!=""){return i3GEO.pluginI3geo[camada.plugini3geo.plugin].iconeArvoreDeCamadas(camada.name)}else{return false}},linkAjuda:function(plugin){return i3GEO.pluginI3geo[plugin].linkAjuda()},ligaCamada:function(nomecamada){if(i3GEO.pluginI3geo.OBJETOS[nomecamada]&&i3GEO.pluginI3geo.OBJETOS[nomecamada].ligaCamada){i3GEO.pluginI3geo.OBJETOS[nomecamada].ligaCamada();return true}return false},desligaCamada:function(nomecamada){if(i3GEO.pluginI3geo.OBJETOS[nomecamada]&&i3GEO.pluginI3geo.OBJETOS[nomecamada].desLigaCamada){i3GEO.pluginI3geo.OBJETOS[nomecamada].desLigaCamada();return true}return false},removeCamada:function(nomecamada){if(i3GEO.pluginI3geo.OBJETOS[nomecamada]&&i3GEO.pluginI3geo.OBJETOS[nomecamada].removeCamada){i3GEO.pluginI3geo.OBJETOS[nomecamada].removeCamada();delete(i3GEO.pluginI3geo.OBJETOS[nomecamada]);return true}return false},atualizaCamada:function(nomecamada){if(i3GEO.pluginI3geo.OBJETOS[nomecamada]&&i3GEO.pluginI3geo.OBJETOS[nomecamada].atualizaCamada){i3GEO.pluginI3geo.OBJETOS[nomecamada].atualizaCamada();return true}return false},existeObjeto:function(nomecamada){if(i3GEO.pluginI3geo.OBJETOS[nomecamada]&&i3GEO.pluginI3geo.OBJETOS[nomecamada].atualizaCamada){return true}return false},aplicaPropriedades:function(camada){if(camada.plugini3geo&&camada.plugini3geo!=""){camada=i3GEO.pluginI3geo[camada.plugini3geo.plugin][i3GEO.Interface.ATUAL].aplicaPropriedades(camada)}return camada},layerMashup:function(Interface,camada,epsg){if(camada.plugini3geo&&camada.plugini3geo!=""&&i3GEO.pluginI3geo[camada.plugini3geo.plugin][Interface].layerMashup){var l=i3GEO.pluginI3geo[camada.plugini3geo.plugin][Interface].layerMashup(camada,epsg);return l}else{return[false]}},heatmap:{linkAjuda:function(){return i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=3&idajuda=121"},formAdmin:function(config){var parametros,ins="",configDefault='{"plugin":"heatmap","parametros":{"tipoGradiente": "default","valorPonto":1,"coluna":"","radius":15}}';if(config===""){config=configDefault}config=YAHOO.lang.JSON.parse(config);if(config.plugin!="heatmap"){config=YAHOO.lang.JSON.parse(configDefault)}parametros=config.parametros;ins+=""+"<p>Coluna que contém os dados:"+"<br><input name='coluna' type='text' value='"+parametros.coluna+"' size='30'></p>"+"<p>Ou valor numérico para cada ponto:"+"<br><input name='valorPonto' type='text' value='"+parametros.valorPonto+"' size='30'></p>"+"<p>Raio de cada ponto em pixels:"+"<br><input name='radius' type='text' value='"+parametros.radius+"' size='30'></p>"+"<p>Tipo de gradiente (deixe vazio para utilizar as classes definidas no Layer ou escreva 'default' para usar o normal):"+"<br><input name='tipoGradiente' type='text' value='"+parametros.tipoGradiente+"' size='30'></p>"+"<p>Para definir os cortes no gradiente de cores utilize valores entre 0 e 1."+" As cores são definidas nas classes do LAYER, sendo que o nome define o valor superior do gradiente e COLOR define a cor."+" Veja o exemplo utilizado no tema _lmapadecalor.map</p>";return ins},iconeArvoreDeCamadas:function(nomecamada){return false},googlemaps:{aplicaPropriedades:function(camada){camada.sel="nao";camada.download="nao";camada.AGUARDALEGENDA=false;camada.temporizador="";camada.copia=false;camada.procurar=false;camada.toponimia=false;camada.etiquetas=false;camada.tabela=false;camada.grafico=false;camada.destacar=false;camada.wms=false;camada.classe="NAO";return camada},inicia:function(camada){var nomeScript="heatmap_script",p=i3GEO.configura.locaplic+"/ferramentas/heatmap/googlemaps_js.php",carregaJs="nao",criaLayer;criaLayer=function(){var heatmap,pontos;heatmap=new HeatmapOverlay(i3GeoMap,camada.name,{"radius":camada.plugini3geo.parametros.radius,"visible":true,"opacity":camada.transparency,"gradient":heatmap_config.gradient,"legend":{"title":camada.tema,"position":"bl","offset":[5,50]}});pontos={max:camada.plugini3geo.parametros.max,data:heatmap_dados};i3GEO.janela.fechaAguarde("aguardePlugin");heatmap.setDataSet(pontos);heatmap.ligaCamada=function(){this.liga()};heatmap.desLigaCamada=function(){this.desliga()};heatmap.removeCamada=function(){this.destroy()};heatmap.atualizaCamada=function(){this.draw()};i3GEO.pluginI3geo.OBJETOS[camada.name]=heatmap;heatmap_dados=null};if(!$i(nomeScript)){carregaJs="sim"}else{nomeScript=""}p+="?carregajs="+carregaJs+"&layer="+camada.name+"&coluna="+camada.plugini3geo.parametros.coluna+"&tipoGradiente="+camada.plugini3geo.parametros.tipoGradiente+"&g_sid="+i3GEO.configura.sid+"&nomevariavel=heatmap_dados&nomevariavelConfig=heatmap_config";i3GEO.util.scriptTag(p,criaLayer,nomeScript)}},openlayers:{aplicaPropriedades:function(camada){camada.sel="nao";camada.download="nao";camada.AGUARDALEGENDA=false;camada.temporizador="";camada.copia=false;camada.procurar=false;camada.toponimia=false;camada.etiquetas=false;camada.tabela=false;camada.grafico=false;camada.destacar=false;camada.wms=false;camada.classe="NAO";return camada},layerMashup:function(camada,epsg){i3GEO.pluginI3geo.heatmap.openlayers.inicia(camada,i3GEO.editorOL.mapa);return[]},inicia:function(camada,objMapa){var nomeScript="heatmap_script",p=i3GEO.configura.locaplic+"/ferramentas/heatmap/openlayers_js.php",carregaJs="nao",criaLayer;criaLayer=function(){var temp,heatmap,transformedTestData={max:1,data:[]},data=heatmap_dados,datalen=heatmap_dados.length,nudata=[],max=0;if(!objMapa){objMapa=i3geoOL}while(datalen--){temp=heatmap_dados[datalen].count;nudata.push({lonlat:new OpenLayers.LonLat(data[datalen].lng,heatmap_dados[datalen].lat),count:temp});max=Math.max(max,temp)}transformedTestData.max=max;transformedTestData.data=nudata;heatmap=new OpenLayers.Layer.Heatmap(camada.name,objMapa,objMapa.baseLayer,{"visible":true,"opacity":camada.transparency,"radius":camada.plugini3geo.parametros.radius,"gradient":heatmap_config.gradient,"legend":{"title":camada.tema,"position":"bl","offset":[5,50]}},{isBaseLayer:false,projection:new OpenLayers.Projection("EPSG:4326"),displayInLayerSwitcher:true});heatmap.ligaCamada=function(){this.toggle();this.updateLayer()};heatmap.desLigaCamada=function(){this.toggle();this.updateLayer()};heatmap.removeCamada=function(){this.destroy()};heatmap.atualizaCamada=function(){this.updateLayer()};i3GEO.pluginI3geo.OBJETOS[camada.name]=heatmap;objMapa.addLayer(heatmap);heatmap.setDataSet(transformedTestData);heatmap_dados=null;if(i3GEO.janela){i3GEO.janela.fechaAguarde("aguardePlugin")}};if(!$i(nomeScript)){carregaJs="sim"}else{nomeScript=""}if(!i3GEO.configura||!i3GEO.configura.sid){i3GEO.configura.sid=""}p+="?carregajs="+carregaJs+"&layer="+camada.name+"&coluna="+camada.plugini3geo.parametros.coluna+"&tipoGradiente="+camada.plugini3geo.parametros.tipoGradiente+"&g_sid="+i3GEO.configura.sid+"&nomevariavel=heatmap_dados&nomevariavelConfig=heatmap_config";i3GEO.util.scriptTag(p,criaLayer,nomeScript)}},googleearth:{inicia:function(){alert("Plugin nao disponivel")}}},markercluster:{linkAjuda:function(){return i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=3&idajuda=121"},formAdmin:function(config){var parametros,ins="",configDefault='{"plugin":"markercluster","parametros":{"tipoEstilos": "default","gridSize":50}}';if(config===""){config=configDefault}config=YAHOO.lang.JSON.parse(config);if(config.plugin!="markercluster"){config=YAHOO.lang.JSON.parse(configDefault)}parametros=config.parametros;ins+=""+"<p>Distância máxima entre ponto em pixels:"+"<br><input name='gridSize' type='text' value='"+parametros.gridSize+"' size='30'></p>"+"<p>Tipo de estilos (deixe vazio para utilizar as classes definidas no Layer ou escreva 'default' para usar o normal):"+"<br><input name='tipoEstilos' type='text' value='"+parametros.tipoEstilos+"' size='30'></p>"+"<p>Os símbolos utilizados podem ser customizados alterando-se as classes do Mapfile</p>"+"<p>Veja o exemplo utilizado no tema _lmapadecluster.map</p>";return ins},iconeArvoreDeCamadas:function(nomecamada){return false},googlemaps:{aplicaPropriedades:function(camada){camada.sel="nao";camada.download="nao";camada.AGUARDALEGENDA=false;camada.temporizador="";camada.copia=false;camada.procurar=false;camada.toponimia=false;camada.etiquetas=false;camada.tabela=false;camada.grafico=false;camada.destacar=false;camada.wms=false;camada.classe="NAO";return camada},inicia:function(camada){var nomeScript="markercluster_script",p=i3GEO.configura.locaplic+"/ferramentas/markercluster/googlemaps_js.php",carregaJs="nao",criaLayer;criaLayer=function(){var markercluster,marcas,latLng,marker,n,i;n=markercluster_dados.length;marcas=[];for(i=0;i<n;i++){latLng=new google.maps.LatLng(markercluster_dados[i].lat,markercluster_dados[i].lng);marker=new google.maps.Marker({'position':latLng,icon:{url:markercluster_config.ponto.url,scaledSize:new google.maps.Size(markercluster_config.ponto.width,markercluster_config.ponto.height)}});marcas.push(marker)}markercluster=new MarkerClusterer(i3GeoMap,marcas,{"gridSize":parseInt(camada.plugini3geo.parametros.gridSize,10),"visible":true,"opacity":camada.transparency,"name":camada.name,"styles":markercluster_config.estilos});i3GEO.janela.fechaAguarde("aguardePlugin");i3GEO.eventos.cliquePerm.ativo=false;markercluster.ligaCamada=function(){i3GEO.pluginI3geo.OBJETOS[camada.name].ready_=true;i3GEO.pluginI3geo.OBJETOS[camada.name].redraw();i3GEO.eventos.cliquePerm.ativo=false};markercluster.desLigaCamada=function(){i3GEO.pluginI3geo.OBJETOS[camada.name].resetViewport(true);i3GEO.pluginI3geo.OBJETOS[camada.name].ready_=false;i3GEO.eventos.cliquePerm.ativo=true};markercluster.removeCamada=function(){i3GEO.pluginI3geo.OBJETOS[camada.name].clearMarkers();i3GEO.eventos.cliquePerm.ativo=true};markercluster.atualizaCamada=function(){i3GEO.pluginI3geo.OBJETOS[camada.name].ready_=true;i3GEO.pluginI3geo.OBJETOS[camada.name].redraw();i3GEO.eventos.cliquePerm.ativo=false};i3GEO.pluginI3geo.OBJETOS[camada.name]=markercluster;markercluster_dados=null};if(!$i(nomeScript)){carregaJs="sim"}else{nomeScript=""}p+="?carregajs="+carregaJs+"&layer="+camada.name+"&g_sid="+i3GEO.configura.sid+"&tipoEstilos="+camada.plugini3geo.parametros.tipoEstilos+"&nomevariavel=markercluster_dados&nomevariavelConfig=markercluster_config";i3GEO.util.scriptTag(p,criaLayer,nomeScript)}},openlayers:{aplicaPropriedades:function(camada){camada.sel="nao";camada.download="nao";camada.AGUARDALEGENDA=false;camada.temporizador="";camada.copia=false;camada.procurar=false;camada.toponimia=false;camada.etiquetas=false;camada.tabela=false;camada.grafico=false;camada.destacar=false;camada.wms=false;camada.classe="NAO";return camada},layerMashup:function(camada,epsg){i3GEO.pluginI3geo.markercluster.openlayers.inicia(camada,i3GEO.editorOL.mapa);return[]},inicia:function(camada,objMapa){var nomeScript="markercluster_script",p=i3GEO.configura.locaplic+"/ferramentas/markercluster/openlayers_js.php",carregaJs="nao",criaLayer;criaLayer=function(){var layerListeners,logMax,logMin,classes,min,max,markercluster,marcas,lonlat,n,i,style,nestilos,intervalo,regra,regras=[];nestilos=markercluster_config.estilos.length;n=markercluster_dados.length;classes=Array();logMax=Math.log(n)/Math.LN10; logMin=Math.log(1)/Math.LN10;intervalo=(logMax-logMin)/nestilos;for(i=0;i<nestilos;i++){if(i==0){classes[i]=logMin}else{classes[i]=classes[i-1]+intervalo}}classes=classes.map(function(x){return Math.pow(10,x)});classes.push(n);regra=new OpenLayers.Rule({filter:new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.LESS_THAN,property:"count",value:2}),symbolizer:{externalGraphic:markercluster_config.ponto.url,graphicWidth:markercluster_config.ponto.width,graphicHeight:markercluster_config.ponto.height,graphicYOffset:(markercluster_config.ponto.height/2)*-1}});regras.push(regra);min=2;for(i=0;i<nestilos;i++){max=classes[i+1];regra=new OpenLayers.Rule({filter:new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.BETWEEN,property:"count",lowerBoundary:min,upperBoundary:max}),symbolizer:{externalGraphic:markercluster_config.estilos[i].url,graphicWidth:markercluster_config.estilos[i].width,graphicHeight:markercluster_config.estilos[i].height,label:"${count}",labelOutlineWidth:1,fontColor:"#000000",fontOpacity:1,fontSize:"12px"}});regras.push(regra);min=max}style=new OpenLayers.Style(null,{rules:regras});if(!objMapa){objMapa=i3geoOL}layerListeners={featureclick:function(e){if(e.feature.cluster.length>1){objMapa.setCenter([e.feature.geometry.x,e.feature.geometry.y],objMapa.getZoom()+1,false,false)}return false}};markercluster=new OpenLayers.Layer.Vector(camada.name,{renderers:['Canvas','SVG'],strategies:[new OpenLayers.Strategy.AnimatedCluster({distance:parseInt(camada.plugini3geo.parametros.gridSize,10)})],styleMap:new OpenLayers.StyleMap(style),eventListeners:layerListeners});objMapa.addLayer(markercluster);marcas=[];for(i=0;i<n;i++){lonlat=new OpenLayers.LonLat(markercluster_dados[i].lng,markercluster_dados[i].lat);if(i3GEO.Interface.openlayers.googleLike===true){lonlat.transform(new OpenLayers.Projection("EPSG:4326"),new OpenLayers.Projection("EPSG:900913"))}marcas.push(new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(lonlat.lon,lonlat.lat)))}markercluster.addFeatures(marcas);i3GEO.janela.fechaAguarde("aguardePlugin");i3GEO.eventos.cliquePerm.ativo=false;markercluster.ligaCamada=function(){i3GEO.eventos.cliquePerm.ativo=false};markercluster.desLigaCamada=function(){i3GEO.eventos.cliquePerm.ativo=true};markercluster.removeCamada=function(){i3GEO.eventos.cliquePerm.ativo=true};markercluster.atualizaCamada=function(){i3GEO.eventos.cliquePerm.ativo=false};i3GEO.pluginI3geo.OBJETOS[camada.name]=markercluster;markercluster_dados=null};if(!$i(nomeScript)){carregaJs="sim"}else{nomeScript=""}p+="?carregajs="+carregaJs+"&layer="+camada.name+"&g_sid="+i3GEO.configura.sid+"&tipoEstilos="+camada.plugini3geo.parametros.tipoEstilos+"&nomevariavel=markercluster_dados&nomevariavelConfig=markercluster_config";i3GEO.util.scriptTag(p,criaLayer,nomeScript)}}},layerkml:{linkAjuda:function(){return i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=3&idajuda=121"},formAdmin:function(config){var parametros,ins="",configDefault='{"plugin":"layerkml","parametros":{"url": ""}}';if(config===""){config=configDefault}config=YAHOO.lang.JSON.parse(config);if(config.plugin!="layerkml"){config=YAHOO.lang.JSON.parse(configDefault)}parametros=config.parametros;ins+="<p>Url do arquivo Kml:<br><input name='url' type='text' value='"+parametros.url+"'/></p>"+"<p>Veja o exemplo utilizado no tema _lmapakml.map</p>";return ins},iconeArvoreDeCamadas:function(nomecamada){return false},googlemaps:{aplicaPropriedades:function(camada){camada.sel="nao";camada.download="nao";camada.AGUARDALEGENDA=false;camada.temporizador="";camada.copia=false;camada.procurar=false;camada.toponimia=false;camada.etiquetas=false;camada.tabela=false;camada.grafico=false;camada.destacar=false;camada.wms=false;camada.classe="NAO";return camada},inicia:function(camada){var layerkml=new google.maps.KmlLayer(camada.plugini3geo.parametros.url,{map:i3GeoMap,preserveViewport:true,name:camada.name});i3GEO.janela.fechaAguarde("aguardePlugin");layerkml.ligaCamada=function(){i3GEO.pluginI3geo.OBJETOS[camada.name].setMap(i3GeoMap)};layerkml.desLigaCamada=function(){i3GEO.pluginI3geo.OBJETOS[camada.name].setMap(null)};layerkml.removeCamada=function(){i3GEO.pluginI3geo.OBJETOS[camada.name].setMap(null);i3GEO.pluginI3geo.OBJETOS[camada.name].resetViewport(true)};layerkml.atualizaCamada=function(){i3GEO.pluginI3geo.OBJETOS[camada.name].setMap(null);i3GEO.pluginI3geo.OBJETOS[camada.name].resetViewport(true);i3GEO.pluginI3geo.OBJETOS[camada.name].setMap(i3GeoMap)};i3GEO.pluginI3geo.OBJETOS[camada.name]=layerkml}},openlayers:{aplicaPropriedades:function(camada){camada.sel="nao";camada.download="nao";camada.AGUARDALEGENDA=false;camada.temporizador="";camada.copia=false;camada.procurar=false;camada.toponimia=false;camada.etiquetas=false;camada.tabela=false;camada.grafico=false;camada.destacar=false;camada.wms=false;camada.classe="NAO";return camada},layerMashup:function(camada,epsg){i3GEO.pluginI3geo.layerkml.openlayers.inicia(camada,i3GEO.editorOL.mapa);return[]},inicia:function(camada,objMapa){var layerkml;url=i3GEO.configura.locaplic+"/classesphp/proxy.php?url="+camada.plugini3geo.parametros.url;layerkml=new OpenLayers.Layer.Vector(camada.name,{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})})});i3geoOL.addLayer(layerkml);if(!objMapa){objMapa=i3geoOL}layerkml.div.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}if(targ.id){temp=targ.id.split("_Point");if(temp[0]==="OpenLayers_Geometry"){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))}}}}};i3GEO.janela.fechaAguarde("aguardePlugin");i3GEO.eventos.cliquePerm.ativo=false;layerkml.ligaCamada=function(){i3GEO.eventos.cliquePerm.ativo=false};layerkml.desLigaCamada=function(){i3GEO.eventos.cliquePerm.ativo=true};layerkml.removeCamada=function(){i3GEO.eventos.cliquePerm.ativo=true};layerkml.atualizaCamada=function(){i3GEO.eventos.cliquePerm.ativo=false};i3GEO.pluginI3geo.OBJETOS[camada.name]=layerkml}}},parametrossql:{linkAjuda:function(){return i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=3&idajuda=127"},formAdmin:function(config){var n,i,parametros,ins="",configDefault='{"plugin":"parametrossql","ativo":"sim","parametros":[{"titulo":"","tipo":"input","valores":[],"chave":"","prog":""},{"titulo":"","tipo":"input","valores":[],"chave":"","prog":""},{"titulo":"","tipo":"input","valores":[],"chave":"","prog":""},{"titulo":"","tipo":"input","valores":[],"chave":"","prog":""}]}';if(config===""){config=configDefault}config=YAHOO.lang.JSON.parse(config);if(config.plugin!="parametrossql"){config=YAHOO.lang.JSON.parse(configDefault)}parametros=config.parametros;n=4;if(config.ativo==undefined){config.ativo="sim"}ins+="<p class='paragrafo'>Abre o formulário quando a camada é adicionada ao mapa: (true ou false)</p>";ins+="<select style='width:200px' id='parametrosSqlAtivo' ><option value='' ></option>";if(config.ativo==="nao"){ins+="<option value=sim >sim</option><option value=nao selected >nao</option></select>"}else{ins+="<option value=sim selected >sim</option><option value=nao >nao</option></select>"}ins+="<table><tr><td>Título</td><td>Chave</td><td>Tipo (input ou select)</td><td>Valores</td><td>PHP que retorna os valores (opcional)</td></tr>";for(i=0;i<n;i++){ins+="<tr><td><input name='titulo' type=text size=20 value='"+parametros[i].titulo+"' /></td>"+"<td><input name='chave' type=text size=20 value='"+parametros[i].chave+"' /></td>"+"<td><input name='tipo' type=text size=20 value='"+parametros[i].tipo+"' /></td> "+"<td><input name='valores' type=text size=20 value='"+parametros[i].valores+"' /></td> "+"<td><input name='prog' type=text size=20 value='"+parametros[i].prog+"' /></td> "+"<td></tr>"}ins+="</table>"+"<p class='paragrafo'>As chaves são palavras que devem existir no SQL definido em DATA e/ou no filtro (FILTER)."+"<br>O usuário irá fornecer os valores que serão então utilizados para substituir as chaves de forma dinâmica"+"<br>Será mostrado ao usuário um formulário com opções. Cada opção conterá um título e um campo de formulário"+"<br>Cada campo de formulário pode ser dos tipos input (para digitar um valor) ou select (caixa de opções)."+"<br>Em valores deve ser definida a lista ou o valor default que será mostrado. No caso de listas, utilize vírgula para separar os valores."+"<br>Em ativo, é indicado com sim ou nao se o formulário será aberto quando a camada for adicionada ao mapa."+"<br>Como opcional, pode ser definido o endereço de um programa PHP que retorna a lista de nomes e valores que serão utilizados para preencher "+"o campo de escolha. Para mais informações, veja o mapfile i3geo/temas/_llocaliphp.map. O caminho desse arquivo PHP é relativo à pasta i3geo.";return ins},parametrosFormAdmin:function(onde){var campo=0,nlinhas=4,ncampos=5,campos=onde.getElementsByTagName("input"),par=[],temp=[],i,j;for(j=0;j<nlinhas;j++){temp=[];for(i=0;i<ncampos;i++){if(campos[campo]&&campos[campo].name!=""){temp.push('"'+campos[campo].name+'" : "'+campos[campo].value+'"')}campo++}par.push("{"+temp.join(",")+"}")}return'{"plugin":"parametrossql","ativo":"'+$i("parametrosSqlAtivo").value+'","parametros":['+par.join(",")+']}'},iconeArvoreDeCamadas:function(nomecamada){var icone="<img class='pluginParametrossql' "+"onclick='i3GEO.util.animaClique(this);"+"i3GEO.pluginI3geo.parametrossql.buscaParForm(\""+nomecamada+"\");return false;'"+"title='Variaveis' "+"src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' />";return icone},buscaParForm:function(nomecamada){var p,cp,temp,s;temp=function(retorno){var camada;retorno.data.ativo="sim";if(i3GEO.arvoreDeCamadas){camada=i3GEO.arvoreDeCamadas.pegaTema(nomecamada);camada.plugini3geo=retorno.data}else{camada={plugini3geo:retorno.data,name:nomecamada}}i3GEO.pluginI3geo.parametrossql.inicia(camada)};s=i3GEO.configura.sid;if(s===undefined){s=""}p=i3GEO.configura.locaplic+"/ferramentas/parametrossql/exec.php?g_sid="+s+"&funcao=PARAMETROSPLUGIN&tema="+nomecamada;cp=new cpaint();cp.set_response_type("JSON");cp.call(p,"foo",temp)},inicia:function(camada){i3GEO.janela.fechaAguarde("aguardePlugin");var iniciaform=function(){i3GEOF.parametrossql.iniciaJanelaFlutuante(camada)};i3GEO.util.scriptTag((i3GEO.configura.locaplic+"/ferramentas/parametrossql/dependencias.php"),iniciaform,"parametrossql_script")},googlemaps:{inicia:function(camada){i3GEO.pluginI3geo.parametrossql.inicia(camada)},aplicaPropriedades:function(camada){return camada}},openlayers:{inicia:function(camada){i3GEO.pluginI3geo.parametrossql.inicia(camada)},aplicaPropriedades:function(camada){return camada},layerMashup:function(camada,epsg){var p=[];if(!camada.cache){camada["cache"]="NAO"}if(!camada.transitioneffect){camada["transitioneffect"]="SIM"}if(camada["transitioneffect"]==="SIM"){camada["transitioneffect"]="resize"}else{camada["transitioneffect"]=null}if(camada.cache==="NAO"){p.push(new OpenLayers.Layer.WMS(camada.tema,i3GEO.configura.locaplic+"ferramentas/parametrossql/ogc.php?tema="+camada.name+"&",{layers:camada.name,SRS:'EPSG:'+epsg,FORMAT:'image/png'},{singleTile:false,isBaseLayer:false,visibility:true,transitionEffect:camada["transitioneffect"],plugini3geo:"parametrossql","pluginparametros":camada.plugini3geo.parametros}))}else{p.push(new OpenLayers.Layer.TMS(camada.tema,i3GEO.configura.locaplic+"ferramentas/parametrossql/ogc.php?tema="+camada.name+"&",{singleTile:false,isBaseLayer:false,layers:camada.name,visibility:true,serviceVersion:"&tms=",tileOrigin:new OpenLayers.LonLat(-180,-90),layername:camada.name,type:"png",transitionEffect:camada["transitioneffect"],plugini3geo:"parametrossql","pluginparametros":camada.plugini3geo.parametros}));p.push(new OpenLayers.Layer.WMS(camada.tema,i3GEO.configura.locaplic+"ferramentas/parametrossql/ogc.php?tema="+camada.name+"&",{layers:camada.name,SRS:'EPSG:'+epsg,FORMAT:'image/png'},{singleTile:true,isBaseLayer:false,visibility:false,displayInLayerSwitcher:false,transitionEffect:null,plugini3geo:"parametrossql","pluginparametros":camada.plugini3geo.parametros}))}return p}}}}; |
| 289 | 289 | // |
| 290 | 290 | //compactados/euDock.2.0.js |
| 291 | -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(onde){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:1;position:absolute;border:0px solid black;'></div>"+"<div id='"+this.id+"' style='z-index:1;position:absolute;border:0px solid black; cursor: pointer;'></div>";if(onde){novoel.style.zIndex=100000;onde.appendChild(novoel)}else{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(){var tempx,tempy;if(this.objectAlign==euDOWN){if(onde){tempx=(this.idObjectHook.offsetWidth/2);tempy=0}else{tempx=euIdObjLeft(this.idObjectHook)+(this.idObjectHook.offsetWidth/2);tempy=euIdObjTop(this.idObjectHook)+this.idObjectHook.offsetHeight+this.offset;if(navm&&!document.doctype||(navm&&document.doctype&&document.doctype.systemId=="")){tempx=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA))[0]+(euIdObjLeft(this.idObjectHook)/2)}if(navm&&i3GEO.util.versaoNavegador()==="IE8"&&tempx<this.idObjectHook.offsetWidth){tempx=i3GEO.parametros.w/2;if(i3GEO.guias.TIPO==="guia"||i3GEO.guias.TIPO==="sanfona"&&$i("contemFerramentas")){tempx+=parseInt($i("contemFerramentas").style.width,10)}}}this.setCenterPos(tempx,tempy)}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(){};this.kernelMouseOver=function(){};this.kernelMouseOut=function(){};this.mouseOut=function(){};this.mouseOver=function(){};this.mouseMove=function(x,y){};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=function(func){};this.setAllZoomFuncH=function(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 i,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(){};this.refresh=function(){this.updateDims()};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);return 38};this.getHeight=function(){if(!this.loaded)return 0;return 38};this.isRunning=function(){return this.runningFrame||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)){this.mouseInsideClick(x,y,this.id,this.getAbsolutePosX(),this.getAbsolutePosY())}}};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(){};function euKernel(){};function on_MouseMove(e){return true};function on_MouseDown(e){return true};function on_MouseUp(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);return true}; | |
| 291 | +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(onde){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:1;position:absolute;border:0px solid black;'></div>"+"<div id='"+this.id+"' style='z-index:1;position:absolute;border:0px solid black; cursor: pointer;'></div>";if(onde){novoel.style.zIndex=100000;onde.appendChild(novoel)}else{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(){var tempx,tempy;if(this.objectAlign==euDOWN){if(onde){tempx=(this.idObjectHook.offsetWidth/2);tempy=0}else{tempx=euIdObjLeft(this.idObjectHook)+(this.idObjectHook.offsetWidth/2);tempy=euIdObjTop(this.idObjectHook)+this.idObjectHook.offsetHeight+this.offset;if(navm&&!document.doctype||(navm&&document.doctype&&document.doctype.systemId=="")){tempx=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA))[0]+(euIdObjLeft(this.idObjectHook)/2)}if(navm&&i3GEO.util.versaoNavegador()==="IE8"&&tempx<this.idObjectHook.offsetWidth){tempx=i3GEO.parametros.w/2;if(i3GEO.guias.TIPO==="guia"||i3GEO.guias.TIPO==="sanfona"&&$i("contemFerramentas")){tempx+=parseInt($i("contemFerramentas").style.width,10)}}}this.setCenterPos(tempx,tempy)}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(){};this.kernelMouseOver=function(){};this.kernelMouseOut=function(){};this.mouseOut=function(){};this.mouseOver=function(){};this.mouseMove=function(x,y){};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=function(func){};this.setAllZoomFuncH=function(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 i,id=params.id;var id='euDock_icon_'+euEnv.Kost.next();euEnv.euDockArray[id]=new euDockIcon(id,this,params.titulo);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,titulo){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(){};this.refresh=function(){this.updateDims()};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);return 38};this.getHeight=function(){if(!this.loaded)return 0;return 38};this.isRunning=function(){return this.runningFrame||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)){this.mouseInsideClick(x,y,this.id,this.getAbsolutePosX(),this.getAbsolutePosY())}}};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(){};function euKernel(){};function on_MouseMove(e){return true};function on_MouseDown(e){return true};function on_MouseUp(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);return true}; | |
| 292 | 292 | // |
| 293 | 293 | //compactados/euDock.Image.js |
| 294 | -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;container.className="noprint";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){if(container.id==="euDock_0"){document.getElementById(this.id).style.top=(y-10)+'px'}else{document.getElementById(this.id).style.top=y+'px'}};this.getWidth=function(){if(document.getElementById(this.id)){return document.getElementById(this.id).width}};this.setWidth=function(w){document.getElementById(this.id).width=Math.round(w)};this.getHeight=function(){if(document.getElementById(this.id)){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'};if(container.id==="euDock_0"){var classe="eudockImagemBottom";if(i3GEO.barraDeBotoes.POSICAO==="top"){classe="eudockImagemTop"}this.container.innerHTML+="<img onLoad='"+onLoadFunc+";' id='"+this.id+"' src='"+args.image+"' style='position:absolute;visibility:hidden;' class='"+classe+"' >"}else{this.container.innerHTML+="<img onLoad='"+onLoadFunc+";' id='"+this.id+"' src='"+args.image+"' style='position:absolute;visibility:hidden;' class='noprint' >"}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.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.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"))}}; | |
| 294 | +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;container.className="noprint";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){if(container.id==="euDock_0"){document.getElementById(this.id).style.top=(y-10)+'px'}else{document.getElementById(this.id).style.top=y+'px'}};this.getWidth=function(){if(document.getElementById(this.id)){return document.getElementById(this.id).width}};this.setWidth=function(w){document.getElementById(this.id).width=Math.round(w)};this.getHeight=function(){if(document.getElementById(this.id)){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'};if(container.id==="euDock_0"){var classe="eudockImagemBottom";if(i3GEO.barraDeBotoes.POSICAO==="top"){classe="eudockImagemTop"}var alt="";if(args.titulo&&args.titulo!=""){alt=args.titulo}this.container.innerHTML+="<img title='"+alt+"' onLoad='"+onLoadFunc+";' id='"+this.id+"' src='"+args.image+"' style='position:absolute;visibility:hidden;' class='"+classe+"' >"}else{this.container.innerHTML+="<img onLoad='"+onLoadFunc+";' id='"+this.id+"' src='"+args.image+"' style='position:absolute;visibility:hidden;' class='noprint' >"}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.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.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"))}}; | |
| 295 | 295 | // |
| 296 | 296 | //compactados/mustache.js |
| 297 | 297 | (function(global,factory){if(typeof exports==="object"&&exports){factory(exports)}else if(typeof define==="function"&&define.amd){define(['exports'],factory)}else{factory(global.Mustache={})}}(this,function(mustache){var Object_toString=Object.prototype.toString;var isArray=Array.isArray||function(object){return Object_toString.call(object)==='[object Array]'};function isFunction(object){return typeof object==='function'}function escapeRegExp(string){return string.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var RegExp_test=RegExp.prototype.test;function testRegExp(re,string){return RegExp_test.call(re,string)}var nonSpaceRe=/\S/;function isWhitespace(string){return!testRegExp(nonSpaceRe,string)}var entityMap={"&":"&","<":"<",">":">",'"':'"',"'":''',"/":'/'};function escapeHtml(string){return String(string).replace(/[&<>"'\/]/g,function(s){return entityMap[s]})}var whiteRe=/\s*/;var spaceRe=/\s+/;var equalsRe=/\s*=/;var curlyRe=/\s*\}/;var tagRe=/#|\^|\/|>|\{|&|=|!/;function parseTemplate(template,tags){if(!template)return[];var sections=[];var tokens=[];var spaces=[];var hasTag=false;var nonSpace=false;function stripSpace(){if(hasTag&&!nonSpace){while(spaces.length)delete tokens[spaces.pop()]}else{spaces=[]}hasTag=false;nonSpace=false}var openingTagRe,closingTagRe,closingCurlyRe;function compileTags(tags){if(typeof tags==='string')tags=tags.split(spaceRe,2);if(!isArray(tags)||tags.length!==2)throw new Error('Invalid tags: '+tags);openingTagRe=new RegExp(escapeRegExp(tags[0])+'\\s*');closingTagRe=new RegExp('\\s*'+escapeRegExp(tags[1]));closingCurlyRe=new RegExp('\\s*'+escapeRegExp('}'+tags[1]))}compileTags(tags||mustache.tags);var scanner=new Scanner(template);var start,type,value,chr,token,openSection;while(!scanner.eos()){start=scanner.pos;value=scanner.scanUntil(openingTagRe);if(value){for(var i=0,valueLength=value.length;i<valueLength;++i){chr=value.charAt(i);if(isWhitespace(chr)){spaces.push(tokens.length)}else{nonSpace=true}tokens.push(['text',chr,start,start+1]);start+=1;if(chr==='\n')stripSpace()}}if(!scanner.scan(openingTagRe))break;hasTag=true;type=scanner.scan(tagRe)||'name';scanner.scan(whiteRe);if(type==='='){value=scanner.scanUntil(equalsRe);scanner.scan(equalsRe);scanner.scanUntil(closingTagRe)}else if(type==='{'){value=scanner.scanUntil(closingCurlyRe);scanner.scan(curlyRe);scanner.scanUntil(closingTagRe);type='&'}else{value=scanner.scanUntil(closingTagRe)}if(!scanner.scan(closingTagRe))throw new Error('Unclosed tag at '+scanner.pos);token=[type,value,start,scanner.pos];tokens.push(token);if(type==='#'||type==='^'){sections.push(token)}else if(type==='/'){openSection=sections.pop();if(!openSection)throw new Error('Unopened section "'+value+'" at '+start);if(openSection[1]!==value)throw new Error('Unclosed section "'+openSection[1]+'" at '+start)}else if(type==='name'||type==='{'||type==='&'){nonSpace=true}else if(type==='='){compileTags(value)}}openSection=sections.pop();if(openSection)throw new Error('Unclosed section "'+openSection[1]+'" at '+scanner.pos);return nestTokens(squashTokens(tokens))}function squashTokens(tokens){var squashedTokens=[];var token,lastToken;for(var i=0,numTokens=tokens.length;i<numTokens;++i){token=tokens[i];if(token){if(token[0]==='text'&&lastToken&&lastToken[0]==='text'){lastToken[1]+=token[1];lastToken[3]=token[3]}else{squashedTokens.push(token);lastToken=token}}}return squashedTokens}function nestTokens(tokens){var nestedTokens=[];var collector=nestedTokens;var sections=[];var token,section;for(var i=0,numTokens=tokens.length;i<numTokens;++i){token=tokens[i];switch(token[0]){case'#':case'^':collector.push(token);sections.push(token);collector=token[4]=[];break;case'/':section=sections.pop();section[5]=token[2];collector=sections.length>0?sections[sections.length-1][4]:nestedTokens;break;default:collector.push(token)}}return nestedTokens}function Scanner(string){this.string=string;this.tail=string;this.pos=0}Scanner.prototype.eos=function(){return this.tail===""};Scanner.prototype.scan=function(re){var match=this.tail.match(re);if(!match||match.index!==0)return'';var string=match[0];this.tail=this.tail.substring(string.length);this.pos+=string.length;return string};Scanner.prototype.scanUntil=function(re){var index=this.tail.search(re),match;switch(index){case-1:match=this.tail;this.tail="";break;case 0:match="";break;default:match=this.tail.substring(0,index);this.tail=this.tail.substring(index)}this.pos+=match.length;return match};function Context(view,parentContext){this.view=view==null?{}:view;this.cache={'.':this.view};this.parent=parentContext}Context.prototype.push=function(view){return new Context(view,this)};Context.prototype.lookup=function(name){var cache=this.cache;var value;if(name in cache){value=cache[name]}else{var context=this,names,index;while(context){if(name.indexOf('.')>0){value=context.view;names=name.split('.');index=0;while(value!=null&&index<names.length)value=value[names[index++]]}else{value=context.view[name]}if(value!=null)break;context=context.parent}cache[name]=value}if(isFunction(value))value=value.call(this.view);return value};function Writer(){this.cache={}}Writer.prototype.clearCache=function(){this.cache={}};Writer.prototype.parse=function(template,tags){var cache=this.cache;var tokens=cache[template];if(tokens==null)tokens=cache[template]=parseTemplate(template,tags);return tokens};Writer.prototype.render=function(template,view,partials){var tokens=this.parse(template);var context=(view instanceof Context)?view:new Context(view);return this.renderTokens(tokens,context,partials,template)};Writer.prototype.renderTokens=function(tokens,context,partials,originalTemplate){var buffer='';var self=this;function subRender(template){return self.render(template,context,partials)}var token,value;for(var i=0,numTokens=tokens.length;i<numTokens;++i){token=tokens[i];switch(token[0]){case'#':value=context.lookup(token[1]);if(!value)continue;if(isArray(value)){for(var j=0,valueLength=value.length;j<valueLength;++j){buffer+=this.renderTokens(token[4],context.push(value[j]),partials,originalTemplate)}}else if(typeof value==='object'||typeof value==='string'){buffer+=this.renderTokens(token[4],context.push(value),partials,originalTemplate)}else if(isFunction(value)){if(typeof originalTemplate!=='string')throw new Error('Cannot use higher-order sections without the original template');value=value.call(context.view,originalTemplate.slice(token[3],token[5]),subRender);if(value!=null)buffer+=value}else{buffer+=this.renderTokens(token[4],context,partials,originalTemplate)}break;case'^':value=context.lookup(token[1]);if(!value||(isArray(value)&&value.length===0))buffer+=this.renderTokens(token[4],context,partials,originalTemplate);break;case'>':if(!partials)continue;value=isFunction(partials)?partials(token[1]):partials[token[1]];if(value!=null)buffer+=this.renderTokens(this.parse(value),context,partials,value);break;case'&':value=context.lookup(token[1]);if(value!=null)buffer+=value;break;case'name':value=context.lookup(token[1]);if(value!=null)buffer+=mustache.escape(value);break;case'text':buffer+=token[1];break}}return buffer};mustache.name="mustache.js";mustache.version="0.8.1";mustache.tags=["{{","}}"];var defaultWriter=new Writer();mustache.clearCache=function(){return defaultWriter.clearCache()};mustache.parse=function(template,tags){return defaultWriter.parse(template,tags)};mustache.render=function(template,view,partials){return defaultWriter.render(template,view,partials)};mustache.to_html=function(template,view,partials,send){var result=mustache.render(template,view,partials);if(isFunction(send)){send(result)}else{return result}};mustache.escape=escapeHtml;mustache.Scanner=Scanner;mustache.Context=Context;mustache.Writer=Writer})); | ... | ... |
classesphp/classe_toponimia.php
ms_criamapa.php
| ... | ... | @@ -826,11 +826,11 @@ function incluiTemasIniciais(){ |
| 826 | 826 | $layern = $maptemp->getLayer($i); |
| 827 | 827 | if($layern->type == MS_LAYER_RASTER) |
| 828 | 828 | {$existeraster = true;} |
| 829 | - if ($layern->name == "estadosl") | |
| 830 | - {$layern->set("data",$locaplic."/aplicmap/dados/estados.shp");} | |
| 829 | + if ($layern->name == "estadosl"){ | |
| 830 | + $layern->set("data",$locaplic."/aplicmap/dados/estados.shp"); | |
| 831 | + } | |
| 831 | 832 | $layern->setmetadata("nomeoriginal",$layern->name); |
| 832 | 833 | $nNome = str_replace(".map","",basename($arqtemp)); |
| 833 | - //TODO verificar o uso dos metadados arquivotemaoriginal e nomeoriginal | |
| 834 | 834 | $layern->setmetadata("arquivotemaoriginal",$nNome); |
| 835 | 835 | autoClasses($layern,$mapn); |
| 836 | 836 | // | ... | ... |
pacotes/eudock/js/euDock.2.0.js
| ... | ... | @@ -556,7 +556,7 @@ var euOPAQUE = 16; |
| 556 | 556 | this.addIcon = function(args,params){ |
| 557 | 557 | var i,id = params.id; |
| 558 | 558 | var id = 'euDock_icon_'+euEnv.Kost.next(); |
| 559 | - euEnv.euDockArray[id] = new euDockIcon(id,this); | |
| 559 | + euEnv.euDockArray[id] = new euDockIcon(id,this,params.titulo); | |
| 560 | 560 | euEnv.euDockArray[id].addElement(args); |
| 561 | 561 | this.iconsArray.push(euEnv.euDockArray[id]); |
| 562 | 562 | for (i in this.iconParams) |
| ... | ... | @@ -591,9 +591,8 @@ var euOPAQUE = 16; |
| 591 | 591 | ****** (START) ******* |
| 592 | 592 | **************************************** |
| 593 | 593 | */ |
| 594 | - function euDockIcon(id,dock){ | |
| 594 | + function euDockIcon(id,dock,titulo){ | |
| 595 | 595 | this.id = id; |
| 596 | - | |
| 597 | 596 | this.parentDock = dock; |
| 598 | 597 | |
| 599 | 598 | this.elementsArray; |
| ... | ... | @@ -747,7 +746,6 @@ var euOPAQUE = 16; |
| 747 | 746 | this.mouseInsideClick(x,y,this.id,this.getAbsolutePosX(),this.getAbsolutePosY()); |
| 748 | 747 | } |
| 749 | 748 | }; |
| 750 | - | |
| 751 | 749 | }; |
| 752 | 750 | /* |
| 753 | 751 | **************************************** | ... | ... |
pacotes/eudock/js/euDock.Image.js
| ... | ... | @@ -117,7 +117,11 @@ if (!euEnv.imageBasePath) |
| 117 | 117 | if(i3GEO.barraDeBotoes.POSICAO === "top"){ |
| 118 | 118 | classe = "eudockImagemTop"; |
| 119 | 119 | } |
| 120 | - this.container.innerHTML+="<img onLoad='"+onLoadFunc+";' id='"+this.id+"' src='"+args.image+"' style='position:absolute;visibility:hidden;' class='"+classe+"' >"; | |
| 120 | + var alt = ""; | |
| 121 | + if(args.titulo && args.titulo != ""){ | |
| 122 | + alt = args.titulo; | |
| 123 | + } | |
| 124 | + this.container.innerHTML+="<img title='" + alt + "' onLoad='"+onLoadFunc+";' id='"+this.id+"' src='"+args.image+"' style='position:absolute;visibility:hidden;' class='"+classe+"' >"; | |
| 121 | 125 | } |
| 122 | 126 | else{ |
| 123 | 127 | this.container.innerHTML+="<img onLoad='"+onLoadFunc+";' id='"+this.id+"' src='"+args.image+"' style='position:absolute;visibility:hidden;' class='noprint' >"; | ... | ... |