var InFireFox = (document.getElementById && !document.all)?1:0
var wW, wH // window size
var Ret; 

var slideShowSpeed = 4500; // Set slideShowSpeed (milliseconds) 
var crossFadeDuration = 16; // Duration of crossfade (seconds) 
var Pic = new Array(); // Specify the image files 

Pic[0] = "img/anim_baobab.gif" 
Pic[1] = "img/anim_africa1.gif" 
Pic[2] = "img/anim_africa2.gif" 
Pic[3] = "img/anim_africa3.gif" 
Pic[4] = "img/anim_africa4.gif"
Pic[5] = "img/anim_africa5.gif"
Pic[6] = "img/anim_africa6.gif"

var j = 0; 
var p = Pic.length; 
var preLoad = new Array(); 

function Start() {
   if (document.getElementById && !document.all) InFireFox = 1
   for (var i = 0; i < p; i++) { 
   preLoad[i] = new Image(); 
   preLoad[i].src = Pic[i]; 
   } 

   document.getElementById("divLAP").style.left = -20
   document.getElementById("divLAP").style.top = 15
   document.getElementById("divAnim").style.left = 32
   document.getElementById("divAnim").style.top = 70
   document.getElementById("divLang").style.left= 15
   document.getElementById("divLang").style.top = 350
   DoResize()   
   runSlideShow()
}
function runSlideShow() { 
   if (InFireFox == 0) { 
   document.images.SlideShow.style.filter="blendTrans(duration=2)"; 
   document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"; 
   document.images.SlideShow.filters.blendTrans.Apply (); 
   } 
   document.images.SlideShow.src = preLoad[j].src; 
   if (InFireFox == 0) { 
   document.images.SlideShow.filters.blendTrans.Play( ); 
   } 
   j = j + 1; 
   if (j > (p - 1)) j = 0; 
   Ret = setTimeout("runSlideShow()", slideShowSpeed); 
} 

function DoResize() {
   if (InFireFox) {
      wW = window.innerWidth //- 140
      wH = window.innerHeight //- 140
   }
   else {
      wW = document.body.clientWidth //- 140
      wH = document.body.clientHeight //- 140
   }
   document.getElementById("divALL").style.left = (wW - 690) / 2
   document.getElementById("divALL").style.top = (wH - 400) / 2  
}

