var cached_width;
var cached_height;

        function adjustIFrameSize (iframeWindow, zoomout) {
            if (zoomout) {
                var iframeElement = parent.document.getElementById('frm1');
                if (zoomout=='local') {
                    iframeElement.style.height = cached_height;
                    iframeElement.style.width = cached_width;
                } else {
                    iframeElement.style.height = '1px';
                    iframeElement.style.width = '1px';
                }
                return;
            }

          if (iframeWindow.document.height) {
            var iframeElement = parent.document.getElementById('frm1');
            iframeElement.style.height = iframeWindow.document.height + 'px';
            iframeElement.style.width = iframeWindow.document.width + 'px';
          }
          else if (document.all) {
             var iframeElement = parent.document.getElementById('frm1');
            if (iframeWindow.document.compatMode &&
                iframeWindow.document.compatMode != 'BackCompat')
            {
              iframeElement.style.height =
                iframeWindow.document.documentElement.scrollHeight + 0 + 'px';
              iframeElement.style.width =
                iframeWindow.document.documentElement.scrollWidth + 0 + 'px';
            }
            else {
              iframeElement.style.height = iframeWindow.document.body.scrollHeight + 0 +  'px';
              iframeElement.style.width = iframeWindow.document.body.scrollWidth + 0 + 'px';
            }
          }
            if (!cached_height) {
                var iframeElement = parent.document.getElementById('frm1');
                cached_height = iframeElement.style.height;
                cached_width = iframeElement.style.width;
            }

        }
        
        