gwpNo = {93: "1", 94: "1", 95: "1", 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", 125: "0", 126: "0", 127: "0", 128: "0", 129: "0", 130: "1", 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", 147: "0", 148: "0", 149: "0", 150: "0", 154: "0", 155: "0", 157: "0", 158: "0", 162: "0", 161: "0", 163: "0", 164: "0", 165: "0", 166: "0", 151: "0", 156: "0", 152: "0", 159: "0", 160: "0", 153: "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: "1", 180: "1", 181: "1", 182: "1", 183: "1", 184: "1", 201: "1", 185: "1", 187: "1", 189: "1", 191: "1", 193: "1", 195: "1", 197: "1", 199: "2", 186: "1", 188: "1", 190: "1", 192: "1", 194: "1", 196: "1", 198: "1", 202: "1", 200: "1", 203: "1", 204: "1", 206: "1", 208: "1", 210: "1", 212: "1", 205: "1", 207: "1", 209: "1", 211: "1", 213: "1", 214: "1", 215: "1", 216: "1", 217: "1", 218: "0", 219: "0", 220: "0", 221: "0", 222: "0", 223: "0", 224: "0", 225: "0", 227: "0", 228: "0", 226: "0", 229: "0", 230: "0", 231: "0", 232: "0", 233: "0", 234: "0", 235: "0", 236: "0", 237: "0", 238: "0", 239: "0", 240: "0", 241: "0", 242: "0", 243: "0", 244: "0", 245: "0", 246: "0", 247: "1", 248: "0", 249: "0", 258: "0", 261: "0", 264: "0", 259: "0", 262: "0", 265: "0", 260: "0", 263: "0", 268: "1", 269: "0", 270: "1", 273: "1", 274: "1", 275: "1", 276: "0", 280: "0", 279: "0", 277: "1", 278: "0", 281: "0", 282: "0", 283: "0", 284: "0", 285: "0", 286: "0", 287: "0", 288: "0", 291: "0", 294: "0", 289: "0", 292: "0", 295: "0", 290: "0", 293: "0", 296: "1", 297: "1", 298: "1", 299: "1", 300: "1", 301: "1", 302: "1", 303: "1", 304: "1", 305: "2", 306: "2", 307: "2", 308: "2", 309: "1", 310: "1", 311: "1", 312: "1", 313: "1", 314: "1", 315: "1", 316: "1", 317: "1", 318: "1", 319: "1", 323: "1", 324: "1", 325: "1", 326: "1", 327: "1", 328: "1", 329: "1", 330: "1", 331: "1", 332: "1", 333: "1", 334: "1", 335: "1", 336: "1", 337: "1", 338: "1", 339: "1", 340: "1", 341: "1", 342: "1", 343: "1", 344: "1", 345: "1", 346: "1", 347: "1", 348: "1", 349: "1", 350: "1", 351: "1", 352: "1", 353: "1", 354: "1", 355: "1", 356: "2", 357: "3", 358: "1", 359: "3", 360: "3", 361: "3", 362: "3", 363: "3", 364: "1", 365: "1", 371: "1", 372: "1", 373: "1", 376: "1", 374: "1", 375: "1", 377: "4", 378: "1", 379: "1", 380: "1", 381: "2", 382: "3", 383: "3", 384: "2", 385: "2", 386: "1", 387: "1", 388: "1", 389: "1", 390: "1", 391: "1", 392: "1", 393: "1", 394: "1", 395: "1", 396: "1", 397: "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", 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", 438: "2", 439: "1", 440: "1", 441: "1", 442: "1", 443: "1", 444: "1", 445: "2", 446: "2", 447: "1", 448: "1", 449: "1", 450: "1", 451: "1", 452: "3", 453: "1", 454: "1", 455: "1", 456: "1", 457: "1", 458: "1", 459: "1", 461: "1", 462: "1", 463: "1", 464: "1", 465: "1", 460: "1", 466: "3", 467: "3", 468: "3", 469: "3", 470: "3", 471: "3", 472: "1", 473: "1", 474: "2", 475: "3", 476: "2", 477: "2", 478: "2", 479: "1", 480: "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", 496: "1", 495: "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: "1", 510: "1", 511: "1", 512: "1", 513: "1", 514: "1", 515: "1", 516: "1", 521: "1", 522: "1", 523: "1", 524: "1", 525: "1", 526: "1", 527: "1", 528: "1", 529: "1", 530: "1", 531: "1", 532: "1", 533: "1", 534: "1", 535: "1", 536: "1", 537: "1", 538: "1", 539: "1", 540: "1", 541: "1", 542: "1", 543: "1", 544: "1", 545: "1", 546: "1", 547: "1", 548: "1", 549: "1", 550: "1", 551: "1", 552: "2", 553: "2", 554: "2", 555: "2", 556: "2", 557: "1", 558: "1", 559: "1", 560: "1", 561: "1", 562: "1", 563: "1", 564: "1", 565: "1", 566: "1", 567: "1", 568: "1", 569: "1", 570: "1", 571: "1", 572: "1", 573: "1", 574: "1", 575: "1", 576: "1", 577: "1", 578: "1", 579: "1", 580: "1", 581: "1", 582: "1", 583: "1", 584: "1", 587: "1", 588: "1", 589: "1", 590: "1", 591: "1", 592: "1", 593: "1", 594: "1", 595: "1", 596: "1", 597: "1", 598: "1", 599: "1", 600: "1", 601: "1", 602: "1", 603: "1", 604: "1", 605: "1", 606: "1", 607: "1", 608: "1", 609: "1", 610: "1", 611: "1", 612: "1", 613: "1", 614: "1", 615: "1", 616: "1", 617: "1", 618: "1", 619: "1", 620: "1", 621: "1", 622: "1", 623: "1", 624: "1", 625: "1", 626: "1", 627: "1", 628: "1", 629: "1", 632: "1", 634: "1", 631: "1", 633: "1", 636: "1", 635: "1", 630: "1", 637: "1", 638: "1", 639: "1", 640: "1", 641: "1", 642: "1", 643: "2", 644: "1", 647: "1", 645: "1", 646: "1", 650: "1", 651: "1", 649: "1", 652: "1", 653: "1", 654: "1", 655: "1", 656: "1", 657: "1", 658: "1", 661: "1", 666: "1", 667: "1", 668: "1", 669: "1", 670: "1", 671: "1", 672: "1", 673: "1", 676: "1", 677: "1", 678: "1", 679: "1", 680: "1", 681: "1", 682: "1", 683: "1", 684: "1", 685: "2", 686: "1", 687: "1", 688: "1", 689: "1", 690: "1", 691: "1", 692: "1", 693: "1", 694: "2", 695: "1", 696: "1", 697: "1", 698: "1", 699: "1", 700: "1", 701: "1", 702: "1", 703: "1", 704: "1", 705: "1", 706: "1", 707: "1", 708: "1", 709: "1", 710: "1", 711: "1", 712: "1", 713: "1", 714: "1", 715: "1", 716: "1", 717: "1", 718: "1", 719: "1", 720: "1", 721: "1", 722: "1", 723: "1", 724: "1", 725: "1", 726: "1", 727: "1", 728: "1", 729: "1", 730: "1", 731: "1", 732: "1", 733: "1", 734: "1", 735: "1", 736: "1", 737: "1", 738: "1", 739: "1", 740: "1", 741: "1", 742: "1", 743: "1", 744: "1", 745: "1", 746: "1", 747: "1", 748: "1", 749: "1", 750: "1", 751: "1", 752: "2", 755: "1", 753: "1", 754: "1", 756: "1", 757: "1", 758: "1", 759: "1", 767: "1", 768: "1", 769: "1", 770: "1", 771: "1", 772: "1", 773: "1", 774: "1", 775: "1", 776: "1", 777: "1", 778: "1", 779: "1", 780: "1", 781: "1", 782: "1", 783: "1", 784: "1", 785: "1", 786: "1", 787: "1", 788: "1", 789: "1", 790: "1", 791: "1", 792: "1", 793: "1", 794: "1", 795: "1", 796: "1", 797: "1", 798: "1", 799: "1", 800: "1", 801: "1", 803: "1", 804: "1", 805: "1", 802: "1", 806: "1", 807: "1", 808: "1", 809: "1", 810: "1", 811: "1", 812: "1", 813: "1", 814: "1", 815: "1", 816: "1", 817: "1", 818: "1", 819: "1", 820: "1", 821: "1", 822: "1", 823: "1", 824: "1", 825: "1", 826: "1", 827: "1", 829: "1", 828: "1", 830: "1", 831: "2", 832: "1", 833: "1", 834: "1", 835: "1", 836: "1", 837: "1", 838: "1", 839: "1", 840: "1", 841: "1", 842: "1", 843: "1", 844: "1", 845: "1", 846: "1", 847: "1", 848: "1", 849: "1", 850: "1", 851: "1", 852: "1", 853: "1", 854: "1", 855: "1", 856: "1", 857: "1", 858: "1", 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: "2", 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: "2", 886: "1", 887: "1", 888: "1", 889: "1", 890: "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", 922: "1", 923: "1", 911: "1", 912: "1", 913: "1", 914: "1", 915: "1", 916: "1", 917: "1", 918: "1", 919: "1", 920: "1", 921: "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", 962: "1", 963: "1", 964: "1", 965: "1", 966: "1", 967: "1", 970: "1", 973: "1", 976: "1", 968: "1", 971: "1", 974: "1", 977: "1", 969: "1", 972: "1", 975: "1", 1027: "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", 1001: "1", 1002: "1", 1003: "1", 1004: "1", 1005: "1", 1006: "1", 1007: "1", 1008: "1", 1009: "1", 1010: "1", 1011: "1", 1012: "1", 1013: "1", 1014: "1", 1015: "1", 1016: "1", 1017: "1", 1018: "1", 1019: "1", 1020: "1", 1021: "1", 1022: "1", 1023: "1", 1024: "1", 1025: "1", 1026: "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: "2", 1047: "2", 1048: "2", 1049: "2", 1050: "2", 1051: "1", 1052: "1", 1053: "1", 1054: "1", 1055: "1", 1056: "1", 1057: "1", 1058: "1", 1059: "1", 1060: "1", 1061: "1", 1062: "1", 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", 1082: "1", 1084: "1", 1085: "1", 1081: "1", 1083: "1", 1086: "3", 1088: "1", 1087: "1", 1091: "1", 1090: "1", 1092: "2", 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: "3", 1120: "1", 1121: "2", 1122: "1", 1124: "1", 1123: "1", 1125: "1", 1126: "1", 1127: "1", 1128: "1", 1129: "1", 1130: "1", 1131: "2", 1132: "1", 1134: "6", 1133: "3", 1135: "2", 1136: "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", 1150: "1", 1151: "1", 1152: "1", 1153: "1", 1154: "1", 1155: "2", 1156: "1", 1157: "1", 1160: "1", 1161: "1", 1162: "1", 1163: "1", 1164: "1", 1165: "1", 1166: "1", 1167: "1", 1180: "1", 1181: "1", 1182: "1", 1183: "1", 1184: "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", 1202: "1", 1203: "1", 1204: "1", 1207: "1", 1208: "1", 1209: "1", 1210: "1", 1211: "1", 1212: "2", 1213: "1", 1214: "1", 1215: "1", 1216: "1", 1217: "1", 1218: "1", 1219: "1", 1220: "3", 1221: "1", 1222: "1", 1223: "1", 1224: "1", 1225: "1", 1226: "1", 1228: "1", 1229: "1", 1230: "1", 1231: "1", 1232: "1", 1227: "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", 1262: "1", 1263: "1", 1264: "2", 1265: "2", 1266: "3", 1267: "1", 1268: "1", 1269: "1", 1270: "1", 1271: "1", 1272: "1", 1273: "2", 1274: "1", 1275: "1", 1276: "1", 1277: "1", 1278: "2", 1279: "1", 1280: "1", 1281: "1", 1282: "1", 1284: "1", 1285: "1", 1286: "1", 1287: "1", 1283: "1", 1288: "1", 1289: "1", 1290: "1", 1291: "1", 1292: "1", 1293: "1", 1089: "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", };var opt_list = [11,21,20,22,23,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,52,55,56,57,58,59,60,62,63,64,65,66,67,68,69,70,71,72,73,76,77,78,79,80,81,82,83,84,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,103,104,105,106,108,109,110,111,112,113,114,115,116,117,118,119,121,122,123,124,125,126,127,128,129,130,131,132,133,134,136,137,139,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,189,190,191,193,192,194,195,196,197,198,199,200,201,202,203,204,206,207,208,209,210,211,212,213,214,215,216,217,218,219,223,224,225,226,227,228,229,230,231,233,236,237,239,241,243,244,245,246,247,248,249,250,251,254,255,256,257,258,259,260,261,262]; var more_txt = [], less_txt = [], optTmp = [], isStock = 0; var sid = '93'; var url = 'https://gwp.brweb.pl/i/93/'; var selcolor = '#9d7f65'; var imgLimit = '1000'; 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 += '
'; sColors += '
'; sColors += '
'; var c = s.getElementsByTagName('option'); var imgNo = 0; var optCnt = c.length - 1; more_txt[opt_id] = moreLabel + (showMLcnt == 1 ? (optCnt - imgLimit + 1) : ''); less_txt[opt_id] = lessLabel + (showMLcnt == 1 ? (optCnt - imgLimit + 1) : ''); for( var j = 0; j< c.length; j++){ if (c[j].value != '' && c[j].value != 'wybierz' && c[j].value != 'choose' && c[j].value != 'wählen' && c[j].value != 'Vybrat' && c[j].value != 'vali' && c[j].value != 'izvēlēties' && c[j].value != 'pasirinkti' && c[j].value != 'választ' && c[j].value != 'vyberte si' && c[j].value != 'вибрати') { imgNo++; sColors += '
imgLimit || (imgNo == imgLimit && imgNo != optCnt)) ? ' class="gwpHidden'+opt_id+' gwp-opt" ' : 'class="gwp-opt"') + '>
'; } } if (optCnt > imgLimit) { sColors += '
' + more_txt[opt_id] + '
'; } sColors += '
'; if (document.getElementById('gwp_div_'+opt_id)) { div = document.getElementById('gwp_div_'+opt_id); div.innerHTML = sColors; s.parentElement.appendChild(div); } else { const div = document.createElement('div'); div.innerHTML = sColors; div.id = 'gwp_div_'+opt_id; div.className = 'gwp-div'; div.style = 'position:relative;'; s.parentElement.appendChild(div); } } var sr = document.getElementsByName('option_'+opt_id); if (sr && sr.length > 0 && (!optTmp[opt_id] || optTmp[opt_id] != s.innerHTML)) { optTmp[opt_id] = sr[0].parentElement.parentElement.innerHTML; var sColors = ''; var imgNo = 0; var optCnt = sr.length; for( var ri = 0; ri < sr.length; ri++){ if (sr[ri].parentElement.className == 'radio-wrap none') { optCnt--; } } more_txt[opt_id] = moreLabel + (showMLcnt == 1 ? (optCnt - imgLimit + 1) : ''); less_txt[opt_id] = lessLabel + (showMLcnt == 1 ? (optCnt - imgLimit + 1) : ''); var rlabels = sr[0].parentElement.parentElement.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; } sColors += '
'; sColors += '
'; sColors += '
'; for( var ri = 0; ri < sr.length; ri++){ if (sr[ri].parentElement.className != 'radio-wrap none') { imgNo++; sColors += '
imgLimit || (imgNo == imgLimit && imgNo != optCnt)) ? ' class="gwpHidden'+opt_id+' gwp-opt" ' : 'class="gwp-opt"') + '>
'; } } if (optCnt > imgLimit) { sColors += '
' + more_txt[opt_id] + '
'; } sColors += '
'; if (document.getElementById('gwp_div_'+opt_id)) { div = document.getElementById('gwp_div_'+opt_id); div.innerHTML = sColors; s.parentElement.appendChild(div); } else { const div = document.createElement('div'); div.innerHTML = sColors; div.id = 'gwp_div_'+opt_id; div.style = 'position:relative;'; div.className = 'gwp-div'; sr[0].parentElement.parentElement.parentElement.appendChild(div); sr[0].parentElement.parentElement.style.height = '0px'; sr[0].parentElement.parentElement.style.visibility = 'hidden'; } } }); } showGWP();