[script]"use strict";var div = document.getElementsByClassName('product_box_widget');div[0].style.display = "none";div[1].style.display = "none";div[2].style.display = "none";div[3].style.display = "none";div[4].style.display = "none";div[5].style.display = "none";div[6].style.display = "none";var dayImage = document.getElementById('dayimage');dayImage.style.display = "none";var nightImage = document.getElementById('nightImage');nightImage.style.display = "none";var timer = document.getElementById('timer-nocne');timer.style.display = "none";var setImage = document.createElement('img');var setLink = document.createElement('a');setLink.target = "_blank";setLink.title = "SPRAWDŹ PRODUKT!";var productPhoto = [];/* Tutaj wklejamy ścieżkę do baneru z produktem - nr w nawiasie kwadratowy * m * * j * e * st dniem miesiąca na który jestzaplanowana dana wyprzedaż */productPhoto[27] = "/media/cache/resolve/filemanager_original/images/marketing_pr/nocne-wyprzedaze/2023/sty/27/HIT.jpg";productPhoto[30] = "/media/cache/resolve/filemanager_original/images/marketing_pr/nocne-wyprzedaze/2023/sty/30/HIT.jpg";productPhoto[31] = "/media/cache/resolve/filemanager_original/images/marketing_pr/nocne-wyprzedaze/2023/sty/31/HIT.jpg";productPhoto[1] = "/media/cache/resolve/filemanager_original/images/marketing_pr/nocne-wyprzedaze/2023/lut/1/HIT.jpg";productPhoto[2] = "/media/cache/resolve/filemanager_original/images/marketing_pr/nocne-wyprzedaze/2023/lut/2/HIT.jpg";productPhoto[3] = "/media/cache/resolve/filemanager_original/images/marketing_pr/nocne-wyprzedaze/2023/lut/3/HIT.jpg";var productLink = [];/* Miejsce wklejenie linku do produktu na Vobis - [dzień miesiąca wyprzedaży] */productLink[27] = "https://vobis.pl/komputery/komputery-stacjonarne/komputer-apple-mac-mini-apple-m1-512gb-ssd";productLink[30] = "https://vobis.pl/komputery/urzadzenia-wskazujace/myszki/microsoft-bluetooth-mouse-it-pl-pt-es-hdwr-peach";productLink[31] = "https://vobis.pl/komputery/laptopy/chromebook-cx1-cx1101-cb1101cma-gj0021";productLink[1] = "https://vobis.pl/dom-i-ogrod/grzejniki/grzejnik-olejowy-ariete-838-04-green";productLink[2] = "https://vobis.pl/komputery/dyski-twarde/dysk-ssd-goodram-cl100-gen-3-480gb";productLink[3] = "https://vobis.pl/smartfony-i-telefony/glosniki-bezprzewodowe/sharp-gx-bt180-rd";document .getElementById('dayimage') .appendChild(setLink) .appendChild(setImage);var setNightLink = document.createElement('img');var steps = [];/* Miejsce scieżki do grafiki z krokami [data - dzień miesiąca] */steps[27] = "/media/cache/resolve/filemanager_original/images/marketing_pr/nocne-wyprzedaze/sie/5/3Kroki.jpg";steps[30] = "/media/cache/resolve/filemanager_original/images/marketing_pr/nocne-wyprzedaze/sie/5/3Kroki.jpg";steps[31] = "/media/cache/resolve/filemanager_original/images/marketing_pr/nocne-wyprzedaze/sie/5/3Kroki.jpg";steps[1] = "/media/cache/resolve/filemanager_original/images/marketing_pr/nocne-wyprzedaze/sie/5/3Kroki.jpg";steps[2] = "/media/cache/resolve/filemanager_original/images/marketing_pr/nocne-wyprzedaze/sie/5/3Kroki.jpg";steps[3] = "/media/cache/resolve/filemanager_original/images/marketing_pr/nocne-wyprzedaze/sie/5/3Kroki.jpg";document .getElementById('nightImage') .appendChild(setNightLink);var boxArr = [];/* Liczba w nawiasie kwadratowym odpowiada dacie - dzień miesiąca, należy * t * a * k * ż * e ustawić odpowiedni box nastronie licząc od góry - zero jako * jed * en * */boxArr[27] = 0;boxArr[30] = 1;boxArr[31] = 2;boxArr[1] = 3;boxArr[2] = 4;boxArr[3] = 5;boxArr[26] = 6;function setTime() { var time = new Date(); var hour = time.getHours(); var day = Number(time.getDate()); var setHourMorning = 6; var setHourEvening = 19; if (hour >= setHourMorning && hour < setHourEvening) { nightImage.style.display = "none"; dayImage.style.display = "block"; timer.style.display = "block"; setLink.href = productLink[day]; setImage.src = productPhoto[day]; } else if (hour < setHourMorning) { setNightLink.src = steps[day - 1]; div[boxArr[day - 1]].style.display = "block"; timer.style.display = "none"; dayImage.style.display = "none"; nightImage.style.display = "block"; } else { setNightLink.src = steps[day]; div[boxArr[day]].style.display = "block"; timer.style.display = "none"; dayImage.style.display = "none"; nightImage.style.display = "block"; }}setInterval(setTime, 500);var odl = new Date('Oct 27, 2023 19: 00: 00 ').getTime();var x = setInterval(function () { var now = new Date().getTime(); var distance = odl - now; var hours = Math.floor(distance % (1000 * 60 * 60 * 24) / (1000 * 60 * 60)); var minutes = Math.floor(distance % (1000 * 60 * 60) / (1000 * 60)); var seconds = Math.floor(distance % (1000 * 60) / 1000); document .getElementById('demo') .innerHTML = hours + 'h ' + minutes + 'm ' + seconds + 's '; if (distance < 0) { clearInterval(x); }}, 1000);[/script]
Zapisz się do newslettera

Proponowane kategorie

    Proponowane produkty