/**
 * Creates a new method attached to the object specified. Inside the method,
 * {this} will reference {obj}.
 * @param {Object} obj The object to attach the method to.
 * @param {Function} method The method to attach to the object.
 * @return {Function} The function attached to the object.
 */
function Delegate(obj, method) {
	return function () {
		method.apply(obj, arguments);
	};
}