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

    
  <!-- Spot Style - HS par défault -->
  <style name="IconHSpardéfault"
         url="%FIRSTXML%/spots/hotspot_neutral_sequence_user_defaultpoint0.png"
         visible="false"

         frame="0"
         lastframe="12"
         framewidth="70"
         frameheight="70"
         stopspotsequence="false"
         onloaded="setdefaultanimatedspotframe();startspotanimation(0.1);"

         alpha="0.8"
         onhover="onhoverIconHSpardéfault"
         onover="onoverIconHSpardéfault"
         onout="onoutIconHSpardéfault"
         height="40"
         width="40"
         />
  <action name="onhoverIconHSpardéfault">
    showtooltip(hotspot);
  </action>
  <action name="onoverIconHSpardéfault">
tween(scale, 1.2);
tween(alpha, 1);
pauseautorotation();
  </action>
  <action name="onoutIconHSpardéfault">
    hideTooltip();
tween(scale, 1);
tween(alpha, 0.8);
resumeautorotation();
  </action>

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

    
  <!-- Spot Style - Flèche droite -->
  <style name="IconFlèchedroite"
         url="%FIRSTXML%/spots/hotspot_direction_sequence_user_defaultpoint1.png"
         visible="false"

         frame="0"
         lastframe="15"
         framewidth="98"
         frameheight="48"
         stopspotsequence="false"
         onloaded="setdefaultanimatedspotframe();startspotanimation(0.1);"

         alpha="0.8"
         onhover="onhoverIconFlèchedroite"
         onover="onoverIconFlèchedroite"
         onout="onoutIconFlèchedroite"
         height="25"
         width="50"
         />
  <action name="onhoverIconFlèchedroite">
    showtooltip(hotspot);
  </action>
  <action name="onoverIconFlèchedroite">
tween(scale, 1.2);
tween(alpha, 1);
pauseautorotation();
  </action>
  <action name="onoutIconFlèchedroite">
    hideTooltip();
tween(scale, 1);
tween(alpha, 0.8);
resumeautorotation();
  </action>

    
  <!-- Spot Style - Flèche droite bas -->
  <style name="IconFlèchedroitebas"
         url="%FIRSTXML%/spots/hotspot_direction_sequence_user_defaultpoint5.png"
         visible="false"

         frame="0"
         lastframe="15"
         framewidth="98"
         frameheight="48"
         stopspotsequence="false"
         onloaded="setdefaultanimatedspotframe();startspotanimation(0.1);"

         rotate="45"
         alpha="0.8"
         onhover="onhoverIconFlèchedroitebas"
         onover="onoverIconFlèchedroitebas"
         onout="onoutIconFlèchedroitebas"
         height="25"
         width="50"
         />
  <action name="onhoverIconFlèchedroitebas">
    showtooltip(hotspot);
  </action>
  <action name="onoverIconFlèchedroitebas">
tween(scale, 1.2);
tween(alpha, 1);
pauseautorotation();
  </action>
  <action name="onoutIconFlèchedroitebas">
    hideTooltip();
tween(scale, 1);
tween(alpha, 0.8);
resumeautorotation();
  </action>

    
  <!-- Spot Style - Flèche droite haut -->
  <style name="IconFlèchedroitehaut"
         url="%FIRSTXML%/spots/hotspot_direction_sequence_user_defaultpoint6.png"
         visible="false"

         frame="0"
         lastframe="15"
         framewidth="98"
         frameheight="48"
         stopspotsequence="false"
         onloaded="setdefaultanimatedspotframe();startspotanimation(0.1);"

         rotate="315"
         alpha="0.8"
         onhover="onhoverIconFlèchedroitehaut"
         onover="onoverIconFlèchedroitehaut"
         onout="onoutIconFlèchedroitehaut"
         height="25"
         width="50"
         />
  <action name="onhoverIconFlèchedroitehaut">
    showtooltip(hotspot);
  </action>
  <action name="onoverIconFlèchedroitehaut">
tween(scale, 1.2);
tween(alpha, 1);
pauseautorotation();
  </action>
  <action name="onoutIconFlèchedroitehaut">
    hideTooltip();
tween(scale, 1);
tween(alpha, 0.8);
resumeautorotation();
  </action>

    
  <!-- Spot Style - Flèche gauche bas -->
  <style name="IconFlèchegauchebas"
         url="%FIRSTXML%/spots/hotspot_direction_sequence_user_defaultpoint7.png"
         visible="false"

         frame="0"
         lastframe="15"
         framewidth="98"
         frameheight="48"
         stopspotsequence="false"
         onloaded="setdefaultanimatedspotframe();startspotanimation(0.1);"

         rotate="135"
         alpha="0.8"
         onhover="onhoverIconFlèchegauchebas"
         onover="onoverIconFlèchegauchebas"
         onout="onoutIconFlèchegauchebas"
         height="25"
         width="50"
         />
  <action name="onhoverIconFlèchegauchebas">
    showtooltip(hotspot);
  </action>
  <action name="onoverIconFlèchegauchebas">
tween(scale, 1.2);
tween(alpha, 1);
pauseautorotation();
  </action>
  <action name="onoutIconFlèchegauchebas">
    hideTooltip();
tween(scale, 1);
tween(alpha, 0.8);
resumeautorotation();
  </action>

    
  <!-- Spot Style - Flèche gauche haut -->
  <style name="IconFlèchegauchehaut"
         url="%FIRSTXML%/spots/hotspot_direction_sequence_user_defaultpoint8.png"
         visible="false"

         frame="0"
         lastframe="15"
         framewidth="98"
         frameheight="48"
         stopspotsequence="false"
         onloaded="setdefaultanimatedspotframe();startspotanimation(0.1);"

         rotate="225"
         alpha="0.8"
         onhover="onhoverIconFlèchegauchehaut"
         onover="onoverIconFlèchegauchehaut"
         onout="onoutIconFlèchegauchehaut"
         height="25"
         width="50"
         />
  <action name="onhoverIconFlèchegauchehaut">
    showtooltip(hotspot);
  </action>
  <action name="onoverIconFlèchegauchehaut">
tween(scale, 1.2);
tween(alpha, 1);
pauseautorotation();
  </action>
  <action name="onoutIconFlèchegauchehaut">
    hideTooltip();
tween(scale, 1);
tween(alpha, 0.8);
resumeautorotation();
  </action>

  <!-- ******* -->
  <!-- Footer  -->
  <!-- ******* -->
  <layer name="footer"
         keep="true"
         type="container"
         bgcolor="0x000000"
         bgalpha="0.500007629510948"
         align="bottom"
         x="0"
         y="10"
         zorder="0"
         enabled="false"
         capture="true"
         visible="false"

         height="47"
         width="100%"

         />

  <events name="footerevents" 
    onTourStart="showfooter();"
    keep="true" />

  <action name="showfooter">
    set(layer[footer].visible, true);
  </action>

  <!-- ************ -->
  <!-- LOGO viewport / bottomleft -->
  <!-- ************ -->


  <layer align="bottomleft"
         x="10"
         y="70"
         zorder="1"
         name="logo"
         keep="true"
         visible="false"
         capture="false"
		
			tooltip="logotooltipText"
			onhover="showTooltip(bottomleft);"
			onout="hideTooltip();"
         url="%FIRSTXML%/graphics/logo/logo_zooomez_100px.png" 
         handcursor="false"


         />

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





  <!-- *********** -->
  <!-- Control Bar -->
  <!-- *********** -->

  <krpano theme2barbuilt="false" theme2backgroundwidthwhenclosed="0" theme2backgroundwidthwhenopened="0" theme2IsOpened="false" />
  <events name="theme2events" onxmlcomplete="theme2buildMenuBar();" keep="true"/>
  <action name="theme2buildMenuBar">
    ifnot (theme2barbuilt, theme2buildMenu(); set(theme2barbuilt, true););
  </action>

  <action name="theme2buildMenu">
    <!-- buttons positions -->
    set(theme2button_pos, 20);

    set(layer[theme2btn_hidecontrols].x, get(theme2button_pos));
    set(layer[theme2btn_showcontrols].x, get(theme2button_pos));
    inc(theme2button_pos, 36);
    add(theme2backgroundwidthwhenclosed, get(theme2button_pos), 20);


    set(layer[theme2btn_display_info].x, get(theme2button_pos));
    set(layer[theme2btn_close_info  ].x, get(theme2button_pos));
    inc(theme2button_pos, 36);

    if (device.desktop,
      set(layer[theme2btn_display_help].x, get(theme2button_pos));
      set(layer[theme2btn_close_help  ].x, get(theme2button_pos));
      inc(theme2button_pos, 36);
    );

    if (device.fullscreensupport,
      set(layer[theme2btn_openfs ].x, get(theme2button_pos));
      set(layer[theme2btn_closefs].x, get(theme2button_pos));
      inc(theme2button_pos, 36);
    );


    set(layer[theme2btn_display_floorplan].x, get(theme2button_pos));
    set(layer[theme2btn_hide_floorplan   ].x, get(theme2button_pos));
    inc(theme2button_pos, 36);


    set(layer[theme2btn_autorotate_on ].x, get(theme2button_pos));
    set(layer[theme2btn_autorotate_off].x, get(theme2button_pos));
    inc(theme2button_pos, 36);



    set(layer[theme2btn_show_thumbnails].x, get(theme2button_pos));
    set(layer[theme2btn_hide_thumbnails].x, get(theme2button_pos));
    inc(theme2button_pos, 36);

    if (device.desktop,
      set(layer[theme2btn_ctrlmode_drag_to].x, get(theme2button_pos));
      set(layer[theme2btn_ctrlmode_move_to].x, get(theme2button_pos));
      inc(theme2button_pos, 36);
    );

    set(layer[theme2btn_show_hotspots].x, get(theme2button_pos));
    set(layer[theme2btn_hide_hotspots].x, get(theme2button_pos));
    inc(theme2button_pos, 36);


    set(theme2DisplayGryoscopeButton, false);
    if (device.tablet, set(theme2DisplayGryoscopeButton, true););
    if (device.mobile, set(theme2DisplayGryoscopeButton, true););
    if(theme2DisplayGryoscopeButton,
      set(layer[theme2btn_gyroscope_on ].x, get(theme2button_pos));
      set(layer[theme2btn_gyroscope_off].x, get(theme2button_pos));
      inc(theme2button_pos, 36);
    );


    set(layer[theme2btn_home].x, get(theme2button_pos));
    set(layer[theme2btn_home].x, get(theme2button_pos));
    inc(theme2button_pos, 36);

    if (device.desktop,
        set(layer[theme2btn_out].x, get(theme2button_pos));
        inc(theme2button_pos, 36);
        set(layer[theme2btn_in].x, get(theme2button_pos));
        inc(theme2button_pos, 36);
    );
    inc(theme2button_pos, 20);

    set(theme2backgroundwidthwhenopened, get(theme2button_pos));

	
	
  </action>

	<events name="theme2StartTourEvents" onTourStart="theme2CallOnStartTour();" keep="true" />

	<action name="theme2CallOnStartTour">
		
		set(layer[theme2menu_controlbar_bg].width, get(theme2button_pos));
		theme2showMenuControls();
	</action>

  <style name="theme2_btn_style"
         keep="true"
         alpha="0.8"
         edge="right" align="right"
         width="36" height="36"
         zorder="3"
         onover="theme2ctrlbaronoveraction();"
         onout="theme2ctrlbaronoutaction();"
	onhover="showTooltip(bottom, theme2menuTooltipStyle, bottom);"
         />
  <action name="theme2ctrlbaronoveraction">
    tween(alpha,1,0.1,easeoutquad);
    tween(y,-2,0.1,easeoutquad);
  </action>  
  <action name="theme2ctrlbaronoutaction">
    tween(alpha,0.8);
    tween(y,0,0.1,easeoutquad);
    hideTooltip();
  </action>

  <layer name="theme2menu_controlbar_bg"
         keep="true"
         align="bottom"
         x="0" y="13"
         url="%FIRSTXML%/graphics/classiccontrolbar/footer.png"
         zorder="2"
         width="40"
         height="40"
         scale9grid="10|10|80|80"
         visible="false"
         >

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


    <layer name="theme2btn_gyroscope_off"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_gyroscope.png"
            style="theme2_btn_style"
            onclick="disableGyroscope();"
            devices="tablet|mobile"
            tooltip="controlBar_classicgyroOffTip"
            visible="false"
            />
    <layer name="theme2btn_gyroscope_on"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_gyroscope.png"
            style="theme2_btn_style"
            onclick="enableGyroscope();"
            devices="tablet|mobile"
            tooltip="controlBar_classicgyroOnTip"
            visible="false"
            />


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

    <layer name="theme2btn_in"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_zoom_in.png"
            ondown="set(fov_moveforce, -1);"
            onup="set(fov_moveforce, 0);"
            style="theme2_btn_style"
            tooltip="controlBar_classiczoomInTip"
            devices="desktop"
            visible="false"
            />
    <layer name="theme2btn_out"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_zoom_out.png"
            ondown="set(fov_moveforce, +1);"
            onup="set(fov_moveforce, 0);"
            style="theme2_btn_style"
            tooltip="controlBar_classiczoomOutTip"
            devices="desktop"
            visible="false"
            />

    <layer name="theme2btn_home"
           url="%FIRSTXML%/graphics/classiccontrolbar/btn_home.png"
           onclick="theme2btn_home_action();"
           style="theme2_btn_style"
           tooltip="controlBar_classichomeTip"
           visible="false"
           />


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


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


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

    <layer name="theme2btn_autorotate_on"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_start_autorotation.png"
            onclick="startautorotation();"
            style="theme2_btn_style"
            visible="false"
            tooltip="controlBar_classicautorotateOnTip"
            />
    <layer name="theme2btn_autorotate_off"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_stop_autorotation.png"
            onclick="stopautorotation();"
            style="theme2_btn_style"
            visible="false"
            tooltip="controlBar_classicautorotateOffTip"
            />



    <layer name="theme2btn_display_help"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_help.png"
            onclick="theme2displayHelp();"
            style="theme2_btn_style"
            devices="desktop"
            visible="false"
            tooltip="controlBar_classicdisplayHelpTip"
            />
    <layer name="theme2btn_close_help"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_help.png"
            onclick="theme2closeHelp();"
            style="theme2_btn_style"
            visible="false"
            devices="desktop"
            tooltip="controlBar_classichideHelpTip"
            />


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


    <layer name="theme2btn_hidecontrols"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_hide_controls.png"
            style="theme2_btn_style"
            onclick="theme2hideMenuControls();hideTourControls();"
            visible="false"
            tooltip="controlBar_classichideControlsTip"
            />
    <layer name="theme2btn_showcontrols"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_show_controls.png"
            style="theme2_btn_style"
            onclick="theme2showMenuControls();showTourControls();"
            tooltip="controlBar_classicdisplayControlsTip"
            visible="false"
            />
  </layer>


	<events name="theme2gyroscopeavailableevent"
		ongyroscopeavailable="theme2updateGyroscopeButtonsAvailability();"
		ongyroscopeon="theme2enableGyroscopeButtons(true);"
		ongyroscopeoff="theme2enableGyroscopeButtons(false);"
		keep="true" />
	<krpano theme2menugyroscopeavailable="false" theme2menugyroscopeenabled="false" />
	<action name="theme2updateGyroscopeButtonsAvailability">
		if (tour_gyroscopedevices,
			set(theme2menugyroscopeavailable, true);
			theme2updateGyroscopeButtons();
		);
	</action>
	<action name="theme2enableGyroscopeButtons">
		if (tour_gyroscopedevices,
			set(theme2menugyroscopeenabled, %1);
			theme2updateGyroscopeButtons();
		);
	</action>
	<action name="theme2HideGyroscopeButtons">
		set(layer[theme2btn_gyroscope_off].visible, false);
		set(layer[theme2btn_gyroscope_on].visible, false);
	</action>
	<action name="theme2ShowGyroscopeButtons">
		if (theme2menugyroscopeavailable,
			if (theme2menugyroscopeenabled,
				set(layer[theme2btn_gyroscope_off].visible, false);
				set(layer[theme2btn_gyroscope_on].visible, true);
			,
				set(layer[theme2btn_gyroscope_off].visible, true);
				set(layer[theme2btn_gyroscope_on].visible, false);
			);
		,
			theme2HideGyroscopeButtons();
		);
	</action>
	<action name="theme2updateGyroscopeButtons">
	if (tour_gyroscopedevices,
		set(theme2DisplayMenuGyroscopeButtons, false);
		if (theme2IsOpened, set(theme2DisplayMenuGyroscopeButtons, true););
		if (theme2DisplayMenuGyroscopeButtons,
			theme2ShowGyroscopeButtons();
		,
			theme2HideGyroscopeButtons();
		);
	,
		theme2HideGyroscopeButtons();
	);
	</action>


	<events name="theme2controlmodechangedevent" 
		oncontrolmodechanged="theme2updateControlModeButtons();" 
		keep="true" />
	<action name="theme2HideControlModeButtons">
		set(layer[theme2btn_ctrlmode_move_to].visible, false);
		set(layer[theme2btn_ctrlmode_drag_to].visible, false);
	</action>
	<action name="theme2ShowControlModeButtons">
		if (tour_controlmodemousetype == "moveto",
			set(layer[theme2btn_ctrlmode_drag_to].visible, true);
			set(layer[theme2btn_ctrlmode_move_to].visible, false);
		,
			set(layer[theme2btn_ctrlmode_move_to].visible, true);
			set(layer[theme2btn_ctrlmode_drag_to].visible, false);
		);
	</action>
	<action name="theme2updateControlModeButtons">
	if (device.desktop,
		set(theme2DisplayControlModeButtons, false);
		if (theme2IsOpened, set(theme2DisplayControlModeButtons, true););
		if (theme2DisplayControlModeButtons,
			theme2ShowControlModeButtons();
		,
			theme2HideControlModeButtons();
		);
	,
		theme2HideControlModeButtons();
	);
	</action>

	<events name="theme2hideshowthumbnailsevent" 
		hidetourthumbnails="theme2updateHideShowThumbnailsButtons();" 
		showtourthumbnails="theme2updateHideShowThumbnailsButtons();" 
		keep="true" />
	<action name="theme2HideHideShowThumbnailsButtons">
		set(layer[theme2btn_show_thumbnails].visible, false);
		set(layer[theme2btn_hide_thumbnails].visible, false);
	</action>
	<action name="theme2ShowHideShowThumbnailsButtons">
		if (tour_displaythumbnails,
			set(layer[theme2btn_hide_thumbnails].visible, true);
			set(layer[theme2btn_show_thumbnails].visible, false);
		,
			set(layer[theme2btn_show_thumbnails].visible, true);
			set(layer[theme2btn_hide_thumbnails].visible, false);
		);
	</action>
	<action name="theme2updateHideShowThumbnailsButtons">
		set(theme2DisplayHideShowThumbnailsButtons, false);
		if (theme2IsOpened, set(theme2DisplayHideShowThumbnailsButtons, true););
		if (theme2DisplayHideShowThumbnailsButtons,
			theme2ShowHideShowThumbnailsButtons();
		,
			theme2HideHideShowThumbnailsButtons();
		);
	</action>


  <action name="theme2hideMenuControls">
    set(theme2IsOpened, false);
    set(layer[theme2btn_hidecontrols].visible, false);
    set(layer[theme2btn_showcontrols].visible, true);
    theme2updateFullscreenButtons();


    theme2updateAutorotationButtons();


    theme2updateHideShowThumbnailsButtons();
    set(layer[theme2btn_home].visible, false);
    set(layer[theme2btn_in].visible , false);
    set(layer[theme2btn_out].visible, false);

    theme2updateFloorplanButtons();

    theme2updateControlModeButtons();
    theme2updateHideShowHotspotsButtons();

    theme2updateGyroscopeButtons();

    theme2updateHelpButtons();

    theme2updateInfoButtons();

    set(layer[theme2menu_controlbar_bg].visible, true);
    tween(layer[theme2menu_controlbar_bg].width , get(theme2backgroundwidthwhenclosed));
    tween(layer[theme2menu_controlbar_bg].alpha, 0.5);
  </action>
  <action name="theme2showMenuControls">
    set(theme2IsOpened, true);
    set(layer[theme2btn_hidecontrols].visible, true);
    set(layer[theme2btn_showcontrols].visible, false);
    set(layer[theme2menu_controlbar_bg].visible, true);
    tween(layer[theme2menu_controlbar_bg].alpha, 0.8);
    tween(layer[theme2menu_controlbar_bg].width, get(theme2backgroundwidthwhenopened), 0.5, easeOutQuad, theme2showMenuButtons(););
  </action>
  <action name="theme2showMenuButtons">
    if (device.desktop,
    set(layer[theme2btn_in].visible , true);
    set(layer[theme2btn_out].visible, true);
    );
    set(layer[theme2btn_home].visible, true);

    theme2updateFloorplanButtons();

    theme2updateControlModeButtons();
    theme2updateHideShowHotspotsButtons();

    theme2updateGyroscopeButtons();

    theme2updateHelpButtons();

    theme2updateInfoButtons();

    theme2updateFullscreenButtons();


    theme2updateAutorotationButtons();


      theme2updateHideShowThumbnailsButtons();
  </action>

  <action name="theme2helpScreenRefresh">
  add(layer[theme2helpScreen].maxheight, get(layer[theme2helpScreenFg].height), 80);
  add(layer[theme2helpScreen].maxwidth, get(layer[theme2helpScreenFg].width), 80);
  </action>
  
  <layer name="theme2helpScreen" align="center" keep="true" onclick="theme2closeHelp();" url="%FIRSTXML%/graphics/classiccontrolbar/help_screen_bg.png" visible="false" height="500" width="500" scale9grid="40|40|420|420" displayed="false" maxheight="0" maxwidth="0">

  <layer name="theme2helpScreenFg" align="center" keep="true" onclick="theme2closeHelp();" 
         url="%FIRSTXML%/graphics/classiccontrolbar/aide_thumbnails_hs_plan.png" 
         alpha="1.0" 
         onloaded="theme2helpScreenRefresh();"
         visible="false" />
  </layer>
  <action name="theme2displayHelp">
    set(layer[theme2helpScreen].displayed,true);
    set(layer[theme2helpScreen].visible,true);
    set(layer[theme2helpScreen].height, 100);
    set(layer[theme2helpScreen].width, 100);
    tween(layer[theme2helpScreen].height, layer[theme2helpScreen].maxheight, 1, easeOutQuad);
    tween(layer[theme2helpScreen].width, layer[theme2helpScreen].maxwidth, 1, easeOutQuad,
      set(layer[theme2helpScreenFg].visible,true);
    );
    theme2updateHelpButtons();
  </action>
  <action name="theme2closeHelp">
    set(layer[theme2helpScreen].displayed,false);
    set(layer[theme2helpScreenFg].visible,false);
    tween(layer[theme2helpScreen].height, 100, 1, easeOutQuad);
    tween(layer[theme2helpScreen].width, 100, 1, easeOutQuad,
      set(layer[theme2helpScreen].visible,false);
    );
    theme2updateHelpButtons();
  </action>
	<action name="theme2HideHelpButtons">
		set(layer[theme2btn_display_help].visible, false);
		set(layer[theme2btn_close_help].visible, false);
	</action>
	<action name="theme2ShowHelpButtons">
		if (layer[theme2helpScreen].displayed,
			set(layer[theme2btn_close_help].visible, true);
			set(layer[theme2btn_display_help].visible, false);
		,
			set(layer[theme2btn_display_help].visible, true);
			set(layer[theme2btn_close_help].visible, false);
		);
	</action>
	<action name="theme2updateHelpButtons">
	if (device.desktop,
		set(theme2DisplayHelpButtons, false);
		if (theme2IsOpened, set(theme2DisplayHelpButtons, true););
		if (theme2DisplayHelpButtons,
			theme2ShowHelpButtons();
		,
			theme2HideHelpButtons();
		);
	,
		theme2HideHelpButtons();
	);
	</action>


	<events name="theme2HideShowInfoEvents" 
		onhidetourinfo="theme2updateInfoButtons();" 
		onshowtourinfo="theme2updateInfoButtons();" 
		keep="true" />
	<action name="theme2HideInfoButtons">
		set(layer[theme2btn_display_info].visible, false);
		set(layer[theme2btn_close_info].visible, false);
	</action>
	<action name="theme2ShowInfoButtons">
		if (tour_displayinfo,
			set(layer[theme2btn_close_info].visible, true);
			set(layer[theme2btn_display_info].visible, false);
		,
			set(layer[theme2btn_display_info].visible, true);
			set(layer[theme2btn_close_info].visible, false);
		);
	</action>
	<action name="theme2updateInfoButtons">
		set(theme2DisplayInfoButtons, false);
		if (theme2IsOpened, set(theme2DisplayInfoButtons, true););
		if (theme2DisplayInfoButtons,
			theme2ShowInfoButtons();
		,
			theme2HideInfoButtons();
		);
	</action>

	<events name="theme2DisplayFloorPlanEvents" 
		onshowtourfloorplan="theme2updateFloorplanButtons();" 
		onhidetourfloorplan="theme2updateFloorplanButtons();" 
		keep="true" />
	<action name="theme2HideFloorplanButtons">
		set(layer[theme2btn_display_floorplan].visible, false);
		set(layer[theme2btn_hide_floorplan].visible, false);
	</action>
	<action name="theme2ShowFloorplanButtons">
		if (tour_displayfloorplan,
			set(layer[theme2btn_hide_floorplan].visible, true);
			set(layer[theme2btn_display_floorplan].visible, false);
		,
			set(layer[theme2btn_display_floorplan].visible, true);
			set(layer[theme2btn_hide_floorplan].visible, false);
		);
	</action>
	<action name="theme2updateFloorplanButtons">
		set(theme2DisplayFloorplanButtons, false);
		if (theme2IsOpened, set(theme2DisplayFloorplanButtons, true););
		if (theme2DisplayFloorplanButtons,
			theme2ShowFloorplanButtons();
		,
			theme2HideFloorplanButtons();
		);
	</action>


	<events name="theme2menufullscreenchangeevent"
		onenterfullscreen="theme2updateFullscreenButtons();"
		onexitfullscreen="theme2updateFullscreenButtons();"
		keep="true"/>
	<action name="theme2HideFullscreenButtons">
		set(layer[theme2btn_openfs].visible , false);
		set(layer[theme2btn_closefs].visible, false);
	</action>
	<action name="theme2ShowFullscreenButtons">
		if (device.fullscreensupport,
			if(tour_fullscreen,
				set(layer[theme2btn_openfs].visible , false);
				set(layer[theme2btn_closefs].visible, true);
			,
				set(layer[theme2btn_openfs].visible ,true);
				set(layer[theme2btn_closefs].visible,false);
			);
		,
			theme2HideFullscreenButtons();
		);
	</action>
	<action name="theme2updateFullscreenButtons">
		set(theme2DisplayFullscreenButtons, false);
		if (theme2IsOpened, set(theme2DisplayFullscreenButtons, true););
		if (theme2DisplayFullscreenButtons,
			theme2ShowFullscreenButtons();
		,
			theme2HideFullscreenButtons();
		);
	</action>

	<events name="theme2AutorotationEvents"
		onstartautorotation="theme2updateAutorotationButtons();"
		onresumeautorotation="theme2updateAutorotationButtons();"
		onstopautorotation="theme2updateAutorotationButtons();"
		onpauseautorotation="theme2updateAutorotationButtons();"
		keep="true"/>
	<action name="theme2HideAutorotationButtons">
		set(layer[theme2btn_autorotate_off].visible, false);
		set(layer[theme2btn_autorotate_on].visible , false);
	</action>
	<action name="theme2ShowAutorotationButtons">
		if(tour_autorotateenabled==false,
			set(layer[theme2btn_autorotate_off].visible, false);
			set(layer[theme2btn_autorotate_on].visible , true);
		,
			set(layer[theme2btn_autorotate_off].visible, true);
			set(layer[theme2btn_autorotate_on].visible , false);
		);
	</action>
	<action name="theme2updateAutorotationButtons">
		set(theme2DisplayAutorotationButtons, false);
		if (theme2IsOpened, set(theme2DisplayAutorotationButtons, true););
		if (theme2DisplayAutorotationButtons,
			theme2ShowAutorotationButtons();
		,
			theme2HideAutorotationButtons();
		);
	</action>



	<events name="theme2hotspotsdisplayevents"
		hotspots_visibility_changed="theme2updateHideShowHotspotsButtons"
		keep="true"/>
	<action name="theme2HideHideShowHotspotsButtons">
		set(layer[theme2btn_show_hotspots].visible, false);
		set(layer[theme2btn_hide_hotspots].visible, false);
	</action>
	<action name="theme2ShowHideShowHotspotsButtons">
		if (tour_displayspots,
			set(layer[theme2btn_hide_hotspots].visible, true);
			set(layer[theme2btn_show_hotspots].visible, false);
		,
			set(layer[theme2btn_show_hotspots].visible, true);
			set(layer[theme2btn_hide_hotspots].visible, false);
		);
	</action>
	<action name="theme2updateHideShowHotspotsButtons">
		set(theme2DisplayHideShowHotspotsButtons, false);
		if (theme2IsOpened, set(theme2DisplayHideShowHotspotsButtons, true););
		if (theme2DisplayHideShowHotspotsButtons,
			theme2ShowHideShowHotspotsButtons();
		,
			theme2HideHideShowHotspotsButtons();
		);
	</action>

    <action name="theme2btn_home_action">
      lookto(get(panoview.h),get(panoview.v),get(panoview.fov),smooth(100,20,50));
    </action>


  <textstyle name="theme2menuTooltipStyle"
             font="Helvetica"
             fontsize="16"
             bold="true"
             italic="false"
             background="false"
             border="false"
             alpha="0.8"
             blendmode="layer"
             textcolor="0xFFFFFF"
             effect="glow(0x111111,0.8);"
             origin="bottom"
             yoffset="63"
             edge="center"
             xoffset="0"
             textalign="center"
             noclip="true"
             devices="flash"
             />
	<layer name="theme2menuTooltipStyle"
		keep="true"
		enabled="false"
		capture="false"
		url="%FIRSTXML%/graphics/textfield.swf"
		align="center"
		background="true"
		backgroundcolor="0xffffff"
		backgroundalpha="0.4"
		border="false"
		bordercolor="0xffffff"
		css="color:#FFFFFF;font-family:Helvetica;font-weight:bold;font-size:16px;text-align:center;"
		width="200"
		height="20"
		autoheight="true"
			edge="bottom"
		textshadow="1.0"
		selectable="false"
		zorder="0"
		html=""
		visible="false"
		devices="html5"
		/>

  <!-- ******* -->
  <!-- Header  -->
  <!-- ******* -->
  <layer name="header"
         keep="true"
         type="container"
         bgcolor="0x000000"
         bgalpha="0.500007629510948"
         align="top"
         x="0"
         y="10"
         zorder="4"
         enabled="false"
         capture="true"
         visible="false"

         height="45"
         width="100%"

         />

  <events name="headerevents"
    onTourStart="showheader();"
    hidetourcontrols="hideheader();"
    showtourcontrols="showheader();"
    keep="true" />

  <action name="hideheader">
    set(layer[header].visible, false);
  </action>
  <action name="showheader">
    set(layer[header].visible, true);
  </action>

<!-- **************** -->
<!-- Gyroscope Plugin -->
<!-- **************** -->
<plugin name="gyroscope"
        url="graphics/gyro.js"
        keep="true"
        devices="tablet|mobile"
        onavailable="delayedcall(1, checkGyroAvailability(););"
        enabled="false"
        />

<action name="changeGyroscopeState">
  ifnot (plugin[gyroscope].available === undefined,
    if (plugin[gyroscope].available,
      switch(plugin[gyroscope].enabled);
      if (plugin[gyroscope].enabled, events.dispatch(ongyroscopeon);, events.dispatch(ongyroscopeoff););
    );
  );
</action>

<action name="checkGyroAvailability">
	ifnot (plugin[gyroscope].available === undefined, 
		if (plugin[gyroscope].available,
			set(tour_gyroscopedevices, true);
			events.dispatch(ongyroscopeavailable);
			if (plugin[gyroscope].enabled, events.dispatch(ongyroscopeon);, events.dispatch(ongyroscopeoff););
		,
			set(tour_gyroscopedevices, false);
			set(plugin[gyroscope].enabled, false);
		);
	,
		set(tour_gyroscopedevices, false);
		set(plugin[gyroscope].enabled, false);
	);
</action>
  <!-- ************ -->
  <!-- Button bottomleft -->
  <!-- ************ -->
  <layer name="button"
         keep="true"
         url="%FIRSTXML%/graphics/button/btn_scroll_left_blanc.png" 
         align="bottomleft"
         x="10"
         y="10"
         zorder="6"
         visible="false"
         onclick="buttonOnClick"
         alpha="0.7"
         tooltip="buttontooltip"
         onhover="showTooltip(bottomleft);"
         onout="hideTooltip();tween(scale, 1.0,0.5,easeOutQuad);tween(alpha,0.7,0.5,easeOutQuad);"
         onover="tween(scale, 1.2,0.5,easeOutQuad);tween(alpha,1.0,0.5,easeOutQuad);"
         />
  <action name="buttonOnClick">
loadPreviousScene();
  </action>

  <events name="buttonevents" 
    onTourStart="showbutton();"
    hidetourcontrols="hidebutton();" 
    showtourcontrols="showbutton();" 
    keep="true" />
  <action name="hidebutton">set(layer[button].visible, false);</action>
  <action name="showbutton">set(layer[button].visible, true);</action>

  <!-- ************ -->
  <!-- Button bottomright -->
  <!-- ************ -->
  <layer name="button1"
         keep="true"
         url="%FIRSTXML%/graphics/button1/btn_scroll_right_blanc.png" 
         align="bottomright"
         x="10"
         y="10"
         zorder="7"
         visible="false"
         onclick="button1OnClick"
         alpha="0.7"
         onout="tween(scale, 1.0,0.5,easeOutQuad);tween(alpha,0.7,0.5,easeOutQuad);"
         onover="tween(scale, 1.2,0.5,easeOutQuad);tween(alpha,1.0,0.5,easeOutQuad);"
         />
  <action name="button1OnClick">
loadNextScene();
  </action>

  <events name="button1events" 
    onTourStart="showbutton1();"
    hidetourcontrols="hidebutton1();" 
    showtourcontrols="showbutton1();" 
    keep="true" />
  <action name="hidebutton1">set(layer[button1].visible, false);</action>
  <action name="showbutton1">set(layer[button1].visible, true);</action>

	<!-- ************** -->
	<!-- Thumbnails Bar -->
	<!-- ************** -->




<layer name="thumbnailsBar-thumbnailsBar-theme02" 
	keep="true" 
	type="image" 
	visible="false"
	align="right" 
	
		width="0" 
		height="75%" 
	
	x="0"
	y="10"
	
	url="%FIRSTXML%/graphics/classicthumbnailsbar/frame_bg.png" 
	scale9grid="10|10|80|80"
	
	zorder="8"
/>



<layer name="thumbnailBorderSource-thumbnailsBar-theme02"
	keep="true"
	visible="false"
	
	url="%FIRSTXML%/graphics/classicthumbnailsbar/thumbnails_states.png" 
	offsetX="10"
	offsetY="10"
	quarterHeight="0"			
/>



<textstyle name="tooltipStyle-thumbnailsBar-theme02"
	font="Helvetica"
	fontsize="16"
	bold="true"
	italic="false"
	background="false"
	border="false"
	alpha="0.8"
	blendmode="layer"
	textcolor="0xFFFFFF"
	effect="glow(0x111111,0.8);"
	edge="bottom"
	origin="cursor"
	noclip="true"
	devices="flash"
/>
<layer name="tooltipStyle-thumbnailsBar-theme02"
	keep="true"
	enabled="false"
	capture="false"
	url="%FIRSTXML%/graphics/textfield.swf"
	align="center"
	background="true"
	backgroundcolor="0xffffff"
	backgroundalpha="0.4"
	border="false"
	bordercolor="0xffffff"
	css="color:#FFFFFF;font-family:Helvetica;font-weight:bold;font-size:16px;text-align:center;"
	width="200"
	height="20"
	autoheight="true"
	edge="bottom"
	selectable="false"
	zorder="0"
	visible="false"
	html=""
	devices="html5"
/>

	<events name="thumbnailsScrollEvents-thumbnailsBar-theme02" 
		keep="true" 
		
		onloadcomplete="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,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"
		
		scrollSpeedInit="10"
		scrollSpeed="10"
		scrollSpeedMax="70"
		scrollSpeedAcceleration="20"
		
		parent="thumbnailsBar-thumbnailsBar-theme02"
		
		thumbWidth="0"
		thumbHeight="0"
		
		itemWidth="150"
		itemHeight="75"
		
		offsetX="0"
		offsetY="0"
		
		thumbSpacer="0"
		currentThumbsCount="0"
		
		adjustToContent="false"
		
		zorder="1"
		visible="false"
		ready="false"
	>
	
		
		<layer name="thumbsScrollArea-thumbnailsBar-theme02" 
			url="%FIRSTXML%/graphics/scrollarea.swf" 
			alturl="%FIRSTXML%/graphics/scrollarea.js" 
			align="right"
			onhover_autoscrolling="false"
			
			x="0"
			y="0"
			 
				direction="v" 
		/>
	
	</layer>
	
	
	
	<layer name="scrollPrevArrow-thumbnailsBar-theme02" 
		keep="true"
		type="image"
		visible="false"
		parent="thumbnailsBar-thumbnailsBar-theme02"
		targetHeight="0"
		tagertWidth="0"
		zorder="2"
		
			url="%FIRSTXML%/graphics/classicthumbnailsbar/btn_scroll_up.png"
			align="top"
	/>
	
	
	
	<layer name="scrollNextArrow-thumbnailsBar-theme02" 
		keep="true"
		type="image"
		visible="false"
		parent="thumbnailsBar-thumbnailsBar-theme02"
		targetHeight="0"
		targetWidth="0"
		zorder="2"
		
			url="%FIRSTXML%/graphics/classicthumbnailsbar/btn_scroll_down.png"
			align="bottom"
	/>
	
	
	<action name="onLoadCompleteHandler-thumbnailsBar-theme02">
		loadThumbs-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 (thumbsCount-thumbnailsBar-theme02 LE 0,
			set(layer[thumbnailsBar-thumbnailsBar-theme02].visible, false);
		);
		
		
		set(startResize-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 (thumbsCount-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">
		
		

		ifnot(layer[scrollAreaContainer-thumbnailsBar-theme02].ready,
			
			
			if(layer[thumbnailBorderSource-thumbnailsBar-theme02].url,
				thumbnailBorderImageInit-thumbnailsBar-theme02();
			,
				thumbnailBorderDrawInit-thumbnailsBar-theme02();
			);
			
			
			set(thumbsCount-thumbnailsBar-theme02, 0);
			
			
			set(i-thumbnailsBar-theme02-wait,25);
			
			
				for( set(i-thumbnailsBar-theme02, 0), i-thumbnailsBar-theme02 LT scene.count, inc(i-thumbnailsBar-theme02),
					if(i-thumbnailsBar-theme02-wait == i-thumbnailsBar-theme02,
						add(i-thumbnailsBar-theme02-wait,25);
						wait(0);
					);
					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(thumbsCount-thumbnailsBar-theme02);
				);
			
			
			
			
			
			
			set(layer[scrollAreaContainer-thumbnailsBar-theme02].currentThumbsCount, get(thumbsCount-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].x), 2);
		mul(totalMarginY-thumbnailsBar-theme02, get(layer[scrollAreaContainer-thumbnailsBar-theme02].y), 2);
		
			add(totalPluginWidth-thumbnailsBar-theme02, get(totalMarginX-thumbnailsBar-theme02), get(layer[scrollAreaContainer-thumbnailsBar-theme02].itemWidth));
			
			
			
			if(layer[get(layer[scrollAreaContainer-thumbnailsBar-theme02].parent)].pixelwidth LT totalPluginWidth-thumbnailsBar-theme02,
				set(layer[get(layer[scrollAreaContainer-thumbnailsBar-theme02].parent)].width, get(totalPluginWidth-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].itemHeight), get(layer[scrollAreaContainer-thumbnailsBar-theme02].currentThumbsCount));
			add(scrollAreaSize-thumbnailsBar-theme02, get(totalThumbsSpacer-thumbnailsBar-theme02));

			set(layer[thumbsScrollArea-thumbnailsBar-theme02].width, get(layer[scrollAreaContainer-thumbnailsBar-theme02].itemWidth));
			set(layer[thumbsScrollArea-thumbnailsBar-theme02].height, get(scrollAreaSize-thumbnailsBar-theme02));
			
			
			if(layer[scrollAreaContainer-thumbnailsBar-theme02].height LT layer[scrollAreaContainer-thumbnailsBar-theme02].itemHeight,
				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].itemHeight), 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].offsetY));
			);
			
		
		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);
		);
		
		<!-- THUMB -->
		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)].x, get(layer[scrollAreaContainer-thumbnailsBar-theme02].offsetX));
		
			if(layer[thumbnailBorderSource-thumbnailsBar-theme02].url,
				set(layer[get(thumbName)].parent, thumbsScrollArea-thumbnailsBar-theme02);
				set(layer[get(thumbName)].y, get(thumbIncPos-thumbnailsBar-theme02));
			,
				set(layer[get(thumbName)].parent, get(thumbBorderName));
				set(layer[get(thumbName)].y, get(layer[scrollAreaContainer-thumbnailsBar-theme02].offsetY));
				set(layer[get(thumbName)].onclick, mainloadscene(%1); resetMouseBehavior-thumbnailsBar-theme02(); highlightThumb-thumbnailsBar-theme02(%1));
			);
			
		
		<!-- BORDER -->
		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, mainloadscene(%1); resetMouseBehavior-thumbnailsBar-theme02(); highlightThumb-thumbnailsBar-theme02(%1));
		,
			
				set(layer[get(thumbBorderName)].y, 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].height LT layer[thumbsScrollArea-thumbnailsBar-theme02].height,
				
					showArrows-thumbnailsBar-theme02();
				,
					hideArrows-thumbnailsBar-theme02();
				);
			,
				hideArrows-thumbnailsBar-theme02();
			);
		);
		
		
		if(%1,
			scrollToCurrentThumb-thumbnailsBar-theme02();
		);
		
		
			
			if(layer[scrollAreaContainer-thumbnailsBar-theme02].height LT layer[scrollAreaContainer-thumbnailsBar-theme02].itemHeight,
				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].height), get(layer[scrollNextArrow-thumbnailsBar-theme02].height));
		
			
			sub(scrollAreaContainerSize-thumbnailsBar-theme02, get(layer[get(layer[scrollAreaContainer-thumbnailsBar-theme02].parent)].pixelheight), get(totalArrowSize-thumbnailsBar-theme02));
		
			set(layer[scrollAreaContainer-thumbnailsBar-theme02].height, get(scrollAreaContainerSize-thumbnailsBar-theme02));
		
			set(layer[scrollAreaContainer-thumbnailsBar-theme02].y, get(layer[scrollPrevArrow-thumbnailsBar-theme02].height));
			
		
		
		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">
		<!-- Hide Arrows -->
		set(layer[scrollPrevArrow-thumbnailsBar-theme02].visible, false);
		set(layer[scrollNextArrow-thumbnailsBar-theme02].visible, false);
		
		
		
			mul(totalMargin-thumbnailsBar-theme02, get(layer[scrollAreaContainer-thumbnailsBar-theme02].marginY), 2);
			
			sub(scrollAreaContainerSize-thumbnailsBar-theme02, get(layer[get(layer[scrollAreaContainer-thumbnailsBar-theme02].parent)].pixelheight), get(totalMargin-thumbnailsBar-theme02));
			
			set(layer[scrollAreaContainer-thumbnailsBar-theme02].height, get(scrollAreaContainerSize-thumbnailsBar-theme02));
			set(layer[scrollAreaContainer-thumbnailsBar-theme02].y, get(layer[scrollAreaContainer-thumbnailsBar-theme02].marginY));
			 
			
	</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].height), get(layer[scrollAreaContainer-thumbnailsBar-theme02].height));
				div(scrollLimit-thumbnailsBar-theme02, 2);
			
			add(layer[thumbsScrollArea-thumbnailsBar-theme02].y, get(layer[scrollAreaContainer-thumbnailsBar-theme02].scrollSpeed));
			if(layer[thumbsScrollArea-thumbnailsBar-theme02].y GE scrollLimit-thumbnailsBar-theme02,
				set(layer[thumbsScrollArea-thumbnailsBar-theme02].y, 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].height), get(layer[scrollAreaContainer-thumbnailsBar-theme02].height));
			
				div(scrollLimit-thumbnailsBar-theme02, 2);
			mul(scrollLimit-thumbnailsBar-theme02, -1);
			
			sub(layer[thumbsScrollArea-thumbnailsBar-theme02].y, get(layer[scrollAreaContainer-thumbnailsBar-theme02].scrollSpeed));
			if(layer[thumbsScrollArea-thumbnailsBar-theme02].y LE scrollLimit-thumbnailsBar-theme02,
				set(layer[thumbsScrollArea-thumbnailsBar-theme02].y, 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">
	
		
		
		
		set(j-thumbnailsBar-theme02-wait,25);
		
			for( set(j-thumbnailsBar-theme02, 0), j-thumbnailsBar-theme02 LT scene.count, inc(j-thumbnailsBar-theme02),
				if(j-thumbnailsBar-theme02-wait == j-thumbnailsBar-theme02,
					add(j-thumbnailsBar-theme02-wait,25);
					wait(0);
				);
				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(get(align), tooltipStyle-thumbnailsBar-theme02));
				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(get(align), tooltipStyle-thumbnailsBar-theme02));
			
			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">
			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(posY-thumbnailsBar-theme02, 0);
			if(layer[thumbnailBorderSource-thumbnailsBar-theme02].url,
				div(halfThumbHeight-thumbnailsBar-theme02, get(layer[get(thumbName)].height), 2);
				ifnot(layer[scrollAreaContainer-thumbnailsBar-theme02].adjustToContent,
					add(posY-thumbnailsBar-theme02, get(layer[get(thumbName)].y), get(halfThumbHeight-thumbnailsBar-theme02));
				);
				if(layer[thumbsScrollArea-thumbnailsBar-theme02].scrolltocenter,
					layer[thumbsScrollArea-thumbnailsBar-theme02].scrolltocenter(0, get(posY-thumbnailsBar-theme02));
				);
			,
				div(halfThumbHeight-thumbnailsBar-theme02, get(layer[get(thumbBorderName)].height), 2);
				ifnot(layer[scrollAreaContainer-thumbnailsBar-theme02].adjustToContent,
					add(posY-thumbnailsBar-theme02, get(layer[get(thumbBorderName)].y), get(halfThumbHeight-thumbnailsBar-theme02));
				);
				if(layer[thumbsScrollArea-thumbnailsBar-theme02].scrolltocenter,
					layer[thumbsScrollArea-thumbnailsBar-theme02].scrolltocenter(0, get(posY-thumbnailsBar-theme02));
				);
			);
		
		
	</action>




  <!-- ********************** -->
  <!-- Current Panorama Title -->
  <!-- ********************** -->

  <events name="title_currentpanorama_events" 
    onTourStart="showtitle_currentpanorama();"
    hidetourcontrols="hidetitle_currentpanorama();" 
    showtourcontrols="showtitle_currentpanorama();" 
    onnewpano="updatetitle_currentpanorama();" 
    keep="true" />

  <action name="hidetitle_currentpanorama">set(layer[title_currentpanorama].visible, false);</action>
  <action name="showtitle_currentpanorama">set(layer[title_currentpanorama].visible, true );</action>

  <action name="updatetitle_currentpanorama">
    getmessage(layer[title_currentpanorama].html, get(scene[get(xml.scene)].titleid));
    escape(layer[title_currentpanorama].html);
  </action>
  <layer name="title_currentpanorama" keep="true" zorder="9"
         url="%FIRSTXML%/graphics/textfield.swf"
         align="topleft" x="10" y="60" width="100%" autoheight="true"
         background="false" capture="false" handcursor="false" selectable="false" enabled="false"
         borderwidth="0"
         alpha="1"
         visible="false"
         textshadow="1"
         css="text-align:left;
              color:#ebebeb;
              font-family:Century Gothic;
              font-size:18px;"/>
  <!-- ********************* -->
  <!-- Current Project Title -->
  <!-- ********************* -->

  <events name="title_currentproject1_events" 
    onTourStart="showtitle_currentproject1();"
    hidetourcontrols="hidetitle_currentproject1();" 
    showtourcontrols="showtitle_currentproject1();"  
    keep="true" />

  <action name="hidetitle_currentproject1">set(layer[title_currentproject1].visible, false);</action>
  <action name="showtitle_currentproject1">set(layer[title_currentproject1].visible, true );</action>

  <layer name="title_currentproject1" keep="true" zorder="10"
         url="%FIRSTXML%/graphics/textfield.swf"
         align="topleft" x="10" y="15" width="100%" autoheight="true"
         onloaded="getmessage(html,get(projecttitleid));escape(html);"
         background="false" capture="false" handcursor="false" selectable="false" enabled="false"
         borderwidth="0"
         alpha="1"
         visible="false"
         textshadow="1"
         css="text-align:left;
              color:#ebebeb;
              font-family:Century Gothic;
              font-weight:bold;
              font-size:24px;"/>
<!-- ******************* -->
<!-- Context Menu Plugin -->
<!-- ******************* -->
  <contextmenu fullscreen="false">
    <item name="website1"  />
    <item name="normal"        onclick="setViewNormal();" separator="true"/>
    <item name="fisheye"       onclick="setViewFisheye();"/>
    <item name="architectural" onclick="setViewArchitectural();"/>
    <item name="stereographic" onclick="setViewStereographic();"/>
    <item name="pannini"       onclick="setViewPannini();"/>
    <item name="littleplanet"  onclick="setViewLittlePlanet();"/>
    <item name="fisheyeball"   onclick="setViewFisheyeBall();"/>
    <item name="fullscreenentry" onclick="enterFullscreen();" separator="true"/>
  </contextmenu>

  <events name="contextmenuevents" keep="true" onenterfullscreen="updateContextMenu" onexitfullscreen="updateContextMenu" onxmlcomplete="updateContextMenu"/>
  <action name="updateContextMenu">
    getmessage(contextmenu.item[website1].caption, contextmenuwebsiteurl1);
    getmessage(contextmenu.item[normal].caption, contextmenunormallabel);
    getmessage(contextmenu.item[fisheye].caption, contextmenufisheyelabel);
    getmessage(contextmenu.item[architectural].caption, contextmenuarchitecturallabel);
    getmessage(contextmenu.item[stereographic].caption, contextmenustereographiclabel);
    getmessage(contextmenu.item[pannini].caption, contextmenupanninilabel);
    getmessage(contextmenu.item[littleplanet].caption, contextmenulittleplanetlabel);
    getmessage(contextmenu.item[fisheyeball].caption, contextmenufisheyeballlabel);
    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(););
    );
  </action><ptplugin name="PdfViewer" engine="kolorBox">
	<settings>
		<option name="position" value="center" type="string" />
		<option name="margin_x" value="75" type="int" />
		<option name="margin_y" value="75" type="int" />
		<option name="draggable_box" value="true" type="bool" />
		<option name="container_auto_size" value="true" type="bool" />
		<option name="container_width" value="100" type="int" />
		<option name="container_width_unit" value="percent" type="string" />
		<option name="container_height" value="100" type="int" />
		<option name="container_height_unit" value="percent" type="string" />
		<option name="container_color" value="ffffff" type="string" />
		<option name="container_alpha" value="0.8" type="float" />
		<option name="container_topleft_border_radius" value="15" type="int" />
		<option name="container_topright_border_radius" value="15" type="int" />
		<option name="container_bottomleft_border_radius" value="15" type="int" />
		<option name="container_bottomright_border_radius" value="15" type="int" />
		<option name="container_border_width" value="0" type="int" />
		<option name="container_border_color" value="ffffff" type="string" />
		<option name="overlay_displayed" value="true" type="bool" />
		<option name="overlay_color" value="000000" type="string" />
		<option name="overlay_alpha" value="0.700007629510948" type="float" />
		<option name="title_displayed" value="false" type="bool" />
		<option name="title_position" value="top" type="string" />
		<option name="title_font" value="Verdana" type="string" />
		<option name="title_size" value="14" type="int" />
		<option name="title_weight" value="normal" type="string" />
		<option name="title_decoration" value="normal" type="string" />
		<option name="title_color" value="000000" type="string" />
		<option name="caption_displayed" value="false" type="bool" />
		<option name="fullscreen_displayed" value="true" type="bool" />
		<option name="fullscreen_position" value="topleft" type="string" /> 
		<option name="close_displayed" value="true" type="bool" />
		<option name="close_position" value="topright" type="string" />
		<option name="iframe_default_width" value="600" type="int" />
		<option name="iframe_default_height" value="840" type="int" />
		<option name="iframe_devices_width" value="1024" type="int" />
		<option name="iframe_devices_height" value="5000" type="int" />
		<option name="force_ios_scrolling" value="true" type="bool" />
		<option name="close_callback" value="invokeKrFunction('closeKolorBoxCallback-PdfViewer')" type="string" />
		<option name="zorder" value="12" type="int" />
	</settings>
	<internaldata>
		
	</internaldata>
</ptplugin>

<action name="kolorBoxJsReady-PdfViewer">
	set(ptplugin[PdfViewer].jsready, true);
</action>

<action name="openPDF-PdfViewer">
	ifnot(ptplugin[PdfViewer].isOpen,
		if(ptplugin[PdfViewer].doNotDeleteMe,
			set(ptplugin[PdfViewer].currentCall, false);
		set(ptplugin[PdfViewer].isOpen, true);
		set(ptplugin[PdfViewer].doNotDeleteMe, false);
		pauseautorotation();
		getmessage(boxtitle, %2);
		js(invokePluginFunction(PdfViewer, loadSingleArrayItem, %1?iframe=true, get(boxtitle)));
		,
			set(ptplugin[PdfViewer].currentCall, true);
			set(ptplugin[PdfViewer].doNotDeleteMe, true);
			events.dispatch(onremovedisplayedobject);
			delayedcall(1.0,openPDF-PdfViewer(%1,%2););
		);
	);
</action>

<action name="togglePDF-PdfViewer">
	js(invokePluginFunction(PdfViewer, toggleKolorBox, %1));
</action>


<action name="closeKolorBox-PdfViewer">
	if(ptplugin[PdfViewer].doNotDeleteMe,
		set(ptplugin[PdfViewer].doNotDeleteMe, false);
	,
	js(invokePluginFunction(PdfViewer, closeKolorBox));
	);
</action>

<action name="closeKolorBoxCallback-PdfViewer">
	resumeautorotation();
	set(ptplugin[PdfViewer].doNotDeleteMe, false);
	set(ptplugin[PdfViewer].isOpen, false);
</action>

<events name="kolorBoxEvents-PdfViewer" 
	keep="true"
	onremovedisplayedobject="ifnot(ptplugin[PdfViewer].currentCall,if(ptplugin[PdfViewer].isOpen,closeKolorBox-PdfViewer();););"
/>
  <!-- ************ -->
  <!-- Button topright -->
  <!-- ************ -->
  <layer name="button2"
         keep="true"
         url="%FIRSTXML%/graphics/button2/adobe.png" 
         align="topright"
         x="10"
         y="10"
         zorder="13"
         visible="false"
         onclick="button2OnClick"
         alpha="0.7"
         tooltip="button2tooltip"
         onhover="showTooltip(topright);"
         onout="hideTooltip();tween(scale, 1.0,0.5,easeOutQuad);tween(alpha,0.7,0.5,easeOutQuad);"
         onover="tween(scale, 1.2,0.5,easeOutQuad);tween(alpha,1.0,0.5,easeOutQuad);"
         height="60"
         width="60"
         />
  <action name="button2OnClick">
openPDF-PdfViewer("vmdata/graphics/button2/pistes-fond-et-raquettes.pdf", button2_|PDF Box_|displaypdfpdf_title);
  </action>

  <events name="button2events" 
    onTourStart="showbutton2();"
    hidetourcontrols="hidebutton2();" 
    showtourcontrols="showbutton2();" 
    keep="true" />
  <action name="hidebutton2">set(layer[button2].visible, false);</action>
  <action name="showbutton2">set(layer[button2].visible, true);</action>


<ptplugin name="description" canStart="false" newPano="false" openatstart="false" startMethod="showProjectDescription-description" engine="kolorArea">
	<settings>
		<option name="position" value="topleft" type="string" />
		<option name="start_position" value="left" type="string" />
		<option name="margin_x" value="10" type="int" />
		<option name="margin_y" value="80" type="int" />
		<option name="background_color" value="000000" type="string" />
		<option name="background_alpha" value="0.700007629510948" type="float" />
		<option name="topleft_radius" value="0" type="int" />
		<option name="topright_radius" value="0" type="int" />
		<option name="bottomleft_radius" value="0" type="int" />
		<option name="bottomright_radius" value="0" type="int" />
		<option name="padding" value="10" type="int" />
		<option name="display_title" value="true" type="bool" />
		<option name="title" value="descriptiondescription_title" type="string" />
		<option name="title_font" value="Verdana" type="string" />
		<option name="title_size" value="14" type="int" />
		<option name="title_weight" value="normal" type="string" />
		<option name="title_decoration" value="normal" type="string" />
		<option name="title_color" value="000000" type="string" />
		<option name="close_displayed" value="true" type="bool" />
		<option name="overlay_displayed" value="true" type="bool" />
		<option name="overlay_color" value="000000" type="string" />
		<option name="overlay_alpha" value="0.700007629510948" type="float" />
		<option name="area_width" value="30" type="int" />
		<option name="area_height" value="32" type="int" />
		<option name="area_width_unit" value="percent" type="string" />
		<option name="area_height_unit" value="percent" type="string" />
		<option name="animation" value="false" type="bool" />
		<option name="animation_duration" value="500" type="int" />
		<option name="refresh_content" value="true" type="bool" />
		<option name="close_callback" value="invokeKrFunction('closeKolorAreaCallback-description')" type="string" />
		<option name="close_on_click" value="true" type="bool" />
		<option name="close_onclick_callback" value="invokeKrFunction('closeKolorAreaCallbackClick-description')" type="string" />
		<option name="open_callback" value="invokeKrFunction('openKolorAreaCallback-description')" type="string" />
		<option name="zorder" value="14" type="int" />
		<option name="use_i18n" value="true" type="bool" />
	</settings>
</ptplugin>

<action name="updateTitle-description">
	js(invokePluginFunction(description, changeTitle, get(scene[get(xml.scene)].titleid)));
</action>

<action name="openKolorArea-description">
	set(ptplugin[description].isOpen, true);
	js(showKolorArea(description, get(ptplugin[description].descID)));
</action>

<action name="closeKolorArea-description">
	set(ptplugin[description].isOpen, false);
	js(invokePluginFunction(description, closeKolorArea));
</action>

<action name="toggleKolorArea-description">
	if(ptplugin[description].isOpen,
		closeKolorArea-description();
	,
		openKolorArea-description();
	);
</action>

<action name="closeKolorAreaCallback-description">
	set(ptplugin[description].isOpen, false);
	if(tour_displayinfo,hideTourInfo();
	);
</action>

<action name="closeKolorAreaCallbackClick-description">
	if(tour_displayinfo,hideTourInfo();
	);
</action>

<action name="openKolorAreaCallback-description">
	updateTitle-description();
	
</action>

<action name="showKolorArea-description">
	ifnot(ptplugin[description].startMethod == "",
		delayedcall(0,get(ptplugin[description].startMethod));
	,
		js(invokePluginFunction(description, showKolorArea, %1));
	);
</action>
	
<action name="hideKolorArea-description">
	js(invokePluginFunction(description, hideKolorArea, %1));
</action>

<action name="openDescription-description">
	openKolorArea-description();
</action>

<action name="openSpotDescription-description">
	set(ptplugin[description].descID, %1);
	openKolorArea-description();
</action>

<action name="closeDescription-description">
	set(ptplugin[description].currentGroup, false);
	closeKolorArea-description();
</action> 

<action name="showProjectDescription-description">
	if(ptplugin[description].canStart,
		set(ptplugin[description].descID, get(projectdescriptionid));
		if(ptplugin[description].descID != "",
			openDescription-description();
		,
			hideKolorArea-description(false);
		);
		set(ptplugin[description].startMethod, "");
	);
</action>



<events name="kolorAreaEvents-description" 
	keep="true"
	onTourStart="set(ptplugin[description].canStart, true);if(ptplugin[description].openatstart,showTourInfo();,if(tour_displaycontrols,if(tour_displayinfo,showTourInfo(););););"
	onshowtourinfo="showProjectDescription-description();"
	onhidetourinfo="closeDescription-description();"
	hidetourcontrols="hideKolorArea-description(false);"
	showtourcontrols="if(tour_displayinfo,if(ptplugin[description].isOpen,showKolorArea-description(false);,showProjectDescription-description();););"
/>
	
	<ptplugin name="floorPlan" engine="KolorFloorPlan">
		<settings>
			<option name="background_color" value="f2f2f2" type="string" />
			<option name="background_lighter_color" value="ffffff" type="string" />
			<option name="background_darker_color" value="cacaca" type="string" />
			<option name="background_alpha" value="0" type="float" />
			<option name="text_color" value="000000" type="string" />
			<option name="resize" value="true" type="bool" />
			<option name="fp_selector" value="one" type="string" />
			<option name="fp_selector_label" value="floorPlanmenu_label" type="string" />
			<option name="display_title" value="false" type="bool" />
			<option name="title_font" value="Verdana" type="string" />
			<option name="title_size" value="14" type="int" />
			<option name="title_weight" value="normal" type="string" />
			<option name="title_decoration" value="normal" type="string" />
			<option name="title_color" value="000000" type="string" />
			<option name="display_orientation" value="false" type="bool" />
			<option name="display_radar" value="true" type="bool" />
			<option name="radar_radius" value="50" type="int" />
			<option name="radar_line_width" value="2" type="int" />
			<option name="radar_line_color" value="ffffff" type="string" />
			<option name="radar_line_alpha" value="1" type="float" />
			<option name="radar_fill_color" value="c719d6" type="string" />
			<option name="radar_fill_alpha" value="0.8" type="float" />
			<option name="close_on_click" value="true" type="bool" />
			<option name="zorder" value="15" type="int" />
		</settings>
		
		<floorplanItems selectedItem="fpitemmain" selectedSpot="" selectedSpotScene="" selectedSpotHeading="" selectedSpotFov="">
				
				<floorplanItem 
					name="fpitemmain" 
					width="600" 
					height="562" 
					groupName="" 
					url="floorplan/pistes_prat_peyrot.jpg" 
					title="project_floor_title"
					heading="0">
							<spot name="spotmap713" posX="0.244784" posY="0.801187" heading="-5.60000000000005" desc="spotmap713_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano474" jsClick="spotmap713ActionSpotFloorPlan">
								<icon url="spots/hotspot_plan_user_defaultmap0.png" iconWidth="22" iconHeight="22" iconAnchor="center" />
							</spot>
							<spot name="spotmap714" posX="0.289291" posY="0.821958" heading="87.8000000000008" desc="spotmap714_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano473" jsClick="spotmap714ActionSpotFloorPlan">
								<icon url="spots/hotspot_plan_user_defaultmap0.png" iconWidth="22" iconHeight="22" iconAnchor="center" />
							</spot>
							<spot name="spotmap715" posX="0.144645" posY="0.617211" heading="94.0000000000002" desc="spotmap715_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano460" jsClick="spotmap715ActionSpotFloorPlan">
								<icon url="spots/hotspot_plan_user_defaultmap0.png" iconWidth="22" iconHeight="22" iconAnchor="center" />
							</spot>
							<spot name="spotmap716" posX="0.127955" posY="0.5727" heading="-154.6" desc="spotmap716_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano461" jsClick="spotmap716ActionSpotFloorPlan">
								<icon url="spots/hotspot_plan_user_defaultmap0.png" iconWidth="22" iconHeight="22" iconAnchor="center" />
							</spot>
							<spot name="spotmap717" posX="0.228095" posY="0.541543" heading="-51.6" desc="spotmap717_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano462" jsClick="spotmap717ActionSpotFloorPlan">
								<icon url="spots/hotspot_plan_user_defaultmap0.png" iconWidth="22" iconHeight="22" iconAnchor="center" />
							</spot>
							<spot name="spotmap718" posX="0.328234" posY="0.508902" heading="49.4" desc="spotmap718_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano463" jsClick="spotmap718ActionSpotFloorPlan">
								<icon url="spots/hotspot_plan_user_defaultmap0.png" iconWidth="22" iconHeight="22" iconAnchor="center" />
							</spot>
							<spot name="spotmap719" posX="0.347705" posY="0.51632" heading="102.6" desc="spotmap719_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano464" jsClick="spotmap719ActionSpotFloorPlan">
								<icon url="spots/hotspot_plan_user_defaultmap0.png" iconWidth="22" iconHeight="22" iconAnchor="center" />
							</spot>
							<spot name="spotmap720" posX="0.317107" posY="0.195846" heading="22.3999999999999" desc="spotmap720_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano472" jsClick="spotmap720ActionSpotFloorPlan">
								<icon url="spots/hotspot_plan_user_defaultmap0.png" iconWidth="22" iconHeight="22" iconAnchor="center" />
							</spot>
							<spot name="spotmap721" posX="0.353268" posY="0.227003" heading="-119.6" desc="spotmap721_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano471" jsClick="spotmap721ActionSpotFloorPlan">
								<icon url="spots/hotspot_plan_user_defaultmap0.png" iconWidth="22" iconHeight="22" iconAnchor="center" />
							</spot>
							<spot name="spotmap722" posX="0.354659" posY="0.393175" heading="-38.7999999999999" desc="spotmap722_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano467" jsClick="spotmap722ActionSpotFloorPlan">
								<icon url="spots/hotspot_plan_user_defaultmap0.png" iconWidth="22" iconHeight="22" iconAnchor="center" />
							</spot>
							<spot name="spotmap723" posX="0.422809" posY="0.345697" heading="70.1999999999999" desc="spotmap723_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano468" jsClick="spotmap723ActionSpotFloorPlan">
								<icon url="spots/hotspot_plan_user_defaultmap0.png" iconWidth="22" iconHeight="22" iconAnchor="center" />
							</spot>
							<spot name="spotmap724" posX="0.502086" posY="0.360534" heading="104.8" desc="spotmap724_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano469" jsClick="spotmap724ActionSpotFloorPlan">
								<icon url="spots/hotspot_plan_user_defaultmap0.png" iconWidth="22" iconHeight="22" iconAnchor="center" />
							</spot>
							<spot name="spotmap725" posX="0.522949" posY="0.37092" heading="-10.2" desc="spotmap725_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano470" jsClick="spotmap725ActionSpotFloorPlan">
								<icon url="spots/hotspot_plan_user_defaultmap0.png" iconWidth="22" iconHeight="22" iconAnchor="center" />
							</spot>
							<spot name="spotmap726" posX="0.328234" posY="0.462908" heading="0" desc="spotmap726_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano465" jsClick="spotmap726ActionSpotFloorPlan">
								<icon url="spots/hotspot_plan_user_defaultmap0.png" iconWidth="22" iconHeight="22" iconAnchor="center" />
							</spot>
							<spot name="spotmap727" posX="0.363004" posY="0.440653" heading="-10.2" desc="spotmap727_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano470" jsClick="spotmap727ActionSpotFloorPlan">
								<icon url="spots/hotspot_plan_user_defaultmap0.png" iconWidth="22" iconHeight="22" iconAnchor="center" />
							</spot>
							<spot name="spotmap728" posX="0.479833" posY="0.698813" heading="-30.7999999999999" desc="spotmap728_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano459" jsClick="spotmap728ActionSpotFloorPlan">
								<icon url="spots/hotspot_plan_user_defaultmap0.png" iconWidth="22" iconHeight="22" iconAnchor="center" />
							</spot>
							<spot name="spotmap729" posX="0.545202" posY="0.676558" heading="-28.6" desc="spotmap729_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano458" jsClick="spotmap729ActionSpotFloorPlan">
								<icon url="spots/hotspot_plan_user_defaultmap0.png" iconWidth="22" iconHeight="22" iconAnchor="center" />
							</spot>
							<spot name="spotmap730" posX="0.646732" posY="0.643917" heading="-48.0000000000002" desc="spotmap730_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano457" jsClick="spotmap730ActionSpotFloorPlan">
								<icon url="spots/hotspot_plan_user_defaultmap0.png" iconWidth="22" iconHeight="22" iconAnchor="center" />
							</spot>
							<spot name="spotmap731" posX="0.64395" posY="0.698813" heading="104.4" desc="spotmap731_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano478" jsClick="spotmap731ActionSpotFloorPlan">
								<icon url="spots/hotspot_plan_user_defaultmap0.png" iconWidth="22" iconHeight="22" iconAnchor="center" />
							</spot>
							<spot name="spotmap732" posX="0.688456" posY="0.688427" heading="15.2000000000001" desc="spotmap732_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano477" jsClick="spotmap732ActionSpotFloorPlan">
								<icon url="spots/hotspot_plan_user_defaultmap0.png" iconWidth="22" iconHeight="22" iconAnchor="center" />
							</spot>
							<spot name="spotmap733" posX="0.764951" posY="0.655786" heading="-39.7999999999998" desc="spotmap733_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano475" jsClick="spotmap733ActionSpotFloorPlan">
								<icon url="spots/hotspot_plan_user_defaultmap0.png" iconWidth="22" iconHeight="22" iconAnchor="center" />
							</spot>
							<spot name="spotmap734" posX="0.773296" posY="0.681009" heading="-34.2000000000001" desc="spotmap734_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano476" jsClick="spotmap734ActionSpotFloorPlan">
								<icon url="spots/hotspot_plan_user_defaultmap0.png" iconWidth="22" iconHeight="22" iconAnchor="center" />
							</spot>
				</floorplanItem>
			
		</floorplanItems>
	</ptplugin>
	
	
		<!-- floorplan main spots counter : 22 -->
			<action name="spotmap713ActionSpotFloorPlan">
          if (xml.scene != pano474,
            mainloadscene(pano474);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap714ActionSpotFloorPlan">
          if (xml.scene != pano473,
            mainloadscene(pano473);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap715ActionSpotFloorPlan">
          if (xml.scene != pano460,
            mainloadscene(pano460);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap716ActionSpotFloorPlan">
          if (xml.scene != pano461,
            mainloadscene(pano461);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap717ActionSpotFloorPlan">
          if (xml.scene != pano462,
            mainloadscene(pano462);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap718ActionSpotFloorPlan">
          if (xml.scene != pano463,
            mainloadscene(pano463);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap719ActionSpotFloorPlan">
          if (xml.scene != pano464,
            mainloadscene(pano464);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap720ActionSpotFloorPlan">
          if (xml.scene != pano472,
            mainloadscene(pano472);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap721ActionSpotFloorPlan">
          if (xml.scene != pano471,
            mainloadscene(pano471);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap722ActionSpotFloorPlan">
          if (xml.scene != pano467,
            mainloadscene(pano467);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap723ActionSpotFloorPlan">
          if (xml.scene != pano468,
            mainloadscene(pano468);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap724ActionSpotFloorPlan">
          if (xml.scene != pano469,
            mainloadscene(pano469);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap725ActionSpotFloorPlan">
          if (xml.scene != pano470,
            mainloadscene(pano470);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap726ActionSpotFloorPlan">
          if (xml.scene != pano465,
            mainloadscene(pano465);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap727ActionSpotFloorPlan">
          if (xml.scene != pano470,
            mainloadscene(pano470);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap728ActionSpotFloorPlan">
          if (xml.scene != pano459,
            mainloadscene(pano459);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap729ActionSpotFloorPlan">
          if (xml.scene != pano458,
            mainloadscene(pano458);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap730ActionSpotFloorPlan">
          if (xml.scene != pano457,
            mainloadscene(pano457);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap731ActionSpotFloorPlan">
          if (xml.scene != pano478,
            mainloadscene(pano478);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap732ActionSpotFloorPlan">
          if (xml.scene != pano477,
            mainloadscene(pano477);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap733ActionSpotFloorPlan">
          if (xml.scene != pano475,
            mainloadscene(pano475);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap734ActionSpotFloorPlan">
          if (xml.scene != pano476,
            mainloadscene(pano476);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
	
	
	
	<events name="floorPlanEvents" 
	onxmlcomplete="ifnot(floorPlanFloorPlanLoaded,set(tour_displayfloorplan,true););floorPlanActivateDefaultSpot();" 
	onviewchanged="floorPlanOnViewChange();" 
	onhidetourfloorplan="floorPlanCloseTourFloorPlan();" 
	onshowtourfloorplan="if(tour_displayfloorplan,floorPlanOpenTourFloorPlan(););" 
	onTourStart="set(loadedState-floorPlanArea, get(tour_displaycontrols));floorPlanOpenTourFloorPlan();"
	keep="true" />
	
	
	<krpano floorPlanFloorPlanLoaded="false" />
	<krpano floorPlanSpotDefaultSet="false" />
	
	<action name="floorPlanHideTourFloorPlan">
		hideKolorArea-floorPlanArea(false);
	</action>
	
	<action name="floorPlanCloseTourFloorPlan">
		if(ptplugin[floorPlanArea].isOpen,
			closeKolorArea-floorPlanArea();
		);
	</action>
	
	<action name="floorPlanShowTourFloorPlan">
		showKolorArea-floorPlanArea(false);
	</action>
	
	<action name="floorPlanOpenTourFloorPlan">
		ifnot(ptplugin[floorPlanArea].isOpen,
			openKolorArea-floorPlanArea();
		);
	</action>
	
	<action name="floorPlanOnViewChange">
		if (floorPlanFloorPlanLoaded == true,
			ifnot(ptplugin[floorPlan].floorplanItems[0].selectedSpot == "",
				js(invokePluginFunction(floorPlan, changeDirection, get(xml.scene), get(view.hlookat), get(view.fov)));
			);
		);
	</action>
	
	<action name="floorPlanActivateSpot">
		
		set(ptplugin[floorPlan].floorplanItems[0].selectedSpot, %1);
		set(ptplugin[floorPlan].floorplanItems[0].selectedItem, %2);
		
		if(floorPlanSpotDefaultSet == false,
			ifnot(%1 == "",
				set(ptplugin[floorPlan].floorplanItems[0].selectedSpotScene, get(xml.scene));
				set(ptplugin[floorPlan].floorplanItems[0].selectedSpotHeading, get(view.hlookat));
				set(ptplugin[floorPlan].floorplanItems[0].selectedSpotFov, get(view.fov));
				set(floorPlanSpotDefaultSet, true);
			);
		);
		
		js(invokePluginFunction(floorPlan, selectSpot, %1, %2, %3));
	</action>
	
	<action name="floorPlanDeactivateSpot">
		set(ptplugin[floorPlan].floorplanItems[0].selectedSpot, "");
		
		js(invokePluginFunction(floorPlan, unselectSpot));
	</action>
	
	<action name="floorPlanActivateDefaultSpot">
		set(floorPlanFloorPlanLoaded, true);
		
		set(floorPlanSpotFound, "");
		set(floorPlanSpotScene, "");
		set(floorPlanItemFound, "");
		set(floorPlanItemSearch, true);
		set(floorPlanSpotSearch, true);
		set(floorPlanSpotSearchContinue, true);
		
		
		set(defaultfloorplaniteminc-wait,50);
		for(set(defaultfloorplaniteminc,0), defaultfloorplaniteminc LT ptplugin[floorPlan].floorplanItems[0].floorplanItem.count , inc(defaultfloorplaniteminc),
			if(defaultfloorplaniteminc-wait == defaultfloorplaniteminc,
				add(defaultfloorplaniteminc-wait,50);
				wait(0);
			);
			if(floorPlanSpotSearch == true,
				
				if(ptplugin[floorPlan].floorplanItems[0].floorplanItem[get(defaultfloorplaniteminc)].groupName == scene[get(xml.scene)].group,
					set(floorPlanItemFound, get(ptplugin[floorPlan].floorplanItems[0].floorplanItem[get(defaultfloorplaniteminc)].name));
					set(ptplugin[floorPlan].floorplanItems[0].selectedItem, get(ptplugin[floorPlan].floorplanItems[0].floorplanItem[get(defaultfloorplaniteminc)].name));
					set(floorPlanItemSearch, false);
				,
					
					if(floorPlanItemFound == "",
						set(floorPlanItemFound, get(ptplugin[floorPlan].floorplanItems[0].floorplanItem[fpitemmain].name));
						set(ptplugin[floorPlan].floorplanItems[0].selectedItem, get(ptplugin[floorPlan].floorplanItems[0].floorplanItem[fpitemmain].name));
					);
				);
			);
			if(floorPlanSpotSearch == true,
				set(defaultspotinc-wait,50);
				for(set(defaultspotinc,0), defaultspotinc LT ptplugin[floorPlan].floorplanItems[0].floorplanItem[get(defaultfloorplaniteminc)].spot.count , inc(defaultspotinc),
					if(defaultspotinc-wait == defaultspotinc,
						add(defaultspotinc-wait,50);
						wait(0);
					);
					if(ptplugin[floorPlan].floorplanItems[0].floorplanItem[get(defaultfloorplaniteminc)].spot[get(defaultspotinc)].isScene == true,
					
						if(floorPlanSpotSearchContinue == true,
							if(ptplugin[floorPlan].floorplanItems[0].floorplanItem[get(defaultfloorplaniteminc)].spot[get(defaultspotinc)].scene == xml.scene,
								set(floorPlanSpotFound, get(ptplugin[floorPlan].floorplanItems[0].floorplanItem[get(defaultfloorplaniteminc)].spot[get(defaultspotinc)].name));
								set(floorPlanSpotScene, get(ptplugin[floorPlan].floorplanItems[0].floorplanItem[get(defaultfloorplaniteminc)].spot[get(defaultspotinc)].scene));
								if(floorPlanItemSearch == false,
									set(floorPlanSpotSearchContinue, false);
									set(floorPlanSpotSearch, false);
								);
							);
						);
					);
					
				);
			);
		);
		
		if(floorPlanSpotFound == "",
			
			
			floorPlanDeactivateSpot();
			
			
			set(ptplugin[floorPlan].floorplanItems[0].selectedItem, get(floorPlanItemFound));
			
			
			ifnot(ptplugin[floorPlan].floorplanItems[0].selectedItem == "",
				floorPlanActivateSpot("", get(ptplugin[floorPlan].floorplanItems[0].selectedItem, ""));
			);
		,
			
			floorPlanActivateSpot(get(floorPlanSpotFound), get(ptplugin[floorPlan].floorplanItems[0].selectedItem), get(floorPlanSpotScene));
		);
	</action>
	
	<action name="floorPlanChangeTitle">
		js(invokePluginFunction(floorPlan, changeTitle, %1));
	</action>
	
	<ptplugin name="floorPlanArea" engine="kolorArea">
	<settings>
		<option name="position" value="topleft" type="string" />
		<option name="start_position" value="left" type="string" />
		<option name="margin_x" value="10" type="int" />
		<option name="margin_y" value="80" type="int" />
		<option name="display_title" value="false" type="bool" />
		<option name="title_font" value="Verdana" type="string" />
		<option name="title_size" value="14" type="int" />
		<option name="title_weight" value="normal" type="string" />
		<option name="title_decoration" value="normal" type="string" />
		<option name="title_color" value="000000" type="string" />
		<option name="close_displayed" value="false" type="bool" />
		<option name="background_color" value="f2f2f2" type="string" />
		<option name="background_alpha" value="0" type="float" />
		<option name="overlay_displayed" value="false" type="bool" />
		<option name="overlay_color" value="000000" type="string" />
		<option name="overlay_alpha" value="0.500007629510948" type="float" />
		<option name="padding" value="5" type="int" />
		<option name="topleft_radius" value="0" type="int" />
		<option name="topright_radius" value="0" type="int" />
		<option name="bottomleft_radius" value="0" type="int" />
		<option name="bottomright_radius" value="0" type="int" />
		<option name="area_width" value="30" type="int" />
		<option name="area_height" value="60" type="int" />
		<option name="area_width_unit" value="percent" type="string" />
		<option name="area_height_unit" value="percent" type="string" />
		<option name="animation" value="false" type="bool" />
		<option name="animation_duration" value="500" type="int" />
		<option name="close_on_click" value="true" type="bool" />
		<option name="refresh_content" value="false" type="bool" />
		<option name="open_callback" value="addKolorFloorPlan('floorPlan', 'floorPlanArea-floorplanDIV');" type="string" />
		<option name="close_callback" value="invokeKrFunction('closeKolorAreaCallback-floorPlanArea')" type="string" />
		<option name="zorder" value="15" type="int" />
	</settings>
	</ptplugin>
	
	<action name="openKolorArea-floorPlanArea">
		ifnot(ptplugin[floorPlanArea].isOpen,
			set(ptplugin[floorPlanArea].isOpen, true);
			set(ptplugin[floorPlanArea].visible, true);
			set(ptplugin[floorPlanArea].doNotDeleteMe, false);
			pauseautorotation();
			js(showKolorArea(floorPlanArea, &lt;div id="floorPlanArea-floorplanDIV"&gt;&lt;/div&gt;));
			events.dispatch(onremovedisplayedobject);
		);
	</action>
	
	<action name="closeKolorArea-floorPlanArea">
		if(ptplugin[floorPlanArea].isOpen,
			resumeautorotation();
			js(invokePluginFunction(floorPlanArea, closeKolorArea));
			set(ptplugin[floorPlanArea].isOpen, false);
		);
	</action>
	
	<action name="toggleKolorArea-floorPlanArea">
		if(ptplugin[floorPlanArea].isOpen,
			closeKolorArea-floorPlanArea();
		,
			openKolorArea-floorPlanArea();
		);
	</action>
	
	<action name="closeKolorAreaCallback-floorPlanArea">
		resumeautorotation();
		set(ptplugin[floorPlanArea].isOpen, false);hideFloorplan();
	</action>
	
	<action name="changeTitleKolorArea-floorPlanArea">
		js(invokePluginFunction(floorPlanArea, changeTitle, %1));
	</action>
	
	<action name="showKolorArea-floorPlanArea">
		set(ptplugin[floorPlanArea].visible, true);
		set(ptplugin[floorPlanArea].doNotDeleteMe, false);
		pauseautorotation();
		js(invokePluginFunction(floorPlanArea, showKolorArea, %1));
		events.dispatch(onremovedisplayedobject);
	</action>
		
	<action name="hideKolorArea-floorPlanArea">
		resumeautorotation();
		set(ptplugin[floorPlanArea].visible, false);
		js(invokePluginFunction(floorPlanArea, hideKolorArea, %1));
	</action>
	
	<events name="kolorAreaEvents-floorPlanArea" 
		keep="true"
		hidetourcontrols="if(loadedState-floorPlanArea,hideKolorArea-floorPlanArea(false););"
		showtourcontrols="if(tour_displayfloorplan,showKolorArea-floorPlanArea(false););set(loadedState-floorPlanArea, get(tour_displaycontrols));"
	/>
	
	
  <!-- ************ -->
  <!-- Button topright -->
  <!-- ************ -->
  <layer name="button3"
         keep="true"
         url="%FIRSTXML%/graphics/button3/adobe.png" 
         align="topright"
         x="80"
         y="10"
         zorder="16"
         visible="false"
         onclick="button3OnClick"
         alpha="0.7"
         tooltip="button3tooltip"
         onhover="showTooltip(topright);"
         onout="hideTooltip();tween(scale, 1.0,0.5,easeOutQuad);tween(alpha,0.7,0.5,easeOutQuad);"
         onover="tween(scale, 1.2,0.5,easeOutQuad);tween(alpha,1.0,0.5,easeOutQuad);"
         height="60"
         width="60"
         />
  <action name="button3OnClick">
openPDF-PdfViewer("vmdata/graphics/button3/pistes-alpin.pdf", button3_|PDF Box_|displaypdfpdf_title);
  </action>

  <events name="button3events" 
    onTourStart="showbutton3();"
    hidetourcontrols="hidebutton3();" 
    showtourcontrols="showbutton3();" 
    keep="true" />
  <action name="hidebutton3">set(layer[button3].visible, false);</action>
  <action name="showbutton3">set(layer[button3].visible, true);</action>
<action name="setViewPannini">
    set(display.flash10,off);
    tween(view.architectural, 0.0, 0.25);
    set(backtonormalfirst,false);
    if(view.pannini       == false, set(backtonormalfirst,true) );
    if(view.stereographic == false, set(backtonormalfirst,true) );
    if(backtonormalfirst, tween(view.fisheye, 0.0 ,distance(1.0, 0.25), easeoutquad, WAIT); );
    set(view.pannini, true);
    set(view.stereographic, true);
    set(view.fovmax, 150);
    tween(view.fisheye, 1.0, distance(1.0, 0.75), easeoutquad);
  </action><action name="setViewFisheye">
    set(display.flash10,off);
    tween(view.architectural, 0.0, distance(1.0, 0.30), easeoutquad);
    tween(view.fisheye,       0.0 ,distance(1.0, 0.30), easeoutquad, set(view.stereographic,false); set(view.pannini,false); set(view.fovmax,179); tween(view.fisheye, 0.35, distance(1.0,1.25)); );
  </action><action name="setViewStereographic">
    set(display.flash10,off);
    tween(view.architectural, 0.0, 0.25);
    set(backtonormalfirst,false);
    if(view.pannini       == true,  set(backtonormalfirst,true) );
    if(view.stereographic == false, set(backtonormalfirst,true) );
    if(backtonormalfirst, tween(view.fisheye, 0.0 ,distance(1.0, 0.25), easeoutquad, WAIT); );
    set(view.pannini, false);
    set(view.stereographic, true);
    set(view.fovmax, 150);
    tween(view.fisheye, 1.0, distance(1.0, 0.75), easeoutquad);
  </action>
  <!-- FLOORPLAN -->
  <action name="hideFloorplan">set(tour_displayfloorplan, false);events.dispatch(onhidetourfloorplan);</action>
  <action name="showFloorplan">set(tour_displayfloorplan, true); events.dispatch(onshowtourfloorplan);</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>
  <!-- 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>
  <!-- Fullscreen Management -->
  <action name="exitFullScreen" devices="fullscreensupport">set(tour_fullscreen,false);js(setFullscreen(false));</action>
  <action name="enterFullScreen" devices="fullscreensupport">set(tour_fullscreen,true);js(setFullscreen(true));</action>
  <action name="switchFullScreen">if(tour_fullscreen,exitFullScreen();,enterFullScreen(););</action>

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

  <action name="exitFullScreenChangeEvent" devices="fullscreensupport">set(tour_fullscreen,false);events.dispatch(onexitfullscreen);</action>
  <action name="enterFullScreenChangeEvent" devices="fullscreensupport">set(tour_fullscreen,true);events.dispatch(onenterfullscreen);</action>
  <action name="exitFullScreenFallback">set(fullscreen,false);</action>
  <action name="enterFullScreenFallback">set(fullscreen,true);</action>
  
  <action name="resizeFullScreenEvent">delayedcall(0,updatescreen(););</action>
  <action name="enableGyroscope">
    changeGyroscopeState();
  </action>
  <action name="disableGyroscope">
    changeGyroscopeState();
  </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><action name="setViewArchitectural">
    tween(view.fovmax,       150.0, distance(179, 1.00), easeoutquad);
    tween(view.architectural,  1.0, distance(1.0, 0.45), easeoutquad);
    tween(view.fisheye,        0.0, distance(1.0, 0.45), easeoutquad, set(view.stereographic,false);set(view.pannini,false);set(display.flash10,on); );
  </action><action name="setViewLittlePlanet">
    set(display.flash10,off);
    tween(view.architectural, 0.0, 0.25);
    tween(view.vlookat,  90, distance(179, 1.50), easeoutquad);
    set(backtonormalfirst,false);
    if(view.pannini       == true,  set(backtonormalfirst,true) );
    if(view.stereographic == false, set(backtonormalfirst,true) );
    if(backtonormalfirst, tween(view.fisheye, 0.0 ,distance(1.0, 0.25), easeoutquad, WAIT); );
    set(view.pannini, false);
    set(view.stereographic, true);
    set(view.fovmax, 150);
    tween(view.fisheye, 1.0, distance(1.0, 0.75), easeoutquad);
    tween(view.fov,     150, distance(179, 0.75), easeoutquad);
  </action><action name="setViewFisheyeBall">
    set(view.limitview, off);
    set(view.fisheye, 1.0);
    set(view.fisheyefovlink, 1.5);
    set(view.limitfov, false);
    set(view.stereographic , false);
    set(view.fovmin, 15);
    set(view.hlookatmax, "");
    set(view.vlookatmax, "");
    set(view.hlookatmin, "");
    set(view.vlookatmin, "");
    set(view.fovmax, 179);
    tween(view.fov , 179, 4.0, easeInOutQuad );	
    set(display.details, 22);
    set(display.flash10,on);
  </action><action name="setViewNormal">
    tween(view.fovmax,       150.0, distance(179, 1.00), easeoutquad);
    tween(view.architectural,  0.0, distance(1.0, 0.45), easeoutquad);
    tween(view.fisheye,        0.0, distance(1.0, 0.45), easeoutquad, set(view.stereographic,false); set(view.pannini,false); set(display.flash10,on); );
  </action>
</krpano>