function getIFrameDocument(iframe) {
    var oDoc = iframe.contentWindow || iframe.contentDocument;
    if (oDoc.document) oDoc = oDoc.document;
	return oDoc;
} //function getIFrameDocument

function setIFramesHeight() {
	var doc;
	var frms;
	var i;
	frms=document.getElementsByTagName('iFrame');
	for (i=0;i<frms.length;i++) {
		doc=getIFrameDocument(frms[i]);
		var docHt = 0, sh, oh;
		if (doc.height)
			docHt = doc.height;
		else if (doc.body) {
			if (doc.body.scrollHeight)
				docHt = sh = doc.body.scrollHeight;
			if (doc.body.offsetHeight)
				docHt = oh = doc.body.offsetHeight;
				if (sh && oh)
				docHt = Math.max(sh, oh);
		}
		frms[i].style.height = docHt + 50 + "px";
	}
} //function setIFramesHeight

function loadDocument() {
	setIFramesHeight();
} //function loadDocument
