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

    
  <!-- Spot Style - DROITE -->


  <style name="IconDROITE"
         url="%FIRSTXML%/spots/hotspot_direction_sequence_user_defaultpoint1.png"
         visible="false"
         frame="0"
         lastframe="18"
         framewidth="50"
         frameheight="50"
         stopspotsequence="false"
         crop="0|0|50|50"
         edge="center"
         onloaded="startspotanimation(0.1);"
         onhover="onhoverIconDROITE"
         onover="onoverIconDROITE"
         onout="onoutIconDROITE"

         height="38"
         width="38"
         />
  <action name="onhoverIconDROITE">
    showtooltip('hotspot');
  </action>
  <action name="onoverIconDROITE">
tween(scale, 1.2);

pauseautorotation(forcehotspot);

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

resumeautorotation(forcehotspot);

  </action>



    
  <!-- Spot Style - GAUCHE -->


  <style name="IconGAUCHE"
         url="%FIRSTXML%/spots/hotspot_direction_sequence_user_defaultpoint2.png"
         visible="false"
         frame="0"
         lastframe="18"
         framewidth="50"
         frameheight="50"
         stopspotsequence="false"
         crop="0|0|50|50"
         edge="center"
         rotate="180"
         onloaded="startspotanimation(0.1);"
         onhover="onhoverIconGAUCHE"
         onover="onoverIconGAUCHE"
         onout="onoutIconGAUCHE"

         height="38"
         width="38"
         />
  <action name="onhoverIconGAUCHE">
    showtooltip('hotspot');
  </action>
  <action name="onoverIconGAUCHE">
tween(scale, 1.2);

pauseautorotation(forcehotspot);

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

resumeautorotation(forcehotspot);

  </action>



    
  <!-- Spot Style - HAUT -->


  <style name="IconHAUT"
         url="%FIRSTXML%/spots/hotspot_direction_sequence_user_defaultpoint6.png"
         visible="false"
         frame="0"
         lastframe="18"
         framewidth="50"
         frameheight="50"
         stopspotsequence="false"
         crop="0|0|50|50"
         edge="center"
         rotate="270"
         onloaded="startspotanimation(0.1);"
         onhover="onhoverIconHAUT"
         onover="onoverIconHAUT"
         onout="onoutIconHAUT"

         height="38"
         width="38"
         />
  <action name="onhoverIconHAUT">
    showtooltip('hotspot');
  </action>
  <action name="onoverIconHAUT">
tween(scale, 1.2);

pauseautorotation(forcehotspot);

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

resumeautorotation(forcehotspot);

  </action>



    
  <!-- Spot Style - POINT INFO 1 -->


  <style name="IconPOINTINFO1"
         url="%FIRSTXML%/spots/hotspot_information_sequence_user_defaultpoint10.png"
         visible="false"
         frame="0"
         lastframe="9"
         framewidth="50"
         frameheight="50"
         stopspotsequence="false"
         crop="0|0|50|50"
         edge="center"
         onloaded="startspotanimation(0.1);"
         onhover="onhoverIconPOINTINFO1"
         onover="onoverIconPOINTINFO1"
         onout="onoutIconPOINTINFO1"

         height="44"
         width="44"
         />
  <action name="onhoverIconPOINTINFO1">
    showtooltip('hotspot');
  </action>
  <action name="onoverIconPOINTINFO1">
tween(scale, 1.2);

pauseautorotation(forcehotspot);

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

resumeautorotation(forcehotspot);

  </action>



    
  <!-- Spot Style - BAS GAUCHE -->


  <style name="IconBASGAUCHE"
         url="%FIRSTXML%/spots/hotspot_direction_sequence_user_defaultpoint5.png"
         visible="false"
         frame="0"
         lastframe="18"
         framewidth="50"
         frameheight="50"
         stopspotsequence="false"
         crop="0|0|50|50"
         edge="center"
         rotate="135"
         onloaded="startspotanimation(0.1);"
         onhover="onhoverIconBASGAUCHE"
         onover="onoverIconBASGAUCHE"
         onout="onoutIconBASGAUCHE"

         height="38"
         width="38"
         />
  <action name="onhoverIconBASGAUCHE">
    showtooltip('hotspot');
  </action>
  <action name="onoverIconBASGAUCHE">
tween(scale, 1.2);

pauseautorotation(forcehotspot);

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

resumeautorotation(forcehotspot);

  </action>



    
  <!-- Spot Style - HAUT DROITE -->


  <style name="IconHAUTDROITE"
         url="%FIRSTXML%/spots/hotspot_direction_sequence_user_defaultpoint7.png"
         visible="false"
         frame="0"
         lastframe="18"
         framewidth="50"
         frameheight="50"
         stopspotsequence="false"
         crop="0|0|50|50"
         edge="center"
         rotate="315"
         onloaded="startspotanimation(0.1);"
         onhover="onhoverIconHAUTDROITE"
         onover="onoverIconHAUTDROITE"
         onout="onoutIconHAUTDROITE"

         height="38"
         width="38"
         />
  <action name="onhoverIconHAUTDROITE">
    showtooltip('hotspot');
  </action>
  <action name="onoverIconHAUTDROITE">
tween(scale, 1.2);

pauseautorotation(forcehotspot);

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

resumeautorotation(forcehotspot);

  </action>



    
  <!-- Spot Style - POINT INFO 2 -->


  <style name="IconPOINTINFO2"
         url="%FIRSTXML%/spots/hotspot_information_black_sequence_user_defaultpoint111.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="onhoverIconPOINTINFO2"
         onover="onoverIconPOINTINFO2"
         onout="onoutIconPOINTINFO2"

         height="30"
         width="30"
         />
  <action name="onhoverIconPOINTINFO2">
    showtooltip('hotspot');
  </action>
  <action name="onoverIconPOINTINFO2">
tween(scale, 1.2);

pauseautorotation(forcehotspot);

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

resumeautorotation(forcehotspot);

  </action>



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


  <!-- Sounds Management -->

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

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

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

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

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

  <action name="enableGyroscope">
    changeGyroscopeState(true);
  </action>
  <action name="disableGyroscope">
    changeGyroscopeState(false);
  </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>


</krpano>