function ihFunction() { var popup = document.getElementById('ihPopup'); var myGdbr = document.getElementById('kb-container'); if (myGdbr !== null) { if (document.cookie.indexOf('is_mobile=1') !== -1) { popup.style.bottom = "108px"; } else { popup.style.bottom = "42px"; } } popup.classList.toggle("show"); } function ihmblink() { document.getElementById('ihmobilebanner').style.display = "none"; document.cookie = "infoupdate=1"; } function ouibouncemodal() { var myDiv = document.getElementById('ouibounce-modal'); var div_underlay = document.createElement('DIV'); myDiv.appendChild(div_underlay); div_underlay.classList.add("underlay"); var div_modal = document.createElement('DIV'); myDiv.appendChild(div_modal); div_modal.classList.add("modal"); var div_modal_title = document.createElement('DIV'); div_modal.appendChild(div_modal_title); div_modal_title.classList.add("modal-title"); var h3 = document.createElement('H3'); div_modal_title.appendChild(h3); var title = document.createTextNode("INFORMATION REQUEST"); h3.appendChild(title); var div_modal_body = document.createElement('DIV'); div_modal.appendChild(div_modal_body); div_modal_body.classList.add("modal-body"); var p = document.createElement("P"); div_modal_body.appendChild(p); var inst = document.createTextNode("To ensure our records are up-to-date, we are asking all owners to fill out the Owner Information Update Form."); p.appendChild(inst); var a = document.createElement('A'); div_modal_body.appendChild(a); a.href = '/owner-information-update-form.html'; var form = document.createElement("FORM"); a.appendChild(form); var input = document.createElement("INPUT"); form.appendChild(input); input.type = 'button'; input.classList.add('modalButton'); input.value = 'Owner Information Update Form'; var div_modal_footer = document.createElement("DIV"); div_modal.appendChild(div_modal_footer); div_modal_footer.classList.add("modal-footer"); var p_foot = document.createElement("P"); div_modal_footer.appendChild(p_foot); var foot_text = document.createTextNode('maybe later'); p_foot.appendChild(foot_text); if (document.cookie.indexOf('initOuibounce=') !== -1) { if (document.cookie.indexOf('WeeblySession=') === -1 && document.cookie.indexOf('is_mobile=1') === -1 && document.cookie.indexOf('site_session=') === -1 && document.cookie.indexOf('infoupdate=1') === -1) { var _ouibounce = ouibounce(document.getElementById('ouibounce-modal'), { aggressive: false, timer: 0, delay: 200, callback: function () { console.log('ouibounce fired!'); } }); $('body').on('click', function () { $('#ouibounce-modal').hide(); }); $('#ouibounce-modal .modal-footer').on('click', function () { if (document.cookie.indexOf('infoupdate=1') === -1) { document.cookie = "infoupdate=1"; } $('#ouibounce-modal').hide(); }); $('#ouibounce-modal .modal').on('click', function (e) { e.stopPropagation(); }); } } else { document.cookie = 'initOuibounce=1'; } }