Seems to work ok here, but your post just leads to more questions than answers.
The biggest question being which browser are you seeing this behavior in?
I do know that many browsers do not move fixed elements properly when you resize the screen --- it's called a "redraw bug" and is common in older versions of Opera and FF. That could be what you are seeing.
Of course that scripting on the anchor doesn't look like anything I'd be doing on a website either... That's either using scripting to do CSS' job, or... I don't know what... Also looks like IE only code.
That said, I would just avoid using position:fixed; there's a REASON you don't see it on a lot of websites -- it's unreliable and buggy in pretty much every browser.
A possible workaround is to leave the div to the left, and apply your width and other styles to the anchor instead...
Do you have a full page we could look at? Snippets rarely give you the whole picture and the problem could be rooted in something else on the page interfering with it; or just an overall flawed sitebuilding method.