gwpNo = {49: "0", 50: "0", 51: "0", 52: "0", 53: "0", 54: "0", 55: "0", 56: "0", 59: "0", 61: "0", 62: "0", 63: "0", 64: "0", 65: "0", 67: "0", 66: "0", 69: "0", 70: "0", 71: "0", 72: "0", 73: "0", 75: "0", 76: "0", 77: "0", 79: "0", 80: "0", 81: "0", 82: "0", 83: "0", 84: "0", 85: "0", 86: "0", 87: "0", 57: "0", 58: "0", 60: "0", 68: "0", 74: "0", 78: "0", 93: "0", 92: "0", 91: "0", 90: "0", 89: "0", 94: "0", 95: "0", 96: "1", 97: "1", 98: "1", 99: "1", 100: "2", 101: "1", 102: "1", 103: "1", 650: "0", 88: "0", 836: "1", 837: "1", 838: "1", 839: "1", 862: "1", 863: "1", 864: "1", 865: "1", 866: "1", 867: "1", 868: "1", 869: "1", 870: "1", 871: "1", 872: "1", 873: "1", 874: "1", 875: "1", 876: "1", 877: "1", 952: "1", 953: "1", 888: "1", 889: "1", 890: "1", 891: "1", 892: "1", 893: "1", 894: "1", 895: "1", 896: "1", 897: "1", 898: "1", 899: "1", 900: "1", 901: "1", 902: "1", 903: "1", 904: "1", 905: "1", 906: "1", 907: "1", 908: "1", 909: "1", 910: "1", 911: "1", 912: "1", 913: "1", 914: "1", 915: "1", 916: "1", 917: "1", 918: "1", 919: "1", 920: "1", 921: "1", 922: "1", 923: "1", 924: "1", 925: "1", 926: "1", 927: "1", 928: "1", 929: "1", 930: "1", 931: "1", 932: "1", 933: "1", 934: "1", 935: "1", 936: "1", 937: "1", 938: "1", 939: "1", 940: "1", 941: "1", 942: "1", 943: "1", 945: "1", 944: "1", 946: "1", 947: "1", 948: "1", 949: "1", 950: "1", 951: "1", };var opt_list = [8,9,10,35,34,33]; var more_txt = [], less_txt = [], optTmp = [], isStock = 0; var sid = '176'; var url = 'https://gwp.brweb.pl/i/176/'; var selcolor = '#804267'; var imgLimit = '12'; 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 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 += '
![' + 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' + ')