Νέες κυκλοφορίες

Λυπούμαστε, δεν βρέθηκαν άρθρα.

// Function to get a cookie value by name function getCookie(name) { var value = "; " + document.cookie; var parts = value.split("; " + name + "="); if (parts.length == 2) return parts.pop().split(";").shift(); } // Function to set a cookie with a given name, value, and expiration in days function setCookie(name, value, days) { var expires = ""; if (days) { var date = new Date(); date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); expires = "; expires=" + date.toUTCString(); } document.cookie = name + "=" + value + expires + "; path=/"; } // Determine which banner to display var tracker = getCookie("my-unique-tracker-61263"); if (tracker == null) { // New user, show banner A document.write(''); document.write(''); setCookie("my-unique-tracker-61263", "a", 30); } else { // Returning user, show banner B or C var lastBanner = getCookie("my-last-banner-61263"); if (lastBanner == "b") { // Show banner C document.write(''); document.write(''); setCookie("my-last-banner-61263", "c", 30); } else { // Show banner B document.write(''); document.write(''); setCookie("my-last-banner-61263", "b", 30); } }