var msf={};
(function(){function g(b){return(10>b?"0":"")+b}function l(b){var b=b.toLowerCase(),a={name:"en-GB",d:"dd/MM/yyyy",D:"dd MMMM yyyy",t:"HH:mm",T:"HH:mm:ss",M:"d MMMM",Y:"MMMM yyyy",s:"yyyy-MM-ddTHH:mm:ss",_m:"January February March April May June July August September October November December".split(" "),_d:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),_r:".",_t:",",_c:"\u00a3#,0.00",_ct:",",_cr:"."};"sv"==b.substr(0,2)?(a.name="sv-SE",a.d="yyyy-MM-dd",a.D="den dd MMMM yyyy",a._m=
"januari februari mars april maj juni juli augusti september oktober november december".split(" "),a._d="s\u00f6ndag m\u00e5ndag tisdag onsdag torsdag fredag l\u00f6rdag".split(" "),a._r=",",a._t=" ",a._ct=".",a._cr=",",a._c="#,0.00 kr"):"en-gb"!=b&&(a.name="en-US",a.t="hh:mm tt",a.T="hh:mm:ss tt",a.d="MM/dd/yyyy",a.D="MMMM dd, yyyy",a.Y="MMMM, yyyy",a._c="$#,0.00");a.f=a.D+" "+a.t;a.F=a.D+" "+a.T;a.g=a.d+" "+a.t;a.G=a.d+" "+a.T;return a}Number.prototype.__Format=function(b){var a=Number(this);if("X"==
b)return Math.round(a).toString(16).toUpperCase();if("x"==b)return Math.round(a).toString(16);var f=msf.LC._t,g=msf.LC._r,h=b?b.toLowerCase():null;null===h||"g"==h?b="0.################":"n"==h?b="#,0.################":"c"==h?(b=msf.LC._c,g=msf.LC._cr,f=msf.LC._ct):"f"==h&&(b="0.00");-1!==b.indexOf(",.")&&(a/=1E3);-1!==b.indexOf("%")&&(a*=100);b=b.split(";");0>a&&1<b.length?(a*=-1,b=b[1]):b=b[!a&&2<b.length?2:0];var h=function(a){for(var b=0;b<a.length;b++)m.push(a.charAt(b)),1<n&&1==n--%3&&m.push(f)},
d=0,k=-1,e=-1,n=0,e=0,p=-1,i=!1,l=!0,m=[],j,c;for(c=0;c<b.length;c++){j=b.charAt(c);if("0"==j||"#"==j)e+=i,"0"==j&&(i?p=e:0>k&&(k=d)),d+=!i;i=i||"."==j}k=0>k?1:d-k;0>a&&m.push("-");a=(Math.round(Math.abs(a)*Math.pow(10,e))/Math.pow(10,e)).toString();e=a.indexOf(".");e=0>e?a.length:e;c=e-d;b.match(/^[^\.]*[0#],[0#]/)&&(n=Math.max(e,k));for(d=0;d<b.length;d++)if(j=b.charAt(d),"#"==j||"0"==j){if(c<e)0<=c?(l&&h(a.substr(0,c)),h(a.charAt(c))):c>=e-k&&h("0"),l=!1;else if(0<p--||c<a.length)h(c>=a.length?
"0":a.charAt(c));c++}else"."==j?(a.length>++c||0<p)&&m.push(g):","!==j&&m.push(j);return m.join("")};Date.prototype.__Format=function(b){var a=this;1==b.length&&(b=msf.LC[b]);return b.replace(/(d{1,4}|M{1,4}|yyyy|yy|HH|H|hh|h|mm|m|ss|s|tt)/g,function(b){switch(b){case "dddd":return msf.LC._d[a.getDay()];case "ddd":return msf.LC._d[a.getDay()].substr(0,3);case "dd":return g(a.getDate());case "d":return a.getDate();case "MMMM":return msf.LC._m[a.getMonth()];case "MMM":return msf.LC._m[a.getMonth()].substr(0,
3);case "MM":return g(a.getMonth()+1);case "M":return a.getMonth()+1;case "yyyy":return a.getFullYear();case "yy":return a.getFullYear().toString().substr(2);case "HH":return g(a.getHours());case "hh":return g((a.getHours()-1)%12+1);case "H":return a.getHours();case "h":return(a.getHours()-1)%12+1;case "mm":return g(a.getMinutes());case "m":return a.getMinutes();case "ss":return g(a.getSeconds());case "s":return a.getSeconds();case "tt":return 12>a.getHours()?"AM":"PM";default:return""}})};String.__Format=
function(b,a,f,g){var h=arguments,d;return b.replace(/(\{*)\{((\d+)(\,(-?\d*))?(\:([^\}]*))?)\}/g,function(){var a=arguments;if(a[1]&&1==a[1].length%2)return a[0];if(void 0===(d=h[parseInt(a[3],10)+1]))throw"Missing argument";var b=d.__Format?d.__Format(a[7]):d.toString(),f=parseInt(a[5],10)||0,g=Math.abs(f)-b.length;if(0<g){for(var i=" ";i.length<g;)i+=" ";b=0<f?b+i:i+b}return a[1]+b}).replace(/\{\{/g,"{")};msf.LC=null;msf.setCulture=function(b){msf.LC=l(b)||l(b.substr(0,2))||l()};msf.setCulture(navigator.systemLanguage||
navigator.language||"en-US");var f=Date.prototype;f.format=f.format||f.__Format;f=Number.prototype;f.format=f.format||f.__Format;String.format=String.format||String.__Format})();
