        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<3){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==3 && cc==0){return '../../SIN/120/cl0_tz_500.png';}
       if(rr==3 && cc==1){return '../../SIN/120/cl1_tz_500.png';}
       if(rr==3 && cc==2){return '../../SIN/120/cl2_tz_500.png';}
       if(rr==3 && cc==3){return '../../SIN/120/cl3_tz_500.png';}
       if(rr==17 && cc==0){return 'prob_tp_thr1_cl0.png';}
       if(rr==17 && cc==1){return 'prob_tp_thr1_cl1.png';}
       if(rr==17 && cc==2){return 'prob_tp_thr1_cl2.png';}
       if(rr==17 && cc==3){return 'prob_tp_thr1_cl3.png';}
       if(rr==19 && cc==0){return 'prob_tp_thr2_cl0.png';}
       if(rr==19 && cc==1){return 'prob_tp_thr2_cl1.png';}
       if(rr==19 && cc==2){return 'prob_tp_thr2_cl2.png';}
       if(rr==19 && cc==3){return 'prob_tp_thr2_cl3.png';}
       if(rr==20 && cc==0){return 'prob_tp_thr5_cl0.png';}
       if(rr==20 && cc==1){return 'prob_tp_thr5_cl1.png';}
       if(rr==20 && cc==2){return 'prob_tp_thr5_cl2.png';}
       if(rr==20 && cc==3){return 'prob_tp_thr5_cl3.png';}
       if(rr==21 && cc==0){return 'prob_tp_thr10_cl0.png';}
       if(rr==21 && cc==1){return 'prob_tp_thr10_cl1.png';}
       if(rr==21 && cc==2){return 'prob_tp_thr10_cl2.png';}
       if(rr==21 && cc==3){return 'prob_tp_thr10_cl3.png';}
       if(rr==22 && cc==0){return 'prob_tp_thr20_cl0.png';}
       if(rr==22 && cc==1){return 'prob_tp_thr20_cl1.png';}
       if(rr==22 && cc==2){return 'prob_tp_thr20_cl2.png';}
       if(rr==22 && cc==3){return 'prob_tp_thr20_cl3.png';}
}
        function getT(rr,cc){
       if(rr==3 && cc==0){return '<strong>Temperatura (C) y Altura Geopotencial (m) en 500 hPa</strong><br><br><strong>20260515 a 12</strong> UTC HH+120 (rango:108-132)<br><strong>control +<br>EPS</strong>';}
       if(rr==3 && cc==1){return '<strong>Temperatura (C) y Altura Geopotencial (m) en 500 hPa</strong><br><br><strong>20260515 a 12</strong> UTC HH+120 (rango:108-132)<br>grupo: <strong>1</strong> representante: <strong>12</strong> miembros: 22 <br>4,9,12,16,18,20,22,23,25,31,32,33,35,37,38,39,42,46,47,48,49,50';}
       if(rr==3 && cc==2){return '<strong>Temperatura (C) y Altura Geopotencial (m) en 500 hPa</strong><br><br><strong>20260515 a 12</strong> UTC HH+120 (rango:108-132)<br>grupo: <strong>2</strong> representante: <strong>30</strong> miembros: 18 <strong>control</strong><br>0,2,3,7,8,11,13,14,15,17,19,24,26,28,29,30,43,45';}
       if(rr==3 && cc==3){return '<strong>Temperatura (C) y Altura Geopotencial (m) en 500 hPa</strong><br><br><strong>20260515 a 12</strong> UTC HH+120 (rango:108-132)<br>grupo: <strong>3</strong> representante: <strong>1</strong> miembros: 11 <br>1,5,6,10,21,27,34,36,40,41,44';}
       if(rr==17 && cc==0){return '<strong>Probabilidad de precipitacion de 0 a 24 UTC superior a 1 mm</strong><br><br><strong>20260515 a 12</strong> UTC HH+120 (rango:108-132)<br><strong>control +<br>EPS</strong>';}
       if(rr==17 && cc==1){return '<strong>Probabilidad de precipitacion de 0 a 24 UTC superior a 1 mm</strong><br><br><strong>20260515 a 12</strong> UTC HH+120 (rango:108-132)<br>grupo: <strong>1</strong> representante: <strong>12</strong> miembros: 22 <br>4,9,12,16,18,20,22,23,25,31,32,33,35,37,38,39,42,46,47,48,49,50';}
       if(rr==17 && cc==2){return '<strong>Probabilidad de precipitacion de 0 a 24 UTC superior a 1 mm</strong><br><br><strong>20260515 a 12</strong> UTC HH+120 (rango:108-132)<br>grupo: <strong>2</strong> representante: <strong>30</strong> miembros: 18 <strong>control</strong><br>0,2,3,7,8,11,13,14,15,17,19,24,26,28,29,30,43,45';}
       if(rr==17 && cc==3){return '<strong>Probabilidad de precipitacion de 0 a 24 UTC superior a 1 mm</strong><br><br><strong>20260515 a 12</strong> UTC HH+120 (rango:108-132)<br>grupo: <strong>3</strong> representante: <strong>1</strong> miembros: 11 <br>1,5,6,10,21,27,34,36,40,41,44';}
       if(rr==19 && cc==0){return '<strong>Probabilidad de precipitacion de 0 a 24 UTC superior a 2 mm</strong><br><br><strong>20260515 a 12</strong> UTC HH+120 (rango:108-132)<br><strong>control +<br>EPS</strong>';}
       if(rr==19 && cc==1){return '<strong>Probabilidad de precipitacion de 0 a 24 UTC superior a 2 mm</strong><br><br><strong>20260515 a 12</strong> UTC HH+120 (rango:108-132)<br>grupo: <strong>1</strong> representante: <strong>12</strong> miembros: 22 <br>4,9,12,16,18,20,22,23,25,31,32,33,35,37,38,39,42,46,47,48,49,50';}
       if(rr==19 && cc==2){return '<strong>Probabilidad de precipitacion de 0 a 24 UTC superior a 2 mm</strong><br><br><strong>20260515 a 12</strong> UTC HH+120 (rango:108-132)<br>grupo: <strong>2</strong> representante: <strong>30</strong> miembros: 18 <strong>control</strong><br>0,2,3,7,8,11,13,14,15,17,19,24,26,28,29,30,43,45';}
       if(rr==19 && cc==3){return '<strong>Probabilidad de precipitacion de 0 a 24 UTC superior a 2 mm</strong><br><br><strong>20260515 a 12</strong> UTC HH+120 (rango:108-132)<br>grupo: <strong>3</strong> representante: <strong>1</strong> miembros: 11 <br>1,5,6,10,21,27,34,36,40,41,44';}
       if(rr==20 && cc==0){return '<strong>Probabilidad de precipitacion de 0 a 24 UTC superior a 5 mm</strong><br><br><strong>20260515 a 12</strong> UTC HH+120 (rango:108-132)<br><strong>control +<br>EPS</strong>';}
       if(rr==20 && cc==1){return '<strong>Probabilidad de precipitacion de 0 a 24 UTC superior a 5 mm</strong><br><br><strong>20260515 a 12</strong> UTC HH+120 (rango:108-132)<br>grupo: <strong>1</strong> representante: <strong>12</strong> miembros: 22 <br>4,9,12,16,18,20,22,23,25,31,32,33,35,37,38,39,42,46,47,48,49,50';}
       if(rr==20 && cc==2){return '<strong>Probabilidad de precipitacion de 0 a 24 UTC superior a 5 mm</strong><br><br><strong>20260515 a 12</strong> UTC HH+120 (rango:108-132)<br>grupo: <strong>2</strong> representante: <strong>30</strong> miembros: 18 <strong>control</strong><br>0,2,3,7,8,11,13,14,15,17,19,24,26,28,29,30,43,45';}
       if(rr==20 && cc==3){return '<strong>Probabilidad de precipitacion de 0 a 24 UTC superior a 5 mm</strong><br><br><strong>20260515 a 12</strong> UTC HH+120 (rango:108-132)<br>grupo: <strong>3</strong> representante: <strong>1</strong> miembros: 11 <br>1,5,6,10,21,27,34,36,40,41,44';}
       if(rr==21 && cc==0){return '<strong>Probabilidad de precipitacion de 0 a 24 UTC superior a 10 mm</strong><br><br><strong>20260515 a 12</strong> UTC HH+120 (rango:108-132)<br><strong>control +<br>EPS</strong>';}
       if(rr==21 && cc==1){return '<strong>Probabilidad de precipitacion de 0 a 24 UTC superior a 10 mm</strong><br><br><strong>20260515 a 12</strong> UTC HH+120 (rango:108-132)<br>grupo: <strong>1</strong> representante: <strong>12</strong> miembros: 22 <br>4,9,12,16,18,20,22,23,25,31,32,33,35,37,38,39,42,46,47,48,49,50';}
       if(rr==21 && cc==2){return '<strong>Probabilidad de precipitacion de 0 a 24 UTC superior a 10 mm</strong><br><br><strong>20260515 a 12</strong> UTC HH+120 (rango:108-132)<br>grupo: <strong>2</strong> representante: <strong>30</strong> miembros: 18 <strong>control</strong><br>0,2,3,7,8,11,13,14,15,17,19,24,26,28,29,30,43,45';}
       if(rr==21 && cc==3){return '<strong>Probabilidad de precipitacion de 0 a 24 UTC superior a 10 mm</strong><br><br><strong>20260515 a 12</strong> UTC HH+120 (rango:108-132)<br>grupo: <strong>3</strong> representante: <strong>1</strong> miembros: 11 <br>1,5,6,10,21,27,34,36,40,41,44';}
       if(rr==22 && cc==0){return '<strong>Probabilidad de precipitacion de 0 a 24 UTC superior a 20 mm</strong><br><br><strong>20260515 a 12</strong> UTC HH+120 (rango:108-132)<br><strong>control +<br>EPS</strong>';}
       if(rr==22 && cc==1){return '<strong>Probabilidad de precipitacion de 0 a 24 UTC superior a 20 mm</strong><br><br><strong>20260515 a 12</strong> UTC HH+120 (rango:108-132)<br>grupo: <strong>1</strong> representante: <strong>12</strong> miembros: 22 <br>4,9,12,16,18,20,22,23,25,31,32,33,35,37,38,39,42,46,47,48,49,50';}
       if(rr==22 && cc==2){return '<strong>Probabilidad de precipitacion de 0 a 24 UTC superior a 20 mm</strong><br><br><strong>20260515 a 12</strong> UTC HH+120 (rango:108-132)<br>grupo: <strong>2</strong> representante: <strong>30</strong> miembros: 18 <strong>control</strong><br>0,2,3,7,8,11,13,14,15,17,19,24,26,28,29,30,43,45';}
       if(rr==22 && cc==3){return '<strong>Probabilidad de precipitacion de 0 a 24 UTC superior a 20 mm</strong><br><br><strong>20260515 a 12</strong> UTC HH+120 (rango:108-132)<br>grupo: <strong>3</strong> representante: <strong>1</strong> miembros: 11 <br>1,5,6,10,21,27,34,36,40,41,44';}
}
        function getR(rrw){
           cx=0;
       cx+=1;
       if(rrw==cx){return 3;}
       cx+=1;
       if(rrw==cx){return 17;}
       cx+=1;
       if(rrw==cx){return 19;}
       cx+=1;
       if(rrw==cx){return 20;}
       cx+=1;
       if(rrw==cx){return 21;}
       cx+=1;
       if(rrw==cx){return 22;}
return -1;}
