function loadIMG(arieIMG, fnct){
   	this.isDone = fnct;
    this.nrPicInit = 0;
   	this.nrPicDone = 0;
   	this.newArieIMG = new Array;
   	this.nrPicTotal = arieIMG.length;
   	for ( var i = 0; i < arieIMG.length; i++ ) this.preload(arieIMG[i]);}

loadIMG.prototype.preload = function(IMG){
	var newIMG = new Image;
	this.newArieIMG.push(newIMG);
   	newIMG.onload = loadIMG.prototype.onload;
   	newIMG.onerror = loadIMG.prototype.onerror;
   	newIMG.onabort = loadIMG.prototype.onabort;
   	newIMG.idIMG = this;
   	newIMG.imgLoaded = false;
   	newIMG.src = IMG;}

loadIMG.prototype.onComplete = function(){
   this.nrPicDone++;
   if ( this.nrPicDone == this.nrPicTotal ){
      	this.isDone();}}

loadIMG.prototype.onload = function(){
   this.imgLoaded = true;
   this.idIMG.nrPicInit++;
   this.idIMG.onComplete();}

loadIMG.prototype.onerror = function(){this.idIMG.onComplete();} // do nothing for now!
loadIMG.prototype.onabort = function(){this.idIMG.onComplete();} // do nothing for now!