/*
 * Obj.js
 * Copyright (c) 2003 Paul Sturm, all rights reserved.  For authorized use only.
 * sturm@branewave.com
 *
 * $Header: /home/sturm/js/RCS/Obj.js,v 1.2 2003/05/07 21:01:39 sturm Exp $
 *
 */


var Obj_registry = new Object;
var Obj_nextId = 0;


function Obj( )
{
   this.id = Obj_nextId ++;
   Obj_registry[ this.id ] = this;

   this.destroy = function( )
   {
      delete Obj_registry[ this.id ];
   }


   this.cb = function( cb )
   {
      var cb = "Obj_registry[ " + this.id + " ]." + cb + "( )";
      return function ( ) { eval( cb ) }
   }
}
