Get the maximum and minimum values in an array.
//get max value in an array
//got this from http://addictedtonew.com/archives/482/javascript-array-max-and-equal-height-columns/
if(!Array.prototype.max) Array.prototype.max = function max(){ return Math.max.apply({}, this); };
//get minimum value in an array
if(!Array.prototype.min) Array.prototype.min = function min(){ return Math.min.apply({}, this); };