// Ajuste la taille d'un iframe à la taille de son contenu.
// Les attributs name et id de l'iframe doivent avoir même valeur.
function adjustIFrameSize (iframeWindow) {
  if (iframeWindow.document.height) {  // cas de Firefox
    var iframeElement = document.getElementById(iframeWindow.name);
    iframeElement.style.height = iframeWindow.document.height + 'px';
    //iframeElement.style.width = iframeWindow.document.width + 'px';
  }
  else {  // cas de MSIE et Opera
     if (document.all) {  // MSIE
        var iframeElement = document.all[iframeWindow.name];
	   } else {  // Opera
   	  var iframeElement = document.getElementById(iframeWindow.name);
	   }
    if (iframeWindow.document.compatMode && iframeWindow.document.compatMode != 'BackCompat') { // MSIE 8 et Opera 9
        iframeElement.style.height= iframeWindow.document.body.scrollHeight + 'px';
        //iframeElement.style.width= iframeWindow.document.body.scrollWidth + 'px';
    }
  }
  
}
