function sethash(h) { window.top.history.replaceState(undefined, undefined, "#" + h); } var myHashchangeHandler = function() { var krpano=document.getElementById('krpanoSWFObject'); krpano.call('stopdelayedcall(set_current_pano_view_hash); if(garrows_settings.scenes_wobbling_global, set(garrows_settings.scenes_wobbling, false); stopdelayedcall(panomovement);); stoptween(view.vlookat, view.hlookat);'); readhash(1); krpano.call('glinks_startup(); delayedcall(calc(glinks_settings.glinks_transitiontime + 1), if(garrows_settings.scenes_wobbling_global, set(garrows_settings.scenes_wobbling, true); panomovement();););'); } if("addEventListener" in window) { window.addEventListener("hashchange", myHashchangeHandler, false); } else if ("attachEvent" in window) { window.attachEvent( "onhashchange", myHashchangeHandler); } var startscene; var starthlookat; var startvlookat; var startfov; var hash; readhash(); function readhash(force) { hash = window.location.href.split('#')[1]; if (typeof hash == 'undefined') { hash = window.top.location.href.split('#')[1]; } if (typeof hash != 'undefined' || force == '1') { startscene = hash.split('/')[0]; starthlookat = hash.split('/')[1]; startvlookat = hash.split('/')[2]; startfov = hash.split('/')[3]; } } function createvars() { var krpano=document.getElementById('krpanoSWFObject'); if (startscene && starthlookat && startvlookat && startfov) { krpano.call('set(startscene,'+startscene+');'); krpano.call('set(starthlookat,'+starthlookat+');'); krpano.call('set(startvlookat,'+startvlookat+');'); krpano.call('set(startfov,'+startfov+');'); } } function copyURLToClipboard() { window.prompt("Copy URL to clipboard", window.top.location); } --?>