/**
 * @author dcodron
 */
function adjustIFrameSize (iframeWindow) {
console.log("entrée code");
  if (iframeWindow.document.height) {
console.log("entrée étape 1 : iframeWindow.document.height=" + iframeWindow.document.height);
    var iframeElement = document.getElementById(iframeWindow.name);
  
   iframeElement.style.width = '572px';
   
    if(iframeWindow.document.height < iframeWindow.document.documentElement.scrollHeight )
        {  	
        console.log("entrée étape 1.2 : iframeWindow.document.documentElement.scrollHeight+ 5=" + iframeWindow.document.documentElement.scrollHeight +'px');
         iframeElement.style.height  =iframeWindow.document.documentElement.scrollHeight+ 5 +'px';
		 document.getElementById('divDrte').style .height =iframeWindow.document.documentElement.scrollHeight+ 5 +'px';
     		document.getElementById('divGche').style .height =iframeWindow.document.documentElement.scrollHeight+ 5 +'px';
			
        }
		else{ 
		      console.log("entrée étape 1.3 : iframeWindow.document.height + 'px'=" + iframeWindow.document.height + 'px');
		iframeElement.style.height = iframeWindow.document.height + 'px';
    document.getElementById('divDrte').style .height =iframeWindow.document.height + 'px';
     document.getElementById('divGche').style .height =iframeWindow.document.height + 'px';
    
   // iframeElement.style.width = iframeWindow.document.width + 'px';
document.getElementById('bottom').style.marginTop = iframeWindow.document.height + 'px';
    }
  }
  
  else if (document.all) {
console.log("entrée étape 2 : document.all");
    var iframeElement = document.all[iframeWindow.name];
    if (iframeWindow.document.compatMode &&
        iframeWindow.document.compatMode != 'BackCompat') 
    {
    console.log("entrée étape 2.2 : iframeWindow.document.documentElement.scrollHeight + 5 =" + iframeWindow.document.documentElement.scrollHeight  + 'px');
      iframeElement.style.height = 
iframeWindow.document.documentElement.scrollHeight + 5 + 'px';
 document.getElementById('divDrte').style .height =iframeWindow.document.documentElement.scrollHeight + 5 + 'px';
  document.getElementById('divGche').style .height =iframeWindow.document.documentElement.scrollHeight + 5 + 'px';

     // iframeElement.style.width = 
//iframeWindow.document.documentElement.scrollWidth + 5 + 'px';

iframeElement.style.width = '570px';
    }
    else {
console.log("entrée étape 2.3 : iframeWindow.document.body.scrollHeight + 5 + 'px'=" +iframeWindow.document.body.scrollHeight + 'px');
      iframeElement.style.height = 
iframeWindow.document.body.scrollHeight + 5 + 'px';
document.getElementById('divDrte').style .height =iframeWindow.document.body.scrollHeight + 5 + 'px';
document.getElementById('divGche').style .height =iframeWindow.document.body.scrollHeight + 5 + 'px';

     // iframeElement.style.width = 
//iframeWindow.document.body.scrollWidth + 5 + 'px';

iframeElement.style.width = '570px';
    }
  }
 else{  
  console.log("entrée étape 3 : iframeWindow.document.documentElement.scrollHeight+ 5 +'px'=" + iframeWindow.document.documentElement.scrollHeight +'px');

  	document.getElementById('iframeName').style .height =iframeWindow.document.documentElement.scrollHeight+ 5 +'px';
    document.getElementById('divDrte').style .height =iframeWindow.document.documentElement.scrollHeight+ 5 +'px';
     document.getElementById('divGche').style .height =iframeWindow.document.documentElement.scrollHeight+ 5 +'px';
     document.getElementById('iframeName').style.width = '570px';
     document.getElementById('bottom').style.marginTop  = iframeWindow.document.documentElement.scrollHeight+ 5 +'px';
     }
     
    
  
 console.log("sortie");
  
}

function adjustIFrameSize2 (iframeWindow) {
console.log("entrée code");
  if (iframeWindow.document.height) {
console.log("entrée étape 1 : iframeWindow.document.height=" + iframeWindow.document.height);
    var iframeElement = document.getElementById(iframeWindow.name);
  
//   iframeElement.style.width = '660px';
   
    if(iframeWindow.document.height < iframeWindow.document.documentElement.scrollHeight )
        {  	
        console.log("entrée étape 1.2 : iframeWindow.document.documentElement.scrollHeight+ 5=" + iframeWindow.document.documentElement.scrollHeight +'px');
         iframeElement.style.height  =iframeWindow.document.documentElement.scrollHeight+ 5 +'px';
		 document.getElementById('divDrte').style .height =iframeWindow.document.documentElement.scrollHeight+ 5 +'px';
     		document.getElementById('divGche').style .height =iframeWindow.document.documentElement.scrollHeight+ 5 +'px';
			
        }
		else{ 
		      console.log("entrée étape 1.3 : iframeWindow.document.height + 'px'=" + iframeWindow.document.height + 'px');
		iframeElement.style.height = iframeWindow.document.height + 'px';
    document.getElementById('divDrte').style .height =iframeWindow.document.height + 'px';
     document.getElementById('divGche').style .height =iframeWindow.document.height + 'px';
    
   // iframeElement.style.width = iframeWindow.document.width + 'px';
document.getElementById('bottom').style.marginTop = iframeWindow.document.height + 'px';
    }
  }
  
  else if (document.all) {
console.log("entrée étape 2 : document.all");
    var iframeElement = document.all[iframeWindow.name];
    if (iframeWindow.document.compatMode &&
        iframeWindow.document.compatMode != 'BackCompat') 
    {
    console.log("entrée étape 2.2 : iframeWindow.document.documentElement.scrollHeight + 5 =" + iframeWindow.document.documentElement.scrollHeight  + 'px');
      iframeElement.style.height = 
iframeWindow.document.documentElement.scrollHeight + 5 + 'px';
 document.getElementById('divDrte').style .height =iframeWindow.document.documentElement.scrollHeight + 5 + 'px';
  document.getElementById('divGche').style .height =iframeWindow.document.documentElement.scrollHeight + 5 + 'px';

     // iframeElement.style.width = 
//iframeWindow.document.documentElement.scrollWidth + 5 + 'px';

//iframeElement.style.width = '570px';
    }
    else {
console.log("entrée étape 2.3 : iframeWindow.document.body.scrollHeight + 5 + 'px'=" +iframeWindow.document.body.scrollHeight + 'px');
      iframeElement.style.height = 
iframeWindow.document.body.scrollHeight + 5 + 'px';
document.getElementById('divDrte').style .height =iframeWindow.document.body.scrollHeight + 5 + 'px';
document.getElementById('divGche').style .height =iframeWindow.document.body.scrollHeight + 5 + 'px';

     // iframeElement.style.width = 
//iframeWindow.document.body.scrollWidth + 5 + 'px';

   //iframeElement.style.width = '660px';

    }
  }
 else{  
  console.log("entrée étape 3 : iframeWindow.document.documentElement.scrollHeight+ 5 +'px'=" + iframeWindow.document.documentElement.scrollHeight +'px');

  	document.getElementById('iframeName').style .height =iframeWindow.document.documentElement.scrollHeight+ 5 +'px';
    document.getElementById('divDrte').style .height =iframeWindow.document.documentElement.scrollHeight+ 5 +'px';
     document.getElementById('divGche').style .height =iframeWindow.document.documentElement.scrollHeight+ 5 +'px';
        //iframeElement.style.width = '660px';

     document.getElementById('bottom').style.marginTop  = iframeWindow.document.documentElement.scrollHeight+ 5 +'px';
     }
     
    
  
 console.log("sortie");
  
}²