Manager = Class.create({
	initialize: function(handler) {
		this.handler = handler;
		this.watch = new Hash({});
	},
	reset: function() {
		var watch = this.watch;
		this.watch.each(function(pair) {
			watch.set(pair.key, false);
		});
		return this;
	},
	append: function(name) {
		this.watch.set(name, false);
		return this;
	},
	done: function(name) {
		this.watch.set(name, true);
		this.check();
		return this;
	},
	check: function() {
		var done = true;
		this.watch.each(function(pair) {
			if (!pair.value) {
				done = false;
			}
		});
		if (done) {
			this.handler.fire('x:done');
		}
	}
});
