Actually, I managed to get this done myself after a bit of tinkering. I know almost no php so I was surprised I got it done (I took 2 years of computer science during HS and then I only learned Java, lol :X ). I'm not sure if this is going to work all the time, but here are the changes I made.
I added these two lines to theme_html_picture() at the top
global $pos, $nextimg;
$nextimg = $pos + 1;
and then changed this section
if ($mime_content['content']=='image') {
if (isset($image_size['reduced'])) {
$winsizeX = $CURRENT_PIC_DATA['pwidth']+5; //the +'s are the mysterious FF and IE paddings
$winsizeY = $CURRENT_PIC_DATA['pheight']+3; //the +'s are the mysterious FF and IE paddings
$pic_html = "<a href=\"javascript:;\" onclick=\"MM_openBrWindow('displayimage.php?pid=$pid&fullsize=1','" . uniqid(rand()) . "','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=$winsizeX,height=$winsizeY')\">";
$pic_title = $lang_display_image_php['view_fs'] . "\n==============\n" . $pic_title;
$pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";
$pic_html .= "</a>\n";
} else {
to this
if ($mime_content['content']=='image') {
if (isset($image_size['reduced'])) {
$winsizeX = $CURRENT_PIC_DATA['pwidth']+5; //the +'s are the mysterious FF and IE paddings
$winsizeY = $CURRENT_PIC_DATA['pheight']+3; //the +'s are the mysterious FF and IE paddings
$pic_html = "<a href='?album=$album$cat_link&pos=$nextimg'>";
$pic_title = $lang_display_image_php['view_fs'] . "\n==============\n" . $pic_title;
$pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";
$pic_html .= "</a>\n";
} else {In all the tests I've done, it seems to work so hopefully I didn't end up breaking something else in another part of the gallery.