This javascript function fixed the header of a table by adding the "fixed" class
FAQ
How I use it? Easy!
In your header o footer put this javascript code:
$(document).ready(function() { goheadfixed('table.fixed'); });
..and in your table must add the class "fixed"
This function depends on some library? Yes, it depends of JQUERY >= 1.7
Exists a demo? http://jsfiddle.net/gonzalesc/USbUG/