This is a migrated thread and some comments may be shown as answers.

RadNotificiation with RadAjaxManager and Masterpage

15 Answers 561 Views
Notification
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 28 Jul 2011, 07:37 PM
I have a MasterPage where I have added a RadNotification and a RadAjaxManager.

I then have many ContentPages and UserControls where I am using RadAjaxManagerProxy.

I have written a class to handle the RadNotification so that I can send message from anywhere in the app using the RadNotification on my MasterPage.

The problem is I have to add the RadNotification to every since AjaxSetting in the UpdateControls.  If I don't do this, when I call the show() method, it just displays a blank RadNotification in the bottom corner of my screen (I am assuming it is using the default settings).

Is there any way to tell the Master RadAjaxManager, "Hey if ANY RadAjaxManagerProxy causes an async postback, update the RadNotification object as well."

15 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 29 Jul 2011, 02:03 PM
Hi Robert,

 
What I can suggest is to use the OnAjaxSettingCreating and add the RadNotification control to the update panel there:

MasterPage.master.cs:

protected void OnAjaxSettingCreating(object sender, Telerik.Web.UI.AjaxSettingCreatingEventArgs e)
    {
        e.UpdatePanel.ContentTemplateContainer.Controls.Add(n);
    }





For your convenience I prepared one demo with a master page and two content pages - when you click the button on any content page, the RadNotification text is updated (it shows the current time) and at the same time the notification is not added in the markup of the proxy.

I hope that the provided solution and the demo I prepared for you are helpful, let me know how it goes.

All the best,
Svetlina
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Robert
Top achievements
Rank 1
answered on 29 Jul 2011, 06:51 PM
I have tried doing this, however now when a page posts back (asyc or otherwise), I get

Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Invalid JSON primitive: .

This is happening somewhere in this line.

(function(g,b){var o="object",t="set_",l="#",n="$",k="string",j=".",h=" ",s="onreadystatechange",m="load",y="_readyQueue",x="_domReadyQueue",r="error",d=false,q="on",a=null,c=true,f="function",i="number",e="undefined",A=function(a){a=a||{};p(arguments,function(b){b&&v(b,function(c,b){a[b]=c})},1);return a},v=function(a,c){for(var b in a)c(a[b],b)},p=function(a,h,j){var d;if(a){a=a!==g&&typeof a.nodeType===e&&(a instanceof Array||typeof a.length===i&&(typeof a.callee===f||a.item&&typeof a.nodeType===e&&!a.addEventListener&&!a.attachEvent))?a:[a];for(var b=j||0,k=a.length;b<k;b++)if(h(a[b],b)){d=c;break}}return!d},u=function(b,e,d){var c=b[e],a=typeof c===f;a&&c.call(b,d);return a};if(!b||!b.loader){function M(a){a=a||{};p(arguments,function(b){b&&v(b,function(c,b){if(typeof a[b]===e)a[b]=c})},1);return a}var z=!!document.attachEvent;function C(b,a){var c=b[a];delete b[a];return c}function K(d,b,c){p(C(d,b),function(b){b.apply(a,c||[])})}function I(a,c,b){return a?(a[c]=a[c]||b):b}function G(c,b,a){I(c,b,[]).push(a)}function B(b,a){return(a||document).getElementsByTagName(b)}function J(a){return document.createElement(a)}function D(b,e,g,i,h,f){function c(){if(!z||!h||/loaded|complete/.test(b.readyState)){if(z)b.detachEvent(g||q+e,c);else{b.removeEventListener(e,c,d);f&&b.removeEventListener(r,c,d)}i.apply(b);b=a}}if(z)b.attachEvent(g||q+e,c);else{b.addEventListener(e,c,d);f&&b.addEventListener(r,c,d)}}function E(){b._domReady&&b._2Pass(C(b,x))}function F(){var a=b._ready;if(!a&&b._domReady&&!(b.loader&&b.loader._loading))b._ready=a=c;a&&b._2Pass(C(b,y))}g.Sys=b=M(b,{version:[3,0,31106,0],__namespace:c,debug:d,scripts:{},activateDom:c,composites:{},components:{},plugins:{},create:{},converters:{},_domLoaded:function(){if(b._domChecked)return;b._domChecked=c;function d(){if(!b._domReady){b._domReady=c;var d=b._autoRequire;d&&b.require(d,function(){b._autoRequire=a;K(b,"_autoQueue")},autoToken);E();F()}}D(g,m,a,d);var e;if(z)if(g==g.top&&document.documentElement.doScroll){var h,i,f=J("div");e=function(){try{f.doScroll("left")}catch(b){h=g.setTimeout(e,0);return}f=a;d()};e()}else D(document,a,s,d,c);else document.addEventListener&&D(document,"DOMContentLoaded",a,d)},_getById:function(b,d,h,f,a,g){if(a)if(f&&a.id===d)b.push(a);else!g&&p(B("*",a),function(a){if(a.id===d){b.push(a);return c}});else{var e=document.getElementById(d);e&&b.push(e)}return b.length},_getByClass:function(l,d,g,m,a,n){function i(b){var e,a=b.className;if(a&&(a===d||a.indexOf(h+d)>=0||a.indexOf(d+h)>=0)){l.push(b);e=c}return e}var b,f,e;if(m&&i(a)&&g)return c;if(!n){a=a||document;var k=a.querySelectorAll||a.getElementsByClassName;if(k){if(a.querySelectorAll)d=j+d;e=k.call(a,d);for(b=0,f=e.length;b<f;b++){l.push(e[b]);if(g)return c}}else{e=B("*",a);for(b=0,f=e.length;b<f;b++)if(i(e[b])&&g)return c}}},query:function(a,c){return new b.ElementSet(a,c)},"get":function(b,a){return a&&typeof a.get===f?a.get(b):this._find(b,a,c)},_find:function(m,d,f,h){var e=[],j;if(typeof m===k)j=[m];else j=m;var i=d instanceof Array,o=/^([\$#\.])((\w|[$:\.\-])+)$/,q=/^((\w+)|\*)$/;if(typeof d===k||d instanceof Array)d=b._find(d);if(d instanceof b.ElementSet)d=d.get();p(j,function(a){if(typeof a!==k)if(h)contains(d,a)&&e.push(a);else e.push(a);else{var j=o.exec(a);if(j&&j.length===4){a=j[2];var s=j[1];if(s===n)b._getComponent(e,a,d);else{var r=s===l?b._getById:b._getByClass;if(d)p(d,function(b){if(b.nodeType===1)return r(e,a,f,i,b,h)});else r(e,a,f)}}else if(q.test(a))if(d instanceof Array)p(d,function(b){if(b.nodeType===1){if(i&&(a==="*"||b.tagName.toLowerCase()===a)){e.push(b);if(f)return c}if(!h)if(!p(B(a,b),function(a){e.push(a);if(f)return c}))return c}});else{var m=B(a,d);if(f){m[0]&&e.push(m[0]);return c}p(m,function(a){e.push(a)})}else if(g.jQuery){!h&&e.push.apply(e,jQuery(a,d).get());i&&e.push.apply(e,jQuery(d).filter(a).get())}}});return e.length?f?e[0]||a:e:a},onDomReady:function(a){G(this,x,a);E()},onReady:function(a){G(this,y,a);F()},_set:function(a,b){v(b,function(c,b){u(a,"add_"+b,c)||u(a,t+b,c)||(a[b]=c)})}});b._getComponent=b._getComponent||function(){};b._2Pass=b._2Pass||function(a){p(a,function(a){a()})};var w;if(!b.ElementSet){w=b.ElementSet=function(c,a){this._elements=typeof a===o&&typeof a.query===f?a.query(c).get():b._find(c,a)||[]};w.prototype={__class:c,components:function(d,c){var a=new b.ElementSet(this.get());return new b.ComponentSet(a,d,c)},component:function(b,a){return this.components(b,a).get(0)},each:function(c){for(var b=this._elements,a=0,e=b.length;a<e;a++)if(c.call(b[a],a)===d)break;return this},"get":function(c){var b=this._elements;return typeof c===e?Array.apply(a,b):b[c]||a},find:function(a){return new b.ElementSet(a,this)},filter:function(a){return new b.ElementSet(b._find(a,this._elements,d,c))}}}if(!b.ComponentSet){w=b.ComponentSet=function(a,d,c){this._elementSet=a||(a=new b.ElementSet);this._components=this._execute(a,d,c)};w.prototype={__class:c,setProperties:function(a){return this.each(function(){b._set(this,a)})},"get":function(c){var b=this._components;return typeof c===e?Array.apply(a,b):b[c||0]||a},each:function(a){p(this._components,function(b,e){if(a.call(b,e)===d)return c});return this},elements:function(){return this._elementSet},_execute:function(f,b,c){var a=[];function d(c){var a;return c instanceof b||(a=c.constructor)&&(a===b||a.inheritsFrom&&a.inheritsFrom(b)||a.implementsInterface&&a.implementsInterface(b))}if(b instanceof Array)a.push.apply(a,b);else f.each(function(){var c=this.control;c&&(!b||d(c))&&a.push(c);p(this._behaviors,function(c){(!b||d(c))&&a.push(c)})});if(typeof c!==e)if(a[c])a=[a[c]];else a=[];return a}}}w=a}var L=function(a,d){if(d)return function(){return b.plugins[a.name].plugin.apply(this,arguments)};else{var c=function(){var c=arguments.callee,a=c._component;return b._createComp.call(this,a,a.defaults,arguments)};c._component=a;return c}};b._getCreate=L;function H(){var sb="callback",Q="completed",hb="completedRequest",gb="invokingRequest",vb="Sys.Net.XMLHttpExecutor",M="Content-Type",kb="text/xml",rb="SelectionLanguage",fb="navigate",eb="dispose",db="init",L="unload",P="none",cb="HTML",I="absolute",O="BODY",bb="InternetExplorer",ab="disposing",H="+",qb="MonthNames",pb="MonthGenitiveNames",Z="Abbreviated",E="-",D="/",Y="yyyy",X="MMMM",W="dddd",B=100,J="collectionChanged",V="get_",C="propertyChanged",G=",",U="null",S="Firefox",T="initialize",jb="beginUpdate",y=-1,ob="Undefined",x="",F="\n",nb="Exception",w,z;b._foreach=p;b._forIn=v;b._merge=A;b._callIf=u;w=Function;w.__typeName="Function";w.__class=c;w.createCallback=function(b,a){return function(){var e=arguments.length;if(e>0){for(var d=[],c=0;c<e;c++)d[c]=arguments[c];d[e]=a;return b.apply(this,d)}return b.call(this,a)}};w.createDelegate=function(a,b){return function(){return b.apply(a,arguments)}};w.emptyFunction=w.emptyMethod=function(){};w.validateParameters=function(c,b,a){return Function._validateParams(c,b,a)};w._validateParams=function(i,g,e){var b,f=g.length;e=e!==d;b=Function._validateParameterCount(i,g,e);if(b){b.popStackFrame();return b}for(var c=0,k=i.length;c<k;c++){var h=g[Math.min(c,f-1)],j=h.name;if(h.parameterArray)j+="["+(c-f+1)+"]";else if(!e&&c>=f)break;b=Function._validateParameter(i[c],h,j);if(b){b.popStackFrame();return b}}return a};w._validateParameterCount=function(m,g,l){var b,f,e=g.length,h=m.length;if(h<e){var i=e;for(b=0;b<e;b++){var j=g[b];if(j.optional||j.parameterArray)i--}if(h<i)f=c}else if(l&&h>e){f=c;for(b=0;b<e;b++)if(g[b].parameterArray){f=d;break}}if(f){var k=Error.parameterCount();k.popStackFrame();return k}return a};w._validateParameter=function(d,b,j){var c,i=b.type,n=!!b.integer,m=!!b.domElement,o=!!b.mayBeNull;c=Function._validateParameterType(d,i,n,m,o,j);if(c){c.popStackFrame();return c}var g=b.elementType,h=!!b.elementMayBeNull;if(i===Array&&typeof d!==e&&d!==a&&(g||!h))for(var l=!!b.elementInteger,k=!!b.elementDomElement,f=0;f<d.length;f++){var p=d[f];c=Function._validateParameterType(p,g,l,k,h,j+"["+f+"]");if(c){c.popStackFrame();return c}}return a};w._validateParameterType=function(c,f,n,m,o,g){var d,k;if(typeof c===e||c===a){if(o)return a;d=c===a?Error.argumentNull(g):Error.argumentUndefined(g);d.popStackFrame();return d}if(f&&f.__enum){if(typeof c!==i){d=Error.argumentType(g,Object.getType(c),f);d.popStackFrame();return d}if(c%1===0){var h=f.prototype;if(!f.__flags||c===0){for(k in h)if(h[k]===c)return a}else{var l=c;for(k in h){var j=h[k];if(j===0)continue;if((j&c)===j)l-=j;if(l===0)return a}}}d=Error.argumentOutOfRange(g,c,String.format(b.Res.enumInvalidValue,c,f.getName()));d.popStackFrame();return d}if(m&&(!b._isDomElement(c)||c.nodeType===3)){d=Error.argument(g,b.Res.argumentDomElement);d.popStackFrame();return d}if(f&&!b._isInstanceOfType(f,c)){d=Error.argumentType(g,Object.getType(c),f);d.popStackFrame();return d}if(f===Number&&n)if(c%1!==0){d=Error.argumentOutOfRange(g,c,b.Res.argumentInteger);d.popStackFrame();return d}return a};w=Error;w.__typeName="Error";w.__class=c;b._errorArgument=function(e,a,g){var f="Sys.Argument"+e+nb,d=f+": "+(g||b.Res["argument"+e]);if(a)d+=F+String.format(b.Res.paramName,a);var c=Error.create(d,{name:f,paramName:a});c.popStackFrame();c.popStackFrame();return c};b._error=function(g,f,d){var c="Sys."+g+nb,e=c+": "+(f||b.Res[d]),a=Error.create(e,{name:c});a.popStackFrame();a.popStackFrame();return a};w.create=function(c,b){var a=new Error(c);a.message=c;if(b)for(var d in b)a[d]=b[d];a.popStackFrame();return a};w.argument=function(a,c){return b._errorArgument(x,a,c)};w.argumentNull=function(a,c){return b._errorArgument("Null",a,c)};w.argumentOutOfRange=function(f,c,h){var d="Sys.ArgumentOutOfRangeException: "+(h||b.Res.argumentOutOfRange);if(f)d+=F+String.format(b.Res.paramName,f);if(typeof c!==e&&c!==a)d+=F+String.format(b.Res.actualValue,c);var g=Error.create(d,{name:"Sys.ArgumentOutOfRangeException",paramName:f,actualValue:c});g.popStackFrame();return g};w.argumentType=function(e,d,c,f){var a="Sys.ArgumentTypeException: ";if(f)a+=f;else if(d&&c)a+=String.format(b.Res.argumentTypeWithTypes,d.getName(),c.getName());else a+=b.Res.argumentType;if(e)a+=F+String.format(b.Res.paramName,e);var g=Error.create(a,{name:"Sys.ArgumentTypeException",paramName:e,actualType:d,expectedType:c});g.popStackFrame();return g};w.argumentUndefined=function(a,c){return b._errorArgument(ob,a,c)};w.format=function(a){return b._error("Format",a,"format")};w.invalidOperation=function(a){return b._error("InvalidOperation",a,"invalidOperation")};w.notImplemented=function(a){return b._error("NotImplemented",a,"notImplemented")};w.parameterCount=function(a){return b._error("ParameterCount",a,"parameterCount")};w.prototype.popStackFrame=function(){var b=this;if(typeof b.stack===e||b.stack===a||typeof b.fileName===e||b.fileName===a||typeof b.lineNumber===e||b.lineNumber===a)return;var c=b.stack.split(F),f=c[0],h=b.fileName+":"+b.lineNumber;while(typeof f!==e&&f!==a&&f.indexOf(h)<0){c.shift();f=c[0]}var g=c[1];if(typeof g===e||g===a)return;var d=g.match(/@(.*):(\d+)$/);if(typeof d===e||d===a)return;b.fileName=d[1];b.lineNumber=parseInt(d[2]);c.shift();b.stack=c.join(F)};w=Object;w.__typeName="Object";w.__class=c;w.getType=function(b){var a=b.constructor;return!a||typeof a!==f||!a.__typeName||a.__typeName==="Object"?Object:a};w.getTypeName=function(a){return Object.getType(a).getName()};w=String;w.__typeName="String";w.__class=c;z=w.prototype;z.endsWith=function(a){return this.substr(this.length-a.length)===a};z.startsWith=function(a){return this.substr(0,a.length)===a};z.trim=function(){return this.replace(/^\s+|\s+$/g,x)};z.trimEnd=function(){return this.replace(/\s+$/,x)};z.trimStart=function(){return this.replace(/^\s+/,x)};w.format=function(){return String._toFormattedString(d,arguments)};w._toFormattedString=function(o,m){for(var f=x,h=m[0],b=0;c;){var i=h.indexOf("{",b),g=h.indexOf("}",b);if(i<0&&g<0){f+=h.slice(b);break}if(g>0&&(g<i||i<0)){f+=h.slice(b,g+1);b=g+2;continue}f+=h.slice(b,i);b=i+1;if(h.charAt(b)==="{"){f+="{";b++;continue}if(g<0)break;var k=h.substring(b,g),j=k.indexOf(":"),n=parseInt(j<0?k:k.substring(0,j),10)+1,l=j<0?x:k.substring(j+1),d=m[n];if(typeof d===e||d===a)d=x;if(d.toFormattedString)f+=d.toFormattedString(l);else if(o&&d.localeFormat)f+=d.localeFormat(l);else if(d.format)f+=d.format(l);else f+=d.toString();b=g+1}return f};w=Boolean;w.__typeName="Boolean";w.__class=c;w.parse=function(e){var b=e.trim().toLowerCase(),a;if(b==="false")a=d;else if(b==="true")a=c;return a};w=Date;w.__typeName="Date";w.__class=c;w=Number;w.__typeName="Number";w.__class=c;w=RegExp;w.__typeName="RegExp";w.__class=c;if(!g)this.window=this;g.Type=w=Function;z=w.prototype;z.callBaseMethod=function(a,e,c){var d=b._getBaseMethod(this,a,e);return c?d.apply(a,c):d.apply(a)};z.getBaseMethod=function(a,c){return b._getBaseMethod(this,a,c)};z.getBaseType=function(){return typeof this.__baseType===e?a:this.__baseType};z.getInterfaces=function(){var c=[],a=this;while(a){var b=a.__interfaces;if(b)for(var d=0,f=b.length;d<f;d++){var e=b[d];!Array.contains(c,e)&&c.push(e)}a=a.__baseType}return c};z.getName=function(){return typeof this.__typeName===e?x:this.__typeName};z.implementsInterface=function(h){var f=this;f.resolveInheritance();var g=h.getName(),a=f.__interfaceCache;if(a){var i=a[g];if(typeof i!==e)return i}else a=f.__interfaceCache={};var b=f;while(b){var j=b.__interfaces;if(j&&Array.indexOf(j,h)!==y)return a[g]=c;b=b.__baseType}return a[g]=d};z.inheritsFrom=function(a){this.resolveInheritance();return b._inheritsFrom(this,a)};b._inheritsFrom=function(e,b){var d;if(b){var a=e.__baseType;while(a){if(a===b){d=c;break}a=a.__baseType}}return!!d};z.initializeBase=function(b,c){this.resolveInheritance();var a=this.__baseType;if(a)c?a.apply(b,c):a.apply(b);return b};z.isImplementedBy=function(b){if(typeof b===e||b===a)return d;var c=Object.getType(b);return!!(c.implementsInterface&&c.implementsInterface(this))};z.isInstanceOfType=function(a){return b._isInstanceOfType(this,a)};z.registerClass=function(f,e,g){var a=this,j=a.prototype;j.constructor=a;a.__typeName=f;a.__class=c;if(e){a.__baseType=e;a.__basePrototypePending=c}b.__upperCaseTypes[f.toUpperCase()]=a;if(g)for(var i=a.__interfaces=[],d=2,k=arguments.length;d<k;d++){var h=arguments[d];i.push(h)}return a};b.registerComponent=function(d,c){var f=d.getName(),e=b.UI&&(b._inheritsFrom(d,b.UI.Control)||b._inheritsFrom(d,b.UI.Behavior)),a=c&&c.name;if(!a){a=f;var g=a.lastIndexOf(j);if(g>=0){a=a.substr(g+1);if(a&&a.charAt(0)==="_")return}a=a.substr(0,1).toLowerCase()+a.substr(1)}if(!c)c={};c.name=a;c.type=d;c.typeName=f;c._isBehavior=e;c=b.components[a]=A(b.components[a],c);var i=b._getCreate(c),h=e?b.ElementSet.prototype:b.create;h[a]=i};b.registerPlugin=function(a){var e=a.name,f=a.functionName||e;b.plugins[e]=A(b.plugins[e],a);var g=a.plugin,d;if(a.global)d=b;else if(a.dom)d=b.ElementSet.prototype;else if(a.components)d=b.ComponentSet.prototype;if(d)d[f]=b._getCreate(a,c)};b._createComp=function(d,l,f){var i=d.type,h=d.parameters||[],j=d._isBehavior,m=j?f[0]:a,c=f[h.length]||{};c=A({},l,c);p(h,function(a,g){var d=typeof a===k?a:a.name,b=f[g];if(typeof b!==e&&typeof c[d]===e)c[d]=b});if(this instanceof b.ElementSet){var g=[];this.each(function(){g.push(b._create(i,c,this))});return new b.ComponentSet(this,g)}else return b._create(i,c)};b._create=function(f,g,c){var d=typeof c;if(d===k)c=b.get(c);var a;b._2Pass(function(){a=d===e?new f:new f(c);u(a,jb);b._set(a,g);var h=b.Component;if(!h||!h._register(a))u(a,"endUpdate")||u(a,T)});return a};z.registerInterface=function(d){var a=this;b.__upperCaseTypes[d.toUpperCase()]=a;a.prototype.constructor=a;a.__typeName=d;a.__interface=c;return a};z.resolveInheritance=function(){var a=this;if(a.__basePrototypePending){var e=a.__baseType;e.resolveInheritance();var c=e.prototype,d=a.prototype;for(var b in c)d[b]=d[b]||c[b];delete a.__basePrototypePending}};w.getRootNamespaces=function(){return Array.clone(b.__rootNamespaces)};w.isClass=function(a){return!!(a&&a.__class)};w.isInterface=function(a){return!!(a&&a.__interface)};w.isNamespace=function(a){return!!(a&&a.__namespace)};w.parse=function(d,f){var c;if(f){c=b.__upperCaseTypes[f.getName().toUpperCase()+j+d.toUpperCase()];return c||a}if(!d)return a;var e=Type.__htClasses;if(!e)Type.__htClasses=e={};c=e[d];if(!c){c=g.eval(d);e[d]=c}return c};w.registerNamespace=function(a){Type._registerNamespace(a)};w._registerNamespace=function(h){for(var f=g,e=h.split(j),d=0,k=e.length;d<k;d++){var i=e[d],a=f[i];if(!a)a=f[i]={};if(!a.__namespace){!d&&h!=="Sys"&&b.__rootNamespaces.push(a);a.__namespace=c;a.__typeName=e.slice(0,d+1).join(j);a.getName=function(){return this.__typeName}}f=a}};w._checkDependency=function(f,a){var g=Type._registerScript._scripts,c=g?!!g[f]:d;if(typeof a!==e&&!c)throw Error.invalidOperation(String.format(b.Res.requiredScriptReferenceNotIncluded,a,f));return c};w._registerScript=function(a,e){var d=Type._registerScript._scripts;if(!d)Type._registerScript._scripts=d={};if(d[a])throw Error.invalidOperation(String.format(b.Res.scriptAlreadyLoaded,a));d[a]=c;if(e)for(var f=0,h=e.length;f<h;f++){var g=e[f];if(!Type._checkDependency(g))throw Error.invalidOperation(String.format(b.Res.scriptDependencyNotFound,a,g));}};w._registerNamespace("Sys");b.__upperCaseTypes={};b.__rootNamespaces=[b];b._isInstanceOfType=function(g,f){if(typeof f===e||f===a)return d;if(f instanceof g)return c;var b=Object.getType(f);return!!(b===g)||b.inheritsFrom&&b.inheritsFrom(g)||b.implementsInterface&&b.implementsInterface(g)};b._getBaseMethod=function(e,f,d){var c=e.getBaseType();if(c){var b=c.prototype[d];return b instanceof Function?b:a}return a};b._isDomElement=function(a){var e=d;if(typeof a.nodeType!==i){var c=a.ownerDocument||a.document||a;if(c!=a){var f=c.defaultView||c.parentWindow;e=f!=a}else e=!c.body||!b._isDomElement(c.body)}return!e};var ib=b._isBrowser=function(a){return b.Browser.agent===b.Browser[a]};p(b._ns,w._registerNamespace);delete b._ns;w=Array;w.__typeName="Array";w.__class=c;var tb=b._indexOf=function(d,f,a){if(typeof f===e)return y;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<c;b++)if(d[b]===f)return b}return y};w.add=w.enqueue=function(a,b){a[a.length]=b};w.addRange=function(a,b){a.push.apply(a,b)};w.clear=function(a){a.length=0};w.clone=function(b){return b.length===1?[b[0]]:Array.apply(a,b)};w.contains=function(a,b){return tb(a,b)>=0};w.dequeue=function(a){return a.shift()};w.forEach=function(b,f,d){for(var a=0,g=b.length;a<g;a++){var c=b[a];typeof c!==e&&f.call(d,c,a,b)}};w.indexOf=tb;w.insert=function(a,b,c){a.splice(b,0,c)};w.parse=function(a){return a?g.eval("("+a+")"):[]};w.remove=function(b,c){var a=tb(b,c);a>=0&&b.splice(a,1);return a>=0};w.removeAt=function(a,b){a.splice(b,1)};Type._registerScript._scripts={"MicrosoftAjaxCore.js":c,"MicrosoftAjaxGlobalization.js":c,"MicrosoftAjaxSerialization.js":c,"MicrosoftAjaxComponentModel.js":c,"MicrosoftAjaxHistory.js":c,"MicrosoftAjaxNetwork.js":c,"MicrosoftAjaxWebServices.js":c};w=b.IDisposable=function(){};w.registerInterface("Sys.IDisposable");w=b.StringBuilder=function(b){this._parts=typeof b!==e&&b!==a&&b!==x?[b.toString()]:[];this._value={};this._len=0};w.prototype={append:function(a){this._parts.push(a);return this},appendLine:function(b){this._parts.push(typeof b===e||b===a||b===x?"\r\n":b+"\r\n");return this},clear:function(){this._parts=[];this._value={};this._len=0},isEmpty:function(){return!this._parts.length||!this.toString()},toString:function(b){var d=this;b=b||x;var c=d._parts;if(d._len!==c.length){d._value={};d._len=c.length}var i=d._value,h=i[b];if(typeof h===e){if(b!==x)for(var f=0;f<c.length;){var g=c[f];if(typeof g===e||g===x||g===a)c.splice(f,1);else f++}i[b]=h=c.join(b)}return h}};w.registerClass("Sys.StringBuilder");var lb=navigator.userAgent,K=b.Browser={InternetExplorer:{},Firefox:{},Safari:{},Opera:{},agent:a,hasDebuggerStatement:d,name:navigator.appName,version:parseFloat(navigator.appVersion),documentMode:0};if(lb.indexOf(" MSIE ")>y){K.agent=K.InternetExplorer;K.version=parseFloat(lb.match(/MSIE (\d+\.\d+)/)[1]);if(K.version>7&&document.documentMode>6)K.documentMode=document.documentMode;K.hasDebuggerStatement=c}else if(lb.indexOf(" Firefox/")>y){K.agent=K.Firefox;K.version=parseFloat(lb.match(/ Firefox\/(\d+\.\d+)/)[1]);K.name=S;K.hasDebuggerStatement=c}else if(lb.indexOf(" AppleWebKit/")>y){K.agent=K.Safari;K.version=parseFloat(lb.match(/ AppleWebKit\/(\d+(\.\d+)?)/)[1]);K.name="Safari"}else if(lb.indexOf("Opera/")>y)K.agent=K.Opera;w=b.EventArgs=function(){};w.registerClass("Sys.EventArgs");b.EventArgs.Empty=new b.EventArgs;w=b.CancelEventArgs=function(){b.CancelEventArgs.initializeBase(this);this._cancel=d};w.prototype={get_cancel:function(){return this._cancel},set_cancel:function(a){this._cancel=a}};w.registerClass("Sys.CancelEventArgs",b.EventArgs);Type.registerNamespace("Sys.UI");w=b._Debug=function(){};w.prototype={_appendConsole:function(a){typeof Debug!==e&&Debug.writeln;g.console&&g.console.log&&g.console.log(a);g.opera&&g.opera.postError(a);g.debugService&&g.debugService.trace(a)},_getTrace:function(){var c=b.get("#TraceConsole");return c&&c.tagName.toUpperCase()==="TEXTAREA"?c:a},_appendTrace:function(b){var a=this._getTrace();if(a)a.value+=b+F},"assert":function(d,a,c){if(!d){a=c&&this.assert.caller?String.format(b.Res.assertFailedCaller,a,this.assert.caller):String.format(b.Res.assertFailed,a);confirm(String.format(b.Res.breakIntoDebugger,a))&&this.fail(a)}},clearTrace:function(){var a=this._getTrace();if(a)a.value=x},fail:function(a){this._appendConsole(a);b.Browser.hasDebuggerStatement&&g.eval("debugger")},trace:function(a){this._appendConsole(a);this._appendTrace(a)},traceDump:function(a,b){this._traceDump(a,b,c)},_traceDump:function(b,l,n,c,h){var d=this;l=l||"traceDump";c=c||x;var j=c+l+": ";if(b===a){d.trace(j+U);return}switch(typeof b){case e:d.trace(j+ob);break;case i:case k:case"boolean":d.trace(j+b);break;default:if(Date.isInstanceOfType(b)||RegExp.isInstanceOfType(b)){d.trace(j+b.toString());break}if(!h)h=[];else if(Array.contains(h,b)){d.trace(j+"...");return}h.push(b);if(b==g||b===document||g.HTMLElement&&b instanceof HTMLElement||typeof b.nodeName===k){var s=b.tagName||"DomElement";if(b.id)s+=" - "+b.id;d.trace(c+l+" {"+s+"}")}else{var q=Object.getTypeName(b);d.trace(c+l+(typeof q===k?" {"+q+"}":x));if(c===x||n){c+="    ";var m,r,t,o,p;if(b instanceof Array){r=b.length;for(m=0;m<r;m++)d._traceDump(b[m],"["+m+"]",n,c,h)}else for(o in b){p=b[o];typeof p!==f&&d._traceDump(p,o,n,c,h)}}}Array.remove(h,b)}}};w.registerClass("Sys._Debug");w=b.Debug=new b._Debug;w.isDebug=d;function Hb(e,g){var d=this,c,a,m;if(g){c=d.__lowerCaseValues;if(!c){d.__lowerCaseValues=c={};var j=d.prototype;for(var l in j)c[l.toLowerCase()]=j[l]}}else c=d.prototype;function h(c){if(typeof a!==i)throw Error.argument("value",String.format(b.Res.enumInvalidValue,c,this.__typeName));}if(!d.__flags){m=g?e.toLowerCase():e;a=c[m.trim()];typeof a!==i&&h.call(d,e);return a}else{for(var k=(g?e.toLowerCase():e).split(G),n=0,f=k.length-1;f>=0;f--){var o=k[f].trim();a=c[o];typeof a!==i&&h.call(d,e.split(G)[f].trim());n|=a}return n}}function Gb(d){var f=this;if(typeof d===e||d===a)return f.__string;var g=f.prototype,b;if(!f.__flags||d===0){for(b in g)if(g[b]===d)return b}else{var c=f.__sortedValues;if(!c){c=[];for(b in g)c.push({key:b,value:g[b]});c.sort(function(a,b){return a.value-b.value});f.__sortedValues=c}var i=[],j=d;for(b=c.length-1;b>=0;b--){var k=c[b],h=k.value;if(h===0)continue;if((h&d)===h){i.push(k.key);j-=h;if(j===0)break}}if(i.length&&j===0)return i.reverse().join(", ")}return x}w=Type;w.prototype.registerEnum=function(d,f){var a=this;b.__upperCaseTypes[d.toUpperCase()]=a;for(var e in a.prototype)a[e]=a.prototype[e];a.__typeName=d;a.parse=Hb;a.__string=a.toString();a.toString=Gb;a.__flags=f;a.__enum=c};w.isEnum=function(a){return!!(a&&a.__enum)};w.isFlags=function(a){return!!(a&&a.__flags)};w=b.CollectionChange=function(g,b,e,c,f){var d=this;d.action=g;if(b)if(!(b instanceof Array))b=[b];d.newItems=b||a;if(typeof e!==i)e=y;d.newStartingIndex=e;if(c)if(!(c instanceof Array))c=[c];d.oldItems=c||a;if(typeof f!==i)f=y;d.oldStartingIndex=f};w.registerClass("Sys.CollectionChange");w=b.NotifyCollectionChangedAction=function(){};w.prototype={add:0,remove:1,reset:2};w.registerEnum("Sys.NotifyCollectionChangedAction");w=b.NotifyCollectionChangedEventArgs=function(a){this._changes=a;b.NotifyCollectionChangedEventArgs.initializeBase(this)};w.prototype={get_changes:function(){return this._changes||[]}};w.registerClass("Sys.NotifyCollectionChangedEventArgs",b.EventArgs);w=b.Observer=function(){};w.registerClass("Sys.Observer");w.makeObservable=function(a){var d=a instanceof Array,c=b.Observer;if(a.setValue===c._observeMethods.setValue)return a;c._addMethods(a,c._observeMethods);d&&c._addMethods(a,c._arrayMethods);return a};w._addMethods=function(c,a){for(var b in a)c[b]=a[b]};w._addEventHandler=function(e,a,d){b.Observer._getContext(e,c).events._addHandler(a,d)};w.addEventHandler=function(d,a,c){b.Observer._addEventHandler(d,a,c)};w._removeEventHandler=function(e,a,d){b.Observer._getContext(e,c).events._removeHandler(a,d)};w.removeEventHandler=function(d,a,c){b.Observer._removeEventHandler(d,a,c)};w.clearEventHandlers=function(d,a){b.Observer._getContext(d,c).events._removeHandlers(a)};w.raiseEvent=function(c,f,e){var d=b.Observer._getContext(c);if(!d)return;var a=d.events.getHandler(f);a&&a(c,e||b.EventArgs.Empty)};w.addPropertyChanged=function(c,a){b.Observer._addEventHandler(c,C,a)};w.removePropertyChanged=function(c,a){b.Observer._removeEventHandler(c,C,a)};w.beginUpdate=function(a){b.Observer._getContext(a,c).updating=c};w.endUpdate=function(e){var c=b.Observer._getContext(e);if(!c||!c.updating)return;c.updating=d;var g=c.dirty;c.dirty=d;if(g){if(e instanceof Array){var f=c.changes;c.changes=a;b.Observer.raiseCollectionChanged(e,f)}b.Observer.raisePropertyChanged(e,x)}};w.isUpdating=function(c){var a=b.Observer._getContext(c);return a?a.updating:d};w._setValue=function(d,o,l){for(var g,v,p=d,i=o.split(j),n=0,r=i.length-1;n<r;n++){var q=i[n];g=d[V+q];if(typeof g===f)d=g.call(d);else d=d[q];var s=typeof d;if(d===a||s===e)throw Error.invalidOperation(String.format(b.Res.nullReferenceInPath,o));}var k,h=i[r];g=d[V+h];if(typeof g===f)k=g.call(d);else k=d[h];u(d,t+h,l)||(d[h]=l);if(k!==l){var m=b.Observer._getContext(p);if(m&&m.updating){m.dirty=c;return}b.Observer.raisePropertyChanged(p,i[0])}};w.setValue=function(c,a,d){b.Observer._setValue(c,a,d)};w.raisePropertyChanged=function(c,a){b.Observer.raiseEvent(c,C,new b.PropertyChangedEventArgs(a))};w.addCollectionChanged=function(c,a){b.Observer._addEventHandler(c,J,a)};w.removeCollectionChanged=function(c,a){b.Observer._removeEventHandler(c,J,a)};w._collectionChange=function(e,d){var a=this._getContext(e);if(a&&a.updating){a.dirty=c;var b=a.changes;if(!b)a.changes=b=[d];else b.push(d)}else{this.raiseCollectionChanged(e,[d]);this.raisePropertyChanged(e,"length")}};w.add=function(a,c){var d=new b.CollectionChange(b.NotifyCollectionChangedAction.add,[c],a.length);Array.add(a,c);b.Observer._collectionChange(a,d)};w.addRange=function(a,c){var d=new b.CollectionChange(b.NotifyCollectionChangedAction.add,c,a.length);Array.addRange(a,c);b.Observer._collectionChange(a,d)};w.clear=function(c){var d=Array.clone(c);Array.clear(c);b.Observer._collectionChange(c,new b.CollectionChange(b.NotifyCollectionChangedAction.reset,a,y,d,0))};w.insert=function(a,c,d){Array.insert(a,c,d);b.Observer._collectionChange(a,new b.CollectionChange(b.NotifyCollectionChangedAction.add,[d],c))};w.remove=function(e,f){var g=Array.indexOf(e,f);if(g!==y){Array.remove(e,f);b.Observer._collectionChange(e,new b.CollectionChange(b.NotifyCollectionChangedAction.remove,a,y,[f],g));return c}return d};w.removeAt=function(d,c){if(c>y&&c<d.length){var e=d[c];Array.removeAt(d,c);b.Observer._collectionChange(d,new b.CollectionChange(b.NotifyCollectionChangedAction.remove,a,y,[e],c))}};w.raiseCollectionChanged=function(c,a){b.Observer.raiseEvent(c,J,new b.NotifyCollectionChangedEventArgs(a))};w._observeMethods={add_propertyChanged:function(a){b.Observer._addEventHandler(this,C,a)},remove_propertyChanged:function(a){b.Observer._removeEventHandler(this,C,a)},addEventHandler:function(a,c){b.Observer._addEventHandler(this,a,c)},removeEventHandler:function(a,c){b.Observer._removeEventHandler(this,a,c)},clearEventHandlers:function(a){b.Observer._getContext(this,c).events._removeHandlers(a)},get_isUpdating:function(){return b.Observer.isUpdating(this)},beginUpdate:function(){b.Observer.beginUpdate(this)},endUpdate:function(){b.Observer.endUpdate(this)},setValue:function(c,a){b.Observer._setValue(this,c,a)},raiseEvent:function(d,c){b.Observer.raiseEvent(this,d,c||a)},raisePropertyChanged:function(a){b.Observer.raiseEvent(this,C,new b.PropertyChangedEventArgs(a))}};w._arrayMethods={add_collectionChanged:function(a){b.Observer._addEventHandler(this,J,a)},remove_collectionChanged:function(a){b.Observer._removeEventHandler(this,J,a)},add:function(a){b.Observer.add(this,a)},addRange:function(a){b.Observer.addRange(this,a)},clear:function(){b.Observer.clear(this)},insert:function(a,c){b.Observer.insert(this,a,c)},remove:function(a){return b.Observer.remove(this,a)},removeAt:function(a){b.Observer.removeAt(this,a)},raiseCollectionChanged:function(a){b.Observer.raiseEvent(this,J,new b.NotifyCollectionChangedEventArgs(a))}};w._getContext=function(c,d){var b=c._observerContext;return b?b():d?(c._observerContext=this._createContext())():a};w._createContext=function(){var a={events:new b.EventHandlerList};return function(){return a}};function N(a,c,b){return a<c||a>b}function Ib(c,a){var d=new Date,e=wb(d);if(a<B){var b=yb(d,c,e);a+=b-b%B;if(a>c.Calendar.TwoDigitYearMax)a-=B}return a}function wb(f,d){if(!d)return 0;for(var c,e=f.getTime(),b=0,g=d.length;b<g;b+=4){c=d[b+2];if(c===a||e>=c)return b}return 0}function yb(d,b,e,c){var a=d.getFullYear();if(!c&&b.eras)a-=b.eras[e+3];return a}b._appendPreOrPostMatch=function(f,b){for(var e=0,a=d,c=0,h=f.length;c<h;c++){var g=f.charAt(c);switch(g){case"'":if(a)b.push("'");else e++;a=d;break;case"\\":a&&b.push("\\");a=!a;break;default:b.push(g);a=d}}return e};w=Date;w._expandFormat=function(a,c){c=c||"F";var d=c.length;if(d===1)switch(c){case"d":return a.ShortDatePattern;case"D":return a.LongDatePattern;case"t":return a.ShortTimePattern;case"T":return a.LongTimePattern;case"f":return a.LongDatePattern+h+a.ShortTimePattern;case"F":return a.FullDateTimePattern;case"M":case"m":return a.MonthDayPattern;case"s":return a.SortableDateTimePattern;case"Y":case"y":return a.YearMonthPattern;default:throw Error.format(b.Res.formatInvalidString);}else if(d===2&&c.charAt(0)==="%")c=c.charAt(1);return c};w._getParseRegExp=function(g,i){var h=g._parseRegExp;if(!h)g._parseRegExp=h={};else{var o=h[i];if(o)return o}var e=Date._expandFormat(g,i);e=e.replace(/([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g,"\\\\$1");var d=["^"],p=[],j=0,m=0,l=Date._getTokenRegExp(),f;while((f=l.exec(e))!==a){var s=e.slice(j,f.index);j=l.lastIndex;m+=b._appendPreOrPostMatch(s,d);if(m%2){d.push(f[0]);continue}var q=f[0],t=q.length,c;switch(q){case W:case"ddd":case X:case"MMM":case"gg":case"g":c="(\\D+)";break;case"tt":case"t":c="(\\D*)";break;case Y:case"fff":case"ff":case"f":c="(\\d{"+t+"})";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":c="(\\d\\d?)";break;case"zzz":c="([+-]?\\d\\d?:\\d{2})";break;case"zz":case"z":c="([+-]?\\d\\d?)";break;case D:c="(\\"+g.DateSeparator+")"}c&&d.push(c);p.push(f[0])}b._appendPreOrPostMatch(e.slice(j),d);d.push(n);var r=d.join(x).replace(/\s+/g,"\\s+"),k={regExp:r,groups:p};h[i]=k;return k};w._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};w.parseLocale=function(a){return Date._parse(a,b.CultureInfo.CurrentCulture,arguments)};w.parseInvariant=function(a){return Date._parse(a,b.CultureInfo.InvariantCulture,arguments)};w._parse=function(k,g,l){var b,f,e,i,h,j=d;for(b=1,f=l.length;b<f;b++){i=l[b];if(i){j=c;e=Date._parseExact(k,i,g);if(e)return e}}if(!j){h=g._getDateTimeFormats();for(b=0,f=h.length;b<f;b++){e=Date._parseExact(k,h[b],g);if(e)return e}}return a};w._parseExact=function(w,J,s){w=w.trim();var e=s.dateTimeFormat,F=this._getParseRegExp(e,J),I=(new RegExp(F.regExp)).exec(w);if(I===a)return a;for(var H=F.groups,y=a,j=a,h=a,i=a,p=a,f=0,k,z=0,A=0,x=0,l=a,v=d,r=0,K=H.length;r<K;r++){var g=I[r+1];if(g){var G=H[r],m=G.length,c=parseInt(g,10);switch(G){case"dd":case"d":i=c;if(N(i,1,31))return a;break;case"MMM":case X:h=s._getMonthIndex(g,m===3);if(N(h,0,11))return a;break;case"M":case"MM":h=c-1;if(N(h,0,11))return a;break;case"y":case"yy":case Y:j=m<4?Ib(e,c):c;if(N(j,0,9999))return a;break;case"h":case"hh":f=c;if(f===12)f=0;if(N(f,0,11))return a;break;case"H":case"HH":f=c;if(N(f,0,23))return a;break;case"m":case"mm":z=c;if(N(z,0,59))return a;break;case"s":case"ss":A=c;if(N(A,0,59))return a;break;case"tt":case"t":var D=g.toUpperCase();v=D===e.PMDesignator.toUpperCase();if(!v&&D!==e.AMDesignator.toUpperCase())return a;break;case"f":case"ff":case"fff":x=c*Math.pow(10,3-m);if(N(x,0,999))return a;break;case"ddd":case W:p=s._getDayIndex(g,m===3);if(N(p,0,6))return a;break;case"zzz":var u=g.split(/:/);if(u.length!==2)return a;k=parseInt(u[0],10);if(N(k,-12,13))return a;var t=parseInt(u[1],10);if(N(t,0,59))return a;l=k*60+(g.startsWith(E)?-t:t);break;case"z":case"zz":k=c;if(N(k,-12,13))return a;l=k*60;break;case"g":case"gg":var o=g;if(!o||!e.eras)return a;o=o.toLowerCase().trim();for(var q=0,L=e.eras.length;q<L;q+=4)if(o===e.eras[q+1].toLowerCase()){y=q;break}if(y===a)return a}}}var b=new Date,C,n=e.Calendar.convert;C=n?n.fromGregorian(b)[0]:b.getFullYear();if(j===a)j=C;else if(e.eras)j+=e.eras[(y||0)+3];if(h===a)h=0;if(i===a)i=1;if(n){b=n.toGregorian(j,h,i);if(b===a)return a}else{b.setFullYear(j,h,i);if(b.getDate()!==i)return a;if(p!==a&&b.getDay()!==p)return a}if(v&&f<12)f+=12;b.setHours(f,z,A,x);if(l!==a){var B=b.getMinutes()-(l+b.getTimezoneOffset());b.setHours(b.getHours()+parseInt(B/60,10),B%60)}return b};z=w.prototype;z.format=function(a){return this._toFormattedString(a,b.CultureInfo.InvariantCulture)};z.localeFormat=function(a){return this._toFormattedString(a,b.CultureInfo.CurrentCulture)};z._toFormattedString=function(h,n){var d=this,e=n.dateTimeFormat,o=e.Calendar.convert;if(!h||!h.length||h==="i"){var a;if(n&&n.name.length)if(o)a=d._toFormattedString(e.FullDateTimePattern,n);else{var z=new Date(d.getTime()),K=wb(d,e.eras);z.setFullYear(yb(d,e,K));a=z.toLocaleString()}else a=d.toString();return a}var A=e.eras,w=h==="s";h=Date._expandFormat(e,h);a=[];var i,J=["0","00","000"];function g(c,a){var b=c+x;return a>1&&b.length<a?(J[a-2]+b).substr(-a):b}var l,t,C=/([^d]|^)(d|dd)([^d]|$)/g;function G(){if(l||t)return l;l=C.test(h);t=c;return l}var v=0,s=Date._getTokenRegExp(),k;if(!w&&o)k=o.fromGregorian(d);for(;c;){var I=s.lastIndex,m=s.exec(h),F=h.slice(I,m?m.index:h.length);v+=b._appendPreOrPostMatch(F,a);if(!m)break;if(v%2){a.push(m[0]);continue}function p(a,b){if(k)return k[b];switch(b){case 0:return a.getFullYear();case 1:return a.getMonth();case 2:return a.getDate()}}var y=m[0],f=y.length;switch(y){case"ddd":case W:q=f===3?e.AbbreviatedDayNames:e.DayNames;a.push(q[d.getDay()]);break;case"d":case"dd":l=c;a.push(g(p(d,2),f));break;case"MMM":case X:var u=f===3?Z:x,r=e[u+pb],q=e[u+qb],j=p(d,1);a.push(r&&G()?r[j]:q[j]);break;case"M":case"MM":a.push(g(p(d,1)+1,f));break;case"y":case"yy":case Y:j=k?k[0]:yb(d,e,wb(d,A),w);if(f<4)j=j%B;a.push(g(j,f));break;case"h":case"hh":i=d.getHours()%12;if(i===0)i=12;a.push(g(i,f));break;case"H":case"HH":a.push(g(d.getHours(),f));break;case"m":case"mm":a.push(g(d.getMinutes(),f));break;case"s":case"ss":a.push(g(d.getSeconds(),f));break;case"t":case"tt":j=d.getHours()<12?e.AMDesignator:e.PMDesignator;a.push(f===1?j.charAt(0):j);break;case"f":case"ff":case"fff":a.push(g(d.getMilliseconds(),3).substr(0,f));break;case"z":case"zz":i=d.getTimezoneOffset()/60;a.push((i<=0?H:E)+g(Math.floor(Math.abs(i)),f));break;case"zzz":i=d.getTimezoneOffset()/60;a.push((i<=0?H:E)+g(Math.floor(Math.abs(i)),2)+":"+g(Math.abs(d.getTimezoneOffset()%60),2));break;case"g":case"gg":e.eras&&a.push(e.eras[wb(d,A)+1]);break;case D:a.push(e.DateSeparator)}}return a.join(x)};String.localeFormat=function(){return String._toFormattedString(c,arguments)};var Fb={P:["Percent",["-n %","-n%","-%n"],["n %","n%","%n"],B],N:["Number",["(n)","-n","- n","n-","n -"],a,1],C:["Currency",["($n)","-$n","$-n","$n-","(n$)","-n$","n-$","n$-","-n $","-$ n","n $-","$ n-","$ -n","n- $","($ n)","(n $)"],["$n","n$","$ n","n $"],1]};b._toFormattedString=function(f,q){var i=this;if(!f||!f.length||f==="i")return q&&q.name.length?i.toLocaleString():i.toString();function o(a,c,d){for(var b=a.length;b<c;b++)a=d?"0"+a:a+"0";return a}function s(l,i,n,q,s){var k=n[0],m=1,r=Math.pow(10,i),p=Math.round(l*r)/r;if(!isFinite(p))p=l;l=p;var b=l+x,a=x,e,g=b.split(/e/i);b=g[0];e=g.length>1?parseInt(g[1]):0;g=b.split(j);b=g[0];a=g.length>1?g[1]:x;var t;if(e>0){a=o(a,e,d);b+=a.slice(0,e);a=a.substr(e)}else if(e<0){e=-e;b=o(b,e+1,c);a=b.slice(-e,b.length)+a;b=b.slice(0,-e)}if(i>0)a=s+(a.length>i?a.slice(0,i):o(a,i,d));else a=x;var f=b.length-1,h=x;while(f>=0){if(k===0||k>f)return b.slice(0,f+1)+(h.length?q+h+a:a);h=b.slice(f-k+1,f+1)+(h.length?q+h:x);f-=k;if(m<n.length){k=n[m];m++}}return b.slice(0,f+1)+q+h+a}var a=q.numberFormat,g=Math.abs(i);f=f||"D";var h=y;if(f.length>1)h=parseInt(f.slice(1),10);var m,e=f.charAt(0).toUpperCase();switch(e){case"D":m="n";if(h!==y)g=o(x+g,h,c);if(i<0)g=-g;break;case"C":case"N":case"P":e=Fb[e];var k=e[0];m=i<0?e[1][a[k+"NegativePattern"]]:e[2]?e[2][a[k+"PositivePattern"]]:"n";if(h===y)h=a[k+"DecimalDigits"];g=s(Math.abs(i)*e[3],h,a[k+"GroupSizes"],a[k+"GroupSeparator"],a[k+"DecimalSeparator"]);break;default:throw Error.format(b.Res.formatBadFormatSpecifier);}for(var r=/n|\$|-|%/g,l=x;c;){var t=r.lastIndex,p=r.exec(m);l+=m.slice(t,p?p.index:m.length);if(!p)break;switch(p[0]){case"n":l+=g;break;case n:l+=a.CurrencySymbol;break;case E:if(/[1-9]/.test(g))l+=a.NegativeSign;break;case"%":l+=a.PercentSymbol}}return l};w=Number;w.parseLocale=function(a){return Number._parse(a,b.CultureInfo.CurrentCulture)};w.parseInvariant=function(a){return Number._parse(a,b.CultureInfo.InvariantCulture)};w._parse=function(b,t){b=b.trim();if(b.match(/^[+-]?infinity$/i))return parseFloat(b);if(b.match(/^0x[a-f0-9]+$/i))return parseInt(b);var c=t.numberFormat,i=Number._parseNumberNegativePattern(b,c,c.NumberNegativePattern),k=i[0],f=i[1];if(k===x&&c.NumberNegativePattern!==1){i=Number._parseNumberNegativePattern(b,c,1);k=i[0];f=i[1]}if(k===x)k=H;var m,e,g=f.indexOf("e");if(g<0)g=f.indexOf("E");if(g<0){e=f;m=a}else{e=f.substr(0,g);m=f.substr(g+1)}var d,n,s=c.NumberDecimalSeparator,q=e.indexOf(s);if(q<0){d=e;n=a}else{d=e.substr(0,q);n=e.substr(q+s.length)}var p=c.NumberGroupSeparator;d=d.split(p).join(x);var r=p.replace(/\u00A0/g,h);if(p!==r)d=d.split(r).join(x);var o=k+d;if(n!==a)o+=j+n;if(m!==a){var l=Number._parseNumberNegativePattern(m,c,1);if(l[0]===x)l[0]=H;o+="e"+l[0]+l[1]}return o.match(/^[+-]?\d*\.?\d*(e[+-]?\d+)?$/)?parseFloat(o):Number.NaN};w._parseNumberNegativePattern=function(a,d,e){var b=d.NegativeSign,c=d.PositiveSign;switch(e){case 4:b=h+b;c=h+c;case 3:if(a.endsWith(b))return[E,a.substr(0,a.length-b.length)];else if(a.endsWith(c))return[H,a.substr(0,a.length-c.length)];break;case 2:b+=h;c+=h;case 1:if(a.startsWith(b))return[E,a.substr(b.length)];else if(a.startsWith(c))return[H,a.substr(c.length)];break;case 0:if(a.startsWith("(")&&a.endsWith(")"))return[E,a.substr(1,a.length-2)]}return[x,a]};z=w.prototype;z.format=function(a){return b._toFormattedString.call(this,a,b.CultureInfo.InvariantCulture)};z.localeFormat=function(a){return b._toFormattedString.call(this,a,b.CultureInfo.CurrentCulture)};function Ab(a){return a.split(" ").join(h).toUpperCase()}function xb(b){var a=[];p(b,function(b,c){a[c]=Ab(b)});return a}function Cb(c){var b={};v(c,function(c,d){b[d]=c instanceof Array?c.length===1?[c]:Array.apply(a,c):typeof c===o?Cb(c):c});return b}w=b.CultureInfo=function(c,b,a){this.name=c;this.numberFormat=b;this.dateTimeFormat=a};w.prototype={_getDateTimeFormats:function(){var b=this._dateTimeFormats;if(!b){var a=this.dateTimeFormat;this._dateTimeFormats=b=[a.MonthDayPattern,a.YearMonthPattern,a.ShortDatePattern,a.ShortTimePattern,a.LongDatePattern,a.LongTimePattern,a.FullDateTimePattern,a.RFC1123Pattern,a.SortableDateTimePattern,a.UniversalSortableDateTimePattern]}return b},_getMonthIndex:function(b,g){var a=this,c=g?"_upperAbbrMonths":"_upperMonths",e=c+"Genitive",h=a[c];if(!h){var f=g?Z:x;a[c]=xb(a.dateTimeFormat[f+qb]);a[e]=xb(a.dateTimeFormat[f+pb])}b=Ab(b);var d=tb(a[c],b);if(d<0)d=tb(a[e],b);return d},_getDayIndex:function(e,c){var a=this,b=c?"_upperAbbrDays":"_upperDays",d=a[b];if(!d)a[b]=xb(a.dateTimeFormat[(c?Z:x)+"DayNames"]);return tb(a[b],Ab(e))}};w.registerClass("Sys.CultureInfo");w._parse=function(a){var c=a.dateTimeFormat;if(c&&!c.eras)c.eras=a.eras;return new b.CultureInfo(a.name,a.numberFormat,c)};w._setup=function(){var c=this,b=g.__cultureInfo,f=["January","February","March","April","May","June","July","August","September","October","November","December",x],e=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",x],h={name:x,numberFormat:{CurrencyDecimalDigits:2,CurrencyDecimalSeparator:j,CurrencyGroupSizes:[3],NumberGroupSizes:[3],PercentGroupSizes:[3],CurrencyGroupSeparator:G,CurrencySymbol:"¤",NaNSymbol:"NaN",CurrencyNegativePattern:0,NumberNegativePattern:1,PercentPositivePattern:0,PercentNegativePattern:0,NegativeInfinitySymbol:"-Infinity",NegativeSign:E,NumberDecimalDigits:2,NumberDecimalSeparator:j,NumberGroupSeparator:G,CurrencyPositivePattern:0,PositiveInfinitySymbol:"Infinity",PositiveSign:H,PercentDecimalDigits:2,PercentDecimalSeparator:j,PercentGroupSeparator:G,PercentSymbol:"%",PerMilleSymbol:"‰",NativeDigits:["0","1","2","3","4","5","6","7","8","9"],DigitSubstitution:1},dateTimeFormat:{AMDesignator:"AM",Calendar:{MinSupportedDateTime:"@-62135568000000@",MaxSupportedDateTime:"@253402300799999@",AlgorithmType:1,CalendarType:1,Eras:[1],TwoDigitYearMax:2029},DateSeparator:D,FirstDayOfWeek:0,CalendarWeekRule:0,FullDateTimePattern:"dddd, dd MMMM yyyy HH:mm:ss",LongDatePattern:"dddd, dd MMMM yyyy",LongTimePattern:"HH:mm:ss",MonthDayPattern:"MMMM dd",PMDesignator:"PM",RFC1123Pattern:"ddd, dd MMM yyyy HH':'mm':'ss 'GMT'",ShortDatePattern:"MM/dd/yyyy",ShortTimePattern:"HH:mm",SortableDateTimePattern:"yyyy'-'MM'-'dd'T'HH':'mm':'ss",TimeSeparator:":",UniversalSortableDateTimePattern:"yyyy'-'MM'-'dd HH':'mm':'ss'Z'",YearMonthPattern:"yyyy MMMM",AbbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],ShortestDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],DayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],AbbreviatedMonthNames:e,MonthNames:f,NativeCalendarName:"Gregorian Calendar",AbbreviatedMonthGenitiveNames:Array.clone(e),MonthGenitiveNames:Array.clone(f)},eras:[1,"A.D.",a,0]};c.InvariantCulture=c._parse(h);switch(typeof b){case k:b=g.eval("("+b+")");case o:c.CurrentCulture=c._parse(b);delete __cultureInfo;break;default:b=Cb(h);b.name="en-US";b.numberFormat.CurrencySymbol=n;var d=b.dateTimeFormat;d.FullDatePattern="dddd, MMMM dd, yyyy h:mm:ss tt";d.LongDatePattern="dddd, MMMM dd, yyyy";d.LongTimePattern="h:mm:ss tt";d.ShortDatePattern="M/d/yyyy";d.ShortTimePattern="h:mm tt";d.YearMonthPattern="MMMM, yyyy";c.CurrentCulture=c._parse(b)}};w._setup();Type.registerNamespace("Sys.Serialization");w=b.Serialization.JavaScriptSerializer=function(){};w.registerClass("Sys.Serialization.JavaScriptSerializer");w._esc={charsRegExs:{'"':/\"/g,"\\":/\\/g},chars:["\\",'"'],dateRegEx:/(^|[^\\])\"\\\/Date\((-?[0-9]+)(?:[a-zA-Z]|(?:\+|-)[0-9]{4})?\)\\\/\"/g,escapeChars:{"\\":"\\\\",'"':'\\"',"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r"},escapeRegExG:/[\"\\\x00-\x1F]/g,escapeRegEx:/[\"\\\x00-\x1F]/i,jsonRegEx:/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/g,jsonStringRegEx:/\"(\\.|[^\"\\])*\"/g};w._init=function(){for(var d=this._esc,g=d.chars,f=d.charsRegExs,e=d.escapeChars,b=0;b<32;b++){var a=String.fromCharCode(b);g[b+2]=a;f[a]=new RegExp(a,"g");e[a]=e[a]||"\\u"+("000"+b.toString(16)).slice(-4)}this._load=c};w._serializeNumberWithBuilder=function(a,c){if(!isFinite(a))throw Error.invalidOperation(b.Res.cannotSerializeNonFiniteNumbers);c.append(String(a))};w._serializeStringWithBuilder=function(a,e){e.append('"');var b=this._esc;if(b.escapeRegEx.test(a)){!this._load&&this._init();if(a.length<128)a=a.replace(b.escapeRegExG,function(a){return b.escapeChars[a]});else for(var d=0;d<34;d++){var c=b.chars[d];if(a.indexOf(c)!==y){var f=b.escapeChars[c];a=ib("Opera")||ib(S)?a.split(c).join(f):a.replace(b.charsRegExs[c],f)}}}e.append(a).append('"')};w._serializeWithBuilder=function(b,a,q,p){var h=this,g;switch(typeof b){case o:if(b)if(Number.isInstanceOfType(b))h._serializeNumberWithBuilder(b,a);else if(Boolean.isInstanceOfType(b))a.append(b);else if(String.isInstanceOfType(b))h._serializeStringWithBuilder(b,a);else if(b instanceof Array){a.append("[");for(g=0;g<b.length;++g){g&&a.append(G);h._serializeWithBuilder(b[g],a,d,p)}a.append("]")}else{if(Date.isInstanceOfType(b)){a.append('"\\/Date(').append(b.getTime()).append(')\\/"');break}var j=[],l=0;for(var m in b)if(m.charAt(0)!==n)if(m==="__type"&&l){j[l++]=j[0];j[0]=m}else j[l++]=m;q&&j.sort();a.append("{");var r;for(g=0;g<l;g++){var t=j[g],s=b[t],u=typeof s;if(u!==e&&u!==f){r&&a.append(G);h._serializeWithBuilder(t,a,q,p);a.append(":");h._serializeWithBuilder(s,a,q,p);r=c}}a.append("}")}else a.append(U);break;case i:h._serializeNumberWithBuilder(b,a);break;case k:h._serializeStringWithBuilder(b,a);break;case"boolean":a.append(b);break;default:a.append(U)}};w.serialize=function(c){var a=new b.StringBuilder;b.Serialization.JavaScriptSerializer._serializeWithBuilder(c,a,d);return a.toString()};w.deserialize=function(d,f){if(!d.length)throw Error.argument("data",b.Res.cannotDeserializeEmptyString);var h,c=b.Serialization.JavaScriptSerializer._esc;try{var e=d.replace(c.dateRegEx,"$1new Date($2)");if(f&&c.jsonRegEx.test(e.replace(c.jsonStringRegEx,x)))throw a;return g.eval("("+e+")")}catch(h){throw Error.argument("data",b.Res.cannotDeserializeInvalidJson);}};Type.registerNamespace("Sys.UI");w=b.EventHandlerList=function(){this._list={}};w.prototype={_addHandler:function(b,a){Array.add(this._getEvent(b,c),a)},addHandler:function(b,a){this._addHandler(b,a)},_removeHandler:function(c,b){var a=this._getEvent(c);if(!a)return;Array.remove(a,b)},_removeHandlers:function(b){if(!b)this._list={};else{var a=this._getEvent(b);if(!a)return;a.length=0}},removeHandler:function(b,a){this._removeHandler(b,a)},getHandler:function(c){var b=this._getEvent(c);if(!b||!b.length)return a;b=Array.clone(b);return function(c,d){for(var a=0,e=b.length;a<e;a++)b[a](c,d)}},_getEvent:function(c,d){var b=this._list[c];if(!b){if(!d)return a;this._list[c]=b=[]}return b}};w.registerClass("Sys.EventHandlerList");w=b.CommandEventArgs=function(f,c,d,e){var a=this;b.CommandEventArgs.initializeBase(a);a._commandName=f;a._commandArgument=c;a._commandSource=d;a._commandEvent=e};w.prototype={get_commandName:function(){return this._commandName||a},get_commandArgument:function(){return this._commandArgument},get_commandSource:function(){return this._commandSource||a},get_commandEvent:function(){return this._commandEvent||a}};w.registerClass("Sys.CommandEventArgs",b.CancelEventArgs);w=b.INotifyPropertyChange=function(){};w.registerInterface("Sys.INotifyPropertyChange");w=b.PropertyChangedEventArgs=function(a){b.PropertyChangedEventArgs.initializeBase(this);this._propertyName=a};w.prototype={get_propertyName:function(){return this._propertyName}};w.registerClass("Sys.PropertyChangedEventArgs",b.EventArgs);w=b.INotifyDisposing=function(){};w.registerInterface("Sys.INotifyDisposing");w=b.Component=function(){b.Application&&b.Application.registerDisposableObject(this)};w.prototype={get_events:function(){return b.Observer._getContext(this,c).events},get_id:function(){return this._id||a},set_id:function(a){this._id=a},get_isInitialized:function(){return!!this._initialized},get_isUpdating:function(){return!!this._updating},add_disposing:function(a){this._addHandler(ab,a)},remove_disposing:function(a){this._removeHandler(ab,a)},add_propertyChanged:function(a){this._addHandler(C,a)},remove_propertyChanged:function(a){this._removeHandler(C,a)},_addHandler:function(a,c){b.Observer.addEventHandler(this,a,c)},_removeHandler:function(a,c){b.Observer.removeEventHandler(this,a,c)},beginUpdate:function(){this._updating=c},dispose:function(){var a=this;b.Observer.raiseEvent(a,ab);b.Observer.clearEventHandlers(a);b.Application.unregisterDisposableObject(a);b.Application.removeComponent(a)},endUpdate:function(){var a=this;a._updating=d;!a._initialized&&a.initialize();a.updated()},initialize:function(){this._initialized=c},raisePropertyChanged:function(a){b.Observer.raisePropertyChanged(this,a)},updated:function(){}};w.registerClass("Sys.Component",a,b.IDisposable,b.INotifyPropertyChange,b.INotifyDisposing);w._setProperties=function(c,l){var e,m=Object.getType(c),h=m===Object||m===b.UI.DomElement,k=b.Component.isInstanceOfType(c)&&!c.get_isUpdating();k&&c.beginUpdate();for(var g in l){var d=l[g],i=h?a:c[V+g];if(h||typeof i!==f){var n=c[g];if(!d||typeof d!==o||h&&!n)c[g]=d;else this._setProperties(n,d)}else{var p=c[t+g];if(typeof p===f)p.apply(c,[d]);else if(d instanceof Array){e=i.apply(c);for(var j=0,q=e.length,r=d.length;j<r;j++,q++)e[q]=d[j]}else if(typeof d===o&&Object.getType(d)===Object){e=i.apply(c);this._setProperties(e,d)}}}k&&c.endUpdate()};w._setReferences=function(e,d){var a,c={};v(d,function(d,e){c[e]=a=$find(d);if(!a)throw Error.invalidOperation(String.format(b.Res.referenceNotFound,d));});b._set(e,c)};$create=w.create=function(g,d,c,h,e){var a=e?new g(e):new g;u(a,jb);d&&b.Component._setProperties(a,d);if(c)for(var f in c)a["add_"+f](c[f]);b.Component._register(a,h);return a};w._register=function(a,d,f){var g;if(b.Component.isInstanceOfType(a)){g=c;var e=b.Application;a.get_id()&&e.addComponent(a);if(e.get_isCreatingComponents()){e._createdComponents.push(a);if(d)e._addComponentToSecondPass(a,d);else!f&&a.endUpdate()}else{d&&b.Component._setReferences(a,d);!f&&a.endUpdate()}}return g};b._getComponent=function(d,c){var a=b.Application.findComponent(c);a&&d.push(a)};b._2Pass=function(d){var a=b.Application,c=!a.get_isCreatingComponents();c&&a.beginCreateComponents();p(d,function(a){a()});c&&a.endCreateComponents()};w=b.UI.MouseButton=function(){};w.prototype={leftButton:0,middleButton:1,rightButton:2};w.registerEnum("Sys.UI.MouseButton");w=b.UI.Key=function(){};w.prototype={backspace:8,tab:9,enter:13,esc:27,space:32,pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40,del:127};w.registerEnum("Sys.UI.Key");w=b.UI.Point=function(a,b){this.x=a;this.y=b};w.registerClass("Sys.UI.Point");w=b.UI.Bounds=function(d,e,c,b){var a=this;a.x=d;a.y=e;a.height=b;a.width=c};w.registerClass("Sys.UI.Bounds");w=b.UI.DomEvent=function(h){var c=this,a=h,d=c.type=a.type.toLowerCase();c.rawEvent=a;c.altKey=a.altKey;if(typeof a.button!==e)c.button=typeof a.which!==e?a.button:a.button===4?b.UI.MouseButton.middleButton:a.button===2?b.UI.MouseButton.rightButton:b.UI.MouseButton.leftButton;if(d==="keypress")c.charCode=a.charCode||a.keyCode;else if(a.keyCode&&a.keyCode===46)c.keyCode=127;else c.keyCode=a.keyCode;c.clientX=a.clientX;c.clientY=a.clientY;c.ctrlKey=a.ctrlKey;c.target=a.target||a.srcElement;if(!d.startsWith("key"))if(typeof a.offsetX!==e&&typeof a.offsetY!==e){c.offsetX=a.offsetX;c.offsetY=a.offsetY}else if(c.target&&c.target.nodeType!==3&&typeof a.clientX===i){var f=b.UI.DomElement.getLocation(c.target),g=b.UI.DomElement._getWindow(c.target);c.offsetX=(g.pageXOffset||0)+a.clientX-f.x;c.offsetY=(g.pageYOffset||0)+a.clientY-f.y}c.screenX=a.screenX;c.screenY=a.screenY;c.shiftKey=a.shiftKey};w.prototype={preventDefault:function(){var a=this.rawEvent;if(a.preventDefault)a.preventDefault();else if(g.event)a.returnValue=d},stopPropagation:function(){var a=this.rawEvent;if(a.stopPropagation)a.stopPropagation();else if(g.event)a.cancelBubble=c}};w.registerClass("Sys.UI.DomEvent");$addHandler=w.addHandler=function(f,a,c,e){b.query(f).each(function(){var f=this,i=f.nodeType;if(i===3||i===2||i===8)return;if(!f._events)f._events={};var h=f._events[a];if(!h)f._events[a]=h=[];var j=f,g;if(f.addEventListener){g=function(a){return c.call(j,new b.UI.DomEvent(a))};f.addEventListener(a,g,d)}else if(f.attachEvent){g=function(){var d,a={};try{a=b.UI.DomElement._getWindow(j).event}catch(d){}return c.call(j,new b.UI.DomEvent(a))};f.attachEvent(q+a,g)}h.push({handler:c,browserHandler:g,autoRemove:e});e&&b.UI.DomElement._onDispose(f,b.UI.DomEvent._disposeHandlers)})};b.registerPlugin({name:"addHandler",dom:c,plugin:function(c,d,a){b.UI.DomEvent.addHandler(this.get(),c,d,a);return this}});$addHandlers=w.addHandlers=function(f,c,a,e){b.query(f).each(function(){var b=this.nodeType;if(b===3||b===2||b===8)return;for(var g in c){var f=c[g];if(a)f=Function.createDelegate(a,f);$addHandler(this,g,f,e||d)}})};b.registerPlugin({name:"addHandlers",dom:c,plugin:function(d,a,c){b.UI.DomEvent.addHandlers(this.get(),d,a,c);return this}});$clearHandlers=w.clearHandlers=function(a){b.query(a).each(function(){var a=this.nodeType;if(a===3||a===2||a===8)return;b.UI.DomEvent._clearHandlers(this,d)})};b.registerPlugin({name:"clearHandlers",dom:c,plugin:function(){b.UI.DomEvent.clearHandlers(this.get());return this}});w._clearHandlers=function(c,a){b.query(c).each(function(){var b=this.nodeType;if(b===3||b===2||b===8)return;var c=this._events;if(c)for(var g in c)for(var e=c[g],d=e.length-1;d>=0;d--){var f=e[d];(!a||f.autoRemove)&&$removeHandler(this,g,f.handler)}})};w._disposeHandlers=function(){b.UI.DomEvent._clearHandlers(this,c)};$removeHandler=w.removeHandler=function(c,a,d){b.UI.DomEvent._removeHandler(c,a,d)};w._removeHandler=function(e,c,f){b.query(e).each(function(){var b=this,i=b.nodeType;if(i===3||i===2||i===8)return;for(var h=a,g=b._events[c],e=0,j=g.length;e<j;e++)if(g[e].handler===f){h=g[e].browserHandler;break}if(b.removeEventListener)b.removeEventListener(c,h,d);else b.detachEvent&&b.detachEvent(q+c,h);g.splice(e,1)})};b.registerPlugin({name:"removeHandler",dom:c,plugin:function(a,c){b.UI.DomEvent.removeHandler(this.get(),a,c);return this}});w=b.UI.DomElement=function(){};w.registerClass("Sys.UI.DomElement");w.addCssClass=function(a,c){if(!b.UI.DomElement.containsCssClass(a,c))if(a.className===x)a.className=c;else a.className+=h+c};w.containsCssClass=function(b,a){return Array.contains(b.className.split(h),a)};w.getBounds=function(a){var c=b.UI.DomElement.getLocation(a);return new b.UI.Bounds(c.x,c.y,a.offsetWidth||0,a.offsetHeight||0)};$get=w.getElementById=function(d,c){return b.get(l+d,c||a)};if(document.documentElement.getBoundingClientRect)w.getLocation=function(d){if(d.self||d.nodeType===9||d===document.documentElement||d.parentNode===d.ownerDocument.documentElement)return new b.UI.Point(0,0);var j=d.getBoundingClientRect();if(!j)return new b.UI.Point(0,0);var n,e=d.ownerDocument,i=e.documentElement,f=Math.round(j.left)+(i.scrollLeft||(e.body?e.body.scrollLeft:0)),g=Math.round(j.top)+(i.scrollTop||(e.body?e.body.scrollTop:0));if(ib(bb)){try{var h=d.ownerDocument.parentWindow.frameElement||a;if(h){h=h.frameBorder;var k=h==="0"||h==="no"?2:0;f+=k;g+=k}}catch(n){}if(b.Browser.version===7&&!document.documentMode){var l=document.body,m=l.getBoundingClientRect(),c=(m.right-m.left)/l.clientWidth;c=Math.round(c*B);c=(c-c%5)/B;if(!isNaN(c)&&c!==1){f=Math.round(f/c);g=Math.round(g/c)}}if((document.documentMode||0)<8){f-=i.clientLeft;g-=i.clientTop}}return new b.UI.Point(f,g)};else if(ib("Safari"))w.getLocation=function(e){if(e.window&&e.window===e||e.nodeType===9)return new b.UI.Point(0,0);for(var f=0,g=0,k=a,i=a,d,c=e;c;k=c,i=d,c=c.offsetParent){d=b.UI.DomElement._getCurrentStyle(c);var h=c.tagName?c.tagName.toUpperCase():a;if((c.offsetLeft||c.offsetTop)&&(h!==O||(!i||i.position!==I))){f+=c.offsetLeft;g+=c.offsetTop}if(k&&b.Browser.version>=3){f+=parseInt(d.borderLeftWidth);g+=parseInt(d.borderTopWidth)}}d=b.UI.DomElement._getCurrentStyle(e);var l=d?d.position:a;if(l!==I)for(c=e.parentNode;c;c=c.parentNode){h=c.tagName?c.tagName.toUpperCase():a;if(h!==O&&h!==cb&&(c.scrollLeft||c.scrollTop)){f-=c.scrollLeft||0;g-=c.scrollTop||0}d=b.UI.DomElement._getCurrentStyle(c);var j=d?d.position:a;if(j&&j===I)break}return new b.UI.Point(f,g)};else w.getLocation=function(f){if(f.window&&f.window===f||f.nodeType===9)return new b.UI.Point(0,0);for(var g=0,h=0,j=a,i=a,d=a,c=f;c;j=c,i=d,c=c.offsetParent){var e=c.tagName?c.tagName.toUpperCase():a;d=b.UI.DomElement._getCurrentStyle(c);if((c.offsetLeft||c.offsetTop)&&!(e===O&&(!i||i.position!==I))){g+=c.offsetLeft;h+=c.offsetTop}if(j!==a&&d){if(e!=="TABLE"&&e!=="TD"&&e!==cb){g+=parseInt(d.borderLeftWidth)||0;h+=parseInt(d.borderTopWidth)||0}if(e==="TABLE"&&(d.position==="relative"||d.position===I)){g+=parseInt(d.marginLeft)||0;h+=parseInt(d.marginTop)||0}}}d=b.UI.DomElement._getCurrentStyle(f);var k=d?d.position:a;if(k!==I)for(c=f.parentNode;c;c=c.parentNode){e=c.tagName?c.tagName.toUpperCase():a;if(e!==O&&e!==cb&&(c.scrollLeft||c.scrollTop)){g-=c.scrollLeft||0;h-=c.scrollTop||0;d=b.UI.DomElement._getCurrentStyle(c);if(d){g+=parseInt(d.borderLeftWidth)||0;h+=parseInt(d.borderTopWidth)||0}}}return new b.UI.Point(g,h)};w.isDomElement=function(a){return b._isDomElement(a)};w.removeCssClass=function(d,c){var a=h+d.className+h,b=a.indexOf(h+c+h);if(b>=0)d.className=(a.substr(0,b)+h+a.substring(b+c.length+1,a.length)).trim()};w.resolveElement=function(d,e){var c=d;if(!c)return a;if(typeof c===k)c=b.get(l+c,e);return c};w.raiseBubbleEvent=function(c,d){var b=c;while(b){var a=b.control;if(a&&a.onBubbleEvent&&a.raiseBubbleEvent){!a.onBubbleEvent(c,d)&&a._raiseBubbleEvent(c,d);return}b=b.parentNode}};w._ensureGet=function(a,c){return b.get(a,c)};w.setLocation=function(b,c,d){var a=b.style;a.position=I;a.left=c+"px";a.top=d+"px"};w.toggleCssClass=function(c,a){if(b.UI.DomElement.containsCssClass(c,a))b.UI.DomElement.removeCssClass(c,a);else b.UI.DomElement.addCssClass(c,a)};w.getVisibilityMode=function(a){return a._visibilityMode===b.UI.VisibilityMode.hide?b.UI.VisibilityMode.hide:b.UI.VisibilityMode.collapse};w.setVisibilityMode=function(a,c){b.UI.DomElement._ensureOldDisplayMode(a);if(a._visibilityMode!==c){a._visibilityMode=c;if(b.UI.DomElement.getVisible(a)===d)a.style.display=c===b.UI.VisibilityMode.hide?a._oldDisplayMode:P}};w.getVisible=function(d){var a=d.currentStyle||b.UI.DomElement._getCurrentStyle(d);return a?a.visibility!=="hidden"&&a.display!==P:c};w.setVisible=function(a,c){if(c!==b.UI.DomElement.getVisible(a)){b.UI.DomElement._ensureOldDisplayMode(a);var d=a.style;d.visibility=c?"visible":"hidden";d.display=c||a._visibilityMode===b.UI.VisibilityMode.hide?a._oldDisplayMode:P}};w.setCommand=function(d,f,a,e){b.UI.DomEvent.addHandler(d,"click",function(d){var c=e||this;b.UI.DomElement.raiseBubbleEvent(c,new b.CommandEventArgs(f,a,this,d))},c)};b.registerPlugin({name:"setCommand",dom:c,plugin:function(e,a,d){return this.addHandler("click",function(f){var c=d||this;b.UI.DomElement.raiseBubbleEvent(c,new b.CommandEventArgs(e,a,this,f))},c)}});w._ensureOldDisplayMode=function(b){if(!b._oldDisplayMode){var e=b.currentStyle||this._getCurrentStyle(b);b._oldDisplayMode=e?e.display:a;if(!b._oldDisplayMode||b._oldDisplayMode===P){var d=b.tagName,c="inline";if(/^(DIV|P|ADDRESS|BLOCKQUOTE|BODY|COL|COLGROUP|DD|DL|DT|FIELDSET|FORM|H1|H2|H3|H4|H5|H6|HR|IFRAME|LEGEND|OL|PRE|TABLE|TD|TH|TR|UL)$/i.test(d))c="block";else if(d.toUpperCase()==="LI")c="list-item";b._oldDisplayMode=c}}};w._getWindow=function(a){var b=a.ownerDocument||a.document||a;return b.defaultView||b.parentWindow};w._getCurrentStyle=function(b){if(b.nodeType===3)return a;var c=this._getWindow(b);if(b.documentElement)b=b.documentElement;var d=c&&b!==c&&c.getComputedStyle?c.getComputedStyle(b,a):b.currentStyle||b.style;return d};w._onDispose=function(a,e){var c,d=a.dispose;if(d!==b.UI.DomElement._dispose){a.dispose=b.UI.DomElement._dispose;a.__msajaxdispose=c=[];typeof d===f&&c.push(d)}else c=a.__msajaxdispose;c.push(e)};w._dispose=function(){var b=this,c=b.__msajaxdispose;if(c)for(var d=0,e=c.length;d<e;d++)c[d].apply(b);b.control&&typeof b.control.dispose===f&&b.control.dispose();b.__msajaxdispose=a;b.dispose=a};w=b.IContainer=function(){};w.registerInterface("Sys.IContainer");w=b.ApplicationLoadEventArgs=function(c,a){b.ApplicationLoadEventArgs.initializeBase(this);this._components=c;this._isPartialLoad=a};w.prototype={get_components:function(){return this._components},get_isPartialLoad:function(){return this._isPartialLoad}};w.registerClass("Sys.ApplicationLoadEventArgs",b.EventArgs);w=b._Application=function(){var a=this;b._Application.initializeBase(a);a._disposableObjects=[];a._components={};a._createdComponents=[];a._secondPassComponents=[];a._unloadHandlerDelegate=Function.createDelegate(a,a._unloadHandler);b.UI.DomEvent.addHandler(g,L,a._unloadHandlerDelegate)};w.prototype={_deleteCount:0,get_isCreatingComponents:function(){return!!this._creatingComponents},get_isDisposing:function(){return!!this._disposing},add_init:function(a){if(this._initialized)a(this,b.EventArgs.Empty);else this._addHandler(db,a)},remove_init:function(a){this._removeHandler(db,a)},add_load:function(a){this._addHandler(m,a)},remove_load:function(a){this._removeHandler(m,a)},add_unload:function(a){this._addHandler(L,a)},remove_unload:function(a){this._removeHandler(L,a)},addComponent:function(a){this._components[a.get_id()]=a},beginCreateComponents:function(){this._creatingComponents=c},dispose:function(){var a=this;if(!a._disposing){a._disposing=c;if(a._timerCookie){g.clearTimeout(a._timerCookie);delete a._timerCookie}var f=a._endRequestHandler,d=a._beginRequestHandler;if(f||d){var k=b.WebForms.PageRequestManager.getInstance();f&&k.remove_endRequest(f);d&&k.remove_beginRequest(d);delete a._endRequestHandler;delete a._beginRequestHandler}g.pageUnload&&g.pageUnload(a,b.EventArgs.Empty);b.Observer.raiseEvent(a,L);for(var i=Array.clone(a._disposableObjects),h=0,m=i.length;h<m;h++){var j=i[h];typeof j!==e&&j.dispose()}a._disposableObjects.length=0;b.UI.DomEvent.removeHandler(g,L,a._unloadHandlerDelegate);if(b._ScriptLoader){var l=b._ScriptLoader.getInstance();l&&l.dispose()}b._Application.callBaseMethod(a,eb)}},disposeElement:function(c,m){var i=this;if(c.nodeType===1){for(var h,d,b,k=c.getElementsByTagName("*"),j=k.length,l=new Array(j),e=0;e<j;e++)l[e]=k[e];for(e=j-1;e>=0;e--){var g=l[e];h=g.dispose;if(h&&typeof h===f)g.dispose();else{d=g.control;d&&typeof d.dispose===f&&d.dispose()}b=g._behaviors;b&&i._disposeComponents(b);b=g._components;if(b){i._disposeComponents(b);g._components=a}}if(!m){h=c.dispose;if(h&&typeof h===f)c.dispose();else{d=c.control;d&&typeof d.dispose===f&&d.dispose()}b=c._behaviors;b&&i._disposeComponents(b);b=c._components;if(b){i._disposeComponents(b);c._components=a}}}},endCreateComponents:function(){for(var c=this._secondPassComponents,a=0,g=c.length;a<g;a++){var f=c[a],e=f.component;b.Component._setReferences(e,f.references);e.endUpdate()}this._secondPassComponents=[];this._creatingComponents=d},findComponent:function(d,c){return c?b.IContainer.isInstanceOfType(c)?c.findComponent(d):c[d]||a:b.Application._components[d]||a},getComponents:function(){var c=[],a=this._components;for(var b in a)a.hasOwnProperty(b)&&c.push(a[b]);return c},initialize:function(){g.setTimeout(Function.createDelegate(this,this._doInitialize),0)},_doInitialize:function(){var a=this;if(!a.get_isInitialized()&&!a._disposing){b._Application.callBaseMethod(a,T);a._raiseInit();if(a.get_stateString){if(b.WebForms&&b.WebForms.PageRequestManager){var d=b.WebForms.PageRequestManager.getInstance();a._beginRequestHandler=Function.createDelegate(a,a._onPageRequestManagerBeginRequest);d.add_beginRequest(a._beginRequestHandler);a._endRequestHandler=Function.createDelegate(a,a._onPageRequestManagerEndRequest);d.add_endRequest(a._endRequestHandler)}var c=a.get_stateString();if(c!==a._currentEntry)a._navigate(c);else a._ensureHistory()}a.raiseLoad()}},notifyScriptLoaded:function(){},registerDisposableObject:function(b){if(!this._disposing){var a=this._disposableObjects,c=a.length;a[c]=b;b.__msdisposeindex=c}},raiseLoad:function(){var a=this,d=new b.ApplicationLoadEventArgs(Array.clone(a._createdComponents),!!a._loaded);a._loaded=c;b.Observer.raiseEvent(a,m,d);g.pageLoad&&g.pageLoad(a,d);a._createdComponents=[]},removeComponent:function(b){var a=b.get_id();if(a)delete this._components[a]},unregisterDisposableObject:function(a){var b=this;if(!b._disposing){var g=a.__msdisposeindex;if(typeof g===i){var c=b._disposableObjects;delete c[g];delete a.__msdisposeindex;if(++b._deleteCount>1e3){for(var d=[],f=0,h=c.length;f<h;f++){a=c[f];if(typeof a!==e){a.__msdisposeindex=d.length;d.push(a)}}b._disposableObjects=d;b._deleteCount=0}}}},_addComponentToSecondPass:function(b,a){this._secondPassComponents.push({component:b,references:a})},_disposeComponents:function(a){if(a)for(var b=a.length-1;b>=0;b--){var c=a[b];typeof c.dispose===f&&c.dispose()}},_raiseInit:function(){this.beginCreateComponents();b.Observer.raiseEvent(this,db);this.endCreateComponents()},_unloadHandler:function(){this.dispose()}};w.registerClass("Sys._Application",b.Component,b.IContainer);b.Application=new b._Application;g.$find=b.Application.findComponent;b.onReady(function(){b.Application._doInitialize()});w=b.UI.Behavior=function(a){b.UI.Behavior.initializeBase(this);this._element=a;var c=a._behaviors=a._behaviors||[];c.push(this)};w.prototype={get_element:function(){return this._element},get_id:function(){var c=b.UI.Behavior.callBaseMethod(this,"get_id");if(c)return c;var a=this._element;return!a||!a.id?x:a.id+n+this.get_name()},get_name:function(){var a=this;if(a._name)return a._name;var b=Object.getTypeName(a),c=b.lastIndexOf(j);if(c>=0)b=b.substr(c+1);if(!a._initialized)a._name=b;return b},set_name:function(a){this._name=a},initialize:function(){var a=this;b.UI.Behavior.callBaseMethod(a,T);var c=a.get_name();if(c)a._element[c]=a},dispose:function(){var c=this;b.UI.Behavior.callBaseMethod(c,eb);var d=c._element;if(d){var f=c.get_name();if(f)d[f]=a;var e=d._behaviors;Array.remove(e,c);if(!e.length)d._behaviors=a;delete c._element}}};w.registerClass("Sys.UI.Behavior",b.Component);w.getBehaviorByName=function(d,e){var c=d[e];return c&&b.UI.Behavior.isInstanceOfType(c)?c:a};w.getBehaviors=function(b){var a=b._behaviors;return a?Array.clone(a):[]};b.UI.Behavior.getBehaviorsByType=function(e,f){var a=e._behaviors,d=[];if(a)for(var b=0,g=a.length;b<g;b++){var c=a[b];f.isInstanceOfType(c)&&d.push(c)}return d};w=b.UI.VisibilityMode=function(){};w.prototype={hide:0,collapse:1};w.registerEnum("Sys.UI.VisibilityMode");w=b.UI.Control=function(c){var a=this;b.UI.Control.initializeBase(a);a._element=c;c.control=a;var d=a.get_role();d&&c.setAttribute("role",d)};w.prototype={_parent:a,_visibilityMode:b.UI.VisibilityMode.hide,get_element:function(){return this._element},get_id:function(){return this._id||(this._element?this._element.id:x)},get_parent:function(){var c=this;if(c._parent)return c._parent;if(!c._element)return a;var b=c._element.parentNode;while(b){if(b.control)return b.control;b=b.parentNode}return a},set_parent:function(a){this._parent=a},get_role:function(){return a},get_visibilityMode:function(){return b.UI.DomElement.getVisibilityMode(this._element)},set_visibilityMode:function(a){b.UI.DomElement.setVisibilityMode(this._element,a)},get_visible:function(){return b.UI.DomElement.getVisible(this._element)},set_visible:function(a){b.UI.DomElement.setVisible(this._element,a)},addCssClass:function(a){b.UI.DomElement.addCssClass(this._element,a)},dispose:function(){var c=this;b.UI.Control.callBaseMethod(c,eb);if(c._element){c._element.control=a;delete c._element}if(c._parent)delete c._parent},onBubbleEvent:function(){return d},raiseBubbleEvent:function(a,b){this._raiseBubbleEvent(a,b)},_raiseBubbleEvent:function(b,c){var a=this.get_parent();while(a){if(a.onBubbleEvent(b,c))return;a=a.get_parent()}},removeCssClass:function(a){b.UI.DomElement.removeCssClass(this._element,a)},toggleCssClass:function(a){b.UI.DomElement.toggleCssClass(this._element,a)}};w.registerClass("Sys.UI.Control",b.Component);w=b.HistoryEventArgs=function(a){b.HistoryEventArgs.initializeBase(this);this._state=a};w.prototype={get_state:function(){return this._state}};w.registerClass("Sys.HistoryEventArgs",b.EventArgs);w=b.Application;w._currentEntry=x;w._initialState=a;w._state={};z=b._Application.prototype;z.get_stateString=function(){var b=a;if(ib(S)){var d=g.location.href,c=d.indexOf(l);if(c!==y)b=d.substring(c+1);else b=x;return b}else b=g.location.hash;if(b.length&&b.charAt(0)===l)b=b.substring(1);return b};z.get_enableHistory=function(){return!!this._enableHistory};z.set_enableHistory=function(a){this._enableHistory=a};z.add_navigate=function(a){this._addHandler(fb,a)};z.remove_navigate=function(a){this._removeHandler(fb,a)};z.addHistoryPoint=function(g,j){var b=this;b._ensureHistory();var d=b._state;for(var f in g){var h=g[f];if(h===a){if(typeof d[f]!==e)delete d[f]}else d[f]=h}var i=b._serializeState(d);b._historyPointIsNew=c;b._setState(i,j);b._raiseNavigate()};z.setServerId=function(a,b){this._clientId=a;this._uniqueId=b};z.setServerState=function(a){this._ensureHistory();this._state.__s=a;this._updateHiddenField(a)};z._deserializeState=function(a){var e={};a=a||x;var b=a.indexOf("&&");if(b!==y&&b+2<a.length){e.__s=a.substr(b+2);a=a.substr(0,b)}for(var g=a.split("&"),f=0,j=g.length;f<j;f++){var d=g[f],c=d.indexOf("=");if(c!==y&&c+1<d.length){var i=d.substr(0,c),h=d.substr(c+1);e[i]=decodeURIComponent(h)}}return e};z._enableHistoryInScriptManager=function(){this._enableHistory=c};z._ensureHistory=function(){var a=this;if(!a._historyInitialized&&a._enableHistory){if(ib(bb)&&b.Browser.documentMode<8){a._historyFrame=b.get("#__historyFrame");a._ignoreIFrame=c}a._timerHandler=Function.createDelegate(a,a._onIdle);a._timerCookie=g.setTimeout(a._timerHandler,B);var d;try{a._initialState=a._deserializeState(a.get_stateString())}catch(d){}a._historyInitialized=c}};z._navigate=function(d){var a=this;a._ensureHistory();var c=a._deserializeState(d);if(a._uniqueId){var e=a._state.__s||x,b=c.__s||x;if(b!==e){a._updateHiddenField(b);__doPostBack(a._uniqueId,b);a._state=c;return}}a._setState(d);a._state=c;a._raiseNavigate()};z._onIdle=function(){var a=this;delete a._timerCookie;var b=a.get_stateString();if(b!==a._currentEntry){if(!a._ignoreTimer){a._historyPointIsNew=d;a._navigate(b)}}else a._ignoreTimer=d;a._timerCookie=g.setTimeout(a._timerHandler,B)};z._onIFrameLoad=function(b){var a=this;a._ensureHistory();if(!a._ignoreIFrame){a._historyPointIsNew=d;a._navigate(b)}a._ignoreIFrame=d};z._onPageRequestManagerBeginRequest=function(){this._ignoreTimer=c;this._originalTitle=document.title};z._onPageRequestManagerEndRequest=function(n,m){var f=this,j=m.get_dataItems()[f._clientId],i=f._originalTitle;f._originalTitle=a;var h=b.get("#__EVENTTARGET");if(h&&h.value===f._uniqueId)h.value=x;if(typeof j!==e){f.setServerState(j);f._historyPointIsNew=c}else f._ignoreTimer=d;var g=f._serializeState(f._state);if(g!==f._currentEntry){f._ignoreTimer=c;if(typeof i===k){if(!ib(bb)||b.Browser.version>7){var l=document.title;document.title=i;f._setState(g);document.title=l}else f._setState(g);f._raiseNavigate()}else{f._setState(g);f._raiseNavigate()}}};z._raiseNavigate=function(){var a=this,e=a._historyPointIsNew,d={};for(var c in a._state)if(c!=="__s")d[c]=a._state[c];var f=new b.HistoryEventArgs(d);b.Observer.raiseEvent(a,fb,f);if(!e){var h;try{if(ib(S)&&g.location.hash&&(!g.frameElement||g.top.location.hash))b.Browser.version<3.5?g.history.go(0):(location.hash=a.get_stateString())}catch(h){}}};z._serializeState=function(d){var c=[];for(var a in d){var e=d[a];if(a==="__s")var b=e;else c.push(a+"="+encodeURIComponent(e))}return c.join("&")+(b?"&&"+b:x)};z._setState=function(h,i){var f=this;if(f._enableHistory){h=h||x;if(h!==f._currentEntry){if(g.theForm){var k=g.theForm.action,m=k.indexOf(l);g.theForm.action=(m!==y?k.substring(0,m):k)+l+h}if(f._historyFrame&&f._historyPointIsNew){f._ignoreIFrame=c;var j=f._historyFrame.contentWindow.document;j.open("javascript:'<html></html>'");j.write("<html><head><title>"+(i||document.title)+'</title><script type="text/javascript">parent.Sys.Application._onIFrameLoad('+b.Serialization.JavaScriptSerializer.serialize(h)+");<\/script></head><body></body></html>");j.close()}f._ignoreTimer=d;f._currentEntry=h;if(f._historyFrame||f._historyPointIsNew){var n=f.get_stateString();if(h!==n){g.location.hash=h;f._currentEntry=f.get_stateString();if(typeof i!==e&&i!==a)document.title=i}}f._historyPointIsNew=d}}};z._updateHiddenField=function(b){if(this._clientId){var a=document.getElementById(this._clientId);if(a)a.value=b}};if(!g.XMLHttpRequest)g.XMLHttpRequest=function(){for(var e,c=["Msxml2.XMLHTTP.3.0","Msxml2.XMLHTTP"],b=0,d=c.length;b<d;b++)try{return new ActiveXObject(c[b])}catch(e){}return a};Type.registerNamespace("Sys.Net");w=b.Net.WebRequestExecutor=function(){this._webRequest=a;this._resultObject=a};var R=function(){};w.prototype={get_started:R,get_responseAvailable:R,get_timedOut:R,get_aborted:R,get_responseData:R,get_statusCode:R,get_statusText:R,get_xml:R,executeRequest:R,abort:R,getAllResponseHeaders:R,getResponseHeader:R,get_webRequest:function(){return this._webRequest},_set_webRequest:function(a){this._webRequest=a},get_object:function(){var a=this._resultObject;if(!a)this._resultObject=a=b.Serialization.JavaScriptSerializer.deserialize(this.get_responseData());return a}};w.registerClass("Sys.Net.WebRequestExecutor");b.Net.XMLDOM=function(f){if(!g.DOMParser)for(var j,e=["Msxml2.DOMDocument.3.0","Msxml2.DOMDocument"],c=0,i=e.length;c<i;c++)try{var b=new ActiveXObject(e[c]);b.async=d;b.loadXML(f);b.setProperty(rb,"XPath");return b}catch(j){}else try{var h=new g.DOMParser;return h.parseFromString(f,kb)}catch(j){}return a};w=b.Net.XMLHttpExecutor=function(){var f=this;b.Net.XMLHttpExecutor.initializeBase(f);var d=f;f._onReadyStateChange=function(){if(d._xmlHttpRequest.readyState===4){try{if(typeof d._xmlHttpRequest.status===e)return}catch(f){return}d._clearTimer();d._responseAvailable=c;try{d._webRequest.completed(b.EventArgs.Empty)}finally{if(d._xmlHttpRequest){d._xmlHttpRequest.onreadystatechange=Function.emptyMethod;d._xmlHttpRequest=a}}}};f._clearTimer=function(){if(d._timer){g.clearTimeout(d._timer);d._timer=a}};f._onTimeout=function(){if(!d._responseAvailable){d._clearTimer();d._timedOut=c;var e=d._xmlHttpRequest;e.onreadystatechange=Function.emptyMethod;e.abort();d._webRequest.completed(b.EventArgs.Empty);d._xmlHttpRequest=a}}};w.prototype={get_timedOut:function(){return!!this._timedOut},get_started:function(){return!!this._started},get_responseAvailable:function(){return!!this._responseAvailable},get_aborted:function(){return!!this._aborted},executeRequest:function(){var b=this,e=b.get_webRequest();b._webRequest=e;var i=e.get_body(),h=e.get_headers(),d=new XMLHttpRequest;b._xmlHttpRequest=d;d.onreadystatechange=b._onReadyStateChange;var l=e.get_httpVerb();d.open(l,e.getResolvedUrl(),c);d.setRequestHeader("X-Requested-With","XMLHttpRequest");if(h)for(var k in h){var m=h[k];typeof m!==f&&d.setRequestHeader(k,m)}if(l.toLowerCase()==="post"){(h===a||!h[M])&&d.setRequestHeader(M,"application/x-www-form-urlencoded; charset=utf-8");if(!i)i=x}var j=e.get_timeout();if(j>0)b._timer=g.setTimeout(Function.createDelegate(b,b._onTimeout),j);d.send(i);b._started=c},getResponseHeader:function(b){var c,a;try{a=this._xmlHttpRequest.getResponseHeader(b)}catch(c){}if(!a)a=x;return a},getAllResponseHeaders:function(){return this._xmlHttpRequest.getAllResponseHeaders()},get_responseData:function(){return this._xmlHttpRequest.responseText},get_statusCode:function(){var b,a=0;try{a=this._xmlHttpRequest.status}catch(b){}return a},get_statusText:function(){return this._xmlHttpRequest.statusText},get_xml:function(){var d="parsererror",e=this._xmlHttpRequest,c=e.responseXML;if(!c||!c.documentElement){c=b.Net.XMLDOM(e.responseText);if(!c||!c.documentElement)return a}else navigator.userAgent.indexOf("MSIE")!==y&&c.setProperty(rb,"XPath");return c.documentElement.namespaceURI==="http://www.mozilla.org/newlayout/xml/parsererror.xml"&&c.documentElement.tagName===d?a:c.documentElement.firstChild&&c.documentElement.firstChild.tagName===d?a:c},abort:function(){var d=this;if(d._aborted||d._responseAvailable||d._timedOut)return;d._aborted=c;d._clearTimer();var e=d._xmlHttpRequest;if(e&&!d._responseAvailable){e.onreadystatechange=Function.emptyMethod;e.abort();d._xmlHttpRequest=a;d._webRequest.completed(b.EventArgs.Empty)}}};w.registerClass(vb,b.Net.WebRequestExecutor);w=b.Net._WebRequestManager=function(){this._defaultExecutorType=vb};w.prototype={add_invokingRequest:function(a){b.Observer.addEventHandler(this,gb,a)},remove_invokingRequest:function(a){b.Observer.removeEventHandler(this,gb,a)},add_completedRequest:function(a){b.Observer.addEventHandler(this,hb,a)},remove_completedRequest:function(a){b.Observer.removeEventHandler(this,hb,a)},get_defaultTimeout:function(){return this._defaultTimeout||0},set_defaultTimeout:function(a){this._defaultTimeout=a},get_defaultExecutorType:function(){return this._defaultExecutorType},set_defaultExecutorType:function(a){this._defaultExecutorType=a},executeRequest:function(d){var a=d.get_executor();if(!a){var i,h;try{var f=g.eval(this._defaultExecutorType);a=new f}catch(i){h=c}d.set_executor(a)}if(!a.get_aborted()){var e=new b.Net.NetworkRequestEventArgs(d);b.Observer.raiseEvent(this,gb,e);!e.get_cancel()&&a.executeRequest()}}};w.registerClass("Sys.Net._WebRequestManager");b.Net.WebRequestManager=new b.Net._WebRequestManager;w=b.Net.NetworkRequestEventArgs=function(a){b.Net.NetworkRequestEventArgs.initializeBase(this);this._webRequest=a};w.prototype={get_webRequest:function(){return this._webRequest}};w.registerClass("Sys.Net.NetworkRequestEventArgs",b.CancelEventArgs);w=b.Net.WebRequest=function(){var b=this;b._url=x;b._headers={};b._body=a;b._userContext=a;b._httpVerb=a};w.prototype={add_completed:function(a){b.Observer.addEventHandler(this,Q,a)},remove_completed:function(a){b.Observer.removeEventHandler(this,Q,a)},completed:function(e){var a=this;function d(g,f,d){var a=b.Observer._getContext(g,c).events.getHandler(d);a&&a(f,e)}d(b.Net.WebRequestManager,a._executor,hb);d(a,a._executor,Q);b.Observer.clearEventHandlers(a,Q)},get_url:function(){return this._url},set_url:function(a){this._url=a},get_headers:function(){return this._headers},get_httpVerb:function(){return this._httpVerb===a?this._body===a?"GET":"POST":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||a},set_executor:function(a){this._executor=a;a._set_webRequest(this)},get_timeout:function(){return this._timeout||b.Net.WebRequestManager.get_defaultTimeout()},set_timeout:function(a){this._timeout=a},getResolvedUrl:function(){return b.Net.WebRequest._resolveUrl(this._url)},invoke:function(){b.Net.WebRequestManager.executeRequest(this)}};w._resolveUrl=function(c,a){if(c&&c.indexOf("://")>0)return c;if(!a||!a.length){var e=b.get("base");if(e&&e.href&&e.href.length)a=e.href;else a=document.URL}var d=a.indexOf("?");if(d>0)a=a.substr(0,d);d=a.indexOf(l);if(d>0)a=a.substr(0,d);a=a.substr(0,a.lastIndexOf(D)+1);if(!c||!c.length)return a;if(c.charAt(0)===D){var f=a.indexOf("://"),h=a.indexOf(D,f+3);return a.substr(0,h)+c}else{var g=a.lastIndexOf(D);return a.substr(0,g+1)+c}};w._createQueryString=function(d,c,h){c=c||encodeURIComponent;var j=0,g,i,e,a=new b.StringBuilder;if(d)for(e in d){g=d[e];if(typeof g===f)continue;i=b.Serialization.JavaScriptSerializer.serialize(g);j++&&a.append("&");a.append(e);a.append("=");a.append(c(i))}if(h){j&&a.append("&");a.append(h)}return a.toString()};w._createUrl=function(c,d,e){if(!d&&!e)return c;var f=b.Net.WebRequest._createQueryString(d,a,e);return f.length?c+(c&&c.indexOf("?")>=0?"&":"?")+f:c};w.registerClass("Sys.Net.WebRequest");Type.registerNamespace("Sys.Net");w=b.Net.WebServiceProxy=function(){var a=Object.getType(this);if(a._staticInstance&&typeof a._staticInstance.get_enableJsonp===f)this._jsonp=a._staticInstance.get_enableJsonp()};w.prototype={get_timeout:function(){return this._timeout||0},set_timeout:function(a){this._timeout=a},get_defaultUserContext:function(){return typeof this._userContext===e?a:this._userContext},set_defaultUserContext:function(a){this._userContext=a},get_defaultSucceededCallback:function(){return this._succeeded||a},set_defaultSucceededCallback:function(a){this._succeeded=a},get_defaultFailedCallback:function(){return this._failed||a},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||a},set_path:function(a){this._path=a},get_jsonpCallbackParameter:function(){return this._callbackParameter||sb},set_jsonpCallbackParameter:function(a){this._callbackParameter=a},_invoke:function(h,i,k,j,g,f,d){var c=this;g=g||c.get_defaultSucceededCallback();f=f||c.get_defaultFailedCallback();if(d===a||typeof d===e)d=c.get_defaultUserContext();return b.Net.WebServiceProxy.invoke(h,i,k,j,g,f,d,c.get_timeout(),c.get_enableJsonp(),c.get_jsonpCallbackParameter())}};w.registerClass("Sys.Net.WebServiceProxy");w.invoke=function(v,f,r,q,p,h,l,m,C,u){var o=C!==d?b.Net.WebServiceProxy._xdomain.exec(v):a,i,s=o&&o.length===3&&(o[1]!==location.protocol||o[2]!==location.host);r=s||r;if(s){u=u||sb;i="_jsonp"+b._jsonp++}if(!q)q={};var w=q;if(!r||!w)w={};var n,k=a,t=a,A=b.Net.WebRequest._createUrl(f?v+D+encodeURIComponent(f):v,w,s?u+"=Sys."+i:a);if(s){function B(){if(k===a)return;k=a;n=new b.Net.WebServiceError(c,String.format(b.Res.webServiceTimedOut,f));delete b[i];h&&h(n,l,f)}function z(c,j){if(k!==a){g.clearTimeout(k);k=a}delete b[i];i=a;if(typeof j!==e&&j!==200){if(h){n=new b.Net.WebServiceError(d,c.Message||String.format(b.Res.webServiceFailedNoMsg,f),c.StackTrace||a,c.ExceptionType||a,c);n._statusCode=j;h(n,l,f)}}else p&&p(c,l,f)}b[i]=z;m=m||b.Net.WebRequestManager.get_defaultTimeout();if(m>0)k=g.setTimeout(B,m);b._loadJsonp(A,function(){i&&z({Message:String.format(b.Res.webServiceFailedNoMsg,f)},y)});return a}var j=new b.Net.WebRequest;j.set_url(A);j.get_headers()[M]="application/json; charset=utf-8";if(!r){t=b.Serialization.JavaScriptSerializer.serialize(q);if(t==="{}")t=x}j.set_body(t);j.add_completed(E);m>0&&j.set_timeout(m);j.invoke();function E(g){if(g.get_responseAvailable()){var s,i=g.get_statusCode(),c=a,k;try{var m=g.getResponseHeader(M);k=m.startsWith("application/json");c=k?g.get_object():m.startsWith(kb)?g.get_xml():g.get_responseData()}catch(s){}var o=g.getResponseHeader("jsonerror"),j=o==="true";if(j){if(c)c=new b.Net.WebServiceError(d,c.Message,c.StackTrace,c.ExceptionType,c)}else if(k)c=!c||typeof c.d===e?c:c.d;if(i<200||i>=300||j){if(h){if(!c||!j)c=new b.Net.WebServiceError(d,String.format(b.Res.webServiceFailedNoMsg,f));c._statusCode=i;h(c,l,f)}}else p&&p(c,l,f)}else{var n=g.get_timedOut(),q=String.format(n?b.Res.webServiceTimedOut:b.Res.webServiceFailedNoMsg,f);h&&h(new b.Net.WebServiceError(n,q,x,x),l,f)}}return j};w._generateTypedConstructor=function(a){return function(b){if(b)for(var c in b)this[c]=b[c];this.__type=a}};b._jsonp=0;w._xdomain=/^\s*([a-zA-Z0-9\+\-\.]+\:)\/\/([^?#\/]+)/;b._loadJsonp=function(h,g){var c=document.createElement("script");c.type="text/javascript";c.src=h;var f=c.attachEvent;function e(){if(!f||/loaded|complete/.test(c.readyState)){if(f)c.detachEvent(s,e);else{c.removeEventListener(m,e,d);c.removeEventListener(r,e,d)}g.apply(c);c=a}}if(f)c.attachEvent(s,e);else{c.addEventListener(m,e,d);c.addEventListener(r,e,d)}b.get("head").appendChild(c)};w=b.Net.WebServiceError=function(e,f,d,b,c){var a=this;a._timedOut=e;a._message=f;a._stackTrace=d;a._exceptionType=b;a._errorObject=c;a._statusCode=y};w.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||x},get_exceptionType:function(){return this._exceptionType||x},get_errorObject:function(){return this._errorObject||a}};w.registerClass("Sys.Net.WebServiceError");Type.registerNamespace("Sys.Services");var mb=b.Services,ub="Service",Eb="Role",Db="Authentication",Bb="Profile";function zb(a){this._path=a}mb[Db+ub]={set_path:zb,_setAuthenticated:function(a){this._auth=a}};mb["_"+Db+ub]={};mb[Bb+ub]={set_path:zb};mb["_"+Bb+ub]={};mb.ProfileGroup=function(a){this._propertygroup=a};mb[Eb+ub]={set_path:zb};mb["_"+Eb+ub]={};b._domLoaded()}if(b.loader)b.loader.registerScript("MicrosoftAjax",a,H);else H()})(window,window.Sys);var $get,$create,$addHandler,$addHandlers,$clearHandlers;
0
Svetlina Anati
Telerik team
answered on 03 Aug 2011, 11:39 AM
Hi Robert,

 What you report seems like an unterminated string constant. However, I could not reproduce it in the demo which I provided you in my last post. Would you please share some runnable modified code of my demo which replicates the issue? You could also test your code with ajaxifying to see whether there has actually been a server error or you could directly debug the steps which reproduce the problem.

In case the problem persists, once I receive runnable reproduction code along with reproduction instructions, I will resolve the issue and you will be then able to apply the same logic in your original application.

Best wishes,
Svetlina
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Alex
Top achievements
Rank 1
answered on 27 Aug 2011, 06:02 AM
Hello,

I tried implementing the solution below but get the following error

Sys.WebForms.PageRequestManagerServerErrorException: Failed to load viewstate.  The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request.  For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request."

when I perform an action on a control that causes an ajax postback in a content page which contains a RadAjaxManagerProxy control.

Master.aspx code
<%@ Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="MasterPage" %>
<%@ Register src="Foundation/Controls/MainMenu.ascx" tagname="MainMenu" tagprefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server" id="head1">
    <title>GDT Portal</title>
    <link href="Master.css" type="text/css" rel="Stylesheet" />
    <script type="text/javascript" src="<%#Page.Resolveurl("~/Foundation/Scripts/jquery-1.6.2.min.js")%>"></script>
    <script type="text/javascript">
        //----------------------- code related only to the demo UI --------------------------------------//
        //all the timers declared below are used for the demo UI only - to update UI texts.
        //The functionality related to the scenario itself is handled by RadNotification automatically out of the box
                    var mainLblCounter = null;
                    var timeLeftCounter = null;
                    var seconds = 60;
                    var secondsBeforeShow = 60;
                    var mainLabel;
                    function pageLoad() {
                        var xmlPanel = $find("<%# RadNotification1.ClientID %>")._xmlPanel;
                        xmlPanel.set_enableClientScriptEvaluation(true);
                    };
                    //stop timers for UI
                    function stopTimer(timer) {
                        clearInterval(this[timer]);
                        this[timer] = null;
                    };
 
                    //reset timers for UI
                    function resetTimer(timer, func, interval) {
                        this.stopTimer(timer);
                        this[timer] = setInterval(Function.createDelegate(this, func), interval);
                    };
 
                    function OnClientShowing(sender, args) {
                        //deal with UI labels
                        resetTimer("timeLeftCounter", UpdateTimeLabel, 1000);
 
                    }
 
                    //-----------------------end of code related only to the demo UI --------------------------------------//
 
 
                    //update the text in the label in RadNotification
                    //this could also be done automatically by using UpdateInterval. However, this will cause callbacks [which is the second best solution then javascript] on every second that is being count
                    function UpdateTimeLabel(toReset) {
                        var sessionExpired = (seconds == 0);
                        if (sessionExpired) {
                            stopTimer("timeLeftCounter");
                            //redirect to session expired page - simply take the url which RadNotification sent from the server to the client as value
                            window.location.href = $find("<%# RadNotification1.ClientID %>").get_value();
                        }
                        else {
                            var timeLbl = $get("<%#timeLbl.ClientID%>");
                            timeLbl.innerHTML = seconds--;
                        }
                    }
 
                    function ContinueSession() {
                        var notification = $find("<%# RadNotification1.ClientID %>");
                        //we need to contact the server to restart the Session - the fastest way is via callback
                        //calling update() automatically performs the callback, no need for any additional code or control
                        notification.update();
                        notification.hide();
                        stopTimer("timeLeftCounter");
                        seconds = <%#SecondsLeftBeforeTimeout%>;
                    }
        </script>
    <asp:ContentPlaceHolder id="head" runat="server"></asp:ContentPlaceHolder>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="AjaxLoadingPanel1" ></telerik:RadAjaxManager>
        <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" ></telerik:RadStyleSheetManager>
        <telerik:RadAjaxLoadingPanel ID="AjaxLoadingPanel1" BackgroundPosition="Center" EnableSkinTransparency="true" Runat="server"></telerik:RadAjaxLoadingPanel>
        <telerik:RadFormDecorator ID="RadFormDecorator1" Runat="server" DecoratedControls="All" ControlsToSkip="Fieldset" Skin="Sitefinity"/>
        <telerik:RadNotification ID="RadNotification1" runat="server" Position="Center" Width="440" Height="215" BorderStyle="None" LoadContentOn="PageLoad" OnClientShowing="OnClientShowing" AutoCloseDelay="60000" Title="Your session is about to expire." EnableRoundedCorners="true" Value="EventHandler.aspx?Event=2">
            <ContentTemplate>
                <div class="clockSession">
                    <div class="contSession">
                        <div class="showNotification">
                            Time remaining:  <span id="timeLbl" style="font-weight:bold" runat="server"></span> seconds<br />
                            <telerik:RadButton ID="continueSession" runat="server" Text="Continue Your Session" Style="margin-top: 10px;" AutoPostBack="false" OnClientClicked="ContinueSession">
                            </telerik:RadButton>
                        </div>
                    </div>
                </div>
            </ContentTemplate>
            <NotificationMenu ID="TitleMenu"></NotificationMenu>
        </telerik:RadNotification>
         
                <div><uc1:MainMenu ID="MainMenu1" runat="server" /></div>
                <div>
                    <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server"></asp:ContentPlaceHolder>
                </div>
    </form>
</body>
</html>

Master.aspx.vb
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim MinutesBeforeTimeout As Integer = 1
        SecondsLeftBeforeTimeout = MinutesBeforeTimeout * 60
        timeLbl.InnerText = SecondsLeftBeforeTimeout
        
 
        If Not Page.IsPostBack Then
           RadNotification1.ShowInterval = (Session.Timeout - MinutesBeforeTimeout) * 60000
            
            RadNotification1.Value = Page.ResolveClientUrl("~/EventHandler.aspx?Event=2")
            
        End If
        Page.Header.DataBind()
    End Sub
 
    Protected Sub RadNotification1_CallbackUpdate(sender As Object, e As Telerik.Web.UI.RadNotificationEventArgs) Handles RadNotification1.CallbackUpdate
        Dim i As Integer = 0
    End Sub
 
    Protected Sub OnAjaxSettingCreating(sender As Object, e As Telerik.Web.UI.AjaxSettingCreatingEventArgs) Handles RadAjaxManager1.AjaxSettingCreating
        e.UpdatePanel.ContentTemplateContainer.Controls.Add(RadNotification1)
    End Sub




Default.aspx (Content Page)

<%@ Page  Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="btn1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="btn1" LoadingPanelID="AjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>
    <asp:Button runat="server" ID="btn1" />
    <div runat="server" id="divContent" style="width:100%; height:100%; margin:auto auto auto auto; padding:10px 10px 10px 10px;"></div>
</asp:Content>


Default.aspx.vb
Partial Class _Default
    Inherits Page
 
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then
            Dim AppContent As New AppContent
            AppContent.Find(AppContent.ContentType.LangingPageAnnouncement)
            divContent.InnerHtml = AppContent.AppContent
        End If
    End Sub
 
 
    Protected Sub btn1_Click(sender As Object, e As System.EventArgs) Handles btn1.Click
        btn1.Text = "Test"
    End Sub
End Class

Any help resolving this issue would be greatly appreciated.

Thank You,
Alex

0
Marin Bratanov
Telerik team
answered on 30 Aug 2011, 11:11 AM
Hello Alex,

This is a very generic error and I suggest that you start by examining these online resources on the matter:
http://www.eggheadcafe.com/community/aspnet/7/10060225/microsoft-jscript-runtime-error-syswebformspagerequestmanagerservererrorexception.aspx
and
http://blog.typps.com/2008/01/failed-to-load-viewstate-typical.html

I was also unable to run your code, because of the evaluation in the head tag - where the SecondsLeftBeforeTimeout variable should be placed - it has no type in the code-behind thus this page would not even compile. Even if it did server code blocks in the head are prone to causing issues. There are also some custom types I am not sure how to emulate (the AppContent class).

What I would advise is examining this post and the project in it on using RadNotification in a master page scenario: http://www.telerik.com/community/forums/aspnet-ajax/notification/radnotification-masterpage-and-radajaxmanager.aspx.

Since you are trying to go for the session timeout notification demo I do not think you actually need to axaxify the RadNotification if you reset the timer on every postback instead of only on the first load. Thus if a new page is loaded the notification will start counting down again and if you do not load a new page, but perform an AJAX request I would advise simply calling the ContinueSession() function (for example via the Ajax Manager's Response Scripts).

Kind regards,
Marin
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Richard
Top achievements
Rank 2
answered on 04 Oct 2011, 04:45 PM
I just downloaded the sample project, incorporated it into my project and am now getting the same error message "Invalid JSON primitive".

Is there any reason this would be happening?
0
Marin Bratanov
Telerik team
answered on 05 Oct 2011, 10:37 AM
Hi Richard,

The original demo needs AJAX settings added for the RadAjaxManager, as explained in the forum post I linked in my previous reply: http://www.telerik.com/community/forums/aspnet-ajax/notification/radnotification-masterpage-and-radajaxmanager.aspx, yet this is not a reason for such an error. This omission would result in full postback performed instead of an AJAX request only.

I advise that you examine the above linked thread for more information on the matter and a working project. I also suggest that you upgrade to the latest version (currently Q2 2011 SP1 or 2011.2.915 as a version number) and see if the issue persists.


Best wishes,
Marin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Richard
Top achievements
Rank 2
answered on 05 Oct 2011, 03:12 PM
Marin,

You keep telling us all the reference the existing link.  The existing link has the code that doesn't work.  Can you post a simple example of the code actually working instead of sending us all to the same project where it doesn't work?

0
Marin Bratanov
Telerik team
answered on 06 Oct 2011, 07:50 AM
Hello Richard,

I have answered your support ticket on the matter and to help other that may encounter a similar issue I am pasting my reply here as well:


I tried the attached project (which, I believe, is taken from the forum thread I linked) and it works as expected on my end: http://screencast.com/t/C24RR0OIe. The Telerik.Web.UI.dll version in my project is 2011.2.915, as specified by you.

We have had reports for this error after an AJAX request when the AjaxControlToolkit assembly is present in the Bin folder (it is not even required that you reference or use it in the said page). What happens is that some of the MS AJAX scripts are taken from the ACT assembly instead and these versions are somehow modified and do not work correctly. Our controls, being built on top of the MS AJAX framework, require the correct scripts to be present in order to function properly.

Please make sure that the AjaxControlToolki.dll and the Telerik.Web.UI.dll that you are using are the latest versions and see if the issue still persists. Also please make sure that the ClientIDMode is set to Auto (in web.config, for the page or per control), as this is the only mode that is supported by the RadControls For ASP.NET AJAX. Also, which is the script manager that you use? Does switching to the RadScriptManager (or the regular asp ScriptManager) resolve the situation?

On a side note - the RadNotification's Show() method does not require that the RadNotification is updated in the AJAX request in order to show it, so you can consider another option - you can simply call its Show() method and not update it via AJAX, but use its Callback functionality to update the content and set the LoadContentOn property to EveryShow so that it updates when it is shown. You can then move the logic that builds the message to the master page's code-behind - in the CallbackUpdate event handler. I am attaching the modified project that uses this logic.





Greetings,
Marin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Neil
Top achievements
Rank 1
answered on 14 Nov 2011, 11:07 PM
I tried your solution above, and although it does work, for some reason the notification shows with the old text for a short time before it updates from the code-behind. For example my code-behind :
protected void OnCallbackUpdate(object sender, RadNotificationEventArgs e)
{
            ArrayList messages = (ArrayList)Session["NotificationMessages"];
            RadNotification1.Text = messages[0].ToString();
            messages.RemoveAt(0);
            Session["NotificationMessages"] = messages;
            
}
Obviously the message may change each time and it is imperative that my users do not see an incorrect message. It shows for long enough before updating that you can read it. Is there any way I can hide the notification until it has fully updated from the callback?
0
Marin Bratanov
Telerik team
answered on 15 Nov 2011, 05:15 PM
Hello Neil,

I believe what happens in your case is that you have set the LoadContentOn to EveryShow, so when the notification shows up then the request is fired, you wait for the server response and then you get the update. If so - this is the expected behavior.

There is a way to change this, however. You can set the LoadContentOn to TimeInterval, then set the UpdateInterval to the desired value. This will cause a silent update, i.e. without the notification showing. Then in the OnClientUpdated event you can obtain the value the notification holds - sender.get_value() is the method where sender is the first argument that the handler receives. On the server (I assume you are using a callback) you can change this value according to the content you pass - if you do not need to show the notification you can set it to 0 for example, then on the client check for that. If you wish to show it - simply call sender.show() as the content has already been updated in the control. If you always need to show it things are simpler - simply call the show() method.


Best wishes,
Marin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Neil
Top achievements
Rank 1
answered on 16 Nov 2011, 04:39 AM
I did try this and it worked well in testing, however once I had 50 users hitting the system the constant callbacks caused the webserver to max out within minutes. The callback on update interval is a good gimmick, but not so good for a live system. I have modified my pages to ajaxify the notification instead and this process works well without any extra overhead on the server.
0
Marin Bratanov
Telerik team
answered on 16 Nov 2011, 01:06 PM
Hello Neil,

I am glad to hear that things are working well for you now, yet your report is very strange. Generally a callback is the lightest mode for client-server communication, as it only invokes a single method on the server, not the entire page lifecycle like AJAX does. Since a server should usually be able to support numerous clients using AJAX at the same time using callbacks should decrease the server load. If you can confirm some certain criteria that lead to this performance issue with the server we will be glad if you can report them back to us so we can check if this is an issue in the control.


Kind regards,
Marin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Mark
Top achievements
Rank 1
answered on 04 Apr 2012, 08:03 AM
I have a similar scenario (master page) where I would like to have the RadNotification control automatically added as an updatedcontrol so that it does not show up blank.  The original demo.zip file is the only one which appears to attempt this via the OnAjaxSettingsCreating event, however when I try this approach, not only does the RadNofication not update, but other controls on the page do not update after the loading panel disappears.  Is this approach still the recommended approach?  It would be extremely difficult to add the RadNotification control programmatically to each ajaxified control as an updatedcontrol.

Thanks!
0
Marin Bratanov
Telerik team
answered on 05 Apr 2012, 10:40 AM
Hello Mark,

I can suggest two other approaches for the case:
1. wrap the RadNotification in an UpdatePanel with UpdateMode set to Always. This will dispose it with every AJAX request and you will be able to modify it each time
OR
2. use the new server-side Show(newText) overload. It allows you to show a RadNotification with a certain text that you define in the code-behind without updating (and disposing) the control at all. This is a one-time text setting and you can see how it works in this online demo. It was added in Q1 2012 and you can easily show server warnings and messages to the user with a common interface.


All the best,
Marin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Notification
Asked by
Robert
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Robert
Top achievements
Rank 1
Alex
Top achievements
Rank 1
Marin Bratanov
Telerik team
Richard
Top achievements
Rank 2
Neil
Top achievements
Rank 1
Mark
Top achievements
Rank 1
Share this question
or