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

    
  <!-- Spot Style - Default Point Spot Style -->


  <style name="IconDefaultPointSpotStyle"
         url="%FIRSTXML%/spots/hotspot_plan_user_defaultpoint0.png"
         visible="false"
         edge="center"


         />



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


    
  <!-- Spot Style - tabeles -->


  <style name="Icontabeles"
         url="%FIRSTXML%/spots/hotspot_animated_user_defaultpoint1.png"
         visible="false"
         frame="0"
         lastframe="19"
         framewidth="64"
         frameheight="64"
         stopspotsequence="false"
         crop="0|0|64|64"
         edge="center"
         onloaded="startspotanimation(0.1);"
         onhover="onhoverIcontabeles"
         onout="onoutIcontabeles"


         />
  <action name="onhoverIcontabeles">
    showtooltip('hotspot');
  </action>
  <action name="onoutIcontabeles">
    hideTooltip();



  </action>



<!-- ********** -->
<!-- Blow Up -->
<!-- id : Blowup -->
<!-- ********** -->
<!-- Blowup 2.1.1 - Copyright Panotourplugin.com - 2019 - It is possible to modify the files but it is not allowed to resell the plugin or parts of code. -->
<!-- Code Maurizio Chiocchetti   -->


<include url="%FIRSTXML%/graphics/blowup/blowupcore.xml" />

<action name="Blowupconvert" type="Javascript" >
  <![CDATA[
var krpano = document.getElementById("krpanoSWFObject");

var decodeEntities = (function() {

  var element = document.createElement('div');
  function decodeHTMLEntities (str) {
    if(str && typeof str === 'string') {
      // strip script/html tags
      str = str.replace(/<script[^>]*>([\S\s]*?)<\/script>/gmi, '');
      str = str.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gmi, '');
      element.innerHTML = str;
      str = element.textContent;
      element.textContent = '';
    }

    return str;
  }

  return decodeHTMLEntities;
})();

var text = decodeEntities(args[1]);
krpano.set('Blowuphsho2', text);

 ]]>
 </action>

<action name="Blowupgo">
if (tour_displayspots,
for(set(Blowupai,0), Blowupai LT hotspot.count, inc(Blowupai),

if(hotspot[get(Blowupai)].style == "Icontabeles",
set(Blowupaaname, get(hotspot[get(Blowupai)].name));
Blowupget_thumb(get(Blowupaaname));
);
);
);
</action>

<action name="Blowupremove">

for(set(Blowupaai,0), Blowupaai LT hotspot.count, inc(Blowupaai),

if(hotspot[get(Blowupaai)].style == "Icontabeles",
set(Blowupraaname, get(hotspot[get(Blowupaai)].name));
Blowupremove_(get(Blowupraaname));
Blowuphide(get(Blowupraaname));
);
);
</action>



<action name="Blowupshow">
if(autorotate.enabled,
pauseautorotation(forceplugin););
set(hotspot[BlowupHotspot_Ghost%1].visible, true);
set(layer[Blowuptitle%1].visible, true);
set(layer[Blowupdescription%1].visible, true);
set(layer[Blowupbox%1].visible, true);
set(layer[BlowupImage%1].visible, true);
set(layer[BlowupBoxPict%1].visible, true);
</action>

<action name="Blowuphide">
if(autorotate.enabled == false,
resumeautorotation(forceplugin);
);
set(hotspot[BlowupHotspot_Ghost%1].visible, false);
set(layer[Blowuptitle%1].visible, false);
set(layer[Blowupdescription%1].visible, false);
set(layer[Blowupbox%1].visible, false);
set(layer[BlowupImage%1].visible, false);
set(layer[BlowupBoxPict%1].visible, false);
</action>






<action name="Blowupget_thumb" >

set(hotspot[%1].handcursor,true);
set(hotspot[%1].enabled,true);
set(hotspot[%1].capture,true);


set(hotspot[%1].onhover,
Blowupshow(%1);
Blowupgo2(%1);
);


set(hotspot[%1].onout,
Blowuphide(%1);

hideTooltip();
tween(hotspot[%1].scale,1,0.5);
);


<!--set(hotspot[%1].onup,
Blowuphide(%1);
hideTooltip();

);-->

</action>

<action name="Blowupgo2">


add(BlowupmarginW, 20 , 300);
add(BlowupmarginH, 150 , 20);

set(Blowuptul,get(hotspot[%1].linktarget));
set(Blowuptu, get(scene[get(Blowuptul)].thumburl));
if(Blowuptu == null,
set(Blowuptu, get(panoramagroup[get(Blowuptul)].thumburl));
);


set(BlowupHH_center, calc(0++20  + (20*2)));

set(BlowupHH, calc(0 + 150 + (20*2)));

set(Blowuplarghezza, calc(0 + 300 + (20*2)));

<!--set(BlowupPOSX, calc(0 + (20*2)));-->

set(BlowupPOSY, calc( 0 + 20 -10));





set(layer[Blowupdescription%1].width, calc(0 +  250 + (20*2)));
set(layer[Blowuptitle%1].width,300);
set(layer[Blowupbox%1].height, get(BlowupHH_center));
set(layer[Blowupbox%1].width, get(Blowuplarghezza));
set(layer[BlowupBoxPict%1].x,0);
set(layer[Blowupdescription%1].x,get(BlowupPOSX));

set(layer[BlowupBoxPict%1].y,calc(20 + 20));
set(layer[Blowupdescription%1].edge,center);
set(layer[Blowupdescription%1].align,center);
set(layer[Blowupdescription%1].y,0);

set(layer[BlowupBoxPict%1].edge,bottom);
set(layer[BlowupBoxPict%1].align,bottom);







hideTooltip();

set(Blowupax, get(hotspot[%1].ath));
set(Blowupay, get(hotspot[%1].atv));

set(hotspot[%1].handcursor,true);
set(hotspot[%1].visible,true);
set(hotspot[%1].enabled,true);
set(hotspot[%1].capture,true);
set(hotspot[%1].edge,center);
set(hotspot[%1].align,center);


addhotspot(BlowupHotspot_Ghost%1);
set(hotspot[BlowupHotspot_Ghost%1].visible, true);
set(hotspot[BlowupHotspot_Ghost%1].capture, true);
set(hotspot[BlowupHotspot_Ghost%1].zoom, false);
set(hotspot[BlowupHotspot_Ghost%1].zorder2, 100 );
set(hotspot[BlowupHotspot_Ghost%1].zorder, 100 );
set(hotspot[BlowupHotspot_Ghost%1].ath,get(Blowupax));
set(hotspot[BlowupHotspot_Ghost%1].distorted,false);
set(hotspot[BlowupHotspot_Ghost%1].atv,get(Blowupay));
set(hotspot[BlowupHotspot_Ghost%1].width, get(BlowupmarginW));
set(hotspot[BlowupHotspot_Ghost%1].height, get(BlowupmarginH));
set(hotspot[BlowupHotspot_Ghost%1].keep,true);
set(hotspot[BlowupHotspot_Ghost%1].url, '%FIRSTXML%/graphics/blowup/white.png');

set(hotspot[BlowupHotspot_Ghost%1].enable,true);
set(hotspot[BlowupHotspot_Ghost%1].bgalpha,1);
set(hotspot[BlowupHotspot_Ghost%1].ox,0);
set(Blowupbobo,get(layer[Blowupbox%1].height));
set(hotspot[BlowupHotspot_Ghost%1].oy,calc((30  + (Blowupbobo / 2 )) *-1));

addlayer(Blowupbox%1);
set(layer[Blowupbox%1].bgalpha,0.7000076295109483);
set(layer[Blowupbox%1].bgcolor, 0xffffff);
set(layer[Blowupbox%1].visible, true);
set(layer[Blowupbox%1].align, center);
set(layer[Blowupbox%1].edge, center);
<!--set(layer[Blowupbox%1].scale,get(Blowupmyscale));-->
set(layer[Blowupbox%1].scale,1);
set(layer[Blowupbox%1].scalechildren,true);

set(layer[Blowupbox%1].bgborder, 0 0x000000 1);
set(layer[Blowupbox%1].bgshadow, 0 0 0 0 000000 0.7000076295109483);
set(layer[Blowupbox%1].bgroundedge, 90);
set(layer[Blowupbox%1].capture, true);
set(layer[Blowupbox%1].y,0);
set(layer[Blowupbox%1].x,0);
set(layer[Blowupbox%1].enabled, true);
set(layer[Blowupbox%1].keep, true);
set(layer[Blowupbox%1].type, container);

set(layer[Blowupbox%1].parent,hotspot[BlowupHotspot_Ghost%1]);




getmessage(Blowuphsho, get(hotspot[%1].descriptionID));

getmessage(Blowuphshot, get(scene[get(Blowuptul)].titleid));
set(Blowuptestyes,true);
if(Blowuphsho !== null
,
set(hotspot[BlowupHotspot_Ghost%1].height,150
);,);

addlayer(Blowupdescription%1);

set(layer[Blowupdescription%1].height,20);
set(layer[Blowupdescription%1].handcursor, false);
set(layer[Blowupdescription%1].width,250);
set(layer[Blowupdescription%1].type,text);
set(layer[Blowupdescription%1].vcenter,
false );
set(layer[Blowupdescription%1].zorder,1);
set(layer[Blowupdescription%1].bgroundedge, 90);




Blowupconvert(get(Blowuphsho));
set(layer[Blowupdescription%1].onloaded,Blowupadd_html_code(get(Blowuphsho),20,%1));




set(layer[Blowupdescription%1].css,padding:0px; );
set(layer[Blowupdescription%1].parent,layer[Blowupbox%1]);
set(layer[Blowupdescription%1].bgalpha,0);
set(layer[Blowupdescription%1].bgcolor,0xffffff);




</action>
<events name="Blowupstascale"
keep="true"
onresize="Blowupremove();Blowuprespo();"

/>
<action name="Blowuprespo">

set(BlowupstageSize, stagewidth);

set(Blowupmyscale, calc(stagewidth / 1000));
clamp(Blowupmyscale, 0.6,1);

  </action>


<action name="Blowupremove_">

set(hotspot[BlowupHotspot_Ghost%1].visible, false);
hideTooltip();
removehotspot(BlowupHotspot_Ghost%1);
removelayer(Blowupbox%1);
removelayer(BlowupImage%1);
removelayer(BlowupBoxPict%1);
removelayer(Blowupdescription%1);
removelayer(Blowuptitle%1);
removelayer(Blowupclose%1);

  </action>

<action name="Blowupstopvideo" type="javascript" >
  <![CDATA[
  $("iframe").addClass("Blowupyt_player_iframe");
    $('.Blowupyt_player_iframe').each(function(){
  this.contentWindow.postMessage('{"event":"command","func":"stopVideo","args":""}', '*')
});
  ]]>
  </action>
<action name="Blowupautoplayvideo" type="javascript" >
  <![CDATA[

    $('.Blowupyt_player_iframe').each(function(){
  this.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}', '*')
});
  ]]>
  </action>

<action name="Blowupadd_html_code" type="Javascript"><![CDATA[

        var div = document.createElement("div");

        div.style.webkitUserSelect = "text"
        div.style.MozUserSelect = "text"
        div.style.msUserSelect = "text"
        div.style.userSelect = "text";

        var nam = "myID" + args[3];


        div.setAttribute("id",nam);
        div.setAttribute("style", " -moz-user-select: text;-webkit-user-select: text;-ms-user-select: text;user-select: text; color:#383bff; font-Family:Times New Roman; overflow:auto; width:100%; height:100%; font-size:calc(14px + 0.2vw); box-sizing:border-box; padding-top:0px; padding-right:0px; padding-bottom: 0px;padding-left: 0px; text-align:center; font-weight:bold;font-style:normal;" );

        div.addEventListener("mousewheel", function(event){ event.stopPropagation(); }, true);
        div.addEventListener("DOMMouseScroll", function(event){ event.stopPropagation(); }, true);
        div.addEventListener("touchstart", function(event){ if(krpano.device.ios && window.innerHeight == krpano.display.htmltarget.offsetHeight){ /* avoid the iOS 'overscrolling' for fullpage viewers */ var bs = document.body.parentNode.style; bs.position="fixed"; bs.top=0; bs.left=0; bs.right=0; bs.bottom=0; } krpano.control.preventTouchEvents = false; event.stopPropagation(); }, true);
        div.addEventListener("touchend", function(event){ krpano.control.preventTouchEvents = true; event.stopPropagation(); }, true);
        div.addEventListener("gesturestart", function(event){ event.preventDefault(); }, true);

        // add some html code:
        div.innerHTML = args[1];

        // add the div to the layer element:
        caller.sprite.appendChild(div);





 ]]></action>





// TODO: Bloup, create actions for open blowup external

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

  <!-- MAP -->
  <action name="hideMap">set(tour_displaymap, false);events.dispatch(onhidetourmap);</action>
  <action name="showMap">set(tour_displaymap, true); events.dispatch(onshowtourmap);</action>

<action name="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="setTourLanguage">
  if (%1 == null,
    showlog();
    trace("CHANGE TOUR LANGUAGE : NO LANGUAGE SET");
   ,
    set(tour_language, %1);
    js(eventTourChangeLanguage(get(tour_language)));
    events.dispatch(changetourlanguage);
  );
</action>

</krpano>