function wrap(oObject, sFunctionName, fnBefore, fnAfter) {
		var fnOriginalFunction = oObject[sFunctionName];

		oObject[sFunctionName] = function() {
			if (fnBefore) {
				fnBefore.apply(oObject, arguments);
			}

			fnOriginalFunction.apply(oObject, arguments);

			if (fnAfter) {
				fnAfter.apply(oObject, arguments);
			}
		};
	}
/**
	 * Wraps a method.
	 *
	 * @param {Object} oObject The object whose method is to be wrapped.
	 * @param {string} sFunctionName The name of the function to wrap.
	 * @param {Function} [fnBefore] This function is called before the wrapped function is executed.
	 * @param {Function} [fnAfter] This function is called after the wrapped function is executed.
	 */
Wraps a method.
@param {Object} oObject The object whose method is to be wrapped.
@param {string} sFunctionName The name of the function to wrap.
@param {Function} [fnBefore] This function is called before the wrapped function is executed.
@param {Function} [fnAfter] This function is called after the wrapped function is executed.
Wraps a method . @param { Object } oObject The object whose method is to be wrapped . @param { string } sFunctionName The name of the function to wrap . @param { Function } [ fnBefore ] This function is called before the wrapped function is executed . @param { Function } [ fnAfter ] This function is called after the wrapped function is executed .
function wrap(oObject, sFunctionName, fnBefore, fnAfter) {
		var fnOriginalFunction = oObject[sFunctionName];
		oObject[sFunctionName] = function() {
			if (fnBefore) {
				fnBefore.apply(oObject, arguments);
			}
			fnOriginalFunction.apply(oObject, arguments);
			if (fnAfter) {
				fnAfter.apply(oObject, arguments);
			}
		};
	}
function wrap ( oObject , sFunctionName , fnBefore , fnAfter ) { var fnOriginalFunction = oObject [ sFunctionName ] ; oObject [ sFunctionName ] = function ( ) { if ( fnBefore ) { fnBefore . apply ( oObject , arguments ) ; } fnOriginalFunction . apply ( oObject , arguments ) ; if ( fnAfter ) { fnAfter . apply ( oObject , arguments ) ; } } ; }
Wraps a method.
Wraps a method .