if (!gwpstyle) { var gwpstyle = document.createElement('style'); gwpstyle.textContent = ' .gwp-div { clear: both; position:relative; } .sm-gwp-img-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0px; width: 100%; } .gwp-opt { box-sizing: border-box; text-align: center; border:3px solid transparent; border-bottom: 0px; padding:1px 1px 5px 1px; margin:0px; border-radius:7px; overflow-x:hidden; position: relative; padding-bottom: 20px; } .gwp-opt:hover { border:0px solid #EEEEEE; padding:1px; padding-bottom: 17px; } .gwp-opt-sel { border:2px solid #777777 !important; padding:1px; padding-bottom: 17px; } .gwp-opt-sel:hover { padding:1px; padding-bottom: 17px; } .gwp-opt-name { text-align: center; width: 100%; } .gwp-opt-title { min-height: 1em; padding: 11px 0px; } .gwp-opt-prev { position:relative; } .gwp-opt-prev div { position:absolute; left:-505px; width:500px; display:none; z-index:1000; border:1px solid #bcbcbc; background-color:#FFFFFF; box-shadow:3px 3px 6px #AAAAAA; } .gwp-opt img { cursor:pointer; border-radius:7px; } .gwp-opt-more { position:relative; cursor:pointer; border-radius:7px; border:1px solid #888888; color:#888888; padding-top:100%; } .gwp-opt-more div { font-size:14px; text-align:center; line-height:12px; position:absolute; top:50%; left:0px; width:100%; margin-top:-0.5em; } .gwp-opt-prev-title { display: block; text-align: center; }'; document.head.appendChild(gwpstyle); } gwpNo = {392: "3", 391: "2", 393: "1", 398: "1", 399: "1", 400: "1", 401: "1", 402: "1", 403: "1", 404: "1", 405: "1", 406: "1", 407: "1", 408: "1", 409: "1", 410: "1", 411: "1", 412: "1", 413: "1", 414: "1", 415: "1", 416: "1", 417: "1", 418: "1", 419: "1", 420: "1", 421: "1", 422: "1", 423: "1", 424: "1", 425: "1", 426: "1", 427: "1", 428: "1", 429: "1", 430: "1", 431: "1", 432: "1", 433: "1", 434: "1", 435: "1", 436: "1", 437: "1", 394: "1", 440: "1", 441: "1", 442: "1", 443: "1", 444: "1", 445: "1", 446: "1", 448: "1", 449: "1", 450: "1", 451: "1", 452: "1", 453: "1", 454: "1", 455: "1", 456: "1", 457: "1", 458: "1", 459: "1", 460: "1", 461: "1", 462: "1", 463: "1", 464: "1", 465: "1", 466: "1", 467: "1", 468: "1", 469: "1", 470: "1", 471: "1", 472: "1", 473: "1", 474: "1", 475: "1", 476: "1", 477: "1", 478: "1", 480: "1", 479: "1", 481: "1", 482: "1", 483: "1", 484: "1", 485: "1", 486: "1", 487: "1", 488: "1", 489: "1", 490: "1", 491: "1", 492: "1", 493: "1", 494: "1", 495: "1", 496: "1", 497: "1", 498: "1", 499: "1", 500: "1", 501: "1", 502: "1", 503: "1", 504: "1", 505: "1", 506: "1", 507: "1", 508: "1", 509: "2", 510: "1", 511: "1", 512: "1", 513: "1", 514: "1", 515: "1", 516: "1", 517: "1", 518: "1", 519: "1", 520: "1", 521: "1", 522: "1", 523: "2", 524: "1", 525: "1", 526: "1", 527: "1", 528: "1", 529: "1", 530: "1", 531: "2", 546: "1", 547: "2", 548: "1", 549: "1", 550: "1", 560: "1", 559: "1", 558: "1", 570: "1", 571: "1", 572: "1", 577: "1", 578: "1", 579: "1", 580: "1", 581: "2", 583: "1", 584: "1", 585: "1", 586: "1", 587: "1", 588: "1", 589: "1", 591: "1", 592: "1", 593: "1", 594: "1", 595: "1", 656: "2", 657: "2", 658: "2", 659: "2", 660: "2", 661: "2", 662: "2", 663: "2", 664: "2", 665: "2", 666: "2", 667: "2", 668: "2", 669: "2", 670: "2", 671: "2", 672: "2", 673: "3", 674: "2", 675: "2", 676: "2", 677: "2", 678: "2", 680: "2", 679: "2", 681: "2", 682: "2", 683: "2", 684: "2", 685: "2", 686: "2", 687: "2", 688: "2", 689: "2", 690: "2", 691: "2", 692: "2", 693: "2", 694: "2", 695: "2", 696: "2", 697: "2", 698: "2", 699: "2", 700: "2", 701: "2", 702: "2", 703: "2", 704: "2", 705: "2", 706: "2", 707: "2", 708: "2", 709: "2", 710: "2", 711: "2", 712: "2", 713: "2", 714: "2", 715: "2", 716: "2", 717: "2", 718: "2", 719: "2", 720: "2", 721: "2", 722: "2", 723: "2", 724: "2", 725: "2", 726: "2", 727: "2", 728: "2", 729: "2", 730: "2", 731: "2", 732: "2", 733: "2", 734: "2", 735: "2", 736: "2", 737: "2", 738: "1", 762: "1", 763: "1", 764: "1", 765: "1", 766: "1", 767: "1", 768: "1", 769: "1", 770: "1", 771: "1", 772: "1", 773: "1", 774: "1", 775: "1", 776: "1", 777: "1", 798: "2", 799: "1", 800: "1", 801: "1", 802: "1", 805: "1", 806: "1", 807: "1", 778: "1", 779: "1", 814: "1", 815: "1", 816: "3", 817: "3", 818: "3", 819: "3", 820: "4", 821: "3", 822: "2", 823: "2", 824: "2", 825: "2", 826: "3", 827: "1", 828: "1", 829: "1", 830: "1", 831: "1", 832: "1", 833: "1", 834: "1", 835: "1", 836: "1", 837: "2", 838: "2", 839: "2", 840: "2", 841: "2", 842: "2", 843: "2", 844: "5", 845: "3", 846: "2", 847: "2", 848: "2", 849: "2", 850: "2", 851: "2", 852: "2", 853: "2", 854: "2", 855: "2", 856: "2", 857: "2", 858: "2", 859: "2", 860: "2", 861: "2", 862: "2", 863: "2", 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", 878: "1", 879: "1", 880: "1", 881: "1", 882: "1", 883: "1", 884: "1", 885: "1", 886: "1", 887: "1", 888: "1", 889: "1", 890: "1", 891: "1", 892: "1", 893: "1", 894: "1", 895: "1", 896: "1", 897: "1", 898: "1", 899: "2", 900: "1", 901: "1", 902: "1", 903: "1", 904: "1", 905: "1", 906: "1", 918: "1", 907: "1", 908: "1", 909: "2", 910: "1", 911: "1", 912: "1", 913: "1", 914: "1", 915: "1", 916: "1", 917: "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", 944: "1", 945: "1", 946: "1", 947: "1", 948: "1", 949: "1", 950: "1", 951: "1", 952: "1", 953: "1", 954: "1", 955: "1", 956: "1", 957: "1", 958: "1", 959: "1", 960: "1", 961: "1", 447: "1", 962: "1", 963: "1", 964: "1", 965: "1", 966: "1", 967: "1", 968: "1", 969: "2", 970: "2", 971: "1", 972: "1", 973: "1", 974: "1", 975: "1", 976: "1", 977: "1", 978: "1", 979: "1", 980: "1", 981: "1", 982: "1", 983: "1", 984: "1", 985: "1", 986: "1", 987: "1", 988: "1", 989: "1", 990: "1", 991: "1", 992: "1", 993: "1", 994: "1", 995: "1", 996: "1", 997: "1", 998: "1", 999: "1", 1000: "1", 1002: "1", 1003: "1", 1004: "1", 1005: "1", 1006: "1", 1007: "1", 1008: "1", 1009: "1", 1010: "1", 1011: "1", 1026: "1", 1027: "1", 1028: "1", 1029: "1", 1030: "1", 1031: "1", 1032: "1", 1033: "1", 1034: "1", 1035: "1", 1036: "1", 1037: "1", 1038: "1", 1039: "1", 1040: "1", 1041: "1", 1042: "1", 1043: "1", 1044: "1", 1045: "1", 1046: "1", 1047: "1", 1048: "1", 1049: "1", 1050: "1", 1051: "1", 1052: "1", 1053: "1", 1054: "1", 1055: "1", 1056: "1", 1057: "1", 1058: "1", 1059: "1", 1060: "1", 1061: "1", 1062: "2", 1063: "1", 1064: "1", 1065: "1", 1066: "1", 1067: "1", 1068: "1", 1069: "1", 1070: "1", 1071: "1", 1072: "1", 1073: "1", 1074: "1", 1075: "1", 1076: "1", 1077: "1", 1078: "1", 1079: "1", 1080: "1", 1081: "1", 1082: "1", 1083: "1", 1084: "2", 1085: "1", 1086: "1", 1087: "1", 1088: "1", 1089: "1", 1090: "1", 1091: "1", 1092: "1", 1093: "1", 1094: "1", 1095: "1", 1096: "1", 1097: "1", 1098: "1", 1099: "1", 1100: "1", 1101: "1", 1102: "1", 1103: "1", 1104: "1", 1105: "1", 1106: "1", 1107: "1", 1108: "1", 1109: "1", 1110: "1", 1111: "1", 1112: "1", 1113: "1", 1114: "1", 1115: "1", 1116: "1", 1117: "1", 1118: "1", 1119: "1", 1120: "1", 1121: "1", 1122: "1", 1123: "1", 1124: "1", 1125: "1", 1126: "1", 1127: "1", 1128: "1", 1129: "1", 1131: "1", 1132: "1", 1133: "1", 1134: "1", 1135: "1", 1136: "1", 1130: "1", 1137: "1", 1138: "1", 1139: "1", 1140: "1", 1141: "1", 1142: "1", 1143: "1", 1144: "1", 1145: "1", 1146: "1", 1147: "1", 1148: "1", 1149: "1", 1150: "1", 1151: "1", 1152: "1", 1153: "1", 1154: "1", 1155: "1", 1156: "1", 1157: "1", 1158: "1", 1159: "1", 1160: "1", 1161: "1", 1162: "1", 1163: "1", 1164: "1", 1165: "1", 1166: "1", 1167: "1", 1168: "1", 1169: "1", 1170: "1", 1171: "1", 1172: "1", 1173: "1", 1174: "1", 1175: "1", 1176: "1", 1177: "1", 1178: "1", 1179: "1", 1180: "1", 1181: "1", 1182: "1", 1183: "1", 1184: "1", 1185: "1", 1186: "1", 1187: "1", 1188: "1", 1189: "1", 1190: "1", 1191: "1", 1192: "1", 1193: "1", 1194: "1", 1195: "1", 1196: "1", 1197: "1", 1198: "1", 1199: "1", 1200: "1", 1201: "1", 1202: "1", 1203: "1", 1204: "1", 1205: "1", 1206: "1", 1207: "1", 1208: "1", 1209: "1", 1210: "1", 1211: "1", 1212: "1", 1213: "1", 1214: "1", 1215: "1", 1216: "1", 1217: "1", 1218: "1", 1219: "1", 1220: "1", 1221: "1", 1222: "1", 1223: "1", 1224: "1", 1225: "1", 1226: "1", 1227: "1", 1228: "1", 1229: "1", 1230: "1", 1231: "1", 1232: "1", 1233: "1", 1234: "1", 1235: "1", 1236: "1", 1237: "1", 1238: "1", 1239: "1", 1240: "1", 1241: "1", 1242: "1", 1243: "1", 1244: "1", 1245: "1", 1246: "1", 1247: "1", 1248: "1", 1249: "1", 1250: "1", 1251: "1", 1252: "1", 1253: "1", 1254: "1", 1255: "1", 1256: "1", 1257: "1", 1258: "1", 1259: "1", 1260: "1", 1261: "1", 1262: "1", 1263: "1", 1264: "1", 1265: "1", 1266: "1", 1267: "1", 1268: "1", 1269: "1", 1270: "1", 1271: "1", 1272: "1", 1273: "1", 1274: "1", 1275: "1", 1276: "1", 1277: "1", 1278: "1", 1279: "1", 1280: "2", 1281: "1", 1282: "1", 1283: "1", 1284: "1", 1285: "1", 1286: "1", 1287: "1", 1288: "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", 1304: "1", 1305: "1", 1306: "1", 1307: "1", 1308: "1", 1309: "1", 1310: "1", 1311: "1", 1312: "1", 1313: "1", 1314: "1", 1335: "1", 1336: "1", 1337: "1", 1338: "1", 1339: "1", 1340: "1", 1341: "1", 1342: "1", 1343: "1", 1344: "1", 1345: "1", 1346: "1", 1347: "1", 1348: "1", 1349: "1", 1350: "1", 1351: "1", 1352: "1", 1353: "1", 1354: "1", 1355: "1", 1356: "1", 1357: "1", 1358: "1", 1359: "1", 1360: "1", 1361: "1", 1362: "1", 1363: "1", 1364: "1", 1365: "1", 1366: "1", 1367: "1", 1368: "1", 1369: "1", 1370: "1", 1371: "1", 1372: "1", 1373: "1", 1374: "1", 1375: "1", 1376: "1", 1377: "1", 1378: "1", 1379: "1", 1380: "1", 1381: "1", 1382: "1", 1383: "1", 1384: "1", 1385: "1", 1386: "1", 1387: "1", 1388: "1", 1389: "1", 1390: "1", 1391: "1", 1392: "1", 1393: "1", 1394: "1", 1395: "1", 1396: "1", 1397: "1", 1398: "1", 1399: "1", 1400: "1", 1401: "1", 1402: "1", 1403: "1", 1404: "1", 1405: "1", 1406: "1", 1407: "1", 1408: "1", 1409: "1", 1410: "1", 1411: "1", 1412: "1", 1413: "1", 1414: "1", 1415: "1", 1416: "1", 1417: "1", 1418: "1", 1419: "1", 1420: "1", 1421: "1", 1422: "1", 1423: "1", 1424: "1", 1425: "1", 1426: "1", 1315: "1", 1316: "1", 1317: "1", 1318: "1", 1319: "1", 1320: "1", 1321: "1", 1322: "1", 1323: "1", 1324: "1", 1325: "1", 1326: "1", 1327: "1", 1328: "1", 1329: "1", 1330: "1", 1331: "1", 1332: "1", 1333: "1", 1334: "1", 1001: "1", 1427: "2", 1428: "2", 1429: "2", 1430: "2", 1431: "1", 1432: "1", 1437: "1", 1438: "1", 1439: "1", 1440: "1", 1441: "1", 1442: "1", 1443: "1", 1444: "1", };var opt_list = [82,83,84,87,90,91,92,93,100,101,105,111,112,113,114,126,127,128,129,134,139,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,163,164,165,166,167,168,169,170,171,172,173,175,177,178,179,180,181,176,182,183]; var more_txt = [], less_txt = [], optTmp = [], optTmpVal = [], isStock = 0; var changeStock = 0; var sid = '339'; var gwpurl = 'https://gwp.brweb.pl/i/339/'; var imgLimit = '4'; var moreLabel = 'zobacz więcej'; var lessLabel = '-'; var showMLcnt = 0; var prevMopen = ''; var selectLangVal = ['','wybierz','choose','wählen','Vybrat','vali','izvēlēties','pasirinkti','választ','vyberte si','вибрати']; function showPrev(e) { if (window.innerWidth < 700) return null; var id = e.id; var aId = id.split('__'); var aSO = aId[0].split('_'); var soptid = aSO[1]; var pid = soptid; var prev_div = document.getElementById('gwp_div_preview_'+pid); prev_div.style.display = 'block'; prev_div.innerHTML = ''; setTimeout(movePrev,10,pid); } function hidePrev(e) { if (window.innerWidth < 700) return null; var id = e.id; var aId = id.split('__'); var aSO = aId[0].split('_'); var soptid = aSO[1]; var pid = soptid; var prev_div = document.getElementById('gwp_div_preview_'+pid); prev_div.style.display = 'none'; prev_div.innerHTML = ''; prev_div.style.top = '0px'; } function movePrev(pid) { var prev_div = document.getElementById('gwp_div_preview_'+pid); if (prev_div) { var imgH = prev_div.getElementsByTagName('IMG')[0]; if (!imgH) { setTimeout(movePrev,10,pid); return false; } const recti = imgH.getBoundingClientRect(); if (recti.height == 0) { setTimeout(movePrev,10,pid); return false; } var hcorr = (recti.top + recti.height - window.innerHeight + 20) * -1; hcorr = (hcorr < 0 ? hcorr : 0); if (recti.top < 20) { hcorr = (recti.top + hcorr - 20) * -1; } if (recti.top > 20 && recti.height + 40 > window.innerHeight) { hcorr = (recti.top - 20) * -1; } prev_div.style.top = hcorr + 'px'; } } function showPrevMobile(e) { var id = e.id; var aId = id.split('__'); var aSO = aId[0].split('_'); var soptid = aSO[1]; var prev_id = 'gwp_div_preview_'+soptid; 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 aSO = aId[0].split('_'); var soptid = aSO[1]; var prev_id = 'gwp_div_preview_'+soptid; var prev_div = document.getElementById(prev_id); prev_div.style.display = 'none'; prev_div.innerHTML = ''; } function hideDiv() { document.getElementById(prevMopen).style.display = 'none'; } function oClick(e,type) { if (type == 'S') { selectClick(e); } else { radioClick(e); } setTimeout(showGWP,500); } function selectClick(e) { var id = e.id; var aId = id.split('__'); var optId = aId[0].replace('option_',''); 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_'+optId)) document.getElementById('gwp_div_title_'+optId).innerHTML = e.title; } else { if (window.innerWidth < 700) hidePrevMobile(e); document.getElementById(aId[0]).selectedIndex = '0'; if (document.getElementById('gwp_div_title_'+optId)) document.getElementById('gwp_div_title_'+optId).innerHTML = ''; id = aId[0] + '__' + document.getElementById(aId[0]).value; } 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.className = c[i].parentElement.className.replace(' gwp-opt-sel',''); if ( c[i].id == id ) { c[i].parentElement.className = c[i].parentElement.className + ' gwp-opt-sel'; } } optTmpVal[optId] = document.getElementById(aId[0]).value; } 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.className = c[i].parentElement.className.replace(' gwp-opt-sel',''); if ( c[i].id == id ) c[i].parentElement.className = c[i].parentElement.className + ' gwp-opt-sel'; } } 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 = (h[i].className == 'gwp-opt gwpHidden'+oid+' gwp-opt-sel') ? 'block' : type; } document.getElementById('gwp_more'+oid).innerHTML = type == 'block' ? less_txt[oid] : more_txt[oid] ; } function showGWP() { var isLoading = 0; var isDiff = 0; opt_list.forEach(function(opt_id) { var sr = document.getElementsByName('option_'+opt_id); if (sr.length == 0) { return; } var optValue = ''; if (sr[0].id == sr[0].name ) { var optType = 'S'; var s = sr[0]; var c = s.getElementsByTagName('option'); var optValue = s.value; } else { var optType = 'R'; var s = sr[0].parentElement.parentElement; var c = sr; for( var j = 0; j < c.length; j++){ if (c[j].checked == true) { optValue = c[j].innerHTML; } } } isDiff = (!optTmp[opt_id] || optTmp[opt_id] != s.innerHTML || optTmpVal[opt_id] != s.value) ? 1 : 0; var eStock = (optType == 'S') ? s.parentElement.className : sr[0].parentElement.className; if (eStock.indexOf('option_truestock ') != -1 && eStock.indexOf('loading') != -1) { isLoading++; } if (isDiff == 1 || changeStock == 1) { if (optType == 'R') { s.style.visibility = 'hidden'; s.style.width = '0px'; s.style.height = '0px'; s.style.position = 'absolute'; s.style.bottom = '0px'; } else { s.style.display = 'none'; } var sOptions = '', sPreview = '', sTitle = ''; var imgNo = 0; var optCnt = (optType == 'S') ? c.length - 1 : c.length; if (optType == 'R') { for( var j = 0; j < c.length; j++){ if (c[j].parentElement.className == 'radio-wrap none') { optCnt--; } } var rlabels = s.getElementsByTagName('label'); var rDict = new Array(); for( var rli = 0; rli < rlabels.length; rli++){ if (rlabels[1].innerHTML != '' || !rlabels[rli]) rDict[rlabels[rli].getAttribute('for')] = rlabels[rli].innerHTML; } } more_txt[opt_id] = moreLabel + (showMLcnt == 1 ? (optCnt - imgLimit + 1) : ''); less_txt[opt_id] = lessLabel + (showMLcnt == 1 ? (optCnt - imgLimit + 1) : ''); var smTitle = ''; for( var j = 0; j< c.length; j++){ if (!selectLangVal.includes(c[j].value) && c[j].parentElement.className != 'radio-wrap none') { imgNo++; var smIsSelect = ((optType == 'S' && (s.options[s.selectedIndex].value == c[j].value || s.value == c[j].value)) || (optType == 'R' && c[j].checked == true)) ? 1 : 0; smItenSelect = smIsSelect == 1 ? ' gwp-opt-sel' : ''; smItenDisplay = (imgNo < imgLimit || (imgNo == imgLimit && imgNo == optCnt)) ? 'block' : 'none'; var lastOpt = (imgNo == imgLimit - 1) ? '!important' : ''; var lastOptClass = (imgNo == imgLimit - 1) ? ' toHidden ' : ''; var lastOptId = (imgNo == imgLimit - 1) ? ' id="gwp_loi_'+oId+'" ' : ''; if (smIsSelect == 1) { smItenDisplay = 'block'; if (imgNo > imgLimit || (imgNo == imgLimit && imgNo < optCnt)) { sOptions = sOptions.replace('block!important','none'); sOptions = sOptions.replace('toHidden','gwpHidden'+opt_id); } } smItenHidden = (imgNo > imgLimit || (imgNo == imgLimit && imgNo != optCnt)) ? ' gwpHidden'+opt_id+' ' : ''; oName = (optType == 'S') ? c[j].innerHTML : rDict[c[j].id]; oId = (optType == 'S') ? s.id : c[j].name; if (smItenSelect == ' gwp-opt-sel') { smTitle = oName; } sOptions += '
' + oName + '
'; } } if (optCnt > imgLimit) { sOptions += '
' + more_txt[opt_id] + '
'; } sPreview = '
'; sTitle = smTitle != '' ? smTitle : ''; if (document.getElementById('gwp_div_list_'+opt_id)) { document.getElementById('gwp_div_title_'+opt_id).innerHTML = sTitle; document.getElementById('gwp_div_list_'+opt_id).innerHTML = sOptions; } else { const div_title = document.createElement('div'); div_title.id = 'gwp_div_title_'+opt_id; div_title.className = 'gwp-opt-title'; div_title.innerHTML = sTitle; const div_prev = document.createElement('div'); div_prev.id = 'gwp_div_prev_'+opt_id; div_prev.className = 'gwp-opt-prev'; div_prev.innerHTML = sPreview; const div_list = document.createElement('div'); div_list.id = 'gwp_div_list_'+opt_id; div_list.className = 'sm-gwp-img-list'; div_list.innerHTML = sOptions; s.parentElement.appendChild(div_title); s.parentElement.appendChild(div_prev); s.parentElement.appendChild(div_list); } optTmp[opt_id] = s.innerHTML; optTmpVal[opt_id] = s.value; } }); changeStock = 0; if (isLoading > 0 || isDiff == 1) { setTimeout(showGWP,100); } } window.onload = function(){ showGWP(); }; showGWP(); setTimeout(showGWP,1000);