$current_cat=$in{cat};
if (!$current_cat )  { 
    if ( $config{'is_masterHost'} ne "true" ) {
                $current_cat="browsers";
    } else {
                $current_cat=$config{'default_cat'};
    }
}
$sub_cat=$in{sub};
@modules = split(/,/,$text{'modules'}, -1);
$out_titles=$config{'set_titles'};
        foreach $m (@modules) {
                next if ( $config{'is_masterHost'} ne "true"  && $m eq "monitor");     
                next if ( $config{'is_masterHost'} ne "true"  && $m eq "objects");     
                next if ( $config{'is_masterHost'} ne "true"  && $m eq "ldapcache");     
                next if ( $config{'is_masterHost'} ne "true"  && $m eq "password");     
                next if ( $config{'is_ldapcache'} ne "true"  && $m eq "ldapcache");     
                next if ( $config{'is_ldapcache'} eq "true"  && $m eq "ldapprofile");     
                next if ( $access{'supervision'} ne 1  && $m eq "supervision");     
                next if ( $config{'has_monitor'} ne "true"  && $m eq "monitor");     
                $cats{$m} = $text{"category_$m"};
                if ( $cats{$m} eq "") { $cats{$m}=$m};
        }
        @cats = sort { $b cmp $a } keys %cats;
        $cats = @cats;
        $per = $cats ? 100.0 / $cats : 100;

 print "<table border=0 cellpadding=0 cellspacing=0 height=20><tr>\n";
        
        $usercol = defined($gconfig{'cs_header'}) ||
                   defined($gconfig{'cs_table'}) ||
                   defined($gconfig{'cs_page'});
        foreach $c (@cats) {
                $t = $cats{$c};
                if ($current_cat eq $c) {
                        print "<td valign=top $cb>", $usercol ? "<br>" :
                          "<img src=../images/lc2.gif alt=\"\">","</td>\n";
                        print "<td $cb>&nbsp;<b>$t</b>&nbsp;</td>\n";
                        print "<td valign=top $cb>", $usercol ? "<br>" :
                          "<img src=../images/rc2.gif alt=\"\">","</td>\n";
                        }
                else {
                        print "<td valign=top $tb>", $usercol ? "<br>" :
                          "<img src=../images/lc1.gif alt=\"\">","</td>\n";
                        print "<td $tb>&nbsp;",
                              "<a href=/tarantella/?cat=$c><b>$t</b></a>&nbsp;</td>\n";
                        print "<td valign=top $tb>", $usercol ? "<br>" :
                          "<img src=../images/rc1.gif alt=\"\">","</td>\n";
                        }
                print "<td width=10></td>\n";
                }
        print "</tr></table> <table border=0 cellpadding=0 cellspacing=0 width=100% $cb>\n";
        print "<tr><td><table width=100% cellpadding=5>\n";
 
        # Display the modules in this category
        $pos = 0;
        $cols = $gconfig{'nocols'} ? $gconfig{'nocols'} : 4;
        $per = 100.0 / $cols;
        foreach $m (@modules) {
                next if ($m ne $current_cat);
                if ($pos % $cols == 0) { print "<tr>\n"; }
                if ($sub_cat )  { 
		    $out_titles=1;
                    do "./index/$sub_cat.pl";
                } else {
                    do "./index/$m.pl";
                }
                if ($pos++ % $cols == $cols - 1) { print "</tr><tr>\n"; }

        }
        while($pos++ % $cols) {
                print "<td width=$per\%></td>\n";
        }
        print "</table></td></tr></table><p><hr>\n";
