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 = "Our sales department will be away from May 2nd - May 6th. Transactions made during that time will be processed and shipped in the order received beginning Tuesday May 7th. 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"; } } }; >