function DataLoader(){this.res={};this.start=function(){return this};this.load=function(src,name){if(!name)name=src;var record={img:new Image,name:name,loaded:false,error:false};record.img.onload=function(){record.loaded=true};record.img.onerror=function(){record.error=true};record.img.src=src;this.res[name]=record;return name};this.isLoading=function(){for(var i in this.res)if(this.res[i].loaded==false&&this.res[i].error==false)return true;return false}};
