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

    
  <!-- Spot Style - Default Point Spot Style -->


  <style name="IconDefaultPointSpotStyle"
         url="%FIRSTXML%/spots/hotspot_animated_user_defaultpoint0.png"
         visible="false"
         frame="0"
         lastframe="9"
         framewidth="32"
         frameheight="32"
         stopspotsequence="false"
         crop="0|0|32|32"
         edge="center"
         rotate="230"
         alpha="0.8"
         onloaded="startspotanimation(0.1);"
         onhover="onhoverIconDefaultPointSpotStyle"
         onover="onoverIconDefaultPointSpotStyle"
         onout="onoutIconDefaultPointSpotStyle"

         height="60"
         width="60"
         />
  <action name="onhoverIconDefaultPointSpotStyle">
    showtooltip('hotspot');
  </action>
  <action name="onoverIconDefaultPointSpotStyle">

tween(alpha, 1);

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

    tween(alpha, 0.8);

  </action>



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


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

		<ptplugin name="panotourmaps" lat="46.637651675355" lng="3.4075754690793" zoom="11" maptypelayer="road" openatstart="false" state="false" bgcolor="f2f2f2" zorder="1" 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="bounce" />
		
		
		<controls zoom="true" pan="true" scale="true" maptype="true" overview="false">
			<ui draggable="true" scrollable="true" dblclick="true" />
			<specific />
		</controls>
		
		<markerSelected name="" heading="" fov="" />
		
		
			<!-- PanotourMaps markers counter : 2 -->



				<marker name="spotmap54" 
					lat="46.47130039737" 
					lng="3.7549035030733" 
					heading="0" 
					draggable="false" 
					animated="true" 
					desc="spotmap54_tooltip" 
					desctype="tooltip" 
					onhover="false" 
					isscene="true" 
					scene="pano10" 
					hasradar="true" 
					jsclick="spotmap54ActionSpotMap">
					<markericon url="spots/hotspot_plan_user_defaultmap0.png" iconwidth="32" iconheight="32" shadow="false" iconanchor="center" />
				</marker>



				<marker name="spotmap194" 
					lat="46.637651675355" 
					lng="3.4075754690793" 
					heading="0" 
					draggable="false" 
					animated="true" 
					desc="spotmap194_tooltip" 
					desctype="tooltip" 
					onhover="false" 
					isscene="true" 
					scene="pano10" 
					hasradar="true" 
					jsclick="spotmap194ActionSpotMap">
					<markericon url="spots/hotspot_plan_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="right" type="string" />
		<option name="start_position" value="left" type="string" />
		<option name="margin_x" value="15" type="int" />
		<option name="margin_y" value="0" type="int" />
		<option name="background_color" value="f2f2f2" type="string" />
		<option name="background_alpha" value="1" type="float" />
		<option name="padding" value="7" type="int" />
		<option name="topleft_radius" value="0" type="int" />
		<option name="topright_radius" value="0" type="int" />
		<option name="bottomleft_radius" value="0" type="int" />
		<option name="bottomright_radius" value="0" type="int" />
		<option name="area_border_width" value="0" type="int" />
		<option name="area_border_color" value="f2f2f2" type="string" />
		<option name="area_border_alpha" value="1" type="float" />
		<option name="display_title" value="false" type="bool" />
		<option name="close_displayed" value="false" 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="60" type="int" />
		<option name="area_width_unit" value="percent" type="string" />
		<option name="area_height_unit" value="percent" type="string" />
		<option name="animation" value="false" type="bool" />
		<option name="animation_duration" value="500" type="int" />
		<option name="close_on_click" value="false" type="bool" />
		<option name="refresh_content" value="false" type="bool" />
		<option name="open_callback" value="addKolorMap('panotourmaps', [['openlayersv2','AIzaSyA1kLEBNUKq49_RmzYF9gVymzCWnLUI7lU']], 'panotourmapsArea_mapDIV');" type="string" />
		<option name="close_callback" value="invokeKrFunction('closeKolorAreaCallback_panotourmapsArea')" type="string" />
		<option name="zorder" value="1" type="int" />
		<option name="use_i18n" value="true" type="bool" />
	</settings>
	</ptplugin>
	
	<action name="kolorAreaJsReady_panotourmapsArea">
		set(ptplugin[panotourmapsArea].jsready, 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);

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

		
		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));
		);
		
	</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(ptplugin[panotourmapsArea].isOpen,set(restore_panotourmapsArea, true);hideKolorArea_panotourmapsArea(false);,set(restore_panotourmapsArea, false););"
		showtourcontrols="if(tour_displaymap,if(restore_panotourmapsArea,showKolorArea_panotourmapsArea(false);););"
		onhidetourmap="panotourmapsClosetourmap();" 
		onshowtourmap="if(tour_displaymap,panotourmapsOpentourmap(););" 
		
		onTourStart="updateDefaultMarkerValues_panotourmapsArea();"
		changetourlanguage="changeLanguage_panotourmaps();"
	/>
	
	
		<!-- PanotourMaps markers counter : 2 -->
				<action name="spotmap54ActionSpotMap">
          mainloadscene(pano10);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
				<action name="spotmap194ActionSpotMap">
          mainloadscene(pano10);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,false););" 
	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(false);
		);
	</action>
	
	<action name="panotourmapsOpentourmap">
		ifnot(ptplugin[panotourmapsArea].isOpen,
			openKolorArea_panotourmapsArea();
		);
	</action>
	
	<action name="panotourmapsShowtourmap">
		ifnot(ptplugin[panotourmapsArea].isOpen,
			panotourmapsOpentourmap();
		,
			showKolorArea_panotourmapsArea(false);
		);
	</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>



<!-- ********** -->
<!-- Barre de contrôle avec miniatures -->
<!-- id : controlBar_dockedThumbnails -->
<!-- ********** -->

<krpano controlBar_dockedThumbnailsbarbuilt="false" controlBar_dockedThumbnailsIsOpened="false" />

<events name="controlBar_dockedThumbnailsbarevents" 
	onxmlcomplete="controlBar_dockedThumbnailsbuildMenuBar();"


	
	keep="true"/>



<action name="controlBar_dockedThumbnailsbuildMenuBar">
	ifnot (controlBar_dockedThumbnailsbarbuilt, controlBar_dockedThumbnailsbuildMenu(); set(controlBar_dockedThumbnailsbarbuilt, true););
</action>



<action name="controlBar_dockedThumbnailsbuildMenu">
	
    set(controlBar_dockedThumbnailsbutton_pos, 0);
    set(layer[controlBar_dockedThumbnailsbtn_hidecontrols].x, get(controlBar_dockedThumbnailsbutton_pos));
    inc(controlBar_dockedThumbnailsbutton_pos, 36);


      if (device.desktop,
        set(layer[controlBar_dockedThumbnailsbtn_display_help].x, get(controlBar_dockedThumbnailsbutton_pos));
        
        set(layer[controlBar_dockedThumbnailsbtn_close_help].x  , get(controlBar_dockedThumbnailsbutton_pos));
        
        inc(controlBar_dockedThumbnailsbutton_pos, 36);
      );

      if (device.fullscreensupport,
        set(layer[controlBar_dockedThumbnailsbtn_openfs].x, get(controlBar_dockedThumbnailsbutton_pos));
        set(layer[controlBar_dockedThumbnailsbtn_closefs].x, get(controlBar_dockedThumbnailsbutton_pos));
        inc(controlBar_dockedThumbnailsbutton_pos, 36);
      );


      set(layer[controlBar_dockedThumbnailsbtn_display_map].x   , get(controlBar_dockedThumbnailsbutton_pos));
      set(layer[controlBar_dockedThumbnailsbtn_hide_map].x   , get(controlBar_dockedThumbnailsbutton_pos));
      inc(controlBar_dockedThumbnailsbutton_pos, 36);


      set(layer[controlBar_dockedThumbnailsbtn_autorotate_on].x , get(controlBar_dockedThumbnailsbutton_pos));
      
      set(layer[controlBar_dockedThumbnailsbtn_autorotate_off].x, get(controlBar_dockedThumbnailsbutton_pos));
      
      inc(controlBar_dockedThumbnailsbutton_pos, 36);



      if (device.desktop,
        set(layer[controlBar_dockedThumbnailsbtn_ctrlmode_drag_to].x, get(controlBar_dockedThumbnailsbutton_pos));
        
        set(layer[controlBar_dockedThumbnailsbtn_ctrlmode_move_to].x, get(controlBar_dockedThumbnailsbutton_pos));
        
        inc(controlBar_dockedThumbnailsbutton_pos, 36);
      );




      if(plugin[gyroscope],
        set(controlBar_dockedThumbnailsDisplayGyroscopeButton, false);
        if (device.tablet, set(controlBar_dockedThumbnailsDisplayGyroscopeButton, true););
        if (device.mobile, set(controlBar_dockedThumbnailsDisplayGyroscopeButton, true););
        if(controlBar_dockedThumbnailsDisplayGyroscopeButton,
          set(layer[controlBar_dockedThumbnailsbtn_gyroscope_on].x, get(controlBar_dockedThumbnailsbutton_pos));
          
          set(layer[controlBar_dockedThumbnailsbtn_gyroscope_off].x, get(controlBar_dockedThumbnailsbutton_pos));
          
          set(layer[controlBar_dockedThumbnailsbtn_gyroscope_not].x, get(controlBar_dockedThumbnailsbutton_pos));
          
          inc(controlBar_dockedThumbnailsbutton_pos, 36);
        );
      );


      if (device.desktop,
        set(layer[controlBar_dockedThumbnailsbtn_right].x, get(controlBar_dockedThumbnailsbutton_pos));
        
        inc(controlBar_dockedThumbnailsbutton_pos, 36);

        set(layer[controlBar_dockedThumbnailsbtn_left].x, get(controlBar_dockedThumbnailsbutton_pos));
        
        inc(controlBar_dockedThumbnailsbutton_pos, 36);
      );

      if (device.desktop,
        set(layer[controlBar_dockedThumbnailsbtn_down].x, get(controlBar_dockedThumbnailsbutton_pos));
        
        inc(controlBar_dockedThumbnailsbutton_pos, 36);

        set(layer[controlBar_dockedThumbnailsbtn_up].x, get(controlBar_dockedThumbnailsbutton_pos));
        
        inc(controlBar_dockedThumbnailsbutton_pos, 36);
      );

      if (device.desktop,
        set(layer[controlBar_dockedThumbnailsbtn_out].x, get(controlBar_dockedThumbnailsbutton_pos));
        inc(controlBar_dockedThumbnailsbutton_pos, 36);
        set(layer[controlBar_dockedThumbnailsbtn_in].x, get(controlBar_dockedThumbnailsbutton_pos));
        inc(controlBar_dockedThumbnailsbutton_pos, 36);
      );


      if (scene.count GT 1,
        set(layer[controlBar_dockedThumbnailsbtn_next_pano].x, get(controlBar_dockedThumbnailsbutton_pos));
        
        inc(controlBar_dockedThumbnailsbutton_pos, 36);

        set(layer[controlBar_dockedThumbnailsbtn_prev_pano].x, get(controlBar_dockedThumbnailsbutton_pos));
        
        inc(controlBar_dockedThumbnailsbutton_pos, 36);
      );



	
	
	
</action>

<events name="controlBar_dockedThumbnailsStartTourEvents" onTourStart="controlBar_dockedThumbnailsCallOnStartTour();" keep="true" />

<action name="controlBar_dockedThumbnailsCallOnStartTour">
	
	controlBar_dockedThumbnailsshowMenuControls();
</action>




    <layer name="controlBar_dockedThumbnails_bg"
           keep="true"
           url="%FIRSTXML%/graphics/dockedthumbscontrolbar/footer.png"
           zorder="2"
           width="100%"
           align="bottomleft"
           x="0"
           visible="false" />


    <style name="controlBar_dockedThumbnails_btn_style_on_bg"
           keep="true"
           parent="controlBar_dockedThumbnails_bg"
           crop="0|48|48|48"
           url="%FIRSTXML%/graphics/dockedthumbscontrolbar/btn_bg.png"
           align="bottomright"
           height="36"
           width="36"
           alpha="0.3"
           y="12"
           zorder="0"
           />
    <style name="controlBar_dockedThumbnails_btn_style_on_bg_off"
           keep="true"
           parent="controlBar_dockedThumbnails_bg"
           crop="0|0|48|48"
           url="%FIRSTXML%/graphics/dockedthumbscontrolbar/btn_bg.png"
           align="bottomright"
           height="36"
           width="36"
           alpha="0.3"
           y="12"
           zorder="0"
           />

    <style name="controlBar_dockedThumbnails_btn_down_style"
           keep="true"
           parent="controlBar_dockedThumbnails_bg"
                 crop="0| 0|48|48"
           onovercrop="0|48|48|48"
           ondowncrop="0|96|48|48"
           align="bottomright"
           height="36"
           width="36"
           x="0" y="12"
           zorder="1"
           onhover="showTooltip('plugin',controlBar_dockedThumbnailsmenuTooltipStyle);"
           onout="hideTooltip();"
           />

    <style name="controlBar_dockedThumbnails_btn_style"
           keep="true"
           parent="controlBar_dockedThumbnails_bg"
                 crop="0| 0|48|48"
           onovercrop="0|48|48|48"
           ondowncrop="0|96|48|48"
           align="bottomright"
           height="36"
           width="36"
           x="0" y="12"
           zorder="1"
           onhover="showTooltip('plugin',controlBar_dockedThumbnailsmenuTooltipStyle);"
           onout="hideTooltip();"
           />
    <style name="controlBar_dockedThumbnails_btn_style_off"
           keep="true"
           parent="controlBar_dockedThumbnails_bg"
           align="bottomright"
           height="36"
           width="36"
           x="0" y="12"
           zorder="1"
           onhover="showTooltip('plugin',controlBar_dockedThumbnailsmenuTooltipStyle);"
           onout="hideTooltip();"
           />


    <style name="controlBar_dockedThumbnails_btn_style_on"
            keep="true"
            parent="controlBar_dockedThumbnails_bg"
                  crop="0|48|48|48"
            onovercrop="0|48|48|48"
            ondowncrop="0|96|48|48"
            align="bottomright"
            height="36"
            width="36"
            y="12"
            zorder="1"
            onhover="showTooltip('plugin',controlBar_dockedThumbnailsmenuTooltipStyle);" 
            onout="hideTooltip();"
            />
    <style name="controlBar_dockedThumbnails_btn_style_on_off"
            keep="true"
            parent="controlBar_dockedThumbnails_bg"
            align="bottomright"
            height="36"
            width="36"
            y="12"
            zorder="1"
            onhover="showTooltip('plugin',controlBar_dockedThumbnailsmenuTooltipStyle);" 
            onout="hideTooltip();"
            />


  <events name="controlBar_dockedThumbnailsgyroscopeavailableevent"
          ongyroscopeavailable="controlBar_dockedThumbnailsupdateGyroscopeButtonsAvailability();"
          ongyroscopeunavailable="controlBar_dockedThumbnailsupdateGyroscopeButtonsAvailability();"
          ongyroscopeon="controlBar_dockedThumbnailsenableGyroscopeButtons(true);"
          ongyroscopeoff="controlBar_dockedThumbnailsenableGyroscopeButtons(false);"
          keep="true" devices="html5" />
  <krpano controlBar_dockedThumbnailsmenugyroscopeavailable="false" controlBar_dockedThumbnailsmenugyroscopeenabled="false"/>
  <action name="controlBar_dockedThumbnailsupdateGyroscopeButtonsAvailability">
    if (tour_gyroscopedevices,
      set(controlBar_dockedThumbnailsmenugyroscopeavailable, true);
      controlBar_dockedThumbnailsupdateGyroscopeButtons();
    ,
      set(controlBar_dockedThumbnailsmenugyroscopeavailable, false);
      controlBar_dockedThumbnailsupdateGyroscopeButtons();
    );
  </action>
  <action name="controlBar_dockedThumbnailsenableGyroscopeButtons">
    if (tour_gyroscopedevices,
      set(controlBar_dockedThumbnailsmenugyroscopeenabled, %1);
      controlBar_dockedThumbnailsupdateGyroscopeButtons();
    );
  </action>
	<action name="controlBar_dockedThumbnailsHideGyroscopeButtons">
		set(layer[controlBar_dockedThumbnailsbtn_gyroscope_off].visible, false);
		set(layer[controlBar_dockedThumbnailsbtn_gyroscope_on].visible, false);
		
		if('%1' == 'true' AND plugin[gyroscope],
			set(layer[controlBar_dockedThumbnailsbtn_gyroscope_not].visible, true);
			
		,
			set(layer[controlBar_dockedThumbnailsbtn_gyroscope_not].visible, false);
			
		);
	</action>
	<action name="controlBar_dockedThumbnailsShowGyroscopeButtons">
		if (controlBar_dockedThumbnailsmenugyroscopeavailable,
			if (controlBar_dockedThumbnailsmenugyroscopeenabled,
				set(layer[controlBar_dockedThumbnailsbtn_gyroscope_off].visible, true);
				set(layer[controlBar_dockedThumbnailsbtn_gyroscope_on].visible, false);
				
			,
				set(layer[controlBar_dockedThumbnailsbtn_gyroscope_off].visible, false);
				set(layer[controlBar_dockedThumbnailsbtn_gyroscope_on].visible, true);
				
			);
			set(layer[controlBar_dockedThumbnailsbtn_gyroscope_not].visible, false);
			
		,
			controlBar_dockedThumbnailsHideGyroscopeButtons(true);
		);
	</action>
	<action name="controlBar_dockedThumbnailsupdateGyroscopeButtons">
		if (tour_gyroscopedevices,
			if (controlBar_dockedThumbnailsIsOpened,
				controlBar_dockedThumbnailsShowGyroscopeButtons();
			,
				controlBar_dockedThumbnailsHideGyroscopeButtons();
			);
		,
			if (controlBar_dockedThumbnailsIsOpened,
				controlBar_dockedThumbnailsHideGyroscopeButtons(true);
			,
				controlBar_dockedThumbnailsHideGyroscopeButtons();
			);
		);
	</action>
	
    <layer name="controlBar_dockedThumbnailsbtn_gyroscope_off"
            url="%FIRSTXML%/graphics/dockedthumbscontrolbar/btn_gyroscope.png"
            style="controlBar_dockedThumbnails_btn_style_on"
            onclick="disableGyroscope();
"
            devices="html5"
            tooltip="controlBar_dockedThumbnailsgyroOffTip"
            visible="false"
            />
    <layer name="controlBar_dockedThumbnailsbtn_gyroscope_on"
            url="%FIRSTXML%/graphics/dockedthumbscontrolbar/btn_gyroscope.png"
            style="controlBar_dockedThumbnails_btn_style"
            onclick="enableGyroscope();
"
            devices="html5"
            tooltip="controlBar_dockedThumbnailsgyroOnTip"
            visible="false"
            />
    <layer name="controlBar_dockedThumbnailsbtn_gyroscope_not"
            url="%FIRSTXML%/graphics/dockedthumbscontrolbar/btn_gyroscope_off.png"
            style="controlBar_dockedThumbnails_btn_style_off"
            enabled="true"
            capture="false"
            devices="html5"
            tooltip="controlBar_dockedThumbnailsgyroNotTip"
            visible="false"
            />


	<events name="controlBar_dockedThumbnailscontrolmodechangedevent" oncontrolmodechanged="controlBar_dockedThumbnailsupdateControlModeButtons();" keep="true"/>
	<action name="controlBar_dockedThumbnailsHideControlModeButtons">
		set(layer[controlBar_dockedThumbnailsbtn_ctrlmode_move_to].visible, false);
		set(layer[controlBar_dockedThumbnailsbtn_ctrlmode_drag_to].visible, false);
		
	</action>
	<action name="controlBar_dockedThumbnailsShowControlModeButtons">
		if (tour_controlmodemousetype == "moveto",
			set(layer[controlBar_dockedThumbnailsbtn_ctrlmode_drag_to].visible, true);
			set(layer[controlBar_dockedThumbnailsbtn_ctrlmode_move_to].visible, false);
			
		,
			set(layer[controlBar_dockedThumbnailsbtn_ctrlmode_move_to].visible, true);
			set(layer[controlBar_dockedThumbnailsbtn_ctrlmode_drag_to].visible, false);
			
		);
	</action>
	<action name="controlBar_dockedThumbnailsupdateControlModeButtons">
	if (device.desktop,
		if (controlBar_dockedThumbnailsIsOpened,
			controlBar_dockedThumbnailsShowControlModeButtons();
		,
			controlBar_dockedThumbnailsHideControlModeButtons();
		);
	,
		controlBar_dockedThumbnailsHideControlModeButtons();
	);
	</action>
	
    <layer name="controlBar_dockedThumbnailsbtn_ctrlmode_move_to"
           url="%FIRSTXML%/graphics/dockedthumbscontrolbar/btn_move_to.png"
           style="controlBar_dockedThumbnails_btn_style"
           tooltip="controlBar_dockedThumbnailsctrlmodeMoveTip"
           onclick="setControlModeMoveTo();
"
           visible="false"
           devices="desktop"
           />
    <layer name="controlBar_dockedThumbnailsbtn_ctrlmode_drag_to"
           url="%FIRSTXML%/graphics/dockedthumbscontrolbar/btn_drag_to.png"
           style="controlBar_dockedThumbnails_btn_style"
           tooltip="controlBar_dockedThumbnailsctrlmodeDragTip"
           onclick="setControlModeDragTo();
"
           visible="false"
           devices="desktop"
           />

    <layer name="controlBar_dockedThumbnailsbtn_in"
           url="%FIRSTXML%/graphics/dockedthumbscontrolbar/btn_zoom_in.png"
           style="controlBar_dockedThumbnails_btn_down_style"
           ondown="viewControlZoomIn(false);"
           onup="viewControlZoomStop();
"
           tooltip="controlBar_dockedThumbnailszoomInTip"
           devices="desktop"
           visible="false"
           />
    <layer name="controlBar_dockedThumbnailsbtn_out"
           url="%FIRSTXML%/graphics/dockedthumbscontrolbar/btn_zoom_out.png"
           style="controlBar_dockedThumbnails_btn_down_style"
           ondown="viewControlZoomOut(false);
"
           onup="viewControlZoomStop();
"
           tooltip="controlBar_dockedThumbnailszoomOutTip"
           devices="desktop"
           visible="false"
           />

    <layer name="controlBar_dockedThumbnailsbtn_left"
           url="%FIRSTXML%/graphics/dockedthumbscontrolbar/btn_move_left.png"
           style="controlBar_dockedThumbnails_btn_down_style"
           ondown="viewControlMoveLeft(false);
"
           onup="viewControlMoveHoriStop();
"
            tooltip="controlBar_dockedThumbnailsmoveLeftTip"
           devices="desktop"
           visible="false"
           />
    <layer name="controlBar_dockedThumbnailsbtn_right"
           url="%FIRSTXML%/graphics/dockedthumbscontrolbar/btn_move_right.png"
           style="controlBar_dockedThumbnails_btn_down_style"
           ondown="viewControlMoveRight(false);
"
           onup="viewControlMoveHoriStop();
"
            tooltip="controlBar_dockedThumbnailsmoveRightTip"
           devices="desktop"
           visible="false"
           />

    <layer name="controlBar_dockedThumbnailsbtn_up"
           url="%FIRSTXML%/graphics/dockedthumbscontrolbar/btn_move_up.png"
           style="controlBar_dockedThumbnails_btn_down_style"
           ondown="viewControlMoveUp(false);
"
           onup="viewControlMoveVertStop();
"
            tooltip="controlBar_dockedThumbnailsmoveUpTip"
           devices="desktop"
           visible="false"
           />
    <layer name="controlBar_dockedThumbnailsbtn_down"
           url="%FIRSTXML%/graphics/dockedthumbscontrolbar/btn_move_down.png"
           style="controlBar_dockedThumbnails_btn_down_style"
           ondown="viewControlMoveDown(false);
"
           onup="viewControlMoveVertStop();
"
            tooltip="controlBar_dockedThumbnailsmoveDownTip"
           devices="desktop"
           visible="false"
           />





    <layer name="controlBar_dockedThumbnailsbtn_prev_pano"
           url="%FIRSTXML%/graphics/dockedthumbscontrolbar/btn_previous_scene.png"
           onclick="loadPreviousScene();
"
           style="controlBar_dockedThumbnails_btn_style"
           tooltip="controlBar_dockedThumbnailsprevSceneTip"
           visible="false"
           />
    <layer name="controlBar_dockedThumbnailsbtn_next_pano"
           url="%FIRSTXML%/graphics/dockedthumbscontrolbar/btn_next_scene.png"
           onclick="loadNextScene();
"
           style="controlBar_dockedThumbnails_btn_style"
            tooltip="controlBar_dockedThumbnailsnextSceneTip"
           visible="false"
           />




    <layer name="controlBar_dockedThumbnailsbtn_display_map"
           url="%FIRSTXML%/graphics/dockedthumbscontrolbar/btn_map.png"
           onclick="showMap();
"
           style="controlBar_dockedThumbnails_btn_style"
           visible="false"
           tooltip="controlBar_dockedThumbnailsdisplayMapTip"
           />
    <layer name="controlBar_dockedThumbnailsbtn_hide_map"
           url="%FIRSTXML%/graphics/dockedthumbscontrolbar/btn_map.png"
           onclick="hideMap();
"
           style="controlBar_dockedThumbnails_btn_style_on"
           visible="false"
           tooltip="controlBar_dockedThumbnailshideMapTip"
           />


    <layer name="controlBar_dockedThumbnailsbtn_openfs"
           url="%FIRSTXML%/graphics/dockedthumbscontrolbar/btn_enter_fs.png"
           onclick="enterFullscreen();
"
           style="controlBar_dockedThumbnails_btn_style"
           visible="false"
           tooltip="controlBar_dockedThumbnailsopenFsTip"
           devices="fullscreensupport"
           />
    <layer name="controlBar_dockedThumbnailsbtn_closefs"
           url="%FIRSTXML%/graphics/dockedthumbscontrolbar/btn_close_fs.png"
           onclick="exitFullscreen();
"
           style="controlBar_dockedThumbnails_btn_style_on"
           visible="false"
           tooltip="controlBar_dockedThumbnailscloseFsTip"
           devices="fullscreensupport"
           />

    <layer name="controlBar_dockedThumbnailsbtn_autorotate_on"
           url="%FIRSTXML%/graphics/dockedthumbscontrolbar/btn_start_autorotation.png"
           onclick="resumeautorotation();
"
           style="controlBar_dockedThumbnails_btn_style"
           visible="false"
            tooltip="controlBar_dockedThumbnailsautorotateOnTip"
           />
    <layer name="controlBar_dockedThumbnailsbtn_autorotate_off"
           url="%FIRSTXML%/graphics/dockedthumbscontrolbar/btn_stop_autorotation.png"
           onclick="pauseautorotation();
"
           style="controlBar_dockedThumbnails_btn_style_on"
           visible="false"
           tooltip="controlBar_dockedThumbnailsautorotateOffTip"
           />



    <layer name="controlBar_dockedThumbnailsbtn_display_help"
           url="%FIRSTXML%/graphics/dockedthumbscontrolbar/btn_help.png"
           onclick="controlBar_dockedThumbnailsdisplayHelp();"
           style="controlBar_dockedThumbnails_btn_style"
           tooltip="controlBar_dockedThumbnailsdisplayHelpTip"
           devices="desktop"
           visible="false"
           />
    <layer name="controlBar_dockedThumbnailsbtn_close_help"
           url="%FIRSTXML%/graphics/dockedthumbscontrolbar/btn_help.png"
           onclick="controlBar_dockedThumbnailscloseHelp();"
           style="controlBar_dockedThumbnails_btn_style_on"
           visible="false"
           tooltip="controlBar_dockedThumbnailshideHelpTip"
           devices="desktop"
           />



    <layer name="controlBar_dockedThumbnailsbtn_hidecontrols"
           url="%FIRSTXML%/graphics/dockedthumbscontrolbar/btn_hide_controls.png"
           style="controlBar_dockedThumbnails_btn_style"
           onclick="controlBar_dockedThumbnailshideMenuControls();hideTourControls();
"
           visible="false"
            tooltip="controlBar_dockedThumbnailshideControlsTip"
           />

    <layer name="controlBar_dockedThumbnailsbtn_showcontrols"
                  crop="0| 0|48|48"
            onovercrop="0|48|48|48"
            ondowncrop="0|96|48|48"
            keep="true"
            url="%FIRSTXML%/graphics/dockedthumbscontrolbar/btn_show_controls_bg.png"
            align="bottomright"
            zorder="2"
            height="36"
            width="36"
            visible="false"
            y="12"
            x="0" >
    <layer name="controlBar_dockedThumbnailsbtn_showcontrols_fg"
                  crop="0| 0|48|48"
            onovercrop="0|48|48|48"
            ondowncrop="0|96|48|48"
            onclick="controlBar_dockedThumbnailsshowMenuControls();showTourControls();
"
            onhover="showTooltip('plugin',controlBar_dockedThumbnailsmenuTooltipStyle);"
            onout="hideTooltip();"
            tooltip="controlBar_dockedThumbnailsdisplayControlsTip"
            keep="true"
            url="%FIRSTXML%/graphics/dockedthumbscontrolbar/btn_show_controls.png"
            align="center"
            height="36"
            width="36"
            />
    </layer>


<action name="controlBar_dockedThumbnailshideMenuControls">
	set(controlBar_dockedThumbnailsIsOpened, false);
	set(layer[controlBar_dockedThumbnails_bg].visible, false);
	set(layer[controlBar_dockedThumbnailsbtn_showcontrols].visible, true);
	
	set(layer[controlBar_dockedThumbnailsbtn_hidecontrols].visible, false);
	set(layer[controlBar_dockedThumbnailsbtn_in].visible, false);
	set(layer[controlBar_dockedThumbnailsbtn_out].visible, false);
	set(layer[controlBar_dockedThumbnailsbtn_right].visible, false);
	set(layer[controlBar_dockedThumbnailsbtn_left].visible, false);
	set(layer[controlBar_dockedThumbnailsbtn_down].visible, false);
	set(layer[controlBar_dockedThumbnailsbtn_up].visible, false);
	if (scene.count GT 1,
	set(layer[controlBar_dockedThumbnailsbtn_prev_pano].visible, false);
	set(layer[controlBar_dockedThumbnailsbtn_next_pano].visible, false);
	);
		controlBar_dockedThumbnailsupdateAutorotationButtons();

		controlBar_dockedThumbnailsupdateGyroscopeButtons();
		controlBar_dockedThumbnailsupdateMapButtons();

		controlBar_dockedThumbnailsupdateControlModeButtons();
		controlBar_dockedThumbnailsupdateFullscreenButtons();
		controlBar_dockedThumbnailsupdateHelpButtons();
</action>
<action name="controlBar_dockedThumbnailsshowMenuControls">
	set(controlBar_dockedThumbnailsIsOpened, true);
      controlBar_dockedThumbnailsupdateFullscreenButtons();
      controlBar_dockedThumbnailsupdateAutorotationButtons();

      controlBar_dockedThumbnailsupdateGyroscopeButtons();
      controlBar_dockedThumbnailsupdateMapButtons();

      controlBar_dockedThumbnailsupdateControlModeButtons();
      controlBar_dockedThumbnailsupdateHelpButtons();
      set(layer[controlBar_dockedThumbnails_bg].visible, true);
	set(layer[controlBar_dockedThumbnailsbtn_showcontrols].visible, false);
	
	set(layer[controlBar_dockedThumbnailsbtn_hidecontrols].visible, true);
	set(layer[controlBar_dockedThumbnailsbtn_in].visible, true);
	set(layer[controlBar_dockedThumbnailsbtn_out].visible, true);
	set(layer[controlBar_dockedThumbnailsbtn_right].visible, true);
	set(layer[controlBar_dockedThumbnailsbtn_left].visible, true);
	set(layer[controlBar_dockedThumbnailsbtn_down].visible, true);
	set(layer[controlBar_dockedThumbnailsbtn_up].visible, true);
	if (scene.count GT 1,
	set(layer[controlBar_dockedThumbnailsbtn_prev_pano].visible, true);
	set(layer[controlBar_dockedThumbnailsbtn_next_pano].visible, true);
	);
	
	
</action>


    <layer name="controlBar_dockedThumbnailshelpScreenBg" align="center" keep="true" onclick="controlBar_dockedThumbnailscloseHelp();"
           url="%FIRSTXML%/graphics/dockedthumbscontrolbar/help_screen_bg.png"
           visible="false"
           zorder="97"
           >
      <layer name="controlBar_dockedThumbnailshelpScreen" align="center" keep="true" onclick="controlBar_dockedThumbnailscloseHelp();" 
             url="%FIRSTXML%/graphics/dockedthumbscontrolbar/help_screen_fg.png"
             height="100%" 
             width="prop" 
             displayed="false"
             />
    </layer>
    <action name="controlBar_dockedThumbnailsdisplayHelp">
      if (device.desktop,
        set(layer[controlBar_dockedThumbnailshelpScreen].displayed, true);
        set(layer[controlBar_dockedThumbnailshelpScreenBg].visible,true);
        controlBar_dockedThumbnailsupdateHelpButtons();
      );
    </action>
    <action name="controlBar_dockedThumbnailscloseHelp">
      if (device.desktop,
        set(layer[controlBar_dockedThumbnailshelpScreen].displayed, false);
        set(layer[controlBar_dockedThumbnailshelpScreenBg].visible,false);
        controlBar_dockedThumbnailsupdateHelpButtons();
      );
    </action>
	<action name="controlBar_dockedThumbnailsHideHelpButtons">
		set(layer[controlBar_dockedThumbnailsbtn_display_help].visible, false);
		set(layer[controlBar_dockedThumbnailsbtn_close_help].visible, false);
		
	</action>
	<action name="controlBar_dockedThumbnailsShowHelpButtons">
		if (layer[controlBar_dockedThumbnailshelpScreen].displayed,
			set(layer[controlBar_dockedThumbnailsbtn_close_help].visible, true);
			set(layer[controlBar_dockedThumbnailsbtn_display_help].visible, false);
			
		,
			set(layer[controlBar_dockedThumbnailsbtn_display_help].visible, true);
			set(layer[controlBar_dockedThumbnailsbtn_close_help].visible, false);
			
		);
	</action>
	<action name="controlBar_dockedThumbnailsupdateHelpButtons">
	if (device.desktop,
		if (controlBar_dockedThumbnailsIsOpened,
			controlBar_dockedThumbnailsShowHelpButtons();
		,
			controlBar_dockedThumbnailsHideHelpButtons();
		);
	,
		controlBar_dockedThumbnailsHideHelpButtons();
	);
	</action>
    

	<events name="controlBar_dockedThumbnailsHideShowMapEvent" 
		onhidetourmap="controlBar_dockedThumbnailsupdateMapButtons();" 
		onshowtourmap="controlBar_dockedThumbnailsupdateMapButtons();" 
		keep="true" />
	<action name="controlBar_dockedThumbnailsHideMapButtons">
		set(layer[controlBar_dockedThumbnailsbtn_display_map].visible, false);
		set(layer[controlBar_dockedThumbnailsbtn_hide_map].visible, false);
		
	</action>
	<action name="controlBar_dockedThumbnailsShowMapButtons">
		if (tour_displaymap,
			set(layer[controlBar_dockedThumbnailsbtn_hide_map].visible, true);
			set(layer[controlBar_dockedThumbnailsbtn_display_map].visible, false);
			
		,
			set(layer[controlBar_dockedThumbnailsbtn_display_map].visible, true);
			set(layer[controlBar_dockedThumbnailsbtn_hide_map].visible, false);
			
		);
	</action>
	<action name="controlBar_dockedThumbnailsupdateMapButtons">
		if (controlBar_dockedThumbnailsIsOpened,
			controlBar_dockedThumbnailsShowMapButtons();
		,
			controlBar_dockedThumbnailsHideMapButtons();
		);
	</action>


	<events name="controlBar_dockedThumbnailsmenufullscreenchangeevent"
		onenterfullscreen="controlBar_dockedThumbnailsupdateFullscreenButtons();"
		onexitfullscreen="controlBar_dockedThumbnailsupdateFullscreenButtons();"
		keep="true"/>
	<action name="controlBar_dockedThumbnailsHideFullscreenButtons">
		set(layer[controlBar_dockedThumbnailsbtn_openfs].visible , false);
		set(layer[controlBar_dockedThumbnailsbtn_closefs].visible, false);
		
	</action>
	<action name="controlBar_dockedThumbnailsShowFullscreenButtons">
		if (device.fullscreensupport,
			if(tour_fullscreen,
				set(layer[controlBar_dockedThumbnailsbtn_openfs].visible , false);
				set(layer[controlBar_dockedThumbnailsbtn_closefs].visible, true);
				
			,
				set(layer[controlBar_dockedThumbnailsbtn_openfs].visible ,true);
				set(layer[controlBar_dockedThumbnailsbtn_closefs].visible,false);
				
			);
		,
			controlBar_dockedThumbnailsHideFullscreenButtons();
		);
	</action>
	<action name="controlBar_dockedThumbnailsupdateFullscreenButtons">
		if (controlBar_dockedThumbnailsIsOpened,
			controlBar_dockedThumbnailsShowFullscreenButtons();
		,
			controlBar_dockedThumbnailsHideFullscreenButtons();
		);
	</action>

	<events name="controlBar_dockedThumbnailsAutorotationEvents"
		onstartautorotation="controlBar_dockedThumbnailsupdateAutorotationButtons();"
		onresumeautorotation="controlBar_dockedThumbnailsupdateAutorotationButtons();"
		onstopautorotation="controlBar_dockedThumbnailsupdateAutorotationButtons();"
		onpauseautorotation="controlBar_dockedThumbnailsupdateAutorotationButtons();"
		keep="true"/>
	<action name="controlBar_dockedThumbnailsHideAutorotationButtons">
		set(layer[controlBar_dockedThumbnailsbtn_autorotate_off].visible, false);
		set(layer[controlBar_dockedThumbnailsbtn_autorotate_on].visible , false);
		
	</action>
	<action name="controlBar_dockedThumbnailsShowAutorotationButtons">
		if(autorotate.enabled == false,
			set(layer[controlBar_dockedThumbnailsbtn_autorotate_off].visible, false);
			set(layer[controlBar_dockedThumbnailsbtn_autorotate_on].visible , true);
			
		,
			set(layer[controlBar_dockedThumbnailsbtn_autorotate_off].visible, true);
			set(layer[controlBar_dockedThumbnailsbtn_autorotate_on].visible , false);
			
		);
	</action>
	<action name="controlBar_dockedThumbnailsupdateAutorotationButtons">
		if (controlBar_dockedThumbnailsIsOpened,
			controlBar_dockedThumbnailsShowAutorotationButtons();
		,
			controlBar_dockedThumbnailsHideAutorotationButtons();
		);
	</action>



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



<!-- ********** -->
<!-- Liste déroulante des Panoramas -->
<!-- id : panoramacombobox -->
<!-- ********** -->

  <!-- path to the scrollarea plugin -->
  <panoramacombobox_kr_scrollareaplugin
    url.html5="%FIRSTXML%/graphics/scrollarea.js"
    url.flash="%FIRSTXML%/graphics/scrollarea.swf"
    />

  <!-- core internal layer styles -->
  <style name="panoramacombobox_kr_container_style" type="container" maskchildren="true" bgcapture="true" visible="false" onclick="panoramacombobox_kr_onclick_event();" mergedalpha="false" alpha="1.0" />
  <style name="panoramacombobox_kr_marker_style" type="text" align="righttop" edge="center" html="▼" havemarkersize="false" onautosized="set(havemarkersize,true);" mergedalpha="false" alpha="1.0" />
  <style name="panoramacombobox_kr_item_style"  type="text" wordwrap="false" vcenter="true" align="lefttop" onover="if(!combbox_item_pressed,onoveritem());asyncloop(hovering,,if(!combbox_item_pressed,onoutitem()));" ondown="onoveritem(); set(combbox_item_pressed,true);" onup="onoutitem(); set(combbox_item_pressed,false);" onoveritem="set(bg,true);" onoutitem="set(bg,false);" mergedalpha="false" alpha="1.0" />



  <panoramacombobox_kr_design name="default" margin="2" open_close_speed="0.25">
    <!-- default design - white box with black text and blue selection -->
    <style name="panoramacombobox_kr_container_style" bgalpha="1.0" bgcolor="0xFFFFFF" bgborder="1 0xFFFFFF 0.5" bgroundedge="1" bgshadow="0 1 3 0x000000 1.0" />
    <style name="panoramacombobox_kr_marker_style" css="color:#FFFFFF;" bg="false" txtshadow="0 0 2 0x000000 1" />
    <style name="panoramacombobox_kr_item_style" css="color:#222222;" padding="4" bg="false" bgcolor="0xC7E4FC" bgalpha="1.0" bgroundedge="1" txtshadow="0 0 1 0xFFFFFF 1.0" />
  </panoramacombobox_kr_design>




  <!-- internal events -->
  <events name="panoramacombobox_kr_xml_plugin_events" keep="true"
    onxmlcomplete="panoramacombobox_kr_parse_xml_elements();"
    onresize="panoramacombobox_kr_closelist();"
    />

  <!-- krpano version check -->
  <action name="panoramacombobox_kr_versioncheck" autorun="preinit">
    if(build LT '2017-09-13',
      error('combobox.xml - too old krpano version!');
      set(events[panoramacombobox_kr_xml_plugin_events].name, null);
      set(action[panoramacombobox_kr_addComboboxLayer].content, '');
      set(action[panoramacombobox_kr_removeComboboxLayer].content, '');
    );
  </action>

  <action name="panoramacombobox_kr_parse_xml_elements" scope="local">
        copy(cb, combobox["panoramacombobox"]);
        if(cb AND cb.name AND cb.parsed != true,
          set(cb.parsed, true);
          panoramacombobox_kr_addComboboxLayer(get(cb.name), get(cb.design));
          copy(ly, layer[get(cb.name)]);
          copyattributes(get(ly), get(cb));
          set(ly.keep, true);
          def(item_cnt, integer, get(cb.item.count));
          if(item_cnt GT 0,
            def(item_i, integer, 0);
            loop(item_i LT  item_cnt,
              panoramacombobox_kr_additem(get(ly.name), get(cb.item[get(item_i)].name), get(cb.item[get(item_i)].caption), get(cb.item[get(item_i)].onclick));
              inc(item_i);
            );
          );
        );
  </action>

  <!-- dynamically add a combobox layer -->
  <action name="panoramacombobox_kr_addComboboxLayer" scope="local" args="cbname, design">
    <!-- create the layer -->
    addlayer(get(cbname));
    copy(cb, layer[get(cbname)]);
    set(cb.keep, true);

    <!-- copy the design settings (or set defaults) -->
    if(!panoramacombobox_kr_design[get(design)].name, set(design,'default'));
    copy(cb.cbdesign, panoramacombobox_kr_design[get(design)]);
    calc(cb.margin, cb.cbdesign.margin !== null ? cb.cbdesign.margin : 2);
    calc(cb.open_close_speed, cb.cbdesign.open_close_speed !== null ? cb.cbdesign.open_close_speed : 0.25);
    <!-- load the styles and copy the design style settings -->
    cb.loadstyle(panoramacombobox_kr_container_style);
    copyattributes(get(cb), get(cb.cbdesign.style[panoramacombobox_kr_container_style]));

    <!-- add/build/map actions -->
    calc(cb.addItem,          'panoramacombobox_kr_additem(' + cbname + ', null, "%%1", "%%2");');
    calc(cb.addNamedItem,     'panoramacombobox_kr_additem(' + cbname + ', "%%1", "%%2", "%%3");');
    calc(cb.addIdItem,        'panoramacombobox_kr_additem(' + cbname + ', "%%1", "%%2", "%%3");');
    calc(cb.selectItem,       'panoramacombobox_kr_finditem(' + cbname + ', "%%1", __cb_fi); if(__cb_fi GE 0, panoramacombobox_kr_selectitem(' + cbname + ', get(__cb_fi))); delete(__cb_fi);');
    calc(cb.selectItemByName, 'panoramacombobox_kr_selectitem(' + cbname + ', "%%1");');
    calc(cb.selectIdItem,     'panoramacombobox_kr_selectitem(' + cbname + ', "%%1");');
    calc(cb.removeAll,        'panoramacombobox_kr_removeitems(' + cbname + ');');
    calc(cb.openList,         'panoramacombobox_kr_openlist(' + cbname + ');');
    calc(cb.closeList,        'panoramacombobox_kr_closelist(' + cbname + ');');

    <!-- create sub-layers -->
    def(saname, string, 'panoramacombobox_kr_%1_scrollarea');
    addlayer(get(saname));
    copy(sa, layer[get(saname)]);
    copy(sa.parent, cbname);
    copy(sa.url, panoramacombobox_kr_scrollareaplugin.url);
    copy(sa.keep, true);
    copy(sa.align, lefttop);
    set(sa.direction, v);
    set(sa.enabled, false);
    set(sa.width, 100%);
    set(sa.height, 100%);
    copy(cb.scrollarea, sa);

    def(mkname, string, 'panoramacombobox_kr_%1_marker');
    addlayer(get(mkname));
    copy(mk, layer[get(mkname)]);
    copy(mk.parent, saname);
    copy(mk.keep, true);
    mk.loadstyle(panoramacombobox_kr_marker_style);
    copyattributes(get(mk), get(cb.cbdesign.style[panoramacombobox_kr_marker_style]));
    copy(cb.marker, mk);

    <!-- item data array -->
    cb.createarray('item');

    <!-- item autosizing information -->
    set(cb.autosize_i, 0);
    set(cb.autosize_cnt, 0);
    set(cb.autosize_max_w, 0);
    set(cb.autosize_max_h, 0);

    set(cb.lastselecteditemindex, 0);
    set(cb.selecteditemindex, 0);
  </action>


  <!-- dynamically remove a combobox element -->
  <action name="panoramacombobox_kr_removeComboboxLayer" scope="local" args="cbname">
    if(layer[get(cbname)],
      copy(cb, layer[get(cbname)]);
      if(cb === global.openedcombobox, delete(global.openedcombobox));
      if(cb,
        removelayer(get(cbname), true);
      );
    );
  </action>


  <!-- default onclick event for combobox elements: open the list -->
  <action name="panoramacombobox_kr_onclick_event">
    panoramacombobox_kr_openlist(get(name));
  </action>


  <!-- dynamically add items -->
  <action name="panoramacombobox_kr_additem" scope="local" args="cbname, itemname, itemcaption, itemonclick">
    copy(cb, layer[get(cbname)]);

    <!-- when no item name is set, generate an automatic one -->
    if(itemname === null, calc(itemname, 'autoname_' + cb.item.count); );

    <!-- save the item caption and onclick event -->
    copy(cb.item[get(itemname)].caption, itemcaption);
    copy(cb.item[get(itemname)].onclick, itemonclick);

    inc(cb.autosize_cnt);

    <!-- create the item layer/textfield -->
    calc(itemlayername, 'comboboxitem_' + cbname + '_' + itemname);
    addlayer(get(itemlayername));
    copy(li, layer[get(itemlayername)]);



    li.loadstyle(panoramacombobox_kr_item_style);
    copyattributes(get(li), get(cb.cbdesign.style[panoramacombobox_kr_item_style]));




    copy(li.parent, cb.scrollarea.name);
    copy(li.keep, true);
    copy(li.cblayername, cb.name);
    copy(li.itemname, itemname);
    copy(li.html, itemcaption);
    set(li.onautosized, delayedcall(0,panoramacombobox_kr_item_autosize_update()) );
    set(li.onclick, panoramacombobox_kr_item_onclick() );

    copy(cb.item[get(itemname)].itemlayername, itemlayername);
  </action>


  <!-- onautosized callback from the item textfield -->
  <action name="panoramacombobox_kr_item_autosize_update" scope="local">
    copy(cb, layer[get(caller.cblayername)]);
    inc(cb.autosize_i);
    Math.max(cb.autosize_max_w, caller.width);
    Math.max(cb.autosize_max_h, caller.height);
    if(cb.autosize_i == cb.autosize_cnt, panoramacombobox_kr_align_items(get(cb.name)); );
  </action>


  <!-- align the image and set the combobox size -->
  <action name="panoramacombobox_kr_align_items" scope="local" args="cbname">
    copy(cb, layer[get(cbname)]);
    if(cb.marker.havemarkersize == false OR cb.scrollarea.loaded == false,
      <!-- wait until everything is ready -->
      delayedcall(calc(cb.name + '_waitformarkersize'), 0.01, panoramacombobox_kr_align_items(get(cbname)) );
      ,
      <!-- set the item positions and the combobox size -->
      if(global.openedcombobox === cb, panoramacombobox_kr_closelist() );
      copy(sa, cb.scrollarea);
      calc(itemwidth, cb.margin GT 0 ? -2 * cb.margin : '100%');
      copy(mk_w, cb.marker.width);
      copy(item_cnt, cb.autosize_cnt);

      for(def(item_i, integer, 0), item_i LT item_cnt, inc(item_i),
        copy(li, layer[get(cb.item[get(item_i)].itemlayername)]);
        set(li.x, get(cb.margin));
        copy(li.width, itemwidth);
        copy(li.height, cb.autosize_max_h);
        calc(li.y, cb.margin + item_i * (cb.autosize_max_h + cb.margin));
      );

      if(cb.width == null OR cb.width == cb.lastautosizedwidth,
        <!-- no combobox width (or an autosized width) set - set the largest item width -->
        calc(cb.width, cb.margin + cb.autosize_max_w + 2 + mk_w + cb.margin);
        copy(cb.lastautosizedwidth, cb.width);
      );

      calc(cb.height, 2*cb.margin + cb.autosize_max_h);
      calc(sa.height, cb.margin + item_cnt*(cb.margin+cb.autosize_max_h));
      calc(sa.y, -(cb.selecteditemindex * (cb.autosize_max_h + cb.margin)));
      calc(cb.marker.x, cb.margin + mk_w/2);
      tween(layer[get(cb.name)].marker.y, calc(cb.margin + cb.selecteditemindex*(cb.autosize_max_h + cb.margin) + cb.autosize_max_h/2), 0.1);
    );
  </action>


  <!-- default onclick event for items: select the current item, close the list and call the item onclick event -->
  <action name="panoramacombobox_kr_item_onclick" scope="local">
    copy(cb, layer[get(caller.cblayername)]);
    copy(itemname, caller.itemname);
    panoramacombobox_kr_selectitem(get(cb.name), get(itemname));

    if(global.openedcombobox === cb, panoramacombobox_kr_closelist() );

    if(cb.item[get(itemname)].onclick,
      <!-- call the onclick event after the combobox has closed -->
      delayedcall(get(cb.open_close_speed),
        copy(cb.curitem, cb.item[get(itemname)]);
        callwith(cb,
          cb.item[get(itemname)].onclick();
        );
      );
    );
  </action>


  <!-- select an item -->
  <action name="panoramacombobox_kr_selectitem" scope="local" args="cbname, itemname">
    if(global.combbox_item_pressed != true,
      copy(cb, layer[get(cbname)]);
      copy(cb.lastselecteditemindex, cb.selecteditemindex);
      copy(cb.selecteditemindex, cb.item[get(itemname)].index);
      <!-- call onchange event on selection change -->
      if(cb.lastselecteditemindex != cb.selecteditemindex AND cb.onchange,
        callwith(cb, onchange() );
      );
      if(global.openedcombobox === cb,
        <!-- when opened, just close to the selected item -->
        panoramacombobox_kr_closelist();
        ,
        if(layer[get(cbname)].scrollarea.loaded,
          layer[get(cbname)].scrollarea.stopscrolling();
          calc(offset, cb.selecteditemindex*(cb.autosize_max_h + cb.margin));
          tween(layer[get(cbname)].marker.y, calc(cb.margin + offset + cb.autosize_max_h/2), 0);
          tween(layer[get(cbname)].scrollarea.y, calc(-offset), 0, default, layer[get(cbname)].scrollarea.update(); );
        );
      );
    );
  </action>


  <!-- find an item by its caption, the global variable defined in 'returnvariable' will contain the index  -->
  <action name="panoramacombobox_kr_finditem" scope="local" args="cbname, itemcaption, returnvariable">
    copy(cb, layer[get(cbname)]);
    copy(item_cnt, cb.item.count);
    set(calc('global.' + returnvariable), -1);
    for(def(item_i, integer, 0), item_i LT  item_cnt, inc(item_i),
      if(cb.item[get(item_i)].caption == itemcaption,
        copy(calc('global.' + returnvariable), item_i);
        copy(item_i, item_cnt);
      );
    );
  </action>


  <!-- remove all items (to be able to add new ones) -->
  <action name="panoramacombobox_kr_removeitems" scope="local" args="cbname">
    copy(cb, layer[get(cbname)]);
    if(global.openedcombobox === cb, panoramacombobox_kr_closelist() );

    <!-- remove all item layers -->
    calc(item_i, cb.item.count - 1);
    loop(item_i GE 0,
      removelayer(get(cb.item[get(item_i)].itemlayername));
      dec(item_i);
    );

    <!-- reset the item information -->
    set(cb.item.count, 0);
    set(cb.autosize_i,0);
    set(cb.autosize_cnt, 0);
    set(cb.autosize_max_w, 0);
    set(cb.autosize_max_h, 0);
    set(cb.selecteditemindex, 0);
    set(cb.lastselecteditemindex, 0);
    if(cb.width == cb.lastautosizedwidth, set(cb.width, null));
  </action>


  <!-- open the combobox list -->
  <action name="panoramacombobox_kr_openlist" scope="local" args="cbname">
    <!-- if another combobox is already open, close that one first -->
    if(global.openedcombobox !== null, panoramacombobox_kr_closelist() );

    copy(cb, layer[get(cbname)]);
    copy(global.openedcombobox, cb);

    <!-- find the available screen space above or below the combobox -->
    calc(cbheight, 2*cb.margin + cb.autosize_max_h);
    set(lx1, 0);
    set(ly1, 0);
    copy(lx2, cb.pixelwidth);
    copy(ly2, cbheight);
    layertoscreen(get(cbname), lx1,ly1, lx1,ly1);
    layertoscreen(get(cbname), lx2,ly2, lx2,ly2);
    calc(space_above, ly1 - area.pixely);
    calc(space_below, area.pixelheight - (ly2 - area.pixely));

    <!-- the required space for full opening: -->
    calc(openheight, cb.margin + cb.autosize_cnt*(cb.margin+cb.autosize_max_h) );

    <!-- vertical centered alignment? -->
    calc(cb_edge, cb.edge ? cb.edge : cb.align);
    calc(iscentered, cb_edge == 'left' OR cb_edge == 'center' OR cb_edge == 'right');
    if(iscentered,
      calc(openheight_max, space_above + space_below);
      ,
      Math.max(openheight_max, space_above, space_below);
    );

    <!-- limit the height to the available space (minus some margin) -->
    Math.min(openheight, calc(openheight_max + cbheight - 20));

    <!-- need vertical offset? (depending on the available space and the align/edge setting) -->
    set(yoffset, null);
    calc(top_overflow, -ly1 + area.pixely + openheight/2);
    calc(bottom_overflow, ly2 - area.pixely + openheight/2 - area.pixelheight);
    if(cb.parent,
      <!-- no vertical offset inside other layers, do only a height clipping -->
      Math.max(max_overflow, top_overflow, bottom_overflow, 0);
      sub(openheight, max_overflow);
      ,
      if(iscentered,
        if(openheight GE (area.pixelheight - 20),
          set(yoffset,0);
          ,
          if(top_overflow GT 0, calc(yoffset, cb.y + top_overflow); );
          if(bottom_overflow GT 0, calc(yoffset, cb.y - bottom_overflow); );
        );
      ,
        indexoftxt(isbottomalign, get(cb_edge), 'bottom');
        if(space_above GT space_below,
          if(isbottomalign LT 0, calc(yoffset, cb.y - openheight + cbheight); );
          ,
          if(isbottomalign GE 0, calc(yoffset, cb.y - openheight + cbheight); );
        );
      );
    );
    if(yoffset != null,
      copy(cb.ybackup, cb.y);
      tween(layer[get(cbname)].y, calc(yoffset), get(cb.open_close_speed));
    );

    <!-- center the opened list at the selected item -->
    calc(centeritem_y, -1 * (cb.margin + cb.selecteditemindex*(cb.margin+cb.autosize_max_h) + cb.autosize_max_h/2 - openheight/2));
    clamp(centeritem_y, calc(openheight - cb.scrollarea.height), 0);

    <!-- apply the changes now -->
    tween(layer[get(cbname)].height, get(openheight), get(cb.open_close_speed));
    tween(layer[get(cbname)].scrollarea.y, get(centeritem_y), get(cb.open_close_speed), default, layer[get(cbname)].scrollarea.update(); );

    <!-- special html5/flash case:
       rotating textfields (the marker symbol here) are not possible in
       flash (a flashplayer limitation), so use a rotated symbol instead.
    -->
    if(device.html5,
      tween(layer[get(cbname)].marker.rotate, 90, get(cb.open_close_speed));
      ,
      set(layer[get(cbname)].marker.html, '◀');
    );

    <!-- enable the scrollarea to allow the user to drag it -->
    set(cb.scrollarea.enabled, true);

    <!-- install a global onmousedown event to close the list when clicking at the pano -->
    set(events[panoramacombobox_kr_xml_plugin_events].onmousedown, panoramacombobox_kr_closelist() );
  </action>


  <!-- close the current open list -->
  <action name="panoramacombobox_kr_closelist" scope="local">
    if(global.openedcombobox !== null,
      copy(cb, global.openedcombobox);
      delete(global.openedcombobox);

      <!-- clear the global onmousedown event -->
      set(events[panoramacombobox_kr_xml_plugin_events].onmousedown, null);

      <!-- disable the dragging -->
      set(cb.scrollarea.enabled, false);

      <!-- closing animations -->
      calc(offset, cb.selecteditemindex*(cb.autosize_max_h + cb.margin));
      if(cb.ybackup !== null, tween(cb.y, get(cb.ybackup), get(cb.open_close_speed)));
      layer[get(cb.name)].scrollarea.stopscrolling();
      tween(layer[get(cb.name)].height, calc(2*cb.margin + cb.autosize_max_h), get(cb.open_close_speed));
      tween(layer[get(cb.name)].scrollarea.y, calc(-offset), get(cb.open_close_speed), default, layer[get(cb.name)].scrollarea.update(); );
      tween(layer[get(cb.name)].marker.y, calc(cb.margin + offset + cb.autosize_max_h/2), get(cb.open_close_speed));
      <!-- special html5/flash case: rotate marker or change symbol -->
      if(device.html5,
        tween(layer[get(cb.name)].marker.rotate, 0, get(cb.open_close_speed));
        ,
        set(layer[get(cb.name)].marker.html, '▼');
      );
    );
  </action>

  <events name="panoramacomboboxStartTourEvents" onTourStart="set(layer[panoramacombobox].isStarted, true);if(layer[panoramacombobox].isLoaded,panoramacomboboxShow(););" keep="true" />


  <combobox name="panoramacombobox"
    design=""
    keep="true"
    visible="false"
    zorder="3"
    align="topright"
    x="5" y="10"
    onloaded="panoramacomboboxLoaded();"
    isStarted="false"
    isLoaded="false"
    />

  <action name="panoramacomboboxLoaded">

    layer[panoramacombobox].removeAll();


    panoramacomboboxAddItem(pano10_title, pano10, pano10, false);
    panoramacomboboxAddItem(pano56_title, pano56, pano56, false);
    panoramacomboboxAddItem(pano71_title, pano71, pano71, false);
    panoramacomboboxAddItem(pano112_title, pano112, pano112, false);
    panoramacomboboxAddItem(pano143_title, pano143, pano143, false);
    panoramacomboboxAddItem(pano153_title, pano153, pano153, false);
    panoramacomboboxAddItem(pano168_title, pano168, pano168, false);
    panoramacomboboxAddItem(pano169_title, pano169, pano169, false);
    set(layer[panoramacombobox].isLoaded, true);

    if(layer[panoramacombobox].isStarted,
      panoramacomboboxShow();
    );
  </action>


  <action name="panoramacomboboxAddItem">
    getmessage(caption, %1);

    indexoftxt(found, get(caption), '&amp;');
    if(found GE 0,
      subtxt(part1, get(caption), 0, get(found));
      add(found, 1);
      subtxt(part2, get(caption), get(found), get(caption.length));
      txtadd(caption, get(part1), '&amp;', get(part2));
    );
    if(%4,
      txtadd(title, "&#x00A0;&#x00A0;&#x00A0;", get(caption));
    ,
      set(title, get(caption));
    );

    layer[panoramacombobox].addNamedItem(%2, get(title), mainloadscene(%3));
  </action>

  <action name="panoramacomboboxUpdateLanguage">
    layer[panoramacombobox].closeList();
    layer[panoramacombobox].removeAll();

    panoramacomboboxAddItem(pano10_title, pano10, pano10, false);
    panoramacomboboxAddItem(pano56_title, pano56, pano56, false);
    panoramacomboboxAddItem(pano71_title, pano71, pano71, false);
    panoramacomboboxAddItem(pano112_title, pano112, pano112, false);
    panoramacomboboxAddItem(pano143_title, pano143, pano143, false);
    panoramacomboboxAddItem(pano153_title, pano153, pano153, false);
    panoramacomboboxAddItem(pano168_title, pano168, pano168, false);
    panoramacomboboxAddItem(pano169_title, pano169, pano169, false);

    panoramacomboboxUpdateList();
  </action>

  <events name="panoramacomboboxEvents"
    hidetourcontrols="panoramacomboboxHide();"
    showtourcontrols="panoramacomboboxShow();"
    onnewpano="panoramacomboboxOnPanorama();"
    changetourlanguage="panoramacomboboxUpdateLanguage();"
    keep="true"
    />

  <action name="panoramacomboboxHide">
    set(layer[panoramacombobox].visible, false);
  </action>

  <action name="panoramacomboboxShow">
  if(layer[panoramacombobox].isLoaded,
    if (layer[panoramacombobox].item.count GT 0,
      set(layer[panoramacombobox].visible, true);
    ,
      set(layer[panoramacombobox].visible, false);
    );
  ,
    set(layer[panoramacombobox].visible, false);
  );
  </action>

  <action name="panoramacomboboxOnPanorama">
    if(layer[panoramacombobox].isLoaded,
      panoramacomboboxUpdateList();
    ,
      delayedcall(0.2, panoramacomboboxOnPanorama);
    );
  </action>

  <action name="panoramacomboboxUpdateList">
    set(itemtoselect, get(scene[get(xml.scene)].name));
    layer[panoramacombobox].selectItemByName(get(itemtoselect));
  </action>

  <action name="panoramacomboboxOpenComboboxList">
    layer[panoramacombobox].openList();
  </action>

  <action name="panoramacomboboxCloseComboboxList">
    layer[panoramacombobox].closeList();
  </action>

<!-- ********** -->
<!-- Title Extended - Scene specific -->
<!-- id : extendedtitle -->
<!-- ********** -->

  <events name="extendedtitle_events" 
    onTourStart="showextendedtitle();"
    hidetourcontrols="hideextendedtitle();" 
    showtourcontrols="showextendedtitle();" 
    changetourlanguage="changeLanguageextendedtitle"
    keep="true" />
  <action name="hideextendedtitle">set(layer[extendedtitle].visible, false);</action>
  <action name="showextendedtitle">
    if (tour_displaycontrols,
    set(layer[extendedtitle].visible, true );
    ,
      set(layer[extendedtitle].visible, false );
    );
  </action>
  <action name="changeLanguageextendedtitle">
    updateextendedtitle();
  </action>

  <action name="updateextendedtitle">
    getmessage(layer[extendedtitle].html, extendedtitlecustomtitle);
    escape(layer[extendedtitle].html);
  </action>


  <layer name="extendedtitle" keep="true" zorder="4"
         type="text"
         align="topleft" x="15" y="8"
         onloaded="getmessage(html,extendedtitlecustomtitle);escape(html);"
         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:left;
              color:#000000;
              font-family:Kokonor;
              font-size:20px;"/>

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

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

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

  <action name="enableGyroscope">
    changeGyroscopeState(true);
  </action>
  <action name="disableGyroscope">
    changeGyroscopeState(false);
  </action>


</krpano>