index.js 22 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518
if(typeof(i3GEOF) === 'undefined'){
    var i3GEOF = {};
}
i3GEOF.wmstime = {
        configura: {
            "1": {
                titulo: "Active Fires (1 month - Terra/MODIS)",
                servico:"http://neowms.sci.gsfc.nasa.gov/wms/wms?",
                layers:"MOD14A1_M_FIRE",
                styles:"rgb",
                srs:"EPSG:4326",
                format:"image/jpeg",
                descricao:"Dados acumulados de um mês março de 2000 a março de 2009. Fire is a recurring part of nature.  Wildfires can be caused by lightning striking a forest canopy or, in a few isolated cases, by lava or hot rocks ejected from erupting volcanoes.  Most fires worldwide are started by humans, sometimes accidentally and sometimes on purpose.  Not all fires are bad.  Fire clears away dead and dying underbrush, which can help restore forest ecosystems to good health.  Humans use fire as a tool in slash-and-burn agriculture to speed up the process of breaking down unwanted vegetation into the soil.  Humans also use fire to clear away old-growth forests to make room for living spaces, roads, and fields for raising crops and cattle.  But not all fires are good.  Wildfires can destroy natural resources and human structures.  Globally, fire plays a major role in Earth's carbon cycle by releasing carbon into the air, and by consuming trees that would otherwise absorb carbon from the air during photosynthesis.  These maps show the locations of actively burning fires around the world, detected by instruments aboard NASA satellites.",
                anoInicio: 2006,
                mesInicio: 1,
                diaInicio: 1,
                anoFim: 2006,
                mesFim: 12,
                diaFim: 1,
                tipo: 2
            }
        },
        quadroAtual: 0,
        idServicoEscolhido: "",
        emPausa: true,
        MUSTACHE : "",
        mustacheHash : function() {
            var dicionario = i3GEO.idioma.objetoIdioma(i3GEOF.wmstime.dicionario);
            dicionario["locaplic"] = i3GEO.configura.locaplic;
            return dicionario;
        },
        inicia: function(iddiv){
            var ins,key = "";
            if(i3GEOF.wmstime.MUSTACHE == ""){
                $.get(i3GEO.configura.locaplic + "/ferramentas/wmstime/template_mst.html", function(template) {
                    i3GEOF.wmstime.MUSTACHE = template;
                    i3GEOF.wmstime.inicia(iddiv);
                });
                return;
            }
            $i(iddiv).innerHTML = i3GEOF.wmstime.html();

            ins = "<select  class='form-control' onchange='i3GEOF.wmstime.escolheuServico(this.value)'><option value='' >---</option>";
            for(key in i3GEOF.wmstime.configura){
                ins += "<option value='"+key+"'>"+i3GEOF.wmstime.configura[key].titulo+"</option>";
            }
            ins += "</select><b class='caret careti'></b>";
            $i("i3GEOFwmstimelistaDeServicos").innerHTML = ins;
            i3GEO.guias.mostraGuiaFerramenta("i3GEOwmstimeguia1","i3GEOwmstimeguia");
            $i("i3GEOwmstimeguia1").onclick = function(){
                i3GEO.guias.mostraGuiaFerramenta("i3GEOwmstimeguia1","i3GEOwmstimeguia");
            };
            $i("i3GEOwmstimeguia2").onclick = function(){
                if(i3GEOF.wmstime.idServicoEscolhido != ""){
                    i3GEO.guias.mostraGuiaFerramenta("i3GEOwmstimeguia2","i3GEOwmstimeguia");
                }
            };
        },
        html:function() {
            var ins = Mustache.render(i3GEOF.wmstime.MUSTACHE, i3GEOF.wmstime.mustacheHash());
            return ins;
        },
        iniciaJanelaFlutuante: function(){
            var minimiza,cabecalho,janela,divid,temp,titulo;
            if ($i("i3GEOF.wmstime")) {
                return;
            }
            //cria a janela flutuante
            cabecalho = function(){

            };
            minimiza = function(){
                i3GEO.janela.minimiza("i3GEOF.wmstime",200);
            };
            titulo = "<span class='i3GeoTituloJanelaBsNolink' >WMS Time</span></div>";
            janela = i3GEO.janela.cria(
                    "600px",
                    "400px",
                    "",
                    "",
                    "",
                    titulo,
                    "i3GEOF.wmstime",
                    false,
                    "hd",
                    cabecalho,
                    minimiza,
                    "",
                    true,
                    "",
                    "",
                    "",
                    "",
                    "76"
            );
            divid = janela[2].id;
            i3GEOF.wmstime.aguarde = $i("i3GEOF.wmstime_imagemCabecalho").style;
            i3GEOF.wmstime.inicia(divid);
        },
        /*
Function: i3GEOF.wmstime.escolheuServico

Monta a tela de parametros ap&oacute;s um servi&ccedil;o ter sido escolhido

Parametro:

idWMS {String} - id do servi&ccedil;o escolhido
         */
        escolheuServico: function(idWMS){
            i3GEOF.wmstime.idServicoEscolhido = idWMS;
            tipoServico = i3GEOF.wmstime.configura[idWMS].tipo;
            servico = i3GEOF.wmstime.configura[idWMS].servico+"&VERSION=1.1.1&REQUEST=GetMap&layers="+i3GEOF.wmstime.configura[idWMS].layers+"&styles="+i3GEOF.wmstime.configura[idWMS].styles+"&srs="+i3GEOF.wmstime.configura[idWMS].srs+"&format="+i3GEOF.wmstime.configura[idWMS].format;
            $i("i3GEOFwmstimeiServico").value = servico;
            $i("WMS_descricao").innerHTML = i3GEOF.wmstime.configura[idWMS].descricao;

            $i("WMS_anoinicio").value = i3GEOF.wmstime.configura[idWMS].anoInicio;
            //if(tipoServico > 1)
            $i("WMS_mesinicio").value = i3GEOF.wmstime.configura[idWMS].mesInicio;
            //if(tipoServico > 2)
            $i("WMS_diainicio").value = i3GEOF.wmstime.configura[idWMS].diaInicio;
            $i("WMS_anofim").value = i3GEOF.wmstime.configura[idWMS].anoFim;
            //if(tipoServico > 1)
            $i("WMS_mesfim").value = i3GEOF.wmstime.configura[idWMS].mesFim;
            //if(tipoServico > 2)
            $i("WMS_diafim").value = i3GEOF.wmstime.configura[idWMS].diaFim;

            var ins = "<select class='form-control' id='umaImagemPor' >";
            if(tipoServico == 1){
                ins += "<option value='ano' selected >"+$trad(10,i3GEOF.wmstime.dicionario)+"</option></select>";
            }
            if(tipoServico == 2){
                ins += "<option value='ano' >"+$trad(10,i3GEOF.wmstime.dicionario)+"</option>";
                ins += "<option value='mes' selected >"+$trad(11,i3GEOF.wmstime.dicionario)+"</option></select>";
            }
            if(tipoServico == 3){
                ins += "<option value='ano'  >"+$trad(10,i3GEOF.wmstime.dicionario)+"</option>";
                ins += "<option value='mes' >"+$trad(11,i3GEOF.wmstime.dicionario)+"</option>";
                ins += "<option value='dia' selected >"+$trad(12,i3GEOF.wmstime.dicionario)+"</option></select><b class='caret careti'></b>";
            }
            $i("divumaImagemPor").innerHTML = ins;
        },
        /*
Function: i3GEOF.wmstime.iniciaImagens

Inicia a tela de apresenta&ccedil;&atilde;o das imagens
         */
        iniciaImagens: function(){
            if(i3GEOF.wmstime.idServicoEscolhido == ""){
                return;
            }
            i3GEO.guias.mostraGuiaFerramenta("i3GEOwmstimeguia2","i3GEOwmstimeguia");
            $i("i3GEOFwmstimeimagens").innerHTML = "";
            $i("i3GEOFwmstimeimagensLidas").innerHTML = "";
            $i("i3GEOFwmstimemarcaTempo").innerHTML = "";
            if(i3GEO.parametros.mapexten){
                bbox = i3GEO.parametros.mapexten.split(" ");
                bbox = bbox.toString();
            }
            else {
                bbox = "-51.0347433181,-25.2688559441,-43.4155582517,-21.1417973665";
            }
            //var time = "2008-01-01"
            w = i3GEO.parametros.w; //985
            h = i3GEO.parametros.h;
            dw = 540;
            dh = 245;

            anoInicio = $i("WMS_anoinicio").value;
            mesInicio = $i("WMS_mesinicio").value;
            diaInicio = $i("WMS_diainicio").value;

            anoFim = $i("WMS_anofim").value;
            mesFim = $i("WMS_mesfim").value;
            diaFim = $i("WMS_diafim").value;

            intervalo = 1;
            id = 1;

            ids = new Array();
            quantasLidas = 0;
            onde = $i("i3GEOFwmstimeimagens");
            ondeContador = $i("i3GEOFwmstimeimagensLidas");
            ondeContador.style.display="block";
            idsValidos = new Array();
            idsTempo = new Array();
            parouQuantas = 0;
            ondeMarcaTempo = $i("i3GEOFwmstimemarcaTempo");
            ondeData = $i("i3GEOFwmstimemarcaData");
            tempoAnima = 500;

            if($i("umaImagemPor").value == "mes"){
                dataFixa = diaInicio;
                if(dataFixa < 10){dataFixa = "0"+dataFixa;}
                var anoAtual = anoInicio;
                var mesAtual = mesInicio;
                while (anoAtual <= anoFim){
                    while (mesAtual < 13){
                        var mes = mesAtual;
                        if(mes < 10){mes = "0"+mes;}
                        i3GEOF.wmstime.criaImg(anoAtual+"-"+mes+"-"+dataFixa,id);
                        i3GEOF.wmstime.criaImgStatus(anoAtual+"-"+mes+"-"+dataFixa,id);
                        ids.push(id);
                        idsTempo.push(anoAtual+"-"+mes+"-"+dataFixa);
                        id++;
                        mesAtual++;
                        if(anoAtual == anoFim && mesAtual > mesFim){mesAtual = 13;}
                    }
                    mesAtual = 1;
                    anoAtual++;
                }
            }
            if($i("umaImagemPor").value == "dia"){
                var anoAtual = anoInicio;
                var mesAtual = mesInicio;
                var diaAtual = diaInicio;
                while (anoAtual <= anoFim){
                    while (mesAtual < 13){
                        var mes = mesAtual;
                        if(mes < 10){mes = "0"+mes;}
                        while (diaAtual < 31){
                            var dia = diaAtual;
                            if(diaAtual < 10){dia = "0"+dia;}
                            i3GEOF.wmstime.criaImg(anoAtual+"-"+mes+"-"+dia,id);
                            i3GEOF.wmstime.criaImgStatus(anoAtual+"-"+mes+"-"+dia,id);
                            ids.push(id);
                            idsTempo.push(anoAtual+"-"+mes+"-"+dia);
                            id++;
                            diaAtual++;
                            if(mesAtual == mesFim && diaAtual > diaFim){diaAtual = 32;}
                        }
                        mesAtual++;
                        if(anoAtual == anoFim && mesAtual > mesFim){mesAtual = 13;}
                    }
                    mesAtual = 1;
                    anoAtual++;
                }
            }
        },
        /*
function: i3GEOF.wmstime.criaImg

Cria um elemento do tipo IMG com base no servi&ccedil;o escolhido e nos parametros de tempo

Parametros:

tempo {string} - data da imagem que ser&aacute; requisitada

id {string} - id que ser&aacute; definido para a imagem
         */
        criaImg: function(tempo,id){
            var novoel = document.createElement("img");
            var p = "absolute";
            novoel.id = id;
            novoel.style.position = p;
            novoel.style.top = "0px";
            novoel.style.left = "0px";
            novoel.style.width = dw+"px";
            novoel.style.height = dh+"px";
            novoel.style.cursor = "pointer";
            novoel.src = $i("i3GEOFwmstimeiServico").value+"&width="+dw+"&height="+dh+"&bbox="+bbox+"&time="+tempo;
            novoel.title = $trad(13,i3GEOF.wmstime.dicionario);
            novoel.onclick = function(){
                i3GEOF.wmstime.adicionaMapa(i3GEOF.wmstime.idServicoEscolhido);
            };
            novoel.onload = function(){
                $i("status"+this.id).innerHTML = " <span style=color:red >OK</span>";
                idsValidos.push(this.id);
                parouQuantas++;
                if(idsValidos.length == ids.length)
                {i3GEOF.wmstime.pararStatus();}
            };
            onde.appendChild(novoel);
        },
        /*
Function: i3GEOF.wmstime.criaImgStatus

Cria um &iacute;cone que permite parar a apresenta&ccedil;&atilde;o da anima&ccedil;&atilde;o em uma determinada imagem

Parametros:

tempo {string} - data da imagem

id {string} - id da imagem
         */
        criaImgStatus: function(tempo,id){
            var novoel = document.createElement("div");
            novoel.id = "lida"+id;
            novoel.style.width="200px";
            novoel.innerHTML = "Imagem: "+tempo+"...<span style=cursor:pointer;color:blue onclick='i3GEOF.wmstime.pararImagem(\""+id+"\")' id='status"+id+"' >parar</span>";
            ondeContador.appendChild(novoel);
        },
        /*
Function: i3GEOF.wmstime.pararImagem

Parar a apresenta&ccedil;&atilde;o da anima&ccedil;&atilde;o em uma determinada imagem

Parametro:

id {string} - id da imagem
         */
        pararImagem: function(id){
            if($i(id)){
                $i(id).src = "";
                //onde.removeChild(document.getElementById(id))
                idsValidos.push(id);
                $i("status"+id).innerHTML = $trad(14,i3GEOF.wmstime.dicionario);
                parouQuantas++;
                if(parouQuantas == ids.length)
                {i3GEOF.wmstime.pararStatus();}
            }
            else
            {i3GEO.janela.tempoMsg($trad(15,i3GEOF.wmstime.dicionario));}
        },
        /*
Function: i3GEOF.wmstime.pararStatus

Para o gr&aacute;fico que mostra o status das imagens
         */
        pararStatus: function(){
            ondeContador.style.display = "none";
            ondeMarcaTempo.style.display="block";
            ondeMarcaTempo.style.top = "10px";
            ondeData.style.top = dh + 30 + "px";
            ondeData.style.width = dw+"px";
            i3GEOF.wmstime.desativaQuadros();
            i3GEOF.wmstime.criaMarcadorTempo();
            //i3GEOF.wmstime.ajustaIds()
            i3GEOF.wmstime.ativaQuadro(1);
        },
        ajustaIds: function(){

        },
        /*
Function: i3GEOF.wmstime.criaMarcadorTempo

Cria o gr&aacute;fico que mostra as imagens dispon&iacute;veis. Serve de base para indicar qual imagem est&aacute; sendo mostrada
         */
        criaMarcadorTempo: function(){
            var nmarcas = ids.length;
            distanciaMarcas = parseInt(dw / nmarcas);
            var ins = "";
            var ini = parseInt((distanciaMarcas*i - (distanciaMarcas/2)));
            for(var i=1;i<=nmarcas;i++){
                ins += "<img title='"+$trad(16,i3GEOF.wmstime.dicionario)+"' onclick='i3GEOF.wmstime.adicionaMapa(\""+i+"\")' onmouseover='i3GEOF.wmstime.mostraI(\""+i+"\")' onmouseout='i3GEOF.wmstime.escondeI(\""+i+"\")' style='position:absolute;top:"+(dh + 10)+"px;left:"+parseInt((distanciaMarcas*i - (distanciaMarcas/2)))+"px;' src='"+i3GEO.configura.locaplic+"/imagens/dot1.gif' id='i3GEOFwmstimemarcaTempo"+i+"' />";
            }
            ins += "<img style='position:absolute;top:"+(dh - 5)+"px;left:"+parseInt((distanciaMarcas - (distanciaMarcas/2)))+"px;' src='"+i3GEO.configura.locaplic+"/imagens/dot1red.gif' id='marcaDeTempo' />";
            ins += "<img style='position:absolute;top:"+(dh + 10)+"px;left:"+parseInt((distanciaMarcas - (distanciaMarcas/2)))+"px;' src='"+i3GEO.configura.locaplic+"/imagens/dot1cinza.gif' id='marcaGranulo' />";
            ngranulo = nmarcas;
            tgranulo = (parseInt((distanciaMarcas*i - (distanciaMarcas/2))) - ini) / 10;
            tempoGranulo = tempoAnima / 10;
            ondeMarcaTempo.innerHTML = ins;
            marcaVermelha = $i("marcaDeTempo");
            imgGranulo = $i("marcaGranulo");
            i3GEOF.wmstime.pararFilme();
            i3GEOF.wmstime.iniciarFilme();
        },
        /*
Function: i3GEOF.wmstime.mostraI

Mostra uma imagem espec&iacute;fica

Parametro:

obj {dom} - objeto contendo a imagem
         */
        mostraI: function(obj){
            $i(obj).style.display="block";
            ondeData.innerHTML = "YYMMDD: "+idsTempo[obj-1];
            if($i(i3GEOF.wmstime.quadroAtual))
                $i(i3GEOF.wmstime.quadroAtual).style.display = "none";
            else
                $i("1").style.display = "none";
        },
        /*
Function: i3GEOF.wmstime.escondeI

Esconde uma imagem

Parametro:

obj {dom} - objeto contendo a imagem
         */
        escondeI: function(obj){
            $i(obj).style.display="none";
            ondeData.innerHTML = "";
            if($i(i3GEOF.wmstime.quadroAtual))
                $i(i3GEOF.wmstime.quadroAtual).style.display = "block";
            else
                $i("1").style.display = "block";
        },
        /*
Function: i3GEOF.wmstime.adicionaMapa

Adiciona uma camada ao mapa baseado na imagem vista na tela

         */
        adicionaMapa: function(idMarca){
            idMarca = parseInt(idMarca,10);
            var serv = i3GEOF.wmstime.configura[i3GEOF.wmstime.idServicoEscolhido];
            var fim = function(retorno){
               i3GEO.atualiza(retorno);
            };
            var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=adicionatemawms";
            p += "&servico="+serv.servico;
            if(serv.styles == "")
                p += "&nome=";
            else
                p += "&nome="+serv.styles;
            p += "&tema="+serv.layers;
            p += "&proj="+serv.srs;
            p += "&formato="+serv.format;
            p += "&tipo=estilo";
            p += "&versao=1.1.1";
            p += "&nomecamada="+serv.titulo+" "+idsTempo[idMarca-1];
            p += "&tiporep=&suportasld=nao";
            p += "&formatosinfo=text/plain,application/vnd.ogc.gml";
            p += "&time="+idsTempo[idMarca-1];
            var cp = new cpaint();
            cp.set_response_type("JSON");
            cp.call(p,"wmstime",fim);

        },
        desativaQuadros: function(){
            var n = idsValidos.length;
            for(var i=0;i<n;i++){
                $i(idsValidos[i]).style.display = "none";
            }
        },
        ativaQuadro: function(i){
            var q = $i(i);
            if(q){
                q.style.position = "relative";
                q.style.display = "block";
            }
            if($i("i3GEOFwmstimemarcaTempo"+i)){
                $i("i3GEOFwmstimemarcaTempo"+i).style.display = "block";
            }
            if($i("i3GEOFwmstimemarcaTempo"+(i))){
                marcaVermelha.style.left = $i("i3GEOFwmstimemarcaTempo"+(i)).style.left;
            }
        },
        pausarFilme: function(){
            i3GEOF.wmstime.emPausa = !i3GEOF.wmstime.emPausa;
            if(i3GEOF.wmstime.emPausa == false){
                i3GEOF.wmstime.anima();
            }
            else{
                imgGranulo.style.display="none";
                pulaGranulo = 11;
                try{
                    clearTimeout(ganima);
                }catch(e){}
            }
        },
        esconderMarcasTempo: function(){
            var n = idsValidos.length;
            for(var i=0;i<n;i++){
                if($i("i3GEOFwmstimemarcaTempo"+i)){
                    $i("i3GEOFwmstimemarcaTempo"+i).style.display = "none";
                }
            }
        },
        pararFilme: function(){
            i3GEOF.wmstime.emPausa = false;
            imgGranulo.style.left = parseInt((distanciaMarcas - (distanciaMarcas/2)))+"px";
            i3GEOF.wmstime.quadroAtual = 0;
            i3GEOF.wmstime.desativaQuadros();
            i3GEOF.wmstime.ativaQuadro(ids[0]);
            imgGranulo.style.display="none";
            ondeData.innerHTML = "";
            try{
                //clearTimeout(tanima)
                clearTimeout(ganima);
            }catch(e){}
        },
        iniciarFilme: function(){
            i3GEOF.wmstime.emPausa = false;
            i3GEOF.wmstime.esconderMarcasTempo();
            imgGranulo.style.display="block";
            //tanima = setTimeout("anima()",tempoAnima)
            //ganima = setTimeout("i3GEOF.wmstime.animacaoGranulo()",tempoGranulo)
            i3GEOF.wmstime.anima();
        },
        rebobina: function(){
            i3GEOF.wmstime.esconderMarcasTempo();
            i3GEOF.wmstime.pararFilme();
        },
        anima: function(){
            i3GEOF.wmstime.desativaQuadros();
            i3GEOF.wmstime.ativaQuadro(ids[i3GEOF.wmstime.quadroAtual]);
            ondeData.innerHTML = idsTempo[i3GEOF.wmstime.quadroAtual];
            i3GEOF.wmstime.quadroAtual++;
            if(i3GEOF.wmstime.quadroAtual < idsValidos.length){
                //tanima = setTimeout("anima()",tempoAnima)
                pulaGranulo = 0;
                imgGranulo.style.left = $i("i3GEOFwmstimemarcaTempo"+i3GEOF.wmstime.quadroAtual).style.left;
                ganima = setTimeout("i3GEOF.wmstime.animacaoGranulo()",tempoGranulo);
            }
            else{
                imgGranulo.style.display="none";
            }
        },
        animacaoGranulo: function(){
            imgGranulo.style.left = parseInt(imgGranulo.style.left) +  tgranulo + "px";
            pulaGranulo++;
            //if(quadroAtual < idsValidos.length)
            if(pulaGranulo <= 10)
                ganima = setTimeout("i3GEOF.wmstime.animacaoGranulo()",tempoGranulo);
            else
                i3GEOF.wmstime.anima();
        },
        maisrapido: function(){
            tempoGranulo = tempoGranulo - 10;
        },
        maislento: function(){
            tempoGranulo = tempoGranulo + 10;
        }
};