<?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="center"
         onloaded="startspotanimation(0.1);"
         onhover="onhoverIconDefaultPointSpotStyle"
         onout="onoutIconDefaultPointSpotStyle"


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



  </action>



<!-- ********** -->
<!-- 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(pano26);
    </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"      groupName0="get:data[en_panogroup38_title].content" groupMessage0="panogroup38_title" totalPanos0="4" group0Contents="pano26|pano19|pano23|pano22|" group0MainPano="pano26" isRealGroup_0="true"  SceneName_0_0="pano26"  SceneName_0_1="pano19"  SceneName_0_2="pano23"  SceneName_0_3="pano22"       groupName1="get:data[en_panogroup36_title].content" groupMessage1="panogroup36_title" totalPanos1="4" group1Contents="pano24|pano18|pano20|pano21|" group1MainPano="pano24" isRealGroup_1="true"  SceneName_1_0="pano24"  SceneName_1_1="pano18"  SceneName_1_2="pano20"  SceneName_1_3="pano21"       groupName2="get:data[en_panogroup39_title].content" groupMessage2="panogroup39_title" totalPanos2="2" group2Contents="pano27|pano28|" group2MainPano="pano27" isRealGroup_2="true"  SceneName_2_0="pano27"  SceneName_2_1="pano28"       groupName3="get:data[en_panogroup462_title].content" groupMessage3="panogroup462_title" totalPanos3="1" group3Contents="pano29|" group3MainPano="pano29" isRealGroup_3="true"  SceneName_3_0="pano29"       groupName4="get:data[en_panogroup62_title].content" groupMessage4="panogroup62_title" totalPanos4="1" group4Contents="pano61|" group4MainPano="pano61" isRealGroup_4="true"  SceneName_4_0="pano61"    sbColor="030303" sbColorAlpha="0.40" sbWidth="280" sbAlign="left" startOpened="false" startOpenedMob="true" sbCloseIfnew="false" sbCloseIfnewMob="true" sbIconPosition="bottom" sbIconAlpha="80" sbIconAlphaSep="false" sbIconAlphaSepVal="90" sbIconOverState="false" sbIconOpenedState="false" sbIconOpenedOverState="false" sbIconPositionX="-5" sbIconPositionY="0" sbIconPositionOpenUse="false" sbIconPositionOpen="top" sbIconPositionOpenX="0" sbIconPositionOpenY="0" sbIconHideShowDelay="false" sbIconDelay="6" sbOpenActions="0" sbCloseActions="0" sbMenuType="hierarchical"  sbIconUrl="%FIRSTXML%/graphics/alpo.sidebar-v1.0.9/graphics/sb_menu.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/triterra_logo-02.png" align="top" alpha="0" width="100%" height="prop" handcursor="true" accuracy="1" parent="sbBlock1" onclick="sbOnClickLogo()" />  <action name="sbOnClickLogo"> getmessage(urltoopen,alpo_sidebar_fullsb_onclick_logo102108openurlwebsiteurl);openurl(get(urltoopen),_blank);

  </action>                       <style name="current_PanoNameUseST" url="" keep="false" />              <include url="%FIRSTXML%/graphics/alpo.sidebar-v1.0.9/menutype/hierarchical.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 : 'themetmissdata/graphics/alpo.sidebar-v1.0.9', flags : {}, font : '', jsonData : '{ "project" : { "data" : { "dataDir" : "themetmissdata", "bgClr" : "#ffffff", "fgClr" : "#000000", "groupsCount" : 5 }, "groups" : [  { "id" : "panogroup38", "title" : "panogroup38_title", "description" : "panogroup38_description", "url" : "%FIRSTXML%/terrace_26/thumbnail.jpg", "urlAlt" : "%FIRSTXML%/graphics/alpo.sidebar-v1.0.9/assets/--/panogroup38.png", "color" : "#a0a0a0", "real" : true, "panoCount" : 4, "mainPano" : "pano26", "panoramas" : [  { "id" : "pano26", "parentID" : "panogroup38", "title" : "pano26_title", "description" : "pano26_description", "urlAlt" : "%FIRSTXML%/graphics/alpo.sidebar-v1.0.9/assets/--/pano26.png", "url" : "%FIRSTXML%/terrace_26/thumbnail.jpg" },  { "id" : "pano19", "parentID" : "panogroup38", "title" : "pano19_title", "description" : "pano19_description", "urlAlt" : "%FIRSTXML%/graphics/alpo.sidebar-v1.0.9/assets/--/pano19.png", "url" : "%FIRSTXML%/dropoff_19/thumbnail.jpg" },  { "id" : "pano23", "parentID" : "panogroup38", "title" : "pano23_title", "description" : "pano23_description", "urlAlt" : "%FIRSTXML%/graphics/alpo.sidebar-v1.0.9/assets/--/pano23.png", "url" : "%FIRSTXML%/lobby_23/thumbnail.jpg" },  { "id" : "pano22", "parentID" : "panogroup38", "title" : "pano22_title", "description" : "pano22_description", "urlAlt" : "%FIRSTXML%/graphics/alpo.sidebar-v1.0.9/assets/--/pano22.png", "url" : "%FIRSTXML%/liftlobby_22/thumbnail.jpg" }  ] },  { "id" : "panogroup36", "title" : "panogroup36_title", "description" : "panogroup36_description", "url" : "%FIRSTXML%/podiumcenter_24/thumbnail.jpg", "urlAlt" : "%FIRSTXML%/graphics/alpo.sidebar-v1.0.9/assets/--/panogroup36.png", "color" : "#c8c8c8", "real" : true, "panoCount" : 4, "mainPano" : "pano24", "panoramas" : [  { "id" : "pano24", "parentID" : "panogroup36", "title" : "pano24_title", "description" : "pano24_description", "urlAlt" : "%FIRSTXML%/graphics/alpo.sidebar-v1.0.9/assets/--/pano24.png", "url" : "%FIRSTXML%/podiumcenter_24/thumbnail.jpg" },  { "id" : "pano18", "parentID" : "panogroup36", "title" : "pano18_title", "description" : "pano18_description", "urlAlt" : "%FIRSTXML%/graphics/alpo.sidebar-v1.0.9/assets/--/pano18.png", "url" : "%FIRSTXML%/businesscenter_18/thumbnail.jpg" },  { "id" : "pano20", "parentID" : "panogroup36", "title" : "pano20_title", "description" : "pano20_description", "urlAlt" : "%FIRSTXML%/graphics/alpo.sidebar-v1.0.9/assets/--/pano20.png", "url" : "%FIRSTXML%/glassbox_20/thumbnail.jpg" },  { "id" : "pano21", "parentID" : "panogroup36", "title" : "pano21_title", "description" : "pano21_description", "urlAlt" : "%FIRSTXML%/graphics/alpo.sidebar-v1.0.9/assets/--/pano21.png", "url" : "%FIRSTXML%/glassboxrooftop_21/thumbnail.jpg" }  ] },  { "id" : "panogroup39", "title" : "panogroup39_title", "description" : "panogroup39_description", "url" : "%FIRSTXML%/unit01_27/thumbnail.jpg", "urlAlt" : "%FIRSTXML%/graphics/alpo.sidebar-v1.0.9/assets/--/panogroup39.png", "color" : "#8c8c8c", "real" : true, "panoCount" : 2, "mainPano" : "pano27", "panoramas" : [  { "id" : "pano27", "parentID" : "panogroup39", "title" : "pano27_title", "description" : "pano27_description", "urlAlt" : "%FIRSTXML%/graphics/alpo.sidebar-v1.0.9/assets/--/pano27.png", "url" : "%FIRSTXML%/unit01_27/thumbnail.jpg" },  { "id" : "pano28", "parentID" : "panogroup39", "title" : "pano28_title", "description" : "pano28_description", "urlAlt" : "%FIRSTXML%/graphics/alpo.sidebar-v1.0.9/assets/--/pano28.png", "url" : "%FIRSTXML%/unit02_28/thumbnail.jpg" }  ] },  { "id" : "panogroup462", "title" : "panogroup462_title", "description" : "panogroup462_description", "url" : "%FIRSTXML%/unit03_29/thumbnail.jpg", "urlAlt" : "%FIRSTXML%/graphics/alpo.sidebar-v1.0.9/assets/--/panogroup462.png", "color" : "#8c8c8c", "real" : true, "panoCount" : 1, "mainPano" : "pano29", "panoramas" : [  { "id" : "pano29", "parentID" : "panogroup462", "title" : "pano29_title", "description" : "pano29_description", "urlAlt" : "%FIRSTXML%/graphics/alpo.sidebar-v1.0.9/assets/--/pano29.png", "url" : "%FIRSTXML%/unit03_29/thumbnail.jpg" }  ] },  { "id" : "panogroup62", "title" : "panogroup62_title", "description" : "panogroup62_description", "url" : "%FIRSTXML%/rooftop_61/thumbnail.jpg", "urlAlt" : "%FIRSTXML%/graphics/alpo.sidebar-v1.0.9/assets/--/panogroup62.png", "color" : "#505050", "real" : true, "panoCount" : 1, "mainPano" : "pano61", "panoramas" : [  { "id" : "pano61", "parentID" : "panogroup62", "title" : "pano61_title", "description" : "pano61_description", "urlAlt" : "%FIRSTXML%/graphics/alpo.sidebar-v1.0.9/assets/--/pano61.png", "url" : "%FIRSTXML%/rooftop_61/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" : "hierarchical", "openerUse" : false, "sbCloseOnClick" : true, "contextMenuUse" : true }, "btn" : { "use" : true, "position" : "bottom", "alpha" : 80, "alphaOpenUse" : false, "alphaOpen" : 90, "overStateUse" : false, "openStateUse" : false, "openOverStateUse": false, "posX" : "-5", "posY" : "0", "posOpenUse" : false, "posOpen" : "top", "posXOpen" : "0", "posYOpen" : "0", "showHideDelayUse": false, "showHideDelay" : 6, "sbOpenActions" : 0, "sbCloseActions" : 0, "url" :  "%FIRSTXML%/graphics/alpo.sidebar-v1.0.9/graphics/sb_menu.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> 
<!-- ********** -->
<!-- Floor Plan Map -->
<!-- id : FloorPlanMap -->
<!-- ********** -->
<!-- Floor Plan Map 1.2 - Copyright Panotourplugin.com - 2020 - It is possible to modify the files but it is not allowed to resell the plugin or parts of code. -->
<!-- Code Maurizio Chiocchetti    -->


<include url="%FIRSTXML%/graphics/floorplanmap/core.xml" />

<fp_settings
speedfade ="0.5"
pausefade ="0.5"
startscale ="1"
startscaleT ="0.8"
startscaleM ="0.7"
nele ="2"
maxscale ="1"
minscale ="0.5"
nameu="tan chun lin"
emailu="chunlin698@yahoo.com"
fadeopenclose="0"
/>

<events name="FloorplanMap_sTs"
keep="true"
onresize=""
onxmlcomplete="set(FloorplanMap_act, get(layer[FloorplanMap_].scale));"



onshowtourfloorplan="showFloorplanMap_(true);delayedcall(0.1,callwith(layer[FloorplanMap_button_plus_c], onclick););"

onhidetourfloorplan="hideFloorplanMap_();"
onTourStart="showFloorplanMap_();"

/>


<events name="FloorplanMap_image_zoom_events" onnewscene="FloorplanMap_image_onmousewheel" onmousewheel="FloorplanMap_image_onmousewheel();if(layer[FloorplanMap_].scale GE 1, set(layer[FloorplanMap_].scale,1););
if(layer[FloorplanMap_].scale LE 0.5, set(layer[FloorplanMap_].scale,0.5););"
keep="true"/>

<layer name="FloorplanMap_button_full"
zorder="99"
enabled="true"
keep="true"
type="container"
maskchildren="false"
bgalpha="0"
alpha="1"
width="get:calc(25+20)"
height="get:calc(25+20)"
visible="true"
align="topright"
edge="topright"
x="10"
y="10"
bgcolor="0xffffff"
bgroundedge="0"
parent="layer[FloorplanMap_mybox_container]"
/>


<layer name="FloorplanMap_button_full_cl"
bgcapture="true"
enabled="true"
keep="true"
type="image"
url="%FIRSTXML%/graphics/floorplanmap/open_f.png"
width="25"
height="25"
visible="true"
alpha="1"
align="center"
edge="center"
x="0"
y="0"
bgalpha="1"
parent="layer[FloorplanMap_button_full]"
onclick="FloorplanMap_full(true);hideTooltip();"
onover="FloorplanMap_alpha_over();"
onhover="showTooltip('plugin', FloorplanMap_menuTooltipStyle);"
onout="FloorplanMap_alpha_out();hideTooltip();"
tooltip="FloorPlanMaptooltip_full"
/>




<layer name="FloorplanMap_button_full_c"
zorder="99"
enabled="true"
keep="true"
type="container"
maskchildren="false"
bgalpha="0"
alpha="1"
width="get:calc(25+20)"
height="get:calc(25+20)"
visible="false"
align="topright"
edge="topright"
x="10"
y="10"
bgcolor="0xffffff"
bgroundedge="0"
parent="layer[FloorplanMap_mybox_container]"
/>


<layer name="FloorplanMap_button_full_ccl"
bgcapture="true"
enabled="true"
keep="true"
type="image"
url="%FIRSTXML%/graphics/floorplanmap/close_f.png"
width="25"
height="25"
visible="false"
alpha="1"
align="center"
edge="center"
x="0"
y="0"
bgalpha="1"
parent="layer[FloorplanMap_button_full_c]"
onclick="FloorplanMap_full(false);hideTooltip();"
onhover="showTooltip('plugin', FloorplanMap_menuTooltipStyle);"
onover="FloorplanMap_alpha_over();"
onout="FloorplanMap_alpha_out();hideTooltip();"
tooltip="FloorPlanMaptooltip_full_close"
/>


<layer name="FloorplanMap_button_plus"
zorder="99"
bgcapture="true"
enabled="true"
keep="true"
type="container"
width="get:calc(25+20)"
height="get:calc(25+20)"
visible="true"
alpha="1"

align="bottomright"
edge="bottomright"
x="10"
y="10"
bgcolor="0xffffff"
bgroundedge="0"
parent="layer[FloorplanMap_mybox_container]"

bgalpha="0"
/>

<layer name="FloorplanMap_button_plus_c"
bgcapture="true"
enabled="true"
keep="true"
type="image"
url="%FIRSTXML%/graphics/floorplanmap/plus.png"
width="25"
height="25"
visible="true"
alpha="1"
align="center"
edge="center"
x="0"
y="0"
parent="layer[FloorplanMap_button_plus]"
onclick="set(layer[FloorplanMap_background].visible,true);
if(layer[FloorplanMap_scroller].visible,
set(layer[FloorplanMap_scroller].visible,false);set(tooltip,FloorPlanMaptooltip_multi); , set(layer[FloorplanMap_scroller].visible,true);set(tooltip,FloorPlanMaptooltip_multi_alt););"
onover="FloorplanMap_alpha_over();"
onout="FloorplanMap_alpha_out();hideTooltip();"
onhover="showTooltip('plugin', FloorplanMap_menuTooltipStyle);"
tooltip="FloorPlanMaptooltip_multi"
/>


<layer
name="FloorplanMap_button_close"
bgcapture="true"
enabled="true"
keep="true"
type="container"
zorder="99"
bgalpha="0"
visible="true"
alpha="1"
width="get:calc(25+20)"
height="get:calc(25+20)"
align="topright"
edge="topright"
x="10"
y="10"
bgcolor="0xffffff"
bgroundedge="0"
parent="layer[FloorplanMap_mybox_container]"
/>

<layer
name="FloorplanMap_button_close_c"
bgcapture="true"
enabled="true"
keep="true"
type="url"
url="%FIRSTXML%/graphics/floorplanmap/hide.png"
rotate="0"
width="25"
height="25"
zorder="90"
visible="true"
alpha="1"
align="center"
edge="center"
x="0"
y="0"
parent="layer[FloorplanMap_button_close]"
onclick="hideTooltip();hideFloorplanMap_();FloorplanMap_full(false);hideFloorplan();
 "
onover="FloorplanMap_alpha_over();"
onhover="showTooltip('plugin', FloorplanMap_menuTooltipStyle);"
onout="FloorplanMap_alpha_out();hideTooltip();"
tooltip="FloorPlanMaptooltips_close"
/>

<action name="FloorplanMap_alpha_over">
  tween(alpha,1,0);
  </action>

<action name="FloorplanMap_alpha_out">
  tween(alpha,,0.2);
  </action>

        <layer name="FloorplanMap_mybox_container"
          type="container"
           keep="true"
           zorder="99"
            visible="true"
            enabled="true"
			safearea="true"
            autoalpha="true"
            align.desktop="center"
            x.desktop="10"
            y.desktop="10"
            align.mobile="center"
            x.mobile="10"
            y.mobile="10"
            align.tablet="center"
            x.tablet="10"
            y.tablet="10"
            height.desktop="40%"
            width.desktop="80%"
            height.mobile="40%"
            width.mobile="80%"
            height.tablet="40%"
            width.tablet="80%"
            bgborder="0 0xffffff 1"
            alpha="0"
            bgalpha.desktop="0.40000000000000002"
            bgalpha.mobile="0.40000000000000002"
            bgalpha.tablet="0.40000000000000002"
            maskchildren="true"
            bgroundedge="0"
            bgcapture="true"
            handcursor="false"
            bgcolor.desktop="0x9b9b9b"
            bgcolor.mobile="0x9b9b9b"
            bgcolor.tablet="0x9b9b9b"

        />



<events name="FloorplanMap_recalculate"
keep="true"
onTourStart="FloorplanMap_calculate_size();"
onxmlcomplete="FloorplanMap_calculate_size();"
/>


<action name="FloorplanMap_calculate_size">

mul(FloorplanMap_redW, get(layer[FloorplanMap_].imagewidth), 1);
mul(FloorplanMap_redH, get(layer[FloorplanMap_].imageheight), 1);

  </action>


<action name="FloorplanMap_movemap">
  </action>

<action name="FloorplanMap_full">
set(FloorplanMap_fullactivated,true);

set(FloorplanMap_is_full,get(%1));

if (FloorplanMap_is_full,
set(FloorplanMap_bef_posx,get(layer[FloorplanMap_].x));
set(FloorplanMap_bef_posy,get(layer[FloorplanMap_].y));

if(device.desktop,
tween(layer[FloorplanMap_].scale,calc(1 + 0.3), 0);
tween(layer[FloorplanMap_mybox_container].width,60%,0);
tween(layer[FloorplanMap_mybox_container].height,60%,0);
);

if(device.tablet,
tween(layer[FloorplanMap_].scale,calc(0.7+0.3),0);
tween(layer[FloorplanMap_mybox_container].width,60%,0);
tween(layer[FloorplanMap_mybox_container].height,60%,0);
);

if(device.mobile,
tween(layer[FloorplanMap_].scale,calc(+0.3),0);
if(FloorplanMap_wnotch,
tween(layer[FloorplanMap_mybox_container].width,60%,0);
tween(layer[FloorplanMap_mybox_container].height,60%,0);
set(layer[FloorplanMap_mybox_container].y,calc(layer[FloorplanMap_mybox_container].y + 20));
tween(layer[FloorplanMap_mybox_container].x,0,0);
,
tween(layer[FloorplanMap_mybox_container].width,60%,0);
tween(layer[FloorplanMap_mybox_container].height,60%,0);

);
);



tween(layer[FloorplanMap_].align, center,0.5);
tween(layer[FloorplanMap_].edge, center,0.5);

set(FloorplanMap_is_full, false);
set(layer[FloorplanMap_button_full].visible,false);
set(layer[FloorplanMap_button_full_c].visible,true);
set(layer[FloorplanMap_button_full_ccl].visible,true);
<!--FloorplanMap_getpose(get(FloorplanMap_bef_posx),get(FloorplanMap_bef_posy) );-->
,

if(device.desktop,
set(layer[FloorplanMap_mybox_container].align ,center);
set(FloorplanMap_fullactivated,false);
<!--showFloorplan();-->
tween(layer[FloorplanMap_mybox_container].x | layer[FloorplanMap_mybox_container].y, 10|10,0);
tween(layer[FloorplanMap_].scale,1,0);
tween(layer[FloorplanMap_mybox_container].width | layer[FloorplanMap_mybox_container].height,80%|40%,0);
);

if(device.mobile,
set(layer[FloorplanMap_mybox_container].align ,center);
set(FloorplanMap_fullactivated,false);
<!--showFloorplan();-->
tween(layer[FloorplanMap_mybox_container].x | layer[FloorplanMap_mybox_container].y, 10|10, 0);
tween(layer[FloorplanMap_].scale,0.7,0);
tween(layer[FloorplanMap_mybox_container].width | layer[FloorplanMap_mybox_container].height,80%|40%,0);
);

if(device.tablet,
set(layer[FloorplanMap_mybox_container].align ,center);
tween(layer[FloorplanMap_mybox_container].x | layer[FloorplanMap_mybox_container].y, 10|10, 0);
tween(layer[FloorplanMap_].scale,0.8,0);
tween(layer[FloorplanMap_mybox_container].width | layer[FloorplanMap_mybox_container].height,80%|40%,0);
set(FloorplanMap_fullactivated,false);
<!--showFloorplan();-->);

<!--FloorplanMap_getpose(get(FloorplanMap_bef_posx),get(FloorplanMap_bef_posy) );-->

set(FloorplanMap_is_full, true);
set(layer[FloorplanMap_button_full].visible,true);
set(layer[FloorplanMap_button_full_c].visible,false);
set(layer[FloorplanMap_button_full_ccl].visible,false);
);
</action>


<events name="FloorplanMap_checkspot0"
keep="true"
onnewpano="FloorplanMap_control0"
onTourStart="delayedcall(0.3 ,FloorplanMap_control0);"
onmymove="delayedcall(0.3 ,FloorplanMap_control0);"
/>

<action name="FloorplanMap_control0">
if(device.mobile,
<!--set(layer[FloorplanMap_tool0].visible,true);-->
set(layer[FloorplanMap_tool0].width,140);
set(layer[FloorplanMap_thumb0].width,140);
set(layer[FloorplanMap_thumb0].height,70);
);


if(device.mobile,
set(layer[FloorplanMap_tool0].css,'font-family:Helvetica; font-size:rem; text-align:center; color:#000000;' );
);
if(device.desktop,
    set(layer[FloorplanMap_tool0].css,'font-family:Helvetica; font-size:1.2rem; text-align:center; color:#000000;' );
);
if(device.tablet,
set(layer[FloorplanMap_tool0].css,'font-family:Helvetica; font-size:rem; text-align:center; color:#000000;' );
);



if(xml.scene == 'pano27',
set(layer[FloorplanMap_Point_map0].url,'%FIRSTXML%/graphics/floorplanmap/actual.png');
set(layer[FloorplanMap_Point_map0].width,40);
set(layer[FloorplanMap_Point_map0].height,40);

FloorplanMap_animate(FloorplanMap_anima0);

set(layer[FloorplanMap_anima0].visible,true);

if(FloorplanMap_is_full != false,
set(layer[FloorplanMap_].align, center);
set(layer[FloorplanMap_].edge,center);
,
set(layer[FloorplanMap_].align, center);
set(layer[FloorplanMap_].edge,center);

);

FloorplanMap_movemap(get(layer[FloorplanMap_Point_map0].x),get(layer[FloorplanMap_Point_map0].y));

 set(layer[FloorplanMap_radar0].visible,false);
,

set(layer[FloorplanMap_anima0].visible,false);
set(layer[FloorplanMap_Point_map0].width,40);
set(layer[FloorplanMap_Point_map0].height,40);
set(layer[FloorplanMap_Point_map0].url,'%FIRSTXML%/graphics/floorplanmap/base.png');



);

<!-- Scene Seen -->
if(scene[pano27].seen,
set(layer[FloorplanMap_Point_seen0].visible,true);
);

</action>


<events name="FloorplanMap_check_point_by_group0"
keep="true"
onnewscene="FloorplanMap_check_spot_on_group0();"
onTourStart="FloorplanMap_check_spot_on_group0();"
onremovepano="set(layer[FloorplanMap_Point_map0].visible,false);"
/>


<action name="FloorplanMap_check_spot_on_group0" >
if(2 GT 1,
if(scene[get(xml.scene)].group == panogroup39,
set(layer[FloorplanMap_Point_map0].visible,true);,
set(layer[FloorplanMap_Point_map0].visible,false););,
set(layer[FloorplanMap_Point_map0].visible,true););
</action>

<layer name="FloorplanMap_anima0" bgcapture="false" enabled="false" keep="true" type="url" url="%FIRSTXML%/graphics/floorplanmap/fade.png" rotate="0"  width="50" height="50" zorder="1" zorder2="1" visible="false" alpha="1" scale="1" align="center" edge="center" x="0" y="0" bgroundedge="0" bgcolor="0x1e5da7" bgalpha="1" parent="layer[FloorplanMap_Point_map0]" />

<layer
name="FloorplanMap_Point_map0"
bgcapture="true"
enabled="true"
keep="true"
type="url"

url="%FIRSTXML%/graphics/floorplanmap/base.png"
rotate="0"
width="40"
height="40"
zorder="99"
visible="false"
alpha="1"
scale="1"
align="topleft"
edge="center"
x="489"
y="233"
bgcolor="0x1e5da7"

bgalpha="1"
parent="layer[FloorplanMap_]"
onclick="hideFloorplan();


set(layer[FloorplanMap_tool0].visible,false);
loadscene(pano27);
"


onout="tween(layer[FloorplanMap_tool0].alpha,0,0.2,easeOutSine);tween(layer[FloorplanMap_tool0].y,-80,0.3,easeOutSine);"

onup="set(layer[FloorplanMap_tool0].visible,false);"
scalechildren="false"
handcursor="true"
>


<layer name="FloorplanMap_radar0" keep="true" url="%FIRSTXML%/graphics/radar.swf" alturl="%FIRSTXML%/graphics/radar.js" visible="false" align="center" heading="0.0" headingoffset="0.0" fillcolor="0xffffff" fillalpha="0.50000762951094835" width="100" height="prop" zorder="100" zorder2="100"
/>
</layer>

<layer name="FloorplanMap_Point_seen0"
bgcapture="false"
enabled="false"
keep="true"
type="url"

url="%FIRSTXML%/graphics/floorplanmap/seen.png"


rotate="0"
onloaded=""
width="24"
height="24"
zorder="0"
visible="false"
alpha="1"
scale="1"
align="topright"
edge="topright"
x="0"
y="0"
bgroundedge="0"
bgcolor="0x1e5da7"
accuracy="1"
bgalpha="1"
parent="layer[FloorplanMap_Point_map0]" />


    <action name="FloorPlanMapgetdata0">
txtadd(FloorPlanMapdatat0, get(tour_language),"_",FloorPlanMaptext_user0);
def(FloorPlanMapokname0,string, data[get(FloorPlanMapdatat0)].content);
set(layer[FloorplanMap_tool0].html,data:get(FloorPlanMapdatat0));
  </action>

<action name="FloorplanMap_get_title0">
if(xml.scene != pano27,

  getmessage(layer[FloorplanMap_tool0].html,
  get(scene[pano27].titleid));
  escape(layer[FloorplanMap_tool0].html);
  ,

getmessage(layer[FloorplanMap_tool0].html,
  get(scene[pano27].titleid));
  escape(layer[FloorplanMap_tool0].html);


  );

</action>

<action name="FloorplanMap_get_thumb0">
    set(layer[FloorplanMap_thumb0].url,
     get(scene[pano27].thumburl));
  </action>


  <layer name="FloorplanMap_tool0" type="text" align="top" edge="top" width="150" height="35" x="0"  onloaded="if(1 == 0, set(y,-80);,set(y,-80););FloorplanMap_get_title0();" vcenter="true" html="" padding="5" wordwrap="false" autoalpha="true" bg="true" bgcolor="0xffffff" bgalpha="1"  alpha="0"  bgborder="5 0xffffff 1"

  bgroundedge="0 0 0 0"

   scale="1" mergedalpha="true" interactivecontent="false" onautosized="false" keep="true" visible="true" zorder="90"  parent="layer[FloorplanMap_Point_map0]" />


<layer name="FloorplanMap_triangle0" bgcapture="false" keep="true" type="image" url="%FIRSTXML%/graphics/floorplanmap/triangle.png" width="45" height="20" zorder="100" visible="true" alpha="1" scale="1" align="bottom" edge="top" x="0" y="0" bgalpha="1" parent="layer[FloorplanMap_tool0]" />


<layer
name="FloorplanMap_thumb0"
bgcapture="false"
keep="true"
type="image"
url=""
width="150"
height="prop"

alpha="1"
onloaded=""
align="top"
edge="bottom"
zorder="90"
scale="1"
bgroundedge="0 0 0 0"
bgborder="5 0xffffff 1"
x="0"
y="0"
bgalpha="1"
parent="layer[FloorplanMap_tool0]"
/>

<events name="FloorplanMap_checkspot1"
keep="true"
onnewpano="FloorplanMap_control1"
onTourStart="delayedcall(0.3 ,FloorplanMap_control1);"
onmymove="delayedcall(0.3 ,FloorplanMap_control1);"
/>

<action name="FloorplanMap_control1">
if(device.mobile,
<!--set(layer[FloorplanMap_tool1].visible,true);-->
set(layer[FloorplanMap_tool1].width,140);
set(layer[FloorplanMap_thumb1].width,140);
set(layer[FloorplanMap_thumb1].height,70);
);


if(device.mobile,
set(layer[FloorplanMap_tool1].css,'font-family:Helvetica; font-size:rem; text-align:center; color:#000000;' );
);
if(device.desktop,
    set(layer[FloorplanMap_tool1].css,'font-family:Helvetica; font-size:1.2rem; text-align:center; color:#000000;' );
);
if(device.tablet,
set(layer[FloorplanMap_tool1].css,'font-family:Helvetica; font-size:rem; text-align:center; color:#000000;' );
);



if(xml.scene == 'pano28',
set(layer[FloorplanMap_Point_map1].url,'%FIRSTXML%/graphics/floorplanmap/actual.png');
set(layer[FloorplanMap_Point_map1].width,40);
set(layer[FloorplanMap_Point_map1].height,40);

FloorplanMap_animate(FloorplanMap_anima1);

set(layer[FloorplanMap_anima1].visible,true);

if(FloorplanMap_is_full != false,
set(layer[FloorplanMap_].align, center);
set(layer[FloorplanMap_].edge,center);
,
set(layer[FloorplanMap_].align, center);
set(layer[FloorplanMap_].edge,center);

);

FloorplanMap_movemap(get(layer[FloorplanMap_Point_map1].x),get(layer[FloorplanMap_Point_map1].y));

 set(layer[FloorplanMap_radar1].visible,false);
,

set(layer[FloorplanMap_anima1].visible,false);
set(layer[FloorplanMap_Point_map1].width,40);
set(layer[FloorplanMap_Point_map1].height,40);
set(layer[FloorplanMap_Point_map1].url,'%FIRSTXML%/graphics/floorplanmap/base.png');



);

<!-- Scene Seen -->
if(scene[pano28].seen,
set(layer[FloorplanMap_Point_seen1].visible,true);
);

</action>


<events name="FloorplanMap_check_point_by_group1"
keep="true"
onnewscene="FloorplanMap_check_spot_on_group1();"
onTourStart="FloorplanMap_check_spot_on_group1();"
onremovepano="set(layer[FloorplanMap_Point_map1].visible,false);"
/>


<action name="FloorplanMap_check_spot_on_group1" >
if(2 GT 1,
if(scene[get(xml.scene)].group == panogroup39,
set(layer[FloorplanMap_Point_map1].visible,true);,
set(layer[FloorplanMap_Point_map1].visible,false););,
set(layer[FloorplanMap_Point_map1].visible,true););
</action>

<layer name="FloorplanMap_anima1" bgcapture="false" enabled="false" keep="true" type="url" url="%FIRSTXML%/graphics/floorplanmap/fade.png" rotate="0"  width="50" height="50" zorder="1" zorder2="1" visible="false" alpha="1" scale="1" align="center" edge="center" x="0" y="0" bgroundedge="0" bgcolor="0x1e5da7" bgalpha="1" parent="layer[FloorplanMap_Point_map1]" />

<layer
name="FloorplanMap_Point_map1"
bgcapture="true"
enabled="true"
keep="true"
type="url"

url="%FIRSTXML%/graphics/floorplanmap/base.png"
rotate="0"
width="40"
height="40"
zorder="99"
visible="false"
alpha="1"
scale="1"
align="topleft"
edge="center"
x="577"
y="225"
bgcolor="0x1e5da7"

bgalpha="1"
parent="layer[FloorplanMap_]"
onclick="hideFloorplan();


set(layer[FloorplanMap_tool1].visible,false);
loadscene(pano28);
"


onout="tween(layer[FloorplanMap_tool1].alpha,0,0.2,easeOutSine);tween(layer[FloorplanMap_tool1].y,-80,0.3,easeOutSine);"

onup="set(layer[FloorplanMap_tool1].visible,false);"
scalechildren="false"
handcursor="true"
>


<layer name="FloorplanMap_radar1" keep="true" url="%FIRSTXML%/graphics/radar.swf" alturl="%FIRSTXML%/graphics/radar.js" visible="false" align="center" heading="0.0" headingoffset="0.0" fillcolor="0xffffff" fillalpha="0.50000762951094835" width="100" height="prop" zorder="100" zorder2="100"
/>
</layer>

<layer name="FloorplanMap_Point_seen1"
bgcapture="false"
enabled="false"
keep="true"
type="url"

url="%FIRSTXML%/graphics/floorplanmap/seen.png"


rotate="0"
onloaded=""
width="24"
height="24"
zorder="1"
visible="false"
alpha="1"
scale="1"
align="topright"
edge="topright"
x="0"
y="0"
bgroundedge="0"
bgcolor="0x1e5da7"
accuracy="1"
bgalpha="1"
parent="layer[FloorplanMap_Point_map1]" />


    <action name="FloorPlanMapgetdata1">
txtadd(FloorPlanMapdatat1, get(tour_language),"_",FloorPlanMaptext_user1);
def(FloorPlanMapokname1,string, data[get(FloorPlanMapdatat1)].content);
set(layer[FloorplanMap_tool1].html,data:get(FloorPlanMapdatat1));
  </action>

<action name="FloorplanMap_get_title1">
if(xml.scene != pano28,

  getmessage(layer[FloorplanMap_tool1].html,
  get(scene[pano28].titleid));
  escape(layer[FloorplanMap_tool1].html);
  ,

getmessage(layer[FloorplanMap_tool1].html,
  get(scene[pano28].titleid));
  escape(layer[FloorplanMap_tool1].html);


  );

</action>

<action name="FloorplanMap_get_thumb1">
    set(layer[FloorplanMap_thumb1].url,
     get(scene[pano28].thumburl));
  </action>


  <layer name="FloorplanMap_tool1" type="text" align="top" edge="top" width="150" height="35" x="0"  onloaded="if(1 == 0, set(y,-80);,set(y,-80););FloorplanMap_get_title1();" vcenter="true" html="" padding="5" wordwrap="false" autoalpha="true" bg="true" bgcolor="0xffffff" bgalpha="1"  alpha="0"  bgborder="5 0xffffff 1"

  bgroundedge="0 0 0 0"

   scale="1" mergedalpha="true" interactivecontent="false" onautosized="false" keep="true" visible="true" zorder="90"  parent="layer[FloorplanMap_Point_map1]" />


<layer name="FloorplanMap_triangle1" bgcapture="false" keep="true" type="image" url="%FIRSTXML%/graphics/floorplanmap/triangle.png" width="45" height="20" zorder="100" visible="true" alpha="1" scale="1" align="bottom" edge="top" x="0" y="0" bgalpha="1" parent="layer[FloorplanMap_tool1]" />


<layer
name="FloorplanMap_thumb1"
bgcapture="false"
keep="true"
type="image"
url=""
width="150"
height="prop"

alpha="1"
onloaded=""
align="top"
edge="bottom"
zorder="90"
scale="1"
bgroundedge="0 0 0 0"
bgborder="5 0xffffff 1"
x="0"
y="0"
bgalpha="1"
parent="layer[FloorplanMap_tool1]"
/>

<events name="FloorplanMap_checkspot2"
keep="true"
onnewpano="FloorplanMap_control2"
onTourStart="delayedcall(0.3 ,FloorplanMap_control2);"
onmymove="delayedcall(0.3 ,FloorplanMap_control2);"
/>

<action name="FloorplanMap_control2">
if(device.mobile,
<!--set(layer[FloorplanMap_tool2].visible,true);-->
set(layer[FloorplanMap_tool2].width,140);
set(layer[FloorplanMap_thumb2].width,140);
set(layer[FloorplanMap_thumb2].height,70);
);


if(device.mobile,
set(layer[FloorplanMap_tool2].css,'font-family:Helvetica; font-size:rem; text-align:center; color:#000000;' );
);
if(device.desktop,
    set(layer[FloorplanMap_tool2].css,'font-family:Helvetica; font-size:1.2rem; text-align:center; color:#000000;' );
);
if(device.tablet,
set(layer[FloorplanMap_tool2].css,'font-family:Helvetica; font-size:rem; text-align:center; color:#000000;' );
);



if(xml.scene == 'pano29',
set(layer[FloorplanMap_Point_map2].url,'%FIRSTXML%/graphics/floorplanmap/actual.png');
set(layer[FloorplanMap_Point_map2].width,40);
set(layer[FloorplanMap_Point_map2].height,40);

FloorplanMap_animate(FloorplanMap_anima2);

set(layer[FloorplanMap_anima2].visible,true);

if(FloorplanMap_is_full != false,
set(layer[FloorplanMap_].align, center);
set(layer[FloorplanMap_].edge,center);
,
set(layer[FloorplanMap_].align, center);
set(layer[FloorplanMap_].edge,center);

);

FloorplanMap_movemap(get(layer[FloorplanMap_Point_map2].x),get(layer[FloorplanMap_Point_map2].y));

 set(layer[FloorplanMap_radar2].visible,false);
,

set(layer[FloorplanMap_anima2].visible,false);
set(layer[FloorplanMap_Point_map2].width,40);
set(layer[FloorplanMap_Point_map2].height,40);
set(layer[FloorplanMap_Point_map2].url,'%FIRSTXML%/graphics/floorplanmap/base.png');



);

<!-- Scene Seen -->
if(scene[pano29].seen,
set(layer[FloorplanMap_Point_seen2].visible,true);
);

</action>


<events name="FloorplanMap_check_point_by_group2"
keep="true"
onnewscene="FloorplanMap_check_spot_on_group2();"
onTourStart="FloorplanMap_check_spot_on_group2();"
onremovepano="set(layer[FloorplanMap_Point_map2].visible,false);"
/>


<action name="FloorplanMap_check_spot_on_group2" >
if(2 GT 1,
if(scene[get(xml.scene)].group == panogroup462,
set(layer[FloorplanMap_Point_map2].visible,true);,
set(layer[FloorplanMap_Point_map2].visible,false););,
set(layer[FloorplanMap_Point_map2].visible,true););
</action>

<layer name="FloorplanMap_anima2" bgcapture="false" enabled="false" keep="true" type="url" url="%FIRSTXML%/graphics/floorplanmap/fade.png" rotate="0"  width="50" height="50" zorder="1" zorder2="1" visible="false" alpha="1" scale="1" align="center" edge="center" x="0" y="0" bgroundedge="0" bgcolor="0x1e5da7" bgalpha="1" parent="layer[FloorplanMap_Point_map2]" />

<layer
name="FloorplanMap_Point_map2"
bgcapture="true"
enabled="true"
keep="true"
type="url"

url="%FIRSTXML%/graphics/floorplanmap/base.png"
rotate="0"
width="40"
height="40"
zorder="99"
visible="false"
alpha="1"
scale="1"
align="topleft"
edge="center"
x="933"
y="317"
bgcolor="0x1e5da7"

bgalpha="1"
parent="layer[FloorplanMap_]"
onclick="hideFloorplan();


set(layer[FloorplanMap_tool2].visible,false);
loadscene(pano29);
"


onout="tween(layer[FloorplanMap_tool2].alpha,0,0.2,easeOutSine);tween(layer[FloorplanMap_tool2].y,-80,0.3,easeOutSine);"

onup="set(layer[FloorplanMap_tool2].visible,false);"
scalechildren="false"
handcursor="true"
>


<layer name="FloorplanMap_radar2" keep="true" url="%FIRSTXML%/graphics/radar.swf" alturl="%FIRSTXML%/graphics/radar.js" visible="false" align="center" heading="0.0" headingoffset="0.0" fillcolor="0xffffff" fillalpha="0.50000762951094835" width="100" height="prop" zorder="100" zorder2="100"
/>
</layer>

<layer name="FloorplanMap_Point_seen2"
bgcapture="false"
enabled="false"
keep="true"
type="url"

url="%FIRSTXML%/graphics/floorplanmap/seen.png"


rotate="0"
onloaded=""
width="24"
height="24"
zorder="2"
visible="false"
alpha="1"
scale="1"
align="topright"
edge="topright"
x="0"
y="0"
bgroundedge="0"
bgcolor="0x1e5da7"
accuracy="1"
bgalpha="1"
parent="layer[FloorplanMap_Point_map2]" />


    <action name="FloorPlanMapgetdata2">
txtadd(FloorPlanMapdatat2, get(tour_language),"_",FloorPlanMaptext_user2);
def(FloorPlanMapokname2,string, data[get(FloorPlanMapdatat2)].content);
set(layer[FloorplanMap_tool2].html,data:get(FloorPlanMapdatat2));
  </action>

<action name="FloorplanMap_get_title2">
if(xml.scene != pano29,

  getmessage(layer[FloorplanMap_tool2].html,
  get(scene[pano29].titleid));
  escape(layer[FloorplanMap_tool2].html);
  ,

getmessage(layer[FloorplanMap_tool2].html,
  get(scene[pano29].titleid));
  escape(layer[FloorplanMap_tool2].html);


  );

</action>

<action name="FloorplanMap_get_thumb2">
    set(layer[FloorplanMap_thumb2].url,
     get(scene[pano29].thumburl));
  </action>


  <layer name="FloorplanMap_tool2" type="text" align="top" edge="top" width="150" height="35" x="0"  onloaded="if(1 == 0, set(y,-80);,set(y,-80););FloorplanMap_get_title2();" vcenter="true" html="" padding="5" wordwrap="false" autoalpha="true" bg="true" bgcolor="0xffffff" bgalpha="1"  alpha="0"  bgborder="5 0xffffff 1"

  bgroundedge="0 0 0 0"

   scale="1" mergedalpha="true" interactivecontent="false" onautosized="false" keep="true" visible="true" zorder="90"  parent="layer[FloorplanMap_Point_map2]" />


<layer name="FloorplanMap_triangle2" bgcapture="false" keep="true" type="image" url="%FIRSTXML%/graphics/floorplanmap/triangle.png" width="45" height="20" zorder="100" visible="true" alpha="1" scale="1" align="bottom" edge="top" x="0" y="0" bgalpha="1" parent="layer[FloorplanMap_tool2]" />


<layer
name="FloorplanMap_thumb2"
bgcapture="false"
keep="true"
type="image"
url=""
width="150"
height="prop"

alpha="1"
onloaded=""
align="top"
edge="bottom"
zorder="90"
scale="1"
bgroundedge="0 0 0 0"
bgborder="5 0xffffff 1"
x="0"
y="0"
bgalpha="1"
parent="layer[FloorplanMap_tool2]"
/>



<action name="FloorplanMap_set_image" >

if(2 GT 1,
if(scene[get(xml.scene)].group == "panogroup39",
set(layer[FloorplanMap_].url, '%FIRSTXML%/graphics/floorplanmap/primelvls.jpg');
);

if(scene[get(xml.scene)].group == "panogroup462",
set(layer[FloorplanMap_].url, '%FIRSTXML%/graphics/floorplanmap/premeirlvls.jpg');
);
,
set(layer[FloorplanMap_].url, '%FIRSTXML%/graphics/floorplanmap/');
);
</action>



 <layer name="FloorplanMap_"
             keep="true"
             scale.desktop ="1"
             scale.mobile="0.7"
             scale.tablet="0.8"
             align="center"
             edge="center"
             onloaded="set(FloorplanMap_act, get(layer[FloorplanMap_].scale));set(layer[FloorplanMap_floor_title].visible,true);FloorplanMap_set_image();"
             ondown="FloorplanMap_draglayer();"
             ondown.touch="onover();FloorplanMap_draglayer();"
    		 onup.touch="onout();"
             onover="set(FloorplanMap_iszoom, true); set(FloorplanMap_startzoom, true); copy(FloorplanMap_copy_mousefovchange, control.mousefovchange); copy(FloorplanMap_copy_touchzoom, control.touchzoom); set(control.mousefovchange, 0); set(control.touchzoom, false);"
    		 onout="set(FloorplanMap_iszoom, false); copy(control.mousefovchange, FloorplanMap_copy_mousefovchange); copy(control.touchzoom, FloorplanMap_copy_touchzoom);"
             onup="set(drag_active,false);"
             parent="layer[FloorplanMap_mybox_container]"
             x="0"
             y="0"
             zorder="90"
             handcursor="true"
             enabled="true"
             visible="false"
             onclick="FloorplanMap_getme();"
             scalechildren="true"
             height=""
             width=""
             onhover=" "
         />




<action name="FloorplanMap_get_css_floor0">

if(device.mobile,
set(layer[FloorplanMap_floor_title0].css,'font-family:; font-size:rem; text-align:center; color:#;' );
,
set(layer[FloorplanMap_floor_title0].css,'font-family:; font-size:rem; text-align:center; color:#;' );
);
</action>


<action name="FloorplanMap_get_title_floor0">
  getmessage(layer[FloorplanMap_floor_title0].html, );
  escape(layer[FloorplanMap_floor_title0].html);
</action>



<layer name="FloorplanMap_floor_title0"
        type="text"
        x=""
        y=""
        onloaded=""
        vcenter="false"
        html=""
        padding="0"
        wordwrap="true"
        bg="true"
        bgcolor="0xffffff"
        bgalpha="0"
        alpha="1"
        scale="1"
        mergedalpha="true"
        interactivecontent="false"
        onautosized="false"
        keep="true"
        parent="layer[FloorplanMap_mybox_container]"
        />

<action name="FloorplanMap_get_css_floor1">

if(device.mobile,
set(layer[FloorplanMap_floor_title1].css,'font-family:; font-size:rem; text-align:center; color:#;' );
,
set(layer[FloorplanMap_floor_title1].css,'font-family:; font-size:rem; text-align:center; color:#;' );
);
</action>


<action name="FloorplanMap_get_title_floor1">
  getmessage(layer[FloorplanMap_floor_title1].html, );
  escape(layer[FloorplanMap_floor_title1].html);
</action>



<layer name="FloorplanMap_floor_title1"
        type="text"
        x=""
        y=""
        onloaded=""
        vcenter="false"
        html=""
        padding="0"
        wordwrap="true"
        bg="true"
        bgcolor="0xffffff"
        bgalpha="0"
        alpha="1"
        scale="1"
        mergedalpha="true"
        interactivecontent="false"
        onautosized="false"
        keep="true"
        parent="layer[FloorplanMap_mybox_container]"
        />

  <events name="FloorplanMap_events"
    hidetourcontrols="hideFloorplanMap_();hideFloorplan();
"
    showtourcontrols="showFloorplanMap_(false);"
    keep="true" />



  <action name="showFloorplanMap_">
  FloorplanMap_set_image();
  if(%1 == true,
    showmemap();
   ,
   if(tour_displaycontrols,set(layer[FloorplanMap_].visible, true);,hideFloorplanMap_();););
   </action>


<events name="FloorplanMap_start"
keep="true"
onnewpano="if(2 GT 1, set(layer[FloorplanMap_button_plus].visible,true); set(FloorplanMap_number_spot,0);inc(FloorplanMap_number_spot,calc(2 + 30));FloorplanMap_create_item(panogroup39 );inc(FloorplanMap_number_spot,calc(2 + 30));FloorplanMap_create_item(panogroup462 );, set(layer[FloorplanMap_button_plus].visible,false););"
onxmlcomplete="if(2 GT 1, set(layer[FloorplanMap_button_plus].visible,true); set(FloorplanMap_number_spot,0);inc(FloorplanMap_number_spot,calc(2 + 30));FloorplanMap_create_item(panogroup39 );inc(FloorplanMap_number_spot,calc(2 + 30));FloorplanMap_create_item(panogroup462 );, set(layer[FloorplanMap_button_plus].visible,false););"
/>


<action name="FloorplanMap_create_item">
set(name_group,get(panoramagroup[%1].name));
set(this_name_group,get(scene[get(xml.scene)].group));
addlayer(%1);
getmessage(FloorplanMap_testo_gruppo, get(panoramagroup[%1].titleid));
escape(get(FloorplanMap_testo_gruppo));
set(layer[%1].onclick, loadscene(get(panoramagroup[%1].mainscene)););
set(layer[%1].align,top);
set(layer[%1].edge,top);
set(layer[%1].height,30);
set(layer[%1].enabled, true);
set(layer[%1].visible, true);
set(layer[%1].tag, menu_item);
set(layer[%1].width,300);
set(layer[%1].type,text);
set(layer[%1].vcenter,true);
set(layer[%1].onautosized,false);
set(layer[%1].bgroundedge,0);
set(layer[%1].padding,0);
set(layer[%1].wordwrap,false);
set(layer[%1].parent,layer[FloorplanMap_background]);
if(%2,
set(layer[%1].css, text-transform:uppercase;text-align:center;font-size:16px;font-family:Helvetica;color:#ffffff;padding:5px; );
,
set(layer[%1].css, text-align:center;font-size:16px;font-family:Helvetica;color:#ffffff;padding:5px; );
);

if( name_group == this_name_group,
txtadd(txtgr,.," ",get(FloorplanMap_testo_gruppo));
set(layer[%1].html,get(txtgr));,
set(layer[%1].html,get(FloorplanMap_testo_gruppo));
);

if( name_group == this_name_group,
set(layer[%1].bgalpha,1);
if(%2,
set(layer[%1].bgcolor,0x555555);
,
set(layer[%1].bgcolor,0x555555);
);
set(layer[%1].handcursor,false);
,
set(layer[%1].bgalpha,1);
if(%2,
set(layer[%1].bgcolor,0x111111);
,
set(layer[%1].bgcolor,0x111111);
);

set(layer[%1].handcursor,true);
if(version == "1.19-pr16.1",
if(%2,
set(layer[%1].onout, set(bgcolor, 0x111111););
set(layer[%1].onover,set(bgcolor, 0x555555););
,
set(layer[%1].onout, set(bgcolor, 0x111111););
set(layer[%1].onover,set(bgcolor, 0x555555););
);

,
if(%2,
set(layer[%1].onout, tween(bgcolor, 0x111111,0.5););
set(layer[%1].onover,tween(bgcolor, 0x555555,0.5););
,
set(layer[%1].onout, tween(bgcolor, 0x111111,0.5););
set(layer[%1].onover,tween(bgcolor, 0x555555,0.5););
);
);

);
set(layer[FloorplanMap_background].height,calc(FloorplanMap_number_spot+30));
set(layer[%1].y,get(FloorplanMap_number_spot));
  </action>


<action name="FloorplanMap_scroll">
    addlayer(FloorplanMap_scroller);
        set_data_layer();

        set(layer[FloorplanMap_background].url, '%FIRSTXML%/graphics/scrollarea.js');
        set(layer[FloorplanMap_scroller].width,calc(300 +30));

        if(device.desktop,
        <!-- set(layer[FloorplanMap_scroller].height,40%);-->
        set(layer[FloorplanMap_scroller].height,400);
        );

        if(device.mobile,
        <!--set(layer[FloorplanMap_scroller].height,40%);-->
        set(layer[FloorplanMap_scroller].height,300);
        );

        if(device.tablet,
        <!--set(layer[FloorplanMap_scroller].height,40%);-->
        set(layer[FloorplanMap_scroller].height,400);
        );


  </action>

  <layer name="FloorplanMap_menuTooltipStyle"
      keep="true"
      enabled="false"
      capture="false"
      onloaded=""
      url="%FIRSTXML%/graphics/textfield.swf"
      align="center"
      background="true"
      backgroundcolor="0xc054db"
      backgroundalpha="1"
      border="false"
      css="color:#ffffff;font-family:Helvetica;font-size:14px;text-align:left;"
      height="20"
      autoheight="true"
      autowidth="auto"
      padding="10"
      selectable="false"
      zorder="99"
      visible="false"
      html=""
      edge="bottom"
      xoffset="0"
      yoffset="-10"
/> 



  <!-- 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>


<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>

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

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

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

  <!-- MAP -->
  <action name="hideMap">set(tour_displaymap, false);events.dispatch(onhidetourmap);</action>
  <action name="showMap">set(tour_displaymap, true); events.dispatch(onshowtourmap);</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>

  <!-- FLOORPLAN -->
  <action name="hideFloorplan">set(tour_displayfloorplan, false);events.dispatch(onhidetourfloorplan);</action>
  <action name="showFloorplan">set(tour_displayfloorplan, true); events.dispatch(onshowtourfloorplan);</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("_359_full_quiet-meaning_0154.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>

	<!-- 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>
</krpano>