
// Array.push() - Add an element to the end of an array, return the new length
if( typeof Array.prototype.push==='undefined' ) {
	Array.prototype.push = function() {
		for( var i = 0, b = this.length, a = arguments, l = a.length; i<l; i++ ) {
			this[b+i] = a[i];
		}
		return this.length;
	}
}

// Array.indexOf( value, begin, strict ) - Return index of the first element that matches value
if( typeof Array.prototype.indexOf==='undefined' ) {
	Array.prototype.indexOf = function( v, b, s ) {
		for( var i = +b || 0, l = this.length; i < l; i++ ) {
			if( this[i]===v || s && this[i]==v ) { return i; }
		}
		return -1;
	}
}


// Array.unique( strict ) - Remove duplicate values
if( typeof Array.prototype.unique==='undefined' ) {
	Array.prototype.unique = function( b ) {
		var a = [], i, l = this.length;
		for( i=0; i<l; i++ ) {
			if( a.indexOf( this[i], 0, b ) < 0 ) { a.push( this[i] ); }
		}
		return a;
	}
}

