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

    
  <!-- Spot Style - Display an image -->
  <style name="IconDisplayanimage"
         url="%FIRSTXML%/spots/nexusae0_unnamed-112_user_defaultpoint6.png"
         visible="false"
         zoom="true"
         
         alpha="0.8"
         onhover="onhoverIconDisplayanimage"
         onover="onoverIconDisplayanimage"
         onout="onoutIconDisplayanimage"
         height="36"
         width="50"
         />
  <action name="onhoverIconDisplayanimage">
    showtooltip('hotspot');
  </action>
  <action name="onoverIconDisplayanimage">
tween(scale, 1.2);
tween(alpha, 1);

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

  </action>



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


    
  <!-- Spot Style - PINK EYE -->
  <style name="IconPINKEYE"
         url="%FIRSTXML%/spots/_062687-glossy-silver-icon-people-things-eye4-sc48_user_defaultpoint0.png"
         visible="false"
         alpha="0.8"
         onhover="onhoverIconPINKEYE"
         onover="onoverIconPINKEYE"
         onout="onoutIconPINKEYE"
         height="200"
         width="200"
         />
  <action name="onhoverIconPINKEYE">
    showtooltip('hotspot');
  </action>
  <action name="onoverIconPINKEYE">
tween(scale, 1.2);
tween(alpha, 1);

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

  </action>



<!-- ************ -->
<!-- Double click -->
<!-- ************ -->
  <plugin name="doubleclick" url="%FIRSTXML%/graphics/doubleclick/fieldofview_dc.swf" alturl="%FIRSTXML%/graphics/doubleclick/fieldofview_dc.js" keep="true" ondblclick="ondoubleclick();"/>
  <action name="ondoubleclick">switchFullscreen();


  </action>

<!-- ************ -->
<!-- Context Menu -->
<!-- ************ -->
  <contextmenu fullscreen="false" versioninfo="false" touch="true">
    <item name="author" onclick="getmessage(urltoopen,project_author_url);openurl(get(urltoopen),_blank);" />
    <item name="website1"  />
    <item name="fullscreenentry" onclick="enterFullscreen();
" separator="true"/>
  </contextmenu>

  <events name="contextmenuevents" keep="true" onenterfullscreen="updateContextMenu" onexitfullscreen="updateContextMenu" onxmlcomplete="updateContextMenu"/>
  <action name="updateContextMenu">
    getmessage(contextmenu.item[author].caption, project_author_name);
    getmessage(contextmenu.item[website1].caption, contextmenuwebsiteurl1);
    if (device.fullscreensupport,
      if(tour_fullscreen,
        getmessage(contextmenu.item[fullscreenentry].caption, contextmenucloseFsLabel);
        set(contextmenu.item[fullscreenentry].onclick, exitFullscreen();
);
       ,
        getmessage(contextmenu.item[fullscreenentry].caption, contextmenuopenFsLabel);
        set(contextmenu.item[fullscreenentry].onclick, enterFullscreen();
);
      );
     ,
      set(contextmenu.item[fullscreenentry].visible, false);
    );
  </action>


<!-- ********* -->
<!-- Gyroscope -->
<!-- ********* -->
<plugin name="gyroscope"
        url="graphics/gyro.js"
        keep="true"
        devices="no-desktop.and.html5"

        velastic="0.1"


        camroll="false"

        friction="0.5"
        onavailable="delayedcall(1, checkGyroAvailability(););"
        enabled="false"
        activated="false"
        />

<events name="gyroscopeEvents" onnewpano="planarGyroscopeTest();" keep="true" />

<action name="planarGyroscopeTest">
  if(plugin[gyroscope],
    ifnot (plugin[gyroscope].available === undefined, 
      if (plugin[gyroscope].available,
        if(scene[get(xml.scene)].planar,
          if(plugin[gyroscope].enabled,
            switch(plugin[gyroscope].enabled);
            if (plugin[gyroscope].enabled, events.dispatch(ongyroscopeon);, events.dispatch(ongyroscopeoff););
          );
        ,
          if(plugin[gyroscope].activated,
            ifnot(plugin[gyroscope].enabled,
              switch(plugin[gyroscope].enabled);
              if (plugin[gyroscope].enabled, events.dispatch(ongyroscopeon);, events.dispatch(ongyroscopeoff););
            );
          );
        );
      );
    );
  );
</action>

<action name="changeGyroscopeState">
  if(plugin[gyroscope],
    ifnot (plugin[gyroscope].available === undefined,
      if (plugin[gyroscope].available,
        if(%1,
          set(plugin[gyroscope].activated,true);
        ,
          set(plugin[gyroscope].activated,false);
        );
        if (%1 !=  plugin[gyroscope].enabled,
          if(plugin[gyroscope].activated,
            switch(plugin[gyroscope].enabled);
          ,
            set(plugin[gyroscope].enabled, false);
          );
          if (plugin[gyroscope].enabled, events.dispatch(ongyroscopeon);, events.dispatch(ongyroscopeoff););
        );
      );
    );
  );
</action>

<action name="checkGyroAvailability">
  if(plugin[gyroscope],
    ifnot (plugin[gyroscope].available === undefined, 
      if (plugin[gyroscope].available,
        ifnot(scene[get(xml.scene)].planar,
          switch(plugin[gyroscope].enabled);
          set(plugin[gyroscope].activated,true);
        );
        set(tour_gyroscopedevices, true);
        events.dispatch(ongyroscopeavailable);
      ,
        set(tour_gyroscopedevices, false);
      );
    ,
      set(tour_gyroscopedevices, false);
    );
    if (plugin[gyroscope].enabled, events.dispatch(ongyroscopeon);, events.dispatch(ongyroscopeoff););
  );
</action>



	
	<!-- ********* -->
	<!-- FloorPlan -->
	<!-- ********* -->
	
	<ptplugin name="floorPlan" engine="KolorFloorPlan">
		<settings>
			<option name="background_color" value="ffffff" type="string" />
			<option name="background_lighter_color" value="ffffff" type="string" />
			<option name="background_darker_color" value="d5d5d5" type="string" />
			<option name="background_alpha" value="0.300007629510948" type="float" />
			<option name="text_color" value="000000" type="string" />
			<option name="resize" value="true" type="bool" />
			<option name="fp_selector" value="multiple" 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="Perpetua Titling MT" type="string" />
			<option name="title_size" value="10" type="int" />
			<option name="title_weight" value="bold" 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="20" type="int" />
			<option name="radar_line_width" value="3" type="int" />
			<option name="radar_line_color" value="000000" type="string" />
			<option name="radar_line_alpha" value="1" type="float" />
			<option name="radar_fill_color" value="ffffff" type="string" />
			<option name="radar_fill_alpha" value="0.700007629510948" type="float" />
			<option name="selected_effect" value="bounce" type="string" />
			<option name="close_on_click" value="false" type="bool" />
			<option name="zorder" value="3" type="int" />
		</settings>
		
		<floorplanItems selectedItem="fpitemmain" selectedSpot="" selectedSpotScene="" selectedSpotHeading="" selectedSpotFov="">
				
				<floorplanItem 
					name="fpitemmain" 
					width="1500" 
					height="1359" 
					groupName="" 
					url="floorplan/rdc-renoir.png" 
					title="project_floor_title"
					heading="89">
							<spot name="spotmap40" posX="0.786642" posY="0.591002" heading="107.6" desc="spotmap40_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano34" jsClick="spotmap40ActionSpotFloorPlan">
								<icon url="spots/pin_2d_hole_black_user_defaultmap111.png" iconWidth="9" iconHeight="15" iconAnchor="bottom" />
							</spot>
							<spot name="spotmap41" posX="0.7718" posY="0.179959" heading="-79" desc="spotmap41_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano32" jsClick="spotmap41ActionSpotFloorPlan">
								<icon url="spots/pin_2d_hole_black_user_defaultmap111.png" iconWidth="9" iconHeight="15" iconAnchor="bottom" />
							</spot>
				</floorplanItem>
			
			
		</floorplanItems>
	</ptplugin>
	
	<action name="kolorFloorplanJsReady-floorPlan">
		set(ptplugin[floorPlan].jsready, true);
		
		ifnot(ptplugin[floorPlan].floorplanItems[0].selectedSpot == "",
			set(ptplugin[floorPlan].floorplanItems[0].selectedSpotFov, get(view.hfov));
			js(invokePluginFunction(floorPlan, setKolorFloorPlanSelectedSpotOptions, get(xml.scene), get(view.hlookat), get(view.hfov)));
		);
	</action>
	
	
		<!-- floorplan main spots counter : 2 -->
			<action name="spotmap40ActionSpotFloorPlan">
          if (xml.scene != pano34,
            mainloadscene(pano34);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    

</action>
			<action name="spotmap41ActionSpotFloorPlan">
          if (xml.scene != pano32,
            mainloadscene(pano32);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    

</action>
	
	
	
	<events name="floorPlanEvents" 
	onxmlcomplete="ifnot(floorPlanFloorPlanLoaded,set(tour_displayfloorplan,false););floorPlanActivateDefaultSpot();" 
	onviewchanged="floorPlanOnViewChange();" 
	onhidetourfloorplan="delayedcall(0.3,floorPlanCloseTourFloorPlan(););" 
	onshowtourfloorplan="if(tour_displayfloorplan,floorPlanOpenTourFloorPlan(););" 
	onTourStart=""
	keep="true" />
	
	
	<krpano floorPlanFloorPlanLoaded="false" />
	
	<action name="floorPlanHideTourFloorPlan">
		hideKolorArea-floorPlanArea(true);
	</action>
	
	<action name="floorPlanCloseTourFloorPlan">
		if(ptplugin[floorPlanArea].isOpen,
			closeKolorArea-floorPlanArea();
		);
	</action>
	
	<action name="floorPlanShowTourFloorPlan">
		showKolorArea-floorPlanArea(true);
	</action>
	
	<action name="floorPlanOpenTourFloorPlan">
		ifnot(ptplugin[floorPlanArea].isOpen,
			openKolorArea-floorPlanArea();
		);
	</action>
	
	<action name="floorPlanOnViewChange">
		if (floorPlanFloorPlanLoaded == true,
			ifnot(ptplugin[floorPlan].floorplanItems[0].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[0].selectedSpot, %1);
		set(ptplugin[floorPlan].floorplanItems[0].selectedItem, %2);
		
		ifnot(%1 == "",
			set(ptplugin[floorPlan].floorplanItems[0].selectedSpotScene, get(xml.scene));
			set(ptplugin[floorPlan].floorplanItems[0].selectedSpotHeading, get(view.hlookat));
			set(ptplugin[floorPlan].floorplanItems[0].selectedSpotFov, get(view.hfov));
		);
		
		js(invokePluginFunction(floorPlan, selectSpot, %1, %2, %3));

		ifnot(%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[0].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);
		
		
		set(defaultfloorplaniteminc-wait,50);
		for(set(defaultfloorplaniteminc,0), defaultfloorplaniteminc LT ptplugin[floorPlan].floorplanItems[0].floorplanItem.count , inc(defaultfloorplaniteminc),
			if(defaultfloorplaniteminc-wait == defaultfloorplaniteminc,
				add(defaultfloorplaniteminc-wait,50);
				wait(0);
			);
			if(floorPlanSpotSearchActivated == true,
				
				if(ptplugin[floorPlan].floorplanItems[0].floorplanItem[get(defaultfloorplaniteminc)].groupName == scene[get(xml.scene)].group,
					set(floorPlanItemFound, get(ptplugin[floorPlan].floorplanItems[0].floorplanItem[get(defaultfloorplaniteminc)].name));
					set(ptplugin[floorPlan].floorplanItems[0].selectedItem, get(ptplugin[floorPlan].floorplanItems[0].floorplanItem[get(defaultfloorplaniteminc)].name));
					set(floorPlanItemSearch, false);
				,
					
					if(floorPlanItemFound == "",
						set(floorPlanItemFound, get(ptplugin[floorPlan].floorplanItems[0].floorplanItem[fpitemmain].name));
						set(ptplugin[floorPlan].floorplanItems[0].selectedItem, get(ptplugin[floorPlan].floorplanItems[0].floorplanItem[fpitemmain].name));
					);
				);
			);
			if(floorPlanSpotSearchActivated == true,
				set(defaultspotinc-wait,50);
				for(set(defaultspotinc,0), defaultspotinc LT ptplugin[floorPlan].floorplanItems[0].floorplanItem[get(defaultfloorplaniteminc)].spot.count , inc(defaultspotinc),
					if(defaultspotinc-wait == defaultspotinc,
						add(defaultspotinc-wait,50);
						wait(0);
					);
					if(ptplugin[floorPlan].floorplanItems[0].floorplanItem[get(defaultfloorplaniteminc)].spot[get(defaultspotinc)].isScene == true,
					
						if(floorPlanSpotSearchContinue == true,
							if(ptplugin[floorPlan].floorplanItems[0].floorplanItem[get(defaultfloorplaniteminc)].spot[get(defaultspotinc)].scene == xml.scene,
								set(floorPlanSpotFound, get(ptplugin[floorPlan].floorplanItems[0].floorplanItem[get(defaultfloorplaniteminc)].spot[get(defaultspotinc)].name));
								set(floorPlanSpotScene, get(ptplugin[floorPlan].floorplanItems[0].floorplanItem[get(defaultfloorplaniteminc)].spot[get(defaultspotinc)].scene));
								set(ptplugin[floorPlan].floorplanItems[0].selectedItem, get(ptplugin[floorPlan].floorplanItems[0].floorplanItem[get(defaultfloorplaniteminc)].name));
								if(floorPlanItemSearch == false,
									set(floorPlanSpotSearchContinue, false);
									set(floorPlanSpotSearchActivated, false);
								);
							);
						);
					);
					
				);
			);
		);
		
		if(floorPlanSpotFound == "",
			
			
			floorPlanDeactivateSpot();
			
			
			set(ptplugin[floorPlan].floorplanItems[0].selectedItem, get(floorPlanItemFound));
			
			
			ifnot(ptplugin[floorPlan].floorplanItems[0].selectedItem == "",
				floorPlanActivateSpot("", get(ptplugin[floorPlan].floorplanItems[0].selectedItem), "");
			);
		,
			
			floorPlanActivateSpot(get(floorPlanSpotFound), get(ptplugin[floorPlan].floorplanItems[0].selectedItem), get(floorPlanSpotScene));
		);
	</action>
	
	<action name="floorPlanChangeTitle">
		js(invokePluginFunction(floorPlan, changeTitle, %1));
	</action>
	
	<ptplugin name="floorPlanArea" engine="kolorArea">
	<settings>
		<option name="position" value="topleft" type="string" />
		<option name="start_position" value="top" type="string" />
		<option name="margin_x" value="5" type="int" />
		<option name="margin_y" value="100" type="int" />
		<option name="display_title" value="true" type="bool" />
		<option name="title_font" value="Perpetua Titling MT" type="string" />
		<option name="title_size" value="10" type="int" />
		<option name="title_weight" value="bold" type="string" />
		<option name="title_decoration" value="normal" type="string" />
		<option name="title_color" value="000000" type="string" />
		<option name="close_displayed" value="false" type="bool" />
		<option name="background_color" value="ffffff" type="string" />
		<option name="background_alpha" value="0.300007629510948" type="float" />
		<option name="overlay_displayed" value="false" type="bool" />
		<option name="overlay_color" value="000000" type="string" />
		<option name="overlay_alpha" value="1" type="float" />
		<option name="padding" value="1" type="int" />
		<option name="topleft_radius" value="1" type="int" />
		<option name="topright_radius" value="1" type="int" />
		<option name="bottomleft_radius" value="1" type="int" />
		<option name="bottomright_radius" value="1" type="int" />
		<option name="area_border_width" value="3" type="int" />
		<option name="area_border_color" value="ffffff" type="string" />
		<option name="area_width" value="451" type="int" />
		<option name="area_height" value="300" type="int" />
		<option name="area_width_unit" value="pixel" type="string" />
		<option name="area_height_unit" value="pixel" type="string" />
		<option name="animation" value="true" type="bool" />
		<option name="animation_duration" value="550" 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="3" type="int" />
	</settings>
	</ptplugin>
	
	<action name="kolorAreaJsReady-floorPlanArea">
		set(ptplugin[floorPlanArea].jsready, true);

	</action>
	
	<action name="openKolorArea-floorPlanArea">
		ifnot(ptplugin[floorPlanArea].isOpen,
			if(ptplugin[floorPlanArea].doNotDeleteMe,
				set(ptplugin[floorPlanArea].currentCall, false);
			set(ptplugin[floorPlanArea].isOpen, true);
			set(ptplugin[floorPlanArea].visible, true);
			set(ptplugin[floorPlanArea].doNotDeleteMe, false);
			
			js(showKolorArea(floorPlanArea, &lt;div id="floorPlanArea-floorplanDIV"&gt;&lt;/div&gt;));
			,
				set(ptplugin[floorPlanArea].currentCall, true);
				set(ptplugin[floorPlanArea].doNotDeleteMe, true);
				events.dispatch(onremovedisplayedobject);
				delayedcall(0.3,openKolorArea-floorPlanArea(););
			);
		);
	</action>
	
	<action name="closeKolorArea-floorPlanArea">
		if(ptplugin[floorPlanArea].isOpen,
			if(ptplugin[floorPlanArea].doNotDeleteMe,
				set(ptplugin[floorPlanArea].doNotDeleteMe, false);
			,
			js(invokePluginFunction(floorPlanArea, closeKolorArea));
			);
		);
	</action>
	
	<action name="toggleKolorArea-floorPlanArea">
		if(ptplugin[floorPlanArea].isOpen,
			closeKolorArea-floorPlanArea();
		,
			openKolorArea-floorPlanArea();
		);
	</action>
	
	<action name="closeKolorAreaCallback-floorPlanArea">
		set(ptplugin[floorPlanArea].doNotDeleteMe, false);
		set(ptplugin[floorPlanArea].isOpen, false);hideFloorplan();

	</action>
	
	<action name="changeTitleKolorArea-floorPlanArea">
		js(invokePluginFunction(floorPlanArea, changeTitle, %1));
	</action>
	
	<action name="showKolorArea-floorPlanArea">
		if(ptplugin[floorPlanArea].doNotDeleteMe,
			set(ptplugin[floorPlanArea].currentCall, false);
		set(ptplugin[floorPlanArea].visible, true);
		set(ptplugin[floorPlanArea].doNotDeleteMe, false);
		
		js(invokePluginFunction(floorPlanArea, showKolorArea, %1));
		,
			set(ptplugin[floorPlanArea].currentCall, true);
			set(ptplugin[floorPlanArea].doNotDeleteMe, true);
			events.dispatch(onremovedisplayedobject);
			delayedcall(0.3,showKolorArea-floorPlanArea(););
		);
	</action>
		
	<action name="hideKolorArea-floorPlanArea">
		if(ptplugin[floorPlanArea].doNotDeleteMe,
			set(ptplugin[floorPlanArea].doNotDeleteMe, false);
		,
		
		set(ptplugin[floorPlanArea].visible, false);
		js(invokePluginFunction(floorPlanArea, hideKolorArea, %1));
		);
	</action>
	
	<events name="kolorAreaEvents-floorPlanArea" 
		keep="true"
		onremovedisplayedobject="ifnot(ptplugin[floorPlanArea].currentCall,if(ptplugin[floorPlanArea].visible,hideFloorplan();
););"
	/>
	
	

  <!-- ************ -->
  <!-- Loading Text -->
  <!-- ************ -->

  <layer name="loadingtext"
         keep="true"
         zorder="4"
         url="%FIRSTXML%/graphics/textfield.swf"
         align="center"
         x="0" y="0"
         html="Chargement en cours ..."
         background="false"
         borderwidth="1"
         border="false"
         autoheight="true"
         autowidth="auto"
         handcursor="false"
         visible="false"
         enabled="false"
         textshadow="2"
         alpha="0.6"
         css="
              text-align:center;
              color:#ffffff;
              font-family:Helvetica;
              font-size:18px;
             "
  />

  <action name="displayloadingtext">
    set(layer[loadingtext].visible, %1);
  </action>

  <events name="displayloadingtextWhenLoading" keep="true"
          onxmlcomplete="displayloadingtext(true);"
          onnewpano="displayloadingtext(true);"
          onremovepano="displayloadingtext(true);"
          onloadcomplete="displayloadingtext(false);"
          />

  <!-- ****** -->
  <!-- Header -->
  <!-- ****** -->
  <layer name="header"
         keep="true"
         url="%FIRSTXML%/graphics/header/visit-inside-fond-blanc-small.png" 
         align="top"
         x="0"
         y="0"
         zorder="5"
         enabled="false"
         capture="true"
         visible="false"
         height="75"
         width="320"
         
         />

  <events name="headerevents"
    onTourStart="showheader();"
    keep="true" />

  <action name="showheader">
    set(layer[header].visible, true);
  </action>




  <!-- ******************************************* -->
  <!-- Button : topleft -->
  <!-- ******************************************* -->

  <layer name="button"
         keep="true"
         url="%FIRSTXML%/graphics/button/plan4.png" 
         align="topleft"
         x="5"
         y="15"
         zorder="6"
         visible="false"
         onclick="buttonOnClick"
         height="40"
         width="190"
         />
  <action name="buttonOnClick">
if(tour_displayfloorplan,hideFloorplan();
,showFloorplan();
);


  </action>

  <events name="buttonevents" 
    onTourStart="showbutton();"
    keep="true" />
  <action name="hidebutton">set(layer[button].visible, false);</action>
  <action name="showbutton">set(layer[button].visible, true);</action>



  <!-- ******* -->
  <!-- Compass -->
  <!-- ******* -->


  <layer name="compassbackground"
         type="container"
         keep="true"
         handcursor="false"
         capture="false"
         align="bottom"
         x="3"
         y="0"
         zorder="7"
         visible="false"

         height="100"
         width="100"

         >

    <layer name="compassrotatebackground"
           url="%FIRSTXML%/graphics/compass/compassbg030202.png"
           keep="true"
           handcursor="false"
           capture="false"
           align="center"
           zorder="0"
           height="100%"
           width="100%"
           />

    <layer name="compasspointer"
           url="%FIRSTXML%/graphics/compass/compasspointerffffff.png"
           keep="true"
           align="center"
           handcursor="false"
           capture="false"
           zorder="1"
           height="100%"
           width="100%"

          />
  </layer>

  <events name="compassevts"
          keep="true"
          onnewpano="compassUpdateOrientation();"
          onviewchanged="compassUpdateOrientation();"
    onTourStart="showcompass();"
          hidetourcontrols="hidecompass();"
          showtourcontrols="showcompass();"
         />

  <action name="compassUpdateOrientation">
	mod(compasshlookat, view.hlookat, 360);
    mul(compassheading, -1, get(scene[get(xml.scene)].heading));
    if (compassheading == null, set(compassheading, 0));
	sub(layer[compassrotatebackground].rotate, compassheading, compasshlookat);
  </action>

 
  <action name="hidecompass">
    set(layer[compassbackground].visible, false);
  </action>
  <action name="showcompass">
    set(layer[compassbackground].visible, true);
  </action>


  <!-- ******************** -->
  <!-- Previous / Next Tabs -->
  <!-- ******************** -->

  <layer name="prevnexttheme1btn_prev_pano"
         keep="true"
         align="left"
         url="%FIRSTXML%/graphics/prevnexttabs/thumb_left.png"
         zorder="8"
         alpha="0.5"
         onclick="loadPreviousScene();
"
         onover="set(alpha, 1);"
         onout="set(alpha, 0.5);"
         visible="false">
	<layer name="prevnexttheme1prevPanoramaArrowBg" keep="true"
		url="%FIRSTXML%/graphics/prevnexttabs/btn_scroll_left_bg.png"
		crop="0|0|48|48"
		onovercrop="0|48|48|48"
		ondowncrop="0|96|48|48"
		align="left"
		x="0"
		zorder="0"
		height="36"
		width="36"
		onclick="loadPreviousScene();
"/>
  <layer name="prevnexttheme1prevPanoramaArrow" keep="true"
         url="%FIRSTXML%/graphics/prevnexttabs/btn_scroll_left.png"
               crop="0|0|48|48"
         onovercrop="0|48|48|48"
         ondowncrop="0|96|48|48"
         align="left"
         x="0"
         zorder="1"
         height="36"
         width="36"
         onclick="loadPreviousScene();
"/>
  </layer>
  <layer name="prevnexttheme1btn_next_pano"
         keep="true"
         align="right"
         url="%FIRSTXML%/graphics/prevnexttabs/thumb_right.png"
         zorder="8"
         alpha="0.5"
         onclick="loadNextScene();
"
         onover="set(alpha, 1);"
         onout="set(alpha, 0.5);"
         visible="false">
	<layer name="prevnexttheme1nextPanoramaArrowBg" keep="true"
		url="%FIRSTXML%/graphics/prevnexttabs/btn_scroll_right_bg.png"
		crop="0|0|48|48"
		onovercrop="0|48|48|48"
		ondowncrop="0|96|48|48"
		align="right"
		x="0"
		zorder="0"
		height="36"
		width="36"
		onclick="loadNextScene();
"/>
  <layer name="prevnexttheme1nextPanoramaArrow"
         keep="true"
         url="%FIRSTXML%/graphics/prevnexttabs/btn_scroll_right.png"
               crop="0|0|48|48"
         onovercrop="0|48|48|48"
         ondowncrop="0|96|48|48"
         align="right"
         zorder="1"
         height="36"
         width="36"
         onclick="loadNextScene();
"/>
  </layer>

  <events name="prevnexttheme1hideshowcontrolsevent" 
    onTourStart="prevnexttheme1showPrevNextControls();"
    keep="true"/>
  <action name="prevnexttheme1hidePrevNextControls">
    set(layer[prevnexttheme1btn_prev_pano].visible, false);
    set(layer[prevnexttheme1btn_next_pano].visible, false);
  </action>
  <action name="prevnexttheme1showPrevNextControls">
    set(layer[prevnexttheme1btn_prev_pano].visible, true);
    set(layer[prevnexttheme1btn_next_pano].visible, true);
  </action>



  <!-- ****** -->
  <!-- Header -->
  <!-- ****** -->
  <layer name="header2"
         keep="true"
         type="container"
         bgcolor="0xaa7676"
         bgalpha="0.900007629510948"
         align="top"
         x="0"
         y="70"
         zorder="9"
         enabled="false"
         capture="true"
         visible="false"
         height="2"
         width="100%"
         accuracy="1"
         />

  <events name="header2events"
    onTourStart="showheader2();"
    keep="true" />

  <action name="showheader2">
    set(layer[header2].visible, true);
  </action>




  <!-- ************************************************** -->
  <!-- Toggle Button : topright -->
  <!-- ************************************************** -->



  <layer name="togglebutton"
         keep="true"
         url="%FIRSTXML%/graphics/togglebutton/fullscreen1.png" 
         align="topright"
         x="5"
         y="15"
         zorder="10"
         state="true"
         onclick="togglebuttonOnClick"
         onout=""
         height="40"
         width="190"
         visible="false"
         />

  <action name="togglebuttonOnClick">
    if (state,
      set(state, false);enterFullscreen();


      set(url,%FIRSTXML%/graphics/togglebutton/quit.png);
     ,
      set(state, true);exitFullscreen();


      set(url,%FIRSTXML%/graphics/togglebutton/fullscreen1.png);
    );
  </action>

  <events name="togglebuttonevents" 
    onTourStart="showtogglebutton();"
    hidetourcontrols="hidetogglebutton();" 
    showtourcontrols="showtogglebutton();" 
    keep="true" />
  <action name="hidetogglebutton">set(layer[togglebutton].visible, false);</action>
  <action name="showtogglebutton">set(layer[togglebutton].visible, true);</action>



  <!-- ******************************************* -->
  <!-- Button : bottomright -->
  <!-- ******************************************* -->

  <layer name="button3"
         keep="true"
         url="%FIRSTXML%/graphics/button3/_099412-glossy-silver-icon-social-media-logos-facebook-logo-square-1-1.png" 
         align="bottomright"
         x="10"
         y="10"
         zorder="11"
         visible="false"
         onclick="button3OnClick"
         height="70"
         width="70"
         />
  <action name="button3OnClick">shareTour();


  </action>

  <events name="button3events" 
    onTourStart="showbutton3();"
    hidetourcontrols="hidebutton3();" 
    showtourcontrols="showbutton3();" 
    keep="true" />
  <action name="hidebutton3">set(layer[button3].visible, false);</action>
  <action name="showbutton3">set(layer[button3].visible, true);</action>



  <!-- ************ -->
  <!-- Social Share -->
  <!-- ************ -->




<ptplugin name="socialShare2" engine="kolorBox">
	<settings>
		<option name="position" value="bottomright" type="string" />
		<option name="margin_x" value="2" type="int" />
		<option name="margin_y" value="5" type="int" />
		<option name="animate" value="false" type="bool" />
		<option name="draggable_box" value="false" type="bool" />
		<option name="container_auto_size" value="true" type="bool" />
		<option name="container_color" value="ffffff" type="string" />
		<option name="container_alpha" value="0" type="float" />
		<option name="container_topleft_border_radius" value="0" type="int" />
		<option name="container_topright_border_radius" value="0" type="int" />
		<option name="container_bottomleft_border_radius" value="0" type="int" />
		<option name="container_bottomright_border_radius" value="0" type="int" />
		<option name="container_border_width" value="0" type="int" />
		<option name="container_border_color" value="ffffff" type="string" />
		<option name="overlay_displayed" value="false" type="bool" />
		<option name="overlay_color" value="000000" type="string" />
		<option name="overlay_alpha" value="0.500007629510948" type="float" />
		<option name="social_btn" value="facebook" type="string" />
		<option name="social_orientation" value="horizontal" type="string" />
		<option name="social_btn_size" value="50" type="int" />
		<option name="inner_margin" value="1" type="int" />
		
		
		<option name="title_displayed" value="false" type="bool" />
		<option name="caption_displayed" value="false" type="bool" />
		<option name="close_displayed" value="false" type="bool" />
		<option name="close_position" value="topright" type="string" />
		<option name="close_callback" value="invokeKrFunction('closeKolorBoxCallback-socialShare2')" type="string" />
		<option name="zorder" value="12" type="int" />
	</settings>
	<internaldata>
		
	</internaldata>
</ptplugin>

<action name="kolorBoxJsReady-socialShare2">
	set(ptplugin[socialShare2].jsready, true);

</action>



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

			js(invokePluginFunction(socialShare2, loadSingleArrayItem, social));
		events.dispatch(onremovedisplayedobject);
	);
</action>

<action name="toggleSocialShare-socialShare2">
	js(invokePluginFunction(socialShare2, toggleKolorBox, %1));
</action>


<action name="closeKolorBox-socialShare2">
	js(invokePluginFunction(socialShare2, closeKolorBox));
</action>

<action name="closeKolorBoxCallback-socialShare2">
	resumeautorotation(forceplugin);

	
	set(ptplugin[socialShare2].isOpen, false);
</action>

<events name="kolorBoxEvents-socialShare2" 
	keep="true"
	onsharetour="showSocialShare-socialShare2();" 
	
	
/>

  <!-- 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="setViewArchitectural">
	stopSetViewTweens();
	setViewArchitecturalComplete();
</action>

<action name="setViewArchitecturalComplete">
	tween(view.fovmax, get(panoview.fovmax), distance(179, 1.00), easeoutquad);
	tween(view.architectural, 1.0, distance(1.0, 0.45), easeoutquad, 
		tween(view.pannini, 0.0, distance(1.0, 0.45));
		tween(view.fisheye, 0.0, distance(1.0, 0.45), easeoutquad, 
			set(view.fisheyefovlink, 0.5);
			set(view.stereographic,false);
			tween(view.vlookat, get(panoview.v), 1.25);
			if(panoview.fov LE view.fov, tween(view.fov, get(panoview.fov), distance(50, 0.45)); );
		);
	);
</action>

<action name="setViewLittlePlanet">
	set(sceneisfull360, false);
	if(scene[get(xml.scene)].full360,
		sub(viewhfov, view.hlookatmax, view.hlookatmin);
		if (viewhfov == 360,
			sub(viewvfov, view.vlookatmax, view.vlookatmin);
			if (viewvfov == 180,
				set(sceneisfull360, true);
			);
		);
	);
	if (sceneisfull360 AND (device.webgl OR device.flash),
		stopSetViewTweens();
		setViewLittlePlanetComplete();
	);
</action>

<action name="setViewLittlePlanetComplete">
	tween(view.architectural, 0.0, 0.25, easeoutquad, 
		tween(view.vlookat, 90, distance(179, 1.50), easeoutquad);
		set(backtonormalfirst,false);
		if(view.pannini GE 1.0, set(backtonormalfirst,true) );
		if(view.stereographic == false, set(backtonormalfirst,true) );
		if(backtonormalfirst, hideTooltip();tween(view.fisheye, 0.0 ,distance(1.0, 0.25), easeoutquad, WAIT); );
		tween(view.pannini, 0.0, distance(1.0, 0.75));
		if(panoview.fovmax LE 150, set(view.fovmax, 150); , set(view.fovmax, get(panoview.fovmax)); );
		set(view.stereographic, true);
		set(view.fisheyefovlink, 1.5);
		tween(view.fisheye, 1.0, distance(1.0, 0.75), easeoutquad);
		tween(view.fov, 150, distance(179, 0.75), easeoutquad);
	);
</action>

  <action name="displayImage">
    if (%1 == null,
      showlog();trace("Display Image : function called without any image. Verify its parameters in Panotour.");
    ,
    if (layer[displayedStandardImage],
      if(layer[displayedStandardImage].doNotDeleteMe,
        set(layer[displayedStandardImage].currentCall, false);
        set(layer[displayedStandardImage].visible, true);
        set(layer[displayedStandardImage].doNotDeleteMe, false);
        
        if (%1 == layer[displayedStandardImage].url,resumeautorotation(forcehotspot);

          applyDisplayedImageObjectAnimation(%8);
        ,
          setDisplayedImageObjectParameters(%1, %2, %3, %4, %5, %6, %8);
        );
      ,
        set(layer[displayedStandardImage].currentCall, true);
        set(layer[displayedStandardImage].doNotDeleteMe, true);
        events.dispatch(onremovedisplayedobject);
        delayedcall(0.2,displayImage(%1, %2, %3, %4, %5, %6, %7, %8););
      );
    ,
      addlayer(displayedStandardImage);
      set(layer[displayedStandardImage].keep, false);
      set(layer[displayedStandardImage].onclick, resumeautorotation(forcehotspot);
applyDisplayedImageObjectAnimation(%8););
      set(layer[displayedStandardImage].zorder , 99);
      
      set(layer[displayedStandardImage].currentCall, true);
      set(layer[displayedStandardImage].doNotDeleteMe, true);
      events.dispatch(onremovedisplayedobject);
      delayedcall(0.2,displayImage(%1, %2, %3, %4, %5, %6, %7, %8););
      if (%7,pauseautorotation(forcehotspot);
);
      set(layer[displayedStandardImage].visible, false);
    );
    );
  </action>
  <action name="applyDisplayedImageObjectAnimation">
    if (%1,
      tween(layer[displayedStandardImage].width, 1, 1, easeOutQuad, removelayer(displayedStandardImage););
      tween(layer[displayedStandardImage].height, 1, 1, easeOutQuad);
    ,
      removelayer(displayedStandardImage);
    );
  </action>
  <action name="setDisplayedImageObjectParameters">
    set(layer[displayedStandardImage].url    , %1);
    set(layer[displayedStandardImage].align  , %2);
    set(layer[displayedStandardImage].x      , %3);
    set(layer[displayedStandardImage].y      , %4);
    if(%7,
      set(layer[displayedStandardImage].onloaded, checkDisplayedImageObjectSize(%5,%6));
    ,
      set(layer[displayedStandardImage].width , %5);
      set(layer[displayedStandardImage].height, %6);
    );
  </action>
  <action name="checkDisplayedImageObjectSize">
    set(layer[displayedStandardImage].fullwidth, get(layer[displayedStandardImage].width));
    set(layer[displayedStandardImage].fullheight, get(layer[displayedStandardImage].height));
    set(layer[displayedStandardImage].width , 1);
    set(layer[displayedStandardImage].height, 1);
    if(%1 != "" and %2 != "",

      if(%1 == "prop",
        set(tempDisplayedImageObjectHeight, %2);
        indexoftxt(tempDisplayedImageObjectHeightPercent, get(tempDisplayedImageObjectHeight), "%");

        if(tempDisplayedImageObjectHeightPercent GT 0,
          txtreplace(tempDisplayedImageObjectHeight, '%', '');
          mul(tempDisplayedImageObjectHeight, get(stageheight));
          div(tempDisplayedImageObjectHeight, 100);
          Math.round(tempDisplayedImageObjectHeight);
        );
        mul(flyingImgWidth,get(layer[displayedStandardImage].fullwidth),get(tempDisplayedImageObjectHeight));
        div(flyingImgWidth,get(layer[displayedStandardImage].fullheight));
        Math.round(flyingImgWidth);
        tween(layer[displayedStandardImage].width , get(flyingImgWidth), 1, easeOutQuad);
        tween(layer[displayedStandardImage].height, get(tempDisplayedImageObjectHeight), 1, easeOutQuad);
      ,

        if(%2 == "prop",
          set(tempDisplayedImageObjectWidth, %1);
          indexoftxt(tempDisplayedImageObjectWidthPercent, get(tempDisplayedImageObjectWidth), "%");

          if(tempDisplayedImageObjectWidthPercent GT 0,
            txtreplace(tempDisplayedImageObjectWidth, '%', '');
            mul(tempDisplayedImageObjectWidth, get(stagewidth));
            div(tempDisplayedImageObjectWidth, 100);
            Math.round(tempDisplayedImageObjectWidth);
          );
          mul(flyingImgHeight,get(layer[displayedStandardImage].fullheight),get(tempDisplayedImageObjectWidth));
          div(flyingImgHeight,get(layer[displayedStandardImage].fullwidth));
          Math.round(flyingImgHeight);
          tween(layer[displayedStandardImage].width , get(tempDisplayedImageObjectWidth), 1, easeOutQuad);
          tween(layer[displayedStandardImage].height , get(flyingImgHeight), 1, easeOutQuad);
        ,

          set(tempDisplayedImageObjectWidth, %1);
          set(tempDisplayedImageObjectHeight, %2);
          indexoftxt(tempDisplayedImageObjectWidthPercent, get(tempDisplayedImageObjectWidth), "%");
          indexoftxt(tempDisplayedImageObjectHeightPercent, get(tempDisplayedImageObjectHeight), "%");

          if(tempDisplayedImageObjectWidthPercent GT 0,
            txtreplace(tempDisplayedImageObjectWidth, '%', '');
            mul(tempDisplayedImageObjectWidth, get(stagewidth));
            div(tempDisplayedImageObjectWidth, 100);
            Math.round(tempDisplayedImageObjectWidth);
          );
          if(tempDisplayedImageObjectHeightPercent GT 0,
            txtreplace(tempDisplayedImageObjectHeight, '%', '');
            mul(tempDisplayedImageObjectHeight, get(stageheight));
            div(tempDisplayedImageObjectHeight, 100);
            Math.round(tempDisplayedImageObjectHeight);
          );
          tween(layer[displayedStandardImage].width , get(tempDisplayedImageObjectWidth), 1, easeOutQuad);
          tween(layer[displayedStandardImage].height, get(tempDisplayedImageObjectHeight), 1, easeOutQuad);
        );
      );
    ,
      tween(layer[displayedStandardImage].width , get(layer[displayedStandardImage].fullwidth), 1, easeOutQuad);
      tween(layer[displayedStandardImage].height, get(layer[displayedStandardImage].fullheight), 1, easeOutQuad);
    );
  </action>
  <events name="displayedImageObjectEvents" keep="true" onremovedisplayedobject="displayedImageObjectOnRemoveDisplayedObject"/>
  <action name="displayedImageObjectOnRemoveDisplayedObject">
    ifnot(layer[displayedStandardImage].currentCall,if(layer[displayedStandardImage].visible,resumeautorotation(forcehotspot);

      removelayer(displayedStandardImage);
    ););
  </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>

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

</krpano>