/**
 *
 * A list of javascript utility functions
 *
 **/


/**
 * Array.prototype.in_array extends the prototype definition of the Array Object 
 * adding a method that works similar the PHP in_array function.
 *
 * USAGE:
 * var v_array = [ 5, 10, 15, 20, 25];
 * document.writeln(v_array.in_array(10));  // true
 * document.writeln(v_array.in_array(11));  // false
 **/

Array.prototype.in_array = function(p_val) {
    for(var i = 0, l = this.length; i < l; i++) {
        if(this[i] == p_val) {
            return true;
        }
    }
    return false;
}


