function fnDynamicIFrameHeight(oIFrame, iHeightToAdd) {
	try {
		var innerDoc = (oIFrame.contentDocument) ? oIFrame.contentDocument : oIFrame.contentWindow.document
		if (innerDoc.body.offsetHeight) { //NS6
			oIFrame.height = innerDoc.body.offsetHeight + iHeightToAdd
		} else if (oIFrame.Document && oIFrame.Document.body.scrollHeight) { //IE5+
			oIFrame.height = oIFrame.Document.body.scrollHeight + iHeightToAdd
		} else if (window.opera) { // Opera
			oIFrame.height = oIFrame.document.body.scrollHeight + iHeightToAdd
		}
	}
	catch(err) {
		alert(err.message);
    }
}
