modeMode = '1'; function toggleSRM() { document.body.scrollTop = 0; document.documentElement.scrollTop = 0; document.getElementById('destini').scrolling = 'yes'; if (modeMode == '1') { document.getElementById('destini').src = 'https://destinilocators.com/control/srm/index.php?CLIENT=vanleeuwen&DEFCTRY=2'; modeMode = '2'; document.getElementById('destini').focus(); document.getElementById('srmfooter').innerHTML = 'The locator is now in Screen Reader Mode. To return to the default display mode, refresh the web page.'; srSpeak('The locator is now in Screen Reader Mode. To return to the default display mode, refresh the web page. Press the TAB key to continue.','assertive'); setTimeout("document.getElementById('destini').focus(); document.getElementById('destini').contentDocument.body.focus();",1000); } else { /* document.getElementById('destini').src = 'https://destinilocators.com/vanleeuwen/site/locator.php'; modeMode = '1'; document.getElementById('destini').focus(); srSpeak('The locator is now in default display mode. Press TAB to continue.','assertive'); */ } } function KeyPress(e) { var evtobj = window.event? event : e if (evtobj.keyCode == 83 && evtobj.ctrlKey && evtobj.altKey) { toggleSRM(); } } function srSpeak(text, priority) { var el = document.createElement("div"); var id = "speak-" + Date.now(); el.setAttribute("id", id); el.setAttribute("style", "position:absolute; left:-1000000000px"); el.setAttribute("aria-live", priority || "polite"); document.body.appendChild(el); window.setTimeout(function () { document.getElementById(id).innerHTML = text; }, 100); window.setTimeout(function () { document.body.removeChild(document.getElementById(id)); }, 1000); } document.onkeydown = KeyPress; function introSRM() { if (modeMode == '1') { srSpeak('Our store locator has a Screen Reader Mode that is optimized for visually impaired and mobility impaired users. To toggle Screen Reader Mode, press CONTROL + ALTERNATE + S','assertive'); } } function loadIframe(){ var html = ''; html += '
'; document.write(html); } loadIframe(); function loadScript(url, callback){ var head = document.getElementsByTagName('head')[0]; var script = document.createElement('script'); script.type = 'text/javascript'; script.src = url; script.onreadystatechange = callback; script.onload = callback; head.appendChild(script); } function loadResizeScript(){ loadScript('//destinilocators.com/control/gtm.js', function(){ }); if(window.location.protocol=='http:'){ loadScript('//destinilocators.com/control/pscript.js', function(){ }); }else{ loadScript('//destinilocators.com/control/dscript_s.js', function(){ }); } } if(window.jQuery){ loadResizeScript() }else{ loadScript('https://code.jquery.com/jquery-1.11.3.js', function(){ loadResizeScript() }); }