  var iInterval    = 3;
  var iFotoGeneral = 0;
  var bDiashow     = false;
  function fnToonVolgendeFotoShow() {
    if(bDiashow) {
      iFotoGeneral++;
      if(iFotoGeneral >= arFotos.length) {
        iFotoGeneral = 0;
      }
      fnToonFoto(iFotoGeneral);
      fnDiashow();
    }
  }

  function fnToonVolgendeFoto() {
    bDiashow = false;
    iFotoGeneral++;
    if(iFotoGeneral < arFotos.length) {
      fnToonFoto(iFotoGeneral);
    } else {
      iFotoGeneral = arFotos.length - 1;
    }
  }

  function fnToonVorigeFoto() {
    bDiashow = false;
    if(iFotoGeneral > 0) {
      iFotoGeneral--;
      fnToonFoto(iFotoGeneral);
    }
  }

  function fnToonFoto(iFoto) {
    iFotoGeneral = iFoto;
    var oLargeImage = document.getElementById('large_image');
    var oBigPicture = document.getElementById('big_picture');
    var oMiniatures = document.getElementById('miniatures_overview');
    if(oLargeImage && oBigPicture && oMiniatures) {
      oLargeImage.src = '/' + sDir + sLarge + '/' + arFotos[iFoto];
      oMiniatures.style.display = 'none';
      oBigPicture.style.display = 'block';
    }
  }
  
  function fnCloseBigPicture() {
    fnStopDiashow();
    var oBigPicture = document.getElementById('big_picture');
    var oMiniatures = document.getElementById('miniatures_overview');
    if(oBigPicture && oMiniatures) {
      oMiniatures.style.display = 'block';
      oBigPicture.style.display = 'none';
    }
  }

  function fnDiashow() {
    if(bDiashow) {
      setTimeout("fnToonVolgendeFotoShow();", iInterval * 1000);
    }
  }
    
  function fnStartDiashow() {
    if(bDiashow == false) {
      bDiashow = true;
      fnDiashow();
    }
  }

  function fnStopDiashow() {
    bDiashow = false;
  }
  
