function galerie(){
  var elts = document.getElementById('galerie').getElementsByTagName('a');
  for(var i = 0; i < elts.length ; i++){
    if (window.addEventListener){
      elts[i].addEventListener('mouseover', change_photo, true);
    }else if(window.attachEvent){
      elts[i].attachEvent('onmouseover', change_photo);
    }
    elts[i].setAttribute('onclick','return false;');
  }
  
  function change_photo(){
    var img = document.getElementById('img');
    
    if(window.event){ //IE
      var node_source = (document.all)?event.srcElement:event.target;
      img.setAttribute('src',node_source.rel);
      img.setAttribute('alt',node_source.title);
      img.parentNode.href = node_source.rel;
      img.parentNode.title = node_source.title;
    }else{ //FF
      var src = document.getElementById(this.id).href;
      var alt = document.getElementById(this.id).title;
      img.setAttribute('src',src);
      img.setAttribute('alt',alt);
      img.parentNode.href = src;
      img.parentNode.title = alt;
    }
  }
}
