/* Map Intergration for articles -- James james@hotelmap.com **/ /* iDevice Intercept */ var iDevice = false ; var iDeviceLow = false ; var iSpeed = (iDevice) ? 1 : 15; /* Speed Determiner */ /* Code Load Dependents */ var isIE9less = false; var mapInterfaceLoaded = false ; var codalInterfaceLoad = false; /* closeMap - Closes the map element */ function closeMap() { // alert("Mush"); document.getElementById("push").style.display = "none" ; document.getElementById("lions").style.display = "" ; hotelmap_lite.utility.transparency(document.getElementById("push"),0); document.body.style.overflow = 'auto'; document.body.style.overflowY = 'scroll'; mapInterfaceLoaded = false ; if ( !location.href.match("#") || location.href.match("#map") ) { location.href = '#'; } setTimeout(function(){ if ( location.href.match("#") ) location.href=location.href; },300); } /* showMap - Init a non existant map or show the existing */ function showMap(){ if ( !codalInterfaceLoad ) { LTMapSystem(); } else { document.getElementById("push").style.display = "" ; document.getElementById("lions").style.display = "none" ; location.href = '#map'; hotelmap_lite.utility.transparency(document.getElementById("push"),100); mapInterfaceLoaded = true ; } } /* Map Interval Catch */ if ( po ) clearInterval(po); var po = setInterval( function(){ if ( !location.href.match("#map") && mapInterfaceLoaded ) { try { closeMap(); } catch ( eer ) { console.log("Hello1: " + eer.message); } } if ( location.href.match("#map") && !mapInterfaceLoaded ) { try { showMap(); } catch ( eee ) { console.log("Hello12: " + eee.message); } } }, 1000); function LTMapSystem() { if ( !mapInterfaceLoaded ) { setTimeout(function(){ showMap(); } , 500); } else { closeMap(); } try { if ( !codalInterfaceLoad ) { hotelmap_lite.init.close_source=1; hotelmap_lite.londontown.adjust_fs_position = true; hotelmap_lite.controls.zoom.top_place = 55; // console.log("Once"); var dimensions = hotelmap_lite.utility.dimensions() ; hotelmap_lite.init.generate_views("push", dimensions[0], dimensions[1], 0, 0, 5 ) ; hotelmap_lite.controls.zoom.initialise_control_view(); hotelmap_lite.views.fscreen.onmousedown = function() { closeMap(); } hotelmap_lite.views.fscreen.activate = function() { hotelmap_lite.fullscreen=true; hotelmap_lite.basic.fullscreen(hotelmap_lite.fullscreen); hotelmap_lite.tiling.images(); } hotelmap_lite.views.fscreen.activate(); hotelmap_lite.tiling.images(); setTimeout(function(){ hotelmap_lite.tiling.images(); }, 1000 ); codalInterfaceLoad = true; hotelmap_lite.utility.scrolls.article_zone(); hotelmap_lite.events.meta_capture(); hotelmap_lite.views.fscreen.style.display= ''; // hide fs option // hotelmap_lite.views.fscreen.src = "/hotels/resource/images/close_map.png"; hotelmap_lite.views.fscreen.style.left = hotelmap_lite.zoom_control.style.left; hotelmap_lite.views.fscreen.style.top = '20px'; // ** // Amendment: May 2012 - Push Tab Style On via article // ** setTimeout(function(){ hotelmap_lite.view_tab.masternode.shut(); hotelmap_lite.view_tab.show(); } , 1600 ); hotelmap_lite.views.fscreen.activate(); // Activate full screen mode } } catch ( lite_init_exception ) { //alert("Exception in code point: " + lite_init_exception.message ) ; console.log("-- " + lite_init_exception.message); } };