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: "1", 2541: "1", 2542: "1", 2543: "1", 2548: "1", 2549: "1", 2550: "1", 2551: "1", 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: "1", 71: "1", 72: "1", 73: "1", 74: "1", 77: "1", 222: "1", 2688: "1", 70: "1", 2689: "1", 1831: "1", 2687: "1", 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", };var opt_list = [73,76,83,80,18,41,20,51,96,95]; 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 += '