

  var dec = (typeof decodeURIComponent == 'function') ? decodeURIComponent : decode;
  function resize_ifrm() {
    var ifrm = document.getElementById('ifrm');
    if(window.frames['ifrm'] && window.frames['ifrm'].document) {
      window.frames['ifrm'].window.scroll(0,0);
      var body = window.frames['ifrm'].document.body;
      if(body) {
        ifrm.style.height = (body.scrollHeight || body.offsetHeight) + 'px';
      }
    }
  }
  src_checked = false;
  function check_src() {
    if(src_checked) return;
    src_checked = true;
    var ifrm = document.getElementById('ifrm');
    var urlPos = location.search.indexOf("iframeUrl=");
    if(urlPos > -1) {
      var src = dec(location.search.substring(urlPos+10));
    } else {
      var src = URL;
    }
    if(src != ifrm.src) ifrm.src = src;
  }