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

    
  <!-- Spot Style - Default Point Spot Style 1 -->
  <style name="IconDefaultPointSpotStyle1"
         url="%FIRSTXML%/spots/hotspot_image_user_defaultpoint0.png"
         visible="false"
         onhover="onhoverIconDefaultPointSpotStyle1"
         onout="onoutIconDefaultPointSpotStyle1"
         />
  <action name="onhoverIconDefaultPointSpotStyle1">
    showtooltip('hotspot');
  </action>
  <action name="onoutIconDefaultPointSpotStyle1">
    hideTooltip();



  </action>



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

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

  <action name="loaderinformationupdate" devices="flash">
  if(scene[xml.scene].multires,
    set(layer[loaderinformationtextfield].visible, false);
  ,
    if (progress.progress == 1,
      delayedcall(0.5, set(layer[loaderinformationtextfield].visible, false); );
     ,
       if (progress.bytestotal != 0,
         set(layer[loaderinformationtextfield].visible, true);
       ,
         set(layer[loaderinformationtextfield].visible, false);
       );
    );
    set(progresstext, "");
    txtadd(progresstext, get(progress.bytesloaded));
    txtadd(progresstext, " bytes");
    txtadd(progresstext, "/");
    txtadd(progresstext, get(progress.bytestotal));
    txtadd(progresstext, " bytes");
    set(layer[loaderinformationtextfield].html, get(progresstext));
    ifnot(progress.progress GE 1, delayedcall(0.01, loaderinformationupdate() ));
  );
  </action>

  <layer name="loaderinformationtextfield"
         devices="flash"
         keep="true"
         zorder="0"
         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="0.780392156862745"
         visible="true"
         css="
              text-align:center;
              color:#555555;
              font-family:Helvetica;
              font-weight:bold;
              font-size:16px;
             "
  />

<!-- ********* -->
<!-- Gyroscope -->
<!-- ********* -->
<plugin name="gyroscope"
        url="graphics/gyro.js"
        keep="true"
        devices="no-desktop.and.html5"


        friction="0.5"
        onavailable="delayedcall(1, checkGyroAvailability(););"
        enabled="false"
        activated="false"
        />

<events name="gyroscopeEvents" onnewpano="planarGyroscopeTest();" keep="true" />

<action name="planarGyroscopeTest">
  if(plugin[gyroscope],
    ifnot (plugin[gyroscope].available === undefined, 
      if (plugin[gyroscope].available,
        if(scene[get(xml.scene)].planar,
          if(plugin[gyroscope].enabled,
            switch(plugin[gyroscope].enabled);
            if (plugin[gyroscope].enabled, events.dispatch(ongyroscopeon);, events.dispatch(ongyroscopeoff););
          );
        ,
          if(plugin[gyroscope].activated,
            ifnot(plugin[gyroscope].enabled,
              switch(plugin[gyroscope].enabled);
              if (plugin[gyroscope].enabled, events.dispatch(ongyroscopeon);, events.dispatch(ongyroscopeoff););
            );
          );
        );
      );
    );
  );
</action>

<action name="changeGyroscopeState">
  if(plugin[gyroscope],
    ifnot (plugin[gyroscope].available === undefined,
      if (plugin[gyroscope].available,
        if(%1,
          set(plugin[gyroscope].activated,true);
        );
        if (%1 !=  plugin[gyroscope].enabled,
          if(plugin[gyroscope].activated,
            switch(plugin[gyroscope].enabled);
          ,
            set(plugin[gyroscope].enabled, false);
          );
          if (plugin[gyroscope].enabled, events.dispatch(ongyroscopeon);, events.dispatch(ongyroscopeoff););
        );
      );
    );
  );
</action>

<action name="checkGyroAvailability">
  if(plugin[gyroscope],
    ifnot (plugin[gyroscope].available === undefined, 
      if (plugin[gyroscope].available,
        ifnot(scene[get(xml.scene)].planar,
          switch(plugin[gyroscope].enabled);
          set(plugin[gyroscope].activated,true);
        );
        set(tour_gyroscopedevices, true);
        events.dispatch(ongyroscopeavailable);
      ,
        set(tour_gyroscopedevices, false);
      );
    ,
      set(tour_gyroscopedevices, false);
    );
    if (plugin[gyroscope].enabled, events.dispatch(ongyroscopeon);, events.dispatch(ongyroscopeoff););
  );
</action>

  <!-- ************ -->
  <!-- Logo : viewport / topleft -->
  <!-- ************ -->

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

			tooltip="logotooltipText"
			onhover="showTooltip('plugin');"
			onout="hideTooltip();"
         url="%FIRSTXML%/graphics/logo/logo-png-_2_.png" 
         handcursor="false"


         />

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

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





</krpano>