
/* number */ Array.prototype.indexOf = function (objItem) {
	for (var i=0; i < this.length; i++) {
		if (this[i] == objItem) {
			return i;
		}
	}
	return -1;
}

/* boolean */ Array.prototype.contains = function (objItem) {
	return this.indexOf(objItem) != -1;
}

/* Array */ Array.prototype.clone = function () {
	return this.slice(0);
}

/* void */ Array.prototype.insert = function (iIndex, objItem) {
	this.splice(iIndex, 0, objItem);
}

/* Object */ Array.prototype.removeAt = function (iIndex) {
	return this.splice(iIndex, 1);
}

/* void */ Array.prototype.push = function () {
	var A_p = 0;
	for (A_p = 0; A_p < arguments.length; A_p++) { this[this.length] = arguments[A_p]; }
}

/* Object */ Array.prototype.pop = function () {
	var response = this[this.length - 1];
	this.length--;
	return response;
}

/* boolean */ Array.prototype.remove = function (objItem) {
	var index = this.indexOf(objItem);
	if (index > -1) {
		this.removeAt(index);
		return true;
	}
	return false;
}

