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

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


  
  <!-- Spot Style - Default Polygon Spot Style -->
  <style name="PolygonDefaultPolygonSpotStyle"
           visible="false"
           bordercolor="0xffffff"
           fillcolor="0xffffff"
           borderwidth="1"
           borderalpha="0"
           fillalpha="0"
           capture="false"
           onhover="onhoverPolygonDefaultPolygonSpotStyle"
           onover="onoverPolygonDefaultPolygonSpotStyle"
           onout="onoutPolygonDefaultPolygonSpotStyle"
           />
  <action name="onhoverPolygonDefaultPolygonSpotStyle">
    showTooltip('hotspot');
  </action>

  <action name="onoverPolygonDefaultPolygonSpotStyle">
    set(borderwidth, 1);
  </action>

  <action name="onoutPolygonDefaultPolygonSpotStyle">

    set(borderwidth, 1);
    hideTooltip();
  </action>



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

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

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

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

<!-- ********** -->
<!-- Plan -->
<!-- id : floorPlan -->
<!-- ********** -->

	<ptplugin name="floorPlan" engine="KolorFloorPlan">
		<settings>
			<option name="background_color" value="67ff74" type="string" />
			<option name="background_lighter_color" value="9affa3" type="string" />
			<option name="background_darker_color" value="56d561" type="string" />
			<option name="background_alpha" value="0.50000762951094835" type="float" />
			<option name="text_color" value="000000" type="string" />

			<option name="resize" value="true" type="bool" />
			<option name="fp_selector" value="one" type="string" />
			<option name="fp_selector_label" value="floorPlanmenu_label" type="string" />
			<option name="display_title" value="false" type="bool" />
			<option name="title_font" value="Verdana" type="string" />
			<option name="title_size" value="14" type="int" />
			<option name="title_weight" value="normal" type="string" />
			<option name="title_decoration" value="normal" type="string" />
			<option name="title_color" value="000000" type="string" />
			<option name="display_orientation" value="false" type="bool" />
			<option name="display_radar" value="true" type="bool" />
			<option name="radar_radius" value="50" type="int" />
			<option name="radar_line_width" value="1" type="int" />
			<option name="radar_line_color" value="ff0000" type="string" />
			<option name="radar_line_alpha" value="1" type="float" />
			<option name="radar_fill_color" value="2eff3f" type="string" />
			<option name="radar_fill_alpha" value="0.30000762951094834" type="float" />
			<option name="selected_effect" value="bounce" type="string" />
			<option name="close_on_click" value="false" type="bool" />
			<option name="position" value="left" type="string" />
			<option name="zorder" value="2" type="int" />
			<option name="use_i18n" value="true" type="bool" />
		</settings>
		
		<floorplanItems selectedItem="fpitemmain" selectedSpot="" selectedSpotScene="" selectedSpotHeading="" selectedSpotFov="">
				
				<floorplanItem 
					name="fpitemmain" 
					width="369" 
					height="533" 
					groupName="" 
					url="floorplan/plan_eglise.jpg" 
					title="project_floor_title"
					heading="0">
							<spot name="spotmap323" posX="0.500849009" posY="0.855633974" heading="96.999999999998977" desc="spotmap323_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano28" jsClick="spotmap323ActionSpotFloorPlan">
								<icon url="spots/hotspot_plan_user_defaultmap0.png" iconWidth="20" iconHeight="20" iconAnchor="center" />
							</spot>
							<spot name="spotmap326" posX="0.499150991" posY="0.739436984" heading="105.7999999999996" desc="spotmap326_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano250" jsClick="spotmap326ActionSpotFloorPlan">
								<icon url="spots/hotspot_plan_user_defaultmap0.png" iconWidth="20" iconHeight="20" iconAnchor="center" />
							</spot>
							<spot name="spotmap327" posX="0.502547026" posY="0.610328972" heading="92.199999999999818" desc="spotmap327_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano246" jsClick="spotmap327ActionSpotFloorPlan">
								<icon url="spots/hotspot_plan_user_defaultmap0.png" iconWidth="20" iconHeight="20" iconAnchor="center" />
							</spot>
							<spot name="spotmap328" posX="0.502547026" posY="0.380282015" heading="0" desc="spotmap328_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano248" jsClick="spotmap328ActionSpotFloorPlan">
								<icon url="spots/hotspot_plan_user_defaultmap0.png" iconWidth="20" iconHeight="20" iconAnchor="center" />
							</spot>
							<spot name="spotmap329" posX="0.502547026" posY="0.169014007" heading="0" desc="spotmap329_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano242" jsClick="spotmap329ActionSpotFloorPlan">
								<icon url="spots/hotspot_plan_user_defaultmap0.png" iconWidth="20" iconHeight="20" iconAnchor="center" />
							</spot>
							<spot name="spotmap330" posX="0.311354995" posY="0.263291001" heading="-71.800000000000054" desc="spotmap330_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano256" jsClick="spotmap330ActionSpotFloorPlan">
								<icon url="spots/hotspot_plan_user_defaultmap0.png" iconWidth="20" iconHeight="20" iconAnchor="center" />
							</spot>
							<spot name="spotmap331" posX="0.707979977" posY="0.278169006" heading="32.799999999999962" desc="spotmap331_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano252" jsClick="spotmap331ActionSpotFloorPlan">
								<icon url="spots/hotspot_plan_user_defaultmap0.png" iconWidth="20" iconHeight="20" iconAnchor="center" />
							</spot>
							<spot name="spotmap332" posX="0.702885985" posY="0.440140992" heading="-4.3999999999999773" desc="spotmap332_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano238" jsClick="spotmap332ActionSpotFloorPlan">
								<icon url="spots/hotspot_plan_user_defaultmap0.png" iconWidth="20" iconHeight="20" iconAnchor="center" />
							</spot>
							<spot name="spotmap333" posX="0.308997989" posY="0.441314995" heading="0" desc="spotmap333_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano240" jsClick="spotmap333ActionSpotFloorPlan">
								<icon url="spots/hotspot_plan_user_defaultmap0.png" iconWidth="20" iconHeight="20" iconAnchor="center" />
							</spot>
							<spot name="spotmap334" posX="0.135530993" posY="0.278481007" heading="114.3999999999991" desc="spotmap334_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano266" jsClick="spotmap334ActionSpotFloorPlan">
								<icon url="spots/hotspot_plan_user_defaultmap0.png" iconWidth="20" iconHeight="20" iconAnchor="center" />
							</spot>
							<spot name="spotmap336" posX="0.207130998" posY="0.969483972" heading="46.999999999999723" desc="spotmap336_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano270" jsClick="spotmap336ActionSpotFloorPlan">
								<icon url="spots/hotspot_plan_user_defaultmap0.png" iconWidth="20" iconHeight="20" iconAnchor="center" />
							</spot>
							<spot name="spotmap337" posX="0.869270027" posY="0.644366026" heading="-159.60000000000059" desc="spotmap337_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano260" jsClick="spotmap337ActionSpotFloorPlan">
								<icon url="spots/hotspot_plan_user_defaultmap0.png" iconWidth="20" iconHeight="20" iconAnchor="center" />
							</spot>
							<spot name="spotmap338" posX="0.772894025" posY="0.106329001" heading="-128.19999999999951" desc="spotmap338_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano262" jsClick="spotmap338ActionSpotFloorPlan">
								<icon url="spots/hotspot_plan_user_defaultmap0.png" iconWidth="20" iconHeight="20" iconAnchor="center" />
							</spot>
							<spot name="spotmap339" posX="0.315789014" posY="0.0739436969" heading="167.79999999999981" desc="spotmap339_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano264" jsClick="spotmap339ActionSpotFloorPlan">
								<icon url="spots/hotspot_plan_user_defaultmap0.png" iconWidth="20" iconHeight="20" iconAnchor="center" />
							</spot>
							<spot name="spotmap341" posX="0.271061987" posY="0.306329012" heading="119.2000000000001" desc="spotmap341_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano254" jsClick="spotmap341ActionSpotFloorPlan">
								<icon url="spots/hotspot_plan_user_defaultmap0.png" iconWidth="20" iconHeight="20" iconAnchor="center" />
							</spot>
							<spot name="spotmap342" posX="0.0512821004" posY="0.556962013" heading="105.7999999999998" desc="spotmap342_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano268" jsClick="spotmap342ActionSpotFloorPlan">
								<icon url="spots/hotspot_plan_user_defaultmap0.png" iconWidth="20" iconHeight="20" iconAnchor="center" />
							</spot>
							<spot name="spotmap344" posX="0.500849009" posY="0.931924999" heading="1.599999999999284" desc="spotmap344_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano30" jsClick="spotmap344ActionSpotFloorPlan">
								<icon url="spots/hotspot_plan_user_defaultmap0.png" iconWidth="20" iconHeight="20" iconAnchor="center" />
							</spot>
							<spot name="spotmap363" posX="0.517826974" posY="0.802816987" heading="0" desc="spotmap363_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano236" jsClick="spotmap363ActionSpotFloorPlan">
								<icon url="spots/hotspot_plan_user_defaultmap0.png" iconWidth="20" iconHeight="20" iconAnchor="center" />
							</spot>
							<spot name="spotmap366" posX="0.0476190001" posY="0.432911009" heading="-110.2000000000002" desc="spotmap366_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano258" jsClick="spotmap366ActionSpotFloorPlan">
								<icon url="spots/hotspot_plan_user_defaultmap0.png" iconWidth="20" iconHeight="20" iconAnchor="center" />
							</spot>
							<spot name="spotmap367" posX="0.480475008" posY="0.802816987" heading="-127.0000000000002" desc="spotmap367_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano244" jsClick="spotmap367ActionSpotFloorPlan">
								<icon url="spots/hotspot_plan_user_defaultmap0.png" iconWidth="20" iconHeight="20" iconAnchor="center" />
							</spot>
				</floorplanItem>
			
			
		</floorplanItems>
	</ptplugin>
	
	<action name="kolorFloorplanJsReady_floorPlan">
		set(ptplugin[floorPlan].jsready, true);
		
		ifnot(ptplugin[floorPlan].floorplanItems.selectedSpot == "",
			set(ptplugin[floorPlan].floorplanItems.selectedSpotFov, get(view.hfov));
			js(invokePluginFunction(floorPlan, setKolorFloorPlanSelectedSpotOptions, get(xml.scene), get(view.hlookat), get(view.hfov)));
		);
	</action>
	
	
		<!-- floorplan main spots counter : 20 -->
			<action name="spotmap323ActionSpotFloorPlan">
          mainloadscene(pano28);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
			<action name="spotmap326ActionSpotFloorPlan">
          mainloadscene(pano250);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
			<action name="spotmap327ActionSpotFloorPlan">
          mainloadscene(pano246);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
			<action name="spotmap328ActionSpotFloorPlan">
          mainloadscene(pano248);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
			<action name="spotmap329ActionSpotFloorPlan">
          mainloadscene(pano242);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
			<action name="spotmap330ActionSpotFloorPlan">
          mainloadscene(pano256);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
			<action name="spotmap331ActionSpotFloorPlan">
          mainloadscene(pano252);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
			<action name="spotmap332ActionSpotFloorPlan">
          mainloadscene(pano238);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
			<action name="spotmap333ActionSpotFloorPlan">
          mainloadscene(pano240);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
			<action name="spotmap334ActionSpotFloorPlan">
          mainloadscene(pano266);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
			<action name="spotmap336ActionSpotFloorPlan">
          mainloadscene(pano270);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
			<action name="spotmap337ActionSpotFloorPlan">
          mainloadscene(pano260);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
			<action name="spotmap338ActionSpotFloorPlan">
          mainloadscene(pano262);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
			<action name="spotmap339ActionSpotFloorPlan">
          mainloadscene(pano264);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
			<action name="spotmap341ActionSpotFloorPlan">
          mainloadscene(pano254);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
			<action name="spotmap342ActionSpotFloorPlan">
          mainloadscene(pano268);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
			<action name="spotmap344ActionSpotFloorPlan">
          mainloadscene(pano30);lookat(-0.409087, -2.454540, 81.818200);

</action>
			<action name="spotmap363ActionSpotFloorPlan">
          mainloadscene(pano236);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
			<action name="spotmap366ActionSpotFloorPlan">
          mainloadscene(pano258);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
			<action name="spotmap367ActionSpotFloorPlan">
          mainloadscene(pano244);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
	
	
	
	<events name="floorPlanEvents" 
	onxmlcomplete="ifnot(floorPlanFloorPlanLoaded,set(tour_displayfloorplan,true););floorPlanActivateDefaultSpot();" 
	onviewchanged="floorPlanOnViewChange();" 
	onhidetourfloorplan="floorPlanCloseTourFloorPlan();" 
	onshowtourfloorplan="if(tour_displayfloorplan,floorPlanOpenTourFloorPlan(););" 
	onTourStart="floorPlanOpenTourFloorPlan();"
	changetourlanguage="floorPlanChangeLanguage();"
	keep="true" />
	
	<action name="floorPlanChangeLanguage">
		if(ptplugin[floorPlan].jsready,
			stopdelayedcall(delay_floorPlan);
			js(invokePluginFunction(floorPlanArea, changeLanguage, false));
			js(invokePluginFunction(floorPlan, changeLanguage));
		,
			delayedcall(delay_floorPlan, 0.1, floorPlanChangeLanguage(););
		);
	</action>
	
	
	<krpano floorPlanFloorPlanLoaded="false" />
	
	<action name="floorPlanHideTourFloorPlan">
		hideKolorArea_floorPlanArea(true);
	</action>
	
	<action name="floorPlanCloseTourFloorPlan">
		closeKolorArea_floorPlanArea();
	</action>
	
	<action name="floorPlanShowTourFloorPlan">
		if(ptplugin[floorPlanArea].isOpen === null,
			openKolorArea_floorPlanArea();
		,
			showKolorArea_floorPlanArea(true);
		);
	</action>
	
	<action name="floorPlanOpenTourFloorPlan">
		openKolorArea_floorPlanArea();
	</action>
	
	<action name="floorPlanOnViewChange">
		if (floorPlanFloorPlanLoaded == true,
			ifnot(ptplugin[floorPlan].floorplanItems.selectedSpot == "",
				ifnot(scene[get(xml.scene)].planar,
					js(invokePluginFunction(floorPlan, changeDirection, get(xml.scene), get(view.hlookat), get(view.hfov)));
				);
			);
		);
	</action>
	
	<action name="floorPlanActivateSpot">
		
		set(ptplugin[floorPlan].floorplanItems.selectedSpot, %1);
		set(ptplugin[floorPlan].floorplanItems.selectedItem, %2);
		
		if(%1 !== "",
			set(ptplugin[floorPlan].floorplanItems.selectedSpotScene, get(xml.scene));
			set(ptplugin[floorPlan].floorplanItems.selectedSpotHeading, get(view.hlookat));
			set(ptplugin[floorPlan].floorplanItems.selectedSpotFov, get(view.hfov));
		);
		
		
		if(ptplugin[floorPlanArea].isOpen,
			floorPlanSelectActivatedSpot(%1, %2, %3);
		);
	</action>
	
	<action name="floorPlanSelectActivatedSpot">
		js(invokePluginFunction(floorPlan, selectSpot, %1, %2, %3));

		if(%1 !== "",
			if(scene[get(xml.scene)].planar,
				js(invokePluginFunction(floorPlan, hideRadar));
			,
				js(invokePluginFunction(floorPlan, changeDirection, get(xml.scene), get(view.hlookat), get(view.hfov)));
			);
		);
	</action>
	
	<action name="floorPlanDeactivateSpot">
		set(ptplugin[floorPlan].floorplanItems.selectedSpot, "");
		
		js(invokePluginFunction(floorPlan, unselectSpot));
	</action>
	
	<action name="floorPlanActivateDefaultSpot">
		set(floorPlanFloorPlanLoaded, true);
		
		set(floorPlanSpotFound, "");
		set(floorPlanSpotScene, "");
		set(floorPlanItemFound, "");
		set(floorPlanItemSearch, true);
		set(floorPlanSpotSearchActivated, true);
		set(floorPlanSpotSearchContinue, true);
		
		
		for(set(defaultfloorplaniteminc,0), defaultfloorplaniteminc LT ptplugin[floorPlan].floorplanItems.floorplanItem.count , inc(defaultfloorplaniteminc),
                        if(floorPlanSpotSearchActivated == true,
				
				if(ptplugin[floorPlan].floorplanItems.floorplanItem[get(defaultfloorplaniteminc)].groupName == scene[get(xml.scene)].group,
					set(floorPlanItemFound, get(ptplugin[floorPlan].floorplanItems.floorplanItem[get(defaultfloorplaniteminc)].name));
					set(ptplugin[floorPlan].floorplanItems.selectedItem, get(ptplugin[floorPlan].floorplanItems.floorplanItem[get(defaultfloorplaniteminc)].name));
					set(floorPlanItemSearch, false);
				,
					
					if(floorPlanItemFound == "",
						set(floorPlanItemFound, get(ptplugin[floorPlan].floorplanItems.floorplanItem[fpitemmain].name));
						set(ptplugin[floorPlan].floorplanItems.selectedItem, get(ptplugin[floorPlan].floorplanItems.floorplanItem[fpitemmain].name));
					);
				);
			);
			if(floorPlanSpotSearchActivated == true,
                                for(set(defaultspotinc,0), defaultspotinc LT ptplugin[floorPlan].floorplanItems.floorplanItem[get(defaultfloorplaniteminc)].spot.count , inc(defaultspotinc),
                                        if(ptplugin[floorPlan].floorplanItems.floorplanItem[get(defaultfloorplaniteminc)].spot[get(defaultspotinc)].isScene == true,
					
						if(floorPlanSpotSearchContinue == true,
							if(ptplugin[floorPlan].floorplanItems.floorplanItem[get(defaultfloorplaniteminc)].spot[get(defaultspotinc)].scene == xml.scene,
								set(floorPlanSpotFound, get(ptplugin[floorPlan].floorplanItems.floorplanItem[get(defaultfloorplaniteminc)].spot[get(defaultspotinc)].name));
								set(floorPlanSpotScene, get(ptplugin[floorPlan].floorplanItems.floorplanItem[get(defaultfloorplaniteminc)].spot[get(defaultspotinc)].scene));
								set(ptplugin[floorPlan].floorplanItems.selectedItem, get(ptplugin[floorPlan].floorplanItems.floorplanItem[get(defaultfloorplaniteminc)].name));
								if(floorPlanItemSearch == false,
									set(floorPlanSpotSearchContinue, false);
									set(floorPlanSpotSearchActivated, false);
								);
							);
						);
					);
					
				);
			);
		);
		
		if(floorPlanSpotFound == "",
			
			
			floorPlanDeactivateSpot();
			
			
			set(ptplugin[floorPlan].floorplanItems.selectedItem, get(floorPlanItemFound));
			
			
			ifnot(ptplugin[floorPlan].floorplanItems.selectedItem == "",
				floorPlanActivateSpot("", get(ptplugin[floorPlan].floorplanItems.selectedItem), "");
			);
		,
			
			floorPlanActivateSpot(get(floorPlanSpotFound), get(ptplugin[floorPlan].floorplanItems.selectedItem), get(floorPlanSpotScene));
		);
	</action>
	
	<action name="floorPlanChangeTitle">
		js(invokePluginFunction(floorPlan, changeTitle, %1));
	</action>
	
	<ptplugin name="floorPlanArea" engine="kolorArea">
	<settings>
		<option name="position" value="left" type="string" />
		<option name="start_position" value="left" type="string" />
		<option name="margin_x" value="10" type="int" />
		<option name="margin_y" value="0" type="int" />
		<option name="display_title" value="false" type="bool" />
		<option name="title_font" value="Verdana" type="string" />
		<option name="title_size" value="14" type="int" />
		<option name="title_weight" value="normal" type="string" />
		<option name="title_decoration" value="normal" type="string" />
		<option name="title_color" value="000000" type="string" />
		<option name="close_displayed" value="true" type="bool" />
		<option name="close_text" value="floorPlandisplay_close_text" type="string" />

		<option name="background_color" value="67ff74" type="string" />
		<option name="background_alpha" value="0.50000762951094835" type="float" />
		<option name="overlay_displayed" value="false" type="bool" />
		<option name="overlay_color" value="741b37" type="string" />
		<option name="overlay_alpha" value="0.50000762951094835" type="float" />

		<option name="padding" value="30" type="int" />
		<option name="topleft_radius" value="5" type="int" />
		<option name="topright_radius" value="5" type="int" />
		<option name="bottomleft_radius" value="5" type="int" />
		<option name="bottomright_radius" value="5" type="int" />
		<option name="area_border_width" value="5" type="int" />
		<option name="area_border_color" value="000000" type="string" />
		<option name="area_border_alpha" value="1" type="float" />
		<option name="area_width" value="29" type="int" />
		<option name="area_height" value="87" type="int" />
		<option name="area_width_unit" value="percent" type="string" />
		<option name="area_height_unit" value="percent" type="string" />
		<option name="animation" value="true" type="bool" />
		<option name="animation_duration" value="1500" type="int" />
		<option name="close_on_click" value="false" type="bool" />
		<option name="refresh_content" value="false" type="bool" />
		<option name="open_callback" value="addKolorFloorPlan('floorPlan', 'floorPlanArea_floorplanDIV');" type="string" />
		<option name="close_callback" value="invokeKrFunction('closeKolorAreaCallback_floorPlanArea')" type="string" />
		<option name="zorder" value="2" type="int" />
		<option name="use_i18n" value="true" type="bool" />
	</settings>
	</ptplugin>
	
	<action name="kolorAreaJsReady_floorPlanArea">
		set(ptplugin[floorPlanArea].jsready, true);

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

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

			js(showKolorArea(floorPlanArea, &lt;div id="floorPlanArea_floorplanDIV"&gt;&lt;/div&gt;));
			
			if(ptplugin[floorPlan].floorplanItems.selectedSpot != "",
				floorPlanSelectActivatedSpot(get(ptplugin[floorPlan].floorplanItems.selectedSpot), get(ptplugin[floorPlan].floorplanItems.selectedItem), get(ptplugin[floorPlan].floorplanItems.selectedSpotScene));
			);
			events.dispatch(onremovedisplayedobject);
		);
	</action>
	
	<action name="closeKolorArea_floorPlanArea">
		if(ptplugin[floorPlanArea].isOpen,
			js(invokePluginFunction(floorPlanArea, closeKolorArea));
		);
	</action>
	
	<action name="toggleKolorArea_floorPlanArea">
		if(ptplugin[floorPlanArea].isOpen,
			closeKolorArea_floorPlanArea();
		,
			openKolorArea_floorPlanArea();
		);
	</action>
	
	<action name="closeKolorAreaCallback_floorPlanArea">
		if(ptplugin[floorPlanArea].isOpen,resumeautorotation(forceplugin);

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

	</action>
	
	<action name="changeTitleKolorArea_floorPlanArea">
		js(invokePluginFunction(floorPlanArea, changeTitle, %1));
	</action>
	
	<action name="showKolorArea_floorPlanArea">
		set(ptplugin[floorPlanArea].isOpen, true);
		pauseautorotation(forceplugin);

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

		if(ptplugin[floorPlanArea].autorotateBlocked,if(tour_autorotation_openatstartplugin GT 0,dec(tour_autorotation_openatstartplugin);set(ptplugin[floorPlanArea].autorotateBlocked,false);););
		set(ptplugin[floorPlanArea].isOpen, false);
		js(invokePluginFunction(floorPlanArea, hideKolorArea, %1));
	</action>
	
	<events name="kolorAreaEvents_floorPlanArea" 
		keep="true"
	/>
	

<!-- ********** -->
<!-- Barre de contrôle classique -->
<!-- id : controlBar_classic -->
<!-- ********** -->

  <krpano controlBar_classicbarbuilt="false" controlBar_classicbackgroundwidthwhenclosed="0" controlBar_classicbackgroundwidthwhenopened="0" controlBar_classicIsOpened="false" />
  <events name="controlBar_classicevents" 
    onxmlcomplete="controlBar_classicbuildMenuBar();" 


    keep="true" />



  <action name="controlBar_classicbuildMenuBar">
    ifnot (controlBar_classicbarbuilt, controlBar_classicbuildMenu(); set(controlBar_classicbarbuilt, true););
  </action>

  <action name="controlBar_classicbuildMenu">
    
    set(controlBar_classicbutton_pos, 20);

    set(layer[controlBar_classicbtn_hidecontrols].x, get(controlBar_classicbutton_pos));
    set(layer[controlBar_classicbtn_showcontrols].x, get(controlBar_classicbutton_pos));
    inc(controlBar_classicbutton_pos, 36);
    add(controlBar_classicbackgroundwidthwhenclosed, get(controlBar_classicbutton_pos), 20);



    if (device.fullscreensupport,
      set(layer[controlBar_classicbtn_openfs ].x, get(controlBar_classicbutton_pos));
      set(layer[controlBar_classicbtn_closefs].x, get(controlBar_classicbutton_pos));
      inc(controlBar_classicbutton_pos, 36);
    );


    set(layer[controlBar_classicbtn_display_floorplan].x, get(controlBar_classicbutton_pos));
    set(layer[controlBar_classicbtn_hide_floorplan   ].x, get(controlBar_classicbutton_pos));
    inc(controlBar_classicbutton_pos, 36);


    set(layer[controlBar_classicbtn_autorotate_on ].x, get(controlBar_classicbutton_pos));
    set(layer[controlBar_classicbtn_autorotate_off].x, get(controlBar_classicbutton_pos));
    inc(controlBar_classicbutton_pos, 36);




    if(plugin[ptpvrmode] AND device.html5,
      set(layer[controlBar_classicbtn_enter_vr].x, get(controlBar_classicbutton_pos));
      set(layer[controlBar_classicbtn_enter_vr_not].x, get(controlBar_classicbutton_pos));
      inc(controlBar_classicbutton_pos, 36);
    );



    if (device.desktop,
        set(layer[controlBar_classicbtn_right].x, get(controlBar_classicbutton_pos));
        inc(controlBar_classicbutton_pos, 36);
        set(layer[controlBar_classicbtn_left].x, get(controlBar_classicbutton_pos));
        inc(controlBar_classicbutton_pos, 36);
    );
    if (device.desktop,
        set(layer[controlBar_classicbtn_down].x, get(controlBar_classicbutton_pos));
        inc(controlBar_classicbutton_pos, 36);
        set(layer[controlBar_classicbtn_up].x, get(controlBar_classicbutton_pos));
        inc(controlBar_classicbutton_pos, 36);
    );
    if (device.desktop,
        set(layer[controlBar_classicbtn_out].x, get(controlBar_classicbutton_pos));
        inc(controlBar_classicbutton_pos, 36);
        set(layer[controlBar_classicbtn_in].x, get(controlBar_classicbutton_pos));
        inc(controlBar_classicbutton_pos, 36);
    );


    inc(controlBar_classicbutton_pos, 20);

    set(controlBar_classicbackgroundwidthwhenopened, get(controlBar_classicbutton_pos));



    
    add(controlBar_classicVerifyVisibility, 20, 20);
    if(controlBar_classicbackgroundwidthwhenopened == controlBar_classicVerifyVisibility,
      set(controlBar_classicbackgroundwidthwhenopened, 0);


    );

	
	
  </action>

	<events name="controlBar_classicStartTourEvents" onTourStart="controlBar_classicCallOnStartTour();" keep="true" />

	<action name="controlBar_classicCallOnStartTour">
		
		set(layer[controlBar_classicmenu_controlbar_bg_img].width , get(controlBar_classicbackgroundwidthwhenclosed));
		set(layer[controlBar_classicmenu_controlbar_bg].width , get(controlBar_classicbackgroundwidthwhenclosed));
		controlBar_classichideMenuControls();
	</action>



  <style name="controlBar_classic_btn_style"
         keep="true"
         alpha="0.8"
         edge="right" align="right"
         width="36" height="36"
         zorder="5"
         onover="controlBar_classicctrlbaronoveraction();"
         onout="controlBar_classicctrlbaronoutaction();"
         onhover="showTooltip('plugin', controlBar_classicmenuTooltipStyle, bottom);"
         />
  <action name="controlBar_classicctrlbaronoveraction">
    tween(alpha,1,0.1,easeoutquad);
    tween(y,-2,0.1,easeoutquad);
  </action>  
  <action name="controlBar_classicctrlbaronoutaction">
    tween(alpha,0.8);
    tween(y,0,0.1,easeoutquad);
    hideTooltip();
  </action>

  <layer name="controlBar_classicmenu_controlbar_bg_img"
         keep="true"
         align="bottom"
         x="0" y="10"
         url="%FIRSTXML%/graphics/classiccontrolbar/footer.png"
         zorder="3"
         width="40"
         height="40"
         scale9grid="10|10|80|80"
         visible="false"
         />
  <layer name="controlBar_classicmenu_controlbar_bg"
         keep="true"
         align="bottom"
         x="0" y="10"
         type="container"
         zorder="4"
         width="40"
         height="40"
         visible="false"
         alpha="1.0"
         >



    <layer name="controlBar_classicbtn_in"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_zoom_in.png"
            ondown="viewControlZoomIn(false);"
            onup="viewControlZoomStop();
"
            style="controlBar_classic_btn_style"
            tooltip="controlBar_classiczoomInTip"
            devices="desktop"
            visible="false"
            />
    <layer name="controlBar_classicbtn_out"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_zoom_out.png"
            ondown="viewControlZoomOut(false);
"
            onup="viewControlZoomStop();
"
            style="controlBar_classic_btn_style"
            tooltip="controlBar_classiczoomOutTip"
            devices="desktop"
            visible="false"
            />

    <layer name="controlBar_classicbtn_left"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_move_left.png"
            ondown="viewControlMoveLeft(false);
"
            onup="viewControlMoveHoriStop();
"
            style="controlBar_classic_btn_style"
            tooltip="controlBar_classicmoveLeftTip"
            devices="desktop"
            visible="false"
            />
    <layer name="controlBar_classicbtn_right"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_move_right.png"
            ondown="viewControlMoveRight(false);
"
            onup="viewControlMoveHoriStop();
"
            style="controlBar_classic_btn_style"
            tooltip="controlBar_classicmoveRightTip"
            devices="desktop"
            visible="false"
            />

    <layer name="controlBar_classicbtn_up"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_move_up.png"
            ondown="viewControlMoveUp(false);
"
            onup="viewControlMoveVertStop();
"
            style="controlBar_classic_btn_style"
            tooltip="controlBar_classicmoveUpTip"
            devices="desktop"
            visible="false"
            />
    <layer name="controlBar_classicbtn_down"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_move_down.png"
            ondown="viewControlMoveDown(false);
"
            onup="viewControlMoveVertStop();
"
            style="controlBar_classic_btn_style"
            tooltip="controlBar_classicmoveDownTip"
            devices="desktop"
            visible="false"
            />




    <layer name="controlBar_classicbtn_display_floorplan"
           url="%FIRSTXML%/graphics/classiccontrolbar/btn_floorplan.png"
           onclick="showFloorplan();
"
           style="controlBar_classic_btn_style"
           visible="false"
           tooltip="controlBar_classicdisplayFloorplanTip"
           />
    <layer name="controlBar_classicbtn_hide_floorplan"
           url="%FIRSTXML%/graphics/classiccontrolbar/btn_floorplan.png"
           onclick="hideFloorplan();
"
           style="controlBar_classic_btn_style"
           visible="false"
           tooltip="controlBar_classichideFloorplanTip"
           />


    <layer name="controlBar_classicbtn_openfs"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_enter_fs.png"
            onclick="enterFullscreen();
"
            style="controlBar_classic_btn_style"
            devices="fullscreensupport"
            visible="false"
            tooltip="controlBar_classicopenFsTip"
            />
    <layer name="controlBar_classicbtn_closefs"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_close_fs.png"
            onclick="exitFullscreen();
"
            style="controlBar_classic_btn_style"
            visible="false"
            devices="fullscreensupport"
            tooltip="controlBar_classiccloseFsTip"
            />

    <layer name="controlBar_classicbtn_autorotate_on"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_start_autorotation.png"
            onclick="resumeautorotation();
"
            style="controlBar_classic_btn_style"
            visible="false"
            tooltip="controlBar_classicautorotateOnTip"
            />
    <layer name="controlBar_classicbtn_autorotate_off"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_stop_autorotation.png"
            onclick="pauseautorotation();
"
            style="controlBar_classic_btn_style"
            visible="false"
            tooltip="controlBar_classicautorotateOffTip"
            />


    <layer name="controlBar_classicbtn_enter_vr"
           url="%FIRSTXML%/graphics/classiccontrolbar/btn_vr_mode.png"
           onclick="if(scene[get(xml.scene)].full360 AND disableCurrentSceneVrConservation !== true,
    js(accessWebVr(get(xml.scene),get(videoscenestarttime)));
,
    js(accessWebVr(null));
);"
           style="controlBar_classic_btn_style"
           visible="false"
           devices="html5"
           tooltip="controlBar_classicenterVRTip"
           />
    <layer name="controlBar_classicbtn_enter_vr_not"
           url="%FIRSTXML%/graphics/classiccontrolbar/btn_vr_mode_off.png"
           style="controlBar_classic_btn_style"
           enabled="true"
           capture="false"
           visible="false"
           devices="html5"
           tooltip="controlBar_classicenterVRNotTip"
           />



    <layer name="controlBar_classicbtn_hidecontrols"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_hide_controls.png"
            style="controlBar_classic_btn_style"
            onclick="controlBar_classichideMenuControls();hideTourControls();
"
            visible="false"
            tooltip="controlBar_classichideControlsTip"
            />
    <layer name="controlBar_classicbtn_showcontrols"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_show_controls.png"
            style="controlBar_classic_btn_style"
            onclick="controlBar_classicshowMenuControls();showTourControls();
"
            tooltip="controlBar_classicdisplayControlsTip"
            visible="false"
            />
  </layer>


<events name="controlBar_classicvravailableevent"
		onvravailable="controlBar_classicupdateVrButtonsAvailability();"
		onvrunavailable="controlBar_classicupdateVrButtonsAvailability();"
		keep="true" devices="html5" />
	<krpano controlBar_classicmenuvravailable="false" />
	<action name="controlBar_classicupdateVrButtonsAvailability">
		if (tour_vrdevices,
			set(controlBar_classicmenuvravailable, true);
		,
			set(controlBar_classicmenuvravailable, false);
		);
		controlBar_classicupdateVrButtons();
	</action>
	<action name="controlBar_classicHideVrButtons">
		set(layer[controlBar_classicbtn_enter_vr].visible, false);
		if('%1' == 'true' AND plugin[ptpvrmode],
			set(layer[controlBar_classicbtn_enter_vr_not].visible, true);
		,
			set(layer[controlBar_classicbtn_enter_vr_not].visible, false);
		);
	</action>
	<action name="controlBar_classicShowVrButtons">
		if (controlBar_classicmenuvravailable,
			set(layer[controlBar_classicbtn_enter_vr].visible, true);
			set(layer[controlBar_classicbtn_enter_vr_not].visible, false);
		,
			controlBar_classicHideVrButtons(true);
		);
	</action>
	<action name="controlBar_classicupdateVrButtons">
	if (tour_vrdevices,
		if (controlBar_classicIsOpened,
			controlBar_classicShowVrButtons();
		,
			controlBar_classicHideVrButtons();
		);
	,
		if (controlBar_classicIsOpened,
			controlBar_classicHideVrButtons(true);
		,
			controlBar_classicHideVrButtons();
		);
	);
	</action>



  <action name="controlBar_classichideMenuControls">
    set(controlBar_classicIsOpened, false);
    set(layer[controlBar_classicbtn_hidecontrols].visible, false);
    set(layer[controlBar_classicbtn_showcontrols].visible, true);
    controlBar_classicupdateFullscreenButtons();

    controlBar_classicupdateVrButtons();

    controlBar_classicupdateAutorotationButtons();


    set(layer[controlBar_classicbtn_up].visible  , false);
    set(layer[controlBar_classicbtn_down].visible, false);
    set(layer[controlBar_classicbtn_right].visible, false);
    set(layer[controlBar_classicbtn_left].visible , false);
    set(layer[controlBar_classicbtn_in].visible , false);
    set(layer[controlBar_classicbtn_out].visible, false);

    controlBar_classicupdateFloorplanButtons();





    if(controlBar_classicbackgroundwidthwhenclosed == 0,
      set(layer[controlBar_classicmenu_controlbar_bg_img].visible, false);
      set(layer[controlBar_classicmenu_controlbar_bg].visible, false);
    ,
      set(layer[controlBar_classicmenu_controlbar_bg_img].visible, true);
      set(layer[controlBar_classicmenu_controlbar_bg].visible, true);
    );
    tween(layer[controlBar_classicmenu_controlbar_bg_img].width,get(controlBar_classicbackgroundwidthwhenclosed),0.5,easeOutQuad);
    tween(layer[controlBar_classicmenu_controlbar_bg].width,get(controlBar_classicbackgroundwidthwhenclosed),0.5,easeOutQuad);
    tween(layer[controlBar_classicmenu_controlbar_bg_img].alpha,1.0,0.5,easeOutQuad);
  </action>
  <action name="controlBar_classicshowMenuControls">
    set(controlBar_classicIsOpened, true);
    set(layer[controlBar_classicbtn_hidecontrols].visible, true);
    set(layer[controlBar_classicbtn_showcontrols].visible, false);
    if(controlBar_classicbackgroundwidthwhenopened == 0,
      set(layer[controlBar_classicmenu_controlbar_bg_img].visible, false);
      set(layer[controlBar_classicmenu_controlbar_bg].visible, false);
    ,
      set(layer[controlBar_classicmenu_controlbar_bg_img].visible, true);
      set(layer[controlBar_classicmenu_controlbar_bg].visible, true);
    );
    tween(layer[controlBar_classicmenu_controlbar_bg_img].alpha,1.0,0.5,easeOutQuad);
    controlBar_classicshowMenuButtons();


      tween(layer[controlBar_classicmenu_controlbar_bg_img].width, get(controlBar_classicbackgroundwidthwhenopened),0.5,easeOutQuad);
      tween(layer[controlBar_classicmenu_controlbar_bg].width, get(controlBar_classicbackgroundwidthwhenopened),0.5,easeOutQuad);


  </action>
  <action name="controlBar_classicshowMenuButtons">
    if (device.desktop,
    set(layer[controlBar_classicbtn_up].visible  , true);
    set(layer[controlBar_classicbtn_down].visible, true);
    );
    if (device.desktop,
    set(layer[controlBar_classicbtn_right].visible, true);
    set(layer[controlBar_classicbtn_left].visible , true);
    );
    if (device.desktop,
    set(layer[controlBar_classicbtn_in].visible , true);
    set(layer[controlBar_classicbtn_out].visible, true);
    );

    controlBar_classicupdateFloorplanButtons();





    controlBar_classicupdateFullscreenButtons();

    controlBar_classicupdateVrButtons();

    controlBar_classicupdateAutorotationButtons();


  </action>


	<events name="controlBar_classicDisplayFloorPlanEvents" 
		onshowtourfloorplan="controlBar_classicupdateFloorplanButtons();" 
		onhidetourfloorplan="controlBar_classicupdateFloorplanButtons();" 
		keep="true" />
	<action name="controlBar_classicHideFloorplanButtons">
		set(layer[controlBar_classicbtn_display_floorplan].visible, false);
		set(layer[controlBar_classicbtn_hide_floorplan].visible, false);
	</action>
	<action name="controlBar_classicShowFloorplanButtons">
		if (tour_displayfloorplan,
			set(layer[controlBar_classicbtn_hide_floorplan].visible, true);
			set(layer[controlBar_classicbtn_display_floorplan].visible, false);
		,
			set(layer[controlBar_classicbtn_display_floorplan].visible, true);
			set(layer[controlBar_classicbtn_hide_floorplan].visible, false);
		);
	</action>
	<action name="controlBar_classicupdateFloorplanButtons">
		if (controlBar_classicIsOpened,
			controlBar_classicShowFloorplanButtons();
		,
			controlBar_classicHideFloorplanButtons();
		);
	</action>


	<events name="controlBar_classicmenufullscreenchangeevent"
		onenterfullscreen="controlBar_classicupdateFullscreenButtons();"
		onexitfullscreen="controlBar_classicupdateFullscreenButtons();"
		keep="true"/>
	<action name="controlBar_classicHideFullscreenButtons">
		set(layer[controlBar_classicbtn_openfs].visible , false);
		set(layer[controlBar_classicbtn_closefs].visible, false);
	</action>
	<action name="controlBar_classicShowFullscreenButtons">
		if (device.fullscreensupport,
			if(tour_fullscreen,
				set(layer[controlBar_classicbtn_openfs].visible , false);
				set(layer[controlBar_classicbtn_closefs].visible, true);
			,
				set(layer[controlBar_classicbtn_openfs].visible ,true);
				set(layer[controlBar_classicbtn_closefs].visible,false);
			);
		,
			controlBar_classicHideFullscreenButtons();
		);
	</action>
	<action name="controlBar_classicupdateFullscreenButtons">
		if (controlBar_classicIsOpened,
			controlBar_classicShowFullscreenButtons();
		,
			controlBar_classicHideFullscreenButtons();
		);
	</action>

	<events name="controlBar_classicAutorotationEvents"
		onstartautorotation="controlBar_classicupdateAutorotationButtons();"
		onresumeautorotation="controlBar_classicupdateAutorotationButtons();"
		onstopautorotation="controlBar_classicupdateAutorotationButtons();"
		onpauseautorotation="controlBar_classicupdateAutorotationButtons();"
		keep="true"/>
	<action name="controlBar_classicHideAutorotationButtons">
		set(layer[controlBar_classicbtn_autorotate_off].visible, false);
		set(layer[controlBar_classicbtn_autorotate_on].visible , false);
	</action>
	<action name="controlBar_classicShowAutorotationButtons">
		if(autorotate.enabled == false,
			set(layer[controlBar_classicbtn_autorotate_off].visible, false);
			set(layer[controlBar_classicbtn_autorotate_on].visible , true);
		,
			set(layer[controlBar_classicbtn_autorotate_off].visible, true);
			set(layer[controlBar_classicbtn_autorotate_on].visible , false);
		);
	</action>
	<action name="controlBar_classicupdateAutorotationButtons">
		if (controlBar_classicIsOpened,
			controlBar_classicShowAutorotationButtons();
		,
			controlBar_classicHideAutorotationButtons();
		);
	</action>




<layer name="controlBar_classicmenuTooltipStyle"
	keep="true"
	enabled="false"
	capture="false"
	type="text"
	align="center"
	bg="false"
	bgborder="0"
	txtshadow="1.0 1.0 4.0 0x000000 1"
	css="color:#e6e6e6;font-family:Helvetica;font-weight:bold;font-size:14px;text-align:left;"
	interactivecontent="false"
	zorder="0"
	visible="false"
	html=""
	padding="2"
	xoffset="0"
	yoffset="0"
	edge="bottom"
	/>



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

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

	<plugin name="ptpvrmode" devices="html5" keep="true"
		url="%FIRSTXML%/graphics/webvr.js"
		mobilevr_support="true"
		mobilevr_fake_support="true"
		vr_cursor=""
		vr_cursor_enabled="false"
		onavailable="delayedcall(1, checkVrAvailability(););"
		onunavailable="checkVrUnavailable();"
		/>
	<action name="checkVrAvailability">
		if(plugin[ptpvrmode],
			if (plugin[ptpvrmode].isavailable,
				set(tour_vrdevices, true);
				events.dispatch(onvravailable);
			,
				set(tour_vrdevices, false);
			);
		,
			checkVrUnavailable();
		);
	</action>
	<action name="checkVrUnavailable">
		set(tour_vrdevices, false);
		events.dispatch(onvrunavailable);
	</action>
  <!-- FLOORPLAN -->
  <action name="hideFloorplan">set(tour_displayfloorplan, false);events.dispatch(onhidetourfloorplan);</action>
  <action name="showFloorplan">set(tour_displayfloorplan, true); events.dispatch(onshowtourfloorplan);</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>

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


  <!-- Fullscreen Management -->
  <action name="exitFullScreen" 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>