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

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

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

         alpha="0.8"
         onover="onoverHS par défault" onout="onoutHS par défault"
         height="40"
         width="40"
         />
  <action name="onoverHS par défault">
tween(scale, 1.2);
tween(alpha, 1);
pauseautorotation();
  </action>
  <action name="onoutHS par défault">
tween(scale, 1);
tween(alpha, 0.8);
resumeautorotation();
  </action>

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

    
  <!-- Spot Style - Flèche bas -->
  <style name="user_defaultpoint4"
         url="%FIRSTXML%/spots/hotspot_direction_sequence_user_defaultpoint4.png"
         visible="false"

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

         rotate="90"
         alpha="0.8"
         onover="onoverFlèche bas" onout="onoutFlèche bas"
         height="25"
         width="50"
         />
  <action name="onoverFlèche bas">
tween(scale, 1.2);
tween(alpha, 1);
pauseautorotation();
  </action>
  <action name="onoutFlèche bas">
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();"
    keep="true" />

  <action name="hidelogo">
    set(layer[logo].visible, false);
  </action>
  <action name="showlogo">
      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);



    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_map].x, get(theme2button_pos));
    set(layer[theme2btn_hide_map   ].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);



    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(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_right].x, get(theme2button_pos));
        inc(theme2button_pos, 36);
        set(layer[theme2btn_left].x, get(theme2button_pos));
        inc(theme2button_pos, 36);
    );
    if (device.desktop,
        set(layer[theme2btn_down].x, get(theme2button_pos));
        inc(theme2button_pos, 36);
        set(layer[theme2btn_up].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_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_left"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_move_left.png"
            ondown="set(hlookat_moveforce, -1);"
            onup="set(hlookat_moveforce, 0);"
            style="theme2_btn_style"
            tooltip="controlBar_classicmoveLeftTip"
            devices="desktop"
            visible="false"
            />
    <layer name="theme2btn_right"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_move_right.png"
            ondown="set(hlookat_moveforce, +1);"
            onup="set(hlookat_moveforce, 0);"
            style="theme2_btn_style"
            tooltip="controlBar_classicmoveRightTip"
            devices="desktop"
            visible="false"
            />

    <layer name="theme2btn_up"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_move_up.png"
            ondown="set(vlookat_moveforce, -1);"
            onup="set(vlookat_moveforce, 0);"
            style="theme2_btn_style"
            tooltip="controlBar_classicmoveUpTip"
            devices="desktop"
            visible="false"
            />
    <layer name="theme2btn_down"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_move_down.png"
            ondown="set(vlookat_moveforce, +1);"
            onup="set(vlookat_moveforce, 0);"
            style="theme2_btn_style"
            tooltip="controlBar_classicmoveDownTip"
            devices="desktop"
            visible="false"
            />




    <layer name="theme2btn_display_map"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_map.png"
            onclick="theme2displayMap();"
            style="theme2_btn_style"
            visible="false"
            tooltip="controlBar_classicdisplayMapTip"
            />
    <layer name="theme2btn_hide_map"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_map.png"
            onclick="theme2hideMap();"
            style="theme2_btn_style"
            visible="false"
            tooltip="controlBar_classichideMapTip"
            />


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


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


    theme2updateAutorotationButtons();


    set(layer[theme2btn_up].visible  , false);
    set(layer[theme2btn_down].visible, false);
    set(layer[theme2btn_home].visible, false);
    set(layer[theme2btn_right].visible, false);
    set(layer[theme2btn_left].visible , false);
    set(layer[theme2btn_in].visible , false);
    set(layer[theme2btn_out].visible, false);

    theme2updateMapButtons();

    theme2updateControlModeButtons();

    theme2updateGyroscopeButtons();



    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_up].visible  , true);
    set(layer[theme2btn_down].visible, true);
    );
    if (device.desktop,
    set(layer[theme2btn_right].visible, true);
    set(layer[theme2btn_left].visible , true);
    );
    if (device.desktop,
    set(layer[theme2btn_in].visible , true);
    set(layer[theme2btn_out].visible, true);
    );
    set(layer[theme2btn_home].visible, true);

    theme2updateMapButtons();

    theme2updateControlModeButtons();

    theme2updateGyroscopeButtons();



    theme2updateFullscreenButtons();


    theme2updateAutorotationButtons();


  </action>


  <action name="theme2displayMap">showMap();
  </action>
  <action name="theme2hideMap">hideMap();
  </action>

	<events name="theme2displaymapchangeevent"
		onshowtourmap="theme2updateMapButtons();"
		onhidetourmap="theme2updateMapButtons();"
		keep="true"/>
	<action name="theme2HideMapButtons">
		set(layer[theme2btn_display_map].visible, false);
		set(layer[theme2btn_hide_map].visible, false);
	</action>
	<action name="theme2ShowMapButtons">
		if (tour_displaymap,
			set(layer[theme2btn_hide_map].visible, true);
			set(layer[theme2btn_display_map].visible, false);
		,
			set(layer[theme2btn_display_map].visible, true);
			set(layer[theme2btn_hide_map].visible, false);
		);
	</action>
	<action name="theme2updateMapButtons">
		set(theme2DisplayMapButtons, false);
		if (theme2IsOpened, set(theme2DisplayMapButtons, true););
		if (theme2DisplayMapButtons,
			theme2ShowMapButtons();
		,
			theme2HideMapButtons();
		);
	</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>



    <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);
			
			
				for( set(i-thumbnailsBar-theme02, 0), i-thumbnailsBar-theme02 LT scene.count, inc(i-thumbnailsBar-theme02),
					createThumb-thumbnailsBar-theme02(get(scene[get(i-thumbnailsBar-theme02)].name), get(scene[get(i-thumbnailsBar-theme02)].thumburl), get(i-thumbnailsBar-theme02), get(scene[get(i-thumbnailsBar-theme02)].titleid));
					inc(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">
	
		
		
			for( set(i, 0), i LT scene.count, inc(i),
				set(thumbBorderName, 'thumbBorder_');
				txtadd(thumbBorderName, get(scene[get(i)].name));
				txtadd(thumbBorderName, '-thumbnailsBar-theme02');
				
				setupMouseBehavior-thumbnailsBar-theme02(get(scene[get(i)].name), get(scene[get(i)].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;"/>

	<!-- START TEMPORARY PLUGIN -->
	<!-- PLUGIN FINAL TODO : lat/lng/zoom -->
				<!-- default spot used for map position : spotmap40 -->
				<!-- latitude for map position : 44.9105 -->
				<!-- longitude for map position : 4.19059 -->
				<!-- zoom for map position : 12 -->
				<ptplugin name="panotourmaps" lat="44.9105" lng="4.19059" zoom="12" maptypelayer="satellite" position="left" size="30" resizable="true" multimap="false" openatstart="false" state="false" bgcolor="f2f2f2" zorder="11" engine="KolorMap">
	<!-- END TEMPORARY PLUGIN -->
	
		<radar visible="true" radius="8000" linktozoom="true" quality="8" linecolor="ffffff" lineopacity="0.500007629510948" linewidth="1" fillcolor="ffffff" fillopacity="0.300007629510948" />
		
		
		<controls zoom="true" pan="true" scale="false" maptype="true" overview="false">
			<ui draggable="true" scrollable="true" dblclick="true" />
		</controls>
		
		<markerSelected name="" heading="" fov="" />
		
		<!-- MARKERS : GENERATED BY PANOTOUR -->
		
			<!-- markers counter : 7 -->
				<marker name="spotmap40" lat="44.9105" lng="4.19059" heading="141.8" draggable="false" desc="spotmap40_tooltip" desctype="tooltip" onhover="false" isscene="true" scene="pano27" jsclick="spotmap40ActionSpotMap">
					<markericon url="spots/hotspot_plan_user_defaultmap0.png" iconwidth="25" iconheight="25" shadow="false" iconanchor="center" />
				</marker>
				<marker name="spotmap41" lat="44.9142" lng="4.19005" heading="34.6000000000009" draggable="false" desc="spotmap41_tooltip" desctype="tooltip" onhover="false" isscene="true" scene="pano25" jsclick="spotmap41ActionSpotMap">
					<markericon url="spots/hotspot_plan_user_defaultmap0.png" iconwidth="25" iconheight="25" shadow="false" iconanchor="center" />
				</marker>
				<marker name="spotmap42" lat="44.9142" lng="4.18999" heading="-163.4" draggable="false" desc="spotmap42_tooltip" desctype="tooltip" onhover="false" isscene="true" scene="pano26" jsclick="spotmap42ActionSpotMap">
					<markericon url="spots/hotspot_plan_user_defaultmap0.png" iconwidth="25" iconheight="25" shadow="false" iconanchor="center" />
				</marker>
				<marker name="spotmap43" lat="44.9109" lng="4.19088" heading="-64.7999999999996" draggable="false" desc="spotmap43_tooltip" desctype="tooltip" onhover="false" isscene="true" scene="pano28" jsclick="spotmap43ActionSpotMap">
					<markericon url="spots/hotspot_plan_user_defaultmap0.png" iconwidth="25" iconheight="25" shadow="false" iconanchor="center" />
				</marker>
				<marker name="spotmap44" lat="44.9104" lng="4.19256" heading="-154.8" draggable="false" desc="spotmap44_tooltip" desctype="tooltip" onhover="false" isscene="true" scene="pano29" jsclick="spotmap44ActionSpotMap">
					<markericon url="spots/hotspot_plan_user_defaultmap0.png" iconwidth="25" iconheight="25" shadow="false" iconanchor="center" />
				</marker>
				<marker name="spotmap45" lat="44.9107" lng="4.19302" heading="90.2000000000002" draggable="false" desc="spotmap45_tooltip" desctype="tooltip" onhover="false" isscene="true" scene="pano30" jsclick="spotmap45ActionSpotMap">
					<markericon url="spots/hotspot_plan_user_defaultmap0.png" iconwidth="25" iconheight="25" shadow="false" iconanchor="center" />
				</marker>
				<marker name="spotmap46" lat="44.9109" lng="4.1929" heading="-34.2" draggable="false" desc="spotmap46_tooltip" desctype="tooltip" onhover="false" isscene="true" scene="pano31" jsclick="spotmap46ActionSpotMap">
					<markericon url="spots/hotspot_plan_user_defaultmap0.png" iconwidth="25" iconheight="25" shadow="false" iconanchor="center" />
				</marker>
		
		
		
	</ptplugin>
	
	
	<!-- BEGIN PANOTOURMAPS DATA CONTENT -->
		<!-- markers counter : 7 -->
				<action name="spotmap40ActionSpotMap">
          if (xml.scene != pano27,
            mainloadscene(pano27);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
				<action name="spotmap41ActionSpotMap">
          if (xml.scene != pano25,
            mainloadscene(pano25);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
				<action name="spotmap42ActionSpotMap">
          if (xml.scene != pano26,
            mainloadscene(pano26);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
				<action name="spotmap43ActionSpotMap">
          if (xml.scene != pano28,
            mainloadscene(pano28);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
				<action name="spotmap44ActionSpotMap">
          if (xml.scene != pano29,
            mainloadscene(pano29);
          );
      lookat(108.148039, 4.556048, 75.000000);
    </action>
				<action name="spotmap45ActionSpotMap">
          if (xml.scene != pano30,
            mainloadscene(pano30);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
				<action name="spotmap46ActionSpotMap">
          if (xml.scene != pano31,
            mainloadscene(pano31);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
	
	
	
	<!-- END PANOTOURMAPS DATA CONTENT -->
	
	<!-- BEGIN PANOTOURMAPS EVENTS AND ACTIONS -->
	<events name="panotourmapsEvents" 
	onxmlcomplete="ifnot(panotourmapsMapLoaded,set(tour_displaymap,false););" 
	onnewpano="panotourmapsActivateDefaultMarker();" 
	onremovepano="panotourmapsUnselectMarker();" 
	onviewchanged="panotourmapsOnviewchange()" 
	onhidetourmap="panotourmapsHidetourmap();" 
	onshowtourmap="if(tour_displaymap,panotourmapsShowtourmap(););" 
	hidetourcontrols="panotourmapsHidetourmap();" 
	showtourcontrols="if(tour_displaymap,panotourmapsShowtourmap(););" 
	onenterfullscreen="panotourmapsUpdateMaxMapSize();" 
	onexitfullscreen="panotourmapsUpdateMaxMapSize();" 
	keep="true" />
	
	
	<krpano panotourmapsMarkerDefaultSet="false" />
	<krpano panotourmapsMapLoaded="false" />
	
	
	<action name="panotourmapsUpdateMaxMapSize">
		js(invokePluginFunction(panotourmaps, updateResizableMapMaxSize));
	</action>
	
	<action name="panotourmapsHidetourmap">
		set(ptplugin[panotourmaps].state, false);
		js(invokePluginFunction(panotourmaps, openCloseMap, close));
	</action>
	
	<action name="panotourmapsShowtourmap">
		set(ptplugin[panotourmaps].state, true);
		js(invokePluginFunction(panotourmaps, openCloseMap, open));
	</action>
	
	<action name="panotourmapsChangescene">
		if(xml.scene != '%1',mainloadscene(%1);panotourmapsGoMarker(%2));
	</action>
	
	<action name="panotourmapsOnviewchange">
		if ( panotourmapsMapLoaded == true,
			ifnot(ptplugin[panotourmaps].markerSelected.name == "",
				js(invokePluginFunction(panotourmaps, changeDirection, get(view.hlookat), get(view.fov)));
			);
		);
	</action>
	
	<action name="panotourmapsGoMarker">
		if ( panotourmapsMapLoaded == true,
			
			set(ptplugin[panotourmaps].markerSelected.name, %1);
			set(ptplugin[panotourmaps].markerSelected.heading, get(view.hlookat));
			set(ptplugin[panotourmaps].markerSelected.fov, get(view.fov));
			js(invokePluginFunction(panotourmaps, changeCurrentMarker, %1, get(view.hlookat), get(view.fov)));
			
			if( panotourmapsMarkerDefaultSet == false,
				js(setMapDefaultMarker(panotourmaps, %1, get(view.hlookat), get(view.fov)));
				set(panotourmapsMarkerDefaultSet,true);
			);
		);
	</action>
	
	<action name="panotourmapsUnselectMarker">
		set(ptplugin[panotourmaps].markerSelected.name, "");
		js(invokePluginFunction(panotourmaps, unselectCurrentMarker));
		
		js(setMapDefaultMarker(panotourmaps, null, null, null));
	</action>
	
	<action name="panotourmapsActivateDefaultMarker">
		set(panotourmapsMapLoaded, true);
		
		set(panotourmapsMapSpotFound, false);
		for(set(defaultmarkerinc,0), defaultmarkerinc LT ptplugin[panotourmaps].marker.count , inc(defaultmarkerinc),
			if(ptplugin[panotourmaps].marker[get(defaultmarkerinc)].isscene == true,
				if(panotourmapsMapSpotFound == false,
					if(ptplugin[panotourmaps].marker[get(defaultmarkerinc)].scene == xml.scene,
						ifnot(ptplugin[panotourmaps].marker[get(defaultmarkerinc)].name == ptplugin[panotourmaps].markerSelected.name,
							panotourmapsGoMarker(get(ptplugin[panotourmaps].marker[get(defaultmarkerinc)].name));
						);
						set(panotourmapsMapSpotFound, true);
					);
				);
			);
		);
		
		if(panotourmapsMapSpotFound == false,
			panotourmapsUnselectMarker();
		);
	</action>
	<!-- END PANOTOURMAPS EVENTS AND ACTIONS -->
<!-- *********************** -->
<!-- Projections 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><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>
  <!-- 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>
  <!-- Fullscreen Management -->
  <action name="exitFullScreen">set(tour_fullscreen,false);js(setFullscreen(false));</action>
  <action name="enterFullScreen">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">set(tour_fullscreen,false);events.dispatch(onexitfullscreen);</action>
  <action name="enterFullScreenChangeEvent">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><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>
  <!-- MAP -->
  <action name="hideMap">set(tour_displaymap, false);events.dispatch(onhidetourmap);</action>
  <action name="showMap">set(tour_displaymap, true); events.dispatch(onshowtourmap);</action><action name="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>