http://ffxi.allakhazam.com/dyn/ahitems/29.html
Clicking the level column on the page listed above twice (for descending order) will result in the 9s and 8s showing before the lvl 75 equipment, obviously not the intended result.
From the looks of your sorting algorithm, it's considering that column to be text due to the non-breaking spaces following the number. If removed, it should work properly (or if the functions are changed to ignore & nbsp; ).