/*
 * SelfReferencedObjects.js
 * $Author: matt zandstra (matt@zink.demon.co.uk)$
 * $Date: 21 mars, 1998$
 * (trouvé sur le forum : comp.lang.javascript)
 *
 * Ce script permet d'obtenir des objets qui peuvent s'auto-référencer.
 * Exemple d'utilisation : setTimeout(this.selfRef()+".méthode()",1000);
 */
 
Object.prototype.selfRef=selfRef;
Object.prototype.objList=new Array();
function selfRef(arg) {
	if (!this.objIndex) {
		this.objIndex=Object.prototype.objList.length;
		Object.prototype.objList[this.objIndex]=this;
	}
	return "Object.prototype.objList["+this.objIndex+"]";
}
