.every()is a JavaScript 1.6 enhancement for the Array prototype. Firefox supports this method in Gecko 1.8b2 and later, and here is a quick replacement if it does not exist.
From MDC:
every - ECMA-262; , . , , , . Firefox SpiderMonkey.
if (!Array.prototype.every)
{
Array.prototype.every = function(fun /*, thisp*/)
{
var len = this.length >>> 0;
if (typeof fun != "function")
throw new TypeError();
var thisp = arguments[1];
for (var i = 0; i < len; i++)
{
if (i in this &&
!fun.call(thisp, this[i], i, this))
return false;
}
return true;
};
}