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

    
  <!-- Spot Style - Default Point Spot Style 1 -->
  <style name="IconDefaultPointSpotStyle1"
         url="%FIRSTXML%/spots/hotspot_direction_sequence_user_defaultpoint0.png"
         visible="false"
         frame="0"
         lastframe="15"
         framewidth="98"
         frameheight="43"
         stopspotsequence="false"
         onloaded="setdefaultanimatedspotframe();startspotanimation(0.1);"
         rotate="270"
         onhover="onhoverIconDefaultPointSpotStyle1"
         onout="onoutIconDefaultPointSpotStyle1"
         />
  <action name="onhoverIconDefaultPointSpotStyle1">
    showtooltip('hotspot');
  </action>
  <action name="onoutIconDefaultPointSpotStyle1">
    hideTooltip();



  </action>



    
  <!-- Spot Style - Default Point Spot Style 2 -->
  <style name="IconDefaultPointSpotStyle2"
         url="%FIRSTXML%/spots/hotspot_image_user_defaultpoint1.png"
         visible="false"
         onhover="onhoverIconDefaultPointSpotStyle2"
         onout="onoutIconDefaultPointSpotStyle2"
         />
  <action name="onhoverIconDefaultPointSpotStyle2">
    showtooltip('hotspot');
  </action>
  <action name="onoutIconDefaultPointSpotStyle2">
    hideTooltip();



  </action>



  <!-- ************ -->
  <!-- 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('plugin', theme11menuTooltipStyle, bottom);"
         onout="hideTooltip();"
         />

  <layer name="theme11_menu_bg"
         keep="true"
         type="container"
         zorder="0"
         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="html5"
            tooltip="controlBar_igyroOffTip"
            visible="false"
            />
    <layer name="theme11btn_gyroscope_on"
            url="%FIRSTXML%/graphics/icontrolbar/btn_gyroscope.png"
            style="theme11_btn_style"
            onclick="enableGyroscope();
"
            devices="html5"
            tooltip="controlBar_igyroOnTip"
            visible="false"
            />


    <layer name="theme11btn_in"
            url="%FIRSTXML%/graphics/icontrolbar/btn_zoom_in.png"
            ondown="set(fov_moveforce, -1);
"
            onup="set(fov_moveforce, 0);
"
            style="theme11_btn_style"
            visible="false"
            tooltip="controlBar_izoomInTip"
            devices="desktop"
            />
    <layer name="theme11btn_out"
            url="%FIRSTXML%/graphics/icontrolbar/btn_zoom_out.png"
            ondown="set(fov_moveforce, +1);
"
            onup="set(fov_moveforce, 0);
"
            style="theme11_btn_style"
            visible="false"
            tooltip="controlBar_izoomOutTip"
            devices="desktop"
            />

    <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_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_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_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, true);
				set(layer[theme11btn_gyroscope_on].visible, false);
			,
				set(layer[theme11btn_gyroscope_off].visible, false);
				set(layer[theme11btn_gyroscope_on].visible, true);
			);
		,
			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);


if (device.desktop,
	set(layer[theme11btn_in].visible, false);
	set(layer[theme11btn_out].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();



	theme11updateGyroscopeButtons();




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


if (device.desktop,
	set(layer[theme11btn_in].visible, true);
	set(layer[theme11btn_out].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();



	theme11updateGyroscopeButtons();




    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%" />
  <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%"
         displayed="false" />
  <action name="theme11displayHelp">
  if (device.desktop,
    set(layer[theme11helpScreenFg].displayed,true);
    set(layer[theme11helpScreenBg].visible,true);
    set(layer[theme11helpScreenFg].visible,true);
    tween(layer[theme11helpScreenFg].rotate,0, 1);
    tween(layer[theme11helpScreenFg].x,0, 1);
    tween(layer[theme11helpScreenBg].rotate,0, 1);
    tween(layer[theme11helpScreenBg].x,0, 1);
    theme11updateHelpButtons();
  );
  </action>
  <action name="theme11closeHelp">
  if (device.desktop,
    set(layer[theme11helpScreenFg].displayed,false);
    tween(layer[theme11helpScreenFg].rotate,  90, 1, easeOutQuad, set(layer[theme11helpScreenFg].visible,false););
    tween(layer[theme11helpScreenFg].x, -100%, 1);
    tween(layer[theme11helpScreenBg].rotate, -90, 1, easeOutQuad, set(layer[theme11helpScreenBg].visible,false););
    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[theme11helpScreenFg].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="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>



<layer name="theme11menuTooltipStyle"
	keep="true"
	enabled="false"
	capture="false"
	url="%FIRSTXML%/graphics/textfield.swf"
	align="center"
	background="true"
	backgroundcolor="0xb7ae9e"
	backgroundalpha="0.8"
	border="false"
	css="color:#000000;font-family:Helvetica;font-weight:bold;font-size:14px;text-align:left;"
	height="20"
	autoheight="true"
	autowidth="auto"
	xoffset="0"
	yoffset="0"
	padding="2"
	selectable="false"
	zorder="0"
	visible="false"
	html=""
	edge="bottom"
/>
  <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);



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






      if(plugin[gyroscope],
        set(theme11DisplayGyroscopeButton, false);
        if (device.tablet, set(theme11DisplayGyroscopeButton, true););
        if (device.mobile, set(theme11DisplayGyroscopeButton, true););
        if(theme11DisplayGyroscopeButton,
          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);
      );

      if (device.desktop,
        set(layer[theme11btn_out].x, get(theme11button_pos));
        inc(theme11button_pos, 45);
        set(layer[theme11btn_in].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>


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


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

  <!-- ***************** -->
  <!-- Combobox : groups -->
  <!-- ***************** -->


<events name="combopanolistallgroupsStartTourEvents" onTourStart="set(layer[combopanolistallgroups].isStarted, true);if(layer[combopanolistallgroups].isLoaded,combopanolistallgroupsShow(););" keep="true" />


  <layer name="combopanolistallgroups"
         url="%FIRSTXML%/graphics/combobox.swf"
         alturl="%FIRSTXML%/graphics/combobox.js"
         keep="true"
         visible="false"
         zorder="2"
         align="topleft"
         x="5" y="10"
         rowcount="10"
         onloaded="combopanolistallgroupsLoaded();"
         isStarted="false"
         isLoaded="false"
         itemcount="0"
         />

  <action name="combopanolistallgroupsLoaded">
    
    layer[combopanolistallgroups].removeAll();
    set(layer[combopanolistallgroups].itemcount, 0);
    
    combopanolistallgroupsAddItem(panogroup221_title, panogroup221, pano209, false);
    combopanolistallgroupsAddItem(panogroup216_title, panogroup216, pano204, false);
    combopanolistallgroupsAddItem(panogroup211_title, panogroup211, pano199, false);
    combopanolistallgroupsAddItem(panogroup213_title, panogroup213, pano201, false);
    combopanolistallgroupsAddItem(panogroup212_title, panogroup212, pano200, false);
    combopanolistallgroupsAddItem(panogroup214_title, panogroup214, pano202, false);
    set(layer[combopanolistallgroups].isLoaded, true);
    
    if(layer[combopanolistallgroups].isStarted,
      combopanolistallgroupsShow();
    );
  </action>


  <action name="combopanolistallgroupsAddItem">
    getmessage(caption, %1);
    
    indexoftxt(found, get(caption), '&amp;');
    if(found GE 0,
      subtxt(part1, get(caption), 0, get(found));
      add(found, 5);
      subtxt(part2, get(caption), get(found), get(caption.length));
      txtadd(caption, get(part1), '&amp;', get(part2));
    );
    if(%4,
      txtadd(title, "&#x00A0;&#x00A0;&#x00A0;", get(caption));
    ,
      set(title, get(caption));
    );
    layer[combopanolistallgroups].addIdItem(%2, get(title), mainloadscene(%3));
    inc(layer[combopanolistallgroups].itemcount);
  </action>

  <events name="combopanolistallgroupsEvents"
          hidetourcontrols="combopanolistallgroupsHide();"
          showtourcontrols="combopanolistallgroupsShow();"
          onnewpano="combopanolistallgroupsOnPanorama();"
          keep="true"/>

  <action name="combopanolistallgroupsHide">
    set(layer[combopanolistallgroups].visible, false);
  </action>
  <action name="combopanolistallgroupsShow">
  if(layer[combopanolistallgroups].isLoaded,
    if (layer[combopanolistallgroups].itemcount GT 0,
      set(layer[combopanolistallgroups].visible, true);
    ,
      set(layer[combopanolistallgroups].visible, false);
    );
  ,
    set(layer[combopanolistallgroups].visible, false);
  );
  </action>

  <action name="combopanolistallgroupsOnPanorama">
    if(layer[combopanolistallgroups].isLoaded,
      combopanolistallgroupsUpdateList();
    ,
      delayedcall(0.2, combopanolistallgroupsOnPanorama);
    );
  </action>


  <action name="combopanolistallgroupsUpdateList">
    set(itemtoselect, get(scene[get(xml.scene)].group));
    layer[combopanolistallgroups].selectIdItem(get(itemtoselect));
  </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].width , 1);
      set(layer[displayedStandardImage].height, 1);
      tween(layer[displayedStandardImage].width , %5, 1, easeOutQuad);
      tween(layer[displayedStandardImage].height, %6, 1, easeOutQuad);
    ,
      set(layer[displayedStandardImage].width , %5);
      set(layer[displayedStandardImage].height, %6);
    );
  </action> 
  <events name="displayedImageObjectEvents" keep="true" onremovedisplayedobject="displayedImageObjectOnRemoveDisplayedObject"/>
  <action name="displayedImageObjectOnRemoveDisplayedObject">
    ifnot(layer[displayedStandardImage].currentCall,if(layer[displayedStandardImage].visible,resumeautorotation(forcehotspot);

      removelayer(displayedStandardImage);
    ););
  </action>


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


  <!-- Fullscreen Management -->
  <action name="exitFullScreen" devices="fullscreensupport">set(tour_fullscreen,false);set(fullscreen,false);</action>
  <action name="enterFullScreen" devices="fullscreensupport">set(tour_fullscreen,true);set(fullscreen,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="enableGyroscope">
    changeGyroscopeState(true);
  </action>
  <action name="disableGyroscope">
    changeGyroscopeState(false);
  </action>


</krpano>