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

    
  <!-- Spot Style - Point Spot Test Blanc -->


  <style name="IconPointSpotTestBlanc"
         url="%FIRSTXML%/spots/hotspot_direction_user_defaultpoint0.png"
         visible="false"
         edge="center"
         rotate="270"
         onhover="onhoverIconPointSpotTestBlanc"
         onout="onoutIconPointSpotTestBlanc"


         />
  <action name="onhoverIconPointSpotTestBlanc">
    showtooltip('hotspot');
  </action>
  <action name="onoutIconPointSpotTestBlanc">
    hideTooltip();



  </action>



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


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


    
  <!-- Spot Style - Point Spot Test Noir -->


  <style name="IconPointSpotTestNoir"
         url="%FIRSTXML%/spots/hotspot_direction_user_defaultpoint1.png"
         visible="false"
         edge="center"
         rotate="270"
         onhover="onhoverIconPointSpotTestNoir"
         onout="onoutIconPointSpotTestNoir"


         />
  <action name="onhoverIconPointSpotTestNoir">
    showtooltip('hotspot');
  </action>
  <action name="onoutIconPointSpotTestNoir">
    hideTooltip();



  </action>



<!-- ********** -->
<!-- Barre de contrôle classique -->
<!-- id : controlBar_classic -->
<!-- ********** -->

  <krpano controlBar_classicbarbuilt="false" controlBar_classicbackgroundwidthwhenclosed="0" controlBar_classicbackgroundwidthwhenopened="0" controlBar_classicIsOpened="false" />
  <events name="controlBar_classicevents" 
    onxmlcomplete="controlBar_classicbuildMenuBar();" 

    openvideointerface="controlBar_classicOpenVideoplayer();" 
    closevideointerface="controlBar_classicCloseVideoplayer();" 

    keep="true" />



  <action name="controlBar_classicbuildMenuBar">
    ifnot (controlBar_classicbarbuilt, controlBar_classicbuildMenu(); set(controlBar_classicbarbuilt, true););
  </action>

  <action name="controlBar_classicbuildMenu">
    
    set(controlBar_classicbutton_pos, 20);

    set(layer[controlBar_classicbtn_hidecontrols].x, get(controlBar_classicbutton_pos));
    set(layer[controlBar_classicbtn_showcontrols].x, get(controlBar_classicbutton_pos));
    inc(controlBar_classicbutton_pos, 36);
    add(controlBar_classicbackgroundwidthwhenclosed, get(controlBar_classicbutton_pos), 20);


    set(layer[controlBar_classicbtn_display_info].x, get(controlBar_classicbutton_pos));
    set(layer[controlBar_classicbtn_close_info  ].x, get(controlBar_classicbutton_pos));
    inc(controlBar_classicbutton_pos, 36);

    if (device.desktop,
      set(layer[controlBar_classicbtn_display_help].x, get(controlBar_classicbutton_pos));
      set(layer[controlBar_classicbtn_close_help  ].x, get(controlBar_classicbutton_pos));
      inc(controlBar_classicbutton_pos, 36);
    );

    if (device.fullscreensupport,
      set(layer[controlBar_classicbtn_openfs ].x, get(controlBar_classicbutton_pos));
      set(layer[controlBar_classicbtn_closefs].x, get(controlBar_classicbutton_pos));
      inc(controlBar_classicbutton_pos, 36);
    );


    set(layer[controlBar_classicbtn_share].x, get(controlBar_classicbutton_pos));
    inc(controlBar_classicbutton_pos, 36);

    set(layer[controlBar_classicbtn_display_map].x, get(controlBar_classicbutton_pos));
    set(layer[controlBar_classicbtn_hide_map   ].x, get(controlBar_classicbutton_pos));
    inc(controlBar_classicbutton_pos, 36);

    set(layer[controlBar_classicbtn_display_floorplan].x, get(controlBar_classicbutton_pos));
    set(layer[controlBar_classicbtn_hide_floorplan   ].x, get(controlBar_classicbutton_pos));
    inc(controlBar_classicbutton_pos, 36);


    set(layer[controlBar_classicbtn_autorotate_on ].x, get(controlBar_classicbutton_pos));
    set(layer[controlBar_classicbtn_autorotate_off].x, get(controlBar_classicbutton_pos));
    inc(controlBar_classicbutton_pos, 36);


    set(layer[controlBar_classicbtn_autotour_on ].x, get(controlBar_classicbutton_pos));
    set(layer[controlBar_classicbtn_autotour_off].x, get(controlBar_classicbutton_pos));
    inc(controlBar_classicbutton_pos, 36);

    set(layer[controlBar_classicbtn_sound_on ].x, get(controlBar_classicbutton_pos));
    set(layer[controlBar_classicbtn_sound_off].x, get(controlBar_classicbutton_pos));
    inc(controlBar_classicbutton_pos, 36);


    set(layer[controlBar_classicbtn_show_thumbnails].x, get(controlBar_classicbutton_pos));
    set(layer[controlBar_classicbtn_hide_thumbnails].x, get(controlBar_classicbutton_pos));
    inc(controlBar_classicbutton_pos, 36);

    if (device.desktop,
      set(layer[controlBar_classicbtn_ctrlmode_drag_to].x, get(controlBar_classicbutton_pos));
      set(layer[controlBar_classicbtn_ctrlmode_move_to].x, get(controlBar_classicbutton_pos));
      inc(controlBar_classicbutton_pos, 36);
    );


    if(plugin[ptpvrmode] AND device.html5,
      set(layer[controlBar_classicbtn_enter_vr].x, get(controlBar_classicbutton_pos));
      set(layer[controlBar_classicbtn_enter_vr_not].x, get(controlBar_classicbutton_pos));
      inc(controlBar_classicbutton_pos, 36);
    );

    set(layer[controlBar_classicbtn_show_hotspots].x, get(controlBar_classicbutton_pos));
    set(layer[controlBar_classicbtn_hide_hotspots].x, get(controlBar_classicbutton_pos));
    inc(controlBar_classicbutton_pos, 36);


    if(plugin[gyroscope],
      set(controlBar_classicDisplayGyroscopeButton, false);
      if (device.tablet, set(controlBar_classicDisplayGyroscopeButton, true););
      if (device.mobile, set(controlBar_classicDisplayGyroscopeButton, true););
      if(controlBar_classicDisplayGyroscopeButton,
        set(layer[controlBar_classicbtn_gyroscope_on ].x, get(controlBar_classicbutton_pos));
        set(layer[controlBar_classicbtn_gyroscope_off].x, get(controlBar_classicbutton_pos));
        set(layer[controlBar_classicbtn_gyroscope_not].x, get(controlBar_classicbutton_pos));
        inc(controlBar_classicbutton_pos, 36);
      );
    );


    set(layer[controlBar_classicbtn_home].x, get(controlBar_classicbutton_pos));
    set(layer[controlBar_classicbtn_home].x, get(controlBar_classicbutton_pos));
    inc(controlBar_classicbutton_pos, 36);

    if (device.desktop,
        set(layer[controlBar_classicbtn_right].x, get(controlBar_classicbutton_pos));
        inc(controlBar_classicbutton_pos, 36);
        set(layer[controlBar_classicbtn_left].x, get(controlBar_classicbutton_pos));
        inc(controlBar_classicbutton_pos, 36);
    );
    if (device.desktop,
        set(layer[controlBar_classicbtn_down].x, get(controlBar_classicbutton_pos));
        inc(controlBar_classicbutton_pos, 36);
        set(layer[controlBar_classicbtn_up].x, get(controlBar_classicbutton_pos));
        inc(controlBar_classicbutton_pos, 36);
    );
    if (device.desktop,
        set(layer[controlBar_classicbtn_out].x, get(controlBar_classicbutton_pos));
        inc(controlBar_classicbutton_pos, 36);
        set(layer[controlBar_classicbtn_in].x, get(controlBar_classicbutton_pos));
        inc(controlBar_classicbutton_pos, 36);
    );
    if (scene.count GT 1,
        set(layer[controlBar_classicbtn_next_pano].x, get(controlBar_classicbutton_pos));
        inc(controlBar_classicbutton_pos, 36);
        set(layer[controlBar_classicbtn_prev_pano].x, get(controlBar_classicbutton_pos));
        inc(controlBar_classicbutton_pos, 36);
      );


    set(layer[controlBar_classicbtn_play_video].x, get(controlBar_classicbutton_pos));
    set(layer[controlBar_classicbtn_pause_video].x, get(controlBar_classicbutton_pos));
    inc(controlBar_classicbutton_pos, 36);

    inc(controlBar_classicbutton_pos, 20);

    set(controlBar_classicbackgroundwidthwhenopened, get(controlBar_classicbutton_pos));

    sub(controlBar_classicbackgroundwidthwhenopenedwithoutvideo, controlBar_classicbackgroundwidthwhenopened, 36);


    
    add(controlBar_classicVerifyVisibility, 20, 20);
    if(controlBar_classicbackgroundwidthwhenopened == controlBar_classicVerifyVisibility,
      set(controlBar_classicbackgroundwidthwhenopened, 0);

      set(controlBar_classicbackgroundwidthwhenopenedwithoutvideo, 0);

    );

	
	
  </action>

	<events name="controlBar_classicStartTourEvents" onTourStart="controlBar_classicCallOnStartTour();" keep="true" />

	<action name="controlBar_classicCallOnStartTour">
		
		set(layer[controlBar_classicmenu_controlbar_bg_img].width, get(controlBar_classicbutton_pos));
		set(layer[controlBar_classicmenu_controlbar_bg].width, get(controlBar_classicbutton_pos));
		controlBar_classicshowMenuControls();
	</action>

	<action name="controlBar_classicOpenVideoplayer">
		set(controlBar_classic_use_videoplayer_interface, true);
		
		controlBar_classicupdateHideShowVideoplayerButtons();
	</action>
	<action name="controlBar_classicCloseVideoplayer">
		set(controlBar_classic_use_videoplayer_interface, false);
		
		controlBar_classicupdateHideShowVideoplayerButtons();
	</action>


  <style name="controlBar_classic_btn_style"
         keep="true"
         alpha="0.8"
         edge="right" align="right"
         width="36" height="36"
         zorder="3"
         onover="controlBar_classicctrlbaronoveraction();"
         onout="controlBar_classicctrlbaronoutaction();"
         onhover="showTooltip('plugin', controlBar_classicmenuTooltipStyle, bottom);"
         />
  <action name="controlBar_classicctrlbaronoveraction">
    tween(alpha,1,0.1,easeoutquad);
    tween(y,-2,0.1,easeoutquad);
  </action>  
  <action name="controlBar_classicctrlbaronoutaction">
    tween(alpha,0.8);
    tween(y,0,0.1,easeoutquad);
    hideTooltip();
  </action>

  <layer name="controlBar_classicmenu_controlbar_bg_img"
         keep="true"
         align="bottom"
         x="0" y="100"
         url="%FIRSTXML%/graphics/classiccontrolbar/footer.png"
         zorder="1"
         width="40"
         height="40"
         scale9grid="10|10|80|80"
         visible="false"
         />
  <layer name="controlBar_classicmenu_controlbar_bg"
         keep="true"
         align="bottom"
         x="0" y="100"
         type="container"
         zorder="2"
         width="40"
         height="40"
         visible="false"
         alpha="1.0"
         >

    <layer name="controlBar_classicbtn_hide_hotspots"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_hide_show_hotspots.png"
            style="controlBar_classic_btn_style"
            onclick="hideHotspots();
"
            tooltip="controlBar_classichideSpotsTip"
            visible="false"
            />
    <layer name="controlBar_classicbtn_show_hotspots"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_hide_show_hotspots.png"
            style="controlBar_classic_btn_style"
            onclick="showHotspots();
"
            tooltip="controlBar_classicshowSpotsTip"
            visible="false"
            />


    <layer name="controlBar_classicbtn_gyroscope_off"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_gyroscope.png"
            style="controlBar_classic_btn_style"
            onclick="disableGyroscope();
"
            devices="html5"
            tooltip="controlBar_classicgyroOffTip"
            visible="false"
            />
    <layer name="controlBar_classicbtn_gyroscope_on"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_gyroscope.png"
            style="controlBar_classic_btn_style"
            onclick="enableGyroscope();
"
            devices="html5"
            tooltip="controlBar_classicgyroOnTip"
            visible="false"
            />
    <layer name="controlBar_classicbtn_gyroscope_not"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_gyroscope_off.png"
            style="controlBar_classic_btn_style"
            enabled="true"
            capture="false"
            devices="html5"
            tooltip="controlBar_classicgyroNotTip"
            visible="false"
            />


    <layer name="controlBar_classicbtn_ctrlmode_move_to"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_move_to.png"
            style="controlBar_classic_btn_style"
            tooltip="controlBar_classicctrlmodeMoveTip"
            onclick="setControlModeMoveTo();
"
            visible="false"
            devices="desktop"
            />
    <layer name="controlBar_classicbtn_ctrlmode_drag_to"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_drag_to.png"
            style="controlBar_classic_btn_style"
            tooltip="controlBar_classicctrlmodeDragTip"
            onclick="setControlModeDragTo();
"
            visible="false"
            devices="desktop"
            />

    <layer name="controlBar_classicbtn_in"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_zoom_in.png"
            ondown="viewControlZoomIn(false);"
            onup="viewControlZoomStop();
"
            style="controlBar_classic_btn_style"
            tooltip="controlBar_classiczoomInTip"
            devices="desktop"
            visible="false"
            />
    <layer name="controlBar_classicbtn_out"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_zoom_out.png"
            ondown="viewControlZoomOut(false);
"
            onup="viewControlZoomStop();
"
            style="controlBar_classic_btn_style"
            tooltip="controlBar_classiczoomOutTip"
            devices="desktop"
            visible="false"
            />

    <layer name="controlBar_classicbtn_home"
           url="%FIRSTXML%/graphics/classiccontrolbar/btn_home.png"
           onclick="controlBar_classicbtn_home_action();"
           style="controlBar_classic_btn_style"
           tooltip="controlBar_classichomeTip"
           visible="false"
           />
    <layer name="controlBar_classicbtn_left"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_move_left.png"
            ondown="viewControlMoveLeft(false);
"
            onup="viewControlMoveHoriStop();
"
            style="controlBar_classic_btn_style"
            tooltip="controlBar_classicmoveLeftTip"
            devices="desktop"
            visible="false"
            />
    <layer name="controlBar_classicbtn_right"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_move_right.png"
            ondown="viewControlMoveRight(false);
"
            onup="viewControlMoveHoriStop();
"
            style="controlBar_classic_btn_style"
            tooltip="controlBar_classicmoveRightTip"
            devices="desktop"
            visible="false"
            />

    <layer name="controlBar_classicbtn_up"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_move_up.png"
            ondown="viewControlMoveUp(false);
"
            onup="viewControlMoveVertStop();
"
            style="controlBar_classic_btn_style"
            tooltip="controlBar_classicmoveUpTip"
            devices="desktop"
            visible="false"
            />
    <layer name="controlBar_classicbtn_down"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_move_down.png"
            ondown="viewControlMoveDown(false);
"
            onup="viewControlMoveVertStop();
"
            style="controlBar_classic_btn_style"
            tooltip="controlBar_classicmoveDownTip"
            devices="desktop"
            visible="false"
            />


    <layer name="controlBar_classicbtn_sound_on"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_start_sound.png"
            onclick="playTourSounds();
"
            style="controlBar_classic_btn_style"
            visible="false"
            tooltip="controlBar_classicsoundsOnTip"
            />
    <layer name="controlBar_classicbtn_sound_off"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_stop_sound.png"
            onclick="stopTourSounds();
"
            style="controlBar_classic_btn_style"
            visible="false"
            tooltip="controlBar_classicsoundsOffTip"
            />


    <layer name="controlBar_classicbtn_prev_pano"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_previous_scene.png"
            onclick="loadPreviousScene();
"
            style="controlBar_classic_btn_style"
            tooltip="controlBar_classicprevSceneTip"
            visible="false"
            />
    <layer name="controlBar_classicbtn_next_pano"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_next_scene.png"
            onclick="loadNextScene();
"
            style="controlBar_classic_btn_style"
            tooltip="controlBar_classicnextSceneTip"
            visible="false"
            />

  <layer name="controlBar_classicbtn_hide_thumbnails"
         url="%FIRSTXML%/graphics/classiccontrolbar/btn_hide_thumbnails.png"
         style="controlBar_classic_btn_style"
         onclick="hideTourThumbnails();
"
         tooltip="controlBar_classichideThumbnailsTip"
         visible="false"
         />
  <layer name="controlBar_classicbtn_show_thumbnails"
         url="%FIRSTXML%/graphics/classiccontrolbar/btn_show_thumbnails.png"
         style="controlBar_classic_btn_style"
         onclick="showTourThumbnails();
"
         tooltip="controlBar_classicshowThumbnailsTip"
         visible="false"
         />


    <layer name="controlBar_classicbtn_display_map"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_map.png"
            onclick="controlBar_classicdisplayMap();"
            style="controlBar_classic_btn_style"
            visible="false"
            tooltip="controlBar_classicdisplayMapTip"
            />
    <layer name="controlBar_classicbtn_hide_map"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_map.png"
            onclick="controlBar_classichideMap();"
            style="controlBar_classic_btn_style"
            visible="false"
            tooltip="controlBar_classichideMapTip"
            />

    <layer name="controlBar_classicbtn_display_floorplan"
           url="%FIRSTXML%/graphics/classiccontrolbar/btn_floorplan.png"
           onclick="showFloorplan();
"
           style="controlBar_classic_btn_style"
           visible="false"
           tooltip="controlBar_classicdisplayFloorplanTip"
           />
    <layer name="controlBar_classicbtn_hide_floorplan"
           url="%FIRSTXML%/graphics/classiccontrolbar/btn_floorplan.png"
           onclick="hideFloorplan();
"
           style="controlBar_classic_btn_style"
           visible="false"
           tooltip="controlBar_classichideFloorplanTip"
           />

    <layer name="controlBar_classicbtn_share"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_share.png"
            onclick="shareTour();
"
            style="controlBar_classic_btn_style"
            visible="false"
            tooltip="controlBar_classicshareTip"
            />


    <layer name="controlBar_classicbtn_openfs"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_enter_fs.png"
            onclick="enterFullscreen();
"
            style="controlBar_classic_btn_style"
            devices="fullscreensupport"
            visible="false"
            tooltip="controlBar_classicopenFsTip"
            />
    <layer name="controlBar_classicbtn_closefs"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_close_fs.png"
            onclick="exitFullscreen();
"
            style="controlBar_classic_btn_style"
            visible="false"
            devices="fullscreensupport"
            tooltip="controlBar_classiccloseFsTip"
            />

    <layer name="controlBar_classicbtn_autorotate_on"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_start_autorotation.png"
            onclick="resumeautorotation();
"
            style="controlBar_classic_btn_style"
            visible="false"
            tooltip="controlBar_classicautorotateOnTip"
            />
    <layer name="controlBar_classicbtn_autorotate_off"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_stop_autorotation.png"
            onclick="pauseautorotation();
"
            style="controlBar_classic_btn_style"
            visible="false"
            tooltip="controlBar_classicautorotateOffTip"
            />


    <layer name="controlBar_classicbtn_autotour_on"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_start_automatic_tour.png"
            onclick="startautotour();
"
            style="controlBar_classic_btn_style"
            visible="false"
            tooltip="controlBar_classicautotourOnTip"
            />
    <layer name="controlBar_classicbtn_autotour_off"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_stop_automatic_tour.png"
            onclick="stopautotour();
"
            style="controlBar_classic_btn_style"
            visible="false"
            tooltip="controlBar_classicautotourOffTip"
            />

    <layer name="controlBar_classicbtn_play_video"
           url="%FIRSTXML%/graphics/classiccontrolbar/btn_start_videoplayer.png"
           onclick="videointerface_togglepause();"
           style="controlBar_classic_btn_style"
           visible="false"
           tooltip="controlBar_classicplayVideoTip"
           />
    <layer name="controlBar_classicbtn_pause_video"
           url="%FIRSTXML%/graphics/classiccontrolbar/btn_pause_videoplayer.png"
           onclick="videointerface_togglepause();"
           style="controlBar_classic_btn_style"
           visible="false"
           tooltip="controlBar_classicpauseVideoTip"
           />

    <layer name="controlBar_classicbtn_enter_vr"
           url="%FIRSTXML%/graphics/classiccontrolbar/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_classic_btn_style"
           visible="false"
           devices="html5"
           tooltip="controlBar_classicenterVRTip"
           />
    <layer name="controlBar_classicbtn_enter_vr_not"
           url="%FIRSTXML%/graphics/classiccontrolbar/btn_vr_mode_off.png"
           style="controlBar_classic_btn_style"
           enabled="true"
           capture="false"
           visible="false"
           devices="html5"
           tooltip="controlBar_classicenterVRNotTip"
           />

    <layer name="controlBar_classicbtn_display_help"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_help.png"
            onclick="controlBar_classicdisplayHelp();"
            style="controlBar_classic_btn_style"
            devices="desktop"
            visible="false"
            tooltip="controlBar_classicdisplayHelpTip"
            />
    <layer name="controlBar_classicbtn_close_help"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_help.png"
            onclick="controlBar_classiccloseHelp();"
            style="controlBar_classic_btn_style"
            visible="false"
            devices="desktop"
            tooltip="controlBar_classichideHelpTip"
            />


    <layer name="controlBar_classicbtn_display_info"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_info.png"
            onclick="showTourInfo();
"
            style="controlBar_classic_btn_style"
            visible="false"
            tooltip="controlBar_classicdisplayInfoTip"
            />
    <layer name="controlBar_classicbtn_close_info"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_info.png"
            onclick="hideTourInfo();
"
            style="controlBar_classic_btn_style"
            visible="false"
            tooltip="controlBar_classichideInfoTip"
            />


    <layer name="controlBar_classicbtn_hidecontrols"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_hide_controls.png"
            style="controlBar_classic_btn_style"
            onclick="controlBar_classichideMenuControls();hideTourControls();
"
            visible="false"
            tooltip="controlBar_classichideControlsTip"
            />
    <layer name="controlBar_classicbtn_showcontrols"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_show_controls.png"
            style="controlBar_classic_btn_style"
            onclick="controlBar_classicshowMenuControls();showTourControls();
"
            tooltip="controlBar_classicdisplayControlsTip"
            visible="false"
            />
  </layer>


<events name="controlBar_classicvravailableevent"
		onvravailable="controlBar_classicupdateVrButtonsAvailability();"
		onvrunavailable="controlBar_classicupdateVrButtonsAvailability();"
		keep="true" devices="html5" />
	<krpano controlBar_classicmenuvravailable="false" />
	<action name="controlBar_classicupdateVrButtonsAvailability">
		if (tour_vrdevices,
			set(controlBar_classicmenuvravailable, true);
		,
			set(controlBar_classicmenuvravailable, false);
		);
		controlBar_classicupdateVrButtons();
	</action>
	<action name="controlBar_classicHideVrButtons">
		set(layer[controlBar_classicbtn_enter_vr].visible, false);
		if('%1' == 'true' AND plugin[ptpvrmode],
			set(layer[controlBar_classicbtn_enter_vr_not].visible, true);
		,
			set(layer[controlBar_classicbtn_enter_vr_not].visible, false);
		);
	</action>
	<action name="controlBar_classicShowVrButtons">
		if (controlBar_classicmenuvravailable,
			set(layer[controlBar_classicbtn_enter_vr].visible, true);
			set(layer[controlBar_classicbtn_enter_vr_not].visible, false);
		,
			controlBar_classicHideVrButtons(true);
		);
	</action>
	<action name="controlBar_classicupdateVrButtons">
	if (tour_vrdevices,
		if (controlBar_classicIsOpened,
			controlBar_classicShowVrButtons();
		,
			controlBar_classicHideVrButtons();
		);
	,
		if (controlBar_classicIsOpened,
			controlBar_classicHideVrButtons(true);
		,
			controlBar_classicHideVrButtons();
		);
	);
	</action>

	<events name="controlBar_classicgyroscopeavailableevent"
		ongyroscopeavailable="controlBar_classicupdateGyroscopeButtonsAvailability();"
		ongyroscopeunavailable="controlBar_classicupdateGyroscopeButtonsAvailability();"
		ongyroscopeon="controlBar_classicenableGyroscopeButtons(true);"
		ongyroscopeoff="controlBar_classicenableGyroscopeButtons(false);"
		keep="true" devices="html5" />
	<krpano controlBar_classicmenugyroscopeavailable="false" controlBar_classicmenugyroscopeenabled="false" />
	<action name="controlBar_classicupdateGyroscopeButtonsAvailability">
		if (tour_gyroscopedevices,
			set(controlBar_classicmenugyroscopeavailable, true);
			controlBar_classicupdateGyroscopeButtons();
		,
			set(controlBar_classicmenugyroscopeavailable, false);
			controlBar_classicupdateGyroscopeButtons();
		);
	</action>
	<action name="controlBar_classicenableGyroscopeButtons">
		if (tour_gyroscopedevices,
			set(controlBar_classicmenugyroscopeenabled, %1);
			controlBar_classicupdateGyroscopeButtons();
		);
	</action>
	<action name="controlBar_classicHideGyroscopeButtons">
		set(layer[controlBar_classicbtn_gyroscope_off].visible, false);
		set(layer[controlBar_classicbtn_gyroscope_on].visible, false);
		if('%1' == 'true' AND plugin[gyroscope],
			set(layer[controlBar_classicbtn_gyroscope_not].visible, true);
		,
			set(layer[controlBar_classicbtn_gyroscope_not].visible, false);
		);
	</action>
	<action name="controlBar_classicShowGyroscopeButtons">
		if (controlBar_classicmenugyroscopeavailable,
			if (controlBar_classicmenugyroscopeenabled,
				set(layer[controlBar_classicbtn_gyroscope_off].visible, true);
				set(layer[controlBar_classicbtn_gyroscope_on].visible, false);
			,
				set(layer[controlBar_classicbtn_gyroscope_off].visible, false);
				set(layer[controlBar_classicbtn_gyroscope_on].visible, true);
			);
			set(layer[controlBar_classicbtn_gyroscope_not].visible, false);
		,
			controlBar_classicHideGyroscopeButtons(true);
		);
	</action>
	<action name="controlBar_classicupdateGyroscopeButtons">
	if (tour_gyroscopedevices,
		if (controlBar_classicIsOpened,
			controlBar_classicShowGyroscopeButtons();
		,
			controlBar_classicHideGyroscopeButtons();
		);
	,
		if (controlBar_classicIsOpened,
			controlBar_classicHideGyroscopeButtons(true);
		,
			controlBar_classicHideGyroscopeButtons();
		);
	);
	</action>


	<events name="controlBar_classiccontrolmodechangedevent" 
		oncontrolmodechanged="controlBar_classicupdateControlModeButtons();" 
		keep="true" />
	<action name="controlBar_classicHideControlModeButtons">
		set(layer[controlBar_classicbtn_ctrlmode_move_to].visible, false);
		set(layer[controlBar_classicbtn_ctrlmode_drag_to].visible, false);
	</action>
	<action name="controlBar_classicShowControlModeButtons">
		if (tour_controlmodemousetype == "moveto",
			set(layer[controlBar_classicbtn_ctrlmode_drag_to].visible, true);
			set(layer[controlBar_classicbtn_ctrlmode_move_to].visible, false);
		,
			set(layer[controlBar_classicbtn_ctrlmode_move_to].visible, true);
			set(layer[controlBar_classicbtn_ctrlmode_drag_to].visible, false);
		);
	</action>
	<action name="controlBar_classicupdateControlModeButtons">
	if (device.desktop,
		if (controlBar_classicIsOpened,
			controlBar_classicShowControlModeButtons();
		,
			controlBar_classicHideControlModeButtons();
		);
	,
		controlBar_classicHideControlModeButtons();
	);
	</action>

	<events name="controlBar_classichideshowthumbnailsevent" 
		hidetourthumbnails="controlBar_classicupdateHideShowThumbnailsButtons();" 
		showtourthumbnails="controlBar_classicupdateHideShowThumbnailsButtons();" 
		keep="true" />
	<action name="controlBar_classicHideHideShowThumbnailsButtons">
		set(layer[controlBar_classicbtn_show_thumbnails].visible, false);
		set(layer[controlBar_classicbtn_hide_thumbnails].visible, false);
	</action>
	<action name="controlBar_classicShowHideShowThumbnailsButtons">
		if (tour_displaythumbnails,
			set(layer[controlBar_classicbtn_hide_thumbnails].visible, true);
			set(layer[controlBar_classicbtn_show_thumbnails].visible, false);
		,
			set(layer[controlBar_classicbtn_show_thumbnails].visible, true);
			set(layer[controlBar_classicbtn_hide_thumbnails].visible, false);
		);
	</action>
	<action name="controlBar_classicupdateHideShowThumbnailsButtons">
		if (controlBar_classicIsOpened,
			controlBar_classicShowHideShowThumbnailsButtons();
		,
			controlBar_classicHideHideShowThumbnailsButtons();
		);
	</action>


  <action name="controlBar_classichideMenuControls">
    set(controlBar_classicIsOpened, false);
    set(layer[controlBar_classicbtn_hidecontrols].visible, false);
    set(layer[controlBar_classicbtn_showcontrols].visible, true);
    controlBar_classicupdateFullscreenButtons();

    set(layer[controlBar_classicbtn_share].visible, false);
    controlBar_classicupdateSoundButtons();
    controlBar_classicupdateVrButtons();

    if (scene.count GT 1,
    set(layer[controlBar_classicbtn_prev_pano].visible, false);
    set(layer[controlBar_classicbtn_next_pano].visible, false);
    );
    controlBar_classicupdateAutorotationButtons();

    controlBar_classicupdateAutotourButtons();
    controlBar_classicupdateHideShowVideoplayerButtons();

    controlBar_classicupdateHideShowThumbnailsButtons();
    set(layer[controlBar_classicbtn_up].visible  , false);
    set(layer[controlBar_classicbtn_down].visible, false);
    set(layer[controlBar_classicbtn_home].visible, false);
    set(layer[controlBar_classicbtn_right].visible, false);
    set(layer[controlBar_classicbtn_left].visible , false);
    set(layer[controlBar_classicbtn_in].visible , false);
    set(layer[controlBar_classicbtn_out].visible, false);

    controlBar_classicupdateMapButtons();
    controlBar_classicupdateFloorplanButtons();

    controlBar_classicupdateControlModeButtons();
    controlBar_classicupdateHideShowHotspotsButtons();

    controlBar_classicupdateGyroscopeButtons();

    controlBar_classicupdateHelpButtons();

    controlBar_classicupdateInfoButtons();

    if(controlBar_classicbackgroundwidthwhenclosed == 0,
      set(layer[controlBar_classicmenu_controlbar_bg_img].visible, false);
      set(layer[controlBar_classicmenu_controlbar_bg].visible, false);
    ,
      set(layer[controlBar_classicmenu_controlbar_bg_img].visible, true);
      set(layer[controlBar_classicmenu_controlbar_bg].visible, true);
    );
    tween(layer[controlBar_classicmenu_controlbar_bg_img].width,get(controlBar_classicbackgroundwidthwhenclosed),0.5,easeOutQuad);
    tween(layer[controlBar_classicmenu_controlbar_bg].width,get(controlBar_classicbackgroundwidthwhenclosed),0.5,easeOutQuad);
    tween(layer[controlBar_classicmenu_controlbar_bg_img].alpha,1.0,0.5,easeOutQuad);
  </action>
  <action name="controlBar_classicshowMenuControls">
    set(controlBar_classicIsOpened, true);
    set(layer[controlBar_classicbtn_hidecontrols].visible, true);
    set(layer[controlBar_classicbtn_showcontrols].visible, false);
    if(controlBar_classicbackgroundwidthwhenopened == 0,
      set(layer[controlBar_classicmenu_controlbar_bg_img].visible, false);
      set(layer[controlBar_classicmenu_controlbar_bg].visible, false);
    ,
      set(layer[controlBar_classicmenu_controlbar_bg_img].visible, true);
      set(layer[controlBar_classicmenu_controlbar_bg].visible, true);
    );
    tween(layer[controlBar_classicmenu_controlbar_bg_img].alpha,1.0,0.5,easeOutQuad);
    controlBar_classicshowMenuButtons();

    if(scene[get(xml.scene)].video,

      tween(layer[controlBar_classicmenu_controlbar_bg_img].width, get(controlBar_classicbackgroundwidthwhenopened),0.5,easeOutQuad);
      tween(layer[controlBar_classicmenu_controlbar_bg].width, get(controlBar_classicbackgroundwidthwhenopened),0.5,easeOutQuad);

    ,
      tween(layer[controlBar_classicmenu_controlbar_bg_img].width, get(controlBar_classicbackgroundwidthwhenopenedwithoutvideo),0.5,easeOutQuad);
      tween(layer[controlBar_classicmenu_controlbar_bg].width, get(controlBar_classicbackgroundwidthwhenopenedwithoutvideo),0.5,easeOutQuad);
    );

  </action>
  <action name="controlBar_classicshowMenuButtons">
    if (device.desktop,
    set(layer[controlBar_classicbtn_up].visible  , true);
    set(layer[controlBar_classicbtn_down].visible, true);
    );
    if (device.desktop,
    set(layer[controlBar_classicbtn_right].visible, true);
    set(layer[controlBar_classicbtn_left].visible , true);
    );
    if (device.desktop,
    set(layer[controlBar_classicbtn_in].visible , true);
    set(layer[controlBar_classicbtn_out].visible, true);
    );
    set(layer[controlBar_classicbtn_home].visible, true);

    controlBar_classicupdateMapButtons();
    controlBar_classicupdateFloorplanButtons();

    controlBar_classicupdateControlModeButtons();
    controlBar_classicupdateHideShowHotspotsButtons();

    controlBar_classicupdateGyroscopeButtons();

    controlBar_classicupdateHelpButtons();

    controlBar_classicupdateInfoButtons();

    controlBar_classicupdateFullscreenButtons();

    set(layer[controlBar_classicbtn_share].visible, true);
    controlBar_classicupdateSoundButtons();
    controlBar_classicupdateVrButtons();

    if (scene.count GT 1,
      set(layer[controlBar_classicbtn_prev_pano].visible, true);
      set(layer[controlBar_classicbtn_next_pano].visible, true);
    );
    controlBar_classicupdateAutorotationButtons();

    controlBar_classicupdateAutotourButtons();
    controlBar_classicupdateHideShowVideoplayerButtons();

      controlBar_classicupdateHideShowThumbnailsButtons();
  </action>

  <layer name="controlBar_classichelpScreen" align="center" keep="true" onclick="controlBar_classiccloseHelp();" url="%FIRSTXML%/graphics/classiccontrolbar/help_screen_bg.png" visible="false" zorder="97" height="10%" width="prop" />

  <layer name="controlBar_classichelpScreenFg" align="center" keep="true" onclick="controlBar_classiccloseHelp();" displayed="false" 
         url="%FIRSTXML%/graphics/classiccontrolbar/help_screen_fg.png" 
         alpha="0.8" 
         height="50%" 
         width="prop" 
         zorder="98"
         visible="false" />
  <action name="controlBar_classicdisplayHelp">
    set(layer[controlBar_classichelpScreenFg].displayed,true);
    set(layer[controlBar_classichelpScreen].visible,true);
    tween(layer[controlBar_classichelpScreen].height, 50%, 1, easeOutQuad,
      set(layer[controlBar_classichelpScreenFg].visible,true);
    );
    controlBar_classicupdateHelpButtons();
  </action>
  <action name="controlBar_classiccloseHelp">
    set(layer[controlBar_classichelpScreenFg].displayed,false);
    set(layer[controlBar_classichelpScreenFg].visible,false);
    tween(layer[controlBar_classichelpScreen].height, 10%, 1, easeOutQuad,
      set(layer[controlBar_classichelpScreen].visible,false);
    );
    controlBar_classicupdateHelpButtons();
  </action>
	<action name="controlBar_classicHideHelpButtons">
		set(layer[controlBar_classicbtn_display_help].visible, false);
		set(layer[controlBar_classicbtn_close_help].visible, false);
	</action>
	<action name="controlBar_classicShowHelpButtons">
		if (layer[controlBar_classichelpScreenFg].displayed,
			set(layer[controlBar_classicbtn_close_help].visible, true);
			set(layer[controlBar_classicbtn_display_help].visible, false);
		,
			set(layer[controlBar_classicbtn_display_help].visible, true);
			set(layer[controlBar_classicbtn_close_help].visible, false);
		);
	</action>
	<action name="controlBar_classicupdateHelpButtons">
	if (device.desktop,
		if (controlBar_classicIsOpened,
			controlBar_classicShowHelpButtons();
		,
			controlBar_classicHideHelpButtons();
		);
	,
		controlBar_classicHideHelpButtons();
	);
	</action>


	<events name="controlBar_classicHideShowInfoEvents" 
		onhidetourinfo="controlBar_classicupdateInfoButtons();" 
		onshowtourinfo="controlBar_classicupdateInfoButtons();" 
		keep="true" />
	<action name="controlBar_classicHideInfoButtons">
		set(layer[controlBar_classicbtn_display_info].visible, false);
		set(layer[controlBar_classicbtn_close_info].visible, false);
	</action>
	<action name="controlBar_classicShowInfoButtons">
		if (tour_displayinfo,
			set(layer[controlBar_classicbtn_close_info].visible, true);
			set(layer[controlBar_classicbtn_display_info].visible, false);
		,
			set(layer[controlBar_classicbtn_display_info].visible, true);
			set(layer[controlBar_classicbtn_close_info].visible, false);
		);
	</action>
	<action name="controlBar_classicupdateInfoButtons">
		if (controlBar_classicIsOpened,
			controlBar_classicShowInfoButtons();
		,
			controlBar_classicHideInfoButtons();
		);
	</action>

  <action name="controlBar_classicdisplayMap">showMap();

  </action>
  <action name="controlBar_classichideMap">hideMap();

  </action>

	<events name="controlBar_classicdisplaymapchangeevent"
		onshowtourmap="controlBar_classicupdateMapButtons();"
		onhidetourmap="controlBar_classicupdateMapButtons();"
		keep="true"/>
	<action name="controlBar_classicHideMapButtons">
		set(layer[controlBar_classicbtn_display_map].visible, false);
		set(layer[controlBar_classicbtn_hide_map].visible, false);
	</action>
	<action name="controlBar_classicShowMapButtons">
		if (tour_displaymap,
			set(layer[controlBar_classicbtn_hide_map].visible, true);
			set(layer[controlBar_classicbtn_display_map].visible, false);
		,
			set(layer[controlBar_classicbtn_display_map].visible, true);
			set(layer[controlBar_classicbtn_hide_map].visible, false);
		);
	</action>
	<action name="controlBar_classicupdateMapButtons">
		if (controlBar_classicIsOpened,
			controlBar_classicShowMapButtons();
		,
			controlBar_classicHideMapButtons();
		);
	</action>

	<events name="controlBar_classicDisplayFloorPlanEvents" 
		onshowtourfloorplan="controlBar_classicupdateFloorplanButtons();" 
		onhidetourfloorplan="controlBar_classicupdateFloorplanButtons();" 
		keep="true" />
	<action name="controlBar_classicHideFloorplanButtons">
		set(layer[controlBar_classicbtn_display_floorplan].visible, false);
		set(layer[controlBar_classicbtn_hide_floorplan].visible, false);
	</action>
	<action name="controlBar_classicShowFloorplanButtons">
		if (tour_displayfloorplan,
			set(layer[controlBar_classicbtn_hide_floorplan].visible, true);
			set(layer[controlBar_classicbtn_display_floorplan].visible, false);
		,
			set(layer[controlBar_classicbtn_display_floorplan].visible, true);
			set(layer[controlBar_classicbtn_hide_floorplan].visible, false);
		);
	</action>
	<action name="controlBar_classicupdateFloorplanButtons">
		if (controlBar_classicIsOpened,
			controlBar_classicShowFloorplanButtons();
		,
			controlBar_classicHideFloorplanButtons();
		);
	</action>


	<events name="controlBar_classicmenufullscreenchangeevent"
		onenterfullscreen="controlBar_classicupdateFullscreenButtons();"
		onexitfullscreen="controlBar_classicupdateFullscreenButtons();"
		keep="true"/>
	<action name="controlBar_classicHideFullscreenButtons">
		set(layer[controlBar_classicbtn_openfs].visible , false);
		set(layer[controlBar_classicbtn_closefs].visible, false);
	</action>
	<action name="controlBar_classicShowFullscreenButtons">
		if (device.fullscreensupport,
			if(tour_fullscreen,
				set(layer[controlBar_classicbtn_openfs].visible , false);
				set(layer[controlBar_classicbtn_closefs].visible, true);
			,
				set(layer[controlBar_classicbtn_openfs].visible ,true);
				set(layer[controlBar_classicbtn_closefs].visible,false);
			);
		,
			controlBar_classicHideFullscreenButtons();
		);
	</action>
	<action name="controlBar_classicupdateFullscreenButtons">
		if (controlBar_classicIsOpened,
			controlBar_classicShowFullscreenButtons();
		,
			controlBar_classicHideFullscreenButtons();
		);
	</action>

	<events name="controlBar_classicAutorotationEvents"
		onstartautorotation="controlBar_classicupdateAutorotationButtons();"
		onresumeautorotation="controlBar_classicupdateAutorotationButtons();"
		onstopautorotation="controlBar_classicupdateAutorotationButtons();"
		onpauseautorotation="controlBar_classicupdateAutorotationButtons();"
		keep="true"/>
	<action name="controlBar_classicHideAutorotationButtons">
		set(layer[controlBar_classicbtn_autorotate_off].visible, false);
		set(layer[controlBar_classicbtn_autorotate_on].visible , false);
	</action>
	<action name="controlBar_classicShowAutorotationButtons">
		if(autorotate.enabled == false,
			set(layer[controlBar_classicbtn_autorotate_off].visible, false);
			set(layer[controlBar_classicbtn_autorotate_on].visible , true);
		,
			set(layer[controlBar_classicbtn_autorotate_off].visible, true);
			set(layer[controlBar_classicbtn_autorotate_on].visible , false);
		);
	</action>
	<action name="controlBar_classicupdateAutorotationButtons">
		if (controlBar_classicIsOpened,
			controlBar_classicShowAutorotationButtons();
		,
			controlBar_classicHideAutorotationButtons();
		);
	</action>


    <events name="controlBar_classichideshowvideoplayerevent" onplayvideointerface="controlBar_classicupdateHideShowVideoplayerButtons();" onpausevideointerface="controlBar_classicupdateHideShowVideoplayerButtons();" keep="true"/>
    <action name="controlBar_classicHideHideShowVideoplayerButtons">
      if(controlBar_classicbackgroundwidthwhenopened GT 0,
        add(controlBar_classicVerifyVisibility, 20, 20);
        if(controlBar_classicbackgroundwidthwhenopenedwithoutvideo LE controlBar_classicVerifyVisibility,
          set(layer[controlBar_classicmenu_controlbar_bg_img].visible,false);
          set(layer[controlBar_classicmenu_controlbar_bg].visible,false);
        );
        if (controlBar_classicIsOpened,
          tween(layer[controlBar_classicmenu_controlbar_bg_img].width,get(controlBar_classicbackgroundwidthwhenopenedwithoutvideo),0.5,easeOutQuad);
          tween(layer[controlBar_classicmenu_controlbar_bg].width,get(controlBar_classicbackgroundwidthwhenopenedwithoutvideo),0.5,easeOutQuad);
        );
      ,
        set(layer[controlBar_classicmenu_controlbar_bg_img].width, get(controlBar_classicbackgroundwidthwhenopenedwithoutvideo));
        set(layer[controlBar_classicmenu_controlbar_bg].width, get(controlBar_classicbackgroundwidthwhenopenedwithoutvideo));
      );
      set(layer[controlBar_classicbtn_play_video].visible, false);
      set(layer[controlBar_classicbtn_pause_video].visible, false);
    </action>
    <action name="controlBar_classicShowHideShowVideoplayerButtons">
      if(controlBar_classic_use_videoplayer_interface,
        if (plugin[get(videointerface_video)],
        add(controlBar_classicVerifyVisibility, 20, 20);
        if(controlBar_classicbackgroundwidthwhenopenedwithoutvideo LE controlBar_classicVerifyVisibility,
          set(layer[controlBar_classicmenu_controlbar_bg_img].visible,true);
          set(layer[controlBar_classicmenu_controlbar_bg].visible,true);
        );
        if (plugin[get(videointerface_video)].ispaused,
          if(controlBar_classicbackgroundwidthwhenopened GT 0,
            tween(layer[controlBar_classicmenu_controlbar_bg_img].width,get(controlBar_classicbackgroundwidthwhenopened),0.5,easeOutQuad);
            tween(layer[controlBar_classicmenu_controlbar_bg].width,get(controlBar_classicbackgroundwidthwhenopened),0.5,easeOutQuad);
          ,
            set(layer[controlBar_classicmenu_controlbar_bg_img].width, get(controlBar_classicbackgroundwidthwhenopenedwithoutvideo));
            set(layer[controlBar_classicmenu_controlbar_bg].width, get(controlBar_classicbackgroundwidthwhenopenedwithoutvideo));
          );
          set(layer[controlBar_classicbtn_play_video].visible, true);
          set(layer[controlBar_classicbtn_pause_video].visible, false);
        ,
          if(controlBar_classicbackgroundwidthwhenopened GT 0,
            tween(layer[controlBar_classicmenu_controlbar_bg_img].width,get(controlBar_classicbackgroundwidthwhenopened),0.5,easeOutQuad);
            tween(layer[controlBar_classicmenu_controlbar_bg].width,get(controlBar_classicbackgroundwidthwhenopened),0.5,easeOutQuad);
          ,
            set(layer[controlBar_classicmenu_controlbar_bg_img].width, get(controlBar_classicbackgroundwidthwhenopenedwithoutvideo));
            set(layer[controlBar_classicmenu_controlbar_bg].width, get(controlBar_classicbackgroundwidthwhenopenedwithoutvideo));
          );
          set(layer[controlBar_classicbtn_play_video].visible, false);
          set(layer[controlBar_classicbtn_pause_video].visible, true);
        ););
      ,
        controlBar_classicHideHideShowVideoplayerButtons();
      );
    </action>
    <action name="controlBar_classicupdateHideShowVideoplayerButtons">
      if (controlBar_classicIsOpened,
        controlBar_classicShowHideShowVideoplayerButtons();
      ,
        controlBar_classicHideHideShowVideoplayerButtons();
      );
    </action>
    
	<events name="controlBar_classicAutotourEvents"
		onstartautotour="controlBar_classicupdateAutotourButtons();"
		onstopautotour="controlBar_classicupdateAutotourButtons();"
		keep="true"/>
	<action name="controlBar_classicHideAutotourButtons">
		set(layer[controlBar_classicbtn_autotour_off].visible, false);
		set(layer[controlBar_classicbtn_autotour_on].visible , false);
	</action>
	<action name="controlBar_classicShowAutotourButtons">
		if (tour_autotourenabled == false,
			set(layer[controlBar_classicbtn_autotour_off].visible, false);
			set(layer[controlBar_classicbtn_autotour_on].visible , true);
		,
			set(layer[controlBar_classicbtn_autotour_off].visible, true);
			set(layer[controlBar_classicbtn_autotour_on].visible , false);
		);
	</action>
	<action name="controlBar_classicupdateAutotourButtons">
		if (controlBar_classicIsOpened,
			controlBar_classicShowAutotourButtons();
		,
			controlBar_classicHideAutotourButtons();
		);
	</action>

	<events name="controlBar_classicplaystopsoundsevent" 
		playtoursoundsevent="controlBar_classicupdateSoundButtons();" 
		stoptoursoundsevent="controlBar_classicupdateSoundButtons();" 
		keep="true" />
	<action name="controlBar_classicHideSoundButtons">
		set(layer[controlBar_classicbtn_sound_off].visible, false);
		set(layer[controlBar_classicbtn_sound_on].visible , false);
	</action>
	<action name="controlBar_classicShowSoundButtons">
		if (tour_soundson == false,
			set(layer[controlBar_classicbtn_sound_off].visible, false);
			set(layer[controlBar_classicbtn_sound_on].visible , true);
		,
			set(layer[controlBar_classicbtn_sound_off].visible, true);
			set(layer[controlBar_classicbtn_sound_on].visible , false);
		);
	</action>
	<action name="controlBar_classicupdateSoundButtons">
		if (controlBar_classicIsOpened,
			controlBar_classicShowSoundButtons();
		,
			controlBar_classicHideSoundButtons();
		);
	</action>


	<events name="controlBar_classichotspotsdisplayevents"
		hotspots_visibility_changed="controlBar_classicupdateHideShowHotspotsButtons"
		keep="true"/>
	<action name="controlBar_classicHideHideShowHotspotsButtons">
		set(layer[controlBar_classicbtn_show_hotspots].visible, false);
		set(layer[controlBar_classicbtn_hide_hotspots].visible, false);
	</action>
	<action name="controlBar_classicShowHideShowHotspotsButtons">
		if (tour_displayspots,
			set(layer[controlBar_classicbtn_hide_hotspots].visible, true);
			set(layer[controlBar_classicbtn_show_hotspots].visible, false);
		,
			set(layer[controlBar_classicbtn_show_hotspots].visible, true);
			set(layer[controlBar_classicbtn_hide_hotspots].visible, false);
		);
	</action>
	<action name="controlBar_classicupdateHideShowHotspotsButtons">
		if (controlBar_classicIsOpened,
			controlBar_classicShowHideShowHotspotsButtons();
		,
			controlBar_classicHideHideShowHotspotsButtons();
		);
	</action>

    <action name="controlBar_classicbtn_home_action">
      hideTooltip();lookto(get(panoview.h),get(panoview.v),get(panoview.fov),smooth(100,20,50));
      if(scene[get(xml.scene)].video,
        plugin[get(videointerface_video)].seek(0);
        ifnot(plugin[get(videointerface_video)].ispaused,
          plugin[get(videointerface_video)].play();
        );
      );
    </action>

<layer name="controlBar_classicmenuTooltipStyle"
	keep="true"
	enabled="false"
	capture="false"
	type="text"
	align="center"
	bg="false"
	bgborder="0"
	txtshadow="1.0 1.0 4.0 0x000000 1"
	css="color:#e6e6e6;font-family:Helvetica;font-weight:bold;font-size:14px;text-align:left;"
	interactivecontent="false"
	zorder="0"
	visible="false"
	html=""
	padding="2"
	xoffset="0"
	yoffset="0"
	edge="bottom"
	/>



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

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

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


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


  <!-- Share Tour -->
  <action name="shareTour">events.dispatch(onsharetour);</action>

  <!-- Tour Information -->
  <action name="hideTourInfo">set(tour_displayinfo, false);events.dispatch(onhidetourinfo);</action>
  <action name="showTourInfo">set(tour_displayinfo, true); events.dispatch(onshowtourinfo);</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>

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

  <!-- Hide / Show Thumbnails -->
  <action name="hideTourThumbnails">set(tour_displaythumbnails, false);events.dispatch(hidetourthumbnails);</action>
  <action name="showTourThumbnails">set(tour_displaythumbnails, true); events.dispatch(showtourthumbnails);</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>

  <!-- Sounds Management -->

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

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

	<plugin name="ptpvrmode" devices="html5" keep="true"
		url="%FIRSTXML%/graphics/webvr.js"
		mobilevr_support="true"
		mobilevr_fake_support="true"
		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>