/****************************************
 *            PROTOTYPES                *
 ****************************************/

Array.prototype.bottom = function()
// FIFO method, removes and returns first element
{
	var tmp = this[0];

	this.splice(0,1);

	return tmp;
}

Array.prototype.inArray = function (value)
// Returns index if the passed value is found in the
// array.  Returns -1 if it is not.
{
    var i;
    for (i=0; i < this.length; i++) {

        if (this[i] === value) {
            return i;
        }
    }
    return -1;
};
