function _class_(base, methods) {

	// Create an object with the base class's prototype,
	// without calling the base class constructor.
	function f() { return this; }
	f.prototype = base.prototype;
	var proto = new f();

	// Add the new class's methods to the prototype.
	for (var m in methods) {
		proto[m] = methods[m];
	}

	// Set the prototype of the constructor.
	methods._new_.prototype = proto;
	return methods._new_;
}

function bind(object, method) {
	if (typeof(method) == 'string') {
		method = object[method];
	}

	return function () {
		return method.apply(object, arguments);
	}
}
