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

<!-- ************ -->
<!-- Double click -->
<!-- ************ -->
  <plugin name="doubleclick" url="%FIRSTXML%/graphics/doubleclick/fieldofview_dc.swf" alturl="%FIRSTXML%/graphics/doubleclick/fieldofview_dc.js" keep="true" ondblclick="ondoubleclick();"/>
  <action name="ondoubleclick">switchFullscreen();

  </action>
<!-- ************ -->
<!-- Context Menu -->
<!-- ************ -->
  <contextmenu fullscreen="false">
    <item name="normal"        onclick="setViewNormal();" separator="true"/>
    <item name="architectural" onclick="setViewArchitectural();"/>
    <item name="littleplanet"  onclick="setViewLittlePlanet();"/>
    <item name="fullscreenentry" onclick="enterFullscreen();" separator="true"/>
  </contextmenu>

  <events name="contextmenuevents" keep="true" onenterfullscreen="updateContextMenu" onexitfullscreen="updateContextMenu" onxmlcomplete="updateContextMenu"/>
  <action name="updateContextMenu">
    getmessage(contextmenu.item[normal].caption, contextmenunormallabel);
    getmessage(contextmenu.item[architectural].caption, contextmenuarchitecturallabel);
    getmessage(contextmenu.item[littleplanet].caption, contextmenulittleplanetlabel);
    if(tour_fullscreen,
      getmessage(contextmenu.item[fullscreenentry].caption, contextmenucloseFsLabel);
      set(contextmenu.item[fullscreenentry].onclick, exitFullscreen(););
     ,
      getmessage(contextmenu.item[fullscreenentry].caption, contextmenuopenFsLabel);
      set(contextmenu.item[fullscreenentry].onclick, enterFullscreen(););
    );
  </action>
  <!-- ******************* -->
  <!-- Classic Control Bar -->
  <!-- ******************* -->

  <krpano theme2barbuilt="false" theme2backgroundwidthwhenclosed="0" theme2backgroundwidthwhenopened="0" theme2IsOpened="false" />
  <events name="theme2events" onxmlcomplete="theme2buildMenuBar();" keep="true"/>
  <action name="theme2buildMenuBar">
    ifnot (theme2barbuilt, theme2buildMenu(); set(theme2barbuilt, true););
  </action>

  <action name="theme2buildMenu">
    
    set(theme2button_pos, 20);

    set(layer[theme2btn_hidecontrols].x, get(theme2button_pos));
    set(layer[theme2btn_showcontrols].x, get(theme2button_pos));
    inc(theme2button_pos, 36);
    add(theme2backgroundwidthwhenclosed, get(theme2button_pos), 20);



    if (device.desktop,
      set(layer[theme2btn_display_help].x, get(theme2button_pos));
      set(layer[theme2btn_close_help  ].x, get(theme2button_pos));
      inc(theme2button_pos, 36);
    );

    if (device.fullscreensupport,
      set(layer[theme2btn_openfs ].x, get(theme2button_pos));
      set(layer[theme2btn_closefs].x, get(theme2button_pos));
      inc(theme2button_pos, 36);
    );



    set(layer[theme2btn_autorotate_on ].x, get(theme2button_pos));
    set(layer[theme2btn_autorotate_off].x, get(theme2button_pos));
    inc(theme2button_pos, 36);



    set(layer[theme2btn_show_thumbnails].x, get(theme2button_pos));
    set(layer[theme2btn_hide_thumbnails].x, get(theme2button_pos));
    inc(theme2button_pos, 36);

    if (device.desktop,
      set(layer[theme2btn_ctrlmode_drag_to].x, get(theme2button_pos));
      set(layer[theme2btn_ctrlmode_move_to].x, get(theme2button_pos));
      inc(theme2button_pos, 36);
    );



    if (device.desktop,
        set(layer[theme2btn_right].x, get(theme2button_pos));
        inc(theme2button_pos, 36);
        set(layer[theme2btn_left].x, get(theme2button_pos));
        inc(theme2button_pos, 36);
    );
    if (device.desktop,
        set(layer[theme2btn_down].x, get(theme2button_pos));
        inc(theme2button_pos, 36);
        set(layer[theme2btn_up].x, get(theme2button_pos));
        inc(theme2button_pos, 36);
    );
    if (device.desktop,
        set(layer[theme2btn_out].x, get(theme2button_pos));
        inc(theme2button_pos, 36);
        set(layer[theme2btn_in].x, get(theme2button_pos));
        inc(theme2button_pos, 36);
    );
    inc(theme2button_pos, 20);

    set(theme2backgroundwidthwhenopened, get(theme2button_pos));
    
    
    add(theme2VerifyVisibility, 20, 20);
    if(theme2backgroundwidthwhenopened == 20,
      set(theme2backgroundwidthwhenopened, 0);
    );

	
	
  </action>

	<events name="theme2StartTourEvents" onTourStart="theme2CallOnStartTour();" keep="true" />

	<action name="theme2CallOnStartTour">
		
		set(layer[theme2menu_controlbar_bg_img].width, get(theme2button_pos));
		set(layer[theme2menu_controlbar_bg].width, get(theme2button_pos));
		theme2showMenuControls();
	</action>

  <style name="theme2_btn_style"
         keep="true"
         alpha="0.8"
         edge="right" align="right"
         width="36" height="36"
         zorder="4"
         onover="theme2ctrlbaronoveraction();"
         onout="theme2ctrlbaronoutaction();"
	onhover="showTooltip(bottom, theme2menuTooltipStyle, bottom);"
         />
  <action name="theme2ctrlbaronoveraction">
    tween(alpha,1,0.1,easeoutquad);
    tween(y,-2,0.1,easeoutquad);
  </action>  
  <action name="theme2ctrlbaronoutaction">
    tween(alpha,0.8);
    tween(y,0,0.1,easeoutquad);
    hideTooltip();
  </action>

  <layer name="theme2menu_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="theme2menu_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="theme2btn_ctrlmode_move_to"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_move_to.png"
            style="theme2_btn_style"
            tooltip="controlBar_classicctrlmodeMoveTip"
            onclick="setControlModeMoveTo();"
            visible="false"
            devices="desktop"
            />
    <layer name="theme2btn_ctrlmode_drag_to"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_drag_to.png"
            style="theme2_btn_style"
            tooltip="controlBar_classicctrlmodeDragTip"
            onclick="setControlModeDragTo();"
            visible="false"
            devices="desktop"
            />

    <layer name="theme2btn_in"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_zoom_in.png"
            ondown="set(fov_moveforce, -1);"
            onup="set(fov_moveforce, 0);"
            style="theme2_btn_style"
            tooltip="controlBar_classiczoomInTip"
            devices="desktop"
            visible="false"
            />
    <layer name="theme2btn_out"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_zoom_out.png"
            ondown="set(fov_moveforce, +1);"
            onup="set(fov_moveforce, 0);"
            style="theme2_btn_style"
            tooltip="controlBar_classiczoomOutTip"
            devices="desktop"
            visible="false"
            />

    <layer name="theme2btn_left"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_move_left.png"
            ondown="set(hlookat_moveforce, -1);"
            onup="set(hlookat_moveforce, 0);"
            style="theme2_btn_style"
            tooltip="controlBar_classicmoveLeftTip"
            devices="desktop"
            visible="false"
            />
    <layer name="theme2btn_right"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_move_right.png"
            ondown="set(hlookat_moveforce, +1);"
            onup="set(hlookat_moveforce, 0);"
            style="theme2_btn_style"
            tooltip="controlBar_classicmoveRightTip"
            devices="desktop"
            visible="false"
            />

    <layer name="theme2btn_up"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_move_up.png"
            ondown="set(vlookat_moveforce, -1);"
            onup="set(vlookat_moveforce, 0);"
            style="theme2_btn_style"
            tooltip="controlBar_classicmoveUpTip"
            devices="desktop"
            visible="false"
            />
    <layer name="theme2btn_down"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_move_down.png"
            ondown="set(vlookat_moveforce, +1);"
            onup="set(vlookat_moveforce, 0);"
            style="theme2_btn_style"
            tooltip="controlBar_classicmoveDownTip"
            devices="desktop"
            visible="false"
            />



  <layer name="theme2btn_hide_thumbnails"
         url="%FIRSTXML%/graphics/classiccontrolbar/btn_hide_thumbnails.png"
         style="theme2_btn_style"
         onclick="hideTourThumbnails();"
         tooltip="controlBar_classichideThumbnailsTip"
         visible="false"
         />
  <layer name="theme2btn_show_thumbnails"
         url="%FIRSTXML%/graphics/classiccontrolbar/btn_show_thumbnails.png"
         style="theme2_btn_style"
         onclick="showTourThumbnails();"
         tooltip="controlBar_classicshowThumbnailsTip"
         visible="false"
         />



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

    <layer name="theme2btn_autorotate_on"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_start_autorotation.png"
            onclick="startautorotation();"
            style="theme2_btn_style"
            visible="false"
            tooltip="controlBar_classicautorotateOnTip"
            />
    <layer name="theme2btn_autorotate_off"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_stop_autorotation.png"
            onclick="stopautorotation();"
            style="theme2_btn_style"
            visible="false"
            tooltip="controlBar_classicautorotateOffTip"
            />



    <layer name="theme2btn_display_help"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_help.png"
            onclick="theme2displayHelp();"
            style="theme2_btn_style"
            devices="desktop"
            visible="false"
            tooltip="controlBar_classicdisplayHelpTip"
            />
    <layer name="theme2btn_close_help"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_help.png"
            onclick="theme2closeHelp();"
            style="theme2_btn_style"
            visible="false"
            devices="desktop"
            tooltip="controlBar_classichideHelpTip"
            />



    <layer name="theme2btn_hidecontrols"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_hide_controls.png"
            style="theme2_btn_style"
            onclick="theme2hideMenuControls();hideTourControls();"
            visible="false"
            tooltip="controlBar_classichideControlsTip"
            />
    <layer name="theme2btn_showcontrols"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_show_controls.png"
            style="theme2_btn_style"
            onclick="theme2showMenuControls();showTourControls();"
            tooltip="controlBar_classicdisplayControlsTip"
            visible="false"
            />
  </layer>



	<events name="theme2controlmodechangedevent" 
		oncontrolmodechanged="theme2updateControlModeButtons();" 
		keep="true" />
	<action name="theme2HideControlModeButtons">
		set(layer[theme2btn_ctrlmode_move_to].visible, false);
		set(layer[theme2btn_ctrlmode_drag_to].visible, false);
	</action>
	<action name="theme2ShowControlModeButtons">
		if (tour_controlmodemousetype == "moveto",
			set(layer[theme2btn_ctrlmode_drag_to].visible, true);
			set(layer[theme2btn_ctrlmode_move_to].visible, false);
		,
			set(layer[theme2btn_ctrlmode_move_to].visible, true);
			set(layer[theme2btn_ctrlmode_drag_to].visible, false);
		);
	</action>
	<action name="theme2updateControlModeButtons">
	if (device.desktop,
		set(theme2DisplayControlModeButtons, false);
		if (theme2IsOpened, set(theme2DisplayControlModeButtons, true););
		if (theme2DisplayControlModeButtons,
			theme2ShowControlModeButtons();
		,
			theme2HideControlModeButtons();
		);
	,
		theme2HideControlModeButtons();
	);
	</action>

	<events name="theme2hideshowthumbnailsevent" 
		hidetourthumbnails="theme2updateHideShowThumbnailsButtons();" 
		showtourthumbnails="theme2updateHideShowThumbnailsButtons();" 
		keep="true" />
	<action name="theme2HideHideShowThumbnailsButtons">
		set(layer[theme2btn_show_thumbnails].visible, false);
		set(layer[theme2btn_hide_thumbnails].visible, false);
	</action>
	<action name="theme2ShowHideShowThumbnailsButtons">
		if (tour_displaythumbnails,
			set(layer[theme2btn_hide_thumbnails].visible, true);
			set(layer[theme2btn_show_thumbnails].visible, false);
		,
			set(layer[theme2btn_show_thumbnails].visible, true);
			set(layer[theme2btn_hide_thumbnails].visible, false);
		);
	</action>
	<action name="theme2updateHideShowThumbnailsButtons">
		set(theme2DisplayHideShowThumbnailsButtons, false);
		if (theme2IsOpened, set(theme2DisplayHideShowThumbnailsButtons, true););
		if (theme2DisplayHideShowThumbnailsButtons,
			theme2ShowHideShowThumbnailsButtons();
		,
			theme2HideHideShowThumbnailsButtons();
		);
	</action>


  <action name="theme2hideMenuControls">
    set(theme2IsOpened, false);
    set(layer[theme2btn_hidecontrols].visible, false);
    set(layer[theme2btn_showcontrols].visible, true);
    theme2updateFullscreenButtons();


    theme2updateAutorotationButtons();


    theme2updateHideShowThumbnailsButtons();
    set(layer[theme2btn_up].visible  , false);
    set(layer[theme2btn_down].visible, false);
    set(layer[theme2btn_right].visible, false);
    set(layer[theme2btn_left].visible , false);
    set(layer[theme2btn_in].visible , false);
    set(layer[theme2btn_out].visible, false);


    theme2updateControlModeButtons();


    theme2updateHelpButtons();


    set(layer[theme2menu_controlbar_bg_img].visible, true);
    set(layer[theme2menu_controlbar_bg].visible, true);
    tween(layer[theme2menu_controlbar_bg_img].width , get(theme2backgroundwidthwhenclosed));
    tween(layer[theme2menu_controlbar_bg].width , get(theme2backgroundwidthwhenclosed));
    tween(layer[theme2menu_controlbar_bg_img].alpha, 1);
  </action>
  <action name="theme2showMenuControls">
    set(theme2IsOpened, true);
    set(layer[theme2btn_hidecontrols].visible, true);
    set(layer[theme2btn_showcontrols].visible, false);
    if(theme2backgroundwidthwhenopened == 0,
      set(layer[theme2menu_controlbar_bg_img].visible, false);
      set(layer[theme2menu_controlbar_bg].visible, false);
    ,
      set(layer[theme2menu_controlbar_bg_img].visible, true);
      set(layer[theme2menu_controlbar_bg].visible, true);
    );
    tween(layer[theme2menu_controlbar_bg_img].alpha, 1);
    tween(layer[theme2menu_controlbar_bg_img].width, get(theme2backgroundwidthwhenopened), 0.5, easeOutQuad, theme2showMenuButtons(););
    tween(layer[theme2menu_controlbar_bg].width, get(theme2backgroundwidthwhenopened), 0.5, easeOutQuad, theme2showMenuButtons(););
  </action>
  <action name="theme2showMenuButtons">
    if (device.desktop,
    set(layer[theme2btn_up].visible  , true);
    set(layer[theme2btn_down].visible, true);
    );
    if (device.desktop,
    set(layer[theme2btn_right].visible, true);
    set(layer[theme2btn_left].visible , true);
    );
    if (device.desktop,
    set(layer[theme2btn_in].visible , true);
    set(layer[theme2btn_out].visible, true);
    );


    theme2updateControlModeButtons();


    theme2updateHelpButtons();


    theme2updateFullscreenButtons();


    theme2updateAutorotationButtons();


      theme2updateHideShowThumbnailsButtons();
  </action>

  <layer name="theme2helpScreen" align="center" keep="true" onclick="theme2closeHelp();" url="%FIRSTXML%/graphics/classiccontrolbar/help_screen_bg.png" visible="false" height="10%" width="prop" displayed="false" alpha="1" />

  <layer name="theme2helpScreenFg" align="center" keep="true" onclick="theme2closeHelp();" 
         url="%FIRSTXML%/graphics/classiccontrolbar/help_screen_fg.png" 
         alpha="0.8" 
         height="50%" 
         width="prop"
         visible="false" />
  <action name="theme2displayHelp">
    set(layer[theme2helpScreen].displayed,true);
    set(layer[theme2helpScreen].visible,true);
    tween(layer[theme2helpScreen].height, 50%, 1, easeOutQuad,
      set(layer[theme2helpScreenFg].visible,true);
    );
    theme2updateHelpButtons();
  </action>
  <action name="theme2closeHelp">
    set(layer[theme2helpScreen].displayed,false);
    set(layer[theme2helpScreenFg].visible,false);
    tween(layer[theme2helpScreen].height, 10%, 1, easeOutQuad,
      set(layer[theme2helpScreen].visible,false);
    );
    theme2updateHelpButtons();
  </action>
	<action name="theme2HideHelpButtons">
		set(layer[theme2btn_display_help].visible, false);
		set(layer[theme2btn_close_help].visible, false);
	</action>
	<action name="theme2ShowHelpButtons">
		if (layer[theme2helpScreen].displayed,
			set(layer[theme2btn_close_help].visible, true);
			set(layer[theme2btn_display_help].visible, false);
		,
			set(layer[theme2btn_display_help].visible, true);
			set(layer[theme2btn_close_help].visible, false);
		);
	</action>
	<action name="theme2updateHelpButtons">
	if (device.desktop,
		set(theme2DisplayHelpButtons, false);
		if (theme2IsOpened, set(theme2DisplayHelpButtons, true););
		if (theme2DisplayHelpButtons,
			theme2ShowHelpButtons();
		,
			theme2HideHelpButtons();
		);
	,
		theme2HideHelpButtons();
	);
	</action>



	<events name="theme2menufullscreenchangeevent"
		onenterfullscreen="theme2updateFullscreenButtons();"
		onexitfullscreen="theme2updateFullscreenButtons();"
		keep="true"/>
	<action name="theme2HideFullscreenButtons">
		set(layer[theme2btn_openfs].visible , false);
		set(layer[theme2btn_closefs].visible, false);
	</action>
	<action name="theme2ShowFullscreenButtons">
		if (device.fullscreensupport,
			if(tour_fullscreen,
				set(layer[theme2btn_openfs].visible , false);
				set(layer[theme2btn_closefs].visible, true);
			,
				set(layer[theme2btn_openfs].visible ,true);
				set(layer[theme2btn_closefs].visible,false);
			);
		,
			theme2HideFullscreenButtons();
		);
	</action>
	<action name="theme2updateFullscreenButtons">
		set(theme2DisplayFullscreenButtons, false);
		if (theme2IsOpened, set(theme2DisplayFullscreenButtons, true););
		if (theme2DisplayFullscreenButtons,
			theme2ShowFullscreenButtons();
		,
			theme2HideFullscreenButtons();
		);
	</action>

	<events name="theme2AutorotationEvents"
		onstartautorotation="theme2updateAutorotationButtons();"
		onresumeautorotation="theme2updateAutorotationButtons();"
		onstopautorotation="theme2updateAutorotationButtons();"
		onpauseautorotation="theme2updateAutorotationButtons();"
		keep="true"/>
	<action name="theme2HideAutorotationButtons">
		set(layer[theme2btn_autorotate_off].visible, false);
		set(layer[theme2btn_autorotate_on].visible , false);
	</action>
	<action name="theme2ShowAutorotationButtons">
		if(tour_autorotateenabled==false,
			set(layer[theme2btn_autorotate_off].visible, false);
			set(layer[theme2btn_autorotate_on].visible , true);
		,
			set(layer[theme2btn_autorotate_off].visible, true);
			set(layer[theme2btn_autorotate_on].visible , false);
		);
	</action>
	<action name="theme2updateAutorotationButtons">
		set(theme2DisplayAutorotationButtons, false);
		if (theme2IsOpened, set(theme2DisplayAutorotationButtons, true););
		if (theme2DisplayAutorotationButtons,
			theme2ShowAutorotationButtons();
		,
			theme2HideAutorotationButtons();
		);
	</action>





  <textstyle name="theme2menuTooltipStyle"
             font="Helvetica"
             fontsize="16"
             bold="true"
             italic="false"
             background="false"
             border="false"
             alpha="0.8"
             blendmode="layer"
             textcolor="0xe6e6e6"
             effect="glow(0x111111,0.8);"
             origin="bottom"
             yoffset="60"
             edge="center"
             xoffset="0"
             textalign="center"
             noclip="true"
             devices="flash"
             />
	<layer name="theme2menuTooltipStyle"
		keep="true"
		enabled="false"
		capture="false"
		url="%FIRSTXML%/graphics/textfield.swf"
		align="center"
		background="true"
		backgroundcolor="0xdedede"
		backgroundalpha="1"
		border="false"
		bordercolor="0xffffff"
		css="color:#e6e6e6;font-family:Helvetica;font-weight:bold;font-size:16px;text-align:center;"
		width="200"
		height="20"
		autoheight="true"
			edge="bottom"
		textshadow="1.0"
		selectable="false"
		zorder="0"
		html=""
		visible="false"
		devices="html5"
		/>

	<!-- ********************** -->
	<!-- Classic Thumbnails Bar -->
	<!-- ********************** -->




<layer name="thumbnailsBar-thumbnailsBar-theme02" 
	keep="true" 
	type="image" 
	visible="false"
	align="top" 
	
		width="90%" 
		height="0" 
	
	x="0"
	y="10"
	
	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"			
/>



<textstyle name="tooltipStyle-thumbnailsBar-theme02"
	font="Helvetica"
	fontsize="16"
	bold="true"
	italic="false"
	background="false"
	border="false"
	alpha="0.8"
	blendmode="layer"
	textcolor="0xFFFFFF"
	effect="glow(0x111111,0.8);"
	edge="bottom"
	origin="cursor"
	noclip="true"
	devices="flash"
/>
<layer name="tooltipStyle-thumbnailsBar-theme02"
	keep="true"
	enabled="false"
	capture="false"
	url="%FIRSTXML%/graphics/textfield.swf"
	align="center"
	background="true"
	backgroundcolor="0xffffff"
	backgroundalpha="0.4"
	border="false"
	bordercolor="0xffffff"
	css="color:#FFFFFF;font-family:Helvetica;font-weight:bold;font-size:16px;text-align:center;"
	width="200"
	height="20"
	autoheight="true"
	edge="bottom"
	selectable="false"
	zorder="0"
	visible="false"
	html=""
	devices="html5"
/>

	<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"
		
		scrollSpeedInit="10"
		scrollSpeed="10"
		scrollSpeedMax="70"
		scrollSpeedAcceleration="20"
		
		parent="thumbnailsBar-thumbnailsBar-theme02"
		
		thumbWidth="0"
		thumbHeight="0"
		
		itemWidth="100"
		itemHeight="50"
		
		offsetX="0"
		offsetY="0"
		
		thumbSpacer="0"
		currentThumbsCount="0"
		
		adjustToContent="true"
		
		zorder="1"
		visible="false"
		ready="false"
	>
	
		
		<layer name="thumbsScrollArea-thumbnailsBar-theme02" 
			url="%FIRSTXML%/graphics/scrollarea.swf" 
			alturl="%FIRSTXML%/graphics/scrollarea.js" 
			align="top"
			onhover_autoscrolling="false"
			
			x="0"
			y="0"
			 
				direction="h" 
		/>
	
	</layer>
	
	
	
	<layer name="scrollPrevArrow-thumbnailsBar-theme02" 
		keep="true"
		type="image"
		visible="false"
		parent="thumbnailsBar-thumbnailsBar-theme02"
		targetHeight="0"
		tagertWidth="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">
		
		

		loadThumbsPartTwo-thumbnailsBar-theme02();
	</action>
	
	<action name="loadThumbsPartTwo-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);
			loadThumbsPartThree-thumbnailsBar-theme02();
		,
			delayedcall(delayedCallOnLoadCompleteBorder-thumbnailsBar-theme02, 0.2, loadThumbsPartTwo-thumbnailsBar-theme02());
		);
	</action>
	
	<action name="loadThumbsPartThree-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);
			
			
			set(i-thumbnailsBar-theme02-wait,25);
			
			
				for( set(i-thumbnailsBar-theme02, 0), i-thumbnailsBar-theme02 LT scene.count, inc(i-thumbnailsBar-theme02),
					if(i-thumbnailsBar-theme02-wait == i-thumbnailsBar-theme02,
						add(i-thumbnailsBar-theme02-wait,25);
						wait(0);
					);
					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].x), 2);
		mul(totalMarginY-thumbnailsBar-theme02, get(layer[scrollAreaContainer-thumbnailsBar-theme02].y), 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, mainloadscene(%1); resetMouseBehavior-thumbnailsBar-theme02(); 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, mainloadscene(%1); resetMouseBehavior-thumbnailsBar-theme02(); highlightThumb-thumbnailsBar-theme02(%1));
		,
			
				set(layer[get(thumbBorderName)].x, get(thumbIncPos-thumbnailsBar-theme02)); 
				
		);
		
		
		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));
	</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">
	
		
		
		
		set(j-thumbnailsBar-theme02-wait,25);
		
			for( set(j-thumbnailsBar-theme02, 0), j-thumbnailsBar-theme02 LT scene.count, inc(j-thumbnailsBar-theme02),
				if(j-thumbnailsBar-theme02-wait == j-thumbnailsBar-theme02,
					add(j-thumbnailsBar-theme02-wait,25);
					wait(0);
				);
				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(get(align), 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(get(align), 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">
			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(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>




<!-- ********* -->
<!-- Gyroscope -->
<!-- ********* -->
<plugin name="gyroscope"
        url="graphics/gyro.js"
        keep="true"
        devices="tablet|mobile"
        onavailable="delayedcall(1, checkGyroAvailability(););"
        enabled="true"
        />

<action name="changeGyroscopeState">
  ifnot (plugin[gyroscope].available === undefined,
    if (plugin[gyroscope].available,
      switch(plugin[gyroscope].enabled);
      if (plugin[gyroscope].enabled, events.dispatch(ongyroscopeon);, events.dispatch(ongyroscopeoff););
    );
  );
</action>

<action name="checkGyroAvailability">
	ifnot (plugin[gyroscope].available === undefined, 
		if (plugin[gyroscope].available,
			set(tour_gyroscopedevices, true);
			events.dispatch(ongyroscopeavailable);
			if (plugin[gyroscope].enabled, events.dispatch(ongyroscopeon);, events.dispatch(ongyroscopeoff););
		,
			set(tour_gyroscopedevices, false);
			set(plugin[gyroscope].enabled, false);
		);
	,
		set(tour_gyroscopedevices, false);
		set(plugin[gyroscope].enabled, false);
	);
</action>
  <!-- ********************** -->
  <!-- Previous / Next Strips -->
  <!-- ********************** -->
  <style name="prevnexttheme2btn_alpha_style" 
    alpha="0.0" onover="set(alpha, 1);" onout="set(alpha, 0.0);"
    devices="desktop"
  />
  <style name="prevnexttheme2btn_alpha_style" 
    alpha="0.5"
    devices="tablet|mobile"
  />
  <layer name="prevnexttheme2btn_prev_pano" keep="true" align="left"
         height="102%"
         width="5%"
         type="container"
         bgcapture="true"
         bgalpha="0.2"
         bgcolor="0xeeeeee"
         zorder="7"
         onclick="loadPreviousScene();"
         style="prevnexttheme2btn_alpha_style"
         visible="false">
  <layer name="prevnexttheme2prevPanoramaArrow" keep="true" align="center"
         url="%FIRSTXML%/graphics/prevnextstrips/btn_scroll_left.png"
         alpha="1"
         zorder="0"
         tooltip="prevnexttheme2prevSceneTip"
         tooltiptarget="prevnexttheme2btn_prev_pano_tooltip"
         onclick="loadPreviousScene();"
         onhover="prevnexttheme2showPrevNextTooltip('prevnexttheme2prevPanoramaArrow');"
         onout="prevnexttheme2resetPrevNextTooltip('prevnexttheme2prevPanoramaArrow');" />
  <layer name="prevnexttheme2btn_prev_pano_tooltip"
         keep="true"
         capture="false"
         url="%FIRSTXML%/graphics/textfield.swf"
         align="right" edge="left"
         background="false"
         css="p{color:#ffffff; font-family:Arial; font-weight:bold; font-size:14; margin-left:2; text-align:left; }"
         height="17"
         selectable="false"
         textglow="2"
         textglowcolor="0x000000"
         zorder="1"
         visible="false"
         />
  </layer>

  <layer name="prevnexttheme2btn_next_pano" keep="true" align="right"
         height="102%"
         width="5%"
         type="container"
         bgcapture="true"
         bgalpha="0.2"
         bgcolor="0xeeeeee"
         zorder="7"
         onclick="loadNextScene();"
         style="prevnexttheme2btn_alpha_style"
         visible="false">
  <layer name="prevnexttheme2nextPanoramaArrow" keep="true" align="center"
         url="%FIRSTXML%/graphics/prevnextstrips/btn_scroll_right.png"
         alpha="1"
         zorder="0"
         tooltip="prevnexttheme2nextSceneTip"
         tooltiptarget="prevnexttheme2btn_next_pano_tooltip"
         onclick="loadNextScene();"
         onhover="prevnexttheme2showPrevNextTooltip('prevnexttheme2nextPanoramaArrow');"
         onout="prevnexttheme2resetPrevNextTooltip('prevnexttheme2nextPanoramaArrow');" />
  <layer name="prevnexttheme2btn_next_pano_tooltip"
         keep="true"
         capture="false"
         url="%FIRSTXML%/graphics/textfield.swf"
         align="left" edge="right"
         background="false"
         css="p{color:#ffffff; font-family:Arial; font-weight:bold; font-size:14; margin-left:2; text-align:right; }"
         height="17"
         selectable="false"
         textglow="2"
         textglowcolor="0x000000"
         zorder="1"
         visible="false"
         />
  </layer>

  <events name="prevnexttheme2hideshowcontrolsevent" 
    onTourStart="prevnexttheme2showPrevNextControls();"
    keep="true"/>
  <action name="prevnexttheme2hidePrevNextControls">
    set(layer[prevnexttheme2btn_prev_pano].visible, false);
    set(layer[prevnexttheme2btn_next_pano].visible, false);
  </action>
  <action name="prevnexttheme2showPrevNextControls">
    set(layer[prevnexttheme2btn_prev_pano].visible, true);
    set(layer[prevnexttheme2btn_next_pano].visible, true);
  </action>


  <action name="prevnexttheme2showPrevNextTooltip">
    if (layer[%1].tooltip != null, if (layer[%1].tooltiptarget != null, getmessage(tooltipmess, get(layer[%1].tooltip));prevnexttheme2setPrevNextTooltipHtml(get(layer[%1].tooltiptarget), get(tooltipmess));););
  </action>
  <action name="prevnexttheme2setPrevNextTooltipHtml">
    set(layer[%1].html, [p] %2 [/p]);
    set(layer[%1].visible, true);
  </action>
  <action name="prevnexttheme2resetPrevNextTooltip">
    if (layer[%1].tooltiptarget != null, prevnexttheme2resetPrevNextTooltipHtml(get(layer[%1].tooltiptarget)););
  </action>
  <action name="prevnexttheme2resetPrevNextTooltipHtml">
    set(layer[%1].html, '');
    set(layer[%1].visible, false);
  </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>
  <!-- Hide / Show Thumbnails -->
  <action name="hideTourThumbnails">set(tour_displaythumbnails, false);events.dispatch(hidetourthumbnails);</action>
  <action name="showTourThumbnails">set(tour_displaythumbnails, true); events.dispatch(showtourthumbnails);</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="setViewArchitectural">
	stopSetViewTweens();
	setViewArchitecturalComplete();
</action>

<action name="setViewArchitecturalComplete">
	tween(view.fovmax, get(panoview.fovmax), distance(179, 1.00), easeoutquad);
	tween(view.architectural, 1.0, distance(1.0, 0.45), easeoutquad, 
		tween(view.fisheye, 0.0, distance(1.0, 0.45), easeoutquad, 
			set(view.fisheyefovlink, 0.5);
			set(view.stereographic,false);
			if(view.pannini, set(view.pannini,false); delayedcall(0,updateobject(true,true)); );
			tween(view.vlookat, get(panoview.v), 1.25);
			if(panoview.fov LE view.fov, tween(view.fov, get(panoview.fov), distance(50, 0.45)); );
		);
	);
</action><action name="setViewLittlePlanet">
	stopSetViewTweens();
	setViewLittlePlanetComplete();
</action>

<action name="setViewLittlePlanetComplete">
	tween(view.architectural, 0.0, 0.25, easeoutquad, 
		tween(view.vlookat, 90, distance(179, 1.50), easeoutquad);
		set(backtonormalfirst,false);
		if(view.pannini == true, set(backtonormalfirst,true) );
		if(view.stereographic == false, set(backtonormalfirst,true) );
		if(backtonormalfirst, tween(view.fisheye, 0.0 ,distance(1.0, 0.25), easeoutquad, WAIT); );
		if(view.pannini, set(view.pannini,false); delayedcall(0, updateobject(true,true)); );
		if(panoview.fovmax LE 150, set(view.fovmax, 150); , set(view.fovmax, get(panoview.fovmax)); );
		set(view.stereographic, true);
		set(view.fisheyefovlink, 1.5);
		tween(view.fisheye, 1.0, distance(1.0, 0.75), easeoutquad);
		tween(view.fov, 150, distance(179, 0.75), easeoutquad);
	);
</action><action name="setViewNormal">
	stopSetViewTweens();
	setViewNormalComplete();
</action>

<action name="setViewNormalComplete">
	tween(view.architectural, 0.0, distance(1.0, 0.45), easeoutquad,
		tween(view.fovmax, get(panoview.fovmax), distance(179, 1.00));
		tween(view.vlookat, get(panoview.v), distance(90, 0.45));
		tween(view.fisheye, 0.0, distance(1.0, 0.45), easeoutquad,
			set(view.stereographic,false);
			if(view.pannini, set(view.pannini,false); delayedcall(0,updateobject(true,true)); );
			set(view.fisheyefovlink, 0.5);
			if(panoview.fov LE view.fov, tween(view.fov, get(panoview.fov), distance(50, 0.45)); );
		);
	);
</action>

<action name="stopSetViewTweens">
	stoptween(view.fov);
	stoptween(view.fovmax);
	stoptween(view.vlookat);
	stoptween(view.fisheye);
	stoptween(view.architectural);
</action>
</krpano>