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

<!-- ********** -->
<!-- Indicateur de Chargement -->
<!-- id : loaderinfo -->
<!-- ********** -->

  <events name="loaderinfoevent" onxmlcomplete="loaderinfoupdate();" keep="true"/>

  <action name="loaderinfoupdate">
    if(scene[get(xml.scene)].video,
      set(layer[loaderinfotextfield].visible, false);
    ,
      if (progress.progress == 1,
        delayedcall(0.5, set(layer[loaderinfotextfield].visible, false); );
      ,
        set(layer[loaderinfotextfield].visible, true);
      );
      mul(progresstext, get(progress.progress),100);
      roundval(progresstext);
      txtadd(progresstext, get(progresstext), %);
      set(layer[loaderinfotextfield].html, get(progresstext));
      ifnot(progress.progress GE 1, delayedcall(0.01, loaderinfoupdate() ));
    );
  </action>

  <layer name="loaderinfotextfield"
         keep="true"
         zorder="1"
         type="text"
         align="center"
         x="0"
         y="0"
         bgborder="0"
         bg="false"
         capture="false"
         handcursor="false"
         interactivecontent="false"
         alpha="1"
         visible="true"
         css="
         text-align:center;
         color:#ff0000;
         font-family:Arial;
         font-weight:bold;
         font-size:72px;
         "
  />

<!-- ********** -->
<!-- Barre de contrôle classique -->
<!-- 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.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);
    );






    if(plugin[ptpvrmode] AND device.html5,
      set(layer[controlBar_classicbtn_enter_vr].x, get(controlBar_classicbutton_pos));
      set(layer[controlBar_classicbtn_enter_vr_not].x, get(controlBar_classicbutton_pos));
      inc(controlBar_classicbutton_pos, 36);
    );



    if (device.desktop,
        set(layer[controlBar_classicbtn_right].x, get(controlBar_classicbutton_pos));
        inc(controlBar_classicbutton_pos, 36);
        set(layer[controlBar_classicbtn_left].x, get(controlBar_classicbutton_pos));
        inc(controlBar_classicbutton_pos, 36);
    );
    if (device.desktop,
        set(layer[controlBar_classicbtn_down].x, get(controlBar_classicbutton_pos));
        inc(controlBar_classicbutton_pos, 36);
        set(layer[controlBar_classicbtn_up].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);
    );


    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_classicbutton_pos));
		set(layer[controlBar_classicmenu_controlbar_bg].width, get(controlBar_classicbutton_pos));
		controlBar_classicshowMenuControls();
	</action>



  <style name="controlBar_classic_btn_style"
         keep="true"
         alpha="0.8"
         edge="right" align="right"
         width="36" height="36"
         zorder="4"
         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="2"
         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="3"
         width="40"
         height="40"
         visible="false"
         alpha="1.0"
         >



    <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_left"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_move_left.png"
            ondown="viewControlMoveLeft(false);
"
            onup="viewControlMoveHoriStop();
"
            style="controlBar_classic_btn_style"
            tooltip="controlBar_classicmoveLeftTip"
            devices="desktop"
            visible="false"
            />
    <layer name="controlBar_classicbtn_right"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_move_right.png"
            ondown="viewControlMoveRight(false);
"
            onup="viewControlMoveHoriStop();
"
            style="controlBar_classic_btn_style"
            tooltip="controlBar_classicmoveRightTip"
            devices="desktop"
            visible="false"
            />

    <layer name="controlBar_classicbtn_up"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_move_up.png"
            ondown="viewControlMoveUp(false);
"
            onup="viewControlMoveVertStop();
"
            style="controlBar_classic_btn_style"
            tooltip="controlBar_classicmoveUpTip"
            devices="desktop"
            visible="false"
            />
    <layer name="controlBar_classicbtn_down"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_move_down.png"
            ondown="viewControlMoveDown(false);
"
            onup="viewControlMoveVertStop();
"
            style="controlBar_classic_btn_style"
            tooltip="controlBar_classicmoveDownTip"
            devices="desktop"
            visible="false"
            />





    <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_enter_vr"
           url="%FIRSTXML%/graphics/classiccontrolbar/btn_vr_mode.png"
           onclick="if(scene[get(xml.scene)].full360 AND disableCurrentSceneVrConservation !== true,
    js(accessWebVr(get(xml.scene),get(videoscenestarttime)));
,
    js(accessWebVr(null));
);"
           style="controlBar_classic_btn_style"
           visible="false"
           devices="html5"
           tooltip="controlBar_classicenterVRTip"
           />
    <layer name="controlBar_classicbtn_enter_vr_not"
           url="%FIRSTXML%/graphics/classiccontrolbar/btn_vr_mode_off.png"
           style="controlBar_classic_btn_style"
           enabled="true"
           capture="false"
           visible="false"
           devices="html5"
           tooltip="controlBar_classicenterVRNotTip"
           />



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


<events name="controlBar_classicvravailableevent"
		onvravailable="controlBar_classicupdateVrButtonsAvailability();"
		onvrunavailable="controlBar_classicupdateVrButtonsAvailability();"
		keep="true" devices="html5" />
	<krpano controlBar_classicmenuvravailable="false" />
	<action name="controlBar_classicupdateVrButtonsAvailability">
		if (tour_vrdevices,
			set(controlBar_classicmenuvravailable, true);
		,
			set(controlBar_classicmenuvravailable, false);
		);
		controlBar_classicupdateVrButtons();
	</action>
	<action name="controlBar_classicHideVrButtons">
		set(layer[controlBar_classicbtn_enter_vr].visible, false);
		if('%1' == 'true' AND plugin[ptpvrmode],
			set(layer[controlBar_classicbtn_enter_vr_not].visible, true);
		,
			set(layer[controlBar_classicbtn_enter_vr_not].visible, false);
		);
	</action>
	<action name="controlBar_classicShowVrButtons">
		if (controlBar_classicmenuvravailable,
			set(layer[controlBar_classicbtn_enter_vr].visible, true);
			set(layer[controlBar_classicbtn_enter_vr_not].visible, false);
		,
			controlBar_classicHideVrButtons(true);
		);
	</action>
	<action name="controlBar_classicupdateVrButtons">
	if (tour_vrdevices,
		if (controlBar_classicIsOpened,
			controlBar_classicShowVrButtons();
		,
			controlBar_classicHideVrButtons();
		);
	,
		if (controlBar_classicIsOpened,
			controlBar_classicHideVrButtons(true);
		,
			controlBar_classicHideVrButtons();
		);
	);
	</action>



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



    set(layer[controlBar_classicbtn_up].visible  , false);
    set(layer[controlBar_classicbtn_down].visible, false);
    set(layer[controlBar_classicbtn_right].visible, false);
    set(layer[controlBar_classicbtn_left].visible , false);
    set(layer[controlBar_classicbtn_in].visible , false);
    set(layer[controlBar_classicbtn_out].visible, false);






    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_up].visible  , true);
    set(layer[controlBar_classicbtn_down].visible, true);
    );
    if (device.desktop,
    set(layer[controlBar_classicbtn_right].visible, true);
    set(layer[controlBar_classicbtn_left].visible , true);
    );
    if (device.desktop,
    set(layer[controlBar_classicbtn_in].visible , true);
    set(layer[controlBar_classicbtn_out].visible, true);
    );






    controlBar_classicupdateFullscreenButtons();

    controlBar_classicupdateVrButtons();



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




<layer name="controlBar_classicmenuTooltipStyle"
	keep="true"
	enabled="false"
	capture="false"
	type="text"
	align="center"
	bg="false"
	bgborder="0"
	txtshadow="1.0 1.0 4.0 0x000000 1"
	css="color:#e6e6e6;font-family:Helvetica;font-weight:bold;font-size:14px;text-align:left;"
	interactivecontent="false"
	zorder="0"
	visible="false"
	html=""
	padding="2"
	xoffset="0"
	yoffset="0"
	edge="bottom"
	/>



<!-- ********** -->
<!-- Barre de miniatures Classique -->
<!-- id : thumbnailsBar-theme02 -->
<!-- ********** -->






<layer name="thumbnailsBar_thumbnailsBar_theme02" 
	keep="true" 
	type="image" 
	visible="false"
	align="left" 
	
		width="0" 
		height="95%" 
		
	
	x="10"
	y="0"
	
	url="%FIRSTXML%/graphics/classicthumbnailsbar/frame_bg.png" 
	scale9grid="10|10|80|80"
	
	zorder="5"
/>


<layer name="thumbnailBorderSource_thumbnailsBar_theme02"
	keep="true"
	visible="false"
	onloaded="loadedImages_thumbnailsBar_theme02(border);"
	url="%FIRSTXML%/graphics/classicthumbnailsbar/thumbnails_states.png" 
	offsetX="10"
	offsetY="10"
	quarterHeight="0"
/>

  <layer name="tooltipStyle_thumbnailsBar_theme02"
	       keep="true"
	       enabled="false"
         capture="false"
	       type="text"
         align="center"
         bg="false"
         bgborder="0"
         txtshadow="1.0 1.0 4.0 0x000000 1"
         css="color:#e6e6e6;font-family:Helvetica;font-weight:bold;font-size:14px;text-align:left;"
         interactivecontent="false"
         zorder="0"
         padding="2"
         xoffset="0"
         yoffset="0"
         visible="false"
         html=""
         edge="left"
         />

	
	<krpano arrow1Loaded_thumbnailsBar_theme02="false" arrow2Loaded_thumbnailsBar_theme02="false" borderLoaded_thumbnailsBar_theme02="false" thumbnailsLoadedCounter_thumbnailsBar_theme02="0" thumbsCount_thumbnailsBar_theme02="0" thumbsCounter_thumbnailsBar_theme02="0" firstInit_thumbnailsBar_theme02="false" />
	
	
	<events name="thumbnailsScrollEvents_thumbnailsBar_theme02" 
		keep="true" 
		
		onxmlcomplete="ifnot(startResize_thumbnailsBar_theme02,set(isLoaded_thumbnailsBar_theme02, true);if(isStarted_thumbnailsBar_theme02,onLoadCompleteHandler_thumbnailsBar_theme02();););"
		onTourStart="set(isStarted_thumbnailsBar_theme02, true);if(isLoaded_thumbnailsBar_theme02,onLoadCompleteHandler_thumbnailsBar_theme02(););"
		onnewpano="if(startResize_thumbnailsBar_theme02,if(firstInit_thumbnailsBar_theme02,onLoadCompleteHandler_thumbnailsBar_theme02();););"
		onresize="onResizeHandler_thumbnailsBar_theme02();"
		hidetourthumbnails="hideWithThumbnailsButton_thumbnailsBar_theme02();" 
		showtourthumbnails="showWithThumbnailsButton_thumbnailsBar_theme02();" 
		hidetourcontrols="hideWithControlsBar_thumbnailsBar_theme02();" 
		showtourcontrols="showWithControlsBar_thumbnailsBar_theme02();" 
		onenterfullscreen="delayedcall(0.2,scrollToCurrentThumb_thumbnailsBar_theme02(););"
		onexitfullscreen="delayedcall(0.2,scrollToCurrentThumb_thumbnailsBar_theme02(););"
    changetourlanguage="updateTitles_thumbnailsBar_theme02();"	
	/>
	
	
	<layer name="scrollAreaContainer_thumbnailsBar_theme02" 
         keep="true"
         type="container" 
         align="topleft" x="5" y="5"
         marginX="5"
         marginY="5"
         width="0" height="0"
         targetWidth="0"
         targetHeight="0"
         scrollSpeedInit="10"
         scrollSpeed="10"
         scrollSpeedMax="70"
         scrollSpeedAcceleration="20"
         parent="thumbnailsBar_thumbnailsBar_theme02"
         thumbWidth="0"
         thumbHeight="0"
         itemWidth="100"
         itemHeight="101"
         offsetX="0" offsetY="0"
         thumbSpacer="0"
         currentThumbsCount="0"
         adjustToContent="false"
         zorder="1"
         visible="false"
         ready="false">
	
		
    <layer name="thumbsScrollArea_thumbnailsBar_theme02"
           url.flash="%FIRSTXML%/graphics/scrollarea.swf"
           url.html5="%FIRSTXML%/graphics/scrollarea.js"
           align="left" x="0" y="0"
           onhover_autoscrolling="false"
           direction="v"/>
	
	</layer>
	
	
	<layer name="scrollPrevArrow_thumbnailsBar_theme02" 
         keep="true"
         type="image"
         visible="false"
         parent="thumbnailsBar_thumbnailsBar_theme02"
         targetHeight="0"
         targetWidth="0"
         zorder="2"
         onloaded="loadedImages_thumbnailsBar_theme02(arrow1);"
         url="%FIRSTXML%/graphics/classicthumbnailsbar/btn_scroll_up.png"
         align="top"
	/>
	
	
	<layer name="scrollNextArrow_thumbnailsBar_theme02" 
         keep="true"
         type="image"
         visible="false"
         parent="thumbnailsBar_thumbnailsBar_theme02"
         targetHeight="0"
         targetWidth="0"
         zorder="2"
         onloaded="loadedImages_thumbnailsBar_theme02(arrow2);"
         url="%FIRSTXML%/graphics/classicthumbnailsbar/btn_scroll_down.png"
         align="bottom"
	/>
	
	<action name="loadedImages_thumbnailsBar_theme02">
		if(%1 == "arrow1",
			set(arrow1Loaded_thumbnailsBar_theme02, true);
		);
		if(%1 == "arrow2",
			set(arrow2Loaded_thumbnailsBar_theme02, true);
		);
		if(%1 == "border",
			if(layer[thumbnailBorderSource_thumbnailsBar_theme02].url,
				set(borderLoaded_thumbnailsBar_theme02, true);
			);
		);
		if(%1 == "thumbnail",
			inc(thumbnailsLoadedCounter_thumbnailsBar_theme02);
		);
	</action>
	
	<action name="onLoadCompleteHandler_thumbnailsBar_theme02">
		
		set(thumbsCount_thumbnailsBar_theme02, 0);
		
		
		set(thumbsCount_thumbnailsBar_theme02, get(scene.count));
		
		
		
		
		
		
		
		loadThumbs_thumbnailsBar_theme02();
		
		if(firstInit_thumbnailsBar_theme02,
			onLoadCompleteHandlerPartThree_thumbnailsBar_theme02();
		,
			onLoadCompleteHandlerPartTwo_thumbnailsBar_theme02();
		);
	</action>
	
	<action name="onLoadCompleteHandlerPartTwo_thumbnailsBar_theme02">
		set(imgCounter_thumbnailsBar_theme02, 3);
		
		if(arrow1Loaded_thumbnailsBar_theme02,
			dec(imgCounter_thumbnailsBar_theme02);
		);
		if(arrow2Loaded_thumbnailsBar_theme02,
			dec(imgCounter_thumbnailsBar_theme02);
		);
		if(thumbsCount_thumbnailsBar_theme02 == thumbnailsLoadedCounter_thumbnailsBar_theme02,
			dec(imgCounter_thumbnailsBar_theme02);
		);
		
		if(imgCounter_thumbnailsBar_theme02 LE 0,
			stopdelayedcall(delayedCallOnLoadComplete_thumbnailsBar_theme02);
			onLoadCompleteHandlerPartThree_thumbnailsBar_theme02();
		,
			delayedcall(delayedCallOnLoadComplete_thumbnailsBar_theme02, 0.2, onLoadCompleteHandlerPartTwo_thumbnailsBar_theme02());
		);
	</action>
	
	<action name="onLoadCompleteHandlerPartThree_thumbnailsBar_theme02">
		resetMouseBehavior_thumbnailsBar_theme02();
		highlightCurrentThumb_thumbnailsBar_theme02();
		
		
		if(layer[scrollAreaContainer_thumbnailsBar_theme02].adjustToContent,
			mul(adjustWidth_thumbnailsBar_theme02, get(layer[scrollAreaContainer_thumbnailsBar_theme02].marginX), 2);
			add(adjustWidth_thumbnailsBar_theme02, get(layer[thumbsScrollArea_thumbnailsBar_theme02].width));
			mul(adjustHeight_thumbnailsBar_theme02, get(layer[scrollAreaContainer_thumbnailsBar_theme02].marginY), 2);
			add(adjustHeight_thumbnailsBar_theme02, get(layer[thumbsScrollArea_thumbnailsBar_theme02].height));
			
			
			if(adjustWidth_thumbnailsBar_theme02 GT stagewidth,
				set(adjustWidth_thumbnailsBar_theme02, get(stagewidth));
				set(layer[scrollAreaContainer_thumbnailsBar_theme02].adjustToContent, false);
			,
				if(adjustHeight_thumbnailsBar_theme02 GT stageheight,
					set(adjustHeight_thumbnailsBar_theme02, get(stageheight));
					set(layer[scrollAreaContainer_thumbnailsBar_theme02].adjustToContent, false);
				);
			);
			
			setSize_thumbnailsBar_theme02(get(adjustWidth_thumbnailsBar_theme02), get(adjustHeight_thumbnailsBar_theme02));
		);
		
		setupArrows_thumbnailsBar_theme02(true);
		
		
		if (thumbsCounter_thumbnailsBar_theme02 LE 0,
			set(layer[thumbnailsBar_thumbnailsBar_theme02].visible, false);
		);
		
		
		set(startResize_thumbnailsBar_theme02, true);
		set(firstInit_thumbnailsBar_theme02, true);
	</action>
	
	
	<action name="onResizeHandler_thumbnailsBar_theme02">
		
		delayedcall(0.1, onResizeCallback_thumbnailsBar_theme02(false); );
	</action>
	
	
	<action name="onResizeCallback_thumbnailsBar_theme02">
		if(startResize_thumbnailsBar_theme02,
			setSize_thumbnailsBar_theme02(get(layer[scrollAreaContainer_thumbnailsBar_theme02].targetWidth), get(layer[scrollAreaContainer_thumbnailsBar_theme02].targetHeight));
			setupArrows_thumbnailsBar_theme02(%1);
			
			
			if (thumbsCounter_thumbnailsBar_theme02 LE 0,
				set(layer[thumbnailsBar_thumbnailsBar_theme02].visible, false);
			);
		);
	</action>
	
	
		<action name="showWithThumbnailsButton_thumbnailsBar_theme02">
			set(layer[thumbnailsBar_thumbnailsBar_theme02].visible, true);
			onResizeCallback_thumbnailsBar_theme02(true);
		</action>
		
		<action name="hideWithThumbnailsButton_thumbnailsBar_theme02">
			set(layer[thumbnailsBar_thumbnailsBar_theme02].visible, false);
		</action>
	
	
		<action name="showWithControlsBar_thumbnailsBar_theme02">
			
				if (tour_displaythumbnails,
					set(layer[thumbnailsBar_thumbnailsBar_theme02].visible, true);
					onResizeCallback_thumbnailsBar_theme02(true);
				,
					set(layer[thumbnailsBar_thumbnailsBar_theme02].visible, false);
				);
		</action>
		
		<action name="hideWithControlsBar_thumbnailsBar_theme02">
			set(layer[thumbnailsBar_thumbnailsBar_theme02].visible, false);
		</action>
	
	
	<action name="thumbnailBorderDrawInit_thumbnailsBar_theme02">
		
		set(layer[scrollAreaContainer_thumbnailsBar_theme02].offsetX, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].borderWidth));
		set(layer[scrollAreaContainer_thumbnailsBar_theme02].offsetY, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].borderWidth));
		
		
		mul(totalOffsetX_thumbnailsBar_theme02, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].borderWidth), 2);
		mul(totalOffsetY_thumbnailsBar_theme02, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].borderWidth), 2);
		
		
		if(startResize_thumbnailsBar_theme02,
			sub(layer[scrollAreaContainer_thumbnailsBar_theme02].itemWidth, get(totalOffsetX_thumbnailsBar_theme02));
			sub(layer[scrollAreaContainer_thumbnailsBar_theme02].itemHeight, get(totalOffsetY_thumbnailsBar_theme02));
		);
		
		
		set(layer[scrollAreaContainer_thumbnailsBar_theme02].thumbWidth, get(layer[scrollAreaContainer_thumbnailsBar_theme02].itemWidth));
		set(layer[scrollAreaContainer_thumbnailsBar_theme02].thumbHeight, get(layer[scrollAreaContainer_thumbnailsBar_theme02].itemHeight));
		
		add(layer[scrollAreaContainer_thumbnailsBar_theme02].itemWidth, get(totalOffsetX_thumbnailsBar_theme02));
		add(layer[scrollAreaContainer_thumbnailsBar_theme02].itemHeight, get(totalOffsetY_thumbnailsBar_theme02));
	</action>
		
	
	<action name="thumbnailBorderImageInit_thumbnailsBar_theme02">
		
		set(layer[scrollAreaContainer_thumbnailsBar_theme02].offsetX, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].offsetX));
		set(layer[scrollAreaContainer_thumbnailsBar_theme02].offsetY, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].offsetY));
		
		
		mul(totalOffsetX_thumbnailsBar_theme02, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].offsetX), 2);
		mul(totalOffsetY_thumbnailsBar_theme02, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].offsetY), 2);
		
		
		if(startResize_thumbnailsBar_theme02,
			sub(layer[scrollAreaContainer_thumbnailsBar_theme02].itemWidth, get(totalOffsetX_thumbnailsBar_theme02));
			sub(layer[scrollAreaContainer_thumbnailsBar_theme02].itemHeight, get(totalOffsetY_thumbnailsBar_theme02));
		);
		
		
		set(layer[scrollAreaContainer_thumbnailsBar_theme02].thumbWidth, get(layer[scrollAreaContainer_thumbnailsBar_theme02].itemWidth));
		set(layer[scrollAreaContainer_thumbnailsBar_theme02].thumbHeight, get(layer[scrollAreaContainer_thumbnailsBar_theme02].itemHeight));
		
		add(layer[scrollAreaContainer_thumbnailsBar_theme02].itemWidth, get(totalOffsetX_thumbnailsBar_theme02));
		add(layer[scrollAreaContainer_thumbnailsBar_theme02].itemHeight, get(totalOffsetY_thumbnailsBar_theme02));
		
		
		div(layer[thumbnailBorderSource_thumbnailsBar_theme02].quarterHeight, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].height), 4);
		
		
		set(cropX_thumbnailsBar_theme02, 0);
		set(cropY_thumbnailsBar_theme02, 0);
		set(cropW_thumbnailsBar_theme02, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].width));
		set(cropH_thumbnailsBar_theme02, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].quarterHeight));
		txtadd(layer[thumbnailBorderSource_thumbnailsBar_theme02].cropDefault, get(cropX_thumbnailsBar_theme02), '|', get(cropY_thumbnailsBar_theme02), '|', get(cropW_thumbnailsBar_theme02), '|', get(cropH_thumbnailsBar_theme02));

		
		add(cropY_thumbnailsBar_theme02, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].quarterHeight));
		txtadd(layer[thumbnailBorderSource_thumbnailsBar_theme02].cropHover, get(cropX_thumbnailsBar_theme02), '|', get(cropY_thumbnailsBar_theme02), '|', get(cropW_thumbnailsBar_theme02), '|', get(cropH_thumbnailsBar_theme02));
		
		
		add(cropY_thumbnailsBar_theme02, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].quarterHeight));
		txtadd(layer[thumbnailBorderSource_thumbnailsBar_theme02].cropSelected, get(cropX_thumbnailsBar_theme02), '|', get(cropY_thumbnailsBar_theme02), '|', get(cropW_thumbnailsBar_theme02), '|', get(cropH_thumbnailsBar_theme02));
		
		
		add(cropY_thumbnailsBar_theme02, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].quarterHeight));
		txtadd(layer[thumbnailBorderSource_thumbnailsBar_theme02].cropVisited, get(cropX_thumbnailsBar_theme02), '|', get(cropY_thumbnailsBar_theme02), '|', get(cropW_thumbnailsBar_theme02), '|', get(cropH_thumbnailsBar_theme02));
		
		
		set(scaleX_thumbnailsBar_theme02, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].offsetX));
		set(scaleY_thumbnailsBar_theme02, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].offsetY));
		sub(scaleW_thumbnailsBar_theme02, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].width), get(totalOffsetX_thumbnailsBar_theme02));
		sub(scaleH_thumbnailsBar_theme02, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].quarterHeight), get(totalOffsetY_thumbnailsBar_theme02));
		txtadd(layer[thumbnailBorderSource_thumbnailsBar_theme02].scale9grid, get(scaleX_thumbnailsBar_theme02), '|', get(scaleY_thumbnailsBar_theme02), '|', get(scaleW_thumbnailsBar_theme02), '|', get(scaleH_thumbnailsBar_theme02));
	</action>
	
	
	<action name="loadThumbs_thumbnailsBar_theme02">
		if(layer[thumbnailBorderSource_thumbnailsBar_theme02].url,
			set(imgCounter_thumbnailsBar_theme02, 1);
		,
			set(imgCounter_thumbnailsBar_theme02, 0);
		);
		
		if(layer[thumbnailBorderSource_thumbnailsBar_theme02].url,
			if(borderLoaded_thumbnailsBar_theme02,
				dec(imgCounter_thumbnailsBar_theme02);
			);
		);
		
		if(imgCounter_thumbnailsBar_theme02 LE 0,
			stopdelayedcall(delayedCallOnLoadCompleteBorder_thumbnailsBar_theme02);
			loadThumbsPartTwo_thumbnailsBar_theme02();
		,
			delayedcall(delayedCallOnLoadCompleteBorder_thumbnailsBar_theme02, 0.2, loadThumbs_thumbnailsBar_theme02());
		);
	</action>
	
	<action name="loadThumbsPartTwo_thumbnailsBar_theme02">
		ifnot(layer[scrollAreaContainer_thumbnailsBar_theme02].ready,
			
			
			if(layer[thumbnailBorderSource_thumbnailsBar_theme02].url,
				thumbnailBorderImageInit_thumbnailsBar_theme02();
			,
				thumbnailBorderDrawInit_thumbnailsBar_theme02();
			);
			
			
			set(thumbsCounter_thumbnailsBar_theme02, 0);
			
			
				for( set(i_thumbnailsBar_theme02, 0), i_thumbnailsBar_theme02 LT scene.count, inc(i_thumbnailsBar_theme02),
					createThumb_thumbnailsBar_theme02(get(scene[get(i_thumbnailsBar_theme02)].name), get(scene[get(i_thumbnailsBar_theme02)].thumburl), get(i_thumbnailsBar_theme02), get(scene[get(i_thumbnailsBar_theme02)].titleid));
					inc(thumbsCounter_thumbnailsBar_theme02);
				);
			
			
			
			
			
			
			set(layer[scrollAreaContainer_thumbnailsBar_theme02].currentThumbsCount, get(thumbsCounter_thumbnailsBar_theme02));
			
			
			setSize_thumbnailsBar_theme02(get(layer[get(layer[scrollAreaContainer_thumbnailsBar_theme02].parent)].width), get(layer[get(layer[scrollAreaContainer_thumbnailsBar_theme02].parent)].height));
			
			
			set(layer[scrollAreaContainer_thumbnailsBar_theme02].visible, true);
			
			
				if (tour_displaycontrols,
					showWithControlsBar_thumbnailsBar_theme02();
				,
					hideWithControlsBar_thumbnailsBar_theme02();
				);
			
			
			set(layer[scrollAreaContainer_thumbnailsBar_theme02].ready, true);
		);
	</action>
	
	
	<action name="setSize_thumbnailsBar_theme02">
		
		
		set(layer[scrollAreaContainer_thumbnailsBar_theme02].targetWidth, %1);
		set(layer[scrollAreaContainer_thumbnailsBar_theme02].targetHeight, %2);
		
		
		set(layer[get(layer[scrollAreaContainer_thumbnailsBar_theme02].parent)].width, %1);
		set(layer[get(layer[scrollAreaContainer_thumbnailsBar_theme02].parent)].height, %2);
		layer[get(layer[scrollAreaContainer_thumbnailsBar_theme02].parent)].updatepos();
		
		
		mul(totalMarginX_thumbnailsBar_theme02, get(layer[scrollAreaContainer_thumbnailsBar_theme02].marginX), 2);
		mul(totalMarginY_thumbnailsBar_theme02, get(layer[scrollAreaContainer_thumbnailsBar_theme02].marginY), 2);
		
			add(totalPluginWidth_thumbnailsBar_theme02, get(totalMarginX_thumbnailsBar_theme02), get(layer[scrollAreaContainer_thumbnailsBar_theme02].itemWidth));
			
			
			
			if(layer[get(layer[scrollAreaContainer_thumbnailsBar_theme02].parent)].pixelwidth LT totalPluginWidth_thumbnailsBar_theme02,
				set(layer[get(layer[scrollAreaContainer_thumbnailsBar_theme02].parent)].width, get(totalPluginWidth_thumbnailsBar_theme02));
			);
		
		layer[get(layer[scrollAreaContainer_thumbnailsBar_theme02].parent)].updatepos();
		
		
		sub(containerWidth_thumbnailsBar_theme02, get(layer[get(layer[scrollAreaContainer_thumbnailsBar_theme02].parent)].pixelwidth), get(totalMarginX_thumbnailsBar_theme02));
		sub(containerHeight_thumbnailsBar_theme02, get(layer[get(layer[scrollAreaContainer_thumbnailsBar_theme02].parent)].pixelheight), get(totalMarginY_thumbnailsBar_theme02));

		
		set(layer[scrollAreaContainer_thumbnailsBar_theme02].width, get(containerWidth_thumbnailsBar_theme02));
		set(layer[scrollAreaContainer_thumbnailsBar_theme02].height, get(containerHeight_thumbnailsBar_theme02));
		
		set(scrollAreaSize_thumbnailsBar_theme02, 0);
		
		
		mul(totalThumbsSpacer_thumbnailsBar_theme02, get(layer[scrollAreaContainer_thumbnailsBar_theme02].currentThumbsCount), get(layer[scrollAreaContainer_thumbnailsBar_theme02].thumbSpacer));
		sub(totalThumbsSpacer_thumbnailsBar_theme02, get(layer[scrollAreaContainer_thumbnailsBar_theme02].thumbSpacer));
		
		set(layer[get(layer[scrollAreaContainer_thumbnailsBar_theme02].parent)].visible, true);
		
		
			mul(scrollAreaSize_thumbnailsBar_theme02, get(layer[scrollAreaContainer_thumbnailsBar_theme02].itemHeight), get(layer[scrollAreaContainer_thumbnailsBar_theme02].currentThumbsCount));
			add(scrollAreaSize_thumbnailsBar_theme02, get(totalThumbsSpacer_thumbnailsBar_theme02));

			set(layer[thumbsScrollArea_thumbnailsBar_theme02].width, get(layer[scrollAreaContainer_thumbnailsBar_theme02].itemWidth));
			set(layer[thumbsScrollArea_thumbnailsBar_theme02].height, get(scrollAreaSize_thumbnailsBar_theme02));
			
			
			if(layer[scrollAreaContainer_thumbnailsBar_theme02].height LT layer[scrollAreaContainer_thumbnailsBar_theme02].itemHeight,
				set(layer[get(layer[scrollAreaContainer_thumbnailsBar_theme02].parent)].visible, false);
			,
				verifyThumbnailsBarVisibility_thumbnailsBar_theme02();
			);
			
		
		
		if(layer[get(layer[scrollAreaContainer_thumbnailsBar_theme02].parent)].width LT 0,
			set(layer[get(layer[scrollAreaContainer_thumbnailsBar_theme02].parent)].visible, false);
		);
		
	</action>
	
	
	<action name="verifyThumbnailsBarVisibility_thumbnailsBar_theme02">
		if(layer[get(layer[scrollAreaContainer_thumbnailsBar_theme02].parent)].visible,
			set(boolValue_thumbnailsBar_theme02, false);
			
			if (tour_displaythumbnails,
				if (tour_displaycontrols,
					set(boolValue_thumbnailsBar_theme02, true);
				);
			);
			
			set(layer[get(layer[scrollAreaContainer_thumbnailsBar_theme02].parent)].visible, get(boolValue_thumbnailsBar_theme02));
		);
	</action>
	
	
	<action name="createThumb_thumbnailsBar_theme02">

			add(offsetFactor_thumbnailsBar_theme02, get(layer[scrollAreaContainer_thumbnailsBar_theme02].itemHeight), get(layer[scrollAreaContainer_thumbnailsBar_theme02].thumbSpacer));
	
			mul(thumbIncPos_thumbnailsBar_theme02, %3, get(offsetFactor_thumbnailsBar_theme02));
			
			
			if(layer[thumbnailBorderSource_thumbnailsBar_theme02].url,
				add(thumbIncPos_thumbnailsBar_theme02, get(layer[scrollAreaContainer_thumbnailsBar_theme02].offsetY));
			);
			
		
		mul(negativeOffsetX_thumbnailsBar_theme02, get(layer[scrollAreaContainer_thumbnailsBar_theme02].offsetX), -1);
		mul(negativeOffsetY_thumbnailsBar_theme02, get(layer[scrollAreaContainer_thumbnailsBar_theme02].offsetY), -1);
		
		set(thumbName, 'thumb_');
		txtadd(thumbName, %1);
		txtadd(thumbName, '_thumbnailsBar_theme02');
		addlayer(get(thumbName));

		
		set(thumbTitleName, 'thumbtitle_');
		txtadd(thumbTitleName, %1);
		txtadd(thumbTitleName, '_thumbnailsBar_theme02');
		addlayer(get(thumbTitleName));	
		set(layer[get(thumbTitleName)].type              , text);
		set(layer[get(thumbTitleName)].keep              , true);
		set(layer[get(thumbTitleName)].parent            , get(thumbName));
    set(layer[get(thumbTitleName)].interactivecontent, false);
		set(layer[get(thumbTitleName)].align             , center);
		set(layer[get(thumbTitleName)].x                 , 0);
		set(layer[get(thumbTitleName)].y                 , 0);
		set(layer[get(thumbTitleName)].css               , "text-align:center;color:#ffffff;
                                                        font-family:Arial;font-size:12px;");
    set(layer[get(thumbTitleName)].bg                , false);
    set(layer[get(thumbTitleName)].bgborder          , 0);
    set(layer[get(thumbTitleName)].enabled           , false);
    set(layer[get(thumbTitleName)].capture           , false);
		set(layer[get(thumbTitleName)].width             , get(layer[scrollAreaContainer_thumbnailsBar_theme02].thumbWidth));
		getmessage(layer[get(thumbTitleName)].html, %4);

		set(thumbBorderName, 'thumbBorder_');
		txtadd(thumbBorderName, %1);
		txtadd(thumbBorderName, '_thumbnailsBar_theme02');
		addlayer(get(thumbBorderName));
		
		
		ifnot(layer[thumbnailBorderSource_thumbnailsBar_theme02].url,
			set(layer[get(thumbBorderName)].type, container);
			set(layer[get(thumbBorderName)].parent, thumbsScrollArea_thumbnailsBar_theme02);
		);
    set(layer[get(thumbBorderName)].maskchildren, true);

		
		set(layer[get(thumbName)].onloaded, loadedImages_thumbnailsBar_theme02("thumbnail"););
		set(layer[get(thumbName)].url, %2);
		set(layer[get(thumbName)].keep, true);
		set(layer[get(thumbName)].width, get(layer[scrollAreaContainer_thumbnailsBar_theme02].thumbWidth));
		set(layer[get(thumbName)].height, get(layer[scrollAreaContainer_thumbnailsBar_theme02].thumbHeight));
		set(layer[get(thumbName)].align, topleft);
		
		
			set(layer[get(thumbName)].x, get(layer[scrollAreaContainer_thumbnailsBar_theme02].offsetX));
		
			if(layer[thumbnailBorderSource_thumbnailsBar_theme02].url,
				set(layer[get(thumbName)].parent, thumbsScrollArea_thumbnailsBar_theme02);
				set(layer[get(thumbName)].y, get(thumbIncPos_thumbnailsBar_theme02));
			,
				set(layer[get(thumbName)].parent, get(thumbBorderName));
				set(layer[get(thumbName)].y, get(layer[scrollAreaContainer_thumbnailsBar_theme02].offsetY));
				set(layer[get(thumbName)].onclick, resetMouseBehavior_thumbnailsBar_theme02(); mainloadscene(%1); delayedcall(0.1,highlightThumb_thumbnailsBar_theme02(%1)));
			);
			
		
		
		set(layer[get(thumbBorderName)].keep, true);
		set(layer[get(thumbBorderName)].width, get(layer[scrollAreaContainer_thumbnailsBar_theme02].itemWidth));
		set(layer[get(thumbBorderName)].height, get(layer[scrollAreaContainer_thumbnailsBar_theme02].itemHeight));
		set(layer[get(thumbBorderName)].align, topleft);
		
		if(layer[thumbnailBorderSource_thumbnailsBar_theme02].url,
			set(layer[get(thumbBorderName)].url, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].url));
			set(layer[get(thumbBorderName)].scale9grid, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].scale9grid));
			set(layer[get(thumbBorderName)].parent, get(thumbName));
			set(layer[get(thumbBorderName)].x, get(negativeOffsetX_thumbnailsBar_theme02));
			set(layer[get(thumbBorderName)].y, get(negativeOffsetY_thumbnailsBar_theme02));
			set(layer[get(thumbBorderName)].onclick, resetMouseBehavior_thumbnailsBar_theme02(); mainloadscene(%1); delayedcall(0.1,highlightThumb_thumbnailsBar_theme02(%1)));
		,
			
				set(layer[get(thumbBorderName)].y, get(thumbIncPos_thumbnailsBar_theme02)); 
				
		);


		
		setupMouseBehavior_thumbnailsBar_theme02(%1, %4);
		
	</action>
	

  <action name="updateTitles_thumbnailsBar_theme02">

		for( set(i_thumbnailsBar_theme02, 0), i_thumbnailsBar_theme02 LT scene.count, inc(i_thumbnailsBar_theme02),
		      set(thumbTitleName, 'thumbtitle_');
    		  txtadd(thumbTitleName, get(scene[get(i_thumbnailsBar_theme02)].name));
      		txtadd(thumbTitleName, '_thumbnailsBar_theme02');
		      getmessage(layer[get(thumbTitleName)].html, get(scene[get(i_thumbnailsBar_theme02)].titleid));
				);


  </action>	
	
	<action name="removeThumb_thumbnailsBar_theme02">
		set(thumbName, 'thumb_');
		txtadd(thumbName, %1);
		txtadd(thumbName, '_thumbnailsBar_theme02');
		removelayer(get(thumbName));
		
		set(thumbBorderName, 'thumbBorder_');
		txtadd(thumbBorderName, %1);
		txtadd(thumbBorderName, '_thumbnailsBar_theme02');
		removelayer(get(thumbBorderName));

		set(thumbTitleName, 'thumbtitle_');
		txtadd(thumbTitleName, %1);
		txtadd(thumbTitleName, '_thumbnailsBar_theme02');
		removelayer(get(thumbTitleName));

	</action>
	
	
	
	<action name="setupArrows_thumbnailsBar_theme02">
		
		if(layer[scrollAreaContainer_thumbnailsBar_theme02].adjustToContent,
			hideArrows_thumbnailsBar_theme02();
		,
			ifnot(device.touchdevice,
				
					if(layer[scrollAreaContainer_thumbnailsBar_theme02].height LT layer[thumbsScrollArea_thumbnailsBar_theme02].height,
				
					showArrows_thumbnailsBar_theme02();
				,
					hideArrows_thumbnailsBar_theme02();
				);
			,
				hideArrows_thumbnailsBar_theme02();
			);
		);
		
		
		if(%1,
			scrollToCurrentThumb_thumbnailsBar_theme02();
		);
		
		
			
			if(layer[scrollAreaContainer_thumbnailsBar_theme02].height LT layer[scrollAreaContainer_thumbnailsBar_theme02].itemHeight,
				set(layer[get(layer[scrollAreaContainer_thumbnailsBar_theme02].parent)].visible, false);
			);
	</action>
	
	
	<action name="showArrows_thumbnailsBar_theme02">
		
		
		
		
		set(layer[scrollPrevArrow_thumbnailsBar_theme02].visible, true);
		set(layer[scrollNextArrow_thumbnailsBar_theme02].visible, true);
		
		
		
			
			add(totalArrowSize_thumbnailsBar_theme02, get(layer[scrollPrevArrow_thumbnailsBar_theme02].height), get(layer[scrollNextArrow_thumbnailsBar_theme02].height));
		
			
			sub(scrollAreaContainerSize_thumbnailsBar_theme02, get(layer[get(layer[scrollAreaContainer_thumbnailsBar_theme02].parent)].pixelheight), get(totalArrowSize_thumbnailsBar_theme02));
		
			set(layer[scrollAreaContainer_thumbnailsBar_theme02].height, get(scrollAreaContainerSize_thumbnailsBar_theme02));
		
			set(layer[scrollAreaContainer_thumbnailsBar_theme02].y, get(layer[scrollPrevArrow_thumbnailsBar_theme02].height));
			
		
		
		set(layer[scrollPrevArrow_thumbnailsBar_theme02].onhover, scrollPrev_thumbnailsBar_theme02(););
		set(layer[scrollNextArrow_thumbnailsBar_theme02].onhover, scrollNext_thumbnailsBar_theme02(););
		
		set(layer[scrollPrevArrow_thumbnailsBar_theme02].onclick, scrollPrev_thumbnailsBar_theme02(get(layer[scrollAreaContainer_thumbnailsBar_theme02].scrollSpeedAcceleration)););
		set(layer[scrollNextArrow_thumbnailsBar_theme02].onclick, scrollNext_thumbnailsBar_theme02(get(layer[scrollAreaContainer_thumbnailsBar_theme02].scrollSpeedAcceleration)););
		
		
		
		
		
		set(layer[scrollPrevArrow_thumbnailsBar_theme02].onout, set(layer[scrollAreaContainer_thumbnailsBar_theme02].scrollSpeed, get(layer[scrollAreaContainer_thumbnailsBar_theme02].scrollSpeedInit)););
		set(layer[scrollNextArrow_thumbnailsBar_theme02].onout, set(layer[scrollAreaContainer_thumbnailsBar_theme02].scrollSpeed, get(layer[scrollAreaContainer_thumbnailsBar_theme02].scrollSpeedInit)););
		
	</action>
	
	
	
	
	<action name="hideArrows_thumbnailsBar_theme02">
		
		set(layer[scrollPrevArrow_thumbnailsBar_theme02].visible, false);
		set(layer[scrollNextArrow_thumbnailsBar_theme02].visible, false);
		
		
		
			mul(totalMargin_thumbnailsBar_theme02, get(layer[scrollAreaContainer_thumbnailsBar_theme02].marginY), 2);
			
			sub(scrollAreaContainerSize_thumbnailsBar_theme02, get(layer[get(layer[scrollAreaContainer_thumbnailsBar_theme02].parent)].pixelheight), get(totalMargin_thumbnailsBar_theme02));
			
			set(layer[scrollAreaContainer_thumbnailsBar_theme02].height, get(scrollAreaContainerSize_thumbnailsBar_theme02));
			set(layer[scrollAreaContainer_thumbnailsBar_theme02].y, get(layer[scrollAreaContainer_thumbnailsBar_theme02].marginY));
			 
			
	</action>
	
	
	<action name="scrollPrev_thumbnailsBar_theme02">
		
		
		if(%1,
			inc(layer[scrollAreaContainer_thumbnailsBar_theme02].scrollSpeed, %1);
		);
		
		layer[thumbsScrollArea_thumbnailsBar_theme02].stopscrolling();
		
		set(scrollLimit_thumbnailsBar_theme02, 0);
		
		
			
				sub(scrollLimit_thumbnailsBar_theme02, get(layer[thumbsScrollArea_thumbnailsBar_theme02].height), get(layer[scrollAreaContainer_thumbnailsBar_theme02].height));
				div(scrollLimit_thumbnailsBar_theme02, 2);
			
			add(layer[thumbsScrollArea_thumbnailsBar_theme02].y, get(layer[scrollAreaContainer_thumbnailsBar_theme02].scrollSpeed));
			if(layer[thumbsScrollArea_thumbnailsBar_theme02].y GE scrollLimit_thumbnailsBar_theme02,
				set(layer[thumbsScrollArea_thumbnailsBar_theme02].y, get(scrollLimit_thumbnailsBar_theme02));
			);
			
		
		if(layer[scrollAreaContainer_thumbnailsBar_theme02].scrollSpeed LT layer[scrollAreaContainer_thumbnailsBar_theme02].scrollSpeedMax,
			inc(layer[scrollAreaContainer_thumbnailsBar_theme02].scrollSpeed);
		);
		
	</action>
	
	
	<action name="scrollNext_thumbnailsBar_theme02">
		
		
		if(%1,
			inc(layer[scrollAreaContainer_thumbnailsBar_theme02].scrollSpeed, %1);
		);
		
		layer[thumbsScrollArea_thumbnailsBar_theme02].stopscrolling();
		
			
			sub(scrollLimit_thumbnailsBar_theme02, get(layer[thumbsScrollArea_thumbnailsBar_theme02].height), get(layer[scrollAreaContainer_thumbnailsBar_theme02].height));
			
				div(scrollLimit_thumbnailsBar_theme02, 2);
			mul(scrollLimit_thumbnailsBar_theme02, -1);
			
			sub(layer[thumbsScrollArea_thumbnailsBar_theme02].y, get(layer[scrollAreaContainer_thumbnailsBar_theme02].scrollSpeed));
			if(layer[thumbsScrollArea_thumbnailsBar_theme02].y LE scrollLimit_thumbnailsBar_theme02,
				set(layer[thumbsScrollArea_thumbnailsBar_theme02].y, get(scrollLimit_thumbnailsBar_theme02));
			);
		
		if(layer[scrollAreaContainer_thumbnailsBar_theme02].scrollSpeed LT layer[scrollAreaContainer_thumbnailsBar_theme02].scrollSpeedMax,
			inc(layer[scrollAreaContainer_thumbnailsBar_theme02].scrollSpeed);
		);
		
	</action>
	
	
	<action name="resetMouseBehavior_thumbnailsBar_theme02">
	
		
		
			for( set(j_thumbnailsBar_theme02, 0), j_thumbnailsBar_theme02 LT scene.count, inc(j_thumbnailsBar_theme02),
				set(thumbBorderName, 'thumbBorder_');
				txtadd(thumbBorderName, get(scene[get(j_thumbnailsBar_theme02)].name));
				txtadd(thumbBorderName, '_thumbnailsBar_theme02');
				
				setupMouseBehavior_thumbnailsBar_theme02(get(scene[get(j_thumbnailsBar_theme02)].name), get(scene[get(j_thumbnailsBar_theme02)].titleid));
			);
		
	</action>
	
	
	<action name="setupMouseBehavior_thumbnailsBar_theme02">

		set(thumbName, 'thumb_');
		txtadd(thumbName, %1);
		txtadd(thumbName, '_thumbnailsBar_theme02');
		
		set(thumbBorderName, 'thumbBorder_');
		txtadd(thumbBorderName, %1);
		txtadd(thumbBorderName, '_thumbnailsBar_theme02');
		
		if(layer[thumbnailBorderSource_thumbnailsBar_theme02].url,
			set(layer[get(thumbBorderName)].crop, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].cropDefault));
			set(layer[get(thumbBorderName)].onovercrop, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].cropHover));
			set(layer[get(thumbBorderName)].ondowncrop, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].cropHover));
			set(layer[get(thumbBorderName)].tooltip, %2);
				set(layer[get(thumbBorderName)].onhover, showTooltip('plugin', tooltipStyle_thumbnailsBar_theme02));
				set(layer[get(thumbBorderName)].onout, hideTooltip());
		,
			set(layer[get(thumbBorderName)].bgcolor, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].borderColorDefault));
			set(layer[get(thumbBorderName)].bgalpha, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].borderAlphaDefault));
				set(layer[get(thumbName)].tooltip, %2);
				set(layer[get(thumbName)].onhover, showTooltip('plugin', tooltipStyle_thumbnailsBar_theme02));
			
			set(layer[get(thumbName)].onover, 
				set(layer[get(parent)].bgcolor, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].borderColorHover));
				set(layer[get(parent)].bgalpha, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].borderAlphaHover));
			);
			
			set(layer[get(thumbName)].onout, 
				set(layer[get(parent)].bgcolor, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].borderColorDefault));
				set(layer[get(parent)].bgalpha, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].borderAlphaDefault));
				hideTooltip();
			);
		);
	
	</action>
	
	
	<action name="highlightCurrentThumb_thumbnailsBar_theme02">
			delayedcall(0.1,highlightThumb_thumbnailsBar_theme02(get(xml.scene)));
	</action>
	
	
	<action name="highlightThumb_thumbnailsBar_theme02">
	
		set(thumbBorderName, 'thumbBorder_');
		txtadd(thumbBorderName, %1);
		txtadd(thumbBorderName, '_thumbnailsBar_theme02');
		
		if(layer[thumbnailBorderSource_thumbnailsBar_theme02].url,
			set(layer[get(thumbBorderName)].crop, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].cropSelected));
			set(layer[get(thumbBorderName)].onovercrop, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].cropSelected));
			set(layer[get(thumbBorderName)].ondowncrop, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].cropSelected));
		,
			set(thumbName, 'thumb_');
			txtadd(thumbName, %1);
			txtadd(thumbName, '_thumbnailsBar_theme02');
			
			set(layer[get(thumbBorderName)].bgcolor, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].borderColorSelected));
			set(layer[get(thumbBorderName)].bgalpha, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].borderAlphaSelected));
			
			set(layer[get(thumbName)].onover, "");
			set(layer[get(thumbName)].onout, hideTooltip(););
		);

		scrollToThumb_thumbnailsBar_theme02(%1);
	</action>
	
	
	<action name="scrollToCurrentThumb_thumbnailsBar_theme02">
			scrollToThumb_thumbnailsBar_theme02(get(xml.scene));
	</action>
	
	
	<action name="scrollToThumb_thumbnailsBar_theme02">
		
		set(thumbName, 'thumb_');
		set(thumbBorderName, 'thumbBorder_');
		
		txtadd(thumbName, %1);
		txtadd(thumbName, '_thumbnailsBar_theme02');
		txtadd(thumbBorderName, %1);
		txtadd(thumbBorderName, '_thumbnailsBar_theme02');

			set(posY_thumbnailsBar_theme02, 0);
			if(layer[thumbnailBorderSource_thumbnailsBar_theme02].url,
				div(halfThumbHeight_thumbnailsBar_theme02, get(layer[get(thumbName)].height), 2);
				ifnot(layer[scrollAreaContainer_thumbnailsBar_theme02].adjustToContent,
					add(posY_thumbnailsBar_theme02, get(layer[get(thumbName)].y), get(halfThumbHeight_thumbnailsBar_theme02));
				);
				if(layer[thumbsScrollArea_thumbnailsBar_theme02].scrolltocenter,
					layer[thumbsScrollArea_thumbnailsBar_theme02].scrolltocenter(0, get(posY_thumbnailsBar_theme02));
				);
			,
				div(halfThumbHeight_thumbnailsBar_theme02, get(layer[get(thumbBorderName)].height), 2);
				ifnot(layer[scrollAreaContainer_thumbnailsBar_theme02].adjustToContent,
					add(posY_thumbnailsBar_theme02, get(layer[get(thumbBorderName)].y), get(halfThumbHeight_thumbnailsBar_theme02));
				);
				if(layer[thumbsScrollArea_thumbnailsBar_theme02].scrolltocenter,
					layer[thumbsScrollArea_thumbnailsBar_theme02].scrolltocenter(0, get(posY_thumbnailsBar_theme02));
				);
			);
		
		
	</action>
	





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

<ptplugin name="description" canStart="false" newPano="false" openatstart="true" mode="panorama" startMethod="showDescription_description" engine="kolorArea">
	<settings>
		<option name="position" value="top" type="string" />
		<option name="start_position" value="left" type="string" />
		<option name="margin_x" value="0" type="int" />
		<option name="margin_y" value="0" type="int" />
		<option name="background_color" value="f2f2f2" type="string" />
		<option name="background_alpha" value="1" type="float" />
		<option name="topleft_radius" value="1" type="int" />
		<option name="topright_radius" value="1" type="int" />
		<option name="bottomleft_radius" value="1" type="int" />
		<option name="bottomright_radius" value="1" type="int" />
		<option name="area_border_width" value="1" type="int" />
		<option name="area_border_color" value="f2f2f2" type="string" />
		<option name="area_border_alpha" value="1" type="float" />
		<option name="padding" value="15" type="int" />
		<option name="display_title" value="true" type="bool" />
		<option name="title" value="descriptiondescription_title" type="string" />
		<option name="title_font" value="Verdana" type="string" />
		<option name="title_size" value="14" type="int" />
		<option name="title_weight" value="normal" type="string" />
		<option name="title_decoration" value="normal" type="string" />
		<option name="title_color" value="000000" type="string" />
		<option name="close_displayed" value="true" type="bool" />
		<option name="close_text" value="descriptiondisplay_close_text" type="string" />

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

		<option name="area_width" value="20" type="int" />
		<option name="area_height" value="100" type="int" />
		<option name="area_width_unit" value="percent" type="string" />
		<option name="area_height_unit" value="percent" type="string" />
		<option name="animation" value="true" type="bool" />
		<option name="animation_duration" value="500" type="int" />
		<option name="refresh_content" value="true" type="bool" />
		<option name="close_callback" value="invokeKrFunction('closeKolorAreaCallback_description')" type="string" />
		<option name="close_on_click" value="false" type="bool" />
		<option name="open_callback" value="invokeKrFunction('openKolorAreaCallback_description')" type="string" />
		<option name="zorder" value="6" type="int" />
		<option name="use_i18n" value="true" type="bool" />
	</settings>
</ptplugin>

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

</action>

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

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

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

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

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

	);
</action>


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

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

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

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

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

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


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

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

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

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

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


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


  <!-- Fullscreen Management -->
  <action name="exitFullScreen" devices="fullscreensupport">set(tour_fullscreen,false);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>

	<!-- WebVR plugin for VR availability tests -->

	<plugin name="ptpvrmode" devices="html5" keep="true"
		url="%FIRSTXML%/graphics/webvr.js"
		mobilevr_support="true"
		mobilevr_fake_support="true"
		vr_cursor=""
		vr_cursor_enabled="false"
		onavailable="delayedcall(1, checkVrAvailability(););"
		onunavailable="checkVrUnavailable();"
		/>
	<action name="checkVrAvailability">
		if(plugin[ptpvrmode],
			if (plugin[ptpvrmode].isavailable,
				set(tour_vrdevices, true);
				events.dispatch(onvravailable);
			,
				set(tour_vrdevices, false);
			);
		,
			checkVrUnavailable();
		);
	</action>
	<action name="checkVrUnavailable">
		set(tour_vrdevices, false);
		events.dispatch(onvrunavailable);
	</action>
<action name="viewControlMoveUp">
	if(%1,
		if(%2,
			set(isfullvertical, false);
			ifnot(scene[get(xml.scene)].planar,
				sub(viewvfov, panoview.vmax, panoview.vmin);
				if (viewvfov == 180,
					set(isfullvertical, true);
				);
			);
			if(isfullvertical == false AND calc(view.vlookat-%2) LT view.vlookatmin,
				moveto(get(view.hlookat), get(view.vlookatmin));
			,
				moveto(get(view.hlookat), calc(view.vlookat-%2));
			);
		,
			set(vlookat_moveforce, -1);
			delayedcall(0.1, viewControlMoveVertStop());
		);
	,
		set(vlookat_moveforce, -1);
	);
</action>
<action name="viewControlMoveDown">
	if(%1,
		if(%2,
			set(isfullvertical, false);
			ifnot(scene[get(xml.scene)].planar,
				sub(viewvfov, panoview.vmax, panoview.vmin);
				if (viewvfov == 180,
					set(isfullvertical, true);
				);
			);
			if(sceneisfull360 == false AND calc(view.vlookat+%2) GT view.vlookatmax,
				moveto(get(view.hlookat), get(view.vlookatmax));
			,
				moveto(get(view.hlookat), calc(view.vlookat+%2));
			);
		,
			set(vlookat_moveforce, +1);
			delayedcall(0.1, viewControlMoveVertStop());
		);
	,
		set(vlookat_moveforce, +1);
	);
</action>
<action name="viewControlMoveLeft">
	if(%1,
		if(%2,
			set(isfullhorizontal, false);
			ifnot(scene[get(xml.scene)].planar,
				sub(viewhfov, panoview.hmax, panoview.hmin);
				if (viewhfov == 360,
					set(isfullhorizontal, true);
				);
			);
			if(isfullhorizontal == false AND calc(view.hlookat-%2) LT view.hlookatmin,
				moveto(get(view.hlookatmin), get(view.vlookat));
			,
				moveto(calc(view.hlookat-%2), get(view.vlookat));
			);
		,
			set(hlookat_moveforce, -1);
			delayedcall(0.1, viewControlMoveHoriStop());
		);
	,
		set(hlookat_moveforce, -1);
	);
</action>
<action name="viewControlMoveRight">
	if(%1,
		if(%2,
			set(isfullhorizontal, false);
			ifnot(scene[get(xml.scene)].planar,
				sub(viewhfov, panoview.hmax, panoview.hmin);
				if (viewhfov == 360,
					set(isfullhorizontal, true);
				);
			);
			if(isfullhorizontal == false AND calc(view.hlookat+%2) GT view.hlookatmax,
				moveto(get(view.hlookatmax), get(view.vlookat));
			,
				moveto(calc(view.hlookat+%2), get(view.vlookat));
			);
		,
			set(hlookat_moveforce, +1);
			delayedcall(0.1, viewControlMoveHoriStop());
			
		);
	,
		set(hlookat_moveforce, +1);
	);
</action>
<action name="viewControlMoveHoriStop">
	set(hlookat_moveforce, 0);
</action>
<action name="viewControlMoveVertStop">
	set(vlookat_moveforce, 0);
</action>

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

</krpano>