/* ------------------------------------------------------------------------------------------------ */
/*																									*/
/* Designed By Thommy Morgan																		*/
/* Owner and Founder of WebSpot.me																	*/
/* Copyright 2011 Thommy Morgan All Rights Reserved													*/
/*																									*/
/* ------------------------------------------------------------------------------------------------ */




Array.prototype.remove = function(from, to) {
	if(this.length == 0) return new Array();
	var rest = this.slice((to || from) + 1 || this.length);
	this.length = from < 0 ? this.length + from : from;
	return this.push.apply(this, rest);
};


Array.prototype.sum = function() {
	var temp = 0;
	for(var i = 0; i < this.length; i++)
		temp += this[i];
	return temp;
};


Array.prototype.reset = function(value) {
	var a = new Array();
	for(var i = 0; i < this.length; i++)
		a.push(value);
	return a;
};


Array.prototype.boolString = function () {
	var choice = "";
	for(var i = 0; i < this.length; i++)
		choice += (this[i] == true) ? "1" : "0";
	return choice;
}


Array.prototype.contains = function(ob) {
	var i = this.length;
	while (i--) if (this[i] === ob) return true;
	return false;
}
