Array.prototype.inArray = function (value,mode)
// Returns true or index if the passed value is found in the
// array.  Returns false if it is not.
{
    var i;
    for (i=0; i < this.length; i++) {
        // Matches identical (===), not just similar (==).
        if (this[i] === value) {
            if(mode == 'where') { return i; } else { return true; }
        }
    }
    return false;
};
