// define a custom 'fullscreen' attribute delete krpano.fullscreen; krpano.registerattribute("fullscreen", false, function(newstate) { if(newstate) { // when setting fullscreen to true, redirect the top frame to the iframe url try { top.location = window.location; } catch(err) {} } } , function() { return false; }); ]]>