The EndRequest() Method

Listing 4. The EndRequest() method acts as an event handler for the endRequest method. It stops the interval timer and resets a div's CSS class.

function EndRequest(sender,args)
{
    window.clearInterval(intervalID);
    $get("divAnimate").className = "Normal";
}