if (!gwpstyle) { var gwpstyle = document.createElement('style'); gwpstyle.textContent = ' .gwp-div { clear: both; position:relative; } .sm-gwp-img-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0px; width: 100%; overflow-y: auto; max-height:340px; } .gwp-opt { box-sizing: border-box; text-align: center; border:2px solid transparent; padding:1px; margin:0px; border-radius:7px; overflow-x:hidden; position: relative; } .gwp-opt:hover { border-top:0px solid #EEEEEE; padding:1px; } .gwp-opt:hover .gwp-opt-name { padding-top:2px; } .gwp-opt-sel:hover .gwp-opt-name { padding-top: 0px; } .gwp-opt-sel { border:2px solid #777777 !important; padding:1px; } .gwp-opt-sel:hover { padding:1px; } .gwp-opt-name { text-align: center; width: 100%; } .gwp-opt-title { min-height: 1em; padding: 11px 0px; } .gwp-opt-prev { position:relative; width: 100%; } .gwp-opt-prev div { position:absolute; left:-505px; width:500px; display:none; z-index:1000; border:1px solid #bcbcbc; background-color:#FFFFFF; box-shadow:3px 3px 6px #AAAAAA; } .gwp-opt img { cursor:pointer; border-radius:7px; } .gwp-opt-more { position:relative; cursor:pointer; border-radius:7px; border:1px solid #888888; color:#888888; padding-top:100%; } .gwp-opt-more div { font-size:14px; text-align:center; line-height:12px; position:absolute; top:50%; left:0px; width:100%; margin-top:-0.5em; } .gwp-opt-prev-title { display: block; text-align: center; }'; document.head.appendChild(gwpstyle); } gwpNo = {1060: "3", 1061: "4", 71: "1", 72: "1", 73: "1", 74: "1", 76: "1", 77: "1", 78: "1", 79: "1", 80: "1", 81: "1", 82: "1", 83: "1", 85: "1", 87: "1", 88: "1", 89: "1", 90: "1", 91: "1", 93: "1", 94: "1", 96: "1", 97: "1", 103: "1", 105: "1", 106: "1", 112: "1", 114: "1", 116: "1", 117: "1", 118: "1", 119: "1", 120: "1", 123: "1", 128: "1", 129: "1", 130: "1", 138: "1", 141: "1", 468: "1", 4175: "2", 4176: "2", 4185: "1", 4189: "1", 4188: "1", 4187: "1", 4186: "1", 4190: "1", 4201: "1", 3778: "1", 4197: "1", 4198: "1", 4199: "1", 4200: "1", 4178: "1", 4177: "1", 4173: "1", 4172: "1", 4174: "1", 4179: "1", 4192: "1", 4193: "1", 4194: "1", 4195: "1", 4191: "1", 4196: "1", 4181: "1", 4182: "1", 4183: "1", 4184: "1", 4180: "1", 927: "2", 930: "2", 931: "2", 1022: "2", 2746: "1", 933: "2", 953: "2", 928: "1", 932: "1", 954: "1", 955: "1", 956: "1", 958: "1", 959: "1", 960: "1", 961: "1", 962: "1", 1948: "1", 1034: "1", 963: "", 964: "", 4724: "1", 4725: "1", 4726: "1", 4727: "1", 4728: "1", 4729: "1", 4730: "1", 4732: "1", 4733: "1", 4736: "1", 4737: "1", 4748: "1", 4747: "1", 4741: "1", 4740: "1", 4744: "1", 4743: "1", 4739: "1", 4738: "1", 4746: "1", 4745: "1", 4742: "1", 3621: "1", 3622: "1", 3623: "1", 3624: "1", 3625: "1", 3626: "1", 3627: "1", 3628: "1", 3629: "1", 3630: "1", 3631: "1", 3632: "1", 3794: "1", 3795: "1", 3788: "1", 3789: "1", 3790: "1", 3791: "1", 3792: "1", 3793: "1", 3633: "1", 3634: "1", 4750: "1", 4749: "1", 4751: "1", 3619: "1", 3618: "1", 3798: "1", 3799: "1", 3800: "1", 3801: "1", 3802: "1", 3803: "1", 3808: "1", 3807: "1", 3806: "1", 3804: "1", 3811: "1", 3809: "1", 3810: "1", 3805: "1", 3816: "1", 3812: "1", 3813: "1", 3814: "1", 3815: "1", 3817: "1", 3818: "1", 3819: "1", 3820: "1", 3821: "1", 3822: "1", 3823: "1", 3824: "1", 3825: "1", 3826: "2", 3827: "2", 3828: "1", 3829: "1", 3830: "1", 3831: "1", 3832: "1", 3833: "1", 3834: "1", 3835: "1", 3836: "1", 3837: "1", 3838: "1", 3839: "1", 3840: "1", 3841: "1", 3842: "1", 3843: "1", 3844: "1", 3845: "1", 3846: "1", 3847: "1", 3848: "1", 3849: "1", 3850: "1", 3851: "1", 3852: "1", 3853: "1", 3854: "1", 3855: "1", 3856: "1", 3857: "1", 3858: "1", 3860: "1", 3859: "1", 3861: "1", 3862: "1", 3863: "1", 3864: "1", 3865: "1", 3866: "1", 3867: "1", 3868: "1", 3869: "1", 3870: "1", 3885: "1", 3872: "1", 3871: "1", 3873: "1", 3874: "1", 3875: "1", 3876: "1", 3877: "1", 3878: "1", 3879: "1", 3880: "1", 3881: "1", 3882: "1", 3883: "1", 3884: "1", 3886: "1", 3887: "1", 3888: "1", 3889: "1", 3890: "1", 3891: "1", 3892: "1", 3893: "1", 3894: "1", 3895: "1", 3896: "1", 3897: "1", 3898: "1", 3926: "1", 3927: "1", 3928: "1", 3929: "1", 3930: "1", 3931: "1", 3932: "1", 3933: "1", 3934: "1", 3935: "1", 3936: "1", 3937: "1", 3938: "1", 3939: "1", 3940: "1", 3941: "1", 3942: "1", 3943: "1", 3944: "1", 3945: "1", 3946: "1", 3947: "1", 3948: "1", 3949: "1", 3950: "1", 3899: "1", 3900: "1", 3901: "1", 3902: "1", 3903: "1", 3904: "1", 3905: "1", 3906: "1", 3907: "1", 3908: "1", 1969: "2", 1919: "2", 1970: "2", 1921: "1", 1971: "1", 1924: "1", 1922: "1", 1920: "1", 1925: "1", 3549: "1", 3555: "1", 3556: "1", 3547: "1", 3550: "1", 3551: "1", 3552: "1", 3554: "1", 3553: "1", 3557: "1", 4167: "1", 3562: "1", 3560: "1", 3561: "1", 3558: "1", 3548: "1", 3596: "1", 3594: "1", 3597: "1", 1015: "2", 1019: "1", 1020: "1", 1018: "1", 191: "1", 190: "1", 194: "1", 195: "1", 1014: "1", 1013: "1", 1012: "1", 1011: "1", 1010: "1", 1009: "1", 1008: "1", 1007: "1", 1006: "1", 1005: "1", 982: "1", 983: "1", 984: "1", 981: "1", 985: "1", 986: "1", 987: "1", 988: "1", 989: "1", 990: "1", 991: "1", 992: "1", 1000: "1", 999: "1", 998: "1", 997: "1", 996: "1", 1004: "1", 995: "1", 1003: "1", 994: "1", 1002: "1", 993: "1", 1001: "1", 980: "1", 213: "1", 214: "1", 4755: "1", 4756: "1", 4757: "1", 4758: "1", 4759: "1", 4760: "1", 4761: "1", 4762: "1", 4763: "1", 4764: "1", 4765: "1", 4766: "1", 4767: "1", 4768: "1", 4769: "1", 4770: "1", 4771: "1", 4772: "1", 4773: "1", 4774: "1", 4775: "1", 4776: "1", 4777: "1", 4778: "1", 4779: "1", 4780: "1", 4781: "1", 4782: "1", 803: "1", 804: "1", 805: "1", 807: "1", 808: "1", 809: "1", 810: "1", 811: "1", 812: "1", 813: "1", 814: "1", 815: "1", 816: "1", 919: "1", 920: "1", 921: "1", 923: "1", 924: "1", 925: "1", 979: "1", 2269: "1", 2270: "1", 2271: "1", 2272: "1", 2343: "1", 2344: "1", 2345: "1", 2346: "1", 2796: "1", 2797: "1", 2798: "1", 2917: "1", 3168: "2", 3169: "2", 3170: "1", 3171: "1", 3172: "1", 3174: "1", 3173: "1", 3175: "1", 3176: "1", 3454: "1", 3455: "1", 3456: "1", 887: "1", 821: "1", 820: "1", 819: "1", 3656: "1", 3657: "1", 3658: "1", 3659: "1", 3660: "1", 3661: "1", 3663: "1", 3664: "1", 3665: "1", 3666: "1", 3667: "1", 3668: "1", 3669: "1", 3670: "1", 3662: "1", 2349: "1", 2350: "1", 2352: "1", 2353: "1", 2354: "1", 2355: "1", 2356: "1", 2357: "1", 2358: "1", 2359: "1", 2360: "1", 2361: "1", 2362: "1", 2363: "1", 2351: "1", 2364: "1", 2365: "1", 2366: "1", 2367: "1", 2368: "1", 2369: "1", 2370: "1", 2371: "1", 2372: "1", 2373: "1", 2374: "1", 2375: "1", 2376: "1", 2377: "1", 2378: "1", 2379: "1", 2380: "1", 2381: "1", 2382: "1", 2383: "1", 2385: "1", 2386: "1", 2387: "1", 2388: "1", 2389: "1", 2390: "1", 2391: "1", 2392: "1", 2393: "1", 2394: "1", 2395: "1", 2396: "1", 2397: "1", 2398: "1", 2399: "1", 2400: "1", 2401: "1", 2402: "1", 2403: "1", 2404: "1", 2405: "1", 2406: "1", 2407: "1", 2408: "1", 2409: "1", 2410: "1", 2411: "1", 2412: "1", 2413: "1", 2415: "1", 2416: "1", 2417: "1", 2418: "1", 2419: "1", 2420: "1", 2421: "1", 2422: "1", 2423: "1", 2424: "1", 2425: "1", 2426: "1", 2427: "1", 2428: "1", 2430: "1", 2432: "1", 2483: "1", 2484: "1", 2485: "1", 2486: "1", 2487: "1", 2488: "1", 2489: "1", 2490: "1", 2491: "1", 2492: "1", 2493: "1", 2494: "1", 2495: "1", 2496: "1", 2497: "1", 2498: "1", 2499: "1", 2500: "1", 2501: "1", 2506: "1", 2507: "1", 2508: "1", 2509: "1", 2510: "1", 2846: "1", 2847: "1", 2848: "1", 2849: "1", 2850: "1", 2851: "1", 2852: "1", 2853: "1", 2854: "1", 2855: "1", 2856: "1", 2857: "1", 2858: "1", 2859: "1", 2860: "1", 2861: "1", 2862: "1", 2863: "1", 2864: "1", 2865: "1", 2866: "1", 2867: "1", 2868: "1", 2869: "1", 2870: "1", 2871: "1", 2872: "1", 2873: "1", 2874: "1", 2875: "1", 2876: "1", 2877: "1", 2878: "1", 2879: "1", 2880: "1", 2881: "1", 2882: "1", 2883: "1", 2884: "1", 2885: "1", 2886: "1", 2887: "1", 2888: "1", 2889: "1", 2890: "1", 2891: "1", 2892: "1", 2893: "1", 2894: "1", 2895: "1", 2896: "1", 2897: "1", 2898: "1", 2899: "1", 2900: "1", 2901: "1", 2902: "1", 2903: "1", 2904: "1", 3147: "1", 3148: "1", 3149: "1", 3150: "1", 3151: "1", 3152: "1", 3153: "1", 3154: "1", 3155: "1", 3156: "1", 3157: "1", 3158: "1", 3159: "1", 3160: "1", 3161: "1", 3162: "1", 3163: "1", 3164: "1", 3165: "1", 3166: "1", 3167: "1", 3599: "1", 3600: "1", 3601: "1", 3603: "1", 3604: "1", 3605: "1", 3606: "1", 3607: "1", 3608: "1", 3609: "1", 3779: "1", 4089: "1", 4090: "1", 4091: "1", 4092: "1", 4093: "1", 4094: "1", 4095: "1", 4096: "1", 4097: "1", 4098: "1", 4099: "1", 4100: "1", 4101: "1", 4102: "1", 4103: "1", 4104: "1", 4105: "1", 4106: "1", 4107: "1", 4108: "1", 4109: "1", 3610: "1", 3611: "1", 3111: "1", 3112: "2", 3116: "1", 3115: "1", 3114: "1", 3113: "1", 3117: "1", 3118: "1", 3119: "1", 3120: "1", 3121: "1", 3122: "1", 3123: "1", 3124: "1", 3125: "1", 3126: "1", 3127: "1", 3128: "1", 3129: "1", 3130: "1", 3131: "1", 3132: "1", 3133: "1", 3134: "1", 3135: "1", 3136: "1", 3137: "1", 3138: "1", 3139: "1", 3140: "1", 3141: "1", 3142: "1", 3143: "1", 3144: "1", 3145: "1", 3146: "1", 3532: "1", 3533: "1", 3534: "1", 3535: "1", 3536: "1", 3537: "1", 3538: "1", 3539: "1", 3540: "1", 3541: "1", 3542: "1", 3543: "1", 3544: "1", 3545: "1", 3546: "1", 2522: "1", 2523: "1", 2524: "1", 2525: "1", 2526: "1", 2527: "1", 2528: "1", 3583: "1", 3584: "1", 3585: "1", 3586: "1", 3587: "1", 3588: "1", 3589: "1", };var opt_list = [144,26,307,287,258,132,133,33,265,267,179,319,320,261,42,322]; var more_txt = [], less_txt = [], optTmp = [], optTmpVal = [], isStock = 0; var changeStock = 0; var sid = '569'; var gwpurl = 'https://gwp.brweb.pl/i/index.php?path=/i/569/'; var imgLimit = '10000'; var moreLabel = '+'; var lessLabel = '-'; var showMLcnt = 1; var prevMopen = ''; var selectLangVal = ['','wybierz','choose','wählen','Vybrat','vali','izvēlēties','pasirinkti','választ','vyberte si','вибрати','-1']; function showPrev(e) { if (window.innerWidth < 700) return null; var id = e.id; var aId = id.split('__'); var aSO = aId[0].split('_'); var soptid = aSO[1]; var pid = soptid; var prev_div = document.getElementById('gwp_div_preview_'+pid); prev_div.style.display = 'block'; prev_div.innerHTML = '

'+e.title+'

'; setTimeout(movePrev,10,pid); } function hidePrev(e) { if (window.innerWidth < 700) return null; var id = e.id; var aId = id.split('__'); var aSO = aId[0].split('_'); var soptid = aSO[1]; var pid = soptid; var prev_div = document.getElementById('gwp_div_preview_'+pid); prev_div.style.display = 'none'; prev_div.innerHTML = ''; prev_div.style.top = '0px'; } function movePrev(pid) { var prev_div = document.getElementById('gwp_div_preview_'+pid); if (prev_div) { var imgH = prev_div.getElementsByTagName('IMG')[0]; if (!imgH) { setTimeout(movePrev,10,pid); return false; } const recti = imgH.getBoundingClientRect(); if (recti.height == 0) { setTimeout(movePrev,10,pid); return false; } var hcorr = (recti.top + recti.height - window.innerHeight + 20) * -1; hcorr = (hcorr < 0 ? hcorr : 0); if (recti.top < 20) { hcorr = (recti.top + hcorr - 20) * -1; } if (recti.top > 20 && recti.height + 40 > window.innerHeight) { hcorr = (recti.top - 20) * -1; } prev_div.style.top = hcorr + 'px'; } } function showPrevMobile(e) { var id = e.id; var aId = id.split('__'); var aSO = aId[0].split('_'); var soptid = aSO[1]; var prev_id = 'gwp_div_preview_'+soptid; var prev_div = document.getElementById(prev_id); if (prevMopen != '' && prevMopen != prev_div) document.getElementById(prevMopen).style.display = 'none'; prev_div.style.display = 'block'; prev_div.innerHTML = '

'+e.title+'

'; console.log(prev_div.innerHTML); prev_div.style.position = 'absolute'; prev_div.style.left = '0px'; prev_div.style.bottom = '20px'; prev_div.style.margin = '0px 10px'; prev_div.style.width = 'calc(100% - 20px)'; prevMopen = prev_id; } function hidePrevMobile(e) { var id = e.id; var aId = id.split('__'); var aSO = aId[0].split('_'); var soptid = aSO[1]; var prev_id = 'gwp_div_preview_'+soptid; var prev_div = document.getElementById(prev_id); prev_div.style.display = 'none'; prev_div.innerHTML = ''; } function hideDiv() { document.getElementById(prevMopen).style.display = 'none'; } function oClick(e,type) { if (type == 'S') { selectClick(e); } else { radioClick(e); } setTimeout(showGWP,500); } function selectClick(e) { var id = e.id; var aId = id.split('__'); var optId = aId[0].replace('option_',''); if (document.getElementById(aId[0]).value != aId[1] || document.getElementById(aId[0]).length == 1) { if (window.innerWidth < 700) showPrevMobile(e); document.getElementById(aId[0]).value = aId[1]; if (document.getElementById('gwp_div_title_'+optId)) document.getElementById('gwp_div_title_'+optId).innerHTML = e.title; } else { if (window.innerWidth < 700) hidePrevMobile(e); document.getElementById(aId[0]).selectedIndex = '0'; if (document.getElementById('gwp_div_title_'+optId)) document.getElementById('gwp_div_title_'+optId).innerHTML = ''; id = aId[0] + '__' + document.getElementById(aId[0]).value; } document.getElementById(aId[0]).dispatchEvent(new Event('change')); var c = document.getElementsByClassName('c_' + aId[0]); for( var i = 0; i < c.length; i++){ c[i].parentElement.className = c[i].parentElement.className.replace(' gwp-opt-sel',''); if ( c[i].id == id ) { c[i].parentElement.className = c[i].parentElement.className + ' gwp-opt-sel'; } } optTmpVal[aId[0].replace('option_','')] = document.getElementById(aId[0]).value; } function radioClick(e) { var id = e.id; if (window.innerWidth < 700) showPrevMobile(e); var aId = id.split('__'); document.getElementById(aId[0]+'_'+aId[1]).click(); if (document.getElementById('gwp_div_title_'+aId[0].replace('option_',''))) document.getElementById('gwp_div_title_'+aId[0].replace('option_','')).innerHTML = e.title; var c = document.getElementsByClassName('c_' + aId[0]); for( var i = 0; i < c.length; i++){ c[i].parentElement.className = c[i].parentElement.className.replace(' gwp-opt-sel',''); if ( c[i].id == id ) c[i].parentElement.className = c[i].parentElement.className + ' gwp-opt-sel'; } } function gwpMore(oid) { var h = document.getElementsByClassName('gwpHidden'+oid); var type = more_txt[oid] == document.getElementById('gwp_more'+oid).innerHTML ? 'block' : 'none'; for( var i = 0; i < h.length; i++){ h[i].style.display = (h[i].className == 'gwp-opt gwpHidden'+oid+' gwp-opt-sel') ? 'block' : type; } document.getElementById('gwp_more'+oid).innerHTML = type == 'block' ? less_txt[oid] : more_txt[oid] ; } function showGWP() { var isLoading = 0; var isDiff = 0; opt_list.forEach(function(opt_id) { var sr = document.getElementsByName('option_'+opt_id); if (sr.length == 0) { return; } var optValue = ''; if (sr[0].id == sr[0].name ) { var optType = 'S'; var s = sr[0]; var c = s.getElementsByTagName('option'); var optValue = s.value; } else { var optType = 'R'; var s = sr[0].parentElement.parentElement; var c = sr; for( var j = 0; j < c.length; j++){ if (c[j].checked == true) { optValue = c[j].value; } } } var svalues = Array.from(s.querySelectorAll('input[type="radio"], select option')).map(el => el.value).join('|'); isDiff = (!optTmp[opt_id] || optTmp[opt_id] != svalues || optTmpVal[opt_id] != optValue) ? 1 : 0; var eStock = (optType == 'S') ? s.parentElement.className : sr[0].parentElement.className; if (eStock.indexOf('option_truestock ') != -1 && eStock.indexOf('loading') != -1) { isLoading++; } if (isDiff == 1 || changeStock == 1) { if (optType == 'R') { s.style.visibility = 'hidden'; s.style.width = '0px'; s.style.height = '0px'; s.style.position = 'absolute'; s.style.bottom = '0px'; } else { s.style.display = 'none'; } var sOptions = '', sPreview = '', sTitle = ''; var imgNo = 0; var optCnt = (optType == 'S') ? c.length - 1 : c.length; if (optType == 'R') { for( var j = 0; j < c.length; j++){ if (c[j].parentElement.className == 'radio-wrap none') { optCnt--; } } var rlabels = s.getElementsByTagName('label'); var rDict = new Array(); for( var rli = 0; rli < rlabels.length; rli++){ if (rlabels[1].innerHTML != '' || !rlabels[rli]) rDict[rlabels[rli].getAttribute('for')] = rlabels[rli].innerHTML; } } more_txt[opt_id] = moreLabel + (showMLcnt == 1 ? (optCnt - imgLimit + 1) : ''); less_txt[opt_id] = lessLabel + (showMLcnt == 1 ? (optCnt - imgLimit + 1) : ''); var smTitle = ''; for( var j = 0; j< c.length; j++){ if (!selectLangVal.includes(c[j].value) && c[j].parentElement.className != 'radio-wrap none') { imgNo++; var smIsSelect = ((optType == 'S' && (s.options[s.selectedIndex].value == c[j].value || s.value == c[j].value)) || (optType == 'R' && c[j].checked == true)) ? 1 : 0; smItenSelect = smIsSelect == 1 ? ' gwp-opt-sel' : ''; smItenDisplay = (imgNo < imgLimit || (imgNo == imgLimit && imgNo == optCnt)) ? 'block' : 'none'; var lastOpt = (imgNo == imgLimit - 1) ? '!important' : ''; var lastOptClass = (imgNo == imgLimit - 1) ? ' toHidden ' : ''; var lastOptId = (imgNo == imgLimit - 1) ? ' id="gwp_loi_'+oId+'" ' : ''; if (smIsSelect == 1) { smItenDisplay = 'block'; if (imgNo > imgLimit || (imgNo == imgLimit && imgNo < optCnt)) { sOptions = sOptions.replace('block!important','none'); sOptions = sOptions.replace('toHidden','gwpHidden'+opt_id); } } smItenHidden = (imgNo > imgLimit || (imgNo == imgLimit && imgNo != optCnt)) ? ' gwpHidden'+opt_id+' ' : ''; oName = (optType == 'S') ? c[j].innerText.trim() : rDict[c[j].id].trim(); oId = (optType == 'S') ? s.id : c[j].name; if (smItenSelect == ' gwp-opt-sel') { smTitle = oName; } sOptions += '
' + oName + '
'; } } if (optCnt > imgLimit) { sOptions += '
' + more_txt[opt_id] + '
'; } sPreview = '
'; sTitle = smTitle != '' ? smTitle : ''; if (document.getElementById('gwp_div_list_'+opt_id)) { if (document.getElementById('gwp_div_title_'+opt_id)) { document.getElementById('gwp_div_title_'+opt_id).innerHTML = sTitle; } document.getElementById('gwp_div_list_'+opt_id).innerHTML = sOptions; } else { const div_title = document.createElement('div'); div_title.id = 'gwp_div_title_'+opt_id; div_title.className = 'gwp-opt-title'; div_title.innerHTML = sTitle; const div_prev = document.createElement('div'); div_prev.id = 'gwp_div_prev_'+opt_id; div_prev.className = 'gwp-opt-prev'; div_prev.innerHTML = sPreview; const div_list = document.createElement('div'); div_list.id = 'gwp_div_list_'+opt_id; div_list.className = 'sm-gwp-img-list'; div_list.innerHTML = sOptions; if (optType == 'S') { var div4title = s.parentElement.parentElement; } else { var div4title = s.parentElement; } div4title.prepend(div_title); if (optType == 'S') { s.parentElement.parentElement.parentElement.appendChild(div_prev); s.parentElement.parentElement.parentElement.appendChild(div_list); } else { s.parentElement.parentElement.appendChild(div_prev); s.parentElement.parentElement.appendChild(div_list); } } optTmp[opt_id] = Array.from(s.querySelectorAll('input[type="radio"], select option')).map(el => el.value).join('|'); optTmpVal[opt_id] = optValue; } }); changeStock = 0; if (isLoading > 0 || isDiff == 1) { setTimeout(showGWP,1000); } } window.onload = function(){ showGWP(); }; showGWP(); setTimeout(showGWP,1000); if (!gwpstylem) { var gwpstylem = document.createElement('style'); gwpstylem.textContent = '.gwp-opt.gwp-opt-sel::before {    content: \'\';    position: absolute;    top: 5px;    right: 5px;    width: 35px;    height: 35px;    background-image: url(\'https://gwp.brweb.pl/tick.png\');}'; document.head.appendChild(gwpstylem); }