HEX
Server: Apache
System: Linux webm004.cluster123.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User: dronicaehy (124008)
PHP: 8.5.0
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/dronicaehy/www/consejeria/imidadata/imida_skin.xml
<?xml version="1.0" encoding="UTF-8"?>
<krpano version="1.19">

    
  <!-- Spot Style - Default Point Spot Style -->
  <style name="IconDefaultPointSpotStyle"
         url="%FIRSTXML%/spots/hotspot_animated_user_defaultpoint0.png"
         visible="false"
         frame="0"
         lastframe="19"
         framewidth="64"
         frameheight="64"
         stopspotsequence="false"
         crop="0|0|64|64"
         onloaded="startspotanimation(0.1);"
         onhover="onhoverIconDefaultPointSpotStyle"
         onout="onoutIconDefaultPointSpotStyle"


         />

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


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



  </action>



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


      
  <!-- Picture Spot Style - Default Picture Spot Style -->

  <style name="RectPictureDefaultPictureSpotStyle"
         distorted="true"
         visible="false"
         scale="1.0" 
         onhover="onhoverRectPictureDefaultPictureSpotStyle"
         onover="onoverRectPictureDefaultPictureSpotStyle"
         onout="onoutRectPictureDefaultPictureSpotStyle"
         />
  <action name="onhoverRectPictureDefaultPictureSpotStyle">
    showTooltip('hotspot');
  </action>
  <action name="onoverRectPictureDefaultPictureSpotStyle">
    pauseautorotation(forcehotspot);

  </action>
  <action name="onoutRectPictureDefaultPictureSpotStyle">
    hideTooltip();
    resumeautorotation(forcehotspot);

  </action>



<!-- ********** -->
<!-- Barra de Control Clásica -->
<!-- id : controlBar_classic -->
<!-- ********** -->

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


    keep="true" />



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

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

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



    if (device.desktop,
      set(layer[controlBar_classicbtn_display_help].x, get(controlBar_classicbutton_pos));
      set(layer[controlBar_classicbtn_close_help  ].x, get(controlBar_classicbutton_pos));
      inc(controlBar_classicbutton_pos, 36);
    );

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


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


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


    set(layer[controlBar_classicbtn_autotour_on ].x, get(controlBar_classicbutton_pos));
    set(layer[controlBar_classicbtn_autotour_off].x, get(controlBar_classicbutton_pos));
    inc(controlBar_classicbutton_pos, 36);

    set(layer[controlBar_classicbtn_sound_on ].x, get(controlBar_classicbutton_pos));
    set(layer[controlBar_classicbtn_sound_off].x, get(controlBar_classicbutton_pos));
    inc(controlBar_classicbutton_pos, 36);




    set(layer[controlBar_classicbtn_show_hotspots].x, get(controlBar_classicbutton_pos));
    set(layer[controlBar_classicbtn_hide_hotspots].x, get(controlBar_classicbutton_pos));
    inc(controlBar_classicbutton_pos, 36);



    if (device.desktop,
        set(layer[controlBar_classicbtn_out].x, get(controlBar_classicbutton_pos));
        inc(controlBar_classicbutton_pos, 36);
        set(layer[controlBar_classicbtn_in].x, get(controlBar_classicbutton_pos));
        inc(controlBar_classicbutton_pos, 36);
    );
    if (scene.count GT 1,
        set(layer[controlBar_classicbtn_next_pano].x, get(controlBar_classicbutton_pos));
        inc(controlBar_classicbutton_pos, 36);
        set(layer[controlBar_classicbtn_prev_pano].x, get(controlBar_classicbutton_pos));
        inc(controlBar_classicbutton_pos, 36);
      );



    inc(controlBar_classicbutton_pos, 20);

    set(controlBar_classicbackgroundwidthwhenopened, get(controlBar_classicbutton_pos));



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


    );

	
	
  </action>

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

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



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

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

    <layer name="controlBar_classicbtn_hide_hotspots"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_hide_show_hotspots.png"
            style="controlBar_classic_btn_style"
            onclick="hideHotspots();
"
            tooltip="controlBar_classichideSpotsTip"
            visible="false"
            />
    <layer name="controlBar_classicbtn_show_hotspots"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_hide_show_hotspots.png"
            style="controlBar_classic_btn_style"
            onclick="showHotspots();
"
            tooltip="controlBar_classicshowSpotsTip"
            visible="false"
            />



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


    <layer name="controlBar_classicbtn_sound_on"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_start_sound.png"
            onclick="playTourSounds();
"
            style="controlBar_classic_btn_style"
            visible="false"
            tooltip="controlBar_classicsoundsOnTip"
            />
    <layer name="controlBar_classicbtn_sound_off"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_stop_sound.png"
            onclick="stopTourSounds();
"
            style="controlBar_classic_btn_style"
            visible="false"
            tooltip="controlBar_classicsoundsOffTip"
            />


    <layer name="controlBar_classicbtn_prev_pano"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_previous_scene.png"
            onclick="loadPreviousScene();
"
            style="controlBar_classic_btn_style"
            tooltip="controlBar_classicprevSceneTip"
            visible="false"
            />
    <layer name="controlBar_classicbtn_next_pano"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_next_scene.png"
            onclick="loadNextScene();
"
            style="controlBar_classic_btn_style"
            tooltip="controlBar_classicnextSceneTip"
            visible="false"
            />


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


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

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


    <layer name="controlBar_classicbtn_autotour_on"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_start_automatic_tour.png"
            onclick="startautotour();
"
            style="controlBar_classic_btn_style"
            visible="false"
            tooltip="controlBar_classicautotourOnTip"
            />
    <layer name="controlBar_classicbtn_autotour_off"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_stop_automatic_tour.png"
            onclick="stopautotour();
"
            style="controlBar_classic_btn_style"
            visible="false"
            tooltip="controlBar_classicautotourOffTip"
            />


    <layer name="controlBar_classicbtn_display_help"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_help.png"
            onclick="controlBar_classicdisplayHelp();"
            style="controlBar_classic_btn_style"
            devices="desktop"
            visible="false"
            tooltip="controlBar_classicdisplayHelpTip"
            />
    <layer name="controlBar_classicbtn_close_help"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_help.png"
            onclick="controlBar_classiccloseHelp();"
            style="controlBar_classic_btn_style"
            visible="false"
            devices="desktop"
            tooltip="controlBar_classichideHelpTip"
            />



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





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

    controlBar_classicupdateSoundButtons();

    if (scene.count GT 1,
    set(layer[controlBar_classicbtn_prev_pano].visible, false);
    set(layer[controlBar_classicbtn_next_pano].visible, false);
    );
    controlBar_classicupdateAutorotationButtons();

    controlBar_classicupdateAutotourButtons();

    set(layer[controlBar_classicbtn_in].visible , false);
    set(layer[controlBar_classicbtn_out].visible, false);

    controlBar_classicupdateFloorplanButtons();

    controlBar_classicupdateHideShowHotspotsButtons();


    controlBar_classicupdateHelpButtons();


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


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


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

    controlBar_classicupdateFloorplanButtons();

    controlBar_classicupdateHideShowHotspotsButtons();


    controlBar_classicupdateHelpButtons();


    controlBar_classicupdateFullscreenButtons();

    controlBar_classicupdateSoundButtons();

    if (scene.count GT 1,
      set(layer[controlBar_classicbtn_prev_pano].visible, true);
      set(layer[controlBar_classicbtn_next_pano].visible, true);
    );
    controlBar_classicupdateAutorotationButtons();

    controlBar_classicupdateAutotourButtons();

  </action>

  <layer name="controlBar_classichelpScreen" align="center" keep="true" onclick="controlBar_classiccloseHelp();" url="%FIRSTXML%/graphics/classiccontrolbar/help_screen_bg.png" visible="false" zorder="97" height="10%" width="prop" />

  <layer name="controlBar_classichelpScreenFg" align="center" keep="true" onclick="controlBar_classiccloseHelp();" displayed="false" 
         url="%FIRSTXML%/graphics/classiccontrolbar/help_screen_fg.png" 
         alpha="0.8" 
         height="50%" 
         width="prop" 
         zorder="98"
         visible="false" />
  <action name="controlBar_classicdisplayHelp">
    set(layer[controlBar_classichelpScreenFg].displayed,true);
    set(layer[controlBar_classichelpScreen].visible,true);
    tween(layer[controlBar_classichelpScreen].height, 50%, 1, easeOutQuad,
      set(layer[controlBar_classichelpScreenFg].visible,true);
    );
    controlBar_classicupdateHelpButtons();
  </action>
  <action name="controlBar_classiccloseHelp">
    set(layer[controlBar_classichelpScreenFg].displayed,false);
    set(layer[controlBar_classichelpScreenFg].visible,false);
    tween(layer[controlBar_classichelpScreen].height, 10%, 1, easeOutQuad,
      set(layer[controlBar_classichelpScreen].visible,false);
    );
    controlBar_classicupdateHelpButtons();
  </action>
	<action name="controlBar_classicHideHelpButtons">
		set(layer[controlBar_classicbtn_display_help].visible, false);
		set(layer[controlBar_classicbtn_close_help].visible, false);
	</action>
	<action name="controlBar_classicShowHelpButtons">
		if (layer[controlBar_classichelpScreenFg].displayed,
			set(layer[controlBar_classicbtn_close_help].visible, true);
			set(layer[controlBar_classicbtn_display_help].visible, false);
		,
			set(layer[controlBar_classicbtn_display_help].visible, true);
			set(layer[controlBar_classicbtn_close_help].visible, false);
		);
	</action>
	<action name="controlBar_classicupdateHelpButtons">
	if (device.desktop,
		if (controlBar_classicIsOpened,
			controlBar_classicShowHelpButtons();
		,
			controlBar_classicHideHelpButtons();
		);
	,
		controlBar_classicHideHelpButtons();
	);
	</action>


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


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

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


	<events name="controlBar_classicAutotourEvents"
		onstartautotour="controlBar_classicupdateAutotourButtons();"
		onstopautotour="controlBar_classicupdateAutotourButtons();"
		keep="true"/>
	<action name="controlBar_classicHideAutotourButtons">
		set(layer[controlBar_classicbtn_autotour_off].visible, false);
		set(layer[controlBar_classicbtn_autotour_on].visible , false);
	</action>
	<action name="controlBar_classicShowAutotourButtons">
		if (tour_autotourenabled == false,
			set(layer[controlBar_classicbtn_autotour_off].visible, false);
			set(layer[controlBar_classicbtn_autotour_on].visible , true);
		,
			set(layer[controlBar_classicbtn_autotour_off].visible, true);
			set(layer[controlBar_classicbtn_autotour_on].visible , false);
		);
	</action>
	<action name="controlBar_classicupdateAutotourButtons">
		if (controlBar_classicIsOpened,
			controlBar_classicShowAutotourButtons();
		,
			controlBar_classicHideAutotourButtons();
		);
	</action>

	<events name="controlBar_classicplaystopsoundsevent" 
		playtoursoundsevent="controlBar_classicupdateSoundButtons();" 
		stoptoursoundsevent="controlBar_classicupdateSoundButtons();" 
		keep="true" />
	<action name="controlBar_classicHideSoundButtons">
		set(layer[controlBar_classicbtn_sound_off].visible, false);
		set(layer[controlBar_classicbtn_sound_on].visible , false);
	</action>
	<action name="controlBar_classicShowSoundButtons">
		if (tour_soundson == false,
			set(layer[controlBar_classicbtn_sound_off].visible, false);
			set(layer[controlBar_classicbtn_sound_on].visible , true);
		,
			set(layer[controlBar_classicbtn_sound_off].visible, true);
			set(layer[controlBar_classicbtn_sound_on].visible , false);
		);
	</action>
	<action name="controlBar_classicupdateSoundButtons">
		if (controlBar_classicIsOpened,
			controlBar_classicShowSoundButtons();
		,
			controlBar_classicHideSoundButtons();
		);
	</action>


	<events name="controlBar_classichotspotsdisplayevents"
		hotspots_visibility_changed="controlBar_classicupdateHideShowHotspotsButtons"
		keep="true"/>
	<action name="controlBar_classicHideHideShowHotspotsButtons">
		set(layer[controlBar_classicbtn_show_hotspots].visible, false);
		set(layer[controlBar_classicbtn_hide_hotspots].visible, false);
	</action>
	<action name="controlBar_classicShowHideShowHotspotsButtons">
		if (tour_displayspots,
			set(layer[controlBar_classicbtn_hide_hotspots].visible, true);
			set(layer[controlBar_classicbtn_show_hotspots].visible, false);
		,
			set(layer[controlBar_classicbtn_show_hotspots].visible, true);
			set(layer[controlBar_classicbtn_hide_hotspots].visible, false);
		);
	</action>
	<action name="controlBar_classicupdateHideShowHotspotsButtons">
		if (controlBar_classicIsOpened,
			controlBar_classicShowHideShowHotspotsButtons();
		,
			controlBar_classicHideHideShowHotspotsButtons();
		);
	</action>


<layer name="controlBar_classicmenuTooltipStyle"
	keep="true"
	enabled="false"
	capture="false"
	url="%FIRSTXML%/graphics/textfield.swf"
	align="center"
	background="false"
	border="false"
	textshadow="1" textshadowrange="4.0" textshadowangle="45" textshadowcolor="0xffa100" textshadowalpha="1"
	css="color:#e6e6e6;font-family:Helvetica;font-weight:bold;font-size:14px;text-align:left;"
	height="20"
	autoheight="true"
	autowidth="auto"
	selectable="false"
	zorder="0"
	visible="false"
	html=""
	padding="2"
	xoffset="0"
	yoffset="0"
	edge="bottom"
	/>



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

  <layer align="bottomright"
         x="20"
         y="20"
         zorder="4"
         name="logo"
         keep="true"
         visible="false"
         capture="false"

         url="%FIRSTXML%/graphics/logo/logo-imida-rgba-trans.png" 
         onclick="
getmessage(urltoopen,logowebsiteurl);openurl(get(urltoopen),_blank);
"

         height="10%"
         width="20%"

         />

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




<!-- ********** -->
<!-- Brújula -->
<!-- id : compass -->
<!-- ********** -->

  <layer name="compassbackground"
         url="%FIRSTXML%/graphics/compass/compassbg53a0d7.png"
         keep="true"
         handcursor="false"
         capture="false"
         align="topright"
         x="10"
         y="10"
         zorder="5"
         visible="false"
         active="true"
         started="false"

         height="100"
         width="100"

         >



    <layer name="compassradar" keep="true"
         url="%FIRSTXML%/graphics/radar.swf"
         alturl="%FIRSTXML%/graphics/radar.js"
         align="center"
         heading="0.0"
         headingoffset="0.0"
         fillcolor="0xb17135"
         fillalpha="0.50000762951094835"
         width="100%"
         height="100%"
         zorder="1"
         />


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

  <events name="compassevts"
          keep="true"
          onnewpano="compassUpdateOrientation();"
          onviewchanged="compassUpdateOrientation();"
          hidetourcontrols="hidecompass();"
          showtourcontrols="set(layer[compassbackground].started, true);showcompass();"
         />

  <action name="compassUpdateOrientation">
    if(scene[get(xml.scene)].planar,
      set(layer[compassbackground].active, false);
      hidecompass();
    ,

      set(layer[compassbackground].active, true);
      mod(compasshlookat, view.hlookat, 360);
      mul(compassheading, -1, get(scene[get(xml.scene)].heading));
      if (compassheading == null, set(compassheading, 0));
      sub(layer[compasspointer].rotate, compasshlookat, compassheading);

      set(layer[compassradar].heading, get(scene[get(xml.scene)].heading));

      showcompass();
    );
  </action>

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

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

	<ptplugin name="floorPlan" engine="KolorFloorPlan">
		<settings>
			<option name="background_color" value="f2f2f2" type="string" />
			<option name="background_lighter_color" value="ffffff" type="string" />
			<option name="background_darker_color" value="cacaca" type="string" />
			<option name="background_alpha" value="1" type="float" />
			<option name="text_color" value="000000" type="string" />
			<option name="resize" value="true" type="bool" />
			<option name="fp_selector" value="one" type="string" />
			<option name="fp_selector_label" value="floorPlanmenu_label" type="string" />
			<option name="display_title" value="false" type="bool" />
			<option name="title_font" value="Verdana" type="string" />
			<option name="title_size" value="14" type="int" />
			<option name="title_weight" value="normal" type="string" />
			<option name="title_decoration" value="normal" type="string" />
			<option name="title_color" value="000000" type="string" />
			<option name="display_orientation" value="false" type="bool" />
			<option name="display_radar" value="false" type="bool" />
			<option name="close_on_click" value="true" type="bool" />
			<option name="position" value="center" type="string" />
			<option name="zorder" value="6" type="int" />
			<option name="use_i18n" value="true" type="bool" />
		</settings>
		
		<floorplanItems selectedItem="fpitemmain" selectedSpot="" selectedSpotScene="" selectedSpotHeading="" selectedSpotFov="">
				
				<floorplanItem 
					name="fpitemmain" 
					width="771" 
					height="386" 
					groupName="" 
					url="floorplan/mapa_11.jpg" 
					title="project_floor_title"
					heading="0">
							<spot name="spotmap393" posX="0.978120983" posY="0.542415977" heading="34.999999999999723" desc="spotmap393_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano49" jsClick="spotmap393ActionSpotFloorPlan">
								<icon url="spots/hotspot_neutral_user_defaultmap0.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap394" posX="0.993565023" posY="0.596400976" heading="35.000000000000277" desc="spotmap394_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano69" jsClick="spotmap394ActionSpotFloorPlan">
								<icon url="spots/hotspot_neutral_user_defaultmap0.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap432" posX="0.964546025" posY="0.662500024" heading="-143.39999999999981" desc="spotmap432_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano51" jsClick="spotmap432ActionSpotFloorPlan">
								<icon url="spots/hotspot_neutral_user_defaultmap0.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap433" posX="0.946820021" posY="0.72291702" heading="15.39999999999986" desc="spotmap433_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano44" jsClick="spotmap433ActionSpotFloorPlan">
								<icon url="spots/hotspot_neutral_user_defaultmap0.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap434" posX="0.893639028" posY="0.66041702" heading="-25.39999999999964" desc="spotmap434_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano52" jsClick="spotmap434ActionSpotFloorPlan">
								<icon url="spots/hotspot_neutral_user_defaultmap0.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap435" posX="0.889468014" posY="0.62916702" heading="-32.199999999999882" desc="spotmap435_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano55" jsClick="spotmap435ActionSpotFloorPlan">
								<icon url="spots/hotspot_neutral_user_defaultmap0.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap436" posX="0.872784019" posY="0.610417008" heading="0" desc="spotmap436_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano58" jsClick="spotmap436ActionSpotFloorPlan">
								<icon url="spots/hotspot_neutral_user_defaultmap0.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap437" posX="0.885297" posY="0.577082992" heading="75.200000000000216" desc="spotmap437_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano56" jsClick="spotmap437ActionSpotFloorPlan">
								<icon url="spots/hotspot_neutral_user_defaultmap0.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap438" posX="0.887382984" posY="0.74583298" heading="53.799999999999777" desc="spotmap438_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano60" jsClick="spotmap438ActionSpotFloorPlan">
								<icon url="spots/hotspot_neutral_user_defaultmap0.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap439" posX="0.874870002" posY="0.706250012" heading="0" desc="spotmap439_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano57" jsClick="spotmap439ActionSpotFloorPlan">
								<icon url="spots/hotspot_neutral_user_defaultmap0.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap440" posX="0.874870002" posY="0.789583027" heading="-7.3999999999996078" desc="spotmap440_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano59" jsClick="spotmap440ActionSpotFloorPlan">
								<icon url="spots/hotspot_neutral_user_defaultmap0.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap441" posX="0.41188699" posY="0.893750012" heading="-2.8000000000002099" desc="spotmap441_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano47" jsClick="spotmap441ActionSpotFloorPlan">
								<icon url="spots/hotspot_neutral_user_defaultmap0.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap442" posX="0.497393012" posY="0.916666985" heading="-125.4000000000002" desc="spotmap442_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano67" jsClick="spotmap442ActionSpotFloorPlan">
								<icon url="spots/hotspot_neutral_user_defaultmap0.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap443" posX="0.492179006" posY="0.877083004" heading="75.200000000000443" desc="spotmap443_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano65" jsClick="spotmap443ActionSpotFloorPlan">
								<icon url="spots/hotspot_neutral_user_defaultmap0.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap444" posX="0.511991978" posY="0.770833015" heading="-65.199999999999889" desc="spotmap444_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano37" jsClick="spotmap444ActionSpotFloorPlan">
								<icon url="spots/hotspot_neutral_user_defaultmap0.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap445" posX="0.524505019" posY="0.666666985" heading="-12.19999999999979" desc="spotmap445_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano41" jsClick="spotmap445ActionSpotFloorPlan">
								<icon url="spots/hotspot_neutral_user_defaultmap0.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap446" posX="0.989571989" posY="0.0666666999" heading="-150.39999999999961" desc="spotmap446_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano62" jsClick="spotmap446ActionSpotFloorPlan">
								<icon url="spots/hotspot_neutral_user_defaultmap0.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap447" posX="0.899896026" posY="0.0770832971" heading="178.8000000000001" desc="spotmap447_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano71" jsClick="spotmap447ActionSpotFloorPlan">
								<icon url="spots/hotspot_neutral_user_defaultmap0.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap448" posX="0.937434971" posY="0.150000006" heading="-115.5999999999998" desc="spotmap448_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano61" jsClick="spotmap448ActionSpotFloorPlan">
								<icon url="spots/hotspot_neutral_user_defaultmap0.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap449" posX="0.845673025" posY="0.122916996" heading="-150.40000000000069" desc="spotmap449_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano63" jsClick="spotmap449ActionSpotFloorPlan">
								<icon url="spots/hotspot_neutral_user_defaultmap0.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap450" posX="0.813346982" posY="0.154166996" heading="-159.39999999999949" desc="spotmap450_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano70" jsClick="spotmap450ActionSpotFloorPlan">
								<icon url="spots/hotspot_neutral_user_defaultmap0.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap451" posX="0.839416027" posY="0.193749994" heading="-141.1999999999999" desc="spotmap451_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano46" jsClick="spotmap451ActionSpotFloorPlan">
								<icon url="spots/hotspot_neutral_user_defaultmap0.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap452" posX="0.751824975" posY="0.206249997" heading="-135.39999999999981" desc="spotmap452_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano43" jsClick="spotmap452ActionSpotFloorPlan">
								<icon url="spots/hotspot_neutral_user_defaultmap0.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap453" posX="0.792491972" posY="0.21875" heading="-59.999999999999702" desc="spotmap453_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano45" jsClick="spotmap453ActionSpotFloorPlan">
								<icon url="spots/hotspot_neutral_user_defaultmap0.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
							<spot name="spotmap454" posX="0.919708014" posY="0.245832995" heading="-157.99999999999969" desc="spotmap454_tooltip" descType="tooltip" groupName="" isScene="true" planar="false" scene="pano68" jsClick="spotmap454ActionSpotFloorPlan">
								<icon url="spots/hotspot_neutral_user_defaultmap0.png" iconWidth="32" iconHeight="32" iconAnchor="center" />
							</spot>
				</floorplanItem>
			
			
		</floorplanItems>
	</ptplugin>
	
	<action name="kolorFloorplanJsReady_floorPlan">
		set(ptplugin[floorPlan].jsready, true);
		
		ifnot(ptplugin[floorPlan].floorplanItems[0].selectedSpot == "",
			set(ptplugin[floorPlan].floorplanItems[0].selectedSpotFov, get(view.hfov));
			js(invokePluginFunction(floorPlan, setKolorFloorPlanSelectedSpotOptions, get(xml.scene), get(view.hlookat), get(view.hfov)));
		);
	</action>
	
	
		<!-- floorplan main spots counter : 25 -->
			<action name="spotmap393ActionSpotFloorPlan">
          mainloadscene(pano49);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
			<action name="spotmap394ActionSpotFloorPlan">
          mainloadscene(pano69);lookat(-0.450000, 1.800000, 90.000000);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

		<option name="background_color" value="f2f2f2" type="string" />
		<option name="background_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="padding" value="10" type="int" />
		<option name="topleft_radius" value="10" type="int" />
		<option name="topright_radius" value="10" type="int" />
		<option name="bottomleft_radius" value="10" type="int" />
		<option name="bottomright_radius" value="10" type="int" />
		<option name="area_border_width" value="10" type="int" />
		<option name="area_border_color" value="f2f2f2" type="string" />
		<option name="area_border_alpha" value="1" type="float" />
		<option name="area_width" value="40" type="int" />
		<option name="area_height" value="40" type="int" />
		<option name="area_width_unit" value="percent" type="string" />
		<option name="area_height_unit" value="percent" type="string" />
		<option name="animation" value="false" type="bool" />
		<option name="animation_duration" value="500" type="int" />
		<option name="close_on_click" value="true" type="bool" />
		<option name="refresh_content" value="false" type="bool" />
		<option name="open_callback" value="addKolorFloorPlan('floorPlan', 'floorPlanArea_floorplanDIV');" type="string" />
		<option name="close_callback" value="invokeKrFunction('closeKolorAreaCallback_floorPlanArea')" type="string" />
		<option name="zorder" value="6" type="int" />
		<option name="use_i18n" value="true" type="bool" />
	</settings>
	</ptplugin>
	
	<action name="kolorAreaJsReady_floorPlanArea">
		set(ptplugin[floorPlanArea].jsready, true);

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

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

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

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

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

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

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

  <!-- 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="true"
          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("atardecer_en_puerto_colombia__4__olas__sonidos_del_mar..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 OR (device.webgl AND !device.ios),
            set(layer[displayedStandardVideo].volume, get(volume));
          ,
            ifnot(device.ios,
              js(kpanotour.Sounds.startVideosSounds(get(volume)));
            );
          );
        ,
          if(device.flash OR (device.webgl AND !device.ios),
            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 OR (device.webgl AND !device.ios),
        set(layer[displayedStandardVideo].volume, 0);
      ,
        ifnot(device.ios,
          js(kpanotour.Sounds.stopVideosSounds());
        );
      );
    );
  </action>

  <!-- FLOORPLAN -->
  <action name="hideFloorplan">set(tour_displayfloorplan, false);events.dispatch(onhidetourfloorplan);</action>
  <action name="showFloorplan">set(tour_displayfloorplan, true); events.dispatch(onshowtourfloorplan);</action>


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

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


  <action name="displayImage">
    if (layer[displayedStandardImage],
      if(layer[displayedStandardImage].doNotDeleteMe,
        set(layer[displayedStandardImage].currentCall, false);
        set(layer[displayedStandardImage].doNotDeleteMe, false);
        
        if (%1 == layer[displayedStandardImage].url,
          applyDisplayedImageObjectAnimation(%8);
        ,
          setDisplayedImageObjectParameters(%1, %2, %3, %4, %5, %6, %7, %8, %9, %10);
        );
      ,
        set(layer[displayedStandardImage].currentCall, false);
        set(layer[displayedStandardImage].doNotDeleteMe, true);
        events.dispatch(onremovedisplayedobject);
        delayedcall(0.2,displayImage(%1, %2, %3, %4, %5, %6, %7, %8, %9, %10, %11, %12););
      );
    ,
      if(%10,
        addlayer(displayedStandardImageOverlay);
        set(layer[displayedStandardImageOverlay].keep, false);
        set(layer[displayedStandardImageOverlay].width, 100%);
        set(layer[displayedStandardImageOverlay].height, 100%);
        set(layer[displayedStandardImageOverlay].type, container);
        set(layer[displayedStandardImageOverlay].zorder, 98);
        set(layer[displayedStandardImageOverlay].visible, false);
        set(layer[displayedStandardImageOverlay].onclick, applyDisplayedImageObjectAnimation(%8););
        set(layer[displayedStandardImageOverlay].bgcolor, "0x%11");
        set(layer[displayedStandardImageOverlay].bgalpha, %12);
        set(layer[displayedStandardImageOverlay].bgcapture, true);
      );
      addlayer(displayedStandardImage);
      set(layer[displayedStandardImage].keep, false);
      set(layer[displayedStandardImage].onclick, applyDisplayedImageObjectAnimation(%8););
      set(layer[displayedStandardImage].zorder , 99);
      set(layer[displayedStandardImage].currentCall, true);
      set(layer[displayedStandardImage].doNotDeleteMe, true);
      set(layer[displayedStandardImage].onloaded, resizeDisplayedImageObject());
      events.dispatch(onremovedisplayedobject);
      delayedcall(0.2,displayImage(%1, %2, %3, %4, %5, %6, %7, %8, %9, %10, %11, %12););
      set(layer[displayedStandardImage].visible, false);
    );
  </action>
  <action name="applyDisplayedImageObjectAnimation">resumeautorotation(forcehotspot);

    if (%1,
      stoptween(layer[displayedStandardImage].width, layer[displayedStandardImage].height);
      tween(layer[displayedStandardImage].width|layer[displayedStandardImage].height, 1|1, 1, easeOutQuad, WAIT);
      if(layer[displayedStandardImage].overlay,removelayer(displayedStandardImageOverlay););removelayer(displayedStandardImage);
    ,
      if(layer[displayedStandardImage].overlay,removelayer(displayedStandardImageOverlay););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);
    set(layer[displayedStandardImage].imgwidth  , %5);
    set(layer[displayedStandardImage].imgheight , %6);
    set(layer[displayedStandardImage].animated  , %8);
    set(layer[displayedStandardImage].applyratio, %9);
    set(layer[displayedStandardImage].overlay   , %10);
    if (%7,pauseautorotation(forcehotspot);
);
  </action>
  <action name="resizeDisplayedImageObject">
    if(layer[displayedStandardImage].url,
    set(layer[displayedStandardImage].fullwidth, get(layer[displayedStandardImage].width));
    set(layer[displayedStandardImage].fullheight, get(layer[displayedStandardImage].height));
    if(layer[displayedStandardImage].animated,
      set(layer[displayedStandardImage].width , 1);
      set(layer[displayedStandardImage].height, 1);
    );
    if(layer[displayedStandardImage].imgwidth != "" AND layer[displayedStandardImage].imgheight != "",
      if(layer[displayedStandardImage].imgwidth == "prop",
        set(tempDisplayedImageObjectHeight, get(layer[displayedStandardImage].imgheight));
        indexoftxt(tempDisplayedImageObjectHeightPercent, get(tempDisplayedImageObjectHeight), "%");
        if(tempDisplayedImageObjectHeightPercent GT 0,
          txtreplace(tempDisplayedImageObjectHeight, '%', '');
          mul(tempDisplayedImageObjectHeight, get(stageheight));
          div(tempDisplayedImageObjectHeight, 100);
          Math.round(tempDisplayedImageObjectHeight);
        );
        mul(flyingImgWidth,get(layer[displayedStandardImage].fullwidth),get(tempDisplayedImageObjectHeight));
        div(flyingImgWidth,get(layer[displayedStandardImage].fullheight));
        Math.round(flyingImgWidth);
        set(layer[displayedStandardImage].imgwidth , get(flyingImgWidth));
        set(layer[displayedStandardImage].imgheight, get(tempDisplayedImageObjectHeight));
      ,
        if(layer[displayedStandardImage].imgheight == "prop",
          set(tempDisplayedImageObjectWidth, get(layer[displayedStandardImage].imgwidth));
          indexoftxt(tempDisplayedImageObjectWidthPercent, get(tempDisplayedImageObjectWidth), "%");
          if(tempDisplayedImageObjectWidthPercent GT 0,
            txtreplace(tempDisplayedImageObjectWidth, '%', '');
            mul(tempDisplayedImageObjectWidth, get(stagewidth));
            div(tempDisplayedImageObjectWidth, 100);
            Math.round(tempDisplayedImageObjectWidth);
          );
          mul(flyingImgHeight,get(layer[displayedStandardImage].fullheight),get(tempDisplayedImageObjectWidth));
          div(flyingImgHeight,get(layer[displayedStandardImage].fullwidth));
          Math.round(flyingImgHeight);
          set(layer[displayedStandardImage].imgwidth , get(tempDisplayedImageObjectWidth));
          set(layer[displayedStandardImage].imgheight , get(flyingImgHeight));
        ,
          set(tempDisplayedImageObjectWidth, get(layer[displayedStandardImage].imgwidth));
          set(tempDisplayedImageObjectHeight, get(layer[displayedStandardImage].imgheight));
          indexoftxt(tempDisplayedImageObjectWidthPercent, get(tempDisplayedImageObjectWidth), "%");
          indexoftxt(tempDisplayedImageObjectHeightPercent, get(tempDisplayedImageObjectHeight), "%");
          if(tempDisplayedImageObjectWidthPercent GT 0,
            txtreplace(tempDisplayedImageObjectWidth, '%', '');
            mul(tempDisplayedImageObjectWidth, get(stagewidth));
            div(tempDisplayedImageObjectWidth, 100);
            Math.round(tempDisplayedImageObjectWidth);
          );
          if(tempDisplayedImageObjectHeightPercent GT 0,
            txtreplace(tempDisplayedImageObjectHeight, '%', '');
            mul(tempDisplayedImageObjectHeight, get(stageheight));
            div(tempDisplayedImageObjectHeight, 100);
            Math.round(tempDisplayedImageObjectHeight);
          );
          set(layer[displayedStandardImage].imgwidth , get(tempDisplayedImageObjectWidth));
          set(layer[displayedStandardImage].imgheight, get(tempDisplayedImageObjectHeight));
        );
      );
    ,
      set(layer[displayedStandardImage].imgwidth , get(layer[displayedStandardImage].fullwidth));
      set(layer[displayedStandardImage].imgheight, get(layer[displayedStandardImage].fullheight));
    );
    
    set(resizedwidth, get(layer[displayedStandardImage].imgwidth));
    set(resizedheight, get(layer[displayedStandardImage].imgheight));
    if(layer[displayedStandardImage].applyratio,
      sub(resizedstagewidth, get(stagewidth), get(layer[displayedStandardImage].x));
      sub(resizedstageheight, get(stageheight), get(layer[displayedStandardImage].y));
      Math.abs(resizedstagewidth);
      Math.abs(resizedstageheight);
      if(resizedwidth GT resizedstagewidth,
        mul(tempresizedheight, get(resizedheight), get(resizedstagewidth));
        div(tempresizedheight, get(resizedwidth));
        Math.round(tempresizedheight);
        set(resizedwidth, get(resizedstagewidth));
        set(resizedheight, get(tempresizedheight));
      );
      if(resizedheight GT resizedstageheight,
        mul(tempresizedwidth, get(resizedwidth), get(resizedstageheight));
        div(tempresizedwidth, get(resizedheight));
        Math.round(tempresizedwidth);
        set(resizedheight, get(resizedstageheight));
        set(resizedwidth, get(tempresizedwidth));
      );
    );
    
    if(layer[displayedStandardImage].animated,
      set(layer[displayedStandardImage].animated, false);
      tween(layer[displayedStandardImage].width , get(resizedwidth), 1, easeOutQuad);
      tween(layer[displayedStandardImage].height, get(resizedheight), 1, easeOutQuad);
    ,
      set(layer[displayedStandardImage].width , get(resizedwidth));
      set(layer[displayedStandardImage].height, get(resizedheight));
    );
    if(layer[displayedStandardImage].overlay,set(layer[displayedStandardImageOverlay].visible, true););
    set(layer[displayedStandardImage].visible, true);
    ,
      delayedcall(0.2,resizeDisplayedImageObject(););
    );
  </action>
  <events name="displayedImageObjectEvents" keep="true" onremovedisplayedobject="displayedImageObjectOnRemoveDisplayedObject" onresize="if(layer[displayedStandardImage],resizeDisplayedImageObject());" />
  <action name="displayedImageObjectOnRemoveDisplayedObject">
    ifnot(layer[displayedStandardImage].currentCall,if(layer[displayedStandardImage].visible,resumeautorotation(forcehotspot);

      if(layer[displayedStandardImage].overlay,removelayer(displayedStandardImageOverlay););
      removelayer(displayedStandardImage);
    ););
  </action>


  <!-- Fullscreen Management -->
  <action name="exitFullScreen" devices="fullscreensupport">set(tour_fullscreen,false);js(setFullscreen(false));</action>
  <action name="enterFullScreen" devices="fullscreensupport">set(tour_fullscreen,true);js(setFullscreen(true));</action>
  <action name="switchFullScreen">if(tour_fullscreen,exitFullScreen();,enterFullScreen(););</action>

  
  <events name="krpanoExitFullscreenEvent"
    onexitfullscreen="if(tour_fullscreen,exitFullScreenChangeEvent(););"
    keep="true" />

  <action name="exitFullScreenChangeEvent" devices="fullscreensupport">set(tour_fullscreen,false);events.dispatch(onexitfullscreen);</action>
  <action name="enterFullScreenChangeEvent" devices="fullscreensupport">set(tour_fullscreen,true);events.dispatch(onenterfullscreen);</action>
  <action name="exitFullScreenFallback">set(fullscreen,false);</action>
  <action name="enterFullScreenFallback">set(fullscreen,true);</action>
  
  <action name="resizeFullScreenEvent">delayedcall(0,updatescreen(););</action>

</krpano>