4 * Copyright(c) 2006-2007, Ext JS, LLC.
6 * Originally Released Under LGPL - original licence link has changed is not relivant.
9 * <script type="text/javascript">
14 Roo.applyIf(Array.prototype, {
16 * Checks whether or not the specified object exists in the array.
17 * @param {Object} o The object to check for
18 * @return {Number} The index of o in the array (or -1 if it is not found)
20 indexOf : function(o){
21 for (var i = 0, len = this.length; i < len; i++){
22 if(this[i] == o) return i;
28 * Removes the specified object from the array. If the object is not found nothing happens.
29 * @param {Object} o The object to remove
32 var index = this.indexOf(o);
34 this.splice(index, 1);
38 * Map (JS 1.6 compatibility)
39 * @param {Function} function to call
43 var len = this.length >>> 0;
44 if (typeof fun != "function")
45 throw new TypeError();
47 var res = new Array(len);
48 var thisp = arguments[1];
49 for (var i = 0; i < len; i++)
52 res[i] = fun.call(thisp, this[i], i, this);