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

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


  <style name="IconDefaultPointSpotStyle"
         url="%FIRSTXML%/spots/hotspot_plan_sequence_user_defaultpoint0.png"
         visible="false"
         frame="0"
         lastframe="9"
         framewidth="67"
         frameheight="67"
         stopspotsequence="false"
         crop="0|0|67|67"
         edge="center"
         onloaded="startspotanimation(0.1);"
         onhover="onhoverIconDefaultPointSpotStyle"
         onout="onoutIconDefaultPointSpotStyle"


         />
  <action name="onhoverIconDefaultPointSpotStyle">
    showtooltip('hotspot');
  </action>
  <action name="onoutIconDefaultPointSpotStyle">
    hideTooltip();



  </action>



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


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


  <style name="IconDefaultPointSpotStyle1"
         url="%FIRSTXML%/spots/hotspot_information_user_defaultpoint1.png"
         visible="false"
         edge="center"
         onhover="onhoverIconDefaultPointSpotStyle1"
         onout="onoutIconDefaultPointSpotStyle1"


         />
  <action name="onhoverIconDefaultPointSpotStyle1">
    showtooltip('hotspot');
  </action>
  <action name="onoutIconDefaultPointSpotStyle1">
    hideTooltip();



  </action>



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

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


    keep="true" />



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

  <style name="SansControlBar_btn_style"
         keep="true"
         edge="right"
         align="right"
         x="0" y="0"
         width="40" height="40"
         crop="0|0|60|60"
         onovercrop="0|60|60|60"
         ondowncrop="0|120|60|60"
         onhover="showTooltip('plugin', SansControlBarmenuTooltipStyle, bottom);"
         onout="hideTooltip();"
         />
  <style name="SansControlBar_btn_style_off"
         keep="true"
         edge="right"
         align="right"
         x="0" y="0"
         width="40" height="40"
         onhover="showTooltip('plugin', SansControlBarmenuTooltipStyle, bottom);"
         onout="hideTooltip();"
         />

  <layer name="SansControlBar_menu_bg"
         keep="true"
         type="container"
         zorder="1"
         width="40"
         height="40"
         align="bottom"
         x="0" y="10"
         maskchildren="true"
         rotate="0"
         visible="false"
         >

    <layer name="SansControlBarbtn_enter_vr"
            url="%FIRSTXML%/graphics/sans controlbar/btn_vr_mode.png"
            style="SansControlBar_btn_style"
            onclick="if(scene[get(xml.scene)].full360 AND disableCurrentSceneVrConservation !== true,
    js(accessWebVr(get(xml.scene),get(videoscenestarttime)));
,
    js(accessWebVr(null));
);"
            tooltip="SansControlBarenterVRTip"
            visible="false"
            devices="html5"
            />
    <layer name="SansControlBarbtn_enter_vr_not"
            url="%FIRSTXML%/graphics/sans controlbar/btn_vr_mode_off.png"
            style="SansControlBar_btn_style"
            tooltip="SansControlBarenterVRNotTip"
            enabled="true"
            capture="false"
            visible="false"
            devices="html5"
            />

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

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

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



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


    <layer name="SansControlBarbtn_share"
            url="%FIRSTXML%/graphics/sans controlbar/btn_share.png"
            onclick="shareTour();
"
            style="SansControlBar_btn_style"
            visible="false"
            tooltip="SansControlBarshareTip"
            />


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

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



    <layer name="SansControlBarbtn_display_help"
            url="%FIRSTXML%/graphics/sans controlbar/btn_help.png"
            onclick="SansControlBardisplayHelp();"
            style="SansControlBar_btn_style"
            devices="desktop"
            visible="false"
            tooltip="SansControlBardisplayHelpTip"
            />
    <layer name="SansControlBarbtn_close_help"
            url="%FIRSTXML%/graphics/sans controlbar/btn_help.png"
            onclick="SansControlBarcloseHelp();"
            style="SansControlBar_btn_style"
            visible="false"
            devices="desktop"
            tooltip="SansControlBarhideHelpTip"
            />



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



<events name="SansControlBarvravailableevent"
		onvravailable="SansControlBarupdateVrButtonsAvailability();"
		onvrunavailable="SansControlBarupdateVrButtonsAvailability();"
		keep="true" devices="html5" />
	<krpano SansControlBarmenuvravailable="false" />
	<action name="SansControlBarupdateVrButtonsAvailability">
		if (tour_vrdevices,
			set(SansControlBarmenuvravailable, true);
		,
			set(SansControlBarmenuvravailable, false);
		);
		SansControlBarupdateVrButtons();
	</action>
	<action name="SansControlBarHideVrButtons">
		set(layer[SansControlBarbtn_enter_vr].visible, false);
		if('%1' == 'true' AND plugin[ptpvrmode],
			set(layer[SansControlBarbtn_enter_vr_not].visible, true);
		,
			set(layer[SansControlBarbtn_enter_vr_not].visible, false);
		);
	</action>
	<action name="SansControlBarShowVrButtons">
		if (SansControlBarmenuvravailable,
			set(layer[SansControlBarbtn_enter_vr].visible, true);
			set(layer[SansControlBarbtn_enter_vr_not].visible, false);
		,
			SansControlBarHideVrButtons(true);
		);
	</action>
	<action name="SansControlBarupdateVrButtons">
	if (tour_vrdevices,
		if (SansControlBarIsOpened,
			SansControlBarShowVrButtons();
		,
			SansControlBarHideVrButtons();
		);
	,
		if (SansControlBarIsOpened,
			SansControlBarHideVrButtons(true);
		,
			SansControlBarHideVrButtons();
		);
	);
	</action>



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

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

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


	SansControlBarupdateAutorotationButtons();



	SansControlBarupdateVrButtons();



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

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

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

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


	SansControlBarupdateAutorotationButtons();

	SansControlBarupdateVrButtons();




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

  <layer name="SansControlBarhelpScreenBg"
         align="center"
         keep="true"
         onclick="SansControlBarcloseHelp();"
         url="%FIRSTXML%/graphics/sans controlbar/help_screen_bg.png"
         visible="false"
         rotate="-90"
         height="50%"
         width="prop"
         zorder="97"
         x="100%" />
  <layer name="SansControlBarhelpScreenFg"
         align="center"
         keep="true"
         onclick="SansControlBarcloseHelp();"
         url="%FIRSTXML%/graphics/sans controlbar/help_screen_fg.png"
         height="50%"
         width="prop"
         visible="false"
         rotate="90"
         zorder="98"
         x="-100%"
         displayed="false" />
  <action name="SansControlBardisplayHelp">
  if (device.desktop,
    set(layer[SansControlBarhelpScreenFg].displayed,true);
    set(layer[SansControlBarhelpScreenBg].visible,true);
    set(layer[SansControlBarhelpScreenFg].visible,true);
    tween(layer[SansControlBarhelpScreenFg].rotate,0, 1);
    tween(layer[SansControlBarhelpScreenFg].x,0, 1);
    tween(layer[SansControlBarhelpScreenBg].rotate,0, 1);
    tween(layer[SansControlBarhelpScreenBg].x,0, 1);
    SansControlBarupdateHelpButtons();
  );
  </action>
  <action name="SansControlBarcloseHelp">
  if (device.desktop,
    set(layer[SansControlBarhelpScreenFg].displayed,false);
    tween(layer[SansControlBarhelpScreenFg].rotate,  90, 1, easeOutQuad, set(layer[SansControlBarhelpScreenFg].visible,false););
    tween(layer[SansControlBarhelpScreenFg].x, -100%, 1);
    tween(layer[SansControlBarhelpScreenBg].rotate, -90, 1, easeOutQuad, set(layer[SansControlBarhelpScreenBg].visible,false););
    tween(layer[SansControlBarhelpScreenBg].x, 100%, 1);
    SansControlBarupdateHelpButtons();
  );
  </action>
	<action name="SansControlBarHideHelpButtons">
		set(layer[SansControlBarbtn_display_help].visible, false);
		set(layer[SansControlBarbtn_close_help].visible, false);
	</action>
	<action name="SansControlBarShowHelpButtons">
		if (layer[SansControlBarhelpScreenFg].displayed,
			set(layer[SansControlBarbtn_close_help].visible, true);
			set(layer[SansControlBarbtn_display_help].visible, false);
		,
			set(layer[SansControlBarbtn_display_help].visible, true);
			set(layer[SansControlBarbtn_close_help].visible, false);
		);
	</action>
	<action name="SansControlBarupdateHelpButtons">
	if (device.desktop,
		if (SansControlBarIsOpened,
			SansControlBarShowHelpButtons();
		,
			SansControlBarHideHelpButtons();
		);
	,
		SansControlBarHideHelpButtons();
	);
	</action>




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

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



<layer name="SansControlBarmenuTooltipStyle"
	keep="true"
	enabled="false"
	capture="false"
	url="%FIRSTXML%/graphics/textfield.swf"
	align="center"
	background="false"
	border="false"
	css="color:#000000;font-family:Helvetica;font-weight:bold;font-size:14px;text-align:left;"
	height="20"
	autoheight="true"
	autowidth="auto"
	xoffset="0"
	yoffset="0"
	padding="2"
	selectable="false"
	zorder="0"
	visible="false"
	html=""
	edge="bottom"
/>
  <action name="SansControlBarbuildMenu">
    
    set(SansControlBarbutton_pos, 0);

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



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

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


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


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




    if(plugin[ptpvrmode] AND device.html5,
      set(layer[SansControlBarbtn_enter_vr].x, get(SansControlBarbutton_pos));
      set(layer[SansControlBarbtn_enter_vr_not].x, get(SansControlBarbutton_pos));
      inc(SansControlBarbutton_pos, 45);
    );



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

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

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

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



      dec(SansControlBarbutton_pos, 5);

      set(SansControlBarbackgroundwidthwhenopened, get(SansControlBarbutton_pos));


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

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


 <!-- ********** --> <!-- 360Images CoOL Hotspots Plugin --> <!-- CoOL Hotspots --> <!-- id : cool_hotspot --> <!-- ********** -->    <include url="%FIRSTXML%/graphics/coolhotspots.xml"/>   <style 	cooltype="bubble" 	name="Default Point Spot Style" 	type="container"  	width="50"  	height="50"  	bgalpha="0" 	bgcapture="true"   	accuracy="1" 	bubble_width="50"  	bubble_width_onover="150" 	alwayson="false" 	ttalign="top" 	ttedge="bottom" 	 	onover=" 	hidebbhs(); 	set(zorder,20); 	tween(width|height,get(bubble_width_onover)); 	tween(layer[get(mybubble)].width,get(bubble_width_onover)); 	tween(layer[get(mybubble)].height,get(bubble_width_onover)); 	tween(layer[get(mybubble_shadow)].width,get(bubble_width_onover)); 	tween(layer[get(mybubble_shadow)].height,get(bubble_width_onover)); 	tween(layer[get(mypreview)].alpha,1); 	set(layer[get(mypreview)].enabled,true); 	"     	onout=" 	set(zorder,2);  	tween(width|height,get(bubble_width)); 	tween(layer[get(mybubble)].width,get(bubble_width)); 	tween(layer[get(mybubble)].height,get(bubble_width)); 	tween(layer[get(mybubble_shadow)].width,get(bubble_width)); 	tween(layer[get(mybubble_shadow)].height,get(bubble_width)); 	ifnot(alwayson,tween(layer[get(mypreview)].alpha,0));  	set(layer[get(mypreview)].enabled,false);  	"   	ondown.touch="onover();" 	 	onloaded=" 	txtadd(hotspot[get(name)].permanentTooltipForSpot, get(tooltip), '_permanent'); 	delayedcall(0.1, 	if(layer[get(permanentTooltipForSpot)].html, 		set(layer[get(permanentTooltipForSpot)].ox,0); 		set(layer[get(permanentTooltipForSpot)].oy,-10); 		); 	); 	 	txtadd(mybubble,'bubble',get(name)); 	addlayer(get(mybubble)); 	copy(hotspot[get(name)].mybubble,mybubble); 	layer[get(mybubble)].loadstyle(cool_hotspotbubblelayer); 	txtadd(mybubble_shadow,'bubble_shadow',get(name)); 	addlayer(get(mybubble_shadow)); 	copy(hotspot[get(name)].mybubble_shadow,mybubble_shadow); 	layer[get(mybubble_shadow)].loadstyle(cool_hotspotbubblelayer_shadow); 			 	txtadd(mypreview,'preview_',get(name)); 	addlayer(get(mypreview)); 	copy(hotspot[get(name)].mypreview,mypreview); 	 	 	if(linkedscene, 		set(layer[get(mypreview)].url,get(scene[get(linkedscene)].thumburl)); 	); 	if(linkedgroup, 		set(layer[get(mypreview)].url,get(panoramagroup[get(linkedgroup)].thumburl)); 	); 	if(photourl, 		set(layer[get(mypreview)].url,get(photourl)); 	); 	 	 	layer[get(mypreview)].loadstyle(cool_hotspotbubble_previewlayer); 	 	txtadd(parentlayer,'hotspot[',get(name),']'); 	copy(layer[get(mybubble)].parent,parentlayer); 	copy(layer[get(mybubble_shadow)].parent,parentlayer); 		 	txtadd(parentlayer2,'layer[',get(mybubble),']'); 	copy(layer[get(mypreview)].parent,parentlayer2); 		 	txtadd(clickaction,'callwith(hotspot[',get(name),'],onclick)'); 	copy(layer[get(mypreview)].onclick,clickaction);  	" /> <style  	name="cool_hotspotbubblelayer"  	type="container"  	width="50"  	height="50"  	bgalpha="0"  	bgborder="3 0xffffff 1"  	bgroundedge="150"   	bgcapture="true"  	maskchildren="true"  	accuracy="1"  	ondown.touch="callwith(get(parent),onover);"  	align="center" 	 /> <style  	name="cool_hotspotbubblelayer_shadow"  	type="container"  	width="50"  	height="50"  	bgalpha="0"  	bgborder="0 0xffffff 0"  	bgroundedge="150"   	bgcapture="false"  	accuracy="1"  	align="center" 	 		bgshadow="5 5 10 0 0x000000 0.5 inset" 	 /> <style  	name="cool_hotspotbubble_previewlayer"  	align="center" 	accuracy="1" 	width="prop"  	height="150"  	alpha="0"  	enabled="false"  	onloaded="if(pixelheight GT pixelwidth,copy(width,height);set(height,prop));" />       
<!-- ********** -->
<!-- Lecteur de site Internet -->
<!-- id : websiteViewer -->
<!-- ********** -->

<ptplugin name="websiteViewer" engine="kolorBox">
	<settings>
		<option name="position" value="center" type="string" />
		<option name="margin_x" value="0" type="int" />
		<option name="margin_y" value="0" type="int" />
		<option name="external_padding" value="15" type="int" />
		<option name="draggable_box" value="false" type="bool" />
		<option name="container_auto_size" value="true" type="bool" />
		<option name="container_width" value="100" type="int" />
		<option name="container_width_unit" value="percent" type="string" />
		<option name="container_height" value="100" type="int" />
		<option name="container_height_unit" value="percent" type="string" />
		<option name="container_color" value="ffffff" type="string" />
		<option name="container_alpha" value="0.80000000000000004" 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="container_border_alpha" value="1" type="float" />
		<option name="overlay_displayed" value="true" type="bool" />
		<option name="overlay_color" value="000000" type="string" />
		<option name="overlay_alpha" value="0.50000762951094835" type="float" />

		<option name="title_displayed" value="false" type="bool" />
		<option name="title_position" value="top" type="string" />
		<option name="title_font" value="Verdana" type="string" />
		<option name="title_size" value="14" type="int" />
		<option name="title_weight" value="normal" type="string" />
		<option name="title_style" value="normal" type="string" />
		<option name="title_decoration" value="none" type="string" />
		<option name="title_color" value="000000" type="string" />
		<option name="caption_displayed" value="false" type="bool" />
		<option name="iframe_scrolling" value="auto" type="string" />
		<option name="iframe_default_width" value="1100" type="int" />
		<option name="iframe_default_height" value="800" type="int" />
		<option name="iframe_devices_width" value="1100" type="int" />
		<option name="iframe_devices_height" value="800" type="int" />
		<option name="force_ios_scrolling" value="true" type="bool" />
		<option name="fullscreen_displayed" value="true" type="bool" />
		<option name="fullscreen_position" value="topleft" type="string" />
		<option name="fullscreen_text" value="websiteViewerfullscreen_text" type="string" />




		<option name="close_displayed" value="true" type="bool" />
		<option name="close_position" value="topright" type="string" />
		<option name="close_text" value="websiteViewerclose_text" type="string" />

		<option name="close_callback" value="invokeKrFunction('closeKolorBoxCallback_websiteViewer')" type="string" />
		<option name="zorder" value="3" type="int" />
		<option name="use_i18n" value="true" type="bool" />
	</settings>
	<internaldata>
		
	</internaldata>
</ptplugin>

<action name="kolorBoxJsReady_websiteViewer">
	set(ptplugin[websiteViewer].jsready, true);
</action>

<action name="openWebsite_websiteViewer">
	ifnot(ptplugin[websiteViewer].isOpen,
		set(ptplugin[websiteViewer].isOpen, true);
		set(ptplugin[websiteViewer].doNotDeleteMe, false);
		getmessage(websiteViewer_boxurl, %1);
		txtadd(websiteViewer_boxurl, ?iframe=true);
		pauseautorotation(forceplugin);

		js(invokePluginFunction(websiteViewer, loadSingleArrayItem, get(websiteViewer_boxurl), %2));
		events.dispatch(onremovedisplayedobject);
	,
		if('%1' != websiteViewer_boxurl,
			closeKolorBox_websiteViewer();
			delayedcall(0.3,openWebsite_websiteViewer(%1,%2););
		);
	);
</action>

<action name="toggleWebsite_websiteViewer">
	js(invokePluginFunction(websiteViewer, toggleKolorBox, %1));
</action>


<action name="closeKolorBox_websiteViewer">
	js(invokePluginFunction(websiteViewer, closeKolorBox));
</action>

<action name="closeKolorBoxCallback_websiteViewer">
	resumeautorotation(forceplugin);

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

<action name="changeLanguage_websiteViewer">
	if(ptplugin[websiteViewer].jsready,
		stopdelayedcall(delay_websiteViewer);
		js(invokePluginFunction(websiteViewer, changeLanguage));
	,
		delayedcall(delay_websiteViewer, 0.1, changeLanguage_websiteViewer(););
	);
</action>

<events name="kolorBoxEvents_websiteViewer" 
	keep="true"
	changetourlanguage="changeLanguage_websiteViewer();"
	/>

<!-- ********** -->
<!-- Pile de miniatures -->
<!-- id : stackthumbs -->
<!-- ********** -->

  <krpano stackthumbsIsOpen="false" stackthumbsFirstLoad="true" />

  <events name="stackthumbsEvents"
          onnewpano="stackthumbsClose(0);"
          onTourStart="stackthumbsBuild();"
          hidetourcontrols="stackthumbsHide();"
          showtourcontrols="stackthumbsShow();"
          hidetourthumbnails="stackthumbsHide();"
          showtourthumbnails="stackthumbsShow();"
          keep="true"/>

  <layer name="stackthumbsMainLayer" type="container" zorder="4" width="1" height="1" alpha="1" keep="true" x="0" y="0" visible="true" align="bottomleft" />

  <action name="stackthumbsHide">
    for (set(hstcstackthumbsi, 0), hstcstackthumbsi LT scene.count, inc(hstcstackthumbsi),
      txtadd(thumbname,'stackthumbs_', get(hstcstackthumbsi));
      txtadd(thumbnameimg, get(thumbname), '_img');
      set(layer[get(thumbname)].visible, false);
      set(layer[get(thumbnameimg)].visible, false);
    );
  </action>
  <action name="stackthumbsShow">
  if (tour_displaythumbnails, 
    for (set(sstcstackthumbsi, 0), sstcstackthumbsi LT scene.count, inc(sstcstackthumbsi),
      txtadd(thumbname,'stackthumbs_', get(sstcstackthumbsi));
      txtadd(thumbnameimg, get(thumbname), '_img');
      set(layer[get(thumbname)].visible, true);
      set(layer[get(thumbnameimg)].visible, true);
    );
  );
  </action>

  <action name="stackthumbsMagnify">
    tween(layer[%1].alpha,  1.0, 0.3, easeInQuad);
    tween(layer[%1].scale, 1.05, 0.3, easeInQuad);
    tween(layer[get(layer[%1].thumbborder)].alpha,  1.0, 0.3, easeInQuad);
    tween(layer[get(layer[%1].thumbborder)].scale, 1.05, 0.3, easeInQuad);
    set(layer[get(layer[%1].thumbborder)].bgborder, '2 0xffffff 1');
    set(layer[get(layer[%1].thumbborder)].mergedalpha, false);
  </action>

  <action name="stackthumbsLies">
    tween(layer[%1].alpha, 0.8, 0.3, easeInQuad);
    tween(layer[%1].scale, 1.0, 0.3, easeInQuad);
    tween(layer[get(layer[%1].thumbborder)].alpha, 0.8, 0.3, easeInQuad);
    tween(layer[get(layer[%1].thumbborder)].scale, 1.0, 0.3, easeInQuad);
    set(layer[get(layer[%1].thumbborder)].bgborder, '2 0xffffff 0.20000000000000001');
    set(layer[get(layer[%1].thumbborder)].mergedalpha, false);
  </action>


<krpano stackthumbsBuilt="false"/>

  <action name="stackthumbsBuild">
    ifnot (stackthumbsBuilt,
    for (set(bststackthumbsi, 0), bststackthumbsi LT scene.count, inc(bststackthumbsi),

        copy(thumburl, scene[get(bststackthumbsi)].thumburl);
        txtadd(thumbname,'stackthumbs_', get(bststackthumbsi));
        txtadd(thumbnameimg, get(thumbname), '_img');

        addplugin(get(thumbname));
        addplugin(get(thumbnameimg));
        set(layer[get(thumbnameimg)].parent, "stackthumbsMainLayer");
        set(layer[get(thumbname)].parent, get(thumbnameimg));
        set(layer[get(thumbnameimg)].url   , get(thumburl));
        set(layer[get(thumbname)].type, 'container');
        set(layer[get(thumbnameimg)].keep  , true);
        set(layer[get(thumbname)].keep  , true);
        set(layer[get(thumbnameimg)].align , bottomleft);
        set(layer[get(thumbname)].align , topleft);
        set(layer[get(thumbnameimg)].edge  , center);

        set(layer[get(thumbnameimg)].width , 50);
        set(layer[get(thumbnameimg)].height, 25);
        set(layer[get(thumbname)].width , 50);
        set(layer[get(thumbname)].height, 25);

        set(layer[get(thumbnameimg)].alpha , 0.8);
        set(layer[get(thumbnameimg)].visible , false);
        set(layer[get(thumbname)].alpha , 0.8);
        set(layer[get(thumbname)].visible , false);

        if (bststackthumbsi GE 4, set(reali, 4), set(reali, get(bststackthumbsi)));

        mul(layer[get(thumbnameimg)].x, get(reali),3);
        mul(layer[get(thumbnameimg)].y, get(reali),3);

        add(closedthumboffsetx, 10, 25);
        add(layer[get(thumbnameimg)].x, get(closedthumboffsetx));

        add(closedthumboffsety, 10, 12);
        add(layer[get(thumbnameimg)].y, get(closedthumboffsety));

        copy(layer[get(thumbnameimg)].xsmall, layer[get(thumbnameimg)].x);
        copy(layer[get(thumbnameimg)].ysmall, layer[get(thumbnameimg)].y);

        add(layer[get(thumbnameimg)].zorder, 0, bststackthumbsi);
        add(layer[get(thumbname)].zorder, 0, bststackthumbsi);
        set(layer[get(thumbname)].bgborder, '2 0xffffff 0.20000000000000001');
        set(layer[get(thumbname)].mergedalpha, false);

          set(layer[get(thumbnameimg)].tooltip,get(scene[get(bststackthumbsi)].titleid));
        set(layer[get(thumbnameimg)].thumbborder, get(thumbname));
        set(layer[get(thumbnameimg)].thumbpos, get(bststackthumbsi));
        set(layer[get(thumbnameimg)].linkedpano, get(scene[get(bststackthumbsi)].name) );
        set(layer[get(thumbnameimg)].onclick, stackthumbsOpen() );
      );

      set(stackthumbsBuilt, true);

      stackthumbsShow();


    );
  </action>

  <action name="stackthumbsOpenThumb">
    if(%3 != NEXT,
      set(pos,0);
      copy(curpos, layer[%1].thumbpos);
      set(xdst, 0);
      set(ydst, 0);
    );
    if (pos LT curpos,
      inc(pos);

        inc(ydst, 60);
        if (ishtml5,
          sub(ymax, stageheight, 50);
         ,
          sub(ymax, area.pixelheight, 50);
        );
        dec(ymax, 30);
        if(ydst GT ymax,
          inc(xdst, 110);
          set(ydst,0);
        );

      stackthumbsOpenThumb(%1,%2,NEXT);
     ,
      set(openthumboffsetx, 50);
      add(openthumboffsetx, 10);
      add(xdst, get(openthumboffsetx));

      set(openthumboffsety, 25);
      add(openthumboffsety, 10);
      add(ydst, get(openthumboffsety));

      tween(layer[%1].x, get(xdst) );
      tween(layer[%1].y, get(ydst) );
      tween(layer[%1].width , 100);
      tween(layer[%1].height, 50);
      tween(layer[%2].width , 100);
      tween(layer[%2].height, 50);
    );
  </action>

  <action name="stackthumbsOpen">
    for (set(oststackthumbsi, 0), oststackthumbsi LT scene.count, inc(oststackthumbsi),
      txtadd(thumbname,'stackthumbs_',get(oststackthumbsi));
      txtadd(thumbnameimg, get(thumbname), '_img');
      stackthumbsOpenThumb(get(thumbnameimg), get(thumbname));
      set(layer[get(thumbnameimg)].onover, stackthumbsMagnify(get(name)); );
      set(layer[get(thumbnameimg)].onout, stackthumbsLies(get(name)); hideTooltip(); );
      set(layer[get(thumbnameimg)].onhover, showTooltip('plugin'); );
      set(layer[get(thumbnameimg)].onclick, stackthumbsLies(get(name)); stackthumbsClose(0); mainloadscene(get(linkedpano)); );
    );

    set(stackthumbsIsOpen, true);
  </action>

  <action name="stackthumbsClose">
    if (stackthumbsIsOpen,
    for (set(cststackthumbsi, 0), cststackthumbsi LT scene.count, inc(cststackthumbsi),
      txtadd(thumbname,'stackthumbs_', get(cststackthumbsi));
      txtadd(thumbnameimg, get(thumbname), '_img');
      stackthumbsCloseThumb(get(thumbnameimg), get(thumbname));
    );

    set(stackthumbsIsOpen, false);
    );
  </action>
  <action name="stackthumbsCloseThumb">
    tween(layer[%1].x, get(layer[%1].xsmall));
    tween(layer[%1].y, get(layer[%1].ysmall));
    tween(layer[%1].width, 50);
    tween(layer[%1].height, 25);
    tween(layer[%2].width, 50);
    tween(layer[%2].height, 25);
    set(layer[%1].alpha, 0.8);
    set(layer[%1].onover, '');
    set(layer[%1].onout, '');
    set(layer[%1].onhover, '');hideTooltip();
    set(layer[%1].onclick, stackthumbsOpen() );
  </action>



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


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

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

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

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

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

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

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

</krpano>