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

    
  <!-- Spot Style - Load panorama -->
  <style name="IconLoadpanorama"
         url="%FIRSTXML%/spots/hotspot_neutral_sequence_user_defaultpoint5.png"
         visible="false"

         frame="0"
         lastframe="15"
         framewidth="60"
         frameheight="60"
         stopspotsequence="false"
         onloaded="setdefaultanimatedspotframe();startspotanimation(0.1);"

         onhover="onhoverIconLoadpanorama"
         onout="onoutIconLoadpanorama"
         />
  <action name="onhoverIconLoadpanorama">
    showtooltip(hotspot);
  </action>
  <action name="onoutIconLoadpanorama">
    hideTooltip();



  </action>

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

<!-- ************ -->
<!-- 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">
    <item name="normal"        onclick="setViewNormal();" separator="true"/>
    <item name="architectural" onclick="setViewArchitectural();"/>
    <item name="littleplanet"  onclick="setViewLittlePlanet();"/>
    <item name="fullscreenentry" onclick="enterFullscreen();" separator="true"/>
  </contextmenu>

  <events name="contextmenuevents" keep="true" onenterfullscreen="updateContextMenu" onexitfullscreen="updateContextMenu" onxmlcomplete="updateContextMenu"/>
  <action name="updateContextMenu">
    if (scene[get(xml.scene)].planar,
      set(contextmenu.item[normal].visible, false);
      set(contextmenu.item[architectural].visible, false);
      set(contextmenu.item[littleplanet].visible, false);
     ,
    set(contextmenu.item[normal].visible, true);
    getmessage(contextmenu.item[normal].caption, contextmenunormallabel);
    set(contextmenu.item[architectural].visible, true);
    getmessage(contextmenu.item[architectural].caption, contextmenuarchitecturallabel);
    set(contextmenu.item[littleplanet].visible, true);
    getmessage(contextmenu.item[littleplanet].caption, contextmenulittleplanetlabel);
    );
    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(););
    );
  </action>
<!-- ********* -->
<!-- Gyroscope -->
<!-- ********* -->
<plugin name="gyroscope"
        url="graphics/gyro.js"
        keep="true"
        devices="tablet|mobile"
        onavailable="delayedcall(1, checkGyroAvailability(););"
        enabled="true"
        />

<action name="changeGyroscopeState">
  ifnot (plugin[gyroscope].available === undefined,
    if (plugin[gyroscope].available,
      switch(plugin[gyroscope].enabled);
      if (plugin[gyroscope].enabled, events.dispatch(ongyroscopeon);, events.dispatch(ongyroscopeoff););
    );
  );
</action>

<action name="checkGyroAvailability">
	ifnot (plugin[gyroscope].available === undefined, 
		if (plugin[gyroscope].available,
			set(tour_gyroscopedevices, true);
			events.dispatch(ongyroscopeavailable);
			if (plugin[gyroscope].enabled, events.dispatch(ongyroscopeon);, events.dispatch(ongyroscopeoff););
		,
			set(tour_gyroscopedevices, false);
			set(plugin[gyroscope].enabled, false);
		);
	,
		set(tour_gyroscopedevices, false);
		set(plugin[gyroscope].enabled, false);
	);
</action>
  <!-- ************ -->
  <!-- Logo : sphere / bottomright -->
  <!-- ************ -->


  <hotspot ath="0" atv="90"
         zorder="0"
         zoom="true"
         name="logo"
         keep="true"
         visible="false"
         capture="false"
		
			tooltip="logotooltipText"
			onhover="showTooltip(hotspot);"
			onout="hideTooltip();"
         url="%FIRSTXML%/graphics/logo/logo.png" 
         handcursor="false"


         />

  <events name="logoevents" 
    onTourStart="showlogo();"
    keep="true" />

  <action name="hidelogo">
    set(hotspot[logo].visible, false);
  </action>
  <action name="showlogo">
      set(hotspot[logo].visible, true);
  </action>


    <events name="logorotationevents" onviewchanged="updatelogorotation" keep="true"/>
    <action name="updatelogorotation">
        mul(hotspot[logo].rotate, -1, get(view.hlookat));
    </action>

  <events name="logoshowevents" onremovepano="hidelogo" onPanoStart="showlogo" keep="true"/>




	
	<!-- ********* -->
	<!-- 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" 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="3eb715" type="string" />
			<option name="radar_line_alpha" value="0.900007629510948" type="float" />
			<option name="radar_fill_color" value="ffffff" type="string" />
			<option name="radar_fill_alpha" value="0.300007629510948" type="float" />
			<option name="close_on_click" value="true" type="bool" />
			<option name="zorder" value="4" type="int" />
		</settings>
		
		<floorplanItems selectedItem="fpitemmain" selectedSpot="" selectedSpotScene="" selectedSpotHeading="" selectedSpotFov="">
				
				<floorplanItem 
					name="fpitemmain" 
					width="3125" 
					height="1042" 
					groupName="" 
					url="floorplan/map5-za_virtual_tour-01.png" 
					title="project_floor_title"
					heading="164">
							<spot name="spotmap47" posX="0.409449" posY="0.778495" heading="-158.8" desc="spotmap47_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano434" jsClick="spotmap47ActionSpotFloorPlan">
								<icon url="spots/pin_curved_2d_shadowed_user_defaultmap1.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap49" posX="0.035791" posY="0.524731" heading="0" desc="spotmap49_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano26" jsClick="spotmap49ActionSpotFloorPlan">
								<icon url="spots/pin_curved_2d_shadowed_user_defaultmap1.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap50" posX="0.728704" posY="0.901075" heading="124.2" desc="spotmap50_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano30" jsClick="spotmap50ActionSpotFloorPlan">
								<icon url="spots/pin_curved_2d_shadowed_user_defaultmap1.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap51" posX="0.648213" posY="0.934037" heading="175.2" desc="spotmap51_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano28" jsClick="spotmap51ActionSpotFloorPlan">
								<icon url="spots/pin_curved_2d_shadowed_user_defaultmap1.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap53" posX="0.100931" posY="0.825806" heading="73.5999999999998" desc="spotmap53_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano51" jsClick="spotmap53ActionSpotFloorPlan">
								<icon url="spots/pin_curved_2d_shadowed_user_defaultmap1.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap63" posX="0.313529" posY="0.892473" heading="-138.8" desc="spotmap63_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano57" jsClick="spotmap63ActionSpotFloorPlan">
								<icon url="spots/pin_curved_2d_shadowed_user_defaultmap1.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap93" posX="0.311382" posY="0.43871" heading="76.9999999999997" desc="spotmap93_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano82" jsClick="spotmap93ActionSpotFloorPlan">
								<icon url="spots/pin_curved_2d_shadowed_user_defaultmap1.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap98" posX="0.728368" posY="0.727103" heading="58.1999999999998" desc="spotmap98_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano96" jsClick="spotmap98ActionSpotFloorPlan">
								<icon url="spots/pin_curved_2d_shadowed_user_defaultmap1.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap99" posX="0.659892" posY="0.555662" heading="-56.1999999999998" desc="spotmap99_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano94" jsClick="spotmap99ActionSpotFloorPlan">
								<icon url="spots/pin_curved_2d_shadowed_user_defaultmap1.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap128" posX="0.584109" posY="0.673118" heading="-150.800000000001" desc="spotmap128_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano126" jsClick="spotmap128ActionSpotFloorPlan">
								<icon url="spots/pin_curved_2d_shadowed_user_defaultmap1.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap200" posX="0.452698" posY="0.591563" heading="-160.2" desc="spotmap200_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano198" jsClick="spotmap200ActionSpotFloorPlan">
								<icon url="spots/pin_curved_2d_shadowed_user_defaultmap1.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap203" posX="0.365397" posY="0.455417" heading="-154.8" desc="spotmap203_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano201" jsClick="spotmap203ActionSpotFloorPlan">
								<icon url="spots/pin_curved_2d_shadowed_user_defaultmap1.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap209" posX="0.377143" posY="0.249281" heading="3.99999999999972" desc="spotmap209_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano205" jsClick="spotmap209ActionSpotFloorPlan">
								<icon url="spots/pin_curved_2d_shadowed_user_defaultmap1.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap212" posX="0.400635" posY="0.130393" heading="-39.3999999999999" desc="spotmap212_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano210" jsClick="spotmap212ActionSpotFloorPlan">
								<icon url="spots/pin_curved_2d_shadowed_user_defaultmap1.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap230" posX="0.480315" posY="0.427957" heading="30.9999999999997" desc="spotmap230_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano228" jsClick="spotmap230ActionSpotFloorPlan">
								<icon url="spots/pin_curved_2d_shadowed_user_defaultmap1.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap233" posX="0.579098" posY="0.427957" heading="34.2" desc="spotmap233_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano231" jsClick="spotmap233ActionSpotFloorPlan">
								<icon url="spots/pin_curved_2d_shadowed_user_defaultmap1.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap236" posX="0.647817" posY="0.425806" heading="54.1999999999999" desc="spotmap236_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano234" jsClick="spotmap236ActionSpotFloorPlan">
								<icon url="spots/pin_curved_2d_shadowed_user_defaultmap1.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap257" posX="0.693366" posY="0.423241" heading="-38" desc="spotmap257_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano255" jsClick="spotmap257ActionSpotFloorPlan">
								<icon url="spots/pin_curved_2d_shadowed_user_defaultmap1.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap260" posX="0.733628" posY="0.417553" heading="-79" desc="spotmap260_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano258" jsClick="spotmap260ActionSpotFloorPlan">
								<icon url="spots/pin_curved_2d_shadowed_user_defaultmap1.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap263" posX="0.647788" posY="0.656915" heading="82.8" desc="spotmap263_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano261" jsClick="spotmap263ActionSpotFloorPlan">
								<icon url="spots/pin_curved_2d_shadowed_user_defaultmap1.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap308" posX="0.576991" posY="0.236702" heading="-99.2000000000005" desc="spotmap308_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano309" jsClick="spotmap308ActionSpotFloorPlan">
								<icon url="spots/pin_curved_2d_shadowed_user_defaultmap1.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap313" posX="0.673451" posY="0.62766" heading="-59" desc="spotmap313_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano311" jsClick="spotmap313ActionSpotFloorPlan">
								<icon url="spots/pin_curved_2d_shadowed_user_defaultmap1.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap316" posX="0.699369" posY="0.688737" heading="45.9999999999999" desc="spotmap316_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano314" jsClick="spotmap316ActionSpotFloorPlan">
								<icon url="spots/pin_curved_2d_shadowed_user_defaultmap1.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap319" posX="0.673761" posY="0.693878" heading="-122.8" desc="spotmap319_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano317" jsClick="spotmap319ActionSpotFloorPlan">
								<icon url="spots/pin_curved_2d_shadowed_user_defaultmap1.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap349" posX="0.70177" posY="0.62766" heading="0" desc="spotmap349_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano347" jsClick="spotmap349ActionSpotFloorPlan">
								<icon url="spots/pin_curved_2d_shadowed_user_defaultmap1.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap352" posX="0.770796" posY="0.465426" heading="0" desc="spotmap352_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano350" jsClick="spotmap352ActionSpotFloorPlan">
								<icon url="spots/pin_curved_2d_shadowed_user_defaultmap1.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap355" posX="0.896825" posY="0.353787" heading="-138" desc="spotmap355_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano353" jsClick="spotmap355ActionSpotFloorPlan">
								<icon url="spots/pin_curved_2d_shadowed_user_defaultmap1.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap358" posX="0.858407" posY="0.359043" heading="59.9999999999998" desc="spotmap358_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano356" jsClick="spotmap358ActionSpotFloorPlan">
								<icon url="spots/pin_curved_2d_shadowed_user_defaultmap1.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap391" posX="0.816814" posY="0.385638" heading="-36.2000000000001" desc="spotmap391_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano359" jsClick="spotmap391ActionSpotFloorPlan">
								<icon url="spots/pin_curved_2d_shadowed_user_defaultmap1.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap394" posX="0.629204" posY="0.702128" heading="108.4" desc="spotmap394_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano392" jsClick="spotmap394ActionSpotFloorPlan">
								<icon url="spots/pin_curved_2d_shadowed_user_defaultmap1.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap397" posX="0.639823" posY="0.303191" heading="61.2000000000001" desc="spotmap397_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano395" jsClick="spotmap397ActionSpotFloorPlan">
								<icon url="spots/pin_curved_2d_shadowed_user_defaultmap1.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap400" posX="0.39115" posY="0.712766" heading="-87.7999999999999" desc="spotmap400_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano398" jsClick="spotmap400ActionSpotFloorPlan">
								<icon url="spots/pin_curved_2d_shadowed_user_defaultmap1.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap470" posX="0.317261" posY="0.608696" heading="0" desc="spotmap470_tooltip" descType="tooltip" groupName="" isScene="true" scene="pano474" jsClick="spotmap470ActionSpotFloorPlan">
								<icon url="spots/pin_curved_2d_shadowed_user_defaultmap1.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
				</floorplanItem>
			
			
		</floorplanItems>
	</ptplugin>
	
	<action name="kolorFloorplanJsReady-floorPlan">
		set(ptplugin[floorPlan].jsready, true);
	</action>
	
	
		<!-- floorplan main spots counter : 33 -->
			<action name="spotmap47ActionSpotFloorPlan">
          if (xml.scene != pano434,
            mainloadscene(pano434);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap49ActionSpotFloorPlan">
          if (xml.scene != pano26,
            mainloadscene(pano26);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap50ActionSpotFloorPlan">
          if (xml.scene != pano30,
            mainloadscene(pano30);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap51ActionSpotFloorPlan">
          if (xml.scene != pano28,
            mainloadscene(pano28);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap53ActionSpotFloorPlan">
          if (xml.scene != pano51,
            mainloadscene(pano51);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap63ActionSpotFloorPlan">
          if (xml.scene != pano57,
            mainloadscene(pano57);
          );
      lookat(-99.900000, 4.950000, 90.000000);
    </action>
			<action name="spotmap93ActionSpotFloorPlan">
          if (xml.scene != pano82,
            mainloadscene(pano82);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap98ActionSpotFloorPlan">
          if (xml.scene != pano96,
            mainloadscene(pano96);
          );
      lookat(22.950000, 0.900000, 90.000000);
    </action>
			<action name="spotmap99ActionSpotFloorPlan">
          if (xml.scene != pano94,
            mainloadscene(pano94);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap128ActionSpotFloorPlan">
          if (xml.scene != pano126,
            mainloadscene(pano126);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap200ActionSpotFloorPlan">
          if (xml.scene != pano198,
            mainloadscene(pano198);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap203ActionSpotFloorPlan">
          if (xml.scene != pano201,
            mainloadscene(pano201);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap209ActionSpotFloorPlan">
          if (xml.scene != pano205,
            mainloadscene(pano205);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap212ActionSpotFloorPlan">
          if (xml.scene != pano210,
            mainloadscene(pano210);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap230ActionSpotFloorPlan">
          if (xml.scene != pano228,
            mainloadscene(pano228);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap233ActionSpotFloorPlan">
          if (xml.scene != pano231,
            mainloadscene(pano231);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap236ActionSpotFloorPlan">
          if (xml.scene != pano234,
            mainloadscene(pano234);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap257ActionSpotFloorPlan">
          if (xml.scene != pano255,
            mainloadscene(pano255);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap260ActionSpotFloorPlan">
          if (xml.scene != pano258,
            mainloadscene(pano258);
          );
      lookat(107.250000, 6.333333, 90.000000);
    </action>
			<action name="spotmap263ActionSpotFloorPlan">
          if (xml.scene != pano261,
            mainloadscene(pano261);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap308ActionSpotFloorPlan">
          if (xml.scene != pano309,
            mainloadscene(pano309);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap313ActionSpotFloorPlan">
          if (xml.scene != pano311,
            mainloadscene(pano311);
          );
      lookat(68.850000, 9.000000, 90.000000);
    </action>
			<action name="spotmap316ActionSpotFloorPlan">
          if (xml.scene != pano314,
            mainloadscene(pano314);
          );
      lookat(33.300000, 14.400000, 90.000000);
    </action>
			<action name="spotmap319ActionSpotFloorPlan">
          if (xml.scene != pano317,
            mainloadscene(pano317);
          );
      lookat(157.950000, 9.285000, 90.000000);
    </action>
			<action name="spotmap349ActionSpotFloorPlan">
          if (xml.scene != pano347,
            mainloadscene(pano347);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap352ActionSpotFloorPlan">
          if (xml.scene != pano350,
            mainloadscene(pano350);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap355ActionSpotFloorPlan">
          if (xml.scene != pano353,
            mainloadscene(pano353);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap358ActionSpotFloorPlan">
          if (xml.scene != pano356,
            mainloadscene(pano356);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap391ActionSpotFloorPlan">
          if (xml.scene != pano359,
            mainloadscene(pano359);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap394ActionSpotFloorPlan">
          if (xml.scene != pano392,
            mainloadscene(pano392);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap397ActionSpotFloorPlan">
          if (xml.scene != pano395,
            mainloadscene(pano395);
          );
      lookat(0.000000, 0.000000, 90.000000);
    </action>
			<action name="spotmap400ActionSpotFloorPlan">
          if (xml.scene != pano398,
            mainloadscene(pano398);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    </action>
			<action name="spotmap470ActionSpotFloorPlan">
          if (xml.scene != pano474,
            mainloadscene(pano474);
          );
      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();"
	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 == "",
				js(invokePluginFunction(floorPlan, changeDirection, get(xml.scene), get(view.hlookat), get(view.fov)));
			);
		);
	</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.fov));
		);
		
		js(invokePluginFunction(floorPlan, selectSpot, %1, %2, %3));
	</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(floorPlanSpotSearch, 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(floorPlanSpotSearch == 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(floorPlanSpotSearch == 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(floorPlanSpotSearch, 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="top" type="string" />
		<option name="start_position" value="left" type="string" />
		<option name="margin_x" value="0" 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="background_color" value="ffffff" type="string" />
		<option name="background_alpha" value="0" type="float" />
		<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="padding" value="0" 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="6d6d6d" type="string" />
		<option name="area_width" value="85" type="int" />
		<option name="area_height" value="55" 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="500" type="int" />
		<option name="close_on_click" value="true" 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="4" type="int" />
	</settings>
	</ptplugin>
	
	<action name="kolorAreaJsReady-floorPlanArea">
		set(ptplugin[floorPlanArea].jsready, true);
	</action>
	
	<action name="openKolorArea-floorPlanArea">
		ifnot(ptplugin[floorPlanArea].isOpen,
			set(ptplugin[floorPlanArea].isOpen, true);
			set(ptplugin[floorPlanArea].visible, true);
			set(ptplugin[floorPlanArea].doNotDeleteMe, false);
			pauseautorotation();
			js(showKolorArea(floorPlanArea, &lt;div id="floorPlanArea-floorplanDIV"&gt;&lt;/div&gt;));
			events.dispatch(onremovedisplayedobject);
		);
	</action>
	
	<action name="closeKolorArea-floorPlanArea">
		if(ptplugin[floorPlanArea].isOpen,
			resumeautorotation();
			js(invokePluginFunction(floorPlanArea, closeKolorArea));
			set(ptplugin[floorPlanArea].isOpen, false);
		);
	</action>
	
	<action name="toggleKolorArea-floorPlanArea">
		if(ptplugin[floorPlanArea].isOpen,
			closeKolorArea-floorPlanArea();
		,
			openKolorArea-floorPlanArea();
		);
	</action>
	
	<action name="closeKolorAreaCallback-floorPlanArea">
		resumeautorotation();
		set(ptplugin[floorPlanArea].isOpen, false);hideFloorplan();
	</action>
	
	<action name="changeTitleKolorArea-floorPlanArea">
		js(invokePluginFunction(floorPlanArea, changeTitle, %1));
	</action>
	
	<action name="showKolorArea-floorPlanArea">
		set(ptplugin[floorPlanArea].visible, true);
		set(ptplugin[floorPlanArea].doNotDeleteMe, false);
		pauseautorotation();
		js(invokePluginFunction(floorPlanArea, showKolorArea, %1));
		events.dispatch(onremovedisplayedobject);
	</action>
		
	<action name="hideKolorArea-floorPlanArea">
		resumeautorotation();
		set(ptplugin[floorPlanArea].visible, false);
		js(invokePluginFunction(floorPlanArea, hideKolorArea, %1));
	</action>
	
	<events name="kolorAreaEvents-floorPlanArea" 
		keep="true"
	/>
	
	
  <!-- ************* -->
  <!-- Loading Image -->
  <!-- ************* -->



  <layer name="loadingpicture"
         keep="true"
         url="%FIRSTXML%/graphics/loadingpicture/logo.png" 
         align="center"
         x="0"
         y="100"
         zorder="5"
		 visible="false"
		 enabled="false"
		 alpha="1"


         />

  <action name="displayloadingpicture">
    set(layer[loadingpicture].visible, %1);
  </action>
	
  <events name="displayloadingpictureWhenLoading" keep="true"
          onnewpano="displayloadingpicture(true);"
          onremovepano="displayloadingpicture(true);"
          onloadcomplete="displayloadingpicture(false);"
          />



  <!-- ************ -->
  <!-- iControl Bar -->
  <!-- ************ -->


  <krpano theme11barbuilt="false" theme11backgroundwidthwhenclosed="0" theme11backgroundwidthwhenopened="0" theme11IsOpened="false" />
  <events name="theme11events" onxmlcomplete="theme11buildMenuBar();" keep="true"/>
  <action name="theme11buildMenuBar">
    ifnot (theme11barbuilt, theme11buildMenu(); set(theme11barbuilt, true););
  </action>

  <style name="theme11_btn_style"
         keep="true"
         edge="right"
         align="right"
         x="0" y="0"
         width="40" height="40"
         crop="0|0|60|60"
         onovercrop="0|60|60|60"
         ondowncrop="0|120|60|60"
         onhover="showTooltip(bottom, theme11menuTooltipStyle, bottom);"
         onout="hideTooltip();"
         />

  <layer name="theme11_menu_bg"
         keep="true"
         type="container"
         zorder="6"
         width="40"
         height="40"
         align="bottom"
         x="0" y="10"
         maskchildren="true"
         rotate="0"
         visible="false"
         >

    <layer name="theme11btn_gyroscope_off"
            url="%FIRSTXML%/graphics/icontrolbar/btn_gyroscope.png"
            style="theme11_btn_style"
            onclick="disableGyroscope();"
            devices="tablet|mobile"
            tooltip="controlBar_igyroOffTip"
            visible="false"
            />
    <layer name="theme11btn_gyroscope_on"
            url="%FIRSTXML%/graphics/icontrolbar/btn_gyroscope.png"
            style="theme11_btn_style"
            onclick="enableGyroscope();"
            devices="tablet|mobile"
            tooltip="controlBar_igyroOnTip"
            visible="false"
            />


    <layer name="theme11btn_left"
            url="%FIRSTXML%/graphics/icontrolbar/btn_move_left.png"
            ondown="set(hlookat_moveforce, -1);"
            onup="set(hlookat_moveforce, 0);"
            style="theme11_btn_style"
            visible="false"
            tooltip="controlBar_imoveLeftTip"
            devices="desktop"
            />
    <layer name="theme11btn_right"
            url="%FIRSTXML%/graphics/icontrolbar/btn_move_right.png"
            ondown="set(hlookat_moveforce, +1);"
            onup="set(hlookat_moveforce, 0);"
            style="theme11_btn_style"
            visible="false"
            tooltip="controlBar_imoveRightTip"
            devices="desktop"
            />

    <layer name="theme11btn_up"
            url="%FIRSTXML%/graphics/icontrolbar/btn_move_up.png"
            ondown="set(vlookat_moveforce, -1);"
            onup="set(vlookat_moveforce, 0);"
            style="theme11_btn_style"
            visible="false"
            tooltip="controlBar_imoveUpTip"
            devices="desktop"
            />
    <layer name="theme11btn_down"
            url="%FIRSTXML%/graphics/icontrolbar/btn_move_down.png"
            ondown="set(vlookat_moveforce, +1);"
            onup="set(vlookat_moveforce, 0);"
            style="theme11_btn_style"
            visible="false"
            tooltip="controlBar_imoveDownTip"
            devices="desktop"
            />


    <layer name="theme11btn_sound_on"
            url="%FIRSTXML%/graphics/icontrolbar/btn_start_sound.png"
            onclick="playTourSounds();"
            style="theme11_btn_style"
            visible="false"
            tooltip="controlBar_isoundsOnTip"
            />
    <layer name="theme11btn_sound_off"
            url="%FIRSTXML%/graphics/icontrolbar/btn_stop_sound.png"
            onclick="stopTourSounds();"
            style="theme11_btn_style"
            visible="false"
            tooltip="controlBar_isoundsOffTip"
            />



    <layer name="theme11btn_display_map"
            url="%FIRSTXML%/graphics/icontrolbar/btn_map.png"
            onclick="theme11displayMap();"
            style="theme11_btn_style"
            visible="false"
            tooltip="controlBar_idisplayMapTip"
            />
    <layer name="theme11btn_hide_map"
            url="%FIRSTXML%/graphics/icontrolbar/btn_map.png"
            onclick="theme11hideMap();"
            style="theme11_btn_style"
            visible="false"
            tooltip="controlBar_ihideMapTip"
            />

    <layer name="theme11btn_display_floorplan"
            url="%FIRSTXML%/graphics/icontrolbar/btn_floorplan.png"
            onclick="showFloorplan();"
            style="theme11_btn_style"
            visible="false"
            tooltip="controlBar_idisplayFloorplanTip"
            />
    <layer name="theme11btn_hide_floorplan"
            url="%FIRSTXML%/graphics/icontrolbar/btn_floorplan.png"
            onclick="hideFloorplan();"
            style="theme11_btn_style"
            visible="false"
            tooltip="controlBar_ihideFloorplanTip"
            />

    <layer name="theme11btn_share"
            url="%FIRSTXML%/graphics/icontrolbar/btn_share.png"
            onclick="shareTour();"
            style="theme11_btn_style"
            visible="false"
            tooltip="controlBar_ishareTip"
            />


    <layer name="theme11btn_openfs"
            url="%FIRSTXML%/graphics/icontrolbar/btn_enter_fs.png"
            onclick="enterFullscreen();"
            style="theme11_btn_style"
            visible="false"
            devices="fullscreensupport"
            tooltip="controlBar_iopenFsTip"
            />
    <layer name="theme11btn_closefs"
            url="%FIRSTXML%/graphics/icontrolbar/btn_close_fs.png"
            onclick="exitFullscreen();"
            style="theme11_btn_style"
            visible="false"
            devices="fullscreensupport"
            tooltip="controlBar_icloseFsTip"
            />

    <layer name="theme11btn_autorotate_on"
            url="%FIRSTXML%/graphics/icontrolbar/btn_start_autorotation.png"
            onclick="startautorotation();"
            style="theme11_btn_style"
            visible="false"
            tooltip="controlBar_iautorotateOnTip"
            />
    <layer name="theme11btn_autorotate_off"
            url="%FIRSTXML%/graphics/icontrolbar/btn_stop_autorotation.png"
            onclick="stopautorotation();"
            style="theme11_btn_style"
            visible="false"
            tooltip="controlBar_iautorotateOffTip"
            />


    <layer name="theme11btn_autotour_on"
            url="%FIRSTXML%/graphics/icontrolbar/btn_start_automatic_tour.png"
            onclick="startautotour();"
            style="theme11_btn_style"
            visible="false"
            tooltip="controlBar_iautotourOnTip"
            />
    <layer name="theme11btn_autotour_off"
            url="%FIRSTXML%/graphics/icontrolbar/btn_stop_automatic_tour.png"
            onclick="stopautotour();"
            style="theme11_btn_style"
            visible="false"
            tooltip="controlBar_iautotourOffTip"
            />


    <layer name="theme11btn_display_help"
            url="%FIRSTXML%/graphics/icontrolbar/btn_help.png"
            onclick="theme11displayHelp();"
            style="theme11_btn_style"
            devices="desktop"
            visible="false"
            tooltip="controlBar_idisplayHelpTip"
            />
    <layer name="theme11btn_close_help"
            url="%FIRSTXML%/graphics/icontrolbar/btn_help.png"
            onclick="theme11closeHelp();"
            style="theme11_btn_style"
            visible="false"
            devices="desktop"
            tooltip="controlBar_ihideHelpTip"
            />


    <layer name="theme11btn_display_info"
            url="%FIRSTXML%/graphics/icontrolbar/btn_info.png"
            onclick="showTourInfo();"
            style="theme11_btn_style"
            visible="false"
            tooltip="controlBar_idisplayInfoTip"
            />

    <layer name="theme11btn_close_info"
            url="%FIRSTXML%/graphics/icontrolbar/btn_info.png"
            onclick="hideTourInfo();"
            style="theme11_btn_style"
            visible="false"
            tooltip="controlBar_ihideInfoTip"
            />


    <layer name="theme11btn_hidecontrols"
           url="%FIRSTXML%/graphics/icontrolbar/btn_hide_controls.png"
           style="theme11_btn_style"
           onclick="theme11hideMenuControls();hideTourControls();"
           visible="false"
           tooltip="controlBar_ihideControlsTip"
           />
    <layer name="theme11btn_showcontrols"
           url="%FIRSTXML%/graphics/icontrolbar/btn_show_controls.png"
           style="theme11_btn_style"
           onclick="theme11showMenuControls();showTourControls();"
           tooltip="controlBar_idisplayControlsTip"
           visible="false"
           />
 </layer>



  <events name="theme11gyroscopeavailableevent"
          ongyroscopeavailable="theme11updateGyroscopeButtonsAvailability();"
          ongyroscopeon="theme11enableGyroscopeButtons(true);"
          ongyroscopeoff="theme11enableGyroscopeButtons(false);"
          keep="true"/>
  <krpano theme11menugyroscopeavailable="false" theme11menugyroscopeenabled="false"/>
  <action name="theme11updateGyroscopeButtonsAvailability">
    if (tour_gyroscopedevices,
      set(theme11menugyroscopeavailable, true);
      theme11updateGyroscopeButtons();
    );
  </action>
  <action name="theme11enableGyroscopeButtons">
    if (tour_gyroscopedevices,
      set(theme11menugyroscopeenabled, %1);
      theme11updateGyroscopeButtons();
    );
  </action>
	<action name="theme11HideGyroscopeButtons">
		set(layer[theme11btn_gyroscope_off].visible, false);
		set(layer[theme11btn_gyroscope_on].visible, false);
	</action>
	<action name="theme11ShowGyroscopeButtons">
		if (theme11menugyroscopeavailable,
			if (theme11menugyroscopeenabled,
				set(layer[theme11btn_gyroscope_off].visible, false);
				set(layer[theme11btn_gyroscope_on].visible, true);
			,
				set(layer[theme11btn_gyroscope_off].visible, true);
				set(layer[theme11btn_gyroscope_on].visible, false);
			);
		,
			theme11HideGyroscopeButtons();
		);
	</action>
	<action name="theme11updateGyroscopeButtons">
	if (tour_gyroscopedevices,
		set(theme11DisplayMenuGyroscopeButtons, false);
		if (theme11IsOpened, set(theme11DisplayMenuGyroscopeButtons, true););
		if (theme11DisplayMenuGyroscopeButtons,
			theme11ShowGyroscopeButtons();
		,
			theme11HideGyroscopeButtons();
		);
	,
		theme11HideGyroscopeButtons();
	);
	</action>



  <action name="theme11hideMenuControls">
    set(theme11IsOpened, false);
    set(layer[theme11btn_hidecontrols].visible, false);
    set(layer[theme11btn_showcontrols].visible, true);

set(layer[theme11btn_share].visible, false);

if (device.desktop,
	set(layer[theme11btn_up].visible, false);
	set(layer[theme11btn_down].visible, false);
);
if (device.desktop,
	set(layer[theme11btn_left].visible, false);
	set(layer[theme11btn_right].visible, false);
);
	theme11updateFullscreenButtons();
	theme11updateHelpButtons();

	theme11updateInfoButtons();

	theme11updateAutorotationButtons();

	theme11updateAutotourButtons();
	theme11updateSoundButtons();
	theme11updateGyroscopeButtons();


	theme11updateMapButtons();
	theme11updateFloorplanButtons();


    set(layer[theme11_menu_bg].width , get(theme11backgroundwidthwhenclosed));
	set(layer[theme11_menu_bg].visible, true);
  </action>
  <action name="theme11showMenuControls">
    set(theme11IsOpened, true);
    set(layer[theme11btn_hidecontrols].visible, true);
    set(layer[theme11btn_showcontrols].visible, false);
	set(layer[theme11_menu_bg].visible, true);

set(layer[theme11btn_share].visible, true);

if (device.desktop,
	set(layer[theme11btn_up].visible, true);
	set(layer[theme11btn_down].visible, true);
);
if (device.desktop,
	set(layer[theme11btn_left].visible, true);
	set(layer[theme11btn_right].visible, true);
);
	theme11updateFullscreenButtons();
	theme11updateHelpButtons();

	theme11updateInfoButtons();

	theme11updateAutorotationButtons();

	theme11updateAutotourButtons();
	theme11updateSoundButtons();
	theme11updateGyroscopeButtons();


	theme11updateMapButtons();
	theme11updateFloorplanButtons();


    set(layer[theme11_menu_bg].width, get(theme11backgroundwidthwhenopened));
  </action>


  <layer name="theme11helpScreenBg"
         align="center"
         keep="true"
         onclick="theme11closeHelp();"
         url="%FIRSTXML%/graphics/icontrolbar/help_screen_bg.png"
         visible="false"
         rotate="-90"
         height="50%"
         width="prop"
         zorder="97"
         x="100%"
         displayed="false" />
  <layer name="theme11helpScreenFg"
         align="center"
         keep="true"
         onclick="theme11closeHelp();"
         url="%FIRSTXML%/graphics/icontrolbar/help_screen_fg.png"
         height="50%"
         width="prop"
         visible="false"
         rotate="90"
         zorder="98"
         x="-100%" />
  <action name="theme11displayHelp">
  if (device.desktop,
    set(layer[theme11helpScreenBg].displayed,true);
    set(layer[theme11helpScreenBg].visible,true);
    set(layer[theme11helpScreenFg].visible,true);
    tween(layer[theme11helpScreenFg].rotate,0, 1);
    tween(layer[theme11helpScreenBg].rotate,0, 1);
    tween(layer[theme11helpScreenFg].x,0, 1);
    tween(layer[theme11helpScreenBg].x,0, 1);
    theme11updateHelpButtons();
  );
  </action>
  <action name="theme11closeHelp">
  if (device.desktop,
    set(layer[theme11helpScreenBg].displayed,false);
    tween(layer[theme11helpScreenFg].rotate,  90, 1, easeOutQuad, set(layer[helpScreenFg].visible,false););
    tween(layer[theme11helpScreenBg].rotate, -90, 1, easeOutQuad, set(layer[helpScreenBg].visible,false););
    tween(layer[theme11helpScreenFg].x, -100%, 1);
    tween(layer[theme11helpScreenBg].x, 100%, 1);
    theme11updateHelpButtons();
  );
  </action>
	<action name="theme11HideHelpButtons">
		set(layer[theme11btn_display_help].visible, false);
		set(layer[theme11btn_close_help].visible, false);
	</action>
	<action name="theme11ShowHelpButtons">
		if (layer[theme11helpScreenBg].displayed,
			set(layer[theme11btn_close_help].visible, true);
			set(layer[theme11btn_display_help].visible, false);
		,
			set(layer[theme11btn_display_help].visible, true);
			set(layer[theme11btn_close_help].visible, false);
		);
	</action>
	<action name="theme11updateHelpButtons">
	if (device.desktop,
		set(theme11DisplayHelpButtons, false);
		if (theme11IsOpened, set(theme11DisplayHelpButtons, true););
		if (theme11DisplayHelpButtons,
			theme11ShowHelpButtons();
		,
			theme11HideHelpButtons();
		);
	,
		theme11HideHelpButtons();
	);
	</action>


	<events name="theme11hideshowinfoevent" 
		onhidetourinfo="theme11updateInfoButtons();" 
		onshowtourinfo="theme11updateInfoButtons();" 
		keep="true" />
	<action name="theme11HideInfoButtons">
		set(layer[theme11btn_display_info].visible, false);
		set(layer[theme11btn_close_info].visible, false);
	</action>
	<action name="theme11ShowInfoButtons">
		if (tour_displayinfo,
			set(layer[theme11btn_close_info].visible, true);
			set(layer[theme11btn_display_info].visible, false);
		,
			set(layer[theme11btn_display_info].visible, true);
			set(layer[theme11btn_close_info].visible, false);
		);
	</action>
	<action name="theme11updateInfoButtons">
		set(theme11DisplayInfoButtons, false);
		if (theme11IsOpened, set(theme11DisplayInfoButtons, true););
		if (theme11DisplayInfoButtons,
			theme11ShowInfoButtons();
		,
			theme11HideInfoButtons();
		);
	</action>

  <action name="theme11displayMap">showMap();
  </action>
  <action name="theme11hideMap">hideMap();
  </action>
  
  <events name="theme11displaymapchangeevent"
          onshowtourmap="theme11updateMapButtons();"
          onhidetourmap="theme11updateMapButtons();"
          keep="true"/>
	<action name="theme11HideMapButtons">
		set(layer[theme11btn_display_map].visible, false);
		set(layer[theme11btn_hide_map].visible, false);
	</action>
	<action name="theme11ShowMapButtons">
		if (tour_displaymap,
			set(layer[theme11btn_hide_map].visible, true);
			set(layer[theme11btn_display_map].visible, false);
		,
			set(layer[theme11btn_display_map].visible, true);
			set(layer[theme11btn_hide_map].visible, false);
		);
	</action>
	<action name="theme11updateMapButtons">
		set(theme11DisplayMapButtons, false);
		if (theme11IsOpened, set(theme11DisplayMapButtons, true););
		if (theme11DisplayMapButtons,
			theme11ShowMapButtons();
		,
			theme11HideMapButtons();
		);
	</action>

	<events name="theme11DisplayFloorPlanEvents" 
		onshowtourfloorplan="theme11updateFloorplanButtons();" 
		onhidetourfloorplan="theme11updateFloorplanButtons();" 
		keep="true" />
	<action name="theme11HideFloorplanButtons">
		set(layer[theme11btn_display_floorplan].visible, false);
		set(layer[theme11btn_hide_floorplan].visible, false);
	</action>
	<action name="theme11ShowFloorplanButtons">
		if (tour_displayfloorplan,
			set(layer[theme11btn_hide_floorplan].visible, true);
			set(layer[theme11btn_display_floorplan].visible, false);
		,
			set(layer[theme11btn_display_floorplan].visible, true);
			set(layer[theme11btn_hide_floorplan].visible, false);
		);
	</action>
	<action name="theme11updateFloorplanButtons">
		set(theme11DisplayFloorplanButtons, false);
		if (theme11IsOpened, set(theme11DisplayFloorplanButtons, true););
		if (theme11DisplayFloorplanButtons,
			theme11ShowFloorplanButtons();
		,
			theme11HideFloorplanButtons();
		);
	</action>



  <events name="theme11menufullscreenchangeevent"
          onenterfullscreen="theme11updateFullscreenButtons();"
          onexitfullscreen="theme11updateFullscreenButtons();"
          keep="true"/>
	<action name="theme11HideFullscreenButtons">
		set(layer[theme11btn_openfs].visible , false);
		set(layer[theme11btn_closefs].visible, false);
	</action>
	<action name="theme11ShowFullscreenButtons">
		if (device.fullscreensupport,
			if(tour_fullscreen,
				set(layer[theme11btn_openfs].visible , false);
				set(layer[theme11btn_closefs].visible, true);
			,
				set(layer[theme11btn_openfs].visible ,true);
				set(layer[theme11btn_closefs].visible,false);
			);
		,
			theme11HideFullscreenButtons();
		);
	</action>
	<action name="theme11updateFullscreenButtons">
		set(theme11DisplayFullscreenButtons, false);
		if (theme11IsOpened, set(theme11DisplayFullscreenButtons, true););
		if (theme11DisplayFullscreenButtons,
			theme11ShowFullscreenButtons();
		,
			theme11HideFullscreenButtons();
		);
	</action>

	<events name="theme11AutorotationEvents"
		onstartautorotation="theme11updateAutorotationButtons();"
		onresumeautorotation="theme11updateAutorotationButtons();"
		onstopautorotation="theme11updateAutorotationButtons();"
		onpauseautorotation="theme11updateAutorotationButtons();"
		keep="true"/>
	<action name="theme11HideAutorotationButtons">
		set(layer[theme11btn_autorotate_off].visible, false);
		set(layer[theme11btn_autorotate_on].visible , false);
	</action>
	<action name="theme11ShowAutorotationButtons">
		if(tour_autorotateenabled==false,
			set(layer[theme11btn_autorotate_off].visible, false);
			set(layer[theme11btn_autorotate_on].visible , true);
		,
			set(layer[theme11btn_autorotate_off].visible, true);
			set(layer[theme11btn_autorotate_on].visible , false);
		);
	</action>
	<action name="theme11updateAutorotationButtons">
		set(theme11DisplayAutorotationButtons, false);
		if (theme11IsOpened, set(theme11DisplayAutorotationButtons, true););
		if (theme11DisplayAutorotationButtons,
			theme11ShowAutorotationButtons();
		,
			theme11HideAutorotationButtons();
		);
	</action>


	<events name="theme11AutotourEvents"
		onstartautotour="theme11updateAutotourButtons();"
		onstopautotour="theme11updateAutotourButtons();"
		keep="true"/>
	<action name="theme11HideAutotourButtons">
		set(layer[theme11btn_autotour_off].visible, false);
		set(layer[theme11btn_autotour_on].visible , false);
	</action>
	<action name="theme11ShowAutotourButtons">
		if (tour_autotourenabled == false,
			set(layer[theme11btn_autotour_off].visible, false);
			set(layer[theme11btn_autotour_on].visible , true);
		,
			set(layer[theme11btn_autotour_off].visible, true);
			set(layer[theme11btn_autotour_on].visible , false);
		);
	</action>
	<action name="theme11updateAutotourButtons">
		set(theme11DisplayAutotourButtons, false);
		if (theme11IsOpened, set(theme11DisplayAutotourButtons, true););
		if (theme11DisplayAutotourButtons,
			theme11ShowAutotourButtons();
		,
			theme11HideAutotourButtons();
		);
	</action>

  <events name="theme11playstopsoundsevent" playtoursoundsevent="theme11updateSoundButtons();" stoptoursoundsevent="theme11updateSoundButtons();" keep="true"/>
	<action name="theme11HideSoundButtons">
		set(layer[theme11btn_sound_off].visible, false);
		set(layer[theme11btn_sound_on].visible , false);
	</action>
	<action name="theme11ShowSoundButtons">
		if (tour_soundson == false,
			set(layer[theme11btn_sound_off].visible, false);
			set(layer[theme11btn_sound_on].visible , true);
		,
			set(layer[theme11btn_sound_off].visible, true);
			set(layer[theme11btn_sound_on].visible , false);
		);
	</action>
	<action name="theme11updateSoundButtons">
		set(theme11DisplaySoundButtons, false);
		if (theme11IsOpened, set(theme11DisplaySoundButtons, true););
		if (theme11DisplaySoundButtons,
			theme11ShowSoundButtons();
		,
			theme11HideSoundButtons();
		);
	</action>


  <textstyle name="theme11menuTooltipStyle"
             font="Helvetica"
             fontsize="16"
             bold="true"
             italic="false"
             background="false"
             border="false"
             alpha="1"
             textcolor="0x999184"
             effect="dropshadow(2,45,0x999184,4,1);"
             origin="cursor"
             edge="bottom"
             yoffset="-20"
             xoffset="0"
             noclip="true"/>
<layer name="theme11menuTooltipStyle"
	keep="true"
	enabled="false"
	capture="false"
	url="%FIRSTXML%/graphics/textfield.swf"
	align="center"
	background="false"
	backgroundcolor="0x000000"
	backgroundalpha="0.3"
	border="false"
	bordercolor="0xffffff"
	textshadow="2" textshadowrange="10.0" textshadowangle="45" textshadowcolor="0x999184" textshadowalpha="1.0"
	css="color:#999184;font-family:Helvetica;font-weight:bold;font-size:16px;text-align:center;"
	width="200"
	height="20"
	autoheight="true"
		edge="bottom"
	selectable="false"
	zorder="0"
	visible="false"
	html=""
	devices="html5"
/>
  <action name="theme11buildMenu">
    
    set(theme11button_pos, 0);

	set(theme11backgroundwidthwhenclosed, 40);
    set(layer[theme11btn_hidecontrols].x, get(theme11button_pos));
    set(layer[theme11btn_showcontrols].x, get(theme11button_pos));
    inc(theme11button_pos, 45);


    set(layer[theme11btn_display_info].x, get(theme11button_pos));
    set(layer[theme11btn_close_info].x  , get(theme11button_pos));
    inc(theme11button_pos, 45);


      if (device.desktop,
        set(layer[theme11btn_display_help].x, get(theme11button_pos));
        set(layer[theme11btn_close_help].x  , get(theme11button_pos));
        inc(theme11button_pos, 45);
      );

      if (device.fullscreensupport,
        set(layer[theme11btn_openfs].x , get(theme11button_pos));
        set(layer[theme11btn_closefs].x, get(theme11button_pos));
        inc(theme11button_pos, 45);
      );


      set(layer[theme11btn_share].x, get(theme11button_pos));
      inc(theme11button_pos, 45);

      set(layer[theme11btn_display_map].x , get(theme11button_pos));
      set(layer[theme11btn_hide_map].x    , get(theme11button_pos));
      inc(theme11button_pos, 45);

      set(layer[theme11btn_display_floorplan].x , get(theme11button_pos));
      set(layer[theme11btn_hide_floorplan].x    , get(theme11button_pos));
      inc(theme11button_pos, 45);


      set(layer[theme11btn_autorotate_on].x , get(theme11button_pos));
      set(layer[theme11btn_autorotate_off].x, get(theme11button_pos));
      inc(theme11button_pos, 45);


      set(layer[theme11btn_autotour_on].x , get(theme11button_pos));
      set(layer[theme11btn_autotour_off].x, get(theme11button_pos));
      inc(theme11button_pos, 45);

      set(layer[theme11btn_sound_on].x , get(theme11button_pos));
      set(layer[theme11btn_sound_off].x, get(theme11button_pos));
      inc(theme11button_pos, 45);



      set(theme11DisplayGryoscopeButton, false);
      if (device.tablet, set(theme11DisplayGryoscopeButton, true););
      if (device.mobile, set(theme11DisplayGryoscopeButton, true););
      if(theme11DisplayGryoscopeButton,
        set(layer[theme11btn_gyroscope_on].x , get(theme11button_pos));
        set(layer[theme11btn_gyroscope_off].x, get(theme11button_pos));
        inc(theme11button_pos, 45);
      );


      if (device.desktop,
        set(layer[theme11btn_right].x, get(theme11button_pos));
        inc(theme11button_pos, 45);
        set(layer[theme11btn_left].x, get(theme11button_pos));
        inc(theme11button_pos, 45);
      );

      if (device.desktop,
        set(layer[theme11btn_down].x, get(theme11button_pos));
        inc(theme11button_pos, 45);
        set(layer[theme11btn_up].x, get(theme11button_pos));
        inc(theme11button_pos, 45);
      );

      dec(theme11button_pos, 5);

      set(theme11backgroundwidthwhenopened, get(theme11button_pos));
      set(layer[theme11_menu_bg].width, get(theme11backgroundwidthwhenopened));
	
	
	
    </action>

	<events name="theme11StartTourEvents" onTourStart="theme11CallOnStartTour();" keep="true" />
	
	<action name="theme11CallOnStartTour">
		
		theme11showMenuControls();
	</action>

  <!-- ******************************************* -->
  <!-- Button : topleft -->
  <!-- ******************************************* -->
  <layer name="button"
         keep="true"
         url="%FIRSTXML%/graphics/button/map3.png" 
         align="topleft"
         x="10"
         y="10"
         zorder="7"
         visible="false"
         onclick="buttonOnClick"
         alpha="0.7"
         tooltip="buttontooltip"
         onhover="showTooltip(topleft);"
         onout="hideTooltip();tween(scale, 1.0,0.5,easeOutQuad);tween(alpha,0.7,0.5,easeOutQuad);"
         onover="tween(scale, 1.2,0.5,easeOutQuad);tween(alpha,1.0,0.5,easeOutQuad);"
         />
  <action name="buttonOnClick">
showFloorplan();
  </action>

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

  <!-- **************************** -->
  <!-- Thumbnails Stack : panoramas -->
  <!-- **************************** -->


  <krpano stackThumbsallpanoramasIsOpen="false" />

  <events name="stackThumbsallpanoramasEvents"
          onTourStart="stackThumbsallpanoramasBuild();"
          hidetourcontrols="stackThumbsallpanoramasHide();"
          showtourcontrols="stackThumbsallpanoramasShow();"
          hidetourthumbnails="stackThumbsallpanoramasHide();"
          showtourthumbnails="stackThumbsallpanoramasShow();"
          keep="true"/>

  <layer name="stackThumbsallpanoramasMainLayer" type="container" zorder="8" width="1" height="1" alpha="1" keep="true" x="0" y="0" visible="true" align="bottomright" />

  <action name="stackThumbsallpanoramasHide">
    set(hstcstackThumbsallpanoramasi-wait,25);
    for (set(hstcstackThumbsallpanoramasi, 0), hstcstackThumbsallpanoramasi LT scene.count, inc(hstcstackThumbsallpanoramasi),
      if(hstcstackThumbsallpanoramasi-wait == hstcstackThumbsallpanoramasi,
        add(hstcstackThumbsallpanoramasi-wait, 25);
        wait(0);
      );
      txtadd(thumbname,'stackThumbsallpanoramas_', get(hstcstackThumbsallpanoramasi));
      set(layer[get(thumbname)].visible, false);
    );
  </action>
  <action name="stackThumbsallpanoramasShow">
  if (tour_displaythumbnails, 
    set(sstcstackThumbsallpanoramasi-wait,25);
    for (set(sstcstackThumbsallpanoramasi, 0), sstcstackThumbsallpanoramasi LT scene.count, inc(sstcstackThumbsallpanoramasi),
      if(sstcstackThumbsallpanoramasi-wait == sstcstackThumbsallpanoramasi,
        add(sstcstackThumbsallpanoramasi-wait, 25);
        wait(0);
      );
      txtadd(thumbname,'stackThumbsallpanoramas_', get(sstcstackThumbsallpanoramasi));
      set(layer[get(thumbname)].visible, true);
    );
  );
  </action>

  <action name="stackThumbsallpanoramasMagnify">
    tween(layer[%1].alpha,  1.0, 0.3, easeInQuad);
    tween(layer[%1].scale, 1.05, 0.3, easeInQuad);

      set(layer[%1].effect, glow(0xffffff,1,4,255));
      set(layer[%1].jsborder, '2px solid #ffffff');
  </action>

  <action name="stackThumbsallpanoramasLies">
    tween(layer[%1].alpha, 0.8, 0.3, easeInQuad);
    tween(layer[%1].scale, 1.0, 0.3, easeInQuad);

      set(layer[%1].effect, glow(0xffffff,0.2,4,255));
      set(layer[%1].jsborder, '2px solid #ffffff');
  </action>


<krpano stackThumbsallpanoramasBuilt="false"/>

  <action name="stackThumbsallpanoramasBuild">
    ifnot (stackThumbsallpanoramasBuilt,
    set(bststackThumbsallpanoramasi-wait,25);
    for (set(bststackThumbsallpanoramasi, 0), bststackThumbsallpanoramasi LT scene.count, inc(bststackThumbsallpanoramasi),
      if(bststackThumbsallpanoramasi-wait == bststackThumbsallpanoramasi,
        add(bststackThumbsallpanoramasi-wait, 25);
        wait(0);
      );

        copy(thumburl, scene[get(bststackThumbsallpanoramasi)].thumburl);
        txtadd(thumbname,'stackThumbsallpanoramas_', get(bststackThumbsallpanoramasi));

        addplugin(get(thumbname));
        set(layer[get(thumbname)].parent, "stackThumbsallpanoramasMainLayer");
        set(layer[get(thumbname)].url   , get(thumburl));
        set(layer[get(thumbname)].keep  , true);
        set(layer[get(thumbname)].align , bottomright);
        set(layer[get(thumbname)].edge  , center);

        set(layer[get(thumbname)].width , 50);
        set(layer[get(thumbname)].height, 25);

        set(layer[get(thumbname)].alpha , 0.8);
        set(layer[get(thumbname)].visible , false);

        if (bststackThumbsallpanoramasi GE 4, set(reali, 4), set(reali, get(bststackThumbsallpanoramasi)));

        mul(layer[get(thumbname)].x, reali,3);
        mul(layer[get(thumbname)].y, reali,3);

        add(closedthumboffsetx, 10, 25);
        add(layer[get(thumbname)].x, get(closedthumboffsetx));

        add(closedthumboffsety, 10, 12);
        add(layer[get(thumbname)].y, get(closedthumboffsety));

        copy(layer[get(thumbname)].xsmall, layer[get(thumbname)].x);
        copy(layer[get(thumbname)].ysmall, layer[get(thumbname)].y);

        add(layer[get(thumbname)].zorder, 0, bststackThumbsallpanoramasi);
          set(layer[get(thumbname)].effect, glow(0xffffff,0.2,4,255));
          set(layer[get(thumbname)].jsborder, '2px solid #ffffff');

          set(layer[get(thumbname)].tooltip,get(scene[get(bststackThumbsallpanoramasi)].titleid));

        set(layer[get(thumbname)].thumbpos, get(bststackThumbsallpanoramasi));
        set(layer[get(thumbname)].linkedpano, get(scene[get(bststackThumbsallpanoramasi)].name) );
        set(layer[get(thumbname)].onclick, stackThumbsallpanoramasOpen() );
      );

      set(stackThumbsallpanoramasBuilt, true);

      stackThumbsallpanoramasShow();

      
    );
  </action>

  <action name="stackThumbsallpanoramasOpenThumb">
    if(%2 != NEXT,
      set(pos,0);
      copy(curpos, layer[%1].thumbpos);
      set(xdst, 0);
      set(ydst, 0);
    );
    if (pos LT curpos,
      inc(pos);

        inc(ydst, 60);
        if (ishtml5,
          sub(ymax, stageheight, 50);
         ,
          sub(ymax, area.pixelheight, 50);
        );
        dec(ymax, 30);
        if(ydst GT ymax,
          inc(xdst, 110);
          set(ydst,0);
        );

      stackThumbsallpanoramasOpenThumb(%1,NEXT);
     ,
      set(openthumboffsetx, 50);
      add(openthumboffsetx, 10);
      add(xdst, get(openthumboffsetx));

      set(openthumboffsety, 25);
      add(openthumboffsety, 10);
      add(ydst, get(openthumboffsety));

      tween(layer[%1].x, get(xdst) );
      tween(layer[%1].y, get(ydst) );
      tween(layer[%1].width , 100);
      tween(layer[%1].height, 50);
    );
  </action>

  <action name="stackThumbsallpanoramasOpen">
    set(oststackThumbsallpanoramasi-wait,25);
    for (set(oststackThumbsallpanoramasi, 0), oststackThumbsallpanoramasi LT scene.count, inc(oststackThumbsallpanoramasi),
    if(oststackThumbsallpanoramasi-wait == oststackThumbsallpanoramasi,
      add(oststackThumbsallpanoramasi-wait, 25);
      wait(0);
    );
      txtadd(thumbname,'stackThumbsallpanoramas_',get(oststackThumbsallpanoramasi));
      stackThumbsallpanoramasOpenThumb(get(thumbname));
      set(layer[get(thumbname)].onover , stackThumbsallpanoramasMagnify(get(name)); );
      set(layer[get(thumbname)].onout  , stackThumbsallpanoramasLies(get(name)); hideTooltip(); );
      set(layer[get(thumbname)].onhover, showTooltip(bottomright); );
      set(layer[get(thumbname)].onclick, stackThumbsallpanoramasLies(get(name)); stackThumbsallpanoramasClose(0); mainloadscene(get(linkedpano)); );
    );
    
    set(stackThumbsallpanoramasIsOpen, true);
  </action>

  <action name="stackThumbsallpanoramasClose">
    set(cststackThumbsallpanoramasi-wait,25);
    for (set(cststackThumbsallpanoramasi, 0), cststackThumbsallpanoramasi LT scene.count, inc(cststackThumbsallpanoramasi),
      if(cststackThumbsallpanoramasi-wait == cststackThumbsallpanoramasi,
        add(cststackThumbsallpanoramasi-wait, 25);
        wait(0);
      );
      txtadd(thumbname,'stackThumbsallpanoramas_', get(cststackThumbsallpanoramasi));
      stackThumbsallpanoramasCloseThumb(get(thumbname));
    );
    
    set(stackThumbsallpanoramasIsOpen, false);
  </action>
  <action name="stackThumbsallpanoramasCloseThumb">
    tween(layer[%1].x, get(layer[%1].xsmall));
    tween(layer[%1].y, get(layer[%1].ysmall));
    tween(layer[%1].width , 50);
    tween(layer[%1].height, 25);
    set(layer[%1].alpha  , 0.8  );
    set(layer[%1].onover , NULL );
    set(layer[%1].onout  , NULL );
    set(layer[%1].onhover, NULL );hideTooltip();
    set(layer[%1].onclick, stackThumbsallpanoramasOpen() );
  </action>

  <!-- ******************* -->
  <!-- Loading Information -->
  <!-- ******************* -->

  <events name="loaderinformationevent" onxmlcomplete="loaderinformationupdate();" keep="true" devices="flash" />

  <action name="loaderinformationupdate" devices="flash">
    if (progress.progress == 1,
      delayedcall(0.5, set(layer[loaderinformationtextfield].visible, false); );
     ,
         set(layer[loaderinformationtextfield].visible, true);
    );
    mul(progresstext, get(progress.progress),100);
    roundval(progresstext);
    txtadd(progresstext, get(progresstext), %);
    set(layer[loaderinformationtextfield].html, get(progresstext));
    ifnot(progress.progress GE 1, delayedcall(0.01, loaderinformationupdate() ));
  </action>

  <layer name="loaderinformationtextfield"
         devices="flash"
         keep="true"
         zorder="9"
         url="%FIRSTXML%/graphics/textfield.swf"
         align="center"
         x="0"
         y="0"
         borderwidth="0"
         background="false"
         autoheight="true"
         capture="false"
         handcursor="false"
         selectable="false"
         alpha="1"
         visible="true"
         css="
              text-align:center;
              color:#ffffff;
              font-family:Arial;
              font-weight:bold;
              font-size:16px;
             "
  />
  <!-- FLOORPLAN -->
  <action name="hideFloorplan">set(tour_displayfloorplan, false);events.dispatch(onhidetourfloorplan);</action>
  <action name="showFloorplan">set(tour_displayfloorplan, true); events.dispatch(onshowtourfloorplan);</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>
  <!-- Sounds Management -->
  <action name="play3DLocalSounds">
    if (xml.scene, if (scene[get(xml.scene)].haslocalsounds, playpanolocalsounds();););
  </action>
  <action name="stop3DLocalSounds">
    if (xml.scene, if (scene[get(xml.scene)].haslocalsounds, stoppanolocalsounds();););
  </action>
  <action name="set3DLocalSoundsVolume">
    if (xml.scene, if (scene[get(xml.scene)].haslocalsounds, setpanolocalsoundsvolume();););
  </action>
  <action name="playTourSounds">
    set(tour_soundson, true);events.dispatch(playtoursoundsevent);
    play3DLocalSounds();
  </action>
  <action name="stopTourSounds">
    set(tour_soundson, false);events.dispatch(stoptoursoundsevent);
    stop3DLocalSounds();
    if (tour_current_played_sound,
      stopsound(get(tour_current_played_sound));
      delete(tour_current_played_sound);
    );
  </action>
  <action name="setTourSoundsVolume">
    set(tour_soundsvolume, %1);
    set3DLocalSoundsVolume();
  </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();
  </action>
  <action name="disableGyroscope">
    changeGyroscopeState();
  </action>
  <!-- Tour Information -->
  <action name="hideTourInfo">set(tour_displayinfo, false);events.dispatch(onhidetourinfo);</action>
  <action name="showTourInfo">set(tour_displayinfo, true); events.dispatch(onshowtourinfo);</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.fisheye, 0.0, distance(1.0, 0.45), easeoutquad, 
			set(view.fisheyefovlink, 0.5);
			set(view.stereographic,false);
			if(view.pannini, set(view.pannini,false); delayedcall(0,updateobject(true,true)); );
			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">
	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 == true, set(backtonormalfirst,true) );
		if(view.stereographic == false, set(backtonormalfirst,true) );
		if(backtonormalfirst, tween(view.fisheye, 0.0 ,distance(1.0, 0.25), easeoutquad, WAIT); );
		if(view.pannini, set(view.pannini,false); delayedcall(0, updateobject(true,true)); );
		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>
  <!-- Share Tour -->
  <action name="shareTour">events.dispatch(onsharetour);</action>
  <!-- MAP -->
  <action name="hideMap">set(tour_displaymap, false);events.dispatch(onhidetourmap);</action>
  <action name="showMap">set(tour_displaymap, true); events.dispatch(onshowtourmap);</action><action name="setViewNormal">
	stopSetViewTweens();
	setViewNormalComplete();
</action>

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

<action name="stopSetViewTweens">
	stoptween(view.fov);
	stoptween(view.fovmax);
	stoptween(view.vlookat);
	stoptween(view.fisheye);
	stoptween(view.architectural);
</action>
</krpano>