document.addEventListener("DOMContentLoaded", function() { var script = document.getElementById('widc9f0f895fb98ab9159f51fd0297e236d'); var par = script.parentNode; script.parentNode.style.overflow = 'hidden'; var iframe = document.createElement('iframe'); iframe.src = 'https://account4049.edpro.biz/widget/html' + "?" + window.location.search.substring(1) + "&id=8" + "&ref=" + encodeURIComponent(document.referrer) + "&loc=" + encodeURIComponent(document.location.href); iframe.style.width = '100%'; iframe.style.height = '0px'; iframe.style.border = 'none'; iframe.style.overflow = 'hidden'; iframe.className = '170'; iframe.id = '8563621cd2f9e9e4babf38b8963d289126be1c32' + '_' + iframe.className; // name можно получить изнутри iframe iframe.name = iframe.className; var iframeId = iframe.id; var gcEmbedOnMessage = function(e) { var insertedIframe = document.getElementById(iframeId); if (!insertedIframe) { return; } if (e.data.uniqName == 'widc9f0f895fb98ab9159f51fd0297e236d') { if (e.data.height) { if (e.data.iframeName) { if (e.data.iframeName == iframe.name) { par.style.height = ( e.data.height ) + "px"; insertedIframe.style.height = (e.data.height) + "px"; } } else { par.style.height = ( e.data.height ) + "px"; insertedIframe.style.height = (e.data.height) + "px"; } } } }; if (window.addEventListener) { window.addEventListener("message", gcEmbedOnMessage, false); } else if (window.attachEvent) { window.attachEvent('onmessage', gcEmbedOnMessage) } else { window['onmessage'] = gcEmbedOnMessage } script.parentNode.insertBefore(iframe, script); par.removeChild( script ) }); var getLocation = function(href) { var l = document.createElement("a"); l.href = href; return l; }; var currentScript = document.currentScript || (function() { var scripts = document.getElementsByTagName('script'); return scripts[scripts.length - 1]; })(); var domain = ( (getLocation( currentScript.src )).hostname );