This is a known issue with IE 5. There was a change in how the browser handles a certain event, which causes the HTML script to begin running before AgentSvr is started. In order to make your page work with all versions of the browser, you need to add this line to your script:
AgentControl.Connected = True
which explicitly creates a connection to the AgentSvr. Note that you only need to do this if your page loads Agent from multiple frames.