<?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_plan_sequence_user_defaultpoint0.png"
         visible="false"
         frame="0"
         lastframe="9"
         framewidth="67"
         frameheight="67"
         stopspotsequence="false"
         crop="0|0|67|67"
         edge="bottom" ox="0" oy="0"
         onloaded="startspotanimation(0.1);showPermanentTooltip(all, bottom);"


         />



  <!-- unsupported kind of display : PointMap -->


<!-- ********** -->
<!-- Rounded Control Bar -->
<!-- id : controlBar_rounded -->
<!-- ********** -->

  <krpano controlBar_roundedbuilt="false" controlBar_roundednbbuttons="0" controlBar_roundedIsOpened="false" />

  <events name="controlBar_roundedevents" 

	openvideointerface="controlBar_roundedHideControlBar();"
	closevideointerface="controlBar_roundedShowControlBar();"

    onxmlcomplete="controlBar_roundedbuildMenuBar();" keep="true"/>
  <action name="controlBar_roundedbuildMenuBar">
    ifnot (controlBar_roundedbuilt, controlBar_roundedbuildMenu(); set(controlBar_roundedbuilt, true););
  </action>


<action name="controlBar_roundedHideControlBar">
	if(roundcornerbarIsOpened,
		set(layer[controlBar_roundedbtnbg0].visible, false);
		set(layer[controlBar_roundedbtnbg1].visible, false);
		set(layer[controlBar_roundedbtnbg2].visible, false);
		set(layer[controlBar_roundedbtnbg3].visible, false);
		set(layer[controlBar_roundedbtnbg4].visible, false);
		set(layer[controlBar_roundedbtnbg5].visible, false);
		set(layer[controlBar_roundedbtn_in].visible, false);
		set(layer[controlBar_roundedbtn_out].visible, false);
		set(layer[controlBar_roundedbtn_up].visible, false);
		set(layer[controlBar_roundedbtn_down].visible, false);
		set(layer[controlBar_roundedbtn_left].visible, false);
		set(layer[controlBar_roundedbtn_right].visible, false);
		set(layer[controlBar_roundedbtn_hidecontrols].visible, false);
		set(layer[controlBar_roundedmenu_roundcorner_bg].visible, false);
		controlBar_roundedHideFullscreenButtons();
	,
		set(layer[controlBar_roundedbtn_showcontrols].visible, false);
	);
</action>
<action name="controlBar_roundedShowControlBar">
	if(roundcornerbarIsOpened,
		set(layer[controlBar_roundedbtnbg0].visible, true);
		set(layer[controlBar_roundedbtnbg1].visible, true);
		set(layer[controlBar_roundedbtnbg2].visible, true);
		set(layer[controlBar_roundedbtnbg3].visible, true);
		set(layer[controlBar_roundedbtnbg4].visible, true);
		set(layer[controlBar_roundedbtnbg5].visible, true);
		set(layer[controlBar_roundedbtn_in].visible, true);
		set(layer[controlBar_roundedbtn_out].visible, true);
		set(layer[controlBar_roundedbtn_up].visible, true);
		set(layer[controlBar_roundedbtn_down].visible, true);
		set(layer[controlBar_roundedbtn_left].visible, true);
		set(layer[controlBar_roundedbtn_right].visible, true);
		set(layer[controlBar_roundedbtn_hidecontrols].visible, true);
		set(layer[controlBar_roundedmenu_roundcorner_bg].visible, true);
		controlBar_roundedShowFullscreenButtons();
	,
		set(layer[controlBar_roundedbtn_showcontrols].visible, true);
	);
</action>

  <action name="controlBar_roundedbuildMenu">
    txtadd(btnbgname, "controlBar_roundedbtnbg", get(controlBar_roundednbbuttons));





    if (controlBar_roundednbbuttons LT 6,
      set(layer[controlBar_roundedbtn_home].parent, get(btnbgname));
      set(layer[controlBar_roundedbtn_home].x     , get(plugin[get(btnbgname)].childx));
      set(layer[controlBar_roundedbtn_home].y     , get(plugin[get(btnbgname)].childy));
      inc(controlBar_roundednbbuttons);
      txtadd(btnbgname, "controlBar_roundedbtnbg", get(controlBar_roundednbbuttons));
    ,
      set(layer[controlBar_roundedbtn_home].disabled, true);
    );


    if (controlBar_roundednbbuttons LT 6,
      set(layer[controlBar_roundedbtn_sound_off].parent, get(btnbgname));
      set(layer[controlBar_roundedbtn_sound_off].x     , get(plugin[get(btnbgname)].childx));
      set(layer[controlBar_roundedbtn_sound_off].y     , get(plugin[get(btnbgname)].childy));
      set(layer[controlBar_roundedbtn_sound_on ].parent, get(btnbgname));
      set(layer[controlBar_roundedbtn_sound_on ].x     , get(plugin[get(btnbgname)].childx));
      set(layer[controlBar_roundedbtn_sound_on ].y     , get(plugin[get(btnbgname)].childy));
      inc(controlBar_roundednbbuttons);
      txtadd(btnbgname, "controlBar_roundedbtnbg", get(controlBar_roundednbbuttons));
    ,
      set(layer[controlBar_roundedbtn_sound_off].disabled, true);
      set(layer[controlBar_roundedbtn_sound_on].disabled, true);
    );


    if (controlBar_roundednbbuttons LT 6,
      set(layer[controlBar_roundedbtn_show_hotspots].parent, get(btnbgname));
      set(layer[controlBar_roundedbtn_show_hotspots].x     , get(plugin[get(btnbgname)].childx));
      set(layer[controlBar_roundedbtn_show_hotspots].y     , get(plugin[get(btnbgname)].childy));
      set(layer[controlBar_roundedbtn_hide_hotspots].parent, get(btnbgname));
      set(layer[controlBar_roundedbtn_hide_hotspots].x     , get(plugin[get(btnbgname)].childx));
      set(layer[controlBar_roundedbtn_hide_hotspots].y     , get(plugin[get(btnbgname)].childy));
      inc(controlBar_roundednbbuttons);
      txtadd(btnbgname, "controlBar_roundedbtnbg", get(controlBar_roundednbbuttons));
    ,
      set(layer[controlBar_roundedbtn_show_hotspots].disabled, true);
      set(layer[controlBar_roundedbtn_hide_hotspots].disabled, true);
    );


    if (controlBar_roundednbbuttons LT 6,
      set(layer[controlBar_roundedbtn_display_floorplan].parent, get(btnbgname));
      set(layer[controlBar_roundedbtn_display_floorplan].x     , get(plugin[get(btnbgname)].childx));
      set(layer[controlBar_roundedbtn_display_floorplan].y     , get(plugin[get(btnbgname)].childy));
      set(layer[controlBar_roundedbtn_hide_floorplan   ].parent, get(btnbgname));
      set(layer[controlBar_roundedbtn_hide_floorplan   ].x     , get(plugin[get(btnbgname)].childx));
      set(layer[controlBar_roundedbtn_hide_floorplan   ].y     , get(plugin[get(btnbgname)].childy));
      inc(controlBar_roundednbbuttons);
      txtadd(btnbgname, "controlBar_roundedbtnbg", get(controlBar_roundednbbuttons));
    ,
      set(layer[controlBar_roundedbtn_display_floorplan].disabled, true);
      set(layer[controlBar_roundedbtn_hide_floorplan].disabled, true);
    );


    if (controlBar_roundednbbuttons LT 6,
      set(layer[controlBar_roundedbtn_autorotate_on ].parent, get(btnbgname));
      set(layer[controlBar_roundedbtn_autorotate_on ].x     , get(plugin[get(btnbgname)].childx));
      set(layer[controlBar_roundedbtn_autorotate_on ].y     , get(plugin[get(btnbgname)].childy));
      set(layer[controlBar_roundedbtn_autorotate_off].parent, get(btnbgname));
      set(layer[controlBar_roundedbtn_autorotate_off].x     , get(plugin[get(btnbgname)].childx));
      set(layer[controlBar_roundedbtn_autorotate_off].y     , get(plugin[get(btnbgname)].childy));
      inc(controlBar_roundednbbuttons);
      txtadd(btnbgname, "controlBar_roundedbtnbg", get(controlBar_roundednbbuttons));
    ,
      set(layer[controlBar_roundedbtn_autorotate_on].disabled, true);
      set(layer[controlBar_roundedbtn_autorotate_off].disabled, true);
    );



    if (controlBar_roundednbbuttons LT 6,
      if (device.desktop,
        set(layer[controlBar_roundedbtn_ctrlmode_drag_to].parent, get(btnbgname));
        set(layer[controlBar_roundedbtn_ctrlmode_drag_to].x     , get(plugin[get(btnbgname)].childx));
        set(layer[controlBar_roundedbtn_ctrlmode_drag_to].y     , get(plugin[get(btnbgname)].childy));
        set(layer[controlBar_roundedbtn_ctrlmode_move_to].parent, get(btnbgname));
        set(layer[controlBar_roundedbtn_ctrlmode_move_to].x     , get(plugin[get(btnbgname)].childx));
        set(layer[controlBar_roundedbtn_ctrlmode_move_to].y     , get(plugin[get(btnbgname)].childy));
        inc(controlBar_roundednbbuttons);
        txtadd(btnbgname, "controlBar_roundedbtnbg", get(controlBar_roundednbbuttons));
      );
    ,
      set(layer[controlBar_roundedbtn_ctrlmode_drag_to].disabled, true);
      set(layer[controlBar_roundedbtn_ctrlmode_move_to].disabled, true);
    );


    if(plugin[ptpvrmode] AND device.html5 AND device.mobile,
      if (controlBar_roundednbbuttons LT 6,
          set(layer[controlBar_roundedbtn_enter_vr].parent, get(btnbgname));
          set(layer[controlBar_roundedbtn_enter_vr].x     , get(plugin[get(btnbgname)].childx));
          set(layer[controlBar_roundedbtn_enter_vr].y     , get(plugin[get(btnbgname)].childy));
          set(layer[controlBar_roundedbtn_enter_vr_not].parent, get(btnbgname));
          set(layer[controlBar_roundedbtn_enter_vr_not].x , get(plugin[get(btnbgname)].childx));
          set(layer[controlBar_roundedbtn_enter_vr_not].y , get(plugin[get(btnbgname)].childy));
          inc(controlBar_roundednbbuttons);
          txtadd(btnbgname, "controlBar_roundedbtnbg", get(controlBar_roundednbbuttons));
      ,
        set(layer[controlBar_roundedbtn_enter_vr].disabled, true);
      );
    );

    if (controlBar_roundednbbuttons LT 6,
      if (device.desktop,
        set(layer[controlBar_roundedbtn_display_help].parent, get(btnbgname));
        set(layer[controlBar_roundedbtn_display_help].x     , get(plugin[get(btnbgname)].childx));
        set(layer[controlBar_roundedbtn_display_help].y     , get(plugin[get(btnbgname)].childy));
        set(layer[controlBar_roundedbtn_close_help  ].parent, get(btnbgname));
        set(layer[controlBar_roundedbtn_close_help  ].x     , get(plugin[get(btnbgname)].childx));
        set(layer[controlBar_roundedbtn_close_help  ].y     , get(plugin[get(btnbgname)].childy));
        inc(controlBar_roundednbbuttons);
        txtadd(btnbgname, "controlBar_roundedbtnbg", get(controlBar_roundednbbuttons));
      );
    ,
      set(layer[controlBar_roundedbtn_display_help].disabled, true);
      set(layer[controlBar_roundedbtn_close_help].disabled, true);
    );

	

  </action>

<events name="controlBar_roundedStartTourEvents" onTourStart="controlBar_roundedCallOnStartTour();" keep="true" />

<action name="controlBar_roundedCallOnStartTour">
	
	hideTourControls();

</action>




  <layer name="controlBar_roundedmenu_roundcorner_bg"
          keep="true"
          url="%FIRSTXML%/graphics/roundcornerbar/footer.png"
          zorder="1"
          align="bottomright"
          handcursor="false"
          edge="right"
          x="0"
          y="0"
          rotate="180"
          capture="false"
          visible="false" />

  <style name="controlBar_rounded_btn_style"
         keep="true"
         align="bottomright"
         onhover="controlBar_roundedshowMenuTooltip();"
         onout="hideTooltip();"
         zorder="3"
         />

  <style name="controlBar_roundedbtnbgstyle" keep="true" pixelhittest="true" align="bottomright" zorder="2" alpha="0" />

  <layer name="controlBar_roundedbtnbg0" url="%FIRSTXML%/graphics/roundcornerbar/btn_round_corner_1.png" style="controlBar_roundedbtnbgstyle" x="144" y="0"   childx="10" childy="6"  crop="0|0|48|49" onovercrop="0|49|48|49" ondowncrop="0|98|48|49" visible="false" />
  <layer name="controlBar_roundedbtnbg1" url="%FIRSTXML%/graphics/roundcornerbar/btn_round_corner_2.png" style="controlBar_roundedbtnbgstyle" x="129" y="39"  childx="14" childy="10" crop="0|0|56|56" onovercrop="0|56|56|56" ondowncrop="0|112|56|56" visible="false" />
  <layer name="controlBar_roundedbtnbg2" url="%FIRSTXML%/graphics/roundcornerbar/btn_round_corner_3.png" style="controlBar_roundedbtnbgstyle" x="106" y="75"  childx="15" childy="14" crop="0|0|60|60" onovercrop="0|60|60|60" ondowncrop="0|120|60|60" visible="false" /> 
  <layer name="controlBar_roundedbtnbg3" url="%FIRSTXML%/graphics/roundcornerbar/btn_round_corner_4.png" style="controlBar_roundedbtnbgstyle" x="75"  y="106" childx="14" childy="15" crop="0|0|60|60" onovercrop="0|60|60|60" ondowncrop="0|120|60|60" visible="false" />
  <layer name="controlBar_roundedbtnbg4" url="%FIRSTXML%/graphics/roundcornerbar/btn_round_corner_5.png" style="controlBar_roundedbtnbgstyle" x="39"  y="129" childx="10" childy="14" crop="0|0|56|56" onovercrop="0|56|56|56" ondowncrop="0|112|56|56" visible="false" />
  <layer name="controlBar_roundedbtnbg5" url="%FIRSTXML%/graphics/roundcornerbar/btn_round_corner_6.png" style="controlBar_roundedbtnbgstyle" x="0"   y="144" childx="6"  childy="10" crop="0|0|48|48" onovercrop="0|48|48|48" ondowncrop="0|96|48|48" visible="false" />

  <layer name="controlBar_roundedbtn_home"
         url="%FIRSTXML%/graphics/roundcornerbar/btn_home.png"
         style="controlBar_rounded_btn_style"
         visible="false"
         onclick="controlBar_roundedbtn_home_action();"
         tooltip="controlBar_roundedhomeTip"
         />
    <action name="controlBar_roundedbtn_home_action">
      mainloadscene(pano923);
    </action>




  <layer name="controlBar_roundedbtn_sound_on"
          url="%FIRSTXML%/graphics/roundcornerbar/btn_start_sound.png"
          onclick="playTourSounds();
"
          style="controlBar_rounded_btn_style"
          visible="false"
          tooltip="controlBar_roundedsoundsOnTip"
          />
  <layer name="controlBar_roundedbtn_sound_off"
          url="%FIRSTXML%/graphics/roundcornerbar/btn_stop_sound.png"
          onclick="stopTourSounds();
"
          style="controlBar_rounded_btn_style"
          visible="false"
          tooltip="controlBar_roundedsoundsOffTip"
          />

  <events name="controlBar_roundedplaystopsoundsevent" playtoursoundsevent="controlBar_roundedupdateSoundButtons();" stoptoursoundsevent="controlBar_roundedupdateSoundButtons();" keep="true"/>
	<action name="controlBar_roundedHideSoundButtons">
		set(layer[controlBar_roundedbtn_sound_off].visible, false);
		set(layer[controlBar_roundedbtn_sound_on].visible , false);
	</action>
	<action name="controlBar_roundedShowSoundButtons">
		if (tour_soundson == false,
			set(layer[controlBar_roundedbtn_sound_off].visible, false);
			set(layer[controlBar_roundedbtn_sound_on].visible , true);
		,
			set(layer[controlBar_roundedbtn_sound_off].visible, true);
			set(layer[controlBar_roundedbtn_sound_on].visible , false);
		);
	</action>
	<action name="controlBar_roundedupdateSoundButtons">
		if (tour_displaycontrols,
			controlBar_roundedShowSoundButtons();
		,
			controlBar_roundedHideSoundButtons();
		);
	</action>


  <events name="controlBar_roundedhotspotsdisplayevents"
          hotspots_visibility_changed="controlBar_roundedupdateHideShowHotspotsButtons"
          keep="true"/>
	<action name="controlBar_roundedHideHideShowHotspotsButtons">
		set(layer[controlBar_roundedbtn_show_hotspots].visible, false);
		set(layer[controlBar_roundedbtn_hide_hotspots].visible, false);
	</action>
	<action name="controlBar_roundedShowHideShowHotspotsButtons">
		if (tour_displayspots,
			set(layer[controlBar_roundedbtn_hide_hotspots].visible, true);
			set(layer[controlBar_roundedbtn_show_hotspots].visible, false);
		,
			set(layer[controlBar_roundedbtn_show_hotspots].visible, true);
			set(layer[controlBar_roundedbtn_hide_hotspots].visible, false);
		);
	</action>
	<action name="controlBar_roundedupdateHideShowHotspotsButtons">
		if (tour_displaycontrols,
			controlBar_roundedShowHideShowHotspotsButtons();
		,
			controlBar_roundedHideHideShowHotspotsButtons();
		);
	</action>

  <layer name="controlBar_roundedbtn_hide_hotspots"
          url="%FIRSTXML%/graphics/roundcornerbar/btn_hide_show_hotspots.png"
          style="controlBar_rounded_btn_style"
          onclick="hideHotspots();
"
          tooltip="controlBar_roundedhideSpotsTip"
          visible="false"
          />
  <layer name="controlBar_roundedbtn_show_hotspots"
          url="%FIRSTXML%/graphics/roundcornerbar/btn_hide_show_hotspots.png"
          style="controlBar_rounded_btn_style"
          onclick="showHotspots();
"
          tooltip="controlBar_roundedshowSpotsTip"
          visible="false"
          />


  <layer name="controlBar_roundedbtn_display_floorplan"
          url="%FIRSTXML%/graphics/roundcornerbar/btn_floorplan.png"
          onclick="showFloorplan();
"
          style="controlBar_rounded_btn_style"
          visible="false"
          tooltip="controlBar_roundeddisplayFloorplanTip"
          />
  <layer name="controlBar_roundedbtn_hide_floorplan"
          url="%FIRSTXML%/graphics/roundcornerbar/btn_floorplan.png"
          onclick="hideFloorplan();
"
          style="controlBar_rounded_btn_style"
          visible="false"
          tooltip="controlBar_roundedhideFloorplanTip"
           />

	<events name="controlBar_roundedDisplayFloorPlanEvents" 
		onshowtourfloorplan="controlBar_roundedupdateFloorplanButtons();" 
		onhidetourfloorplan="controlBar_roundedupdateFloorplanButtons();" 
		keep="true" />
	<action name="controlBar_roundedHideFloorplanButtons">
		set(layer[controlBar_roundedbtn_display_floorplan].visible, false);
		set(layer[controlBar_roundedbtn_hide_floorplan].visible, false);
	</action>
	<action name="controlBar_roundedShowFloorplanButtons">
		if (tour_displayfloorplan,
			set(layer[controlBar_roundedbtn_hide_floorplan].visible, true);
			set(layer[controlBar_roundedbtn_display_floorplan].visible, false);
		,
			set(layer[controlBar_roundedbtn_display_floorplan].visible, true);
			set(layer[controlBar_roundedbtn_hide_floorplan].visible, false);
		);
	</action>
	<action name="controlBar_roundedupdateFloorplanButtons">
		if (tour_displaycontrols,
			controlBar_roundedShowFloorplanButtons();
		,
			controlBar_roundedHideFloorplanButtons();
		);
	</action>


  <layer name="controlBar_roundedbtn_autorotate_on"
          url="%FIRSTXML%/graphics/roundcornerbar/btn_start_autorotation.png"
          onclick="resumeautorotation();
"
          style="controlBar_rounded_btn_style"
          visible="false"
          tooltip="controlBar_roundedautorotateOnTip"
          />
  <layer name="controlBar_roundedbtn_autorotate_off"
          url="%FIRSTXML%/graphics/roundcornerbar/btn_stop_autorotation.png"
          onclick="pauseautorotation();
"
          style="controlBar_rounded_btn_style"
          visible="false"
          tooltip="controlBar_roundedautorotateOffTip"
          />

	<events name="controlBar_roundedAutorotationEvents"
		onstartautorotation="controlBar_roundedupdateAutorotationButtons();"
		onresumeautorotation="controlBar_roundedupdateAutorotationButtons();"
		onstopautorotation="controlBar_roundedupdateAutorotationButtons();"
		onpauseautorotation="controlBar_roundedupdateAutorotationButtons();"
		keep="true"/>
	<action name="controlBar_roundedHideAutorotationButtons">
		set(layer[controlBar_roundedbtn_autorotate_off].visible, false);
		set(layer[controlBar_roundedbtn_autorotate_on].visible , false);
	</action>
	<action name="controlBar_roundedShowAutorotationButtons">
		if(autorotate.enabled == false,
			set(layer[controlBar_roundedbtn_autorotate_off].visible, false);
			set(layer[controlBar_roundedbtn_autorotate_on].visible , true);
		,
			set(layer[controlBar_roundedbtn_autorotate_off].visible, true);
			set(layer[controlBar_roundedbtn_autorotate_on].visible , false);
		);
	</action>
	<action name="controlBar_roundedupdateAutorotationButtons">
		if (tour_displaycontrols,
			controlBar_roundedShowAutorotationButtons();
		,
			controlBar_roundedHideAutorotationButtons();
		);
	</action>


  <layer name="controlBar_roundedbtn_enter_vr"
          url="%FIRSTXML%/graphics/roundcornerbar/btn_vr_mode.png"
          onclick="if(scene[get(xml.scene)].full360 AND disableCurrentSceneVrConservation !== true,
    js(accessWebVr(get(xml.scene),get(videoscenestarttime)));
,
    js(accessWebVr(null));
);"
          style="controlBar_rounded_btn_style"
          visible="false"
          devices="html5.and.mobile"
          tooltip="controlBar_roundedenterVRTip"
          />
    <layer name="controlBar_roundedbtn_enter_vr_not"
          url="%FIRSTXML%/graphics/roundcornerbar/btn_vr_mode_off.png"
          style="controlBar_rounded_btn_style"
          tooltip="controlBar_roundedenterVRNotTip"
          enabled="true"
          capture="false"
          visible="false"
          devices="html5.and.mobile"
          />
<events name="controlBar_roundedvravailableevent"
		onvravailable="controlBar_roundedupdateVrButtonsAvailability();"
		onvrunavailable="controlBar_roundedupdateVrButtonsAvailability();"
		keep="true" devices="html5.and.mobile" />
	<krpano controlBar_roundedmenuvravailable="false" />
	<action name="controlBar_roundedupdateVrButtonsAvailability">
		if (tour_vrdevices,
			set(controlBar_roundedmenuvravailable, true);
		,
			set(controlBar_roundedmenuvravailable, false);
		);
		controlBar_roundedupdateVrButtons();
	</action>
	<action name="controlBar_roundedHideVrButtons">
		set(layer[controlBar_roundedbtn_enter_vr].visible, false);
		if('%1' == 'true' AND plugin[ptpvrmode],
			set(layer[controlBar_roundedbtn_enter_vr_not].visible, true);
		,
			set(layer[controlBar_roundedbtn_enter_vr_not].visible, false);
		);
	</action>
	<action name="controlBar_roundedShowVrButtons">
		if (controlBar_roundedmenuvravailable,
			set(layer[controlBar_roundedbtn_enter_vr].visible, true);
			set(layer[controlBar_roundedbtn_enter_vr_not].visible, false);
		,
			controlBar_roundedHideVrButtons(true);
		);
	</action>
	<action name="controlBar_roundedupdateVrButtons">
	if (tour_vrdevices,
		if (tour_displaycontrols,
			controlBar_roundedShowVrButtons();
		,
			controlBar_roundedHideVrButtons();
		);
	,
		if (tour_displaycontrols,
			controlBar_roundedHideVrButtons(true);
		,
			controlBar_roundedHideVrButtons();
		);
	);
	</action>


  <events name="controlBar_roundedcontrolmodechangeevent"
          oncontrolmodechanged="controlBar_roundedupdateControlModeButtons();"
          keep="true"/>
	<action name="controlBar_roundedHideControlModeButtons">
		set(layer[controlBar_roundedbtn_ctrlmode_move_to].visible, false);
		set(layer[controlBar_roundedbtn_ctrlmode_drag_to].visible, false);
	</action>
	<action name="controlBar_roundedShowControlModeButtons">
		if (tour_controlmodemousetype == "moveto",
			set(layer[controlBar_roundedbtn_ctrlmode_drag_to].visible, true);
			set(layer[controlBar_roundedbtn_ctrlmode_move_to].visible, false);
		,
			set(layer[controlBar_roundedbtn_ctrlmode_move_to].visible, true);
			set(layer[controlBar_roundedbtn_ctrlmode_drag_to].visible, false);
		);
	</action>
	<action name="controlBar_roundedupdateControlModeButtons">
	if (device.desktop,
		if (tour_displaycontrols,
			controlBar_roundedShowControlModeButtons();
		,
			controlBar_roundedHideControlModeButtons();
		);
	,
		controlBar_roundedHideControlModeButtons();
	);
	</action>
  <layer name="controlBar_roundedbtn_ctrlmode_move_to"
          url="%FIRSTXML%/graphics/roundcornerbar/btn_move_to.png"
          style="controlBar_rounded_btn_style"
          tooltip="controlBar_roundedctrlmodeMoveTip"
          onclick="setControlMode(moveto);"
          visible="false"
          devices="desktop"
          />
  <layer name="controlBar_roundedbtn_ctrlmode_drag_to"
          url="%FIRSTXML%/graphics/roundcornerbar/btn_drag_to.png"
          style="controlBar_rounded_btn_style"
          tooltip="controlBar_roundedctrlmodeDragTip"
          onclick="setControlMode(drag);"
          visible="false"
          devices="desktop"
          />

    <layer name="controlBar_roundedbtn_display_help"
            url="%FIRSTXML%/graphics/roundcornerbar/btn_help.png"
            onclick="controlBar_roundeddisplayHelp();"
            style="controlBar_rounded_btn_style"
            visible="false"
            tooltip="controlBar_roundeddisplayHelpTip"
            devices="desktop"
            />
    <layer name="controlBar_roundedbtn_close_help"
            url="%FIRSTXML%/graphics/roundcornerbar/btn_help.png"
            onclick="controlBar_roundedcloseHelp();"
            style="controlBar_rounded_btn_style"
            tooltip="controlBar_roundedhideHelpTip"
            devices="desktop"
            visible="false"
            />




  <style name="controlBar_roundedroundcorner_btn_nav_style"
         keep="true"
         pixelhittest="true"
         onhover="controlBar_roundedshowMenuTooltip();"
         onout="hideTooltip();"
         />

  
  <layer name="controlBar_roundedmenu_navigation_bg"
          keep="true"
          type="container"
          zorder="2"
          align="bottomright"
          edge="bottomright"
          x="10"
          y="10"
          width="102"
          height="102"
          visible="true"
          capture="false">

    <layer name="controlBar_roundedbtn_in"
         zorder="1"
            url="%FIRSTXML%/graphics/roundcornerbar/btn_zoom_in.png"
            style="controlBar_roundedroundcorner_btn_nav_style"
            crop="0|0|66|33"
            onovercrop="0|33|66|33"
            ondown="viewControlZoomIn(false);"
            onup="viewControlZoomStop();
"
            x="0" y="0"
            edge="bottom"
            align="center"
            visible="false"
            tooltip="controlBar_roundedzoomInTip"
             />
    <layer name="controlBar_roundedbtn_out"
         zorder="1"
            url="%FIRSTXML%/graphics/roundcornerbar/btn_zoom_out.png"
            style="controlBar_roundedroundcorner_btn_nav_style"
            crop="0|0|66|33"
            onovercrop="0|33|66|33"
            ondown="viewControlZoomOut(false);
"
            onup="viewControlZoomStop();
"
            x="0" y="0"
            edge="top"
            align="center"
            visible="false"
            tooltip="controlBar_roundedzoomOutTip"
             />

    <layer name="controlBar_roundedbtn_left"
           zorder="0"
           ondown="viewControlMoveLeft(false);
"
           onup="viewControlMoveHoriStop();
"
            url="%FIRSTXML%/graphics/roundcornerbar/btn_move_left.png"
            style="controlBar_roundedroundcorner_btn_nav_style"
            crop="0|0|29|74"
            onovercrop="0|74|29|74"
            x="0" y="0"
            edge="left"
            align="left"
            visible="false"
            tooltip="controlBar_roundedmoveLeftTip"
            />
    <layer name="controlBar_roundedbtn_right"
           zorder="0"
           ondown="viewControlMoveRight(false);
"
           onup="viewControlMoveHoriStop();
"
           url="%FIRSTXML%/graphics/roundcornerbar/btn_move_right.png"
           style="controlBar_roundedroundcorner_btn_nav_style"
           crop="0|0|29|74"
           onovercrop="0|74|29|74"
           x="0" y="0"
           edge="right"
           align="right"
           visible="false"
           tooltip="controlBar_roundedmoveRightTip"
           />

    <layer name="controlBar_roundedbtn_up"
           zorder="0"
           ondown="viewControlMoveUp(false);
"
           onup="viewControlMoveVertStop();
"
           url="%FIRSTXML%/graphics/roundcornerbar/btn_move_up.png"
           style="controlBar_roundedroundcorner_btn_nav_style"
           crop="0|0|74|29"
           onovercrop="0|29|74|29"
           x="0" y="0"
           align="top"
           edge="top"
           visible="false"
           tooltip="controlBar_roundedmoveUpTip"
           />
    <layer name="controlBar_roundedbtn_down"
           zorder="0"
           ondown="viewControlMoveDown(false);
"
           onup="viewControlMoveVertStop();
"
           url="%FIRSTXML%/graphics/roundcornerbar/btn_move_down.png"
           style="controlBar_roundedroundcorner_btn_nav_style"
           crop="0|0|74|29"
           onovercrop="0|29|74|29"
           x="0" y="0"
           edge="bottom"
           align="bottom"
           visible="false"
           tooltip="controlBar_roundedmoveDownTip"
           />

    <layer name="controlBar_roundedbtn_hidecontrols"
           onclick="hideTourControls();
"
           x="0" y="0"
           keep="true"
           zorder="2"
           url="%FIRSTXML%/graphics/roundcornerbar/btn_hide_controls.png"
                 crop="0| 0|28|28"
           onovercrop="0|28|28|28"
           ondowncrop="0|56|28|28"
           style="controlBar_roundedroundcorner_btn_nav_style"
           edge="center"
           align="center"
           height="28"
           width="28"
           visible="false"
           tooltip="controlBar_roundedhideControlsTip"
           />
    <layer name="controlBar_roundedbtn_showcontrols"
           onclick="showTourControls();
"
           x="0" y="0"
           keep="true"
           zorder="2"
           url="%FIRSTXML%/graphics/roundcornerbar/btn_show_controls.png"
                 crop="0| 0|28|28"
           onovercrop="0|28|28|28"
           ondowncrop="0|56|28|28"
           style="controlBar_roundedroundcorner_btn_nav_style"
           edge="center"
           align="center"
           visible="false"
           height="28"
           width="28"
           tooltip="controlBar_roundeddisplayControlsTip"
           />
  </layer>

  <style name="controlBar_roundedbtn_fs_bg_style" keep="true"
         url="%FIRSTXML%/graphics/roundcornerbar/btn_fs_bg.png"
         align="topright"
         zorder="1"
         x="0" y="0"
         crop="      0|  0|50|50"
         onovercrop="0| 50|50|50"
         ondowncrop="0|100|50|50"
         onhover="controlBar_roundedshowMenuTooltip();"
         onout="hideTooltip();"
         />
  <style name="controlBar_roundedbtn_fs_style" keep="true" align="topright"
         devices="fullscreensupport"
         x="5" y="5"
         onhover="controlBar_roundedshowMenuTooltip();"
         onout="hideTooltip();"
         />
  <layer name="controlBar_roundedbtn_openfs_bg"
         style="controlBar_roundedbtn_fs_bg_style"
         onclick="enterFullscreen();
"
         visible="false"
         devices="fullscreensupport"
         alpha="0"
         tooltip="controlBar_roundedopenFsTip"
          >
    <layer name="controlBar_roundedbtn_openfs"
           style="controlBar_roundedbtn_fs_style"
           url="%FIRSTXML%/graphics/roundcornerbar/btn_enter_fs.png"
           onclick="enterFullscreen();
"
           tooltip="controlBar_roundedopenFsTip"
           />
  </layer>

  <layer name="controlBar_roundedbtn_closefs_bg"
          style="controlBar_roundedbtn_fs_bg_style"
          visible="false"
          alpha="0"
          devices="fullscreensupport"
          onclick="exitFullscreen();
"
          tooltip="controlBar_roundedcloseFsTip"
         onhover="controlBar_roundedshowMenuTooltip();"
         onout="hideTooltip();"
          >
    <layer name="controlBar_roundedbtn_closefs"
           style="controlBar_roundedbtn_fs_style"
           url="%FIRSTXML%/graphics/roundcornerbar/btn_close_fs.png"
           onclick="exitFullscreen();
"
           tooltip="controlBar_roundedcloseFsTip"
          />
  </layer>

  <events name="controlBar_roundedmenufullscreenchangeevent"
          onenterfullscreen="controlBar_roundedupdateFullscreenButtons();"
          onexitfullscreen="controlBar_roundedupdateFullscreenButtons();"
          keep="true"/>
	<action name="controlBar_roundedHideFullscreenButtons">
		tween(layer[controlBar_roundedbtn_openfs_bg].alpha, 0, 0.5, easeOutQuad, set(layer[controlBar_roundedbtn_openfs_bg].visible , false));
		tween(layer[controlBar_roundedbtn_closefs_bg].alpha, 0, 0.5, easeOutQuad, set(layer[controlBar_roundedbtn_closefs_bg].visible , false));
	</action>
	<action name="controlBar_roundedShowFullscreenButtons">
		if (device.fullscreensupport,
			if(tour_fullscreen,
				if(layer[controlBar_roundedbtn_openfs_bg].visible,
					set(layer[controlBar_roundedbtn_openfs_bg].visible , false);
					set(layer[controlBar_roundedbtn_closefs_bg].visible, true);
				,
					set(layer[controlBar_roundedbtn_openfs_bg].visible , false);
					set(layer[controlBar_roundedbtn_closefs_bg].visible, true);
					tween(layer[controlBar_roundedbtn_openfs_bg].alpha, 1, 0.5);
					tween(layer[controlBar_roundedbtn_closefs_bg].alpha, 1, 0.5);
				);
			,
				if(layer[controlBar_roundedbtn_closefs_bg].visible,
					set(layer[controlBar_roundedbtn_openfs_bg].visible ,true);
					set(layer[controlBar_roundedbtn_closefs_bg].visible,false);
				,
					set(layer[controlBar_roundedbtn_openfs_bg].visible , true);
					set(layer[controlBar_roundedbtn_closefs_bg].visible, false);
					tween(layer[controlBar_roundedbtn_openfs_bg].alpha, 1, 0.5);
					tween(layer[controlBar_roundedbtn_closefs_bg].alpha, 1, 0.5);
				);
			);
		,
			controlBar_roundedHideFullscreenButtons();
		);
	</action>
	<action name="controlBar_roundedupdateFullscreenButtons">
		if (tour_displaycontrols,
			controlBar_roundedShowFullscreenButtons();
		,
			controlBar_roundedHideFullscreenButtons();
		);
	</action>




  <events name="controlBar_roundedmenuhideshowcontrolsevent"
          hidetourcontrols="controlBar_roundedhideMenuControls();"
          showtourcontrols="controlBar_roundedshowMenuControls();"
          keep="true"/>


  <action name="controlBar_roundedhideMenuControls">
    set(controlBar_roundedIsOpened, false);
    if (controlBar_roundednbbuttons GT 0,
      stoptween(layer[controlBar_roundedmenu_roundcorner_bg].rotate);
      stoptween(layer[controlBar_roundedbtnbg0].alpha);
      stoptween(layer[controlBar_roundedbtnbg1].alpha);
      stoptween(layer[controlBar_roundedbtnbg2].alpha);
      stoptween(layer[controlBar_roundedbtnbg3].alpha);
      stoptween(layer[controlBar_roundedbtnbg4].alpha);
      stoptween(layer[controlBar_roundedbtnbg5].alpha);

      tween(layer[controlBar_roundedbtnbg0].alpha, 0, 0.5, easeOutQuad, set(layer[controlBar_roundedbtnbg0].visible, false));
      tween(layer[controlBar_roundedbtnbg1].alpha, 0, 0.5, easeOutQuad, set(layer[controlBar_roundedbtnbg1].visible, false));
      tween(layer[controlBar_roundedbtnbg2].alpha, 0, 0.5, easeOutQuad, set(layer[controlBar_roundedbtnbg2].visible, false));
      tween(layer[controlBar_roundedbtnbg3].alpha, 0, 0.5, easeOutQuad, set(layer[controlBar_roundedbtnbg3].visible, false));
      tween(layer[controlBar_roundedbtnbg4].alpha, 0, 0.5, easeOutQuad, set(layer[controlBar_roundedbtnbg4].visible, false));
      tween(layer[controlBar_roundedbtnbg5].alpha, 0, 0.5, easeOutQuad, set(layer[controlBar_roundedbtnbg5].visible, false));
    );

      set(layer[controlBar_roundedbtn_showcontrols].visible, true);
      set(layer[controlBar_roundedbtn_hidecontrols].visible, false);
      set(layer[controlBar_roundedbtn_in].visible, false);
      set(layer[controlBar_roundedbtn_out].visible, false);
      set(layer[controlBar_roundedbtn_up].visible, false);
      set(layer[controlBar_roundedbtn_down].visible, false);
      set(layer[controlBar_roundedbtn_left].visible, false);
      set(layer[controlBar_roundedbtn_right].visible, false);
      ifnot(layer[controlBar_roundedbtn_home].disabled,set(layer[controlBar_roundedbtn_home].visible, false););

    controlBar_roundedupdateFullscreenButtons();
	ifnot(layer[controlBar_roundedbtn_autorotate_on].disabled,controlBar_roundedupdateAutorotationButtons(););

	ifnot(layer[controlBar_roundedbtn_sound_on].disabled,controlBar_roundedupdateSoundButtons(););
	ifnot(layer[controlBar_roundedbtn_display_floorplan].disabled,controlBar_roundedupdateFloorplanButtons(););
	if(layer[controlBar_roundedbtn_enter_vr],ifnot(layer[controlBar_roundedbtn_enter_vr].disabled,controlBar_roundedupdateVrButtons();););

	ifnot(layer[controlBar_roundedbtn_ctrlmode_drag_to].disabled,controlBar_roundedupdateControlModeButtons(););
	ifnot(layer[controlBar_roundedbtn_show_hotspots].disabled,controlBar_roundedupdateHideShowHotspotsButtons(););

	ifnot(layer[controlBar_roundedbtn_display_help].disabled,controlBar_roundedupdateHelpButtons(););

    if (controlBar_roundednbbuttons GT 0,
      tween(layer[controlBar_roundedmenu_roundcorner_bg].rotate, 180, 0.5, easeOutQuad, set(layer[controlBar_roundedmenu_roundcorner_bg].visible, false););
    );
  </action>
  <action name="controlBar_roundedshowMenuControls">
    set(controlBar_roundedIsOpened, true);
    if (controlBar_roundednbbuttons GT 0,
      stoptween(layer[controlBar_roundedmenu_roundcorner_bg].rotate);
      stoptween(layer[controlBar_roundedbtnbg0].alpha);
      stoptween(layer[controlBar_roundedbtnbg1].alpha);
      stoptween(layer[controlBar_roundedbtnbg2].alpha);
      stoptween(layer[controlBar_roundedbtnbg3].alpha);
      stoptween(layer[controlBar_roundedbtnbg4].alpha);
      stoptween(layer[controlBar_roundedbtnbg5].alpha);
    );

      set(layer[controlBar_roundedbtn_hidecontrols].visible, true);
      set(layer[controlBar_roundedbtn_showcontrols].visible, false);


    set(layer[controlBar_roundedmenu_roundcorner_bg].visible, true);
    tween(layer[controlBar_roundedmenu_roundcorner_bg].rotate, 0, 0.5, easeOutQuad,

      if (controlBar_roundednbbuttons GT 0,
        set(  layer[controlBar_roundedbtnbg0].visible, true);
        tween(layer[controlBar_roundedbtnbg0].alpha  , 1, 0.5);
        set(  layer[controlBar_roundedbtnbg1].visible, true);
        tween(layer[controlBar_roundedbtnbg1].alpha  , 1, 0.5);
        set(  layer[controlBar_roundedbtnbg2].visible, true);
        tween(layer[controlBar_roundedbtnbg2].alpha  , 1, 0.5);
        set(  layer[controlBar_roundedbtnbg3].visible, true);
        tween(layer[controlBar_roundedbtnbg3].alpha  , 1, 0.5);
        set(  layer[controlBar_roundedbtnbg4].visible, true);
        tween(layer[controlBar_roundedbtnbg4].alpha  , 1, 0.5);
        set(  layer[controlBar_roundedbtnbg5].visible, true);
        tween(layer[controlBar_roundedbtnbg5].alpha  , 1, 0.5);
      );

      set(layer[controlBar_roundedbtn_in].visible, true);
      set(layer[controlBar_roundedbtn_out].visible, true);
      set(layer[controlBar_roundedbtn_up].visible, true);
      set(layer[controlBar_roundedbtn_down].visible, true);
      set(layer[controlBar_roundedbtn_left].visible, true);
      set(layer[controlBar_roundedbtn_right].visible, true);
      ifnot(layer[controlBar_roundedbtn_home].disabled,set(layer[controlBar_roundedbtn_home].visible, true););

      controlBar_roundedupdateFullscreenButtons();
	ifnot(layer[controlBar_roundedbtn_autorotate_on].disabled,controlBar_roundedupdateAutorotationButtons(););

	ifnot(layer[controlBar_roundedbtn_sound_on].disabled,controlBar_roundedupdateSoundButtons(););
	ifnot(layer[controlBar_roundedbtn_display_floorplan].disabled,controlBar_roundedupdateFloorplanButtons(););
	if(layer[controlBar_roundedbtn_enter_vr],ifnot(layer[controlBar_roundedbtn_enter_vr].disabled,controlBar_roundedupdateVrButtons();););

	ifnot(layer[controlBar_roundedbtn_ctrlmode_drag_to].disabled,controlBar_roundedupdateControlModeButtons(););
	ifnot(layer[controlBar_roundedbtn_show_hotspots].disabled,controlBar_roundedupdateHideShowHotspotsButtons(););

	ifnot(layer[controlBar_roundedbtn_display_help].disabled,controlBar_roundedupdateHelpButtons(););
    );
  </action>


  <layer name="controlBar_roundedhelpScreenBg"
          url="%FIRSTXML%/graphics/roundcornerbar/help_screen_bg.png"
          keep="true"
          align="bottomright"
          x="0"
          y="0"
          rotate="-90"
          zorder="97"
          onclick="controlBar_roundedcloseHelp();"
          visible="false"
          >
  <layer name="controlBar_roundedhelpScreen" 
          keep="true"
          align="center"
          x="0"
          y="0"
          displayed="false"
          onclick="controlBar_roundedcloseHelp();"
         url="%FIRSTXML%/graphics/roundcornerbar/help_screen.png" 
         zorder="0"
         />
  <layer name="controlBar_roundedbtnCloseHelpScreen"
          url="%FIRSTXML%/graphics/roundcornerbar/btn_close_window.png"
          keep="true"
          align="topright"
          onclick="controlBar_roundedcloseHelp();"
          tooltip="controlBar_roundedhideHelpTip"
          onhover="controlBar_roundedshowMenuTooltip();"
          onout="hideTooltip();"
          x="100"
          y="10"
          zorder="1"
           />
  </layer>
  <action name="controlBar_roundeddisplayHelp">
	if (device.desktop,
		set(layer[controlBar_roundedhelpScreen].displayed, true);

	

		controlBar_roundedupdateHelpButtons();
	);
  </action>
  <action name="controlBar_roundedcloseHelp">
	if (device.desktop,
		set(layer[controlBar_roundedhelpScreen].displayed, false);
		controlBar_roundedupdateHelpButtons();
		

	

	);
  </action>
	<action name="controlBar_roundedHideHelpButtons">
		set(layer[controlBar_roundedbtn_display_help].visible, false);
		set(layer[controlBar_roundedbtn_close_help].visible, false);
		ifnot(layer[controlBar_roundedhelpScreenBg].rotate == -90,
			tween(layer[controlBar_roundedhelpScreenBg].rotate, -90, 0.7, easeOutQuad, set(layer[controlBar_roundedhelpScreenBg].visible, false););
		);
	</action>
	<action name="controlBar_roundedShowHelpButtons">
		if (layer[controlBar_roundedhelpScreen].displayed,
			set(layer[controlBar_roundedbtn_close_help].visible, true);
			set(layer[controlBar_roundedbtn_display_help].visible, false);
			set(layer[controlBar_roundedhelpScreenBg].visible, true);
			ifnot(layer[controlBar_roundedhelpScreenBg].rotate == 0,
				tween(layer[controlBar_roundedhelpScreenBg].rotate, 0, 0.7);
			);
		,
			set(layer[controlBar_roundedbtn_display_help].visible, true);
			set(layer[controlBar_roundedbtn_close_help].visible, false);
			ifnot(layer[controlBar_roundedhelpScreenBg].rotate == -90,
				tween(layer[controlBar_roundedhelpScreenBg].rotate, -90, 0.7, easeOutQuad, set(layer[controlBar_roundedhelpScreenBg].visible, false););
			);
		);
	</action>
	<action name="controlBar_roundedupdateHelpButtons">
	if (device.desktop,
		if (tour_displaycontrols,
			controlBar_roundedShowHelpButtons();
		,
			controlBar_roundedHideHelpButtons();
		);
	,
		controlBar_roundedHideHelpButtons();
	);
	</action>





  <action name="controlBar_roundedshowMenuTooltip">
    if (tooltip !== null,
      getmessage(tooltipmess, get(tooltip));
      showTooltip('plugin', controlBar_roundedmenuTooltipStyle, bottomright);
    );
  </action>

  <layer name="controlBar_roundedmenuTooltipStyle"
	keep="true"
	enabled="false"
	capture="false"
	type="text"
	align="center"
	bg="true"
	bgcolor="0x9b9b9b"
	bgalpha="0.80000000000000004"
	bgborder="0"
	css="color:#000000;font-family:Arial;font-weight:bold;font-size:14px;text-align:left;"
	edge="bottomright"
	interactivecontent="false"
	zorder="0"
	padding="2"
	xoffset="0"
	yoffset="0"
	visible="false"
	html=""
         />


<!-- ********* -->
<!-- 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,
        switch(plugin[gyroscope].enabled);
        set(plugin[gyroscope].activated,true);
        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>
<krpano  >
<!-- ******************************************* -->
<!-- ALPO Sidebar Plugin -->
<!-- ******************************************* -->
<include url="%FIRSTXML%/graphics/alpo.sidebar-v1.0.9/sidebar.xml" /> <sidebar name="settings"  groupCount="5"     isRealGroup_0="false" totalPanos0="1"  groupName0="get:data[en_pano923_title].content" group0Contents="pano923|" group0MainPano="pano923" SceneName0="pano923" groupMessage0="pano923_title"      isRealGroup_1="false" totalPanos1="1"  groupName1="get:data[en_pano945_title].content" group1Contents="pano945|" group1MainPano="pano945" SceneName1="pano945" groupMessage1="pano945_title"      isRealGroup_2="false" totalPanos2="1"  groupName2="get:data[en_pano950_title].content" group2Contents="pano950|" group2MainPano="pano950" SceneName2="pano950" groupMessage2="pano950_title"      isRealGroup_3="false" totalPanos3="1"  groupName3="get:data[en_pano922_title].content" group3Contents="pano922|" group3MainPano="pano922" SceneName3="pano922" groupMessage3="pano922_title"      isRealGroup_4="false" totalPanos4="1"  groupName4="get:data[en_pano981_title].content" group4Contents="pano981|" group4MainPano="pano981" SceneName4="pano981" groupMessage4="pano981_title"    sbColor="030303" sbColorAlpha="0.40" sbWidth="280" sbAlign="left" startOpened="false" startOpenedMob="true" sbCloseIfnew="false" sbCloseIfnewMob="true" sbIconPosition="bottom" sbIconAlpha="100" sbIconAlphaSep="false" sbIconAlphaSepVal="90" sbIconOverState="false" sbIconOpenedState="false" sbIconOpenedOverState="false" sbIconPositionX="-25" sbIconPositionY="25" sbIconPositionOpenUse="false" sbIconPositionOpen="top" sbIconPositionOpenX="0" sbIconPositionOpenY="0" sbIconHideShowDelay="false" sbIconDelay="6" sbOpenActions="0" sbCloseActions="0" sbMenuType="thumbscont"  sbIconUrl="%FIRSTXML%/graphics/alpo.sidebar-v1.0.9/sidebutton.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="true" 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();      setBlockAutoHeight( 2, 2 );  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="50" maxheight="130" y="0"  /> <layer name="sbBlock1" style="sbBlocks|sbBlock1ST" /> <action name="calcBlock1H"> calc(layer[sbBlock1].height, 10 * 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 + 0); </action>   <style name="sbBlock2ST" parent="sbBlock1" align="bottom" edge="top" minheight="0" maxheight="0" y="-20"  /> <layer name="sbBlock2" style="sbBlocks|sbBlock2ST" /> <action name="calcBlock2H"> calc(layer[sbBlock2].height, 90 * 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 + 20); </action>               <style name="sbLogoST" keep="true" url="%FIRSTXML%/graphics/alpo.sidebar-v1.0.9/rubica-logo-tm.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.9/menutype/thumbscont.xml" /> <style name="scrolLayerST" keep="true" type="container" align="top" parent="sbBlock2" accuracy="1" width="0" height="100%"/>              <!-- ////////////// Description (PANO) usage block--> <!--Description (PROJECT) usage block-->                       <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="false" /> <!-- *********************** --> <events devices="html5" name="alpoSBinitEV" keep="true" onxmlcomplete="alpoSBinit" /> <plugin devices="html5" name="alpoSB" keep="true" url="%FIRSTXML%/graphics/alpo.sidebar-v1.0.9/js/alpo.sidebar.js" /> <action devices="html5" name="alpoSBinit" type="Javascript"><![CDATA[ window.alpoSB = { plugID : 'alpo_sidebar_full', plugDir : 'RubicaTypeC1data/graphics/alpo.sidebar-v1.0.9', flags : {}, font : '', jsonData : '{ "project" : { "data" : { "dataDir" : "RubicaTypeC1data", "bgClr" : "#ffffff", "fgClr" : "#000000", "groupsCount" : 5 }, "groups" : [  { "id" : "panogroup925", "title" : "panogroup925_title", "description" : "panogroup925_description", "url" : "%FIRSTXML%/living_room_923/thumbnail.jpg", "urlAlt" : "%FIRSTXML%/graphics/alpo.sidebar-v1.0.9/assets/--/panogroup925.png", "color" : "#a0a0a0", "real" : false, "panoCount" : 1, "mainPano" : "pano923", "panoramas" : [  { "id" : "pano923", "parentID" : "panogroup925", "title" : "pano923_title", "description" : "pano923_description", "urlAlt" : "%FIRSTXML%/graphics/alpo.sidebar-v1.0.9/assets/--/pano923.png", "url" : "%FIRSTXML%/living_room_923/thumbnail.jpg" }  ] },  { "id" : "panogroup946", "title" : "panogroup946_title", "description" : "panogroup946_description", "url" : "%FIRSTXML%/bedroom_1_945/thumbnail.jpg", "urlAlt" : "%FIRSTXML%/graphics/alpo.sidebar-v1.0.9/assets/--/panogroup946.png", "color" : "#646464", "real" : false, "panoCount" : 1, "mainPano" : "pano945", "panoramas" : [  { "id" : "pano945", "parentID" : "panogroup946", "title" : "pano945_title", "description" : "pano945_description", "urlAlt" : "%FIRSTXML%/graphics/alpo.sidebar-v1.0.9/assets/--/pano945.png", "url" : "%FIRSTXML%/bedroom_1_945/thumbnail.jpg" }  ] },  { "id" : "panogroup951", "title" : "panogroup951_title", "description" : "panogroup951_description", "url" : "%FIRSTXML%/bedroom_2_950/thumbnail.jpg", "urlAlt" : "%FIRSTXML%/graphics/alpo.sidebar-v1.0.9/assets/--/panogroup951.png", "color" : "#505050", "real" : false, "panoCount" : 1, "mainPano" : "pano950", "panoramas" : [  { "id" : "pano950", "parentID" : "panogroup951", "title" : "pano950_title", "description" : "pano950_description", "urlAlt" : "%FIRSTXML%/graphics/alpo.sidebar-v1.0.9/assets/--/pano950.png", "url" : "%FIRSTXML%/bedroom_2_950/thumbnail.jpg" }  ] },  { "id" : "panogroup924", "title" : "panogroup924_title", "description" : "panogroup924_description", "url" : "%FIRSTXML%/bedroom_3_922/thumbnail.jpg", "urlAlt" : "%FIRSTXML%/graphics/alpo.sidebar-v1.0.9/assets/--/panogroup924.png", "color" : "#b4b4b4", "real" : false, "panoCount" : 1, "mainPano" : "pano922", "panoramas" : [  { "id" : "pano922", "parentID" : "panogroup924", "title" : "pano922_title", "description" : "pano922_description", "urlAlt" : "%FIRSTXML%/graphics/alpo.sidebar-v1.0.9/assets/--/pano922.png", "url" : "%FIRSTXML%/bedroom_3_922/thumbnail.jpg" }  ] },  { "id" : "panogroup982", "title" : "panogroup982_title", "description" : "panogroup982_description", "url" : "%FIRSTXML%/corridor_981/thumbnail.jpg", "urlAlt" : "%FIRSTXML%/graphics/alpo.sidebar-v1.0.9/assets/--/panogroup982.png", "color" : "#505050", "real" : false, "panoCount" : 1, "mainPano" : "pano981", "panoramas" : [  { "id" : "pano981", "parentID" : "panogroup982", "title" : "pano981_title", "description" : "pano981_description", "urlAlt" : "%FIRSTXML%/graphics/alpo.sidebar-v1.0.9/assets/--/pano981.png", "url" : "%FIRSTXML%/corridor_981/thumbnail.jpg" }  ] }  ] }, "plugin" : { "includes" : { "textfield" : "%FIRSTXML%/graphics/textfield.swf", "scrollarea" : "%FIRSTXML%/graphics/scrollarea.js" }, "settings" : { "sb" : { "width" : 280, "specifyWidth" : false,  "color" : "030303", "alpha" : 0.00, "align" : "left", "zorder" : 98, "startOpened" : false, "startOpenedMob" : true, "closeIfnew" : false, "closeIfnewMob" : true, "menuType" : "thumbscont", "openerUse" : false, "sbCloseOnClick" : true, "contextMenuUse" : true }, "btn" : { "use" : true, "position" : "bottom", "alpha" : 100, "alphaOpenUse" : false, "alphaOpen" : 90, "overStateUse" : false, "openStateUse" : false, "openOverStateUse": false, "posX" : "-25", "posY" : "25", "posOpenUse" : false, "posOpen" : "top", "posXOpen" : "0", "posYOpen" : "0", "showHideDelayUse": false, "showHideDelay" : 6, "sbOpenActions" : 0, "sbCloseActions" : 0, "url" :  "%FIRSTXML%/graphics/alpo.sidebar-v1.0.9/sidebutton.png" , "urlOver" : "", "urlOpen" : "", "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" : "", "orderItems" : " ", "groupAsText" : true, "panoAsText" : false, "custAsText" : false, "width" : 203, "height" : 50, "vSpace" : 5, "xOffset" : 20,   "loadMainPano" : false, "loadMainOpen" : false, "bgrColor" : "0x111111", "bgrAlpha" : 0.60, "txtOffsetL" : 10, "txtOffsetR" : 0, "txtAlign" : "left", "font" : "verdana", "fontSize" : 13, "color" : "ffffff", "italic" : " font-style:normal; ", "bold" : " font-weight:normal; ", "underline" : " text-decoration:none; ", "overStateUse" : false, "overColorUse" : true, "overColor" : "0x000000", "overAlpha" : 0.30, "itemIconUse" : true, "itemIconDflt" : true, "itemIcon" : "", "itemIconOffsetX" : "0", "itemIconOffsetY" : "0", "itemIconScale" : 100, "itemIconAlign" : "right", "itemIconSpecify" : true,  "itemIconSpecifyElems": [  { "customItems" : "", "groupNames" : "", "panoramaIDs" : "", "file" : "" }  ],  "itemBorderUse" : true, "itemBorder" : "0,0,1,0 0xeeeeee 0.60", "itemBorderT" : 0, "itemBorderR" : 0, "itemBorderB" : 1, "itemBorderL" : 0, "hrBgroundedge" : "0 0 0 0", "thumbPos" : "top", "thumbTxtPadT" : 15, "thumbTxtPadB" : 15, "thumbHeight" : 100, "thumbVStxtMarg" : 5, "thumbAlign" : "center", "thumbHorizOff" : 5,   "backBtn" : { "height" : 32, "width" : 245,   "bottomMarg" : 0, "align" : "lefttop", "bgrUse" : true, "bgrColor" : "0x0b0b0b", "bgrAlpha" : 0.40, "bgrChange" : true, "bgrChangeColor" : "0x1edaff", "bgrChangeAlpha" : 1.00, "txtUse" : true, "txtSrc" : "group", "font" : "verdana", "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.9/graphics/arr_back_left.png  ", "italic" : "  font-style:normal;  ", "bold" : "  font-weight:normal;  ", "underline" : "  text-decoration:none;  " }, "scrollInd" : { "use" : false, "color" : "0x505050", "alpha" : 1.00, "width" : 8, "zorder" : 98, "barUse" : false, "barColor" : "0x353526", "barAlpha" : 0.50 }, "scrollBtns" : { "use" : false, "width" : "20", "height" : "18", "scale" : 100, "bgcolor" : "0x505050", "bgalpha" : 1.00, "align" : "left", "zorder" : 98, "overStateUse" : true, "bgrOverColor" : "0x1a1a1a", "bgrOverAlpha" : 0.90, "iconOverAlpha" : 30, "iconDflt" : true, "iconFileT" : "", "iconFileB" : "", "iconAlpha" : 50 } } ], "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>       </krpano> <sidebar name="settings" loadGroupMainPano="false" sbThumbsContMargin="5" sbThumbsCloseIfnew="true" sbPanoContDescrUse="false" sbPanoContNameUse="true" sbPanoContNameSingleUse="false" sbPanoNameFontAlign="center"  sbPanoChooseContCloseUrl="%FIRSTXML%/graphics/alpo.sidebar-v1.0.9/graphics/sb_close_w.png"  sbPanoContCloseAlpha="90" sbPanoContCloseScale="80" overAnimUse="false"  overAnimColor="true" overColor="000000" overColorAlpha="0.50"   overAnimLineColor="true" overLineColor="ffffff" overLineColorAlpha="0.60" overLineWidth="3"  sbScrollAreaHeight="56" sbScrollAreaVSpace="5" sbScrollAreaNameWidth="243" sbScrollNameTxtBgrColor="111111" sbScrollNameTxtBgrAlpha="0.30" sbPanoNameTxtLeftPadding="0" sbPanoNameTxtRightPadding="0" sbScrollAreaXOffset="0" sbPanoNameFont="trebuchet ms" sbPanoNameFontSize="16" sbPanoContNumOfTotalTxtSize="12" sbPrefixTotal="alpo_sidebar_fullsbPrefixTotal"  sbPanoContNumOfTotalColor="eeeeee"  sbPanoContNameUseFontSize="16" sbPanoNameFontColor="eeeeee" sbPanoContNameUsePosition="center"    sbPanoContNameUseAlign="top"  sbPanoContNameUseOffset="0" sbDisplayPanoTotalInGr=""  sbPanoNameFontItalic="font-style&#58;normal&#59;"   sbPanoNameFontBold="font-weight&#58;normal&#59;"   sbPanoNameFontTD="text-decoration&#58;none&#59;"   sbPanoContNumOfTotal="false" sbPanoContOverlay="true" sbPanoContEye="true" sbPanoContThumbsBottomMargin="3" sbSinglePanoClick="true" sbMarkCurrentGroup="false" sbSyncExternalLoad="true" sbThumbsCloseIfnewIfClosed="false" delayOfSyncExternal="0.5" sbScrlBtnsUse="false"  sbTcMenuItemBorder="false"  sbTcMenuItemBorderSet="0"  itemTcBorderContW="243" itemTcBorderContH="55" itemTcBorderContXoff="0" itemTcBorderContYoff="0" />  <krpano devices="mobile"> <sidebar name="settings" sbLightBoxed="false" sbCloseSBinLBStyle="false" sbOpenSBinLBStyle="false" /> </krpano>     <style name="sbPanoDisplay_closeST" align="righttop" /> <style name="sbPanoDisplayST" align="lefttop" bgcolor="0x030303" bgalpha="0.40" /> <style name="sbPanoThumbInner" margin="3"/> <style name="sbPanoThumbInnerInner" bgcolor="0x000000" bgalpha="0.6" />  <style name="sboneOfTotalST" keep="false" />    <style name="sbEyeMark" keep="true" url="%FIRSTXML%/graphics/alpo.sidebar-v1.0.9/graphics/sb_eye.png" />    <action name="sbThumbsCloseIfnewCallAct"> sbThumbsCloseIfnewAct(); </action>      <action name="appendTHname"> set(thName_pano923, sbPanoThumbInner_0_0); set(thName_pano945, sbPanoThumbInner_1_0); set(thName_pano950, sbPanoThumbInner_2_0); set(thName_pano922, sbPanoThumbInner_3_0); set(thName_pano981, sbPanoThumbInner_4_0); </action> 
<!-- ********** -->
<!-- Floor plan -->
<!-- id : floorPlan -->
<!-- ********** -->

	<ptplugin name="floorPlan" engine="KolorFloorPlan">
		<settings>
			<option name="background_color" value="ffffff" type="string" />
			<option name="background_lighter_color" value="ffffff" type="string" />
			<option name="background_darker_color" value="d5d5d5" type="string" />
			<option name="background_alpha" value="1" type="float" />
			<option name="text_color" value="000000" type="string" />

			<option name="resize" value="true" type="bool" />
			<option name="fp_selector" value="one" type="string" />
			<option name="fp_selector_label" value="floorPlanmenu_label" type="string" />
			<option name="display_title" value="true" type="bool" />
			<option name="title" value="project_floor_title" type="string" />
			<option name="title_font" value="Verdana" type="string" />
			<option name="title_size" value="14" type="int" />
			<option name="title_weight" value="normal" type="string" />
			<option name="title_decoration" value="normal" type="string" />
			<option name="title_color" value="000000" type="string" />
			<option name="display_orientation" value="false" type="bool" />
			<option name="display_radar" value="false" type="bool" />
			<option name="close_on_click" value="true" type="bool" />
			<option name="position" value="center" type="string" />
			<option name="zorder" value="6" type="int" />
			<option name="use_i18n" value="true" type="bool" />
		</settings>
		
		<floorplanItems selectedItem="fpitemmain" selectedSpot="" selectedSpotScene="" selectedSpotHeading="" selectedSpotFov="">
				
				<floorplanItem 
					name="fpitemmain" 
					width="1486" 
					height="1838" 
					groupName="" 
					url="floorplan/typec1.png" 
					title="project_floor_title"
					heading="0">
							<spot name="spotmap928" posX="0.398844004" posY="0.442889988" heading="0" desc="spotmap928_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano922" jsClick="spotmap928ActionSpotFloorPlan">
								<icon url="spots/hotspot_image_user_defaultmap0.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap929" posX="0.725434005" posY="0.337994993" heading="0" desc="spotmap929_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano923" jsClick="spotmap929ActionSpotFloorPlan">
								<icon url="spots/hotspot_image_user_defaultmap0.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap949" posX="0.317918986" posY="0.237762004" heading="0" desc="spotmap949_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano945" jsClick="spotmap949ActionSpotFloorPlan">
								<icon url="spots/hotspot_image_user_defaultmap0.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap954" posX="0.433526009" posY="0.158508003" heading="0" desc="spotmap954_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano950" jsClick="spotmap954ActionSpotFloorPlan">
								<icon url="spots/hotspot_image_user_defaultmap0.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap983" posX="0.459538013" posY="0.344987988" heading="0" desc="spotmap983_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano981" jsClick="spotmap983ActionSpotFloorPlan">
								<icon url="spots/hotspot_image_user_defaultmap0.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
				</floorplanItem>
			
			
		</floorplanItems>
	</ptplugin>
	
	<action name="kolorFloorplanJsReady_floorPlan">
		set(ptplugin[floorPlan].jsready, true);
		
		ifnot(ptplugin[floorPlan].floorplanItems.selectedSpot == "",
			set(ptplugin[floorPlan].floorplanItems.selectedSpotFov, get(view.hfov));
			js(invokePluginFunction(floorPlan, setKolorFloorPlanSelectedSpotOptions, get(xml.scene), get(view.hlookat), get(view.hfov)));
		);
	</action>
	
	
		<!-- floorplan main spots counter : 5 -->
			<action name="spotmap928ActionSpotFloorPlan">
          mainloadscene(pano922);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
			<action name="spotmap929ActionSpotFloorPlan">
          mainloadscene(pano923);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
			<action name="spotmap949ActionSpotFloorPlan">
          mainloadscene(pano945);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
			<action name="spotmap954ActionSpotFloorPlan">
          mainloadscene(pano950);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
			<action name="spotmap983ActionSpotFloorPlan">
          mainloadscene(pano981);lookat(-7.200000, -0.450000, 90.000000);

</action>
	
	
	
	<events name="floorPlanEvents" 
	onxmlcomplete="ifnot(floorPlanFloorPlanLoaded,set(tour_displayfloorplan,false););floorPlanActivateDefaultSpot();" 
	onhidetourfloorplan="floorPlanCloseTourFloorPlan();" 
	onshowtourfloorplan="if(tour_displayfloorplan,floorPlanOpenTourFloorPlan(););" 
	onTourStart=""
	changetourlanguage="floorPlanChangeLanguage();"
	keep="true" />
	
	<action name="floorPlanChangeLanguage">
		if(ptplugin[floorPlan].jsready,
			stopdelayedcall(delay_floorPlan);
			js(invokePluginFunction(floorPlanArea, changeLanguage, false));
			js(invokePluginFunction(floorPlan, changeLanguage));
		,
			delayedcall(delay_floorPlan, 0.1, floorPlanChangeLanguage(););
		);
	</action>
	
	
	<krpano floorPlanFloorPlanLoaded="false" />
	
	<action name="floorPlanHideTourFloorPlan">
		hideKolorArea_floorPlanArea(false);
	</action>
	
	<action name="floorPlanCloseTourFloorPlan">
		closeKolorArea_floorPlanArea();
	</action>
	
	<action name="floorPlanShowTourFloorPlan">
		if(ptplugin[floorPlanArea].isOpen === null,
			openKolorArea_floorPlanArea();
		,
			showKolorArea_floorPlanArea(false);
		);
	</action>
	
	<action name="floorPlanOpenTourFloorPlan">
		openKolorArea_floorPlanArea();
	</action>
	
	
	<action name="floorPlanActivateSpot">
		
		set(ptplugin[floorPlan].floorplanItems.selectedSpot, %1);
		set(ptplugin[floorPlan].floorplanItems.selectedItem, %2);
		
		if(%1 !== "",
			set(ptplugin[floorPlan].floorplanItems.selectedSpotScene, get(xml.scene));
			set(ptplugin[floorPlan].floorplanItems.selectedSpotHeading, get(view.hlookat));
			set(ptplugin[floorPlan].floorplanItems.selectedSpotFov, get(view.hfov));
		);
		
		
		if(ptplugin[floorPlanArea].isOpen,
			floorPlanSelectActivatedSpot(%1, %2, %3);
		);
	</action>
	
	<action name="floorPlanSelectActivatedSpot">
		js(invokePluginFunction(floorPlan, selectSpot, %1, %2, %3));

	</action>
	
	<action name="floorPlanDeactivateSpot">
		set(ptplugin[floorPlan].floorplanItems.selectedSpot, "");
		
		js(invokePluginFunction(floorPlan, unselectSpot));
	</action>
	
	<action name="floorPlanActivateDefaultSpot">
		set(floorPlanFloorPlanLoaded, true);
		
		set(floorPlanSpotFound, "");
		set(floorPlanSpotScene, "");
		set(floorPlanItemFound, "");
		set(floorPlanItemSearch, true);
		set(floorPlanSpotSearchActivated, true);
		set(floorPlanSpotSearchContinue, true);
		
		
		for(set(defaultfloorplaniteminc,0), defaultfloorplaniteminc LT ptplugin[floorPlan].floorplanItems.floorplanItem.count , inc(defaultfloorplaniteminc),
                        if(floorPlanSpotSearchActivated == true,
				
				if(ptplugin[floorPlan].floorplanItems.floorplanItem[get(defaultfloorplaniteminc)].groupName == scene[get(xml.scene)].group,
					set(floorPlanItemFound, get(ptplugin[floorPlan].floorplanItems.floorplanItem[get(defaultfloorplaniteminc)].name));
					set(ptplugin[floorPlan].floorplanItems.selectedItem, get(ptplugin[floorPlan].floorplanItems.floorplanItem[get(defaultfloorplaniteminc)].name));
					set(floorPlanItemSearch, false);
				,
					
					if(floorPlanItemFound == "",
						set(floorPlanItemFound, get(ptplugin[floorPlan].floorplanItems.floorplanItem[fpitemmain].name));
						set(ptplugin[floorPlan].floorplanItems.selectedItem, get(ptplugin[floorPlan].floorplanItems.floorplanItem[fpitemmain].name));
					);
				);
			);
			if(floorPlanSpotSearchActivated == true,
                                for(set(defaultspotinc,0), defaultspotinc LT ptplugin[floorPlan].floorplanItems.floorplanItem[get(defaultfloorplaniteminc)].spot.count , inc(defaultspotinc),
                                        if(ptplugin[floorPlan].floorplanItems.floorplanItem[get(defaultfloorplaniteminc)].spot[get(defaultspotinc)].isScene == true,
					
						if(floorPlanSpotSearchContinue == true,
							if(ptplugin[floorPlan].floorplanItems.floorplanItem[get(defaultfloorplaniteminc)].spot[get(defaultspotinc)].scene == xml.scene,
								set(floorPlanSpotFound, get(ptplugin[floorPlan].floorplanItems.floorplanItem[get(defaultfloorplaniteminc)].spot[get(defaultspotinc)].name));
								set(floorPlanSpotScene, get(ptplugin[floorPlan].floorplanItems.floorplanItem[get(defaultfloorplaniteminc)].spot[get(defaultspotinc)].scene));
								set(ptplugin[floorPlan].floorplanItems.selectedItem, get(ptplugin[floorPlan].floorplanItems.floorplanItem[get(defaultfloorplaniteminc)].name));
								if(floorPlanItemSearch == false,
									set(floorPlanSpotSearchContinue, false);
									set(floorPlanSpotSearchActivated, false);
								);
							);
						);
					);
					
				);
			);
		);
		
		if(floorPlanSpotFound == "",
			
			
			floorPlanDeactivateSpot();
			
			
			set(ptplugin[floorPlan].floorplanItems.selectedItem, get(floorPlanItemFound));
			
			
			ifnot(ptplugin[floorPlan].floorplanItems.selectedItem == "",
				floorPlanActivateSpot("", get(ptplugin[floorPlan].floorplanItems.selectedItem), "");
			);
		,
			
			floorPlanActivateSpot(get(floorPlanSpotFound), get(ptplugin[floorPlan].floorplanItems.selectedItem), get(floorPlanSpotScene));
		);
	</action>
	
	<action name="floorPlanChangeTitle">
		js(invokePluginFunction(floorPlan, changeTitle, %1));
	</action>
	
	<ptplugin name="floorPlanArea" engine="kolorArea">
	<settings>
		<option name="position" value="center" type="string" />
		<option name="start_position" value="left" type="string" />
		<option name="margin_x" value="10" type="int" />
		<option name="margin_y" value="10" type="int" />
		<option name="display_title" value="true" type="bool" />
		<option name="title" value="project_floor_title" type="string" />
		<option name="title_font" value="Verdana" type="string" />
		<option name="title_size" value="14" type="int" />
		<option name="title_weight" value="normal" type="string" />
		<option name="title_decoration" value="normal" type="string" />
		<option name="title_color" value="000000" type="string" />
		<option name="close_displayed" value="true" type="bool" />
		<option name="close_text" value="floorPlandisplay_close_text" type="string" />

		<option name="background_color" value="ffffff" type="string" />
		<option name="background_alpha" value="1" type="float" />
		<option name="overlay_displayed" value="false" type="bool" />
		<option name="overlay_color" value="000000" type="string" />
		<option name="overlay_alpha" value="0.20000000000000001" type="float" />

		<option name="padding" value="15" type="int" />
		<option name="topleft_radius" value="5" type="int" />
		<option name="topright_radius" value="5" type="int" />
		<option name="bottomleft_radius" value="5" type="int" />
		<option name="bottomright_radius" value="5" type="int" />
		<option name="area_border_width" value="5" type="int" />
		<option name="area_border_color" value="f2f2f2" type="string" />
		<option name="area_border_alpha" value="1" type="float" />
		<option name="area_width" value="80" type="int" />
		<option name="area_height" value="80" type="int" />
		<option name="area_width_unit" value="percent" type="string" />
		<option name="area_height_unit" value="percent" type="string" />
		<option name="animation" value="false" type="bool" />
		<option name="animation_duration" value="500" type="int" />
		<option name="close_on_click" value="true" type="bool" />
		<option name="refresh_content" value="false" type="bool" />
		<option name="open_callback" value="addKolorFloorPlan('floorPlan', 'floorPlanArea_floorplanDIV');" type="string" />
		<option name="close_callback" value="invokeKrFunction('closeKolorAreaCallback_floorPlanArea')" type="string" />
		<option name="zorder" value="6" type="int" />
		<option name="use_i18n" value="true" type="bool" />
	</settings>
	</ptplugin>
	
	<action name="kolorAreaJsReady_floorPlanArea">
		set(ptplugin[floorPlanArea].jsready, true);

	</action>
	
	<action name="openKolorArea_floorPlanArea">
		ifnot(ptplugin[floorPlanArea].isOpen,
			set(ptplugin[floorPlanArea].isOpen, true);
			pauseautorotation(forceplugin);

			js(showKolorArea(floorPlanArea, &lt;div id="floorPlanArea_floorplanDIV"&gt;&lt;/div&gt;));
			
			if(ptplugin[floorPlan].floorplanItems.selectedSpot != "",
				floorPlanSelectActivatedSpot(get(ptplugin[floorPlan].floorplanItems.selectedSpot), get(ptplugin[floorPlan].floorplanItems.selectedItem), get(ptplugin[floorPlan].floorplanItems.selectedSpotScene));
			);
			events.dispatch(onremovedisplayedobject);
		);
	</action>
	
	<action name="closeKolorArea_floorPlanArea">
		if(ptplugin[floorPlanArea].isOpen,
			js(invokePluginFunction(floorPlanArea, closeKolorArea));
		);
	</action>
	
	<action name="toggleKolorArea_floorPlanArea">
		if(ptplugin[floorPlanArea].isOpen,
			closeKolorArea_floorPlanArea();
		,
			openKolorArea_floorPlanArea();
		);
	</action>
	
	<action name="closeKolorAreaCallback_floorPlanArea">
		if(ptplugin[floorPlanArea].isOpen,resumeautorotation(forceplugin);

			
		);
		set(ptplugin[floorPlanArea].isOpen, false);hideFloorplan();

	</action>
	
	<action name="changeTitleKolorArea_floorPlanArea">
		js(invokePluginFunction(floorPlanArea, changeTitle, %1));
	</action>
	
	<action name="showKolorArea_floorPlanArea">
		set(ptplugin[floorPlanArea].isOpen, true);
		pauseautorotation(forceplugin);

		js(invokePluginFunction(floorPlanArea, showKolorArea, %1));
		events.dispatch(onremovedisplayedobject);
	</action>
		
	<action name="hideKolorArea_floorPlanArea">
		resumeautorotation(forceplugin);

		
		set(ptplugin[floorPlanArea].isOpen, false);
		js(invokePluginFunction(floorPlanArea, hideKolorArea, %1));
	</action>
	
	<events name="kolorAreaEvents_floorPlanArea" 
		keep="true"
	/>
	

<action name="viewControlZoomIn">
	if(%1,
		if(%2,
			if(%2 LT view.fovmin,
				zoomto(get(view.fovmin));
			,
				if(%2 LT view.fov,
					zoomto(%2);
				);
			);
		,
			set(fov_moveforce, -1);
			delayedcall(0.1, viewControlZoomStop());
		);
	,
		set(fov_moveforce, -1);
	);
</action>
<action name="viewControlZoomOut">
	if(%1,
		if(%2,
			if(%2 GT view.fovmax,
				zoomto(get(view.fovmax));
			,
				if(%2 GT view.fov,
					zoomto(%2);
				);
			);
		,
			set(fov_moveforce, +1);
			delayedcall(0.1, viewControlZoomStop());
		);
	,
		set(fov_moveforce, +1);
	);
</action>
<action name="viewControlZoomStop">
	set(fov_moveforce, 0);
</action>

  <!-- Sounds Management -->
  <plugin name="soundinterface"
          preload="true"
          url.flash="%SWFPATH%/graphics/soundinterface.swf"
          url.html5="%FIRSTXML%/graphics/soundinterface.js"
          rootpath="%$videos_sounds_path%/sounds"
          backgroundsound=""
          backgroundsoundloops="0"
          bgsound="false"
          bgsoundpaused="false"
          bgsoundloopended="false"
          bgsoundtoforce = "false"
          volumeinitialized="false"
          started="true"
          keep="true"/>
  <events name="soundmanagementevents"
          onnewpano="if(plugin[soundinterface].started,playbackgroundsound(););"
          onxmlcomplete="soundinterfaceonxmlcomplete();"
          keep="true"/>
  <action name="soundinterfaceonxmlcomplete">
    ifnot(plugin[soundinterface].volumeinitialized,
      div(plugin[soundinterface].volume, tour_soundsvolume, 100);
      set(plugin[soundinterface].volumeinitialized,true);
    );
  </action>
  <action name="playsound3Dwhenpossible">
    set(really_play_sound, true);
    if (tour_current_played_sound,
      if (%1 == tour_current_played_sound,
        delete(tour_current_played_sound);
        set(tour_current_played_sound_state, 0);
        delete(tour_current_played_sound_paused);
        stopsound(%1);
        set(really_play_sound, false);
        if(%4,
          delete(tour_current_played_sound_pausesound);
          resumeTourSoundsActions(true,true,true,true,true);
        );
      );
    );
    if (really_play_sound,
      if (tour_current_played_sound,
        stopsound(get(tour_current_played_sound));

        ifnot(%4,
          if(tour_current_played_sound_pausesound,
            delete(tour_current_played_sound_pausesound);
            resumeTourSoundsActions(true,true,true,true,true);
          );
        );
      );
      if(%4,
        set(tour_current_played_sound_pausesound, true);
        pauseTourSoundsActions(true,false,true,true,true);
      );
      set(tour_current_played_sound, %1);
      if(tour_current_played_video,
        set(tour_current_played_sound_state, 2);
      ,
        set(tour_current_played_sound_state, 1);
      );
      set(tour_current_played_sound_paused, false);
      if (%3,
        if (device.flash,
          div(volume, tour_soundsvolume, 100);
          if(%9 != null,
            playsound3D(%1,%2,%5,%6,%7,get(volume),%8,stopsound3Dwhenpossible(%1,%4));
          ,
            playsound3D(%1,%2,%5,%6,%7,get(volume),%8);
          );
        ,
          if(%9 != null,
            playsound(%1,%2,%8,stopsound3Dwhenpossible(%1,%4));
          ,
            playsound(%1,%2,%8);
          );
        );
      ,
        if(%6 != null,
          playsound(%1,%2,%5,stopsound3Dwhenpossible(%1,%4));
        ,
          playsound(%1,%2,%5);
        );
      );

      ifnot(tour_soundson,
        set(tour_current_played_sound_paused, true);
        pausesound(%1);
      );
    );
  </action>
  <action name="stopsound3Dwhenpossible">
    if (%1 == tour_current_played_sound,
      delete(tour_current_played_sound);
      set(tour_current_played_sound_state, 0);
      delete(tour_current_played_sound_paused);

      ifnot(device.safari,
        stopsound(%1);
      );
      if(%2,
        delete(tour_current_played_sound_pausesound);
        resumeTourSoundsActions(true,true,true,true,true);
      );
    );
  </action>
  <action name="playbackgroundsound">
  if(playsound,
    if (xml.scene,
      if (scene[get(xml.scene)].backgroundsound,
        if (plugin[soundinterface].backgroundsound != scene[get(xml.scene)].backgroundsound,
          copy(plugin[soundinterface].backgroundsound, scene[get(xml.scene)].backgroundsound);
          copy(plugin[soundinterface].backgroundsoundloops, scene[get(xml.scene)].backgroundsoundloops);
          if (tour_soundson,
            set(plugin[soundinterface].bgsound, true);
            set(plugin[soundinterface].bgsoundpaused, false);
            set(plugin[soundinterface].bgsoundloopended, false);
            set(plugin[soundinterface].bgsoundtoforce, false);
            if(scene[get(xml.scene)].video == false OR (scene[get(xml.scene)].video == true AND scene[get(xml.scene)].scenevideomute == true),
              if(plugin[soundinterface].backgroundsoundloops GT 0,
                playsound(bgsoundname, get(plugin[soundinterface].backgroundsound), get(plugin[soundinterface].backgroundsoundloops), stopbackgroundsoundoncomplete());
              ,
                playsound(bgsoundname, get(plugin[soundinterface].backgroundsound), get(plugin[soundinterface].backgroundsoundloops));
              );
            );
           ,
            set(plugin[soundinterface].bgsoundtoforce, true);
            set(plugin[soundinterface].bgsound, false);
          );
        ,
          if (tour_soundson,
            if((plugin[soundinterface].bgsoundpaused == true AND scene[get(xml.scene)].video == false) OR (scene[get(xml.scene)].video == true AND scene[get(xml.scene)].scenevideomute == true),
              resumesound(bgsoundname);
              set(plugin[soundinterface].bgsoundpaused, false);
            );
          ,
            set(plugin[soundinterface].bgsoundtoforce, true);
            set(plugin[soundinterface].bgsound, false);
          );
        );
      );
    );
  ,
    delayedcall(0.2, playbackgroundsound());
  );
  </action>
  <action name="stopbackgroundsoundoncomplete">
    if (plugin[soundinterface].backgroundsound,
    if (plugin[soundinterface].backgroundsoundloops GT 0,

      set(plugin[soundinterface].backgroundsoundloops, 0);
      set(plugin[soundinterface].bgsound, false);
      set(plugin[soundinterface].bgsoundpaused, false);
      set(plugin[soundinterface].bgsoundloopended, true);
    );
    );
  </action>
  <action name="resetbackgroundsoundifneeded">
    if (xml.scene,
      if (scene[get(xml.scene)].backgroundsound != scene[%1].backgroundsound,
        if(plugin[soundinterface].backgroundsound,
          stopsound(bgsoundname);
        );
        set(plugin[soundinterface].backgroundsound, "");
        set(plugin[soundinterface].backgroundsoundloops, 0);
        set(plugin[soundinterface].bgsound, false);
        set(plugin[soundinterface].bgsoundpaused, false);
        set(plugin[soundinterface].bgsoundloopended, false);
      );
    );
  </action>
  <action name="pausebackgroundsound">
    if(plugin[soundinterface].backgroundsound,
      if (plugin[soundinterface].bgsound,
        if(plugin[soundinterface].bgsoundpaused == false AND plugin[soundinterface].bgsoundloopended == false,
          pausesound(bgsoundname);
          set(plugin[soundinterface].bgsoundpaused, true);
        );
      );
    );
    
  </action>
  <action name="resumebackgroundsound">
    set(bgSoundOnResume, true);
    set(forceBgSoundOnResume, true);
    if(layer[displayedStandardVideo],
    if(layer[displayedStandardVideo].pausebgsound AND tour_current_played_video,
      set(bgSoundOnResume, false);
      set(forceBgSoundOnResume, false);
    ););
    if(layer[webvideodisplay_player],
    if(layer[webvideodisplay_player].pausebgsound AND tour_current_played_web_video,
      set(bgSoundOnResume, false);
      set(forceBgSoundOnResume, false);
    ););
    if(tour_current_played_sound_pausesound AND tour_current_played_sound,
      set(bgSoundOnResume, false);
    );
    ifnot(plugin[soundinterface].backgroundsound AND scene[get(xml.scene)].backgroundsound,
      set(bgSoundOnResume, false);
    );
    if(videospots_playing GT 0,
      set(bgSoundOnResume, false);
      set(forceBgSoundOnResume, false);
    );
    if(bgSoundOnResume,
      if (plugin[soundinterface].backgroundsound,
        if (tour_soundson,
          if (plugin[soundinterface].bgsound AND plugin[soundinterface].bgsoundloopended == false,
            if((plugin[soundinterface].bgsoundpaused == true AND scene[get(xml.scene)].video == false) OR (scene[get(xml.scene)].video == true AND scene[get(xml.scene)].scenevideomute == true),
              resumesound(bgsoundname);
              set(plugin[soundinterface].bgsoundpaused, false);
            ,

              if(device.mobile OR device.tablet OR device.safari OR device.chrome,
                resumesound(bgsoundname);
                set(plugin[soundinterface].bgsoundpaused, false);
              );
            );
          ,
            if(((plugin[soundinterface].bgsoundpaused == true OR plugin[soundinterface].bgsoundtoforce == true) AND scene[get(xml.scene)].video == false) OR (scene[get(xml.scene)].video == true AND scene[get(xml.scene)].scenevideomute == true),
              set(plugin[soundinterface].bgsound, true);
              set(plugin[soundinterface].bgsoundpaused, false);
              set(plugin[soundinterface].bgsoundloopended, false);
              set(plugin[soundinterface].bgsoundtoforce, false);
              if(plugin[soundinterface].backgroundsoundloops GT 0,
                playsound(bgsoundname, get(plugin[soundinterface].backgroundsound), get(plugin[soundinterface].backgroundsoundloops), stopbackgroundsoundoncomplete());
              ,
                playsound(bgsoundname, get(plugin[soundinterface].backgroundsound), get(plugin[soundinterface].backgroundsoundloops));
              );
            );
          );
        );
      );
      
    ,
      if(forceBgSoundOnResume,
        playbackgroundsound();
        
      );
    );
  </action>
  <action name="preloadSounds">
    preloadsound("_136_full_moving-ahead_0145.mp3");
  </action>

  <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);
    div(volume, tour_soundsvolume, 100);
    set(plugin[soundinterface].volume, get(volume));
    set3DLocalSoundsVolume();
  </action>
  <action name="playTourSoundsActions">
    if(%1,
      if(plugin[soundinterface],
        if(plugin[soundinterface].started,
        play3DLocalSounds();
        );
      );
    );
    if(%2,
      if(plugin[soundinterface],
        if(plugin[soundinterface].started,
          resumebackgroundsound();
        );
      );
    );
  </action>
  <action name="stopTourSoundsActions">
    if(%1,
      stop3DLocalSounds();
    );
    if(%2,
      stopSoundActionsSounds();
    );
    if(%3,
      stopVideoActionsSounds();
    );
    if(%4,
      pausebackgroundsound();
    );
  </action>
  <action name="resumeTourSoundsActions">
    if(%1,
      if(plugin[soundinterface],
        if(plugin[soundinterface].started,
        resume3DLocalSounds();
        );
      );
    );
    if(%2,
      resumeSoundActionsSounds();
    );
    if(%3,
      resumeVideoActionsSounds();
    );
    if(%4,
      if(%5,
        if(plugin[soundinterface],
          if(plugin[soundinterface].started,
            resumebackgroundsound();
          );
        );
      ,
        pausebackgroundsound();
      );
    );
  </action>
  <action name="pauseTourSoundsActions">
    if(%1,
      pause3DLocalSounds();
    );
    if(%2,
      pauseSoundActionsSounds();
    );
    if(%3,
      pauseVideoActionsSounds();
    );
    if(%4,
      if(%5,
        pausebackgroundsound();
      ,
        if(plugin[soundinterface],
          if(plugin[soundinterface].started,
            resumebackgroundsound();
          );
        );
      );
    );
  </action>
  <action name="stopSoundActionsSounds">
    if (tour_current_played_sound,
      delete(tour_current_played_sound_paused);
      stopsound(get(tour_current_played_sound));
      delete(tour_current_played_sound);
      set(tour_current_played_sound_state, 0);
    );
  </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="resumeSoundActionsSounds">
    if (tour_current_played_sound,
      set(resumeSoundActionsVerification, true);
      if(tour_current_played_video,
        if(tour_current_played_sound_state LT tour_current_played_video_state,
          set(resumeSoundActionsVerification, false);
        );
      );
      if(resumeSoundActionsVerification,
        if (tour_soundson,
          if(tour_current_played_sound_paused,
            set(tour_current_played_sound_paused, false);
            resumesound(get(tour_current_played_sound));
          ,

            if(device.mobile OR device.tablet OR device.safari OR device.chrome,
              set(tour_current_played_sound_paused, false);
              resumesound(get(tour_current_played_sound));
            );
          );
        );
      );
    );
  </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="pauseSoundActionsSounds">
    if (tour_current_played_sound,
      ifnot(tour_current_played_sound_paused,
        set(tour_current_played_sound_paused, true);
        pausesound(get(tour_current_played_sound));
      );
    );
  </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>

  <!-- Hide / Show Controls -->
  <action name="hideTourControls">set(tour_displaycontrols, false);events.dispatch(hidetourcontrols);</action>
  <action name="showTourControls">set(tour_displaycontrols, true); events.dispatch(showtourcontrols);</action>


  <!-- FLOORPLAN -->
  <action name="hideFloorplan">set(tour_displayfloorplan, false);events.dispatch(onhidetourfloorplan);</action>
  <action name="showFloorplan">set(tour_displayfloorplan, true); events.dispatch(onshowtourfloorplan);</action>


	<!-- WebVR plugin for VR availability tests -->

	<plugin name="ptpvrmode" devices="html5" keep="true"
		url="%FIRSTXML%/graphics/webvr.js"
		mobilevr_support="true"
		mobilevr_fake_support="false"
		vr_cursor=""
		vr_cursor_enabled="false"
		onavailable="delayedcall(1, checkVrAvailability(););"
		onunavailable="checkVrUnavailable();"
		/>
	<action name="checkVrAvailability">
		if(plugin[ptpvrmode],
			if (plugin[ptpvrmode].isavailable,
				set(tour_vrdevices, true);
				events.dispatch(onvravailable);
			,
				set(tour_vrdevices, false);
			);
		,
			checkVrUnavailable();
		);
	</action>
	<action name="checkVrUnavailable">
		set(tour_vrdevices, false);
		events.dispatch(onvrunavailable);
	</action>
<action name="viewControlMoveUp">
	if(%1,
		if(%2,
			set(isfullvertical, false);
			ifnot(scene[get(xml.scene)].planar,
				sub(viewvfov, panoview.vmax, panoview.vmin);
				if (viewvfov == 180,
					set(isfullvertical, true);
				);
			);
			if(isfullvertical == false AND calc(view.vlookat-%2) LT view.vlookatmin,
				moveto(get(view.hlookat), get(view.vlookatmin));
			,
				moveto(get(view.hlookat), calc(view.vlookat-%2));
			);
		,
			set(vlookat_moveforce, -1);
			delayedcall(0.1, viewControlMoveVertStop());
		);
	,
		set(vlookat_moveforce, -1);
	);
</action>
<action name="viewControlMoveDown">
	if(%1,
		if(%2,
			set(isfullvertical, false);
			ifnot(scene[get(xml.scene)].planar,
				sub(viewvfov, panoview.vmax, panoview.vmin);
				if (viewvfov == 180,
					set(isfullvertical, true);
				);
			);
			if(sceneisfull360 == false AND calc(view.vlookat+%2) GT view.vlookatmax,
				moveto(get(view.hlookat), get(view.vlookatmax));
			,
				moveto(get(view.hlookat), calc(view.vlookat+%2));
			);
		,
			set(vlookat_moveforce, +1);
			delayedcall(0.1, viewControlMoveVertStop());
		);
	,
		set(vlookat_moveforce, +1);
	);
</action>
<action name="viewControlMoveLeft">
	if(%1,
		if(%2,
			set(isfullhorizontal, false);
			ifnot(scene[get(xml.scene)].planar,
				sub(viewhfov, panoview.hmax, panoview.hmin);
				if (viewhfov == 360,
					set(isfullhorizontal, true);
				);
			);
			if(isfullhorizontal == false AND calc(view.hlookat-%2) LT view.hlookatmin,
				moveto(get(view.hlookatmin), get(view.vlookat));
			,
				moveto(calc(view.hlookat-%2), get(view.vlookat));
			);
		,
			set(hlookat_moveforce, -1);
			delayedcall(0.1, viewControlMoveHoriStop());
		);
	,
		set(hlookat_moveforce, -1);
	);
</action>
<action name="viewControlMoveRight">
	if(%1,
		if(%2,
			set(isfullhorizontal, false);
			ifnot(scene[get(xml.scene)].planar,
				sub(viewhfov, panoview.hmax, panoview.hmin);
				if (viewhfov == 360,
					set(isfullhorizontal, true);
				);
			);
			if(isfullhorizontal == false AND calc(view.hlookat+%2) GT view.hlookatmax,
				moveto(get(view.hlookatmax), get(view.vlookat));
			,
				moveto(calc(view.hlookat+%2), get(view.vlookat));
			);
		,
			set(hlookat_moveforce, +1);
			delayedcall(0.1, viewControlMoveHoriStop());
			
		);
	,
		set(hlookat_moveforce, +1);
	);
</action>
<action name="viewControlMoveHoriStop">
	set(hlookat_moveforce, 0);
</action>
<action name="viewControlMoveVertStop">
	set(vlookat_moveforce, 0);
</action>

  <!-- Fullscreen Management -->
  <action name="exitFullScreen" devices="fullscreensupport">set(tour_fullscreen,false);js(setFullscreen(false));</action>
  <action name="enterFullScreen" devices="fullscreensupport">set(tour_fullscreen,true);js(setFullscreen(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="enterFullScreenChangeEvent" devices="fullscreensupport">set(tour_fullscreen,true);events.dispatch(onenterfullscreen);</action>
  <action name="exitFullScreenFallback">set(fullscreen,false);</action>
  <action name="enterFullScreenFallback">set(fullscreen,true);</action>
  
  <action name="resizeFullScreenEvent">delayedcall(0,updatescreen(););</action>

</krpano>