function resizeThisFrame() { var iframe = document.getElementById( 'resizeiframe' ); /* var useIEVer = false; if (navigator.appName == 'Microsoft Internet Explorer') { if (getInternetExplorerVersion() < 8.0) { useIEVer = true; } } if (useIEVer) { */ if (navigator.appName == 'Microsoft Internet Explorer') { var height = document.body.scrollHeight; } else { var height = document.body.offsetHeight + 10; } //alert(document.height+" "+document.body.scrollHeight+" "+document.body.clientHeight+" "+document.body.offsetHeight+" scroll"); // var height = document.body.scrollHeight; iframe.src = 'http://www.walesrallygb.com/media/ynil-iframe-resize.html?height='+height; //alert(height); } function getDocHeight() { var D = document; return Math.max( Math.max(D.body.scrollHeight, D.documentElement.scrollHeight), Math.max(D.body.offsetHeight, D.documentElement.offsetHeight), Math.max(D.body.clientHeight, D.documentElement.clientHeight) ); } function getInternetExplorerVersion() // Returns the version of Internet Explorer or a -1 // (indicating the use of another browser). { var rv = -1; // Return value assumes failure. if (navigator.appName == 'Microsoft Internet Explorer') { var ua = navigator.userAgent; var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})"); if (re.exec(ua) != null) rv = parseFloat( RegExp.$1 ); } return rv; }