
function ImagePreloader(callback,data){this.callback=callback;this.oImage="";this.oData=data;}
ImagePreloader.prototype.preload=function(image,data){this.oImage=new Image;if(data)
this.oData=data;var self=this;this.oImage.onload=function(){self.onload();}
this.oImage.onerror=function(){self.onerror();}
this.oImage.onabort=function(){self.onabort();}
this.oImage.src=image;}
ImagePreloader.prototype.onComplete=function(fLoaded){this.callback(fLoaded,this.oImage,this.oData);}
ImagePreloader.prototype.onload=function(){this.onComplete(true);}
ImagePreloader.prototype.onerror=function(){this.onComplete(false);}
ImagePreloader.prototype.onabort=function(){this.onComplete(false);}
