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(9, 1fr); gap: 0px; width: 100%; } .gwp-opt { box-sizing: border-box; text-align: center; border:2px solid transparent; padding:1px; margin:0px; border-radius:2px; overflow-x:hidden; position: relative; } .gwp-opt:hover { border-top:0px solid #EEEEEE; padding:1px; } .gwp-opt:hover .gwp-opt-name { padding-top:2px; } .gwp-opt-sel:hover .gwp-opt-name { padding-top: 0px; } .gwp-opt-sel { border:2px solid #ed008f !important; padding:1px; } .gwp-opt-sel:hover { padding:1px; } .gwp-opt-name { text-align: center; width: 100%; } .gwp-opt-unavailable img { filter: grayscale(100%); } .gwp-opt-title { min-height: 1em; padding: 11px 0px; } .gwp-opt-prev { position:relative; width: 100%; } .gwp-opt-prev div { position:absolute; left:-255px; width:250px; 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:2px; } .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; } .gwp-opt-title { font-weight:bold; padding: 0px 20px; display: inline-block; }'; document.head.appendChild(gwpstyle); } gwpNo = {1669: "3", 1670: "3", 1671: "3", 1672: "3", 1673: "3", 1674: "3", 1675: "3", 1676: "3", 1677: "4", 1678: "5", 1679: "3", 1680: "3", 1681: "3", 1682: "3", 1683: "3", 1684: "3", 1685: "3", 1686: "3", 1687: "3", 1688: "3", 1689: "3", 1690: "3", 1691: "3", 1692: "3", 1694: "3", 1695: "3", 1696: "3", 1697: "3", 1698: "3", 1699: "5", 1700: "4", 1701: "3", 1702: "3", 1703: "3", 1704: "3", 1705: "3", 1706: "4", 1707: "4", 1708: "4", 1709: "4", 1710: "4", 1711: "4", 1712: "4", 1713: "3", 1714: "3", 1715: "3", 1716: "3", 1717: "3", 1718: "3", 1719: "3", 1720: "3", 1721: "3", 1722: "3", 1723: "3", 1724: "3", 1725: "3", 1726: "3", 1727: "3", 1693: "3", 1728: "2", 1729: "2", 1730: "2", 1731: "2", 1732: "2", 1733: "2", 1734: "2", 1735: "2", 1736: "3", 1737: "3", 1738: "2", 1739: "2", 1740: "2", 1741: "2", 1742: "2", 1743: "2", 1744: "2", 1745: "2", 1746: "2", 1747: "2", 1748: "2", 1749: "2", 1750: "2", 1751: "2", 1752: "2", 1753: "2", 1754: "2", 1755: "2", 1756: "2", 1757: "2", 1758: "2", 1759: "2", 1760: "2", 1761: "2", 1762: "2", 1763: "2", 1764: "2", 1765: "2", 1766: "2", 1767: "2", 1768: "2", 1769: "2", 1770: "2", 1771: "2", 1772: "2", 1773: "2", 1774: "2", 1775: "2", 1776: "2", 1777: "2", 1778: "2", 1779: "2", 1780: "2", 1781: "2", 1782: "2", 1783: "2", 1784: "2", 1785: "2", 1786: "2", 1787: "2", 1788: "2", 1789: "2", 1790: "2", 1791: "2", 1792: "2", 1793: "2", 1794: "3", 1795: "3", 1796: "2", 1797: "2", 1798: "2", 1799: "2", 1800: "2", 1801: "2", 1802: "2", 1803: "2", 1804: "2", 1805: "2", 1806: "2", 1807: "2", 1808: "2", 1809: "2", 1810: "2", 1811: "2", 1812: "2", 1813: "2", 1814: "2", 1815: "2", 1816: "3", 1817: "2", 1818: "2", 1819: "2", 1820: "2", 1821: "2", 1822: "2", 1823: "2", 1824: "2", 1825: "2", 1826: "3", 1827: "2", 1828: "2", 1829: "2", 1830: "2", 1831: "2", 1832: "2", 1833: "3", 1834: "2", 1835: "2", 1836: "2", 1837: "2", 1838: "2", 1839: "2", 1840: "2", 1841: "3", 1842: "2", 1843: "2", 1844: "2", 1855: "1", 1856: "1", 1857: "1", 1858: "1", 1859: "1", 1860: "1", 1861: "1", 1862: "1", 1863: "1", 1864: "1", 1865: "1", 1866: "1", 1867: "1", 1868: "1", 1869: "1", 1870: "1", 1871: "1", 1872: "1", 1873: "1", 1874: "1", 1875: "1", 1876: "1", 1877: "1", 1878: "1", 1879: "1", 1880: "1", 1881: "1", 1882: "1", 1883: "1", 1884: "1", 1885: "1", 1886: "1", 1887: "1", 1888: "1", 1889: "1", 1890: "1", 1891: "1", 1892: "1", 1893: "1", 1894: "1", 1895: "1", 1896: "1", 1897: "1", 1898: "1", 1899: "1", 1900: "1", 1901: "1", 1902: "1", 1903: "1", 1904: "1", 1905: "1", 1906: "1", 1907: "1", 1908: "1", 1909: "1", 1910: "1", 1911: "1", 386: "2", 387: "2", 388: "2", 389: "2", 390: "2", 1304: "2", 1494: "2", 1654: "2", 1655: "3", 1850: "1", 1656: "1", 1657: "1", 1658: "1", 1659: "1", 731: "1", 732: "1", 733: "1", 734: "1", 1644: "1", 1645: "1", 1646: "1", 1647: "1", 1648: "1", 1649: "1", 1641: "2", 1642: "2", 1969: "2", 1970: "2", 1971: "2", 1972: "2", 1973: "2", 1974: "2", 1975: "2", 1976: "2", 1977: "2", 1978: "2", 1979: "2", 1980: "2", 1981: "2", 1982: "2", 1983: "2", 1984: "2", 1985: "2", 1986: "2", 1987: "2", 1988: "2", 1989: "2", 1948: "2", 1949: "2", 1950: "2", 1951: "2", 1952: "2", 1953: "2", 1954: "3", 1955: "2", 1956: "2", 1957: "2", 1958: "2", 1959: "2", 1960: "2", 1961: "2", 1962: "2", 1963: "2", 1964: "2", 1965: "2", 1966: "2", 1967: "2", 1968: "2", 1927: "2", 1928: "2", 1929: "2", 1930: "2", 1931: "2", 1932: "2", 1933: "3", 1934: "2", 1935: "2", 1936: "2", 1937: "2", 1938: "2", 1939: "2", 1940: "2", 1941: "2", 1942: "2", 1943: "2", 1944: "2", 1945: "2", 1946: "2", 1947: "2", 474: "1", 473: "1", 507: "1", 508: "1", 509: "1", 708: "1", 677: "1", 678: "1", 679: "1", 680: "1", 681: "1", 682: "1", 718: "1", 719: "1", 720: "1", 1470: "1", 1471: "1", 1472: "1", 1473: "1", 1474: "1", 1475: "1", 1990: "2", 1991: "2", 1992: "2", 1993: "2", 1994: "2", 1995: "2", 1996: "2", 1997: "2", 1998: "2", 1999: "1", 2000: "2", 2001: "2", 2002: "1", 2003: "1", 2004: "1", 2005: "2", 2006: "1", 2007: "1", 2008: "1", 2009: "1", 2010: "1", 2011: "1", 2012: "1", 2013: "1", 1497: "2", 1498: "2", 1499: "2", 1500: "2", 1501: "1", 1506: "2", 1507: "2", 1508: "2", 1512: "1", 1513: "2", 1515: "2", 1516: "1", 1517: "2", 1518: "1", 1519: "2", 1523: "2", 1524: "2", 1525: "1", 1526: "2", 1527: "2", 1529: "2", 1530: "3", 1531: "2", 1532: "2", 1533: "2", 1535: "2", 1537: "1", 1539: "2", 1540: "2", 1541: "2", 1542: "2", 1543: "2", 1545: "2", 1546: "2", 1547: "2", 1548: "2", 1553: "2", 1554: "2", 1555: "2", 1556: "2", 1557: "2", 1558: "2", 1559: "2", 1560: "1", 1561: "2", 1562: "2", 1564: "2", 1565: "2", 1566: "2", 1567: "2", 1568: "2", 1569: "1", 1570: "2", 1571: "2", 1572: "2", 1573: "2", 1574: "2", 1575: "2", 1576: "2", 1577: "2", 1578: "2", 1579: "2", 1580: "2", 1581: "1", 1582: "2", 1583: "2", 1584: "1", 1585: "1", 1586: "1", 1505: "1", 1522: "2", 1538: "2", 1563: "2", 1552: "1", 1551: "1", 1550: "2", 1549: "1", 1544: "2", 1536: "1", 1528: "1", 1521: "1", 1520: "1", 1511: "1", 1510: "2", 1509: "2", 1504: "1", 1653: "1", 1589: "1", 1590: "1", 1591: "2", 1595: "1", 2223: "1", 2224: "1", 2225: "1", 2226: "1", 2227: "1", 2241: "1", 2242: "1", 2244: "1", 2245: "1", 2246: "1", 2247: "1", 2248: "1", 2249: "1", 2250: "1", 2251: "1", 2252: "1", 2253: "1", 2254: "1", 2255: "1", 2256: "1", 2257: "1", 2258: "1", 2259: "1", 2260: "1", 2261: "1", 2262: "1", 2263: "1", 2264: "1", 2265: "1", 2267: "1", 2268: "1", 2270: "1", 2271: "1", 2272: "1", 2273: "1", 2274: "1", 2275: "1", 2276: "1", 2277: "1", 2278: "1", 2279: "1", 2280: "1", 2281: "1", 2283: "1", 2284: "1", 2285: "1", 2286: "1", 2288: "1", 2289: "1", 2290: "1", 2291: "1", 2293: "1", 2294: "1", 2295: "1", 2297: "1", 2299: "1", 2266: "1", 2269: "1", 2282: "1", 2287: "1", 2292: "1", 2296: "1", 2298: "1", 2300: "1", 1514: "2", 1502: "1", 2302: "2", 2301: "2", 2220: "1", 2221: "1", 2327: "1", 2328: "1", 2329: "1", 2330: "1", 2331: "1", 2332: "1", 2333: "1", 2334: "1", 2335: "1", 770: "1", 2336: "1", 2218: "1", 2219: "1", 2337: "1", 2343: "1", 2342: "1", 2338: "1", 2339: "1", 2340: "1", 2341: "1", 2344: "1", 2345: "1", 400: "2", 401: "1", 1666: "1", 1667: "1", 1668: "1", 2319: "1", 2320: "1", 2326: "1", 2325: "1", 2324: "1", 2323: "1", 2322: "1", 2321: "1", 2357: "1", 2358: "1", 2359: "1", 2360: "2", 2361: "2", 2362: "2", 2363: "2", 2364: "2", 2365: "1", 2366: "2", 2367: "2", 402: "1", 403: "1", 1616: "2", 1617: "1", 1618: "1", 1619: "1", 1620: "1", 1621: "1", 1622: "1", 1623: "1", 1624: "1", 1652: "1", 1920: "2", 1921: "2", 1922: "2", 1923: "3", 1924: "2", 1925: "2", 1926: "2", 2377: "1", 2378: "1", 2379: "1", 2380: "1", 2381: "1", 2382: "1", 2383: "1", 2384: "1", 2385: "1", 2386: "1", 2387: "1", 2388: "1", 2389: "1", 2390: "1", 2391: "1", 1912: "1", 1913: "1", 1914: "1", 1915: "1", 1916: "1", 1917: "1", 1918: "1", 1919: "1", 2392: "1", 2393: "1", 2368: "1", 2369: "1", 2370: "1", 2371: "1", 2372: "1", };var opt_list = [196,197,75,80,53,193,57,191,109,74,202,85,98,107,178,203,180,213,141,224,211,121,56,234,235,184,185,201,236,237,200,238]; var more_txt = [], less_txt = [], optTmp = [], optTmpVal = [], isStock = 0; var changeStock = 0; var sid = '473'; var gwpurl = 'https://gwp.brweb.pl/i/index.php?path=/i/473/'; var imgLimit = '18'; var moreLabel = '+ więcej'; var lessLabel = '- mniej'; var showMLcnt = 0; var prevMopen = ''; var selectLangVal = ['','wybierz','choose','wählen','Vybrat','vali','izvēlēties','pasirinkti','választ','vyberte si','вибрати','-1']; 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 = '

'+e.title+'

'; 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 = '

'+e.title+'

'; console.log(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 setValToInput(optInput,optValue) { if (optInput) { optInput.value = optValue; } else { setTimeout(function() { setValToInput(optInput,optValue); }, 500); } } function selectClick(e) { var id = e.id; var aId = id.split('__'); var optId = aId[0].replace('option_',''); var srl = document.getElementsByName(aId[0]); var sr = null; var optInput = null; var optValue = null; for( var k = 0; k < srl.length; k++){ if (srl[k].tagName == 'H-DROPDOWN-CONTENT') { sr = srl[k]; } if (srl[k].tagName == 'INPUT') { optInput = srl[k]; } } if (sr == null) { srl[1].click(); setTimeout(function() { selectClick(e); }, 500); return false; } sr = document.getElementsByTagName('H-OPTION'); for( var k = 0; k < sr.length; k++){ if (sr[k].value == aId[1]) { sr[k].click(); optValue = aId[1]; /* if (e.parentNode.classList.contains('gwp-opt-sel')) { optValue = ''; } */ setValToInput(optInput,optValue); var aSO = aId[0].split('_'); var soptid = aSO[1]; if (document.getElementById('gwp_div_title_'+soptid)) document.getElementById('gwp_div_title_'+soptid).innerHTML = e.title; if (window.innerWidth < 700) showPrevMobile(e); } } 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 radioClick(e) { var id = e.id; if (window.innerWidth < 700) showPrevMobile(e); var aId = id.split('__'); document.getElementById(aId[0].replaceAll('_','-')+'-'+aId[1]).click(); var aSO = aId[0].split('_'); var soptid = aSO[1]; if (document.getElementById('gwp_div_title_'+soptid)) document.getElementById('gwp_div_title_'+soptid).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 pv = document.getElementsByTagName('product-variants')[0]; var radiov = ''; var srl = document.getElementsByName('option_'+opt_id); if (pv && srl.length == 0) { radiov = '_'+pv.getAttribute("product-instance-key"); srl = document.getElementsByName('option_'+opt_id+radiov); } if (srl.length == 0) { return; } var optValue = ''; var sr = null; if (srl[0].tagName == 'H-DROPDOWN') { srl[0].style.display = 'none'; var smain = srl[0].parentElement.parentElement.parentElement.parentElement; for( var k = 0; k < srl.length; k++){ if (srl[k].tagName == 'H-DROPDOWN-CONTENT') { sr = srl[k]; } if (srl[k].tagName == 'INPUT') { optValue = srl[k].value; } } if (sr == null) { srl[1].click(); setTimeout(function() { var srl = document.getElementsByName('option_'+opt_id); for( var k = 0; k < srl.length; k++){ if (srl[k].tagName == 'H-DROPDOWN-CONTENT') { sr = srl[k]; } if (srl[k].tagName == 'INPUT') { optValue = srl[k].value; } } }, 500); } var optType = 'S'; var s = sr; var c = sr.getElementsByTagName('h-option'); } else { var optType = 'R'; var s = srl[0].parentElement.parentElement.parentElement.parentElement; var smain = srl[0].parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement; if (sid == 497 || sid == 562 || sid == 588 || sid == 602) { s = srl[0].parentElement.parentElement.parentElement.parentElement.parentElement; smain = srl[0].parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement; } s.parentElement.style.display = 'none'; var c = srl; for( var j = 0; j < c.length; j++){ if (c[j].checked == true) { optValue = c[j].dataset.userValue; } } } isDiff = (!optTmp[opt_id] || optTmp[opt_id] != s.innerText.replace(/\s+/g, '') || (sid != 367 && optTmpVal[opt_id] != optValue)) ? 1 : 0; if (sid == 562) { isDiff = (!optTmp[opt_id] || optTmp[opt_id] != s.innerHTML.replace(/\s+/g, '') || (optTmpVal[opt_id] != optValue)) ? 1 : 0; } if (smain.getAttribute("stock-order") > 0 && smain.className.indexOf('loading') != -1) { isLoading++; } if (isDiff == 1 || changeStock == 1) { var sOptions = '', sPreview = '', sTitle = ''; var imgNo = 0; var optCnt = (optType == 'S') ? c.length : c.length; if (optType == 'R') { for( var j = 0; j < c.length; j++){ if (c[j].parentElement.getAttribute("hidden") != null) { optCnt--; } } } 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' && !c[j].hidden) { imgNo++; var smIsSelect = ((optType == 'S' && (optValue == 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 = c[j].dataset.userValue ; var smItemUnavailable = (c[j].hasAttribute('data-option-value-unavailable')) ? ' gwp-opt-unavailable' : ''; if (c[j].dataset.priceModifier && c[j].dataset.priceModifier != '') { oName += ' (' + c[j].dataset.priceModifier + ')'; } oId = (optType == 'S') ? s.name : 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)) { if (document.getElementById('gwp_div_title_'+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; if (optType == 'S') { var div4title = s.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.getElementsByTagName('LABEL')[0]; } else { var div4title = s.parentElement.parentElement.parentElement.getElementsByTagName('LABEL')[0]; } div4title.appendChild(div_title); if (optType == 'S') { s.parentElement.parentElement.parentElement.parentElement.appendChild(div_prev); s.parentElement.parentElement.parentElement.parentElement.appendChild(div_list); } else { s.parentElement.parentElement.parentElement.appendChild(div_prev); s.parentElement.parentElement.parentElement.appendChild(div_list); } } optTmp[opt_id] = s.innerText.replace(/\s+/g, ''); optTmpVal[opt_id] = optValue; if (sid == 562) { optTmp[opt_id] = s.innerHTML.replace(/\s+/g, ''); } } }); changeStock = 0; if (isLoading > 0 || isDiff == 1) { setTimeout(showGWP,1000); } } window.onload = function(){ showGWP(); }; showGWP(); setTimeout(showGWP,1000); if (!gwpstylem) { var gwpstylem = document.createElement('style'); gwpstylem.textContent = '.gwp-opt-prev-title {font-size: 10px;}.gwp-opt-name {font-size: 8px;white-space: normal; word-wrap: break-word; overflow-wrap: break-word;padding-bottom:0px;}.gwp-opt-more div { font-size: 10px; text-align: center; line-height: 8px; left: 0px; width: 100%;}'; document.head.appendChild(gwpstylem); }