﻿String.prototype.trimStart=function(a){if(0==this.length)return this;for(var a=a?a:" ",c=0;this.charAt(c)==a&&c<this.length;c++);return this.substring(c)};String.prototype.trimEnd=function(a){for(var a=a?a:" ",c=this.length-1;0<=c&&this.charAt(c)==a;c--);return this.substring(0,c+1)};String.prototype.trim=function(a){return this.trimStart(a).trimEnd(a)};var JSON=JSON||{};
JSON.stringify=JSON.stringify||function(a){var c=typeof a;if("object"!=c||null===a)return"string"==c&&(a='"'+a+'"'),""+a;var d,b,f=[],e=a&&a.constructor==Array;for(d in a)b=a[d],c=typeof b,"string"==c?b='"'+b+'"':"object"==c&&null!==b&&(b=JSON.stringify(b)),f.push((e?"":'"'+d+'":')+(""+b));return(e?"[":"{")+(""+f)+(e?"]":"}")};
if(!Array.prototype.indexOf)Array.prototype.indexOf=function(a,c){var d=this.length>>>0,b=Number(c)||0,b=0>b?Math.ceil(b):Math.floor(b);for(0>b&&(b+=d);b<d;b++)if(b in this&&this[b]===a)return b;return-1};$.fn.selectRange=function(a,c){return this.each(function(){if(this.setSelectionRange)this.focus(),this.setSelectionRange(a,c);else if(this.createTextRange){var d=this.createTextRange();d.collapse(!0);d.moveEnd("character",c);d.moveStart("character",a);d.select()}})};
function Hash(){this.length=0;this.items={};for(var a=0;a<arguments.length;a+=2)"undefined"!=typeof arguments[a+1]&&(this.items[arguments[a]]=arguments[a+1],this.length++);this.removeItem=function(a){var d;"undefined"!=typeof this.items[a]&&(this.length--,d=this.items[a],delete this.items[a]);return d};this.getItem=function(a){return this.items[a]};this.setItem=function(a,d){var b;"undefined"!=typeof d&&("undefined"==typeof this.items[a]?this.length++:b=this.items[a],this.items[a]=d);return b};this.hasItem=
function(a){return"undefined"!=typeof this.items[a]};this.clear=function(){for(var a in this.items)delete this.items[a];this.length=0}}function convertToBoolean(a){return"true"===a};
