%# To be sure of hitting the target, shoot first and, whatever you hit,
%# call it the target.

<table border=0 cellpadding=0 cellspacing=0>
  <tr> 
% while (my ($k, $v) = splice(@RGTabs, 0, 2)) {
%   if ($k eq $Text or ($Text =~ /^(.+)s$/ and $k eq "$1 Setup")) {
    <td background="/img/tabLeft.png" width=2><noscript>{</noscript></td>
    <td align="center" background="/img/tabMiddle.png"><div style="<% $OIN::OIN104 ? '' : 'padding: 3px;' %> padding-left: 10px; padding-right: 10px;position:relative;top:2px;color:white"><nobr><label><% loc($k) %></label></nobr></div></td>
    <td background="/img/tabRight.png" width=2><noscript>}</noscript></td>
%   } elsif ($v) {
    <td background="/img/tabLeftTop.png" width=2><noscript>{</noscript></td>
    <td align="center" style="cursor: hand" onclick="javascript:location.href='<% $v %>'" background="/img/tabMiddleTop.png"><nobr><a style="color: black" href="<% $v %>"><div style="padding: 3px; padding-left: 10px; padding-right: 10px;position:relative;top:2px;color:black"><% loc($k) %></div></a></nobr></td>
    <td background="/img/tabRightTop.png" width=2><noscript>}</noscript></td>
%   } else {
    <td background="/img/tabLeftTop.png" width=2><noscript>{</noscript></td>
    <td align="center" background="/img/tabMiddleTop.png"><div style="padding: 3px; padding-left: 10px; padding-right: 10px;position:relative;top:2px;color:gray"><nobr><% loc($k) %></nobr></div></td>
    <td background="/img/tabRightTop.png" width=2><noscript>}</noscript></td>
%   }
% }
  </tr>
</table>
% if ($Text eq 'Report Permissions') {
<table width="100%" border="0" cellspacing="0" cellpadding="4">
<tr> 
<td bgcolor="#87C2C2" class="poptable" valign="bottom" > 
<&|/l&>Report Name</&>: <% $session{reportName} %></td>
</tr>
</table>
% }

<a id="skipnav" name="skipnav"></a>
<%INIT>
my $Id = $session{reportId};
$Text = 'Report Permissions' if $Text eq 'Global'; # XXX hack
my @RGTabs = (
'Template Base'		# loc
    => '/RG/index.html',
'Categories'		# loc
    => '/RG/Category/index.html',
  ($Id ? (
'Report Edit'		# loc
    => '/RG/Report/index.html',
'Report Permissions'	# loc
    => '/RG/Rights/index.html',
  ) : ()),
);
</%INIT>
<%ARGS>
$Text
$Recurse => 0
</%ARGS>
