str = `
`; document.addEventListener("DOMContentLoaded", function() { var child = document.createElement('div'); child.innerHTML = str; document.getElementsByTagName('body')[0].appendChild(child); adsbottomLayer = document.getElementById('adsfl'); adsbottomLayer.style.zIndex = 999999; iframe = document.getElementsByTagName('iframe'); var adsIntervalId = 0; var adsmaxHeight = 100; var adsminHeight = 20; var adsminHeight1 = 15; var adscurHeight = 150; setTimeout(function(){ $(".items-slide").css("margin-top","120px"); },1500); if(window.innerWidth>768){ setTimeout(function(){ adsbottomLayer.style.zIndex = 9; $("#adsfl").height(window.innerWidth*141/1920); $(".theIframe").height(window.innerWidth*125/1920); $("#adsfl").css("top",$(".header").height()+$(".main-nav").height()); },1500); } else { setTimeout(function(){ $("#adsfl").height(window.innerWidth*158/414); $(".theIframe").height(window.innerWidth*145/414); if($("#tr-menu-fix2").text().trim()) { $("#adsfl").css("top",60); } },500); } }); document.addEventListener("scroll", function() { if(window.innerWidth>768){ if($(window).scrollTop() <= $(".header").height()+$(".main-nav").height()){ $("#adsfl").css("top",$(".header").height()+$(".main-nav").height()); } else { if($("#tr-menu-fix2").text().trim()) $("#adsfl").css("top",$("#tr-menu-fix2").height()+10); else if($("#tr-menu-fix").text().trim()) $("#adsfl").css("top",$(".header").height()+$(".main-nav").height()-50); else $("#adsfl").css("top",0); } } else { if($(window).scrollTop() <= $(".header").height()+$(".main-nav").height()){ $("#adsfl").css("top",0); } else { if($("#tr-menu-fix2").text().trim()) $("#adsfl").css("top",55); else $("#adsfl").css("top",0); } } }); function adsshow( ){ adscurHeight += 2; if (adscurHeight > adsmaxHeight){ clearInterval ( adsIntervalId ); } adsbottomLayer.style.height = adscurHeight+'px'; } function adshide( ){ adscurHeight -= 3; if (adscurHeight < adsminHeight){ clearInterval ( adsIntervalId ); } adsbottomLayer.style.height = adscurHeight+'px'; } function adsclickhide(){ document.getElementById('adshide').style.display='none'; document.getElementById('adsshow').style.display='inline'; adsIntervalId = setInterval ( 'adshide()', 5 ); } function adsclickshow(){ document.getElementById('adshide').style.display='inline'; document.getElementById('adsshow').style.display='none'; adsIntervalId = setInterval ( 'adsshow()', 5 ); } function adsclickclose(){ document.body.style.marginBottom = '0px'; adsbottomLayer.style.display = 'none'; iframeInfo = document.querySelector(".iframeInfo"); if(iframeInfo) iframeInfo.style.marginTop = 0; $(".items-slide").css("margin-top","0px"); }