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

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


	<!-- ***************** -->
	<!-- D-Pad Control Bar -->
	<!-- ***************** -->


<krpano crosscornerbarbarbuilt="false" crosscornerbarhorizontalwidth="0" crosscornerbarverticalheight="0" crosscornerbarIsOpened="false" />

<events name="crosscornerbarevents" onxmlcomplete="crosscornerbarbuildMenuBar();" keep="true"/>

<action name="crosscornerbarbuildMenuBar">
	ifnot (crosscornerbarbarbuilt, crosscornerbarbuildMenu(); set(crosscornerbarbarbuilt, true););
</action>

<action name="crosscornerbarbuildMenu">
	
	
	
	set(crosscornerbarbutton_pos, 10);

		if (device.fullscreensupport,
			set(layer[crosscornerbarbtn_openfs].y, get(crosscornerbarbutton_pos));
			set(layer[crosscornerbarbtn_closefs].y, get(crosscornerbarbutton_pos));
			inc(crosscornerbarbutton_pos, 40);
		);
	
		if (device.desktop,
			set(layer[crosscornerbarbtn_ctrlmode_drag_to].y, get(crosscornerbarbutton_pos));
			set(layer[crosscornerbarbtn_ctrlmode_move_to].y, get(crosscornerbarbutton_pos));
			inc(crosscornerbarbutton_pos, 40);
		);
	


	
		if (device.desktop,
			set(layer[crosscornerbarbtn_out].y, get(crosscornerbarbutton_pos));
			inc(crosscornerbarbutton_pos, 40);
				set(layer[crosscornerbarzoom_slider_bg].y, get(crosscornerbarbutton_pos));
				inc(crosscornerbarbutton_pos, 70);
			set(layer[crosscornerbarbtn_in].y, get(crosscornerbarbutton_pos));
			inc(crosscornerbarbutton_pos, 40);
		);
	
		set(layer[crosscornerbarbtn_autorotate_on ].y, get(crosscornerbarbutton_pos));
		set(layer[crosscornerbarbtn_autorotate_off].y, get(crosscornerbarbutton_pos));
		inc(crosscornerbarbutton_pos, 40);
	


	
	if (crosscornerbarbutton_pos != 10,
		set(layer[crosscornerbarmenu_vertical_bg].height, get(crosscornerbarbutton_pos));
		set(layer[crosscornerbarmenu_vertical_bg_border].height, get(crosscornerbarbutton_pos));
		set(crosscornerbarverticalheight, get(crosscornerbarbutton_pos));
	,
		set(layer[crosscornerbarmenu_vertical_bg].height, 0);
	);
	
	
	
	set(crosscornerbarbutton_pos, 10);
	
	
		if (scene.count GT 1,
			set(layer[crosscornerbarbtn_prev_pano].x, get(crosscornerbarbutton_pos));
			inc(crosscornerbarbutton_pos, 40);
			
			set(layer[crosscornerbarbtn_next_pano].x, get(crosscornerbarbutton_pos));
			inc(crosscornerbarbutton_pos, 40);
		);
	


	
	
	

	
	
		set(layer[crosscornerbarbtn_share].x, get(crosscornerbarbutton_pos));
		inc(crosscornerbarbutton_pos, 40);
	

	
		if (device.desktop,
			set(layer[crosscornerbarbtn_display_help].x, get(crosscornerbarbutton_pos));
			set(layer[crosscornerbarbtn_close_help].x, get(crosscornerbarbutton_pos));
			inc(crosscornerbarbutton_pos, 40);
		);
	
	if (crosscornerbarbutton_pos != 10,
		set(layer[crosscornerbarmenu_horizontal_bg].width, get(crosscornerbarbutton_pos));
		set(layer[crosscornerbarmenu_horizontal_bg_border].width, get(crosscornerbarbutton_pos));
		set(crosscornerbarhorizontalwidth, get(crosscornerbarbutton_pos));
	,
		set(layer[crosscornerbarmenu_horizontal_bg].width, 0);
	);
	
	
	
	
</action>


<events name="crosscornerbarStartTourEvents" onTourStart="crosscornerbarCallOnStartTour();" keep="true" />

<action name="crosscornerbarCallOnStartTour">
	
	hideTourControls();

</action>


	<action name="crosscornerbarSetVolumeBarOffsetX">
		
		
		add(volumeBarPosX, get(layer[crosscornerbarVolumeBarContainer].x), get(layer[get(layer[crosscornerbarVolumeBarContainer].parent)].x));
		
		set(layer[crosscornerbarVolumeBarContainer].xoffset, get(volumeBarPosX));
		
		crosscornerbarSetupVolumeBar();
	</action>
		
	
	<action name="crosscornerbarSetupVolumeBar">
		crosscornerbarCalculateSegmentWidth();
		
		for(set(i,0), i LT layer[crosscornerbarVolumeBarContainer].segmentCount, inc(i), 
			crosscornerbarCreateVolumeSegment(get(i));
		);
	</action>
	
	<action name="crosscornerbarCalculateSegmentWidth">
		sub(layer[crosscornerbarVolumeBarContainer].intervalCount, get(layer[crosscornerbarVolumeBarContainer].segmentCount), 1);
		
		mul(totalIntervalWidth, get(layer[crosscornerbarVolumeBarContainer].intervalWidth), get(layer[crosscornerbarVolumeBarContainer].intervalCount));
		
		sub(totalSegmentWidth, get(layer[crosscornerbarVolumeBarContainer].width), get(totalIntervalWidth));
		
		div(layer[crosscornerbarVolumeBarContainer].segmentWidth, get(totalSegmentWidth), get(layer[crosscornerbarVolumeBarContainer].segmentCount));
		
		add(layer[crosscornerbarVolumeBarContainer].incrementPosX, get(layer[crosscornerbarVolumeBarContainer].segmentWidth), get(layer[crosscornerbarVolumeBarContainer].intervalWidth));
		
		div(layer[crosscornerbarVolumeBarContainer].incrementHeight, get(layer[crosscornerbarVolumeBarContainer].height), get(layer[crosscornerbarVolumeBarContainer].segmentCount));
	</action>
	
	<action name="crosscornerbarCreateVolumeSegment">
		set(volumeSegmentName, 'volumeSegment_');
		txtadd(volumeSegmentName, %1);
		
		mul(posX, get(layer[crosscornerbarVolumeBarContainer].incrementPosX), %1);
		
		mul(segmentHeight, get(layer[crosscornerbarVolumeBarContainer].incrementHeight), %1);
		add(segmentHeight, get(layer[crosscornerbarVolumeBarContainer].incrementHeight));
		
		addlayer(get(volumeSegmentName));
		set(layer[get(volumeSegmentName)].keep, true);
		set(layer[get(volumeSegmentName)].type, container);
		set(layer[get(volumeSegmentName)].align, bottomleft);
		set(layer[get(volumeSegmentName)].parent, crosscornerbarVolumeBarContainer);
		set(layer[get(volumeSegmentName)].x, get(posX));
		set(layer[get(volumeSegmentName)].width, get(layer[crosscornerbarVolumeBarContainer].segmentWidth));
		set(layer[get(volumeSegmentName)].height, get(segmentHeight));
		
		set(layer[get(volumeSegmentName)].bgcolor, get(layer[crosscornerbarVolumeBarContainer].lightColor));
		set(layer[get(volumeSegmentName)].bgalpha, 1);
	</action>
	
	<action name="crosscornerbarAdjustHighlightToVolume">
		mul(segmentToHighlight, %1, get(layer[crosscornerbarVolumeBarContainer].segmentCount));
		div(segmentToHighlight, 100);
		Math.ceil(segmentToHighlight); 
		
		for(set(i,0), i LT layer[crosscornerbarVolumeBarContainer].segmentCount, inc(i), 
			set(volumeSegmentName, 'volumeSegment_');
			txtadd(volumeSegmentName, get(i));
			
			if(i LT segmentToHighlight,
				set(layer[get(volumeSegmentName)].bgcolor, get(layer[crosscornerbarVolumeBarContainer].lightColor));
				set(layer[get(volumeSegmentName)].bgalpha, 1.0);
			,
				set(layer[get(volumeSegmentName)].bgcolor, get(layer[crosscornerbarVolumeBarContainer].darkColor));
				set(layer[get(volumeSegmentName)].bgalpha, 0.4);
			);
		);
	</action>
	
	<action name="crosscornerbarVolumeBarClickHandler">
		if(false,
			
			sub(localPosX, stagewidth, get(layer[crosscornerbarVolumeBarContainer].xoffset));
			sub(localPosX, mouse.x);
			sub(localX, get(layer[crosscornerbarVolumeBarContainer].width), get(localPosX));
		,
			
			sub(localX, mouse.x, get(layer[crosscornerbarVolumeBarContainer].xoffset));
		);
		
		mul(percent, get(localX), 100);
		div(percent, get(layer[crosscornerbarVolumeBarContainer].width));
		Math.ceil(percent);
		
		
		setTourSoundsVolume(get(percent));
		
		
		if(tour_soundson == false,
			playTourSounds();
		);
		
		crosscornerbarAdjustHighlightToVolume(get(percent));
	</action>
	


<style name="crosscornerbarbtn_vertical_style"
	keep="true"
	align="bottom"
	onhover="crosscornerbarshowVerticalMenuTooltip();"
    onout="hideTooltip();"
	crop="0| 0|30|30"
	onovercrop="0|30|30|30"
	ondowncrop="0|60|30|30"
	x="0"
	/>
<style name="crosscornerbarbtn_vertical_style_alpha"
	alpha="1.0"
	devices="tablet|mobile"
	/>
<style name="crosscornerbarbtn_vertical_style_alpha"
	alpha="0.2"
	devices="desktop"
	/>

<style name="crosscornerbarmenu_bg_alpha"
	alpha="0.2"
	devices="desktop"
	/>
<style name="crosscornerbarmenu_bg_alpha"
	alpha="0.5"
	devices="tablet|mobile"
	/>

<layer name="crosscornerbarmenu_vertical_bg"
	url="%FIRSTXML%/graphics/crosscornerbar/btn_bg_vertical.png"
	keep="true"
	align="bottomleft"
	x="64"
	y="118"
	edge="bottom"
	zorder="0"
	scale9grid="12|10|3|40"
	style="crosscornerbarmenu_bg_alpha"
	visible="false"
	/>

<layer name="crosscornerbarmenu_vertical_bg_border"
	url="%FIRSTXML%/graphics/crosscornerbar/btn_bg_border_vertical.png"
	keep="true"
	align="bottomleft"
	x="64"
	y="118"
	edge="bottom"
	zorder="1"
	scale9grid="12|10|3|40"
	onout="crosscornerbarvertical_onout_action();"
	onover="crosscornerbarvertical_onover_action();"
	visible="false"
	>

  <layer name="crosscornerbarbtn_autorotate_on"
          url="%FIRSTXML%/graphics/crosscornerbar/btn_start_autorotation.png"
          onclick="resumeautorotation();
"
          style="crosscornerbarbtn_vertical_style|crosscornerbarbtn_vertical_style_alpha"
          visible="false"
          tooltip="controlBar_dpadautorotateOnTip"
          />
  <layer name="crosscornerbarbtn_autorotate_off"
          url="%FIRSTXML%/graphics/crosscornerbar/btn_stop_autorotation.png"
          onclick="pauseautorotation();
"
          style="crosscornerbarbtn_vertical_style|crosscornerbarbtn_vertical_style_alpha"
          visible="false"
          tooltip="controlBar_dpadautorotateOffTip"
          />


  <layer name="crosscornerbarbtn_in"
          url="%FIRSTXML%/graphics/crosscornerbar/btn_zoom_in.png"
          style="crosscornerbarbtn_vertical_style|crosscornerbarbtn_vertical_style_alpha"
          ondown="set(fov_moveforce, -1);
"
          onup="set(fov_moveforce, 0);
"
          tooltip="controlBar_dpadzoomInTip"
          visible="false"
          devices="desktop"
          />

  <layer name="crosscornerbarbtn_out"
          url="%FIRSTXML%/graphics/crosscornerbar/btn_zoom_out.png"
          style="crosscornerbarbtn_vertical_style|crosscornerbarbtn_vertical_style_alpha"
          ondown="set(fov_moveforce, +1);
"
          onup="set(fov_moveforce, 0);
"
          tooltip="controlBar_dpadzoomOutTip"
          visible="false"
          devices="desktop"
          />
  <layer name="crosscornerbarzoom_slider_bg"
          url="%FIRSTXML%/graphics/crosscornerbar/slider_bg_vertical.png"
          keep="true"
          align="bottom"
          alpha="0.2"
          visible="false"
          devices="desktop"
          >
    <layer name="crosscornerbarzoom_slider_grip"
           keep="true"
           url="%FIRSTXML%/graphics/crosscornerbar/slider_grip_vertical.png"
           align="top"
           edge="center"
           ondown="crosscornerbarzoom_slider_grip_ondown();"
           />
  </layer>

  <layer name="crosscornerbarbtn_openfs"
          url="%FIRSTXML%/graphics/crosscornerbar/btn_enter_fs.png"
          onclick="enterFullscreen();
"
          style="crosscornerbarbtn_vertical_style|crosscornerbarbtn_vertical_style_alpha"
          tooltip="controlBar_dpadopenFsTip"
          visible="false"
          devices="fullscreensupport"
          />
  <layer name="crosscornerbarbtn_closefs"
          url="%FIRSTXML%/graphics/crosscornerbar/btn_close_fs.png"
          onclick="exitFullscreen();
"
          style="crosscornerbarbtn_vertical_style|crosscornerbarbtn_vertical_style_alpha"
          visible="false"
          tooltip="controlBar_dpadcloseFsTip"
          devices="fullscreensupport"
          />



  <layer name="crosscornerbarbtn_ctrlmode_move_to"
          url="%FIRSTXML%/graphics/crosscornerbar/btn_move_to.png"
          style="crosscornerbarbtn_vertical_style|crosscornerbarbtn_vertical_style_alpha"
          tooltip="controlBar_dpadctrlmodeMoveTip"
          onclick="setControlModeMoveTo();
"
          visible="false"
          devices="desktop"
          />
  <layer name="crosscornerbarbtn_ctrlmode_drag_to"
          url="%FIRSTXML%/graphics/crosscornerbar/btn_drag_to.png"
          style="crosscornerbarbtn_vertical_style|crosscornerbarbtn_vertical_style_alpha"
          tooltip="controlBar_dpadctrlmodeDragTip"
          onclick="setControlModeDragTo();
"
          visible="false"
          devices="desktop"
          />


</layer>

  <action name="crosscornerbarvertical_onout_action">
    set(layer[crosscornerbarmenu_vertical_bg].alpha, 0.2);
    if (device.fullscreensupport,
      set(layer[crosscornerbarbtn_openfs].alpha, 0.2);
      set(layer[crosscornerbarbtn_closefs].alpha, 0.2);
    );
    if (device.desktop,
    set(layer[crosscornerbarbtn_in].alpha, 0.2);
    set(layer[crosscornerbarbtn_out].alpha, 0.2);
    set(layer[crosscornerbarzoom_slider_bg].alpha, 0.2);
    );


    set(layer[crosscornerbarbtn_autorotate_off].alpha, 0.2);
    set(layer[crosscornerbarbtn_autorotate_on ].alpha, 0.2);
    if (device.desktop,
      set(layer[crosscornerbarbtn_ctrlmode_drag_to].alpha, 0.2);
      set(layer[crosscornerbarbtn_ctrlmode_move_to].alpha, 0.2);
    );
  </action>

  <action name="crosscornerbarvertical_onover_action">
    set(layer[crosscornerbarmenu_vertical_bg].alpha, 1);
    if (device.fullscreensupport,
      set(layer[crosscornerbarbtn_openfs].alpha, 1);
      set(layer[crosscornerbarbtn_closefs].alpha, 1);
    );
    if (device.desktop,
    set(layer[crosscornerbarbtn_in].alpha, 1);
    set(layer[crosscornerbarbtn_out].alpha, 1);
    set(layer[crosscornerbarzoom_slider_bg].alpha, 1);
    );


    set(layer[crosscornerbarbtn_autorotate_off].alpha, 1);
    set(layer[crosscornerbarbtn_autorotate_on ].alpha, 1);
    if (device.desktop,
      set(layer[crosscornerbarbtn_ctrlmode_drag_to].alpha, 1);
      set(layer[crosscornerbarbtn_ctrlmode_move_to].alpha, 1);
    );
  </action>

  <action name="crosscornerbarhorizontal_onout_action">
    set(layer[crosscornerbarmenu_horizontal_bg].alpha, 0.2);

    set(layer[crosscornerbarbtn_share].alpha, 0.2);

    if (scene.count GT 1,
    set(layer[crosscornerbarbtn_prev_pano].alpha, 0.2);
    set(layer[crosscornerbarbtn_next_pano].alpha, 0.2);
    );




    if (device.desktop,
      set(layer[crosscornerbarbtn_display_help].alpha, 0.2);
      set(layer[crosscornerbarbtn_close_help].alpha, 0.2);
    ); 
  </action>

  <action name="crosscornerbarhorizontal_onover_action">
    set(layer[crosscornerbarmenu_horizontal_bg].alpha, 1);

    set(layer[crosscornerbarbtn_share].alpha, 1);

    if (scene.count GT 1,
    set(layer[crosscornerbarbtn_prev_pano].alpha, 1);
    set(layer[crosscornerbarbtn_next_pano].alpha, 1);
    );




    if (device.desktop,
      set(layer[crosscornerbarbtn_display_help].alpha, 1);
      set(layer[crosscornerbarbtn_close_help].alpha, 1);
    );
  </action>

  <style name="crosscornerbarbtn_horizontal_style"
         keep="true"
         align="left"
         onhover="crosscornerbarshowHorizontalMenuTooltip();"
         onout="hideTooltip();"
               crop="0| 0|30|30"
         onovercrop="0|30|30|30"
         ondowncrop="0|60|30|30"
         y="0"
         />
<style name="crosscornerbarbtn_horizontal_style_alpha"
	alpha="1.0"
	devices="tablet|mobile"
	/>
<style name="crosscornerbarbtn_horizontal_style_alpha"
	alpha="0.2"
	devices="desktop"
	/>

  <layer name="crosscornerbarmenu_horizontal_bg"
          url="%FIRSTXML%/graphics/crosscornerbar/btn_bg_horizontal.png"
          keep="true"
          align="bottomleft"
          x="118"
          y="64"
          edge="left"
          zorder="0"
          scale9grid="10|12|40|3"
          style="crosscornerbarmenu_bg_alpha"
          visible="false"
          />

  <layer name="crosscornerbarmenu_horizontal_bg_border"
          url="%FIRSTXML%/graphics/crosscornerbar/btn_bg_border_horizontal.png"
          keep="true"
          align="bottomleft"
          x="118"
          y="64"
          edge="left"
          zorder="1"
          scale9grid="10|12|40|3"
          onout="crosscornerbarhorizontal_onout_action();"
          onover="crosscornerbarhorizontal_onover_action();"
          visible="false"
          >
    <layer name="crosscornerbarbtn_share"
            url="%FIRSTXML%/graphics/crosscornerbar/btn_share.png"
            onclick="shareTour();
"
            style="crosscornerbarbtn_horizontal_style|crosscornerbarbtn_horizontal_style_alpha"
            tooltip="controlBar_dpadshareTip"
            visible="false"
            />

    <layer name="crosscornerbarbtn_prev_pano"
            url="%FIRSTXML%/graphics/crosscornerbar/btn_previous_scene.png"
            onclick="loadPreviousScene();
"
            style="crosscornerbarbtn_horizontal_style|crosscornerbarbtn_horizontal_style_alpha"
            tooltip="controlBar_dpadprevSceneTip"
            visible="false"
            />
    <layer name="crosscornerbarbtn_next_pano"
            url="%FIRSTXML%/graphics/crosscornerbar/btn_next_scene.png"
            onclick="loadNextScene();
"
            style="crosscornerbarbtn_horizontal_style|crosscornerbarbtn_horizontal_style_alpha"
            tooltip="controlBar_dpadnextSceneTip"
            visible="false"
            />




    <layer name="crosscornerbarbtn_display_help"
            url="%FIRSTXML%/graphics/crosscornerbar/btn_help.png"
            onclick="crosscornerbardisplayHelp();"
            style="crosscornerbarbtn_horizontal_style|crosscornerbarbtn_horizontal_style_alpha"
            tooltip="controlBar_dpaddisplayHelpTip"
            devices="desktop"
            visible="false"
            />
    <layer name="crosscornerbarbtn_close_help"
            url="%FIRSTXML%/graphics/crosscornerbar/btn_help.png"
            onclick="crosscornerbarcloseHelp();"
            style="crosscornerbarbtn_horizontal_style|crosscornerbarbtn_horizontal_style_alpha"
            tooltip="controlBar_dpadhideHelpTip"
            devices="desktop"
            visible="false"
            />



  </layer>


	
	<style name="crosscornerbarbtn_navigation_style"
		keep="true"
		onhover="crosscornerbarshowVerticalMenuTooltip();"
		onout="hideTooltip();"
		crop="0|0|30|30"
		onovercrop="0|30|30|30"
		ondowncrop="0|60|30|30"
	/>
	<style name="crosscornerbarbtn_navigation_style_alpha"
		alpha="1.0"
		devices="tablet|mobile"
	/>
	<style name="crosscornerbarbtn_navigation_style_alpha"
		alpha="0.2"
		devices="desktop"
	/>
	
	<layer name="crosscornerbarnavigation_bg"
		url="%FIRSTXML%/graphics/crosscornerbar/btn_bg_move.png"
		align="bottomleft"
		x="10"
		y="10"
		keep="true"
		capture="false"
		zorder="0"
		style="crosscornerbarmenu_bg_alpha"
		visible="false"
		/>

  <layer name="crosscornerbarnavigation_bg_border"
          url="%FIRSTXML%/graphics/crosscornerbar/btn_bg_border_move.png"
          keep="true"
          align="bottomleft"
          x="10"
          y="10"
          capture="false"
          zorder="1"
          onout="crosscornerbarnav_onout_action();"
          onover="crosscornerbarnav_onover_action();"
          visible="false"
          >
    <layer name="crosscornerbarbtn_left"
            ondown="set(hlookat_moveforce, -1);
"
            onup="set(hlookat_moveforce, 0);
"
            url="%FIRSTXML%/graphics/crosscornerbar/btn_move_left.png"
            style="crosscornerbarbtn_navigation_style|crosscornerbarbtn_navigation_style_alpha"
            tooltip="controlBar_dpadmoveLeftTip"
            x="5"
            y="0"
            edge="left"
            align="left"
            visible="false"
             />
    <layer name="crosscornerbarbtn_right"
            ondown="set(hlookat_moveforce, +1);
"
            onup="set(hlookat_moveforce, 0);
"
            url="%FIRSTXML%/graphics/crosscornerbar/btn_move_right.png"
            style="crosscornerbarbtn_navigation_style|crosscornerbarbtn_navigation_style_alpha"
            tooltip="controlBar_dpadmoveRightTip"
            x="5"
            y="0"
            edge="right"
            align="right"
            visible="false"
             />
    <layer name="crosscornerbarbtn_up"
            ondown="set(vlookat_moveforce, -1);
"
            onup="set(vlookat_moveforce, 0);
"
            url="%FIRSTXML%/graphics/crosscornerbar/btn_move_up.png"
            style="crosscornerbarbtn_navigation_style|crosscornerbarbtn_navigation_style_alpha"
            tooltip="controlBar_dpadmoveUpTip"
            x="0"
            y="5"
            align="top"
            edge="top"
            visible="false"
             />
    <layer name="crosscornerbarbtn_down"
            ondown="set(vlookat_moveforce, +1);
"
            onup="set(vlookat_moveforce, 0);
"
            url="%FIRSTXML%/graphics/crosscornerbar/btn_move_down.png"
            style="crosscornerbarbtn_navigation_style|crosscornerbarbtn_navigation_style_alpha"
            tooltip="controlBar_dpadmoveDownTip"
            x="0"
            y="5"
            edge="bottom"
            align="bottom"
            visible="false"
             />

	<layer name="crosscornerbarbtn_hidecontrols"
		url="%FIRSTXML%/graphics/crosscornerbar/btn_hide_controls.png"
		style="crosscornerbarbtn_navigation_style"
		onclick="hideTourControls();
"
		edge="center"
		align="center"
		tooltip="controlBar_dpadhideControlsTip"
		visible="false"
		alpha="1.0"
		/>
	<layer name="crosscornerbarbtn_showcontrols"
		onclick="showTourControls();
"
		url="%FIRSTXML%/graphics/crosscornerbar/btn_show_controls.png"
		style="crosscornerbarbtn_navigation_style"
		align="center"
		edge="center"
		visible="false"
		alpha="0.5"
		onout="set(alpha, 0.5);"
		onover="set(alpha, 1);"
		tooltip="controlBar_dpaddisplayControlsTip"
		/>
	
</layer>


  <action name="crosscornerbarnav_onout_action">
    set(layer[crosscornerbarnavigation_bg].alpha, 0.2);
    set(layer[crosscornerbarbtn_left].alpha, 0.2);
    set(layer[crosscornerbarbtn_right].alpha, 0.2);
    set(layer[crosscornerbarbtn_up].alpha, 0.2);
    set(layer[crosscornerbarbtn_down].alpha, 0.2);
  </action>

  <action name="crosscornerbarnav_onover_action">
    set(layer[crosscornerbarnavigation_bg].alpha, 1);
    set(layer[crosscornerbarbtn_left].alpha, 1);
    set(layer[crosscornerbarbtn_right].alpha, 1);
    set(layer[crosscornerbarbtn_up].alpha, 1);
    set(layer[crosscornerbarbtn_down].alpha, 1);
  </action>



	<events name="crosscornerbarAutorotationEvents"
		onstartautorotation="crosscornerbarupdateAutorotationButtons();"
		onresumeautorotation="crosscornerbarupdateAutorotationButtons();"
		onstopautorotation="crosscornerbarupdateAutorotationButtons();"
		onpauseautorotation="crosscornerbarupdateAutorotationButtons();"
		keep="true"/>
	<action name="crosscornerbarHideAutorotationButtons">
		set(layer[crosscornerbarbtn_autorotate_off].visible, false);
		set(layer[crosscornerbarbtn_autorotate_on].visible , false);
	</action>
	<action name="crosscornerbarShowAutorotationButtons">
		if(autorotate.enabled == false,
			set(layer[crosscornerbarbtn_autorotate_off].visible, false);
			set(layer[crosscornerbarbtn_autorotate_on].visible , true);
		,
			set(layer[crosscornerbarbtn_autorotate_off].visible, true);
			set(layer[crosscornerbarbtn_autorotate_on].visible , false);
		);
	</action>
	<action name="crosscornerbarupdateAutorotationButtons">
		if (tour_displaycontrols,
			crosscornerbarShowAutorotationButtons();
		,
			crosscornerbarHideAutorotationButtons();
		);
	</action>



	<events name="crosscornerbarcontrolmodechangedevent" oncontrolmodechanged="if (crosscornerbarControlModeButtonsActivated,crosscornerbarupdateControlModeButtons(););" onxmlcomplete="set(crosscornerbarControlModeButtonsActivated, true);" keep="true"/>
	<action name="crosscornerbarHideControlModeButtons">
		set(layer[crosscornerbarbtn_ctrlmode_move_to].visible, false);
		set(layer[crosscornerbarbtn_ctrlmode_drag_to].visible, false);
	</action>
	<action name="crosscornerbarShowControlModeButtons">
		if (tour_controlmodemousetype == "moveto",
			set(layer[crosscornerbarbtn_ctrlmode_drag_to].visible, true);
			set(layer[crosscornerbarbtn_ctrlmode_move_to].visible, false);
		,
			set(layer[crosscornerbarbtn_ctrlmode_move_to].visible, true);
			set(layer[crosscornerbarbtn_ctrlmode_drag_to].visible, false);
		);
	</action>
	<action name="crosscornerbarupdateControlModeButtons">
	if (device.desktop,
		if (tour_displaycontrols,
			crosscornerbarShowControlModeButtons();
		,
			crosscornerbarHideControlModeButtons();
		);
	,
		crosscornerbarHideControlModeButtons();
	);
	</action>
	
  <action name="crosscornerbarzoom_slider_grip_dragging">
    if (pressed,
      sub(dy, mouse.stagey, drag_stagey); 
      add(newy, drag_currenty, dy); 

      if(newy LT 0, set(newy, 0) );
      if(newy GT layer[crosscornerbarzoom_slider_bg].pixelheight, copy(newy, layer[crosscornerbarzoom_slider_bg].pixelheight));
      copy(y, newy);

      div(val, newy, layer[crosscornerbarzoom_slider_bg].pixelheight);

      sub(fovrange, view.fovmax, view.fovmin);
      mul(newfov  , val, fovrange);
      add(newfov  , view.fovmin);
      set(view.fov, get(newfov));

      delayedcall(0, crosscornerbarzoom_slider_grip_dragging());
    );
  </action>
  <action name="crosscornerbarzoom_slider_grip_ondown">
    copy(drag_currenty, y);
    copy(drag_stagey, mouse.stagey);
    crosscornerbarzoom_slider_grip_dragging();
  </action>
  <events name="crosscornerbarzoom_slider_events" keep="true" onviewchanged="crosscornerbarzoom_slider_update();" />
  <action name="crosscornerbarzoom_slider_update">
    if (device.desktop,
    ifnot (layer[crosscornerbarzoom_slider_grip].pressed,
      sub(val, view.fov, view.fovmin);
      sub(fovrange, view.fovmax, view.fovmin);
      div(val, fovrange);
      mul(newy, val, layer[crosscornerbarzoom_slider_bg].pixelheight);
      set(layer[crosscornerbarzoom_slider_grip].y, get(newy));
    );
    );
  </action>

	<events name="crosscornerbarmenufullscreenchangeevent"
		onenterfullscreen="crosscornerbarupdateFullscreenButtons();"
		onexitfullscreen="crosscornerbarupdateFullscreenButtons();"
		keep="true"/>
	<action name="crosscornerbarHideFullscreenButtons">
		set(layer[crosscornerbarbtn_openfs].visible , false);
		set(layer[crosscornerbarbtn_closefs].visible, false);
	</action>
	<action name="crosscornerbarShowFullscreenButtons">
		if (device.fullscreensupport,
			if(tour_fullscreen,
				set(layer[crosscornerbarbtn_openfs].visible , false);
				set(layer[crosscornerbarbtn_closefs].visible, true);
			,
				set(layer[crosscornerbarbtn_openfs].visible ,true);
				set(layer[crosscornerbarbtn_closefs].visible,false);
			);
		,
			crosscornerbarHideFullscreenButtons();
		);
	</action>
	<action name="crosscornerbarupdateFullscreenButtons">
		if (tour_displaycontrols,
			crosscornerbarShowFullscreenButtons();
		,
			crosscornerbarHideFullscreenButtons();
		);
	</action>
	


	<events name="crosscornerbarmenuhideshowcontrolsevent"
		hidetourcontrols="crosscornerbarhideMenuControls();"
		showtourcontrols="crosscornerbarshowMenuControls();"
		keep="true"/>
	

<action name="crosscornerbarhideMenuControls">
		set(crosscornerbarIsOpened, false);
		set(layer[crosscornerbarnavigation_bg].visible, false);
		
			set(layer[crosscornerbarbtn_up].visible, false);
			set(layer[crosscornerbarbtn_down].visible, false);
			set(layer[crosscornerbarbtn_left].visible, false);
			set(layer[crosscornerbarbtn_right].visible, false);
		
		set(layer[crosscornerbarnavigation_bg_border].visible, true);
		tween(layer[crosscornerbarnavigation_bg_border].alpha, 0.5, 1);
		
		
		if(crosscornerbarverticalheight != 0,
			set(layer[crosscornerbarmenu_vertical_bg].visible, false);
				set(layer[crosscornerbarbtn_in].visible, false);
				set(layer[crosscornerbarbtn_out].visible, false);
					set(layer[crosscornerbarzoom_slider_bg].visible, false);


				crosscornerbarupdateAutorotationButtons();


				crosscornerbarupdateFullscreenButtons();
				crosscornerbarupdateControlModeButtons();
			tween(layer[crosscornerbarmenu_vertical_bg_border].alpha , 0, 1);
			tween(layer[crosscornerbarmenu_vertical_bg_border].height , 0, 1, easeOutQuad, set(layer[crosscornerbarmenu_vertical_bg_border].visible, false));
		);
		
		
		if(crosscornerbarhorizontalwidth != 0,
			set(layer[crosscornerbarmenu_horizontal_bg].visible, false);

				set(layer[crosscornerbarbtn_share].visible, false);

				if (scene.count GT 1,
					set(layer[crosscornerbarbtn_prev_pano].visible, false);
					set(layer[crosscornerbarbtn_next_pano].visible, false);
				);


				crosscornerbarupdateHelpButtons();


			tween(layer[crosscornerbarmenu_horizontal_bg_border].alpha , 0, 1);
			tween(layer[crosscornerbarmenu_horizontal_bg_border].width, 0, 1, easeOutQuad, set(layer[crosscornerbarmenu_horizontal_bg_border].visible, false));
		);
		set(layer[crosscornerbarbtn_showcontrols].visible, true);
		set(layer[crosscornerbarbtn_hidecontrols].visible, false);
	</action>
	
	<action name="crosscornerbarshowMenuControls">
	set(crosscornerbarIsOpened, true);
    set(layer[crosscornerbarbtn_showcontrols].visible, false);
    set(layer[crosscornerbarbtn_hidecontrols].visible, true);
    set(layer[crosscornerbarnavigation_bg].visible, true);

    set(layer[crosscornerbarbtn_up].visible, true);
    set(layer[crosscornerbarbtn_down].visible, true);
    set(layer[crosscornerbarbtn_left].visible, true);
    set(layer[crosscornerbarbtn_right].visible, true);

    set(layer[crosscornerbarnavigation_bg_border].visible, true);
    tween(layer[crosscornerbarnavigation_bg_border].alpha, 1, 1);

    
    if(crosscornerbarverticalheight != 0,
      set(layer[crosscornerbarmenu_vertical_bg_border].visible, true);
      tween(layer[crosscornerbarmenu_vertical_bg_border].alpha, 1, 1);
      tween(layer[crosscornerbarmenu_vertical_bg_border].height, get(crosscornerbarverticalheight), 1, easeOutQuad,
        set(layer[crosscornerbarmenu_vertical_bg].visible, true);
        crosscornerbarupdateFullscreenButtons();
        crosscornerbarupdateAutorotationButtons();


        if (device.desktop,
        set(layer[crosscornerbarbtn_in].visible, true);
        set(layer[crosscornerbarbtn_out].visible, true);
        set(layer[crosscornerbarzoom_slider_bg].visible, true);
        );


      );
    );

    
    if(crosscornerbarhorizontalwidth != 0,
      set(layer[crosscornerbarmenu_horizontal_bg_border].visible, true);
      tween(layer[crosscornerbarmenu_horizontal_bg_border].alpha, 1, 1);
      tween(layer[crosscornerbarmenu_horizontal_bg_border].width, get(crosscornerbarhorizontalwidth), 1, easeOutQuad,
        set(layer[crosscornerbarmenu_horizontal_bg].visible, true);

      set(layer[crosscornerbarbtn_share].visible, true);

        if (scene.count GT 1,
          set(layer[crosscornerbarbtn_prev_pano].visible, true);
          set(layer[crosscornerbarbtn_next_pano].visible, true);
        );
        crosscornerbarupdateControlModeButtons();




        crosscornerbarupdateHelpButtons();


      );
    );
  </action>

  <layer name="crosscornerbarhelpScreen"
         url="%FIRSTXML%/graphics/crosscornerbar/help_screen_bg.png"
         keep="true"
         align="bottomleft"
	     x="110"
	     y="110"
         zorder="97"
         onclick="crosscornerbarcloseHelp();"
         visible="false"
         width="prop"
         height="10%"
         alpha="0.0"
         onout="set(alpha, 0.2);"
         onover="stoptween(alpha);set(alpha, 1.0);"
         />
  <layer name="crosscornerbarhelpScreenFg"
         url="%FIRSTXML%/graphics/crosscornerbar/help_screen_fg.png"
         width="prop"
         height="10%"
         x="110"
	     y="110"
         keep="true"
         enabled="false"
         capture="false"
         align="bottomleft"
         zorder="98"
         onclick="crosscornerbarcloseHelp();"
         visible="false"
         alpha="0.0"
         displayed="false"
         saveheight="0"
         />

  <action name="crosscornerbardisplayHelp">
    if (device.desktop,
    set(layer[crosscornerbarhelpScreenFg].displayed, true);
    set(layer[crosscornerbarhelpScreenFg].visible, true);
    set(layer[crosscornerbarhelpScreen].visible, true);
    tween(layer[crosscornerbarhelpScreen].height, 50%, 1);
    tween(layer[crosscornerbarhelpScreenFg].height, 50%, 1);
    tween(layer[crosscornerbarhelpScreen].alpha, 0.2, 1);
    tween(layer[crosscornerbarhelpScreenFg].alpha, 1.0, 1);
    crosscornerbarupdateHelpButtons();
    );
  </action>
  <action name="crosscornerbarcloseHelp">
    if (device.desktop,
    set(layer[crosscornerbarhelpScreenFg].displayed, false);
    tween(layer[crosscornerbarhelpScreen].alpha, 0.0, 1);
    tween(layer[crosscornerbarhelpScreenFg].alpha, 0.0, 1);
    tween(layer[crosscornerbarhelpScreen].height, 10%, 1, easeOutQuad,
      set(layer[crosscornerbarhelpScreen].visible, false);
    );
    tween(layer[crosscornerbarhelpScreenFg].height, 10%, 1, easeOutQuad,
      set(layer[crosscornerbarhelpScreenFg].visible, false);
    );
    crosscornerbarupdateHelpButtons();
    );
  </action>
	<action name="crosscornerbarHideHelpButtons">
		set(layer[crosscornerbarbtn_display_help].visible, false);
		set(layer[crosscornerbarbtn_close_help].visible, false);
	</action>
	<action name="crosscornerbarShowHelpButtons">
		if (layer[crosscornerbarhelpScreenFg].displayed,
			set(layer[crosscornerbarbtn_close_help].visible, true);
			set(layer[crosscornerbarbtn_display_help].visible, false);
		,
			set(layer[crosscornerbarbtn_display_help].visible, true);
			set(layer[crosscornerbarbtn_close_help].visible, false);
		);
	</action>
	<action name="crosscornerbarupdateHelpButtons">
	if (device.desktop,
		if (tour_displaycontrols,
			crosscornerbarShowHelpButtons();
		,
			crosscornerbarHideHelpButtons();
		);
	,
		crosscornerbarHideHelpButtons();
	);
	</action>
  


  <action name="crosscornerbarshowHorizontalMenuTooltip">
    if (tooltip !== null, showTooltip('plugin', crosscornerbarhorizMenuTooltipStyle, bottom););
  </action>
  <action name="crosscornerbarshowVerticalMenuTooltip">
    if (tooltip !== null, showTooltip('plugin', crosscornerbarverticalMenuTooltipStyle, left););
  </action>

  <layer name="crosscornerbarhorizMenuTooltipStyle"
	keep="true"
	enabled="false"
	capture="false"
	url="%FIRSTXML%/graphics/textfield.swf"
	align="center"
	background="true"
	backgroundcolor="0x462c72"
	backgroundalpha="1"
	border="true"
	borderwidth="2.0"
	bordercolor="0xbafefd"
	borderalpha="1"
	css="color:#bafefd;font-family:B Mitra;font-weight:bold;font-size:14px;text-align:left;"
	height="20"
	autoheight="true"
	autowidth="auto"
	selectable="false"
	zorder="0"
	padding="2"
	xoffset="0"
	visible="false"
	html=""
	edge="bottom"
	yoffset="-10"
  />
  <layer name="crosscornerbarverticalMenuTooltipStyle"
	keep="true"
	enabled="false"
	capture="false"
	url="%FIRSTXML%/graphics/textfield.swf"
	align="center"
	background="true"
	backgroundcolor="0x462c72"
	backgroundalpha="1"
	border="true"
	borderwidth="2.0"
	bordercolor="0xbafefd"
	borderalpha="1"
	css="color:#bafefd;font-family:B Mitra;font-weight:bold;font-size:14px;text-align:left;"
	height="20"
	autoheight="true"
	autowidth="auto"
	selectable="false"
	zorder="0"
	padding="2"
	yoffset="0"
	visible="false"
	html=""
	edge="left"
	xoffset="10"
  />







  <!-- ******************* -->
  <!-- Loading Information -->
  <!-- ******************* -->

  <events name="loaderinformationevent" onxmlcomplete="loaderinformationupdate();" keep="true" devices="flash" />

  <action name="loaderinformationupdate" devices="flash">
    if (progress.progress == 1,
      delayedcall(0.5, set(layer[loaderinformationtextfield].visible, false); );
     ,
         set(layer[loaderinformationtextfield].visible, true);
    );
    mul(progresstext, get(progress.progress),100);
    roundval(progresstext);
    txtadd(progresstext, get(progresstext), %);
    set(layer[loaderinformationtextfield].html, get(progresstext));
    ifnot(progress.progress GE 1, delayedcall(0.01, loaderinformationupdate() ));
  </action>

  <layer name="loaderinformationtextfield"
         devices="flash"
         keep="true"
         zorder="2"
         url="%FIRSTXML%/graphics/textfield.swf"
         align="center"
         x="0"
         y="0"
         borderwidth="0"
         background="false"
         autoheight="true"
         autowidth="auto"
         capture="false"
         handcursor="false"
         selectable="false"
         alpha="1"
         visible="true"
         css="
              text-align:center;
              color:#ffffff;
              font-family:Arial;
              font-weight:bold;
              font-size:16px;
             "
  />

	
	<!-- ************ -->
	<!-- PanotourMaps -->
	<!-- ************ -->
	
		<ptplugin name="panotourmaps" lat="36.3067817688" lng="50.026424408" zoom="11" maptypelayer="road" position="left" size="30" resizable="true" multimap="false" openatstart="true" state="true" bgcolor="f2f2f2" zorder="3" centeronspots="true" engine="KolorMap">
	
		<radar visible="true" radius="8000" linktozoom="true" quality="8" linecolor="ffffff" lineopacity="0.500007629510948" linewidth="1" fillcolor="ffffff" fillopacity="0.300007629510948" />
		
		<markers animation="false" />
		
		
		<controls zoom="true" pan="true" scale="false" maptype="true" overview="false">
			<ui draggable="true" scrollable="true" dblclick="true" />
		</controls>
		
		<markerSelected name="" heading="" fov="" />
		
		
		
			<!-- PanotourMaps markers counter : 1 -->
				<marker name="spotmap39" lat="36.3067817688" lng="50.026424408" heading="0" draggable="false" desc="spotmap39_tooltip" desctype="info" onhover="false" isscene="true" scene="pano36" jsclick="spotmap39ActionSpotMap">
					<markericon url="spots/hotspot_neutral_user_defaultmap0.png" iconwidth="32" iconheight="32" shadow="false" iconanchor="center" />
				</marker>
		
		
		
	</ptplugin>
	
	<action name="kolorMapJsReady-panotourmaps">
		set(ptplugin[panotourmaps].jsready, true);
	</action>
	
	
	
		<!-- PanotourMaps markers counter : 1 -->
				<action name="spotmap39ActionSpotMap">
          if (xml.scene != pano36,
            mainloadscene(pano36);
          );
      lookat(get(panoview.h), get(panoview.v), get(panoview.fov));
    

</action>
	
	
	
	
	
	<!-- Begin PanotourMaps events and actions -->
	<events name="panotourmapsEvents" 
	onxmlcomplete="ifnot(panotourmapsMapLoaded,set(tour_displaymap,true););" 
	onnewpano="panotourmapsActivateDefaultMarker();" 
	onremovepano="panotourmapsUnselectMarker();" 
	onviewchanged="panotourmapsOnviewchange()" 
	onhidetourmap="panotourmapsClosetourmap();" 
	onshowtourmap="if(tour_displaymap,panotourmapsOpentourmap(););" 
	onenterfullscreen="panotourmapsUpdateMaxMapSize();" 
	onexitfullscreen="panotourmapsUpdateMaxMapSize();" 
	keep="true" />
	
	
	<krpano panotourmapsMarkerDefaultSet="false" />
	<krpano panotourmapsMapLoaded="false" />
	
	
	<action name="panotourmapsUpdateMaxMapSize">
		js(invokePluginFunction(panotourmaps, updateResizableMapMaxSize));
	</action>
	
	<action name="kolorMapJsReadyLoop-panotourmaps">
		if(ptplugin[panotourmaps].jsready,
			stopdelayedcall(jsReadyLoopId-panotourmaps);
			if(%1 == "close",
				panotourmapsClosetourmap();
			,
				panotourmapsOpentourmap();
			);
		,
			delayedcall(jsReadyLoopId-panotourmaps, 0.2, kolorMapJsReadyLoop-panotourmaps(%1));
		);
	</action>
	
	<action name="panotourmapsClosetourmap">
		if(ptplugin[panotourmaps].jsready,
			set(ptplugin[panotourmaps].state, false);
			js(invokePluginFunction(panotourmaps, openCloseMap, close));
		,
			kolorMapJsReadyLoop-panotourmaps(close);
		);
	</action>
	
	
	<action name="panotourmapsOpentourmap">
		if(ptplugin[panotourmaps].jsready,
			set(ptplugin[panotourmaps].state, true);
			js(invokePluginFunction(panotourmaps, openCloseMap, open));
		,
			kolorMapJsReadyLoop-panotourmaps(open);
		);
	</action>
	
	
	<action name="panotourmapsChangescene">
		if(xml.scene != '%1',mainloadscene(%1);panotourmapsGoMarker(%2));
	</action>
	
	<action name="panotourmapsOnviewchange">
		if ( panotourmapsMapLoaded == true,
			ifnot(ptplugin[panotourmaps].markerSelected.name == "",
				js(invokePluginFunction(panotourmaps, changeDirection, get(view.hlookat), get(view.hfov)));
			);
		);
	</action>
	
	<action name="panotourmapsGoMarker">
		if ( panotourmapsMapLoaded == true,
			
			set(ptplugin[panotourmaps].markerSelected.name, %1);
			set(ptplugin[panotourmaps].markerSelected.heading, get(view.hlookat));
			set(ptplugin[panotourmaps].markerSelected.fov, get(view.hfov));
			js(invokePluginFunction(panotourmaps, changeCurrentMarker, %1, get(view.hlookat), get(view.hfov), get(ptplugin[panotourmaps].centeronspots)));
			
			if( panotourmapsMarkerDefaultSet == false,
				js(setMapDefaultMarker(panotourmaps, %1, get(view.hlookat), get(view.hfov)));
				set(panotourmapsMarkerDefaultSet,true);
			);
		);
	</action>
	
	<action name="panotourmapsUnselectMarker">
		set(ptplugin[panotourmaps].markerSelected.name, "");
		js(invokePluginFunction(panotourmaps, unselectCurrentMarker));
		
		js(setMapDefaultMarker(panotourmaps, null, null, null));
	</action>

	<action name="panotourmapsActivateDefaultMarker">
		set(panotourmapsMapLoaded, true);

		set(panotourmapsMapSpotFound, false);
		set(defaultmarkerinc-wait,50);
		for(set(defaultmarkerinc,0), defaultmarkerinc LT ptplugin[panotourmaps].marker.count , inc(defaultmarkerinc),
			if(defaultmarkerinc-wait == defaultmarkerinc,
				add(defaultmarkerinc-wait,50);
				wait(0);
			);
			if(ptplugin[panotourmaps].marker[get(defaultmarkerinc)].isscene == true,
				if(panotourmapsMapSpotFound == false,
					if(ptplugin[panotourmaps].marker[get(defaultmarkerinc)].scene == xml.scene,
						ifnot(ptplugin[panotourmaps].marker[get(defaultmarkerinc)].name == ptplugin[panotourmaps].markerSelected.name,
							panotourmapsGoMarker(get(ptplugin[panotourmaps].marker[get(defaultmarkerinc)].name));
						);
						set(panotourmapsMapSpotFound, true);
					);
				);
			);
		);
		
		if(panotourmapsMapSpotFound == false,
			panotourmapsUnselectMarker();
		);
	</action>
	

  <!-- ***** -->
  <!-- Radar -->
  <!-- ***** -->

  <layer name="radar" keep="true"
         url="%FIRSTXML%/graphics/radar.js"
         align="bottomright"
         x="0" y="0"
         heading="0.0"
         headingoffset="0.0"
         fillcolor="0xffffff"
         fillalpha="0.500007629510948"
         width="100"
         height="100"
         zorder="4"
         visible="false"
         />

  <events name="radarevents"
    onnewpano="radarOnNewPano" 
    hidetourcontrols="hideradar();"
    showtourcontrols="showradar();"
    keep="true"/>

  <action name="radarOnNewPano">
    set(layer[radar].heading, get(scene[get(xml.scene)].heading));
  </action>

  <action name="hideradar">set(layer[radar].visible, false);</action>
  <action name="showradar">set(layer[radar].visible, true );</action>


  <!-- *********************** -->
  <!-- Title : current project -->
  <!-- *********************** -->

  <events name="title_currentproject_events" 
    hidetourcontrols="hidetitle_currentproject();" 
    showtourcontrols="showtitle_currentproject();"  
    keep="true" />

  <action name="hidetitle_currentproject">set(layer[title_currentproject].visible, false);</action>
  <action name="showtitle_currentproject">set(layer[title_currentproject].visible, true );</action>

  <layer name="title_currentproject" keep="true" zorder="5"
         url="%FIRSTXML%/graphics/textfield.swf"
         align="top" x="0" y="0" width="100%" autoheight="true"
         onloaded="getmessage(html,get(projecttitleid));escape(html);"
         background="false" capture="false" handcursor="false" selectable="false" enabled="false"
         borderwidth="0"
         alpha="1"
         visible="false"
         textshadow="1"
         css="text-align:center;
              color:#000000;
              font-family:B Mitra;
              font-weight:bold;
              font-size:16px;"/>

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


  </action>

  <!-- ************ -->
  <!-- Social Share -->
  <!-- ************ -->




<ptplugin name="socialShare" engine="kolorBox">
	<settings>
		<option name="position" value="bottomright" type="string" />
		<option name="margin_x" value="50" type="int" />
		<option name="margin_y" value="50" type="int" />
		<option name="animate" value="false" type="bool" />
		<option name="draggable_box" value="true" type="bool" />
		<option name="container_auto_size" value="true" type="bool" />
		<option name="container_color" value="ffffff" type="string" />
		<option name="container_alpha" value="0.8" type="float" />
		<option name="container_topleft_border_radius" value="15" type="int" />
		<option name="container_topright_border_radius" value="15" type="int" />
		<option name="container_bottomleft_border_radius" value="15" type="int" />
		<option name="container_bottomright_border_radius" value="15" type="int" />
		<option name="container_border_width" value="0" type="int" />
		<option name="container_border_color" value="ffffff" type="string" />
		<option name="overlay_displayed" value="false" type="bool" />
		<option name="overlay_color" value="000000" type="string" />
		<option name="overlay_alpha" value="0.500007629510948" type="float" />
		<option name="social_btn" value="facebook#twitter#google#linkedin#digg#tumblr#stumbleupon#reddit#delicious#email" type="string" />
		<option name="social_orientation" value="horizontal" type="string" />
		<option name="social_btn_size" value="64" type="int" />
		<option name="inner_margin" value="10" type="int" />
		
		
		<option name="title_displayed" value="false" type="bool" />
		<option name="caption_displayed" value="false" type="bool" />
		<option name="close_displayed" value="true" type="bool" />
		<option name="close_position" value="bottomright" type="string" />
		<option name="close_callback" value="invokeKrFunction('closeKolorBoxCallback-socialShare')" type="string" />
		<option name="zorder" value="7" type="int" />
	</settings>
	<internaldata>
		
	</internaldata>
</ptplugin>

<action name="kolorBoxJsReady-socialShare">
	set(ptplugin[socialShare].jsready, true);
</action>

<action name="startOpenSocialShare-socialShare">
	if(ptplugin[socialShare].jsready,
		showSocialShare-socialShare();
	,
		delayedcall(1.0,startOpenSocialShare-socialShare(););
	);
</action>


<action name="showSocialShare-socialShare">
	ifnot(ptplugin[socialShare].isOpen,
		set(ptplugin[socialShare].isOpen, true);
		pauseautorotation(forceplugin);

			js(invokePluginFunction(socialShare, loadSingleArrayItem, social));
		events.dispatch(onremovedisplayedobject);
	);
</action>

<action name="toggleSocialShare-socialShare">
	js(invokePluginFunction(socialShare, toggleKolorBox, %1));
</action>


<action name="closeKolorBox-socialShare">
	js(invokePluginFunction(socialShare, closeKolorBox));
</action>

<action name="closeKolorBoxCallback-socialShare">
	resumeautorotation(forceplugin);

	set(ptplugin[socialShare].isOpen, false);
</action>

<events name="kolorBoxEvents-socialShare" 
	keep="true"
	onsharetour="showSocialShare-socialShare();" 
	
	
/>

  <!-- *********** -->
  <!-- Description -->
  <!-- *********** -->


<ptplugin name="description" canStart="false" newPano="false" openatstart="true" startMethod="showPanoDescription-description" engine="kolorArea">
	<settings>
		<option name="position" value="center" type="string" />
		<option name="start_position" value="left" type="string" />
		<option name="margin_x" value="0" type="int" />
		<option name="margin_y" value="0" type="int" />
		<option name="background_color" value="f2f2f2" type="string" />
		<option name="background_alpha" value="1" type="float" />
		<option name="topleft_radius" value="0" type="int" />
		<option name="topright_radius" value="0" type="int" />
		<option name="bottomleft_radius" value="0" type="int" />
		<option name="bottomright_radius" value="0" type="int" />
		<option name="area_border_width" value="0" type="int" />
		<option name="area_border_color" value="f2f2f2" type="string" />
		<option name="padding" value="15" type="int" />
		<option name="display_title" value="true" type="bool" />
		<option name="title" value="descriptiondescription_title" type="string" />
		<option name="title_font" value="B Mitra" type="string" />
		<option name="title_size" value="14" type="int" />
		<option name="title_weight" value="normal" type="string" />
		<option name="title_decoration" value="normal" type="string" />
		<option name="title_color" value="000000" type="string" />
		<option name="close_displayed" value="true" type="bool" />
		<option name="overlay_displayed" value="false" type="bool" />
		<option name="overlay_color" value="000000" type="string" />
		<option name="overlay_alpha" value="0.500007629510948" type="float" />
		<option name="area_width" value="20" type="int" />
		<option name="area_height" value="100" type="int" />
		<option name="area_width_unit" value="percent" type="string" />
		<option name="area_height_unit" value="percent" type="string" />
		<option name="animation" value="true" type="bool" />
		<option name="animation_duration" value="500" type="int" />
		<option name="refresh_content" value="true" type="bool" />
		<option name="close_callback" value="invokeKrFunction('closeKolorAreaCallback-description')" type="string" />
		<option name="close_on_click" value="true" type="bool" />
		<option name="close_onclick_callback" value="invokeKrFunction('closeKolorAreaCallbackClick-description')" type="string" />
		<option name="open_callback" value="invokeKrFunction('openKolorAreaCallback-description')" type="string" />
		<option name="zorder" value="8" type="int" />
		<option name="use_i18n" value="true" type="bool" />
	</settings>
</ptplugin>

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

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

<action name="openKolorArea-description">
	set(ptplugin[description].isOpen, true);
	js(showKolorArea(description, get(ptplugin[description].descID)));
</action>

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

<action name="toggleKolorArea-description">
	if(ptplugin[description].isOpen,
		closeKolorArea-description();
	,
		openKolorArea-description();
	);
</action>

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

	);
</action>

<action name="closeKolorAreaCallbackClick-description">
	if(tour_displayinfo,hideTourInfo();

	);
</action>

<action name="openKolorAreaCallback-description">
	updateTitle-description();
	
</action>

<action name="showKolorArea-description">
	ifnot(ptplugin[description].startMethod == "",
		delayedcall(0,get(ptplugin[description].startMethod));
	,
		js(invokePluginFunction(description, showKolorArea, %1));
	);
</action>
	
<action name="hideKolorArea-description">
	js(invokePluginFunction(description, hideKolorArea, %1));
</action>

<action name="openDescription-description">
	openKolorArea-description();
</action>

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

<action name="closeDescription-description">
	set(ptplugin[description].currentGroup, false);
	closeKolorArea-description();
</action> 



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

<action name="refreshPanoDescription-description">
	set(ptplugin[description].descID, get(scene[get(xml.scene)].descriptionid));
	if(ptplugin[description].descID == null,
		set(ptplugin[description].descID, "");
	);
	if(ptplugin[description].descID != "",
		if(ptplugin[description].isOpen,
			js(invokePluginFunction(description, updateKolorArea, get(ptplugin[description].descID)));
			updateTitle-description();
		);
	,
		if(tour_displayinfo,
			delayedcall(0.1,showTourInfo();
);
		);
		closeDescription-description();
	);
</action>

<action name="onNewPano-description">
	if(ptplugin[description].newPano,
		if(ptplugin[description].startMethod == "",
			if(ptplugin[description].isOpen,
				refreshPanoDescription-description();
			,
				if(tour_displaycontrols,
				if(tour_displayinfo,
				showPanoDescription-description();
				,
				refreshPanoDescription-description();
				);
				,
				refreshPanoDescription-description();
				);
			);
		);
	);
	set(ptplugin[description].newPano, true);
</action>

<events name="kolorAreaEvents-description" 
	keep="true"
	onTourStart="set(ptplugin[description].canStart, true);if(ptplugin[description].openatstart,if(tour_displaycontrols,showTourInfo();
););"
	onshowtourinfo="showPanoDescription-description();"
	onhidetourinfo="closeDescription-description();"
	onnewpano="onNewPano-description();"
	hidetourcontrols="hideKolorArea-description(false);"
	showtourcontrols="if(tour_displayinfo,if(ptplugin[description].isOpen,showKolorArea-description(false);,showPanoDescription-description(););,showTourInfo();
);"
/>

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


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

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

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

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


  <!-- Share Tour -->
  <action name="shareTour">events.dispatch(onsharetour);</action>

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

</krpano>