function getIframeHeight(frameId) {
    var iframe = document.getElementById(frameId);
    try {
        if (iframe.contentDocument) {
            var bHeight = iframe.contentDocument.body.scrollHeight;
            var dHeight = iframe.contentDocument.documentElement.scrollHeight;
            var minHeight = Math.min(bHeight, dHeight);
            iframe.height = minHeight;
//            alert("ffbHeight:" + bHeight + ";dHeight:" + dHeight + ";minHeight:" + minHeight);
            bHeight = iframe.contentDocument.body.scrollHeight;
            dHeight = iframe.contentDocument.documentElement.scrollHeight;
            var height = Math.max(bHeight, dHeight);
//            alert("ffbHeight:" + bHeight + ";dHeight:" + dHeight + ";height:" + height);
            return height;
        } else if (iframe.contentWindow.document)
        {
            var bHeight = iframe.contentWindow.document.body.scrollHeight;
            var dHeight = iframe.contentWindow.document.documentElement.scrollHeight;
            var height = Math.max(bHeight, dHeight);
//            alert("iebHeight:" + bHeight + ";dHeight:" + dHeight + ";height:" + height);
            return height;
        } else
        {
//            alert("e!");
            return "600px";
        }
    } catch (ex) {
        return "600px";
    }
}