A: 

First time through, this.script.src.readyState is false (script still loading) and a handler is created for the onLoad event. When onLoad is triggered, the anonymous onLoad function is called - which appears to be very similar to the onReadyStateChange handler. However, onLoad is triggered only once, so your function is called only once.

The sleep slows execution enuf so your this.script.src.readyState is true when you execute the if statement.

What do you think?

Upper Stage
I use this as an object and I instantiate the object each time it is used. Also it works perfectly well in firefox. Only problem is IE6.
Abhi
The fact that the sleep has an affect suggests a timing issue (obviously). Have you sniffed the traffic from IE6 to the server and compared it to FF traffic?
Upper Stage
I am using Fiddler and trying to see the request response. In either case(with sleep and without sleep) the request is sent and the response is got back but in case there is no sleep Fiddler tells me session is aborted. What does this mean? IE is aborting the session?
Abhi
I found a solution to the problem without using sleep. This particular event was trigerred by click a link and the onclick event handler did not have a return false at the end. As soon as I added a return false it started working. But the question is how does adding the sleep prevent this problem bcos the sleep is not added at the end.
Abhi
Is there any chance the sleep is causing you to take a different path through the if statement? With sleep -> then, without sleep -> else?
Upper Stage