function autoIframe(frameId){ try{ frame = document.getElementById(frameId); innerDoc = (frame.contentDocument) ? frame.contentDocument : frame.contentWindow.document; if (innerDoc == null){ // Google Chrome frame.height = document.all[frameId].clientHeight + document.all[frameId].offsetHeight + document.all[frameId].offsetTop; } else{ objToResize = (frame.style) ? frame.style : frame; objToResize.height = innerDoc.body.scrollHeight + 18; } } catch(err){ alert('Err: ' + err.message); window.status = err.message; } }