-% my $current = $current_toptab || "";
-% my $path = $toptabs->{$tab}->{'path'} || "";
-% $path =~ s#/index.html$##gi;
-% $current =~ s#/index.html$##gi;
-% if ( $path eq $current) {
-% $class="currenttopnav"
-% } else {
-% $class="topnav"
-% }
-% my $style="";
-% if ($sep) {
-% $style="border-top: solid #999 1px; padding-top: .1em; margin-top: .5em;";
-% } elsif ($level == 0 ) {
-% $style="border-bottom: solid white 1px; padding-top: .25em; padding-bottom: .5em;" ;
-% }
-% if ($toptabs->{$tab}->{'separator'}) {
-% $sep=1;
-% } else {
-% $sep=0;
-% }
-<li style="<%$style%>"><A HREF="<% ($toptabs->{$tab}->{'path'} =~ /^http/) ? '' : "${RT::WebPath}/" %><%$toptabs->{$tab}->{'path'}%>" style="font-size: <%$size%>;" class="<%$class%>"
-<%($class eq 'currenttopnav') ? "name='focus'" : ""|n %>
-<% !$level && "accesskey='".$accesskey++."'" |n%>><% $toptabs->{$tab}->{'title'}%></A>
+% $count++;
+%
+% my $current = $current_toptab || "";
+% my $path = $toptabs->{$tab}->{'path'} || "";
+%
+% $path =~ s#/index.html$##gi;
+% $current =~ s#/index.html$##gi;
+%
+% $sep = $toptabs->{$tab}->{'separator'} ? 1 : 0;
+%
+% my @aclass;
+% push @aclass, 'selected'
+% if $path eq $current;
+%
+% push @aclass, 'odd'
+% if $level % 2;
+%
+% $class->{a} = join ' ', @aclass;
+%
+% my @li;
+% push @li, 'first'
+% if $count == 1;
+%
+% push @li, 'pre-separator'
+% if $sep;
+%
+% push @li, 'post-separator'
+% if $postsep;
+%
+% $class->{li} = join ' ', @li;
+%
+% my $url = ($toptabs->{$tab}->{'path'}||'') =~ /^https?:/i
+% ? $toptabs->{$tab}->{'path'} || ''
+% : $RT::WebPath . "/" . $toptabs->{$tab}->{'path'};
+%
+ <li<% $class->{li} ? qq[ class="$class->{li}"] : ''|n %>>
+ <% $count > 1 && !$postsep && qq[<span class="bullet">· </span>]|n%>
+ <a href="<% $url %>"
+ <% $class->{a} && qq[ class="$class->{a}"] |n%>
+ <% !$level && " accesskey='".$accesskey++."'" |n%>>
+ <% $toptabs->{$tab}->{'title'} || ''%></a>