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

    
  <!-- Spot Style - navigation -->


  <style name="Iconnavigation"
         url="%FIRSTXML%/spots/hotspot_neutral_big_sequence_user_defaultpoint0.png"
         visible="false"
         frame="0"
         lastframe="17"
         framewidth="56"
         frameheight="56"
         stopspotsequence="false"
         crop="0|0|56|56"
         edge="center"
         onloaded="startspotanimation(0.1);"
         onhover="onhoverIconnavigation"
         onover="onoverIconnavigation"
         onout="onoutIconnavigation"


         />
  <action name="onhoverIconnavigation">
    showtooltip('hotspot');
  </action>
  <action name="onoverIconnavigation">


pauseautorotation(forcehotspot);

  </action>
  <action name="onoutIconnavigation">
    hideTooltip();


resumeautorotation(forcehotspot);

  </action>



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


    
  <!-- Spot Style - photo -->


  <style name="Iconphoto"
         url="%FIRSTXML%/spots/hotspot_image_user_defaultpoint1.png"
         visible="false"
         edge="center"
         alpha="0.8"
         onhover="onhoverIconphoto"
         onover="onoverIconphoto"
         onout="onoutIconphoto"


         />
  <action name="onhoverIconphoto">
    showtooltip('hotspot');
  </action>
  <action name="onoverIconphoto">
tween(scale, 1.2);
tween(alpha, 1);
pauseautorotation(forcehotspot);

  </action>
  <action name="onoutIconphoto">
    hideTooltip();
    tween(scale, 1);
    tween(alpha, 0.8);
resumeautorotation(forcehotspot);

  </action>



<!-- ********** -->
<!-- Indicateur de Chargement -->
<!-- id : loaderinfo -->
<!-- ********** -->

  <events name="loaderinfoevent" onxmlcomplete="loaderinfoupdate();" keep="true"/>

  <action name="loaderinfoupdate">
    if(scene[get(xml.scene)].video,
      set(layer[loaderinfotextfield].visible, false);
    ,
      if (progress.progress == 1,
        delayedcall(0.5, set(layer[loaderinfotextfield].visible, false); );
      ,
        set(layer[loaderinfotextfield].visible, true);
      );
      mul(progresstext, get(progress.progress),100);
      roundval(progresstext);
      txtadd(progresstext, get(progresstext), %);
      set(layer[loaderinfotextfield].html, get(progresstext));
      ifnot(progress.progress GE 1, delayedcall(0.01, loaderinfoupdate() ));
    );
  </action>

  <layer name="loaderinfotextfield"
         keep="true"
         zorder="1"
         type="text"
         align="center"
         x="0"
         y="0"
         bgborder="0"
         bg="false"
         capture="false"
         handcursor="false"
         interactivecontent="false"
         alpha="1"
         visible="true"
         css="
         text-align:center;
         color:#0a1eff;
         font-family:Arial;
         font-weight:bold;
         font-size:72px;
         "
  />

<!-- ********** -->
<!--  titre -->
<!-- id : title -->
<!-- ********** -->

  <events name="title_events" 
    onTourStart="showtitle();"
    hidetourcontrols="hidetitle();" 
    showtourcontrols="showtitle();" 
    changetourlanguage="changeLanguagetitle"
    keep="true" />

  <action name="hidetitle">set(layer[title].visible, false);</action>
  <action name="showtitle">set(layer[title].visible, true );</action>

  <action name="changeLanguagetitle">
    getmessage(layer[title].html,get(projecttitleid));
    escape(layer[title].html);
  </action>

  <action name="titleOnClick">
getmessage(urltoopen,titleonclick102802openurlwebsiteurl);openurl(get(urltoopen),_blank);


  </action>
  <layer name="title" keep="true" zorder="2"
         type="text"
         align="top" x="0" y="10"
         onloaded="getmessage(html,get(projecttitleid));escape(html);"
         bg="false"
         bgborder="0"
         alpha="1"
         visible="false"
         capture="true" handcursor="true" enabled="true"
         onclick="titleOnClick"
         interactivecontent="false" 
         txtshadow="1.0 1.0 4.0 0x000000 1.0"
         css="text-align:center;
              color:#000000;
              font-family:MS Gothic;
              font-weight:bold;
              font-size:48px;"/>

<!-- ********** -->
<!-- sousTitre1 -->
<!-- id : title1 -->
<!-- ********** -->

  <events name="title1_events" 
    onTourStart="showtitle1();"
    hidetourcontrols="hidetitle1();" 
    showtourcontrols="showtitle1();" 
    onnewpano="updatetitle1();"
    changetourlanguage="changeLanguagetitle1"
    keep="true" />

  <action name="hidetitle1">set(layer[title1].visible, false);</action>
  <action name="showtitle1">set(layer[title1].visible, true );</action>

  <action name="changeLanguagetitle1">
    updatetitle1();
  </action>

  <action name="updatetitle1">
    getmessage(layer[title1].html, get(scene[get(xml.scene)].titleid));
    escape(layer[title1].html);
  </action>
  <layer name="title1" keep="true" zorder="3"
         type="text"
         align="topright" x="50" y="10"
         bg="false"
         bgborder="0"
         alpha="1"
         visible="false"
         capture="false" handcursor="false" enabled="false"
         interactivecontent="false" 
         txtshadow="1.0 1.0 4.0 0x000000 1.0"
         css="text-align:right;
              color:#000000;
              font-family:MS Gothic;
              font-weight:bold;
              font-size:20px;"/>

<!-- ********** -->
<!-- Barre de Contrôle Arrondie -->
<!-- id : controlBar_rounded -->
<!-- ********** -->

  <krpano controlBar_roundedbuilt="false" controlBar_roundednbbuttons="0" controlBar_roundedIsOpened="false" />

  <events name="controlBar_roundedevents" 


    onxmlcomplete="controlBar_roundedbuildMenuBar();" keep="true"/>
  <action name="controlBar_roundedbuildMenuBar">
    ifnot (controlBar_roundedbuilt, controlBar_roundedbuildMenu(); set(controlBar_roundedbuilt, true););
  </action>



  <action name="controlBar_roundedbuildMenu">
    txtadd(btnbgname, "controlBar_roundedbtnbg", get(controlBar_roundednbbuttons));




    if (controlBar_roundednbbuttons LT 6,
      if (scene.count GT 1,
        set(layer[controlBar_roundedbtn_prev_pano].parent, get(btnbgname));
        set(layer[controlBar_roundedbtn_prev_pano].x     , get(plugin[get(btnbgname)].childx));
        set(layer[controlBar_roundedbtn_prev_pano].y     , get(plugin[get(btnbgname)].childy));
        inc(controlBar_roundednbbuttons);
        txtadd(btnbgname, "controlBar_roundedbtnbg", get(controlBar_roundednbbuttons));

        set(layer[controlBar_roundedbtn_next_pano].parent, get(btnbgname));
        set(layer[controlBar_roundedbtn_next_pano].x     , get(plugin[get(btnbgname)].childx));
        set(layer[controlBar_roundedbtn_next_pano].y     , get(plugin[get(btnbgname)].childy));
        inc(controlBar_roundednbbuttons);
        txtadd(btnbgname, "controlBar_roundedbtnbg", get(controlBar_roundednbbuttons));
      );
    ,
      set(layer[controlBar_roundedbtn_next_pano].disabled, true);
      set(layer[controlBar_roundedbtn_prev_pano].disabled, true);
    );



    if (controlBar_roundednbbuttons LT 6,
      set(layer[controlBar_roundedbtn_sound_off].parent, get(btnbgname));
      set(layer[controlBar_roundedbtn_sound_off].x     , get(plugin[get(btnbgname)].childx));
      set(layer[controlBar_roundedbtn_sound_off].y     , get(plugin[get(btnbgname)].childy));
      set(layer[controlBar_roundedbtn_sound_on ].parent, get(btnbgname));
      set(layer[controlBar_roundedbtn_sound_on ].x     , get(plugin[get(btnbgname)].childx));
      set(layer[controlBar_roundedbtn_sound_on ].y     , get(plugin[get(btnbgname)].childy));
      inc(controlBar_roundednbbuttons);
      txtadd(btnbgname, "controlBar_roundedbtnbg", get(controlBar_roundednbbuttons));
    ,
      set(layer[controlBar_roundedbtn_sound_off].disabled, true);
      set(layer[controlBar_roundedbtn_sound_on].disabled, true);
    );




    if (controlBar_roundednbbuttons LT 6,
      set(layer[controlBar_roundedbtn_autorotate_on ].parent, get(btnbgname));
      set(layer[controlBar_roundedbtn_autorotate_on ].x     , get(plugin[get(btnbgname)].childx));
      set(layer[controlBar_roundedbtn_autorotate_on ].y     , get(plugin[get(btnbgname)].childy));
      set(layer[controlBar_roundedbtn_autorotate_off].parent, get(btnbgname));
      set(layer[controlBar_roundedbtn_autorotate_off].x     , get(plugin[get(btnbgname)].childx));
      set(layer[controlBar_roundedbtn_autorotate_off].y     , get(plugin[get(btnbgname)].childy));
      inc(controlBar_roundednbbuttons);
      txtadd(btnbgname, "controlBar_roundedbtnbg", get(controlBar_roundednbbuttons));
    ,
      set(layer[controlBar_roundedbtn_autorotate_on].disabled, true);
      set(layer[controlBar_roundedbtn_autorotate_off].disabled, true);
    );




    if(plugin[ptpvrmode] AND device.html5,
      if (controlBar_roundednbbuttons LT 6,
          set(layer[controlBar_roundedbtn_enter_vr].parent, get(btnbgname));
          set(layer[controlBar_roundedbtn_enter_vr].x     , get(plugin[get(btnbgname)].childx));
          set(layer[controlBar_roundedbtn_enter_vr].y     , get(plugin[get(btnbgname)].childy));
          set(layer[controlBar_roundedbtn_enter_vr_not].parent, get(btnbgname));
          set(layer[controlBar_roundedbtn_enter_vr_not].x , get(plugin[get(btnbgname)].childx));
          set(layer[controlBar_roundedbtn_enter_vr_not].y , get(plugin[get(btnbgname)].childy));
          inc(controlBar_roundednbbuttons);
          txtadd(btnbgname, "controlBar_roundedbtnbg", get(controlBar_roundednbbuttons));
      ,
        set(layer[controlBar_roundedbtn_enter_vr].disabled, true);
      );
    );

	

  </action>

<events name="controlBar_roundedStartTourEvents" onTourStart="controlBar_roundedCallOnStartTour();" keep="true" />

<action name="controlBar_roundedCallOnStartTour">
	
	controlBar_roundedshowMenuControls();
</action>




  <layer name="controlBar_roundedmenu_roundcorner_bg"
          keep="true"
          url="%FIRSTXML%/graphics/roundcornerbar/footer.png"
          zorder="4"
          align="bottomright"
          handcursor="false"
          edge="right"
          x="0"
          y="0"
          rotate="180"
          capture="false"
          visible="false" />

  <style name="controlBar_rounded_btn_style"
         keep="true"
         align="bottomright"
         onhover="controlBar_roundedshowMenuTooltip();"
         onout="hideTooltip();"
         zorder="6"
         />

  <style name="controlBar_roundedbtnbgstyle" keep="true" pixelhittest="true" align="bottomright" zorder="5" alpha="0" />

  <layer name="controlBar_roundedbtnbg0" url="%FIRSTXML%/graphics/roundcornerbar/btn_round_corner_1.png" style="controlBar_roundedbtnbgstyle" x="144" y="0"   childx="10" childy="6"  crop="0|0|48|49" onovercrop="0|49|48|49" ondowncrop="0|98|48|49" visible="false" />
  <layer name="controlBar_roundedbtnbg1" url="%FIRSTXML%/graphics/roundcornerbar/btn_round_corner_2.png" style="controlBar_roundedbtnbgstyle" x="129" y="39"  childx="14" childy="10" crop="0|0|56|56" onovercrop="0|56|56|56" ondowncrop="0|112|56|56" visible="false" />
  <layer name="controlBar_roundedbtnbg2" url="%FIRSTXML%/graphics/roundcornerbar/btn_round_corner_3.png" style="controlBar_roundedbtnbgstyle" x="106" y="75"  childx="15" childy="14" crop="0|0|60|60" onovercrop="0|60|60|60" ondowncrop="0|120|60|60" visible="false" /> 
  <layer name="controlBar_roundedbtnbg3" url="%FIRSTXML%/graphics/roundcornerbar/btn_round_corner_4.png" style="controlBar_roundedbtnbgstyle" x="75"  y="106" childx="14" childy="15" crop="0|0|60|60" onovercrop="0|60|60|60" ondowncrop="0|120|60|60" visible="false" />
  <layer name="controlBar_roundedbtnbg4" url="%FIRSTXML%/graphics/roundcornerbar/btn_round_corner_5.png" style="controlBar_roundedbtnbgstyle" x="39"  y="129" childx="10" childy="14" crop="0|0|56|56" onovercrop="0|56|56|56" ondowncrop="0|112|56|56" visible="false" />
  <layer name="controlBar_roundedbtnbg5" url="%FIRSTXML%/graphics/roundcornerbar/btn_round_corner_6.png" style="controlBar_roundedbtnbgstyle" x="0"   y="144" childx="6"  childy="10" crop="0|0|48|48" onovercrop="0|48|48|48" ondowncrop="0|96|48|48" visible="false" />


  <layer name="controlBar_roundedbtn_prev_pano"
         url="%FIRSTXML%/graphics/roundcornerbar/btn_previous_scene.png"
         onclick="loadPreviousScene();
"
         style="controlBar_rounded_btn_style"
         visible="false"
         tooltip="controlBar_roundedprevSceneTip"
         />
  <layer name="controlBar_roundedbtn_next_pano"
         url="%FIRSTXML%/graphics/roundcornerbar/btn_next_scene.png"
         onclick="loadNextScene();
"
         style="controlBar_rounded_btn_style"
         visible="false"
         tooltip="controlBar_roundednextSceneTip"
         />




  <layer name="controlBar_roundedbtn_sound_on"
          url="%FIRSTXML%/graphics/roundcornerbar/btn_start_sound.png"
          onclick="playTourSounds();
"
          style="controlBar_rounded_btn_style"
          visible="false"
          tooltip="controlBar_roundedsoundsOnTip"
          />
  <layer name="controlBar_roundedbtn_sound_off"
          url="%FIRSTXML%/graphics/roundcornerbar/btn_stop_sound.png"
          onclick="stopTourSounds();
"
          style="controlBar_rounded_btn_style"
          visible="false"
          tooltip="controlBar_roundedsoundsOffTip"
          />

  <events name="controlBar_roundedplaystopsoundsevent" playtoursoundsevent="controlBar_roundedupdateSoundButtons();" stoptoursoundsevent="controlBar_roundedupdateSoundButtons();" keep="true"/>
	<action name="controlBar_roundedHideSoundButtons">
		set(layer[controlBar_roundedbtn_sound_off].visible, false);
		set(layer[controlBar_roundedbtn_sound_on].visible , false);
	</action>
	<action name="controlBar_roundedShowSoundButtons">
		if (tour_soundson == false,
			set(layer[controlBar_roundedbtn_sound_off].visible, false);
			set(layer[controlBar_roundedbtn_sound_on].visible , true);
		,
			set(layer[controlBar_roundedbtn_sound_off].visible, true);
			set(layer[controlBar_roundedbtn_sound_on].visible , false);
		);
	</action>
	<action name="controlBar_roundedupdateSoundButtons">
		if (controlBar_roundedIsOpened,
			controlBar_roundedShowSoundButtons();
		,
			controlBar_roundedHideSoundButtons();
		);
	</action>




  <layer name="controlBar_roundedbtn_autorotate_on"
          url="%FIRSTXML%/graphics/roundcornerbar/btn_start_autorotation.png"
          onclick="resumeautorotation();
"
          style="controlBar_rounded_btn_style"
          visible="false"
          tooltip="controlBar_roundedautorotateOnTip"
          />
  <layer name="controlBar_roundedbtn_autorotate_off"
          url="%FIRSTXML%/graphics/roundcornerbar/btn_stop_autorotation.png"
          onclick="pauseautorotation();
"
          style="controlBar_rounded_btn_style"
          visible="false"
          tooltip="controlBar_roundedautorotateOffTip"
          />

	<events name="controlBar_roundedAutorotationEvents"
		onstartautorotation="controlBar_roundedupdateAutorotationButtons();"
		onresumeautorotation="controlBar_roundedupdateAutorotationButtons();"
		onstopautorotation="controlBar_roundedupdateAutorotationButtons();"
		onpauseautorotation="controlBar_roundedupdateAutorotationButtons();"
		keep="true"/>
	<action name="controlBar_roundedHideAutorotationButtons">
		set(layer[controlBar_roundedbtn_autorotate_off].visible, false);
		set(layer[controlBar_roundedbtn_autorotate_on].visible , false);
	</action>
	<action name="controlBar_roundedShowAutorotationButtons">
		if(autorotate.enabled == false,
			set(layer[controlBar_roundedbtn_autorotate_off].visible, false);
			set(layer[controlBar_roundedbtn_autorotate_on].visible , true);
		,
			set(layer[controlBar_roundedbtn_autorotate_off].visible, true);
			set(layer[controlBar_roundedbtn_autorotate_on].visible , false);
		);
	</action>
	<action name="controlBar_roundedupdateAutorotationButtons">
		if (controlBar_roundedIsOpened,
			controlBar_roundedShowAutorotationButtons();
		,
			controlBar_roundedHideAutorotationButtons();
		);
	</action>


  <layer name="controlBar_roundedbtn_enter_vr"
          url="%FIRSTXML%/graphics/roundcornerbar/btn_vr_mode.png"
          onclick="if(scene[get(xml.scene)].full360 AND disableCurrentSceneVrConservation !== true,
    js(accessWebVr(get(xml.scene),get(videoscenestarttime)));
,
    js(accessWebVr(null));
);"
          style="controlBar_rounded_btn_style"
          visible="false"
          devices="html5"
          tooltip="controlBar_roundedenterVRTip"
          />
    <layer name="controlBar_roundedbtn_enter_vr_not"
          url="%FIRSTXML%/graphics/roundcornerbar/btn_vr_mode_off.png"
          style="controlBar_rounded_btn_style"
          tooltip="controlBar_roundedenterVRNotTip"
          enabled="true"
          capture="false"
          visible="false"
          devices="html5"
          />
<events name="controlBar_roundedvravailableevent"
		onvravailable="controlBar_roundedupdateVrButtonsAvailability();"
		onvrunavailable="controlBar_roundedupdateVrButtonsAvailability();"
		keep="true" devices="html5" />
	<krpano controlBar_roundedmenuvravailable="false" />
	<action name="controlBar_roundedupdateVrButtonsAvailability">
		if (tour_vrdevices,
			set(controlBar_roundedmenuvravailable, true);
		,
			set(controlBar_roundedmenuvravailable, false);
		);
		controlBar_roundedupdateVrButtons();
	</action>
	<action name="controlBar_roundedHideVrButtons">
		set(layer[controlBar_roundedbtn_enter_vr].visible, false);
		if('%1' == 'true' AND plugin[ptpvrmode],
			set(layer[controlBar_roundedbtn_enter_vr_not].visible, true);
		,
			set(layer[controlBar_roundedbtn_enter_vr_not].visible, false);
		);
	</action>
	<action name="controlBar_roundedShowVrButtons">
		if (controlBar_roundedmenuvravailable,
			set(layer[controlBar_roundedbtn_enter_vr].visible, true);
			set(layer[controlBar_roundedbtn_enter_vr_not].visible, false);
		,
			controlBar_roundedHideVrButtons(true);
		);
	</action>
	<action name="controlBar_roundedupdateVrButtons">
	if (tour_vrdevices,
		if (controlBar_roundedIsOpened,
			controlBar_roundedShowVrButtons();
		,
			controlBar_roundedHideVrButtons();
		);
	,
		if (controlBar_roundedIsOpened,
			controlBar_roundedHideVrButtons(true);
		,
			controlBar_roundedHideVrButtons();
		);
	);
	</action>





  <style name="controlBar_roundedroundcorner_btn_nav_style"
         keep="true"
         pixelhittest="true"
         onhover="controlBar_roundedshowMenuTooltip();"
         onout="hideTooltip();"
         />

  
  <layer name="controlBar_roundedmenu_navigation_bg"
          keep="true"
          type="container"
          zorder="5"
          align="bottomright"
          edge="bottomright"
          x="10"
          y="10"
          width="102"
          height="102"
          visible="true"
          capture="false">

    <layer name="controlBar_roundedbtn_in"
         zorder="1"
            url="%FIRSTXML%/graphics/roundcornerbar/btn_zoom_in.png"
            style="controlBar_roundedroundcorner_btn_nav_style"
            crop="0|0|66|33"
            onovercrop="0|33|66|33"
            ondown="viewControlZoomIn(false);"
            onup="viewControlZoomStop();
"
            x="0" y="0"
            edge="bottom"
            align="center"
            visible="false"
            tooltip="controlBar_roundedzoomInTip"
             />
    <layer name="controlBar_roundedbtn_out"
         zorder="1"
            url="%FIRSTXML%/graphics/roundcornerbar/btn_zoom_out.png"
            style="controlBar_roundedroundcorner_btn_nav_style"
            crop="0|0|66|33"
            onovercrop="0|33|66|33"
            ondown="viewControlZoomOut(false);
"
            onup="viewControlZoomStop();
"
            x="0" y="0"
            edge="top"
            align="center"
            visible="false"
            tooltip="controlBar_roundedzoomOutTip"
             />

    <layer name="controlBar_roundedbtn_left"
           zorder="0"
           ondown="viewControlMoveLeft(false);
"
           onup="viewControlMoveHoriStop();
"
            url="%FIRSTXML%/graphics/roundcornerbar/btn_move_left.png"
            style="controlBar_roundedroundcorner_btn_nav_style"
            crop="0|0|29|74"
            onovercrop="0|74|29|74"
            x="0" y="0"
            edge="left"
            align="left"
            visible="false"
            tooltip="controlBar_roundedmoveLeftTip"
            />
    <layer name="controlBar_roundedbtn_right"
           zorder="0"
           ondown="viewControlMoveRight(false);
"
           onup="viewControlMoveHoriStop();
"
           url="%FIRSTXML%/graphics/roundcornerbar/btn_move_right.png"
           style="controlBar_roundedroundcorner_btn_nav_style"
           crop="0|0|29|74"
           onovercrop="0|74|29|74"
           x="0" y="0"
           edge="right"
           align="right"
           visible="false"
           tooltip="controlBar_roundedmoveRightTip"
           />

    <layer name="controlBar_roundedbtn_up"
           zorder="0"
           ondown="viewControlMoveUp(false);
"
           onup="viewControlMoveVertStop();
"
           url="%FIRSTXML%/graphics/roundcornerbar/btn_move_up.png"
           style="controlBar_roundedroundcorner_btn_nav_style"
           crop="0|0|74|29"
           onovercrop="0|29|74|29"
           x="0" y="0"
           align="top"
           edge="top"
           visible="false"
           tooltip="controlBar_roundedmoveUpTip"
           />
    <layer name="controlBar_roundedbtn_down"
           zorder="0"
           ondown="viewControlMoveDown(false);
"
           onup="viewControlMoveVertStop();
"
           url="%FIRSTXML%/graphics/roundcornerbar/btn_move_down.png"
           style="controlBar_roundedroundcorner_btn_nav_style"
           crop="0|0|74|29"
           onovercrop="0|29|74|29"
           x="0" y="0"
           edge="bottom"
           align="bottom"
           visible="false"
           tooltip="controlBar_roundedmoveDownTip"
           />

    <layer name="controlBar_roundedbtn_hidecontrols"
           onclick="controlBar_roundedhideMenuControls();hideTourControls();
"
           x="0" y="0"
           keep="true"
           zorder="2"
           url="%FIRSTXML%/graphics/roundcornerbar/btn_hide_controls.png"
                 crop="0| 0|28|28"
           onovercrop="0|28|28|28"
           ondowncrop="0|56|28|28"
           style="controlBar_roundedroundcorner_btn_nav_style"
           edge="center"
           align="center"
           height="28"
           width="28"
           visible="false"
           tooltip="controlBar_roundedhideControlsTip"
           />
    <layer name="controlBar_roundedbtn_showcontrols"
           onclick="controlBar_roundedshowMenuControls();showTourControls();
"
           x="0" y="0"
           keep="true"
           zorder="2"
           url="%FIRSTXML%/graphics/roundcornerbar/btn_show_controls.png"
                 crop="0| 0|28|28"
           onovercrop="0|28|28|28"
           ondowncrop="0|56|28|28"
           style="controlBar_roundedroundcorner_btn_nav_style"
           edge="center"
           align="center"
           visible="false"
           height="28"
           width="28"
           tooltip="controlBar_roundeddisplayControlsTip"
           />
  </layer>

  <style name="controlBar_roundedbtn_fs_bg_style" keep="true"
         url="%FIRSTXML%/graphics/roundcornerbar/btn_fs_bg.png"
         align="topright"
         zorder="4"
         x="0" y="0"
         crop="      0|  0|50|50"
         onovercrop="0| 50|50|50"
         ondowncrop="0|100|50|50"
         onhover="controlBar_roundedshowMenuTooltip();"
         onout="hideTooltip();"
         />
  <style name="controlBar_roundedbtn_fs_style" keep="true" align="topright"
         devices="fullscreensupport"
         x="5" y="5"
         onhover="controlBar_roundedshowMenuTooltip();"
         onout="hideTooltip();"
         />
  <layer name="controlBar_roundedbtn_openfs_bg"
         style="controlBar_roundedbtn_fs_bg_style"
         onclick="enterFullscreen();
"
         visible="false"
         devices="fullscreensupport"
         alpha="0"
         tooltip="controlBar_roundedopenFsTip"
          >
    <layer name="controlBar_roundedbtn_openfs"
           style="controlBar_roundedbtn_fs_style"
           url="%FIRSTXML%/graphics/roundcornerbar/btn_enter_fs.png"
           onclick="enterFullscreen();
"
           tooltip="controlBar_roundedopenFsTip"
           />
  </layer>

  <layer name="controlBar_roundedbtn_closefs_bg"
          style="controlBar_roundedbtn_fs_bg_style"
          visible="false"
          alpha="0"
          devices="fullscreensupport"
          onclick="exitFullscreen();
"
          tooltip="controlBar_roundedcloseFsTip"
         onhover="controlBar_roundedshowMenuTooltip();"
         onout="hideTooltip();"
          >
    <layer name="controlBar_roundedbtn_closefs"
           style="controlBar_roundedbtn_fs_style"
           url="%FIRSTXML%/graphics/roundcornerbar/btn_close_fs.png"
           onclick="exitFullscreen();
"
           tooltip="controlBar_roundedcloseFsTip"
          />
  </layer>

  <events name="controlBar_roundedmenufullscreenchangeevent"
          onenterfullscreen="controlBar_roundedupdateFullscreenButtons();"
          onexitfullscreen="controlBar_roundedupdateFullscreenButtons();"
          keep="true"/>
	<action name="controlBar_roundedHideFullscreenButtons">
		tween(layer[controlBar_roundedbtn_openfs_bg].alpha, 0, 0.5, easeOutQuad, set(layer[controlBar_roundedbtn_openfs_bg].visible , false));
		tween(layer[controlBar_roundedbtn_closefs_bg].alpha, 0, 0.5, easeOutQuad, set(layer[controlBar_roundedbtn_closefs_bg].visible , false));
	</action>
	<action name="controlBar_roundedShowFullscreenButtons">
		if (device.fullscreensupport,
			if(tour_fullscreen,
				if(layer[controlBar_roundedbtn_openfs_bg].visible,
					set(layer[controlBar_roundedbtn_openfs_bg].visible , false);
					set(layer[controlBar_roundedbtn_closefs_bg].visible, true);
				,
					set(layer[controlBar_roundedbtn_openfs_bg].visible , false);
					set(layer[controlBar_roundedbtn_closefs_bg].visible, true);
					tween(layer[controlBar_roundedbtn_openfs_bg].alpha, 1, 0.5);
					tween(layer[controlBar_roundedbtn_closefs_bg].alpha, 1, 0.5);
				);
			,
				if(layer[controlBar_roundedbtn_closefs_bg].visible,
					set(layer[controlBar_roundedbtn_openfs_bg].visible ,true);
					set(layer[controlBar_roundedbtn_closefs_bg].visible,false);
				,
					set(layer[controlBar_roundedbtn_openfs_bg].visible , true);
					set(layer[controlBar_roundedbtn_closefs_bg].visible, false);
					tween(layer[controlBar_roundedbtn_openfs_bg].alpha, 1, 0.5);
					tween(layer[controlBar_roundedbtn_closefs_bg].alpha, 1, 0.5);
				);
			);
		,
			controlBar_roundedHideFullscreenButtons();
		);
	</action>
	<action name="controlBar_roundedupdateFullscreenButtons">
		if (controlBar_roundedIsOpened,
			controlBar_roundedShowFullscreenButtons();
		,
			controlBar_roundedHideFullscreenButtons();
		);
	</action>






  <action name="controlBar_roundedhideMenuControls">
    set(controlBar_roundedIsOpened, false);
    if (controlBar_roundednbbuttons GT 0,
      stoptween(layer[controlBar_roundedmenu_roundcorner_bg].rotate);
      stoptween(layer[controlBar_roundedbtnbg0].alpha);
      stoptween(layer[controlBar_roundedbtnbg1].alpha);
      stoptween(layer[controlBar_roundedbtnbg2].alpha);
      stoptween(layer[controlBar_roundedbtnbg3].alpha);
      stoptween(layer[controlBar_roundedbtnbg4].alpha);
      stoptween(layer[controlBar_roundedbtnbg5].alpha);

      tween(layer[controlBar_roundedbtnbg0].alpha, 0, 0.5, easeOutQuad, set(layer[controlBar_roundedbtnbg0].visible, false));
      tween(layer[controlBar_roundedbtnbg1].alpha, 0, 0.5, easeOutQuad, set(layer[controlBar_roundedbtnbg1].visible, false));
      tween(layer[controlBar_roundedbtnbg2].alpha, 0, 0.5, easeOutQuad, set(layer[controlBar_roundedbtnbg2].visible, false));
      tween(layer[controlBar_roundedbtnbg3].alpha, 0, 0.5, easeOutQuad, set(layer[controlBar_roundedbtnbg3].visible, false));
      tween(layer[controlBar_roundedbtnbg4].alpha, 0, 0.5, easeOutQuad, set(layer[controlBar_roundedbtnbg4].visible, false));
      tween(layer[controlBar_roundedbtnbg5].alpha, 0, 0.5, easeOutQuad, set(layer[controlBar_roundedbtnbg5].visible, false));
    );

      set(layer[controlBar_roundedbtn_showcontrols].visible, true);
      set(layer[controlBar_roundedbtn_hidecontrols].visible, false);
      set(layer[controlBar_roundedbtn_in].visible, false);
      set(layer[controlBar_roundedbtn_out].visible, false);
      set(layer[controlBar_roundedbtn_up].visible, false);
      set(layer[controlBar_roundedbtn_down].visible, false);
      set(layer[controlBar_roundedbtn_left].visible, false);
      set(layer[controlBar_roundedbtn_right].visible, false);
      ifnot(layer[controlBar_roundedbtn_prev_pano].disabled,
      if (scene.count GT 1,
        set(layer[controlBar_roundedbtn_prev_pano].visible, false);
        set(layer[controlBar_roundedbtn_next_pano].visible, false);
      );
      );

    controlBar_roundedupdateFullscreenButtons();
	ifnot(layer[controlBar_roundedbtn_autorotate_on].disabled,controlBar_roundedupdateAutorotationButtons(););

	ifnot(layer[controlBar_roundedbtn_sound_on].disabled,controlBar_roundedupdateSoundButtons(););
	if(layer[controlBar_roundedbtn_enter_vr],ifnot(layer[controlBar_roundedbtn_enter_vr].disabled,controlBar_roundedupdateVrButtons();););



    if (controlBar_roundednbbuttons GT 0,
      tween(layer[controlBar_roundedmenu_roundcorner_bg].rotate, 180, 0.5, easeOutQuad, set(layer[controlBar_roundedmenu_roundcorner_bg].visible, false););
    );
  </action>
  <action name="controlBar_roundedshowMenuControls">
    set(controlBar_roundedIsOpened, true);
    if (controlBar_roundednbbuttons GT 0,
      stoptween(layer[controlBar_roundedmenu_roundcorner_bg].rotate);
      stoptween(layer[controlBar_roundedbtnbg0].alpha);
      stoptween(layer[controlBar_roundedbtnbg1].alpha);
      stoptween(layer[controlBar_roundedbtnbg2].alpha);
      stoptween(layer[controlBar_roundedbtnbg3].alpha);
      stoptween(layer[controlBar_roundedbtnbg4].alpha);
      stoptween(layer[controlBar_roundedbtnbg5].alpha);
    );

      set(layer[controlBar_roundedbtn_hidecontrols].visible, true);
      set(layer[controlBar_roundedbtn_showcontrols].visible, false);


    set(layer[controlBar_roundedmenu_roundcorner_bg].visible, true);
    tween(layer[controlBar_roundedmenu_roundcorner_bg].rotate, 0, 0.5, easeOutQuad,

      if (controlBar_roundednbbuttons GT 0,
        set(  layer[controlBar_roundedbtnbg0].visible, true);
        tween(layer[controlBar_roundedbtnbg0].alpha  , 1, 0.5);
        set(  layer[controlBar_roundedbtnbg1].visible, true);
        tween(layer[controlBar_roundedbtnbg1].alpha  , 1, 0.5);
        set(  layer[controlBar_roundedbtnbg2].visible, true);
        tween(layer[controlBar_roundedbtnbg2].alpha  , 1, 0.5);
        set(  layer[controlBar_roundedbtnbg3].visible, true);
        tween(layer[controlBar_roundedbtnbg3].alpha  , 1, 0.5);
        set(  layer[controlBar_roundedbtnbg4].visible, true);
        tween(layer[controlBar_roundedbtnbg4].alpha  , 1, 0.5);
        set(  layer[controlBar_roundedbtnbg5].visible, true);
        tween(layer[controlBar_roundedbtnbg5].alpha  , 1, 0.5);
      );

      set(layer[controlBar_roundedbtn_in].visible, true);
      set(layer[controlBar_roundedbtn_out].visible, true);
      set(layer[controlBar_roundedbtn_up].visible, true);
      set(layer[controlBar_roundedbtn_down].visible, true);
      set(layer[controlBar_roundedbtn_left].visible, true);
      set(layer[controlBar_roundedbtn_right].visible, true);
    ifnot(layer[controlBar_roundedbtn_prev_pano].disabled,
      if (scene.count GT 1,
        set(layer[controlBar_roundedbtn_prev_pano].visible, true);
        set(layer[controlBar_roundedbtn_next_pano].visible, true);
      );
    );

      controlBar_roundedupdateFullscreenButtons();
	ifnot(layer[controlBar_roundedbtn_autorotate_on].disabled,controlBar_roundedupdateAutorotationButtons(););

	ifnot(layer[controlBar_roundedbtn_sound_on].disabled,controlBar_roundedupdateSoundButtons(););
	if(layer[controlBar_roundedbtn_enter_vr],ifnot(layer[controlBar_roundedbtn_enter_vr].disabled,controlBar_roundedupdateVrButtons();););


    );
  </action>





  <action name="controlBar_roundedshowMenuTooltip">
    if (tooltip !== null,
      getmessage(tooltipmess, get(tooltip));
      showTooltip('plugin', controlBar_roundedmenuTooltipStyle, bottomright);
    );
  </action>

  <layer name="controlBar_roundedmenuTooltipStyle"
	keep="true"
	enabled="false"
	capture="false"
	type="text"
	align="center"
	bg="true"
	bgcolor="0x9b8b75"
	bgalpha="0.80000000000000004"
	bgborder="0"
	css="color:#000000;font-family:Times New Roman;font-weight:bold;font-size:14px;text-align:left;"
	edge="bottomright"
	interactivecontent="false"
	zorder="0"
	padding="2"
	xoffset="0"
	yoffset="0"
	visible="false"
	html=""
         />


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


  <layer align="left"
         x="10"
         y="-250"
         zorder="7"
         name="logo"
         keep="true"
         visible="false"
         capture="false"

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

         height="5%"
         width="10%"

         />

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



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


<!-- ********** -->
<!-- PanotourMaps -->
<!-- id : panotourmaps -->
<!-- ********** -->

		<ptplugin name="panotourmaps" lat="43.151127777778" lng="6.3439527777778" zoom="11" maptypelayer="road" openatstart="true" state="true" bgcolor="f2f2f2" zorder="8" centeronspots="true" engine="KolorMap">
	
		<radar visible="true" radius="8000" linktozoom="true" quality="8" linecolor="ffffff" lineopacity="0.50000762951094835" linewidth="1" fillcolor="ffffff" fillopacity="0.30000762951094834" />
		
		<markers animation="false" />
		
		
		<controls zoom="true" pan="true" scale="true" maptype="true" overview="true">
			<ui draggable="true" scrollable="true" dblclick="true" />
			<specific />
		</controls>
		
		<markerSelected name="" heading="" fov="" />
		
		
			<!-- PanotourMaps markers counter : 12 -->



				<marker name="spotmap716" 
					lat="43.150847222222" 
					lng="6.3432388888889" 
					heading="0" 
					draggable="false" 
					animated="false" 
					desc="spotmap716_tooltip" 
					desctype="info" 
					onhover="true" 
					isscene="true" 
					scene="pano511" 
					hasradar="true" 
					jsclick="spotmap716ActionSpotMap">
					<markericon url="spots/hotspot_neutral_user_defaultmap0.png" iconwidth="32" iconheight="32" shadow="false" iconanchor="center" />
				</marker>



				<marker name="spotmap717" 
					lat="43.150758333333" 
					lng="6.3434944444444" 
					heading="0" 
					draggable="false" 
					animated="false" 
					desc="spotmap717_tooltip" 
					desctype="info" 
					onhover="true" 
					isscene="true" 
					scene="pano30" 
					hasradar="true" 
					jsclick="spotmap717ActionSpotMap">
					<markericon url="spots/hotspot_neutral_user_defaultmap0.png" iconwidth="32" iconheight="32" shadow="false" iconanchor="center" />
				</marker>



				<marker name="spotmap718" 
					lat="43.151566666667" 
					lng="6.34405" 
					heading="0" 
					draggable="false" 
					animated="false" 
					desc="spotmap718_tooltip" 
					desctype="info" 
					onhover="true" 
					isscene="true" 
					scene="pano29" 
					hasradar="true" 
					jsclick="spotmap718ActionSpotMap">
					<markericon url="spots/hotspot_neutral_user_defaultmap0.png" iconwidth="32" iconheight="32" shadow="false" iconanchor="center" />
				</marker>



				<marker name="spotmap719" 
					lat="43.159047222222" 
					lng="6.4954777777778" 
					heading="0" 
					draggable="false" 
					animated="false" 
					desc="spotmap719_tooltip" 
					desctype="info" 
					onhover="true" 
					isscene="true" 
					scene="pano71" 
					hasradar="true" 
					jsclick="spotmap719ActionSpotMap">
					<markericon url="spots/hotspot_neutral_user_defaultmap0.png" iconwidth="32" iconheight="32" shadow="false" iconanchor="center" />
				</marker>



				<marker name="spotmap720" 
					lat="43.159047222222" 
					lng="6.4954777777778" 
					heading="0" 
					draggable="false" 
					animated="false" 
					desc="spotmap720_tooltip" 
					desctype="info" 
					onhover="true" 
					isscene="true" 
					scene="pano73" 
					hasradar="true" 
					jsclick="spotmap720ActionSpotMap">
					<markericon url="spots/hotspot_neutral_user_defaultmap0.png" iconwidth="32" iconheight="32" shadow="false" iconanchor="center" />
				</marker>



				<marker name="spotmap721" 
					lat="43.150847222222" 
					lng="6.3432388888889" 
					heading="0" 
					draggable="false" 
					animated="false" 
					desc="spotmap721_tooltip" 
					desctype="info" 
					onhover="true" 
					isscene="true" 
					scene="pano74" 
					hasradar="true" 
					jsclick="spotmap721ActionSpotMap">
					<markericon url="spots/hotspot_neutral_user_defaultmap0.png" iconwidth="32" iconheight="32" shadow="false" iconanchor="center" />
				</marker>



				<marker name="spotmap722" 
					lat="43.151127777778" 
					lng="6.3439527777778" 
					heading="0" 
					draggable="false" 
					animated="false" 
					desc="spotmap722_tooltip" 
					desctype="info" 
					onhover="true" 
					isscene="true" 
					scene="pano169" 
					hasradar="true" 
					jsclick="spotmap722ActionSpotMap">
					<markericon url="spots/hotspot_neutral_user_defaultmap0.png" iconwidth="32" iconheight="32" shadow="false" iconanchor="center" />
				</marker>



				<marker name="spotmap723" 
					lat="43.147569444444" 
					lng="6.3453722222222" 
					heading="0" 
					draggable="false" 
					animated="false" 
					desc="spotmap723_tooltip" 
					desctype="info" 
					onhover="true" 
					isscene="true" 
					scene="pano259" 
					hasradar="true" 
					jsclick="spotmap723ActionSpotMap">
					<markericon url="spots/hotspot_neutral_user_defaultmap0.png" iconwidth="32" iconheight="32" shadow="false" iconanchor="center" />
				</marker>



				<marker name="spotmap724" 
					lat="43.151544444444" 
					lng="6.3422055555556" 
					heading="0" 
					draggable="false" 
					animated="false" 
					desc="spotmap724_tooltip" 
					desctype="info" 
					onhover="true" 
					isscene="true" 
					scene="pano434" 
					hasradar="true" 
					jsclick="spotmap724ActionSpotMap">
					<markericon url="spots/hotspot_neutral_user_defaultmap0.png" iconwidth="32" iconheight="32" shadow="false" iconanchor="center" />
				</marker>



				<marker name="spotmap725" 
					lat="43.151822222222" 
					lng="6.3420277777778" 
					heading="0" 
					draggable="false" 
					animated="false" 
					desc="spotmap725_tooltip" 
					desctype="info" 
					onhover="true" 
					isscene="true" 
					scene="pano438" 
					hasradar="true" 
					jsclick="spotmap725ActionSpotMap">
					<markericon url="spots/hotspot_neutral_user_defaultmap0.png" iconwidth="32" iconheight="32" shadow="false" iconanchor="center" />
				</marker>



				<marker name="spotmap726" 
					lat="43.150072222222" 
					lng="6.3437111111111" 
					heading="0" 
					draggable="false" 
					animated="false" 
					desc="spotmap726_tooltip" 
					desctype="info" 
					onhover="true" 
					isscene="true" 
					scene="pano442" 
					hasradar="true" 
					jsclick="spotmap726ActionSpotMap">
					<markericon url="spots/hotspot_neutral_user_defaultmap0.png" iconwidth="32" iconheight="32" shadow="false" iconanchor="center" />
				</marker>



				<marker name="spotmap727" 
					lat="43.151113888889" 
					lng="6.3426277777778" 
					heading="0" 
					draggable="false" 
					animated="false" 
					desc="spotmap727_tooltip" 
					desctype="info" 
					onhover="true" 
					isscene="true" 
					scene="pano508" 
					hasradar="true" 
					jsclick="spotmap727ActionSpotMap">
					<markericon url="spots/hotspot_neutral_user_defaultmap0.png" iconwidth="32" iconheight="32" shadow="false" iconanchor="center" />
				</marker>
		


		
	</ptplugin>
	
	<action name="kolorMapJsReady_panotourmaps">
		set(ptplugin[panotourmaps].jsready, true);
	</action>
	
	<ptplugin name="panotourmapsArea" engine="kolorArea">
	<settings>
		<option name="position" value="bottomleft" type="string" />
		<option name="start_position" value="right" type="string" />
		<option name="margin_x" value="10" type="int" />
		<option name="margin_y" value="10" type="int" />
		<option name="background_color" value="f2e29a" type="string" />
		<option name="background_alpha" value="1" type="float" />
		<option name="padding" value="15" type="int" />
		<option name="topleft_radius" value="10" type="int" />
		<option name="topright_radius" value="10" type="int" />
		<option name="bottomleft_radius" value="10" type="int" />
		<option name="bottomright_radius" value="10" type="int" />
		<option name="area_border_width" value="10" type="int" />
		<option name="area_border_color" value="f2f289" type="string" />
		<option name="area_border_alpha" value="1" type="float" />
		<option name="display_title" value="true" type="bool" />
		<option name="title" value="panotourmapsmap_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="close_text" value="panotourmapsdisplay_close_text" type="string" />

		<option name="overlay_displayed" value="false" type="bool" />
		<option name="overlay_color" value="000000" type="string" />
		<option name="overlay_alpha" value="0.50000762951094835" type="float" />

		<option name="area_width" value="20" type="int" />
		<option name="area_height" value="50" type="int" />
		<option name="area_width_unit" value="percent" type="string" />
		<option name="area_height_unit" value="percent" type="string" />
		<option name="animation" value="true" type="bool" />
		<option name="animation_duration" value="3000" type="int" />
		<option name="close_on_click" value="false" type="bool" />
		<option name="refresh_content" value="false" type="bool" />
		<option name="open_callback" value="addKolorMap('panotourmaps', [['openlayersv2','']], 'panotourmapsArea_mapDIV');" type="string" />
		<option name="close_callback" value="invokeKrFunction('closeKolorAreaCallback_panotourmapsArea')" type="string" />
		<option name="zorder" value="8" type="int" />
		<option name="use_i18n" value="true" type="bool" />
	</settings>
	</ptplugin>
	
	<action name="kolorAreaJsReady_panotourmapsArea">
		set(ptplugin[panotourmapsArea].jsready, true);

		inc(tour_autorotation_openatstartplugin);
		set(ptplugin[panotourmapsArea].autorotateBlocked, true);

	</action>
	
	<action name="openKolorArea_panotourmapsArea">
		ifnot(ptplugin[panotourmapsArea].isOpen,
			set(ptplugin[panotourmapsArea].isOpen, true);
			pauseautorotation(forceplugin);

			js(showKolorArea(panotourmapsArea, &lt;div id="panotourmapsArea_mapDIV"&gt;&lt;/div&gt;));
			js(invokePluginFunction(panotourmaps, forceResizeMapLayer, panotourmapsArea_mapDIV));
			events.dispatch(onremovedisplayedobject);
		);
	</action>
	
	<action name="closeKolorArea_panotourmapsArea">
		if(ptplugin[panotourmapsArea].isOpen,
			js(invokePluginFunction(panotourmapsArea, closeKolorArea));
		);
	</action>
	
	<action name="toggleKolorArea_panotourmapsArea">
		if(ptplugin[panotourmapsArea].isOpen,
			closeKolorArea_panotourmapsArea();
		,
			openKolorArea_panotourmapsArea();
		);
	</action>
	
	<action name="closeKolorAreaCallback_panotourmapsArea">
		if(ptplugin[panotourmapsArea].isOpen,resumeautorotation(forceplugin);

			if(ptplugin[panotourmapsArea].autorotateBlocked,if(tour_autorotation_openatstartplugin GT 0,dec(tour_autorotation_openatstartplugin);set(ptplugin[panotourmapsArea].autorotateBlocked,false);););
		);
		set(ptplugin[panotourmapsArea].isOpen, false);hideMap();

	</action>
	
	<action name="showKolorArea_panotourmapsArea">
		set(ptplugin[panotourmapsArea].isOpen, true);
		pauseautorotation(forceplugin);

		js(invokePluginFunction(panotourmapsArea, showKolorArea, %1));
		js(invokePluginFunction(panotourmaps, forceResizeMapLayer, panotourmapsArea_mapDIV));
		events.dispatch(onremovedisplayedobject);
	</action> 
		
	<action name="hideKolorArea_panotourmapsArea">
		resumeautorotation(forceplugin);

		if(ptplugin[panotourmapsArea].autorotateBlocked,if(tour_autorotation_openatstartplugin GT 0,dec(tour_autorotation_openatstartplugin);set(ptplugin[panotourmapsArea].autorotateBlocked,false);););
		set(ptplugin[panotourmapsArea].isOpen, false);
		js(invokePluginFunction(panotourmapsArea, hideKolorArea, %1));
	</action>
	
	
	<action name="updateDefaultMarkerValues_panotourmapsArea">
		if( ptplugin[panotourmaps].markerSelected.name != "",
			set(ptplugin[panotourmaps].markerSelected.heading, get(view.hlookat));
			set(ptplugin[panotourmaps].markerSelected.fov, get(view.hfov));
		);
		
		
		set(loadedState_panotourmapsArea, get(tour_displaycontrols));
		
	</action>
	
	<action name="changeLanguage_panotourmaps">
		if(ptplugin[panotourmaps].jsready,
			stopdelayedcall(delay_panotourmaps);
			js(invokePluginFunction(panotourmapsArea, changeLanguage, false));
		,
			delayedcall(delay_panotourmaps, 0.1, changeLanguage_panotourmaps(););
		);
	</action>
	
	<events name="kolorAreaEvents_panotourmapsArea" 
		keep="true"
		hidetourcontrols="if(loadedState_panotourmapsArea,if(ptplugin[panotourmapsArea].isOpen,set(restore_panotourmapsArea, true);hideKolorArea_panotourmapsArea(false);,set(restore_panotourmapsArea, false);););"
		showtourcontrols="if(tour_displaymap,if(restore_panotourmapsArea,showKolorArea_panotourmapsArea(false);););set(loadedState_panotourmapsArea, get(tour_displaycontrols));"
		onremovepano="if(ptplugin[panotourmapsArea].isOpen,hideMap();
);"
		onhidetourmap="panotourmapsClosetourmap();" 
		onshowtourmap="if(tour_displaymap,panotourmapsOpentourmap(););" 
		
		onTourStart="updateDefaultMarkerValues_panotourmapsArea();panotourmapsOpentourmap();"
		changetourlanguage="changeLanguage_panotourmaps();"
	/>
	
	
		<!-- PanotourMaps markers counter : 12 -->
				<action name="spotmap716ActionSpotMap">if(xml.scene == pano511,if(ptplugin[panotourmapsArea].isOpen,hideMap();
););
          mainloadscene(pano511);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
				<action name="spotmap717ActionSpotMap">if(xml.scene == pano30,if(ptplugin[panotourmapsArea].isOpen,hideMap();
););
          mainloadscene(pano30);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
				<action name="spotmap718ActionSpotMap">if(xml.scene == pano29,if(ptplugin[panotourmapsArea].isOpen,hideMap();
););
          mainloadscene(pano29);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
				<action name="spotmap719ActionSpotMap">if(xml.scene == pano71,if(ptplugin[panotourmapsArea].isOpen,hideMap();
););
          mainloadscene(pano71);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
				<action name="spotmap720ActionSpotMap">if(xml.scene == pano73,if(ptplugin[panotourmapsArea].isOpen,hideMap();
););
          mainloadscene(pano73);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
				<action name="spotmap721ActionSpotMap">if(xml.scene == pano74,if(ptplugin[panotourmapsArea].isOpen,hideMap();
););
          mainloadscene(pano74);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
				<action name="spotmap722ActionSpotMap">if(xml.scene == pano169,if(ptplugin[panotourmapsArea].isOpen,hideMap();
););
          mainloadscene(pano169);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
				<action name="spotmap723ActionSpotMap">if(xml.scene == pano259,if(ptplugin[panotourmapsArea].isOpen,hideMap();
););
          mainloadscene(pano259);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
				<action name="spotmap724ActionSpotMap">if(xml.scene == pano434,if(ptplugin[panotourmapsArea].isOpen,hideMap();
););
          mainloadscene(pano434);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
				<action name="spotmap725ActionSpotMap">if(xml.scene == pano438,if(ptplugin[panotourmapsArea].isOpen,hideMap();
););
          mainloadscene(pano438);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
				<action name="spotmap726ActionSpotMap">if(xml.scene == pano442,if(ptplugin[panotourmapsArea].isOpen,hideMap();
););
          mainloadscene(pano442);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
				<action name="spotmap727ActionSpotMap">if(xml.scene == pano508,if(ptplugin[panotourmapsArea].isOpen,hideMap();
););
          mainloadscene(pano508);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
	


	
	
	
	<!-- Begin PanotourMaps events and actions -->
	<events name="panotourmapsEvents" 
	onxmlcomplete="ifnot(panotourmapsMapLoaded,set(tour_displaymap,true););" 
	onnewpano="panotourmapsActivateDefaultMarker();" 
	onviewchanged="panotourmapsOnviewchange()" 
	keep="true" />
	
	
	<krpano panotourmapsMarkerDefaultSet="false" />
	<krpano panotourmapsMapLoaded="false" />
	
	
	
	<action name="panotourmapsClosetourmap">
		if(ptplugin[panotourmapsArea].isOpen,
			closeKolorArea_panotourmapsArea();
		);
	</action>
	
	<action name="panotourmapsHidetourmap">
		ifnot(ptplugin[panotourmapsArea].isOpen,
			panotourmapsClosetourmap();
		,
			hideKolorArea_panotourmapsArea(true);
		);
	</action>
	
	<action name="panotourmapsOpentourmap">
		ifnot(ptplugin[panotourmapsArea].isOpen,
			openKolorArea_panotourmapsArea();
		);
	</action>
	
	<action name="panotourmapsShowtourmap">
		ifnot(ptplugin[panotourmapsArea].isOpen,
			panotourmapsOpentourmap();
		,
			showKolorArea_panotourmapsArea(true);
		);
	</action>
	
	<action name="panotourmapsChangescene">
		mainloadscene(%1);if(xml.scene != %1,panotourmapsGoMarker(%2););
	</action>
	
	<action name="panotourmapsOnviewchange">
		if ( panotourmapsMapLoaded == true,
			ifnot(ptplugin[panotourmaps].markerSelected.name == "",
				js(invokePluginFunction(panotourmaps, changeDirection, get(view.hlookat), get(view.hfov)));
			);
			updateDefaultMarkerValues_panotourmapsArea();
		);
	</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.hfov));
			js(invokePluginFunction(panotourmaps, changeCurrentMarker, %1, get(view.hlookat), get(view.hfov), get(ptplugin[panotourmaps].centeronspots)));
			
			if( panotourmapsMarkerDefaultSet == false,
				js(setMapDefaultMarker(panotourmaps, %1, get(view.hlookat), get(view.hfov)));
				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>



<!-- ********** -->
<!-- Logo1 -->
<!-- id : logo1 -->
<!-- ********** -->


  <layer align="left"
         x="10"
         y="-350"
         zorder="9"
         name="logo1"
         keep="true"
         visible="false"
         capture="false"

			tooltip="logo1tooltipText"
			onhover="showTooltip('plugin');"
			onout="hideTooltip();"
         url="%FIRSTXML%/graphics/logo1/sans_titre-1.gif" 
         onclick="
getmessage(urltoopen,logo1websiteurl);openurl(get(urltoopen),_blank);
"


         />

  <events name="logo1events" 
    onTourStart="showlogo1();"
    keep="true" />

  <action name="hidelogo1">
    set(layer[logo1].visible, false);
  </action>
  <action name="showlogo1">
      set(layer[logo1].visible, true);
  </action>





<!-- ********** -->
<!-- Logo2 -->
<!-- id : logo2 -->
<!-- ********** -->


  <hotspot ath="0" atv="90"
         zorder="0"
         name="logo2"
         keep="true"
         visible="false"
         capture="false"

         url="%FIRSTXML%/graphics/logo2/agriphoto.fr tres gros.gif" 
         handcursor="false"


         />

  <events name="logo2events" 
    onTourStart="showlogo2();"
    keep="true" />

  <action name="hidelogo2">
    set(hotspot[logo2].visible, false);
  </action>
  <action name="showlogo2">
      set(hotspot[logo2].visible, true);
  </action>



  <events name="logo2showevents" onremovepano="hidelogo2" onPanoStart="showlogo2" keep="true"/>



<!-- ********** -->
<!-- Description -->
<!-- id : description -->
<!-- ********** -->

<ptplugin name="description" canStart="false" newPano="false" openatstart="true" mode="panorama" startMethod="showDescription_description" engine="kolorArea">
	<settings>
		<option name="position" value="left" type="string" />
		<option name="start_position" value="top" type="string" />
		<option name="margin_x" value="10" type="int" />
		<option name="margin_y" value="100" type="int" />
		<option name="background_color" value="f2eeb5" type="string" />
		<option name="background_alpha" value="0.81176470588235294" type="float" />
		<option name="topleft_radius" value="10" type="int" />
		<option name="topright_radius" value="10" type="int" />
		<option name="bottomleft_radius" value="10" type="int" />
		<option name="bottomright_radius" value="10" type="int" />
		<option name="area_border_width" value="10" type="int" />
		<option name="area_border_color" value="f2d055" type="string" />
		<option name="area_border_alpha" value="1" type="float" />
		<option name="padding" value="15" 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="close_text" value="descriptiondisplay_close_text" type="string" />

		<option name="overlay_displayed" value="false" type="bool" />
		<option name="overlay_color" value="000000" type="string" />
		<option name="overlay_alpha" value="0.50000762951094835" type="float" />

		<option name="area_width" value="30" type="int" />
		<option name="area_height" value="50" type="int" />
		<option name="area_width_unit" value="percent" type="string" />
		<option name="area_height_unit" value="percent" type="string" />
		<option name="animation" value="true" type="bool" />
		<option name="animation_duration" value="2000" 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="11" type="int" />
		<option name="use_i18n" value="true" type="bool" />
	</settings>
</ptplugin>

<action name="kolorAreaJsReady_description">
	set(ptplugin[description].jsready, true);

	inc(tour_autorotation_openatstartplugin);
	set(ptplugin[description].autorotateBlocked, true);

</action>

<action name="updateTitle_description">
	js(invokePluginFunction(description, changeTitle, descriptiondescription_title));
</action>

<action name="openKolorArea_description">
	ifnot(ptplugin[description].isOpen,
		set(ptplugin[description].isOpen, true);
		pauseautorotation(forceplugin);

		js(showKolorArea(description, get(ptplugin[description].descID)));
		events.dispatch(onremovedisplayedobject);
	);
</action>

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

<action name="toggleKolorArea_description">
	if(ptplugin[description].isOpen,
		closeKolorArea_description();
	,
		openKolorArea_description();
	);
</action>

<action name="closeKolorAreaCallback_description">
	if(ptplugin[description].isOpen,resumeautorotation(forceplugin);

		if(ptplugin[description].autorotateBlocked,if(tour_autorotation_openatstartplugin GT 0,dec(tour_autorotation_openatstartplugin);set(ptplugin[description].autorotateBlocked,false);););
	);
	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));
	,
		set(ptplugin[description].isOpen, true);
		pauseautorotation(forceplugin);

		js(invokePluginFunction(description, showKolorArea, %1));
		events.dispatch(onremovedisplayedobject);
	);
</action>
	
<action name="hideKolorArea_description">
	resumeautorotation(forceplugin);

	if(ptplugin[description].autorotateBlocked,if(tour_autorotation_openatstartplugin GT 0,dec(tour_autorotation_openatstartplugin);set(ptplugin[description].autorotateBlocked,false);););
	set(ptplugin[description].isOpen, false);
	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);
	if(%1,
		set(restore_description, true);
	,
		set(restore_description, false);
	);
	closeKolorArea_description();
</action> 

<action name="showDescription_description">
	if(ptplugin[description].canStart,
		set(ptplugin[description].descID, get(scene[get(xml.scene)].descriptionid));
		if(ptplugin[description].descID == null,
			set(ptplugin[description].descID, "");
		);
		if(ptplugin[description].descID != "",
			openDescription_description();
		,
			hideKolorArea_description(false);
		);
		set(ptplugin[description].startMethod, "");
	);
</action>


<action name="refreshPanoDescription_description">
	set(ptplugin[description].descID, get(scene[get(xml.scene)].descriptionid));
	if(ptplugin[description].descID == null,
		set(ptplugin[description].descID, "");
	);
	if(ptplugin[description].descID != "",
		if(ptplugin[description].isOpen,
			js(invokePluginFunction(description, updateKolorArea, get(ptplugin[description].descID)));
			updateTitle_description();
		,
			if(restore_description,
				showDescription_description();
			);
		);
	,
		if(tour_displayinfo,
			delayedcall(0.1,showTourInfo();
);
		);
		closeDescription_description(get(ptplugin[description].isOpen));
	);
</action>

<action name="onNewPano_description">
	if(ptplugin[description].newPano,
		if(ptplugin[description].startMethod == "",
			if(ptplugin[description].isOpen,
				refreshPanoDescription_description();
			,
				if(tour_displayinfo,
				showDescription_description();
				,
				refreshPanoDescription_description();
				);
			);
		);
	);
	set(ptplugin[description].newPano, true);
</action>

<action name="changeLanguage_description">
	if(ptplugin[description].jsready,
		stopdelayedcall(delay_description);
		js(invokePluginFunction(description, changeLanguage, true));
	,
		delayedcall(delay_description, 0.1, changeLanguage_description(););
	);
</action>

<events name="kolorAreaEvents_description" 
	keep="true"
	onTourStart="set(ptplugin[description].canStart, true);if(ptplugin[description].openatstart,showTourInfo();
);"
	onshowtourinfo="if(tour_displayinfo,showDescription_description(););"
	onhidetourinfo="if(ptplugin[description].isOpen,closeDescription_description(false););"
	onnewpano="onNewPano_description();"
	changetourlanguage="changeLanguage_description();"
/>

<action name="viewControlZoomIn">
	if(%1,
		if(%2,
			if(%2 LT view.fovmin,
				zoomto(get(view.fovmin));
			,
				if(%2 LT view.fov,
					zoomto(%2);
				);
			);
		,
			set(fov_moveforce, -1);
			delayedcall(0.1, viewControlZoomStop());
		);
	,
		set(fov_moveforce, -1);
	);
</action>
<action name="viewControlZoomOut">
	if(%1,
		if(%2,
			if(%2 GT view.fovmax,
				zoomto(get(view.fovmax));
			,
				if(%2 GT view.fov,
					zoomto(%2);
				);
			);
		,
			set(fov_moveforce, +1);
			delayedcall(0.1, viewControlZoomStop());
		);
	,
		set(fov_moveforce, +1);
	);
</action>
<action name="viewControlZoomStop">
	set(fov_moveforce, 0);
</action>

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


<action name="viewControlMoveUp">
	if(%1,
		if(%2,
			set(isfullvertical, false);
			ifnot(scene[get(xml.scene)].planar,
				sub(viewvfov, panoview.vmax, panoview.vmin);
				if (viewvfov == 180,
					set(isfullvertical, true);
				);
			);
			if(isfullvertical == false AND calc(view.vlookat-%2) LT view.vlookatmin,
				moveto(get(view.hlookat), get(view.vlookatmin));
			,
				moveto(get(view.hlookat), calc(view.vlookat-%2));
			);
		,
			set(vlookat_moveforce, -1);
			delayedcall(0.1, viewControlMoveVertStop());
		);
	,
		set(vlookat_moveforce, -1);
	);
</action>
<action name="viewControlMoveDown">
	if(%1,
		if(%2,
			set(isfullvertical, false);
			ifnot(scene[get(xml.scene)].planar,
				sub(viewvfov, panoview.vmax, panoview.vmin);
				if (viewvfov == 180,
					set(isfullvertical, true);
				);
			);
			if(sceneisfull360 == false AND calc(view.vlookat+%2) GT view.vlookatmax,
				moveto(get(view.hlookat), get(view.vlookatmax));
			,
				moveto(get(view.hlookat), calc(view.vlookat+%2));
			);
		,
			set(vlookat_moveforce, +1);
			delayedcall(0.1, viewControlMoveVertStop());
		);
	,
		set(vlookat_moveforce, +1);
	);
</action>
<action name="viewControlMoveLeft">
	if(%1,
		if(%2,
			set(isfullhorizontal, false);
			ifnot(scene[get(xml.scene)].planar,
				sub(viewhfov, panoview.hmax, panoview.hmin);
				if (viewhfov == 360,
					set(isfullhorizontal, true);
				);
			);
			if(isfullhorizontal == false AND calc(view.hlookat-%2) LT view.hlookatmin,
				moveto(get(view.hlookatmin), get(view.vlookat));
			,
				moveto(calc(view.hlookat-%2), get(view.vlookat));
			);
		,
			set(hlookat_moveforce, -1);
			delayedcall(0.1, viewControlMoveHoriStop());
		);
	,
		set(hlookat_moveforce, -1);
	);
</action>
<action name="viewControlMoveRight">
	if(%1,
		if(%2,
			set(isfullhorizontal, false);
			ifnot(scene[get(xml.scene)].planar,
				sub(viewhfov, panoview.hmax, panoview.hmin);
				if (viewhfov == 360,
					set(isfullhorizontal, true);
				);
			);
			if(isfullhorizontal == false AND calc(view.hlookat+%2) GT view.hlookatmax,
				moveto(get(view.hlookatmax), get(view.vlookat));
			,
				moveto(calc(view.hlookat+%2), get(view.vlookat));
			);
		,
			set(hlookat_moveforce, +1);
			delayedcall(0.1, viewControlMoveHoriStop());
			
		);
	,
		set(hlookat_moveforce, +1);
	);
</action>
<action name="viewControlMoveHoriStop">
	set(hlookat_moveforce, 0);
</action>
<action name="viewControlMoveVertStop">
	set(vlookat_moveforce, 0);
</action>

  <!-- Sounds Management -->
  <plugin name="soundinterface"
          preload="true"
          url.flash="%SWFPATH%/graphics/soundinterface.swf"
          url.html5="%FIRSTXML%/graphics/soundinterface.js"
          rootpath="%$videos_sounds_path%/sounds"
          backgroundsound=""
          backgroundsoundloops="0"
          bgsound="false"
          bgsoundpaused="false"
          bgsoundloopended="false"
          bgsoundtoforce = "false"
          volumeinitialized="false"
          started="true"
          keep="true"/>
  <events name="soundmanagementevents"
          onnewpano="if(plugin[soundinterface].started,playbackgroundsound(););"
          onxmlcomplete="soundinterfaceonxmlcomplete();"
          keep="true"/>
  <action name="soundinterfaceonxmlcomplete">
    ifnot(plugin[soundinterface].volumeinitialized,
      div(plugin[soundinterface].volume, tour_soundsvolume, 100);
      set(plugin[soundinterface].volumeinitialized,true);
    );
  </action>
  <action name="playsound3Dwhenpossible">
    set(really_play_sound, true);
    if (tour_current_played_sound,
      if (%1 == tour_current_played_sound,
        delete(tour_current_played_sound);
        set(tour_current_played_sound_state, 0);
        delete(tour_current_played_sound_paused);
        stopsound(%1);
        set(really_play_sound, false);
        if(%4,
          delete(tour_current_played_sound_pausesound);
          resumeTourSoundsActions(true,true,true,true,true);
        );
      );
    );
    if (really_play_sound,
      if (tour_current_played_sound,
        stopsound(get(tour_current_played_sound));

        ifnot(%4,
          if(tour_current_played_sound_pausesound,
            delete(tour_current_played_sound_pausesound);
            resumeTourSoundsActions(true,true,true,true,true);
          );
        );
      );
      if(%4,
        set(tour_current_played_sound_pausesound, true);
        pauseTourSoundsActions(true,false,true,true,true);
      );
      set(tour_current_played_sound, %1);
      if(tour_current_played_video,
        set(tour_current_played_sound_state, 2);
      ,
        set(tour_current_played_sound_state, 1);
      );
      set(tour_current_played_sound_paused, false);
      if (%3,
        if (device.flash,
          div(volume, tour_soundsvolume, 100);
          if(%9 != null,
            playsound3D(%1,%2,%5,%6,%7,get(volume),%8,stopsound3Dwhenpossible(%1,%4));
          ,
            playsound3D(%1,%2,%5,%6,%7,get(volume),%8);
          );
        ,
          if(%9 != null,
            playsound(%1,%2,%8,stopsound3Dwhenpossible(%1,%4));
          ,
            playsound(%1,%2,%8);
          );
        );
      ,
        if(%6 != null,
          playsound(%1,%2,%5,stopsound3Dwhenpossible(%1,%4));
        ,
          playsound(%1,%2,%5);
        );
      );

      ifnot(tour_soundson,
        set(tour_current_played_sound_paused, true);
        pausesound(%1);
      );
    );
  </action>
  <action name="stopsound3Dwhenpossible">
    if (%1 == tour_current_played_sound,
      delete(tour_current_played_sound);
      set(tour_current_played_sound_state, 0);
      delete(tour_current_played_sound_paused);

      ifnot(device.safari,
        stopsound(%1);
      );
      if(%2,
        delete(tour_current_played_sound_pausesound);
        resumeTourSoundsActions(true,true,true,true,true);
      );
    );
  </action>
  <action name="playbackgroundsound">
  if(playsound,
    if (xml.scene,
      if (scene[get(xml.scene)].backgroundsound,
        if (plugin[soundinterface].backgroundsound != scene[get(xml.scene)].backgroundsound,
          copy(plugin[soundinterface].backgroundsound, scene[get(xml.scene)].backgroundsound);
          copy(plugin[soundinterface].backgroundsoundloops, scene[get(xml.scene)].backgroundsoundloops);
          if (tour_soundson,
            set(plugin[soundinterface].bgsound, true);
            set(plugin[soundinterface].bgsoundpaused, false);
            set(plugin[soundinterface].bgsoundloopended, false);
            set(plugin[soundinterface].bgsoundtoforce, false);
            if(scene[get(xml.scene)].video == false OR (scene[get(xml.scene)].video == true AND scene[get(xml.scene)].scenevideomute == true),
              if(plugin[soundinterface].backgroundsoundloops GT 0,
                playsound(bgsoundname, get(plugin[soundinterface].backgroundsound), get(plugin[soundinterface].backgroundsoundloops), stopbackgroundsoundoncomplete());
              ,
                playsound(bgsoundname, get(plugin[soundinterface].backgroundsound), get(plugin[soundinterface].backgroundsoundloops));
              );
            );
           ,
            set(plugin[soundinterface].bgsoundtoforce, true);
            set(plugin[soundinterface].bgsound, false);
          );
        ,
          if (tour_soundson,
            if((plugin[soundinterface].bgsoundpaused == true AND scene[get(xml.scene)].video == false) OR (scene[get(xml.scene)].video == true AND scene[get(xml.scene)].scenevideomute == true),
              resumesound(bgsoundname);
              set(plugin[soundinterface].bgsoundpaused, false);
            );
          ,
            set(plugin[soundinterface].bgsoundtoforce, true);
            set(plugin[soundinterface].bgsound, false);
          );
        );
      );
    );
  ,
    delayedcall(0.2, playbackgroundsound());
  );
  </action>
  <action name="stopbackgroundsoundoncomplete">
    if (plugin[soundinterface].backgroundsound,
    if (plugin[soundinterface].backgroundsoundloops GT 0,

      set(plugin[soundinterface].backgroundsoundloops, 0);
      set(plugin[soundinterface].bgsound, false);
      set(plugin[soundinterface].bgsoundpaused, false);
      set(plugin[soundinterface].bgsoundloopended, true);
    );
    );
  </action>
  <action name="resetbackgroundsoundifneeded">
    if (xml.scene,
      if (scene[get(xml.scene)].backgroundsound != scene[%1].backgroundsound,
        if(plugin[soundinterface].backgroundsound,
          stopsound(bgsoundname);
        );
        set(plugin[soundinterface].backgroundsound, "");
        set(plugin[soundinterface].backgroundsoundloops, 0);
        set(plugin[soundinterface].bgsound, false);
        set(plugin[soundinterface].bgsoundpaused, false);
        set(plugin[soundinterface].bgsoundloopended, false);
      );
    );
  </action>
  <action name="pausebackgroundsound">
    if(plugin[soundinterface].backgroundsound,
      if (plugin[soundinterface].bgsound,
        if(plugin[soundinterface].bgsoundpaused == false AND plugin[soundinterface].bgsoundloopended == false,
          pausesound(bgsoundname);
          set(plugin[soundinterface].bgsoundpaused, true);
        );
      );
    );
    
  </action>
  <action name="resumebackgroundsound">
    set(bgSoundOnResume, true);
    set(forceBgSoundOnResume, true);
    if(layer[displayedStandardVideo],
    if(layer[displayedStandardVideo].pausebgsound AND tour_current_played_video,
      set(bgSoundOnResume, false);
      set(forceBgSoundOnResume, false);
    ););
    if(layer[webvideodisplay_player],
    if(layer[webvideodisplay_player].pausebgsound AND tour_current_played_web_video,
      set(bgSoundOnResume, false);
      set(forceBgSoundOnResume, false);
    ););
    if(tour_current_played_sound_pausesound AND tour_current_played_sound,
      set(bgSoundOnResume, false);
    );
    ifnot(plugin[soundinterface].backgroundsound AND scene[get(xml.scene)].backgroundsound,
      set(bgSoundOnResume, false);
    );
    if(videospots_playing GT 0,
      set(bgSoundOnResume, false);
      set(forceBgSoundOnResume, false);
    );
    if(bgSoundOnResume,
      if (plugin[soundinterface].backgroundsound,
        if (tour_soundson,
          if (plugin[soundinterface].bgsound AND plugin[soundinterface].bgsoundloopended == false,
            if((plugin[soundinterface].bgsoundpaused == true AND scene[get(xml.scene)].video == false) OR (scene[get(xml.scene)].video == true AND scene[get(xml.scene)].scenevideomute == true),
              resumesound(bgsoundname);
              set(plugin[soundinterface].bgsoundpaused, false);
            ,

              if(device.mobile OR device.tablet OR device.safari OR device.chrome,
                resumesound(bgsoundname);
                set(plugin[soundinterface].bgsoundpaused, false);
              );
            );
          ,
            if(((plugin[soundinterface].bgsoundpaused == true OR plugin[soundinterface].bgsoundtoforce == true) AND scene[get(xml.scene)].video == false) OR (scene[get(xml.scene)].video == true AND scene[get(xml.scene)].scenevideomute == true),
              set(plugin[soundinterface].bgsound, true);
              set(plugin[soundinterface].bgsoundpaused, false);
              set(plugin[soundinterface].bgsoundloopended, false);
              set(plugin[soundinterface].bgsoundtoforce, false);
              if(plugin[soundinterface].backgroundsoundloops GT 0,
                playsound(bgsoundname, get(plugin[soundinterface].backgroundsound), get(plugin[soundinterface].backgroundsoundloops), stopbackgroundsoundoncomplete());
              ,
                playsound(bgsoundname, get(plugin[soundinterface].backgroundsound), get(plugin[soundinterface].backgroundsoundloops));
              );
            );
          );
        );
      );
      
    ,
      if(forceBgSoundOnResume,
        playbackgroundsound();
        
      );
    );
  </action>
  <action name="preloadSounds">
    preloadsound("_08_mozart-_flute_concerto__2_in_d__k_314_-_3. rondo- allegro.mp3");
  </action>

  <action name="play3DLocalSounds">
    if (xml.scene, if (scene[get(xml.scene)].haslocalsounds, playpanolocalsounds();););
  </action>
  <action name="stop3DLocalSounds">
    if (xml.scene, if (scene[get(xml.scene)].haslocalsounds, stoppanolocalsounds();););
  </action>
  <action name="resume3DLocalSounds">
    if (xml.scene, if (scene[get(xml.scene)].haslocalsounds, 
      set(kill3dSoundOnResume, true);
      if(layer[displayedStandardVideo],
      if(layer[displayedStandardVideo].pausebgsound,
      if(tour_current_played_video,
        set(kill3dSoundOnResume, false);
      );););
      if(layer[webvideodisplay_player],
      if(layer[webvideodisplay_player].pausebgsound,
      if(tour_current_played_web_video,
        set(kill3dSoundOnResume, false);
      );););
      if(tour_current_played_sound_pausesound,
      if(tour_current_played_sound,
        set(kill3dSoundOnResume, false);
      ););
      if(kill3dSoundOnResume,
        resumepanolocalsounds();
      );
    ););
  </action>
  <action name="pause3DLocalSounds">
    if (xml.scene, if (scene[get(xml.scene)].haslocalsounds, pausepanolocalsounds();););
  </action>
  <action name="set3DLocalSoundsVolume">
    if (xml.scene, if (scene[get(xml.scene)].haslocalsounds, setpanolocalsoundsvolume();););
  </action>
  <action name="playTourSounds">
    set(tour_soundson, true);events.dispatch(playtoursoundsevent);
    resumeTourSoundsActions(true,true,true,true,true);
  </action>
  <action name="stopTourSounds">
    set(tour_soundson, false);events.dispatch(stoptoursoundsevent);
    pauseTourSoundsActions(true,true,true,true,true);
  </action>
  <action name="setTourSoundsVolume">
    set(tour_soundsvolume, %1);events.dispatch(changetoursoundsevent);
    div(volume, tour_soundsvolume, 100);
    set(plugin[soundinterface].volume, get(volume));
    set3DLocalSoundsVolume();
  </action>
  <action name="playTourSoundsActions">
    if(%1,
      if(plugin[soundinterface],
        if(plugin[soundinterface].started,
        play3DLocalSounds();
        );
      );
    );
    if(%2,
      if(plugin[soundinterface],
        if(plugin[soundinterface].started,
          resumebackgroundsound();
        );
      );
    );
  </action>
  <action name="stopTourSoundsActions">
    if(%1,
      stop3DLocalSounds();
    );
    if(%2,
      stopSoundActionsSounds();
    );
    if(%3,
      stopVideoActionsSounds();
    );
    if(%4,
      pausebackgroundsound();
    );
  </action>
  <action name="resumeTourSoundsActions">
    if(%1,
      if(plugin[soundinterface],
        if(plugin[soundinterface].started,
        resume3DLocalSounds();
        );
      );
    );
    if(%2,
      resumeSoundActionsSounds();
    );
    if(%3,
      resumeVideoActionsSounds();
    );
    if(%4,
      if(%5,
        if(plugin[soundinterface],
          if(plugin[soundinterface].started,
            resumebackgroundsound();
          );
        );
      ,
        pausebackgroundsound();
      );
    );
  </action>
  <action name="pauseTourSoundsActions">
    if(%1,
      pause3DLocalSounds();
    );
    if(%2,
      pauseSoundActionsSounds();
    );
    if(%3,
      pauseVideoActionsSounds();
    );
    if(%4,
      if(%5,
        pausebackgroundsound();
      ,
        if(plugin[soundinterface],
          if(plugin[soundinterface].started,
            resumebackgroundsound();
          );
        );
      );
    );
  </action>
  <action name="stopSoundActionsSounds">
    if (tour_current_played_sound,
      delete(tour_current_played_sound_paused);
      stopsound(get(tour_current_played_sound));
      delete(tour_current_played_sound);
      set(tour_current_played_sound_state, 0);
    );
  </action>
  <action name="stopVideoActionsSounds">
    if(tour_current_played_video,
      if(layer[displayedStandardVideo],
        layer[displayedStandardVideo].stop();
        removelayer(displayedStandardVideo);
        if(layer[displayedStandardVideoOverlayButton], removelayer(displayedStandardVideoOverlayButton); );
        if(layer[displayedStandardVideoOverlay], removelayer(displayedStandardVideoOverlay); );
        delete(tour_current_played_video);
        set(tour_current_played_video_state, 0);
      );
    );
    if(tour_current_played_web_video,
      displayWebVideoObjectClose();
    );
  </action>
  <action name="resumeSoundActionsSounds">
    if (tour_current_played_sound,
      set(resumeSoundActionsVerification, true);
      if(tour_current_played_video,
        if(tour_current_played_sound_state LT tour_current_played_video_state,
          set(resumeSoundActionsVerification, false);
        );
      );
      if(resumeSoundActionsVerification,
        if (tour_soundson,
          if(tour_current_played_sound_paused,
            set(tour_current_played_sound_paused, false);
            resumesound(get(tour_current_played_sound));
          ,

            if(device.mobile OR device.tablet OR device.safari OR device.chrome,
              set(tour_current_played_sound_paused, false);
              resumesound(get(tour_current_played_sound));
            );
          );
        );
      );
    );
  </action>
  <action name="resumeVideoActionsSounds">
    if(tour_current_played_video,
      set(resumeVideoActionsVerification, true);
      if(tour_current_played_sound,
        if(tour_current_played_video_state LT tour_current_played_sound_state,
          set(resumeVideoActionsVerification, false);
        );
      );
      if(resumeVideoActionsVerification,
        if (tour_soundson,
          if(device.flash OR (device.webgl AND !device.ios),
            div(volume, tour_soundsvolume, 100);
            set(layer[displayedStandardVideo].volume, get(volume));
          ,
            ifnot(device.ios,
              js(kpanotour.Sounds.startVideosSounds(get(volume)));
            ,
              if(tour_soundsvolume GT 0,
                set(layer[displayedStandardVideo].muted, false);
              ,
                set(layer[displayedStandardVideo].muted, true);
              );
            );
          );
        ,
          if(device.flash OR (device.webgl AND !device.ios),
            set(layer[displayedStandardVideo].volume, 0);
          ,
            ifnot(device.ios,
              js(kpanotour.Sounds.stopVideosSounds());
            ,
              set(layer[displayedStandardVideo].muted, true);
            );
          );
        );
      );
    );
  </action>
  <action name="pauseSoundActionsSounds">
    if (tour_current_played_sound,
      ifnot(tour_current_played_sound_paused,
        set(tour_current_played_sound_paused, true);
        pausesound(get(tour_current_played_sound));
      );
    );
  </action>
  <action name="pauseVideoActionsSounds">
    if(tour_current_played_video,
      if(device.flash OR (device.webgl AND !device.ios),
        set(layer[displayedStandardVideo].volume, 0);
      ,
        ifnot(device.ios,
          js(kpanotour.Sounds.stopVideosSounds());
        ,
          set(layer[displayedStandardVideo].muted, true);
        );
      );
    );
  </action>

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

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


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

	<plugin name="ptpvrmode" devices="html5" keep="true"
		url="%FIRSTXML%/graphics/webvr.js"
		mobilevr_support="true"
		mobilevr_fake_support="false"
		vr_cursor=""
		vr_cursor_enabled="false"
		onavailable="delayedcall(1, checkVrAvailability(););"
		onunavailable="checkVrUnavailable();"
		/>
	<action name="checkVrAvailability">
		if(plugin[ptpvrmode],
			if (plugin[ptpvrmode].isavailable,
				set(tour_vrdevices, true);
				events.dispatch(onvravailable);
			,
				set(tour_vrdevices, false);
			);
		,
			checkVrUnavailable();
		);
	</action>
	<action name="checkVrUnavailable">
		set(tour_vrdevices, false);
		events.dispatch(onvrunavailable);
	</action>
  <action name="displayImage">
    if (layer[displayedStandardImage],
      if(layer[displayedStandardImage].doNotDeleteMe,
        set(layer[displayedStandardImage].currentCall, false);
        set(layer[displayedStandardImage].doNotDeleteMe, false);
        
        if (%1 == layer[displayedStandardImage].url,
          applyDisplayedImageObjectAnimation(%8);
        ,
          setDisplayedImageObjectParameters(%1, %2, %3, %4, %5, %6, %7, %8, %9, %10);
        );
      ,
        set(layer[displayedStandardImage].currentCall, false);
        set(layer[displayedStandardImage].doNotDeleteMe, true);
        events.dispatch(onremovedisplayedobject);
        delayedcall(0.2,displayImage(%1, %2, %3, %4, %5, %6, %7, %8, %9, %10, %11, %12););
      );
    ,
      if(%10,
        addlayer(displayedStandardImageOverlay);
        set(layer[displayedStandardImageOverlay].keep, false);
        set(layer[displayedStandardImageOverlay].width, 100%);
        set(layer[displayedStandardImageOverlay].height, 100%);
        set(layer[displayedStandardImageOverlay].type, container);
        set(layer[displayedStandardImageOverlay].zorder, 98);
        set(layer[displayedStandardImageOverlay].visible, false);
        set(layer[displayedStandardImageOverlay].onclick, applyDisplayedImageObjectAnimation(%8););
        set(layer[displayedStandardImageOverlay].bgcolor, "0x%11");
        set(layer[displayedStandardImageOverlay].bgalpha, %12);
        set(layer[displayedStandardImageOverlay].bgcapture, true);
      );
      addlayer(displayedStandardImage);
      set(layer[displayedStandardImage].keep, false);
      set(layer[displayedStandardImage].onclick, applyDisplayedImageObjectAnimation(%8););
      set(layer[displayedStandardImage].zorder , 99);
      set(layer[displayedStandardImage].currentCall, true);
      set(layer[displayedStandardImage].doNotDeleteMe, true);
      set(layer[displayedStandardImage].onloaded, resizeDisplayedImageObject());
      events.dispatch(onremovedisplayedobject);
      delayedcall(0.2,displayImage(%1, %2, %3, %4, %5, %6, %7, %8, %9, %10, %11, %12););
      set(layer[displayedStandardImage].visible, false);
    );
  </action>
  <action name="applyDisplayedImageObjectAnimation">resumeautorotation(forcehotspot);

    if (%1,
      stoptween(layer[displayedStandardImage].width, layer[displayedStandardImage].height);
      tween(layer[displayedStandardImage].width|layer[displayedStandardImage].height, 1|1, 1, easeOutQuad, WAIT);
      if(layer[displayedStandardImage].overlay,removelayer(displayedStandardImageOverlay););removelayer(displayedStandardImage);
    ,
      if(layer[displayedStandardImage].overlay,removelayer(displayedStandardImageOverlay););removelayer(displayedStandardImage);
    );
  </action>
  <action name="setDisplayedImageObjectParameters">
    set(layer[displayedStandardImage].url       , %1);
    set(layer[displayedStandardImage].align     , %2);
    set(layer[displayedStandardImage].x         , %3);
    set(layer[displayedStandardImage].y         , %4);
    set(layer[displayedStandardImage].imgwidth  , %5);
    set(layer[displayedStandardImage].imgheight , %6);
    set(layer[displayedStandardImage].animated  , %8);
    set(layer[displayedStandardImage].applyratio, %9);
    set(layer[displayedStandardImage].overlay   , %10);
    if (%7,pauseautorotation(forcehotspot);
);
  </action>
  <action name="resizeDisplayedImageObject">
    if(layer[displayedStandardImage].url,
    set(layer[displayedStandardImage].fullwidth, get(layer[displayedStandardImage].width));
    set(layer[displayedStandardImage].fullheight, get(layer[displayedStandardImage].height));
    if(layer[displayedStandardImage].animated,
      set(layer[displayedStandardImage].width , 1);
      set(layer[displayedStandardImage].height, 1);
    );
    if(layer[displayedStandardImage].imgwidth != "" AND layer[displayedStandardImage].imgheight != "",
      if(layer[displayedStandardImage].imgwidth == "prop",
        set(tempDisplayedImageObjectHeight, get(layer[displayedStandardImage].imgheight));
        indexoftxt(tempDisplayedImageObjectHeightPercent, get(tempDisplayedImageObjectHeight), "%");
        if(tempDisplayedImageObjectHeightPercent GT 0,
          txtreplace(tempDisplayedImageObjectHeight, '%', '');
          mul(tempDisplayedImageObjectHeight, get(stageheight));
          div(tempDisplayedImageObjectHeight, 100);
          Math.round(tempDisplayedImageObjectHeight);
        );
        mul(flyingImgWidth,get(layer[displayedStandardImage].fullwidth),get(tempDisplayedImageObjectHeight));
        div(flyingImgWidth,get(layer[displayedStandardImage].fullheight));
        Math.round(flyingImgWidth);
        set(layer[displayedStandardImage].imgwidth , get(flyingImgWidth));
        set(layer[displayedStandardImage].imgheight, get(tempDisplayedImageObjectHeight));
      ,
        if(layer[displayedStandardImage].imgheight == "prop",
          set(tempDisplayedImageObjectWidth, get(layer[displayedStandardImage].imgwidth));
          indexoftxt(tempDisplayedImageObjectWidthPercent, get(tempDisplayedImageObjectWidth), "%");
          if(tempDisplayedImageObjectWidthPercent GT 0,
            txtreplace(tempDisplayedImageObjectWidth, '%', '');
            mul(tempDisplayedImageObjectWidth, get(stagewidth));
            div(tempDisplayedImageObjectWidth, 100);
            Math.round(tempDisplayedImageObjectWidth);
          );
          mul(flyingImgHeight,get(layer[displayedStandardImage].fullheight),get(tempDisplayedImageObjectWidth));
          div(flyingImgHeight,get(layer[displayedStandardImage].fullwidth));
          Math.round(flyingImgHeight);
          set(layer[displayedStandardImage].imgwidth , get(tempDisplayedImageObjectWidth));
          set(layer[displayedStandardImage].imgheight , get(flyingImgHeight));
        ,
          set(tempDisplayedImageObjectWidth, get(layer[displayedStandardImage].imgwidth));
          set(tempDisplayedImageObjectHeight, get(layer[displayedStandardImage].imgheight));
          indexoftxt(tempDisplayedImageObjectWidthPercent, get(tempDisplayedImageObjectWidth), "%");
          indexoftxt(tempDisplayedImageObjectHeightPercent, get(tempDisplayedImageObjectHeight), "%");
          if(tempDisplayedImageObjectWidthPercent GT 0,
            txtreplace(tempDisplayedImageObjectWidth, '%', '');
            mul(tempDisplayedImageObjectWidth, get(stagewidth));
            div(tempDisplayedImageObjectWidth, 100);
            Math.round(tempDisplayedImageObjectWidth);
          );
          if(tempDisplayedImageObjectHeightPercent GT 0,
            txtreplace(tempDisplayedImageObjectHeight, '%', '');
            mul(tempDisplayedImageObjectHeight, get(stageheight));
            div(tempDisplayedImageObjectHeight, 100);
            Math.round(tempDisplayedImageObjectHeight);
          );
          set(layer[displayedStandardImage].imgwidth , get(tempDisplayedImageObjectWidth));
          set(layer[displayedStandardImage].imgheight, get(tempDisplayedImageObjectHeight));
        );
      );
    ,
      set(layer[displayedStandardImage].imgwidth , get(layer[displayedStandardImage].fullwidth));
      set(layer[displayedStandardImage].imgheight, get(layer[displayedStandardImage].fullheight));
    );
    
    set(resizedwidth, get(layer[displayedStandardImage].imgwidth));
    set(resizedheight, get(layer[displayedStandardImage].imgheight));
    if(layer[displayedStandardImage].applyratio,
      sub(resizedstagewidth, get(stagewidth), get(layer[displayedStandardImage].x));
      sub(resizedstageheight, get(stageheight), get(layer[displayedStandardImage].y));
      Math.abs(resizedstagewidth);
      Math.abs(resizedstageheight);
      if(resizedwidth GT resizedstagewidth,
        mul(tempresizedheight, get(resizedheight), get(resizedstagewidth));
        div(tempresizedheight, get(resizedwidth));
        Math.round(tempresizedheight);
        set(resizedwidth, get(resizedstagewidth));
        set(resizedheight, get(tempresizedheight));
      );
      if(resizedheight GT resizedstageheight,
        mul(tempresizedwidth, get(resizedwidth), get(resizedstageheight));
        div(tempresizedwidth, get(resizedheight));
        Math.round(tempresizedwidth);
        set(resizedheight, get(resizedstageheight));
        set(resizedwidth, get(tempresizedwidth));
      );
    );
    
    if(layer[displayedStandardImage].animated,
      set(layer[displayedStandardImage].animated, false);
      tween(layer[displayedStandardImage].width , get(resizedwidth), 1, easeOutQuad);
      tween(layer[displayedStandardImage].height, get(resizedheight), 1, easeOutQuad);
    ,
      set(layer[displayedStandardImage].width , get(resizedwidth));
      set(layer[displayedStandardImage].height, get(resizedheight));
    );
    if(layer[displayedStandardImage].overlay,set(layer[displayedStandardImageOverlay].visible, true););
    set(layer[displayedStandardImage].visible, true);
    ,
      delayedcall(0.2,resizeDisplayedImageObject(););
    );
  </action>
  <events name="displayedImageObjectEvents" keep="true" onremovedisplayedobject="displayedImageObjectOnRemoveDisplayedObject" onresize="if(layer[displayedStandardImage],resizeDisplayedImageObject());" />
  <action name="displayedImageObjectOnRemoveDisplayedObject">
    ifnot(layer[displayedStandardImage].currentCall,if(layer[displayedStandardImage].visible,resumeautorotation(forcehotspot);

      if(layer[displayedStandardImage].overlay,removelayer(displayedStandardImageOverlay););
      removelayer(displayedStandardImage);
    ););
  </action>


</krpano>