<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
  <xsl:output method="xml" version="1.0" encoding="UTF-8" />
  <xsl:template match="/">
    <krpano>
      <plugin name="tb_select" url="" zorder="99" alpha="1" blendmode="NORMAL" align="left" edge="center" y="0" ox="43" oy="0" width="80" height="56" refreshrate="" scale="1" smoothing="True" mask="" rotate="0" visible="True" enabled="True" capture="False" handcursor="True" keep="True" children="True" preload="False" effect="glow(0x00FFFF,0.7,4,4)" onloaded="set(effect,glow(0xFF0000,0.7,4,4););"/>
      <xsl:for-each select="Tour/Scene/sceneitem">
        <plugin row="{position()}" name="tb_{@sceneid}" url="%FIRSTXML%/scene/{@sceneid}/T.jpg" zorder="100" alpha="0.8" blendmode="NORMAL" align="left" edge="center" x="{(position()-1)*83}" y="0" ox="43" oy="0" width="80" height="56" refreshrate="" scale="1" smoothing="True" mask="" rotate="0" visible="True" enabled="True" capture="False" handcursor="True" keep="True" children="True" preload="False" Intro="" style="" effect="" parent="tb_box_sc" scalechildren="False" crop="" onovercrop="" ondowncrop="" scale9grid="" onover="set(effect,glow(0x00FFFF,0.7,4,4););set(alpha,1);" onhover="showtext('{@title}');" onout="set(effect,);set(alpha,0.8);" onclick="_loadscene({@sceneid});" ondown="" onup="" onloaded=""/>
        <plugin  name="tb_title_{@sceneid}" url="%SWFPATH%/plugins/textfield.swf" zorder="100" alpha="0.8" blendmode="NORMAL" align="bottom" edge="bottom" x="0" y="0" ox="0" oy="0" width="100%" height="20" refreshrate="" scale="1" smoothing="True" mask="" rotate="0" visible="True" enabled="True" capture="False" handcursor="True" keep="True" children="True" preload="False" Intro="" style="" effect="" parent="tb_{@sceneid}" scalechildren="True" crop="" onovercrop="" ondowncrop="" scale9grid="" onover="" onhover="" onout="" onclick="" ondown="" onup="" onloaded="" html="&lt;html&gt;{@title}&lt;/html&gt;" css="data:tb_title" autosize="center" background="True" backgroundcolor="0x333333" bordercolor="0x000000" borderwidth="0" roundedge="0" selectable="False" glow="0" glowcolor="0xFFFFFF" blur="0" shadow="0" textglow="0" textblur="0" textglowcolor="0xFFFFFF" textshadow="1"  devices="flash"/>
      </xsl:for-each>
      <action name="_setthumbs">_show_tb(get(SSet.TypeID),%1);
      mul(dst,get(plugin[tb_%1].x),-1);
      add(dst,dst,249);
      if (dst LT 0,set(dst,0);)
      tween(plugin[tb_box_sc].x,get(dst),0.4,linear);</action> 
      <action name="_show_tb">
      set(plugin[tb_box_sc].visible,true);
      
      copy(plugin[tb_select].url,plugin[tb_%2].url);
      copy(plugin[tb_select].parent,plugin[tb_%2].parent);
      copy(plugin[tb_select].x,plugin[tb_%2].x);
      copy(plugin[tb_select].y,plugin[tb_%2].y);</action>
      <data name="tb_title">html{color:#FFFFFF;font-family:宋体;font-size:12px;text-align:center;}</data>
    </krpano>
  </xsl:template>
</xsl:stylesheet>
