gwpNo = {1657: "1", 1658: "1", 1659: "1", 1656: "1", 1929: "1", 1930: "1", 1931: "1", 1932: "1", 1933: "1", 1934: "1", 1935: "1", 1941: "1", 1942: "1", 1943: "1", 1944: "1", 1945: "1", 1946: "1", 1947: "1", 1948: "1", 1949: "1", 1950: "1", 1974: "1", 1973: "1", 1972: "1", 1971: "1", 1970: "1", 1953: "1", 1957: "1", 1956: "1", 1951: "1", 1952: "1", 1954: "1", 1955: "1", 1958: "1", 1959: "1", 1960: "1", 1961: "1", 1962: "1", 1963: "1", 1964: "1", 1965: "1", 1966: "1", 1967: "1", 1968: "1", 1969: "1", 1976: "1", 1977: "2", 1978: "2", 1983: "1", 1982: "1", 1593: "1", 1594: "1", 1592: "1", 1595: "1", 1596: "1", 1597: "1", 1598: "1", 1599: "1", 1338: "1", 1339: "1", 1340: "1", 1341: "1", 1359: "1", 1360: "1", 1361: "1", 1362: "1", 1490: "1", 1491: "1", 1492: "1", 1493: "1", 1503: "1", 1504: "1", 1505: "1", 1506: "1", 1510: "1", 1511: "1", 1512: "1", 1513: "1", 1531: "1", 1532: "1", 1533: "1", 1534: "1", 1996: "1", 1997: "1", 2010: "2", 2011: "2", 2012: "2", 2013: "2", 2014: "5", 2015: "2", 2016: "2", 2017: "2", 2018: "2", 2019: "2", 2020: "2", 2021: "2", 2022: "2", 2023: "2", 2146: "1", 2147: "1", 2148: "2", 2149: "1", 2150: "1", 2151: "1", 2152: "1", 2153: "1", 2154: "1", 2155: "1", 2156: "1", 2157: "1", 2158: "1", 2159: "1", 2160: "1", 2161: "1", 2162: "1", 2163: "1", 2164: "1", 2165: "1", 2166: "1", 2207: "1", 2208: "1", 2209: "1", 2210: "1", 2211: "1", 2212: "1", 2213: "1", 2233: "1", 2234: "1", 2235: "1", 2236: "1", 2237: "1", 2238: "1", 2239: "1", 2240: "1", 2241: "1", 2242: "1", 2243: "1", 2244: "1", 2245: "1", 2246: "1", 2247: "1", 2248: "1", 2249: "1", 2250: "1", 2251: "1", 2252: "1", 2253: "1", 2254: "1", 2255: "1", 2256: "1", 2257: "1", 2258: "1", 2259: "1", 2260: "1", };var opt_list = [1356,1460,1477,1478,1487,1548,1579,1593,1599]; var more_txt = [], less_txt = [], optTmp = [], isStock = 0; var sid = '194'; var url = 'https://gwp.brweb.pl/i/194/'; var selcolor = '#777777'; var imgLimit = '1000'; var moreLabel = '+'; var lessLabel = '-'; var showMLcnt = 0; 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 += '