Function.prototype.bind = function ()
{
    var _arguments = Array.prototype.slice.apply(arguments);
    var _object = _arguments.shift();
    var _method = this;
    return function ()
    {
        var _arguments2 = Array.prototype.slice.apply(arguments);
        return _method.apply(_object, _arguments.concat(_arguments2));
    };
}
