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

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

  <layer name="footer"
         keep="true"
         url="%FIRSTXML%/graphics/footer/footer.png" 
         bgalpha="0.30000762951094834"
         align="bottom"
         x="0"
         y="8"
         zorder="1"
         enabled="false"
         capture="true"
         visible="false"
         height="43"
         width="590"
         
         />

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

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

<!-- ********** -->
<!-- Classic Thumbnails Bar -->
<!-- id : thumbnailsBar-theme02 -->
<!-- ********** -->






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


<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="seenCheckMarkSource_thumbnailsBar_theme02"
       url="%FIRSTXML%/graphics/classicthumbnailsbar/check3.png" 
       keep="true" visible="false" />


	
	<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(););"	
	/>
	
	
	<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="120"
         itemHeight="60"
         offsetX="0" offsetY="0"
         thumbSpacer="2"
         currentThumbsCount="0"
         adjustToContent="false"
         zorder="1"
         visible="false"
         ready="false">
	
		
    <layer name="thumbsScrollArea_thumbnailsBar_theme02"
           url.html5="%FIRSTXML%/graphics/scrollarea.js"
           align="bottom" x="0" y="0"
           onhover_autoscrolling="false"
           direction="h"/>
	
	</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_left.png"
         align="left"
	/>
	
	
	<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_right.png"
         align="right"
	/>
	
	<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(totalPluginHeight_thumbnailsBar_theme02, get(totalMarginY_thumbnailsBar_theme02), get(layer[scrollAreaContainer_thumbnailsBar_theme02].itemHeight));
			
			
			
			if(layer[get(layer[scrollAreaContainer_thumbnailsBar_theme02].parent)].pixelheight LT totalPluginHeight_thumbnailsBar_theme02,
				set(layer[get(layer[scrollAreaContainer_thumbnailsBar_theme02].parent)].height, get(totalPluginHeight_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].itemWidth), get(layer[scrollAreaContainer_thumbnailsBar_theme02].currentThumbsCount));
			add(scrollAreaSize_thumbnailsBar_theme02, get(totalThumbsSpacer_thumbnailsBar_theme02));
			
			set(layer[thumbsScrollArea_thumbnailsBar_theme02].width, get(scrollAreaSize_thumbnailsBar_theme02));
			set(layer[thumbsScrollArea_thumbnailsBar_theme02].height, get(layer[scrollAreaContainer_thumbnailsBar_theme02].itemHeight));
			
			
			if(layer[scrollAreaContainer_thumbnailsBar_theme02].width LT layer[scrollAreaContainer_thumbnailsBar_theme02].itemWidth,
				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].itemWidth), 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].offsetX));
			);
			
		
		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(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(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)].y, get(layer[scrollAreaContainer_thumbnailsBar_theme02].offsetY));
		
			if(layer[thumbnailBorderSource_thumbnailsBar_theme02].url,
				set(layer[get(thumbName)].parent, thumbsScrollArea_thumbnailsBar_theme02);
				set(layer[get(thumbName)].x, get(thumbIncPos_thumbnailsBar_theme02));
			,
				set(layer[get(thumbName)].parent, get(thumbBorderName));
				set(layer[get(thumbName)].x, get(layer[scrollAreaContainer_thumbnailsBar_theme02].offsetX));
				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)].x, get(thumbIncPos_thumbnailsBar_theme02)); 
				
		);

    set(thumbSeenName, 'thumbSeenCheckMark_');
    txtadd(thumbSeenName, %1);
    txtadd(thumbSeenName, '_thumbnailsBar_theme02');
    addlayer(get(thumbSeenName));
    set(layer[get(thumbSeenName)].keep   , true);
    copy(layer[get(thumbSeenName)].visible, scene[%1].seen);
    set(layer[get(thumbSeenName)].enabled, false);
    set(layer[get(thumbSeenName)].capture, false);
    copy(layer[get(thumbSeenName)].url   , layer[seenCheckMarkSource_thumbnailsBar_theme02].url);
    set(layer[get(thumbSeenName)].parent , get(thumbName));
    set(layer[get(thumbSeenName)].align  , "topright");
    set(layer[get(thumbSeenName)].x      , "1");
    set(layer[get(thumbSeenName)].y      , "1");

    set(layer[get(thumbSeenName)].width   , "15");
    set(layer[get(thumbSeenName)].height  , "15");

		
		setupMouseBehavior_thumbnailsBar_theme02(%1, %4);
		
	</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(thumbSeenName, 'thumbSeenCheckMark_');
    txtadd(thumbSeenName, %1);
    txtadd(thumbSeenName, '_thumbnailsBar_theme02');
		removelayer(get(thumbSeenName));
	</action>
	
	
	
	<action name="setupArrows_thumbnailsBar_theme02">
		
		if(layer[scrollAreaContainer_thumbnailsBar_theme02].adjustToContent,
			hideArrows_thumbnailsBar_theme02();
		,
			ifnot(device.touchdevice,
				
					if(layer[scrollAreaContainer_thumbnailsBar_theme02].width LT layer[thumbsScrollArea_thumbnailsBar_theme02].width,
				
					showArrows_thumbnailsBar_theme02();
				,
					hideArrows_thumbnailsBar_theme02();
				);
			,
				hideArrows_thumbnailsBar_theme02();
			);
		);
		
		
		if(%1,
			scrollToCurrentThumb_thumbnailsBar_theme02();
		);
		
		
			
			if(layer[scrollAreaContainer_thumbnailsBar_theme02].width LT layer[scrollAreaContainer_thumbnailsBar_theme02].itemWidth,
				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].width), get(layer[scrollNextArrow_thumbnailsBar_theme02].width));
		
			
			sub(scrollAreaContainerSize_thumbnailsBar_theme02, get(layer[get(layer[scrollAreaContainer_thumbnailsBar_theme02].parent)].pixelwidth), get(totalArrowSize_thumbnailsBar_theme02));
		
			set(layer[scrollAreaContainer_thumbnailsBar_theme02].width, get(scrollAreaContainerSize_thumbnailsBar_theme02));
			
			set(layer[scrollAreaContainer_thumbnailsBar_theme02].x, get(layer[scrollPrevArrow_thumbnailsBar_theme02].width));
			
		
		
		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].marginX), 2);
			
			sub(scrollAreaContainerSize_thumbnailsBar_theme02, get(layer[get(layer[scrollAreaContainer_thumbnailsBar_theme02].parent)].pixelwidth), get(totalMargin_thumbnailsBar_theme02));

			set(layer[scrollAreaContainer_thumbnailsBar_theme02].width, get(scrollAreaContainerSize_thumbnailsBar_theme02));
			set(layer[scrollAreaContainer_thumbnailsBar_theme02].x, get(layer[scrollAreaContainer_thumbnailsBar_theme02].marginX));
			 
			
	</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].width), get(layer[scrollAreaContainer_thumbnailsBar_theme02].width));
				div(scrollLimit_thumbnailsBar_theme02, 2);
			
			add(layer[thumbsScrollArea_thumbnailsBar_theme02].x, get(layer[scrollAreaContainer_thumbnailsBar_theme02].scrollSpeed));
			if(layer[thumbsScrollArea_thumbnailsBar_theme02].x GE scrollLimit_thumbnailsBar_theme02,
				set(layer[thumbsScrollArea_thumbnailsBar_theme02].x, 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].width), get(layer[scrollAreaContainer_thumbnailsBar_theme02].width));
			
				div(scrollLimit_thumbnailsBar_theme02, 2);
			mul(scrollLimit_thumbnailsBar_theme02, -1);
			
			sub(layer[thumbsScrollArea_thumbnailsBar_theme02].x, get(layer[scrollAreaContainer_thumbnailsBar_theme02].scrollSpeed));
			if(layer[thumbsScrollArea_thumbnailsBar_theme02].x LE scrollLimit_thumbnailsBar_theme02,
				set(layer[thumbsScrollArea_thumbnailsBar_theme02].x, 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)].bgcolor, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].borderColorDefault));
			set(layer[get(thumbBorderName)].bgalpha, get(layer[thumbnailBorderSource_thumbnailsBar_theme02].borderAlphaDefault));
			
			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));
				
			);
		);
	
	</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, "");
		);

    set(thumbSeenName, 'thumbSeenCheckMark_');
    txtadd(thumbSeenName, %1);
    txtadd(thumbSeenName, '_thumbnailsBar_theme02');
    set(layer[get(thumbSeenName)].visible, true);

		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(posX_thumbnailsBar_theme02, 0);
			if(layer[thumbnailBorderSource_thumbnailsBar_theme02].url,
				div(halfThumbWidth_thumbnailsBar_theme02, get(layer[get(thumbName)].width), 2);
				ifnot(layer[scrollAreaContainer_thumbnailsBar_theme02].adjustToContent,
					add(posX_thumbnailsBar_theme02, get(layer[get(thumbName)].x), get(halfThumbWidth_thumbnailsBar_theme02));
				);
				if(layer[thumbsScrollArea_thumbnailsBar_theme02].scrolltocenter,
					layer[thumbsScrollArea_thumbnailsBar_theme02].scrolltocenter(get(posX_thumbnailsBar_theme02), 0);
				);
			,
				div(halfThumbWidth_thumbnailsBar_theme02, get(layer[get(thumbBorderName)].width), 2);
				ifnot(layer[scrollAreaContainer_thumbnailsBar_theme02].adjustToContent,
					add(posX_thumbnailsBar_theme02, get(layer[get(thumbBorderName)].x), get(halfThumbWidth_thumbnailsBar_theme02));
				);
				if(layer[thumbsScrollArea_thumbnailsBar_theme02].scrolltocenter,
					layer[thumbsScrollArea_thumbnailsBar_theme02].scrolltocenter(get(posX_thumbnailsBar_theme02), 0);
				);
			);
		
	</action>
	





<!-- ********** -->
<!-- Sans Control Bar -->
<!-- id : SansControlBar -->
<!-- ********** -->

  <krpano SansControlBarbarbuilt="false" SansControlBarbackgroundwidthwhenclosed="0" SansControlBarbackgroundwidthwhenopened="0" SansControlBarIsOpened="false" />
  <events name="SansControlBarevents" 
    onxmlcomplete="SansControlBarbuildMenuBar();" 


    keep="true" />



  <action name="SansControlBarbuildMenuBar">
    ifnot (SansControlBarbarbuilt, SansControlBarbuildMenu(); set(SansControlBarbarbuilt, true););
  </action>

  <style name="SansControlBar_btn_style"
         keep="true"
         edge="right"
         align="right"
         x="0" y="0"
         width="40" height="40"
         crop="0|0|60|60"
         onovercrop="0|60|60|60"
         ondowncrop="0|120|60|60"
         />
  <style name="SansControlBar_btn_style_off"
         keep="true"
         edge="right"
         align="right"
         x="0" y="0"
         width="40" height="40"
         />

  <layer name="SansControlBar_menu_bg"
         keep="true"
         type="container"
         zorder="3"
         width="40"
         height="40"
         align="bottom"
         x="0" y="10"
         maskchildren="true"
         rotate="0"
         visible="false"
         >
    <layer name="SansControlBarbtn_hide_hotspots"
            url="%FIRSTXML%/graphics/sans controlbar/btn_hide_show_hotspots.png"
            style="SansControlBar_btn_style"
            onclick="hideHotspots();
"
            visible="false"
            />
    <layer name="SansControlBarbtn_show_hotspots"
            url="%FIRSTXML%/graphics/sans controlbar/btn_hide_show_hotspots.png"
            style="SansControlBar_btn_style"
            onclick="showHotspots();
"
            visible="false"
            />



    <layer name="SansControlBarbtn_ctrlmode_move_to"
            url="%FIRSTXML%/graphics/sans controlbar/btn_move_to.png"
            style="SansControlBar_btn_style"
            onclick="setControlModeMoveTo();
"
            visible="false"
            devices="desktop"
            />
    <layer name="SansControlBarbtn_ctrlmode_drag_to"
            url="%FIRSTXML%/graphics/sans controlbar/btn_drag_to.png"
            style="SansControlBar_btn_style"
            onclick="setControlModeDragTo();
"
            visible="false"
            devices="desktop"
            />

    <layer name="SansControlBarbtn_in"
            url="%FIRSTXML%/graphics/sans controlbar/btn_zoom_in.png"
            ondown="viewControlZoomIn(false);"
            onup="viewControlZoomStop();
"
            style="SansControlBar_btn_style"
            visible="false"
            devices="desktop"
            />
    <layer name="SansControlBarbtn_out"
            url="%FIRSTXML%/graphics/sans controlbar/btn_zoom_out.png"
            ondown="viewControlZoomOut(false);
"
            onup="viewControlZoomStop();
"
            style="SansControlBar_btn_style"
            visible="false"
            devices="desktop"
            />

    <layer name="SansControlBarbtn_left"
            url="%FIRSTXML%/graphics/sans controlbar/btn_move_left.png"
            ondown="viewControlMoveLeft(false);
"
            onup="viewControlMoveHoriStop();
"
            style="SansControlBar_btn_style"
            visible="false"
            devices="desktop"
            />
    <layer name="SansControlBarbtn_right"
            url="%FIRSTXML%/graphics/sans controlbar/btn_move_right.png"
            ondown="viewControlMoveRight(false);
"
            onup="viewControlMoveHoriStop();
"
            style="SansControlBar_btn_style"
            visible="false"
            devices="desktop"
            />

    <layer name="SansControlBarbtn_up"
            url="%FIRSTXML%/graphics/sans controlbar/btn_move_up.png"
            ondown="viewControlMoveUp(false);
"
            onup="viewControlMoveVertStop();
"
            style="SansControlBar_btn_style"
            visible="false"
            devices="desktop"
            />
    <layer name="SansControlBarbtn_down"
            url="%FIRSTXML%/graphics/sans controlbar/btn_move_down.png"
            ondown="viewControlMoveDown(false);
"
            onup="viewControlMoveVertStop();
"
            style="SansControlBar_btn_style"
            visible="false"
            devices="desktop"
            />



    <layer name="SansControlBarbtn_prev_pano"
            url="%FIRSTXML%/graphics/sans controlbar/btn_previous_scene.png"
            onclick="loadPreviousScene();
"
            style="SansControlBar_btn_style"
            visible="false"
            />
    <layer name="SansControlBarbtn_next_pano"
            url="%FIRSTXML%/graphics/sans controlbar/btn_next_scene.png"
            onclick="loadNextScene();
"
            style="SansControlBar_btn_style"
            visible="false"
            />



    <layer name="SansControlBarbtn_openfs"
            url="%FIRSTXML%/graphics/sans controlbar/btn_enter_fs.png"
            onclick="enterFullscreen();
"
            style="SansControlBar_btn_style"
            visible="false"
            devices="fullscreensupport"
            />
    <layer name="SansControlBarbtn_closefs"
            url="%FIRSTXML%/graphics/sans controlbar/btn_close_fs.png"
            onclick="exitFullscreen();
"
            style="SansControlBar_btn_style"
            visible="false"
            devices="fullscreensupport"
            />

    <layer name="SansControlBarbtn_autorotate_on"
            url="%FIRSTXML%/graphics/sans controlbar/btn_start_autorotation.png"
            onclick="resumeautorotation();
"
            style="SansControlBar_btn_style"
            visible="false"
            />
    <layer name="SansControlBarbtn_autorotate_off"
            url="%FIRSTXML%/graphics/sans controlbar/btn_stop_autorotation.png"
            onclick="pauseautorotation();
"
            style="SansControlBar_btn_style"
            visible="false"
            />





    <layer name="SansControlBarbtn_hidecontrols"
           url="%FIRSTXML%/graphics/sans controlbar/btn_hide_controls.png"
           style="SansControlBar_btn_style"
           onclick="hideTourControls();
"
           visible="false"
           />
    <layer name="SansControlBarbtn_showcontrols"
           url="%FIRSTXML%/graphics/sans controlbar/btn_show_controls.png"
           style="SansControlBar_btn_style"
           onclick="showTourControls();
"
           visible="false"
           />
 </layer>





	<events name="SansControlBarcontrolmodechangedevent" 
		oncontrolmodechanged="SansControlBarupdateControlModeButtons();" 
		keep="true" />
	<action name="SansControlBarHideControlModeButtons">
		set(layer[SansControlBarbtn_ctrlmode_move_to].visible, false);
		set(layer[SansControlBarbtn_ctrlmode_drag_to].visible, false);
	</action>
	<action name="SansControlBarShowControlModeButtons">
		if (tour_controlmodemousetype == "moveto",
			set(layer[SansControlBarbtn_ctrlmode_drag_to].visible, true);
			set(layer[SansControlBarbtn_ctrlmode_move_to].visible, false);
		,
			set(layer[SansControlBarbtn_ctrlmode_move_to].visible, true);
			set(layer[SansControlBarbtn_ctrlmode_drag_to].visible, false);
		);
	</action>
	<action name="SansControlBarupdateControlModeButtons">
	if (device.desktop,
		if (tour_displaycontrols,
			SansControlBarShowControlModeButtons();
		,
			SansControlBarHideControlModeButtons();
		);
	,
		SansControlBarHideControlModeButtons();
	);
	</action>

	<events name="SansControlBarhideshowcontrolsevent" 
		hidetourcontrols="SansControlBarhideMenuControls();" 
		showtourcontrols="SansControlBarshowMenuControls();" 
		keep="true" />

  <action name="SansControlBarhideMenuControls">
    set(SansControlBarIsOpened, false);
    set(layer[SansControlBarbtn_hidecontrols].visible, false);
    set(layer[SansControlBarbtn_showcontrols].visible, true);
if (scene.count GT 1,
	set(layer[SansControlBarbtn_next_pano].visible, false);
	set(layer[SansControlBarbtn_prev_pano].visible, false);
);


if (device.desktop,
	set(layer[SansControlBarbtn_in].visible, false);
	set(layer[SansControlBarbtn_out].visible, false);
);
if (device.desktop,
	set(layer[SansControlBarbtn_up].visible, false);
	set(layer[SansControlBarbtn_down].visible, false);
);
if (device.desktop,
	set(layer[SansControlBarbtn_left].visible, false);
	set(layer[SansControlBarbtn_right].visible, false);
);
	SansControlBarupdateFullscreenButtons();


	SansControlBarupdateAutorotationButtons();


	SansControlBarupdateControlModeButtons();
	SansControlBarupdateHideShowHotspotsButtons();




	set(layer[SansControlBar_menu_bg].width, get(SansControlBarbackgroundwidthwhenclosed));

	set(layer[SansControlBar_menu_bg].visible, true);
  </action>
  <action name="SansControlBarshowMenuControls">
    set(SansControlBarIsOpened, true);
    set(layer[SansControlBarbtn_hidecontrols].visible, true);
    set(layer[SansControlBarbtn_showcontrols].visible, false);
	set(layer[SansControlBar_menu_bg].visible, true);
if (scene.count GT 1,
	set(layer[SansControlBarbtn_next_pano].visible, true);
	set(layer[SansControlBarbtn_prev_pano].visible, true);
);


if (device.desktop,
	set(layer[SansControlBarbtn_in].visible, true);
	set(layer[SansControlBarbtn_out].visible, true);
);
if (device.desktop,
	set(layer[SansControlBarbtn_up].visible, true);
	set(layer[SansControlBarbtn_down].visible, true);
);
if (device.desktop,
	set(layer[SansControlBarbtn_left].visible, true);
	set(layer[SansControlBarbtn_right].visible, true);
);
	SansControlBarupdateFullscreenButtons();


	SansControlBarupdateAutorotationButtons();


	SansControlBarupdateControlModeButtons();
	SansControlBarupdateHideShowHotspotsButtons();



    set(layer[SansControlBar_menu_bg].width, get(SansControlBarbackgroundwidthwhenopened));
  </action>




  <events name="SansControlBarmenufullscreenchangeevent"
          onenterfullscreen="SansControlBarupdateFullscreenButtons();"
          onexitfullscreen="SansControlBarupdateFullscreenButtons();"
          keep="true"/>
	<action name="SansControlBarHideFullscreenButtons">
		set(layer[SansControlBarbtn_openfs].visible , false);
		set(layer[SansControlBarbtn_closefs].visible, false);
	</action>
	<action name="SansControlBarShowFullscreenButtons">
		if (device.fullscreensupport,
			if(tour_fullscreen,
				set(layer[SansControlBarbtn_openfs].visible , false);
				set(layer[SansControlBarbtn_closefs].visible, true);
			,
				set(layer[SansControlBarbtn_openfs].visible ,true);
				set(layer[SansControlBarbtn_closefs].visible,false);
			);
		,
			SansControlBarHideFullscreenButtons();
		);
	</action>
	<action name="SansControlBarupdateFullscreenButtons">
		if (tour_displaycontrols,
			SansControlBarShowFullscreenButtons();
		,
			SansControlBarHideFullscreenButtons();
		);
	</action>

	<events name="SansControlBarAutorotationEvents"
		onstartautorotation="SansControlBarupdateAutorotationButtons();"
		onresumeautorotation="SansControlBarupdateAutorotationButtons();"
		onstopautorotation="SansControlBarupdateAutorotationButtons();"
		onpauseautorotation="SansControlBarupdateAutorotationButtons();"
		keep="true"/>
	<action name="SansControlBarHideAutorotationButtons">
		set(layer[SansControlBarbtn_autorotate_off].visible, false);
		set(layer[SansControlBarbtn_autorotate_on].visible , false);
	</action>
	<action name="SansControlBarShowAutorotationButtons">
		if(autorotate.enabled == false,
			set(layer[SansControlBarbtn_autorotate_off].visible, false);
			set(layer[SansControlBarbtn_autorotate_on].visible , true);
		,
			set(layer[SansControlBarbtn_autorotate_off].visible, true);
			set(layer[SansControlBarbtn_autorotate_on].visible , false);
		);
	</action>
	<action name="SansControlBarupdateAutorotationButtons">
		if (tour_displaycontrols,
			SansControlBarShowAutorotationButtons();
		,
			SansControlBarHideAutorotationButtons();
		);
	</action>



  <events name="SansControlBarhotspotsdisplayevents"
          hotspots_visibility_changed="SansControlBarupdateHideShowHotspotsButtons"
          keep="true"/>
	<action name="SansControlBarHideHideShowHotspotsButtons">
		set(layer[SansControlBarbtn_show_hotspots].visible, false);
		set(layer[SansControlBarbtn_hide_hotspots].visible, false);
	</action>
	<action name="SansControlBarShowHideShowHotspotsButtons">
		if (tour_displayspots,
			set(layer[SansControlBarbtn_hide_hotspots].visible, true);
			set(layer[SansControlBarbtn_show_hotspots].visible, false);
		,
			set(layer[SansControlBarbtn_show_hotspots].visible, true);
			set(layer[SansControlBarbtn_hide_hotspots].visible, false);
		);
	</action>
	<action name="SansControlBarupdateHideShowHotspotsButtons">
		if (tour_displaycontrols,
			SansControlBarShowHideShowHotspotsButtons();
		,
			SansControlBarHideHideShowHotspotsButtons();
		);
	</action>

  <action name="SansControlBarbuildMenu">
    
    set(SansControlBarbutton_pos, 0);

	set(SansControlBarbackgroundwidthwhenclosed, 40);
    set(layer[SansControlBarbtn_hidecontrols].x, get(SansControlBarbutton_pos));
    set(layer[SansControlBarbtn_showcontrols].x, get(SansControlBarbutton_pos));
    inc(SansControlBarbutton_pos, 45);



      if (device.fullscreensupport,
        set(layer[SansControlBarbtn_openfs].x , get(SansControlBarbutton_pos));
        set(layer[SansControlBarbtn_closefs].x, get(SansControlBarbutton_pos));
        inc(SansControlBarbutton_pos, 45);
      );



      set(layer[SansControlBarbtn_autorotate_on].x , get(SansControlBarbutton_pos));
      set(layer[SansControlBarbtn_autorotate_off].x, get(SansControlBarbutton_pos));
      inc(SansControlBarbutton_pos, 45);



    if (device.desktop,
      set(layer[SansControlBarbtn_ctrlmode_drag_to].x, get(SansControlBarbutton_pos));
      set(layer[SansControlBarbtn_ctrlmode_move_to].x, get(SansControlBarbutton_pos));
      inc(SansControlBarbutton_pos, 45);
    );



        set(layer[SansControlBarbtn_show_hotspots].x, get(SansControlBarbutton_pos));
        set(layer[SansControlBarbtn_hide_hotspots].x, get(SansControlBarbutton_pos));
        inc(SansControlBarbutton_pos, 45);



      if (device.desktop,
        set(layer[SansControlBarbtn_right].x, get(SansControlBarbutton_pos));
        inc(SansControlBarbutton_pos, 45);
        set(layer[SansControlBarbtn_left].x, get(SansControlBarbutton_pos));
        inc(SansControlBarbutton_pos, 45);
      );

      if (device.desktop,
        set(layer[SansControlBarbtn_down].x, get(SansControlBarbutton_pos));
        inc(SansControlBarbutton_pos, 45);
        set(layer[SansControlBarbtn_up].x, get(SansControlBarbutton_pos));
        inc(SansControlBarbutton_pos, 45);
      );

      if (device.desktop,
        set(layer[SansControlBarbtn_out].x, get(SansControlBarbutton_pos));
        inc(SansControlBarbutton_pos, 45);
        set(layer[SansControlBarbtn_in].x, get(SansControlBarbutton_pos));
        inc(SansControlBarbutton_pos, 45);
      );

    if (scene.count GT 1,
        set(layer[SansControlBarbtn_next_pano].x, get(SansControlBarbutton_pos));
        inc(SansControlBarbutton_pos, 45);
        set(layer[SansControlBarbtn_prev_pano].x, get(SansControlBarbutton_pos));
        inc(SansControlBarbutton_pos, 45);
      );



      dec(SansControlBarbutton_pos, 5);

      set(SansControlBarbackgroundwidthwhenopened, get(SansControlBarbutton_pos));


    
      set(layer[SansControlBar_menu_bg].width, get(SansControlBarbackgroundwidthwhenopened));
	
	
	
    </action>

	<events name="SansControlBarStartTourEvents" onTourStart="SansControlBarCallOnStartTour();" keep="true" />
	
	<action name="SansControlBarCallOnStartTour">
		
		showTourControls();

	</action>



<!-- ********** -->
<!-- Review -->
<!-- id : logo4 -->
<!-- ********** -->


  <layer align="topleft"
         x="10"
         y="170"
         zorder="4"
         name="logo4"
         keep="true"
         visible="false"
         capture="false"

			tooltip="logo4tooltipText"
			onhover="showTooltip('plugin',logo4TooltipStyle);"
			onout="hideTooltip();"
         url="%FIRSTXML%/graphics/logo4/review.png" 
         onclick="
getmessage(urltoopen,logo4websiteurl);openurl(get(urltoopen),_blank);
"

         height="35"
         width="35"

         />

  <events name="logo4events" 
    onTourStart="showlogo4();"
    hidetourcontrols="hidelogo4();"
    showtourcontrols="showlogo4();"
    keep="true" />

  <action name="hidelogo4">
    set(layer[logo4].visible, false);
  </action>
  <action name="showlogo4">
    if (tour_displaycontrols,
      set(layer[logo4].visible, true);
    );
  </action>



<layer name="logo4TooltipStyle"
	keep="true"
	enabled="false"
	capture="false"
	type="text"
	align="center"
	bg="true"
	bgcolor="0xffffff"
	bgalpha="1"
  bgroundedge="4"
	bgborder="4.0 0xffffff 1"
  mergedalpha="false"
	css="color:#000000;font-family:Raleway;font-weight:bold;font-size:14px;text-align:left;"
	edge="bottom"
	interactivecontent="false"
	zorder="0"
	padding="2"
	xoffset="0"
	yoffset="0"
	visible="false"
	html=""
/>


<!-- ********** -->
<!-- Kontakt -->
<!-- id : logo3 -->
<!-- ********** -->


  <layer align="topleft"
         x="10"
         y="130"
         zorder="5"
         name="logo3"
         keep="true"
         visible="false"
         capture="false"

			tooltip="logo3tooltipText"
			onhover="showTooltip('plugin',logo3TooltipStyle);"
			onout="hideTooltip();"
         url="%FIRSTXML%/graphics/logo3/contact.png" 
         onclick="
getmessage(urltoopen,logo3websiteurl);openurl(get(urltoopen),_blank);
"

         height="35"
         width="35"

         />

  <events name="logo3events" 
    onTourStart="showlogo3();"
    hidetourcontrols="hidelogo3();"
    showtourcontrols="showlogo3();"
    keep="true" />

  <action name="hidelogo3">
    set(layer[logo3].visible, false);
  </action>
  <action name="showlogo3">
    if (tour_displaycontrols,
      set(layer[logo3].visible, true);
    );
  </action>



<layer name="logo3TooltipStyle"
	keep="true"
	enabled="false"
	capture="false"
	type="text"
	align="center"
	bg="true"
	bgcolor="0xffffff"
	bgalpha="1"
  bgroundedge="4"
	bgborder="4.0 0xffffff 1"
  mergedalpha="false"
	css="color:#000000;font-family:Raleway;font-weight:bold;font-size:14px;text-align:left;"
	edge="bottom"
	interactivecontent="false"
	zorder="0"
	padding="2"
	xoffset="0"
	yoffset="0"
	visible="false"
	html=""
/>


<!-- ********** -->
<!-- Facebook -->
<!-- id : logo5 -->
<!-- ********** -->


  <layer align="topleft"
         x="10"
         y="90"
         zorder="6"
         name="logo5"
         keep="true"
         visible="false"
         capture="false"

			tooltip="logo5tooltipText"
			onhover="showTooltip('plugin',logo5TooltipStyle);"
			onout="hideTooltip();"
         url="%FIRSTXML%/graphics/logo5/facebook.png" 
         onclick="
getmessage(urltoopen,logo5websiteurl);openurl(get(urltoopen),_blank);
"

         height="35"
         width="35"

         />

  <events name="logo5events" 
    onTourStart="showlogo5();"
    hidetourcontrols="hidelogo5();"
    showtourcontrols="showlogo5();"
    keep="true" />

  <action name="hidelogo5">
    set(layer[logo5].visible, false);
  </action>
  <action name="showlogo5">
    if (tour_displaycontrols,
      set(layer[logo5].visible, true);
    );
  </action>



<layer name="logo5TooltipStyle"
	keep="true"
	enabled="false"
	capture="false"
	type="text"
	align="center"
	bg="true"
	bgcolor="0xffffff"
	bgalpha="1"
  bgroundedge="4"
	bgborder="4.0 0xffffff 1"
  mergedalpha="false"
	css="color:#000000;font-family:Raleway;font-weight:bold;font-size:14px;text-align:left;"
	edge="bottom"
	interactivecontent="false"
	zorder="0"
	padding="2"
	xoffset="0"
	yoffset="0"
	visible="false"
	html=""
/>


<!-- ********** -->
<!-- Instagram -->
<!-- id : logo2 -->
<!-- ********** -->


  <layer align="topleft"
         x="10"
         y="50"
         zorder="7"
         name="logo2"
         keep="true"
         visible="false"
         capture="false"

			tooltip="logo2tooltipText"
			onhover="showTooltip('plugin',logo2TooltipStyle);"
			onout="hideTooltip();"
         url="%FIRSTXML%/graphics/logo2/instagram.png" 
         onclick="
getmessage(urltoopen,logo2websiteurl);openurl(get(urltoopen),_blank);
"

         height="35"
         width="35"

         />

  <events name="logo2events" 
    onTourStart="showlogo2();"
    hidetourcontrols="hidelogo2();"
    showtourcontrols="showlogo2();"
    keep="true" />

  <action name="hidelogo2">
    set(layer[logo2].visible, false);
  </action>
  <action name="showlogo2">
    if (tour_displaycontrols,
      set(layer[logo2].visible, true);
    );
  </action>



<layer name="logo2TooltipStyle"
	keep="true"
	enabled="false"
	capture="false"
	type="text"
	align="center"
	bg="true"
	bgcolor="0xffffff"
	bgalpha="1"
  bgroundedge="4"
	bgborder="4.0 0xffffff 1"
  mergedalpha="false"
	css="color:#000000;font-family:Raleway;font-weight:bold;font-size:14px;text-align:left;"
	edge="bottom"
	interactivecontent="false"
	zorder="0"
	padding="2"
	xoffset="0"
	yoffset="0"
	visible="false"
	html=""
/>


<!-- ********** -->
<!-- WWW -->
<!-- id : logo1 -->
<!-- ********** -->


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

			tooltip="logo1tooltipText"
			onhover="showTooltip('plugin',logo1TooltipStyle);"
			onout="hideTooltip();"
         url="%FIRSTXML%/graphics/logo1/www.png" 
         onclick="
getmessage(urltoopen,logo1websiteurl);openurl(get(urltoopen),_blank);
"

         height="35"
         width="35"

         />

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

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



<layer name="logo1TooltipStyle"
	keep="true"
	enabled="false"
	capture="false"
	type="text"
	align="center"
	bg="true"
	bgcolor="0xffffff"
	bgalpha="1"
  bgroundedge="4"
	bgborder="4.0 0xffffff 1"
  mergedalpha="false"
	css="color:#000000;font-family:Arial;font-weight:bold;font-size:14px;text-align:left;"
	edge="bottom"
	interactivecontent="false"
	zorder="0"
	padding="2"
	xoffset="0"
	yoffset="0"
	visible="false"
	html=""
/>


<!-- ********** -->
<!-- Loading transition -->
<!-- id : blendmode -->
<!-- ********** -->
	<action name="blendmode_prepareblendmode" autorun="preinit">

		if(device.html5 AND device.webgl,

			set(ptblendmode, 'ZOOMBLEND(0.80000000000000004, 2.0, easeInOutSine)');

		,
			set(ptblendmode, 'BLEND(1.0, easeInCubic)');
		);

	</action>

<!-- ********** -->
<!-- XML Flow Mouse -->
<!-- id : includePlugin -->
<!-- ********** -->
<include url="%FIRSTXML%/graphics/include/flowmouse.xml"/>
<garrows_settings
	show_floatingarrow_d="true"
	show_chevrons_d="true"
	show_navpoints_d="false"
	show_contextmenu_d="true"
	show_originalhotspots_d="false"

	show_floatingarrow_m="true"
	show_chevrons_m="false"
	show_navpoints_m="false"
	show_contextmenu_m="true"
	show_originalhotspots_m="false"

	show_floatingarrow_vr="true"
	show_chevrons_vr="false"
	show_navpoints_vr="false"
	show_contextmenu_vr="true"
	show_originalhotspots_vr="false"

	floatingarrow_position_d="mouse"
	floatingarrow_position_m="fixed"
	floatingarrow_position_vr="fixed"
	
	floatingarrow_atv="25"
	floatingarrow_alpha="0.5"

	navhotspots_style="IconDefaultPointSpotStyle"
	navhotspots_style_vertical="IconDefaultPointSpotStyle1"

	startup_delay="0"
	show_tooltips="true"
	ignore_showhidehotspots="false"
	hotkey_f="true"
	chevrons_capture="true"
	chevrons_color="0xffffff"
	chevrons_coloronhover="0xd7d7d7"
	chevrons_borderwidth="1"
	chevrons_zorder="50"
	chevrons_bordercolor="0xffffff"
	chevrons_bordercoloronhover="0xd7d7d7"
	chevrons_style_m="chevronshape"
	chevrons_style_d="chevronsmallshape"
	chevrons_alpha="1"
	chevronsborder_alpha="1"
	floatingarrow_zorder="50"

	keep_view="true"
	keep_view_replace_what="MERGE"
	keep_view_replace_with="KEEPVIEW"

	chevrons_position="35"
	chevrons_scatter="0"
	chevrons_distance="180"
	floatingarrow_flyaway="false"
	floatingarrow_autohide="true"
	floatingarrow_sens="20"
	floatingarrow_updatedelay="1"
	floatingarrow_scale_d="10"
	floatingarrow_scale_m="10"
	navpoints_putonground="true"
	navpoints_atv="25"
	keyboard_control="false"

	plugin_directory="%FIRSTXML%/graphics/garrows"
	scenes_wobbling="false"
	scenes_wobbling_size="5"
	scenes_wobbling_time="500"
	scenes_wobbling_updatedelay="100"
	scenes_wobbling_stopondrag="false"
	chevrons_shadow_color="0x000000"
	chevrons_shadow_bordercolor="0x000000"
	chevrons_shadow_alpha="0.5"
	navpoints_alpha="0.2"
	navpoints_onhover_alpha="0.6"
	chevrons_shadow_borderwidth="1"
	chevrons_shadow_border_alpha="0.5"
	floating_arrow_text="Show/Hide floating arrow"
	chevron_arrows_text="Show/Hide chevron arrows"
	navigation_hotspots_text="Show/Hide navigation hotspots"
	floating_arrow_autohide_text="Auto hide floating arrow"
	hide_on_autorotate="true"
	chevrons_updatedelay_desktop="1"
	chevrons_updatedelay_mobile="0"
	logkey_enable="false"
	disabled_panoids=""
	password_protect="false"
	password="garrows"
/>
<include url="%FIRSTXML%/graphics/garrows/garrows.xml" />



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

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

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

  <action name="exitFullScreenChangeEvent" devices="fullscreensupport">set(tour_fullscreen,false);events.dispatch(onexitfullscreen);</action>

<action name="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>


</krpano>