gwpNo = {1881: "1", 1882: "1", 1883: "1", 1884: "1", 1885: "1", 1886: "1", 1887: "1", 1888: "1", 1889: "1", 1890: "1", 1891: "1", 1892: "1", 1893: "1", 1894: "1", 1895: "1", 1896: "1", 1897: "1", 1898: "1", 1899: "1", 1900: "1", 1901: "1", 1902: "1", 1903: "1", 2287: "1", 2288: "1", 2279: "1", 2280: "1", 2281: "1", 2282: "1", 2283: "1", 2284: "1", 2285: "1", 2286: "1", 2267: "1", 2268: "1", 2269: "1", 2270: "1", 2271: "1", 2272: "1", 2273: "1", 2274: "1", 2275: "1", 2276: "1", 2277: "1", 2289: "1", 2290: "1", 2278: "1", 2291: "1", 2292: "1", 2293: "1", 2294: "1", 2295: "1", 2296: "1", 2297: "1", 2298: "1", 2299: "1", 2300: "1", 2301: "1", 2302: "1", 2303: "1", 2304: "1", 2305: "1", 2306: "1", 2540: "2", 2541: "2", 2542: "2", 2543: "2", 2548: "2", 2549: "2", 2550: "2", 2551: "2", 2547: "1", 63: "2", 64: "2", 208: "2", 209: "2", 210: "2", 211: "2", 212: "2", 213: "2", 214: "2", 215: "2", 216: "2", 217: "2", 218: "2", 219: "2", 220: "2", 221: "2", 2554: "2", 2560: "2", 2555: "2", 2556: "2", 2557: "2", 2558: "2", 559: "1", 560: "1", 561: "1", 562: "1", 563: "1", 564: "1", 565: "1", 566: "1", 567: "1", 568: "1", 2662: "1", 2663: "1", 2664: "1", 2665: "1", 2666: "1", 2667: "1", 2670: "1", 2671: "1", 2672: "1", 2673: "1", 2674: "1", 2675: "1", 2676: "1", 2682: "1", 2683: "1", 2684: "1", 2685: "1", 2686: "1", 69: "2", 71: "2", 72: "2", 73: "2", 74: "2", 77: "1", 222: "1", 2688: "2", 70: "2", 2689: "2", 1831: "1", 2687: "2", 2690: "1", 2691: "1", 2692: "1", 2693: "1", 2694: "1", 2559: "1", 2697: "1", 2698: "1", 1286: "2", 1287: "1", 1289: "1", 1290: "1", 1291: "1", 1292: "1", 1293: "1", 1294: "1", 1295: "1", 1296: "1", 1297: "1", 1298: "1", 1299: "1", 1300: "1", 1301: "1", 1302: "1", 1303: "1", 2699: "1", 2700: "1", 2701: "1", 2702: "1", 2703: "1", 2704: "1", 2705: "1", 2706: "1", 3157: "1", 3158: "1", 3159: "1", 3160: "1", 3161: "1", 3162: "1", 3163: "1", 3164: "1", 3165: "1", 3166: "1", 3167: "1", 3168: "1", 3169: "1", 3170: "1", 3171: "1", 3172: "1", 3173: "1", 3174: "1", 3175: "1", 3176: "1", 3177: "1", 3178: "1", 3179: "1", 3180: "1", 3181: "1", 3155: "1", 3156: "1", 3154: "1", 1802: "2", 1803: "1", 1804: "1", 1805: "1", 1806: "1", 1807: "1", 1808: "1", 1809: "1", 1821: "1", 1822: "1", 1823: "1", 1824: "1", 1825: "1", 3309: "1", 3310: "1", 3311: "1", 3312: "1", 3313: "1", 3314: "1", 3315: "1", 3316: "2", 3317: "1", 3318: "1", 3319: "1", 3320: "1", 3345: "1", 3346: "1", 3330: "1", 3331: "1", 3332: "1", 3333: "1", 3334: "1", 3335: "1", 3336: "1", 3337: "1", 3338: "1", 3339: "1", 3340: "1", 3341: "1", 3342: "1", 3343: "1", 3344: "1", 3350: "1", 3351: "1", 3352: "1", 3353: "1", 3354: "1", 3355: "1", 3356: "1", 3357: "1", 3358: "1", 3359: "1", 3360: "1", 3361: "1", 3362: "1", 3363: "1", 3364: "1", 2315: "1", 3483: "1", 3484: "1", 3485: "1", 3486: "1", 3487: "1", 3488: "1", 3489: "1", 3490: "1", 3491: "1", 3492: "1", 3493: "1", 3494: "1", 3495: "1", 3496: "1", 3497: "1", 3498: "1", 3499: "1", 3500: "1", 3501: "1", 3502: "1", 3503: "1", 3504: "1", 3505: "1", 3464: "1", 3465: "1", 3466: "1", 3467: "1", 3468: "1", 3469: "1", 3470: "1", 3471: "1", 3472: "1", 3473: "1", 3474: "1", 3475: "1", 3476: "1", 3477: "1", 3478: "1", 3479: "1", 3480: "1", 3481: "1", 3482: "1", 3506: "1", 3507: "1", 3508: "1", 3509: "1", 3510: "1", 3511: "1", 3512: "1", 3513: "1", 3514: "1", 3515: "1", 3516: "1", 3517: "1", 3518: "1", 3519: "1", 3520: "1", 3521: "1", 3522: "1", 3523: "1", 3524: "1", 3525: "1", 3526: "1", 3527: "1", 3528: "1", 3529: "1", 3530: "1", 3531: "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", 3547: "1", 3549: "1", 3550: "1", 3551: "1", 3552: "1", 3553: "1", 3554: "1", 3555: "1", 3556: "1", 3557: "1", 3548: "1", 3771: "1", 3772: "1", 3773: "1", 3774: "1", 364: "1", 365: "1", 366: "1", 367: "1", 368: "1", 369: "1", 370: "1", 371: "1", 372: "1", 373: "1", 374: "1", 3929: "1", 3930: "1", 480: "1", 481: "1", 719: "1", 720: "1", 721: "1", 722: "1", 723: "1", 724: "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", 362: "1", 363: "1", 3931: "1", 3947: "1", 3948: "1", 3949: "1", 3950: "1", 3951: "1", 3952: "1", 3953: "1", 3954: "1", 3955: "1", 3956: "1", 3957: "1", 3958: "1", 3959: "1", 3960: "1", 3961: "1", 3962: "1", 3963: "1", 3964: "1", 3965: "1", 3966: "1", 3967: "1", 3968: "1", 3969: "1", 3970: "1", 3971: "1", 3972: "1", 3973: "1", 3974: "1", 3975: "1", 3976: "1", 3977: "1", 3978: "1", 3979: "1", 3980: "1", 3981: "1", 3982: "1", };var opt_list = [73,76,83,80,18,41,20,51,96,95,66,107,106,109,118,117,119,120,121,122,126,30,31,29,128,129]; var more_txt = [], less_txt = [], optTmp = [], isStock = 0; var sid = '196'; var url = 'https://gwp.brweb.pl/i/196/'; var selcolor = '#777777'; var imgLimit = '6'; var moreLabel = '+'; var lessLabel = '-'; var showMLcnt = 1; var prevMopen = ''; function showPrev(e) { if (window.innerWidth < 700) return null; var id = e.id; var aId = id.split('__'); var prev_div = document.getElementById('gwp_div_preview_'+aId[0].replace('option_','')); prev_div.style.display = 'block'; prev_div.innerHTML = ''; } function hidePrev(e) { if (window.innerWidth < 700) return null; var id = e.id; var aId = id.split('__'); var prev_div = document.getElementById('gwp_div_preview_'+aId[0].replace('option_','')); prev_div.style.display = 'none'; prev_div.innerHTML = ''; } function showPrevMobile(e) { var id = e.id; var aId = id.split('__'); var prev_id = 'gwp_div_preview_'+aId[0].replace('option_',''); 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 = '
'; 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 prev_id = 'gwp_div_preview_'+aId[0].replace('option_',''); var prev_div = document.getElementById(prev_id); prev_div.style.display = 'none'; prev_div.innerHTML = ''; } function hideDiv() { document.getElementById(prevMopen).style.display = 'none'; } function selectClick(e) { var id = e.id; var aId = id.split('__'); 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_'+aId[0].replace('option_',''))) document.getElementById('gwp_div_title_'+aId[0].replace('option_','')).innerHTML = e.title; } else { if (window.innerWidth < 700) hidePrevMobile(e); document.getElementById(aId[0]).selectedIndex = '0'; if (document.getElementById('gwp_div_title_'+aId[0].replace('option_',''))) document.getElementById('gwp_div_title_'+aId[0].replace('option_','')).innerHTML = ''; id = ''; } 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.style.border = '1px solid transparent'; if ( c[i].id == id ) { c[i].parentElement.style.border = '1px solid ' + selcolor; } } } 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.style.border = '1px solid transparent'; if ( c[i].id == id ) c[i].parentElement.style.border = '1px solid ' + selcolor; } } 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 = type; } document.getElementById('gwp_more'+oid).innerHTML = type == 'block' ? less_txt[oid] : more_txt[oid] ; } function showGWP() { opt_list.forEach(function(opt_id) { var s = document.getElementById('option_'+opt_id); if (s && (!optTmp[opt_id] || optTmp[opt_id] != s.innerHTML)) { s.style.display = 'none'; optTmp[opt_id] = s.innerHTML; var sColors = ''; if (s.parentElement.className.indexOf('option_truestock ') != -1 && isStock == 0) { isStock = 1; const intervalGWP = setInterval(function() { showGWP(); if (s.value == 'wybierz') { var c30 = document.getElementsByClassName('c_option_' + opt_id); for( var i30 = 0; i30 < c30.length; i30++){ if (c30[i30].parentElement.style.border != '1px solid transparent') { selectClick(document.getElementById(c30[i30].id)); } } } }, 500); } sColors += '
![' + c[j].innerHTML + '](' + url + c[j].value + '-S-' + ((c[j].value in gwpNo) ? gwpNo[c[j].value] : '0') + '-' + c[j].innerHTML + '.webp' + ')
![' + rDict[sr[ri].id] + '](' + url + sr[ri].value + '-S-' + ((sr[ri].value in gwpNo) ? gwpNo[sr[ri].value] : '0') + '-' + rDict[sr[ri].id] + '.webp' + ')