function ga_Kontakter2827(icon,position,text){ var gaelemkon = document.createElement('div'); if(position == 'bottom-left') { gaelemkon.style.bottom = '20px'; gaelemkon.style.left = '20px'; } if(position == 'bottom-right') { gaelemkon.style.bottom = '20px'; gaelemkon.style.right = '20px'; } if(position == 'top-left') { gaelemkon.style.top = '20px'; gaelemkon.style.left = '20px'; } if(position == 'top-right') { gaelemkon.style.top = '20px'; gaelemkon.style.right = '20px'; } gaelemkon.style.position = 'fixed'; gaelemkon.style.width = '64px'; gaelemkon.style.height = '64px'; gaelemkon.style.zIndex = '999999'; gaelemkon.style.cursor = 'pointer'; gaelemkon.style.backgroundImage = "url('https://v2.getall.pl/assets/images/kontakter/"+icon+".png')"; gaelemkon.innerHTML=""; document.body.appendChild(gaelemkon); var gaelemkon2 = document.createElement('div'); if(position == 'bottom-left') { gaelemkon2.style.bottom = '34px'; gaelemkon2.style.left = '90px'; } if(position == 'bottom-right') { gaelemkon2.style.bottom = '34px'; gaelemkon2.style.right = '90px'; } if(position == 'top-left') { gaelemkon2.style.top = '34px'; gaelemkon2.style.left = '90px'; } if(position == 'top-right') { gaelemkon2.style.top = '34px'; gaelemkon2.style.right = '90px'; } gaelemkon2.style.position = 'fixed'; gaelemkon2.style.padding = '10px'; gaelemkon2.style.fontSize = '13px'; gaelemkon2.style.borderRadius = '20px'; gaelemkon2.style.fontFamily = 'tahoma'; gaelemkon2.style.zIndex = '999999'; gaelemkon2.style.cursor = 'pointer'; gaelemkon2.style.backgroundColor = "#FFF"; gaelemkon2.style.border = "1px solid #000"; gaelemkon2.style.borderColor = "#000"; gaelemkon2.innerHTML = text; gaelemkon.onclick = function() { ga_ShowPopup2827(null, null, null, true); }; gaelemkon2.onclick = function() { ga_ShowPopup2827(null, null, null, true); }; document.body.appendChild(gaelemkon); document.body.appendChild(gaelemkon2); } var ga_ele_2827 = "ga-popup-id-2827"; function ga_addEvent(obj, evt, fn) { if (obj.addEventListener) { obj.addEventListener(evt, fn, false); } else if (obj.attachEvent) { obj.attachEvent("on" + evt, fn); } } var filled_email; var act; function ga_submit_2827(){ var error = false; var x = document.getElementById('ga_form_2827').getElementsByClassName("ga-required-field"); var i; for (i = 0; i < x.length; i++) { if(x[i].value == '') { x[i].style.border = "2px solid #E00000"; x[i].focus(); error = true; } } if(error == true) return false; else { ga_setCookie("ga_pop_unblock_2827", "1", 365); ga_setCookie("ga_conv_2827", "1", 365); act = document.getElementById("ga_form_2827").action; var xhttp = new XMLHttpRequest(); xhttp.open("POST", "https://v2.getall.pl/modules/popup/ajax.php", true); xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xhttp.onreadystatechange = function() { if (xhttp.readyState == 4 && xhttp.status == 200) { var ga_hi = document.getElementById("ga-blur-2827"); if ((typeof(ga_hi) != 'undefined') && (ga_hi != null)) { alert("Treść zostanie odkryta po potwierdzeniu Twojego adresu e-mail"); var zxc = document.getElementsByClassName("ga-required-field"); var i; for (i = 0; i < zxc.length; i++) { if((zxc[i].name == 'email')&&(zxc[i].value)) window.filled_email = zxc[i].value; } for (i = 0; i < zxc.length; i++) { if((zxc[i].name == 'email')&&(zxc[i].value)) { setInterval(function(){ var xhttp2 = new XMLHttpRequest(); xhttp2.open("POST", "https://v2.getall.pl/modules/popup/block_check.php", true); xhttp2.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xhttp2.onreadystatechange = function() { if (xhttp2.readyState == 4 && xhttp2.status == 200) { console.log(xhttp2.responseText); if(xhttp2.responseText == '1') { ga_hi.className = ""; ga_setCookie("ga_pop_unlock2_2827", "1", 365); } } } xhttp2.send("action=check&listaid="+window.act+"&email="+window.filled_email); }, 3000); } } } var ga_e = document.getElementById("ga_ele_2827"); var ga_e2 = document.getElementById("ga-popup-id-2827"); if ((typeof(ga_e2) != 'undefined') && (ga_e2 != null)) { } if ((typeof(ga_e) != 'undefined') && (ga_e != null)) { var element = document.getElementById("ga_ele_2827"); element.outerHTML = ""; delete element; } if ((typeof(ga_e2) != 'undefined') && (ga_e2 != null)) { var element = document.getElementById("ga-popup-id-2827"); element.outerHTML = ""; delete element; } if ((typeof(ga_hi) != 'undefined') && (ga_hi != null)) { //ga_hi.className = ""; } var ga_overlay = document.getElementById("ga-overlay"); if ((typeof(ga_overlay) != 'undefined') && (ga_overlay != null)) { var element = document.getElementById("ga-overlay"); element.outerHTML = ""; delete element; } } }; xhttp.send("action=conv&id=2827"); //document.getElementById('ga-close-x-2827').click(); } } function ga_setCookie(cname, cvalue, exdays) { var d = new Date(); d.setTime(d.getTime() + (exdays*24*60*60*1000)); var expires = "expires="+d.toUTCString(); document.cookie = cname + "=" + cvalue + "; " + expires + "; path=/"; } function ga_getCookie(cname) { var name = cname + "="; var ca = document.cookie.split(';'); for(var i=0; i -1) { elems[i].src = elems[i].src + "&autoplay=1"; } } } function ga_ShowPopup2827(razy, dni, lag, fixed = false){ var pokaz = 1; var t_razy = razy; var t_dni = dni; if(lag > 0) { setTimeout( function(){ ga_ShowPopup2827(t_razy, t_dni); } , lag*1000 ); return true; } if (razy>0) if (dni>0) { if(ga_getCookie("ga_pop_2827") == '') ga_setCookie("ga_pop_2827", 0, dni); if(ga_getCookie("ga_pop_2827") > razy) { pokaz = 0; } if(ga_getCookie("ga_pop_2827") <= razy) { var x = ga_getCookie("ga_pop_2827"); if(x==0) x = 1; x = parseInt(x) + 1; ga_setCookie("ga_pop_2827", x , dni); pokaz = 1; } if(ga_getCookie("ga_pop_2827") == '') { pokaz = 1; ga_setCookie("ga_pop_2827", "1", dni); } } if(pokaz == 1) { var ga_element = document.getElementById(ga_ele_2827); if (typeof(ga_element) != 'undefined' && ga_element != null) { var element = ga_element; element.outerHTML = ""; delete element; } //document.body.innerHTML += "
X
" ; var gaelemDiv = document.createElement('div'); gaelemDiv.innerHTML = "
X
"; document.body.appendChild(gaelemDiv); var ga_element = document.getElementById(ga_ele_2827); if(fixed) ga_element.style.position = 'fixed'; if (typeof(ga_element) != 'undefined' && ga_element != null) { if(window.innerWidth < 767 ) { document.getElementById(ga_ele_2827).className = "ga-popup-mobile"; } var xhttp = new XMLHttpRequest(); xhttp.open("POST", "https://v2.getall.pl/modules/popup/ajax.php", true); xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xhttp.onreadystatechange = function() { if (xhttp.readyState == 4 && xhttp.status == 200) { } }; xhttp.send("action=show&id=2827"); } ga_add_autoplay(); } } function ga_BlockPopup2827(){ if(ga_getCookie("ga_pop_unblock_2827") == '') { ga_ShowPopup2827(); document.getElementById("ga-close-x-2827").innerHTML=""; document.write("
"); } } function ga_ContentLock2827(){ if (window.location.search.indexOf("gm_t") !=-1) var gm_t = decodeURIComponent(window.location.search.match(/(\?|&)gm_t\=([^&]*)/)[2]); if (typeof(gm_t) == 'undefined' || gm_t == null) if (ga_getCookie("ga_pop_unlock2_2827") == '') { var ga_element = document.getElementById(ga_ele_2827); if (typeof(ga_element) != 'undefined' && ga_element != null) { var element = ga_element; element.outerHTML = ""; delete element; } var blur = ""; document.write(blur + "
X


"); var ga_element = document.getElementById(ga_ele_2827); ga_element.style.position = 'static'; ga_element.style.top = '0px'; ga_element.style.top = '0px'; ga_element.style.left = '0px'; ga_element.style.marginLeft = '0px'; ga_element.style.width = '100%'; ga_element.style.zIndex = 'initial'; document.getElementById("ga-close-x-2827").innerHTML=""; if (typeof(ga_element) != 'undefined' && ga_element != null) { if(window.innerWidth < 767 ) { document.getElementById(ga_ele_2827).className = "ga-popup-mobile"; } var xhttp = new XMLHttpRequest(); xhttp.open("POST", "https://v2.getall.pl/modules/popup/ajax.php", true); xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xhttp.onreadystatechange = function() { if (xhttp.readyState == 4 && xhttp.status == 200) { } }; xhttp.send("action=show&id=2827"); } ga_add_autoplay(); } } function ga_Widget2827(){ var ga_element = document.getElementById(ga_ele_2827); if (typeof(ga_element) != 'undefined' && ga_element != null) { var element = ga_element; element.outerHTML = ""; delete element; } document.write("
X
"); var ga_element = document.getElementById(ga_ele_2827); ga_element.style.position = 'static'; ga_element.style.top = '0px'; ga_element.style.top = '0px'; ga_element.style.left = '0px'; ga_element.style.marginLeft = '0px'; ga_element.style.width = '90%'; ga_element.style.zIndex = 'initial'; document.getElementById("ga-close-x-2827").innerHTML=""; if (typeof(ga_element) != 'undefined' && ga_element != null) { if(window.innerWidth < 767 ) { document.getElementById(ga_ele_2827).className = "ga-popup-mobile"; } var xhttp = new XMLHttpRequest(); xhttp.open("POST", "https://v2.getall.pl/modules/popup/ajax.php", true); xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xhttp.onreadystatechange = function() { if (xhttp.readyState == 4 && xhttp.status == 200) { } }; xhttp.send("action=show&id=2827"); } ga_add_autoplay(); } var $ga_exit_showed = 0; var ga_count = 0; function ga_ExitPopup2827(razy, dni){ ga_addEvent(window,"load",function(e) { ga_addEvent(document, "mouseout", function(e) { e = e ? e : window.event; var from = e.relatedTarget || e.toElement; if(e.pageY < window.pageYOffset+10) if (!from || from.nodeName == "HTML") { if(($ga_exit_showed == 0)&&(ga_count>7)&&(ga_getCookie("ga_conv_2827") != "1")) { window.scrollTo(0, 0); ga_ShowPopup2827(razy, dni); $ga_exit_showed = 1; } } }); }); } function ga_startTime() { ga_count = ga_count + 1; if(ga_count<=7) t = setTimeout(function(){ ga_startTime() }, 1000); } ga_startTime(); ga_addEvent(window,"load",function(e) { var els = document.querySelectorAll("a[href*='#popup-2827']"); for (var i = 0, l = els.length; i < l; i++) { els[i].addEventListener("click", function(){ ga_ShowPopup2827(); }); } });