my $annot = UCW::CGI::html_escape($m->{title});
my $tw = $tm->{w};
my $th = $tm->{h};
- my $thumb = $CF{'ThumbUrlPrefix'} . "/$thumb_fmt/$id.jpg";
+ my $thumb = $CF{'ThumbUrlPrefix'} . "$thumb_fmt/$id.jpg";
my $side_w = $CF{"ThumbW"} + 2*$CF{"InteriorMargin"};
my $side_h = $CF{"ThumbH"} + 2*$CF{"InteriorMargin"};
my $box_w = $CF{"LeftW"} + $side_w + $CF{"RightW"};
my $ol = $CF{'LeftW'} + $CF{'InteriorMargin'} + int(($CF{'ThumbW'} - $tw)/2);
my $ot = $CF{'TopH'} + $CF{'InteriorMargin'} + int(($CF{'ThumbH'} - $th)/2);
my $tit = ($annot ne "") ? " title=\"$annot\"" : "";
- my $url = ($CF{"ImageSubpages"} ? "?i=$id" : $orig);
+ my $url = ($CF{"ImageSubpages"} ? "?i=$idx" : $orig);
print "<a href='$url'><img src='$thumb' width=$w height=$h alt='$orig'$tit class=ti style='left: ${ol}px; top: ${ot}px'></a>\n";
print "<img src='$CF{'RightImg'}' width=$CF{'RightW'} height=$side_h alt='' class=tr>\n";
print "<img src='$CF{'BotImg'}' width=$box_w height=$CF{'BotH'} alt='' class=tb>\n";