var redim = 0;
var lastSize = 0;

redim = setInterval ( "redimFunction()", 1000 );

var nav = navigator.userAgent;
var ischrome = nav.indexOf("Chrome") ? true : false;
var issafari = nav.indexOf("Safari") ? true : false;
var addheight = (ischrome ||issafari ) ? 40 : 0; 

function redimFunction ( )
{
    try
    {
        var oIframe = window.top.document.getElementById("iframe");
        
        if (oIframe!=null)
        {
            var innerDoc = (oIframe.contentDocument) ? oIframe.contentDocument : oIframe.contentWindow.document;
	        var iframeHeight = (document.all ) ? innerDoc.body.scrollHeight :  innerDoc.height + 40;// ou innerDoc.body.offsetHeight+30;//innerDoc.body.clientHeight;	
	        //alert(iframeHeight+ " , " + lastSize);
	        if (iframeHeight!=lastSize + addheight )
	        {
                window.parent.iframeIsReady();
                // alert("redim : "+iframeHeight+ " , " + lastSize);
                // document.body.appendChild(document.createTextNode("passage dans redimensionnement_auto.js  "));
                lastSize=iframeHeight;
            }
        }
    }
    catch(e)
    {
        //alert("erreur : " + e.message);
    }
}
