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

    
  <!-- Spot Style - Load panorama -->


  <style name="IconLoadpanorama"
         url="%FIRSTXML%/spots/hotspot_neutral_user_defaultpoint5.png"
         visible="false"
         edge="center"
         onhover="onhoverIconLoadpanorama"
         onover="onoverIconLoadpanorama"
         onout="onoutIconLoadpanorama"


         />
  <action name="onhoverIconLoadpanorama">
    showtooltip('hotspot');
  </action>
  <action name="onoverIconLoadpanorama">
tween(scale, 1.2);

pauseautorotation(forcehotspot);

  </action>
  <action name="onoutIconLoadpanorama">
    hideTooltip();
    tween(scale, 1);

resumeautorotation(forcehotspot);

  </action>



    
  <!-- Spot Style - Open a website -->


  <style name="IconOpenawebsite"
         url="%FIRSTXML%/spots/hotspot_information_sequence_user_defaultpoint4.png"
         visible="false"
         frame="0"
         lastframe="11"
         framewidth="54"
         frameheight="54"
         stopspotsequence="false"
         crop="0|0|54|54"
         edge="center"
         onloaded="startspotanimation(0.1);"
         onhover="onhoverIconOpenawebsite"
         onout="onoutIconOpenawebsite"


         />
  <action name="onhoverIconOpenawebsite">
    showtooltip('hotspot');
  </action>
  <action name="onoutIconOpenawebsite">
    hideTooltip();



  </action>



    
  <!-- Spot Style - Load panorama -->


  <style name="IconLoadpanorama"
         url="%FIRSTXML%/spots/hotspot_neutral_sequence_user_defaultpoint51.png"
         visible="false"
         frame="0"
         lastframe="17"
         framewidth="70"
         frameheight="70"
         stopspotsequence="false"
         crop="0|0|70|70"
         edge="center"
         onloaded="startspotanimation(0.1);"
         onhover="onhoverIconLoadpanorama"
         onout="onoutIconLoadpanorama"


         />
  <action name="onhoverIconLoadpanorama">
    showtooltip('hotspot');
  </action>
  <action name="onoutIconLoadpanorama">
    hideTooltip();



  </action>



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


  </action>
<!-- ********** -->
<!-- Menu contextuel -->
<!-- id : contextmenu -->
<!-- ********** -->
  <contextmenu fullscreen="false" versioninfo="false" touch="true">
    <item name="normal"        onclick="setViewNormal();
" separator="true"/>
    <item name="architectural" onclick="setViewArchitectural();
"/>
    <item name="littleplanet"  onclick="setViewLittlePlanet();
"/>
    <item name="fullscreenentry" onclick="enterFullscreen();
" separator="true"/>
  </contextmenu>

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

<!-- ********** -->
<!-- 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();" 


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



    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_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_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 (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);
    );


    inc(controlBar_classicbutton_pos, 20);

    set(controlBar_classicbackgroundwidthwhenopened, get(controlBar_classicbutton_pos));



    
    add(controlBar_classicVerifyVisibility, 20, 20);
    if(controlBar_classicbackgroundwidthwhenopened == controlBar_classicVerifyVisibility,
      set(controlBar_classicbackgroundwidthwhenopened, 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>



  <style name="controlBar_classic_btn_style"
         keep="true"
         alpha="0.8"
         edge="right" align="right"
         width="36" height="36"
         zorder="5"
         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="10"
         url="%FIRSTXML%/graphics/classiccontrolbar/footer.png"
         zorder="3"
         width="40"
         height="40"
         scale9grid="10|10|80|80"
         visible="false"
         />
  <layer name="controlBar_classicmenu_controlbar_bg"
         keep="true"
         align="bottom"
         x="0" y="10"
         type="container"
         zorder="4"
         width="40"
         height="40"
         visible="false"
         alpha="1.0"
         >



    <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_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_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_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_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_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_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();


    controlBar_classicupdateAutorotationButtons();


    controlBar_classicupdateHideShowThumbnailsButtons();
    set(layer[controlBar_classicbtn_up].visible  , false);
    set(layer[controlBar_classicbtn_down].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_classicupdateControlModeButtons();


    controlBar_classicupdateHelpButtons();


    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();


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


  </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);
    );


    controlBar_classicupdateControlModeButtons();


    controlBar_classicupdateHelpButtons();


    controlBar_classicupdateFullscreenButtons();


    controlBar_classicupdateAutorotationButtons();


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




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



<!-- ********** -->
<!-- Barre de miniatures Classique -->
<!-- id : thumbnailsBar-theme02 -->
<!-- ********** -->






<layer name="thumbnailsBar_thumbnailsBar_theme02" 
	keep="true" 
	type="image" 
	visible="false"
	align="top" 
	
		width="90%" 
		height="0" 
		
	
	x="0"
	y="10"
	
	url="%FIRSTXML%/graphics/classicthumbnailsbar/frame_bg.png" 
	scale9grid="10|10|80|80"
	
	zorder="6"
/>


<layer name="thumbnailBorderSource_thumbnailsBar_theme02"
	keep="true"
	visible="false"
	onloaded="loadedImages_thumbnailsBar_theme02(border);"
	url="%FIRSTXML%/graphics/classicthumbnailsbar/thumbnails_states.png" 
	offsetX="10"
	offsetY="10"
	quarterHeight="0"
/>


	
	<krpano arrow1Loaded_thumbnailsBar_theme02="false" arrow2Loaded_thumbnailsBar_theme02="false" borderLoaded_thumbnailsBar_theme02="false" thumbnailsLoadedCounter_thumbnailsBar_theme02="0" thumbsCount_thumbnailsBar_theme02="0" thumbsCounter_thumbnailsBar_theme02="0" firstInit_thumbnailsBar_theme02="false" />
	
	
	<events name="thumbnailsScrollEvents_thumbnailsBar_theme02" 
		keep="true" 
		
		onxmlcomplete="ifnot(startResize_thumbnailsBar_theme02,set(isLoaded_thumbnailsBar_theme02, true);if(isStarted_thumbnailsBar_theme02,onLoadCompleteHandler_thumbnailsBar_theme02();););"
		onTourStart="set(isStarted_thumbnailsBar_theme02, true);if(isLoaded_thumbnailsBar_theme02,onLoadCompleteHandler_thumbnailsBar_theme02(););"
		onnewpano="if(startResize_thumbnailsBar_theme02,if(firstInit_thumbnailsBar_theme02,onLoadCompleteHandler_thumbnailsBar_theme02();););"
		onresize="onResizeHandler_thumbnailsBar_theme02();"
		hidetourthumbnails="hideWithThumbnailsButton_thumbnailsBar_theme02();" 
		showtourthumbnails="showWithThumbnailsButton_thumbnailsBar_theme02();" 
		hidetourcontrols="hideWithControlsBar_thumbnailsBar_theme02();" 
		showtourcontrols="showWithControlsBar_thumbnailsBar_theme02();" 
		onenterfullscreen="delayedcall(0.2,scrollToCurrentThumb_thumbnailsBar_theme02(););"
		onexitfullscreen="delayedcall(0.2,scrollToCurrentThumb_thumbnailsBar_theme02(););"	
	/>
	
	
	<layer name="scrollAreaContainer_thumbnailsBar_theme02" 
         keep="true"
         type="container" 
         align="topleft" x="5" y="5"
         marginX="5"
         marginY="5"
         width="0" height="0"
         targetWidth="0"
         targetHeight="0"
         scrollSpeedInit="10"
         scrollSpeed="10"
         scrollSpeedMax="70"
         scrollSpeedAcceleration="20"
         parent="thumbnailsBar_thumbnailsBar_theme02"
         thumbWidth="0"
         thumbHeight="0"
         itemWidth="100"
         itemHeight="50"
         offsetX="0" offsetY="0"
         thumbSpacer="0"
         currentThumbsCount="0"
         adjustToContent="true"
         zorder="1"
         visible="false"
         ready="false">
	
		
    <layer name="thumbsScrollArea_thumbnailsBar_theme02"
           url.html5="%FIRSTXML%/graphics/scrollarea.js"
           align="top" x="0" y="0"
           onhover_autoscrolling="false"
           direction="h"/>
	
	</layer>
	
	
	<layer name="scrollPrevArrow_thumbnailsBar_theme02" 
         keep="true"
         type="image"
         visible="false"
         parent="thumbnailsBar_thumbnailsBar_theme02"
         targetHeight="0"
         targetWidth="0"
         zorder="2"
         onloaded="loadedImages_thumbnailsBar_theme02(arrow1);"
         url="%FIRSTXML%/graphics/classicthumbnailsbar/btn_scroll_left.png"
         align="left"
	/>
	
	
	<layer name="scrollNextArrow_thumbnailsBar_theme02" 
         keep="true"
         type="image"
         visible="false"
         parent="thumbnailsBar_thumbnailsBar_theme02"
         targetHeight="0"
         targetWidth="0"
         zorder="2"
         onloaded="loadedImages_thumbnailsBar_theme02(arrow2);"
         url="%FIRSTXML%/graphics/classicthumbnailsbar/btn_scroll_right.png"
         align="right"
	/>
	
	<action name="loadedImages_thumbnailsBar_theme02">
		if(%1 == "arrow1",
			set(arrow1Loaded_thumbnailsBar_theme02, true);
		);
		if(%1 == "arrow2",
			set(arrow2Loaded_thumbnailsBar_theme02, true);
		);
		if(%1 == "border",
			if(layer[thumbnailBorderSource_thumbnailsBar_theme02].url,
				set(borderLoaded_thumbnailsBar_theme02, true);
			);
		);
		if(%1 == "thumbnail",
			inc(thumbnailsLoadedCounter_thumbnailsBar_theme02);
		);
	</action>
	
	<action name="onLoadCompleteHandler_thumbnailsBar_theme02">
		
		set(thumbsCount_thumbnailsBar_theme02, 0);
		
		
		set(thumbsCount_thumbnailsBar_theme02, get(scene.count));
		
		
		
		
		
		
		
		loadThumbs_thumbnailsBar_theme02();
		
		if(firstInit_thumbnailsBar_theme02,
			onLoadCompleteHandlerPartThree_thumbnailsBar_theme02();
		,
			onLoadCompleteHandlerPartTwo_thumbnailsBar_theme02();
		);
	</action>
	
	<action name="onLoadCompleteHandlerPartTwo_thumbnailsBar_theme02">
		set(imgCounter_thumbnailsBar_theme02, 3);
		
		if(arrow1Loaded_thumbnailsBar_theme02,
			dec(imgCounter_thumbnailsBar_theme02);
		);
		if(arrow2Loaded_thumbnailsBar_theme02,
			dec(imgCounter_thumbnailsBar_theme02);
		);
		if(thumbsCount_thumbnailsBar_theme02 == thumbnailsLoadedCounter_thumbnailsBar_theme02,
			dec(imgCounter_thumbnailsBar_theme02);
		);
		
		if(imgCounter_thumbnailsBar_theme02 LE 0,
			stopdelayedcall(delayedCallOnLoadComplete_thumbnailsBar_theme02);
			onLoadCompleteHandlerPartThree_thumbnailsBar_theme02();
		,
			delayedcall(delayedCallOnLoadComplete_thumbnailsBar_theme02, 0.2, onLoadCompleteHandlerPartTwo_thumbnailsBar_theme02());
		);
	</action>
	
	<action name="onLoadCompleteHandlerPartThree_thumbnailsBar_theme02">
		resetMouseBehavior_thumbnailsBar_theme02();
		highlightCurrentThumb_thumbnailsBar_theme02();
		
		
		if(layer[scrollAreaContainer_thumbnailsBar_theme02].adjustToContent,
			mul(adjustWidth_thumbnailsBar_theme02, get(layer[scrollAreaContainer_thumbnailsBar_theme02].marginX), 2);
			add(adjustWidth_thumbnailsBar_theme02, get(layer[thumbsScrollArea_thumbnailsBar_theme02].width));
			mul(adjustHeight_thumbnailsBar_theme02, get(layer[scrollAreaContainer_thumbnailsBar_theme02].marginY), 2);
			add(adjustHeight_thumbnailsBar_theme02, get(layer[thumbsScrollArea_thumbnailsBar_theme02].height));
			
			
			if(adjustWidth_thumbnailsBar_theme02 GT stagewidth,
				set(adjustWidth_thumbnailsBar_theme02, get(stagewidth));
				set(layer[scrollAreaContainer_thumbnailsBar_theme02].adjustToContent, false);
			,
				if(adjustHeight_thumbnailsBar_theme02 GT stageheight,
					set(adjustHeight_thumbnailsBar_theme02, get(stageheight));
					set(layer[scrollAreaContainer_thumbnailsBar_theme02].adjustToContent, false);
				);
			);
			
			setSize_thumbnailsBar_theme02(get(adjustWidth_thumbnailsBar_theme02), get(adjustHeight_thumbnailsBar_theme02));
		);
		
		setupArrows_thumbnailsBar_theme02(true);
		
		
		if (thumbsCounter_thumbnailsBar_theme02 LE 0,
			set(layer[thumbnailsBar_thumbnailsBar_theme02].visible, false);
		);
		
		
		set(startResize_thumbnailsBar_theme02, true);
		set(firstInit_thumbnailsBar_theme02, true);
	</action>
	
	
	<action name="onResizeHandler_thumbnailsBar_theme02">
		
		delayedcall(0.1, onResizeCallback_thumbnailsBar_theme02(false); );
	</action>
	
	
	<action name="onResizeCallback_thumbnailsBar_theme02">
		if(startResize_thumbnailsBar_theme02,
			setSize_thumbnailsBar_theme02(get(layer[scrollAreaContainer_thumbnailsBar_theme02].targetWidth), get(layer[scrollAreaContainer_thumbnailsBar_theme02].targetHeight));
			setupArrows_thumbnailsBar_theme02(%1);
			
			
			if (thumbsCounter_thumbnailsBar_theme02 LE 0,
				set(layer[thumbnailsBar_thumbnailsBar_theme02].visible, false);
			);
		);
	</action>
	
	
		<action name="showWithThumbnailsButton_thumbnailsBar_theme02">
			set(layer[thumbnailsBar_thumbnailsBar_theme02].visible, true);
			onResizeCallback_thumbnailsBar_theme02(true);
		</action>
		
		<action name="hideWithThumbnailsButton_thumbnailsBar_theme02">
			set(layer[thumbnailsBar_thumbnailsBar_theme02].visible, false);
		</action>
	
	
		<action name="showWithControlsBar_thumbnailsBar_theme02">
			
				if (tour_displaythumbnails,
					set(layer[thumbnailsBar_thumbnailsBar_theme02].visible, true);
					onResizeCallback_thumbnailsBar_theme02(true);
				,
					set(layer[thumbnailsBar_thumbnailsBar_theme02].visible, false);
				);
		</action>
		
		<action name="hideWithControlsBar_thumbnailsBar_theme02">
			set(layer[thumbnailsBar_thumbnailsBar_theme02].visible, false);
		</action>
	
	
	<action name="thumbnailBorderDrawInit_thumbnailsBar_theme02">
		
		set(layer[scrollAreaContainer_thumbnailsBar_theme02].offsetX, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].borderWidth));
		set(layer[scrollAreaContainer_thumbnailsBar_theme02].offsetY, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].borderWidth));
		
		
		mul(totalOffsetX_thumbnailsBar_theme02, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].borderWidth), 2);
		mul(totalOffsetY_thumbnailsBar_theme02, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].borderWidth), 2);
		
		
		if(startResize_thumbnailsBar_theme02,
			sub(layer[scrollAreaContainer_thumbnailsBar_theme02].itemWidth, get(totalOffsetX_thumbnailsBar_theme02));
			sub(layer[scrollAreaContainer_thumbnailsBar_theme02].itemHeight, get(totalOffsetY_thumbnailsBar_theme02));
		);
		
		
		set(layer[scrollAreaContainer_thumbnailsBar_theme02].thumbWidth, get(layer[scrollAreaContainer_thumbnailsBar_theme02].itemWidth));
		set(layer[scrollAreaContainer_thumbnailsBar_theme02].thumbHeight, get(layer[scrollAreaContainer_thumbnailsBar_theme02].itemHeight));
		
		add(layer[scrollAreaContainer_thumbnailsBar_theme02].itemWidth, get(totalOffsetX_thumbnailsBar_theme02));
		add(layer[scrollAreaContainer_thumbnailsBar_theme02].itemHeight, get(totalOffsetY_thumbnailsBar_theme02));
	</action>
		
	
	<action name="thumbnailBorderImageInit_thumbnailsBar_theme02">
		
		set(layer[scrollAreaContainer_thumbnailsBar_theme02].offsetX, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].offsetX));
		set(layer[scrollAreaContainer_thumbnailsBar_theme02].offsetY, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].offsetY));
		
		
		mul(totalOffsetX_thumbnailsBar_theme02, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].offsetX), 2);
		mul(totalOffsetY_thumbnailsBar_theme02, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].offsetY), 2);
		
		
		if(startResize_thumbnailsBar_theme02,
			sub(layer[scrollAreaContainer_thumbnailsBar_theme02].itemWidth, get(totalOffsetX_thumbnailsBar_theme02));
			sub(layer[scrollAreaContainer_thumbnailsBar_theme02].itemHeight, get(totalOffsetY_thumbnailsBar_theme02));
		);
		
		
		set(layer[scrollAreaContainer_thumbnailsBar_theme02].thumbWidth, get(layer[scrollAreaContainer_thumbnailsBar_theme02].itemWidth));
		set(layer[scrollAreaContainer_thumbnailsBar_theme02].thumbHeight, get(layer[scrollAreaContainer_thumbnailsBar_theme02].itemHeight));
		
		add(layer[scrollAreaContainer_thumbnailsBar_theme02].itemWidth, get(totalOffsetX_thumbnailsBar_theme02));
		add(layer[scrollAreaContainer_thumbnailsBar_theme02].itemHeight, get(totalOffsetY_thumbnailsBar_theme02));
		
		
		div(layer[thumbnailBorderSource_thumbnailsBar_theme02].quarterHeight, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].height), 4);
		
		
		set(cropX_thumbnailsBar_theme02, 0);
		set(cropY_thumbnailsBar_theme02, 0);
		set(cropW_thumbnailsBar_theme02, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].width));
		set(cropH_thumbnailsBar_theme02, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].quarterHeight));
		txtadd(layer[thumbnailBorderSource_thumbnailsBar_theme02].cropDefault, get(cropX_thumbnailsBar_theme02), '|', get(cropY_thumbnailsBar_theme02), '|', get(cropW_thumbnailsBar_theme02), '|', get(cropH_thumbnailsBar_theme02));

		
		add(cropY_thumbnailsBar_theme02, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].quarterHeight));
		txtadd(layer[thumbnailBorderSource_thumbnailsBar_theme02].cropHover, get(cropX_thumbnailsBar_theme02), '|', get(cropY_thumbnailsBar_theme02), '|', get(cropW_thumbnailsBar_theme02), '|', get(cropH_thumbnailsBar_theme02));
		
		
		add(cropY_thumbnailsBar_theme02, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].quarterHeight));
		txtadd(layer[thumbnailBorderSource_thumbnailsBar_theme02].cropSelected, get(cropX_thumbnailsBar_theme02), '|', get(cropY_thumbnailsBar_theme02), '|', get(cropW_thumbnailsBar_theme02), '|', get(cropH_thumbnailsBar_theme02));
		
		
		add(cropY_thumbnailsBar_theme02, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].quarterHeight));
		txtadd(layer[thumbnailBorderSource_thumbnailsBar_theme02].cropVisited, get(cropX_thumbnailsBar_theme02), '|', get(cropY_thumbnailsBar_theme02), '|', get(cropW_thumbnailsBar_theme02), '|', get(cropH_thumbnailsBar_theme02));
		
		
		set(scaleX_thumbnailsBar_theme02, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].offsetX));
		set(scaleY_thumbnailsBar_theme02, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].offsetY));
		sub(scaleW_thumbnailsBar_theme02, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].width), get(totalOffsetX_thumbnailsBar_theme02));
		sub(scaleH_thumbnailsBar_theme02, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].quarterHeight), get(totalOffsetY_thumbnailsBar_theme02));
		txtadd(layer[thumbnailBorderSource_thumbnailsBar_theme02].scale9grid, get(scaleX_thumbnailsBar_theme02), '|', get(scaleY_thumbnailsBar_theme02), '|', get(scaleW_thumbnailsBar_theme02), '|', get(scaleH_thumbnailsBar_theme02));
	</action>
	
	
	<action name="loadThumbs_thumbnailsBar_theme02">
		if(layer[thumbnailBorderSource_thumbnailsBar_theme02].url,
			set(imgCounter_thumbnailsBar_theme02, 1);
		,
			set(imgCounter_thumbnailsBar_theme02, 0);
		);
		
		if(layer[thumbnailBorderSource_thumbnailsBar_theme02].url,
			if(borderLoaded_thumbnailsBar_theme02,
				dec(imgCounter_thumbnailsBar_theme02);
			);
		);
		
		if(imgCounter_thumbnailsBar_theme02 LE 0,
			stopdelayedcall(delayedCallOnLoadCompleteBorder_thumbnailsBar_theme02);
			loadThumbsPartTwo_thumbnailsBar_theme02();
		,
			delayedcall(delayedCallOnLoadCompleteBorder_thumbnailsBar_theme02, 0.2, loadThumbs_thumbnailsBar_theme02());
		);
	</action>
	
	<action name="loadThumbsPartTwo_thumbnailsBar_theme02">
		ifnot(layer[scrollAreaContainer_thumbnailsBar_theme02].ready,
			
			
			if(layer[thumbnailBorderSource_thumbnailsBar_theme02].url,
				thumbnailBorderImageInit_thumbnailsBar_theme02();
			,
				thumbnailBorderDrawInit_thumbnailsBar_theme02();
			);
			
			
			set(thumbsCounter_thumbnailsBar_theme02, 0);
			
			
				for( set(i_thumbnailsBar_theme02, 0), i_thumbnailsBar_theme02 LT scene.count, inc(i_thumbnailsBar_theme02),
					createThumb_thumbnailsBar_theme02(get(scene[get(i_thumbnailsBar_theme02)].name), get(scene[get(i_thumbnailsBar_theme02)].thumburl), get(i_thumbnailsBar_theme02), get(scene[get(i_thumbnailsBar_theme02)].titleid));
					inc(thumbsCounter_thumbnailsBar_theme02);
				);
			
			
			
			
			
			
			set(layer[scrollAreaContainer_thumbnailsBar_theme02].currentThumbsCount, get(thumbsCounter_thumbnailsBar_theme02));
			
			
			setSize_thumbnailsBar_theme02(get(layer[get(layer[scrollAreaContainer_thumbnailsBar_theme02].parent)].width), get(layer[get(layer[scrollAreaContainer_thumbnailsBar_theme02].parent)].height));
			
			
			set(layer[scrollAreaContainer_thumbnailsBar_theme02].visible, true);
			
			
				if (tour_displaycontrols,
					showWithControlsBar_thumbnailsBar_theme02();
				,
					hideWithControlsBar_thumbnailsBar_theme02();
				);
			
			
			set(layer[scrollAreaContainer_thumbnailsBar_theme02].ready, true);
		);
	</action>
	
	
	<action name="setSize_thumbnailsBar_theme02">
		
		
		set(layer[scrollAreaContainer_thumbnailsBar_theme02].targetWidth, %1);
		set(layer[scrollAreaContainer_thumbnailsBar_theme02].targetHeight, %2);
		
		
		set(layer[get(layer[scrollAreaContainer_thumbnailsBar_theme02].parent)].width, %1);
		set(layer[get(layer[scrollAreaContainer_thumbnailsBar_theme02].parent)].height, %2);
		layer[get(layer[scrollAreaContainer_thumbnailsBar_theme02].parent)].updatepos();
		
		
		mul(totalMarginX_thumbnailsBar_theme02, get(layer[scrollAreaContainer_thumbnailsBar_theme02].marginX), 2);
		mul(totalMarginY_thumbnailsBar_theme02, get(layer[scrollAreaContainer_thumbnailsBar_theme02].marginY), 2);
		
			add(totalPluginHeight_thumbnailsBar_theme02, get(totalMarginY_thumbnailsBar_theme02), get(layer[scrollAreaContainer_thumbnailsBar_theme02].itemHeight));
			
			
			
			if(layer[get(layer[scrollAreaContainer_thumbnailsBar_theme02].parent)].pixelheight LT totalPluginHeight_thumbnailsBar_theme02,
				set(layer[get(layer[scrollAreaContainer_thumbnailsBar_theme02].parent)].height, get(totalPluginHeight_thumbnailsBar_theme02));
			);
		
		layer[get(layer[scrollAreaContainer_thumbnailsBar_theme02].parent)].updatepos();
		
		
		sub(containerWidth_thumbnailsBar_theme02, get(layer[get(layer[scrollAreaContainer_thumbnailsBar_theme02].parent)].pixelwidth), get(totalMarginX_thumbnailsBar_theme02));
		sub(containerHeight_thumbnailsBar_theme02, get(layer[get(layer[scrollAreaContainer_thumbnailsBar_theme02].parent)].pixelheight), get(totalMarginY_thumbnailsBar_theme02));

		
		set(layer[scrollAreaContainer_thumbnailsBar_theme02].width, get(containerWidth_thumbnailsBar_theme02));
		set(layer[scrollAreaContainer_thumbnailsBar_theme02].height, get(containerHeight_thumbnailsBar_theme02));
		
		set(scrollAreaSize_thumbnailsBar_theme02, 0);
		
		
		mul(totalThumbsSpacer_thumbnailsBar_theme02, get(layer[scrollAreaContainer_thumbnailsBar_theme02].currentThumbsCount), get(layer[scrollAreaContainer_thumbnailsBar_theme02].thumbSpacer));
		sub(totalThumbsSpacer_thumbnailsBar_theme02, get(layer[scrollAreaContainer_thumbnailsBar_theme02].thumbSpacer));
		
		set(layer[get(layer[scrollAreaContainer_thumbnailsBar_theme02].parent)].visible, true);
		

			mul(scrollAreaSize_thumbnailsBar_theme02, get(layer[scrollAreaContainer_thumbnailsBar_theme02].itemWidth), get(layer[scrollAreaContainer_thumbnailsBar_theme02].currentThumbsCount));
			add(scrollAreaSize_thumbnailsBar_theme02, get(totalThumbsSpacer_thumbnailsBar_theme02));
			
			set(layer[thumbsScrollArea_thumbnailsBar_theme02].width, get(scrollAreaSize_thumbnailsBar_theme02));
			set(layer[thumbsScrollArea_thumbnailsBar_theme02].height, get(layer[scrollAreaContainer_thumbnailsBar_theme02].itemHeight));
			
			
			if(layer[scrollAreaContainer_thumbnailsBar_theme02].width LT layer[scrollAreaContainer_thumbnailsBar_theme02].itemWidth,
				set(layer[get(layer[scrollAreaContainer_thumbnailsBar_theme02].parent)].visible, false);
			,
				verifyThumbnailsBarVisibility_thumbnailsBar_theme02();
			);
			
		
		
		if(layer[get(layer[scrollAreaContainer_thumbnailsBar_theme02].parent)].width LT 0,
			set(layer[get(layer[scrollAreaContainer_thumbnailsBar_theme02].parent)].visible, false);
		);
		
	</action>
	
	
	<action name="verifyThumbnailsBarVisibility_thumbnailsBar_theme02">
		if(layer[get(layer[scrollAreaContainer_thumbnailsBar_theme02].parent)].visible,
			set(boolValue_thumbnailsBar_theme02, false);
			
			if (tour_displaythumbnails,
				if (tour_displaycontrols,
					set(boolValue_thumbnailsBar_theme02, true);
				);
			);
			
			set(layer[get(layer[scrollAreaContainer_thumbnailsBar_theme02].parent)].visible, get(boolValue_thumbnailsBar_theme02));
		);
	</action>
	
	
	<action name="createThumb_thumbnailsBar_theme02">

			add(offsetFactor_thumbnailsBar_theme02, get(layer[scrollAreaContainer_thumbnailsBar_theme02].itemWidth), get(layer[scrollAreaContainer_thumbnailsBar_theme02].thumbSpacer));
	
			mul(thumbIncPos_thumbnailsBar_theme02, %3, get(offsetFactor_thumbnailsBar_theme02));
			
			
			if(layer[thumbnailBorderSource_thumbnailsBar_theme02].url,
				add(thumbIncPos_thumbnailsBar_theme02, get(layer[scrollAreaContainer_thumbnailsBar_theme02].offsetX));
			);
			
		
		mul(negativeOffsetX_thumbnailsBar_theme02, get(layer[scrollAreaContainer_thumbnailsBar_theme02].offsetX), -1);
		mul(negativeOffsetY_thumbnailsBar_theme02, get(layer[scrollAreaContainer_thumbnailsBar_theme02].offsetY), -1);
		
		set(thumbName, 'thumb_');
		txtadd(thumbName, %1);
		txtadd(thumbName, '_thumbnailsBar_theme02');
		addlayer(get(thumbName));

		

		set(thumbBorderName, 'thumbBorder_');
		txtadd(thumbBorderName, %1);
		txtadd(thumbBorderName, '_thumbnailsBar_theme02');
		addlayer(get(thumbBorderName));
		
		
		ifnot(layer[thumbnailBorderSource_thumbnailsBar_theme02].url,
			set(layer[get(thumbBorderName)].type, container);
			set(layer[get(thumbBorderName)].parent, thumbsScrollArea_thumbnailsBar_theme02);
		);

		
		set(layer[get(thumbName)].onloaded, loadedImages_thumbnailsBar_theme02("thumbnail"););
		set(layer[get(thumbName)].url, %2);
		set(layer[get(thumbName)].keep, true);
		set(layer[get(thumbName)].width, get(layer[scrollAreaContainer_thumbnailsBar_theme02].thumbWidth));
		set(layer[get(thumbName)].height, get(layer[scrollAreaContainer_thumbnailsBar_theme02].thumbHeight));
		set(layer[get(thumbName)].align, topleft);
		
		
			set(layer[get(thumbName)].y, get(layer[scrollAreaContainer_thumbnailsBar_theme02].offsetY));
		
			if(layer[thumbnailBorderSource_thumbnailsBar_theme02].url,
				set(layer[get(thumbName)].parent, thumbsScrollArea_thumbnailsBar_theme02);
				set(layer[get(thumbName)].x, get(thumbIncPos_thumbnailsBar_theme02));
			,
				set(layer[get(thumbName)].parent, get(thumbBorderName));
				set(layer[get(thumbName)].x, get(layer[scrollAreaContainer_thumbnailsBar_theme02].offsetX));
				set(layer[get(thumbName)].onclick, resetMouseBehavior_thumbnailsBar_theme02(); mainloadscene(%1); delayedcall(0.1,highlightThumb_thumbnailsBar_theme02(%1)));
			);	
			
		
		
		set(layer[get(thumbBorderName)].keep, true);
		set(layer[get(thumbBorderName)].width, get(layer[scrollAreaContainer_thumbnailsBar_theme02].itemWidth));
		set(layer[get(thumbBorderName)].height, get(layer[scrollAreaContainer_thumbnailsBar_theme02].itemHeight));
		set(layer[get(thumbBorderName)].align, topleft);
		
		if(layer[thumbnailBorderSource_thumbnailsBar_theme02].url,
			set(layer[get(thumbBorderName)].url, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].url));
			set(layer[get(thumbBorderName)].scale9grid, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].scale9grid));
			set(layer[get(thumbBorderName)].parent, get(thumbName));
			set(layer[get(thumbBorderName)].x, get(negativeOffsetX_thumbnailsBar_theme02));
			set(layer[get(thumbBorderName)].y, get(negativeOffsetY_thumbnailsBar_theme02));
			set(layer[get(thumbBorderName)].onclick, resetMouseBehavior_thumbnailsBar_theme02(); mainloadscene(%1); delayedcall(0.1,highlightThumb_thumbnailsBar_theme02(%1)));
		,
			
				set(layer[get(thumbBorderName)].x, get(thumbIncPos_thumbnailsBar_theme02)); 
				
		);


		
		setupMouseBehavior_thumbnailsBar_theme02(%1, %4);
		
	</action>
	
	
	
	<action name="removeThumb_thumbnailsBar_theme02">
		set(thumbName, 'thumb_');
		txtadd(thumbName, %1);
		txtadd(thumbName, '_thumbnailsBar_theme02');
		removelayer(get(thumbName));
		
		set(thumbBorderName, 'thumbBorder_');
		txtadd(thumbBorderName, %1);
		txtadd(thumbBorderName, '_thumbnailsBar_theme02');
		removelayer(get(thumbBorderName));


	</action>
	
	
	
	<action name="setupArrows_thumbnailsBar_theme02">
		
		if(layer[scrollAreaContainer_thumbnailsBar_theme02].adjustToContent,
			hideArrows_thumbnailsBar_theme02();
		,
			ifnot(device.touchdevice,
				
					if(layer[scrollAreaContainer_thumbnailsBar_theme02].width LT layer[thumbsScrollArea_thumbnailsBar_theme02].width,
				
					showArrows_thumbnailsBar_theme02();
				,
					hideArrows_thumbnailsBar_theme02();
				);
			,
				hideArrows_thumbnailsBar_theme02();
			);
		);
		
		
		if(%1,
			scrollToCurrentThumb_thumbnailsBar_theme02();
		);
		
		
			
			if(layer[scrollAreaContainer_thumbnailsBar_theme02].width LT layer[scrollAreaContainer_thumbnailsBar_theme02].itemWidth,
				set(layer[get(layer[scrollAreaContainer_thumbnailsBar_theme02].parent)].visible, false);
			);
	</action>
	
	
	<action name="showArrows_thumbnailsBar_theme02">
		
		
		
		
		set(layer[scrollPrevArrow_thumbnailsBar_theme02].visible, true);
		set(layer[scrollNextArrow_thumbnailsBar_theme02].visible, true);
		
		
		
			
			add(totalArrowSize_thumbnailsBar_theme02, get(layer[scrollPrevArrow_thumbnailsBar_theme02].width), get(layer[scrollNextArrow_thumbnailsBar_theme02].width));
		
			
			sub(scrollAreaContainerSize_thumbnailsBar_theme02, get(layer[get(layer[scrollAreaContainer_thumbnailsBar_theme02].parent)].pixelwidth), get(totalArrowSize_thumbnailsBar_theme02));
		
			set(layer[scrollAreaContainer_thumbnailsBar_theme02].width, get(scrollAreaContainerSize_thumbnailsBar_theme02));
			
			set(layer[scrollAreaContainer_thumbnailsBar_theme02].x, get(layer[scrollPrevArrow_thumbnailsBar_theme02].width));
			
		
		
		set(layer[scrollPrevArrow_thumbnailsBar_theme02].onhover, scrollPrev_thumbnailsBar_theme02(););
		set(layer[scrollNextArrow_thumbnailsBar_theme02].onhover, scrollNext_thumbnailsBar_theme02(););
		
		set(layer[scrollPrevArrow_thumbnailsBar_theme02].onclick, scrollPrev_thumbnailsBar_theme02(get(layer[scrollAreaContainer_thumbnailsBar_theme02].scrollSpeedAcceleration)););
		set(layer[scrollNextArrow_thumbnailsBar_theme02].onclick, scrollNext_thumbnailsBar_theme02(get(layer[scrollAreaContainer_thumbnailsBar_theme02].scrollSpeedAcceleration)););
		
		
		
		
		
		set(layer[scrollPrevArrow_thumbnailsBar_theme02].onout, set(layer[scrollAreaContainer_thumbnailsBar_theme02].scrollSpeed, get(layer[scrollAreaContainer_thumbnailsBar_theme02].scrollSpeedInit)););
		set(layer[scrollNextArrow_thumbnailsBar_theme02].onout, set(layer[scrollAreaContainer_thumbnailsBar_theme02].scrollSpeed, get(layer[scrollAreaContainer_thumbnailsBar_theme02].scrollSpeedInit)););
		
	</action>
	
	
	
	
	<action name="hideArrows_thumbnailsBar_theme02">
		
		set(layer[scrollPrevArrow_thumbnailsBar_theme02].visible, false);
		set(layer[scrollNextArrow_thumbnailsBar_theme02].visible, false);
		
		

			mul(totalMargin_thumbnailsBar_theme02, get(layer[scrollAreaContainer_thumbnailsBar_theme02].marginX), 2);
			
			sub(scrollAreaContainerSize_thumbnailsBar_theme02, get(layer[get(layer[scrollAreaContainer_thumbnailsBar_theme02].parent)].pixelwidth), get(totalMargin_thumbnailsBar_theme02));

			set(layer[scrollAreaContainer_thumbnailsBar_theme02].width, get(scrollAreaContainerSize_thumbnailsBar_theme02));
			set(layer[scrollAreaContainer_thumbnailsBar_theme02].x, get(layer[scrollAreaContainer_thumbnailsBar_theme02].marginX));
			 
			
	</action>
	
	
	<action name="scrollPrev_thumbnailsBar_theme02">
		
		
		if(%1,
			inc(layer[scrollAreaContainer_thumbnailsBar_theme02].scrollSpeed, %1);
		);
		
		layer[thumbsScrollArea_thumbnailsBar_theme02].stopscrolling();
		
		set(scrollLimit_thumbnailsBar_theme02, 0);
		
		
			
				sub(scrollLimit_thumbnailsBar_theme02, get(layer[thumbsScrollArea_thumbnailsBar_theme02].width), get(layer[scrollAreaContainer_thumbnailsBar_theme02].width));
				div(scrollLimit_thumbnailsBar_theme02, 2);
			
			add(layer[thumbsScrollArea_thumbnailsBar_theme02].x, get(layer[scrollAreaContainer_thumbnailsBar_theme02].scrollSpeed));
			if(layer[thumbsScrollArea_thumbnailsBar_theme02].x GE scrollLimit_thumbnailsBar_theme02,
				set(layer[thumbsScrollArea_thumbnailsBar_theme02].x, get(scrollLimit_thumbnailsBar_theme02));
			);
		
		if(layer[scrollAreaContainer_thumbnailsBar_theme02].scrollSpeed LT layer[scrollAreaContainer_thumbnailsBar_theme02].scrollSpeedMax,
			inc(layer[scrollAreaContainer_thumbnailsBar_theme02].scrollSpeed);
		);
		
	</action>
	
	
	<action name="scrollNext_thumbnailsBar_theme02">
		
		
		if(%1,
			inc(layer[scrollAreaContainer_thumbnailsBar_theme02].scrollSpeed, %1);
		);
		
		layer[thumbsScrollArea_thumbnailsBar_theme02].stopscrolling();
		
			
			sub(scrollLimit_thumbnailsBar_theme02, get(layer[thumbsScrollArea_thumbnailsBar_theme02].width), get(layer[scrollAreaContainer_thumbnailsBar_theme02].width));
			
				div(scrollLimit_thumbnailsBar_theme02, 2);
			mul(scrollLimit_thumbnailsBar_theme02, -1);
			
			sub(layer[thumbsScrollArea_thumbnailsBar_theme02].x, get(layer[scrollAreaContainer_thumbnailsBar_theme02].scrollSpeed));
			if(layer[thumbsScrollArea_thumbnailsBar_theme02].x LE scrollLimit_thumbnailsBar_theme02,
				set(layer[thumbsScrollArea_thumbnailsBar_theme02].x, get(scrollLimit_thumbnailsBar_theme02));
			);
		
		if(layer[scrollAreaContainer_thumbnailsBar_theme02].scrollSpeed LT layer[scrollAreaContainer_thumbnailsBar_theme02].scrollSpeedMax,
			inc(layer[scrollAreaContainer_thumbnailsBar_theme02].scrollSpeed);
		);
		
	</action>
	
	
	<action name="resetMouseBehavior_thumbnailsBar_theme02">
	
		
		
			for( set(j_thumbnailsBar_theme02, 0), j_thumbnailsBar_theme02 LT scene.count, inc(j_thumbnailsBar_theme02),
				set(thumbBorderName, 'thumbBorder_');
				txtadd(thumbBorderName, get(scene[get(j_thumbnailsBar_theme02)].name));
				txtadd(thumbBorderName, '_thumbnailsBar_theme02');
				
				setupMouseBehavior_thumbnailsBar_theme02(get(scene[get(j_thumbnailsBar_theme02)].name), get(scene[get(j_thumbnailsBar_theme02)].titleid));
			);
		
	</action>
	
	
	<action name="setupMouseBehavior_thumbnailsBar_theme02">

		set(thumbName, 'thumb_');
		txtadd(thumbName, %1);
		txtadd(thumbName, '_thumbnailsBar_theme02');
		
		set(thumbBorderName, 'thumbBorder_');
		txtadd(thumbBorderName, %1);
		txtadd(thumbBorderName, '_thumbnailsBar_theme02');
		
		if(layer[thumbnailBorderSource_thumbnailsBar_theme02].url,
			set(layer[get(thumbBorderName)].crop, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].cropDefault));
			set(layer[get(thumbBorderName)].onovercrop, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].cropHover));
			set(layer[get(thumbBorderName)].ondowncrop, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].cropHover));
			set(layer[get(thumbBorderName)].tooltip, %2);
				set(layer[get(thumbBorderName)].onhover, showTooltip('plugin'));
				set(layer[get(thumbBorderName)].onout, hideTooltip());
		,
			set(layer[get(thumbBorderName)].bgcolor, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].borderColorDefault));
			set(layer[get(thumbBorderName)].bgalpha, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].borderAlphaDefault));
				set(layer[get(thumbName)].tooltip, %2);
				set(layer[get(thumbName)].onhover, showTooltip('plugin'));
			
			set(layer[get(thumbName)].onover, 
				set(layer[get(parent)].bgcolor, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].borderColorHover));
				set(layer[get(parent)].bgalpha, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].borderAlphaHover));
			);
			
			set(layer[get(thumbName)].onout, 
				set(layer[get(parent)].bgcolor, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].borderColorDefault));
				set(layer[get(parent)].bgalpha, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].borderAlphaDefault));
				hideTooltip();
			);
		);
	
	</action>
	
	
	<action name="highlightCurrentThumb_thumbnailsBar_theme02">
			delayedcall(0.1,highlightThumb_thumbnailsBar_theme02(get(xml.scene)));
	</action>
	
	
	<action name="highlightThumb_thumbnailsBar_theme02">
	
		set(thumbBorderName, 'thumbBorder_');
		txtadd(thumbBorderName, %1);
		txtadd(thumbBorderName, '_thumbnailsBar_theme02');
		
		if(layer[thumbnailBorderSource_thumbnailsBar_theme02].url,
			set(layer[get(thumbBorderName)].crop, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].cropSelected));
			set(layer[get(thumbBorderName)].onovercrop, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].cropSelected));
			set(layer[get(thumbBorderName)].ondowncrop, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].cropSelected));
		,
			set(thumbName, 'thumb_');
			txtadd(thumbName, %1);
			txtadd(thumbName, '_thumbnailsBar_theme02');
			
			set(layer[get(thumbBorderName)].bgcolor, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].borderColorSelected));
			set(layer[get(thumbBorderName)].bgalpha, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].borderAlphaSelected));
			
			set(layer[get(thumbName)].onover, "");
			set(layer[get(thumbName)].onout, hideTooltip(););
		);

		scrollToThumb_thumbnailsBar_theme02(%1);
	</action>
	
	
	<action name="scrollToCurrentThumb_thumbnailsBar_theme02">
			scrollToThumb_thumbnailsBar_theme02(get(xml.scene));
	</action>
	
	
	<action name="scrollToThumb_thumbnailsBar_theme02">
		
		set(thumbName, 'thumb_');
		set(thumbBorderName, 'thumbBorder_');
		
		txtadd(thumbName, %1);
		txtadd(thumbName, '_thumbnailsBar_theme02');
		txtadd(thumbBorderName, %1);
		txtadd(thumbBorderName, '_thumbnailsBar_theme02');

			set(posX_thumbnailsBar_theme02, 0);
			if(layer[thumbnailBorderSource_thumbnailsBar_theme02].url,
				div(halfThumbWidth_thumbnailsBar_theme02, get(layer[get(thumbName)].width), 2);
				ifnot(layer[scrollAreaContainer_thumbnailsBar_theme02].adjustToContent,
					add(posX_thumbnailsBar_theme02, get(layer[get(thumbName)].x), get(halfThumbWidth_thumbnailsBar_theme02));
				);
				if(layer[thumbsScrollArea_thumbnailsBar_theme02].scrolltocenter,
					layer[thumbsScrollArea_thumbnailsBar_theme02].scrolltocenter(get(posX_thumbnailsBar_theme02), 0);
				);
			,
				div(halfThumbWidth_thumbnailsBar_theme02, get(layer[get(thumbBorderName)].width), 2);
				ifnot(layer[scrollAreaContainer_thumbnailsBar_theme02].adjustToContent,
					add(posX_thumbnailsBar_theme02, get(layer[get(thumbBorderName)].x), get(halfThumbWidth_thumbnailsBar_theme02));
				);
				if(layer[thumbsScrollArea_thumbnailsBar_theme02].scrolltocenter,
					layer[thumbsScrollArea_thumbnailsBar_theme02].scrolltocenter(get(posX_thumbnailsBar_theme02), 0);
				);
			);
		
	</action>
	





<!-- ********* -->
<!-- Gyroscope -->
<!-- ********* -->


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

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

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

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

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

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

      ifnot(delaythegyrocheck,
        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>

<!-- ********** -->
<!-- Bandes Précédent/Suivant -->
<!-- id : prevnexttheme2 -->
<!-- ********** -->

  <style name="prevnexttheme2btn_alpha_style" 
    alpha="0.0" onover="set(alpha, 1);" onout="set(alpha, 0.0);"
    devices="desktop"
  />
  <style name="prevnexttheme2btn_alpha_style" 
    alpha="1.0"
    devices="tablet.or.mobile"
  />
  <layer name="prevnexttheme2btn_prev_pano" keep="true" align="left"
         height="102%"
         width="5%"
         type="container"
         bgcapture="true"
         bgalpha="0.20000000000000001"
         bgcolor="0xeeeeee"
         zorder="8"
         onclick="loadPreviousScene();
"
         style="prevnexttheme2btn_alpha_style"
         visible="false">
    <layer name="prevnexttheme2prevPanoramaArrow" keep="true" align="center"
         url="%FIRSTXML%/graphics/prevnextstrips/btn_scroll_left.png"
         alpha="1"
         zorder="0"
         tooltip="prevnexttheme2prevSceneTip"
         onhover="showTooltip('plugin',NULL,left);"
         onout="hideTooltip();"
         onclick="loadPreviousScene();
"
    />
  </layer>

  <layer name="prevnexttheme2btn_next_pano" keep="true" align="right"
         height="102%"
         width="5%"
         type="container"
         bgcapture="true"
         bgalpha="0.20000000000000001"
         bgcolor="0xeeeeee"
         zorder="8"
         onclick="loadNextScene();
"
         style="prevnexttheme2btn_alpha_style"
         visible="false">
    <layer name="prevnexttheme2nextPanoramaArrow" keep="true" align="center"
         url="%FIRSTXML%/graphics/prevnextstrips/btn_scroll_right.png"
         alpha="1"
         zorder="0"
         tooltip="prevnexttheme2nextSceneTip"
         onhover="showTooltip('plugin',NULL,right);"
         onout="hideTooltip();"
         onclick="loadNextScene();
"
    />
  </layer>

  <events name="prevnexttheme2hideshowcontrolsevent" 
    onTourStart="prevnexttheme2showPrevNextControls();"
    keep="true"/>
  <action name="prevnexttheme2hidePrevNextControls">
    set(layer[prevnexttheme2btn_prev_pano].visible, false);
    set(layer[prevnexttheme2btn_next_pano].visible, false);
  </action>
  <action name="prevnexttheme2showPrevNextControls">
    set(layer[prevnexttheme2btn_prev_pano].visible, true);
    set(layer[prevnexttheme2btn_next_pano].visible, true);
  </action>


<!-- ********** -->
<!-- Logo -->
<!-- id : logo -->
<!-- ********** -->


  <layer align="topleft"
         x="10"
         y="10"
         zorder="9"
         name="logo"
         keep="true"
         visible="false"
         capture="false"

			tooltip="logotooltipText"
			onhover="showTooltip('plugin',logoTooltipStyle);"
			onout="hideTooltip();"
         url="%FIRSTXML%/graphics/logo/rond.png" 
         onclick="
getmessage(urltoopen,logowebsiteurl);openurl(get(urltoopen),_blank);
"

         width="100"
         height="prop"

         />

  <events name="logoevents" 
    onTourStart="showlogo();"
    hidetourcontrols="hidelogo();"
    showtourcontrols="showlogo();"
    keep="true" />

  <action name="hidelogo">
    set(layer[logo].visible, false);
  </action>
  <action name="showlogo">
    if (tour_displaycontrols,
      set(layer[logo].visible, true);
    );
  </action>



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


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

<action name="setViewArchitectural">
	if(normalViewActivated,stopSetViewTweens(););
	if(current_view_isflat === true,
		setViewNonFlat(VFOV);
	);
	setViewArchitecturalComplete();
</action>

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

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

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

<action name="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>

  <!-- 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="setViewNormal">
	stopSetViewTweens();
	if(current_view_isflat === true,
		setViewNonFlat(VFOV);
	);
	setViewNormalComplete();
</action>

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

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

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


  <!-- Sounds Management -->
  <plugin name="soundinterface"
          preload="true"
          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="false"
          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("bensound-thelounge.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>

</krpano>