<!-- tt2.splash.tabsbox -->  
[%
  # splash/tabsbox: a box with a row of tabs
  #
  # ARGS:
  #	tabs	    # list of { text => '...', link => '...' } tabs
  #     select	    # tab to select (1 - n, 0: none)
  #     content     # box content
  #     width       # box width (default: 0, grow to fit content)
  # The following default to values set in the select style
  #     fill        # fill colour
  #     border      # border width
  #     pad	    # box padding
  #     tabalign    # alignment of tab texts
  #     tablocate   # tab location ('left', 'center', 'right')
  # + all configuration values for splash/text

    SET
        default = splash.style.default
    ;
    DEFAULT 
        style     = default
        col       = style.col.fore   or default.col.fore
        bgcol     = style.col.bgcol  or default.col.bgcol
        fill      = style.col.fill   or default.col.fill
        tablocate = style.tab.locate or default.tab.locate
    ;
    SET
#	rgbcol  = splash.rgb.$edge
#	imgdir  = "$splash.images/$edge"
#        imgsize = splash.imgsize
        border  = border.defined ? border 
			: (style.border.defined ? style.border : default.border)
        pad     = pad.defined ? pad 
			: (style.pad.defined ? style.pad : default.pad)
-%]
[% IF 1 %]
<table border=0 cellpadding=0 cellspacing=0
  [%- IF width  %] width="[% width %]"[% END %]>
[% INCLUDE tabset UNLESS invert -%]
  <tr> 
    <td>
[%- WRAPPER splash/box width='100%' 
	    pad   = 0   
            space = 0 
	    col   = select ? splash.style.select.col.fore 
		           : splash.style.default.col.fore;
    INCLUDE splash/box
	    width = '100%'
	    bgcol = fill
	    border=0;
    END;
-%]
    </td>
  </tr>
[% INCLUDE tabset IF invert -%]
</table>
<!-- /splash.tabsbox -->
[% BLOCK tabset -%]
  <tr>
    <td align="[% tablocate %]">
[% INCLUDE splash/tabset col='' %]</td>
  </tr>
[% END -%]

[% ELSE %]
[% WRAPPER splash/frame border=0 -%]
[% WRAPPER splash/panel width=width ? '100%' : 0 -%]
[% INCLUDE tabset UNLESS invert -%]
[% END -%]
[% WRAPPER splash/frame;
    INCLUDE splash/panel col=fill width=width ? '100%' : 0;
   END -%]
[% END %]

[% END %]