Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
/* (C) Andrea Giammarchi - JSL 1.8+ - 2007/11/03Permission is hereby granted, free of charge, to any personobtaining a copy of this software and associated documentationfiles (the "Software"), to deal in the Software withoutrestriction, including without limitation the rights to use,copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom theSoftware is furnished to do so, subject to the followingconditions:The above copyright notice and this permission notice shall beincluded in all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIESOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE ANDNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHTHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISINGFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OROTHER DEALINGS IN THE SOFTWARE.*/(function(prototype){varkey, value, tmp;if(!Object.prototype.hasOwnProperty) Object.prototype.hasOwnProperty = function(key){varresult = false,value;key = String(key);if(/constructor|toString|valueOf/.test(key))result = Object.prototype[key] !== this[key];else{for(value in this){if(value === key){result = this === Object.prototype ? false : Object.prototype[key] !== this[key];break;}}};returnresult;};for(key in prototype){if(prototype.hasOwnProperty(key)){switch(typeof prototype[key]){case"function":if(!this[key])this[key] = prototype[key];break;case"object":for(value in prototype[key]){if(prototype[key].hasOwnProperty(value)){if(!this[key].prototype[value] || (prototype[key][value].test && prototype[key][value].test()))this[key].prototype[value] = prototype[key][value].callback;}};break;}};};try{prototype = key = value = undefined;}catch(e){this.undefined = prototype = key = value = tmp;};/*@cc_on(function(callback){this.setTimeout = callback(this.setTimeout);this.setInterval = callback(this.setInterval);})(function(value){returnfunction(callback, i){vartmp = Array.prototype.slice.call(arguments, 2);if(typeof callback != "function")callback = new Function(callback);returnvalue(function(){callback.apply(this, tmp);}, i);};});XMLHttpRequest = (function(XMLHttpRequest){function init(XMLHttpRequest){if(!XMLHttpRequest){vartmp = ["MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP", "Microsoft.XMLHTTP"];while(!XMLHttpRequest && tmp.length){try{XMLHttpRequest = new ActiveXObject(tmp.shift())}catch(e){}};}elseXMLHttpRequest = new XMLHttpRequest;returnXMLHttpRequest;};returnfunction(){varObject = this;(this["class"] = init(XMLHttpRequest)).onreadystatechange = function(){varXMLHttpRequest = Object["class"];if(Object["synchronized"]()){Object.responseText = XMLHttpRequest.responseText;Object.responseXML = XMLHttpRequest.responseXML;Object.status = XMLHttpRequest.status;Object.statusText = XMLHttpRequest.statusText;};if(Object.onreadystatechange)Object.onreadystatechange.call(Object.onreadystatechange);};};})(this.XMLHttpRequest);XMLHttpRequest.prototype = {abort:function(){this["class"].abort();},getAllResponseHeaders:function(){returnthis["synchronized"]() ? this["class"].getAllResponseHeaders() : [];},getResponseHeader:function(key){returnthis["synchronized"]() ? this["class"].getResponseHeader(key) : null;},open:function(){this["class"].open(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4]);},send:function(value){this["class"].send(value || null);},setRequestHeader:function(key, value){returnthis["class"].setRequestHeader(key, value);},"synchronized":function(){return(this.readyState = this["class"].readyState) == 4;},readyState:0,status:0,responseText:"",statusText:"",responseXML:null};@*/})({Array:{every:{callback:function(callback){for(vari = 0,result = true,scope = arguments[1] || null,value = this instanceof Array;i < this.length && result;i++){if(value ? this.hasOwnProperty(i) : this[i] !== undefined)result = callback.call(scope, this[i], i, this);};returnresult;}},filter:{callback:function(callback){for(vari = 0,result = [],scope = arguments[1] || null,value = this instanceof Array;i < this.length;i++){if((value ? this.hasOwnProperty(i) : this[i] !== undefined) && callback.call(scope, this[i], i, this))result[result.length] = this[i];};returnresult;}},forEach:{callback:function(callback){for(vari = 0,scope = arguments[1] || null,value = this instanceof Array;i < this.length;i++){if(value ? this.hasOwnProperty(i) : this[i] !== undefined)callback.call(scope, this[i], i, this);};}},indexOf:{callback:function(value, i){for(varj = this.length,i = i < 0 ? i + j < 0 ? 0 : i + j : i || 0;i < j && this[i] !== value;i++);returnj <= i ? -1 : i;}},lastIndexOf:{callback:function(value, i){returnArray.prototype.slice.call(this).reverse().indexOf(value, i);}},map:{callback:function(callback){for(vari = 0,result = new Array(this.length),scope = arguments[1] || null,value = this instanceof Array;i < this.length;i++){if(value ? this.hasOwnProperty(i) : this[i] !== undefined)result[i] = callback.call(scope, this[i], i, this);};returnresult;}},pop:{callback:function(callback){varlength = this.length,result;if(length)result = this[--length];this.length = length;returnresult;}},push:{callback:function(){for(vari = 0;i < arguments.length;i++)this[this.length] = arguments[i];returnthis.length;}},shift:{callback:function(){varresult = Array.prototype.reverse.call(this).pop();Array.prototype.reverse.call(this);returnresult;}},some:{callback:function(callback){for(vari = 0,result = false,scope = arguments[1] || null,value = this instanceof Array;i < this.length && !result;i++){if(value ? this.hasOwnProperty(i) : this[i] !== undefined)result = callback.call(scope, this[i], i, this);};returnresult;}},splice:{callback:function(){varresult = [],tmp = [],i = 0, j = this.length, k = 0, length = arguments.length;switch(length) {case0:break;case1:arguments[1] = !length++ || this.length - arguments[0];default:k = arguments[0] + arguments[1];for(; i < j; i++){if(i < arguments[0] || i >= k){if(i === k && length > 2){for(i = 2; i < length; i++)tmp[tmp.length] = arguments[i];i = k;};tmp[tmp.length] = this[i];}elseresult[result.length] = this[i];};for(i = 0, j = tmp.length; i < j; i++)this[i] = tmp[i];this.length = i;break;};returnresult;}},unshift:{test:function(){varArray = [4,5];return!(Array.unshift(1,2,3) === 5 && Array.join("-") === "1-2-3-4-5");},callback:function(){varlength = arguments.length;Array.prototype.reverse.call(this);while(length--)this[this.length] = arguments[length];returnArray.prototype.reverse.call(this).length}}},Date:{getYear:{test:function(){returnString((new Date).getYear()).length === 4;},callback:function(){returnthis.getFullYear() - 1900;}},setYear:{test:function(){returnString((new Date).getYear()).length === 4;},callback:function(setYear){returnthis.setFullYear(setYear + 1900);}}},Function:{apply:{callback:function(scope, arguments){vari = arguments ? arguments.length : 0,result = new Array(i),call;switch(typeof scope){case"boolean":scope = new Boolean(scope);break;case"number":scope = new Number(scope);break;case"string":scope = new String(scope);break;default:scope = scope || (function(){return this})();break;};do call = "*" + Math.random();while(scope[call] !== undefined);while(i--)result[i] = "arguments[" + i + "]";scope[call] = this;result = eval("scope[call](" + result.join(",") + ")");try{delete scope[call]}catch(e){scope[call] = undefined};returnresult;}},call:{callback:function(scope){for(vari = 1, result = []; i < arguments.length; i++)result[result.length] = arguments[i];returnthis.apply(scope, result);}}},Number:{toFixed:{callback:function(max){varresult = Math.pow(10, parseInt(max)),tmp = new Array(2);result = String(Math.round(this * result) / result);if(max > 0){tmp = result.split(".");tmp[1] = (tmp[1] || "") + new Array(++max - (tmp[1] ? tmp[1].length : 0)).join("0");result = tmp.join(".");};returnresult;}}},String:{lastIndexOf:{callback:function(tmp, i){varvalue = String(this),result = value.split("").reverse().join("").indexOf(String(tmp).split("").reverse().join(""), i || 0);returnresult < 0 ? result : value.length - result;}},replace:{test:function(){return"aa".replace(/a/g,function(a,b){return b + " "}) != "0 1 ";},callback:(function(replace){return function(key, callback){varvalue = String(this),result = value;if(typeof callback != "function")result = replace.apply(value, arguments);else {vark = !/\/.*g.*$/.test(key),i = 0,tmp = [];while(arguments = key.exec(result)){tmp[tmp.length] = result.substr(0, arguments.index);tmp[tmp.length] = callback.apply(null, arguments.concat([value.indexOf(arguments[0], i), value]));result = value.substring(i += (arguments.index + arguments[0].length));if(k)break;};result = tmp.join("") + result;};returnresult}})(String.prototype.replace)}},decodeURIComponent:function(value){returnString(value).replace(/(%F[0-9A-F]%E[0-9A-F]%[A-B][0-9A-F]%[8-9A-B][0-9A-F])|(%E[0-9A-F]%[A-B][0-9A-F]%[8-9A-B][0-9A-F])|(%[C-D][0-9A-F]%[8-9A-B][0-9A-F])|(%[0-9A-F]{2})/g,function(value, key, k, j, i){return String.fromCharCode(i ? parseInt(i.substr(1, 2), 16) :j ? ((parseInt(j.substr(1, 2), 16) - 0xC0) << 6) + (parseInt(j.substr(4, 2), 16) - 0x80) :k ? ((parseInt(k.substr(1, 2), 16) - 0xE0) << 12) + ((parseInt(k.substr(4, 2), 16) - 0x80) << 6) + (parseInt(k.substr(7, 2), 16) - 0x80) :((parseInt(key.substr(1, 2), 16) - 0xF0) << 18) + ((parseInt(key.substr(4, 2), 16) - 0x80) << 12) + ((parseInt(key.substr(7, 2), 16) - 0x80) << 6) + (parseInt(key.substr(10, 2), 16) - 0x80))});},encodeURIComponent:function(value){function charCodeAt(i, length){varresult = i.toString(16).toUpperCase();length = (length || 2) - result.length;returnlength == 0 ? result : new Array(++length).join("0").concat(result);};returnString(value).replace(/[\x00-\x20]|[\x25|\x3C|\x3E|\x5B|\x5D|\x5E|\x60|\x7F]|[\x7B-\x7D]|[\x80-\uFFFF]/g, function(value){vari = value.charCodeAt(0),tmp = [];if(i < 128)tmp[tmp.length] = charCodeAt(i);else if(i < 2048){tmp[tmp.length] = charCodeAt(0xC0 + (i >> 6));tmp[tmp.length] = charCodeAt(0x80 + (i & 0x3F));}else if(i < 65536){tmp[tmp.length] = charCodeAt(0xE0 + (i >> 12));tmp[tmp.length] = charCodeAt(0x80 + (i >> 6 & 0x3F));tmp[tmp.length] = charCodeAt(0x80 + (i & 0x3F));}else{tmp[tmp.length] = charCodeAt(0xF0 + (i >> 18));tmp[tmp.length] = charCodeAt(0x80 + (i >> 12 & 0x3F));tmp[tmp.length] = charCodeAt(0x80 + (i >> 6 & 0x3F));tmp[tmp.length] = charCodeAt(0x80 + (i & 0x3F));};return"%" + tmp.join("%");}).replace(/[\x23|\x24|\x26|\x2B|\x2C|\x2F|\x3A|\x3B|\x3D|\x3F|\x40]/g, function(value){return"%" + charCodeAt(value.charCodeAt(0));}).replace(/"/g, "%22").replace(/\\/g, "%5C");},execScript:function(value){vartmp = document.createElement("script");tmp.type = "text/javascript";tmp.appendChild(document.createTextNode(value));with(document.documentElement)removeChild(appendChild(tmp));}});