/***************************************************************
(C) 2000 - 2001 Alrik Lubbers. Use of this code without explicit 
permission is prohibited.
***************************************************************/


/*The ObjectRegistry class and the registry instance are used to insert/retrieve
objects so that setTimeout() called functions can get a handle to objects, and 
in term use the handle to get hold of the objects to manipulate

API:
ObjectRegistry.register(object);
ObjectRegistry.retrieve(ticket);

*/


function ObjectRegistry()
{
	this.__obj=new Array();
	//this.__idx=0;
	this.register=__obj_reg_register;
	this.retrieve=__obj_reg_retrieve;
}

function __obj_reg_register(obj)
{
	lng=this.__obj.length;
	this.__obj[lng]=obj;
	return lng;
}

function __obj_reg_retrieve(idx)
{
	return this.__obj[idx];
}

var registry = new ObjectRegistry();