(function(){ var adid = 'mf-GdJiSy'; document.write('
'); function mf_GdJiSy(){ var d = document.getElementById(adid); var v = ''; var conf = { bottomOffset: 100, width: 320, height: null, limit: 100 }; conf.height = 50; d.innerHTML = v; d.style.zIndex = 0x7FFFFFFF; d.style.position = 'absolute'; d.style.width = '100%'; d.style.textAlign = 'left'; d.style.visibility = 'visible'; d.style.position = 'fixed'; d.style.verticalAlign= 'bottom'; d.style.bottom = 0; d.style.left = 0; d.style.right = 0; var wrap = document.getElementById(adid); var inner = wrap.getElementsByTagName('iframe')[0]; var inner_contents = '
'; inner.contentDocument.open(); inner.contentDocument.write(inner_contents); inner.contentDocument.close(); function ad_scroll(){ var zoom = window.innerWidth / conf.width; var height = Math.round(conf.height * zoom * 100) / 100, width = Math.round(conf.width * zoom * 100) / 100; var _window = { height: document.body.offsetHeight, top: window.pageYOffset, left: window.pageXOffset }; _window.bottom = _window.top + window.innerHeight; _window.right = _window.left + window.innerWidth; inner.height = height; inner.width = width; var bottom = document.body.scrollHeight - conf.bottomOffset; if (bottom <= _window.bottom && _window.top != 0){ wrap.style.top = "0px"; wrap.style.bottom = null; } else { if (wrap.style.top == "0px" || wrap.style.top && before_top > _window.top) { wrap.style.top = (window.innerHeight - height) + "px"; } wrap.style.bottom = "0px"; before_top = _window.top; if (before_top <= 0) { before_top = 0; wrap.style.top = null; } } if (window.innerWidth > conf.width) { wrap.style.left = (window.innerWidth - conf.width) / 2; } else { wrap.style.left = _window.left + 'px'; } wrap.style.right = (_window.left + width) + 'px'; } setTimeout(ad_scroll, 200); } setTimeout(mf_GdJiSy, 1); })();