Hey Mueller,
I'm trying to understand where the code pulls from....tested (changed my default sort order in category settings of the admin file and tried a couple different sorts). The best I can tell - the dynamic link images are not following the sort for the category default (on all categories). So it works fine on all customer sort choices, except the default.
e.g. I added the code in the listing template, then changed my default from product/category (in my case Jewelry w/subcat Bracelets)- went in to view, clicked on bracelets (the product view page is sorted properly to my default which was set), then click on the first product for the detail pages, and look at the dynamic links...they are NOT in the default sort order. Go back to product view...manually change my sort from the drop down and choose something other than my defualt sort - and the dynamic links ARE in the proper order. So again, no matter how many times I test the dynamic link image sorts...it worked fine on all sorts EXCEPT for my default (the system is ignoring my cat default)

I'm not sure if manually selecting each product sort would help (from the product sort options in the admin file) - but for me, there would be way too many products, changing inventory and new products on a weekly basis for me to manage.
I'd like to test without images and just use a text "prior/next" type of thing - does anyone know code wise what I might try? I've tried a couple things - but programmer/code guru I'm NOT
J-Lynn