function LoadImages(name){
	this.pathToImages="";
	this.Img=new Array();
	this.c=0;
	this.ifLoaded=0;
	this.name=name;
}
LoadImages.prototype.setPath=function(nPath){
	this.pathToImages=nPath;
}
LoadImages.prototype.loadImage=function(pImg){
	this.Img[this.c]=new Image();
	this.Img[this.c++].src=this.pathToImages+pImg;
}
LoadImages.prototype.loadImages=function(){
	for (var i=0;i<arguments.length;i++){
		this.loadImage(arguments[i]);
	}
}
LoadImages.prototype.checkImages=function(){
	var i=0;
	var ok=1;
	while ((i<this.c) && (ok)){
		(!this.Img[i++].complete) && (ok=0);
	}
	(ok)? this._whenLoaded():setTimeout(this.name+".checkImages()",1000);
}
LoadImages.prototype._whenLoaded=function(){
	this.ifLoaded=1;
	this.createEvents();
}