/* Array extra support (ver 1.0 / 2005-09-13) by ma.la http://ma.la/ Licence: GPL http://www.gnu.org/copyleft/gpl.html */ Array.prototype.forEach = function(callback,thisObject){ for(var i=0,len=this.length;i max) ? max : max-(fromIndex||0) || max; for(;i>=0;i--) if(searchElement === this[i]) return i; return -1 } Array.prototype.every = function(callback,thisObject){ for(var i=0,len=this.length;i [[1,2,3],[4,5]] Array.prototype.splitTo = function(num){ var per = Math.ceil(this.length / num); return this.splitter(function(v,i){return i%per==per-1}); }