/* START MicrosoftAjax.js */ //---------------------------------------------------------- // Copyright (C) Microsoft Corporation. All rights reserved. //---------------------------------------------------------- // MicrosoftAjax.js Function.__typeName="Function";Function.__class=true;Function.createCallback=function(b,a){return function(){var e=arguments.length;if(e>0){var d=[];for(var c=0;c=d)break;a=Function._validateParameter(g[b],f,h);if(a){a.popStackFrame();return a}}return null};Function._validateParameterCount=function(j,d,i){var a,c,b=d.length,e=j.length;if(eb){c=true;for(a=0;a0&&(d=0};Array.dequeue=function(a){return a.shift()};Array.forEach=function(b,e,d){for(var a=0,f=b.length;a=0)b.splice(a,1);return a>=0};Array.removeAt=function(a,b){a.splice(b,1)};Sys._indexOf=function(d,e,a){if(typeof e==="undefined")return -1;var c=d.length;if(c!==0){a=a-0;if(isNaN(a))a=0;else{if(isFinite(a))a=a-a%1;if(a<0)a=Math.max(0,c+a)}for(var b=a;b-1){Sys.Browser.agent=Sys.Browser.InternetExplorer;Sys.Browser.version=parseFloat(navigator.userAgent.match(/MSIE (\d+\.\d+)/)[1]);if(Sys.Browser.version>=8)if(document.documentMode>=7)Sys.Browser.documentMode=document.documentMode;Sys.Browser.hasDebuggerStatement=true}else if(navigator.userAgent.indexOf(" Firefox/")>-1){Sys.Browser.agent=Sys.Browser.Firefox;Sys.Browser.version=parseFloat(navigator.userAgent.match(/Firefox\/(\d+\.\d+)/)[1]);Sys.Browser.name="Firefox";Sys.Browser.hasDebuggerStatement=true}else if(navigator.userAgent.indexOf(" AppleWebKit/")>-1){Sys.Browser.agent=Sys.Browser.Safari;Sys.Browser.version=parseFloat(navigator.userAgent.match(/AppleWebKit\/(\d+(\.\d+)?)/)[1]);Sys.Browser.name="Safari"}else if(navigator.userAgent.indexOf("Opera/")>-1)Sys.Browser.agent=Sys.Browser.Opera;Sys.EventArgs=function(){};Sys.EventArgs.registerClass("Sys.EventArgs");Sys.EventArgs.Empty=new Sys.EventArgs;Sys.CancelEventArgs=function(){Sys.CancelEventArgs.initializeBase(this);this._cancel=false};Sys.CancelEventArgs.prototype={get_cancel:function(){return this._cancel},set_cancel:function(a){this._cancel=a}};Sys.CancelEventArgs.registerClass("Sys.CancelEventArgs",Sys.EventArgs);Type.registerNamespace("Sys.UI");Sys._Debug=function(){};Sys._Debug.prototype={_appendConsole:function(a){if(typeof Debug!=="undefined"&&Debug.writeln)Debug.writeln(a);if(window.console&&window.console.log)window.console.log(a);if(window.opera)window.opera.postError(a);if(window.debugService)window.debugService.trace(a)},_appendTrace:function(b){var a=document.getElementById("TraceConsole");if(a&&a.tagName.toUpperCase()==="TEXTAREA")a.value+=b+"\n"},assert:function(c,a,b){if(!c){a=b&&this.assert.caller?String.format(Sys.Res.assertFailedCaller,a,this.assert.caller):String.format(Sys.Res.assertFailed,a);if(confirm(String.format(Sys.Res.breakIntoDebugger,a)))this.fail(a)}},clearTrace:function(){var a=document.getElementById("TraceConsole");if(a&&a.tagName.toUpperCase()==="TEXTAREA")a.value=""},fail:function(message){this._appendConsole(message);if(Sys.Browser.hasDebuggerStatement)eval("debugger")},trace:function(a){this._appendConsole(a);this._appendTrace(a)},traceDump:function(a,b){var c=this._traceDump(a,b,true)},_traceDump:function(a,c,f,b,d){c=c?c:"traceDump";b=b?b:"";if(a===null){this.trace(b+c+": null");return}switch(typeof a){case "undefined":this.trace(b+c+": Undefined");break;case "number":case "string":case "boolean":this.trace(b+c+": "+a);break;default:if(Date.isInstanceOfType(a)||RegExp.isInstanceOfType(a)){this.trace(b+c+": "+a.toString());break}if(!d)d=[];else if(Array.contains(d,a)){this.trace(b+c+": ...");return}Array.add(d,a);if(a==window||a===document||window.HTMLElement&&a instanceof HTMLElement||typeof a.nodeName==="string"){var k=a.tagName?a.tagName:"DomElement";if(a.id)k+=" - "+a.id;this.trace(b+c+" {"+k+"}")}else{var i=Object.getTypeName(a);this.trace(b+c+(typeof i==="string"?" {"+i+"}":""));if(b===""||f){b+=" ";var e,j,l,g,h;if(Array.isInstanceOfType(a)){j=a.length;for(e=0;e=0;d--){var k=h[d].trim();b=a[k];if(typeof b!=="number")throw Error.argument("value",String.format(Sys.Res.enumInvalidValue,c.split(",")[d].trim(),this.__typeName));j|=b}return j}}function Sys$Enum$toString(c){if(typeof c==="undefined"||c===null)return this.__string;var d=this.prototype,a;if(!this.__flags||c===0){for(a in d)if(d[a]===c)return a}else{var b=this.__sortedValues;if(!b){b=[];for(a in d)b[b.length]={key:a,value:d[a]};b.sort(function(a,b){return a.value-b.value});this.__sortedValues=b}var e=[],g=c;for(a=b.length-1;a>=0;a--){var h=b[a],f=h.value;if(f===0)continue;if((f&c)===f){e[e.length]=h.key;g-=f;if(g===0)break}}if(e.length&&g===0)return e.reverse().join(", ")}return ""}Type.prototype.registerEnum=function(b,c){Sys.__upperCaseTypes[b.toUpperCase()]=this;for(var a in this.prototype)this[a]=this.prototype[a];this.__typeName=b;this.parse=Sys$Enum$parse;this.__string=this.toString();this.toString=Sys$Enum$toString;this.__flags=c;this.__enum=true};Type.isEnum=function(a){if(typeof a==="undefined"||a===null)return false;return !!a.__enum};Type.isFlags=function(a){if(typeof a==="undefined"||a===null)return false;return !!a.__flags};Sys.CollectionChange=function(e,a,c,b,d){this.action=e;if(a)if(!(a instanceof Array))a=[a];this.newItems=a||null;if(typeof c!=="number")c=-1;this.newStartingIndex=c;if(b)if(!(b instanceof Array))b=[b];this.oldItems=b||null;if(typeof d!=="number")d=-1;this.oldStartingIndex=d};Sys.CollectionChange.registerClass("Sys.CollectionChange");Sys.NotifyCollectionChangedAction=function(){throw Error.notImplemented()};Sys.NotifyCollectionChangedAction.prototype={add:0,remove:1,reset:2};Sys.NotifyCollectionChangedAction.registerEnum("Sys.NotifyCollectionChangedAction");Sys.NotifyCollectionChangedEventArgs=function(a){this._changes=a;Sys.NotifyCollectionChangedEventArgs.initializeBase(this)};Sys.NotifyCollectionChangedEventArgs.prototype={get_changes:function(){return this._changes||[]}};Sys.NotifyCollectionChangedEventArgs.registerClass("Sys.NotifyCollectionChangedEventArgs",Sys.EventArgs);Sys.Observer=function(){};Sys.Observer.registerClass("Sys.Observer");Sys.Observer.makeObservable=function(a){var c=a instanceof Array,b=Sys.Observer;if(a.setValue===b._observeMethods.setValue)return a;b._addMethods(a,b._observeMethods);if(c)b._addMethods(a,b._arrayMethods);return a};Sys.Observer._addMethods=function(c,b){for(var a in b)c[a]=b[a]};Sys.Observer._addEventHandler=function(c,a,b){Sys.Observer._getContext(c,true).events._addHandler(a,b)};Sys.Observer.addEventHandler=function(c,a,b){Sys.Observer._addEventHandler(c,a,b)};Sys.Observer._removeEventHandler=function(c,a,b){Sys.Observer._getContext(c,true).events._removeHandler(a,b)};Sys.Observer.removeEventHandler=function(c,a,b){Sys.Observer._removeEventHandler(c,a,b)};Sys.Observer.raiseEvent=function(b,e,d){var c=Sys.Observer._getContext(b);if(!c)return;var a=c.events.getHandler(e);if(a)a(b,d)};Sys.Observer.addPropertyChanged=function(b,a){Sys.Observer._addEventHandler(b,"propertyChanged",a)};Sys.Observer.removePropertyChanged=function(b,a){Sys.Observer._removeEventHandler(b,"propertyChanged",a)};Sys.Observer.beginUpdate=function(a){Sys.Observer._getContext(a,true).updating=true};Sys.Observer.endUpdate=function(b){var a=Sys.Observer._getContext(b);if(!a||!a.updating)return;a.updating=false;var d=a.dirty;a.dirty=false;if(d){if(b instanceof Array){var c=a.changes;a.changes=null;Sys.Observer.raiseCollectionChanged(b,c)}Sys.Observer.raisePropertyChanged(b,"")}};Sys.Observer.isUpdating=function(b){var a=Sys.Observer._getContext(b);return a?a.updating:false};Sys.Observer._setValue=function(a,j,g){var b,f,k=a,d=j.split(".");for(var i=0,m=d.length-1;i-1&&ac.Calendar.TwoDigitYearMax)a-=100}return a};Date._getEra=function(e,c){if(!c)return 0;var b,d=e.getTime();for(var a=0,f=c.length;a=b)return a}return 0};Date._getEraYear=function(d,b,e,c){var a=d.getFullYear();if(!c&&b.eras)a-=b.eras[e+3];return a};Date._getParseRegExp=function(b,e){if(!b._parseRegExp)b._parseRegExp={};else if(b._parseRegExp[e])return b._parseRegExp[e];var c=Date._expandFormat(b,e);c=c.replace(/([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g,"\\\\$1");var a=new Sys.StringBuilder("^"),j=[],f=0,i=0,h=Date._getTokenRegExp(),d;while((d=h.exec(c))!==null){var l=c.slice(f,d.index);f=h.lastIndex;i+=Date._appendPreOrPostMatch(l,a);if(i%2===1){a.append(d[0]);continue}switch(d[0]){case "dddd":case "ddd":case "MMMM":case "MMM":case "gg":case "g":a.append("(\\D+)");break;case "tt":case "t":a.append("(\\D*)");break;case "yyyy":a.append("(\\d{4})");break;case "fff":a.append("(\\d{3})");break;case "ff":a.append("(\\d{2})");break;case "f":a.append("(\\d)");break;case "dd":case "d":case "MM":case "M":case "yy":case "y":case "HH":case "H":case "hh":case "h":case "mm":case "m":case "ss":case "s":a.append("(\\d\\d?)");break;case "zzz":a.append("([+-]?\\d\\d?:\\d{2})");break;case "zz":case "z":a.append("([+-]?\\d\\d?)");break;case "/":a.append("(\\"+b.DateSeparator+")")}Array.add(j,d[0])}Date._appendPreOrPostMatch(c.slice(f),a);a.append("$");var k=a.toString().replace(/\s+/g,"\\s+"),g={"regExp":k,"groups":j};b._parseRegExp[e]=g;return g};Date._getTokenRegExp=function(){return /\/|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|gg|g/g};Date.parseLocale=function(a){return Date._parse(a,Sys.CultureInfo.CurrentCulture,arguments)};Date.parseInvariant=function(a){return Date._parse(a,Sys.CultureInfo.InvariantCulture,arguments)};Date._parse=function(h,d,i){var a,c,b,f,e,g=false;for(a=1,c=i.length;a31)return null;break;case "MMMM":c=k._getMonthIndex(a);if(c<0||c>11)return null;break;case "MMM":c=k._getAbbrMonthIndex(a);if(c<0||c>11)return null;break;case "M":case "MM":c=parseInt(a,10)-1;if(c<0||c>11)return null;break;case "y":case "yy":e=Date._expandYear(g,parseInt(a,10));if(e<0||e>9999)return null;break;case "yyyy":e=parseInt(a,10);if(e<0||e>9999)return null;break;case "h":case "hh":d=parseInt(a,10);if(d===12)d=0;if(d<0||d>11)return null;break;case "H":case "HH":d=parseInt(a,10);if(d<0||d>23)return null;break;case "m":case "mm":p=parseInt(a,10);if(p<0||p>59)return null;break;case "s":case "ss":q=parseInt(a,10);if(q<0||q>59)return null;break;case "tt":case "t":var z=a.toUpperCase();v=z===g.PMDesignator.toUpperCase();if(!v&&z!==g.AMDesignator.toUpperCase())return null;break;case "f":f=parseInt(a,10)*100;if(f<0||f>999)return null;break;case "ff":f=parseInt(a,10)*10;if(f<0||f>999)return null;break;case "fff":f=parseInt(a,10);if(f<0||f>999)return null;break;case "dddd":i=k._getDayIndex(a);if(i<0||i>6)return null;break;case "ddd":i=k._getAbbrDayIndex(a);if(i<0||i>6)return null;break;case "zzz":var u=a.split(/:/);if(u.length!==2)return null;h=parseInt(u[0],10);if(h<-12||h>13)return null;var m=parseInt(u[1],10);if(m<0||m>59)return null;l=h*60+(a.startsWith("-")?-m:m);break;case "z":case "zz":h=parseInt(a,10);if(h<-12||h>13)return null;l=h*60;break;case "g":case "gg":var o=a;if(!o||!g.eras)return null;o=o.toLowerCase().trim();for(var r=0,F=g.eras.length;r0)return this.toLocaleString();else return this.toString();var o=["n %","n%","%n"],n=["-n %","-n%","-%n"],p=["(n)","-n","- n","n-","n -"],m=["$n","n$","$ n","n $"],l=["($n)","-$n","$-n","$n-","(n$)","-n$","n-$","n$-","-n $","-$ n","n $-","$ n-","$ -n","n- $","($ n)","(n $)"];function g(a,c,d){for(var b=a.length;b1?parseInt(e[1]):0;e=b.split(".");b=e[0];a=e.length>1?e[1]:"";var q;if(c>0){a=g(a,c,false);b+=a.slice(0,c);a=a.substr(c)}else if(c<0){c=-c;b=g(b,c+1,true);a=b.slice(-c,b.length)+a;b=b.slice(0,-c)}if(i>0){if(a.length>i)a=a.slice(0,i);else a=g(a,i,false);a=p+a}else a="";var d=b.length-1,f="";while(d>=0){if(h===0||h>d)if(f.length>0)return b.slice(0,d+1)+n+f+a;else return b.slice(0,d+1)+a;if(f.length>0)f=b.slice(d-h+1,d+1)+n+f;else f=b.slice(d-h+1,d+1);d-=h;if(k1)b=parseInt(e.slice(1),10);var c;switch(e.charAt(0)){case "d":case "D":c="n";if(b!==-1)d=g(""+d,b,true);if(this<0)d=-d;break;case "c":case "C":if(this<0)c=l[a.CurrencyNegativePattern];else c=m[a.CurrencyPositivePattern];if(b===-1)b=a.CurrencyDecimalDigits;d=i(Math.abs(this),b,a.CurrencyGroupSizes,a.CurrencyGroupSeparator,a.CurrencyDecimalSeparator);break;case "n":case "N":if(this<0)c=p[a.NumberNegativePattern];else c="n";if(b===-1)b=a.NumberDecimalDigits;d=i(Math.abs(this),b,a.NumberGroupSizes,a.NumberGroupSeparator,a.NumberDecimalSeparator);break;case "p":case "P":if(this<0)c=n[a.PercentNegativePattern];else c=o[a.PercentPositivePattern];if(b===-1)b=a.PercentDecimalDigits;d=i(Math.abs(this)*100,b,a.PercentGroupSizes,a.PercentGroupSeparator,a.PercentDecimalSeparator);break;default:throw Error.format(Sys.Res.formatBadFormatSpecifier)}var k=/n|\$|-|%/g,f="";for(;true;){var q=k.lastIndex,h=k.exec(c);f+=c.slice(q,h?h.index:c.length);if(!h)break;switch(h[0]){case "n":f+=d;break;case "$":f+=a.CurrencySymbol;break;case "-":if(/[1-9]/.test(d))f+=a.NegativeSign;break;case "%":f+=a.PercentSymbol}}return f};Sys.CultureInfo=function(c,b,a){this.name=c;this.numberFormat=b;this.dateTimeFormat=a};Sys.CultureInfo.prototype={_getDateTimeFormats:function(){if(!this._dateTimeFormats){var a=this.dateTimeFormat;this._dateTimeFormats=[a.MonthDayPattern,a.YearMonthPattern,a.ShortDatePattern,a.ShortTimePattern,a.LongDatePattern,a.LongTimePattern,a.FullDateTimePattern,a.RFC1123Pattern,a.SortableDateTimePattern,a.UniversalSortableDateTimePattern]}return this._dateTimeFormats},_getIndex:function(c,d,e){var b=this._toUpper(c),a=Array.indexOf(d,b);if(a===-1)a=Array.indexOf(e,b);return a},_getMonthIndex:function(a){if(!this._upperMonths){this._upperMonths=this._toUpperArray(this.dateTimeFormat.MonthNames);this._upperMonthsGenitive=this._toUpperArray(this.dateTimeFormat.MonthGenitiveNames)}return this._getIndex(a,this._upperMonths,this._upperMonthsGenitive)},_getAbbrMonthIndex:function(a){if(!this._upperAbbrMonths){this._upperAbbrMonths=this._toUpperArray(this.dateTimeFormat.AbbreviatedMonthNames);this._upperAbbrMonthsGenitive=this._toUpperArray(this.dateTimeFormat.AbbreviatedMonthGenitiveNames)}return this._getIndex(a,this._upperAbbrMonths,this._upperAbbrMonthsGenitive)},_getDayIndex:function(a){if(!this._upperDays)this._upperDays=this._toUpperArray(this.dateTimeFormat.DayNames);return Array.indexOf(this._upperDays,this._toUpper(a))},_getAbbrDayIndex:function(a){if(!this._upperAbbrDays)this._upperAbbrDays=this._toUpperArray(this.dateTimeFormat.AbbreviatedDayNames);return Array.indexOf(this._upperAbbrDays,this._toUpper(a))},_toUpperArray:function(c){var b=[];for(var a=0,d=c.length;a0)a.append(",");Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(b[c],a,false,g)}a.append("]")}else{if(Date.isInstanceOfType(b)){a.append('"\\/Date(');a.append(b.getTime());a.append(')\\/"');break}var d=[],f=0;for(var e in b){if(e.startsWith("$"))continue;if(e===Sys.Serialization.JavaScriptSerializer._serverTypeFieldName&&f!==0){d[f++]=d[0];d[0]=e}else d[f++]=e}if(i)d.sort();a.append("{");var j=false;for(c=0;c=0;c--){var f=d[c];if(!g||f.autoRemove)$removeHandler(a,b,f.handler)}}a._events=null}};Sys.UI.DomEvent._disposeHandlers=function(){Sys.UI.DomEvent._clearHandlers(this,true);var b=this._chainDispose,a=typeof b;if(a!=="undefined"){this.dispose=b;this._chainDispose=null;if(a==="function")this.dispose()}};var $removeHandler=Sys.UI.DomEvent.removeHandler=function(b,a,c){Sys.UI.DomEvent._removeHandler(b,a,c)};Sys.UI.DomEvent._removeHandler=function(a,e,f){var d=null,c=a._events[e];for(var b=0,g=c.length;b=3){d+=parseInt(b.borderLeftWidth);e+=parseInt(b.borderTopWidth)}}b=Sys.UI.DomElement._getCurrentStyle(c);var h=b?b.position:null;if(!h||h!=="absolute")for(a=c.parentNode;a;a=a.parentNode){f=a.tagName?a.tagName.toUpperCase():null;if(f!=="BODY"&&f!=="HTML"&&(a.scrollLeft||a.scrollTop)){d-=a.scrollLeft||0;e-=a.scrollTop||0}b=Sys.UI.DomElement._getCurrentStyle(a);var i=b?b.position:null;if(i&&i==="absolute")break}return new Sys.UI.Point(d,e)};else Sys.UI.DomElement.getLocation=function(d){if(d.window&&d.window===d||d.nodeType===9)return new Sys.UI.Point(0,0);var e=0,f=0,a,i=null,g=null,b=null;for(a=d;a;i=a,(g=b,a=a.offsetParent)){var c=a.tagName?a.tagName.toUpperCase():null;b=Sys.UI.DomElement._getCurrentStyle(a);if((a.offsetLeft||a.offsetTop)&&!(c==="BODY"&&(!g||g.position!=="absolute"))){e+=a.offsetLeft;f+=a.offsetTop}if(i!==null&&b){if(c!=="TABLE"&&c!=="TD"&&c!=="HTML"){e+=parseInt(b.borderLeftWidth)||0;f+=parseInt(b.borderTopWidth)||0}if(c==="TABLE"&&(b.position==="relative"||b.position==="absolute")){e+=parseInt(b.marginLeft)||0;f+=parseInt(b.marginTop)||0}}}b=Sys.UI.DomElement._getCurrentStyle(d);var h=b?b.position:null;if(!h||h!=="absolute")for(a=d.parentNode;a;a=a.parentNode){c=a.tagName?a.tagName.toUpperCase():null;if(c!=="BODY"&&c!=="HTML"&&(a.scrollLeft||a.scrollTop)){e-=a.scrollLeft||0;f-=a.scrollTop||0;b=Sys.UI.DomElement._getCurrentStyle(a);if(b){e+=parseInt(b.borderLeftWidth)||0;f+=parseInt(b.borderTopWidth)||0}}}return new Sys.UI.Point(e,f)};Sys.UI.DomElement.isDomElement=function(a){return Sys._isDomElement(a)};Sys.UI.DomElement.removeCssClass=function(d,c){var a=" "+d.className+" ",b=a.indexOf(" "+c+" ");if(b>=0)d.className=(a.substr(0,b)+" "+a.substring(b+c.length+1,a.length)).trim()};Sys.UI.DomElement.resolveElement=function(b,c){var a=b;if(!a)return null;if(typeof a==="string")a=Sys.UI.DomElement.getElementById(a,c);return a};Sys.UI.DomElement.raiseBubbleEvent=function(c,d){var b=c;while(b){var a=b.control;if(a&&a.onBubbleEvent&&a.raiseBubbleEvent){Sys.UI.DomElement._raiseBubbleEventFromControl(a,c,d);return}b=b.parentNode}};Sys.UI.DomElement._raiseBubbleEventFromControl=function(a,b,c){if(!a.onBubbleEvent(b,c))a._raiseBubbleEvent(b,c)};Sys.UI.DomElement.setLocation=function(b,c,d){var a=b.style;a.position="absolute";a.left=c+"px";a.top=d+"px"};Sys.UI.DomElement.toggleCssClass=function(b,a){if(Sys.UI.DomElement.containsCssClass(b,a))Sys.UI.DomElement.removeCssClass(b,a);else Sys.UI.DomElement.addCssClass(b,a)};Sys.UI.DomElement.getVisibilityMode=function(a){return a._visibilityMode===Sys.UI.VisibilityMode.hide?Sys.UI.VisibilityMode.hide:Sys.UI.VisibilityMode.collapse};Sys.UI.DomElement.setVisibilityMode=function(a,b){Sys.UI.DomElement._ensureOldDisplayMode(a);if(a._visibilityMode!==b){a._visibilityMode=b;if(Sys.UI.DomElement.getVisible(a)===false)if(a._visibilityMode===Sys.UI.VisibilityMode.hide)a.style.display=a._oldDisplayMode;else a.style.display="none";a._visibilityMode=b}};Sys.UI.DomElement.getVisible=function(b){var a=b.currentStyle||Sys.UI.DomElement._getCurrentStyle(b);if(!a)return true;return a.visibility!=="hidden"&&a.display!=="none"};Sys.UI.DomElement.setVisible=function(a,b){if(b!==Sys.UI.DomElement.getVisible(a)){Sys.UI.DomElement._ensureOldDisplayMode(a);a.style.visibility=b?"visible":"hidden";if(b||a._visibilityMode===Sys.UI.VisibilityMode.hide)a.style.display=a._oldDisplayMode;else a.style.display="none"}};Sys.UI.DomElement._ensureOldDisplayMode=function(a){if(!a._oldDisplayMode){var b=a.currentStyle||Sys.UI.DomElement._getCurrentStyle(a);a._oldDisplayMode=b?b.display:null;if(!a._oldDisplayMode||a._oldDisplayMode==="none")switch(a.tagName.toUpperCase()){case "DIV":case "P":case "ADDRESS":case "BLOCKQUOTE":case "BODY":case "COL":case "COLGROUP":case "DD":case "DL":case "DT":case "FIELDSET":case "FORM":case "H1":case "H2":case "H3":case "H4":case "H5":case "H6":case "HR":case "IFRAME":case "LEGEND":case "OL":case "PRE":case "TABLE":case "TD":case "TH":case "TR":case "UL":a._oldDisplayMode="block";break;case "LI":a._oldDisplayMode="list-item";break;default:a._oldDisplayMode="inline"}}};Sys.UI.DomElement._getWindow=function(a){var b=a.ownerDocument||a.document||a;return b.defaultView||b.parentWindow};Sys.UI.DomElement._getCurrentStyle=function(a){if(a.nodeType===3)return null;var c=Sys.UI.DomElement._getWindow(a);if(a.documentElement)a=a.documentElement;var b=c&&a!==c&&c.getComputedStyle?c.getComputedStyle(a,null):a.currentStyle||a.style;if(!b&&Sys.Browser.agent===Sys.Browser.Safari&&a.style){var g=a.style.display,f=a.style.position;a.style.position="absolute";a.style.display="block";var e=c.getComputedStyle(a,null);a.style.display=g;a.style.position=f;b={};for(var d in e)b[d]=e[d];b.display="none"}return b};Sys.IContainer=function(){};Sys.IContainer.prototype={};Sys.IContainer.registerInterface("Sys.IContainer");Sys.ApplicationLoadEventArgs=function(b,a){Sys.ApplicationLoadEventArgs.initializeBase(this);this._components=b;this._isPartialLoad=a};Sys.ApplicationLoadEventArgs.prototype={get_components:function(){return this._components},get_isPartialLoad:function(){return this._isPartialLoad}};Sys.ApplicationLoadEventArgs.registerClass("Sys.ApplicationLoadEventArgs",Sys.EventArgs);Sys._Application=function(){Sys._Application.initializeBase(this);this._disposableObjects=[];this._components={};this._createdComponents=[];this._secondPassComponents=[];this._unloadHandlerDelegate=Function.createDelegate(this,this._unloadHandler);Sys.UI.DomEvent.addHandler(window,"unload",this._unloadHandlerDelegate);this._domReady()};Sys._Application.prototype={_creatingComponents:false,_disposing:false,_deleteCount:0,get_isCreatingComponents:function(){return this._creatingComponents},get_isDisposing:function(){return this._disposing},add_init:function(a){if(this._initialized)a(this,Sys.EventArgs.Empty);else this.get_events().addHandler("init",a)},remove_init:function(a){this.get_events().removeHandler("init",a)},add_load:function(a){this.get_events().addHandler("load",a)},remove_load:function(a){this.get_events().removeHandler("load",a)},add_unload:function(a){this.get_events().addHandler("unload",a)},remove_unload:function(a){this.get_events().removeHandler("unload",a)},addComponent:function(a){this._components[a.get_id()]=a},beginCreateComponents:function(){this._creatingComponents=true},dispose:function(){if(!this._disposing){this._disposing=true;if(this._timerCookie){window.clearTimeout(this._timerCookie);delete this._timerCookie}if(this._endRequestHandler){Sys.WebForms.PageRequestManager.getInstance().remove_endRequest(this._endRequestHandler);delete this._endRequestHandler}if(this._beginRequestHandler){Sys.WebForms.PageRequestManager.getInstance().remove_beginRequest(this._beginRequestHandler);delete this._beginRequestHandler}if(window.pageUnload)window.pageUnload(this,Sys.EventArgs.Empty);var c=this.get_events().getHandler("unload");if(c)c(this,Sys.EventArgs.Empty);var b=Array.clone(this._disposableObjects);for(var a=0,f=b.length;a=0;b--){var d=i[b],f=d.dispose;if(f&&typeof f==="function")d.dispose();else{var e=d.control;if(e&&typeof e.dispose==="function")e.dispose()}var a=d._behaviors;if(a)this._disposeComponents(a);a=d._components;if(a){this._disposeComponents(a);d._components=null}}if(!j){var f=c.dispose;if(f&&typeof f==="function")c.dispose();else{var e=c.control;if(e&&typeof e.dispose==="function")e.dispose()}var a=c._behaviors;if(a)this._disposeComponents(a);a=c._components;if(a){this._disposeComponents(a);c._components=null}}}},endCreateComponents:function(){var b=this._secondPassComponents;for(var a=0,d=b.length;a1000){var c=[];for(var d=0,f=b.length;d=0;b--){var c=a[b];if(typeof c.dispose==="function")c.dispose()}},_domReady:function(){var a,g,f=this;function b(){f.initialize()}var c=function(){Sys.UI.DomEvent.removeHandler(window,"load",c);b()};Sys.UI.DomEvent.addHandler(window,"load",c);if(document.addEventListener)try{document.addEventListener("DOMContentLoaded",a=function(){document.removeEventListener("DOMContentLoaded",a,false);b()},false)}catch(h){}else if(document.attachEvent)if(window==window.top&&document.documentElement.doScroll){var e,d=document.createElement("div");a=function(){try{d.doScroll("left")}catch(c){e=window.setTimeout(a,0);return}d=null;b()};a()}else document.attachEvent("onreadystatechange",a=function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",a);b()}})},_raiseInit:function(){var a=this.get_events().getHandler("init");if(a){this.beginCreateComponents();a(this,Sys.EventArgs.Empty);this.endCreateComponents()}},_unloadHandler:function(){this.dispose()}};Sys._Application.registerClass("Sys._Application",Sys.Component,Sys.IContainer);Sys.Application=new Sys._Application;var $find=Sys.Application.findComponent;Sys.UI.Behavior=function(b){Sys.UI.Behavior.initializeBase(this);this._element=b;var a=b._behaviors;if(!a)b._behaviors=[this];else a[a.length]=this};Sys.UI.Behavior.prototype={_name:null,get_element:function(){return this._element},get_id:function(){var a=Sys.UI.Behavior.callBaseMethod(this,"get_id");if(a)return a;if(!this._element||!this._element.id)return "";return this._element.id+"$"+this.get_name()},get_name:function(){if(this._name)return this._name;var a=Object.getTypeName(this),b=a.lastIndexOf(".");if(b!==-1)a=a.substr(b+1);if(!this.get_isInitialized())this._name=a;return a},set_name:function(a){this._name=a},initialize:function(){Sys.UI.Behavior.callBaseMethod(this,"initialize");var a=this.get_name();if(a)this._element[a]=this},dispose:function(){Sys.UI.Behavior.callBaseMethod(this,"dispose");var a=this._element;if(a){var c=this.get_name();if(c)a[c]=null;var b=a._behaviors;Array.remove(b,this);if(b.length===0)a._behaviors=null;delete this._element}}};Sys.UI.Behavior.registerClass("Sys.UI.Behavior",Sys.Component);Sys.UI.Behavior.getBehaviorByName=function(b,c){var a=b[c];return a&&Sys.UI.Behavior.isInstanceOfType(a)?a:null};Sys.UI.Behavior.getBehaviors=function(a){if(!a._behaviors)return [];return Array.clone(a._behaviors)};Sys.UI.Behavior.getBehaviorsByType=function(d,e){var a=d._behaviors,c=[];if(a)for(var b=0,f=a.length;b0&&a.charAt(0)==="#")a=a.substring(1);return a};Sys._Application.prototype.get_enableHistory=function(){return this._enableHistory};Sys._Application.prototype.set_enableHistory=function(a){this._enableHistory=a};Sys._Application.prototype.add_navigate=function(a){this.get_events().addHandler("navigate",a)};Sys._Application.prototype.remove_navigate=function(a){this.get_events().removeHandler("navigate",a)};Sys._Application.prototype.addHistoryPoint=function(c,f){this._ensureHistory();var b=this._state;for(var a in c){var d=c[a];if(d===null){if(typeof b[a]!=="undefined")delete b[a]}else b[a]=d}var e=this._serializeState(b);this._historyPointIsNew=true;this._setState(e,f);this._raiseNavigate()};Sys._Application.prototype.setServerId=function(a,b){this._clientId=a;this._uniqueId=b};Sys._Application.prototype.setServerState=function(a){this._ensureHistory();this._state.__s=a;this._updateHiddenField(a)};Sys._Application.prototype._deserializeState=function(a){var e={};a=a||"";var b=a.indexOf("&&");if(b!==-1&&b+27){var e=document.title;document.title=c;this._setState(a);document.title=e}else this._setState(a);this._raiseNavigate()}else{this._setState(a);this._raiseNavigate()}}};Sys._Application.prototype._raiseNavigate=function(){var d=this._historyPointIsNew,c=this.get_events().getHandler("navigate"),b={};for(var a in this._state)if(a!=="__s")b[a]=this._state[a];var e=new Sys.HistoryEventArgs(b);if(c)c(this,e);if(!d){var f;try{if(Sys.Browser.agent===Sys.Browser.Firefox&&window.location.hash&&(!window.frameElement||window.top.location.hash))Sys.Browser.version<3.5?window.history.go(0):(location.hash=this.get_stateString())}catch(g){}}};Sys._Application.prototype._serializeState=function(d){var b=[];for(var a in d){var e=d[a];if(a==="__s")var c=e;else b[b.length]=a+"="+encodeURIComponent(e)}return b.join("&")+(c?"&&"+c:"")};Sys._Application.prototype._setState=function(a,b){if(this._enableHistory){a=a||"";if(a!==this._currentEntry){if(window.theForm){var d=window.theForm.action,e=d.indexOf("#");window.theForm.action=(e!==-1?d.substring(0,e):d)+"#"+a}if(this._historyFrame&&this._historyPointIsNew){var f=document.createElement("div");f.appendChild(document.createTextNode(b||document.title));var g=f.innerHTML;this._ignoreIFrame=true;var c=this._historyFrame.contentWindow.document;c.open("javascript:''");c.write(""+g+"parent.Sys.Application._onIFrameLoad('+Sys.Serialization.JavaScriptSerializer.serialize(a)+");");c.close()}this._ignoreTimer=false;this._currentEntry=a;if(this._historyFrame||this._historyPointIsNew){var h=this.get_stateString();if(a!==h){window.location.hash=a;this._currentEntry=this.get_stateString();if(typeof b!=="undefined"&&b!==null)document.title=b}}this._historyPointIsNew=false}}};Sys._Application.prototype._updateHiddenField=function(b){if(this._clientId){var a=document.getElementById(this._clientId);if(a)a.value=b}};if(!window.XMLHttpRequest)window.XMLHttpRequest=function(){var b=["Msxml2.XMLHTTP.3.0","Msxml2.XMLHTTP"];for(var a=0,c=b.length;a0)this._timer=window.setTimeout(Function.createDelegate(this,this._onTimeout),d);this._xmlHttpRequest.send(c);this._started=true},getResponseHeader:function(b){var a;try{a=this._xmlHttpRequest.getResponseHeader(b)}catch(c){}if(!a)a="";return a},getAllResponseHeaders:function(){return this._xmlHttpRequest.getAllResponseHeaders()},get_responseData:function(){return this._xmlHttpRequest.responseText},get_statusCode:function(){var a=0;try{a=this._xmlHttpRequest.status}catch(b){}return a},get_statusText:function(){return this._xmlHttpRequest.statusText},get_xml:function(){var a=this._xmlHttpRequest.responseXML;if(!a||!a.documentElement){a=Sys.Net.XMLDOM(this._xmlHttpRequest.responseText);if(!a||!a.documentElement)return null}else if(navigator.userAgent.indexOf("MSIE")!==-1&&typeof a.setProperty!="undefined")a.setProperty("SelectionLanguage","XPath");if(a.documentElement.namespaceURI==="http://www.mozilla.org/newlayout/xml/parsererror.xml"&&a.documentElement.tagName==="parsererror")return null;if(a.documentElement.firstChild&&a.documentElement.firstChild.tagName==="parsererror")return null;return a},abort:function(){if(this._aborted||this._responseAvailable||this._timedOut)return;this._aborted=true;this._clearTimer();if(this._xmlHttpRequest&&!this._responseAvailable){this._xmlHttpRequest.onreadystatechange=Function.emptyMethod;this._xmlHttpRequest.abort();this._xmlHttpRequest=null;this._webRequest.completed(Sys.EventArgs.Empty)}}};Sys.Net.XMLHttpExecutor.registerClass("Sys.Net.XMLHttpExecutor",Sys.Net.WebRequestExecutor);Sys.Net._WebRequestManager=function(){this._defaultTimeout=0;this._defaultExecutorType="Sys.Net.XMLHttpExecutor"};Sys.Net._WebRequestManager.prototype={add_invokingRequest:function(a){this._get_eventHandlerList().addHandler("invokingRequest",a)},remove_invokingRequest:function(a){this._get_eventHandlerList().removeHandler("invokingRequest",a)},add_completedRequest:function(a){this._get_eventHandlerList().addHandler("completedRequest",a)},remove_completedRequest:function(a){this._get_eventHandlerList().removeHandler("completedRequest",a)},_get_eventHandlerList:function(){if(!this._events)this._events=new Sys.EventHandlerList;return this._events},get_defaultTimeout:function(){return this._defaultTimeout},set_defaultTimeout:function(a){this._defaultTimeout=a},get_defaultExecutorType:function(){return this._defaultExecutorType},set_defaultExecutorType:function(a){this._defaultExecutorType=a},executeRequest:function(webRequest){var executor=webRequest.get_executor();if(!executor){var failed=false;try{var executorType=eval(this._defaultExecutorType);executor=new executorType}catch(a){failed=true}webRequest.set_executor(executor)}if(executor.get_aborted())return;var evArgs=new Sys.Net.NetworkRequestEventArgs(webRequest),handler=this._get_eventHandlerList().getHandler("invokingRequest");if(handler)handler(this,evArgs);if(!evArgs.get_cancel())executor.executeRequest()}};Sys.Net._WebRequestManager.registerClass("Sys.Net._WebRequestManager");Sys.Net.WebRequestManager=new Sys.Net._WebRequestManager;Sys.Net.NetworkRequestEventArgs=function(a){Sys.Net.NetworkRequestEventArgs.initializeBase(this);this._webRequest=a};Sys.Net.NetworkRequestEventArgs.prototype={get_webRequest:function(){return this._webRequest}};Sys.Net.NetworkRequestEventArgs.registerClass("Sys.Net.NetworkRequestEventArgs",Sys.CancelEventArgs);Sys.Net.WebRequest=function(){this._url="";this._headers={};this._body=null;this._userContext=null;this._httpVerb=null;this._executor=null;this._invokeCalled=false;this._timeout=0};Sys.Net.WebRequest.prototype={add_completed:function(a){this._get_eventHandlerList().addHandler("completed",a)},remove_completed:function(a){this._get_eventHandlerList().removeHandler("completed",a)},completed:function(b){var a=Sys.Net.WebRequestManager._get_eventHandlerList().getHandler("completedRequest");if(a)a(this._executor,b);a=this._get_eventHandlerList().getHandler("completed");if(a)a(this._executor,b)},_get_eventHandlerList:function(){if(!this._events)this._events=new Sys.EventHandlerList;return this._events},get_url:function(){return this._url},set_url:function(a){this._url=a},get_headers:function(){return this._headers},get_httpVerb:function(){if(this._httpVerb===null){if(this._body===null)return "GET";return "POST"}return this._httpVerb},set_httpVerb:function(a){this._httpVerb=a},get_body:function(){return this._body},set_body:function(a){this._body=a},get_userContext:function(){return this._userContext},set_userContext:function(a){this._userContext=a},get_executor:function(){return this._executor},set_executor:function(a){this._executor=a;this._executor._set_webRequest(this)},get_timeout:function(){if(this._timeout===0)return Sys.Net.WebRequestManager.get_defaultTimeout();return this._timeout},set_timeout:function(a){this._timeout=a},getResolvedUrl:function(){return Sys.Net.WebRequest._resolveUrl(this._url)},invoke:function(){Sys.Net.WebRequestManager.executeRequest(this);this._invokeCalled=true}};Sys.Net.WebRequest._resolveUrl=function(b,a){if(b&&b.indexOf("://")!==-1)return b;if(!a||a.length===0){var d=document.getElementsByTagName("base")[0];if(d&&d.href&&d.href.length>0)a=d.href;else a=document.URL}var c=a.indexOf("?");if(c!==-1)a=a.substr(0,c);c=a.indexOf("#");if(c!==-1)a=a.substr(0,c);a=a.substr(0,a.lastIndexOf("/")+1);if(!b||b.length===0)return a;if(b.charAt(0)==="/"){var e=a.indexOf("://"),g=a.indexOf("/",e+3);return a.substr(0,g)+b}else{var f=a.lastIndexOf("/");return a.substr(0,f+1)+b}};Sys.Net.WebRequest._createQueryString=function(c,b,f){b=b||encodeURIComponent;var h=0,e,g,d,a=new Sys.StringBuilder;if(c)for(d in c){e=c[d];if(typeof e==="function")continue;g=Sys.Serialization.JavaScriptSerializer.serialize(e);if(h++)a.append("&");a.append(d);a.append("=");a.append(b(g))}if(f){if(h)a.append("&");a.append(f)}return a.toString()};Sys.Net.WebRequest._createUrl=function(a,b,c){if(!b&&!c)return a;var d=Sys.Net.WebRequest._createQueryString(b,null,c);return d.length?a+(a&&a.indexOf("?")>=0?"&":"?")+d:a};Sys.Net.WebRequest.registerClass("Sys.Net.WebRequest");Sys._ScriptLoaderTask=function(b,a){this._scriptElement=b;this._completedCallback=a};Sys._ScriptLoaderTask.prototype={get_scriptElement:function(){return this._scriptElement},dispose:function(){if(this._disposed)return;this._disposed=true;this._removeScriptElementHandlers();Sys._ScriptLoaderTask._clearScript(this._scriptElement);this._scriptElement=null},execute:function(){if(this._ensureReadyStateLoaded())this._executeInternal()},_executeInternal:function(){this._addScriptElementHandlers();document.getElementsByTagName("head")[0].appendChild(this._scriptElement)},_ensureReadyStateLoaded:function(){if(this._useReadyState()&&this._scriptElement.readyState!=="loaded"&&this._scriptElement.readyState!=="complete"){this._scriptDownloadDelegate=Function.createDelegate(this,this._executeInternal);$addHandler(this._scriptElement,"readystatechange",this._scriptDownloadDelegate);return false}return true},_addScriptElementHandlers:function(){if(this._scriptDownloadDelegate){$removeHandler(this._scriptElement,"readystatechange",this._scriptDownloadDelegate);this._scriptDownloadDelegate=null}this._scriptLoadDelegate=Function.createDelegate(this,this._scriptLoadHandler);if(this._useReadyState())$addHandler(this._scriptElement,"readystatechange",this._scriptLoadDelegate);else $addHandler(this._scriptElement,"load",this._scriptLoadDelegate);if(this._scriptElement.addEventListener){this._scriptErrorDelegate=Function.createDelegate(this,this._scriptErrorHandler);this._scriptElement.addEventListener("error",this._scriptErrorDelegate,false)}},_removeScriptElementHandlers:function(){if(this._scriptLoadDelegate){var a=this.get_scriptElement();if(this._scriptDownloadDelegate){$removeHandler(this._scriptElement,"readystatechange",this._scriptDownloadDelegate);this._scriptDownloadDelegate=null}if(this._useReadyState()&&this._scriptLoadDelegate)$removeHandler(a,"readystatechange",this._scriptLoadDelegate);else $removeHandler(a,"load",this._scriptLoadDelegate);if(this._scriptErrorDelegate){this._scriptElement.removeEventListener("error",this._scriptErrorDelegate,false);this._scriptErrorDelegate=null}this._scriptLoadDelegate=null}},_scriptErrorHandler:function(){if(this._disposed)return;this._completedCallback(this.get_scriptElement(),false)},_scriptLoadHandler:function(){if(this._disposed)return;var a=this.get_scriptElement();if(this._useReadyState()&&a.readyState!=="complete")return;this._completedCallback(a,true)},_useReadyState:function(){return Sys.Browser.agent===Sys.Browser.InternetExplorer&&(Sys.Browser.version<9||(document.documentMode||0)<9)}};Sys._ScriptLoaderTask.registerClass("Sys._ScriptLoaderTask",null,Sys.IDisposable);Sys._ScriptLoaderTask._clearScript=function(a){if(!Sys.Debug.isDebug&&a.parentNode)a.parentNode.removeChild(a)};Type.registerNamespace("Sys.Net");Sys.Net.WebServiceProxy=function(){};Sys.Net.WebServiceProxy.prototype={get_timeout:function(){return this._timeout||0},set_timeout:function(a){if(a<0)throw Error.argumentOutOfRange("value",a,Sys.Res.invalidTimeout);this._timeout=a},get_defaultUserContext:function(){return typeof this._userContext==="undefined"?null:this._userContext},set_defaultUserContext:function(a){this._userContext=a},get_defaultSucceededCallback:function(){return this._succeeded||null},set_defaultSucceededCallback:function(a){this._succeeded=a},get_defaultFailedCallback:function(){return this._failed||null},set_defaultFailedCallback:function(a){this._failed=a},get_enableJsonp:function(){return !!this._jsonp},set_enableJsonp:function(a){this._jsonp=a},get_path:function(){return this._path||null},set_path:function(a){this._path=a},get_jsonpCallbackParameter:function(){return this._callbackParameter||"callback"},set_jsonpCallbackParameter:function(a){this._callbackParameter=a},_invoke:function(d,e,g,f,c,b,a){c=c||this.get_defaultSucceededCallback();b=b||this.get_defaultFailedCallback();if(a===null||typeof a==="undefined")a=this.get_defaultUserContext();return Sys.Net.WebServiceProxy.invoke(d,e,g,f,c,b,a,this.get_timeout(),this.get_enableJsonp(),this.get_jsonpCallbackParameter())}};Sys.Net.WebServiceProxy.registerClass("Sys.Net.WebServiceProxy");Sys.Net.WebServiceProxy.invoke=function(q,a,m,l,j,b,g,e,w,p){var i=w!==false?Sys.Net.WebServiceProxy._xdomain.exec(q):null,c,n=i&&i.length===3&&(i[1]!==location.protocol||i[2]!==location.host);m=n||m;if(n){p=p||"callback";c="_jsonp"+Sys._jsonp++}if(!l)l={};var r=l;if(!m||!r)r={};var s,h,f=null,k,o=null,u=Sys.Net.WebRequest._createUrl(a?q+"/"+encodeURIComponent(a):q,r,n?p+"=Sys."+c:null);if(n){s=document.createElement("script");s.src=u;k=new Sys._ScriptLoaderTask(s,function(d,b){if(!b||c)t({Message:String.format(Sys.Res.webServiceFailedNoMsg,a)},-1)});function v(){if(f===null)return;f=null;h=new Sys.Net.WebServiceError(true,String.format(Sys.Res.webServiceTimedOut,a));k.dispose();delete Sys[c];if(b)b(h,g,a)}function t(d,e){if(f!==null){window.clearTimeout(f);f=null}k.dispose();delete Sys[c];c=null;if(typeof e!=="undefined"&&e!==200){if(b){h=new Sys.Net.WebServiceError(false,d.Message||String.format(Sys.Res.webServiceFailedNoMsg,a),d.StackTrace||null,d.ExceptionType||null,d);h._statusCode=e;b(h,g,a)}}else if(j)j(d,g,a)}Sys[c]=t;e=e||Sys.Net.WebRequestManager.get_defaultTimeout();if(e>0)f=window.setTimeout(v,e);k.execute();return null}var d=new Sys.Net.WebRequest;d.set_url(u);d.get_headers()["Content-Type"]="application/json; charset=utf-8";if(!m){o=Sys.Serialization.JavaScriptSerializer.serialize(l);if(o==="{}")o=""}d.set_body(o);d.add_completed(x);if(e&&e>0)d.set_timeout(e);d.invoke();function x(d){if(d.get_responseAvailable()){var f=d.get_statusCode(),c=null;try{var e=d.getResponseHeader("Content-Type");if(e.startsWith("application/json"))c=d.get_object();else if(e.startsWith("text/xml"))c=d.get_xml();else c=d.get_responseData()}catch(m){}var k=d.getResponseHeader("jsonerror"),h=k==="true";if(h){if(c)c=new Sys.Net.WebServiceError(false,c.Message,c.StackTrace,c.ExceptionType,c)}else if(e.startsWith("application/json"))c=!c||typeof c.d==="undefined"?c:c.d;if(f<200||f>=300||h){if(b){if(!c||!h)c=new Sys.Net.WebServiceError(false,String.format(Sys.Res.webServiceFailedNoMsg,a));c._statusCode=f;b(c,g,a)}}else if(j)j(c,g,a)}else{var i;if(d.get_timedOut())i=String.format(Sys.Res.webServiceTimedOut,a);else i=String.format(Sys.Res.webServiceFailedNoMsg,a);if(b)b(new Sys.Net.WebServiceError(d.get_timedOut(),i,"",""),g,a)}}return d};Sys.Net.WebServiceProxy._generateTypedConstructor=function(a){return function(b){if(b)for(var c in b)this[c]=b[c];this.__type=a}};Sys._jsonp=0;Sys.Net.WebServiceProxy._xdomain=/^\s*([a-zA-Z0-9\+\-\.]+\:)\/\/([^?#\/]+)/;Sys.Net.WebServiceError=function(d,e,c,a,b){this._timedOut=d;this._message=e;this._stackTrace=c;this._exceptionType=a;this._errorObject=b;this._statusCode=-1};Sys.Net.WebServiceError.prototype={get_timedOut:function(){return this._timedOut},get_statusCode:function(){return this._statusCode},get_message:function(){return this._message},get_stackTrace:function(){return this._stackTrace||""},get_exceptionType:function(){return this._exceptionType||""},get_errorObject:function(){return this._errorObject||null}};Sys.Net.WebServiceError.registerClass("Sys.Net.WebServiceError"); Type.registerNamespace('Sys');Sys.Res={ "argumentInteger":"Value must be an integer.","invokeCalledTwice":"Cannot call invoke more than once.","webServiceFailed":"The server method \u0027{0}\u0027 failed with the following error: {1}","argumentType":"Object cannot be converted to the required type.","argumentNull":"Value cannot be null.","scriptAlreadyLoaded":"The script \u0027{0}\u0027 has been referenced multiple times. If referencing Microsoft AJAX scripts explicitly, set the MicrosoftAjaxMode property of the ScriptManager to Explicit.","scriptDependencyNotFound":"The script \u0027{0}\u0027 failed to load because it is dependent on script \u0027{1}\u0027.","formatBadFormatSpecifier":"Format specifier was invalid.","requiredScriptReferenceNotIncluded":"\u0027{0}\u0027 requires that you have included a script reference to \u0027{1}\u0027.","webServiceFailedNoMsg":"The server method \u0027{0}\u0027 failed.","argumentDomElement":"Value must be a DOM element.","invalidExecutorType":"Could not create a valid Sys.Net.WebRequestExecutor from: {0}.","cannotCallBeforeResponse":"Cannot call {0} when responseAvailable is false.","actualValue":"Actual value was {0}.","enumInvalidValue":"\u0027{0}\u0027 is not a valid value for enum {1}.","scriptLoadFailed":"The script \u0027{0}\u0027 could not be loaded.","parameterCount":"Parameter count mismatch.","cannotDeserializeEmptyString":"Cannot deserialize empty string.","formatInvalidString":"Input string was not in a correct format.","invalidTimeout":"Value must be greater than or equal to zero.","cannotAbortBeforeStart":"Cannot abort when executor has not started.","argument":"Value does not fall within the expected range.","cannotDeserializeInvalidJson":"Cannot deserialize. The data does not correspond to valid JSON.","invalidHttpVerb":"httpVerb cannot be set to an empty or null string.","nullWebRequest":"Cannot call executeRequest with a null webRequest.","eventHandlerInvalid":"Handler was not added through the Sys.UI.DomEvent.addHandler method.","cannotSerializeNonFiniteNumbers":"Cannot serialize non finite numbers.","argumentUndefined":"Value cannot be undefined.","webServiceInvalidReturnType":"The server method \u0027{0}\u0027 returned an invalid type. Expected type: {1}","servicePathNotSet":"The path to the web service has not been set.","argumentTypeWithTypes":"Object of type \u0027{0}\u0027 cannot be converted to type \u0027{1}\u0027.","cannotCallOnceStarted":"Cannot call {0} once started.","badBaseUrl1":"Base URL does not contain ://.","badBaseUrl2":"Base URL does not contain another /.","badBaseUrl3":"Cannot find last / in base URL.","setExecutorAfterActive":"Cannot set executor after it has become active.","paramName":"Parameter name: {0}","nullReferenceInPath":"Null reference while evaluating data path: \u0027{0}\u0027.","cannotCallOutsideHandler":"Cannot call {0} outside of a completed event handler.","cannotSerializeObjectWithCycle":"Cannot serialize object with cyclic reference within child properties.","format":"One of the identified items was in an invalid format.","assertFailedCaller":"Assertion Failed: {0}\r\nat {1}","argumentOutOfRange":"Specified argument was out of the range of valid values.","webServiceTimedOut":"The server method \u0027{0}\u0027 timed out.","notImplemented":"The method or operation is not implemented.","assertFailed":"Assertion Failed: {0}","invalidOperation":"Operation is not valid due to the current state of the object.","breakIntoDebugger":"{0}\r\n\r\nBreak into debugger?"}; /* END MicrosoftAjax.js */ /* START MicrosoftAjaxWebForms.js */ //---------------------------------------------------------- // Copyright (C) Microsoft Corporation. All rights reserved. //---------------------------------------------------------- // MicrosoftAjaxWebForms.js Type._registerScript("MicrosoftAjaxWebForms.js",["MicrosoftAjaxCore.js","MicrosoftAjaxSerialization.js","MicrosoftAjaxNetwork.js","MicrosoftAjaxComponentModel.js"]);Type.registerNamespace("Sys.WebForms");Sys.WebForms.BeginRequestEventArgs=function(c,b,a){Sys.WebForms.BeginRequestEventArgs.initializeBase(this);this._request=c;this._postBackElement=b;this._updatePanelsToUpdate=a};Sys.WebForms.BeginRequestEventArgs.prototype={get_postBackElement:function(){return this._postBackElement},get_request:function(){return this._request},get_updatePanelsToUpdate:function(){return this._updatePanelsToUpdate?Array.clone(this._updatePanelsToUpdate):[]}};Sys.WebForms.BeginRequestEventArgs.registerClass("Sys.WebForms.BeginRequestEventArgs",Sys.EventArgs);Sys.WebForms.EndRequestEventArgs=function(c,a,b){Sys.WebForms.EndRequestEventArgs.initializeBase(this);this._errorHandled=false;this._error=c;this._dataItems=a||{};this._response=b};Sys.WebForms.EndRequestEventArgs.prototype={get_dataItems:function(){return this._dataItems},get_error:function(){return this._error},get_errorHandled:function(){return this._errorHandled},set_errorHandled:function(a){this._errorHandled=a},get_response:function(){return this._response}};Sys.WebForms.EndRequestEventArgs.registerClass("Sys.WebForms.EndRequestEventArgs",Sys.EventArgs);Sys.WebForms.InitializeRequestEventArgs=function(c,b,a){Sys.WebForms.InitializeRequestEventArgs.initializeBase(this);this._request=c;this._postBackElement=b;this._updatePanelsToUpdate=a};Sys.WebForms.InitializeRequestEventArgs.prototype={get_postBackElement:function(){return this._postBackElement},get_request:function(){return this._request},get_updatePanelsToUpdate:function(){return this._updatePanelsToUpdate?Array.clone(this._updatePanelsToUpdate):[]},set_updatePanelsToUpdate:function(a){this._updated=true;this._updatePanelsToUpdate=a}};Sys.WebForms.InitializeRequestEventArgs.registerClass("Sys.WebForms.InitializeRequestEventArgs",Sys.CancelEventArgs);Sys.WebForms.PageLoadedEventArgs=function(b,a,c){Sys.WebForms.PageLoadedEventArgs.initializeBase(this);this._panelsUpdated=b;this._panelsCreated=a;this._dataItems=c||{}};Sys.WebForms.PageLoadedEventArgs.prototype={get_dataItems:function(){return this._dataItems},get_panelsCreated:function(){return this._panelsCreated},get_panelsUpdated:function(){return this._panelsUpdated}};Sys.WebForms.PageLoadedEventArgs.registerClass("Sys.WebForms.PageLoadedEventArgs",Sys.EventArgs);Sys.WebForms.PageLoadingEventArgs=function(b,a,c){Sys.WebForms.PageLoadingEventArgs.initializeBase(this);this._panelsUpdating=b;this._panelsDeleting=a;this._dataItems=c||{}};Sys.WebForms.PageLoadingEventArgs.prototype={get_dataItems:function(){return this._dataItems},get_panelsDeleting:function(){return this._panelsDeleting},get_panelsUpdating:function(){return this._panelsUpdating}};Sys.WebForms.PageLoadingEventArgs.registerClass("Sys.WebForms.PageLoadingEventArgs",Sys.EventArgs);Sys._ScriptLoader=function(){this._scriptsToLoad=null;this._sessions=[];this._scriptLoadedDelegate=Function.createDelegate(this,this._scriptLoadedHandler)};Sys._ScriptLoader.prototype={dispose:function(){this._stopSession();this._loading=false;if(this._events)delete this._events;this._sessions=null;this._currentSession=null;this._scriptLoadedDelegate=null},loadScripts:function(d,b,c,a){var e={allScriptsLoadedCallback:b,scriptLoadFailedCallback:c,scriptLoadTimeoutCallback:a,scriptsToLoad:this._scriptsToLoad,scriptTimeout:d};this._scriptsToLoad=null;this._sessions[this._sessions.length]=e;if(!this._loading)this._nextSession()},queueCustomScriptTag:function(a){if(!this._scriptsToLoad)this._scriptsToLoad=[];Array.add(this._scriptsToLoad,a)},queueScriptBlock:function(a){if(!this._scriptsToLoad)this._scriptsToLoad=[];Array.add(this._scriptsToLoad,{text:a})},queueScriptReference:function(a,b){if(!this._scriptsToLoad)this._scriptsToLoad=[];Array.add(this._scriptsToLoad,{src:a,fallback:b})},_createScriptElement:function(c){var a=document.createElement("script");a.type="text/javascript";for(var b in c)a[b]=c[b];return a},_loadScriptsInternal:function(){var c=this._currentSession;if(c.scriptsToLoad&&c.scriptsToLoad.length>0){var b=Array.dequeue(c.scriptsToLoad),f=this._scriptLoadedDelegate;if(b.fallback){var g=b.fallback;delete b.fallback;var d=this;f=function(b,a){a||function(){var a=d._createScriptElement({src:g});d._currentTask=new Sys._ScriptLoaderTask(a,d._scriptLoadedDelegate);d._currentTask.execute()}()}}var a=this._createScriptElement(b);if(a.text&&Sys.Browser.agent===Sys.Browser.Safari){a.innerHTML=a.text;delete a.text}if(typeof b.src==="string"){this._currentTask=new Sys._ScriptLoaderTask(a,f);this._currentTask.execute()}else{document.getElementsByTagName("head")[0].appendChild(a);Sys._ScriptLoaderTask._clearScript(a);this._loadScriptsInternal()}}else{this._stopSession();var e=c.allScriptsLoadedCallback;if(e)e(this);this._nextSession()}},_nextSession:function(){if(this._sessions.length===0){this._loading=false;this._currentSession=null;return}this._loading=true;var a=Array.dequeue(this._sessions);this._currentSession=a;if(a.scriptTimeout>0)this._timeoutCookie=window.setTimeout(Function.createDelegate(this,this._scriptLoadTimeoutHandler),a.scriptTimeout*1000);this._loadScriptsInternal()},_raiseError:function(){var b=this._currentSession.scriptLoadFailedCallback,a=this._currentTask.get_scriptElement();this._stopSession();if(b){b(this,a);this._nextSession()}else{this._loading=false;throw Sys._ScriptLoader._errorScriptLoadFailed(a.src)}},_scriptLoadedHandler:function(a,b){if(b){Array.add(Sys._ScriptLoader._getLoadedScripts(),a.src);this._currentTask.dispose();this._currentTask=null;this._loadScriptsInternal()}else this._raiseError()},_scriptLoadTimeoutHandler:function(){var a=this._currentSession.scriptLoadTimeoutCallback;this._stopSession();if(a)a(this);this._nextSession()},_stopSession:function(){if(this._timeoutCookie){window.clearTimeout(this._timeoutCookie);this._timeoutCookie=null}if(this._currentTask){this._currentTask.dispose();this._currentTask=null}}};Sys._ScriptLoader.registerClass("Sys._ScriptLoader",null,Sys.IDisposable);Sys._ScriptLoader.getInstance=function(){var a=Sys._ScriptLoader._activeInstance;if(!a)a=Sys._ScriptLoader._activeInstance=new Sys._ScriptLoader;return a};Sys._ScriptLoader.isScriptLoaded=function(b){var a=document.createElement("script");a.src=b;return Array.contains(Sys._ScriptLoader._getLoadedScripts(),a.src)};Sys._ScriptLoader.readLoadedScripts=function(){if(!Sys._ScriptLoader._referencedScripts){var c=Sys._ScriptLoader._referencedScripts=[],d=document.getElementsByTagName("script");for(var b=d.length-1;b>=0;b--){var e=d[b],a=e.src;if(a.length)if(!Array.contains(c,a))Array.add(c,a)}}};Sys._ScriptLoader._errorScriptLoadFailed=function(b){var a;a=Sys.Res.scriptLoadFailed;var d="Sys.ScriptLoadFailedException: "+String.format(a,b),c=Error.create(d,{name:"Sys.ScriptLoadFailedException","scriptUrl":b});c.popStackFrame();return c};Sys._ScriptLoader._getLoadedScripts=function(){if(!Sys._ScriptLoader._referencedScripts){Sys._ScriptLoader._referencedScripts=[];Sys._ScriptLoader.readLoadedScripts()}return Sys._ScriptLoader._referencedScripts};Sys.WebForms.PageRequestManager=function(){this._form=null;this._activeDefaultButton=null;this._activeDefaultButtonClicked=false;this._updatePanelIDs=null;this._updatePanelClientIDs=null;this._updatePanelHasChildrenAsTriggers=null;this._asyncPostBackControlIDs=null;this._asyncPostBackControlClientIDs=null;this._postBackControlIDs=null;this._postBackControlClientIDs=null;this._scriptManagerID=null;this._pageLoadedHandler=null;this._additionalInput=null;this._onsubmit=null;this._onSubmitStatements=[];this._originalDoPostBack=null;this._originalDoPostBackWithOptions=null;this._originalFireDefaultButton=null;this._originalDoCallback=null;this._isCrossPost=false;this._postBackSettings=null;this._request=null;this._onFormSubmitHandler=null;this._onFormElementClickHandler=null;this._onWindowUnloadHandler=null;this._asyncPostBackTimeout=null;this._controlIDToFocus=null;this._scrollPosition=null;this._processingRequest=false;this._scriptDisposes={};this._transientFields=["__VIEWSTATEENCRYPTED","__VIEWSTATEFIELDCOUNT"];this._textTypes=/^(text|password|hidden|search|tel|url|email|number|range|color|datetime|date|month|week|time|datetime-local)$/i};Sys.WebForms.PageRequestManager.prototype={_get_eventHandlerList:function(){if(!this._events)this._events=new Sys.EventHandlerList;return this._events},get_isInAsyncPostBack:function(){return this._request!==null},add_beginRequest:function(a){this._get_eventHandlerList().addHandler("beginRequest",a)},remove_beginRequest:function(a){this._get_eventHandlerList().removeHandler("beginRequest",a)},add_endRequest:function(a){this._get_eventHandlerList().addHandler("endRequest",a)},remove_endRequest:function(a){this._get_eventHandlerList().removeHandler("endRequest",a)},add_initializeRequest:function(a){this._get_eventHandlerList().addHandler("initializeRequest",a)},remove_initializeRequest:function(a){this._get_eventHandlerList().removeHandler("initializeRequest",a)},add_pageLoaded:function(a){this._get_eventHandlerList().addHandler("pageLoaded",a)},remove_pageLoaded:function(a){this._get_eventHandlerList().removeHandler("pageLoaded",a)},add_pageLoading:function(a){this._get_eventHandlerList().addHandler("pageLoading",a)},remove_pageLoading:function(a){this._get_eventHandlerList().removeHandler("pageLoading",a)},abortPostBack:function(){if(!this._processingRequest&&this._request){this._request.get_executor().abort();this._request=null}},beginAsyncPostBack:function(c,a,f,d,e){if(d&&typeof Page_ClientValidate==="function"&&!Page_ClientValidate(e||null))return;this._postBackSettings=this._createPostBackSettings(true,c,a);var b=this._form;b.__EVENTTARGET.value=a||"";b.__EVENTARGUMENT.value=f||"";this._isCrossPost=false;this._additionalInput=null;this._onFormSubmit()},_cancelPendingCallbacks:function(){for(var a=0,e=window.__pendingCallbacks.length;a0)theForm.action=a.actionUrl;if(a.trackFocus){var c=theForm.elements["__LASTFOCUS"];if(typeof c!="undefined"&&c!=null)if(typeof document.activeElement=="undefined")c.value=a.eventTarget;else{var b=document.activeElement;if(typeof b!="undefined"&&b!=null)if(typeof b.id!="undefined"&&b.id!=null&&b.id.length>0)c.value=b.id;else if(typeof b.name!="undefined")c.value=b.name}}}if(a.clientSubmit)this._doPostBack(a.eventTarget,a.eventArgument)},_elementContains:function(b,a){while(a){if(a===b)return true;a=a.parentNode}return false},_endPostBack:function(a,d,f){if(this._request===d.get_webRequest()){this._processingRequest=false;this._additionalInput=null;this._request=null}var e=this._get_eventHandlerList().getHandler("endRequest"),b=false;if(e){var c=new Sys.WebForms.EndRequestEventArgs(a,f?f.dataItems:{},d);e(this,c);b=c.get_errorHandled()}if(a&&!b)throw a},_ensureUniqueIds:function(a){if(!a)return a;a=a instanceof Array?a:[a];var c=[];for(var b=0,f=a.length;b-1?this._updatePanelIDs[d]:e)}return c},_findNearestElement:function(a){while(a.length>0){var d=this._uniqueIDToClientID(a),c=document.getElementById(d);if(c)return c;var b=a.lastIndexOf("$");if(b===-1)return null;a=a.substring(0,b)}return null},_findText:function(b,a){var c=Math.max(0,a-20),d=Math.min(b.length,a+20);return b.substring(c,d)},_fireDefaultButton:function(a,d){if(a.keyCode===13){var c=a.srcElement||a.target;if(!c||c.tagName.toLowerCase()!=="textarea"){var b=document.getElementById(d);if(b&&typeof b.click!=="undefined"){this._activeDefaultButton=b;this._activeDefaultButtonClicked=false;try{b.click()}finally{this._activeDefaultButton=null}a.cancelBubble=true;if(typeof a.stopPropagation==="function")a.stopPropagation();return false}}}return true},_getPageLoadedEventArgs:function(n,c){var m=[],l=[],k=c?c.version4:false,d=c?c.updatePanelData:null,e,g,h,b;if(!d){e=this._updatePanelIDs;g=this._updatePanelClientIDs;h=null;b=null}else{e=d.updatePanelIDs;g=d.updatePanelClientIDs;h=d.childUpdatePanelIDs;b=d.panelsToRefreshIDs}var a,f,j,i;if(b)for(a=0,f=b.length;a-1))Array.add(i,document.getElementById(l[a]))}return new Sys.WebForms.PageLoadingEventArgs(j,i,f.dataItems)},_getPostBackSettings:function(a,c){var d=a,b=null;while(a){if(a.id){if(!b&&Array.contains(this._asyncPostBackControlClientIDs,a.id))b=this._createPostBackSettings(true,null,c,d);else if(!b&&Array.contains(this._postBackControlClientIDs,a.id))return this._createPostBackSettings(false);else{var e=Array.indexOf(this._updatePanelClientIDs,a.id);if(e!==-1)if(this._updatePanelHasChildrenAsTriggers[e])return this._createPostBackSettings(true,[this._updatePanelIDs[e]],c,d);else return this._createPostBackSettings(true,null,c,d)}if(!b&&this._matchesParentIDInList(a.id,this._asyncPostBackControlClientIDs))b=this._createPostBackSettings(true,null,c,d);else if(!b&&this._matchesParentIDInList(a.id,this._postBackControlClientIDs))return this._createPostBackSettings(false)}a=a.parentNode}if(!b)return this._createPostBackSettings(false);else return b},_getScrollPosition:function(){var a=document.documentElement;if(a&&(this._validPosition(a.scrollLeft)||this._validPosition(a.scrollTop)))return {x:a.scrollLeft,y:a.scrollTop};else{a=document.body;if(a&&(this._validPosition(a.scrollLeft)||this._validPosition(a.scrollTop)))return {x:a.scrollLeft,y:a.scrollTop};else if(this._validPosition(window.pageXOffset)||this._validPosition(window.pageYOffset))return {x:window.pageXOffset,y:window.pageYOffset};else return {x:0,y:0}}},_initializeInternal:function(f,g,a,b,e,c,d){if(this._prmInitialized)throw Error.invalidOperation(Sys.WebForms.Res.PRM_CannotRegisterTwice);this._prmInitialized=true;this._masterPageUniqueID=d;this._scriptManagerID=f;this._form=Sys.UI.DomElement.resolveElement(g);this._onsubmit=this._form.onsubmit;this._form.onsubmit=null;this._onFormSubmitHandler=Function.createDelegate(this,this._onFormSubmit);this._onFormElementClickHandler=Function.createDelegate(this,this._onFormElementClick);this._onWindowUnloadHandler=Function.createDelegate(this,this._onWindowUnload);Sys.UI.DomEvent.addHandler(this._form,"submit",this._onFormSubmitHandler);Sys.UI.DomEvent.addHandler(this._form,"click",this._onFormElementClickHandler);Sys.UI.DomEvent.addHandler(window,"unload",this._onWindowUnloadHandler);this._originalDoPostBack=window.__doPostBack;if(this._originalDoPostBack)window.__doPostBack=Function.createDelegate(this,this._doPostBack);this._originalDoPostBackWithOptions=window.WebForm_DoPostBackWithOptions;if(this._originalDoPostBackWithOptions)window.WebForm_DoPostBackWithOptions=Function.createDelegate(this,this._doPostBackWithOptions);this._originalFireDefaultButton=window.WebForm_FireDefaultButton;if(this._originalFireDefaultButton)window.WebForm_FireDefaultButton=Function.createDelegate(this,this._fireDefaultButton);this._originalDoCallback=window.WebForm_DoCallback;if(this._originalDoCallback)window.WebForm_DoCallback=Function.createDelegate(this,this._doCallback);this._pageLoadedHandler=Function.createDelegate(this,this._pageLoadedInitialLoad);Sys.UI.DomEvent.addHandler(window,"load",this._pageLoadedHandler);if(a)this._updateControls(a,b,e,c,true)},_matchesParentIDInList:function(c,b){for(var a=0,d=b.length;a=c.length){e=this._findText(c,c.length);break}D=c.substr(b,i);b+=i;if(c.charAt(b)!=="|"){e=this._findText(c,b);break}b++;Array.add(k,{type:E,id:F,content:D})}if(e){this._endPostBack(this._createPageRequestManagerParserError(String.format(Sys.WebForms.Res.PRM_ParserErrorDetails,e)),h,null);return null}var x=[],w=[],q=[],j=[],t=[],C=[],A=[],z=[],v=[],s=[],m,p,u,n,o,r,y,g;for(var l=0,G=k.length;l=4)a.content=unescape(a.content);if(Sys.Browser.agent===Sys.Browser.InternetExplorer){var f=document.createElement("a");f.style.display="none";f.attachEvent("onclick",B);f.href=a.content;this._form.parentNode.insertBefore(f,this._form);f.click();f.detachEvent("onclick",B);this._form.parentNode.removeChild(f);function B(a){a.cancelBubble=true}}else window.location.href=a.content;return null;case "error":this._endPostBack(this._createPageRequestManagerServerError(Number.parseInvariant(a.id),a.content),h,null);return null;case "pageTitle":document.title=a.content;break;case "focus":this._controlIDToFocus=a.content;break;default:this._endPostBack(this._createPageRequestManagerParserError(String.format(Sys.WebForms.Res.PRM_UnknownToken,a.type)),h,null);return null}}return {version4:g?parseFloat(g.content)>=4:false,executor:h,updatePanelNodes:x,hiddenFieldNodes:w,arrayDeclarationNodes:q,scriptBlockNodes:j,scriptStartupNodes:t,expandoNodes:C,onSubmitNodes:A,dataItemNodes:z,dataItemJsonNodes:v,scriptDisposeNodes:s,asyncPostBackControlIDsNode:m,postBackControlIDsNode:p,updatePanelIDsNode:u,asyncPostBackTimeoutNode:n,childUpdatePanelIDsNode:o,panelsToRefreshNode:r,formActionNode:y}},_processUpdatePanelArrays:function(e,q,r,f){var d,c,b;if(e){var i=e.length,j=f?2:1;d=new Array(i/j);c=new Array(i/j);b=new Array(i/j);for(var g=0,h=0;gSys.Extended.UI.BoxSide.Left)throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,t,"Sys.Extended.UI.BoxSide"));var n=this._borderStyleNames[t],r=this.getCurrentStyle(e,n);return"none"!=r},getMargin:function(e,t){if(!e)throw Error.argumentNull("element");if(tSys.Extended.UI.BoxSide.Left)throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,t,"Sys.Extended.UI.BoxSide"));var n=this._marginWidthNames[t],r=this.getCurrentStyle(e,n);try{return this.parsePadding(r)}catch(e){return 0}},getBorderWidth:function(e,t){if(!e)throw Error.argumentNull("element");if(tSys.Extended.UI.BoxSide.Left)throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,t,"Sys.Extended.UI.BoxSide"));if(!this.isBorderVisible(e,t))return 0;var n=this._borderWidthNames[t],r=this.getCurrentStyle(e,n);return this.parseBorderWidth(r)},getPadding:function(e,t){if(!e)throw Error.argumentNull("element");if(tSys.Extended.UI.BoxSide.Left)throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,t,"Sys.Extended.UI.BoxSide"));var n=this._paddingWidthNames[t],r=this.getCurrentStyle(e,n);return this.parsePadding(r)},parseBorderWidth:function(e){if(!this._borderThicknesses){var t={},n=document.createElement("div");n.style.visibility="hidden",n.style.position="absolute",n.style.fontSize="1px",document.body.appendChild(n);var r=document.createElement("div");r.style.height="0px",r.style.overflow="hidden",n.appendChild(r);var i=n.offsetHeight;r.style.borderTop="solid black",r.style.borderTopWidth="thin",t.thin=n.offsetHeight-i,r.style.borderTopWidth="medium",t.medium=n.offsetHeight-i,r.style.borderTopWidth="thick",t.thick=n.offsetHeight-i,n.removeChild(r),document.body.removeChild(n),this._borderThicknesses=t}if(e){switch(e){case"thin":case"medium":case"thick":return this._borderThicknesses[e];case"inherit":return 0}var o=this.parseUnit(e);return Sys.Debug.assert("px"==o.type,String.format(Sys.Extended.UI.Resources.Common_InvalidBorderWidthUnit,o.type)),o.size}return 0},parsePadding:function(e){if(e){if("inherit"==e)return 0;var t=this.parseUnit(e);return"px"!==t.type&&Sys.Debug.fail(String.format(Sys.Extended.UI.Resources.Common_InvalidPaddingUnit,t.type)),t.size}return 0},parseUnit:function(e){if(!e)throw Error.argumentNull("value");e=e.trim().toLowerCase();for(var t=e.length,n=-1,r=0;r"9")&&"-"!=i&&"."!=i&&","!=i)break;n=r}if(n==-1)throw Error.create(Sys.Extended.UI.Resources.Common_UnitHasNoDigits);var o,s;return o=n0){var func;if((func=window[value])instanceof Function)return func;if((func=eval(value))instanceof Function)return func}}return null},addCssClasses:function(e,t){for(var n=0;n=e.x&&t=e.y&&nt&&(d="l"==r?d.substr(d.length-t,t):d.substr(0,t)),d},__DOMEvents:{focusin:{eventGroup:"UIEvents",init:function(e,t){e.initUIEvent("focusin",!0,!1,window,1)}},focusout:{eventGroup:"UIEvents",init:function(e,t){e.initUIEvent("focusout",!0,!1,window,1)}},activate:{eventGroup:"UIEvents",init:function(e,t){e.initUIEvent("activate",!0,!0,window,1)}},focus:{eventGroup:"UIEvents",init:function(e,t){e.initUIEvent("focus",!1,!1,window,1)}},blur:{eventGroup:"UIEvents",init:function(e,t){e.initUIEvent("blur",!1,!1,window,1)}},click:{eventGroup:"MouseEvents",init:function(e,t){e.initMouseEvent("click",!0,!0,window,1,t.screenX||0,t.screenY||0,t.clientX||0,t.clientY||0,t.ctrlKey||!1,t.altKey||!1,t.shiftKey||!1,t.metaKey||!1,t.button||0,t.relatedTarget||null)}},dblclick:{eventGroup:"MouseEvents",init:function(e,t){e.initMouseEvent("click",!0,!0,window,2,t.screenX||0,t.screenY||0,t.clientX||0,t.clientY||0,t.ctrlKey||!1,t.altKey||!1,t.shiftKey||!1,t.metaKey||!1,t.button||0,t.relatedTarget||null)}},mousedown:{eventGroup:"MouseEvents",init:function(e,t){e.initMouseEvent("mousedown",!0,!0,window,1,t.screenX||0,t.screenY||0,t.clientX||0,t.clientY||0,t.ctrlKey||!1,t.altKey||!1,t.shiftKey||!1,t.metaKey||!1,t.button||0,t.relatedTarget||null)}},mouseup:{eventGroup:"MouseEvents",init:function(e,t){e.initMouseEvent("mouseup",!0,!0,window,1,t.screenX||0,t.screenY||0,t.clientX||0,t.clientY||0,t.ctrlKey||!1,t.altKey||!1,t.shiftKey||!1,t.metaKey||!1,t.button||0,t.relatedTarget||null)}},mouseover:{eventGroup:"MouseEvents",init:function(e,t){e.initMouseEvent("mouseover",!0,!0,window,1,t.screenX||0,t.screenY||0,t.clientX||0,t.clientY||0,t.ctrlKey||!1,t.altKey||!1,t.shiftKey||!1,t.metaKey||!1,t.button||0,t.relatedTarget||null)}},mousemove:{eventGroup:"MouseEvents",init:function(e,t){e.initMouseEvent("mousemove",!0,!0,window,1,t.screenX||0,t.screenY||0,t.clientX||0,t.clientY||0,t.ctrlKey||!1,t.altKey||!1,t.shiftKey||!1,t.metaKey||!1,t.button||0,t.relatedTarget||null)}},mouseout:{eventGroup:"MouseEvents",init:function(e,t){e.initMouseEvent("mousemove",!0,!0,window,1,t.screenX||0,t.screenY||0,t.clientX||0,t.clientY||0,t.ctrlKey||!1,t.altKey||!1,t.shiftKey||!1,t.metaKey||!1,t.button||0,t.relatedTarget||null)}},load:{eventGroup:"HTMLEvents",init:function(e,t){e.initEvent("load",!1,!1)}},unload:{eventGroup:"HTMLEvents",init:function(e,t){e.initEvent("unload",!1,!1)}},select:{eventGroup:"HTMLEvents",init:function(e,t){e.initEvent("select",!0,!1)}},change:{eventGroup:"HTMLEvents",init:function(e,t){e.initEvent("change",!0,!1)}},submit:{eventGroup:"HTMLEvents",init:function(e,t){e.initEvent("submit",!0,!0)}},reset:{eventGroup:"HTMLEvents",init:function(e,t){e.initEvent("reset",!0,!1)}},resize:{eventGroup:"HTMLEvents",init:function(e,t){e.initEvent("resize",!0,!1)}},scroll:{eventGroup:"HTMLEvents",init:function(e,t){e.initEvent("scroll",!0,!1)}}},tryFireRawEvent:function(e,t){try{if(e.fireEvent)return e.fireEvent("on"+t.type,t),!0;if(e.dispatchEvent)return e.dispatchEvent(t),!0}catch(e){}return!1},tryFireEvent:function(e,t,n){try{if(document.createEventObject){var r=document.createEventObject();return $common.applyProperties(r,n||{}),e.fireEvent("on"+t,r),!0}if(document.createEvent){var i=$common.__DOMEvents[t];if(i){var r=document.createEvent(i.eventGroup);return i.init(r,n||{}),e.dispatchEvent(r),!0}}}catch(e){}return!1},wrapElement:function(e,t,n){var r=e.parentNode;r.replaceChild(t,e),(n||t).appendChild(e)},unwrapElement:function(e,t){var n=t.parentNode;null!=n&&($common.removeElement(e),n.replaceChild(e,t))},removeElement:function(e){var t=e.parentNode;null!=t&&t.removeChild(e)},applyProperties:function(e,t){for(var n in t){var r=t[n];if(null!=r&&Object.getType(r)===Object){var i=e[n];$common.applyProperties(i,r)}else e[n]=r}},createElementFromTemplate:function(e,t,n){if("undefined"!=typeof e.nameTable){var r=e.nameTable;String.isInstanceOfType(r)&&(r=n[r]),null!=r&&(n=r)}var i=null;"undefined"!=typeof e.name&&(i=e.name);var o=document.createElement(e.nodeName);if("undefined"!=typeof e.name&&n&&(n[e.name]=o),"undefined"!=typeof e.parent&&null==t){var s=e.parent;String.isInstanceOfType(s)&&(s=n[s]),null!=s&&(t=s)}if("undefined"!=typeof e.properties&&null!=e.properties&&$common.applyProperties(o,e.properties),"undefined"!=typeof e.cssClasses&&null!=e.cssClasses&&$common.addCssClasses(o,e.cssClasses),"undefined"!=typeof e.events&&null!=e.events&&$addHandlers(o,e.events),"undefined"!=typeof e.visible&&null!=e.visible&&this.setVisible(o,e.visible),t&&t.appendChild(o),"undefined"!=typeof e.opacity&&null!=e.opacity&&$common.setElementOpacity(o,e.opacity),"undefined"!=typeof e.children&&null!=e.children)for(var d=0;d100&&(t=100),this._percentComplete=t,this.raisePropertyChanged("percentComplete"),i&&this.onStep(t),100===t&&this.stop(!1)},setOwner:function(t){this._owner=t},add_started:function(t){this.get_events().addHandler("started",t)},remove_started:function(t){this.get_events().removeHandler("started",t)},raise_started:function(){var t=this.get_events().getHandler("started");t&&t(this,Sys.EventArgs.Empty)},raiseStarted:function(){Sys.Extended.Deprecated("raiseStarted()","raise_started()"),this.raise_started()},add_ended:function(t){this.get_events().addHandler("ended",t)},remove_ended:function(t){this.get_events().removeHandler("ended",t)},raise_ended:function(){var t=this.get_events().getHandler("ended");t&&t(this,Sys.EventArgs.Empty)},raiseEnded:function(){Sys.Extended.Deprecated("raiseEnded()","raise_ended()"),this.raise_ended()},add_step:function(t){this.get_events().addHandler("step",t)},remove_step:function(t){this.get_events().removeHandler("step",t)},raise_step:function(){var t=this.get_events().getHandler("step");t&&t(this,Sys.EventArgs.Empty)},raiseStep:function(){Sys.Extended.Deprecated("raiseStep()","raise_step()"),this.raise_ended()},get_target:function(){return!this._target&&this._parentAnimation?this._parentAnimation.get_target():this._target},set_target:function(t){this._target!=t&&(this._target=t,this.raisePropertyChanged("target"))},setAnimationTarget:function(t){var i=null,e=$get(t);if(e)i=e;else{var n=$find(t);n&&(e=n.get_element(),e&&(i=e))}if(!i)throw Error.argument("id",String.format(Sys.Extended.UI.Resources.Animation_TargetNotFound,t));this.set_target(i)},set_animationTarget:function(t){Sys.Extended.Deprecated("setAnimationTarget(id)","set_animationTarget(id)"),this.setAnimationTarget(t)},get_duration:function(){return this._duration},set_duration:function(t){t=this._getFloat(t),this._duration!=t&&(this._duration=t,this.raisePropertyChanged("duration"))},get_fps:function(){return this._fps},set_fps:function(t){t=this._getInteger(t),this.fps!=t&&(this._fps=t,this.raisePropertyChanged("fps"))},get_isActive:function(){return null!==this._timer},get_isPlaying:function(){return null!==this._timer&&this._timer.get_enabled()},get_percentComplete:function(){return this._percentComplete},_getBoolean:function(t){return String.isInstanceOfType(t)?Boolean.parse(t):t},_getInteger:function(t){return String.isInstanceOfType(t)?parseInt(t):t},_getFloat:function(t){return String.isInstanceOfType(t)?parseFloat(t):t},_getEnum:function(t,i){return String.isInstanceOfType(t)&&i&&i.parse?i.parse(t):t}},$AA.Animation.registerClass("Sys.Extended.UI.Animation.Animation",Sys.Component),$AA.registerAnimation("animation",$AA.Animation),$AA.ParentAnimation=function(t,i,e,n){if($AA.ParentAnimation.initializeBase(this,[t,i,e]),this._animations=[],n&&n.length)for(var a=0;a=0;t--)this._animations[t].dispose(),this._animations[t]=null;Array.clear(this._animations),this._animations=[],this.raisePropertyChanged("animations")}}},$AA.ParentAnimation.registerClass("Sys.Extended.UI.Animation.ParentAnimation",$AA.Animation),$AA.registerAnimation("parent",$AA.ParentAnimation),$AA.ParallelAnimation=function(t,i,e,n){$AA.ParallelAnimation.initializeBase(this,[t,i,e,n])},$AA.ParallelAnimation.prototype={add:function(t){$AA.ParallelAnimation.callBaseMethod(this,"add",[t]),t.setOwner(this)},onStart:function(){$AA.ParallelAnimation.callBaseMethod(this,"onStart");for(var t=this.get_animations(),i=0;i=1||this._iterations<=0){this._remainingIterations--,this._index=0;var n=t[0];n.add_ended(this._handler),n.play()}else this.stop()},onStep:function(t){throw Error.invalidOperation(Sys.Extended.UI.Resources.Animation_CannotNestSequence)},onEnd:function(){this._remainingIterations=0,$AA.SequenceAnimation.callBaseMethod(this,"onEnd")},get_isActive:function(){return!0},get_isPlaying:function(){return this._playing&&!this._paused},get_iterations:function(){return this._iterations},set_iterations:function(t){t=this._getInteger(t),this._iterations!=t&&(this._iterations=t,this.raisePropertyChanged("iterations"))},get_isInfinite:function(){return this._iterations<=0}},$AA.SequenceAnimation.registerClass("Sys.Extended.UI.Animation.SequenceAnimation",$AA.ParentAnimation),$AA.registerAnimation("sequence",$AA.SequenceAnimation),$AA.SelectionAnimation=function(t,i,e,n){$AA.SelectionAnimation.initializeBase(this,[t,i,e,n]),this._selectedIndex=-1,this._selected=null},$AA.SelectionAnimation.prototype={getSelectedIndex:function(){throw Error.notImplemented()},onStart:function(){$AA.SelectionAnimation.callBaseMethod(this,"onStart");var t=this.get_animations();this._selectedIndex=this.getSelectedIndex(),this._selectedIndex>=0&&this._selectedIndex0)try{selected=eval(this._conditionScript)?0:1}catch(t){}return selected},get_conditionScript:function(){return this._conditionScript},set_conditionScript:function(t){this._conditionScript!=t&&(this._conditionScript=t,this.raisePropertyChanged("conditionScript"))}},$AA.ConditionAnimation.registerClass("Sys.Extended.UI.Animation.ConditionAnimation",$AA.SelectionAnimation),$AA.registerAnimation("condition",$AA.ConditionAnimation),$AA.CaseAnimation=function(t,i,e,n,a){$AA.CaseAnimation.initializeBase(this,[t,i,e,n]),this._selectScript=a},$AA.CaseAnimation.prototype={getSelectedIndex:function(){var selected=-1;if(this._selectScript&&this._selectScript.length>0)try{var result=eval(this._selectScript);void 0!==result&&(selected=result)}catch(t){}return selected},get_selectScript:function(){return this._selectScript},set_selectScript:function(t){this._selectScript!=t&&(this._selectScript=t,this.raisePropertyChanged("selectScript"))}},$AA.CaseAnimation.registerClass("Sys.Extended.UI.Animation.CaseAnimation",$AA.SelectionAnimation),$AA.registerAnimation("case",$AA.CaseAnimation),$AA.FadeEffect=function(){throw Error.invalidOperation()},$AA.FadeEffect.prototype={FadeIn:0,FadeOut:1},$AA.FadeEffect.registerEnum("Sys.Extended.UI.Animation.FadeEffect",!1),$AA.FadeAnimation=function(t,i,e,n,a,s,o){$AA.FadeAnimation.initializeBase(this,[t,i,e]),this._effect=void 0!==n?n:$AA.FadeEffect.FadeIn,this._max=void 0!==s?s:1,this._min=void 0!==a?a:0,this._start=this._min,this._end=this._max,this._layoutCreated=!1,this._forceLayoutInIE=void 0===o||null===o||o,this._currentTarget=null,this._resetOpacities()},$AA.FadeAnimation.prototype={_resetOpacities:function(){this._effect==$AA.FadeEffect.FadeIn?(this._start=this._min,this._end=this._max):(this._start=this._max,this._end=this._min)},_createLayout:function(){var t=this._currentTarget;if(t){this._originalWidth=$common.getCurrentStyle(t,"width");var i=$common.getCurrentStyle(t,"height");this._originalBackColor=$common.getCurrentStyle(t,"backgroundColor"),this._originalWidth&&""!=this._originalWidth&&"auto"!=this._originalWidth||i&&""!=i&&"auto"!=i||(t.style.width=t.offsetWidth+"px"),this._originalBackColor&&""!=this._originalBackColor&&"transparent"!=this._originalBackColor&&"rgba(0, 0, 0, 0)"!=this._originalBackColor||(t.style.backgroundColor=$common.getInheritedBackgroundColor(t)),this._layoutCreated=!0}},onStart:function(){$AA.FadeAnimation.callBaseMethod(this,"onStart"),this._currentTarget=this.get_target(),this.setValue(this._start),this._forceLayoutInIE&&!this._layoutCreated&&Sys.Browser.agent==Sys.Browser.InternetExplorer&&this._createLayout()},getAnimatedValue:function(t){return this.interpolate(this._start,this._end,t)},setValue:function(t){this._currentTarget&&$common.setElementOpacity(this._currentTarget,t)},get_effect:function(){return this._effect},set_effect:function(t){t=this._getEnum(t,$AA.FadeEffect),this._effect!=t&&(this._effect=t,this._resetOpacities(),this.raisePropertyChanged("effect"))},get_minimumOpacity:function(){return this._min},set_minimumOpacity:function(t){t=this._getFloat(t),this._min!=t&&(this._min=t,this._resetOpacities(),this.raisePropertyChanged("minimumOpacity"))},get_maximumOpacity:function(){return this._max},set_maximumOpacity:function(t){t=this._getFloat(t),this._max!=t&&(this._max=t,this._resetOpacities(),this.raisePropertyChanged("maximumOpacity"))},get_forceLayoutInIE:function(){return this._forceLayoutInIE},set_forceLayoutInIE:function(t){t=this._getBoolean(t),this._forceLayoutInIE!=t&&(this._forceLayoutInIE=t,this.raisePropertyChanged("forceLayoutInIE"))},setStartValue:function(t){t=this._getFloat(t),this._start=t},set_startValue:function(t){Sys.Extended.Deprecated("setStartValue(value)","set_startValue(value)"),this.setStartValue(t)}},$AA.FadeAnimation.registerClass("Sys.Extended.UI.Animation.FadeAnimation",$AA.Animation),$AA.registerAnimation("fade",$AA.FadeAnimation),$AA.FadeInAnimation=function(t,i,e,n,a,s){$AA.FadeInAnimation.initializeBase(this,[t,i,e,$AA.FadeEffect.FadeIn,n,a,s])},$AA.FadeInAnimation.prototype={onStart:function(){$AA.FadeInAnimation.callBaseMethod(this,"onStart"),this._currentTarget&&this.set_startValue($common.getElementOpacity(this._currentTarget))}},$AA.FadeInAnimation.registerClass("Sys.Extended.UI.Animation.FadeInAnimation",$AA.FadeAnimation),$AA.registerAnimation("fadeIn",$AA.FadeInAnimation),$AA.FadeOutAnimation=function(t,i,e,n,a,s){$AA.FadeOutAnimation.initializeBase(this,[t,i,e,$AA.FadeEffect.FadeOut,n,a,s])},$AA.FadeOutAnimation.prototype={onStart:function(){$AA.FadeOutAnimation.callBaseMethod(this,"onStart"),this._currentTarget&&this.set_startValue($common.getElementOpacity(this._currentTarget))}},$AA.FadeOutAnimation.registerClass("Sys.Extended.UI.Animation.FadeOutAnimation",$AA.FadeAnimation),$AA.registerAnimation("fadeOut",$AA.FadeOutAnimation),$AA.PulseAnimation=function(t,i,e,n,a,s,o){$AA.PulseAnimation.initializeBase(this,[t,i,e,null,void 0!==n?n:3]),this._out=new $AA.FadeOutAnimation(t,i,e,a,s,o),this.add(this._out),this._in=new $AA.FadeInAnimation(t,i,e,a,s,o),this.add(this._in)},$AA.PulseAnimation.prototype={get_minimumOpacity:function(){return this._out.get_minimumOpacity()},set_minimumOpacity:function(t){t=this._getFloat(t),this._out.set_minimumOpacity(t),this._in.set_minimumOpacity(t),this.raisePropertyChanged("minimumOpacity")},get_maximumOpacity:function(){return this._out.get_maximumOpacity()},set_maximumOpacity:function(t){t=this._getFloat(t),this._out.set_maximumOpacity(t),this._in.set_maximumOpacity(t),this.raisePropertyChanged("maximumOpacity")},get_forceLayoutInIE:function(){return this._out.get_forceLayoutInIE()},set_forceLayoutInIE:function(t){t=this._getBoolean(t),this._out.set_forceLayoutInIE(t),this._in.set_forceLayoutInIE(t),this.raisePropertyChanged("forceLayoutInIE")},setDuration:function(t){t=this._getFloat(t),$AA.PulseAnimation.callBaseMethod(this,"set_duration",[t]),this._in.set_duration(t),this._out.set_duration(t)},set_duration:function(t){Sys.Extended.Deprecated("setDuration(value)","set_duration(value)"),this.setDuration(t)},setFps:function(t){t=this._getInteger(t),$AA.PulseAnimation.callBaseMethod(this,"set_fps",[t]),this._in.set_fps(t),this._out.set_fps(t)},set_fps:function(t){Sys.Extended.Deprecated("setFps(value)","set_fps(value)"),this.setFps(t)}},$AA.PulseAnimation.registerClass("Sys.Extended.UI.Animation.PulseAnimation",$AA.SequenceAnimation),$AA.registerAnimation("pulse",$AA.PulseAnimation),$AA.PropertyAnimation=function(t,i,e,n,a){$AA.PropertyAnimation.initializeBase(this,[t,i,e]),this._property=n,this._propertyKey=a,this._currentTarget=null},$AA.PropertyAnimation.prototype={onStart:function(){$AA.PropertyAnimation.callBaseMethod(this,"onStart"),this._currentTarget=this.get_target()},setValue:function(t){var i=this._currentTarget;i&&this._property&&this._property.length>0&&(this._propertyKey&&this._propertyKey.length>0&&i[this._property]?i[this._property][this._propertyKey]=t:i[this._property]=t)},getValue:function(){var t=this.get_target();if(t&&this._property&&this._property.length>0){var i=t[this._property];if(i)return this._propertyKey&&this._propertyKey.length>0?i[this._propertyKey]:i}return null},get_property:function(){return this._property},set_property:function(t){this._property!=t&&(this._property=t,this.raisePropertyChanged("property"))},get_propertyKey:function(){return this._propertyKey},set_propertyKey:function(t){this._propertyKey!=t&&(this._propertyKey=t,this.raisePropertyChanged("propertyKey"))}},$AA.PropertyAnimation.registerClass("Sys.Extended.UI.Animation.PropertyAnimation",$AA.Animation),$AA.registerAnimation("property",$AA.PropertyAnimation),$AA.DiscreteAnimation=function(t,i,e,n,a,s){$AA.DiscreteAnimation.initializeBase(this,[t,i,e,n,a]),this._values=s&&s.length?s:[]},$AA.DiscreteAnimation.prototype={getAnimatedValue:function(t){var i=Math.floor(this.interpolate(0,this._values.length-1,t));return this._values[i]},get_values:function(){return this._values},set_values:function(t){this._values!=t&&(this._values=t,this.raisePropertyChanged("values"))}},$AA.DiscreteAnimation.registerClass("Sys.Extended.UI.Animation.DiscreteAnimation",$AA.PropertyAnimation),$AA.registerAnimation("discrete",$AA.DiscreteAnimation),$AA.InterpolatedAnimation=function(t,i,e,n,a,s,o){$AA.InterpolatedAnimation.initializeBase(this,[t,i,e,void 0!==n?n:"style",a]),this._startValue=s,this._endValue=o},$AA.InterpolatedAnimation.prototype={get_startValue:function(){return this._startValue},set_startValue:function(t){t=this._getFloat(t),this._startValue!=t&&(this._startValue=t,this.raisePropertyChanged("startValue"))},get_endValue:function(){return this._endValue},set_endValue:function(t){t=this._getFloat(t),this._endValue!=t&&(this._endValue=t,this.raisePropertyChanged("endValue"))}},$AA.InterpolatedAnimation.registerClass("Sys.Extended.UI.Animation.InterpolatedAnimation",$AA.PropertyAnimation),$AA.registerAnimation("interpolated",$AA.InterpolatedAnimation),$AA.ColorAnimation=function(t,i,e,n,a,s,o){$AA.ColorAnimation.initializeBase(this,[t,i,e,n,a,s,o]),this._start=null,this._end=null,this._interpolateRed=!1,this._interpolateGreen=!1,this._interpolateBlue=!1},$AA.ColorAnimation.prototype={onStart:function(){$AA.ColorAnimation.callBaseMethod(this,"onStart"),this._start=$AA.ColorAnimation.getRGB(this.get_startValue()),this._end=$AA.ColorAnimation.getRGB(this.get_endValue()),this._interpolateRed=this._start.Red!=this._end.Red,this._interpolateGreen=this._start.Green!=this._end.Green,this._interpolateBlue=this._start.Blue!=this._end.Blue},getAnimatedValue:function(t){var i=this._start.Red,e=this._start.Green,n=this._start.Blue;return this._interpolateRed&&(i=Math.round(this.interpolate(i,this._end.Red,t))),this._interpolateGreen&&(e=Math.round(this.interpolate(e,this._end.Green,t))),this._interpolateBlue&&(n=Math.round(this.interpolate(n,this._end.Blue,t))),$AA.ColorAnimation.toColor(i,e,n)},set_startValue:function(t){this._startValue!=t&&(this._startValue=t,this.raisePropertyChanged("startValue"))},set_endValue:function(t){this._endValue!=t&&(this._endValue=t,this.raisePropertyChanged("endValue"))}},$AA.ColorAnimation.getRGB=function(t){if(!t||7!=t.length)throw String.format(Sys.Extended.UI.Resources.Animation_InvalidColor,t);return{Red:parseInt(t.substr(1,2),16),Green:parseInt(t.substr(3,2),16),Blue:parseInt(t.substr(5,2),16)}},$AA.ColorAnimation.toColor=function(t,i,e){var n=t.toString(16),a=i.toString(16),s=e.toString(16);return 1==n.length&&(n="0"+n),1==a.length&&(a="0"+a),1==s.length&&(s="0"+s),"#"+n+a+s},$AA.ColorAnimation.registerClass("Sys.Extended.UI.Animation.ColorAnimation",$AA.InterpolatedAnimation),$AA.registerAnimation("color",$AA.ColorAnimation),$AA.LengthAnimation=function(t,i,e,n,a,s,o,r){$AA.LengthAnimation.initializeBase(this,[t,i,e,n,a,s,o]),this._unit=null!=r?r:"px"},$AA.LengthAnimation.prototype={getAnimatedValue:function(t){var i=this.interpolate(this.get_startValue(),this.get_endValue(),t);return Math.round(i)+this._unit},get_unit:function(){return this._unit},set_unit:function(t){this._unit!=t&&(this._unit=t,this.raisePropertyChanged("unit"))}},$AA.LengthAnimation.registerClass("Sys.Extended.UI.Animation.LengthAnimation",$AA.InterpolatedAnimation),$AA.registerAnimation("length",$AA.LengthAnimation),$AA.MoveAnimation=function(t,i,e,n,a,s,o){$AA.MoveAnimation.initializeBase(this,[t,i,e,null]),this._horizontal=n?n:0,this._vertical=a?a:0,this._relative=void 0===s||s,this._horizontalAnimation=new $AA.LengthAnimation(t,i,e,"style","left",null,null,o),this._verticalAnimation=new $AA.LengthAnimation(t,i,e,"style","top",null,null,o),this.add(this._verticalAnimation),this.add(this._horizontalAnimation)},$AA.MoveAnimation.prototype={onStart:function(){$AA.MoveAnimation.callBaseMethod(this,"onStart");var t=this.get_target();this._horizontalAnimation.set_startValue(t.offsetLeft),this._horizontalAnimation.set_endValue(this._relative?t.offsetLeft+this._horizontal:this._horizontal),this._verticalAnimation.set_startValue(t.offsetTop),this._verticalAnimation.set_endValue(this._relative?t.offsetTop+this._vertical:this._vertical)},get_horizontal:function(){return this._horizontal},set_horizontal:function(t){t=this._getFloat(t),this._horizontal!=t&&(this._horizontal=t,this.raisePropertyChanged("horizontal"))},get_vertical:function(){return this._vertical},set_vertical:function(t){t=this._getFloat(t),this._vertical!=t&&(this._vertical=t,this.raisePropertyChanged("vertical"))},get_relative:function(){return this._relative},set_relative:function(t){t=this._getBoolean(t),this._relative!=t&&(this._relative=t,this.raisePropertyChanged("relative"))},get_unit:function(){this._horizontalAnimation.get_unit()},set_unit:function(t){var i=this._horizontalAnimation.get_unit();i!=t&&(this._horizontalAnimation.set_unit(t),this._verticalAnimation.set_unit(t),this.raisePropertyChanged("unit"))}},$AA.MoveAnimation.registerClass("Sys.Extended.UI.Animation.MoveAnimation",$AA.ParallelAnimation),$AA.registerAnimation("move",$AA.MoveAnimation),$AA.ResizeAnimation=function(t,i,e,n,a,s){$AA.ResizeAnimation.initializeBase(this,[t,i,e,null]),this._width=n,this._height=a,this._horizontalAnimation=new $AA.LengthAnimation(t,i,e,"style","width",null,null,s),this._verticalAnimation=new $AA.LengthAnimation(t,i,e,"style","height",null,null,s),this.add(this._horizontalAnimation),this.add(this._verticalAnimation)},$AA.ResizeAnimation.prototype={onStart:function(){$AA.ResizeAnimation.callBaseMethod(this,"onStart");var t=this.get_target();this._horizontalAnimation.set_startValue(t.offsetWidth),this._verticalAnimation.set_startValue(t.offsetHeight),this._horizontalAnimation.set_endValue(null!==this._width&&void 0!==this._width?this._width:t.offsetWidth),this._verticalAnimation.set_endValue(null!==this._height&&void 0!==this._height?this._height:t.offsetHeight)},get_width:function(){return this._width},set_width:function(t){t=this._getFloat(t),this._width!=t&&(this._width=t,this.raisePropertyChanged("width"))},get_height:function(){return this._height},set_height:function(t){t=this._getFloat(t),this._height!=t&&(this._height=t,this.raisePropertyChanged("height"))},get_unit:function(){this._horizontalAnimation.get_unit()},set_unit:function(t){var i=this._horizontalAnimation.get_unit();i!=t&&(this._horizontalAnimation.set_unit(t),this._verticalAnimation.set_unit(t),this.raisePropertyChanged("unit"))}},$AA.ResizeAnimation.registerClass("Sys.Extended.UI.Animation.ResizeAnimation",$AA.ParallelAnimation),$AA.registerAnimation("resize",$AA.ResizeAnimation),$AA.ScaleAnimation=function(t,i,e,n,a,s,o,r){$AA.ScaleAnimation.initializeBase(this,[t,i,e]),this._scaleFactor=void 0!==n?n:1,this._unit=void 0!==a?a:"px",this._center=s,this._scaleFont=o,this._fontUnit=void 0!==r?r:"pt",this._element=null,this._initialHeight=null,this._initialWidth=null,this._initialTop=null,this._initialLeft=null,this._initialFontSize=null},$AA.ScaleAnimation.prototype={getAnimatedValue:function(t){return this.interpolate(1,this._scaleFactor,t)},onStart:function(){$AA.ScaleAnimation.callBaseMethod(this,"onStart"),this._element=this.get_target(),this._element&&(this._initialHeight=this._element.offsetHeight,this._initialWidth=this._element.offsetWidth,this._center&&(this._initialTop=this._element.offsetTop,this._initialLeft=this._element.offsetLeft),this._scaleFont&&(this._initialFontSize=parseFloat($common.getCurrentStyle(this._element,"fontSize"))))},setValue:function(t){if(this._element){var i=Math.round(this._initialWidth*t),e=Math.round(this._initialHeight*t);if(this._element.style.width=i+this._unit,this._element.style.height=e+this._unit,this._center&&(this._element.style.top=this._initialTop+Math.round((this._initialHeight-e)/2)+this._unit,this._element.style.left=this._initialLeft+Math.round((this._initialWidth-i)/2)+this._unit),this._scaleFont){var n=this._initialFontSize*t;"px"!=this._fontUnit&&"pt"!=this._fontUnit||(n=Math.round(n)),this._element.style.fontSize=n+this._fontUnit}}},onEnd:function(){this._element=null,this._initialHeight=null,this._initialWidth=null,this._initialTop=null,this._initialLeft=null,this._initialFontSize=null,$AA.ScaleAnimation.callBaseMethod(this,"onEnd")},get_scaleFactor:function(){return this._scaleFactor},set_scaleFactor:function(t){t=this._getFloat(t),this._scaleFactor!=t&&(this._scaleFactor=t,this.raisePropertyChanged("scaleFactor"))},get_unit:function(){return this._unit},set_unit:function(t){this._unit!=t&&(this._unit=t,this.raisePropertyChanged("unit"))},get_center:function(){return this._center},set_center:function(t){t=this._getBoolean(t),this._center!=t&&(this._center=t,this.raisePropertyChanged("center"))},get_scaleFont:function(){return this._scaleFont},set_scaleFont:function(t){t=this._getBoolean(t),this._scaleFont!=t&&(this._scaleFont=t,this.raisePropertyChanged("scaleFont"))},get_fontUnit:function(){return this._fontUnit},set_fontUnit:function(t){this._fontUnit!=t&&(this._fontUnit=t,this.raisePropertyChanged("fontUnit"))}},$AA.ScaleAnimation.registerClass("Sys.Extended.UI.Animation.ScaleAnimation",$AA.Animation),$AA.registerAnimation("scale",$AA.ScaleAnimation),$AA.Action=function(t,i,e){$AA.Action.initializeBase(this,[t,i,e]),void 0===i&&this.set_duration(0)},$AA.Action.prototype={onEnd:function(){this.doAction(),$AA.Action.callBaseMethod(this,"onEnd")},doAction:function(){throw Error.notImplemented()},getAnimatedValue:function(){},setValue:function(){}},$AA.Action.registerClass("Sys.Extended.UI.Animation.Action",$AA.Animation),$AA.registerAnimation("action",$AA.Action),$AA.EnableAction=function(t,i,e,n){$AA.EnableAction.initializeBase(this,[t,i,e]),this._enabled=void 0===n||n},$AA.EnableAction.prototype={doAction:function(){var t=this.get_target();t&&(t.disabled=!this._enabled)},get_enabled:function(){return this._enabled},set_enabled:function(t){t=this._getBoolean(t),this._enabled!=t&&(this._enabled=t,this.raisePropertyChanged("enabled"))}},$AA.EnableAction.registerClass("Sys.Extended.UI.Animation.EnableAction",$AA.Action),$AA.registerAnimation("enableAction",$AA.EnableAction),$AA.HideAction=function(t,i,e,n){$AA.HideAction.initializeBase(this,[t,i,e]),this._visible=n},$AA.HideAction.prototype={doAction:function(){var t=this.get_target();t&&$common.setVisible(t,this._visible)},get_visible:function(){return this._visible},set_visible:function(t){this._visible!=t&&(this._visible=t,this.raisePropertyChanged("visible"))}},$AA.HideAction.registerClass("Sys.Extended.UI.Animation.HideAction",$AA.Action),$AA.registerAnimation("hideAction",$AA.HideAction),$AA.StyleAction=function(t,i,e,n,a){$AA.StyleAction.initializeBase(this,[t,i,e]),this._attribute=n,this._value=a},$AA.StyleAction.prototype={doAction:function(){var t=this.get_target();t&&(t.style[this._attribute]=this._value)},get_attribute:function(){return this._attribute},set_attribute:function(t){this._attribute!=t&&(this._attribute=t,this.raisePropertyChanged("attribute"))},get_value:function(){return this._value},set_value:function(t){this._value!=t&&(this._value=t,this.raisePropertyChanged("value"))}},$AA.StyleAction.registerClass("Sys.Extended.UI.Animation.StyleAction",$AA.Action),$AA.registerAnimation("styleAction",$AA.StyleAction),$AA.OpacityAction=function(t,i,e,n){$AA.OpacityAction.initializeBase(this,[t,i,e]),this._opacity=n},$AA.OpacityAction.prototype={doAction:function(){var t=this.get_target(); t&&$common.setElementOpacity(t,this._opacity)},get_opacity:function(){return this._opacity},set_opacity:function(t){t=this._getFloat(t),this._opacity!=t&&(this._opacity=t,this.raisePropertyChanged("opacity"))}},$AA.OpacityAction.registerClass("Sys.Extended.UI.Animation.OpacityAction",$AA.Action),$AA.registerAnimation("opacityAction",$AA.OpacityAction),$AA.ScriptAction=function(t,i,e,n){$AA.ScriptAction.initializeBase(this,[t,i,e]),this._script=n},$AA.ScriptAction.prototype={doAction:function(){try{eval(this._script)}catch(t){}},get_script:function(){return this._script},set_script:function(t){this._script!=t&&(this._script=t,this.raisePropertyChanged("script"))}},$AA.ScriptAction.registerClass("Sys.Extended.UI.Animation.ScriptAction",$AA.Action),$AA.registerAnimation("scriptAction",$AA.ScriptAction);var $AA; /* END AnimationScripts.js */ /* START BaseScripts.js */ Type.registerNamespace("Sys.Extended.UI"),Sys.Extended.UI.BehaviorBase=function(e){Sys.Extended.UI.BehaviorBase.initializeBase(this,[e]),this._clientStateFieldID=null,this._pageRequestManager=null,this._partialUpdateBeginRequestHandler=null,this._partialUpdateEndRequestHandler=null},Sys.Extended.UI.BehaviorBase.prototype={initialize:function(){Sys.Extended.UI.BehaviorBase.callBaseMethod(this,"initialize")},dispose:function(){Sys.Extended.UI.BehaviorBase.callBaseMethod(this,"dispose"),this._pageRequestManager&&(this._partialUpdateBeginRequestHandler&&(this._pageRequestManager.remove_beginRequest(this._partialUpdateBeginRequestHandler),this._partialUpdateBeginRequestHandler=null),this._partialUpdateEndRequestHandler&&(this._pageRequestManager.remove_endRequest(this._partialUpdateEndRequestHandler),this._partialUpdateEndRequestHandler=null),this._pageRequestManager=null)},get_ClientStateFieldID:function(){return this._clientStateFieldID},set_ClientStateFieldID:function(e){this._clientStateFieldID!=e&&(this._clientStateFieldID=e,this.raisePropertyChanged("ClientStateFieldID"))},get_ClientState:function(){if(this._clientStateFieldID){var e=document.getElementById(this._clientStateFieldID);if(e)return e.value}return null},set_ClientState:function(e){if(this._clientStateFieldID){var t=document.getElementById(this._clientStateFieldID);t&&(t.value=e)}},registerPartialUpdateEvents:function(){Sys&&Sys.WebForms&&Sys.WebForms.PageRequestManager&&(this._pageRequestManager=Sys.WebForms.PageRequestManager.getInstance(),this._pageRequestManager&&(this._partialUpdateBeginRequestHandler=Function.createDelegate(this,this._partialUpdateBeginRequest),this._pageRequestManager.add_beginRequest(this._partialUpdateBeginRequestHandler),this._partialUpdateEndRequestHandler=Function.createDelegate(this,this._partialUpdateEndRequest),this._pageRequestManager.add_endRequest(this._partialUpdateEndRequestHandler)))},_partialUpdateBeginRequest:function(e,t){},_partialUpdateEndRequest:function(e,t){}},Sys.Extended.UI.BehaviorBase.registerClass("Sys.Extended.UI.BehaviorBase",Sys.UI.Behavior),Sys.Extended.UI.DynamicPopulateBehaviorBase=function(e){Sys.Extended.UI.DynamicPopulateBehaviorBase.initializeBase(this,[e]),this._DynamicControlID=null,this._DynamicContextKey=null,this._DynamicServicePath=null,this._DynamicServiceMethod=null,this._cacheDynamicResults=!1,this._dynamicPopulateBehavior=null,this._populatingHandler=null,this._populatedHandler=null},Sys.Extended.UI.DynamicPopulateBehaviorBase.prototype={initialize:function(){Sys.Extended.UI.DynamicPopulateBehaviorBase.callBaseMethod(this,"initialize"),this._populatingHandler=Function.createDelegate(this,this._onPopulating),this._populatedHandler=Function.createDelegate(this,this._onPopulated)},dispose:function(){this._populatedHandler&&(this._dynamicPopulateBehavior&&this._dynamicPopulateBehavior.remove_populated(this._populatedHandler),this._populatedHandler=null),this._populatingHandler&&(this._dynamicPopulateBehavior&&this._dynamicPopulateBehavior.remove_populating(this._populatingHandler),this._populatingHandler=null),this._dynamicPopulateBehavior&&(this._dynamicPopulateBehavior.dispose(),this._dynamicPopulateBehavior=null),Sys.Extended.UI.DynamicPopulateBehaviorBase.callBaseMethod(this,"dispose")},populate:function(e){this._dynamicPopulateBehavior&&this._dynamicPopulateBehavior.get_element()!=$get(this._DynamicControlID)&&(this._dynamicPopulateBehavior.dispose(),this._dynamicPopulateBehavior=null),!this._dynamicPopulateBehavior&&this._DynamicControlID&&this._DynamicServiceMethod&&(this._dynamicPopulateBehavior=$create(Sys.Extended.UI.DynamicPopulateBehavior,{id:this.get_id()+"_DynamicPopulateBehavior",ContextKey:this._DynamicContextKey,ServicePath:this._DynamicServicePath,ServiceMethod:this._DynamicServiceMethod,cacheDynamicResults:this._cacheDynamicResults},null,null,$get(this._DynamicControlID)),this._dynamicPopulateBehavior.add_populating(this._populatingHandler),this._dynamicPopulateBehavior.add_populated(this._populatedHandler)),this._dynamicPopulateBehavior&&this._dynamicPopulateBehavior.populate(e?e:this._DynamicContextKey)},_onPopulating:function(e,t){this.raisePopulating(t)},_onPopulated:function(e,t){this.raisePopulated(t)},get_dynamicControlID:function(){return this._DynamicControlID},get_DynamicControlID:this.get_dynamicControlID,set_dynamicControlID:function(e){this._DynamicControlID!=e&&(this._DynamicControlID=e,this.raisePropertyChanged("dynamicControlID"),this.raisePropertyChanged("DynamicControlID"))},set_DynamicControlID:this.set_dynamicControlID,get_dynamicContextKey:function(){return this._DynamicContextKey},get_DynamicContextKey:this.get_dynamicContextKey,set_dynamicContextKey:function(e){this._DynamicContextKey!=e&&(this._DynamicContextKey=e,this.raisePropertyChanged("dynamicContextKey"),this.raisePropertyChanged("DynamicContextKey"))},set_DynamicContextKey:this.set_dynamicContextKey,get_dynamicServicePath:function(){return this._DynamicServicePath},get_DynamicServicePath:this.get_dynamicServicePath,set_dynamicServicePath:function(e){this._DynamicServicePath!=e&&(this._DynamicServicePath=e,this.raisePropertyChanged("dynamicServicePath"),this.raisePropertyChanged("DynamicServicePath"))},set_DynamicServicePath:this.set_dynamicServicePath,get_dynamicServiceMethod:function(){return this._DynamicServiceMethod},get_DynamicServiceMethod:this.get_dynamicServiceMethod,set_dynamicServiceMethod:function(e){this._DynamicServiceMethod!=e&&(this._DynamicServiceMethod=e,this.raisePropertyChanged("dynamicServiceMethod"),this.raisePropertyChanged("DynamicServiceMethod"))},set_DynamicServiceMethod:this.set_dynamicServiceMethod,get_cacheDynamicResults:function(){return this._cacheDynamicResults},set_cacheDynamicResults:function(e){this._cacheDynamicResults!=e&&(this._cacheDynamicResults=e,this.raisePropertyChanged("cacheDynamicResults"))},add_populated:function(e){this.get_events().addHandler("populated",e)},remove_populated:function(e){this.get_events().removeHandler("populated",e)},raisePopulated:function(e){var t=this.get_events().getHandler("populated");t&&t(this,e)},add_populating:function(e){this.get_events().addHandler("populating",e)},remove_populating:function(e){this.get_events().removeHandler("populating",e)},raisePopulating:function(e){var t=this.get_events().getHandler("populating");t&&t(this,e)}},Sys.Extended.UI.DynamicPopulateBehaviorBase.registerClass("Sys.Extended.UI.DynamicPopulateBehaviorBase",Sys.Extended.UI.BehaviorBase),Sys.Extended.UI.ControlBase=function(e){Sys.Extended.UI.ControlBase.initializeBase(this,[e]),this._clientStateField=null,this._callbackTarget=null,this._onsubmit$delegate=Function.createDelegate(this,this._onsubmit),this._oncomplete$delegate=Function.createDelegate(this,this._oncomplete),this._onerror$delegate=Function.createDelegate(this,this._onerror)},Sys.Extended.UI.ControlBase.__doPostBack=function(e,t){if(!Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack())for(var i=0;id.x+d.width||e.xe.altX&&(o=e.x);else if(d.width+d.x-e.altXe.altX?Math.abs(d.x-e.x):d.x-e.x;hd.y+d.height||e.yn-d.height-d.y+e.y&&(s=e.y):d.height+d.y-e.altY';",t.style.position="absolute",t.style.display="none",t.scrolling="no",t.frameBorder="0",t.tabIndex="-1",t.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)",e.parentNode.insertBefore(t,e),e._hideWindowedElementsIFrame=t,this._moveHandler=Function.createDelegate(this,this._onMove),Sys.UI.DomEvent.addHandler(e,"move",this._moveHandler)),$common.setBounds(t,$common.getBounds(e)),t.style.left=e.style.left,t.style.top=e.style.top,t.style.display=e.style.display,e.currentStyle&&e.currentStyle.zIndex?t.style.zIndex=e.currentStyle.zIndex:e.style.zIndex&&(t.style.zIndex=e.style.zIndex)}},setupPopup:function(){var e=this.get_element(),t=this.getBounds();$common.setLocation(e,t),this.adjustPopupPosition(t),e.style.zIndex=Sys.Extended.UI.zIndex.Popup,this.addBackgroundIFrame()},_hidePopup:function(){var e=this.get_element();$common.setVisible(e,!1),e.originalWidth&&(e.style.width=e.originalWidth+"px",e.originalWidth=null)},_hideCleanup:function(){var e=this.get_element();if(this._moveHandler&&(Sys.UI.DomEvent.removeHandler(e,"move",this._moveHandler),this._moveHandler=null),Sys.Browser.agent===Sys.Browser.InternetExplorer){var t=e._hideWindowedElementsIFrame;t&&(t.style.display="none")}this.raise_hidden(Sys.EventArgs.Empty)},_onMove:function(){var e=this.get_element();e._hideWindowedElementsIFrame&&(e.parentNode.insertBefore(e._hideWindowedElementsIFrame,e),e._hideWindowedElementsIFrame.style.top=e.style.top,e._hideWindowedElementsIFrame.style.left=e.style.left)},get_onShow:function(){return this._onShow?this._onShow.get_json():null},set_onShow:function(e){this._onShow||(this._onShow=new Sys.Extended.UI.Animation.GenericAnimationBehavior(this.get_element()),this._onShow.initialize()),this._onShow.set_json(e);var t=this._onShow.get_animation();t&&t.add_ended(this._onShowEndedHandler),this.raisePropertyChanged("onShow")},get_onShowBehavior:function(){return this._onShow},onShow:function(){this._onShow&&(this._onHide&&this._onHide.quit(),this._onShow.play())},_onShowEnded:function(){this.adjustPopupPosition(),this.addBackgroundIFrame(),this.raise_shown(Sys.EventArgs.Empty)},get_onHide:function(){return this._onHide?this._onHide.get_json():null},set_onHide:function(e){this._onHide||(this._onHide=new Sys.Extended.UI.Animation.GenericAnimationBehavior(this.get_element()),this._onHide.initialize()),this._onHide.set_json(e);var t=this._onHide.get_animation();t&&t.add_ended(this._onHideEndedHandler),this.raisePropertyChanged("onHide")},get_onHideBehavior:function(){return this._onHide},onHide:function(){this._onHide&&(this._onShow&&this._onShow.quit(),this._onHide.play())},_onHideEnded:function(){this._hideCleanup()},get_parentElement:function(){return!this._parentElement&&this._parentElementID&&this.set_parentElement($get(this._parentElementID)),this._parentElement},set_parentElement:function(e){this._parentElement=e,this.raisePropertyChanged("parentElement")},get_parentElementID:function(){return this._parentElement?this._parentElement.id:this._parentElementID},set_parentElementID:function(e){this._parentElementID=e,this.get_isInitialized()&&this.set_parentElement($get(e))},get_positioningMode:function(){return this._positioningMode},set_positioningMode:function(e){this._positioningMode=e,this.raisePropertyChanged("positioningMode")},get_x:function(){return this._x},set_x:function(e){e!=this._x&&(this._x=e,this._visible&&this.setupPopup(),this.raisePropertyChanged("x"))},get_y:function(){return this._y},set_y:function(e){e!=this._y&&(this._y=e,this._visible&&this.setupPopup(),this.raisePropertyChanged("y"))},get_visible:function(){return this._visible},add_showing:function(e){this.get_events().addHandler("showing",e)},remove_showing:function(e){this.get_events().removeHandler("showing",e)},raise_showing:function(e){var t=this.get_events().getHandler("showing");t&&t(this,e)},raiseShowing:function(e){Sys.Extended.Deprecated("raiseShowing(eventArgs)","raise_showing(eventArgs)"),this.raise_showing(e)},add_shown:function(e){this.get_events().addHandler("shown",e)},remove_shown:function(e){this.get_events().removeHandler("shown",e)},raise_shown:function(e){var t=this.get_events().getHandler("shown");t&&t(this,e)},raiseShown:function(e){Sys.Extended.Deprecated("raiseShown(eventArgs)","raise_shown(eventArgs)"),this.raise_shown(e)},add_hiding:function(e){this.get_events().addHandler("hiding",e)},remove_hiding:function(e){this.get_events().removeHandler("hiding",e)},raise_hiding:function(e){var t=this.get_events().getHandler("hiding");t&&t(this,e)},raiseHiding:function(e){Sys.Extended.Deprecated("raiseHiding(eventArgs)","raise_hiding(eventArgs)"),this.raise_hiding(e)},add_hidden:function(e){this.get_events().addHandler("hidden",e)},remove_hidden:function(e){this.get_events().removeHandler("hidden",e)},raise_hidden:function(e){var t=this.get_events().getHandler("hidden");t&&t(this,e)},raiseHidden:function(e){Sys.Extended.Deprecated("raiseHidden(eventArgs)","raise_hidden(eventArgs)"),this.raise_hidden(e)},get_unselectable:function(){return this._unselectable},set_unselectable:function(e){this._unselectable=e,this.raisePropertyChanged("unselectable")}},Sys.Extended.UI.PopupBehavior.registerClass("Sys.Extended.UI.PopupBehavior",Sys.Extended.UI.BehaviorBase),Sys.Extended.UI.PositioningMode=function(){throw Error.invalidOperation()},Sys.Extended.UI.PositioningMode.prototype={Absolute:0,Center:1,BottomLeft:2,BottomRight:3,TopLeft:4,TopRight:5,Right:6,Left:7},Sys.Extended.UI.PositioningMode.registerEnum("Sys.Extended.UI.PositioningMode"); /* END Popup.js */ /* START AutoComplete.js */ Type.registerNamespace("Sys.Extended.UI"),Sys.Extended.UI.AutoCompleteBehavior=function(e){Sys.Extended.UI.AutoCompleteBehavior.initializeBase(this,[e]),this._servicePath=null,this._serviceMethod=null,this._contextKey=null,this._useContextKey=!1,this._minimumPrefixLength=3,this._completionSetCount=10,this._completionInterval=1e3,this._completionListElementID=null,this._completionListElement=null,this._textColor="windowtext",this._textBackground="window",this._popupBehavior=null,this._popupBehaviorHiddenHandler=null,this._onShowJson=null,this._onHideJson=null,this._timer=null,this._cache=null,this._currentPrefix=null,this._selectIndex=-1,this._focusHandler=null,this._blurHandler=null,this._bodyClickHandler=null,this._clickHandler=null,this._completionListBlurHandler=null,this._keyDownHandler=null,this._mouseDownHandler=null,this._mouseUpHandler=null,this._mouseOverHandler=null,this._tickHandler=null,this._enableCaching=!0,this._flyoutHasFocus=!1,this._textBoxHasFocus=!1,this._completionListCssClass=null,this._completionListItemCssClass=null,this._highlightedItemCssClass=null,this._delimiterCharacters=null,this._firstRowSelected=!1,this._showOnlyCurrentWordInCompletionListItem=!1,this._webRequest=null},Sys.Extended.UI.AutoCompleteBehavior.prototype={initialize:function(){Sys.Extended.UI.AutoCompleteBehavior.callBaseMethod(this,"initialize"),$common.prepareHiddenElementForATDeviceUpdate(),this._popupBehaviorHiddenHandler=Function.createDelegate(this,this._popupHidden),this._tickHandler=Function.createDelegate(this,this._onTimerTick),this._focusHandler=Function.createDelegate(this,this._onGotFocus),this._blurHandler=Function.createDelegate(this,this._onLostFocus),this._keyDownHandler=Function.createDelegate(this,this._onKeyDown),this._mouseDownHandler=Function.createDelegate(this,this._onListMouseDown),this._mouseUpHandler=Function.createDelegate(this,this._onListMouseUp),this._mouseOverHandler=Function.createDelegate(this,this._onListMouseOver),this._completionListBlurHandler=Function.createDelegate(this,this._onCompletionListBlur),this._bodyClickHandler=Function.createDelegate(this,this._onCompletionListBlur),this._clickHandler=Function.createDelegate(this,this._onInputClick),this._timer=new Sys.Timer,this.initializeTimer(this._timer);var e=this.get_element();this.initializeTextBox(e),null!==this._completionListElementID&&(this._completionListElement=$get(this._completionListElementID)),null==this._completionListElement&&(this._completionListElement=document.createElement("ul"),this._completionListElement.id=this.get_id()+"_completionListElem",Sys.Browser.agent===Sys.Browser.Safari?document.body.appendChild(this._completionListElement):e.parentNode.insertBefore(this._completionListElement,e.nextSibling)),this.initializeCompletionList(this._completionListElement),this._popupBehavior=$create(Sys.Extended.UI.PopupBehavior,{id:this.get_id()+"PopupBehavior",parentElement:e,positioningMode:Sys.Extended.UI.PositioningMode.BottomLeft},null,null,this._completionListElement),this._popupBehavior.add_hidden(this._popupBehaviorHiddenHandler),this._onShowJson&&this._popupBehavior.set_onShow(this._onShowJson),this._onHideJson&&this._popupBehavior.set_onHide(this._onHideJson)},dispose:function(){this._onShowJson=null,this._onHideJson=null,this._popupBehavior&&(this._popupBehaviorHiddenHandler&&this._popupBehavior.remove_hidden(this._popupBehaviorHiddenHandler),this._popupBehavior.dispose(),this._popupBehavior=null),this._timer&&(this._timer.dispose(),this._timer=null);var e=this.get_element();e&&($removeHandler(e,"focus",this._focusHandler),$removeHandler(e,"blur",this._blurHandler),$removeHandler(e,"keydown",this._keyDownHandler),$removeHandler(e,"click",this._clickHandler),$removeHandler(this._completionListElement,"blur",this._completionListBlurHandler),$removeHandler(this._completionListElement,"mousedown",this._mouseDownHandler),$removeHandler(this._completionListElement,"mouseup",this._mouseUpHandler),$removeHandler(this._completionListElement,"mouseover",this._mouseOverHandler)),this._bodyClickHandler&&($removeHandler(document.body,"click",this._bodyClickHandler),this._bodyClickHandler=null),this._popupBehaviorHiddenHandler=null,this._tickHandler=null,this._focusHandler=null,this._blurHandler=null,this._clickHandler=null,this._keyDownHandler=null,this._completionListBlurHandler=null,this._mouseDownHandler=null,this._mouseUpHandler=null,this._mouseOverHandler=null,Sys.Extended.UI.AutoCompleteBehavior.callBaseMethod(this,"dispose")},initializeTimer:function(e){e.set_interval(this._completionInterval),e.add_tick(this._tickHandler)},initializeTextBox:function(e){e.autocomplete="off",$addHandler(e,"focus",this._focusHandler),$addHandler(e,"blur",this._blurHandler),$addHandler(e,"keydown",this._keyDownHandler),$addHandler(e,"click",this._clickHandler)},initializeCompletionList:function(e){if(this._completionListCssClass)Sys.UI.DomElement.addCssClass(e,this._completionListCssClass);else{var t=e.style;t.textAlign="left",t.visibility="hidden",t.cursor="default",t.listStyle="none",t.padding="0px",t.margin="0px! important",Sys.Browser.agent===Sys.Browser.Safari?(t.border="solid 1px gray",t.backgroundColor="white",t.color="black"):(t.border="solid 1px buttonshadow",t.backgroundColor=this._textBackground,t.color=this._textColor)}$addHandler(e,"mousedown",this._mouseDownHandler),$addHandler(e,"mouseup",this._mouseUpHandler),$addHandler(e,"mouseover",this._mouseOverHandler),$addHandler(e,"blur",this._completionListBlurHandler),$addHandler(document.body,"click",this._bodyClickHandler)},_onInputClick:function(e){e||(e=window.event),e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},_currentCompletionWord:function(){var e=this.get_element(),t=e.value,i=t;if(this.get_isMultiWord()){var s=this._getCurrentWordStartIndex(),n=this._getCurrentWordEndIndex(s);i=n<=s?t.substring(s):t.substring(s,n)}return i},_getCursorIndex:function(){return this.get_element().selectionStart},_getCurrentWordStartIndex:function(){for(var e=this.get_element(),t=e.value.substring(0,this._getCursorIndex()),i=0,s=-1,n=0;ns&&(s=o)}return i=s,i>=this._getCursorIndex()&&(i=0),i<0?0:i+1},_getCurrentWordEndIndex:function(e){for(var t=this.get_element(),i=t.value.substring(e),s=0,n=0;n0&&(o0&&(r=s.substring(0,n)),o>n&&(l=s.substring(o)),t=r+e+l}return t},_hideCompletionList:function(){var e=new Sys.CancelEventArgs;this.raise_hiding(e),e.get_cancel()||this.hidePopup()},showPopup:function(){this._popupBehavior.show(),this.raise_shown(Sys.EventArgs.Empty)},hidePopup:function(){this._popupBehavior?this._popupBehavior.hide():this._popupHidden()},_popupHidden:function(){this._completionListElement.innerHTML="",this._selectIndex=-1,this._flyoutHasFocus=!1,this.raise_hidden(Sys.EventArgs.Empty)},_highlightItem:function(e){for(var t=this._completionListElement.childNodes,i=0;i0&&(this._selectIndex--,this._handleScroll(this._completionListElement.childNodes[this._selectIndex],this._selectIndex),this._highlightItem(this._completionListElement.childNodes[this._selectIndex]),e.stopPropagation(),e.preventDefault()):t===Sys.UI.Key.down?this._selectIndex=0&&(i.scrollTop+=s.height*t-(i.clientHeight+i.scrollTop)+s.height),s.height*(n-(t+1))-(i.scrollHeight-i.scrollTop)>=0&&(i.scrollTop-=s.height*(n-(t+1))-(i.scrollHeight-i.scrollTop)+s.height),i.scrollTop%s.height!==0&&(s.height*(t+1)-(i.clientHeight+i.scrollTop)>=0?i.scrollTop-=i.scrollTop%s.height:i.scrollTop+=s.height-i.scrollTop%s.height)},_handleFlyoutFocus:function(){this._textBoxHasFocus||this._flyoutHasFocus||(this._webRequest&&(this._webRequest.get_executor().abort(),this._webRequest=null),this._hideCompletionList())},_onLostFocus:function(){this._textBoxHasFocus=!1,this._timer.set_enabled(!1),window.setTimeout(Function.createDelegate(this,this._handleFlyoutFocus),500)},_onMethodComplete:function(e,t){this._webRequest=null,this._update(t,e,!0)},_onMethodFailed:function(e,t,i){this._webRequest=null},_onTimerTick:function(e,t){if(this._timer.set_enabled(!1),this._servicePath&&this._serviceMethod){var i=this._currentCompletionWord();if(i.trim().length