function ImagePreloader() 
{
    this.images = new Array();
    this.nextImageID = 0;
    
    ImagePreloader.prototype.load = function() 
    {
        //if (!document.images) 
            //return;

        for (var i = 0; i < arguments.length; i++) 
        {
            this.images[this.nextImageID] = new Image();
            this.images[this.nextImageID].src = arguments[i];
            this.nextImageID++;
        }
    }
        
    ImagePreloader.prototype.loadAll = function() 
    {
        switch(arguments[0])
        {
            case "report":
                this.load(  "img/loading.gif",
                            "img/chart.png");
                return;
                
            default:
                return;
        }
    }
}
