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

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


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


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



  </action>



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

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

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

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

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

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

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

		<option name="area_width" value="30" type="int" />
		<option name="area_height" value="84" 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="2000" 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="2" type="int" />
		<option name="use_i18n" value="true" type="bool" />
	</settings>
</ptplugin>

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

	inc(tour_autorotation_openatstartplugin);
	set(ptplugin[description].autorotateBlocked, true);

</action>

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

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

		js(showKolorArea(description, get(ptplugin[description].descID)));
		events.dispatch(onremovedisplayedobject);
	);
</action>

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

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

<action name="closeKolorAreaCallback_description">
	if(ptplugin[description].isOpen,resumeautorotation(forceplugin);

		if(ptplugin[description].autorotateBlocked,if(tour_autorotation_openatstartplugin GT 0,dec(tour_autorotation_openatstartplugin);set(ptplugin[description].autorotateBlocked,false);););
	);
	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));
	,
		set(ptplugin[description].isOpen, true);
		pauseautorotation(forceplugin);

		js(invokePluginFunction(description, showKolorArea, %1));
		events.dispatch(onremovedisplayedobject);
	);
</action>
	
<action name="hideKolorArea_description">
	resumeautorotation(forceplugin);

	if(ptplugin[description].autorotateBlocked,if(tour_autorotation_openatstartplugin GT 0,dec(tour_autorotation_openatstartplugin);set(ptplugin[description].autorotateBlocked,false);););
	set(ptplugin[description].isOpen, false);
	js(invokePluginFunction(description, hideKolorArea, %1));
</action>

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

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

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

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



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

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

<!-- ********** -->
<!-- Séchage du mais et reflexion sur la poussiere et le balai -->
<!-- id : title -->
<!-- ********** -->

  <events name="title_events" 
    onTourStart="showtitle();"
    hidetourcontrols="hidetitle();" 
    showtourcontrols="showtitle();" 
    changetourlanguage="changeLanguagetitle"
    keep="true" />

  <action name="hidetitle">set(layer[title].visible, false);</action>
  <action name="showtitle">set(layer[title].visible, true );</action>

  <action name="changeLanguagetitle">
    getmessage(layer[title].html,get(projecttitleid));
    escape(layer[title].html);
  </action>

  <layer name="title" keep="true" zorder="3"
         type="text"
         align="top" x="0" y="15"
         onloaded="getmessage(html,get(projecttitleid));escape(html);"
         bg="false"
         bgborder="0"
         alpha="1"
         visible="false"
         capture="false" handcursor="false" enabled="false"
         interactivecontent="false" 
         txtshadow="1.0 1.0 4.0 0x000000 1.0"
         css="text-align:center;
              color:#ffe417;
              font-family:Arial;
              font-weight:bold;
              font-size:36px;"/>

<!-- ********** -->
<!-- Logo -->
<!-- id : logo -->
<!-- ********** -->


  <hotspot ath="0" atv="90"
         zorder="0"
         name="logo"
         keep="true"
         visible="false"
         capture="false"

			tooltip="logotooltipText"
			onhover="showTooltip('hotspot');"
			onout="hideTooltip();"
         url="%FIRSTXML%/graphics/logo/agriphoto.fr tres gros.gif" 
         handcursor="false"


         />

  <events name="logoevents" 
    onTourStart="showlogo();"
    keep="true" />

  <action name="hidelogo">
    set(hotspot[logo].visible, false);
  </action>
  <action name="showlogo">
      set(hotspot[logo].visible, true);
  </action>



  <events name="logoshowevents" onremovepano="hidelogo" onPanoStart="showlogo" keep="true"/>



<!-- ********** -->
<!-- Titre1 -->
<!-- id : title1 -->
<!-- ********** -->

  <events name="title1_events" 
    onTourStart="showtitle1();"
    hidetourcontrols="hidetitle1();" 
    showtourcontrols="showtitle1();" 
    onnewpano="updatetitle1();"
    changetourlanguage="changeLanguagetitle1"
    keep="true" />

  <action name="hidetitle1">set(layer[title1].visible, false);</action>
  <action name="showtitle1">set(layer[title1].visible, true );</action>

  <action name="changeLanguagetitle1">
    updatetitle1();
  </action>

  <action name="updatetitle1">
    getmessage(layer[title1].html, get(scene[get(xml.scene)].titleid));
    escape(layer[title1].html);
  </action>
  <layer name="title1" keep="true" zorder="5"
         type="text"
         align="topleft" x="5" y="0"
         bg="false"
         bgborder="0"
         alpha="1"
         visible="false"
         capture="false" handcursor="false" enabled="false"
         interactivecontent="false" 
         txtshadow="1.0 1.0 4.0 0x000000 1.0"
         css="text-align:left;
              color:#ffe417;
              font-family:Arial;
              font-weight:bold;
              text-decoration:underline;
              font-size:26px;"/>

<!-- ********** -->
<!-- Title Extended - Scene specific -->
<!-- id : extendedtitle -->
<!-- ********** -->

  <events name="extendedtitle_events" 
    onTourStart="showextendedtitle();"
    hidetourcontrols="hideextendedtitle();" 
    showtourcontrols="showextendedtitle();" 
    onnewpano="showextendedtitle();"
    changetourlanguage="changeLanguageextendedtitle"
    keep="true" />
  <action name="hideextendedtitle">set(layer[extendedtitle].visible, false);</action>
  <action name="showextendedtitle">
    if (tour_displaycontrols,
    set(displaytheextendedtitle, false);
    if (xml.scene == pano98, set(displaytheextendedtitle, true); );
    if (xml.scene == , set(displaytheextendedtitle, true); );
    if (xml.scene == , set(displaytheextendedtitle, true); );
    if (displaytheextendedtitle,
      set(layer[extendedtitle].visible, true);
    ,
      hideextendedtitle();
    );
    ,
      set(layer[extendedtitle].visible, false );
    );
  </action>
  <action name="changeLanguageextendedtitle">
    updateextendedtitle();
  </action>

  <action name="updateextendedtitle">
    getmessage(layer[extendedtitle].html, extendedtitlecustomtitle);
    escape(layer[extendedtitle].html);
  showextendedtitle();
  </action>


  <layer name="extendedtitle" keep="true" zorder="6"
         type="text"
         align="bottomleft" x="6" y="55"
         onloaded="getmessage(html,extendedtitlecustomtitle);escape(html);"
         bg="false" 
         bgborder="0"
         alpha="1"
         visible="false"
         capture="false" handcursor="false" enabled="false"
         interactivecontent="false" 
         txtshadow="1.0 1.0 4.0 0x000000 1.0"
         css="text-align:left;
              color:#ffe417;
              font-family:Arial;
              font-weight:bold;
              text-decoration:underline;
              font-size:28px;"/>

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


</krpano>