function buttonVet(nr){
    if (nr ==4) {
        document.getElementById("button"+nr).src="../img/hoofdbuttons/button" + nr + "_mo.gif";
    } else {
        document.getElementById("button"+nr).src="img/hoofdbuttons/button" + nr + "_mo.gif";
    }
}

function buttonDun(nr){
    if (nr ==4) {
        document.getElementById("button"+nr).src="../img/hoofdbuttons/button" + nr + ".gif";
    } else {
        document.getElementById("button"+nr).src="img/hoofdbuttons/button" + nr + ".gif";
    }
}

function toonFoto(nr){
  var foto = document.getElementById("foto");
  if (foto.type=='video/x-msvideo') { //video is playing then change to photo
    var fotovlak = document.getElementById("fotovlak");
     try {
      document.body.removeChild(foto);
      fotovlak.removeChild(foto);
      //foto.parentNode.removeChild(foto); this for IE they say
     } catch (e)
     {
      foto.parentNode.removeChild(foto);
     } 
    
    var newfoto = document.createElement('img');
    newfoto.setAttribute('id','foto');
    newfoto.setAttribute('class','fotogroot');
    newfoto.setAttribute('src','fotos/foto'+nr+'.jpg');
    fotovlak.appendChild(newfoto);
  } else {
    if (nr == 0) { //change to video
      var fotovlak = document.getElementById("fotovlak");
      fotovlak.removeChild(foto);
      var newVideo = document.createElement('object');
      newVideo.setAttribute('id','foto');
      newVideo.setAttribute('class','fotogroot');
      newVideo.value = "<param name=\"src\" value=\"videos/VCLP0024.avi\"><param name=\"autoStart\" value=\"1\"><param name=\"loop\" value=\"1\">";
      fotovlak.appendChild(newVideo);
    } else {
      //show another photo
      document.getElementById("foto").src="fotos/foto" + nr + ".jpg";
    }
  }
  
}


