// JavaScript Document
function resizeIFrame2(iframeWindow, elementName) {
	if(navigator.appName == "Netscape") {
		// If it is a Mozilla-based engine, use the element name to find the IFRAME
		var iframeElement = parent.document.getElementsByName(elementName)[0];

		// Set the IFRAME height to the height of the calling document.
		// This should work because the function is being called in the
		// document's body onLoad.
		iframeElement.style.height = (iframeWindow.document.height + 5) + 'px';
	} else {
		if(iframeWindow.document.height) {
			// If the document has a valid height then it should be a valid object;
			// get its name (ID).
			var iframeElement = parent.document.getElementById(iframeWindow.name);

			// In theory, this works just like when it's called for Mozilla
			iframeElement.style.height = (iframeWindow.document.height + 5) + 'px';	
		} else if (document.all) {
			// This is a kludge for older browsers to be able to locate the IFRAME
			// to set the height of it.  This portion of the code works in theory.
			var iframeElement = parent.document.all[iframeWindow.name];
			if (iframeWindow.document.compatMode && iframeWindow.document.compatMode != 'BackCompat') {
				iframeElement.style.height = (iframeWindow.document.documentElement.scrollHeight + 5) + 'px';
			} else {
				iframeElement.style.height = (iframeWindow.document.body.scrollHeight + 5) + 'px';
			}
		}
	}
}

function resizeIFrame(iframeWindow,filler) {
  if (iframeWindow.document.height) {
    var iframeElement = parent.document.getElementById(iframeWindow.name);
    iframeElement.style.height = iframeWindow.document.height + 'px';
  }
  else if (document.all) {
    var iframeElement = parent.document.all[iframeWindow.name];
    if (iframeWindow.document.compatMode && iframeWindow.document.compatMode != 'BackCompat') 
    {
      iframeElement.style.height = iframeWindow.document.documentElement.scrollHeight + 5 + 'px';
    }
    else {
      iframeElement.style.height = iframeWindow.document.body.scrollHeight + 5 + 'px';
    }
  }
}
<!-- 

 -->