gwpNo = {413: "0", 414: "0", 614: "0", 615: "0", 616: "0", 1220: "0", 1221: "0", 1222: "0", 1598: "0", 1599: "0", 1602: "0", 1603: "0", 1606: "0", 1607: "0", 1608: "0", 1610: "0", 1641: "0", 1642: "0", 415: "0", 416: "0", 418: "0", 419: "0", 420: "0", 421: "0", 422: "0", 423: "0", 424: "0", 425: "0", 426: "0", 427: "0", 428: "0", 429: "0", 430: "0", 431: "0", 432: "0", 433: "0", 434: "0", 1383: "0", 1384: "0", 1386: "0", 1387: "0", 1388: "0", 1389: "0", 1390: "0", 1391: "0", 1392: "0", 1393: "0", 1394: "0", 1395: "0", 1396: "0", 1397: "0", 1398: "0", 1399: "0", 1400: "0", 1401: "0", 1402: "0", 1403: "0", 1404: "0", 1406: "0", 1407: "0", 1408: "0", 1409: "0", 1410: "0", 1411: "0", 1412: "0", 1413: "0", 1414: "0", 1415: "0", 1416: "0", 1417: "0", 1418: "0", 1419: "0", 1420: "0", 1421: "0", 1422: "0", 1442: "0", 956: "0", 957: "0", 1423: "0", 1424: "0", 963: "0", 962: "0", 1691: "1", 1692: "1", 1693: "1", };var opt_list = [39,76,28,89,90,27,56,59]; var more_txt = [], less_txt = [], optTmp = [], isStock = 0; var sid = '110'; var url = 'https://gwp.brweb.pl/i/110/'; var selcolor = '#777777'; var imgLimit = '3'; var moreLabel = 'pokaż więcej'; var lessLabel = 'zwiń'; var showMLcnt = 0; var prevMopen = ''; 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) { 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 { 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; 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 += '
'; 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' + ')