function isUndefined(a){return(a===undefined)}function isNull(a){return(a===null)}function isNullOrUndefined(a){return(a===null)||(a===undefined)}window.__scriptsharp="0.5.1.0";function $(a){return document.getElementById(a)}document.getElementsBySelector=function(b,h){var k=h?h.getElementsByTagName("*"):document.getElementsByTagName("*");var f=[];var j=document.getElementsBySelector.styleSheet;if(!j){var c=document.createElement("style");c.type="text/css";document.getElementsByTagName("head")[0].appendChild(c);j=c.styleSheet||c.sheet;document.getElementsBySelector.styleSheet=j}if(window.navigator.userAgent.indexOf("MSIE")>=0){j.addRule(b,"ssCssMatch:true",0);for(var d=k.length-1;d>=0;d--){var e=k[d];if(e.currentStyle.ssCssMatch){f[f.length]=e}}j.removeRule(0)}else{var a=document.getElementsBySelector.matchValue;if(!a){a=(window.navigator.userAgent.indexOf("Opera")>=0)?'"ssCssMatch"':"ssCssMatch 1";document.getElementsBySelector.matchValue=a}j.insertRule(b+" { counter-increment: ssCssMatch }",0);var g=document.defaultView;for(var d=k.length-1;d>=0;d--){var e=k[d];if(g.getComputedStyle(e,null).counterIncrement===a){f[f.length]=e}}j.deleteRule(0)}if(f.length>1){f.reverse()}return f};Object.__typeName="Object";Object.__baseType=null;Object.parse=function(s){return eval(s)};Object.getKeyCount=function(b){var a=0;for(var c in b){a++}return a};Object.clearKeys=function(a){for(var b in a){delete a[b]}};Object.keyExists=function(b,a){return b[a]!==undefined};Function.parse=function(s){if(!Function._parseCache){Function._parseCache={}}var fn=Function._parseCache[s];if(!fn){try{eval("fn = "+s);if(typeof(fn)!="function"){fn=null}else{Function._parseCache[s]=fn}}catch(ex){}}return fn};Function.prototype.invoke=function(){this.apply(null,arguments)};Boolean.__typeName="Boolean";Boolean.parse=function(a){return(a.toLowerCase()=="true")};Number.__typeName="Number";Number.parse=function(a){if(!a||!a.length){return 0}if((a.indexOf(".")>=0)||(a.indexOf("e")>=0)||a.endsWith("f")||a.endsWith("F")){return parseFloat(a)}return parseInt(a)};Number.prototype.format=function(b,a){if(isNullOrUndefined(b)||(b.length==0)||(b=="i")){if(a){return this.toLocaleString()}else{return this.toString()}}return this._netFormat(b,a)};Number._commaFormat=function(d,c,h,o){var e=null;var j=d.indexOf(h);if(j>0){e=d.substr(j);d=d.substr(0,j)}var f=d.startsWith("-");if(f){d=d.substr(1)}var m=0;var l=c[m];if(d.length<l){return e?d+e:d}var i=d.length;var n="";var g=false;while(!g){var b=l;var k=i-b;if(k<0){l+=k;b+=k;k=0;g=true}if(!b){break}var a=d.substr(k,b);if(n.length){n=a+o+n}else{n=a}i-=b;if(m<c.length-1){m++;l=c[m]}}if(f){n="-"+n}return e?n+e:n};Number.prototype._netFormat=function(g,e){var f=e?CultureInfo.Current.numberFormat:CultureInfo.Neutral.numberFormat;var d="";var b=-1;if(g.length>1){b=parseInt(g.substr(1))}var a=g.charAt(0);switch(a){case"d":case"D":d=parseInt(Math.abs(this)).toString();if(b!=-1){d=d.padLeft(b,"0")}if(this<0){d="-"+d}break;case"x":case"X":d=parseInt(Math.abs(this)).toString(16);if(a=="X"){d=d.toUpperCase()}if(b!=-1){d=d.padLeft(b,"0")}break;case"e":case"E":if(b==-1){d=this.toExponential()}else{d=this.toExponential(b)}if(a=="E"){d=d.toUpperCase()}break;case"f":case"F":case"n":case"N":if(b==-1){b=f.numberDecimalDigits}d=this.toFixed(b).toString();if(b&&(f.numberDecimalSeparator!=".")){var c=d.indexOf(".");d=d.substr(0,c)+f.numberDecimalSeparator+d.substr(c+1)}if((a=="n")||(a=="N")){d=Number._commaFormat(d,f.numberGroupSizes,f.numberDecimalSeparator,f.numberGroupSeparator)}break;case"c":case"C":if(b==-1){b=f.currencyDecimalDigits}d=Math.abs(this).toFixed(b).toString();if(b&&(f.currencyDecimalSeparator!=".")){var c=d.indexOf(".");d=d.substr(0,c)+f.currencyDecimalSeparator+d.substr(c+1)}d=Number._commaFormat(d,f.currencyGroupSizes,f.currencyDecimalSeparator,f.currencyGroupSeparator);if(this<0){d=String.format(f.currencyNegativePattern,d)}else{d=String.format(f.currencyPositivePattern,d)}break;case"p":case"P":if(b==-1){b=f.percentDecimalDigits}d=(Math.abs(this)*100).toFixed(b).toString();if(b&&(f.percentDecimalSeparator!=".")){var c=d.indexOf(".");d=d.substr(0,c)+f.percentDecimalSeparator+d.substr(c+1)}d=Number._commaFormat(d,f.percentGroupSizes,f.percentDecimalSeparator,f.percentGroupSeparator);if(this<0){d=String.format(f.percentNegativePattern,d)}else{d=String.format(f.percentPositivePattern,d)}break}return d};Math.truncate=function(a){return(a>=0)?Math.floor(a):Math.ceil(a)};String.__typeName="String";String.Empty="";String.compare=function(c,b,a){if(a){if(c){c=c.toUpperCase()}if(b){b=b.toUpperCase()}}c=c||"";b=b||"";if(c==b){return 0}if(c<b){return -1}return 1};String.prototype.compareTo=function(b,a){return String.compare(this,b,a)};String.prototype.endsWith=function(a){if(!a.length){return true}if(a.length>this.length){return false}return(this.substr(this.length-a.length)==a)};String.equals=function(c,b,a){return String.compare(c,b,a)==0};String._format=function(c,a,b){if(!String._formatRE){String._formatRE=/(\{[^\}^\{]+\})/g}return c.replace(String._formatRE,function(i,d){var e=parseInt(d.substr(1));var h=a[e+1];if(isNullOrUndefined(h)){return""}if(h.format){var f=null;var g=d.indexOf(":");if(g>0){f=d.substring(g+1,d.length-1)}return h.format.call(h,f,b)}else{if(b){return h.toLocaleString()}return h.toString()}})};String.format=function(a){return String._format(a,arguments,false)};String.fromChar=function(c,d){var b=c;for(var a=1;a<d;a++){b+=c}return b};String.prototype.htmlDecode=function(){if(!String._htmlDecRE){String._htmlDecMap={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"'};String._htmlDecRE=/(&amp;|&lt;|&gt;|&quot;)/gi}var a=this;a=a.replace(String._htmlDecRE,function(c,b){return String._htmlDecMap[b]});return a};String.prototype.htmlEncode=function(){if(!String._htmlEncRE){String._htmlEncMap={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};String._htmlEncRE=/([&<>"])/g}var a=this;if(String._htmlEncRE.test(a)){a=a.replace(String._htmlEncRE,function(c,b){return String._htmlEncMap[b]})}return a};String.prototype.indexOfAny=function(d,f,c){var b=this.length;if(!b){return -1}f=f||0;c=c||b;var e=f+c-1;if(e>=b){e=b-1}for(var a=f;a<=e;a++){if(d.indexOf(this.charAt(a))>=0){return a}}return -1};String.prototype.insert=function(b,d){if(!d){return this}if(!b){return d+this}var c=this.substr(0,b);var a=this.substr(b);return c+d+a};String.isNullOrEmpty=function(a){return !a||!a.length};String.prototype.lastIndexOfAny=function(d,f,c){var b=this.length;if(!b){return -1}f=f||b-1;c=c||b;var e=f-c+1;if(e<0){e=0}for(var a=f;a>=e;a--){if(d.indexOf(this.charAt(a))>=0){return a}}return -1};String.localeFormat=function(a){return String._format(a,arguments,true)};String.prototype.padLeft=function(a,b){if(this.length<a){b=b||" ";return String.fromChar(b,a-this.length)+this}return this};String.prototype.padRight=function(a,b){if(this.length<a){b=b||" ";return this+String.fromChar(b,a-this.length)}return this};String.prototype.quote=function(){if(!String._quoteMap){String._quoteMap={"\\":"\\\\","'":"\\'",'"':'\\"',"\r":"\\r","\n":"\\n","\t":"\\t","\f":"\\f","\b":"\\b"}}if(!String._quoteRE||!RegExp._cacheable){String._quoteRE=new RegExp("(['\"\\\\\x00-\x1F\x7F-\uFFFF])","g")}var a=this;if(String._quoteSkipTest||String._quoteRE.test(a)){a=this.replace(String._quoteRE,function(d,b){var e=String._quoteMap[b];if(e){return e}e=b.charCodeAt(0);return"\\u"+e.toString(16).toUpperCase().padLeft(4,"0")})}return'"'+a+'"'};String.prototype.remove=function(a,b){if(!b||((a+b)>this.length)){return this.substr(0,a)}return this.substr(0,a)+this.substr(a+b)};String.prototype._replace=String.prototype.replace;String.prototype.replace=function(a,b){if(a.constructor==String){b=b||"";return this.split(a).join(b)}return String.prototype._replace.call(this,a,b)};String.prototype.startsWith=function(a){if(!a.length){return true}if(a.length>this.length){return false}return(this.substr(0,a.length)==a)};String.prototype.trim=function(){return this.trimEnd().trimStart()};String.prototype.trimEnd=function(){return this.replace(/\s*$/,"")};String.prototype.trimStart=function(){return this.replace(/^\s*/,"")};String.prototype.unquote=function(){return eval("("+this+")")};Array.__typeName="Array";Array.prototype.add=function(a){this[this.length]=a};Array.prototype.addRange=function(a){if(!a){return}var c=a.length;for(var b=0;b<c;b++){this[this.length]=a[b]}};Array.prototype.aggregate=function(a,d){var c=this.length;for(var b=0;b<c;b++){a=d(a,this[b],b,this)}return a};Array.prototype.clear=function(){if(this.length>0){this.splice(0,this.length)}};Array.prototype.clone=function(){var b=this.length;var c=new Array(b);for(var a=0;a<b;a++){c[a]=this[a]}return c};Array.prototype.contains=function(b){var a=this.indexOf(b);return(a>=0)};Array.prototype.dequeue=function(){return this.shift()};Array.prototype.enqueue=function(a){this._queue=true;this.push(a)};Array.prototype.peek=function(){if(this.length){var a=this._queue?0:this.length-1;return this[a]}return null};if(!Array.prototype.every){Array.prototype.every=function(b){for(var a=this.length-1;a>=0;a--){if(!b(this[a],a,this)){return false}}return true}}Array.prototype.extract=function(a,b){if(!b){return this.slice(a)}return this.slice(a,a+b)};if(!Array.prototype.filter){Array.prototype.filter=function(c){var a=[];for(var b=0;b<this.length;b++){if(c(this[b],b,this)){a.add(this[b])}}return a}}if(!Array.prototype.forEach){Array.prototype.forEach=function(b){for(var a=0;a<this.length;a++){b(this[a],a,this)}}}Array.prototype.groupBy=function(g){var f=this.length;var a=[];var e={};for(var c=0;c<f;c++){var d=g(this[c],c);if(String.isNullOrEmpty(d)){continue}var b=e[d];if(!b){b=[];b.key=d;e[d]=b;a.add(b)}b.add(this[c])}return a};Array.prototype.index=function(e){var d=this.length;var a={};for(var b=0;b<d;b++){var c=e(this[b],b);if(String.isNullOrEmpty(c)){continue}a[c]=this[b]}return a};Array.prototype.indexOf=function(c){var b=this.length;if(b){for(var a=0;a<b;a++){if(this[a]===c){return a}}}return -1};Array.prototype.insert=function(a,b){this.splice(a,0,b)};Array.prototype.insertRange=function(b,a){this.splice(b,0,a)};if(!Array.prototype.map){Array.prototype.map=function(c){var a=new Array(this.length);for(var b=this.length-1;b>=0;b--){a[b]=c(this[b],b,this)}return a}}Array.parse=function(s){return eval("("+s+")")};Array.prototype.remove=function(b){var a=this.indexOf(b);if(a>=0){this.splice(a,1);return true}return false};Array.prototype.removeAt=function(a){return this.splice(a,1)[0]};Array.prototype.removeRange=function(a,b){return this.splice(a,b)};if(!Array.prototype.some){Array.prototype.some=function(b){for(var a=this.length-1;a>=0;a--){if(b(this[a],a,this)){return true}}return false}}RegExp.__typeName="RegExp";RegExp.parse=function(c){if(c.startsWith("/")){var b=c.lastIndexOf("/");if(b>1){var d=c.substring(1,b);var a=c.substr(b+1);return new RegExp(d,a)}}return null};Date.__typeName="Date";Date.get_now=function(){return new Date()};Date.get_today=function(){var a=new Date();return new Date(a.getFullYear(),a.getMonth(),a.getDate())};Date.prototype.format=function(b,a){if(isNullOrUndefined(b)||(b.length==0)||(b=="i")){if(a){return this.toLocaleString()}else{return this.toString()}}if(b=="id"){if(a){return this.toLocaleDateString()}else{return this.toDateString()}}if(b=="it"){if(a){return this.toLocaleTimeString()}else{return this.toTimeString()}}return this._netFormat(b,a)};Date.prototype._netFormat=function(h,f){var k=f?CultureInfo.Current.dateFormat:CultureInfo.Neutral.dateFormat;var i=false;if(h.length==1){switch(h){case"f":h=k.longDatePattern+" "+k.shortTimePattern;case"F":h=k.dateTimePattern;break;case"d":h=k.shortDatePattern;break;case"D":h=k.longDatePattern;break;case"t":h=k.shortTimePattern;break;case"T":h=k.longTimePattern;break;case"g":h=k.shortDatePattern+" "+k.shortTimePattern;break;case"G":h=k.shortDatePattern+" "+k.longTimePattern;break;case"R":case"r":h=k.gmtDateTimePattern;i=true;break;case"u":h=k.universalDateTimePattern;i=true;break;case"U":h=k.dateTimePattern;i=true;break;case"s":h=k.sortableDateTimePattern;break}}if(h.charAt(0)=="%"){h=h.substr(1)}if(!Date._formatRE){Date._formatRE=/dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z/g}var j=Date._formatRE;var g=new StringBuilder();var b=this;if(i){b=new Date(Date.UTC(b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate(),b.getUTCHours(),b.getUTCMinutes(),b.getUTCSeconds(),b.getUTCMilliseconds()))}j.lastIndex=0;while(true){var e=j.lastIndex;var c=j.exec(h);g.append(h.slice(e,c?c.index:h.length));if(!c){break}var d=c[0];var a=d;switch(d){case"dddd":a=k.dayNames[b.getDay()];break;case"ddd":a=k.shortDayNames[b.getDay()];break;case"dd":a=b.getDate().toString().padLeft(2,"0");break;case"d":a=b.getDate();break;case"MMMM":a=k.monthNames[b.getMonth()];break;case"MMM":a=k.shortMonthNames[b.getMonth()];break;case"MM":a=(b.getMonth()+1).toString().padLeft(2,"0");break;case"M":a=(b.getMonth()+1);break;case"yyyy":a=b.getFullYear();break;case"yy":a=(b.getFullYear()%100).toString().padLeft(2,"0");break;case"y":a=(b.getFullYear()%100);break;case"h":case"hh":a=b.getHours()%12;if(!a){a="12"}else{if(d=="hh"){a=a.toString().padLeft(2,"0")}}break;case"HH":a=b.getHours().toString().padLeft(2,"0");break;case"H":a=b.getHours();break;case"mm":a=b.getMinutes().toString().padLeft(2,"0");break;case"m":a=b.getMinutes();break;case"ss":a=b.getSeconds().toString().padLeft(2,"0");break;case"s":a=b.getSeconds();break;case"t":case"tt":a=(b.getHours()<12)?k.amDesignator:k.pmDesignator;if(d=="t"){a=a.charAt(0)}break;case"fff":a=b.getMilliseconds().toString().padLeft(3,"0");break;case"ff":a=b.getMilliseconds().toString().padLeft(3).substr(0,2);break;case"f":a=b.getMilliseconds().toString().padLeft(3).charAt(0);break;case"z":a=b.getTimezoneOffset()/60;a=((a>=0)?"-":"+")+Math.floor(Math.abs(a));break;case"zz":case"zzz":a=b.getTimezoneOffset()/60;a=((a>=0)?"-":"+")+Math.floor(Math.abs(a)).toString().padLeft(2,"0");if(d=="zzz"){a+=k.timeSeparator+Math.abs(b.getTimezoneOffset()%60).toString().padLeft(2,"0")}break}g.append(a)}return g.toString()};Date._parse=Date.parse;Date.parse=function(a){return new Date(Date._parse(a))};Error.__typeName="Error";Error.create=function(c,a,b){var d=new Error(c);if(a){d.userData=a}if(b){d.innerException=b}return d};if(!Debug._fail){Debug._fail=function(message){Debug.writeln(message);eval("debugger;")}}Debug.assert=function(b,a){if(!b){a="Assert failed: "+a;if(confirm(a+"\r\n\r\nBreak into debugger?")){Debug._fail(a)}}};Debug._dumpCore=function(j,c,a,k,h){if(c===null){j.appendLine(k+a+": null");return}switch(typeof(c)){case"undefined":j.appendLine(k+a+": undefined");break;case"number":case"string":case"boolean":j.appendLine(k+a+": "+c);break;default:if(Date.isInstance(c)||RegExp.isInstance(c)){j.appendLine(k+a+": "+c);break}if(h.contains(c)){j.appendLine(k+a+": ...");break}h.add(c);var g=Type.getInstanceType(c);var m=g.get_fullName();var o=k+"  ";if(IArray.isInstance(c)){j.appendLine(k+a+": {"+m+"}");var b=c.getLength();for(var e=0;e<b;e++){Debug._dumpCore(j,c.getItem(e),"["+e+"]",o,h)}}else{if(c.tagName){j.appendLine(k+a+": <"+c.tagName+">");var d=c.attributes;for(var e=0;e<d.length;e++){var f=d[e].nodeValue;if(f){Debug._dumpCore(j,f,d[e].nodeName,o,h)}}}else{j.appendLine(k+a+": {"+m+"}");for(var l in c){var n=c[l];if(!Function.isInstance(n)){Debug._dumpCore(j,n,l,o,h)}}}}h.remove(c);break}};Debug.dump=function(b,a){if((!a||!a.length)&&(b!==null)){a=Type.getInstanceType(b).get_fullName()}if(!a||!a.length){return}var c=new StringBuilder();Debug._dumpCore(c,b,a,"",[]);Debug.writeLine(c.toString())};Debug.fail=function(a){Debug._fail(a)};Debug.inspect=function(b,a){var c=false;if(window.debugService){c=window.debugService.inspect(a,b)}if(!c){Debug.dump(b,a)}};Debug.writeLine=function(b){if(window.debugService){window.debugService.trace(b);return}Debug.writeln(b);var a=$("_traceTextBox");if(a){a.value=a.value+"\r\n"+b}};Debug.__typeName="Debug";var Type=Function;Type.__typeName="Type";var __Namespace=function(a){this.__typeName=a};__Namespace.prototype={__namespace:true,getName:function(){return this.__typeName}};Type.createNamespace=function(c){if(!window.__namespaces){window.__namespaces={}}if(!window.__rootNamespaces){window.__rootNamespaces=[]}if(window.__namespaces[c]){return}var e=window;var a=c.split(".");for(var d=0;d<a.length;d++){var b=a[d];var f=e[b];if(!f){e[b]=f=new __Namespace(a.slice(0,d+1).join("."));if(d==0){window.__rootNamespaces.add(f)}}e=f}window.__namespaces[c]=e};Type.prototype.createClass=function(a,c,d){this.prototype.constructor=this;this.__typeName=a;this.__class=true;this.__baseType=c||Object;if(c){this.__basePrototypePending=true}if(d){this.__interfaces=[];for(var b=2;b<arguments.length;b++){d=arguments[b];this.__interfaces.add(d)}}};Type.prototype.createInterface=function(a){this.__typeName=a;this.__interface=true};Type.prototype.createEnum=function(b,a){for(var c in this.prototype){this[c]=this.prototype[c]}this.__typeName=b;this.__enum=true;if(a){this.__flags=true}};Type.prototype.setupBase=function(){if(this.__basePrototypePending){var c=this.__baseType;if(c.__basePrototypePending){c.setupBase()}for(var b in c.prototype){var a=c.prototype[b];if(!this.prototype[b]){this.prototype[b]=a}}delete this.__basePrototypePending}};if(!Type.prototype.resolveInheritance){Type.prototype.resolveInheritance=Type.prototype.setupBase}Type.prototype.constructBase=function(a,b){if(this.__basePrototypePending){this.setupBase()}if(!b){this.__baseType.apply(a)}else{this.__baseType.apply(a,b)}};Type.prototype.callBase=function(b,d,c){var a=this.__baseType.prototype[d];if(!c){return a.apply(b)}else{return a.apply(b,c)}};Type.prototype.get_baseType=function(){return this.__baseType||null};Type.prototype.get_fullName=function(){return this.__typeName};Type.prototype.get_name=function(){var a=this.__typeName;var b=a.lastIndexOf(".");if(b>0){return a.substr(b+1)}return a};Type.prototype.isInstance=function(a){if(isNullOrUndefined(a)){return false}if((this==Object)||(a instanceof this)){return true}var b=Type.getInstanceType(a);return this.isAssignableFrom(b)};Type.prototype.isAssignableFrom=function(a){if((this==Object)||(this==a)){return true}if(this.__class){var b=a.__baseType;while(b){if(this==b){return true}b=b.__baseType}}else{if(this.__interface){var c=a.__interfaces;if(c&&c.contains(this)){return true}var b=a.__baseType;while(b){c=b.__interfaces;if(c&&c.contains(this)){return true}b=b.__baseType}}}return false};Type.isClass=function(a){return(a.__class==true)};Type.isEnum=function(a){return(a.__enum==true)};Type.isFlagsEnum=function(a){return((a.__enum==true)&&(a.__flags==true))};Type.isInterface=function(a){return(a.__interface==true)};Type.canCast=function(a,b){return b.isInstance(a)};Type.safeCast=function(a,b){if(b.isInstance(a)){return a}return null};Type.getInstanceType=function(a){var c=null;try{c=a.constructor}catch(b){}if(!c||!c.__typeName){c=Object}return c};Type.getType=function(typeName){if(!typeName){return null}if(!Type.__typeCache){Type.__typeCache={}}var type=Type.__typeCache[typeName];if(!type){type=eval(typeName);Type.__typeCache[typeName]=type}return type};Type.parse=function(a){return Type.getType(a)};var Enum=function(){};Enum.createClass("Enum");Enum.parse=function(a,l){var j=a.prototype;if(!a.__flags){for(var e in j){if(e===l){return j[e]}}}else{var c=l.split("|");var h=0;var g=true;for(var d=c.length-1;d>=0;d--){var b=c[d].trim();var k=false;for(var e in j){if(e===b){h|=j[e];k=true;break}}if(!k){g=false;break}}if(g){return h}}throw"Invalid Enumeration Value"};Enum.toString=function(a,d){var b=a.prototype;if(!a.__flags||(d===0)){for(var c in b){if(b[c]===d){return c}}throw"Invalid Enumeration Value"}else{var e=[];for(var c in b){if(b[c]&d){if(e.length){e.add(" | ")}e.add(c)}}if(!e.length){throw"Invalid Enumeration Value"}return e.join("")}};var Delegate=function(){};Delegate.createClass("Delegate");Delegate.Null=function(){};Delegate._create=function(a){var b=function(){if(a.length==2){return a[1].apply(a[0],arguments)}else{for(var c=0;c<a.length;c+=2){a[c+1].apply(a[c],arguments)}return null}};b.invoke=b;b._targets=a;return b};Delegate.create=function(a,b){if(!a){b.invoke=b;return b}return Delegate._create([a,b])};Delegate.combine=function(b,a){if(!b){if(!a._targets){return Delegate.create(null,a)}return a}if(!a){if(!b._targets){return Delegate.create(null,b)}return b}var d=b._targets?b._targets:[null,b];var c=a._targets?a._targets:[null,a];return Delegate._create(d.concat(c))};Delegate.remove=function(e,c){if(!e||(e===c)){return null}if(!c){return e}var a=e._targets;var b=null;var f;if(c._targets){b=c._targets[0];f=c._targets[1]}else{f=c}for(var d=0;d<a.length;d+=2){if((a[d]===b)&&(a[d+1]===f)){if(a.length==2){return null}a.splice(d,2);return Delegate._create(a)}}return e};Delegate.createExport=function(c,a){var b="__"+(new Date()).valueOf();Delegate[b]=function(){if(!a){Delegate.deleteExport(b)}c.apply(null,arguments)};return b};Delegate.deleteExport=function(a){if(Delegate[a]){delete Delegate[a]}};Delegate.clearExport=function(a){if(Delegate[a]){Delegate[a]=Delegate.Null}};var CultureInfo=function(c,b,a){this.name=c;this.numberFormat=b;this.dateFormat=a};CultureInfo.createClass("CultureInfo");CultureInfo.Neutral=new CultureInfo("en-US",{naNSymbol:"NaN",negativeSign:"-",positiveSign:"+",negativeInfinityText:"-Infinity",positiveInfinityText:"Infinity",percentSymbol:"%",percentGroupSizes:[3],percentDecimalDigits:2,percentDecimalSeparator:".",percentGroupSeparator:",",percentPositivePattern:"{0} %",percentNegativePattern:"-{0} %",currencySymbol:"$",currencyGroupSizes:[3],currencyDecimalDigits:2,currencyDecimalSeparator:".",currencyGroupSeparator:",",currencyNegativePattern:"(${0})",currencyPositivePattern:"${0}",numberGroupSizes:[3],numberDecimalDigits:2,numberDecimalSeparator:".",numberGroupSeparator:","},{amDesignator:"AM",pmDesignator:"PM",dateSeparator:"/",timeSeparator:":",gmtDateTimePattern:"ddd, dd MMM yyyy HH:mm:ss 'GMT'",universalDateTimePattern:"yyyy-MM-dd HH:mm:ssZ",sortableDateTimePattern:"yyyy-MM-ddTHH:mm:ss",dateTimePattern:"dddd, MMMM dd, yyyy h:mm:ss tt",longDatePattern:"dddd, MMMM dd, yyyy",shortDatePattern:"M/d/yyyy",longTimePattern:"h:mm:ss tt",shortTimePattern:"h:mm tt",firstDayOfWeek:0,dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],minimizedDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December",""],shortMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""]});CultureInfo.Current=CultureInfo.Neutral;var IArray=function(){};IArray.createInterface("IArray");var IEnumerator=function(){};IEnumerator.createInterface("IEnumerator");var IEnumerable=function(){};IEnumerable.createInterface("IEnumerable");var ArrayEnumerator=function(a){this._array=a;this._index=-1};ArrayEnumerator.prototype={get_current:function(){return this._array[this._index]},moveNext:function(){this._index++;return(this._index<this._array.length)},reset:function(){this._index=-1}};ArrayEnumerator.createClass("ArrayEnumerator",null,IEnumerator);Array.__interfaces=[IArray,IEnumerable];Array.prototype.getLength=function(){return this.length};Array.prototype.getItem=function(a){return this[a]};Array.prototype.getEnumerator=function(){return new ArrayEnumerator(this)};var IDisposable=function(){};IDisposable.createInterface("IDisposable");var IServiceProvider=function(){};IServiceProvider.createInterface("IServiceProvider");var IServiceContainer=function(){};IServiceContainer.createInterface("IServiceContainer");var StringBuilder=function(a){if((a!==undefined)&&(a!==null)){this._parts=[a]}else{this._parts=[]}};StringBuilder.prototype={get_isEmpty:function(){return(this._parts.length==0)},append:function(a){if((a!==undefined)&&(a!==null)){this._parts.add(a)}},appendLine:function(a){this.append(a);this.append("\r\n")},clear:function(){this._parts.clear()},toString:function(){return this._parts.join("")}};StringBuilder.createClass("StringBuilder");var EventArgs=function(){};EventArgs.createClass("EventArgs");EventArgs.Empty=new EventArgs();if(!window.XMLHttpRequest){window.XMLHttpRequest=function(){var b=["Msxml2.XMLHTTP","Microsoft.XMLHTTP"];for(var d=0;d<b.length;d++){try{var a=new ActiveXObject(b[d]);return a}catch(c){}}return null}}var XMLDocumentParser=function(){};XMLDocumentParser.createClass("XMLDocumentParser");XMLDocumentParser.parse=function(a){if(!window.DOMParser){var b=["Msxml2.DOMDocument.3.0","Msxml2.DOMDocument"];for(var d=0;d<b.length;d++){try{var f=new ActiveXObject(b[d]);f.async=false;f.loadXML(a);f.setProperty("SelectionLanguage","XPath");return f}catch(c){}}}else{try{var e=new DOMParser();return e.parseFromString(a,"text/xml")}catch(c){}}return null};var ScriptLoader=function ScriptLoader(a){Debug.assert((a)&&(a.length));this._scriptURLs=a;this._scriptLoadIndex=-1};ScriptLoader.prototype={_scriptURLs:null,_loadedHandler:null,_errorHandler:null,_isIE:false,_onLoadHandler:null,_onErrorHandler:null,_scriptLoadIndex:0,_scriptElements:null,_loadedScripts:0,_inError:false,_loaded:false,dispose:function(){if(this._scriptElements){for(var a=0;a<this._scriptElements.length;a++){var b=this._scriptElements[a];if(this._isIE){b.detachEvent("onreadystatechange",this._onLoadHandler)}else{b.detachEvent("onload",this._onLoadHandler);b.detachEvent("onerror",this._onErrorHandler)}}this._scriptElements=null}},load:function(a,d,e,b){Debug.assert(e);Debug.assert(b);this._loadedHandler=e;this._errorHandler=b;this._isIE=(window.navigator.userAgent.indexOf("MSIE")>=0);this._onLoadHandler=Delegate.create(this,this._onScriptLoad);if(!this._isIE){this._onErrorHandler=Delegate.create(this,this._onScriptError)}this._scriptElements=[];if(a){for(var c=0;c<this._scriptURLs.length;c++){this._loadScript(this._scriptURLs[c])}}else{this._scriptLoadIndex++;this._loadScript(this._scriptURLs[this._scriptLoadIndex])}if(d){window.setTimeout(Delegate.create(this,this._onScriptError),d)}},_loadScript:function(b){var a=document.createElement("SCRIPT");if(this._isIE){a.attachEvent("onreadystatechange",this._onLoadHandler)}else{a.readyState="complete";a.attachEvent("onload",this._onLoadHandler);a.attachEvent("onerror",this._onErrorHandler)}a.type="text/javascript";a.src=b;this._scriptElements.add(a);document.getElementsByTagName("HEAD")[0].appendChild(a)},_onScriptError:function(){if((!this._inError)&&(!this._loaded)){this._inError=true;this._errorHandler.invoke(this,EventArgs.Empty)}},_onScriptLoad:function(){if(this._inError){return}var a=window.event.srcElement;if(!a.readyState){a=window.event.currentTarget}if((a.readyState!="complete")&&(a.readyState!="loaded")){return}if(this._scriptLoadIndex!=-1){this._scriptLoadIndex++;if(this._scriptLoadIndex!=this._scriptURLs.length){this._loadScript(this._scriptURLs[this._scriptLoadIndex]);return}}else{this._loadedScripts++;if(this._loadedScripts!=this._scriptURLs.length){return}}this._loaded=true;this._loadedHandler.invoke(this,EventArgs.Empty)}};ScriptLoader.createClass("ScriptLoader",null,IDisposable);var ScriptHost=function ScriptHost(){};ScriptHost.get_isLoading=function(){return ScriptHost._loading};ScriptHost.add_load=function(a){if(ScriptHost._loaded){a.invoke(null,EventArgs.Empty)}else{ScriptHost._loadHandler=Delegate.combine(ScriptHost._loadHandler,a)}};ScriptHost.remove_load=function(a){ScriptHost._loadHandler=Delegate.remove(ScriptHost._loadHandler,a)};ScriptHost.add_unload=function(a){ScriptHost._unloadHandler=Delegate.combine(ScriptHost._unloadHandler,a)};ScriptHost.remove_unload=function(a){ScriptHost._unloadHandler=Delegate.remove(ScriptHost._unloadHandler,a)};ScriptHost.close=function(){if(ScriptHost._fxScripts){ScriptHost._fxScripts.dispose();ScriptHost._fxScripts=null}if(ScriptHost._coreScripts){ScriptHost._coreScripts.dispose();ScriptHost._coreScripts=null}if(ScriptHost._unloadHandler){ScriptHost._unloadHandler.invoke(null,EventArgs.Empty);ScriptHost._unloadHandler=null}if(ScriptHost._windowLoadHandler){window.detachEvent("onload",ScriptHost._windowLoadHandler);ScriptHost._windowLoadHandler=null}if(ScriptHost._windowUnloadHandler){window.detachEvent("onunload",ScriptHost._windowUnloadHandler);ScriptHost._windowUnloadHandler=null}};ScriptHost.initialize=function(b,a){if(!ScriptHost._initialized){ScriptHost._initialized=true;if(ScriptHost._windowLoadHandler){window.detachEvent("onload",ScriptHost._windowLoadHandler);ScriptHost._windowLoadHandler=null}if((b)&&(b.length)){ScriptHost._coreScripts=new ScriptLoader(b)}if((a)&&(a.length)){ScriptHost._fxScripts=new ScriptLoader(a)}if((!ScriptHost._coreScripts)&&(!ScriptHost._fxScripts)){ScriptHost._onLoaded()}else{ScriptHost._loadScripts()}}};ScriptHost._loadScripts=function(){ScriptHost._loading=true;if(ScriptHost._coreScripts){ScriptHost._coreScripts.load(false,20*1000,Delegate.create(null,ScriptHost._onScriptsCompleted),Delegate.create(null,ScriptHost._onScriptsError));return}else{ScriptHost._fxScripts.load(true,20*1000,Delegate.create(null,ScriptHost._onScriptsCompleted),Delegate.create(null,ScriptHost._onScriptsError))}};ScriptHost._onLoaded=function(){ScriptHost._loaded=true;if(window.main){window.main()}if(ScriptHost._loadHandler){ScriptHost._loadHandler.invoke(null,EventArgs.Empty);ScriptHost._loadHandler=null}};ScriptHost._onScriptsCompleted=function(a,b){if(a==ScriptHost._coreScripts){ScriptHost._coreScripts.dispose();ScriptHost._coreScripts=null;if(ScriptHost._fxScripts){ScriptHost._fxScripts.load(true,20*1000,Delegate.create(null,ScriptHost._onScriptsCompleted),Delegate.create(null,ScriptHost._onScriptsError));return}}else{ScriptHost._fxScripts.dispose();ScriptHost._fxScripts=null}ScriptHost._loading=false;ScriptHost._onLoaded()};ScriptHost._onScriptsError=function(a,b){};ScriptHost._onWindowLoad=function(){ScriptHost.initialize(null,null)};ScriptHost._onWindowUnload=function(){ScriptHost.close()};ScriptHost.createClass("ScriptHost");ScriptHost._coreScripts=null;ScriptHost._fxScripts=null;ScriptHost._loadHandler=null;ScriptHost._unloadHandler=null;ScriptHost._initialized=false;ScriptHost._loading=false;ScriptHost._loaded=false;ScriptHost._windowLoadHandler=Delegate.create(null,ScriptHost._onWindowLoad);ScriptHost._windowUnloadHandler=Delegate.create(null,ScriptHost._onWindowUnload);window.attachEvent("onload",ScriptHost._windowLoadHandler);window.attachEvent("onunload",ScriptHost._windowUnloadHandler);