gwpNo = {55: "0", 56: "0", 57: "0", 60: "0", 61: "0", 62: "0", 63: "0", 64: "0", 65: "0", 66: "0", 67: "0", 68: "0", 69: "0", 70: "0", 71: "0", 72: "0", 73: "0", 74: "0", 75: "0", 76: "0", 77: "0", 78: "0", 79: "0", 80: "0", 81: "0", 82: "0", 83: "0", 84: "0", 85: "0", 86: "0", 87: "0", 88: "0", 89: "0", 90: "0", 91: "0", 92: "0", 93: "0", 94: "0", 95: "0", 96: "0", 97: "0", 98: "0", 99: "0", 100: "0", 101: "0", 102: "0", 103: "0", 104: "0", 105: "0", 106: "0", 107: "0", 108: "0", 109: "0", 110: "0", 111: "0", 112: "0", 113: "0", 114: "0", 115: "0", 116: "0", 117: "0", 118: "0", 119: "0", 120: "0", 121: "0", 122: "0", 123: "0", 124: "0", 125: "0", 126: "0", 127: "0", 128: "0", 129: "0", 130: "0", 131: "0", 132: "0", 133: "0", 134: "0", 135: "0", 136: "0", 137: "0", 138: "0", 139: "0", 140: "0", 141: "0", 142: "0", 143: "0", 144: "0", 145: "0", 146: "0", 149: "0", 150: "0", 151: "0", 152: "0", 153: "0", 154: "0", 155: "0", 156: "0", 157: "0", 158: "0", 159: "0", 160: "0", 161: "0", 162: "0", 163: "0", 164: "0", 165: "0", 166: "0", 167: "0", 168: "0", 169: "0", 170: "0", 171: "0", 172: "0", 173: "0", 174: "0", 175: "0", 176: "0", 177: "0", 178: "0", 179: "0", 180: "0", 181: "0", 182: "0", 183: "0", 184: "0", 185: "0", 186: "0", 187: "0", 188: "0", 189: "0", 190: "0", 191: "0", 192: "0", 193: "0", 194: "0", 195: "0", 196: "0", 197: "0", 198: "0", 199: "3", 200: "3", 201: "5", 202: "3", 203: "0", 204: "0", 205: "0", 206: "0", 207: "0", 208: "0", 211: "0", 212: "0", 213: "0", 214: "0", 215: "0", 216: "0", 217: "0", 218: "0", 219: "0", 220: "0", 221: "0", 222: "0", 223: "0", 224: "0", 225: "0", 226: "0", 227: "0", 228: "0", 229: "0", 230: "0", 233: "0", 234: "0", 236: "0", 237: "0", 235: "0", 238: "0", 239: "0", 240: "0", 241: "0", 242: "2", 243: "2", 244: "2", 245: "2", 246: "0", 247: "0", 248: "0", 249: "0", 250: "0", 251: "0", 252: "0", 262: "1", 263: "1", 264: "1", 265: "1", 266: "1", 267: "1", 268: "1", 269: "1", 270: "1", 253: "1", 254: "1", 255: "1", 256: "1", 257: "1", 258: "1", 259: "1", 260: "1", 261: "1", 277: "2", 278: "2", 279: "2", 280: "2", 281: "2", 287: "1", 288: "1", 290: "1", 289: "1", 292: "1", 291: "1", 307: "1", 53: "1", 54: "1", 308: "1", 309: "1", 147: "3", 148: "1", 311: "1", 310: "1", 312: "1", 313: "1", 314: "1", 316: "2", 315: "2", 317: "2", 318: "2", 319: "2", 329: "4", 330: "4", 331: "4", 332: "4", 333: "1", 334: "1", 335: "1", 336: "1", 337: "1", 338: "1", 339: "1", 342: "1", 343: "1", 344: "1", 346: "1", 345: "1", 359: "2", 360: "1", 361: "2", };var opt_list = [11,13,14,15,16,17,19,20,21,22,23,25,26,28,29,30,31,32,34,33,37,44,45,46,50,51,52,54]; var more_txt = [], less_txt = [], optTmp = [], isStock = 0; var sid = '51'; var url = 'https://gwp.brweb.pl/i/51/'; var selcolor = '#777777'; var imgLimit = '4'; 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 += '