/*****************************************************************************
 *
 *  Define the Object and Functions
 *
 *****************************************************************************/
function AsyncCallback(f, v)
{
    this.callback = f;
    this.cnt = v;
}

AsyncCallback.prototype.decrement = function()
{
    this.cnt--;
    if (this.cnt == 0)
    {
        var f = this.callback;
        this.callback = "";
        return eval(f);
    }
}