var cs_css = document.createElement('link'); cs_css.setAttribute('rel', 'stylesheet'); cs_css.setAttribute('type', 'text/css'); cs_css.setAttribute('href', '//promos.camsoda.com/promos/im/im3.css?v2b'); var cs_html = '' + ''; document.write(''); document.write(''); document.write(''); var cs_timer; var cs_im_height; window.onload = function() { document.getElementsByTagName("head")[0].appendChild(cs_css); var dom_dump = document.createElement('div'); document.body.appendChild(dom_dump); dom_dump.innerHTML = cs_html; setTimeout("cs_im_init()", 3000); } function cs_im_init() { if (cs.cookies.readCookie("csc_2")) { return; } cs_im_height = 276; document.getElementById('cs_im_container').style.display = 'block'; cs_im_trigger(); } function cs_im_trigger() { if (cs_im_height > 0) { cs_im_height -= 6; var cs_height_string = cs_im_height * -1 + "px"; document.getElementById("cs_im").style.bottom = cs_height_string; cs_timer = setTimeout("cs_im_trigger()", 5); } } function cs_hide_promo() { document.getElementById('cs_im_container').style.display = 'none'; cs.cookies.createCookie("csc_2", "1", 1); } // redirect to specified link function cs_link() { window.open('//www.camsoda.com/enter.php?close=1&id=etourx&token_form=1&cmp=tori_1&t=best', '_blank'); } var cs = {}; //leave here cs.cookies = { expires: "", createCookie : function(name, value, days) { if (days) { var date = new Date(); date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); cs.cookies.expires = "; expires=" + date.toGMTString(); } else { cs.cookies.expires = ""; } document.cookie = name + "=" + value + cs.cookies.expires + "; path=/"; }, readCookie : function(name) { var nameEQ = name + "="; var ca = document.cookie.split(";"); for (var i = 0; i < ca.length; i++) { var c = ca[i]; while(c.charAt(0) === " ") { c = c.substring(1, c.length); } if (c.indexOf(nameEQ) === 0) { return c.substring(nameEQ.length, c.length); } } return null; }, eraseCookie : function(name) { this.createCookie(name, "", - 1); } };