// ########################################################################### // dependency on reg.js reg.importAll(); // ########################################################################### // ARRAY COMPATIBILITY FUNCTIONS FOR JavaScript 1.6 (function(){ var ap = Array.prototype; /** // create a new array with some items filtered out foo = [1,2,3,4,5]; bar = foo.filter(function(x){return x%2==0;}); // bar now equals [2,4] */ if (!ap.filter) { ap.filter = function(fun) { var len = this.length >>> 0; if (typeof fun != "function") { throw new TypeError(); } var res = new Array(); var thisp = arguments[1]; for (var i=0; i>> 0; if (typeof fun != "function") { throw new TypeError(); } var thisp = arguments[1]; for (var i=0; i>> 0; if (typeof fun != "function") { throw new TypeError(); } var thisp = arguments[1]; for (var i=0; i>> 0; if (typeof fun != "function") { throw new TypeError(); } var res = new Array(len); var thisp = arguments[1]; for (var i=0; i>> 0; if (typeof fun != "function") { throw new TypeError(); } var thisp = arguments[1]; for (; i