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

    
  <!-- Spot Style - Default Point Spot Style 1 -->
  <style name="IconDefaultPointSpotStyle1"
         url="%FIRSTXML%/spots/_360-2-red-50s_user_defaultpoint0.png"
         visible="false"
         onhover="onhoverIconDefaultPointSpotStyle1"
         onout="onoutIconDefaultPointSpotStyle1"


         />

  <action name="onhoverIconDefaultPointSpotStyle1">
    showtooltip('hotspot');
  </action>


  <action name="onoutIconDefaultPointSpotStyle1">
    hideTooltip();



  </action>



  
  <!-- Spot Style - tv -->
  <style name="Polygontv"
           visible="false"
           bordercolor="0xadadad"
           fillcolor="0x6a6a6a"
           borderwidth="2"
           borderalpha.desktop="0.0"
           fillalpha.desktop="0.0"
           borderalpha.tablet.or.mobile="1"
           fillalpha.tablet.or.mobile="0.40000000000000002"
           capture="false"
           onhover="onhoverPolygontv"
           onover="onoverPolygontv"
           onout="onoutPolygontv"
           />
  <action name="onhoverPolygontv">
    showTooltip('hotspot');
  </action>

  <action name="onoverPolygontv">
    set(borderwidth, 2);
    set(borderalpha, 1);
    set(fillalpha, 0.40000000000000002);pauseautorotation(forcehotspot);

  </action>

  <action name="onoutPolygontv">

    set(borderwidth, 2);
    set(borderalpha, 0.0);
    set(fillalpha, 0.0);
    hideTooltip();resumeautorotation(forcehotspot);

  </action>



  
  <!-- Spot Style - Photo Ploygons -->
  <style name="PolygonPhotoPloygons"
           visible="false"
           bordercolor="0xffffff"
           fillcolor="0xffffff"
           borderwidth="1"
           borderalpha.desktop="0.0"
           fillalpha.desktop="0.0"
           borderalpha.tablet.or.mobile="1"
           fillalpha.tablet.or.mobile="0.40000000000000002"
           capture="false"
           onhover="onhoverPolygonPhotoPloygons"
           onover="onoverPolygonPhotoPloygons"
           onout="onoutPolygonPhotoPloygons"
           />
  <action name="onhoverPolygonPhotoPloygons">
    showTooltip('hotspot');
  </action>

  <action name="onoverPolygonPhotoPloygons">
    set(borderwidth, 1);
    set(borderalpha, 1);
    set(fillalpha, 0.40000000000000002);
  </action>

  <action name="onoutPolygonPhotoPloygons">

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



  
  <!-- Spot Style - Enter Tour -->
  <style name="PolygonEnterTour"
           visible="false"
           bordercolor="0xffffff"
           fillcolor="0xffffff"
           borderwidth="1"
           borderalpha="0"
           fillalpha="0"
           capture="false"
           onhover="onhoverPolygonEnterTour"
           onover="onoverPolygonEnterTour"
           onout="onoutPolygonEnterTour"
           />
  <action name="onhoverPolygonEnterTour">
    showTooltip('hotspot');
  </action>

  <action name="onoverPolygonEnterTour">
    set(bordercolor, 0xffffff);
    set(fillcolor, 0xffffff);
    set(borderalpha, 0);
    set(fillalpha, 0);
    set(borderwidth, 4);
  </action>

  <action name="onoutPolygonEnterTour">

    set(bordercolor, 0xffffff);
    set(fillcolor, 0xffffff);
    set(borderalpha, 0);
    set(fillalpha, 0);

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



<!-- ********* -->
<!-- Gyroscope -->
<!-- ********* -->



<plugin name="gyroscope"
        url="%FIRSTXML%/graphics/gyro2.js"
        keep="true"
        devices="no-desktop.and.html5"

        onunavailable="checkGyroUnavailable();"
        sensor_mode="1"
        friction="auto"
        autocalibration="true"
        touch_mode="full"
        onavailable="delayedcall(1, checkGyroAvailability(););"
        enabled="false"
        activated="false"
        />

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

<action name="planarGyroscopeTest">
  if(plugin[gyroscope],
          if(scene[get(xml.scene)].full360,
            set(sceneisfull360, false);
            sub(viewhfov, panoview.hmax, panoview.hmin);
            if (viewhfov == 360,
              sub(viewvfov, panoview.vmax, panoview.vmin);
              if (viewvfov == 180,
                set(sceneisfull360, true);
              );
            );
            if (sceneisfull360,
              set(plugin[gyroscope].camroll, true);
            ,
              set(plugin[gyroscope].camroll, false);
            );
          ,
            set(plugin[gyroscope].camroll, false);
          );
  );
</action>

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

<action name="checkGyroAvailability">
  if(plugin[gyroscope],
    if (plugin[gyroscope].isavailable,
      ifnot(tour_firstlittleplanet,
        
        switch(plugin[gyroscope].enabled);
        set(plugin[gyroscope].activated,true);
        
        set(tour_gyroscopedevices, true);
        events.dispatch(ongyroscopeavailable);
      ,
        delayedcall(1, checkGyroAvailability(););
      );
    ,
      set(tour_gyroscopedevices, false);
    );
    if (plugin[gyroscope].enabled, events.dispatch(ongyroscopeon);, events.dispatch(ongyroscopeoff););
  ,
    checkGyroUnavailable();
  );
</action>

<action name="checkGyroUnavailable">
  set(plugin[gyroscope].activated, false);
  set(plugin[gyroscope].enabled, false);
  set(tour_gyroscopedevices, false);
  events.dispatch(ongyroscopeunavailable);
</action>

<!-- ********** -->
<!-- Description -->
<!-- id : description -->
<!-- ********** -->

<ptplugin name="description" canStart="false" newPano="false" openatstart="true" mode="panorama" startMethod="showDescription_description" engine="kolorArea">
	<settings>
		<option name="position" value="left" 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="background_color" value="000000" type="string" />
		<option name="background_alpha" value="1" type="float" />
		<option name="topleft_radius" value="1" type="int" />
		<option name="topright_radius" value="1" type="int" />
		<option name="bottomleft_radius" value="1" type="int" />
		<option name="bottomright_radius" value="1" type="int" />
		<option name="area_border_width" value="2" type="int" />
		<option name="area_border_color" value="f2f2f2" type="string" />
		<option name="area_border_alpha" value="1" type="float" />
		<option name="padding" value="15" type="int" />
		<option name="display_title" value="true" type="bool" />
		<option name="title" value="descriptiondescription_title" type="string" />
		<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="ffffff" type="string" />
		<option name="close_displayed" value="true" type="bool" />
		<option name="close_text" value="descriptiondisplay_close_text" type="string" />

		<option name="overlay_displayed" value="false" type="bool" />
		<option name="overlay_color" value="000000" type="string" />
		<option name="overlay_alpha" value="0.50000762951094835" type="float" />

		<option name="area_width" value="20" type="int" />
		<option name="area_height" value="100" 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="refresh_content" value="true" type="bool" />
		<option name="close_callback" value="invokeKrFunction('closeKolorAreaCallback_description')" type="string" />
		<option name="close_on_click" value="false" type="bool" />
		<option name="open_callback" value="invokeKrFunction('openKolorAreaCallback_description')" type="string" />
		<option name="zorder" value="2" type="int" />
		<option name="use_i18n" value="true" type="bool" />
	</settings>
</ptplugin>

<action name="kolorAreaJsReady_description">
	set(ptplugin[description].jsready, true);

</action>

<action name="updateTitle_description">
	js(invokePluginFunction(description, changeTitle, descriptiondescription_title));
</action>

<action name="openKolorArea_description">
	ifnot(ptplugin[description].isOpen,
		set(ptplugin[description].isOpen, true);
		
		js(showKolorArea(description, get(ptplugin[description].descID)));
		events.dispatch(onremovedisplayedobject);
	);
</action>

<action name="closeKolorArea_description">
	if(ptplugin[description].isOpen,
		js(invokePluginFunction(description, closeKolorArea));
	);
</action>

<action name="toggleKolorArea_description">
	if(ptplugin[description].isOpen,
		closeKolorArea_description();
	,
		openKolorArea_description();
	);
</action>

<action name="closeKolorAreaCallback_description">
	set(ptplugin[description].isOpen, false);
	if(tour_displayinfo,hideTourInfo();

	);
</action>


<action name="openKolorAreaCallback_description">
	updateTitle_description();
</action>

<action name="showKolorArea_description">
	ifnot(ptplugin[description].startMethod == "",
		delayedcall(0,get(ptplugin[description].startMethod));
	,
		set(ptplugin[description].isOpen, true);
		
		js(invokePluginFunction(description, showKolorArea, %1));
		events.dispatch(onremovedisplayedobject);
	);
</action>
	
<action name="hideKolorArea_description">
	
	set(ptplugin[description].isOpen, false);
	js(invokePluginFunction(description, hideKolorArea, %1));
</action>

<action name="openDescription_description">
	openKolorArea_description();
</action>

<action name="openSpotDescription_description">
	set(ptplugin[description].descID, %1);
	openKolorArea_description();
</action>

<action name="closeDescription_description">
	set(ptplugin[description].currentGroup, false);
	if(%1,
		set(restore_description, true);
	,
		set(restore_description, false);
	);
	closeKolorArea_description();
</action> 

<action name="showDescription_description">
	if(ptplugin[description].canStart,
		set(ptplugin[description].descID, get(scene[get(xml.scene)].descriptionid));
		if(ptplugin[description].descID == null,
			set(ptplugin[description].descID, "");
		);
		if(ptplugin[description].descID != "",
			openDescription_description();
		,
			hideKolorArea_description(false);
		);
		set(ptplugin[description].startMethod, "");
	);
</action>


<action name="refreshPanoDescription_description">
	set(ptplugin[description].descID, get(scene[get(xml.scene)].descriptionid));
	if(ptplugin[description].descID == null,
		set(ptplugin[description].descID, "");
	);
	if(ptplugin[description].descID != "",
		if(ptplugin[description].isOpen,
			js(invokePluginFunction(description, updateKolorArea, get(ptplugin[description].descID)));
			updateTitle_description();
		,
			if(restore_description,
				showDescription_description();
			);
		);
	,
		if(tour_displayinfo,
			delayedcall(0.1,showTourInfo();
);
		);
		closeDescription_description(get(ptplugin[description].isOpen));
	);
</action>

<action name="onNewPano_description">
	if(ptplugin[description].newPano,
		if(ptplugin[description].startMethod == "",
			if(ptplugin[description].isOpen,
				refreshPanoDescription_description();
			,
				if(tour_displayinfo,
				showDescription_description();
				,
				refreshPanoDescription_description();
				);
			);
		);
	);
	set(ptplugin[description].newPano, true);
</action>

<action name="changeLanguage_description">
	if(ptplugin[description].jsready,
		stopdelayedcall(delay_description);
		js(invokePluginFunction(description, changeLanguage, true));
	,
		delayedcall(delay_description, 0.1, changeLanguage_description(););
	);
</action>

<events name="kolorAreaEvents_description" 
	keep="true"
	onTourStart="set(ptplugin[description].canStart, true);if(ptplugin[description].openatstart,showTourInfo();
);"
	onshowtourinfo="if(tour_displayinfo,showDescription_description(););"
	onhidetourinfo="if(ptplugin[description].isOpen,closeDescription_description(false););"
	onremovepano="if(ptplugin[description].isOpen,hideTourInfo();
);"
	changetourlanguage="changeLanguage_description();"
/>

<!-- ********** -->
<!-- Footer -->
<!-- id : footer -->
<!-- ********** -->

  <layer name="footer"
         keep="true"
         url="%FIRSTXML%/graphics/footer/footer.png" 
         align="bottom"
         x="0"
         y="0"
         zorder="3"
         enabled="false"
         capture="true"
         visible="false"
         height="75%"
         width="100%"
         accuracy="1"
         />

  <events name="footerevents" 
    onTourStart="showfooter();"
    keep="true" />

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

<!-- ********** -->
<!-- Social Share -->
<!-- id : socialShare -->
<!-- ********** -->

<ptplugin name="socialShare" engine="kolorBox">
	<settings>
		<option name="position" value="bottomright" type="string" />
		<option name="margin_x" value="10" type="int" />
		<option name="margin_y" value="10" type="int" />
		<option name="external_padding" value="15" type="int" />
		<option name="animate" value="false" type="bool" />
		<option name="draggable_box" value="false" type="bool" />
		<option name="container_auto_size" value="true" type="bool" />
		<option name="container_color" value="000000" type="string" />
		<option name="container_alpha" value="0" type="float" />
		<option name="container_topleft_border_radius" value="0" type="int" />
		<option name="container_topright_border_radius" value="0" type="int" />
		<option name="container_bottomleft_border_radius" value="0" type="int" />
		<option name="container_bottomright_border_radius" value="0" type="int" />
		<option name="container_border_width" value="0" type="int" />
		<option name="container_border_color" value="ffffff" type="string" />
		<option name="container_border_alpha" value="1" type="float" />
		<option name="overlay_displayed" value="false" type="bool" />
		<option name="overlay_color" value="000000" type="string" />
		<option name="overlay_alpha" value="0.50000762951094835" type="float" />

		<option name="social_btn" value="facebook#twitter#google#linkedin#email" type="string" />
		<option name="social_orientation" value="horizontal" type="string" />
		<option name="social_btn_size" value="36" type="int" />
		<option name="inner_margin" value="10" type="int" />
		<option name="social_url" value="socialSharespecific_url" type="string" />
		
		
		<option name="title_displayed" value="false" type="bool" />
		<option name="caption_displayed" value="false" type="bool" />
		<option name="close_displayed" value="true" type="bool" />
		<option name="close_position" value="topright" type="string" />
		<option name="close_text" value="socialShareclose_text" type="string" />

		<option name="close_callback" value="invokeKrFunction('closeKolorBoxCallback_socialShare')" type="string" />
		<option name="zorder" value="4" type="int" />
		<option name="use_i18n" value="true" type="bool" />
	</settings>
	<internaldata>
		
	</internaldata>
</ptplugin>

<action name="kolorBoxJsReady_socialShare">
	set(ptplugin[socialShare].jsready, true);

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

</action>

<action name="startOpenSocialShare_socialShare">
	if(ptplugin[socialShare].jsready,
		showSocialShare_socialShare();
	,
		delayedcall(1.0,startOpenSocialShare_socialShare(););
	);
</action>


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

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

<action name="toggleSocialShare_socialShare">
	js(invokePluginFunction(socialShare, toggleKolorBox, %1));
</action>


<action name="closeKolorBox_socialShare">
	js(invokePluginFunction(socialShare, closeKolorBox));
</action>

<action name="closeKolorBoxCallback_socialShare">
	resumeautorotation(forceplugin);

	if(ptplugin[socialShare].autorotateBlocked,if(tour_autorotation_openatstartplugin GT 0,dec(tour_autorotation_openatstartplugin);set(ptplugin[socialShare].autorotateBlocked,false);););
	set(ptplugin[socialShare].isOpen, false);
</action>

<action name="changeLanguage_socialShare">
	if(ptplugin[socialShare].jsready,
		js(invokePluginFunction(socialShare, changeLanguage));
	);
</action>

<events name="kolorBoxEvents_socialShare" 
	keep="true"
	onsharetour="showSocialShare_socialShare();" 
	onTourStart="startOpenSocialShare_socialShare();"
	
	changetourlanguage="changeLanguage_socialShare();"
	/>

<!-- ********** -->
<!-- Header -->
<!-- id : header -->
<!-- ********** -->

  <layer name="header"
         keep="true"
         url="%FIRSTXML%/graphics/header/header_without_logo.png" 
         align="top"
         x="0"
         y="0"
         zorder="5"
         enabled="false"
         capture="true"
         visible="false"
         height="75%"
         width="100%"
         accuracy="1"
         />

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

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

<!-- ********** -->
<!-- Urban Control Bar -->
<!-- id : controlBar_urban -->
<!-- ********** -->

  <krpano controlBar_urbanbarbuilt="false" controlBar_urbanbackgroundwidthwhenclosed="0" controlBar_urbanbackgroundwidthwhenopened="0" controlBar_urbanIsOpened="false" />
  <events name="controlBar_urbanbarevents" 
    onxmlcomplete="controlBar_urbanbuildMenuBar();" 


    keep="true" />



  <action name="controlBar_urbanbuildMenuBar">
    ifnot (controlBar_urbanbarbuilt, controlBar_urbanbuildMenu(); set(controlBar_urbanbarbuilt, true););
  </action>

  <style name="controlBar_urban_btn_style"
         keep="true"
         edge="right"
         align="right"
         x="0" y="0"
         height="40" width="40"
         crop="0|0|50|50"
         onovercrop="0|50|50|50"
         ondowncrop="0|100|50|50"
         onhover="showTooltip('plugin', controlBar_urbanmenuTooltipStyle, bottom);"
         onout="hideTooltip();"
         />
<style name="controlBar_urban_btn_style_off"
         keep="true"
         edge="right"
         align="right"
         x="0" y="0"
         height="40" width="40"
         onhover="showTooltip('plugin', controlBar_urbanmenuTooltipStyle, bottom);"
         onout="hideTooltip();"
         />

    <layer name="controlBar_urban_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="controlBar_urbanbtn_ctrlmode_move_to"
            url="%FIRSTXML%/graphics/urbancontrolbar/btn_move_to.png"
            style="controlBar_urban_btn_style"
            tooltip="controlBar_urbanctrlmodeMoveTip"
            onclick="setControlModeMoveTo();
"
            visible="false"
            devices="desktop"
            />
    <layer name="controlBar_urbanbtn_ctrlmode_drag_to"
            url="%FIRSTXML%/graphics/urbancontrolbar/btn_drag_to.png"
            style="controlBar_urban_btn_style"
            tooltip="controlBar_urbanctrlmodeDragTip"
            onclick="setControlModeDragTo();
"
            visible="false"
            devices="desktop"
            />

    <layer name="controlBar_urbanbtn_in"
            url="%FIRSTXML%/graphics/urbancontrolbar/btn_zoom_in.png"
            ondown="viewControlZoomIn(false);"
            onup="viewControlZoomStop();
"
            style="controlBar_urban_btn_style"
            tooltip="controlBar_urbanzoomInTip"
            devices="desktop"
            visible="false"
            />
    <layer name="controlBar_urbanbtn_out"
            url="%FIRSTXML%/graphics/urbancontrolbar/btn_zoom_out.png"
            ondown="viewControlZoomOut(false);
"
            onup="viewControlZoomStop();
"
            style="controlBar_urban_btn_style"
            tooltip="controlBar_urbanzoomOutTip"
            devices="desktop"
            visible="false"
            />

    <layer name="controlBar_urbanbtn_left"
            url="%FIRSTXML%/graphics/urbancontrolbar/btn_move_left.png"
            ondown="viewControlMoveLeft(false);
"
            onup="viewControlMoveHoriStop();
"
            style="controlBar_urban_btn_style"
            tooltip="controlBar_urbanmoveLeftTip"
            devices="desktop"
            visible="false"
            />
    <layer name="controlBar_urbanbtn_right"
            url="%FIRSTXML%/graphics/urbancontrolbar/btn_move_right.png"
            ondown="viewControlMoveRight(false);
"
            onup="viewControlMoveHoriStop();
"
            style="controlBar_urban_btn_style"
            tooltip="controlBar_urbanmoveRightTip"
            devices="desktop"
            visible="false"
            />
    <layer name="controlBar_urbanbtn_up"
            url="%FIRSTXML%/graphics/urbancontrolbar/btn_move_up.png"
            ondown="viewControlMoveUp(false);
"
            onup="viewControlMoveVertStop();
"
            style="controlBar_urban_btn_style"
            tooltip="controlBar_urbanmoveUpTip"
            devices="desktop"
            visible="false"
            />
    <layer name="controlBar_urbanbtn_down"
            url="%FIRSTXML%/graphics/urbancontrolbar/btn_move_down.png"
            ondown="viewControlMoveDown(false);
"
            onup="viewControlMoveVertStop();
"
            style="controlBar_urban_btn_style"
            tooltip="controlBar_urbanmoveDownTip"
            devices="desktop"
            visible="false"
            x="0"
            y="0"
            />


    <layer name="controlBar_urbanbtn_sound_on"
            url="%FIRSTXML%/graphics/urbancontrolbar/btn_start_sound.png"
            onclick="playTourSounds();
"
            style="controlBar_urban_btn_style"
            visible="false"
            tooltip="controlBar_urbansoundsOnTip"
            />
    <layer name="controlBar_urbanbtn_sound_off"
            url="%FIRSTXML%/graphics/urbancontrolbar/btn_stop_sound.png"
            onclick="stopTourSounds();
"
            style="controlBar_urban_btn_style"
            visible="false"
            tooltip="controlBar_urbansoundsOffTip"
            />


    <layer name="controlBar_urbanbtn_prev_pano"
            url="%FIRSTXML%/graphics/urbancontrolbar/btn_previous_scene.png"
            onclick="loadPreviousScene();
"
            style="controlBar_urban_btn_style"
            tooltip="controlBar_urbanprevSceneTip"
            visible="false"
            />
    <layer name="controlBar_urbanbtn_next_pano"
            url="%FIRSTXML%/graphics/urbancontrolbar/btn_next_scene.png"
            onclick="loadNextScene();
"
            style="controlBar_urban_btn_style"
            tooltip="controlBar_urbannextSceneTip"
            visible="false"
            />


    <layer name="controlBar_urbanbtn_share"
            url="%FIRSTXML%/graphics/urbancontrolbar/btn_share.png"
            onclick="shareTour();
"
            style="controlBar_urban_btn_style"
            visible="false"
            tooltip="controlBar_urbanshareTip"
            />


    <layer name="controlBar_urbanbtn_openfs"
            url="%FIRSTXML%/graphics/urbancontrolbar/btn_enter_fs.png"
            onclick="enterFullscreen();
"
            style="controlBar_urban_btn_style"
            visible="false"
            devices="fullscreensupport"
            tooltip="controlBar_urbanopenFsTip"
            />
    <layer name="controlBar_urbanbtn_closefs"
            url="%FIRSTXML%/graphics/urbancontrolbar/btn_close_fs.png"
            onclick="exitFullscreen();
"
            style="controlBar_urban_btn_style"
            visible="false"
            devices="fullscreensupport"
            tooltip="controlBar_urbancloseFsTip"
            />

    <layer name="controlBar_urbanbtn_autorotate_on"
            url="%FIRSTXML%/graphics/urbancontrolbar/btn_start_autorotation.png"
            onclick="resumeautorotation();
"
            style="controlBar_urban_btn_style"
            visible="false"
            tooltip="controlBar_urbanautorotateOnTip"
            />
    <layer name="controlBar_urbanbtn_autorotate_off"
            url="%FIRSTXML%/graphics/urbancontrolbar/btn_stop_autorotation.png"
            onclick="pauseautorotation();
"
            style="controlBar_urban_btn_style"
            visible="false"
            tooltip="controlBar_urbanautorotateOffTip"
            />



    <layer name="controlBar_urbanbtn_display_help"
            url="%FIRSTXML%/graphics/urbancontrolbar/btn_help.png"
            onclick="controlBar_urbandisplayHelp();"
            style="controlBar_urban_btn_style"
            devices="desktop"
            visible="false"
            tooltip="controlBar_urbandisplayHelpTip"
            />
    <layer name="controlBar_urbanbtn_close_help"
            url="%FIRSTXML%/graphics/urbancontrolbar/btn_help.png"
            onclick="controlBar_urbancloseHelp();"
            style="controlBar_urban_btn_style"
            visible="false"
            devices="desktop"
            tooltip="controlBar_urbanhideHelpTip"
            />



    <layer name="controlBar_urbanbtn_hidecontrols"
           url="%FIRSTXML%/graphics/urbancontrolbar/btn_hide_controls.png"
           style="controlBar_urban_btn_style"
           onclick="controlBar_urbanhideMenuControls();hideTourControls();
"
           visible="false"
           tooltip="controlBar_urbanhideControlsTip"
           />
    <layer name="controlBar_urbanbtn_showcontrols"
           url="%FIRSTXML%/graphics/urbancontrolbar/btn_show_controls.png"
           style="controlBar_urban_btn_style"
           onclick="controlBar_urbanshowMenuControls();showTourControls();
"
           tooltip="controlBar_urbandisplayControlsTip"
           visible="false"
           />
 </layer>





  <events name="controlBar_urbancontrolmodechangedevent" oncontrolmodechanged="controlBar_urbanupdateControlModeButtons();" keep="true"/>
	<action name="controlBar_urbanHideControlModeButtons">
		set(layer[controlBar_urbanbtn_ctrlmode_move_to].visible, false);
		set(layer[controlBar_urbanbtn_ctrlmode_drag_to].visible, false);
	</action>
	<action name="controlBar_urbanShowControlModeButtons">
		if (tour_controlmodemousetype == "moveto",
			set(layer[controlBar_urbanbtn_ctrlmode_drag_to].visible, true);
			set(layer[controlBar_urbanbtn_ctrlmode_move_to].visible, false);
		,
			set(layer[controlBar_urbanbtn_ctrlmode_move_to].visible, true);
			set(layer[controlBar_urbanbtn_ctrlmode_drag_to].visible, false);
		);
	</action>
	<action name="controlBar_urbanupdateControlModeButtons">
	if (device.desktop,
		if (controlBar_urbanIsOpened,
			controlBar_urbanShowControlModeButtons();
		,
			controlBar_urbanHideControlModeButtons();
		);
	,
		controlBar_urbanHideControlModeButtons();
	);
	</action>


  <action name="controlBar_urbanhideMenuControls">
    set(controlBar_urbanIsOpened, false);
    set(layer[controlBar_urbanbtn_hidecontrols].visible, false);
    set(layer[controlBar_urbanbtn_showcontrols].visible, true);
if (scene.count GT 1,
	set(layer[controlBar_urbanbtn_next_pano].visible, false);
	set(layer[controlBar_urbanbtn_prev_pano].visible, false);
);

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

if (device.desktop,
	set(layer[controlBar_urbanbtn_in].visible, false);
	set(layer[controlBar_urbanbtn_out].visible, false);
);
if (device.desktop,
	set(layer[controlBar_urbanbtn_up].visible, false);
	set(layer[controlBar_urbanbtn_down].visible, false);
);
if (device.desktop,
	set(layer[controlBar_urbanbtn_left].visible, false);
	set(layer[controlBar_urbanbtn_right].visible, false);
);
	controlBar_urbanupdateFullscreenButtons();
	controlBar_urbanupdateHelpButtons();


	controlBar_urbanupdateAutorotationButtons();

	controlBar_urbanupdateSoundButtons();

	controlBar_urbanupdateControlModeButtons();



  set(layer[controlBar_urban_menu_bg].width, get(controlBar_urbanbackgroundwidthwhenclosed));

  set(layer[controlBar_urban_menu_bg].visible, true);
  </action>
  <action name="controlBar_urbanshowMenuControls">
    set(controlBar_urbanIsOpened, true);
    set(layer[controlBar_urbanbtn_hidecontrols].visible, true);
    set(layer[controlBar_urbanbtn_showcontrols].visible, false);
	set(layer[controlBar_urban_menu_bg].visible, true);
if (scene.count GT 1,
	set(layer[controlBar_urbanbtn_next_pano].visible, true);
	set(layer[controlBar_urbanbtn_prev_pano].visible, true);
);

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

if (device.desktop,
	set(layer[controlBar_urbanbtn_in].visible, true);
	set(layer[controlBar_urbanbtn_out].visible, true);
);
if (device.desktop,
	set(layer[controlBar_urbanbtn_up].visible, true);
	set(layer[controlBar_urbanbtn_down].visible, true);
);
if (device.desktop,
	set(layer[controlBar_urbanbtn_left].visible, true);
	set(layer[controlBar_urbanbtn_right].visible, true);
);
	controlBar_urbanupdateFullscreenButtons();
	controlBar_urbanupdateHelpButtons();


	controlBar_urbanupdateAutorotationButtons();

	controlBar_urbanupdateSoundButtons();

	controlBar_urbanupdateControlModeButtons();



    set(layer[controlBar_urban_menu_bg].width, get(controlBar_urbanbackgroundwidthwhenopened));
  </action>

	<layer name="controlBar_urbanhelpScreenBg" align="center" keep="true" onclick="controlBar_urbancloseHelp();" url="%FIRSTXML%/graphics/urbancontrolbar/help_screen_bg.png" visible="false" rotate="-25" height="50%" width="prop" zorder="97">
		<layer name="controlBar_urbanhelpScreenShadow" align="center" keep="true" onclick="controlBar_urbancloseHelp();" url="%FIRSTXML%/graphics/urbancontrolbar/help_screen_shadow.png"   rotate="12"  height="100%" width="prop" x="0" zorder="0" blendmode="multiply"/>
		<layer name="controlBar_urbanhelpScreenMouse" align="center" keep="true" onclick="controlBar_urbancloseHelp();" url="%FIRSTXML%/graphics/urbancontrolbar/help_screen_mouse.png" rotate="25"  height="100%" width="prop" x="0" zorder="1">
			<layer name="controlBar_urbanhelpScreenKeyboard" align="center" keep="true" onclick="controlBar_urbancloseHelp();" url="%FIRSTXML%/graphics/urbancontrolbar/help_screen_keyboard.png" rotate="-25" height="100%" width="prop" x="0">
				<layer name="controlBar_urbanhelpScreenFg" align="center" keep="true" onclick="controlBar_urbancloseHelp();" url="%FIRSTXML%/graphics/urbancontrolbar/help_screen_outline.png" rotate="45" height="100%" width="prop" x="0" onover="tween(rotate, 0, 0.2)" onout="tween(rotate, 2, 0.2)" displayed="false" />
			</layer>
		</layer>
	</layer>

	<action name="controlBar_urbandisplayHelp">
	if (device.desktop,
		set(layer[controlBar_urbanhelpScreenFg].displayed, true);
		set(layer[controlBar_urbanhelpScreenBg].visible, true);
		set(layer[controlBar_urbanhelpScreenShadow].visible, true);
		set(layer[controlBar_urbanhelpScreenMouse].visible, true);
		set(layer[controlBar_urbanhelpScreenKeyboard].visible, true);
		set(layer[controlBar_urbanhelpScreenFg].visible , true);
		tween(layer[controlBar_urbanhelpScreenBg].rotate, 0, 1);
		tween(layer[controlBar_urbanhelpScreenShadow].rotate, 0, 1);
		tween(layer[controlBar_urbanhelpScreenMouse].rotate, 0, 1);
		tween(layer[controlBar_urbanhelpScreenKeyboard].rotate, 0, 1);
		tween(layer[controlBar_urbanhelpScreenFg].rotate, 2, 1);
		controlBar_urbanupdateHelpButtons();
	);
	</action>
	<action name="controlBar_urbancloseHelp">
	if (device.desktop,
		set(layer[controlBar_urbanhelpScreenFg].displayed, false);
		tween(layer[controlBar_urbanhelpScreenKeyboard].rotate, -25, 1, easeOutQuad, set(layer[controlBar_urbanhelpScreenKeyboard].visible,false););
		tween(layer[controlBar_urbanhelpScreenMouse].rotate, 25, 1, easeOutQuad, set(layer[controlBar_urbanhelpScreenMouse].visible,false););
		tween(layer[controlBar_urbanhelpScreenShadow].rotate, 12, 1, easeOutQuad, set(layer[controlBar_urbanhelpScreenShadow].visible,false););
		tween(layer[controlBar_urbanhelpScreenBg].rotate, -25, 1, easeOutQuad, set(layer[controlBar_urbanhelpScreenBg].visible,false););
		tween(layer[controlBar_urbanhelpScreenFg].rotate, 45, 1, easeOutQuad, set(layer[controlBar_urbanhelpScreenFg].visible,false););
		controlBar_urbanupdateHelpButtons();
	);
	</action>
	<action name="controlBar_urbanHideHelpButtons">
		set(layer[controlBar_urbanbtn_display_help].visible, false);
		set(layer[controlBar_urbanbtn_close_help].visible, false);
	</action>
	<action name="controlBar_urbanShowHelpButtons">
		if (layer[controlBar_urbanhelpScreenFg].displayed,
			set(layer[controlBar_urbanbtn_close_help].visible, true);
			set(layer[controlBar_urbanbtn_display_help].visible, false);
		,
			set(layer[controlBar_urbanbtn_display_help].visible, true);
			set(layer[controlBar_urbanbtn_close_help].visible, false);
		);
	</action>
	<action name="controlBar_urbanupdateHelpButtons">
	if (device.desktop,
		if (controlBar_urbanIsOpened,
			controlBar_urbanShowHelpButtons();
		,
			controlBar_urbanHideHelpButtons();
		);
	,
		controlBar_urbanHideHelpButtons();
	);
	</action>



  <events name="controlBar_urbanmenufullscreenchangeevent"
          onenterfullscreen="controlBar_urbanupdateFullscreenButtons();"
          onexitfullscreen="controlBar_urbanupdateFullscreenButtons();"
          keep="true"/>
	<action name="controlBar_urbanHideFullscreenButtons">
		set(layer[controlBar_urbanbtn_openfs].visible , false);
		set(layer[controlBar_urbanbtn_closefs].visible, false);
	</action>
	<action name="controlBar_urbanShowFullscreenButtons">
		if (device.fullscreensupport,
			if(tour_fullscreen,
				set(layer[controlBar_urbanbtn_openfs].visible , false);
				set(layer[controlBar_urbanbtn_closefs].visible, true);
			,
				set(layer[controlBar_urbanbtn_openfs].visible ,true);
				set(layer[controlBar_urbanbtn_closefs].visible,false);
			);
		,
			controlBar_urbanHideFullscreenButtons();
		);
	</action>
	<action name="controlBar_urbanupdateFullscreenButtons">
		if (controlBar_urbanIsOpened,
			controlBar_urbanShowFullscreenButtons();
		,
			controlBar_urbanHideFullscreenButtons();
		);
	</action>

	<events name="controlBar_urbanAutorotationEvents"
		onstartautorotation="controlBar_urbanupdateAutorotationButtons();"
		onresumeautorotation="controlBar_urbanupdateAutorotationButtons();"
		onstopautorotation="controlBar_urbanupdateAutorotationButtons();"
		onpauseautorotation="controlBar_urbanupdateAutorotationButtons();"
		keep="true"/>
	<action name="controlBar_urbanHideAutorotationButtons">
		set(layer[controlBar_urbanbtn_autorotate_off].visible, false);
		set(layer[controlBar_urbanbtn_autorotate_on].visible , false);
	</action>
	<action name="controlBar_urbanShowAutorotationButtons">
		if(autorotate.enabled == false,
			set(layer[controlBar_urbanbtn_autorotate_off].visible, false);
			set(layer[controlBar_urbanbtn_autorotate_on].visible , true);
		,
			set(layer[controlBar_urbanbtn_autorotate_off].visible, true);
			set(layer[controlBar_urbanbtn_autorotate_on].visible , false);
		);
	</action>
	<action name="controlBar_urbanupdateAutorotationButtons">
		if (controlBar_urbanIsOpened,
			controlBar_urbanShowAutorotationButtons();
		,
			controlBar_urbanHideAutorotationButtons();
		);
	</action>


  <events name="controlBar_urbanplaystopsoundsevent" playtoursoundsevent="controlBar_urbanupdateSoundButtons();" stoptoursoundsevent="controlBar_urbanupdateSoundButtons();" keep="true"/>
	<action name="controlBar_urbanHideSoundButtons">
		set(layer[controlBar_urbanbtn_sound_off].visible, false);
		set(layer[controlBar_urbanbtn_sound_on].visible , false);
	</action>
	<action name="controlBar_urbanShowSoundButtons">
		if (tour_soundson == false,
			set(layer[controlBar_urbanbtn_sound_off].visible, false);
			set(layer[controlBar_urbanbtn_sound_on].visible , true);
		,
			set(layer[controlBar_urbanbtn_sound_off].visible, true);
			set(layer[controlBar_urbanbtn_sound_on].visible , false);
		);
	</action>
	<action name="controlBar_urbanupdateSoundButtons">
		if (controlBar_urbanIsOpened,
			controlBar_urbanShowSoundButtons();
		,
			controlBar_urbanHideSoundButtons();
		);
	</action>


<layer name="controlBar_urbanmenuTooltipStyle"
	keep="true"
	enabled="false"
	capture="false"
	url="%FIRSTXML%/graphics/textfield.swf"
	align="center"
	background="false"
	border="false"
	css="color:#ffffff;font-family:Arial;font-weight:bold;font-size:16px;text-align:left;"
	height="20"
	autoheight="true"
	autowidth="auto"
	padding="2"
	xoffset="0"
	yoffset="0"
	selectable="false"
	zorder="0"
	visible="false"
	html=""
	edge="bottom"
/>

  <action name="controlBar_urbanbuildMenu">
    
    set(controlBar_urbanbutton_pos, 0);

	set(controlBar_urbanbackgroundwidthwhenclosed, 40);
    set(layer[controlBar_urbanbtn_hidecontrols].x, get(controlBar_urbanbutton_pos));
    set(layer[controlBar_urbanbtn_showcontrols].x, get(controlBar_urbanbutton_pos));
    inc(controlBar_urbanbutton_pos, 45);



      if (device.desktop,
        set(layer[controlBar_urbanbtn_display_help].x, get(controlBar_urbanbutton_pos));
        set(layer[controlBar_urbanbtn_close_help].x  , get(controlBar_urbanbutton_pos));
        inc(controlBar_urbanbutton_pos, 45);
      );

      if (device.fullscreensupport,
        set(layer[controlBar_urbanbtn_openfs].x , get(controlBar_urbanbutton_pos));
        set(layer[controlBar_urbanbtn_closefs].x, get(controlBar_urbanbutton_pos));
        inc(controlBar_urbanbutton_pos, 45);
      );


      set(layer[controlBar_urbanbtn_share].x, get(controlBar_urbanbutton_pos));
      inc(controlBar_urbanbutton_pos, 45);


      set(layer[controlBar_urbanbtn_autorotate_on].x , get(controlBar_urbanbutton_pos));
      set(layer[controlBar_urbanbtn_autorotate_off].x, get(controlBar_urbanbutton_pos));
      inc(controlBar_urbanbutton_pos, 45);


      set(layer[controlBar_urbanbtn_sound_on].x , get(controlBar_urbanbutton_pos));
      set(layer[controlBar_urbanbtn_sound_off].x, get(controlBar_urbanbutton_pos));
      inc(controlBar_urbanbutton_pos, 45);


    if (device.desktop,
      set(layer[controlBar_urbanbtn_ctrlmode_drag_to].x, get(controlBar_urbanbutton_pos));
      set(layer[controlBar_urbanbtn_ctrlmode_move_to].x, get(controlBar_urbanbutton_pos));
      inc(controlBar_urbanbutton_pos, 45);
    );





      if (device.desktop,
        set(layer[controlBar_urbanbtn_right].x, get(controlBar_urbanbutton_pos));
        inc(controlBar_urbanbutton_pos, 45);
        set(layer[controlBar_urbanbtn_left].x, get(controlBar_urbanbutton_pos));
        inc(controlBar_urbanbutton_pos, 45);
      );

      if (device.desktop,
        set(layer[controlBar_urbanbtn_down].x, get(controlBar_urbanbutton_pos));
        inc(controlBar_urbanbutton_pos, 45);
        set(layer[controlBar_urbanbtn_up].x, get(controlBar_urbanbutton_pos));
        inc(controlBar_urbanbutton_pos, 45);
      );
      if (device.desktop,
        set(layer[controlBar_urbanbtn_out].x, get(controlBar_urbanbutton_pos));
        inc(controlBar_urbanbutton_pos, 45);
        set(layer[controlBar_urbanbtn_in].x, get(controlBar_urbanbutton_pos));
        inc(controlBar_urbanbutton_pos, 45);
      );

      if (scene.count GT 1,
        set(layer[controlBar_urbanbtn_next_pano].x, get(controlBar_urbanbutton_pos));
        inc(controlBar_urbanbutton_pos, 45);
        set(layer[controlBar_urbanbtn_prev_pano].x, get(controlBar_urbanbutton_pos));
        inc(controlBar_urbanbutton_pos, 45);
      );



      dec(controlBar_urbanbutton_pos, 5);

      set(controlBar_urbanbackgroundwidthwhenopened, get(controlBar_urbanbutton_pos));


      set(layer[controlBar_urban_menu_bg].width, get(controlBar_urbanbackgroundwidthwhenopened));
	
	

    </action>

	<events name="controlBar_urbanStartTourEvents" onTourStart="controlBar_urbanCallOnStartTour();" keep="true" />
	
	<action name="controlBar_urbanCallOnStartTour">
		
		controlBar_urbanhideMenuControls();
	</action>



<!-- ********** -->
<!-- Panorama Combobox -->
<!-- id : panoramacombobox -->
<!-- ********** -->

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


  <layer name="panoramacombobox"
         url="%FIRSTXML%/graphics/combobox.swf"
         alturl="%FIRSTXML%/graphics/combobox.js"
         keep="true"
         visible="false"
         zorder="7"
         align="topright"
         x="5" y="10"
         rowcount="10"
         onloaded="panoramacomboboxLoaded();"
         isStarted="false"
         isLoaded="false"
         itemcount="0"
         itemfontsize.normal="14"
         itempadding.normal="8"
         itemfontsize.mobile="11"
         itempadding.mobile="5"
         cbdesignscale.mobile="1"
         />

  <action name="panoramacomboboxLoaded">
    
    layer[panoramacombobox].removeAll();
    set(layer[panoramacombobox].itemcount, 0);
    
    panoramacomboboxAddItem(pano9_title, pano9, pano9, false);
    panoramacomboboxAddItem(pano11_title, pano11, pano11, false);
    set(layer[panoramacombobox].isLoaded, true);
    
  </action>


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

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

    panoramacomboboxAddItem(pano9_title, pano9, pano9, false);
    panoramacomboboxAddItem(pano11_title, pano11, pano11, false);

    panoramacomboboxUpdateList();
  </action>

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

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

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


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


<!-- ********** -->
<!-- Gallery -->
<!-- id : gallery -->
<!-- ********** -->

<ptplugin name="gallery" engine="kolorBox">
	<settings>
		<option name="position" value="center" type="string" />
		<option name="margin_x" value="0" type="int" />
		<option name="margin_y" value="0" type="int" />
		<option name="external_padding" value="15" type="int" />
		<option name="draggable_box" value="false" type="bool" />
		<option name="slideshow_autoplay" value="false" type="bool" />
		<option name="slideshow" value="5000" type="int" />
		<option name="container_auto_size" value="true" type="bool" />
		<option name="container_width" value="100" type="int" />
		<option name="container_width_unit" value="percent" type="string" />
		<option name="container_height" value="100" type="int" />
		<option name="container_height_unit" value="percent" type="string" />
		<option name="container_color" value="000000" type="string" />
		<option name="container_alpha" value="0.80000000000000004" type="float" />
		<option name="container_topleft_border_radius" value="15" type="int" />
		<option name="container_topright_border_radius" value="15" type="int" />
		<option name="container_bottomleft_border_radius" value="15" type="int" />
		<option name="container_bottomright_border_radius" value="15" type="int" />
		<option name="container_border_width" value="2" type="int" />
		<option name="container_border_color" value="ffffff" type="string" />
		<option name="container_border_alpha" value="1" type="float" />
		<option name="overlay_displayed" value="true" type="bool" />
		<option name="overlay_color" value="000000" type="string" />
		<option name="overlay_alpha" value="0.50000762951094835" type="float" />

		<option name="item_border_width" value="2" type="int" />
		<option name="item_border_color" value="ffffff" type="string" />
		<option name="item_border_alpha" value="1" type="float" />
		
		<option name="title_displayed" value="true" type="bool" />
		<option name="title_position" value="top" type="string" />
		<option name="title_font" value="Verdana" type="string" />
		<option name="title_size" value="14" type="int" />
		<option name="title_weight" value="bold" type="string" />
		<option name="title_style" value="normal" type="string" />
		<option name="title_decoration" value="none" type="string" />
		<option name="title_color" value="666666" type="string" />
		
		<option name="caption_displayed" value="true" type="bool" />
		<option name="caption_position" value="right" type="string" />
		<option name="caption_font" value="Verdana" type="string" />
		<option name="caption_size" value="16" type="int" />
		<option name="caption_weight" value="normal" type="string" />
		<option name="caption_style" value="normal" type="string" />
		<option name="caption_decoration" value="none" type="string" />
		<option name="caption_color" value="ffffff" type="string" />
		<option name="caption_width" value="200" type="int" />
		<option name="caption_height" value="75" type="int" />
		<option name="caption_textalign" value="justify" type="string" />
		
		<option name="play_displayed" value="true" type="bool" />
		<option name="play_position" value="bottomleft" type="string" />
		<option name="play_text" value="galleryplay_text" type="string" />




		<option name="navigation_displayed" value="true" type="bool" />
		<option name="navigation_position" value="bottom" type="string" />
		<option name="counter_color" value="666666" type="string" />
		<option name="navprev_text" value="gallerynavprev_text" type="string" />
		<option name="navnext_text" value="gallerynavnext_text" type="string" />




		<option name="navigation_arrows" value="true" type="bool" />




		<option name="fullscreen_displayed" value="true" type="bool" />
		<option name="fullscreen_position" value="topleft" type="string" />
		<option name="fullscreen_text" value="galleryfullscreen_text" type="string" />




		<option name="close_displayed" value="true" type="bool" />
		<option name="close_position" value="topright" type="string" />
		<option name="close_text" value="galleryclose_text" type="string" />

		<option name="close_callback" value="invokeKrFunction('closeKolorBoxCallback_gallery')" type="string" />
		<option name="zorder" value="8" type="int" />
		<option name="use_i18n" value="true" type="bool" />
	</settings>
	<internaldata>
		<item name="item_1" title="gallerypicture_title0" caption="gallerypicture_caption0" value="ECPDMethHouseVTdata/graphics/gallery/_00r-0250.jpg"/>
		<item name="item_2" title="gallerypicture_title1" caption="gallerypicture_caption1" value="ECPDMethHouseVTdata/graphics/gallery/_01r-0253.jpg"/>
		<item name="item_3" title="gallerypicture_title2" caption="gallerypicture_caption2" value="ECPDMethHouseVTdata/graphics/gallery/_02r-0260.jpg"/>
		<item name="item_4" title="gallerypicture_title3" caption="gallerypicture_caption3" value="ECPDMethHouseVTdata/graphics/gallery/_03r-0261.jpg"/>
		<item name="item_5" title="gallerypicture_title4" caption="gallerypicture_caption4" value="ECPDMethHouseVTdata/graphics/gallery/_04r-0263.jpg"/>
		<item name="item_6" title="gallerypicture_title5" caption="gallerypicture_caption5" value="ECPDMethHouseVTdata/graphics/gallery/_05r-0265.jpg"/>
		<item name="item_7" title="gallerypicture_title6" caption="gallerypicture_caption6" value="ECPDMethHouseVTdata/graphics/gallery/_06r-0267.jpg"/>
		<item name="item_8" title="gallerypicture_title7" caption="gallerypicture_caption7" value="ECPDMethHouseVTdata/graphics/gallery/_07r-0268.jpg"/>
		<item name="item_9" title="gallerypicture_title8" caption="gallerypicture_caption8" value="ECPDMethHouseVTdata/graphics/gallery/_08r-0269.jpg"/>
		<item name="item_10" title="gallerypicture_title9" caption="gallerypicture_caption9" value="ECPDMethHouseVTdata/graphics/gallery/_09r-0273.jpg"/>
		<item name="item_11" title="gallerypicture_title10" caption="gallerypicture_caption10" value="ECPDMethHouseVTdata/graphics/gallery/_10r-0275.jpg"/>
		<item name="item_12" title="gallerypicture_title11" caption="gallerypicture_caption11" value="ECPDMethHouseVTdata/graphics/gallery/_11r-0278.jpg"/>
		<item name="item_13" title="gallerypicture_title12" caption="gallerypicture_caption12" value="ECPDMethHouseVTdata/graphics/gallery/_12r-0284.jpg"/>
		<item name="item_14" title="gallerypicture_title13" caption="gallerypicture_caption13" value="ECPDMethHouseVTdata/graphics/gallery/_13r-0285.jpg"/>
		<item name="item_15" title="gallerypicture_title14" caption="gallerypicture_caption14" value="ECPDMethHouseVTdata/graphics/gallery/_14r-0287.jpg"/>
		<item name="item_16" title="gallerypicture_title15" caption="gallerypicture_caption15" value="ECPDMethHouseVTdata/graphics/gallery/_15r-0288.jpg"/>
		<item name="item_17" title="gallerypicture_title16" caption="gallerypicture_caption16" value="ECPDMethHouseVTdata/graphics/gallery/_16r-0290.jpg"/>
		<item name="item_18" title="gallerypicture_title17" caption="gallerypicture_caption17" value="ECPDMethHouseVTdata/graphics/gallery/_17r-0292.jpg"/>
		<item name="item_19" title="gallerypicture_title18" caption="gallerypicture_caption18" value="ECPDMethHouseVTdata/graphics/gallery/_18r-0293.jpg"/>
		<item name="item_20" title="gallerypicture_title19" caption="gallerypicture_caption19" value="ECPDMethHouseVTdata/graphics/gallery/_19r-0298.jpg"/>
		<item name="item_21" title="gallerypicture_title20" caption="gallerypicture_caption20" value="ECPDMethHouseVTdata/graphics/gallery/_20r-0305.jpg"/>
		<item name="item_22" title="gallerypicture_title21" caption="gallerypicture_caption21" value="ECPDMethHouseVTdata/graphics/gallery/_21r-0307.jpg"/>
		<item name="item_23" title="gallerypicture_title22" caption="gallerypicture_caption22" value="ECPDMethHouseVTdata/graphics/gallery/_22r-0308.jpg"/>
		<item name="item_24" title="gallerypicture_title23" caption="gallerypicture_caption23" value="ECPDMethHouseVTdata/graphics/gallery/_23r-0311.jpg"/>
		<item name="item_25" title="gallerypicture_title24" caption="gallerypicture_caption24" value="ECPDMethHouseVTdata/graphics/gallery/_24r-0313.jpg"/>
		<item name="item_26" title="gallerypicture_title25" caption="gallerypicture_caption25" value="ECPDMethHouseVTdata/graphics/gallery/_25r-0314.jpg"/>
		<item name="item_27" title="gallerypicture_title26" caption="gallerypicture_caption26" value="ECPDMethHouseVTdata/graphics/gallery/_26r-0316.jpg"/>
		<item name="item_28" title="gallerypicture_title27" caption="gallerypicture_caption27" value="ECPDMethHouseVTdata/graphics/gallery/_27r-0319.jpg"/>
		<item name="item_29" title="gallerypicture_title28" caption="gallerypicture_caption28" value="ECPDMethHouseVTdata/graphics/gallery/_28r-0320.jpg"/>
		<item name="item_30" title="gallerypicture_title29" caption="gallerypicture_caption29" value="ECPDMethHouseVTdata/graphics/gallery/_29r-0323.jpg"/>
		<item name="item_31" title="gallerypicture_title30" caption="gallerypicture_caption30" value="ECPDMethHouseVTdata/graphics/gallery/_30r-0324.jpg"/>
		<item name="item_32" title="gallerypicture_title31" caption="gallerypicture_caption31" value="ECPDMethHouseVTdata/graphics/gallery/_31r-0326.jpg"/>
		<item name="item_33" title="gallerypicture_title32" caption="gallerypicture_caption32" value="ECPDMethHouseVTdata/graphics/gallery/_32r-0327.jpg"/>
	</internaldata>
</ptplugin>

<action name="kolorBoxJsReady_gallery">
	set(ptplugin[gallery].jsready, true);
</action>

<action name="showGallery_gallery">
	ifnot(ptplugin[gallery].isOpen,
		set(ptplugin[gallery].isOpen, true);
		set(ptplugin[gallery].doNotDeleteMe, false);
		set(gallery_boxurl, %1);
		pauseautorotation(forceplugin);

		js(invokePluginFunction(gallery, openKolorBox, %1));
		events.dispatch(onremovedisplayedobject);
	,
		if(%1 !== null AND %1 != gallery_boxurl,
			closeKolorBox_gallery();
			delayedcall(0.3,showGallery_gallery(%1););
		);
	);
</action>

<action name="toggleGallery_gallery">
	js(invokePluginFunction(gallery, toggleKolorBox, %1));
</action>


<action name="closeKolorBox_gallery">
	js(invokePluginFunction(gallery, closeKolorBox));
</action>

<action name="closeKolorBoxCallback_gallery">
	resumeautorotation(forceplugin);

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

<action name="changeLanguage_gallery">
	if(ptplugin[gallery].jsready,
		js(invokePluginFunction(gallery, changeLanguage));
	,
		delayedcall(delay_gallery, 0.1, changeLanguage_gallery(););
	);
</action>

<events name="kolorBoxEvents_gallery" 
	keep="true"
	changetourlanguage="changeLanguage_gallery();"
	/>

<!-- ********** -->
<!-- Logo -->
<!-- id : logo -->
<!-- ********** -->

  <layer align="topleft"
         x="0"
         y="0"
         zorder="9"
         name="logo"
         keep="true"
         visible="false"
         capture="false"

			tooltip="logotooltipText"
			onhover="showTooltip('plugin',logoTooltipStyle);"
			onout="hideTooltip();"
         url="%FIRSTXML%/graphics/logo/logo.png" 
         onclick="openurl(http://www.MoreThanMethEauClaire.com,_blank);
"

         height="50"
         width="200"

         />

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

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



<layer name="logoTooltipStyle"
	keep="true"
	enabled="false"
	capture="false"
	url="%FIRSTXML%/graphics/textfield.swf"
	align="center"
	background="false"
	border="false"
	css="color:#ffffff;font-family:Arial;font-weight:bold;font-size:14px;text-align:left;"
	height="20"
	autoheight="true"
	autowidth="auto"
	edge="bottom"
	selectable="false"
	zorder="0"
	padding="2"
	xoffset="0"
	yoffset="0"
	visible="false"
	html=""
/>

<!-- ********** -->
<!-- Analytics -->
<!-- id : analytics -->
<!-- ********** -->

<ptplugin name="analytics" engine="kolorAnalytics">
	<settings>
		<option name="source" value="google" type="string" />
		<option name="tracking_id" value="UA-41542029-1" type="string" />
		<option name="force_ssl" value="false" type="bool" />
		<option name="force_test" value="false" type="bool" />
		<option name="start_page" value="ECPDMethHouseVT" type="string" />
		<option name="start_title" value="ECPD Meth House" type="string" />
		<option name="start_lang" value="en" type="string" />
		<option name="use_i18n" value="true" type="bool" />
	</settings>
</ptplugin>

<action name="kolorAnalyticsJsReady_analytics">
	set(ptplugin[analytics].jsready, true);
</action>

<action name="activate_analytics">
	if(ptplugin[analytics].jsready,
		stopdelayedcall(delay_analytics_active);
		js(invokePluginFunction(analytics, toggleDeactivation, false));
	,
		delayedcall(delay_analytics_active, 0.1, activate_analytics(););
	);
</action>

<action name="deactivate_analytics">
	if(ptplugin[analytics].jsready,
		stopdelayedcall(delay_analytics_active);
		js(invokePluginFunction(analytics, toggleDeactivation, true));
	,
		delayedcall(delay_analytics_active, 0.1, deactivate_analytics(););
	);
</action>

<action name="sendPage_analytics">
	if(ptplugin[analytics].jsready,
		stopdelayedcall(delay_analytics_page);
		js(invokePluginFunction(analytics, sendPageview, %1, %2));
	,
		delayedcall(delay_analytics_page,0.5,sendPage_analytics(%1,%2));
	);
</action>

<!-- 
sendEvent_analytics action :
* param1 : category
* param2 : action
* param3 : label
* param4 : number value
-->
<action name="sendEvent_analytics">
	if(ptplugin[analytics].jsready,
		stopdelayedcall(delay_analytics_event);
		js(invokePluginFunction(analytics, sendEvent, %1, %2, %3, %4));
	,
		delayedcall(delay_analytics_event,0.5,sendEvent_analytics(%1,%2,%3,%4));
	);
</action>

<action name="changeLanguage_analytics">
	if(ptplugin[analytics].jsready,
		stopdelayedcall(delay_analytics_lang);
		js(invokePluginFunction(analytics, changeLanguage));
	,
		delayedcall(delay_analytics_lang,0.1,changeLanguage_analytics());
	);
</action>

<events name="kolorAnalyticsEvents_analytics" 
	keep="true"
	onTourStart="sendEvent_analytics('panotour','tour start', 'ECPD Meth House');"
	onnewpano="sendPage_analytics(get(scene[get(xml.scene)].name), get(scene[get(xml.scene)].titleid));"
	changetourlanguage="changeLanguage_analytics();"
	/>

<!-- ********** -->
<!-- PH Logo -->
<!-- id : logo1 -->
<!-- ********** -->

  <layer align="bottomleft"
         x="10"
         y="10"
         zorder="11"
         name="logo1"
         keep="true"
         visible="false"
         capture="false"

			tooltip="logo1tooltipText"
			onhover="showTooltip('plugin',logo1TooltipStyle);"
			onout="hideTooltip();"
         url="%FIRSTXML%/graphics/logo1/ph-vt-logo_white.png" 
         onclick="openurl(http://www.posthousevirtualtours.com,_blank);
"

         height="50"
         width="100"

         />

  <events name="logo1events" 
    onTourStart="showlogo1();"
    keep="true" />

  <action name="hidelogo1">
    set(layer[logo1].visible, false);
  </action>
  <action name="showlogo1">
      set(layer[logo1].visible, true);
  </action>



<layer name="logo1TooltipStyle"
	keep="true"
	enabled="false"
	capture="false"
	url="%FIRSTXML%/graphics/textfield.swf"
	align="center"
	background="false"
	border="false"
	css="color:#ffffff;font-family:Arial;font-weight:bold;font-size:12px;text-align:left;"
	height="20"
	autoheight="true"
	autowidth="auto"
	edge="bottom"
	selectable="false"
	zorder="0"
	padding="2"
	xoffset="0"
	yoffset="0"
	visible="false"
	html=""
/>

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

  <!-- Tour Information -->
  <action name="hideTourInfo">set(tour_displayinfo, false);events.dispatch(onhidetourinfo);</action>
  <action name="showTourInfo">set(tour_displayinfo, true); events.dispatch(onshowtourinfo);</action>


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

  <!-- Sounds Management -->
  <plugin name="soundinterface"
          preload="true"
          url="%SWFPATH%/graphics/soundinterface.swf"
          alturl="%FIRSTXML%/graphics/soundinterface.js"
          rootpath="%$videos_sounds_path%/sounds"
          backgroundsound=""
          backgroundsoundloops="0"
          bgsound="false"
          bgsoundpaused="false"
          bgsoundloopended="false"
          volumeinitialized="false"
          started="false"
          keep="true"/>
  <events name="soundmanagementevents"
          onnewpano="if(plugin[soundinterface].started,playbackgroundsound(););"
          onxmlcomplete="soundinterfaceonxmlcomplete();"
          keep="true"/>
  <action name="soundinterfaceonxmlcomplete">
    ifnot(plugin[soundinterface].volumeinitialized,
      div(plugin[soundinterface].volume, tour_soundsvolume, 100);
      set(plugin[soundinterface].volumeinitialized,true);
    );
  </action>
  <action name="playsound3Dwhenpossible">
    set(really_play_sound, true);
    if (tour_current_played_sound,
      if (%1 == tour_current_played_sound,
        delete(tour_current_played_sound);
        set(tour_current_played_sound_state, 0);
        delete(tour_current_played_sound_paused);
        stopsound(%1);
        set(really_play_sound, false);
        if(%4,
          delete(tour_current_played_sound_pausesound);
          resumeTourSoundsActions(true,true,true,true,true);
        );
      );
    );
    if (really_play_sound,
      if (tour_current_played_sound,
        stopsound(get(tour_current_played_sound));

        ifnot(%4,
          if(tour_current_played_sound_pausesound,
            delete(tour_current_played_sound_pausesound);
            resumeTourSoundsActions(true,true,true,true,true);
          );
        );
      );
      if(%4,
        set(tour_current_played_sound_pausesound, true);
        pauseTourSoundsActions(true,false,true,true,true);
      );
      set(tour_current_played_sound, %1);
      if(tour_current_played_video,
        set(tour_current_played_sound_state, 2);
      ,
        set(tour_current_played_sound_state, 1);
      );
      set(tour_current_played_sound_paused, false);
      if (%3,
        if (device.flash,
          div(volume, tour_soundsvolume, 100);
          if(%9 != null,
            playsound3D(%1,%2,%5,%6,%7,get(volume),%8,stopsound3Dwhenpossible(%1,%4));
          ,
            playsound3D(%1,%2,%5,%6,%7,get(volume),%8);
          );
        ,
          if(%9 != null,
            playsound(%1,%2,%8,stopsound3Dwhenpossible(%1,%4));
          ,
            playsound(%1,%2,%8);
          );
        );
      ,
        if(%6 != null,
          playsound(%1,%2,%5,stopsound3Dwhenpossible(%1,%4));
        ,
          playsound(%1,%2,%5);
        );
      );

      ifnot(tour_soundson,
        set(tour_current_played_sound_paused, true);
        pausesound(%1);
      );
    );
  </action>
  <action name="stopsound3Dwhenpossible">
    if (%1 == tour_current_played_sound,
      delete(tour_current_played_sound);
      set(tour_current_played_sound_state, 0);
      delete(tour_current_played_sound_paused);

      ifnot(device.safari,
        stopsound(%1);
      );
      if(%2,
        delete(tour_current_played_sound_pausesound);
        resumeTourSoundsActions(true,true,true,true,true);
      );
    );
  </action>
  <action name="playbackgroundsound">
  if(playsound,
    if (xml.scene,
      if (scene[get(xml.scene)].backgroundsound,
        if (plugin[soundinterface].backgroundsound != scene[get(xml.scene)].backgroundsound,
          copy(plugin[soundinterface].backgroundsound, scene[get(xml.scene)].backgroundsound);
          copy(plugin[soundinterface].backgroundsoundloops, scene[get(xml.scene)].backgroundsoundloops);
          if (tour_soundson,
            set(plugin[soundinterface].bgsound, true);
            set(plugin[soundinterface].bgsoundpaused, false);
            set(plugin[soundinterface].bgsoundloopended, false);
            if(plugin[soundinterface].backgroundsoundloops GT 0,
              playsound(bgsoundname, get(plugin[soundinterface].backgroundsound), get(plugin[soundinterface].backgroundsoundloops), stopbackgroundsoundoncomplete());
            ,
              playsound(bgsoundname, get(plugin[soundinterface].backgroundsound), get(plugin[soundinterface].backgroundsoundloops));
            );
           ,
            set(plugin[soundinterface].bgsound, false);
          );
        ,
          if (tour_soundson,
            if((plugin[soundinterface].bgsoundpaused == true AND scene[get(xml.scene)].video == false) OR (scene[get(xml.scene)].video == true AND scene[get(xml.scene)].scenevideomute == true),
              resumesound(bgsoundname);
              set(plugin[soundinterface].bgsoundpaused, false);
            );
          ,
            set(plugin[soundinterface].bgsound, false);
          );
        );
      );
    );
  ,
    delayedcall(0.2, playbackgroundsound());
  );
  </action>
  <action name="stopbackgroundsoundoncomplete">
    if (plugin[soundinterface].backgroundsound,
    if (plugin[soundinterface].backgroundsoundloops GT 0,

      set(plugin[soundinterface].backgroundsoundloops, 0);
      set(plugin[soundinterface].bgsound, false);
      set(plugin[soundinterface].bgsoundpaused, false);
      set(plugin[soundinterface].bgsoundloopended, true);
    );
    );
  </action>
  <action name="resetbackgroundsoundifneeded">
    if (xml.scene,
      if (scene[get(xml.scene)].backgroundsound != scene[%1].backgroundsound,
        if(plugin[soundinterface].backgroundsound,
          stopsound(bgsoundname);
        );
        set(plugin[soundinterface].backgroundsound, "");
        set(plugin[soundinterface].backgroundsoundloops, 0);
        set(plugin[soundinterface].bgsound, false);
        set(plugin[soundinterface].bgsoundpaused, false);
        set(plugin[soundinterface].bgsoundloopended, false);
      );
    );
  </action>
  <action name="pausebackgroundsound">
    if(plugin[soundinterface].backgroundsound,
      if (plugin[soundinterface].bgsound,
        if(plugin[soundinterface].bgsoundpaused == false AND plugin[soundinterface].bgsoundloopended == false,
          pausesound(bgsoundname);
          set(plugin[soundinterface].bgsoundpaused, true);
        );
      );
    );
    
  </action>
  <action name="resumebackgroundsound">
    set(bgSoundOnResume, true);
    set(forceBgSoundOnResume, true);
    if(layer[displayedStandardVideo],
    if(layer[displayedStandardVideo].pausebgsound AND tour_current_played_video,
      set(bgSoundOnResume, false);
      set(forceBgSoundOnResume, false);
    ););
    if(layer[webvideodisplay_player],
    if(layer[webvideodisplay_player].pausebgsound AND tour_current_played_web_video,
      set(bgSoundOnResume, false);
      set(forceBgSoundOnResume, false);
    ););
    if(tour_current_played_sound_pausesound AND tour_current_played_sound,
      set(bgSoundOnResume, false);
    );
    ifnot(plugin[soundinterface].backgroundsound AND scene[get(xml.scene)].backgroundsound,
      set(bgSoundOnResume, false);
    );
    if(videospots_playing GT 0,
      set(bgSoundOnResume, false);
      set(forceBgSoundOnResume, false);
    );
    if(bgSoundOnResume,
      if (plugin[soundinterface].backgroundsound,
        if (tour_soundson,
          if (plugin[soundinterface].bgsound AND plugin[soundinterface].bgsoundloopended == false,
            if((plugin[soundinterface].bgsoundpaused == true AND scene[get(xml.scene)].video == false) OR (scene[get(xml.scene)].video == true AND scene[get(xml.scene)].scenevideomute == true),
              resumesound(bgsoundname);
              set(plugin[soundinterface].bgsoundpaused, false);
            );
          ,
            set(plugin[soundinterface].bgsound, true);
            set(plugin[soundinterface].bgsoundpaused, false);
            set(plugin[soundinterface].bgsoundloopended, false);
            if(plugin[soundinterface].backgroundsoundloops GT 0,
              playsound(bgsoundname, get(plugin[soundinterface].backgroundsound), get(plugin[soundinterface].backgroundsoundloops), stopbackgroundsoundoncomplete());
            ,
              playsound(bgsoundname, get(plugin[soundinterface].backgroundsound), get(plugin[soundinterface].backgroundsoundloops));
            );
          );
        );
      );
      
    ,
      if(forceBgSoundOnResume,
        playbackgroundsound();
        
      );
    );
  </action>
  <action name="preloadSounds">
    preloadsound("depressingdoc.mp3");
  </action>

  <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="resume3DLocalSounds">
    if (xml.scene, if (scene[get(xml.scene)].haslocalsounds, 
      set(kill3dSoundOnResume, true);
      if(layer[displayedStandardVideo],
      if(layer[displayedStandardVideo].pausebgsound,
      if(tour_current_played_video,
        set(kill3dSoundOnResume, false);
      );););
      if(layer[webvideodisplay_player],
      if(layer[webvideodisplay_player].pausebgsound,
      if(tour_current_played_web_video,
        set(kill3dSoundOnResume, false);
      );););
      if(tour_current_played_sound_pausesound,
      if(tour_current_played_sound,
        set(kill3dSoundOnResume, false);
      ););
      if(kill3dSoundOnResume,
        resumepanolocalsounds();
      );
    ););
  </action>
  <action name="pause3DLocalSounds">
    if (xml.scene, if (scene[get(xml.scene)].haslocalsounds, pausepanolocalsounds();););
  </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);
    resumeTourSoundsActions(true,true,true,true,true);
  </action>
  <action name="stopTourSounds">
    set(tour_soundson, false);events.dispatch(stoptoursoundsevent);
    pauseTourSoundsActions(true,true,true,true,true);
  </action>
  <action name="setTourSoundsVolume">
    set(tour_soundsvolume, %1);events.dispatch(changetoursoundsevent);
    div(volume, tour_soundsvolume, 100);
    set(plugin[soundinterface].volume, get(volume));
    set3DLocalSoundsVolume();
  </action>
  <action name="playTourSoundsActions">
    if(%1,
      if(plugin[soundinterface],
        if(plugin[soundinterface].started,
        play3DLocalSounds();
        );
      );
    );
    if(%2,
      if(plugin[soundinterface],
        if(plugin[soundinterface].started,
          resumebackgroundsound();
        );
      );
    );
  </action>
  <action name="stopTourSoundsActions">
    if(%1,
      stop3DLocalSounds();
    );
    if(%2,
      stopSoundActionsSounds();
    );
    if(%3,
      stopVideoActionsSounds();
    );
    if(%4,
      pausebackgroundsound();
    );
  </action>
  <action name="resumeTourSoundsActions">
    if(%1,
      if(plugin[soundinterface],
        if(plugin[soundinterface].started,
        resume3DLocalSounds();
        );
      );
    );
    if(%2,
      resumeSoundActionsSounds();
    );
    if(%3,
      resumeVideoActionsSounds();
    );
    if(%4,
      if(%5,
        if(plugin[soundinterface],
          if(plugin[soundinterface].started,
            resumebackgroundsound();
          );
        );
      ,
        pausebackgroundsound();
      );
    );
  </action>
  <action name="pauseTourSoundsActions">
    if(%1,
      pause3DLocalSounds();
    );
    if(%2,
      pauseSoundActionsSounds();
    );
    if(%3,
      pauseVideoActionsSounds();
    );
    if(%4,
      if(%5,
        pausebackgroundsound();
      ,
        if(plugin[soundinterface],
          if(plugin[soundinterface].started,
            resumebackgroundsound();
          );
        );
      );
    );
  </action>
  <action name="stopSoundActionsSounds">
    if (tour_current_played_sound,
      delete(tour_current_played_sound_paused);
      stopsound(get(tour_current_played_sound));
      delete(tour_current_played_sound);
      set(tour_current_played_sound_state, 0);
    );
  </action>
  <action name="stopVideoActionsSounds">
    if(tour_current_played_video,
      if(layer[displayedStandardVideo],
        layer[displayedStandardVideo].stop();
        removelayer(displayedStandardVideo);
        if(layer[displayedStandardVideoOverlayButton], removelayer(displayedStandardVideoOverlayButton); );
        if(layer[displayedStandardVideoOverlay], removelayer(displayedStandardVideoOverlay); );
        delete(tour_current_played_video);
        set(tour_current_played_video_state, 0);
      );
    );
    if(tour_current_played_web_video,
      displayWebVideoObjectClose();
    );
  </action>
  <action name="resumeSoundActionsSounds">
    if (tour_current_played_sound,
      set(resumeSoundActionsVerification, true);
      if(tour_current_played_video,
        if(tour_current_played_sound_state LT tour_current_played_video_state,
          set(resumeSoundActionsVerification, false);
        );
      );
      if(resumeSoundActionsVerification,
        if (tour_soundson,
          if(tour_current_played_sound_paused,
            set(tour_current_played_sound_paused, false);
            resumesound(get(tour_current_played_sound));
          );
        );
      );
    );
  </action>
  <action name="resumeVideoActionsSounds">
    if(tour_current_played_video,
      set(resumeVideoActionsVerification, true);
      if(tour_current_played_sound,
        if(tour_current_played_video_state LT tour_current_played_sound_state,
          set(resumeVideoActionsVerification, false);
        );
      );
      if(resumeVideoActionsVerification,
        if (tour_soundson,
          div(volume, tour_soundsvolume, 100);
          if(device.flash,
            set(layer[displayedStandardVideo].volume, get(volume));
          ,
            ifnot(device.ios,
              js(kpanotour.Sounds.startVideosSounds(get(volume)));
            );
          );
        ,
          if(device.flash,
            set(layer[displayedStandardVideo].volume, 0);
          ,
            ifnot(device.ios,
              js(kpanotour.Sounds.stopVideosSounds());
            );
          );
        );
      );
    );
  </action>
  <action name="pauseSoundActionsSounds">
    if (tour_current_played_sound,
      ifnot(tour_current_played_sound_paused,
        set(tour_current_played_sound_paused, true);
        pausesound(get(tour_current_played_sound));
      );
    );
  </action>
  <action name="pauseVideoActionsSounds">
    if(tour_current_played_video,
      if(device.flash,
        set(layer[displayedStandardVideo].volume, 0);
      ,
        ifnot(device.ios,
          js(kpanotour.Sounds.stopVideosSounds());
        );
      );
    );
  </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>


<action name="viewControlMoveUp">
	if(%1,
		if(%2,
			set(isfullvertical, false);
			ifnot(scene[get(xml.scene)].planar,
				sub(viewvfov, panoview.vmax, panoview.vmin);
				if (viewvfov == 180,
					set(isfullvertical, true);
				);
			);
			if(isfullvertical == false AND calc(view.vlookat-%2) LT view.vlookatmin,
				moveto(get(view.hlookat), get(view.vlookatmin));
			,
				moveto(get(view.hlookat), calc(view.vlookat-%2));
			);
		,
			set(vlookat_moveforce, -1);
			delayedcall(0.1, viewControlMoveVertStop());
		);
	,
		set(vlookat_moveforce, -1);
	);
</action>
<action name="viewControlMoveDown">
	if(%1,
		if(%2,
			set(isfullvertical, false);
			ifnot(scene[get(xml.scene)].planar,
				sub(viewvfov, panoview.vmax, panoview.vmin);
				if (viewvfov == 180,
					set(isfullvertical, true);
				);
			);
			if(sceneisfull360 == false AND calc(view.vlookat+%2) GT view.vlookatmax,
				moveto(get(view.hlookat), get(view.vlookatmax));
			,
				moveto(get(view.hlookat), calc(view.vlookat+%2));
			);
		,
			set(vlookat_moveforce, +1);
			delayedcall(0.1, viewControlMoveVertStop());
		);
	,
		set(vlookat_moveforce, +1);
	);
</action>
<action name="viewControlMoveLeft">
	if(%1,
		if(%2,
			set(isfullhorizontal, false);
			ifnot(scene[get(xml.scene)].planar,
				sub(viewhfov, panoview.hmax, panoview.hmin);
				if (viewhfov == 360,
					set(isfullhorizontal, true);
				);
			);
			if(isfullhorizontal == false AND calc(view.hlookat-%2) LT view.hlookatmin,
				moveto(get(view.hlookatmin), get(view.vlookat));
			,
				moveto(calc(view.hlookat-%2), get(view.vlookat));
			);
		,
			set(hlookat_moveforce, -1);
			delayedcall(0.1, viewControlMoveHoriStop());
		);
	,
		set(hlookat_moveforce, -1);
	);
</action>
<action name="viewControlMoveRight">
	if(%1,
		if(%2,
			set(isfullhorizontal, false);
			ifnot(scene[get(xml.scene)].planar,
				sub(viewhfov, panoview.hmax, panoview.hmin);
				if (viewhfov == 360,
					set(isfullhorizontal, true);
				);
			);
			if(isfullhorizontal == false AND calc(view.hlookat+%2) GT view.hlookatmax,
				moveto(get(view.hlookatmax), get(view.vlookat));
			,
				moveto(calc(view.hlookat+%2), get(view.vlookat));
			);
		,
			set(hlookat_moveforce, +1);
			delayedcall(0.1, viewControlMoveHoriStop());
			
		);
	,
		set(hlookat_moveforce, +1);
	);
</action>
<action name="viewControlMoveHoriStop">
	set(hlookat_moveforce, 0);
</action>
<action name="viewControlMoveVertStop">
	set(vlookat_moveforce, 0);
</action>

<action name="viewControlZoomIn">
	if(%1,
		if(%2,
			if(%2 LT view.fovmin,
				zoomto(get(view.fovmin));
			,
				if(%2 LT view.fov,
					zoomto(%2);
				);
			);
		,
			set(fov_moveforce, -1);
			delayedcall(0.1, viewControlZoomStop());
		);
	,
		set(fov_moveforce, -1);
	);
</action>
<action name="viewControlZoomOut">
	if(%1,
		if(%2,
			if(%2 GT view.fovmax,
				zoomto(get(view.fovmax));
			,
				if(%2 GT view.fov,
					zoomto(%2);
				);
			);
		,
			set(fov_moveforce, +1);
			delayedcall(0.1, viewControlZoomStop());
		);
	,
		set(fov_moveforce, +1);
	);
</action>
<action name="viewControlZoomStop">
	set(fov_moveforce, 0);
</action>

</krpano>