        var ii=0;
        var jj=0;
        var eventoControlado = false;
        window.onload = function(){document.onkeypress = cambioIm;}
        function cambioIm(evObject){
           var chr = String.fromCharCode(evObject.which);
           if(chr=="q"){
              var rx=getRI(ii)-1
              var qw=getR(rx)
              if(qw!=-1){ii=qw;show();}}
           else if(chr=="a"){
              var rx=getRI(ii)+1
              var qw=getR(rx)
              if(qw!=-1){ii=qw;show();}}
           else if(chr=="o"){
              if(0<jj){jj-=1; show();}}
           else if(chr=="p"){
              if(jj<6){jj+=1; show();}}
           else if(chr=="w"){
              var tag=document.getElementById('largeImg');
              tag.width =  tag.width *1.1;
              tag.height = tag.height*1.1;}
           else if(chr=="s"){
              var tag=document.getElementById('largeImg');
              tag.width =  tag.width /1.1;
              tag.height = tag.height/1.1;}
           eventoControlado=true;}
        function showImage(rr,cc) {
           ii=rr;
           jj=cc;
           show(ii,jj);}
        function show() {
           console.log(ii,jj)
           document.getElementById('largeImg').src = getF(ii,jj);
           document.getElementById('largeImgText').innerHTML = getT(ii,jj);
           document.getElementById('largeImgPanel').style.visibility = 'visible';
           if(document.selection) document.selection.empty();
           if(window.getSelection) window.getSelection().removeAllRanges();}
        function hideMe(obj) {
           obj.style.visibility = 'hidden';}
        function getRI(iii){
           var res=-1
           for(k=0;k<100;k++){
               if(iii==getR(k)){res=k;}}
           return res;}
        function includeHTML(){
           /*loop through a collection of all HTML elements: https://www.w3schools.com/howto/howto_html_include.asp*/
           var z, i, elmnt, file, xhttp;
           z = document.getElementsByTagName("*");
           for(i=0;i<z.length;i++){
               elmnt = z[i];
               /*search for elements with a certain atrribute:*/
               file = elmnt.getAttribute("w3-include-html");
               if (file) {
                  /*make an HTTP request using the attribute value as the file name:*/
                  xhttp = new XMLHttpRequest();
                  xhttp.onreadystatechange = function() {
                          if (this.readyState == 4) {
                             if (this.status == 200) {elmnt.innerHTML = this.responseText;}
                             if (this.status == 404) {elmnt.innerHTML = "Page not found.";}
                             /*remove the attribute, and call this function once more:*/
                             elmnt.removeAttribute("w3-include-html");
                             includeHTML();}}
                  xhttp.open("GET", file, true);
                  xhttp.send();
                  return;}}}
        function getF(rr,cc){
       if(rr==1 && cc==0){return 'cl0_tz_500.png';}
       if(rr==1 && cc==1){return 'cl1_tz_500.png';}
       if(rr==1 && cc==2){return 'cl2_tz_500.png';}
       if(rr==1 && cc==3){return 'cl3_tz_500.png';}
       if(rr==1 && cc==4){return 'cl4_tz_500.png';}
       if(rr==1 && cc==5){return 'cl5_tz_500.png';}
       if(rr==1 && cc==6){return 'cl6_tz_500.png';}
       if(rr==8 && cc==0){return 'cl0_t850_pnm_SIN.png';}
       if(rr==8 && cc==1){return 'cl1_t850_pnm_SIN.png';}
       if(rr==8 && cc==2){return 'cl2_t850_pnm_SIN.png';}
       if(rr==8 && cc==3){return 'cl3_t850_pnm_SIN.png';}
       if(rr==8 && cc==4){return 'cl4_t850_pnm_SIN.png';}
       if(rr==8 && cc==5){return 'cl5_t850_pnm_SIN.png';}
       if(rr==8 && cc==6){return 'cl6_t850_pnm_SIN.png';}
       if(rr==18 && cc==0){return '../../PCP/168/prob_tp_thr1_cl0.png';}
       if(rr==18 && cc==1){return '../../PCP/168/prob_tp_thr1_cl1.png';}
       if(rr==18 && cc==2){return '../../PCP/168/prob_tp_thr1_cl2.png';}
       if(rr==18 && cc==3){return '../../PCP/168/prob_tp_thr1_cl3.png';}
       if(rr==18 && cc==4){return '../../PCP/168/prob_tp_thr1_cl4.png';}
       if(rr==18 && cc==5){return '../../PCP/168/prob_tp_thr1_cl5.png';}
       if(rr==18 && cc==6){return '../../PCP/168/prob_tp_thr1_cl6.png';}
       if(rr==24 && cc==0){return '../../NIE/168/prob_sf_thr1_cl0.png';}
       if(rr==24 && cc==1){return '../../NIE/168/prob_sf_thr1_cl1.png';}
       if(rr==24 && cc==2){return '../../NIE/168/prob_sf_thr1_cl2.png';}
       if(rr==24 && cc==3){return '../../NIE/168/prob_sf_thr1_cl3.png';}
       if(rr==24 && cc==4){return '../../NIE/168/prob_sf_thr1_cl4.png';}
       if(rr==24 && cc==5){return '../../NIE/168/prob_sf_thr1_cl5.png';}
       if(rr==24 && cc==6){return '../../NIE/168/prob_sf_thr1_cl6.png';}
       if(rr==44 && cc==0){return 'stdev_z_500_cl0.png';}
       if(rr==44 && cc==1){return 'stdev_z_500_cl1.png';}
       if(rr==44 && cc==2){return 'stdev_z_500_cl2.png';}
       if(rr==44 && cc==3){return 'stdev_z_500_cl3.png';}
       if(rr==44 && cc==4){return 'stdev_z_500_cl4.png';}
       if(rr==44 && cc==5){return 'stdev_z_500_cl5.png';}
       if(rr==44 && cc==6){return 'stdev_z_500_cl6.png';}
       if(rr==45 && cc==0){return 'spag_msl_0_cl0.png';}
       if(rr==45 && cc==1){return 'spag_msl_0_cl1.png';}
       if(rr==45 && cc==2){return 'spag_msl_0_cl2.png';}
       if(rr==45 && cc==3){return 'spag_msl_0_cl3.png';}
       if(rr==45 && cc==4){return 'spag_msl_0_cl4.png';}
       if(rr==45 && cc==5){return 'spag_msl_0_cl5.png';}
       if(rr==45 && cc==6){return 'spag_msl_0_cl6.png';}
}
        function getT(rr,cc){
       if(rr==1 && cc==0){return '<strong>Temperatura (C) y Altura Geopotencial (m) en 500 hPa</strong><br><br><strong>20260614 a 12</strong> UTC HH+168 (rango:156-180)<br><strong>control +<br>EPS</strong>';}
       if(rr==1 && cc==1){return '<strong>Temperatura (C) y Altura Geopotencial (m) en 500 hPa</strong><br><br><strong>20260614 a 12</strong> UTC HH+168 (rango:156-180)<br>grupo: <strong>1</strong> representante: <strong>10</strong> miembros: 14 <br>2,7,9,10,11,12,13,16,29,34,35,42,43,48';}
       if(rr==1 && cc==2){return '<strong>Temperatura (C) y Altura Geopotencial (m) en 500 hPa</strong><br><br><strong>20260614 a 12</strong> UTC HH+168 (rango:156-180)<br>grupo: <strong>2</strong> representante: <strong>30</strong> miembros: 10 <br>1,4,8,14,17,21,27,30,33,39';}
       if(rr==1 && cc==3){return '<strong>Temperatura (C) y Altura Geopotencial (m) en 500 hPa</strong><br><br><strong>20260614 a 12</strong> UTC HH+168 (rango:156-180)<br>grupo: <strong>3</strong> representante: <strong>19</strong> miembros: 10 <strong>control</strong><br>0,15,19,25,26,36,37,38,41,44';}
       if(rr==1 && cc==4){return '<strong>Temperatura (C) y Altura Geopotencial (m) en 500 hPa</strong><br><br><strong>20260614 a 12</strong> UTC HH+168 (rango:156-180)<br>grupo: <strong>4</strong> representante: <strong>24</strong> miembros: 10 <br>5,20,23,24,28,32,45,46,49,50';}
       if(rr==1 && cc==5){return '<strong>Temperatura (C) y Altura Geopotencial (m) en 500 hPa</strong><br><br><strong>20260614 a 12</strong> UTC HH+168 (rango:156-180)<br>grupo: <strong>5</strong> representante: <strong>18</strong> miembros: 4 <br>18,22,31,40';}
       if(rr==1 && cc==6){return '<strong>Temperatura (C) y Altura Geopotencial (m) en 500 hPa</strong><br><br><strong>20260614 a 12</strong> UTC HH+168 (rango:156-180)<br>grupo: <strong>6</strong> representante: <strong>3</strong> miembros: 3 <br>3,6,47';}
       if(rr==8 && cc==0){return '<strong>Temperatura en 850 hPa (C) y Presion en Superficie (hPa)</strong><br><br><strong>20260614 a 12</strong> UTC HH+168 (rango:156-180)<br><strong>control +<br>EPS</strong>';}
       if(rr==8 && cc==1){return '<strong>Temperatura en 850 hPa (C) y Presion en Superficie (hPa)</strong><br><br><strong>20260614 a 12</strong> UTC HH+168 (rango:156-180)<br>grupo: <strong>1</strong> representante: <strong>10</strong> miembros: 14 <br>2,7,9,10,11,12,13,16,29,34,35,42,43,48';}
       if(rr==8 && cc==2){return '<strong>Temperatura en 850 hPa (C) y Presion en Superficie (hPa)</strong><br><br><strong>20260614 a 12</strong> UTC HH+168 (rango:156-180)<br>grupo: <strong>2</strong> representante: <strong>30</strong> miembros: 10 <br>1,4,8,14,17,21,27,30,33,39';}
       if(rr==8 && cc==3){return '<strong>Temperatura en 850 hPa (C) y Presion en Superficie (hPa)</strong><br><br><strong>20260614 a 12</strong> UTC HH+168 (rango:156-180)<br>grupo: <strong>3</strong> representante: <strong>19</strong> miembros: 10 <strong>control</strong><br>0,15,19,25,26,36,37,38,41,44';}
       if(rr==8 && cc==4){return '<strong>Temperatura en 850 hPa (C) y Presion en Superficie (hPa)</strong><br><br><strong>20260614 a 12</strong> UTC HH+168 (rango:156-180)<br>grupo: <strong>4</strong> representante: <strong>24</strong> miembros: 10 <br>5,20,23,24,28,32,45,46,49,50';}
       if(rr==8 && cc==5){return '<strong>Temperatura en 850 hPa (C) y Presion en Superficie (hPa)</strong><br><br><strong>20260614 a 12</strong> UTC HH+168 (rango:156-180)<br>grupo: <strong>5</strong> representante: <strong>18</strong> miembros: 4 <br>18,22,31,40';}
       if(rr==8 && cc==6){return '<strong>Temperatura en 850 hPa (C) y Presion en Superficie (hPa)</strong><br><br><strong>20260614 a 12</strong> UTC HH+168 (rango:156-180)<br>grupo: <strong>6</strong> representante: <strong>3</strong> miembros: 3 <br>3,6,47';}
       if(rr==18 && cc==0){return '<strong>Probabilidad de precipitacion de 0 a 24 UTC superior a 1 mm</strong><br><br><strong>20260614 a 12</strong> UTC HH+168 (rango:156-180)<br><strong>control +<br>EPS</strong>';}
       if(rr==18 && cc==1){return '<strong>Probabilidad de precipitacion de 0 a 24 UTC superior a 1 mm</strong><br><br><strong>20260614 a 12</strong> UTC HH+168 (rango:156-180)<br>grupo: <strong>1</strong> representante: <strong>10</strong> miembros: 14 <br>2,7,9,10,11,12,13,16,29,34,35,42,43,48';}
       if(rr==18 && cc==2){return '<strong>Probabilidad de precipitacion de 0 a 24 UTC superior a 1 mm</strong><br><br><strong>20260614 a 12</strong> UTC HH+168 (rango:156-180)<br>grupo: <strong>2</strong> representante: <strong>30</strong> miembros: 10 <br>1,4,8,14,17,21,27,30,33,39';}
       if(rr==18 && cc==3){return '<strong>Probabilidad de precipitacion de 0 a 24 UTC superior a 1 mm</strong><br><br><strong>20260614 a 12</strong> UTC HH+168 (rango:156-180)<br>grupo: <strong>3</strong> representante: <strong>19</strong> miembros: 10 <strong>control</strong><br>0,15,19,25,26,36,37,38,41,44';}
       if(rr==18 && cc==4){return '<strong>Probabilidad de precipitacion de 0 a 24 UTC superior a 1 mm</strong><br><br><strong>20260614 a 12</strong> UTC HH+168 (rango:156-180)<br>grupo: <strong>4</strong> representante: <strong>24</strong> miembros: 10 <br>5,20,23,24,28,32,45,46,49,50';}
       if(rr==18 && cc==5){return '<strong>Probabilidad de precipitacion de 0 a 24 UTC superior a 1 mm</strong><br><br><strong>20260614 a 12</strong> UTC HH+168 (rango:156-180)<br>grupo: <strong>5</strong> representante: <strong>18</strong> miembros: 4 <br>18,22,31,40';}
       if(rr==18 && cc==6){return '<strong>Probabilidad de precipitacion de 0 a 24 UTC superior a 1 mm</strong><br><br><strong>20260614 a 12</strong> UTC HH+168 (rango:156-180)<br>grupo: <strong>6</strong> representante: <strong>3</strong> miembros: 3 <br>3,6,47';}
       if(rr==24 && cc==0){return '<strong>Probabilidad de nieve acumulada de 0 a 24 UTC superior a 1 mm de agua equivalente</strong><br><br><strong>20260614 a 12</strong> UTC HH+168 (rango:156-180)<br><strong>control +<br>EPS</strong>';}
       if(rr==24 && cc==1){return '<strong>Probabilidad de nieve acumulada de 0 a 24 UTC superior a 1 mm de agua equivalente</strong><br><br><strong>20260614 a 12</strong> UTC HH+168 (rango:156-180)<br>grupo: <strong>1</strong> representante: <strong>10</strong> miembros: 14 <br>2,7,9,10,11,12,13,16,29,34,35,42,43,48';}
       if(rr==24 && cc==2){return '<strong>Probabilidad de nieve acumulada de 0 a 24 UTC superior a 1 mm de agua equivalente</strong><br><br><strong>20260614 a 12</strong> UTC HH+168 (rango:156-180)<br>grupo: <strong>2</strong> representante: <strong>30</strong> miembros: 10 <br>1,4,8,14,17,21,27,30,33,39';}
       if(rr==24 && cc==3){return '<strong>Probabilidad de nieve acumulada de 0 a 24 UTC superior a 1 mm de agua equivalente</strong><br><br><strong>20260614 a 12</strong> UTC HH+168 (rango:156-180)<br>grupo: <strong>3</strong> representante: <strong>19</strong> miembros: 10 <strong>control</strong><br>0,15,19,25,26,36,37,38,41,44';}
       if(rr==24 && cc==4){return '<strong>Probabilidad de nieve acumulada de 0 a 24 UTC superior a 1 mm de agua equivalente</strong><br><br><strong>20260614 a 12</strong> UTC HH+168 (rango:156-180)<br>grupo: <strong>4</strong> representante: <strong>24</strong> miembros: 10 <br>5,20,23,24,28,32,45,46,49,50';}
       if(rr==24 && cc==5){return '<strong>Probabilidad de nieve acumulada de 0 a 24 UTC superior a 1 mm de agua equivalente</strong><br><br><strong>20260614 a 12</strong> UTC HH+168 (rango:156-180)<br>grupo: <strong>5</strong> representante: <strong>18</strong> miembros: 4 <br>18,22,31,40';}
       if(rr==24 && cc==6){return '<strong>Probabilidad de nieve acumulada de 0 a 24 UTC superior a 1 mm de agua equivalente</strong><br><br><strong>20260614 a 12</strong> UTC HH+168 (rango:156-180)<br>grupo: <strong>6</strong> representante: <strong>3</strong> miembros: 3 <br>3,6,47';}
       if(rr==44 && cc==0){return '<strong>Desviacion estandar e isohipsas de altura geopotencial (m) en 500 hPa</strong><br><br><strong>20260614 a 12</strong> UTC HH+168 (rango:156-180)<br><strong>control +<br>EPS</strong>';}
       if(rr==44 && cc==1){return '<strong>Desviacion estandar e isohipsas de altura geopotencial (m) en 500 hPa</strong><br><br><strong>20260614 a 12</strong> UTC HH+168 (rango:156-180)<br>grupo: <strong>1</strong> representante: <strong>10</strong> miembros: 14 <br>2,7,9,10,11,12,13,16,29,34,35,42,43,48';}
       if(rr==44 && cc==2){return '<strong>Desviacion estandar e isohipsas de altura geopotencial (m) en 500 hPa</strong><br><br><strong>20260614 a 12</strong> UTC HH+168 (rango:156-180)<br>grupo: <strong>2</strong> representante: <strong>30</strong> miembros: 10 <br>1,4,8,14,17,21,27,30,33,39';}
       if(rr==44 && cc==3){return '<strong>Desviacion estandar e isohipsas de altura geopotencial (m) en 500 hPa</strong><br><br><strong>20260614 a 12</strong> UTC HH+168 (rango:156-180)<br>grupo: <strong>3</strong> representante: <strong>19</strong> miembros: 10 <strong>control</strong><br>0,15,19,25,26,36,37,38,41,44';}
       if(rr==44 && cc==4){return '<strong>Desviacion estandar e isohipsas de altura geopotencial (m) en 500 hPa</strong><br><br><strong>20260614 a 12</strong> UTC HH+168 (rango:156-180)<br>grupo: <strong>4</strong> representante: <strong>24</strong> miembros: 10 <br>5,20,23,24,28,32,45,46,49,50';}
       if(rr==44 && cc==5){return '<strong>Desviacion estandar e isohipsas de altura geopotencial (m) en 500 hPa</strong><br><br><strong>20260614 a 12</strong> UTC HH+168 (rango:156-180)<br>grupo: <strong>5</strong> representante: <strong>18</strong> miembros: 4 <br>18,22,31,40';}
       if(rr==44 && cc==6){return '<strong>Desviacion estandar e isohipsas de altura geopotencial (m) en 500 hPa</strong><br><br><strong>20260614 a 12</strong> UTC HH+168 (rango:156-180)<br>grupo: <strong>6</strong> representante: <strong>3</strong> miembros: 3 <br>3,6,47';}
       if(rr==45 && cc==0){return '<strong>Spaguetti de presion en superficie (hPa)</strong><br><br><strong>20260614 a 12</strong> UTC HH+168 (rango:156-180)<br><strong>control +<br>EPS</strong>';}
       if(rr==45 && cc==1){return '<strong>Spaguetti de presion en superficie (hPa)</strong><br><br><strong>20260614 a 12</strong> UTC HH+168 (rango:156-180)<br>grupo: <strong>1</strong> representante: <strong>10</strong> miembros: 14 <br>2,7,9,10,11,12,13,16,29,34,35,42,43,48';}
       if(rr==45 && cc==2){return '<strong>Spaguetti de presion en superficie (hPa)</strong><br><br><strong>20260614 a 12</strong> UTC HH+168 (rango:156-180)<br>grupo: <strong>2</strong> representante: <strong>30</strong> miembros: 10 <br>1,4,8,14,17,21,27,30,33,39';}
       if(rr==45 && cc==3){return '<strong>Spaguetti de presion en superficie (hPa)</strong><br><br><strong>20260614 a 12</strong> UTC HH+168 (rango:156-180)<br>grupo: <strong>3</strong> representante: <strong>19</strong> miembros: 10 <strong>control</strong><br>0,15,19,25,26,36,37,38,41,44';}
       if(rr==45 && cc==4){return '<strong>Spaguetti de presion en superficie (hPa)</strong><br><br><strong>20260614 a 12</strong> UTC HH+168 (rango:156-180)<br>grupo: <strong>4</strong> representante: <strong>24</strong> miembros: 10 <br>5,20,23,24,28,32,45,46,49,50';}
       if(rr==45 && cc==5){return '<strong>Spaguetti de presion en superficie (hPa)</strong><br><br><strong>20260614 a 12</strong> UTC HH+168 (rango:156-180)<br>grupo: <strong>5</strong> representante: <strong>18</strong> miembros: 4 <br>18,22,31,40';}
       if(rr==45 && cc==6){return '<strong>Spaguetti de presion en superficie (hPa)</strong><br><br><strong>20260614 a 12</strong> UTC HH+168 (rango:156-180)<br>grupo: <strong>6</strong> representante: <strong>3</strong> miembros: 3 <br>3,6,47';}
}
        function getR(rrw){
           cx=0;
       cx+=1;
       if(rrw==cx){return 1;}
       cx+=1;
       if(rrw==cx){return 8;}
       cx+=1;
       if(rrw==cx){return 18;}
       cx+=1;
       if(rrw==cx){return 24;}
       cx+=1;
       if(rrw==cx){return 44;}
       cx+=1;
       if(rrw==cx){return 45;}
return -1;}
