var setCookie = function(name, value, day) { var date = new Date(); date.setTime(date.getTime() + day * 60 * 60 * 24 * 1000); document.cookie = name + '=' + value + ';expires=' + date.toUTCString() + ';path=/'; }; var getCookie = function(name) { var value = document.cookie.match('(^|;) ?' + name + '=([^;]*)(;|$)'); return value? value[2] : null; }; function notToday(el, name_popup){ setCookie(name_popup, 'yes', 1); document.body.removeChild(el.parentElement.parentElement); } function close_popup(el){ document.body.removeChild(el.parentElement.parentElement); } function createPopup(name_popup, url_img, x, y, link){ if(x == undefined) x = 0; if(y == undefined) y = 0; if(link == undefined) link = ''; if(getCookie(name_popup) == 'yes') return; var el_popup = document.createElement('div'); el_popup.className = 'ypopup'; el_popup.id = name_popup; el_popup.innerHTML = "