I would guess that the problem is that MT is processing the code and THEN the javascript is being processed... which makes it impossible for MT to filter it down to one author because the variable isn't in there yet. I spent a long time last week trying to come up with a new method than what I was using (that would let me repeat a block of code for each author instead of having to type it out for each author).
My author profiles for TheRedKitchen are each a separate index template. I just have them set not to rebuild every time because they rarely change information; this allows me to keep them in the same place as my other TRK info and have some of the similar sidebar data as the other pages on the site have.
Here's more info about dealing with archives for multiple authors, in case that is helpful to you.
Kristine