<?xml version="1.0" encoding="UTF-8"?>
<krpano version="1.19-pr16">

    
  <!-- Spot Style - Default Point Spot Style -->


  <style name="IconDefaultPointSpotStyle"
         url="%FIRSTXML%/spots/hotspot_animated_user_defaultpoint0.png"
         visible="false"
         frame="0"
         lastframe="19"
         framewidth="64"
         frameheight="64"
         stopspotsequence="false"
         crop="0|0|64|64"
         edge="center"
         onloaded="startspotanimation(0.1);"
         onhover="onhoverIconDefaultPointSpotStyle"
         onover="onoverIconDefaultPointSpotStyle"
         onout="onoutIconDefaultPointSpotStyle"


         />
  <action name="onhoverIconDefaultPointSpotStyle">
    showtooltip('hotspot');
  </action>
  <action name="onoverIconDefaultPointSpotStyle">


pauseautorotation(forcehotspot);

  </action>
  <action name="onoutIconDefaultPointSpotStyle">
    hideTooltip();


resumeautorotation(forcehotspot);

  </action>



    
  <!-- Spot Style - Default Point Spot Style 1 -->


  <style name="IconDefaultPointSpotStyle1"
         url="%FIRSTXML%/spots/hotspot_information_sequence_user_defaultpoint1.png"
         visible="false"
         frame="0"
         lastframe="9"
         framewidth="42"
         frameheight="67"
         stopspotsequence="false"
         crop="0|0|42|67"
         edge="center"
         onloaded="startspotanimation(0.1);"
         onhover="onhoverIconDefaultPointSpotStyle1"
         onover="onoverIconDefaultPointSpotStyle1"
         onout="onoutIconDefaultPointSpotStyle1"


         />
  <action name="onhoverIconDefaultPointSpotStyle1">
    showtooltip('hotspot');
  </action>
  <action name="onoverIconDefaultPointSpotStyle1">


pauseautorotation(forcehotspot);

  </action>
  <action name="onoutIconDefaultPointSpotStyle1">
    hideTooltip();


resumeautorotation(forcehotspot);

  </action>


           <layer align="bottomright" x="50" y="30" zorder="1"  name="logo-modif" keep="true" visible="false" alpha="0" autoalpha="true" capture="false"     tooltip="logo-modiftooltipText" onhover="showTooltip('plugin');" onout="hideTooltip();"     url="%FIRSTXML%/graphics/logo.modif/bt360_logo_button.png"   onclick="
getmessage(urltoopen,logo-modifwebsiteurl);openurl(get(urltoopen),_blank);
"                 height.mobile="30" width.mobile="100"   /> <action name="hidelogo-modif"> set(layer[logo-modif].visible, false); </action> <action name="showlogo-modif">  if (tour_displaycontrols,  set(layer[logo-modif].visible, true);  );  </action>        <events name="logo-modifLogoEditEvents" onnewscene="logo-modifcheckIDs" keep="true" devices="html5"/> <action name="logo-modifcheckIDs" type="Javascript"><![CDATA[     krpano.call('tween(layer[logo-modif].alpha, 1, 1');  ]]></action>  
<!-- ********* -->
<!-- Gyroscope -->
<!-- ********* -->


<plugin name="gyroscope"
        url="%FIRSTXML%/graphics/gyro2.js"
        keep="true"
        devices="no-desktop.and.html5"

        onunavailable="checkGyroUnavailable();"
        sensor_mode="1"
        friction="auto"
        autocalibration="true"
        touch_mode="full"
        onavailable="delayedcall(1, checkGyroAvailability(););"
        enabled="false"
        activated="false"
        />

<events name="gyroscopeEvents" onnewpano="planarGyroscopeTest();" keep="true" />

<action name="planarGyroscopeTest">
  if(plugin[gyroscope],
    if(scene[get(xml.scene)].full360,
      set(sceneisfull360, false);
      sub(viewhfov, panoview.hmax, panoview.hmin);
      if (viewhfov == 360,
        sub(viewvfov, panoview.vmax, panoview.vmin);
        if (viewvfov == 180,
          set(sceneisfull360, true);
        );
      );
      if (sceneisfull360,
        set(plugin[gyroscope].camroll, true);
      ,
        set(plugin[gyroscope].camroll, false);
      );
    ,
      set(plugin[gyroscope].camroll, false);
    );
  );
</action>

<action name="changeGyroscopeState">
  if(plugin[gyroscope],
    if (plugin[gyroscope].isavailable,
      if(%1,
        set(plugin[gyroscope].activated,true);
      ,
        set(plugin[gyroscope].activated,false);
      );
      if (%1 != plugin[gyroscope].enabled,
        if(plugin[gyroscope].activated,
          switch(plugin[gyroscope].enabled);
        ,
          set(plugin[gyroscope].enabled, false);
        );
        if (plugin[gyroscope].enabled, events.dispatch(ongyroscopeon);, events.dispatch(ongyroscopeoff););
      );
    );
  );
</action>

<action name="checkGyroAvailability">
  if(plugin[gyroscope],
    if (plugin[gyroscope].isavailable,
      
      set(sceneisfull360, false);
      if (scene[get(xml.scene)].full360,
        sub(viewhfov, panoview.hmax, panoview.hmin);
        if (viewhfov == 360,
          sub(viewvfov, panoview.vmax, panoview.vmin);
          if (viewvfov == 180,
            set(sceneisfull360, true);
          );
        );
      );
      set(delaythegyrocheck, false);
      if (sceneisfull360 AND tour_firstlittleplanet, set(delaythegyrocheck, true));

      ifnot(delaythegyrocheck,
        set(tour_gyroscopedevices, true);
        events.dispatch(ongyroscopeavailable);
      ,
        delayedcall(1, checkGyroAvailability(););
      );
    ,
      set(tour_gyroscopedevices, false);
    );
    if (plugin[gyroscope].enabled, events.dispatch(ongyroscopeon);, events.dispatch(ongyroscopeoff););
  ,
    checkGyroUnavailable();
  );
</action>

<action name="checkGyroUnavailable">
  set(plugin[gyroscope].activated, false);
  set(plugin[gyroscope].enabled, false);
  set(tour_gyroscopedevices, false);
  events.dispatch(ongyroscopeunavailable);
</action>

<!-- ********** -->
<!-- Gyro Button -->
<!-- id : gyroButton -->
<!-- ********** -->


  <layer name="gyroButton"
         keep="true"
         url="%FIRSTXML%/graphics/gyrobutton/disable_gyro2.png" 
         align="bottomright"
         x="155"
         y="30"
         zorder="3"
         tooltip=""
         onhover="gyroButtonOnHover"
         state="true"
         onclick="gyroButtonOnClick"
         onout="hideTooltip();"
         height="30"
         width="30"
         visible="false"
         />

  <action name="gyroButtonOnHover">
    if (state,
      set(tooltip, gyroButtonfirsttooltip);
     ,
      set(tooltip, gyroButtonsecondtooltip);
    );
    if (tooltip != "", showTooltip(bottomright,''););
  </action>
  <action name="gyroButtonOnClick">
    if (state,disableGyroscope();

     ,enableGyroscope();

    );
  </action>

  <events name="gyroButtonevents" 
    onTourStart="gyroButtonShowGyroscopeButtons();"
    hidetourcontrols="hidegyroButton();" 
    showtourcontrols="gyroButtonShowGyroscopeButtons();" 
	ongyroscopeavailable="gyroButtonupdateGyroscopeButtonsAvailability();"
	ongyroscopeunavailable="gyroButtonupdateGyroscopeButtonsAvailability();"
	ongyroscopeon="gyroButtonenableGyroscopeButtons(true);"
	ongyroscopeoff="gyroButtonenableGyroscopeButtons(false);"
    keep="true" device="html5" />

  <events name="gyroButtonDesktopEvents" onTourStart="delayedcall(gyroButton_desktopdelay,3.0,ifnot(plugin[gyroscope],gyroButtonHideGyroscopeButtons(true);););" keep="true" device="desktop" />

  <action name="hidegyroButton">if(layer[gyroButton],set(layer[gyroButton].visible, false););</action>
  <action name="showgyroButton">if(layer[gyroButton],set(layer[gyroButton].visible, true););</action>


  <krpano gyroButtongyroscopeavailable="false" gyroButtongyroscopeenabled="false"/>
  <action name="gyroButtonupdateGyroscopeButtonsAvailability">
    stopdelayedcall(gyroButton_desktopdelay);
	if (tour_gyroscopedevices,
      set(gyroButtongyroscopeavailable, true);
      gyroButtonupdateGyroscopeButtons();
    ,
      set(gyroButtongyroscopeavailable, false);
      gyroButtonHideGyroscopeButtons(true);
    );
  </action>
  <action name="gyroButtonenableGyroscopeButtons">
    if (tour_gyroscopedevices,
      set(gyroButtongyroscopeenabled, %1);
      gyroButtonupdateGyroscopeButtons();
    );
  </action>
  
  <action name="gyroButtonHideGyroscopeButtons">
		hidegyroButton();
		if('%1' == 'true',
			removelayer(gyroButton);
			set(events[gyroButtonevents].name, null);
			set(events[gyroButtonDesktopEvents].name, null);
		);
	</action>
	<action name="gyroButtonShowGyroscopeButtons">
		if (gyroButtongyroscopeavailable,
			if (gyroButtongyroscopeenabled,

				set(layer[gyroButton].state, true);
				set(layer[gyroButton].url,%FIRSTXML%/graphics/gyrobutton/enable_gyro2.png);
			,
				set(layer[gyroButton].state, false);

				set(layer[gyroButton].url,%FIRSTXML%/graphics/gyrobutton/disable_gyro2.png);
			);
			showgyroButton();
		,
			set(layer[gyroButton].state, false);
			gyroButtonHideGyroscopeButtons();
		);
	</action>
	<action name="gyroButtonupdateGyroscopeButtons">
	if (tour_gyroscopedevices,
		if (tour_displaycontrols,
			gyroButtonShowGyroscopeButtons();
		,
			gyroButtonHideGyroscopeButtons();
		);
	,
		gyroButtonHideGyroscopeButtons();
	);
	</action>


<!-- ********** -->
<!-- Double Click -->
<!-- id : doubleclick -->
<!-- ********** -->
  <events name="doubleclick_events" keep="true" ondoubleclick="doubleclick_ondoubleclick"/>
  <action name="doubleclick_ondoubleclick">switchFullscreen();


  </action>
<!--	Plugin: DeviceCheck V1.5
	Author: Michael Brüning | Web: http://dev.compunics.com.ni/ | Mail: <M.Bruening@compunics.com.ni>
	Tested with: V2.5.9 on Linux
-->


<!-- Set DevCheckVars according to the enabled plugin-feature-list -->
<krpano ToggleButton_DevCheck_DeviceCheck="true" devices="desktop" />



<action name="Init_DeviceCheck" autorun="preinit">
if(debug, showlog(); );
	if( true,
		set( togglebtn_instance_DeviceCheck, 'togglebuttonevents' );
			Hide_ToggleBtn_DeviceCheck( get(togglebtn_instance_DeviceCheck) );
		);
	);
	if( '' != '',
		txtsplit('', ',', A_ToggleBtnInstances );
		for( set(i,0), i LT A_ToggleBtnInstances.count, inc(i),
			if( ToggleButton_DevCheck_DeviceCheck,
				txtadd( togglebtn_instance_DeviceCheck, 'togglebutton', get(A_ToggleBtnInstances[get(i)].value), 'events' );
				Hide_ToggleBtn_DeviceCheck( get(togglebtn_instance_DeviceCheck ));
			);
		);
	);

</action>

<!-- Actions for multi-instance-plugins -->
<action name="Hide_Btn_DeviceCheck">
	set( events[%1].onTourStart, '' );
	set( events[%1].showtourcontrols, '' );
</action>
<action name="Hide_ToggleBtn_DeviceCheck">
	set( events[%1].onTourStart, '' );
	set( events[%1].showtourcontrols, '' );
</action>
<action name="Hide_PSpecBtn_DeviceCheck">
	set( events[%1].onTourStart, '' );
	set( events[%1].showtourcontrols, '' );
	set( events[%1].onPanoStart, '' );
</action>
<action name="Hide_PSpecToggleBtn_DeviceCheck">
	set( events[%1].onTourStart, '' );
	set( events[%1].showtourcontrols, '' );
	set( events[%1].onPanoStart, '' );
</action>
<action name="Hide_Desc_DeviceCheck">
	set( events[%1].onTourStart, '' );
	set( events[%1].onshowtourinfo, '' );
	set( events[%1].showtourcontrols, '' );
	set( events[%1].changetourlanguage, '' );
</action>
<action name="Hide_Title_DeviceCheck">
	set( events[%1].onnewpano, '' );
	set( events[%1].onTourStart, '' );
	set( events[%1].showtourcontrols, '' );
	set( events[%1].changetourlanguage, '' );
</action>
<action name="Hide_pMenu_DeviceCheck">
	set( events[%1].onTourStart, '' );
	set( events[%1].changetourlanguage, '' );
</action>
<action name="Hide_Pic_DeviceCheck">
	set( events[%1].onTourStart, '' );
	set( events[%1].showtourcontrols, '' );
</action>
<action name="Hide_Logo_DeviceCheck">
	set( events[%1].onTourStart, '' );
</action>
<action name="Hide_CBox_DeviceCheck">
	set(events[%1_kr_xml_plugin_events].name, null);
	set(action[%1_kr_addComboboxLayer].content, '');
	set(action[%1_kr_removeComboboxLayer].content, '');
</action>
<action name="Hide_ColArea_DeviceCheck">
	set( events[%1].onTourStart, '' );
	set( events[%1].showtourcontrols, '' );
</action>
<action name="Hide_header_DeviceCheck">
	set( events[%1].onTourStart, '' );
	set( events[%1].showtourcontrols, '' );
</action>
<action name="Hide_footer_DeviceCheck">
	set( events[%1].onTourStart, '' );
	set( events[%1].showtourcontrols, '' );
</action>
  <include url="%FIRSTXML%/graphics/alpo.sidebar-v1.0.72/sidebar.xml"/><sidebar name="settings"  groupCount="2"      groupName0="get:data[en_panogroup17_title].content" groupMessage0="panogroup17_title" totalPanos0="2" group0Contents="pano10|pano11|" group0MainPano="pano10" isRealGroup_0="true"  SceneName_0_0="pano10"  SceneName_0_1="pano11"       groupName1="get:data[en_panogroup19_title].content" groupMessage1="panogroup19_title" totalPanos1="4" group1Contents="pano12|pano13|pano16|pano34|" group1MainPano="pano12" isRealGroup_1="true"  SceneName_1_0="pano12"  SceneName_1_1="pano13"  SceneName_1_2="pano16"  SceneName_1_3="pano34"    sbColor="030303" sbColorAlpha="0.70" sbWidth="255" sbAlign="left" startOpened="true" startOpenedMob="true" sbCloseIfnew="true" sbCloseIfnewMob="true" sbIconPosition="center" sbIconAlpha="80" sbIconAlphaSep="false" sbIconAlphaSepVal="90" sbIconOverState="false" sbIconOpenedState="true" sbIconOpenedOverState="false" sbIconPositionX="0" sbIconPositionY="0" sbIconPositionOpenUse="false" sbIconPositionOpen="top" sbIconPositionOpenX="0" sbIconPositionOpenY="0" sbIconHideShowDelay="false" sbIconDelay="6" sbOpenActions="0" sbCloseActions="0" sbMenuType="hierarchical"  sbIconUrl="%FIRSTXML%/graphics/alpo.sidebar-v1.0.72/sidebar_open_black.png"      sbOpenedIconUrl="%FIRSTXML%/graphics/alpo.sidebar-v1.0.72/sidebar_open_black.png"     textFieldUrl="%FIRSTXML%/graphics/textfield.swf"  scrollUrl="%FIRSTXML%/graphics/scrollarea.swf"   scrollAltUrl="%FIRSTXML%/graphics/scrollarea.js"  sbcurrent_PanoTxt="alpo_sidebar_fullsbcurrent_PanoTxt" sbcurrent_PanoTxtFont="trebuchet ms" sbcurrent_PanoTxtFontSize="14" sbcurrent_PanoTxtColor="b7b7b7" sbcurrent_PanoTxtAlpha="0.70" sbcurrent_PanoTxtAlign="center"  sbcurrent_PanoTxtFontItalic=""   sbcurrent_PanoTxtFontBold=""   sbcurrent_PanoTxtFontTD=""  sbcurrent_PanoNameTxtColor="eeeeee" sbcurrent_PanoNameTxtSize="18"  sbcurrent_PanoNameTxtDecorU1="" sbcurrent_PanoNameTxtDecorU2=""   sbcurrent_PanoNameTxtDecorB1="" sbcurrent_PanoNameTxtDecorB2=""   sbcurrent_PanoNameTxtDecorI1="" sbcurrent_PanoNameTxtDecorI2=""  sbOpenCloseUseOpener="false" sbOpenCloseUseButton="true" sbContextMenuItem="false" sbZorder="98"/><style name="sbBlocks" keep="true" type="container" bgcapture="false" bgalpha="0.0" width="100%" accuracy="1"/>  <style name="sbOpenerST" keep="false"/>  <style name="sbIconST" visible="true"/><style name="scrollareaDescr" keep="true" devices="html5" url="get:sidebar[settings].scrollAltUrl" direction="v" draggable="true" mwheel="true" onhover_autoscrolling="false" overscroll="0.5" friction="0.95" acceleration="0.08" returnacceleration="0.15" momentum="0.06" accuracy="1" align="top" width="100%"/><events name="sbBlocksHEv" keep="true" onxmlcomplete="delayedcall(0, sbBlocksHEvAct());"/><action name="sbBlocksHEvAct">   calcBlock1H();    calcBlock2H();    calcBlock3H();     if(layer[backBtn].visible, calc(layer[scrolLayer].height, layer[calc(layer[scrolLayer].parent)].height - layer[backBtn].height - (layer[scrolLayer].y - layer[backBtn].height) ); , set(layer[scrolLayer].height, 100%); ); set(events[sbBlocksHEv].onresize, sbBlocksHEvAct());</action>  <style name="sbBlock1ST" parent="sb" align="top" minheight="100" maxheight="100" y="30"  /><layer name="sbBlock1" style="sbBlocks|sbBlock1ST"/><action name="calcBlock1H">calc(layer[sbBlock1].height, 25 * stageheight * 0.01); if(layer[sbBlock1].height LT layer[sbBlock1].minheight AND layer[sbBlock1].minheight != 0, copy(layer[sbBlock1].height, layer[sbBlock1].minheight); ); if(layer[sbBlock1].height GT layer[sbBlock1].maxheight AND layer[sbBlock1].maxheight != 0, copy(layer[sbBlock1].height, layer[sbBlock1].maxheight); ); calc(layer[sbBlock1].realBlockY, 0 + 30);</action>   <style name="sbBlock2ST" parent="sbBlock1" align="bottom" edge="top" minheight="0" maxheight="0" y="-30"  /><layer name="sbBlock2" style="sbBlocks|sbBlock2ST"/><action name="calcBlock2H">calc(layer[sbBlock2].height, 60 * stageheight * 0.01); if(layer[sbBlock2].height LT layer[sbBlock2].minheight AND layer[sbBlock2].minheight != 0, copy(layer[sbBlock2].height, layer[sbBlock2].minheight); ); if(layer[sbBlock2].height GT layer[sbBlock2].maxheight AND layer[sbBlock2].maxheight != 0, copy(layer[sbBlock2].height, layer[sbBlock2].maxheight); ); calc(layer[sbBlock2].realBlockY, layer[sbBlock1].realBlockY + layer[sbBlock1].height + 30);</action>   <style name="sbBlock3ST" parent="sbBlock2" align="bottom" edge="top" minheight="0" maxheight="0" y="-0"  /><layer name="sbBlock3" style="sbBlocks|sbBlock3ST"/><action name="calcBlock3H">calc(layer[sbBlock3].height, 15 * stageheight * 0.01); if(layer[sbBlock3].height LT layer[sbBlock3].minheight AND layer[sbBlock3].minheight != 0, copy(layer[sbBlock3].height, layer[sbBlock3].minheight); ); if(layer[sbBlock3].height GT layer[sbBlock3].maxheight AND layer[sbBlock3].maxheight != 0, copy(layer[sbBlock3].height, layer[sbBlock3].maxheight); ); calc(layer[sbBlock3].realBlockY, layer[sbBlock2].realBlockY + layer[sbBlock2].height + 0);</action>               <style name="sbLogoST" keep="true" url="%FIRSTXML%/graphics/alpo.sidebar-v1.0.72/tumblr_mwl84ocuqe1rk175zo1_1280.png" align="top" alpha="0" width="100%" height="prop" handcursor="true" accuracy="1" parent="sbBlock1" onclick="sbOnClickLogo()"/>                         <style name="current_PanoNameUseST" url="" keep="false"/>              <include url="%FIRSTXML%/graphics/alpo.sidebar-v1.0.72/menutype/hierarchical.xml"/><style name="scrolLayerST" keep="true" type="container" align="top" parent="sbBlock2" accuracy="1" width="0" height="100%"/>                                    <style name="sbButtonsContST" parent="sbBlock3" keep="true" type="container" align="center" bgalpha="0.0" bgcapture="false" maskchildren="true" maxwidth="get:layer[sb].width"/><style name="sbButtonsST" keep="true" type="container" bgcapture="true" accuracy="1" maskchildren="true" parent="sbButtonsCont" align="lefttop"/><style name="sbButtonIconST" keep="true" x="0" y="0" accuracy="1" align="center" enabled="false" onloaded="sbSetIconScaling(get(name),100)"/><style name="sbButtonsCommonST" width="50" height="50" width.tablet="32" height.tablet="28" width.mobile="30" height.mobile="30" bgcolor="0x000000" bgalpha="0.00" bgroundedge="5" bgroundedge.tablet="5" bgroundedge.mobile="5"  onout="hideTooltip();" visible="false" autoalpha="true" alpha="0" onloaded="delayedcall(0.5, tween(layer[get(name)].alpha, 1))"/> <action name="sbSetIconScaling">if(layer[%1].imagewidth GT layer[%1].imageheight, txtadd(layer[%1].width, %2, '%'); set(layer[%1].height, prop); , txtadd(layer[%1].height, %2, '%'); set(layer[%1].width, prop); );</action><action name="sbButtonToggle">if(sbButton%1FirstClicked == false OR sbButton%1FirstClicked === null, set(sbButton%1FirstClicked, true); copy(layer[sbButton%1icon].url, layer[sbButton%1icon].urlState2); sbButton%1ClickFirst(); , set(sbButton%1FirstClicked, false); copy(layer[sbButton%1icon].url, layer[sbButton%1icon].urlState1); sbButton%1ToggleClick(); );</action>               <layer name="sbButton1" style="sbButtonsST|sbButtonsCommonST" onclick="sbButtonToggle(1)"  x="0" y="0"  x.tablet="0" y.tablet="0"   x.mobile="0" y.mobile="0"        /> <layer name="sbButton1icon" style="sbButtonIconST" url="%FIRSTXML%/graphics/alpo.sidebar-v1.0.72/audio_white.png" parent="sbButton1" urlState1="%FIRSTXML%/graphics/alpo.sidebar-v1.0.72/audio_white.png" urlState2="%FIRSTXML%/graphics/alpo.sidebar-v1.0.72/audio_off_white.png"  />  <action name="sbButton1ClickFirst"> stopTourSounds();

  </action>   <action name="sbButton1ToggleClick"> playTourSounds();

</action>               <layer name="sbButton2" style="sbButtonsST|sbButtonsCommonST" onclick="sbButtonToggle(2)"  x="55" y="0"  x.tablet="43" y.tablet="0"   x.mobile="35" y.mobile="0"        /> <layer name="sbButton2icon" style="sbButtonIconST" url="%FIRSTXML%/graphics/alpo.sidebar-v1.0.72/full_screen_white.png" urlState1="%FIRSTXML%/graphics/alpo.sidebar-v1.0.72/full_screen_white.png" urlState2="%FIRSTXML%/graphics/alpo.sidebar-v1.0.72/full_screen_white_close.png" parent="sbButton2"  />  <action name="sbButton2ClickFirst"> switchFullscreen();

 </action>   <action name="sbButton2ToggleClick">exitFullscreen();

</action>                    <layer name="sbButton3" style="sbButtonsST|sbButtonsCommonST" onclick="sbButtonToggle(3)"  x="110" y="0"  x.tablet="86" y.tablet="0"   x.mobile="70" y.mobile="0"           devices="no-desktop"  /> <layer name="sbButton3icon" style="sbButtonIconST" url="%FIRSTXML%/graphics/alpo.sidebar-v1.0.72/disable_gyro_white.png" parent="sbButton3" urlState1="%FIRSTXML%/graphics/alpo.sidebar-v1.0.72/disable_gyro_white.png" urlState2="%FIRSTXML%/graphics/alpo.sidebar-v1.0.72/enable_gyro_white.png"  devices="no-desktop"  />  <action name="sbButton3ClickFirst"> enableGyroscope();

  </action>   <action name="sbButton3ToggleClick">disableGyroscope();

</action>                 <layer name="sbButton4" style="sbButtonsST|sbButtonsCommonST" onclick="sbButton4ClickFirst()"  x="110" y="0"  x.tablet="129" y.tablet="0"   x.mobile="105" y.mobile="0"       /> <layer name="sbButton4icon" style="sbButtonIconST" url="%FIRSTXML%/graphics/alpo.sidebar-v1.0.72/facebook_white.png" parent="sbButton4" urlState1="%FIRSTXML%/graphics/alpo.sidebar-v1.0.72/facebook_white.png" urlState2="%FIRSTXML%/graphics/alpo.sidebar-v1.0.72/" />  <action name="sbButton4ClickFirst"> getmessage(urltoopen,alpo_sidebar_fullsbButton4Action101101319openurlwebsiteurl);openurl(get(urltoopen),_blank);

 </action>                  <layer name="sbButton5" style="sbButtonsST|sbButtonsCommonST" onclick="sbButton5ClickFirst()"  x="165" y="0"  x.tablet="172" y.tablet="0"   x.mobile="140" y.mobile="0"        /> <layer name="sbButton5icon" style="sbButtonIconST" url="%FIRSTXML%/graphics/alpo.sidebar-v1.0.72/twitter_white.png" parent="sbButton5" urlState1="%FIRSTXML%/graphics/alpo.sidebar-v1.0.72/twitter_white.png" urlState2="%FIRSTXML%/graphics/alpo.sidebar-v1.0.72/"  />  <action name="sbButton5ClickFirst"> getmessage(urltoopen,alpo_sidebar_fullsbButton5Action101101388openurlwebsiteurl);openurl(get(urltoopen),_blank);

  </action>                         <layer name="sbButtonsCont" style="sbButtonsContST" width="1" height="1" onloaded="if(device.desktop,sbButtonsContgetW( 220 ,0 ,5 ,0 ,0 ,50  ); );  if(device.tablet,sbButtonsContgetW_TAB( 215 ,0 ,11 ,0 ,0 ,28  ); );   if(device.mobile,sbButtonsContgetW_MOB( 175 ,0 ,5 ,0 ,0 ,30  ); );  sbButtonsContSetOffset(); sbButtondContSetMinHeight(sbBlock3); "/><action name="sbButtonsContgetW">if(%1 GE %2, sub(layer[sbButtonsCont].width, %1, %3);  , sub(layer[sbButtonsCont].width, %2, %3);  ); if(%5 GT 0, add(layer[sbButtonsCont].height, %5, %6);  , add(layer[sbButtonsCont].height, %4, %6);  );</action><action name="sbButtonsContgetW_TAB">if(%1 GE %2, sub(layer[sbButtonsCont].width, %1, %3);  , sub(layer[sbButtonsCont].width, %2, %3);  ); if(%5 GT 0, add(layer[sbButtonsCont].height, %5, %6);  , add(layer[sbButtonsCont].height, %4, %6);  );</action><action name="sbButtonsContgetW_MOB">if(%1 GE %2, sub(layer[sbButtonsCont].width, %1, %3);  , sub(layer[sbButtonsCont].width, %2, %3);  ); if(%5 GT 0, add(layer[sbButtonsCont].height, %5, %6);  , add(layer[sbButtonsCont].height, %4, %6);  );</action><action name="sbButtonsContSetOffset">if(layer[sbButtonsCont].align != top AND layer[sbButtonsCont].align != center AND layer[sbButtonsCont].align != bottom, set(layer[sbButtonsCont].x, 0); );</action><action name="sbButtondContSetMinHeight">if(layer[%1].minheight LT layer[sbButtonsCont].height, copy(layer[%1].minheight, layer[sbButtonsCont].height); );</action><sidebar name="settings" sbUseMainMenu="true"/><sidebar name="settings" sbUseLogo="true"  /><sidebar name="settings" sbUseLogo2="false"  /><sidebar name="settings" current_PanoNameUse="false" /><sidebar name="settings" useButtons="true" /><events name="alpoSBinitEV" keep="true" onxmlcomplete="alpoSBinit"/><plugin name="alpoSB" devices="html5" keep="true" url="%FIRSTXML%/graphics/alpo.sidebar-v1.0.72/js/alpo.sidebar.js"/><action name="alpoSBinit" type="Javascript"><![CDATA[ window.alpoSB={ plugID : 'alpo_sidebar_full', plugDir : 'Apartmentsdata/graphics/alpo.sidebar-v1.0.72', flags : {}, font : '', jsonData : '{ "project" : { "data" : { "dataDir" : "Apartmentsdata", "bgClr" : "#ffffff", "fgClr" : "#000000", "groupsCount" : 2 }, "groups" : [  { "id" : "panogroup17", "title" : "panogroup17_title", "description" : "panogroup17_description", "url" : "%FIRSTXML%/pic_2018_03_15_16_51_10/thumbnail.jpg", "urlAlt" : "%FIRSTXML%/graphics/alpo.sidebar-v1.0.72/assets/--/panogroup17.png", "color" : "#808080", "real" : true, "panoCount" : 2, "mainPano" : "pano10", "panoramas" : [  { "id" : "pano10", "parentID" : "panogroup17", "title" : "pano10_title", "description" : "pano10_description", "urlAlt" : "%FIRSTXML%/graphics/alpo.sidebar-v1.0.72/assets/--/pano10.png", "url" : "%FIRSTXML%/pic_2018_03_15_16_51_10/thumbnail.jpg" },  { "id" : "pano11", "parentID" : "panogroup17", "title" : "pano11_title", "description" : "pano11_description", "urlAlt" : "%FIRSTXML%/graphics/alpo.sidebar-v1.0.72/assets/--/pano11.png", "url" : "%FIRSTXML%/pic_2018_03_15_16_59_11/thumbnail.jpg" }  ] },  { "id" : "panogroup19", "title" : "panogroup19_title", "description" : "panogroup19_description", "url" : "%FIRSTXML%/pic_2018_03_15_17_09_12/thumbnail.jpg", "urlAlt" : "%FIRSTXML%/graphics/alpo.sidebar-v1.0.72/assets/--/panogroup19.png", "color" : "#808080", "real" : true, "panoCount" : 4, "mainPano" : "pano12", "panoramas" : [  { "id" : "pano12", "parentID" : "panogroup19", "title" : "pano12_title", "description" : "pano12_description", "urlAlt" : "%FIRSTXML%/graphics/alpo.sidebar-v1.0.72/assets/--/pano12.png", "url" : "%FIRSTXML%/pic_2018_03_15_17_09_12/thumbnail.jpg" },  { "id" : "pano13", "parentID" : "panogroup19", "title" : "pano13_title", "description" : "pano13_description", "urlAlt" : "%FIRSTXML%/graphics/alpo.sidebar-v1.0.72/assets/--/pano13.png", "url" : "%FIRSTXML%/pic_2018_03_15_17_13_13/thumbnail.jpg" },  { "id" : "pano16", "parentID" : "panogroup19", "title" : "pano16_title", "description" : "pano16_description", "urlAlt" : "%FIRSTXML%/graphics/alpo.sidebar-v1.0.72/assets/--/pano16.png", "url" : "%FIRSTXML%/pic_2018_03_15_17_21_16/thumbnail.jpg" },  { "id" : "pano34", "parentID" : "panogroup19", "title" : "pano34_title", "description" : "pano34_description", "urlAlt" : "%FIRSTXML%/graphics/alpo.sidebar-v1.0.72/assets/--/pano34.png", "url" : "%FIRSTXML%/pic_2018_03_15_17_15_34/thumbnail.jpg" }  ] }  ] }, "plugin" : { "includes" : { "textfield" : "%FIRSTXML%/graphics/textfield.swf", "scrollarea" : "%FIRSTXML%/graphics/scrollarea.js" }, "settings" : { "sb" : { "width" : 255, "specifyWidth" : true,  "tabWidth" : 0, "mobWidth" : 200,  "color" : "030303", "alpha" : 0.00, "align" : "left", "zorder" : 98, "startOpened" : true, "startOpenedMob" : true, "closeIfnew" : true, "closeIfnewMob" : true, "menuType" : "hierarchical", "openerUse" : false, "contextMenuUse" : false }, "btn" : { "use" : true, "position" : "center", "alpha" : 80, "alphaOpenUse" : false, "alphaOpen" : 90, "overStateUse" : false, "openStateUse" : true, "openOverStateUse": false, "posX" : "0", "posY" : "0", "posOpenUse" : false, "posOpen" : "top", "posXOpen" : "0", "posYOpen" : "0", "showHideDelayUse": false, "showHideDelay" : 6, "sbOpenActions" : 0, "sbCloseActions" : 0, "url" :  "%FIRSTXML%/graphics/alpo.sidebar-v1.0.72/sidebar_open_black.png" , "urlOver" : "", "urlOpen" : "  %FIRSTXML%/graphics/alpo.sidebar-v1.0.72/sidebar_open_black.png  ", "urlOpenOver" : "" }, "currentPano" : { "text" : "alpo_sidebar_fullsbcurrent_PanoTxt", "font" : "trebuchet ms", "fontSize" : 14, "color" : "b7b7b7", "alpha" : "0.70", "align" : "center", "italic" : "", "bold" : "", "underline" : "", "colorName" : "eeeeee", "fontSizeName" : "18", "italicNameUse" : "false", "boldNameUse" : "false", "underlineNameUse" : "false" }, "menu" : [ { "menuType" : "thumbscont", "thumbsContMargin" : 5, "tcScrollHeight" : 56, "tcScrollVSpace" : 5, "tcScrollXOffset": 0, "tcScrollMenuW" : 243   }, { "menuType" : "hierarchical", "activeMenuHr" : false, "excludePano" : "", "groupAsText" : true, "panoAsText" : false, "custAsText" : false, "width" : 255, "height" : 50, "vSpace" : 3, "xOffset" : 0,   "advHRMenuMobSets": { "groupAsText" : true, "panoAsText" : false, "custAsText" : false, "width" : 200, "height" : 50, "vSpace" : 3, "xOffset" : 0 },  "loadMainPano" : false, "loadMainOpen" : false, "bgrColor" : "0x111111", "bgrAlpha" : 0.60, "txtOffsetL" : 0, "txtOffsetR" : 0, "txtAlign" : "center", "font" : "arial", "fontSize" : 12, "color" : "eeeeee", "italic" : " font-style:normal; ", "bold" : " font-weight:normal; ", "underline" : " text-decoration:none; ", "overStateUse" : true, "overColorUse" : true, "overColor" : "0xff0f0f", "overAlpha" : 0.30, "itemIconUse" : true, "itemIconDflt" : true, "itemIcon" : "", "itemIconOffsetX" : "0", "itemIconOffsetY" : "0", "itemIconScale" : 100, "itemIconAlign" : "right", "itemIconSpecify" : false,  "itemBorderUse" : true, "itemBorder" : "0,0,1,0 0xeeeeee 0.60", "itemBorderT" : 0, "itemBorderR" : 0, "itemBorderB" : 1, "itemBorderL" : 0, "thumbPos" : "top", "thumbTxtPadT" : 5, "thumbTxtPadB" : 5, "thumbHeight" : 100, "thumbVStxtMarg" : 5, "thumbAlign" : "center", "thumbHorizOff" : 0,   "thumbSetsMob" : { "thumbPos" : "top", "thumbTxtPadT" : 5, "thumbTxtPadB" : 5, "thumbHeight" : 60, "thumbVStxtMarg" : 5, "thumbAlign" : "center", "thumbHorizOff" : 0 },  "backBtn" : { "height" : 32, "width" : 255,   "sizeMob" : { "height" : 32, "width" : 200 },  "bottomMarg" : 0, "align" : "lefttop", "bgrUse" : true, "bgrColor" : "0x0b0b0b", "bgrAlpha" : 0.40, "bgrChange" : true, "bgrChangeColor" : "0xff0f0f", "bgrChangeAlpha" : 0.50, "txtUse" : true, "txtSrc" : "group", "font" : "arial", "fontSize" : 14, "fontColor" : "eeeeee", "txtAlign" : "left", "txtVcenter" : true, "paddingT" :  0 , "paddingB" :  0 , "paddingR" : 8, "paddingL" : 30, "iconUse" : true, "iconWidth" : 24, "iconHeight" : 24, "iconUrl" : "  %FIRSTXML%/graphics/alpo.sidebar-v1.0.72/graphics/arr_back_left.png  ", "italic" : "  font-style:normal;  ", "bold" : "  font-weight:normal;  ", "underline" : "  text-decoration:none;  " }, "scrollInd" : { "use" : true, "color" : "0xffffff", "alpha" : 0.70, "width" : 15, "zorder" : 98, "barUse" : true, "barColor" : "0x000000", "barAlpha" : 0.40 }, "scrollBtns" : { "use" : true, "width" : "15", "height" : "13", "scale" : 100, "bgcolor" : "0xff0f0f", "bgalpha" : 0.60, "align" : "left", "zorder" : 98, "overStateUse" : true, "bgrOverColor" : "0xff0f0f", "bgrOverAlpha" : 1.00, "iconOverAlpha" : 30, "iconDflt" : true, "iconFileT" : "", "iconFileB" : "", "iconAlpha" : 100 } } ], "customItemsSet" : { "menuOrganize" : "dflt", "ignoreRest" : true } }, "customSet" : [  { "title" : "alpo_sidebar_fullitemName", "image" : "", "elemIndex" : 0, "custom" : true, "isChild" : false, "subItemsInd" : "", "subGroupsColor" : "808080", "subPanoIDs" : "", "itemActions" :  ""  }  ] } } ' }; krpano.set('events[alpoSBinitEV].onxmlcomplete', null); ]]></action> 
<!-- ********** -->
<!-- Context menu -->
<!-- id : contextmenu -->
<!-- ********** -->
  <contextmenu fullscreen="false" versioninfo="false" touch="true">
    <item name="website1" onclick="getmessage(urltoopen,contextmenuwebsiteurl1);openurl(get(urltoopen),_blank);" />
    <item name="normal"        onclick="setViewNormal();
" separator="true"/>
    <item name="littleplanet"  onclick="setViewLittlePlanet();
"/>
    <item name="fullscreenentry" onclick="enterFullscreen();
" separator="true"/>
  </contextmenu>

  <events name="contextmenuevents" keep="true" 
    onenterfullscreen="updateContextMenu" onexitfullscreen="updateContextMenu" 
    onxmlcomplete="updateContextMenu" 
    changetourlanguage="updateContextMenu" 
    />
  <events name="contextmenuvrevents" keep="true" 
    onvravailable="updateContextMenu();" onvrunavailable="updateContextMenu();"
    devices="html5"
    />
  <action name="updateContextMenu">
    getmessage(contextmenu.item[website1].caption, contextmenuopenwebsitelabel1);
    getmessage(contextmenu.item[normal].caption, contextmenunormallabel);
    set(sceneisfull360, false);
    if(scene[get(xml.scene)].full360,
      sub(viewhfov, panoview.hmax, panoview.hmin);
      if (viewhfov == 360,
        sub(viewvfov, panoview.vmax, panoview.vmin);
        if (viewvfov == 180,
          set(sceneisfull360, true);
        );
      );
    );
    if (sceneisfull360 AND (device.webgl OR device.flash),
      set(contextmenu.item[littleplanet].visible, true);
      getmessage(contextmenu.item[littleplanet].caption, contextmenulittleplanetlabel);
    ,
      set(contextmenu.item[littleplanet].visible, false);
    );
    if (device.fullscreensupport,
      if(tour_fullscreen,
        getmessage(contextmenu.item[fullscreenentry].caption, contextmenucloseFsLabel);
        set(contextmenu.item[fullscreenentry].onclick, exitFullscreen();
);
       ,
        getmessage(contextmenu.item[fullscreenentry].caption, contextmenuopenFsLabel);
        set(contextmenu.item[fullscreenentry].onclick, enterFullscreen();
);
      );
     ,
      set(contextmenu.item[fullscreenentry].visible, false);
    );
  </action>

  <!-- Sounds Management -->

  <action name="play3DLocalSounds">
    if (xml.scene, if (scene[get(xml.scene)].haslocalsounds, playpanolocalsounds();););
  </action>
  <action name="stop3DLocalSounds">
    if (xml.scene, if (scene[get(xml.scene)].haslocalsounds, stoppanolocalsounds();););
  </action>
  <action name="resume3DLocalSounds">
    if (xml.scene, if (scene[get(xml.scene)].haslocalsounds, 
      set(kill3dSoundOnResume, true);
      if(layer[displayedStandardVideo],
      if(layer[displayedStandardVideo].pausebgsound,
      if(tour_current_played_video,
        set(kill3dSoundOnResume, false);
      );););
      if(layer[webvideodisplay_player],
      if(layer[webvideodisplay_player].pausebgsound,
      if(tour_current_played_web_video,
        set(kill3dSoundOnResume, false);
      );););
      if(tour_current_played_sound_pausesound,
      if(tour_current_played_sound,
        set(kill3dSoundOnResume, false);
      ););
      if(kill3dSoundOnResume,
        resumepanolocalsounds();
      );
    ););
  </action>
  <action name="pause3DLocalSounds">
    if (xml.scene, if (scene[get(xml.scene)].haslocalsounds, pausepanolocalsounds();););
  </action>
  <action name="set3DLocalSoundsVolume">
    if (xml.scene, if (scene[get(xml.scene)].haslocalsounds, setpanolocalsoundsvolume();););
  </action>
  <action name="playTourSounds">
    set(tour_soundson, true);events.dispatch(playtoursoundsevent);
    resumeTourSoundsActions(true,true,true,true,true);
  </action>
  <action name="stopTourSounds">
    set(tour_soundson, false);events.dispatch(stoptoursoundsevent);
    pauseTourSoundsActions(true,true,true,true,true);
  </action>
  <action name="setTourSoundsVolume">
    set(tour_soundsvolume, %1);events.dispatch(changetoursoundsevent);
    set3DLocalSoundsVolume();
  </action>
  <action name="playTourSoundsActions">
    if(%1,
        play3DLocalSounds();
    );
  </action>
  <action name="stopTourSoundsActions">
    if(%1,
      stop3DLocalSounds();
    );
    if(%3,
      stopVideoActionsSounds();
    );
  </action>
  <action name="resumeTourSoundsActions">
    if(%1,
        resume3DLocalSounds();
    );
    if(%3,
      resumeVideoActionsSounds();
    );
  </action>
  <action name="pauseTourSoundsActions">
    if(%1,
      pause3DLocalSounds();
    );
    if(%3,
      pauseVideoActionsSounds();
    );
  </action>
  <action name="stopVideoActionsSounds">
    if(tour_current_played_video,
      if(layer[displayedStandardVideo],
        layer[displayedStandardVideo].stop();
        removelayer(displayedStandardVideo);
        if(layer[displayedStandardVideoOverlayButton], removelayer(displayedStandardVideoOverlayButton); );
        if(layer[displayedStandardVideoOverlay], removelayer(displayedStandardVideoOverlay); );
        delete(tour_current_played_video);
        set(tour_current_played_video_state, 0);
      );
    );
    if(tour_current_played_web_video,
      displayWebVideoObjectClose();
    );
  </action>
  <action name="resumeVideoActionsSounds">
    if(tour_current_played_video,
      set(resumeVideoActionsVerification, true);
      if(tour_current_played_sound,
        if(tour_current_played_video_state LT tour_current_played_sound_state,
          set(resumeVideoActionsVerification, false);
        );
      );
      if(resumeVideoActionsVerification,
        if (tour_soundson,
          if(device.flash OR (device.webgl AND !device.ios),
            div(volume, tour_soundsvolume, 100);
            set(layer[displayedStandardVideo].volume, get(volume));
          ,
            ifnot(device.ios,
              js(kpanotour.Sounds.startVideosSounds(get(volume)));
            ,
              if(tour_soundsvolume GT 0,
                set(layer[displayedStandardVideo].muted, false);
              ,
                set(layer[displayedStandardVideo].muted, true);
              );
            );
          );
        ,
          if(device.flash OR (device.webgl AND !device.ios),
            set(layer[displayedStandardVideo].volume, 0);
          ,
            ifnot(device.ios,
              js(kpanotour.Sounds.stopVideosSounds());
            ,
              set(layer[displayedStandardVideo].muted, true);
            );
          );
        );
      );
    );
  </action>
  <action name="pauseVideoActionsSounds">
    if(tour_current_played_video,
      if(device.flash OR (device.webgl AND !device.ios),
        set(layer[displayedStandardVideo].volume, 0);
      ,
        ifnot(device.ios,
          js(kpanotour.Sounds.stopVideosSounds());
        ,
          set(layer[displayedStandardVideo].muted, true);
        );
      );
    );
  </action>

  <action name="displayImage">
    if (layer[displayedStandardImage],
      if(layer[displayedStandardImage].doNotDeleteMe,
        set(layer[displayedStandardImage].currentCall, false);
        set(layer[displayedStandardImage].doNotDeleteMe, false);
        
        if (%1 == layer[displayedStandardImage].url,
          applyDisplayedImageObjectAnimation(%8);
        ,
          setDisplayedImageObjectParameters(%1, %2, %3, %4, %5, %6, %7, %8, %9, %10);
        );
      ,
        set(layer[displayedStandardImage].currentCall, false);
        set(layer[displayedStandardImage].doNotDeleteMe, true);
        events.dispatch(onremovedisplayedobject);
        delayedcall(0.2,displayImage(%1, %2, %3, %4, %5, %6, %7, %8, %9, %10, %11, %12););
      );
    ,
      if(%10,
        addlayer(displayedStandardImageOverlay);
        set(layer[displayedStandardImageOverlay].keep, false);
        set(layer[displayedStandardImageOverlay].width, 100%);
        set(layer[displayedStandardImageOverlay].height, 100%);
        set(layer[displayedStandardImageOverlay].type, container);
        set(layer[displayedStandardImageOverlay].zorder, 98);
        set(layer[displayedStandardImageOverlay].visible, false);
        set(layer[displayedStandardImageOverlay].onclick, applyDisplayedImageObjectAnimation(%8););
        set(layer[displayedStandardImageOverlay].bgcolor, "0x%11");
        set(layer[displayedStandardImageOverlay].bgalpha, %12);
        set(layer[displayedStandardImageOverlay].bgcapture, true);
      );
      addlayer(displayedStandardImage);
      set(layer[displayedStandardImage].keep, false);
      set(layer[displayedStandardImage].onclick, applyDisplayedImageObjectAnimation(%8););
      set(layer[displayedStandardImage].zorder , 99);
      set(layer[displayedStandardImage].currentCall, true);
      set(layer[displayedStandardImage].doNotDeleteMe, true);
      set(layer[displayedStandardImage].onloaded, resizeDisplayedImageObject());
      events.dispatch(onremovedisplayedobject);
      delayedcall(0.2,displayImage(%1, %2, %3, %4, %5, %6, %7, %8, %9, %10, %11, %12););
      set(layer[displayedStandardImage].visible, false);
    );
  </action>
  <action name="applyDisplayedImageObjectAnimation">resumeautorotation(forcehotspot);

    if (%1,
      stoptween(layer[displayedStandardImage].width, layer[displayedStandardImage].height);
      tween(layer[displayedStandardImage].width|layer[displayedStandardImage].height, 1|1, 1, easeOutQuad, WAIT);
      if(layer[displayedStandardImage].overlay,removelayer(displayedStandardImageOverlay););removelayer(displayedStandardImage);
    ,
      if(layer[displayedStandardImage].overlay,removelayer(displayedStandardImageOverlay););removelayer(displayedStandardImage);
    );
  </action>
  <action name="setDisplayedImageObjectParameters">
    set(layer[displayedStandardImage].url       , %1);
    set(layer[displayedStandardImage].align     , %2);
    set(layer[displayedStandardImage].x         , %3);
    set(layer[displayedStandardImage].y         , %4);
    set(layer[displayedStandardImage].imgwidth  , %5);
    set(layer[displayedStandardImage].imgheight , %6);
    set(layer[displayedStandardImage].animated  , %8);
    set(layer[displayedStandardImage].applyratio, %9);
    set(layer[displayedStandardImage].overlay   , %10);
    if (%7,pauseautorotation(forcehotspot);
);
  </action>
  <action name="resizeDisplayedImageObject">
    if(layer[displayedStandardImage].url,
    set(layer[displayedStandardImage].fullwidth, get(layer[displayedStandardImage].width));
    set(layer[displayedStandardImage].fullheight, get(layer[displayedStandardImage].height));
    if(layer[displayedStandardImage].animated,
      set(layer[displayedStandardImage].width , 1);
      set(layer[displayedStandardImage].height, 1);
    );
    if(layer[displayedStandardImage].imgwidth != "" AND layer[displayedStandardImage].imgheight != "",
      if(layer[displayedStandardImage].imgwidth == "prop",
        set(tempDisplayedImageObjectHeight, get(layer[displayedStandardImage].imgheight));
        indexoftxt(tempDisplayedImageObjectHeightPercent, get(tempDisplayedImageObjectHeight), "%");
        if(tempDisplayedImageObjectHeightPercent GT 0,
          txtreplace(tempDisplayedImageObjectHeight, '%', '');
          mul(tempDisplayedImageObjectHeight, get(stageheight));
          div(tempDisplayedImageObjectHeight, 100);
          Math.round(tempDisplayedImageObjectHeight);
        );
        mul(flyingImgWidth,get(layer[displayedStandardImage].fullwidth),get(tempDisplayedImageObjectHeight));
        div(flyingImgWidth,get(layer[displayedStandardImage].fullheight));
        Math.round(flyingImgWidth);
        set(layer[displayedStandardImage].imgwidth , get(flyingImgWidth));
        set(layer[displayedStandardImage].imgheight, get(tempDisplayedImageObjectHeight));
      ,
        if(layer[displayedStandardImage].imgheight == "prop",
          set(tempDisplayedImageObjectWidth, get(layer[displayedStandardImage].imgwidth));
          indexoftxt(tempDisplayedImageObjectWidthPercent, get(tempDisplayedImageObjectWidth), "%");
          if(tempDisplayedImageObjectWidthPercent GT 0,
            txtreplace(tempDisplayedImageObjectWidth, '%', '');
            mul(tempDisplayedImageObjectWidth, get(stagewidth));
            div(tempDisplayedImageObjectWidth, 100);
            Math.round(tempDisplayedImageObjectWidth);
          );
          mul(flyingImgHeight,get(layer[displayedStandardImage].fullheight),get(tempDisplayedImageObjectWidth));
          div(flyingImgHeight,get(layer[displayedStandardImage].fullwidth));
          Math.round(flyingImgHeight);
          set(layer[displayedStandardImage].imgwidth , get(tempDisplayedImageObjectWidth));
          set(layer[displayedStandardImage].imgheight , get(flyingImgHeight));
        ,
          set(tempDisplayedImageObjectWidth, get(layer[displayedStandardImage].imgwidth));
          set(tempDisplayedImageObjectHeight, get(layer[displayedStandardImage].imgheight));
          indexoftxt(tempDisplayedImageObjectWidthPercent, get(tempDisplayedImageObjectWidth), "%");
          indexoftxt(tempDisplayedImageObjectHeightPercent, get(tempDisplayedImageObjectHeight), "%");
          if(tempDisplayedImageObjectWidthPercent GT 0,
            txtreplace(tempDisplayedImageObjectWidth, '%', '');
            mul(tempDisplayedImageObjectWidth, get(stagewidth));
            div(tempDisplayedImageObjectWidth, 100);
            Math.round(tempDisplayedImageObjectWidth);
          );
          if(tempDisplayedImageObjectHeightPercent GT 0,
            txtreplace(tempDisplayedImageObjectHeight, '%', '');
            mul(tempDisplayedImageObjectHeight, get(stageheight));
            div(tempDisplayedImageObjectHeight, 100);
            Math.round(tempDisplayedImageObjectHeight);
          );
          set(layer[displayedStandardImage].imgwidth , get(tempDisplayedImageObjectWidth));
          set(layer[displayedStandardImage].imgheight, get(tempDisplayedImageObjectHeight));
        );
      );
    ,
      set(layer[displayedStandardImage].imgwidth , get(layer[displayedStandardImage].fullwidth));
      set(layer[displayedStandardImage].imgheight, get(layer[displayedStandardImage].fullheight));
    );
    
    set(resizedwidth, get(layer[displayedStandardImage].imgwidth));
    set(resizedheight, get(layer[displayedStandardImage].imgheight));
    if(layer[displayedStandardImage].applyratio,
      sub(resizedstagewidth, get(stagewidth), get(layer[displayedStandardImage].x));
      sub(resizedstageheight, get(stageheight), get(layer[displayedStandardImage].y));
      Math.abs(resizedstagewidth);
      Math.abs(resizedstageheight);
      if(resizedwidth GT resizedstagewidth,
        mul(tempresizedheight, get(resizedheight), get(resizedstagewidth));
        div(tempresizedheight, get(resizedwidth));
        Math.round(tempresizedheight);
        set(resizedwidth, get(resizedstagewidth));
        set(resizedheight, get(tempresizedheight));
      );
      if(resizedheight GT resizedstageheight,
        mul(tempresizedwidth, get(resizedwidth), get(resizedstageheight));
        div(tempresizedwidth, get(resizedheight));
        Math.round(tempresizedwidth);
        set(resizedheight, get(resizedstageheight));
        set(resizedwidth, get(tempresizedwidth));
      );
    );
    
    if(layer[displayedStandardImage].animated,
      set(layer[displayedStandardImage].animated, false);
      tween(layer[displayedStandardImage].width , get(resizedwidth), 1, easeOutQuad);
      tween(layer[displayedStandardImage].height, get(resizedheight), 1, easeOutQuad);
    ,
      set(layer[displayedStandardImage].width , get(resizedwidth));
      set(layer[displayedStandardImage].height, get(resizedheight));
    );
    if(layer[displayedStandardImage].overlay,set(layer[displayedStandardImageOverlay].visible, true););
    set(layer[displayedStandardImage].visible, true);
    ,
      delayedcall(0.2,resizeDisplayedImageObject(););
    );
  </action>
  <events name="displayedImageObjectEvents" keep="true" onremovedisplayedobject="displayedImageObjectOnRemoveDisplayedObject" onresize="if(layer[displayedStandardImage],resizeDisplayedImageObject());" />
  <action name="displayedImageObjectOnRemoveDisplayedObject">
    ifnot(layer[displayedStandardImage].currentCall,if(layer[displayedStandardImage].visible,resumeautorotation(forcehotspot);

      if(layer[displayedStandardImage].overlay,removelayer(displayedStandardImageOverlay););
      removelayer(displayedStandardImage);
    ););
  </action>


  <!-- Fullscreen Management -->
  <action name="exitFullScreen" devices="fullscreensupport">set(tour_fullscreen,false);set(fullscreen,false);</action>
  <action name="enterFullScreen" devices="fullscreensupport">set(tour_fullscreen,true);set(fullscreen,true);</action>
  <action name="switchFullScreen">if(tour_fullscreen,exitFullScreen();,enterFullScreen(););</action>

  
  <events name="krpanoExitFullscreenEvent"
    onexitfullscreen="if(tour_fullscreen,exitFullScreenChangeEvent(););"
    keep="true" />

  <action name="exitFullScreenChangeEvent" devices="fullscreensupport">set(tour_fullscreen,false);events.dispatch(onexitfullscreen);</action>

<action name="setViewNormal">
	stopSetViewTweens();
	if(current_view_isflat === true,
		setViewNonFlat(VFOV);
	);
	setViewNormalComplete();
</action>

<action name="setViewNormalComplete">
	set(view.fisheyefovlink, 0.5);
	set(view.fovmax, get(panoview.fovmax));
	tween(view.architectural, 0.0, distance(1.0, 0.45));
	tween(view.pannini, 0.0, distance(1.0, 0.45), easeOutQuad, if(panniniViewActivated,restoreViewFromPannini();););
	tween(view.vlookat, get(panoview.v), distance(90, 0.45));
	tween(view.fov, get(panoview.fov), distance(50, 0.45));
	tween(view.fisheye, 0.0, distance(1.0, 0.45),
		set(view.stereographic,false);
	);
</action>

<krpano normalViewActivated="true" />
<action name="stopSetViewTweens">
	stoptween(view.fov);
	stoptween(view.vlookat);
	stoptween(view.fisheye);
	stoptween(view.architectural);
	stoptween(view.pannini);
</action>

<action name="setViewLittlePlanet">
	set(sceneisfull360, false);
	if(scene[get(xml.scene)].full360,
		sub(viewhfov, panoview.hmax, panoview.hmin);
		if (viewhfov == 360,
			sub(viewvfov, panoview.vmax, panoview.vmin);
			if (viewvfov == 180,
				set(sceneisfull360, true);
			);
		);
	);
	if (sceneisfull360 AND (device.webgl OR device.flash),
		if(normalViewActivated,stopSetViewTweens(););
		if(current_view_isflat === true,
			setViewNonFlat(VFOV);
		);
		setViewLittlePlanetComplete();
	);
</action>

<action name="setViewLittlePlanetComplete">
	set(backtonormalfirst,false);
	if(view.pannini GE 1.0, set(backtonormalfirst,true));
	if(view.stereographic == false, set(backtonormalfirst,true));
	if(backtonormalfirst, hideTooltip();tween(view.fisheye, 0.0 ,distance(1.0, 0.25), easeOutQuad, WAIT); );
	set(view.stereographic, true);
	set(view.fisheyefovlink, 1.5);
	tween(view.architectural, 0.0, 0.25);
	tween(view.vlookat, 90, distance(179, 1.50));
	tween(view.pannini, 0.0, distance(1.0, 0.75), easeOutQuad, if(panniniViewActivated,restoreViewFromPannini();););
	if(panoview.fovmax LE 150, set(view.fovmax, 150); , set(view.fovmax, get(panoview.fovmax)); );
	tween(view.fisheye, 1.0, distance(1.0, 0.75));
	tween(view.fov, 150, distance(179, 0.75));
</action>

  <action name="enableGyroscope">
    changeGyroscopeState(true);
  </action>
  <action name="disableGyroscope">
    changeGyroscopeState(false);
  </action>


</krpano>