 var Loaders     = new Array();
 var CurrentLoad = "";
 var CurrentKind = 0;
 var CurrentFile = "Data/B-274.png";
 var CurrentTab  = 1;
 var HelpHeight  = 44;
 var TextHeight  = 80;
 var TextBuffer  = "";

 setTimeout("CheckStatus()", 200);

 PreloadPictures();

 function ShowHideMenu(ID)
  {
   if ( document.getElementById("Menu"+ID).style.display == "none" )
    {
     document.getElementById("Menu"+ID).style.display = "inLine";
     document.getElementById("PicMenu"+ID).src = "Graphix/Folder-2.gif";
    }
   else
    {
     document.getElementById("Menu"+ID).style.display = "none";
     document.getElementById("PicMenu"+ID).src = "Graphix/Folder-1.gif";
    }
  }

 function ResizeHelpDiv(FinalHeight)
  {
   if ( FinalHeight < HelpHeight )
    HelpHeight = HelpHeight - HelpHeight / 10;
   else if ( FinalHeight > HelpHeight )
    HelpHeight = HelpHeight + HelpHeight / 10;

   if ( Math.abs( FinalHeight - HelpHeight ) < 2 )
    HelpHeight = FinalHeight ;
   else
    setTimeout('ResizeHelpDiv('+FinalHeight+')',20);

   document.getElementById("Legende").style.height = HelpHeight;
  }

 function HideTextDiv()
  {
   TextHeight = TextHeight - TextHeight / 4;
   if ( TextHeight <= 2 )
    {
     TextHeight = 2;
     document.getElementById("TextZone").innerHTML = TextBuffer;
     setTimeout('ShowTextDiv()',100);
    }
   else
    setTimeout('HideTextDiv()',20);

   document.getElementById("TextZone").style.height = TextHeight;
  }

 function ShowTextDiv()
  {
   TextHeight = TextHeight + TextHeight / 4;
   if ( TextHeight >= 80 )
    TextHeight = 80;
   else
    setTimeout('ShowTextDiv()',20);

   document.getElementById("TextZone").style.height = TextHeight;
  }

 function ShowText(ID)
  {
   HideTextDiv();

   if ( ID == 1 )
    {
     iTxt = "<FONT STYLE='font-size: 12px; color: #8F929D'><B>Site Informations</B></FONT><BR>";
     iTxt = iTxt + "This website has been designed to provide day to day tracking of the earth ozone atmospheric";
     iTxt = iTxt + " layer. All pictures and graphs found here are computed based on the NASA OMI ( Ozone Monitoring Instrument )";
     iTxt = iTxt + " datasets. You can download, copy and use freely all of this graphs. If you need more informations, you can";
     iTxt = iTxt + " use the Contacts link.";
     TextBuffer = iTxt;
    }

   if ( ID == 2 )
    {
     iTxt = "<FONT STYLE='font-size: 12px; color: #8F929D'><B>Data Archive Access</B></FONT><BR>";
     iTxt = iTxt + "To access the ozone archives simply select the Year / Month / Day you want to visualise at the bottom";
     iTxt = iTxt + " of the page. The archives are covering 1996-2007 and have been built by processing NASA OMI L3 data sets";
     iTxt = iTxt + " that you can find at <A HREF='ftp://toms.gsfc.nasa.gov/pub/omi/data/Level3e/ozone' CLASS=liens2 TARGET=_New>ftp://toms.gsfc.nasa.gov/pub/omi/data/Level3e/ozone</A>.";
     iTxt = iTxt + " You can download and use freely all ressources found on this site.";
     TextBuffer = iTxt;
    }

   if ( ID == 3 )
    {
     iTxt = "<FONT STYLE='font-size: 12px; color: #8F929D'><B>NASA OMI Data set processing</B></FONT><BR>";
     iTxt = iTxt + "See in the documentation by clicking on <A HREF='Infos.php' CLASS=liens2>Ozone layer information<A> at the top of the page.";
     TextBuffer = iTxt;
    }

   if ( ID == 4 )
    {
     iTxt = "<FONT STYLE='font-size: 12px; color: #8F929D'><B>Contacts</B></FONT><BR>";
     iTxt = iTxt + "If you have any questions, feel free to send an email at <A HREF='mailto:ozone.monitoring@gmail.com' CLASS=liens2>ozone.monitoring@gmail.com</A>.";
     TextBuffer = iTxt;
    }
  }

 function ToggleOptions(Action,ID)
  {
   if ( ID == 1 )
    {
     if ( Action == 1 && CurrentTab == 1 )
      document.getElementById("Onglet1").src = "Graphix/oOnglet-Live-2.gif";
     if ( Action == 1 && CurrentTab != 1 )
      document.getElementById("Onglet1").src = "Graphix/Onglet-Live-2.gif";
     if ( Action == 2 && CurrentTab == 1 )
      document.getElementById("Onglet1").src = "Graphix/oOnglet-Live.gif";
     if ( Action == 2 && CurrentTab != 1 )
      document.getElementById("Onglet1").src = "Graphix/Onglet-Live.gif";
     if ( Action == 3 )
      {
       document.getElementById("Onglet1").src = "Graphix/oOnglet-Live-2.gif";
       document.getElementById("Onglet2").src = "Graphix/Onglet-Stats.gif";
       document.getElementById("Live").style.display = "inline";
       document.getElementById("Stats").style.display = "none";
       CurrentTab = 1;

       document.getElementById("Legende").style.width = 320;

       SelectPicture(1);
      }
    }
   if ( ID == 2 )
    {
     if ( Action == 1 && CurrentTab == 2 )
      document.getElementById("Onglet2").src = "Graphix/oOnglet-Stats-2.gif";
     if ( Action == 1 && CurrentTab != 2 )
      document.getElementById("Onglet2").src = "Graphix/Onglet-Stats-2.gif";
     if ( Action == 2 && CurrentTab == 2 )
      document.getElementById("Onglet2").src = "Graphix/oOnglet-Stats.gif";
     if ( Action == 2 && CurrentTab != 2 )
      document.getElementById("Onglet2").src = "Graphix/Onglet-Stats.gif";
     if ( Action == 3 )
      {
       document.getElementById("Onglet2").src = "Graphix/oOnglet-Stats-2.gif";
       document.getElementById("Onglet1").src = "Graphix/Onglet-Live.gif";
       document.getElementById("Stats").style.display = "inline";
       document.getElementById("Live").style.display = "none";
       CurrentTab = 2;

       document.getElementById("Legende").style.width = 315;

       SelectPicture(4);
      }
    }
  }

 function ShowDay(Day,Month,Year)
  {
   ThisYear  = Year;
   ThisMonth = Month;
   ThisDay   = Day;

   if ( ThisMonth < 10 ) { ThisMonth = "0"+ThisMonth; }
   if ( ThisDay < 10 ) { ThisDay = "0"+ThisDay; }

   ToggleOptions(3,1);

   SelectPicture(1);
  }

 function Download()
  {
   window.location = "Download.php?FileName="+CurrentFile;
  }

 function DownloadVideo()
  {
   VideoURL = "video.php?Year="+ThisYear+"&Month="+ThisMonth+"&Day="+ThisDay;

   newWindow(VideoURL,'popup',400,330,'scrollbars=no'); // 320-256
  }

 function SelectPicture(ID)
  {
   document.getElementById("MainPicture").innerHTML="<DIV STYLE='padding-top: 170px; font-family: Tahoma; font-size: 11px;'><IMG SRC='Graphix/Load.gif' WIDTH=16 HEIGHT=16></DIV>";

   if ( ID == 1 ) { LoadPicture("Data/"+ThisYear+"/"+ThisMonth+"/"+ThisDay+"/MapB.png",1); }
   if ( ID == 2 ) { LoadPicture("Data/"+ThisYear+"/"+ThisMonth+"/"+ThisDay+"/MaskB.png",0); }
   if ( ID == 3 ) { LoadPicture("Data/"+ThisYear+"/"+ThisMonth+"/"+ThisDay+"/3D.png",0); }
   if ( ID == 4 ) { LoadPicture("Data/MapB.png",1); }
   if ( ID == 5 ) { LoadPicture("Data/MaskB.png",0); }
   if ( ID == 6 ) { LoadPicture("Data/3D.png",0); }
   if ( ID == 7 ) { LoadPicture("Data/Localisation/1.png",0); }
   if ( ID == 8 ) { LoadPicture("Data/Localisation/2.png",0); }
   if ( ID == 9 ) { LoadPicture("Data/Localisation/3.png",0); }
   if ( ID == 10 ) { LoadPicture("Data/Localisation/4.png",0); }
   if ( ID == 11 ) { LoadPicture("Data/Localisation/5.png",0); }
   if ( ID == 12 ) { LoadPicture("Data/Localisation/6.png",0); }
   if ( ID == 13 ) { LoadPicture("Data/Localisation/7.png",0); }
   if ( ID == 14 ) { LoadPicture("Data/"+ThisYear+"/"+ThisMonth+"/"+ThisDay+"/SouthPole.png",2); }

   ShowLegende(ID);

   document.getElementById("CurrentTime").innerHTML="Loading data...";
   //document.getElementById("DL").innerHTML="";
  }

 function LoadPicture(Name,Kind)
  {
   Loaders[0]     = new Image();
   Loaders[0].src = Name;
   CurrentLoad    = Name;
   CurrentKind    = Kind;
  }

 function CheckStatus()
  {
   if ( CurrentLoad != "" )
    {
     if ( Loaders[0].complete == true )
      {
       document.getElementById("MainPicture").style.width = 742;
       document.getElementById("MainPicture").style.height = 359;

       if ( CurrentKind == 1 )
        {
         DivMap = "";
         DivMap = DivMap + "<DIV ID='northamerica' STYLE='display: none; position: absolute; left: 97px; top: 66px;'><A HREF='javascript:SelectPicture(7);'><IMG SRC='Locations/1.gif' WIDTH=174 HEIGHT=99 OnMouseOver='document.getElementById(" + String.fromCharCode(34) + "northamerica" + String.fromCharCode(34) + ").style.display=" + String.fromCharCode(34) + "block" + String.fromCharCode(34) + ";' OnMouseOut='document.getElementById(" + String.fromCharCode(34) + "northamerica" + String.fromCharCode(34) + ").style.display=" + String.fromCharCode(34) + "none" + String.fromCharCode(34) + ";' BORDER=0></A></DIV>";
         DivMap = DivMap + "<DIV ID='southamerica' STYLE='display: none; position: absolute; left: 224px; top: 162px;'><A HREF='javascript:SelectPicture(8);'><IMG SRC='Locations/2.gif' WIDTH=75 HEIGHT=105 OnMouseOver='document.getElementById(" + String.fromCharCode(34) + "southamerica" + String.fromCharCode(34) + ").style.display=" + String.fromCharCode(34) + "block" + String.fromCharCode(34) + ";' OnMouseOut='document.getElementById(" + String.fromCharCode(34) + "southamerica" + String.fromCharCode(34) + ").style.display=" + String.fromCharCode(34) + "none" + String.fromCharCode(34) + ";' BORDER=0></A></DIV>";
         DivMap = DivMap + "<DIV ID='europe' STYLE='display: none; position: absolute; left: 332px; top: 74px;'><A HREF='javascript:SelectPicture(9);'><IMG SRC='Locations/3.gif' WIDTH=60 HEIGHT=56 OnMouseOver='document.getElementById(" + String.fromCharCode(34) + "europe" + String.fromCharCode(34) + ").style.display=" + String.fromCharCode(34) + "block" + String.fromCharCode(34) + ";' OnMouseOut='document.getElementById(" + String.fromCharCode(34) + "europe" + String.fromCharCode(34) + ").style.display=" + String.fromCharCode(34) + "none" + String.fromCharCode(34) + ";' BORDER=0></A></DIV>";
         DivMap = DivMap + "<DIV ID='africa' STYLE='display: none; position: absolute; left: 322px; top: 125px;'><A HREF='javascript:SelectPicture(10);'><IMG SRC='Locations/4.gif' WIDTH=111 HEIGHT=110 OnMouseOver='document.getElementById(" + String.fromCharCode(34) + "africa" + String.fromCharCode(34) + ").style.display=" + String.fromCharCode(34) + "block" + String.fromCharCode(34) + ";' OnMouseOut='document.getElementById(" + String.fromCharCode(34) + "africa" + String.fromCharCode(34) + ").style.display=" + String.fromCharCode(34) + "none" + String.fromCharCode(34) + ";' BORDER=0></A></DIV>";
         DivMap = DivMap + "<DIV ID='russia' STYLE='display: none; position: absolute; left: 395px; top: 66px;'><A HREF='javascript:SelectPicture(11);'><IMG SRC='Locations/5.gif' WIDTH=222 HEIGHT=73 OnMouseOver='document.getElementById(" + String.fromCharCode(34) + "russia" + String.fromCharCode(34) + ").style.display=" + String.fromCharCode(34) + "block" + String.fromCharCode(34) + ";' OnMouseOut='document.getElementById(" + String.fromCharCode(34) + "russia" + String.fromCharCode(34) + ").style.display=" + String.fromCharCode(34) + "none" + String.fromCharCode(34) + ";' BORDER=0></A></DIV>";
         DivMap = DivMap + "<DIV ID='india' STYLE='display: none; position: absolute; left: 451px; top: 142px;'><A HREF='javascript:SelectPicture(12);'><IMG SRC='Locations/6.gif' WIDTH=33 HEIGHT=33 OnMouseOver='document.getElementById(" + String.fromCharCode(34) + "india" + String.fromCharCode(34) + ").style.display=" + String.fromCharCode(34) + "block" + String.fromCharCode(34) + ";' OnMouseOut='document.getElementById(" + String.fromCharCode(34) + "india" + String.fromCharCode(34) + ").style.display=" + String.fromCharCode(34) + "none" + String.fromCharCode(34) + ";' BORDER=0></A></DIV>";
         DivMap = DivMap + "<DIV ID='australia' STYLE='display: none; position: absolute; left: 514px; top: 195px;'><A HREF='javascript:SelectPicture(13);'><IMG SRC='Locations/7.gif' WIDTH=71 HEIGHT=56 OnMouseOver='document.getElementById(" + String.fromCharCode(34) + "australia" + String.fromCharCode(34) + ").style.display=" + String.fromCharCode(34) + "block" + String.fromCharCode(34) + ";' OnMouseOut='document.getElementById(" + String.fromCharCode(34) + "australia" + String.fromCharCode(34) + ").style.display=" + String.fromCharCode(34) + "none" + String.fromCharCode(34) + ";' BORDER=0></A></DIV>";
         document.getElementById("MainPicture").innerHTML= DivMap + "<IMG SRC='"+CurrentLoad+"' WIDTH=740 HEIGHT=357 USEMAP='#locations' BORDER=0>";
        }
       else
        {
         if ( CurrentKind == 2 )
          {
           document.getElementById("MainPicture").style.width = 742;
           document.getElementById("MainPicture").style.height = 742;

           document.getElementById("MainPicture").innerHTML = "<IMG SRC='"+CurrentLoad+"' WIDTH=720 HEIGHT=720 STYLE='border: 10px #000000 solid'>";
          }
         else
          document.getElementById("MainPicture").innerHTML = "<IMG SRC='"+CurrentLoad+"' WIDTH=740 HEIGHT=357 BORDER=0>";
        }

       // document.getElementById("DL").innerHTML="<A HREF='javascript:Download();' CLASS=LiensInterne>Download</A> | <A HREF='javascript:DownloadVideo();' CLASS=LiensInterne>Video</A>";

       CurrentFile = CurrentLoad;
       CurrentLoad = "";

       document.getElementById("CurrentTime").innerHTML="<B>Processed Data</B> | "+ToMonthName(ThisMonth)+" "+ThisDay+", "+ThisYear;
      }
    }
   setTimeout("CheckStatus()", 200);
  }

 function Toggle(Mode)
  {
   if ( Mode == 1 )
    { document.getElementById("Tab1").src="Graphix/Tab-1-2.gif"; document.getElementById("Tab2").style.backgroundImage="url('Graphix/Tab-2-2.gif')"; document.getElementById("Tab3").src="Graphix/Tab-3-2.gif"; }
   if ( Mode == 2 )
    { document.getElementById("Tab1").src="Graphix/Tab-1.gif"; document.getElementById("Tab2").style.backgroundImage="url('Graphix/Tab-2.gif')"; document.getElementById("Tab3").src="Graphix/Tab-3.gif"; }
   if ( Mode == 3 )
    { document.getElementById("Tab3").src="Graphix/Tab-5-2.gif"; document.getElementById("Tab4").style.backgroundImage="url('Graphix/Tab-2-2.gif')"; document.getElementById("Tab5").src="Graphix/Tab-3-2.gif"; }
   if ( Mode == 4 )
    { document.getElementById("Tab3").src="Graphix/Tab-3.gif"; document.getElementById("Tab4").style.backgroundImage="url('Graphix/Tab-2.gif')"; document.getElementById("Tab5").src="Graphix/Tab-3.gif"; }
   if ( Mode == 5 )
    { document.getElementById("Tab5").src="Graphix/Tab-5-2.gif"; document.getElementById("Tab6").style.backgroundImage="url('Graphix/Tab-2-2.gif')"; document.getElementById("Tab7").src="Graphix/Tab-3-2.gif"; }
   if ( Mode == 6 )
    { document.getElementById("Tab5").src="Graphix/Tab-3.gif"; document.getElementById("Tab6").style.backgroundImage="url('Graphix/Tab-2.gif')"; document.getElementById("Tab7").src="Graphix/Tab-3.gif"; }
   if ( Mode == 7 )
    { document.getElementById("Tab8").src="Graphix/Tab-1-2.gif"; document.getElementById("Tab9").style.backgroundImage="url('Graphix/Tab-2-2.gif')"; document.getElementById("Tab10").src="Graphix/Tab-3-2.gif"; }
   if ( Mode == 8 )
    { document.getElementById("Tab8").src="Graphix/Tab-1.gif"; document.getElementById("Tab9").style.backgroundImage="url('Graphix/Tab-2.gif')"; document.getElementById("Tab10").src="Graphix/Tab-3.gif"; }
   if ( Mode == 9 )
    { document.getElementById("Tab10").src="Graphix/Tab-5-2.gif"; document.getElementById("Tab11").style.backgroundImage="url('Graphix/Tab-2-2.gif')"; document.getElementById("Tab12").src="Graphix/Tab-3-2.gif"; }
   if ( Mode == 10 )
    { document.getElementById("Tab10").src="Graphix/Tab-3.gif"; document.getElementById("Tab11").style.backgroundImage="url('Graphix/Tab-2.gif')"; document.getElementById("Tab12").src="Graphix/Tab-3.gif"; }
   if ( Mode == 11 )
    { document.getElementById("Tab12").src="Graphix/Tab-5-2.gif"; document.getElementById("Tab13").style.backgroundImage="url('Graphix/Tab-2-2.gif')"; document.getElementById("Tab14").src="Graphix/Tab-4-2.gif"; }
   if ( Mode == 12 )
    { document.getElementById("Tab12").src="Graphix/Tab-3.gif"; document.getElementById("Tab13").style.backgroundImage="url('Graphix/Tab-2.gif')"; document.getElementById("Tab14").src="Graphix/Tab-4.gif"; }
   if ( Mode == 13 )
    { document.getElementById("Tab7").src="Graphix/Tab-5-2.gif"; document.getElementById("Tab26").style.backgroundImage="url('Graphix/Tab-2-2.gif')"; document.getElementById("Tab27").src="Graphix/Tab-4-2.gif"; }
   if ( Mode == 14 )
    { document.getElementById("Tab7").src="Graphix/Tab-3.gif"; document.getElementById("Tab26").style.backgroundImage="url('Graphix/Tab-2.gif')"; document.getElementById("Tab27").src="Graphix/Tab-4.gif"; }

  }

 function PreloadPictures()
  {
   Loaders[1] = new Image(); Loaders[1].src = "Graphix/Tab-1-2.gif";
   Loaders[2] = new Image(); Loaders[2].src = "Graphix/Tab-2-2.gif";
   Loaders[3] = new Image(); Loaders[3].src = "Graphix/Tab-3-2.gif";
   Loaders[4] = new Image(); Loaders[4].src = "Graphix/Tab-4-2.gif";
   Loaders[5] = new Image(); Loaders[5].src = "Graphix/Tab-5-2.gif";
   Loaders[6] = new Image(); Loaders[6].src = "Graphix/Onglet-Live-2.gif";
   Loaders[7] = new Image(); Loaders[7].src = "Graphix/Onglet-Stats-2.gif";
   Loaders[8] = new Image(); Loaders[8].src = "Graphix/oOnglet-Live-2.gif";
   Loaders[9] = new Image(); Loaders[9].src = "Graphix/oOnglet-Stats-2.gif";
   Loaders[10] = new Image(); Loaders[10].src = "Graphix/oOnglet-Stats.gif";
  }

 function ToMonthName(Month)
  {
   if ( Month == 1 ) { return("January"); }
   if ( Month == 2 ) { return("February"); }
   if ( Month == 3 ) { return("March"); }
   if ( Month == 4 ) { return("April"); }
   if ( Month == 5 ) { return("May"); }
   if ( Month == 6 ) { return("June"); }
   if ( Month == 7 ) { return("July"); }
   if ( Month == 8 ) { return("August"); }
   if ( Month == 9 ) { return("September"); }
   if ( Month == 10 ) { return("October"); }
   if ( Month == 11 ) { return("November"); }
   if ( Month == 12 ) { return("December"); }
  }

 function ShowLegende(ID)
  {
   if ( ID == 1 )
    {
     iLegende = "This graph is showing data gathered from the OMI ( <U>O</U>zone <U>M</U>onitoring <U>I</U>nstrument ) used in the EOS";
     iLegende = iLegende + " ( <U>E</U>arth <U>O</U>bserving <U>S</U>ystem ) mission. This data are computed using a linear color scale and projected";
     iLegende = iLegende + " on a Blue Marble picture.";
     ResizeHelpDiv(44);
    }

   if ( ID == 2 )
    {
     iLegende = "This graph is showing data gathered from the OMI ( <U>O</U>zone <U>M</U>onitoring <U>I</U>nstrument ) used in the EOS";
     iLegende = iLegende + " ( <U>E</U>arth <U>O</U>bserving <U>S</U>ystem ) mission. This data are computed using a linear color scale.";
     ResizeHelpDiv(44);
    }

   if ( ID == 3 )
    {
     iLegende = "This graph is showing a 3D spherical projection of the ozone atmospheric layer. The view is computed using the";
     iLegende = iLegende + " '2D only Ozone' picture as a mapping texture. More informations on 3D spherical projections can be";
     iLegende = iLegende + " found on <A HREF='http://www.sunyday.net/article-Projection-spherique-php-bluemarble.html' CLASS=liens2>www.sunyday.net</A>. Colors can be affected by";
     iLegende = iLegende + " the merge on the blue marble picture.";
     ResizeHelpDiv(66);
    }

   if ( ID == 4 )
    {
     iLegende = "This graph is showing the maximum hole boundaries recorded since July 1996. Only values that are under";
     iLegende = iLegende + " 180 dobson units are graphed. Data are projected on a 2D Blue marble picture. ( colors can be affected )";
     ResizeHelpDiv(54);
    }

   if ( ID == 5 )
    {
     iLegende = "This graph is showing the maximum hole boundaries recorded since July 1996. Only values that are under";
     iLegende = iLegende + " 180 dobson units are graphed.";
     ResizeHelpDiv(44);
    }

   if ( ID == 6 )
    {
     iLegende = "This graph is showing a 3D spherical projection of the ozone hole boundaries. The view is computed using the";
     iLegende = iLegende + " '2D only ozone boundaries' picture as a mapping texture. Colors can be affected by";
     iLegende = iLegende + " the merge on the blue marble picture.";
     ResizeHelpDiv(54);
    }

   if ( ID >= 7 && ID <= 13 )
    {
     iLegende = "This graph is showing the average value of the ozone layer for a particular world area. The grey area zone are representing the maximum and minimum values measured since July 1996.";
     ResizeHelpDiv(44);
    }

   if ( ID == 14 )
    {
     iLegende = "This graph is showing a 3D spherical projection of the ozone hole from a south emisphere point of view.";
     iLegende = iLegende + " Data may be missing depending of the current satellite path.";
     ResizeHelpDiv(44);
    }

   document.getElementById("Legende").innerHTML=iLegende;
  }

 function newWindow(mypage,myname,w,h,features)
  {
   if(screen.width)
    {
     var winl = (screen.width-w)/2;
     var wint = (screen.height-h)/2;
    }
   else
    {
     winl = 0;wint =0;
    }
   if (winl < 0) winl = 0;
   if (wint < 0) wint = 0;
   var settings = 'height=' + h + ',';
   settings += 'width=' + w + ',';
   settings += 'top=' + wint + ',';
   settings += 'left=' + winl + ',';
   settings += features;
   win = window.open(mypage,myname,settings);
   win.window.focus();
  }
