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

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


    
  <!-- Spot Style - BAS DROITE 1 -->


  <style name="IconBASDROITE1"
         url="%FIRSTXML%/spots/hotspot_direction_sequence_user_defaultpoint13.png"
         visible="false"
         frame="0"
         lastframe="18"
         framewidth="50"
         frameheight="50"
         stopspotsequence="false"
         crop="0|0|50|50"
         edge="center"
         rotate="45"
         onloaded="startspotanimation(0.1);"
         onhover="onhoverIconBASDROITE1"
         onover="onoverIconBASDROITE1"
         onout="onoutIconBASDROITE1"

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

pauseautorotation(forcehotspot);

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

resumeautorotation(forcehotspot);

  </action>



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


  <style name="IconBASGAUCHE1"
         url="%FIRSTXML%/spots/hotspot_direction_sequence_user_defaultpoint14.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="onhoverIconBASGAUCHE1"
         onover="onoverIconBASGAUCHE1"
         onout="onoutIconBASGAUCHE1"

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

pauseautorotation(forcehotspot);

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

resumeautorotation(forcehotspot);

  </action>



    
  <!-- Spot Style - DROITE 1 -->


  <style name="IconDROITE1"
         url="%FIRSTXML%/spots/hotspot_direction_sequence_user_defaultpoint15.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="onhoverIconDROITE1"
         onover="onoverIconDROITE1"
         onout="onoutIconDROITE1"

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

pauseautorotation(forcehotspot);

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

resumeautorotation(forcehotspot);

  </action>



    
  <!-- Spot Style - GAUCHE 1 -->


  <style name="IconGAUCHE1"
         url="%FIRSTXML%/spots/hotspot_direction_sequence_user_defaultpoint16.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="onhoverIconGAUCHE1"
         onover="onoverIconGAUCHE1"
         onout="onoutIconGAUCHE1"

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

pauseautorotation(forcehotspot);

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

resumeautorotation(forcehotspot);

  </action>



    
  <!-- Spot Style - HAUT 1 -->


  <style name="IconHAUT1"
         url="%FIRSTXML%/spots/hotspot_direction_sequence_user_defaultpoint17.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="onhoverIconHAUT1"
         onover="onoverIconHAUT1"
         onout="onoutIconHAUT1"

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

pauseautorotation(forcehotspot);

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

resumeautorotation(forcehotspot);

  </action>



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


  <style name="IconHAUTDROITE1"
         url="%FIRSTXML%/spots/hotspot_direction_sequence_user_defaultpoint18.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="onhoverIconHAUTDROITE1"
         onover="onoverIconHAUTDROITE1"
         onout="onoutIconHAUTDROITE1"

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

pauseautorotation(forcehotspot);

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

resumeautorotation(forcehotspot);

  </action>



    
  <!-- Spot Style - HAUT GAUCHE 1 -->


  <style name="IconHAUTGAUCHE1"
         url="%FIRSTXML%/spots/hotspot_direction_sequence_user_defaultpoint19.png"
         visible="false"
         frame="0"
         lastframe="18"
         framewidth="50"
         frameheight="50"
         stopspotsequence="false"
         crop="0|0|50|50"
         edge="center"
         rotate="225"
         onloaded="startspotanimation(0.1);"
         onhover="onhoverIconHAUTGAUCHE1"
         onover="onoverIconHAUTGAUCHE1"
         onout="onoutIconHAUTGAUCHE1"

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

pauseautorotation(forcehotspot);

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

resumeautorotation(forcehotspot);

  </action>



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


  <style name="IconPOINTINFO3"
         url="%FIRSTXML%/spots/hotspot_information_black_sequence_user_defaultpoint112.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="onhoverIconPOINTINFO3"
         onover="onoverIconPOINTINFO3"
         onout="onoutIconPOINTINFO3"

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

pauseautorotation(forcehotspot);

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

resumeautorotation(forcehotspot);

  </action>



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

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


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

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

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

</krpano>