I agree with Richard Jones, the first step is to re-examine your
assumptions and simplify, simplify, simplify. If such a complex table is
still your best presentation, I have another method to offer.
In Michael Paciello's book, "Web Accessibility for People with
Disabilities", he describes a method on pages 112-118 that is supposed to
allow you to do what you are describing with the script you propose to
write.
It involves the use of id and axisattributes for <TH> tags. I have not
needed to use this yet, so do not know how it all turns out in a screen
reader situation.
Rosemary Ernst
Seward Learning Systems, Inc.