//Script zur Animation der Statuszeile auf dem Begrüßungsbildschirm
//zur Auswahl des Browsers und zum preloaden der Bilder
//Author Sebastian Dolke

  function start()
  {
    preLoad();
  }

//preLoaden der Bilder*******************************************************************************************************
//***************************************************************************************************************************
    var ImgAnzahl=23;
    var img = new Array(ImgAnzahl);
    var restImg=ImgAnzahl;
    var s = new Array(ImgAnzahl);

    function LoadImg(name)
    {
      i=new Image();									//neues Object anlegen
      i.src=name;									//hiermit wird der Doeload des Bildes
      return i;										//ausgelößt
    }

    function preLoad()
    {
      img[ 0]=LoadImg("pictures/menu00m.jpg");	
      img[ 1]=LoadImg("pictures/menu00n.jpg");	
      img[ 2]=LoadImg("pictures/menu00s.jpg");	
      img[ 3]=LoadImg("pictures/menu10m.jpg");	
      img[ 4]=LoadImg("pictures/menu10n.jpg");	
      img[ 5]=LoadImg("pictures/menu10s.jpg");	
      img[ 6]=LoadImg("pictures/menu20m.jpg");	
      img[ 7]=LoadImg("pictures/menu20n.jpg");	
      img[ 8]=LoadImg("pictures/menu20s.jpg");	
      img[ 9]=LoadImg("pictures/menu30m.jpg");	
      img[10]=LoadImg("pictures/menu30n.jpg");	
      img[11]=LoadImg("pictures/menu30s.jpg");	
      img[12]=LoadImg("pictures/menu40m.jpg");	
      img[13]=LoadImg("pictures/menu40n.jpg");	
      img[14]=LoadImg("pictures/menu40s.jpg");	
      img[15]=LoadImg("pictures/menu50m.jpg");	
      img[16]=LoadImg("pictures/menu50n.jpg");	
      img[17]=LoadImg("pictures/menu50s.jpg");	
      img[18]=LoadImg("pictures/menu60n.jpg");	
      img[19]=LoadImg("pictures/menu60m.jpg");	
      img[20]=LoadImg("pictures/menu60s.jpg");	
      img[21]=LoadImg("pictures/titel1.jpg");	
      img[22]=LoadImg("pictures/titel2.jpg");	

      ImgStatus()
    }


    function ImgStatus()
    {
      for(i=0;i<ImgAnzahl;i++)
      {
        if(!s[i]) 									//wenn das Bild noch nicht im Cache ist
          if(img[i].complete) 								//testen ob Bild schon geladen ist
          {
            restImg--; 
            s[i]=true; 									//beim nächsten Durchlauf Statusgif nicht mehr verlängern
            document.statusgif.width=document.statusgif.width+				//Statusleiste verlängern
              Math.ceil(580/ImgAnzahl);
          }
      }

      if (restImg>0)   
         window.setTimeout("ImgStatus()",5);						//nach 5 msec Abfrage wiederhohlen
      else 
      {
        window.location.href="seite0.html";
        document.all.ImageLoad.style.display='none';
        document.all.MoonsText.style.display='';
        ImagesReady=true;
      }  
    }


