it's possible to make much better scripts then that using Open Source AJAX Frameworks ... We are using XAJAX framework on the site .. it's pretty easy to program around ...
www.ajaxwith.com
take a look at the sort options..... they are all using AJAX....