        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<2){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==2 && cc==0){return '../../SIN/066/cl0_tz_500.png';}
       if(rr==2 && cc==1){return '../../SIN/066/cl1_tz_500.png';}
       if(rr==2 && cc==2){return '../../SIN/066/cl2_tz_500.png';}
       if(rr==9 && cc==0){return '../../SIN/066/cl0_t850_pnm_SIN.png';}
       if(rr==9 && cc==1){return '../../SIN/066/cl1_t850_pnm_SIN.png';}
       if(rr==9 && cc==2){return '../../SIN/066/cl2_t850_pnm_SIN.png';}
       if(rr==10 && cc==0){return 'cl0_t850_pnm_RPR.png';}
       if(rr==10 && cc==1){return 'cl1_t850_pnm_RPR.png';}
       if(rr==10 && cc==2){return 'cl2_t850_pnm_RPR.png';}
       if(rr==11 && cc==0){return 'cl0_2t_0.png';}
       if(rr==11 && cc==1){return 'cl1_2t_0.png';}
       if(rr==11 && cc==2){return 'cl2_2t_0.png';}
       if(rr==12 && cc==0){return 'cl0_10fg6_0.png';}
       if(rr==12 && cc==1){return 'cl1_10fg6_0.png';}
       if(rr==12 && cc==2){return 'cl2_10fg6_0.png';}
       if(rr==13 && cc==0){return 'cl0_cape_0.png';}
       if(rr==13 && cc==1){return 'cl1_cape_0.png';}
       if(rr==13 && cc==2){return 'cl2_cape_0.png';}
       if(rr==14 && cc==0){return 'cl0_tp_0.png';}
       if(rr==14 && cc==1){return 'cl1_tp_0.png';}
       if(rr==14 && cc==2){return 'cl2_tp_0.png';}
       if(rr==15 && cc==0){return 'cl0_sf_0.png';}
       if(rr==15 && cc==1){return 'cl1_sf_0.png';}
       if(rr==15 && cc==2){return 'cl2_sf_0.png';}
       if(rr==16 && cc==0){return 'cl0_v10m.png';}
       if(rr==16 && cc==1){return 'cl1_v10m.png';}
       if(rr==16 && cc==2){return 'cl2_v10m.png';}
}
        function getT(rr,cc){
       if(rr==2 && cc==0){return '<strong>Temperatura (C) y Altura Geopotencial (m) en 500 hPa</strong><br><br><strong>20260521 a 12</strong> UTC HH+066 (rango:060-072)<br><strong>control +<br>EPS</strong>';}
       if(rr==2 && cc==1){return '<strong>Temperatura (C) y Altura Geopotencial (m) en 500 hPa</strong><br><br><strong>20260521 a 12</strong> UTC HH+066 (rango:060-072)<br>grupo: <strong>1</strong> representante: <strong>16</strong> miembros: 28 <strong>control</strong><br>0,1,2,3,5,9,10,11,14,15,16,19,21,22,25,26,28,30,33,34,35,36,38,45,46,47,49,50';}
       if(rr==2 && cc==2){return '<strong>Temperatura (C) y Altura Geopotencial (m) en 500 hPa</strong><br><br><strong>20260521 a 12</strong> UTC HH+066 (rango:060-072)<br>grupo: <strong>2</strong> representante: <strong>13</strong> miembros: 23 <br>4,6,7,8,12,13,17,18,20,23,24,27,29,31,32,37,39,40,41,42,43,44,48';}
       if(rr==9 && cc==0){return '<strong>Temperatura en 850 hPa (C) y Presion en Superficie (hPa)</strong><br><br><strong>20260521 a 12</strong> UTC HH+066 (rango:060-072)<br><strong>control +<br>EPS</strong>';}
       if(rr==9 && cc==1){return '<strong>Temperatura en 850 hPa (C) y Presion en Superficie (hPa)</strong><br><br><strong>20260521 a 12</strong> UTC HH+066 (rango:060-072)<br>grupo: <strong>1</strong> representante: <strong>16</strong> miembros: 28 <strong>control</strong><br>0,1,2,3,5,9,10,11,14,15,16,19,21,22,25,26,28,30,33,34,35,36,38,45,46,47,49,50';}
       if(rr==9 && cc==2){return '<strong>Temperatura en 850 hPa (C) y Presion en Superficie (hPa)</strong><br><br><strong>20260521 a 12</strong> UTC HH+066 (rango:060-072)<br>grupo: <strong>2</strong> representante: <strong>13</strong> miembros: 23 <br>4,6,7,8,12,13,17,18,20,23,24,27,29,31,32,37,39,40,41,42,43,44,48';}
       if(rr==10 && cc==0){return '<strong>Temperatura en 850 hPa (C) y Presion en Superficie (hPa)</strong><br><br><strong>20260521 a 12</strong> UTC HH+066 (rango:060-072)<br><strong>control +<br>EPS</strong>';}
       if(rr==10 && cc==1){return '<strong>Temperatura en 850 hPa (C) y Presion en Superficie (hPa)</strong><br><br><strong>20260521 a 12</strong> UTC HH+066 (rango:060-072)<br>grupo: <strong>1</strong> representante: <strong>16</strong> miembros: 28 <strong>control</strong><br>0,1,2,3,5,9,10,11,14,15,16,19,21,22,25,26,28,30,33,34,35,36,38,45,46,47,49,50';}
       if(rr==10 && cc==2){return '<strong>Temperatura en 850 hPa (C) y Presion en Superficie (hPa)</strong><br><br><strong>20260521 a 12</strong> UTC HH+066 (rango:060-072)<br>grupo: <strong>2</strong> representante: <strong>13</strong> miembros: 23 <br>4,6,7,8,12,13,17,18,20,23,24,27,29,31,32,37,39,40,41,42,43,44,48';}
       if(rr==11 && cc==0){return '<strong>Temperatura a 2m (C)</strong><br><br><strong>20260521 a 12</strong> UTC HH+066 (rango:060-072)<br><strong>control +<br>EPS</strong>';}
       if(rr==11 && cc==1){return '<strong>Temperatura a 2m (C)</strong><br><br><strong>20260521 a 12</strong> UTC HH+066 (rango:060-072)<br>grupo: <strong>1</strong> representante: <strong>16</strong> miembros: 28 <strong>control</strong><br>0,1,2,3,5,9,10,11,14,15,16,19,21,22,25,26,28,30,33,34,35,36,38,45,46,47,49,50';}
       if(rr==11 && cc==2){return '<strong>Temperatura a 2m (C)</strong><br><br><strong>20260521 a 12</strong> UTC HH+066 (rango:060-072)<br>grupo: <strong>2</strong> representante: <strong>13</strong> miembros: 23 <br>4,6,7,8,12,13,17,18,20,23,24,27,29,31,32,37,39,40,41,42,43,44,48';}
       if(rr==12 && cc==0){return '<strong>Racha maxima de viento a 10m en 6 horas anteriores (nudos)</strong><br><br><strong>20260521 a 12</strong> UTC HH+066 (rango:060-072)<br><strong>control +<br>EPS</strong>';}
       if(rr==12 && cc==1){return '<strong>Racha maxima de viento a 10m en 6 horas anteriores (nudos)</strong><br><br><strong>20260521 a 12</strong> UTC HH+066 (rango:060-072)<br>grupo: <strong>1</strong> representante: <strong>16</strong> miembros: 28 <strong>control</strong><br>0,1,2,3,5,9,10,11,14,15,16,19,21,22,25,26,28,30,33,34,35,36,38,45,46,47,49,50';}
       if(rr==12 && cc==2){return '<strong>Racha maxima de viento a 10m en 6 horas anteriores (nudos)</strong><br><br><strong>20260521 a 12</strong> UTC HH+066 (rango:060-072)<br>grupo: <strong>2</strong> representante: <strong>13</strong> miembros: 23 <br>4,6,7,8,12,13,17,18,20,23,24,27,29,31,32,37,39,40,41,42,43,44,48';}
       if(rr==13 && cc==0){return '<strong>MUCAPE (J/Kg)</strong><br><br><strong>20260521 a 12</strong> UTC HH+066 (rango:060-072)<br><strong>control +<br>EPS</strong>';}
       if(rr==13 && cc==1){return '<strong>MUCAPE (J/Kg)</strong><br><br><strong>20260521 a 12</strong> UTC HH+066 (rango:060-072)<br>grupo: <strong>1</strong> representante: <strong>16</strong> miembros: 28 <strong>control</strong><br>0,1,2,3,5,9,10,11,14,15,16,19,21,22,25,26,28,30,33,34,35,36,38,45,46,47,49,50';}
       if(rr==13 && cc==2){return '<strong>MUCAPE (J/Kg)</strong><br><br><strong>20260521 a 12</strong> UTC HH+066 (rango:060-072)<br>grupo: <strong>2</strong> representante: <strong>13</strong> miembros: 23 <br>4,6,7,8,12,13,17,18,20,23,24,27,29,31,32,37,39,40,41,42,43,44,48';}
       if(rr==14 && cc==0){return '<strong>Precipitacion de 00 a 12 UTC (mm)</strong><br><br><strong>20260521 a 12</strong> UTC HH+066 (rango:060-072)<br><strong>control +<br>EPS</strong>';}
       if(rr==14 && cc==1){return '<strong>Precipitacion de 00 a 12 UTC (mm)</strong><br><br><strong>20260521 a 12</strong> UTC HH+066 (rango:060-072)<br>grupo: <strong>1</strong> representante: <strong>16</strong> miembros: 28 <strong>control</strong><br>0,1,2,3,5,9,10,11,14,15,16,19,21,22,25,26,28,30,33,34,35,36,38,45,46,47,49,50';}
       if(rr==14 && cc==2){return '<strong>Precipitacion de 00 a 12 UTC (mm)</strong><br><br><strong>20260521 a 12</strong> UTC HH+066 (rango:060-072)<br>grupo: <strong>2</strong> representante: <strong>13</strong> miembros: 23 <br>4,6,7,8,12,13,17,18,20,23,24,27,29,31,32,37,39,40,41,42,43,44,48';}
       if(rr==15 && cc==0){return '<strong>Nieve acumulada de 00 a 12 UTC (mm de agua equivalente)</strong><br><br><strong>20260521 a 12</strong> UTC HH+066 (rango:060-072)<br><strong>control +<br>EPS</strong>';}
       if(rr==15 && cc==1){return '<strong>Nieve acumulada de 00 a 12 UTC (mm de agua equivalente)</strong><br><br><strong>20260521 a 12</strong> UTC HH+066 (rango:060-072)<br>grupo: <strong>1</strong> representante: <strong>16</strong> miembros: 28 <strong>control</strong><br>0,1,2,3,5,9,10,11,14,15,16,19,21,22,25,26,28,30,33,34,35,36,38,45,46,47,49,50';}
       if(rr==15 && cc==2){return '<strong>Nieve acumulada de 00 a 12 UTC (mm de agua equivalente)</strong><br><br><strong>20260521 a 12</strong> UTC HH+066 (rango:060-072)<br>grupo: <strong>2</strong> representante: <strong>13</strong> miembros: 23 <br>4,6,7,8,12,13,17,18,20,23,24,27,29,31,32,37,39,40,41,42,43,44,48';}
       if(rr==16 && cc==0){return '<strong>Viento a 10 m (m/s)</strong><br><br><strong>20260521 a 12</strong> UTC HH+066 (rango:060-072)<br><strong>control +<br>EPS</strong>';}
       if(rr==16 && cc==1){return '<strong>Viento a 10 m (m/s)</strong><br><br><strong>20260521 a 12</strong> UTC HH+066 (rango:060-072)<br>grupo: <strong>1</strong> representante: <strong>16</strong> miembros: 28 <strong>control</strong><br>0,1,2,3,5,9,10,11,14,15,16,19,21,22,25,26,28,30,33,34,35,36,38,45,46,47,49,50';}
       if(rr==16 && cc==2){return '<strong>Viento a 10 m (m/s)</strong><br><br><strong>20260521 a 12</strong> UTC HH+066 (rango:060-072)<br>grupo: <strong>2</strong> representante: <strong>13</strong> miembros: 23 <br>4,6,7,8,12,13,17,18,20,23,24,27,29,31,32,37,39,40,41,42,43,44,48';}
}
        function getR(rrw){
           cx=0;
       cx+=1;
       if(rrw==cx){return 2;}
       cx+=1;
       if(rrw==cx){return 9;}
       cx+=1;
       if(rrw==cx){return 10;}
       cx+=1;
       if(rrw==cx){return 11;}
       cx+=1;
       if(rrw==cx){return 12;}
       cx+=1;
       if(rrw==cx){return 13;}
       cx+=1;
       if(rrw==cx){return 14;}
       cx+=1;
       if(rrw==cx){return 15;}
       cx+=1;
       if(rrw==cx){return 16;}
return -1;}
