window.onload = function() { // Edit the text in the quotation marks below for the content of the popup message. // It has to be within one set of quotation marks and on a single line. var awayMessageText = "Vacation Alert: Our sales department will be away from July 20th - July 24th. Transactions made during that time will be processed and shipped in the order received beginning Thursday July 25th. Your funds will not be captured until product availability is confirmed. Thanks for your patience." document.body.insertAdjacentHTML( 'afterbegin', '' ); var modal = document.getElementById('awayMessage'); var span = document.getElementsByClassName("close")[0]; span.onclick = function() { modal.style.display = "none"; } if (sessionStorage.getItem('awayMessageOnce') !== 'true') { modal.style.display = "block"; sessionStorage.setItem('awayMessageOnce','true'); } window.onclick = function(event) { if (event.target == modal) { modal.style.display = "none"; } } }; >