/* START MicrosoftAjax.js */
//----------------------------------------------------------
// Copyright (C) Microsoft Corporation. All rights reserved.
//----------------------------------------------------------
// MicrosoftAjax.js
Function.__typeName="Function";Function.__class=true;Function.createCallback=function(b,a){return function(){var e=arguments.length;if(e>0){var d=[];for(var c=0;c<e;c++)d[c]=arguments[c];d[e]=a;return b.apply(this,d)}return b.call(this,a)}};Function.createDelegate=function(a,b){return function(){return b.apply(a,arguments)}};Function.emptyFunction=Function.emptyMethod=function(){};Function._validateParams=function(e,c){var a;a=Function._validateParameterCount(e,c);if(a){a.popStackFrame();return a}for(var b=0;b<e.length;b++){var d=c[Math.min(b,c.length-1)],f=d.name;if(d.parameterArray)f+="["+(b-c.length+1)+"]";a=Function._validateParameter(e[b],d,f);if(a){a.popStackFrame();return a}}return null};Function._validateParameterCount=function(e,a){var c=a.length,d=0;for(var b=0;b<a.length;b++)if(a[b].parameterArray)c=Number.MAX_VALUE;else if(!a[b].optional)d++;if(e.length<d||e.length>c){var f=Error.parameterCount();f.popStackFrame();return f}return null};Function._validateParameter=function(c,a,h){var b,g=a.type,l=!!a.integer,k=!!a.domElement,m=!!a.mayBeNull;b=Function._validateParameterType(c,g,l,k,m,h);if(b){b.popStackFrame();return b}var e=a.elementType,f=!!a.elementMayBeNull;if(g===Array&&typeof c!=="undefined"&&c!==null&&(e||!f)){var j=!!a.elementInteger,i=!!a.elementDomElement;for(var d=0;d<c.length;d++){var n=c[d];b=Function._validateParameterType(n,e,j,i,f,h+"["+d+"]");if(b){b.popStackFrame();return b}}}return null};Function._validateParameterType=function(a,c,n,m,k,d){var b;if(typeof a==="undefined")if(k)return null;else{b=Error.argumentUndefined(d);b.popStackFrame();return b}if(a===null)if(k)return null;else{b=Error.argumentNull(d);b.popStackFrame();return b}if(c&&c.__enum){if(typeof a!=="number"){b=Error.argumentType(d,Object.getType(a),c);b.popStackFrame();return b}if(a%1===0){var e=c.prototype;if(!c.__flags||a===0){for(var i in e)if(e[i]===a)return null}else{var l=a;for(var i in e){var f=e[i];if(f===0)continue;if((f&a)===f)l-=f;if(l===0)return null}}}b=Error.argumentOutOfRange(d,a,String.format(Sys.Res.enumInvalidValue,a,c.getName()));b.popStackFrame();return b}if(m){var h;if(typeof a.nodeType!=="number"){var g=a.ownerDocument||a.document||a;if(g!=a){var j=g.defaultView||g.parentWindow;h=j!=a&&!(j.document&&a.document&&j.document===a.document)}else h=typeof g.body==="undefined"}else h=a.nodeType===3;if(h){b=Error.argument(d,Sys.Res.argumentDomElement);b.popStackFrame();return b}}if(c&&!c.isInstanceOfType(a)){b=Error.argumentType(d,Object.getType(a),c);b.popStackFrame();return b}if(c===Number&&n)if(a%1!==0){b=Error.argumentOutOfRange(d,a,Sys.Res.argumentInteger);b.popStackFrame();return b}return null};Error.__typeName="Error";Error.__class=true;Error.create=function(d,b){var a=new Error(d);a.message=d;if(b)for(var c in b)a[c]=b[c];a.popStackFrame();return a};Error.argument=function(a,c){var b="Sys.ArgumentException: "+(c?c:Sys.Res.argument);if(a)b+="\n"+String.format(Sys.Res.paramName,a);var d=Error.create(b,{name:"Sys.ArgumentException",paramName:a});d.popStackFrame();return d};Error.argumentNull=function(a,c){var b="Sys.ArgumentNullException: "+(c?c:Sys.Res.argumentNull);if(a)b+="\n"+String.format(Sys.Res.paramName,a);var d=Error.create(b,{name:"Sys.ArgumentNullException",paramName:a});d.popStackFrame();return d};Error.argumentOutOfRange=function(c,a,d){var b="Sys.ArgumentOutOfRangeException: "+(d?d:Sys.Res.argumentOutOfRange);if(c)b+="\n"+String.format(Sys.Res.paramName,c);if(typeof a!=="undefined"&&a!==null)b+="\n"+String.format(Sys.Res.actualValue,a);var e=Error.create(b,{name:"Sys.ArgumentOutOfRangeException",paramName:c,actualValue:a});e.popStackFrame();return e};Error.argumentType=function(d,c,b,e){var a="Sys.ArgumentTypeException: ";if(e)a+=e;else if(c&&b)a+=String.format(Sys.Res.argumentTypeWithTypes,c.getName(),b.getName());else a+=Sys.Res.argumentType;if(d)a+="\n"+String.format(Sys.Res.paramName,d);var f=Error.create(a,{name:"Sys.ArgumentTypeException",paramName:d,actualType:c,expectedType:b});f.popStackFrame();return f};Error.argumentUndefined=function(a,c){var b="Sys.ArgumentUndefinedException: "+(c?c:Sys.Res.argumentUndefined);if(a)b+="\n"+String.format(Sys.Res.paramName,a);var d=Error.create(b,{name:"Sys.ArgumentUndefinedException",paramName:a});d.popStackFrame();return d};Error.format=function(a){var c="Sys.FormatException: "+(a?a:Sys.Res.format),b=Error.create(c,{name:"Sys.FormatException"});b.popStackFrame();return b};Error.invalidOperation=function(a){var c="Sys.InvalidOperationException: "+(a?a:Sys.Res.invalidOperation),b=Error.create(c,{name:"Sys.InvalidOperationException"});b.popStackFrame();return b};Error.notImplemented=function(a){var c="Sys.NotImplementedException: "+(a?a:Sys.Res.notImplemented),b=Error.create(c,{name:"Sys.NotImplementedException"});b.popStackFrame();return b};Error.parameterCount=function(a){var c="Sys.ParameterCountException: "+(a?a:Sys.Res.parameterCount),b=Error.create(c,{name:"Sys.ParameterCountException"});b.popStackFrame();return b};Error.prototype.popStackFrame=function(){if(typeof this.stack==="undefined"||this.stack===null||typeof this.fileName==="undefined"||this.fileName===null||typeof this.lineNumber==="undefined"||this.lineNumber===null)return;var a=this.stack.split("\n"),c=a[0],e=this.fileName+":"+this.lineNumber;while(typeof c!=="undefined"&&c!==null&&c.indexOf(e)===-1){a.shift();c=a[0]}var d=a[1];if(typeof d==="undefined"||d===null)return;var b=d.match(/@(.*):(\d+)$/);if(typeof b==="undefined"||b===null)return;this.fileName=b[1];this.lineNumber=parseInt(b[2]);a.shift();this.stack=a.join("\n")};Object.__typeName="Object";Object.__class=true;Object.getType=function(b){var a=b.constructor;if(!a||typeof a!=="function"||!a.__typeName||a.__typeName==="Object")return Object;return a};Object.getTypeName=function(a){return Object.getType(a).getName()};String.__typeName="String";String.__class=true;String.prototype.endsWith=function(a){return this.substr(this.length-a.length)===a};String.prototype.startsWith=function(a){return this.substr(0,a.length)===a};String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")};String.prototype.trimEnd=function(){return this.replace(/\s+$/,"")};String.prototype.trimStart=function(){return this.replace(/^\s+/,"")};String.format=function(){return String._toFormattedString(false,arguments)};String.localeFormat=function(){return String._toFormattedString(true,arguments)};String._toFormattedString=function(l,j){var c="",e=j[0];for(var a=0;true;){var f=e.indexOf("{",a),d=e.indexOf("}",a);if(f<0&&d<0){c+=e.slice(a);break}if(d>0&&(d<f||f<0)){c+=e.slice(a,d+1);a=d+2;continue}c+=e.slice(a,f);a=f+1;if(e.charAt(a)==="{"){c+="{";a++;continue}if(d<0)break;var h=e.substring(a,d),g=h.indexOf(":"),k=parseInt(g<0?h:h.substring(0,g),10)+1,i=g<0?"":h.substring(g+1),b=j[k];if(typeof b==="undefined"||b===null)b="";if(b.toFormattedString)c+=b.toFormattedString(i);else if(l&&b.localeFormat)c+=b.localeFormat(i);else if(b.format)c+=b.format(i);else c+=b.toString();a=d+1}return c};Boolean.__typeName="Boolean";Boolean.__class=true;Boolean.parse=function(b){var a=b.trim().toLowerCase();if(a==="false")return false;if(a==="true")return true};Date.__typeName="Date";Date.__class=true;Date._appendPreOrPostMatch=function(e,b){var d=0,a=false;for(var c=0,g=e.length;c<g;c++){var f=e.charAt(c);switch(f){case "'":if(a)b.append("'");else d++;a=false;break;case "\\":if(a)b.append("\\");a=!a;break;default:b.append(f);a=false}}return d};Date._expandFormat=function(a,b){if(!b)b="F";if(b.length===1)switch(b){case "d":return a.ShortDatePattern;case "D":return a.LongDatePattern;case "t":return a.ShortTimePattern;case "T":return a.LongTimePattern;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(Sys.Res.formatInvalidString)}return b};Date._expandYear=function(c,a){if(a<100){var b=(new Date).getFullYear();a+=b-b%100;if(a>c.Calendar.TwoDigitYearMax)return a-100}return a};Date._getParseRegExp=function(b,e){if(!b._parseRegExp)b._parseRegExp={};else if(b._parseRegExp[e])return b._parseRegExp[e];var c=Date._expandFormat(b,e);c=c.replace(/([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g,"\\\\$1");var a=new Sys.StringBuilder("^"),j=[],f=0,i=0,h=Date._getTokenRegExp(),d;while((d=h.exec(c))!==null){var l=c.slice(f,d.index);f=h.lastIndex;i+=Date._appendPreOrPostMatch(l,a);if(i%2===1){a.append(d[0]);continue}switch(d[0]){case "dddd":case "ddd":case "MMMM":case "MMM":a.append("(\\D+)");break;case "tt":case "t":a.append("(\\D*)");break;case "yyyy":a.append("(\\d{4})");break;case "fff":a.append("(\\d{3})");break;case "ff":a.append("(\\d{2})");break;case "f":a.append("(\\d)");break;case "dd":case "d":case "MM":case "M":case "yy":case "y":case "HH":case "H":case "hh":case "h":case "mm":case "m":case "ss":case "s":a.append("(\\d\\d?)");break;case "zzz":a.append("([+-]?\\d\\d?:\\d{2})");break;case "zz":case "z":a.append("([+-]?\\d\\d?)")}Array.add(j,d[0])}Date._appendPreOrPostMatch(c.slice(f),a);a.append("$");var k=a.toString().replace(/\s+/g,"\\s+"),g={"regExp":k,"groups":j};b._parseRegExp[e]=g;return g};Date._getTokenRegExp=function(){return /dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z/g};Date.parseLocale=function(a){return Date._parse(a,Sys.CultureInfo.CurrentCulture,arguments)};Date.parseInvariant=function(a){return Date._parse(a,Sys.CultureInfo.InvariantCulture,arguments)};Date._parse=function(g,c,h){var e=false;for(var a=1,i=h.length;a<i;a++){var f=h[a];if(f){e=true;var b=Date._parseExact(g,f,c);if(b)return b}}if(!e){var d=c._getDateTimeFormats();for(var a=0,i=d.length;a<i;a++){var b=Date._parseExact(g,d[a],c);if(b)return b}}return null};Date._parseExact=function(s,y,j){s=s.trim();var m=j.dateTimeFormat,v=Date._getParseRegExp(m,y),x=(new RegExp(v.regExp)).exec(s);if(x===null)return null;var w=v.groups,f=null,c=null,h=null,g=null,d=0,n=0,o=0,e=0,k=null,r=false;for(var p=0,z=w.length;p<z;p++){var a=x[p+1];if(a)switch(w[p]){case "dd":case "d":h=parseInt(a,10);if(h<1||h>31)return null;break;case "MMMM":c=j._getMonthIndex(a);if(c<0||c>11)return null;break;case "MMM":c=j._getAbbrMonthIndex(a);if(c<0||c>11)return null;break;case "M":case "MM":var c=parseInt(a,10)-1;if(c<0||c>11)return null;break;case "y":case "yy":f=Date._expandYear(m,parseInt(a,10));if(f<0||f>9999)return null;break;case "yyyy":f=parseInt(a,10);if(f<0||f>9999)return null;break;case "h":case "hh":d=parseInt(a,10);if(d===12)d=0;if(d<0||d>11)return null;break;case "H":case "HH":d=parseInt(a,10);if(d<0||d>23)return null;break;case "m":case "mm":n=parseInt(a,10);if(n<0||n>59)return null;break;case "s":case "ss":o=parseInt(a,10);if(o<0||o>59)return null;break;case "tt":case "t":var u=a.toUpperCase();r=u===m.PMDesignator.toUpperCase();if(!r&&u!==m.AMDesignator.toUpperCase())return null;break;case "f":e=parseInt(a,10)*100;if(e<0||e>999)return null;break;case "ff":e=parseInt(a,10)*10;if(e<0||e>999)return null;break;case "fff":e=parseInt(a,10);if(e<0||e>999)return null;break;case "dddd":g=j._getDayIndex(a);if(g<0||g>6)return null;break;case "ddd":g=j._getAbbrDayIndex(a);if(g<0||g>6)return null;break;case "zzz":var q=a.split(/:/);if(q.length!==2)return null;var i=parseInt(q[0],10);if(i<-12||i>13)return null;var l=parseInt(q[1],10);if(l<0||l>59)return null;k=i*60+(a.startsWith("-")?-l:l);break;case "z":case "zz":var i=parseInt(a,10);if(i<-12||i>13)return null;k=i*60}}var b=new Date;if(f===null)f=b.getFullYear();if(c===null)c=b.getMonth();if(h===null)h=b.getDate();b.setFullYear(f,c,h);if(b.getDate()!==h)return null;if(g!==null&&b.getDay()!==g)return null;if(r&&d<12)d+=12;b.setHours(d,n,o,e);if(k!==null){var t=b.getMinutes()-(k+b.getTimezoneOffset());b.setHours(b.getHours()+parseInt(t/60,10),t%60)}return b};Date.prototype.format=function(a){return this._toFormattedString(a,Sys.CultureInfo.InvariantCulture)};Date.prototype.localeFormat=function(a){return this._toFormattedString(a,Sys.CultureInfo.CurrentCulture)};Date.prototype._toFormattedString=function(e,h){if(!e||e.length===0||e==="i")if(h&&h.name.length>0)return this.toLocaleString();else return this.toString();var d=h.dateTimeFormat;e=Date._expandFormat(d,e);var a=new Sys.StringBuilder,b;function c(a){if(a<10)return "0"+a;return a.toString()}function g(a){if(a<10)return "00"+a;if(a<100)return "0"+a;return a.toString()}var j=0,i=Date._getTokenRegExp();for(;true;){var l=i.lastIndex,f=i.exec(e),k=e.slice(l,f?f.index:e.length);j+=Date._appendPreOrPostMatch(k,a);if(!f)break;if(j%2===1){a.append(f[0]);continue}switch(f[0]){case "dddd":a.append(d.DayNames[this.getDay()]);break;case "ddd":a.append(d.AbbreviatedDayNames[this.getDay()]);break;case "dd":a.append(c(this.getDate()));break;case "d":a.append(this.getDate());break;case "MMMM":a.append(d.MonthNames[this.getMonth()]);break;case "MMM":a.append(d.AbbreviatedMonthNames[this.getMonth()]);break;case "MM":a.append(c(this.getMonth()+1));break;case "M":a.append(this.getMonth()+1);break;case "yyyy":a.append(this.getFullYear());break;case "yy":a.append(c(this.getFullYear()%100));break;case "y":a.append(this.getFullYear()%100);break;case "hh":b=this.getHours()%12;if(b===0)b=12;a.append(c(b));break;case "h":b=this.getHours()%12;if(b===0)b=12;a.append(b);break;case "HH":a.append(c(this.getHours()));break;case "H":a.append(this.getHours());break;case "mm":a.append(c(this.getMinutes()));break;case "m":a.append(this.getMinutes());break;case "ss":a.append(c(this.getSeconds()));break;case "s":a.append(this.getSeconds());break;case "tt":a.append(this.getHours()<12?d.AMDesignator:d.PMDesignator);break;case "t":a.append((this.getHours()<12?d.AMDesignator:d.PMDesignator).charAt(0));break;case "f":a.append(g(this.getMilliseconds()).charAt(0));break;case "ff":a.append(g(this.getMilliseconds()).substr(0,2));break;case "fff":a.append(g(this.getMilliseconds()));break;case "z":b=this.getTimezoneOffset()/60;a.append((b<=0?"+":"-")+Math.floor(Math.abs(b)));break;case "zz":b=this.getTimezoneOffset()/60;a.append((b<=0?"+":"-")+c(Math.floor(Math.abs(b))));break;case "zzz":b=this.getTimezoneOffset()/60;a.append((b<=0?"+":"-")+c(Math.floor(Math.abs(b)))+d.TimeSeparator+c(Math.abs(this.getTimezoneOffset()%60)))}}return a.toString()};Number.__typeName="Number";Number.__class=true;Number.parseLocale=function(a){return Number._parse(a,Sys.CultureInfo.CurrentCulture)};Number.parseInvariant=function(a){return Number._parse(a,Sys.CultureInfo.InvariantCulture)};Number._parse=function(b,o){b=b.trim();if(b.match(/^[+-]?infinity$/i))return parseFloat(b);if(b.match(/^0x[a-f0-9]+$/i))return parseInt(b);var a=o.numberFormat,g=Number._parseNumberNegativePattern(b,a,a.NumberNegativePattern),h=g[0],e=g[1];if(h===""&&a.NumberNegativePattern!==1){g=Number._parseNumberNegativePattern(b,a,1);h=g[0];e=g[1]}if(h==="")h="+";var j,d,f=e.indexOf("e");if(f<0)f=e.indexOf("E");if(f<0){d=e;j=null}else{d=e.substr(0,f);j=e.substr(f+1)}var c,k,m=d.indexOf(a.NumberDecimalSeparator);if(m<0){c=d;k=null}else{c=d.substr(0,m);k=d.substr(m+a.NumberDecimalSeparator.length)}c=c.split(a.NumberGroupSeparator).join("");var n=a.NumberGroupSeparator.replace(/\u00A0/g," ");if(a.NumberGroupSeparator!==n)c=c.split(n).join("");var l=h+c;if(k!==null)l+="."+k;if(j!==null){var i=Number._parseNumberNegativePattern(j,a,1);if(i[0]==="")i[0]="+";l+="e"+i[0]+i[1]}if(l.match(/^[+-]?\d*\.?\d*(e[+-]?\d+)?$/))return parseFloat(l);return Number.NaN};Number._parseNumberNegativePattern=function(a,d,e){var b=d.NegativeSign,c=d.PositiveSign;switch(e){case 4:b=" "+b;c=" "+c;case 3:if(a.endsWith(b))return ["-",a.substr(0,a.length-b.length)];else if(a.endsWith(c))return ["+",a.substr(0,a.length-c.length)];break;case 2:b+=" ";c+=" ";case 1:if(a.startsWith(b))return ["-",a.substr(b.length)];else if(a.startsWith(c))return ["+",a.substr(c.length)];break;case 0:if(a.startsWith("(")&&a.endsWith(")"))return ["-",a.substr(1,a.length-2)]}return ["",a]};Number.prototype.format=function(a){return this._toFormattedString(a,Sys.CultureInfo.InvariantCulture)};Number.prototype.localeFormat=function(a){return this._toFormattedString(a,Sys.CultureInfo.CurrentCulture)};Number.prototype._toFormattedString=function(d,j){if(!d||d.length===0||d==="i")if(j&&j.name.length>0)return this.toLocaleString();else return this.toString();var o=["n %","n%","%n"],n=["-n %","-n%","-%n"],p=["(n)","-n","- n","n-","n -"],m=["$n","n$","$ n","n $"],l=["($n)","-$n","$-n","$n-","(n$)","-n$","n-$","n$-","-n $","-$ n","n $-","$ n-","$ -n","n- $","($ n)","(n $)"];function g(a,c,d){for(var b=a.length;b<c;b++)a=d?"0"+a:a+"0";return a}function i(j,i,l,n,p){var h=l[0],k=1,o=Math.pow(10,i),m=Math.round(j*o)/o;if(!isFinite(m))m=j;j=m;var b=j.toString(),a="",c,e=b.split(/e/i);b=e[0];c=e.length>1?parseInt(e[1]):0;e=b.split(".");b=e[0];a=e.length>1?e[1]:"";var q;if(c>0){a=g(a,c,false);b+=a.slice(0,c);a=a.substr(c)}else if(c<0){c=-c;b=g(b,c+1,true);a=b.slice(-c,b.length)+a;b=b.slice(0,-c)}if(i>0){if(a.length>i)a=a.slice(0,i);else a=g(a,i,false);a=p+a}else a="";var d=b.length-1,f="";while(d>=0){if(h===0||h>d)if(f.length>0)return b.slice(0,d+1)+n+f+a;else return b.slice(0,d+1)+a;if(f.length>0)f=b.slice(d-h+1,d+1)+n+f;else f=b.slice(d-h+1,d+1);d-=h;if(k<l.length){h=l[k];k++}}return b.slice(0,d+1)+n+f+a}var a=j.numberFormat,e=Math.abs(this);if(!d)d="D";var b=-1;if(d.length>1)b=parseInt(d.slice(1),10);var c;switch(d.charAt(0)){case "d":case "D":c="n";if(b!==-1)e=g(""+e,b,true);if(this<0)e=-e;break;case "c":case "C":if(this<0)c=l[a.CurrencyNegativePattern];else c=m[a.CurrencyPositivePattern];if(b===-1)b=a.CurrencyDecimalDigits;e=i(Math.abs(this),b,a.CurrencyGroupSizes,a.CurrencyGroupSeparator,a.CurrencyDecimalSeparator);break;case "n":case "N":if(this<0)c=p[a.NumberNegativePattern];else c="n";if(b===-1)b=a.NumberDecimalDigits;e=i(Math.abs(this),b,a.NumberGroupSizes,a.NumberGroupSeparator,a.NumberDecimalSeparator);break;case "p":case "P":if(this<0)c=n[a.PercentNegativePattern];else c=o[a.PercentPositivePattern];if(b===-1)b=a.PercentDecimalDigits;e=i(Math.abs(this)*100,b,a.PercentGroupSizes,a.PercentGroupSeparator,a.PercentDecimalSeparator);break;default:throw Error.format(Sys.Res.formatBadFormatSpecifier)}var k=/n|\$|-|%/g,f="";for(;true;){var q=k.lastIndex,h=k.exec(c);f+=c.slice(q,h?h.index:c.length);if(!h)break;switch(h[0]){case "n":f+=e;break;case "$":f+=a.CurrencySymbol;break;case "-":f+=a.NegativeSign;break;case "%":f+=a.PercentSymbol}}return f};RegExp.__typeName="RegExp";RegExp.__class=true;Array.__typeName="Array";Array.__class=true;Array.add=Array.enqueue=function(a,b){a[a.length]=b};Array.addRange=function(a,b){a.push.apply(a,b)};Array.clear=function(a){a.length=0};Array.clone=function(a){if(a.length===1)return [a[0]];else return Array.apply(null,a)};Array.contains=function(a,b){return Array.indexOf(a,b)>=0};Array.dequeue=function(a){return a.shift()};Array.forEach=function(b,e,d){for(var a=0,f=b.length;a<f;a++){var c=b[a];if(typeof c!=="undefined")e.call(d,c,a,b)}};Array.indexOf=function(d,e,a){if(typeof e==="undefined")return -1;var c=d.length;if(c!==0){a=a-0;if(isNaN(a))a=0;else{if(isFinite(a))a=a-a%1;if(a<0)a=Math.max(0,c+a)}for(var b=a;b<c;b++)if(typeof d[b]!=="undefined"&&d[b]===e)return b}return -1};Array.insert=function(a,b,c){a.splice(b,0,c)};Array.parse=function(value){if(!value)return [];return eval(value)};Array.remove=function(b,c){var a=Array.indexOf(b,c);if(a>=0)b.splice(a,1);return a>=0};Array.removeAt=function(a,b){a.splice(b,1)};if(!window)this.window=this;window.Type=Function;Type.prototype.callBaseMethod=function(a,d,b){var c=this.getBaseMethod(a,d);if(!b)return c.apply(a);else return c.apply(a,b)};Type.prototype.getBaseMethod=function(d,c){var b=this.getBaseType();if(b){var a=b.prototype[c];return a instanceof Function?a:null}return null};Type.prototype.getBaseType=function(){return typeof this.__baseType==="undefined"?null:this.__baseType};Type.prototype.getInterfaces=function(){var a=[],b=this;while(b){var c=b.__interfaces;if(c)for(var d=0,f=c.length;d<f;d++){var e=c[d];if(!Array.contains(a,e))a[a.length]=e}b=b.__baseType}return a};Type.prototype.getName=function(){return typeof this.__typeName==="undefined"?"":this.__typeName};Type.prototype.implementsInterface=function(d){this.resolveInheritance();var c=d.getName(),a=this.__interfaceCache;if(a){var e=a[c];if(typeof e!=="undefined")return e}else a=this.__interfaceCache={};var b=this;while(b){var f=b.__interfaces;if(f)if(Array.indexOf(f,d)!==-1)return a[c]=true;b=b.__baseType}return a[c]=false};Type.prototype.inheritsFrom=function(b){this.resolveInheritance();var a=this.__baseType;while(a){if(a===b)return true;a=a.__baseType}return false};Type.prototype.initializeBase=function(a,b){this.resolveInheritance();if(this.__baseType)if(!b)this.__baseType.apply(a);else this.__baseType.apply(a,b);return a};Type.prototype.isImplementedBy=function(a){if(typeof a==="undefined"||a===null)return false;var b=Object.getType(a);return !!(b.implementsInterface&&b.implementsInterface(this))};Type.prototype.isInstanceOfType=function(b){if(typeof b==="undefined"||b===null)return false;if(b instanceof this)return true;var a=Object.getType(b);return !!(a===this)||a.inheritsFrom&&a.inheritsFrom(this)||a.implementsInterface&&a.implementsInterface(this)};Type.prototype.registerClass=function(c,b,d){this.prototype.constructor=this;this.__typeName=c;this.__class=true;if(b){this.__baseType=b;this.__basePrototypePending=true}Sys.__upperCaseTypes[c.toUpperCase()]=this;if(d){this.__interfaces=[];for(var a=2,f=arguments.length;a<f;a++){var e=arguments[a];this.__interfaces.push(e)}}return this};Type.prototype.registerInterface=function(a){Sys.__upperCaseTypes[a.toUpperCase()]=this;this.prototype.constructor=this;this.__typeName=a;this.__interface=true;return this};Type.prototype.resolveInheritance=function(){if(this.__basePrototypePending){var b=this.__baseType;b.resolveInheritance();for(var a in b.prototype){var c=b.prototype[a];if(!this.prototype[a])this.prototype[a]=c}delete this.__basePrototypePending}};Type.getRootNamespaces=function(){return Array.clone(Sys.__rootNamespaces)};Type.isClass=function(a){if(typeof a==="undefined"||a===null)return false;return !!a.__class};Type.isInterface=function(a){if(typeof a==="undefined"||a===null)return false;return !!a.__interface};Type.isNamespace=function(a){if(typeof a==="undefined"||a===null)return false;return !!a.__namespace};Type.parse=function(typeName,ns){var fn;if(ns){fn=Sys.__upperCaseTypes[ns.getName().toUpperCase()+"."+typeName.toUpperCase()];return fn||null}if(!typeName)return null;if(!Type.__htClasses)Type.__htClasses={};fn=Type.__htClasses[typeName];if(!fn){fn=eval(typeName);Type.__htClasses[typeName]=fn}return fn};Type.registerNamespace=function(f){var d=window,c=f.split(".");for(var b=0;b<c.length;b++){var e=c[b],a=d[e];if(!a){a=d[e]={__namespace:true,__typeName:c.slice(0,b+1).join(".")};if(b===0)Sys.__rootNamespaces[Sys.__rootNamespaces.length]=a;a.getName=function(){return this.__typeName}}d=a}};window.Sys={__namespace:true,__typeName:"Sys",getName:function(){return "Sys"},__upperCaseTypes:{}};Sys.__rootNamespaces=[Sys];Sys.IDisposable=function(){};Sys.IDisposable.prototype={};Sys.IDisposable.registerInterface("Sys.IDisposable");Sys.StringBuilder=function(a){this._parts=typeof a!=="undefined"&&a!==null&&a!==""?[a.toString()]:[];this._value={};this._len=0};Sys.StringBuilder.prototype={append:function(a){this._parts[this._parts.length]=a},appendLine:function(a){this._parts[this._parts.length]=typeof a==="undefined"||a===null||a===""?"\r\n":a+"\r\n"},clear:function(){this._parts=[];this._value={};this._len=0},isEmpty:function(){if(this._parts.length===0)return true;return this.toString()===""},toString:function(a){a=a||"";var b=this._parts;if(this._len!==b.length){this._value={};this._len=b.length}var d=this._value;if(typeof d[a]==="undefined"){if(a!=="")for(var c=0;c<b.length;)if(typeof b[c]==="undefined"||b[c]===""||b[c]===null)b.splice(c,1);else c++;d[a]=this._parts.join(a)}return d[a]}};Sys.StringBuilder.registerClass("Sys.StringBuilder");if(!window.XMLHttpRequest)window.XMLHttpRequest=function(){var b=["Msxml2.XMLHTTP.3.0","Msxml2.XMLHTTP"];for(var a=0,c=b.length;a<c;a++)try{return new ActiveXObject(b[a])}catch(d){}return null};Sys.Browser={};Sys.Browser.InternetExplorer={};Sys.Browser.Firefox={};Sys.Browser.Safari={};Sys.Browser.Opera={};Sys.Browser.agent=null;Sys.Browser.hasDebuggerStatement=false;Sys.Browser.name=navigator.appName;Sys.Browser.version=parseFloat(navigator.appVersion);Sys.Browser.documentMode=0;if(navigator.userAgent.indexOf(" MSIE ")>-1){Sys.Browser.agent=Sys.Browser.InternetExplorer;Sys.Browser.version=parseFloat(navigator.userAgent.match(/MSIE (\d+\.\d+)/)[1]);if(Sys.Browser.version>=8)if(document.documentMode>=7)Sys.Browser.documentMode=document.documentMode;Sys.Browser.hasDebuggerStatement=true}else if(navigator.userAgent.indexOf(" Firefox/")>-1){Sys.Browser.agent=Sys.Browser.Firefox;Sys.Browser.version=parseFloat(navigator.userAgent.match(/Firefox\/(\d+\.\d+)/)[1]);Sys.Browser.name="Firefox";Sys.Browser.hasDebuggerStatement=true}else if(navigator.userAgent.indexOf(" AppleWebKit/")>-1){Sys.Browser.agent=Sys.Browser.Safari;Sys.Browser.version=parseFloat(navigator.userAgent.match(/AppleWebKit\/(\d+(\.\d+)?)/)[1]);Sys.Browser.name="Safari"}else if(navigator.userAgent.indexOf("Opera/")>-1)Sys.Browser.agent=Sys.Browser.Opera;Type.registerNamespace("Sys.UI");Sys._Debug=function(){};Sys._Debug.prototype={_appendConsole:function(a){if(typeof Debug!=="undefined"&&Debug.writeln)Debug.writeln(a);if(window.console&&window.console.log)window.console.log(a);if(window.opera)window.opera.postError(a);if(window.debugService)window.debugService.trace(a)},_appendTrace:function(b){var a=document.getElementById("TraceConsole");if(a&&a.tagName.toUpperCase()==="TEXTAREA")a.value+=b+"\n"},assert:function(c,a,b){if(!c){a=b&&this.assert.caller?String.format(Sys.Res.assertFailedCaller,a,this.assert.caller):String.format(Sys.Res.assertFailed,a);if(confirm(String.format(Sys.Res.breakIntoDebugger,a)))this.fail(a)}},clearTrace:function(){var a=document.getElementById("TraceConsole");if(a&&a.tagName.toUpperCase()==="TEXTAREA")a.value=""},fail:function(message){this._appendConsole(message);if(Sys.Browser.hasDebuggerStatement)eval("debugger")},trace:function(a){this._appendConsole(a);this._appendTrace(a)},traceDump:function(a,b){var c=this._traceDump(a,b,true)},_traceDump:function(a,c,f,b,d){c=c?c:"traceDump";b=b?b:"";if(a===null){this.trace(b+c+": null");return}switch(typeof a){case "undefined":this.trace(b+c+": Undefined");break;case "number":case "string":case "boolean":this.trace(b+c+": "+a);break;default:if(Date.isInstanceOfType(a)||RegExp.isInstanceOfType(a)){this.trace(b+c+": "+a.toString());break}if(!d)d=[];else if(Array.contains(d,a)){this.trace(b+c+": ...");return}Array.add(d,a);if(a==window||a===document||window.HTMLElement&&a instanceof HTMLElement||typeof a.nodeName==="string"){var k=a.tagName?a.tagName:"DomElement";if(a.id)k+=" - "+a.id;this.trace(b+c+" {"+k+"}")}else{var i=Object.getTypeName(a);this.trace(b+c+(typeof i==="string"?" {"+i+"}":""));if(b===""||f){b+="    ";var e,j,l,g,h;if(Array.isInstanceOfType(a)){j=a.length;for(e=0;e<j;e++)this._traceDump(a[e],"["+e+"]",f,b,d)}else for(g in a){h=a[g];if(!Function.isInstanceOfType(h))this._traceDump(h,g,f,b,d)}}}Array.remove(d,a)}}};Sys._Debug.registerClass("Sys._Debug");Sys.Debug=new Sys._Debug;Sys.Debug.isDebug=false;function Sys$Enum$parse(c,e){var a,b,i;if(e){a=this.__lowerCaseValues;if(!a){this.__lowerCaseValues=a={};var g=this.prototype;for(var f in g)a[f.toLowerCase()]=g[f]}}else a=this.prototype;if(!this.__flags){i=e?c.toLowerCase():c;b=a[i.trim()];if(typeof b!=="number")throw Error.argument("value",String.format(Sys.Res.enumInvalidValue,c,this.__typeName));return b}else{var h=(e?c.toLowerCase():c).split(","),j=0;for(var d=h.length-1;d>=0;d--){var k=h[d].trim();b=a[k];if(typeof b!=="number")throw Error.argument("value",String.format(Sys.Res.enumInvalidValue,c.split(",")[d].trim(),this.__typeName));j|=b}return j}}function Sys$Enum$toString(c){if(typeof c==="undefined"||c===null)return this.__string;var d=this.prototype,a;if(!this.__flags||c===0){for(a in d)if(d[a]===c)return a}else{var b=this.__sortedValues;if(!b){b=[];for(a in d)b[b.length]={key:a,value:d[a]};b.sort(function(a,b){return a.value-b.value});this.__sortedValues=b}var e=[],g=c;for(a=b.length-1;a>=0;a--){var h=b[a],f=h.value;if(f===0)continue;if((f&c)===f){e[e.length]=h.key;g-=f;if(g===0)break}}if(e.length&&g===0)return e.reverse().join(", ")}return ""}Type.prototype.registerEnum=function(b,c){Sys.__upperCaseTypes[b.toUpperCase()]=this;for(var a in this.prototype)this[a]=this.prototype[a];this.__typeName=b;this.parse=Sys$Enum$parse;this.__string=this.toString();this.toString=Sys$Enum$toString;this.__flags=c;this.__enum=true};Type.isEnum=function(a){if(typeof a==="undefined"||a===null)return false;return !!a.__enum};Type.isFlags=function(a){if(typeof a==="undefined"||a===null)return false;return !!a.__flags};Sys.EventHandlerList=function(){this._list={}};Sys.EventHandlerList.prototype={addHandler:function(b,a){Array.add(this._getEvent(b,true),a)},removeHandler:function(c,b){var a=this._getEvent(c);if(!a)return;Array.remove(a,b)},getHandler:function(b){var a=this._getEvent(b);if(!a||a.length===0)return null;a=Array.clone(a);return function(c,d){for(var b=0,e=a.length;b<e;b++)a[b](c,d)}},_getEvent:function(a,b){if(!this._list[a]){if(!b)return null;this._list[a]=[]}return this._list[a]}};Sys.EventHandlerList.registerClass("Sys.EventHandlerList");Sys.EventArgs=function(){};Sys.EventArgs.registerClass("Sys.EventArgs");Sys.EventArgs.Empty=new Sys.EventArgs;Sys.CancelEventArgs=function(){Sys.CancelEventArgs.initializeBase(this);this._cancel=false};Sys.CancelEventArgs.prototype={get_cancel:function(){return this._cancel},set_cancel:function(a){this._cancel=a}};Sys.CancelEventArgs.registerClass("Sys.CancelEventArgs",Sys.EventArgs);Sys.INotifyPropertyChange=function(){};Sys.INotifyPropertyChange.prototype={};Sys.INotifyPropertyChange.registerInterface("Sys.INotifyPropertyChange");Sys.PropertyChangedEventArgs=function(a){Sys.PropertyChangedEventArgs.initializeBase(this);this._propertyName=a};Sys.PropertyChangedEventArgs.prototype={get_propertyName:function(){return this._propertyName}};Sys.PropertyChangedEventArgs.registerClass("Sys.PropertyChangedEventArgs",Sys.EventArgs);Sys.INotifyDisposing=function(){};Sys.INotifyDisposing.prototype={};Sys.INotifyDisposing.registerInterface("Sys.INotifyDisposing");Sys.Component=function(){if(Sys.Application)Sys.Application.registerDisposableObject(this)};Sys.Component.prototype={_id:null,_initialized:false,_updating:false,get_events:function(){if(!this._events)this._events=new Sys.EventHandlerList;return this._events},get_id:function(){return this._id},set_id:function(a){this._id=a},get_isInitialized:function(){return this._initialized},get_isUpdating:function(){return this._updating},add_disposing:function(a){this.get_events().addHandler("disposing",a)},remove_disposing:function(a){this.get_events().removeHandler("disposing",a)},add_propertyChanged:function(a){this.get_events().addHandler("propertyChanged",a)},remove_propertyChanged:function(a){this.get_events().removeHandler("propertyChanged",a)},beginUpdate:function(){this._updating=true},dispose:function(){if(this._events){var a=this._events.getHandler("disposing");if(a)a(this,Sys.EventArgs.Empty)}delete this._events;Sys.Application.unregisterDisposableObject(this);Sys.Application.removeComponent(this)},endUpdate:function(){this._updating=false;if(!this._initialized)this.initialize();this.updated()},initialize:function(){this._initialized=true},raisePropertyChanged:function(b){if(!this._events)return;var a=this._events.getHandler("propertyChanged");if(a)a(this,new Sys.PropertyChangedEventArgs(b))},updated:function(){}};Sys.Component.registerClass("Sys.Component",null,Sys.IDisposable,Sys.INotifyPropertyChange,Sys.INotifyDisposing);function Sys$Component$_setProperties(a,i){var d,j=Object.getType(a),e=j===Object||j===Sys.UI.DomElement,h=Sys.Component.isInstanceOfType(a)&&!a.get_isUpdating();if(h)a.beginUpdate();for(var c in i){var b=i[c],f=e?null:a["get_"+c];if(e||typeof f!=="function"){var k=a[c];if(!b||typeof b!=="object"||e&&!k)a[c]=b;else Sys$Component$_setProperties(k,b)}else{var l=a["set_"+c];if(typeof l==="function")l.apply(a,[b]);else if(b instanceof Array){d=f.apply(a);for(var g=0,m=d.length,n=b.length;g<n;g++,m++)d[m]=b[g]}else if(typeof b==="object"&&Object.getType(b)===Object){d=f.apply(a);Sys$Component$_setProperties(d,b)}}}if(h)a.endUpdate()}function Sys$Component$_setReferences(c,b){for(var a in b){var e=c["set_"+a],d=$find(b[a]);e.apply(c,[d])}}var $create=Sys.Component.create=function(h,f,d,c,g){var a=g?new h(g):new h,b=Sys.Application,i=b.get_isCreatingComponents();a.beginUpdate();if(f)Sys$Component$_setProperties(a,f);if(d)for(var e in d)a["add_"+e](d[e]);if(a.get_id())b.addComponent(a);if(i){b._createdComponents[b._createdComponents.length]=a;if(c)b._addComponentToSecondPass(a,c);else a.endUpdate()}else{if(c)Sys$Component$_setReferences(a,c);a.endUpdate()}return a};Sys.UI.MouseButton=function(){throw Error.notImplemented()};Sys.UI.MouseButton.prototype={leftButton:0,middleButton:1,rightButton:2};Sys.UI.MouseButton.registerEnum("Sys.UI.MouseButton");Sys.UI.Key=function(){throw Error.notImplemented()};Sys.UI.Key.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};Sys.UI.Key.registerEnum("Sys.UI.Key");Sys.UI.Point=function(a,b){this.x=a;this.y=b};Sys.UI.Point.registerClass("Sys.UI.Point");Sys.UI.Bounds=function(c,d,b,a){this.x=c;this.y=d;this.height=a;this.width=b};Sys.UI.Bounds.registerClass("Sys.UI.Bounds");Sys.UI.DomEvent=function(e){var a=e,b=this.type=a.type.toLowerCase();this.rawEvent=a;this.altKey=a.altKey;if(typeof a.button!=="undefined")this.button=typeof a.which!=="undefined"?a.button:a.button===4?Sys.UI.MouseButton.middleButton:a.button===2?Sys.UI.MouseButton.rightButton:Sys.UI.MouseButton.leftButton;if(b==="keypress")this.charCode=a.charCode||a.keyCode;else if(a.keyCode&&a.keyCode===46)this.keyCode=127;else this.keyCode=a.keyCode;this.clientX=a.clientX;this.clientY=a.clientY;this.ctrlKey=a.ctrlKey;this.target=a.target?a.target:a.srcElement;if(!b.startsWith("key"))if(typeof a.offsetX!=="undefined"&&typeof a.offsetY!=="undefined"){this.offsetX=a.offsetX;this.offsetY=a.offsetY}else if(this.target&&this.target.nodeType!==3&&typeof a.clientX==="number"){var c=Sys.UI.DomElement.getLocation(this.target),d=Sys.UI.DomElement._getWindow(this.target);this.offsetX=(d.pageXOffset||0)+a.clientX-c.x;this.offsetY=(d.pageYOffset||0)+a.clientY-c.y}this.screenX=a.screenX;this.screenY=a.screenY;this.shiftKey=a.shiftKey};Sys.UI.DomEvent.prototype={preventDefault:function(){if(this.rawEvent.preventDefault)this.rawEvent.preventDefault();else if(window.event)this.rawEvent.returnValue=false},stopPropagation:function(){if(this.rawEvent.stopPropagation)this.rawEvent.stopPropagation();else if(window.event)this.rawEvent.cancelBubble=true}};Sys.UI.DomEvent.registerClass("Sys.UI.DomEvent");var $addHandler=Sys.UI.DomEvent.addHandler=function(a,d,e){if(!a._events)a._events={};var c=a._events[d];if(!c)a._events[d]=c=[];var b;if(a.addEventListener){b=function(b){return e.call(a,new Sys.UI.DomEvent(b))};a.addEventListener(d,b,false)}else if(a.attachEvent){b=function(){var b={};try{b=Sys.UI.DomElement._getWindow(a).event}catch(c){}return e.call(a,new Sys.UI.DomEvent(b))};a.attachEvent("on"+d,b)}c[c.length]={handler:e,browserHandler:b}},$addHandlers=Sys.UI.DomEvent.addHandlers=function(e,d,c){for(var b in d){var a=d[b];if(c)a=Function.createDelegate(c,a);$addHandler(e,b,a)}},$clearHandlers=Sys.UI.DomEvent.clearHandlers=function(a){if(a._events){var e=a._events;for(var b in e){var d=e[b];for(var c=d.length-1;c>=0;c--)$removeHandler(a,b,d[c].handler)}a._events=null}},$removeHandler=Sys.UI.DomEvent.removeHandler=function(a,e,f){var d=null,c=a._events[e];for(var b=0,g=c.length;b<g;b++)if(c[b].handler===f){d=c[b].browserHandler;break}if(a.removeEventListener)a.removeEventListener(e,d,false);else if(a.detachEvent)a.detachEvent("on"+e,d);c.splice(b,1)};Sys.UI.DomElement=function(){};Sys.UI.DomElement.registerClass("Sys.UI.DomElement");Sys.UI.DomElement.addCssClass=function(a,b){if(!Sys.UI.DomElement.containsCssClass(a,b))if(a.className==="")a.className=b;else a.className+=" "+b};Sys.UI.DomElement.containsCssClass=function(b,a){return Array.contains(b.className.split(" "),a)};Sys.UI.DomElement.getBounds=function(a){var b=Sys.UI.DomElement.getLocation(a);return new Sys.UI.Bounds(b.x,b.y,a.offsetWidth||0,a.offsetHeight||0)};var $get=Sys.UI.DomElement.getElementById=function(f,e){if(!e)return document.getElementById(f);if(e.getElementById)return e.getElementById(f);var c=[],d=e.childNodes;for(var b=0;b<d.length;b++){var a=d[b];if(a.nodeType==1)c[c.length]=a}while(c.length){a=c.shift();if(a.id==f)return a;d=a.childNodes;for(b=0;b<d.length;b++){a=d[b];if(a.nodeType==1)c[c.length]=a}}return null};switch(Sys.Browser.agent){case Sys.Browser.InternetExplorer:Sys.UI.DomElement.getLocation=function(a){if(a.self||a.nodeType===9)return new Sys.UI.Point(0,0);var b=a.getBoundingClientRect();if(!b)return new Sys.UI.Point(0,0);var d=a.ownerDocument.documentElement,e=b.left-2+d.scrollLeft,f=b.top-2+d.scrollTop;try{var c=a.ownerDocument.parentWindow.frameElement||null;if(c){var g=c.frameBorder==="0"||c.frameBorder==="no"?2:0;e+=g;f+=g}}catch(h){}return new Sys.UI.Point(e,f)};break;case Sys.Browser.Safari:Sys.UI.DomElement.getLocation=function(c){if(c.window&&c.window===c||c.nodeType===9)return new Sys.UI.Point(0,0);var f=0,g=0,j=null,e=null,b;for(var a=c;a;j=a,(e=b,a=a.offsetParent)){b=Sys.UI.DomElement._getCurrentStyle(a);var d=a.tagName?a.tagName.toUpperCase():null;if((a.offsetLeft||a.offsetTop)&&(d!=="BODY"||(!e||e.position!=="absolute"))){f+=a.offsetLeft;g+=a.offsetTop}}b=Sys.UI.DomElement._getCurrentStyle(c);var h=b?b.position:null;if(!h||h!=="absolute")for(var a=c.parentNode;a;a=a.parentNode){d=a.tagName?a.tagName.toUpperCase():null;if(d!=="BODY"&&d!=="HTML"&&(a.scrollLeft||a.scrollTop)){f-=a.scrollLeft||0;g-=a.scrollTop||0}b=Sys.UI.DomElement._getCurrentStyle(a);var i=b?b.position:null;if(i&&i==="absolute")break}return new Sys.UI.Point(f,g)};break;case Sys.Browser.Opera:Sys.UI.DomElement.getLocation=function(b){if(b.window&&b.window===b||b.nodeType===9)return new Sys.UI.Point(0,0);var d=0,e=0,i=null;for(var a=b;a;i=a,a=a.offsetParent){var f=a.tagName;d+=a.offsetLeft||0;e+=a.offsetTop||0}var g=b.style.position,c=g&&g!=="static";for(var a=b.parentNode;a;a=a.parentNode){f=a.tagName?a.tagName.toUpperCase():null;if(f!=="BODY"&&f!=="HTML"&&(a.scrollLeft||a.scrollTop)&&(c&&(a.style.overflow==="scroll"||a.style.overflow==="auto"))){d-=a.scrollLeft||0;e-=a.scrollTop||0}var h=a&&a.style?a.style.position:null;c=c||h&&h!=="static"}return new Sys.UI.Point(d,e)};break;default:Sys.UI.DomElement.getLocation=function(d){if(d.window&&d.window===d||d.nodeType===9)return new Sys.UI.Point(0,0);var e=0,f=0,i=null,g=null,b=null;for(var a=d;a;i=a,(g=b,a=a.offsetParent)){var c=a.tagName?a.tagName.toUpperCase():null;b=Sys.UI.DomElement._getCurrentStyle(a);if((a.offsetLeft||a.offsetTop)&&!(c==="BODY"&&(!g||g.position!=="absolute"))){e+=a.offsetLeft;f+=a.offsetTop}if(i!==null&&b){if(c!=="TABLE"&&c!=="TD"&&c!=="HTML"){e+=parseInt(b.borderLeftWidth)||0;f+=parseInt(b.borderTopWidth)||0}if(c==="TABLE"&&(b.position==="relative"||b.position==="absolute")){e+=parseInt(b.marginLeft)||0;f+=parseInt(b.marginTop)||0}}}b=Sys.UI.DomElement._getCurrentStyle(d);var h=b?b.position:null;if(!h||h!=="absolute")for(var a=d.parentNode;a;a=a.parentNode){c=a.tagName?a.tagName.toUpperCase():null;if(c!=="BODY"&&c!=="HTML"&&(a.scrollLeft||a.scrollTop)){e-=a.scrollLeft||0;f-=a.scrollTop||0;b=Sys.UI.DomElement._getCurrentStyle(a);if(b){e+=parseInt(b.borderLeftWidth)||0;f+=parseInt(b.borderTopWidth)||0}}}return new Sys.UI.Point(e,f)}}Sys.UI.DomElement.removeCssClass=function(d,c){var a=" "+d.className+" ",b=a.indexOf(" "+c+" ");if(b>=0)d.className=(a.substr(0,b)+" "+a.substring(b+c.length+1,a.length)).trim()};Sys.UI.DomElement.setLocation=function(b,c,d){var a=b.style;a.position="absolute";a.left=c+"px";a.top=d+"px"};Sys.UI.DomElement.toggleCssClass=function(b,a){if(Sys.UI.DomElement.containsCssClass(b,a))Sys.UI.DomElement.removeCssClass(b,a);else Sys.UI.DomElement.addCssClass(b,a)};Sys.UI.DomElement.getVisibilityMode=function(a){return a._visibilityMode===Sys.UI.VisibilityMode.hide?Sys.UI.VisibilityMode.hide:Sys.UI.VisibilityMode.collapse};Sys.UI.DomElement.setVisibilityMode=function(a,b){Sys.UI.DomElement._ensureOldDisplayMode(a);if(a._visibilityMode!==b){a._visibilityMode=b;if(Sys.UI.DomElement.getVisible(a)===false)if(a._visibilityMode===Sys.UI.VisibilityMode.hide)a.style.display=a._oldDisplayMode;else a.style.display="none";a._visibilityMode=b}};Sys.UI.DomElement.getVisible=function(b){var a=b.currentStyle||Sys.UI.DomElement._getCurrentStyle(b);if(!a)return true;return a.visibility!=="hidden"&&a.display!=="none"};Sys.UI.DomElement.setVisible=function(a,b){if(b!==Sys.UI.DomElement.getVisible(a)){Sys.UI.DomElement._ensureOldDisplayMode(a);a.style.visibility=b?"visible":"hidden";if(b||a._visibilityMode===Sys.UI.VisibilityMode.hide)a.style.display=a._oldDisplayMode;else a.style.display="none"}};Sys.UI.DomElement._ensureOldDisplayMode=function(a){if(!a._oldDisplayMode){var b=a.currentStyle||Sys.UI.DomElement._getCurrentStyle(a);a._oldDisplayMode=b?b.display:null;if(!a._oldDisplayMode||a._oldDisplayMode==="none")switch(a.tagName.toUpperCase()){case "DIV":case "P":case "ADDRESS":case "BLOCKQUOTE":case "BODY":case "COL":case "COLGROUP":case "DD":case "DL":case "DT":case "FIELDSET":case "FORM":case "H1":case "H2":case "H3":case "H4":case "H5":case "H6":case "HR":case "IFRAME":case "LEGEND":case "OL":case "PRE":case "TABLE":case "TD":case "TH":case "TR":case "UL":a._oldDisplayMode="block";break;case "LI":a._oldDisplayMode="list-item";break;default:a._oldDisplayMode="inline"}}};Sys.UI.DomElement._getWindow=function(a){var b=a.ownerDocument||a.document||a;return b.defaultView||b.parentWindow};Sys.UI.DomElement._getCurrentStyle=function(a){if(a.nodeType===3)return null;var c=Sys.UI.DomElement._getWindow(a);if(a.documentElement)a=a.documentElement;var b=c&&a!==c&&c.getComputedStyle?c.getComputedStyle(a,null):a.currentStyle||a.style;if(!b&&Sys.Browser.agent===Sys.Browser.Safari&&a.style){var g=a.style.display,f=a.style.position;a.style.position="absolute";a.style.display="block";var e=c.getComputedStyle(a,null);a.style.display=g;a.style.position=f;b={};for(var d in e)b[d]=e[d];b.display="none"}return b};Sys.IContainer=function(){};Sys.IContainer.prototype={};Sys.IContainer.registerInterface("Sys.IContainer");Sys._ScriptLoader=function(){this._scriptsToLoad=null;this._sessions=[];this._scriptLoadedDelegate=Function.createDelegate(this,this._scriptLoadedHandler)};Sys._ScriptLoader.prototype={dispose:function(){this._stopSession();this._loading=false;if(this._events)delete this._events;this._sessions=null;this._currentSession=null;this._scriptLoadedDelegate=null},loadScripts:function(d,b,c,a){var e={allScriptsLoadedCallback:b,scriptLoadFailedCallback:c,scriptLoadTimeoutCallback:a,scriptsToLoad:this._scriptsToLoad,scriptTimeout:d};this._scriptsToLoad=null;this._sessions[this._sessions.length]=e;if(!this._loading)this._nextSession()},notifyScriptLoaded:function(){if(!this._loading)return;this._currentTask._notified++;if(Sys.Browser.agent===Sys.Browser.Safari)if(this._currentTask._notified===1)window.setTimeout(Function.createDelegate(this,function(){this._scriptLoadedHandler(this._currentTask.get_scriptElement(),true)}),0)},queueCustomScriptTag:function(a){if(!this._scriptsToLoad)this._scriptsToLoad=[];Array.add(this._scriptsToLoad,a)},queueScriptBlock:function(a){if(!this._scriptsToLoad)this._scriptsToLoad=[];Array.add(this._scriptsToLoad,{text:a})},queueScriptReference:function(a){if(!this._scriptsToLoad)this._scriptsToLoad=[];Array.add(this._scriptsToLoad,{src:a})},_createScriptElement:function(c){var a=document.createElement("script");a.type="text/javascript";for(var b in c)a[b]=c[b];return a},_loadScriptsInternal:function(){var b=this._currentSession;if(b.scriptsToLoad&&b.scriptsToLoad.length>0){var c=Array.dequeue(b.scriptsToLoad),a=this._createScriptElement(c);if(a.text&&Sys.Browser.agent===Sys.Browser.Safari){a.innerHTML=a.text;delete a.text}if(typeof c.src==="string"){this._currentTask=new Sys._ScriptLoaderTask(a,this._scriptLoadedDelegate);this._currentTask.execute()}else{document.getElementsByTagName("head")[0].appendChild(a);Sys._ScriptLoader._clearScript(a);this._loadScriptsInternal()}}else{this._stopSession();var d=b.allScriptsLoadedCallback;if(d)d(this);this._nextSession()}},_nextSession:function(){if(this._sessions.length===0){this._loading=false;this._currentSession=null;return}this._loading=true;var a=Array.dequeue(this._sessions);this._currentSession=a;if(a.scriptTimeout>0)this._timeoutCookie=window.setTimeout(Function.createDelegate(this,this._scriptLoadTimeoutHandler),a.scriptTimeout*1000);this._loadScriptsInternal()},_raiseError:function(a){var c=this._currentSession.scriptLoadFailedCallback,b=this._currentTask.get_scriptElement();this._stopSession();if(c){c(this,b,a);this._nextSession()}else{this._loading=false;throw Sys._ScriptLoader._errorScriptLoadFailed(b.src,a)}},_scriptLoadedHandler:function(a,b){if(b&&this._currentTask._notified)if(this._currentTask._notified>1)this._raiseError(true);else{Array.add(Sys._ScriptLoader._getLoadedScripts(),a.src);this._currentTask.dispose();this._currentTask=null;this._loadScriptsInternal()}else this._raiseError(false)},_scriptLoadTimeoutHandler:function(){var a=this._currentSession.scriptLoadTimeoutCallback;this._stopSession();if(a)a(this);this._nextSession()},_stopSession:function(){if(this._timeoutCookie){window.clearTimeout(this._timeoutCookie);this._timeoutCookie=null}if(this._currentTask){this._currentTask.dispose();this._currentTask=null}}};Sys._ScriptLoader.registerClass("Sys._ScriptLoader",null,Sys.IDisposable);Sys._ScriptLoader.getInstance=function(){var a=Sys._ScriptLoader._activeInstance;if(!a)a=Sys._ScriptLoader._activeInstance=new Sys._ScriptLoader;return a};Sys._ScriptLoader.isScriptLoaded=function(b){var a=document.createElement("script");a.src=b;return Array.contains(Sys._ScriptLoader._getLoadedScripts(),a.src)};Sys._ScriptLoader.readLoadedScripts=function(){if(!Sys._ScriptLoader._referencedScripts){var b=Sys._ScriptLoader._referencedScripts=[],c=document.getElementsByTagName("script");for(i=c.length-1;i>=0;i--){var d=c[i],a=d.src;if(a.length)if(!Array.contains(b,a))Array.add(b,a)}}};Sys._ScriptLoader._clearScript=function(a){if(!Sys.Debug.isDebug)a.parentNode.removeChild(a)};Sys._ScriptLoader._errorScriptLoadFailed=function(b,d){var a;if(d)a=Sys.Res.scriptLoadMultipleCallbacks;else a=Sys.Res.scriptLoadFailed;var e="Sys.ScriptLoadFailedException: "+String.format(a,b),c=Error.create(e,{name:"Sys.ScriptLoadFailedException","scriptUrl":b});c.popStackFrame();return c};Sys._ScriptLoader._getLoadedScripts=function(){if(!Sys._ScriptLoader._referencedScripts){Sys._ScriptLoader._referencedScripts=[];Sys._ScriptLoader.readLoadedScripts()}return Sys._ScriptLoader._referencedScripts};Sys._ScriptLoaderTask=function(b,a){this._scriptElement=b;this._completedCallback=a;this._notified=0};Sys._ScriptLoaderTask.prototype={get_scriptElement:function(){return this._scriptElement},dispose:function(){if(this._disposed)return;this._disposed=true;this._removeScriptElementHandlers();Sys._ScriptLoader._clearScript(this._scriptElement);this._scriptElement=null},execute:function(){this._addScriptElementHandlers();document.getElementsByTagName("head")[0].appendChild(this._scriptElement)},_addScriptElementHandlers:function(){this._scriptLoadDelegate=Function.createDelegate(this,this._scriptLoadHandler);if(Sys.Browser.agent!==Sys.Browser.InternetExplorer){this._scriptElement.readyState="loaded";$addHandler(this._scriptElement,"load",this._scriptLoadDelegate)}else $addHandler(this._scriptElement,"readystatechange",this._scriptLoadDelegate);if(this._scriptElement.addEventListener){this._scriptErrorDelegate=Function.createDelegate(this,this._scriptErrorHandler);this._scriptElement.addEventListener("error",this._scriptErrorDelegate,false)}},_removeScriptElementHandlers:function(){if(this._scriptLoadDelegate){var a=this.get_scriptElement();if(Sys.Browser.agent!==Sys.Browser.InternetExplorer)$removeHandler(a,"load",this._scriptLoadDelegate);else $removeHandler(a,"readystatechange",this._scriptLoadDelegate);if(this._scriptErrorDelegate){this._scriptElement.removeEventListener("error",this._scriptErrorDelegate,false);this._scriptErrorDelegate=null}this._scriptLoadDelegate=null}},_scriptErrorHandler:function(){if(this._disposed)return;this._completedCallback(this.get_scriptElement(),false)},_scriptLoadHandler:function(){if(this._disposed)return;var a=this.get_scriptElement();if(a.readyState!=="loaded"&&a.readyState!=="complete")return;var b=this;window.setTimeout(function(){b._completedCallback(a,true)},0)}};Sys._ScriptLoaderTask.registerClass("Sys._ScriptLoaderTask",null,Sys.IDisposable);Sys.ApplicationLoadEventArgs=function(b,a){Sys.ApplicationLoadEventArgs.initializeBase(this);this._components=b;this._isPartialLoad=a};Sys.ApplicationLoadEventArgs.prototype={get_components:function(){return this._components},get_isPartialLoad:function(){return this._isPartialLoad}};Sys.ApplicationLoadEventArgs.registerClass("Sys.ApplicationLoadEventArgs",Sys.EventArgs);Sys.HistoryEventArgs=function(a){Sys.HistoryEventArgs.initializeBase(this);this._state=a};Sys.HistoryEventArgs.prototype={get_state:function(){return this._state}};Sys.HistoryEventArgs.registerClass("Sys.HistoryEventArgs",Sys.EventArgs);Sys._Application=function(){Sys._Application.initializeBase(this);this._disposableObjects=[];this._components={};this._createdComponents=[];this._secondPassComponents=[];this._appLoadHandler=null;this._beginRequestHandler=null;this._clientId=null;this._currentEntry="";this._endRequestHandler=null;this._history=null;this._enableHistory=false;this._historyFrame=null;this._historyInitialized=false;this._historyInitialLength=0;this._historyLength=0;this._historyPointIsNew=false;this._ignoreTimer=false;this._initialState=null;this._state={};this._timerCookie=0;this._timerHandler=null;this._uniqueId=null;this._unloadHandlerDelegate=Function.createDelegate(this,this._unloadHandler);this._loadHandlerDelegate=Function.createDelegate(this,this._loadHandler);Sys.UI.DomEvent.addHandler(window,"unload",this._unloadHandlerDelegate);Sys.UI.DomEvent.addHandler(window,"load",this._loadHandlerDelegate)};Sys._Application.prototype={_creatingComponents:false,_disposing:false,get_isCreatingComponents:function(){return this._creatingComponents},get_stateString:function(){var a=window.location.hash;if(this._isSafari2()){var b=this._getHistory();if(b)a=b[window.history.length-this._historyInitialLength]}if(a.length>0&&a.charAt(0)==="#")a=a.substring(1);if(Sys.Browser.agent===Sys.Browser.Firefox)a=this._serializeState(this._deserializeState(a,true));return a},get_enableHistory:function(){return this._enableHistory},set_enableHistory:function(a){this._enableHistory=a},add_init:function(a){if(this._initialized)a(this,Sys.EventArgs.Empty);else this.get_events().addHandler("init",a)},remove_init:function(a){this.get_events().removeHandler("init",a)},add_load:function(a){this.get_events().addHandler("load",a)},remove_load:function(a){this.get_events().removeHandler("load",a)},add_navigate:function(a){this.get_events().addHandler("navigate",a)},remove_navigate:function(a){this.get_events().removeHandler("navigate",a)},add_unload:function(a){this.get_events().addHandler("unload",a)},remove_unload:function(a){this.get_events().removeHandler("unload",a)},addComponent:function(a){this._components[a.get_id()]=a},addHistoryPoint:function(c,f){this._ensureHistory();var b=this._state;for(var a in c){var d=c[a];if(d===null){if(typeof b[a]!=="undefined")delete b[a]}else b[a]=d}var e=this._serializeState(b);this._historyPointIsNew=true;this._setState(e,f);this._raiseNavigate()},beginCreateComponents:function(){this._creatingComponents=true},dispose:function(){if(!this._disposing){this._disposing=true;if(this._timerCookie){window.clearTimeout(this._timerCookie);delete this._timerCookie}if(this._endRequestHandler){Sys.WebForms.PageRequestManager.getInstance().remove_endRequest(this._endRequestHandler);delete this._endRequestHandler}if(this._beginRequestHandler){Sys.WebForms.PageRequestManager.getInstance().remove_beginRequest(this._beginRequestHandler);delete this._beginRequestHandler}if(window.pageUnload)window.pageUnload(this,Sys.EventArgs.Empty);var c=this.get_events().getHandler("unload");if(c)c(this,Sys.EventArgs.Empty);var b=Array.clone(this._disposableObjects);for(var a=0,e=b.length;a<e;a++)b[a].dispose();Array.clear(this._disposableObjects);Sys.UI.DomEvent.removeHandler(window,"unload",this._unloadHandlerDelegate);if(this._loadHandlerDelegate){Sys.UI.DomEvent.removeHandler(window,"load",this._loadHandlerDelegate);this._loadHandlerDelegate=null}var d=Sys._ScriptLoader.getInstance();if(d)d.dispose();Sys._Application.callBaseMethod(this,"dispose")}},endCreateComponents:function(){var b=this._secondPassComponents;for(var a=0,d=b.length;a<d;a++){var c=b[a].component;Sys$Component$_setReferences(c,b[a].references);c.endUpdate()}this._secondPassComponents=[];this._creatingComponents=false},findComponent:function(b,a){return a?Sys.IContainer.isInstanceOfType(a)?a.findComponent(b):a[b]||null:Sys.Application._components[b]||null},getComponents:function(){var a=[],b=this._components;for(var c in b)a[a.length]=b[c];return a},initialize:function(){if(!this._initialized&&!this._initializing){this._initializing=true;window.setTimeout(Function.createDelegate(this,this._doInitialize),0)}},notifyScriptLoaded:function(){var a=Sys._ScriptLoader.getInstance();if(a)a.notifyScriptLoaded()},registerDisposableObject:function(a){if(!this._disposing)this._disposableObjects[this._disposableObjects.length]=a},raiseLoad:function(){var b=this.get_events().getHandler("load"),a=new Sys.ApplicationLoadEventArgs(Array.clone(this._createdComponents),!this._initializing);if(b)b(this,a);if(window.pageLoad)window.pageLoad(this,a);this._createdComponents=[]},removeComponent:function(b){var a=b.get_id();if(a)delete this._components[a]},setServerId:function(a,b){this._clientId=a;this._uniqueId=b},setServerState:function(a){this._ensureHistory();this._state.__s=a;this._updateHiddenField(a)},unregisterDisposableObject:function(a){if(!this._disposing)Array.remove(this._disposableObjects,a)},_addComponentToSecondPass:function(b,a){this._secondPassComponents[this._secondPassComponents.length]={component:b,references:a}},_deserializeState:function(a,i){var e={};a=a||"";var b=a.indexOf("&&");if(b!==-1&&b+2<a.length){e.__s=a.substr(b+2);a=a.substr(0,b)}var g=a.split("&");for(var f=0,k=g.length;f<k;f++){var d=g[f],c=d.indexOf("=");if(c!==-1&&c+1<d.length){var j=d.substr(0,c),h=d.substr(c+1);e[j]=i?h:decodeURIComponent(h)}}return e},_doInitialize:function(){Sys._Application.callBaseMethod(this,"initialize");var b=this.get_events().getHandler("init");if(b){this.beginCreateComponents();b(this,Sys.EventArgs.Empty);this.endCreateComponents()}if(Sys.WebForms){this._beginRequestHandler=Function.createDelegate(this,this._onPageRequestManagerBeginRequest);Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(this._beginRequestHandler);this._endRequestHandler=Function.createDelegate(this,this._onPageRequestManagerEndRequest);Sys.WebForms.PageRequestManager.getInstance().add_endRequest(this._endRequestHandler)}var a=this.get_stateString();if(a!==this._currentEntry)this._navigate(a);this.raiseLoad();this._initializing=false},_enableHistoryInScriptManager:function(){this._enableHistory=true},_ensureHistory:function(){if(!this._historyInitialized&&this._enableHistory){if(Sys.Browser.agent===Sys.Browser.InternetExplorer&&Sys.Browser.documentMode<8){this._historyFrame=document.getElementById("__historyFrame");this._ignoreIFrame=true}if(this._isSafari2()){var a=document.getElementById("__history");this._setHistory([window.location.hash]);this._historyInitialLength=window.history.length}this._timerHandler=Function.createDelegate(this,this._onIdle);this._timerCookie=window.setTimeout(this._timerHandler,100);try{this._initialState=this._deserializeState(this.get_stateString())}catch(b){}this._historyInitialized=true}},_getHistory:function(){var a=document.getElementById("__history");if(!a)return "";var b=a.value;return b?Sys.Serialization.JavaScriptSerializer.deserialize(b,true):""},_isSafari2:function(){return Sys.Browser.agent===Sys.Browser.Safari&&Sys.Browser.version<=419.3},_loadHandler:function(){if(this._loadHandlerDelegate){Sys.UI.DomEvent.removeHandler(window,"load",this._loadHandlerDelegate);this._loadHandlerDelegate=null}this.initialize()},_navigate:function(c){this._ensureHistory();var b=this._deserializeState(c);if(this._uniqueId){var d=this._state.__s||"",a=b.__s||"";if(a!==d){this._updateHiddenField(a);__doPostBack(this._uniqueId,a);this._state=b;return}}this._setState(c);this._state=b;this._raiseNavigate()},_onIdle:function(){delete this._timerCookie;var a=this.get_stateString();if(a!==this._currentEntry){if(!this._ignoreTimer){this._historyPointIsNew=false;this._navigate(a);this._historyLength=window.history.length}}else this._ignoreTimer=false;this._timerCookie=window.setTimeout(this._timerHandler,100)},_onIFrameLoad:function(a){this._ensureHistory();if(!this._ignoreIFrame){this._historyPointIsNew=false;this._navigate(a)}this._ignoreIFrame=false},_onPageRequestManagerBeginRequest:function(){this._ignoreTimer=true},_onPageRequestManagerEndRequest:function(e,d){var b=d.get_dataItems()[this._clientId],a=document.getElementById("__EVENTTARGET");if(a&&a.value===this._uniqueId)a.value="";if(typeof b!=="undefined"){this.setServerState(b);this._historyPointIsNew=true}else this._ignoreTimer=false;var c=this._serializeState(this._state);if(c!==this._currentEntry){this._ignoreTimer=true;this._setState(c);this._raiseNavigate()}},_raiseNavigate:function(){var c=this.get_events().getHandler("navigate"),b={};for(var a in this._state)if(a!=="__s")b[a]=this._state[a];var d=new Sys.HistoryEventArgs(b);if(c)c(this,d)},_serializeState:function(d){var b=[];for(var a in d){var e=d[a];if(a==="__s")var c=e;else b[b.length]=a+"="+encodeURIComponent(e)}return b.join("&")+(c?"&&"+c:"")},_setHistory:function(b){var a=document.getElementById("__history");if(a)a.value=Sys.Serialization.JavaScriptSerializer.serialize(b)},_setState:function(a,c){a=a||"";if(a!==this._currentEntry){if(window.theForm){var e=window.theForm.action,f=e.indexOf("#");window.theForm.action=(f!==-1?e.substring(0,f):e)+"#"+a}if(this._historyFrame&&this._historyPointIsNew){this._ignoreIFrame=true;this._historyPointIsNew=false;var d=this._historyFrame.contentWindow.document;d.open("javascript:'<html></html>'");d.write("<html><head><title>"+(c||document.title)+"</title><scri"+'pt type="text/javascript">parent.Sys.Application._onIFrameLoad(\''+a+"');</scri"+"pt></head><body></body></html>");d.close()}this._ignoreTimer=false;var h=this.get_stateString();this._currentEntry=a;if(a!==h){if(this._isSafari2()){var g=this._getHistory();g[window.history.length-this._historyInitialLength+1]=a;this._setHistory(g);this._historyLength=window.history.length+1;var b=document.createElement("form");b.method="get";b.action="#"+a;document.appendChild(b);b.submit();document.removeChild(b)}else window.location.hash=a;if(typeof c!=="undefined"&&c!==null)document.title=c}}},_unloadHandler:function(){this.dispose()},_updateHiddenField:function(b){if(this._clientId){var a=document.getElementById(this._clientId);if(a)a.value=b}}};Sys._Application.registerClass("Sys._Application",Sys.Component,Sys.IContainer);Sys.Application=new Sys._Application;var $find=Sys.Application.findComponent;Type.registerNamespace("Sys.Net");Sys.Net.WebRequestExecutor=function(){this._webRequest=null;this._resultObject=null};Sys.Net.WebRequestExecutor.prototype={get_webRequest:function(){return this._webRequest},_set_webRequest:function(a){this._webRequest=a},get_started:function(){throw Error.notImplemented()},get_responseAvailable:function(){throw Error.notImplemented()},get_timedOut:function(){throw Error.notImplemented()},get_aborted:function(){throw Error.notImplemented()},get_responseData:function(){throw Error.notImplemented()},get_statusCode:function(){throw Error.notImplemented()},get_statusText:function(){throw Error.notImplemented()},get_xml:function(){throw Error.notImplemented()},get_object:function(){if(!this._resultObject)this._resultObject=Sys.Serialization.JavaScriptSerializer.deserialize(this.get_responseData());return this._resultObject},executeRequest:function(){throw Error.notImplemented()},abort:function(){throw Error.notImplemented()},getResponseHeader:function(){throw Error.notImplemented()},getAllResponseHeaders:function(){throw Error.notImplemented()}};Sys.Net.WebRequestExecutor.registerClass("Sys.Net.WebRequestExecutor");Sys.Net.XMLDOM=function(d){if(!window.DOMParser){var c=["Msxml2.DOMDocument.3.0","Msxml2.DOMDocument"];for(var b=0,f=c.length;b<f;b++)try{var a=new ActiveXObject(c[b]);a.async=false;a.loadXML(d);a.setProperty("SelectionLanguage","XPath");return a}catch(g){}}else try{var e=new window.DOMParser;return e.parseFromString(d,"text/xml")}catch(g){}return null};Sys.Net.XMLHttpExecutor=function(){Sys.Net.XMLHttpExecutor.initializeBase(this);var a=this;this._xmlHttpRequest=null;this._webRequest=null;this._responseAvailable=false;this._timedOut=false;this._timer=null;this._aborted=false;this._started=false;this._onReadyStateChange=function(){if(a._xmlHttpRequest.readyState===4){try{if(typeof a._xmlHttpRequest.status==="undefined")return}catch(b){return}a._clearTimer();a._responseAvailable=true;try{a._webRequest.completed(Sys.EventArgs.Empty)}finally{if(a._xmlHttpRequest!=null){a._xmlHttpRequest.onreadystatechange=Function.emptyMethod;a._xmlHttpRequest=null}}}};this._clearTimer=function(){if(a._timer!=null){window.clearTimeout(a._timer);a._timer=null}};this._onTimeout=function(){if(!a._responseAvailable){a._clearTimer();a._timedOut=true;a._xmlHttpRequest.onreadystatechange=Function.emptyMethod;a._xmlHttpRequest.abort();a._webRequest.completed(Sys.EventArgs.Empty);a._xmlHttpRequest=null}}};Sys.Net.XMLHttpExecutor.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(){this._webRequest=this.get_webRequest();var c=this._webRequest.get_body(),a=this._webRequest.get_headers();this._xmlHttpRequest=new XMLHttpRequest;this._xmlHttpRequest.onreadystatechange=this._onReadyStateChange;var e=this._webRequest.get_httpVerb();this._xmlHttpRequest.open(e,this._webRequest.getResolvedUrl(),true);if(a)for(var b in a){var f=a[b];if(typeof f!=="function")this._xmlHttpRequest.setRequestHeader(b,f)}if(e.toLowerCase()==="post"){if(a===null||!a["Content-Type"])this._xmlHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=utf-8");if(!c)c=""}var d=this._webRequest.get_timeout();if(d>0)this._timer=window.setTimeout(Function.createDelegate(this,this._onTimeout),d);this._xmlHttpRequest.send(c);this._started=true},getResponseHeader:function(b){var a;try{a=this._xmlHttpRequest.getResponseHeader(b)}catch(c){}if(!a)a="";return a},getAllResponseHeaders:function(){return this._xmlHttpRequest.getAllResponseHeaders()},get_responseData:function(){return this._xmlHttpRequest.responseText},get_statusCode:function(){var a=0;try{a=this._xmlHttpRequest.status}catch(b){}return a},get_statusText:function(){return this._xmlHttpRequest.statusText},get_xml:function(){var a=this._xmlHttpRequest.responseXML;if(!a||!a.documentElement){a=Sys.Net.XMLDOM(this._xmlHttpRequest.responseText);if(!a||!a.documentElement)return null}else if(navigator.userAgent.indexOf("MSIE")!==-1)a.setProperty("SelectionLanguage","XPath");if(a.documentElement.namespaceURI==="http://www.mozilla.org/newlayout/xml/parsererror.xml"&&a.documentElement.tagName==="parsererror")return null;if(a.documentElement.firstChild&&a.documentElement.firstChild.tagName==="parsererror")return null;return a},abort:function(){if(this._aborted||this._responseAvailable||this._timedOut)return;this._aborted=true;this._clearTimer();if(this._xmlHttpRequest&&!this._responseAvailable){this._xmlHttpRequest.onreadystatechange=Function.emptyMethod;this._xmlHttpRequest.abort();this._xmlHttpRequest=null;this._webRequest.completed(Sys.EventArgs.Empty)}}};Sys.Net.XMLHttpExecutor.registerClass("Sys.Net.XMLHttpExecutor",Sys.Net.WebRequestExecutor);Sys.Net._WebRequestManager=function(){this._defaultTimeout=0;this._defaultExecutorType="Sys.Net.XMLHttpExecutor"};Sys.Net._WebRequestManager.prototype={add_invokingRequest:function(a){this._get_eventHandlerList().addHandler("invokingRequest",a)},remove_invokingRequest:function(a){this._get_eventHandlerList().removeHandler("invokingRequest",a)},add_completedRequest:function(a){this._get_eventHandlerList().addHandler("completedRequest",a)},remove_completedRequest:function(a){this._get_eventHandlerList().removeHandler("completedRequest",a)},_get_eventHandlerList:function(){if(!this._events)this._events=new Sys.EventHandlerList;return this._events},get_defaultTimeout:function(){return this._defaultTimeout},set_defaultTimeout:function(a){this._defaultTimeout=a},get_defaultExecutorType:function(){return this._defaultExecutorType},set_defaultExecutorType:function(a){this._defaultExecutorType=a},executeRequest:function(webRequest){var executor=webRequest.get_executor();if(!executor){var failed=false;try{var executorType=eval(this._defaultExecutorType);executor=new executorType}catch(a){failed=true}webRequest.set_executor(executor)}if(executor.get_aborted())return;var evArgs=new Sys.Net.NetworkRequestEventArgs(webRequest),handler=this._get_eventHandlerList().getHandler("invokingRequest");if(handler)handler(this,evArgs);if(!evArgs.get_cancel())executor.executeRequest()}};Sys.Net._WebRequestManager.registerClass("Sys.Net._WebRequestManager");Sys.Net.WebRequestManager=new Sys.Net._WebRequestManager;Sys.Net.NetworkRequestEventArgs=function(a){Sys.Net.NetworkRequestEventArgs.initializeBase(this);this._webRequest=a};Sys.Net.NetworkRequestEventArgs.prototype={get_webRequest:function(){return this._webRequest}};Sys.Net.NetworkRequestEventArgs.registerClass("Sys.Net.NetworkRequestEventArgs",Sys.CancelEventArgs);Sys.Net.WebRequest=function(){this._url="";this._headers={};this._body=null;this._userContext=null;this._httpVerb=null;this._executor=null;this._invokeCalled=false;this._timeout=0};Sys.Net.WebRequest.prototype={add_completed:function(a){this._get_eventHandlerList().addHandler("completed",a)},remove_completed:function(a){this._get_eventHandlerList().removeHandler("completed",a)},completed:function(b){var a=Sys.Net.WebRequestManager._get_eventHandlerList().getHandler("completedRequest");if(a)a(this._executor,b);a=this._get_eventHandlerList().getHandler("completed");if(a)a(this._executor,b)},_get_eventHandlerList:function(){if(!this._events)this._events=new Sys.EventHandlerList;return this._events},get_url:function(){return this._url},set_url:function(a){this._url=a},get_headers:function(){return this._headers},get_httpVerb:function(){if(this._httpVerb===null){if(this._body===null)return "GET";return "POST"}return this._httpVerb},set_httpVerb:function(a){this._httpVerb=a},get_body:function(){return this._body},set_body:function(a){this._body=a},get_userContext:function(){return this._userContext},set_userContext:function(a){this._userContext=a},get_executor:function(){return this._executor},set_executor:function(a){this._executor=a;this._executor._set_webRequest(this)},get_timeout:function(){if(this._timeout===0)return Sys.Net.WebRequestManager.get_defaultTimeout();return this._timeout},set_timeout:function(a){this._timeout=a},getResolvedUrl:function(){return Sys.Net.WebRequest._resolveUrl(this._url)},invoke:function(){Sys.Net.WebRequestManager.executeRequest(this);this._invokeCalled=true}};Sys.Net.WebRequest._resolveUrl=function(b,a){if(b&&b.indexOf("://")!==-1)return b;if(!a||a.length===0){var d=document.getElementsByTagName("base")[0];if(d&&d.href&&d.href.length>0)a=d.href;else a=document.URL}var c=a.indexOf("?");if(c!==-1)a=a.substr(0,c);c=a.indexOf("#");if(c!==-1)a=a.substr(0,c);a=a.substr(0,a.lastIndexOf("/")+1);if(!b||b.length===0)return a;if(b.charAt(0)==="/"){var e=a.indexOf("://"),g=a.indexOf("/",e+3);return a.substr(0,g)+b}else{var f=a.lastIndexOf("/");return a.substr(0,f+1)+b}};Sys.Net.WebRequest._createQueryString=function(d,b){if(!b)b=encodeURIComponent;var a=new Sys.StringBuilder,f=0;for(var c in d){var e=d[c];if(typeof e==="function")continue;var g=Sys.Serialization.JavaScriptSerializer.serialize(e);if(f!==0)a.append("&");a.append(c);a.append("=");a.append(b(g));f++}return a.toString()};Sys.Net.WebRequest._createUrl=function(a,b){if(!b)return a;var d=Sys.Net.WebRequest._createQueryString(b);if(d.length>0){var c="?";if(a&&a.indexOf("?")!==-1)c="&";return a+c+d}else return a};Sys.Net.WebRequest.registerClass("Sys.Net.WebRequest");Sys.Net.WebServiceProxy=function(){};Sys.Net.WebServiceProxy.prototype={get_timeout:function(){return this._timeout},set_timeout:function(a){if(a<0)throw Error.argumentOutOfRange("value",a,Sys.Res.invalidTimeout);this._timeout=a},get_defaultUserContext:function(){return this._userContext},set_defaultUserContext:function(a){this._userContext=a},get_defaultSucceededCallback:function(){return this._succeeded},set_defaultSucceededCallback:function(a){this._succeeded=a},get_defaultFailedCallback:function(){return this._failed},set_defaultFailedCallback:function(a){this._failed=a},get_path:function(){return this._path},set_path:function(a){this._path=a},_invoke:function(d,e,g,f,c,b,a){if(c===null||typeof c==="undefined")c=this.get_defaultSucceededCallback();if(b===null||typeof b==="undefined")b=this.get_defaultFailedCallback();if(a===null||typeof a==="undefined")a=this.get_defaultUserContext();return Sys.Net.WebServiceProxy.invoke(d,e,g,f,c,b,a,this.get_timeout())}};Sys.Net.WebServiceProxy.registerClass("Sys.Net.WebServiceProxy");Sys.Net.WebServiceProxy.invoke=function(k,a,j,d,i,c,f,h){var b=new Sys.Net.WebRequest;b.get_headers()["Content-Type"]="application/json; charset=utf-8";if(!d)d={};var g=d;if(!j||!g)g={};b.set_url(Sys.Net.WebRequest._createUrl(k+"/"+encodeURIComponent(a),g));var e=null;if(!j){e=Sys.Serialization.JavaScriptSerializer.serialize(d);if(e==="{}")e=""}b.set_body(e);b.add_completed(l);if(h&&h>0)b.set_timeout(h);b.invoke();function l(d){if(d.get_responseAvailable()){var g=d.get_statusCode(),b=null;try{var e=d.getResponseHeader("Content-Type");if(e.startsWith("application/json"))b=d.get_object();else if(e.startsWith("text/xml"))b=d.get_xml();else b=d.get_responseData()}catch(m){}var k=d.getResponseHeader("jsonerror"),h=k==="true";if(h){if(b)b=new Sys.Net.WebServiceError(false,b.Message,b.StackTrace,b.ExceptionType)}else if(e.startsWith("application/json"))b=b.d;if(g<200||g>=300||h){if(c){if(!b||!h)b=new Sys.Net.WebServiceError(false,String.format(Sys.Res.webServiceFailedNoMsg,a),"","");b._statusCode=g;c(b,f,a)}}else if(i)i(b,f,a)}else{var j;if(d.get_timedOut())j=String.format(Sys.Res.webServiceTimedOut,a);else j=String.format(Sys.Res.webServiceFailedNoMsg,a);if(c)c(new Sys.Net.WebServiceError(d.get_timedOut(),j,"",""),f,a)}}return b};Sys.Net.WebServiceProxy._generateTypedConstructor=function(a){return function(b){if(b)for(var c in b)this[c]=b[c];this.__type=a}};Sys.Net.WebServiceError=function(c,d,b,a){this._timedOut=c;this._message=d;this._stackTrace=b;this._exceptionType=a;this._statusCode=-1};Sys.Net.WebServiceError.prototype={get_timedOut:function(){return this._timedOut},get_statusCode:function(){return this._statusCode},get_message:function(){return this._message},get_stackTrace:function(){return this._stackTrace},get_exceptionType:function(){return this._exceptionType}};Sys.Net.WebServiceError.registerClass("Sys.Net.WebServiceError");Type.registerNamespace("Sys.Services");Sys.Services._ProfileService=function(){Sys.Services._ProfileService.initializeBase(this);this.properties={}};Sys.Services._ProfileService.DefaultWebServicePath="";Sys.Services._ProfileService.prototype={_defaultLoadCompletedCallback:null,_defaultSaveCompletedCallback:null,_path:"",_timeout:0,get_defaultLoadCompletedCallback:function(){return this._defaultLoadCompletedCallback},set_defaultLoadCompletedCallback:function(a){this._defaultLoadCompletedCallback=a},get_defaultSaveCompletedCallback:function(){return this._defaultSaveCompletedCallback},set_defaultSaveCompletedCallback:function(a){this._defaultSaveCompletedCallback=a},get_path:function(){return this._path||""},load:function(c,d,e,f){var b,a;if(!c){a="GetAllPropertiesForCurrentUser";b={authenticatedUserOnly:false}}else{a="GetPropertiesForCurrentUser";b={properties:this._clonePropertyNames(c),authenticatedUserOnly:false}}this._invoke(this._get_path(),a,false,b,Function.createDelegate(this,this._onLoadComplete),Function.createDelegate(this,this._onLoadFailed),[d,e,f])},save:function(d,b,c,e){var a=this._flattenProperties(d,this.properties);this._invoke(this._get_path(),"SetPropertiesForCurrentUser",false,{values:a.value,authenticatedUserOnly:false},Function.createDelegate(this,this._onSaveComplete),Function.createDelegate(this,this._onSaveFailed),[b,c,e,a.count])},_clonePropertyNames:function(e){var c=[],d={};for(var b=0;b<e.length;b++){var a=e[b];if(!d[a]){Array.add(c,a);d[a]=true}}return c},_flattenProperties:function(a,i,j){var b={},e,d,g=0;if(a&&a.length===0)return {value:b,count:0};for(var c in i){e=i[c];d=j?j+"."+c:c;if(Sys.Services.ProfileGroup.isInstanceOfType(e)){var k=this._flattenProperties(a,e,d),h=k.value;g+=k.count;for(var f in h){var l=h[f];b[f]=l}}else if(!a||Array.indexOf(a,d)!==-1){b[d]=e;g++}}return {value:b,count:g}},_get_path:function(){var a=this.get_path();if(!a.length)a=Sys.Services._ProfileService.DefaultWebServicePath;if(!a||!a.length)throw Error.invalidOperation(Sys.Res.servicePathNotSet);return a},_onLoadComplete:function(a,e,g){if(typeof a!=="object")throw Error.invalidOperation(String.format(Sys.Res.webServiceInvalidReturnType,g,"Object"));var c=this._unflattenProperties(a);for(var b in c)this.properties[b]=c[b];var d=e[0]||this.get_defaultLoadCompletedCallback()||this.get_defaultSucceededCallback();if(d){var f=e[2]||this.get_defaultUserContext();d(a.length,f,"Sys.Services.ProfileService.load")}},_onLoadFailed:function(d,b){var a=b[1]||this.get_defaultFailedCallback();if(a){var c=b[2]||this.get_defaultUserContext();a(d,c,"Sys.Services.ProfileService.load")}},_onSaveComplete:function(a,b,f){var c=b[3];if(a!==null)if(a instanceof Array)c-=a.length;else if(typeof a==="number")c=a;else throw Error.invalidOperation(String.format(Sys.Res.webServiceInvalidReturnType,f,"Array"));var d=b[0]||this.get_defaultSaveCompletedCallback()||this.get_defaultSucceededCallback();if(d){var e=b[2]||this.get_defaultUserContext();d(c,e,"Sys.Services.ProfileService.save")}},_onSaveFailed:function(d,b){var a=b[1]||this.get_defaultFailedCallback();if(a){var c=b[2]||this.get_defaultUserContext();a(d,c,"Sys.Services.ProfileService.save")}},_unflattenProperties:function(e){var c={},d,f,h=0;for(var a in e){h++;f=e[a];d=a.indexOf(".");if(d!==-1){var g=a.substr(0,d);a=a.substr(d+1);var b=c[g];if(!b||!Sys.Services.ProfileGroup.isInstanceOfType(b)){b=new Sys.Services.ProfileGroup;c[g]=b}b[a]=f}else c[a]=f}e.length=h;return c}};Sys.Services._ProfileService.registerClass("Sys.Services._ProfileService",Sys.Net.WebServiceProxy);Sys.Services.ProfileService=new Sys.Services._ProfileService;Sys.Services.ProfileGroup=function(a){if(a)for(var b in a)this[b]=a[b]};Sys.Services.ProfileGroup.registerClass("Sys.Services.ProfileGroup");Sys.Services._AuthenticationService=function(){Sys.Services._AuthenticationService.initializeBase(this)};Sys.Services._AuthenticationService.DefaultWebServicePath="";Sys.Services._AuthenticationService.prototype={_defaultLoginCompletedCallback:null,_defaultLogoutCompletedCallback:null,_path:"",_timeout:0,_authenticated:false,get_defaultLoginCompletedCallback:function(){return this._defaultLoginCompletedCallback},set_defaultLoginCompletedCallback:function(a){this._defaultLoginCompletedCallback=a},get_defaultLogoutCompletedCallback:function(){return this._defaultLogoutCompletedCallback},set_defaultLogoutCompletedCallback:function(a){this._defaultLogoutCompletedCallback=a},get_isLoggedIn:function(){return this._authenticated},get_path:function(){return this._path||""},login:function(c,b,a,h,f,d,e,g){this._invoke(this._get_path(),"Login",false,{userName:c,password:b,createPersistentCookie:a},Function.createDelegate(this,this._onLoginComplete),Function.createDelegate(this,this._onLoginFailed),[c,b,a,h,f,d,e,g])},logout:function(c,a,b,d){this._invoke(this._get_path(),"Logout",false,{},Function.createDelegate(this,this._onLogoutComplete),Function.createDelegate(this,this._onLogoutFailed),[c,a,b,d])},_get_path:function(){var a=this.get_path();if(!a.length)a=Sys.Services._AuthenticationService.DefaultWebServicePath;if(!a||!a.length)throw Error.invalidOperation(Sys.Res.servicePathNotSet);return a},_onLoginComplete:function(e,c,f){if(typeof e!=="boolean")throw Error.invalidOperation(String.format(Sys.Res.webServiceInvalidReturnType,f,"Boolean"));var b=c[4],d=c[7]||this.get_defaultUserContext(),a=c[5]||this.get_defaultLoginCompletedCallback()||this.get_defaultSucceededCallback();if(e){this._authenticated=true;if(a)a(true,d,"Sys.Services.AuthenticationService.login");if(typeof b!=="undefined"&&b!==null)window.location.href=b}else if(a)a(false,d,"Sys.Services.AuthenticationService.login")},_onLoginFailed:function(d,b){var a=b[6]||this.get_defaultFailedCallback();if(a){var c=b[7]||this.get_defaultUserContext();a(d,c,"Sys.Services.AuthenticationService.login")}},_onLogoutComplete:function(f,a,e){if(f!==null)throw Error.invalidOperation(String.format(Sys.Res.webServiceInvalidReturnType,e,"null"));var b=a[0],d=a[3]||this.get_defaultUserContext(),c=a[1]||this.get_defaultLogoutCompletedCallback()||this.get_defaultSucceededCallback();this._authenticated=false;if(c)c(null,d,"Sys.Services.AuthenticationService.logout");if(!b)window.location.reload();else window.location.href=b},_onLogoutFailed:function(c,b){var a=b[2]||this.get_defaultFailedCallback();if(a)a(c,b[3],"Sys.Services.AuthenticationService.logout")},_setAuthenticated:function(a){this._authenticated=a}};Sys.Services._AuthenticationService.registerClass("Sys.Services._AuthenticationService",Sys.Net.WebServiceProxy);Sys.Services.AuthenticationService=new Sys.Services._AuthenticationService;Sys.Services._RoleService=function(){Sys.Services._RoleService.initializeBase(this);this._roles=[]};Sys.Services._RoleService.DefaultWebServicePath="";Sys.Services._RoleService.prototype={_defaultLoadCompletedCallback:null,_rolesIndex:null,_timeout:0,_path:"",get_defaultLoadCompletedCallback:function(){return this._defaultLoadCompletedCallback},set_defaultLoadCompletedCallback:function(a){this._defaultLoadCompletedCallback=a},get_path:function(){return this._path||""},get_roles:function(){return Array.clone(this._roles)},isUserInRole:function(a){var b=this._get_rolesIndex()[a.trim().toLowerCase()];return !!b},load:function(a,b,c){Sys.Net.WebServiceProxy.invoke(this._get_path(),"GetRolesForCurrentUser",false,{},Function.createDelegate(this,this._onLoadComplete),Function.createDelegate(this,this._onLoadFailed),[a,b,c],this.get_timeout())},_get_path:function(){var a=this.get_path();if(!a||!a.length)a=Sys.Services._RoleService.DefaultWebServicePath;if(!a||!a.length)throw Error.invalidOperation(Sys.Res.servicePathNotSet);return a},_get_rolesIndex:function(){if(!this._rolesIndex){var b={};for(var a=0;a<this._roles.length;a++)b[this._roles[a].toLowerCase()]=true;this._rolesIndex=b}return this._rolesIndex},_onLoadComplete:function(a,c,f){if(a&&!(a instanceof Array))throw Error.invalidOperation(String.format(Sys.Res.webServiceInvalidReturnType,f,"Array"));this._roles=a;this._rolesIndex=null;var b=c[0]||this.get_defaultLoadCompletedCallback()||this.get_defaultSucceededCallback();if(b){var e=c[2]||this.get_defaultUserContext(),d=Array.clone(a);b(d,e,"Sys.Services.RoleService.load")}},_onLoadFailed:function(d,b){var a=b[1]||this.get_defaultFailedCallback();if(a){var c=b[2]||this.get_defaultUserContext();a(d,c,"Sys.Services.RoleService.load")}}};Sys.Services._RoleService.registerClass("Sys.Services._RoleService",Sys.Net.WebServiceProxy);Sys.Services.RoleService=new Sys.Services._RoleService;Type.registerNamespace("Sys.Serialization");Sys.Serialization.JavaScriptSerializer=function(){};Sys.Serialization.JavaScriptSerializer.registerClass("Sys.Serialization.JavaScriptSerializer");Sys.Serialization.JavaScriptSerializer._charsToEscapeRegExs=[];Sys.Serialization.JavaScriptSerializer._charsToEscape=[];Sys.Serialization.JavaScriptSerializer._dateRegEx=new RegExp('(^|[^\\\\])\\"\\\\/Date\\((-?[0-9]+)(?:[a-zA-Z]|(?:\\+|-)[0-9]{4})?\\)\\\\/\\"',"g");Sys.Serialization.JavaScriptSerializer._escapeChars={};Sys.Serialization.JavaScriptSerializer._escapeRegEx=new RegExp('["\\\\\\x00-\\x1F]',"i");Sys.Serialization.JavaScriptSerializer._escapeRegExGlobal=new RegExp('["\\\\\\x00-\\x1F]',"g");Sys.Serialization.JavaScriptSerializer._jsonRegEx=new RegExp("[^,:{}\\[\\]0-9.\\-+Eaeflnr-u \\n\\r\\t]","g");Sys.Serialization.JavaScriptSerializer._jsonStringRegEx=new RegExp('"(\\\\.|[^"\\\\])*"',"g");Sys.Serialization.JavaScriptSerializer._serverTypeFieldName="__type";Sys.Serialization.JavaScriptSerializer._init=function(){var c=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000b","\\f","\\r","\\u000e","\\u000f","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001a","\\u001b","\\u001c","\\u001d","\\u001e","\\u001f"];Sys.Serialization.JavaScriptSerializer._charsToEscape[0]="\\";Sys.Serialization.JavaScriptSerializer._charsToEscapeRegExs["\\"]=new RegExp("\\\\","g");Sys.Serialization.JavaScriptSerializer._escapeChars["\\"]="\\\\";Sys.Serialization.JavaScriptSerializer._charsToEscape[1]='"';Sys.Serialization.JavaScriptSerializer._charsToEscapeRegExs['"']=new RegExp('"',"g");Sys.Serialization.JavaScriptSerializer._escapeChars['"']='\\"';for(var a=0;a<32;a++){var b=String.fromCharCode(a);Sys.Serialization.JavaScriptSerializer._charsToEscape[a+2]=b;Sys.Serialization.JavaScriptSerializer._charsToEscapeRegExs[b]=new RegExp(b,"g");Sys.Serialization.JavaScriptSerializer._escapeChars[b]=c[a]}};Sys.Serialization.JavaScriptSerializer._serializeBooleanWithBuilder=function(b,a){a.append(b.toString())};Sys.Serialization.JavaScriptSerializer._serializeNumberWithBuilder=function(a,b){if(isFinite(a))b.append(String(a));else throw Error.invalidOperation(Sys.Res.cannotSerializeNonFiniteNumbers)};Sys.Serialization.JavaScriptSerializer._serializeStringWithBuilder=function(a,c){c.append('"');if(Sys.Serialization.JavaScriptSerializer._escapeRegEx.test(a)){if(Sys.Serialization.JavaScriptSerializer._charsToEscape.length===0)Sys.Serialization.JavaScriptSerializer._init();if(a.length<128)a=a.replace(Sys.Serialization.JavaScriptSerializer._escapeRegExGlobal,function(a){return Sys.Serialization.JavaScriptSerializer._escapeChars[a]});else for(var d=0;d<34;d++){var b=Sys.Serialization.JavaScriptSerializer._charsToEscape[d];if(a.indexOf(b)!==-1)if(Sys.Browser.agent===Sys.Browser.Opera||Sys.Browser.agent===Sys.Browser.FireFox)a=a.split(b).join(Sys.Serialization.JavaScriptSerializer._escapeChars[b]);else a=a.replace(Sys.Serialization.JavaScriptSerializer._charsToEscapeRegExs[b],Sys.Serialization.JavaScriptSerializer._escapeChars[b])}}c.append(a);c.append('"')};Sys.Serialization.JavaScriptSerializer._serializeWithBuilder=function(b,a,i,g){var c;switch(typeof b){case "object":if(b)if(Number.isInstanceOfType(b))Sys.Serialization.JavaScriptSerializer._serializeNumberWithBuilder(b,a);else if(Boolean.isInstanceOfType(b))Sys.Serialization.JavaScriptSerializer._serializeBooleanWithBuilder(b,a);else if(String.isInstanceOfType(b))Sys.Serialization.JavaScriptSerializer._serializeStringWithBuilder(b,a);else if(Array.isInstanceOfType(b)){a.append("[");for(c=0;c<b.length;++c){if(c>0)a.append(",");Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(b[c],a,false,g)}a.append("]")}else{if(Date.isInstanceOfType(b)){a.append('"\\/Date(');a.append(b.getTime());a.append(')\\/"');break}var d=[],f=0;for(var e in b){if(e.startsWith("$"))continue;if(e===Sys.Serialization.JavaScriptSerializer._serverTypeFieldName&&f!==0){d[f++]=d[0];d[0]=e}else d[f++]=e}if(i)d.sort();a.append("{");var j=false;for(c=0;c<f;c++){var h=b[d[c]];if(typeof h!=="undefined"&&typeof h!=="function"){if(j)a.append(",");else j=true;Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(d[c],a,i,g);a.append(":");Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(h,a,i,g)}}a.append("}")}else a.append("null");break;case "number":Sys.Serialization.JavaScriptSerializer._serializeNumberWithBuilder(b,a);break;case "string":Sys.Serialization.JavaScriptSerializer._serializeStringWithBuilder(b,a);break;case "boolean":Sys.Serialization.JavaScriptSerializer._serializeBooleanWithBuilder(b,a);break;default:a.append("null")}};Sys.Serialization.JavaScriptSerializer.serialize=function(b){var a=new Sys.StringBuilder;Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(b,a,false);return a.toString()};Sys.Serialization.JavaScriptSerializer.deserialize=function(data,secure){if(data.length===0)throw Error.argument("data",Sys.Res.cannotDeserializeEmptyString);try{var exp=data.replace(Sys.Serialization.JavaScriptSerializer._dateRegEx,"$1new Date($2)");if(secure&&Sys.Serialization.JavaScriptSerializer._jsonRegEx.test(exp.replace(Sys.Serialization.JavaScriptSerializer._jsonStringRegEx,"")))throw null;return eval("("+exp+")")}catch(a){throw Error.argument("data",Sys.Res.cannotDeserializeInvalidJson)}};Sys.CultureInfo=function(c,b,a){this.name=c;this.numberFormat=b;this.dateTimeFormat=a};Sys.CultureInfo.prototype={_getDateTimeFormats:function(){if(!this._dateTimeFormats){var a=this.dateTimeFormat;this._dateTimeFormats=[a.MonthDayPattern,a.YearMonthPattern,a.ShortDatePattern,a.ShortTimePattern,a.LongDatePattern,a.LongTimePattern,a.FullDateTimePattern,a.RFC1123Pattern,a.SortableDateTimePattern,a.UniversalSortableDateTimePattern]}return this._dateTimeFormats},_getMonthIndex:function(a){if(!this._upperMonths)this._upperMonths=this._toUpperArray(this.dateTimeFormat.MonthNames);return Array.indexOf(this._upperMonths,this._toUpper(a))},_getAbbrMonthIndex:function(a){if(!this._upperAbbrMonths)this._upperAbbrMonths=this._toUpperArray(this.dateTimeFormat.AbbreviatedMonthNames);return Array.indexOf(this._upperAbbrMonths,this._toUpper(a))},_getDayIndex:function(a){if(!this._upperDays)this._upperDays=this._toUpperArray(this.dateTimeFormat.DayNames);return Array.indexOf(this._upperDays,this._toUpper(a))},_getAbbrDayIndex:function(a){if(!this._upperAbbrDays)this._upperAbbrDays=this._toUpperArray(this.dateTimeFormat.AbbreviatedDayNames);return Array.indexOf(this._upperAbbrDays,this._toUpper(a))},_toUpperArray:function(c){var b=[];for(var a=0,d=c.length;a<d;a++)b[a]=this._toUpper(c[a]);return b},_toUpper:function(a){return a.split("\u00a0").join(" ").toUpperCase()}};Sys.CultureInfo._parse=function(b){var a=Sys.Serialization.JavaScriptSerializer.deserialize(b);return new Sys.CultureInfo(a.name,a.numberFormat,a.dateTimeFormat)};Sys.CultureInfo.registerClass("Sys.CultureInfo");Sys.CultureInfo.InvariantCulture=Sys.CultureInfo._parse('{"name":"","numberFormat":{"CurrencyDecimalDigits":2,"CurrencyDecimalSeparator":".","IsReadOnly":true,"CurrencyGroupSizes":[3],"NumberGroupSizes":[3],"PercentGroupSizes":[3],"CurrencyGroupSeparator":",","CurrencySymbol":"\u00a4","NaNSymbol":"NaN","CurrencyNegativePattern":0,"NumberNegativePattern":1,"PercentPositivePattern":0,"PercentNegativePattern":0,"NegativeInfinitySymbol":"-Infinity","NegativeSign":"-","NumberDecimalDigits":2,"NumberDecimalSeparator":".","NumberGroupSeparator":",","CurrencyPositivePattern":0,"PositiveInfinitySymbol":"Infinity","PositiveSign":"+","PercentDecimalDigits":2,"PercentDecimalSeparator":".","PercentGroupSeparator":",","PercentSymbol":"%","PerMilleSymbol":"\u2030","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,"IsReadOnly":true},"DateSeparator":"/","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":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"MonthNames":["January","February","March","April","May","June","July","August","September","October","November","December",""],"IsReadOnly":true,"NativeCalendarName":"Gregorian Calendar","AbbreviatedMonthGenitiveNames":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"MonthGenitiveNames":["January","February","March","April","May","June","July","August","September","October","November","December",""]}}');if(typeof __cultureInfo==="undefined")var __cultureInfo='{"name":"en-US","numberFormat":{"CurrencyDecimalDigits":2,"CurrencyDecimalSeparator":".","IsReadOnly":false,"CurrencyGroupSizes":[3],"NumberGroupSizes":[3],"PercentGroupSizes":[3],"CurrencyGroupSeparator":",","CurrencySymbol":"$","NaNSymbol":"NaN","CurrencyNegativePattern":0,"NumberNegativePattern":1,"PercentPositivePattern":0,"PercentNegativePattern":0,"NegativeInfinitySymbol":"-Infinity","NegativeSign":"-","NumberDecimalDigits":2,"NumberDecimalSeparator":".","NumberGroupSeparator":",","CurrencyPositivePattern":0,"PositiveInfinitySymbol":"Infinity","PositiveSign":"+","PercentDecimalDigits":2,"PercentDecimalSeparator":".","PercentGroupSeparator":",","PercentSymbol":"%","PerMilleSymbol":"\u2030","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,"IsReadOnly":false},"DateSeparator":"/","FirstDayOfWeek":0,"CalendarWeekRule":0,"FullDateTimePattern":"dddd, MMMM dd, yyyy h:mm:ss tt","LongDatePattern":"dddd, MMMM dd, yyyy","LongTimePattern":"h:mm:ss tt","MonthDayPattern":"MMMM dd","PMDesignator":"PM","RFC1123Pattern":"ddd, dd MMM yyyy HH\':\'mm\':\'ss \'GMT\'","ShortDatePattern":"M/d/yyyy","ShortTimePattern":"h:mm tt","SortableDateTimePattern":"yyyy\'-\'MM\'-\'dd\'T\'HH\':\'mm\':\'ss","TimeSeparator":":","UniversalSortableDateTimePattern":"yyyy\'-\'MM\'-\'dd HH\':\'mm\':\'ss\'Z\'","YearMonthPattern":"MMMM, yyyy","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":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"MonthNames":["January","February","March","April","May","June","July","August","September","October","November","December",""],"IsReadOnly":false,"NativeCalendarName":"Gregorian Calendar","AbbreviatedMonthGenitiveNames":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"MonthGenitiveNames":["January","February","March","April","May","June","July","August","September","October","November","December",""]}}';Sys.CultureInfo.CurrentCulture=Sys.CultureInfo._parse(__cultureInfo);delete __cultureInfo;Sys.UI.Behavior=function(b){Sys.UI.Behavior.initializeBase(this);this._element=b;var a=b._behaviors;if(!a)b._behaviors=[this];else a[a.length]=this};Sys.UI.Behavior.prototype={_name:null,get_element:function(){return this._element},get_id:function(){var a=Sys.UI.Behavior.callBaseMethod(this,"get_id");if(a)return a;if(!this._element||!this._element.id)return "";return this._element.id+"$"+this.get_name()},get_name:function(){if(this._name)return this._name;var a=Object.getTypeName(this),b=a.lastIndexOf(".");if(b!=-1)a=a.substr(b+1);if(!this.get_isInitialized())this._name=a;return a},set_name:function(a){this._name=a},initialize:function(){Sys.UI.Behavior.callBaseMethod(this,"initialize");var a=this.get_name();if(a)this._element[a]=this},dispose:function(){Sys.UI.Behavior.callBaseMethod(this,"dispose");if(this._element){var a=this.get_name();if(a)this._element[a]=null;Array.remove(this._element._behaviors,this);delete this._element}}};Sys.UI.Behavior.registerClass("Sys.UI.Behavior",Sys.Component);Sys.UI.Behavior.getBehaviorByName=function(b,c){var a=b[c];return a&&Sys.UI.Behavior.isInstanceOfType(a)?a:null};Sys.UI.Behavior.getBehaviors=function(a){if(!a._behaviors)return [];return Array.clone(a._behaviors)};Sys.UI.Behavior.getBehaviorsByType=function(d,e){var a=d._behaviors,c=[];if(a)for(var b=0,f=a.length;b<f;b++)if(e.isInstanceOfType(a[b]))c[c.length]=a[b];return c};Sys.UI.VisibilityMode=function(){throw Error.notImplemented()};Sys.UI.VisibilityMode.prototype={hide:0,collapse:1};Sys.UI.VisibilityMode.registerEnum("Sys.UI.VisibilityMode");Sys.UI.Control=function(a){Sys.UI.Control.initializeBase(this);this._element=a;a.control=this};Sys.UI.Control.prototype={_parent:null,_visibilityMode:Sys.UI.VisibilityMode.hide,get_element:function(){return this._element},get_id:function(){if(!this._element)return "";return this._element.id},set_id:function(){throw Error.invalidOperation(Sys.Res.cantSetId)},get_parent:function(){if(this._parent)return this._parent;if(!this._element)return null;var a=this._element.parentNode;while(a){if(a.control)return a.control;a=a.parentNode}return null},set_parent:function(a){this._parent=a},get_visibilityMode:function(){return Sys.UI.DomElement.getVisibilityMode(this._element)},set_visibilityMode:function(a){Sys.UI.DomElement.setVisibilityMode(this._element,a)},get_visible:function(){return Sys.UI.DomElement.getVisible(this._element)},set_visible:function(a){Sys.UI.DomElement.setVisible(this._element,a)},addCssClass:function(a){Sys.UI.DomElement.addCssClass(this._element,a)},dispose:function(){Sys.UI.Control.callBaseMethod(this,"dispose");if(this._element){this._element.control=undefined;delete this._element}if(this._parent)delete this._parent},onBubbleEvent:function(){return false},raiseBubbleEvent:function(b,c){var a=this.get_parent();while(a){if(a.onBubbleEvent(b,c))return;a=a.get_parent()}},removeCssClass:function(a){Sys.UI.DomElement.removeCssClass(this._element,a)},toggleCssClass:function(a){Sys.UI.DomElement.toggleCssClass(this._element,a)}};Sys.UI.Control.registerClass("Sys.UI.Control",Sys.Component);
Type.registerNamespace('Sys');Sys.Res={
"argumentInteger":"Value must be an integer.","scriptLoadMultipleCallbacks":"The script \u0027{0}\u0027 contains multiple calls to Sys.Application.notifyScriptLoaded(). Only one is allowed.","invokeCalledTwice":"Cannot call invoke more than once.","webServiceFailed":"The server method \u0027{0}\u0027 failed with the following error: {1}","webServiceInvalidJsonWrapper":"The server method \u0027{0}\u0027 returned invalid data. The \u0027d\u0027 property is missing from the JSON wrapper.","argumentType":"Object cannot be converted to the required type.","argumentNull":"Value cannot be null.","controlCantSetId":"The id property can\u0027t be set on a control.","formatBadFormatSpecifier":"Format specifier was invalid.","webServiceFailedNoMsg":"The server method \u0027{0}\u0027 failed.","argumentDomElement":"Value must be a DOM element.","invalidExecutorType":"Could not create a valid Sys.Net.WebRequestExecutor from: {0}.","cannotCallBeforeResponse":"Cannot call {0} when responseAvailable is false.","actualValue":"Actual value was {0}.","enumInvalidValue":"\u0027{0}\u0027 is not a valid value for enum {1}.","scriptLoadFailed":"The script \u0027{0}\u0027 could not be loaded.","parameterCount":"Parameter count mismatch.","cannotDeserializeEmptyString":"Cannot deserialize empty string.","formatInvalidString":"Input string was not in a correct format.","invalidTimeout":"Value must be greater than or equal to zero.","cannotAbortBeforeStart":"Cannot abort when executor has not started.","argument":"Value does not fall within the expected range.","cannotDeserializeInvalidJson":"Cannot deserialize. The data does not correspond to valid JSON.","invalidHttpVerb":"httpVerb cannot be set to an empty or null string.","nullWebRequest":"Cannot call executeRequest with a null webRequest.","eventHandlerInvalid":"Handler was not added through the Sys.UI.DomEvent.addHandler method.","cannotSerializeNonFiniteNumbers":"Cannot serialize non finite numbers.","argumentUndefined":"Value cannot be undefined.","webServiceInvalidReturnType":"The server method \u0027{0}\u0027 returned an invalid type. Expected type: {1}","servicePathNotSet":"The path to the web service has not been set.","argumentTypeWithTypes":"Object of type \u0027{0}\u0027 cannot be converted to type \u0027{1}\u0027.","cannotCallOnceStarted":"Cannot call {0} once started.","badBaseUrl1":"Base URL does not contain ://.","badBaseUrl2":"Base URL does not contain another /.","badBaseUrl3":"Cannot find last / in base URL.","setExecutorAfterActive":"Cannot set executor after it has become active.","paramName":"Parameter name: {0}","cannotCallOutsideHandler":"Cannot call {0} outside of a completed event handler.","cannotSerializeObjectWithCycle":"Cannot serialize object with cyclic reference within child properties.","format":"One of the identified items was in an invalid format.","assertFailedCaller":"Assertion Failed: {0}\r\nat {1}","argumentOutOfRange":"Specified argument was out of the range of valid values.","webServiceTimedOut":"The server method \u0027{0}\u0027 timed out.","notImplemented":"The method or operation is not implemented.","assertFailed":"Assertion Failed: {0}","invalidOperation":"Operation is not valid due to the current state of the object.","breakIntoDebugger":"{0}\r\n\r\nBreak into debugger?"};
/* END MicrosoftAjax.js */
/* START Telerik.Web.UI.Common.Core.js */
try{
document.execCommand("BackgroundImageCache",false,true);
}
catch(err){
}
Type.registerNamespace("Telerik.Web.UI");
window.$telerik=window.TelerikCommonScripts=Telerik.Web.CommonScripts={_rgbToHex:function(_1){
if(_1.toLowerCase().indexOf("rgb")!=-1){
var _2="#";
var _3=function(_4){
var _5=parseInt(_4,10).toString(16);
_2=_2+(_5.length==1?"0"+_5:_5);
return _4;
};
_1=_1.replace(/(\d+)/gi,_3);
_3=null;
return _2;
}else{
return _1;
}
},getOuterSize:function(_6){
var _7=$telerik.getBounds(_6);
var _8=$telerik.getMarginBox(_6);
return {width:_7.width+_8.left+_8.right,height:_7.height+_8.top+_8.bottom};
},getOuterBounds:function(_9){
var _a=$telerik.getBounds(_9);
var _b=$telerik.getMarginBox(_9);
return {x:_a.x-_b.left,y:_a.y-_b.top,width:_a.width+_b.left+_b.right,height:_a.height+_b.top+_b.bottom};
},getInvisibleParent:function(_c){
while(_c&&_c!=document){
if("none"==$telerik.getCurrentStyle(_c,"display","")){
return _c;
}
_c=_c.parentNode;
}
return null;
},addParentVisibilityChangeHandler:function(_d,_e){
if(_d){
if($telerik.isIE){
$addHandler(_d,"propertychange",_e);
}else{
_d.addEventListener("DOMAttrModified",_e,false);
}
}
},removeParentVisibilityChangeHandler:function(_f,_10){
if(_f&&_10){
if($telerik.isIE){
$removeHandler(_f,"propertychange",_10);
}else{
_f.removeEventListener("DOMAttrModified",_10,false);
}
}
},scrollIntoView:function(_11){
if(!_11||!_11.parentNode){
return;
}
var _12=null;
var _13=0;
var _14=_11.parentNode;
while(_14!=null){
if(_14.tagName=="BODY"){
var doc=_14.ownerDocument;
if(!$telerik.isIE&&doc.defaultView&&doc.defaultView.frameElement){
_13=doc.defaultView.frameElement.offsetHeight;
}
_12=_14;
break;
}
var _16=$telerik.getCurrentStyle(_14,"overflowY");
if(_16=="scroll"||_16=="auto"){
_12=_14;
break;
}
_14=_14.parentNode;
}
if(!_12){
return;
}
if(!_13){
_13=_12.offsetHeight;
}
if(_13<_11.offsetTop+_11.offsetHeight){
_12.scrollTop=(_11.offsetTop+_11.offsetHeight)-_13;
}else{
if(_11.offsetTop<_12.scrollTop){
_12.scrollTop=_11.offsetTop;
}
}
},isRightToLeft:function(_17){
while(_17&&_17.nodeType!==9){
if(_17.dir=="rtl"||$telerik.getCurrentStyle(_17,"direction")=="rtl"){
return true;
}
_17=_17.parentNode;
}
return false;
},getCorrectScrollLeft:function(_18){
if($telerik.isRightToLeft(_18)){
return -(_18.scrollWidth-_18.offsetWidth-Math.abs(_18.scrollLeft));
}else{
return _18.scrollLeft;
}
},getNextHtmlNode:function(_19){
if(!_19||!_19.previousSibling){
return null;
}
while(_19.previousSibling){
if(_19.previousSibling.nodeType==1){
return _19.previousSibling;
}
_19=_19.nextSibling;
}
},getPreviousHtmlNode:function(_1a){
if(!_1a||!_1a.nextSibling){
return null;
}
while(_1a.nextSibling){
if(_1a.nextSibling.nodeType==1){
return _1a.nextSibling;
}
_1a=_1a.nextSibling;
}
},getTextContent:function(_1b){
if(!_1b){
return null;
}
if(_1b.innerText!=null){
return _1b.innerText;
}
if(_1b.textContent!=null){
var _1c=_1b.textContent;
_1c=_1c.replace(/<!--(.|\s)*?-->/gi,"");
return _1c;
}
return null;
},_borderStyleNames:["borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle"],_borderWidthNames:["borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth"],_paddingWidthNames:["paddingTop","paddingRight","paddingBottom","paddingLeft"],_marginWidthNames:["marginTop","marginRight","marginBottom","marginLeft"],radControls:[],registerControl:function(_1d){
if(!Array.contains(this.radControls,_1d)){
Array.add(this.radControls,_1d);
}
},unregisterControl:function(_1e){
Array.remove(this.radControls,_1e);
},repaintChildren:function(_1f){
var _20=_1f.get_element();
for(var i=0,_22=this.radControls.length;i<_22;i++){
var _23=this.radControls[i];
if(_23.repaint&&this.isDescendant(_20,_23.get_element())){
_23.repaint();
}
}
},_borderThickness:function(){
$telerik._borderThicknesses={};
var _24=document.createElement("div");
var _25=document.createElement("div");
_24.style.visibility="hidden";
_24.style.position="absolute";
_24.style.fontSize="1px";
_25.style.height="0px";
_25.style.overflow="hidden";
document.body.appendChild(_24).appendChild(_25);
var _26=_24.offsetHeight;
_25.style.borderTop="solid black";
_25.style.borderTopWidth="thin";
$telerik._borderThicknesses["thin"]=_24.offsetHeight-_26;
_25.style.borderTopWidth="medium";
$telerik._borderThicknesses["medium"]=_24.offsetHeight-_26;
_25.style.borderTopWidth="thick";
$telerik._borderThicknesses["thick"]=_24.offsetHeight-_26;
if(typeof (_24.removeChild)!=="undefined"){
_24.removeChild(_25);
}
document.body.removeChild(_24);
if(!$telerik.isSafari){
_25.outerHTML=null;
}
if(!$telerik.isSafari){
_24.outerHTML=null;
}
_24=null;
_25=null;
},getCurrentStyle:function(_27,_28,_29){
var _2a=null;
if(_27){
if(_27.currentStyle){
_2a=_27.currentStyle[_28];
}else{
if(document.defaultView&&document.defaultView.getComputedStyle){
var _2b=document.defaultView.getComputedStyle(_27,null);
if(_2b){
_2a=_2b[_28];
}
}
}
if(!_2a&&_27.style.getPropertyValue){
_2a=_27.style.getPropertyValue(_28);
}else{
if(!_2a&&_27.style.getAttribute){
_2a=_27.style.getAttribute(_28);
}
}
}
if((!_2a||_2a==""||typeof (_2a)==="undefined")){
if(typeof (_29)!="undefined"){
_2a=_29;
}else{
_2a=null;
}
}
return _2a;
},getInheritedBackgroundColor:function(_2c){
if(!_2c){
return "#FFFFFF";
}
var _2d=$telerik.getCurrentStyle(_2c,"backgroundColor");
try{
while(!_2d||_2d==""||_2d=="transparent"||_2d=="rgba(0, 0, 0, 0)"){
_2c=_2c.parentNode;
if(!_2c){
_2d="#FFFFFF";
}else{
_2d=$telerik.getCurrentStyle(_2c,"backgroundColor");
}
}
}
catch(ex){
_2d="#FFFFFF";
}
return _2d;
},getLocation:function(_2e){
if(_2e===document.documentElement){
return new Sys.UI.Point(0,0);
}
if(Sys.Browser.agent==Sys.Browser.InternetExplorer){
if(_2e.window===_2e||_2e.nodeType===9||!_2e.getClientRects||!_2e.getBoundingClientRect){
return new Sys.UI.Point(0,0);
}
var _2f=_2e.getClientRects();
if(!_2f||!_2f.length){
return new Sys.UI.Point(0,0);
}
var _30=_2f[0];
var _31=0;
var _32=0;
var _33=false;
try{
_33=_2e.ownerDocument.parentWindow.frameElement;
}
catch(ex){
_33=true;
}
if(_33){
var _34=_2e.getBoundingClientRect();
if(!_34){
return new Sys.UI.Point(0,0);
}
var _35=_30.left;
var _36=_30.top;
for(var i=1;i<_2f.length;i++){
var r=_2f[i];
if(r.left<_35){
_35=r.left;
}
if(r.top<_36){
_36=r.top;
}
}
_31=_35-_34.left;
_32=_36-_34.top;
}
var _39=_2e.document.documentElement;
var _3a=0;
if(Sys.Browser.version<8){
if(_33){
if(_33.getAttribute){
var _3b=_33.getAttribute("frameborder");
_3a=2*((_3b!=null&&_3b!="")?_3b:1);
}
}else{
_3a=2;
}
}
var _3c=new Sys.UI.Point(_30.left-_3a-_31+$telerik.getCorrectScrollLeft(_39),_30.top-_3a-_32+_39.scrollTop);
if($telerik.quirksMode){
_3c.x+=$telerik.getCorrectScrollLeft(document.body);
_3c.y+=document.body.scrollTop;
}
return _3c;
}
var _3c=Sys.UI.DomElement.getLocation(_2e);
if($telerik.isOpera){
var _3d=_2e.offsetParent;
while(_3d&&_3d.tagName.toUpperCase()!="BODY"&&_3d.tagName.toUpperCase()!="HTML"){
_3c.x-=$telerik.getCorrectScrollLeft(_3d);
_3c.y-=_3d.scrollTop;
_3d=_3d.offsetParent;
}
}
if($telerik.isSafari){
var _3d=_2e.parentNode;
var _3e=null;
var _3f=null;
if($telerik.isSafari3||$telerik.isSafari2){
while(_3d&&_3d.tagName.toUpperCase()!="BODY"&&_3d.tagName.toUpperCase()!="HTML"){
if(_3d.tagName.toUpperCase()=="TD"){
_3e=_3d;
}else{
if(_3d.tagName.toUpperCase()=="TABLE"){
_3f=_3d;
}else{
var _40=$telerik.getCurrentStyle(_3d,"position");
if(_40=="absolute"||_40=="relative"){
var _41=$telerik.getCurrentStyle(_3d,"borderTopWidth",0);
var _42=$telerik.getCurrentStyle(_3d,"borderLeftWidth",0);
_3c.x+=parseInt(_41);
_3c.y+=parseInt(_42);
}
}
}
var _40=$telerik.getCurrentStyle(_3d,"position");
if(_40=="absolute"||_40=="relative"){
_3c.x-=_3d.scrollLeft;
_3c.y-=_3d.scrollTop;
}
if(_3e&&_3f){
_3c.x+=parseInt($telerik.getCurrentStyle(_3f,"borderTopWidth"));
_3c.y+=parseInt($telerik.getCurrentStyle(_3f,"borderLeftWidth"));
if($telerik.getCurrentStyle(_3f,"borderCollapse")!="collapse"){
_3c.x+=parseInt($telerik.getCurrentStyle(_3e,"borderTopWidth"));
_3c.y+=parseInt($telerik.getCurrentStyle(_3e,"borderLeftWidth"));
}
_3e=null;
_3f=null;
}else{
if(_3f){
if($telerik.getCurrentStyle(_3f,"borderCollapse")!="collapse"){
_3c.x+=parseInt($telerik.getCurrentStyle(_3f,"borderTopWidth"));
_3c.y+=parseInt($telerik.getCurrentStyle(_3f,"borderLeftWidth"));
}
_3f=null;
}
}
_3d=_3d.parentNode;
}
}
}
if($telerik.isIE&&$telerik.quirksMode){
_3c.x+=$telerik.getCorrectScrollLeft(document.body);
_3c.y+=document.body.scrollTop;
}
return _3c;
},setLocation:function(_43,_44){
Sys.UI.DomElement.setLocation(_43,_44.x,_44.y);
},findControl:function(_45,id){
var _47=_45.getElementsByTagName("*");
for(var i=0,l=_47.length;i<l;i++){
var _4a=_47[i].id;
if(_4a&&_4a.endsWith(id)){
return $find(_4a);
}
}
return null;
},findElement:function(_4b,id){
var _4d=_4b.getElementsByTagName("*");
for(var i=0,l=_4d.length;i<l;i++){
var _50=_4d[i].id;
if(_50&&_50.endsWith(id)){
return $get(_50);
}
}
return null;
},getContentSize:function(_51){
if(!_51){
throw Error.argumentNull("element");
}
var _52=$telerik.getSize(_51);
var _53=$telerik.getBorderBox(_51);
var _54=$telerik.getPaddingBox(_51);
return {width:_52.width-_53.horizontal-_54.horizontal,height:_52.height-_53.vertical-_54.vertical};
},getSize:function(_55){
if(!_55){
throw Error.argumentNull("element");
}
return {width:_55.offsetWidth,height:_55.offsetHeight};
},setContentSize:function(_56,_57){
if(!_56){
throw Error.argumentNull("element");
}
if(!_57){
throw Error.argumentNull("size");
}
if($telerik.getCurrentStyle(_56,"MozBoxSizing")=="border-box"||$telerik.getCurrentStyle(_56,"BoxSizing")=="border-box"){
var _58=$telerik.getBorderBox(_56);
var _59=$telerik.getPaddingBox(_56);
_57={width:_57.width+_58.horizontal+_59.horizontal,height:_57.height+_58.vertical+_59.vertical};
}
_56.style.width=_57.width.toString()+"px";
_56.style.height=_57.height.toString()+"px";
},setSize:function(_5a,_5b){
if(!_5a){
throw Error.argumentNull("element");
}
if(!_5b){
throw Error.argumentNull("size");
}
var _5c=$telerik.getBorderBox(_5a);
var _5d=$telerik.getPaddingBox(_5a);
var _5e={width:_5b.width-_5c.horizontal-_5d.horizontal,height:_5b.height-_5c.vertical-_5d.vertical};
$telerik.setContentSize(_5a,_5e);
},getBounds:function(_5f){
var _60=$telerik.getLocation(_5f);
return new Sys.UI.Bounds(_60.x,_60.y,_5f.offsetWidth||0,_5f.offsetHeight||0);
},setBounds:function(_61,_62){
if(!_61){
throw Error.argumentNull("element");
}
if(!_62){
throw Error.argumentNull("bounds");
}
$telerik.setSize(_61,_62);
$telerik.setLocation(_61,_62);
},getClientBounds:function(){
var _63;
var _64;
switch(Sys.Browser.agent){
case Sys.Browser.InternetExplorer:
_63=document.documentElement.clientWidth;
_64=document.documentElement.clientHeight;
if(_63==0&&_64==0){
_63=document.body.clientWidth;
_64=document.body.clientHeight;
}
break;
case Sys.Browser.Safari:
_63=window.innerWidth;
_64=window.innerHeight;
break;
case Sys.Browser.Opera:
_63=Math.min(window.innerWidth,document.body.clientWidth);
_64=Math.min(window.innerHeight,document.body.clientHeight);
break;
default:
_63=Math.min(window.innerWidth,document.documentElement.clientWidth);
_64=Math.min(window.innerHeight,document.documentElement.clientHeight);
break;
}
return new Sys.UI.Bounds(0,0,_63,_64);
},getMarginBox:function(_65){
if(!_65){
throw Error.argumentNull("element");
}
var box={top:$telerik.getMargin(_65,Telerik.Web.BoxSide.Top),right:$telerik.getMargin(_65,Telerik.Web.BoxSide.Right),bottom:$telerik.getMargin(_65,Telerik.Web.BoxSide.Bottom),left:$telerik.getMargin(_65,Telerik.Web.BoxSide.Left)};
box.horizontal=box.left+box.right;
box.vertical=box.top+box.bottom;
return box;
},getPaddingBox:function(_67){
if(!_67){
throw Error.argumentNull("element");
}
var box={top:$telerik.getPadding(_67,Telerik.Web.BoxSide.Top),right:$telerik.getPadding(_67,Telerik.Web.BoxSide.Right),bottom:$telerik.getPadding(_67,Telerik.Web.BoxSide.Bottom),left:$telerik.getPadding(_67,Telerik.Web.BoxSide.Left)};
box.horizontal=box.left+box.right;
box.vertical=box.top+box.bottom;
return box;
},getBorderBox:function(_69){
if(!_69){
throw Error.argumentNull("element");
}
var box={top:$telerik.getBorderWidth(_69,Telerik.Web.BoxSide.Top),right:$telerik.getBorderWidth(_69,Telerik.Web.BoxSide.Right),bottom:$telerik.getBorderWidth(_69,Telerik.Web.BoxSide.Bottom),left:$telerik.getBorderWidth(_69,Telerik.Web.BoxSide.Left)};
box.horizontal=box.left+box.right;
box.vertical=box.top+box.bottom;
return box;
},isBorderVisible:function(_6b,_6c){
if(!_6b){
throw Error.argumentNull("element");
}
if(_6c<Telerik.Web.BoxSide.Top||_6c>Telerik.Web.BoxSide.Left){
throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,_6c,"Telerik.Web.BoxSide"));
}
var _6d=$telerik._borderStyleNames[_6c];
var _6e=$telerik.getCurrentStyle(_6b,_6d);
return _6e!="none";
},getMargin:function(_6f,_70){
if(!_6f){
throw Error.argumentNull("element");
}
if(_70<Telerik.Web.BoxSide.Top||_70>Telerik.Web.BoxSide.Left){
throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,_70,"Telerik.Web.BoxSide"));
}
var _71=$telerik._marginWidthNames[_70];
var _72=$telerik.getCurrentStyle(_6f,_71);
try{
return $telerik.parsePadding(_72);
}
catch(ex){
return 0;
}
},getBorderWidth:function(_73,_74){
if(!_73){
throw Error.argumentNull("element");
}
if(_74<Telerik.Web.BoxSide.Top||_74>Telerik.Web.BoxSide.Left){
throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,_74,"Telerik.Web.BoxSide"));
}
if(!$telerik.isBorderVisible(_73,_74)){
return 0;
}
var _75=$telerik._borderWidthNames[_74];
var _76=$telerik.getCurrentStyle(_73,_75);
return $telerik.parseBorderWidth(_76);
},getPadding:function(_77,_78){
if(!_77){
throw Error.argumentNull("element");
}
if(_78<Telerik.Web.BoxSide.Top||_78>Telerik.Web.BoxSide.Left){
throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,_78,"Telerik.Web.BoxSide"));
}
var _79=$telerik._paddingWidthNames[_78];
var _7a=$telerik.getCurrentStyle(_77,_79);
return $telerik.parsePadding(_7a);
},parseBorderWidth:function(_7b){
if(_7b){
switch(_7b){
case "thin":
case "medium":
case "thick":
return $telerik._borderThicknesses[_7b];
case "inherit":
return 0;
}
var _7c=$telerik.parseUnit(_7b);
return _7c.size;
}
return 0;
},parsePadding:function(_7d){
if(_7d){
if(_7d=="auto"||_7d=="inherit"){
return 0;
}
var _7e=$telerik.parseUnit(_7d);
return _7e.size;
}
return 0;
},parseUnit:function(_7f){
if(!_7f){
throw Error.argumentNull("value");
}
_7f=_7f.trim().toLowerCase();
var l=_7f.length;
var s=-1;
for(var i=0;i<l;i++){
var ch=_7f.substr(i,1);
if((ch<"0"||ch>"9")&&ch!="-"&&ch!="."&&ch!=","){
break;
}
s=i;
}
if(s==-1){
throw Error.create("No digits");
}
var _84;
var _85;
if(s<(l-1)){
_84=_7f.substring(s+1).trim();
}else{
_84="px";
}
_85=parseFloat(_7f.substr(0,s+1));
if(_84=="px"){
_85=Math.floor(_85);
}
return {size:_85,type:_84};
},containsPoint:function(_86,x,y){
return x>=_86.x&&x<=(_86.x+_86.width)&&y>=_86.y&&y<=(_86.y+_86.height);
},isDescendant:function(_89,_8a){
for(var n=_8a.parentNode;n!=null;n=n.parentNode){
if(n==_89){
return true;
}
}
return false;
},isDescendantOrSelf:function(_8c,_8d){
if(_8c===_8d){
return true;
}
return $telerik.isDescendant(_8c,_8d);
},setOuterHeight:function(_8e,_8f){
if(_8f<=0||_8f==""){
_8e.style.height="";
}else{
_8e.style.height=_8f+"px";
var _90=_8e.offsetHeight-_8f;
var _91=_8f-_90;
if(_91>0){
_8e.style.height=_91+"px";
}else{
_8e.style.height="";
}
}
},setOpacity:function(_92,_93){
if(!_92){
throw Error.argumentNull("element");
}
try{
if(_92.filters){
var _94=_92.filters;
var _95=true;
if(_94.length!==0){
var _96=_94["DXImageTransform.Microsoft.Alpha"];
if(_96){
_95=false;
_96.opacity=_93*100;
}
}
if(_95){
_92.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+(_93*100)+")";
}
}else{
_92.style.opacity=_93;
}
}
catch(ex){
}
},getOpacity:function(_97){
if(!_97){
throw Error.argumentNull("element");
}
var _98=false;
var _99;
try{
if(_97.filters){
var _9a=_97.filters;
if(_9a.length!==0){
var _9b=_9a["DXImageTransform.Microsoft.Alpha"];
if(_9b){
_99=_9b.opacity/100;
_98=true;
}
}
}else{
_99=$telerik.getCurrentStyle(_97,"opacity",1);
_98=true;
}
}
catch(ex){
}
if(_98===false){
return 1;
}
return parseFloat(_99);
},addCssClasses:function(_9c,_9d){
for(var i=0;i<_9d.length;i++){
Sys.UI.DomElement.addCssClass(_9c,_9d[i]);
}
},removeCssClasses:function(_9f,_a0){
for(var i=0;i<_a0.length;i++){
Sys.UI.DomElement.removeCssClass(_9f,_a0[i]);
}
},setOuterWidth:function(_a2,_a3){
if(_a3<=0||_a3==""){
_a2.style.width="";
}else{
_a2.style.width=_a3+"px";
var _a4=_a2.offsetWidth-_a3;
var _a5=_a3-_a4;
if(_a5>0){
_a2.style.width=_a5+"px";
}else{
_a2.style.width="";
}
}
},getScrollOffset:function(_a6,_a7){
var _a8=0;
var top=0;
var _aa=_a6;
while(_aa!=null&&_aa.scrollLeft!=null){
_a8+=$telerik.getCorrectScrollLeft(_aa);
top+=_aa.scrollTop;
if(!_a7||(_aa==document.body&&(_aa.scrollLeft!=0||_aa.scrollTop!=0))){
break;
}
_aa=_aa.parentNode;
}
return {x:_a8,y:top};
},getElementByClassName:function(_ab,_ac,_ad){
var _ae=null;
if(_ad){
_ae=_ab.getElementsByTagName(_ad);
}else{
_ae=_ab.getElementsByTagName("*");
}
for(var i=0,_b0=_ae.length;i<_b0;i++){
var _b1=_ae[i];
if(Sys.UI.DomElement.containsCssClass(_b1,_ac)){
return _b1;
}
}
return null;
},addExternalHandler:function(_b2,_b3,_b4){
if(_b2.addEventListener){
_b2.addEventListener(_b3,_b4,false);
}else{
if(_b2.attachEvent){
_b2.attachEvent("on"+_b3,_b4);
}
}
},removeExternalHandler:function(_b5,_b6,_b7){
if(_b5.addEventListener){
_b5.removeEventListener(_b6,_b7,false);
}else{
if(_b5.detachEvent){
_b5.detachEvent("on"+_b6,_b7);
}
}
},cancelRawEvent:function(e){
if(!e){
return false;
}
if(e.preventDefault){
e.preventDefault();
}
if(e.stopPropagation){
e.stopPropagation();
}
e.cancelBubble=true;
e.returnValue=false;
return false;
},getOuterHtml:function(_b9){
if(_b9.outerHTML){
return _b9.outerHTML;
}else{
var _ba=_b9.cloneNode(true);
var _bb=_b9.ownerDocument.createElement("DIV");
_bb.appendChild(_ba);
return _bb.innerHTML;
}
},setVisible:function(e,_bd){
if(!e){
return;
}
if(_bd!=$telerik.getVisible(e)){
if(_bd){
if(e.style.removeAttribute){
e.style.removeAttribute("display");
}else{
e.style.removeProperty("display");
}
}else{
e.style.display="none";
}
e.style.visibility=_bd?"visible":"hidden";
}
},getVisible:function(e){
if(!e){
return false;
}
return (("none"!=$telerik.getCurrentStyle(e,"display"))&&("hidden"!=$telerik.getCurrentStyle(e,"visibility")));
},getViewPortSize:function(){
var _bf=0;
var _c0=0;
var _c1=document.body;
if(!$telerik.quirksMode&&!$telerik.isSafari){
_c1=document.documentElement;
}
if(window.innerWidth){
_bf=window.innerWidth;
_c0=window.innerHeight;
}else{
_bf=_c1.clientWidth;
_c0=_c1.clientHeight;
}
_bf+=_c1.scrollLeft;
_c0+=_c1.scrollTop;
return {width:_bf-6,height:_c0-6};
},elementOverflowsTop:function(_c2){
return $telerik.getLocation(_c2).y<0;
},elementOverflowsLeft:function(_c3){
return $telerik.getLocation(_c3).x<0;
},elementOverflowsBottom:function(_c4,_c5){
var _c6=$telerik.getLocation(_c5).y+_c5.offsetHeight;
return _c6>_c4.height;
},elementOverflowsRight:function(_c7,_c8){
var _c9=$telerik.getLocation(_c8).x+_c8.offsetWidth;
return _c9>_c7.width;
},getDocumentRelativeCursorPosition:function(e){
var _cb=document.documentElement.scrollLeft||document.body.scrollLeft;
var _cc=document.documentElement.scrollTop||document.body.scrollTop;
var _cd=e.clientX+_cb;
var top=e.clientY+_cc;
return {left:_cd,top:top};
},evalScriptCode:function(_cf){
var _d0=$telerik.isSafari;
if(_d0){
_cf=_cf.replace(/^\s*<!--((.|\n)*)-->\s*$/mi,"$1");
}
var _d1=document.createElement("script");
_d1.setAttribute("type","text/javascript");
if(_d0){
_d1.appendChild(document.createTextNode(_cf));
}else{
_d1.text=_cf;
}
var _d2=document.getElementsByTagName("head")[0];
_d2.appendChild(_d1);
if(_d0){
_d1.innerHTML="";
}else{
_d1.parentNode.removeChild(_d1);
}
},isScriptRegistered:function(src){
var _d4=document.getElementsByTagName("script");
var _d5=0;
for(var i=0,len=_d4.length;i<len;i++){
var _d8=_d4[i];
if(_d8.src&&_d8.getAttribute("src",2)==src){
_d5++;
}
}
return _d5;
},evalScripts:function(_d9){
var _da=_d9.getElementsByTagName("script");
for(var i=0,len=_da.length;i<len;i++){
var _dd=_da[i];
if(_dd.src){
var src=_dd.getAttribute("src",2);
if($telerik.isScriptRegistered(src)<2){
var _dd=document.createElement("script");
_dd.setAttribute("type","text/javascript");
_dd.setAttribute("src",src);
document.getElementsByTagName("head")[0].appendChild(_dd);
}
}else{
$telerik.evalScriptCode(_dd.innerHTML);
}
}
},getFirstChildByTagName:function(_df,_e0,_e1){
if(!_df||!_df.childNodes){
return null;
}
var _e2=_df.childNodes[_e1]||_df.firstChild;
while(_e2){
if(_e2.nodeType==1&&_e2.tagName.toLowerCase()==_e0){
return _e2;
}
_e2=_e2.nextSibling;
}
return null;
},getChildByClassName:function(_e3,_e4,_e5){
var _e6=_e3.childNodes[_e5]||_e3.firstChild;
while(_e6){
if(_e6.nodeType==1&&_e6.className.indexOf(_e4)>-1){
return _e6;
}
_e6=_e6.nextSibling;
}
return null;
},getChildrenByTagName:function(_e7,_e8){
var _e9=new Array();
var _ea=_e7.childNodes;
if($telerik.isIE){
_ea=_e7.children;
}
for(var i=0,_ec=_ea.length;i<_ec;i++){
var _ed=_ea[i];
if(_ed.nodeType==1&&_ed.tagName.toLowerCase()==_e8){
Array.add(_e9,_ed);
}
}
return _e9;
},getChildrenByClassName:function(_ee,_ef){
var _f0=new Array();
var _f1=_ee.childNodes;
if($telerik.isIE){
_f1=_ee.children;
}
for(var i=0,_f3=_f1.length;i<_f3;i++){
var _f4=_f1[i];
if(_f4.nodeType==1&&_f4.className.indexOf(_ef)>-1){
Array.add(_f0,_f4);
}
}
return _f0;
},isMouseOverElement:function(_f5,e){
var _f7=$telerik.getBounds(_f5);
var _f8=$telerik.getDocumentRelativeCursorPosition(e);
return $telerik.containsPoint(_f7,_f8.left,_f8.top);
},isMouseOverElementEx:function(_f9,e){
var _fb=null;
try{
_fb=$telerik.getOuterBounds(_f9);
}
catch(e){
return false;
}
if(e&&e.target){
var _fc=e.target.tagName;
if(_fc=="SELECT"||_fc=="OPTION"){
return true;
}
if(e.clientX<0||e.clientY<0){
return true;
}
}
var _fd=document.documentElement;
var _fe=document.body;
var x=e.clientX+($telerik.getCorrectScrollLeft(_fd)+$telerik.getCorrectScrollLeft(_fe));
var y=e.clientY+(_fd.scrollTop+_fe.scrollTop);
_fb.x+=2;
_fb.y+=2;
_fb.width-=4;
_fb.height-=4;
var _101=$telerik.containsPoint(_fb,x,y);
return _101;
}};
if(typeof (Sys.Browser.WebKit)=="undefined"){
Sys.Browser.WebKit={};
}
if(typeof (Sys.Browser.Chrome)=="undefined"){
Sys.Browser.Chrome={};
}
if(navigator.userAgent.indexOf("Chrome")>-1){
Sys.Browser.version=parseFloat(navigator.userAgent.match(/WebKit\/(\d+(\.\d+)?)/)[1]);
Sys.Browser.agent=Sys.Browser.Chrome;
Sys.Browser.name="Chrome";
}else{
if(navigator.userAgent.indexOf("WebKit/")>-1){
Sys.Browser.version=parseFloat(navigator.userAgent.match(/WebKit\/(\d+(\.\d+)?)/)[1]);
if(Sys.Browser.version<500){
Sys.Browser.agent=Sys.Browser.Safari;
Sys.Browser.name="Safari";
}else{
Sys.Browser.agent=Sys.Browser.WebKit;
Sys.Browser.name="WebKit";
}
}
}
$telerik.isChrome=Sys.Browser.agent==Sys.Browser.Chrome;
$telerik.isSafari3=Sys.Browser.agent==Sys.Browser.WebKit||Sys.Browser.agent==Sys.Browser.Chrome;
$telerik.isSafari2=Sys.Browser.agent==Sys.Browser.Safari;
$telerik.isSafari=$telerik.isSafari2||$telerik.isSafari3;
$telerik.isIE=Sys.Browser.agent==Sys.Browser.InternetExplorer;
$telerik.isIE6=$telerik.isIE&&Sys.Browser.version<7;
$telerik.isIE7=$telerik.isIE&&(Sys.Browser.version==7||(document.documentMode&&document.documentMode<8));
$telerik.isIE8=$telerik.isIE&&Sys.Browser.version==8&&document.documentMode&&document.documentMode==8;
$telerik.isOpera=Sys.Browser.agent==Sys.Browser.Opera;
$telerik.isFirefox=Sys.Browser.agent==Sys.Browser.Firefox;
$telerik.isFirefox2=$telerik.isFirefox&&Sys.Browser.version<3;
$telerik.isFirefox3=$telerik.isFirefox&&Sys.Browser.version==3;
$telerik.quirksMode=$telerik.isIE&&document.compatMode!="CSS1Compat";
$telerik.standardsMode=!$telerik.quirksMode;
try{
$telerik._borderThickness();
}
catch(err){
}
Telerik.Web.UI.Orientation=function(){
throw Error.invalidOperation();
};
Telerik.Web.UI.Orientation.prototype={Horizontal:0,Vertical:1};
Telerik.Web.UI.Orientation.registerEnum("Telerik.Web.UI.Orientation",false);
Telerik.Web.UI.RadWebControl=function(_102){
Telerik.Web.UI.RadWebControl.initializeBase(this,[_102]);
this._clientStateFieldID=null;
};
Telerik.Web.UI.RadWebControl.prototype={initialize:function(){
Telerik.Web.UI.RadWebControl.callBaseMethod(this,"initialize");
$telerik.registerControl(this);
if(!this.get_clientStateFieldID()){
return;
}
var _103=$get(this.get_clientStateFieldID());
if(!_103){
return;
}
_103.setAttribute("autocomplete","off");
},dispose:function(){
$telerik.unregisterControl(this);
var _104=this.get_element();
Telerik.Web.UI.RadWebControl.callBaseMethod(this,"dispose");
if(_104){
_104.control=null;
var _105=true;
if(_104._events){
for(var e in _104._events){
if(_104._events[e].length>0){
_105=false;
break;
}
}
if(_105){
_104._events=null;
}
}
}
},raiseEvent:function(_107,_108){
var _109=this.get_events().getHandler(_107);
if(_109){
if(!_108){
_108=Sys.EventArgs.Empty;
}
_109(this,_108);
}
},updateClientState:function(){
this.set_clientState(this.saveClientState());
},saveClientState:function(){
return null;
},get_clientStateFieldID:function(){
return this._clientStateFieldID;
},set_clientStateFieldID:function(_10a){
if(this._clientStateFieldID!=_10a){
this._clientStateFieldID=_10a;
this.raisePropertyChanged("ClientStateFieldID");
}
},get_clientState:function(){
if(this._clientStateFieldID){
var _10b=document.getElementById(this._clientStateFieldID);
if(_10b){
return _10b.value;
}
}
return null;
},set_clientState:function(_10c){
if(this._clientStateFieldID){
var _10d=document.getElementById(this._clientStateFieldID);
if(_10d){
_10d.value=_10c;
}
}
},_getChildElement:function(id){
return $get(this.get_id()+"_"+id);
},_findChildControl:function(id){
return $find(this.get_id()+"_"+id);
}};
Telerik.Web.UI.RadWebControl.registerClass("Telerik.Web.UI.RadWebControl",Sys.UI.Control);
Telerik.Web.Timer=function(){
Telerik.Web.Timer.initializeBase(this);
this._interval=1000;
this._enabled=false;
this._timer=null;
this._timerCallbackDelegate=Function.createDelegate(this,this._timerCallback);
};
Telerik.Web.Timer.prototype={get_interval:function(){
return this._interval;
},set_interval:function(_110){
if(this._interval!==_110){
this._interval=_110;
this.raisePropertyChanged("interval");
if(!this.get_isUpdating()&&(this._timer!==null)){
this._stopTimer();
this._startTimer();
}
}
},get_enabled:function(){
return this._enabled;
},set_enabled:function(_111){
if(_111!==this.get_enabled()){
this._enabled=_111;
this.raisePropertyChanged("enabled");
if(!this.get_isUpdating()){
if(_111){
this._startTimer();
}else{
this._stopTimer();
}
}
}
},add_tick:function(_112){
this.get_events().addHandler("tick",_112);
},remove_tick:function(_113){
this.get_events().removeHandler("tick",_113);
},dispose:function(){
this.set_enabled(false);
this._stopTimer();
Telerik.Web.Timer.callBaseMethod(this,"dispose");
},updated:function(){
Telerik.Web.Timer.callBaseMethod(this,"updated");
if(this._enabled){
this._stopTimer();
this._startTimer();
}
},_timerCallback:function(){
var _114=this.get_events().getHandler("tick");
if(_114){
_114(this,Sys.EventArgs.Empty);
}
},_startTimer:function(){
this._timer=window.setInterval(this._timerCallbackDelegate,this._interval);
},_stopTimer:function(){
window.clearInterval(this._timer);
this._timer=null;
}};
Telerik.Web.Timer.registerClass("Telerik.Web.Timer",Sys.Component);
Telerik.Web.BoxSide=function(){
};
Telerik.Web.BoxSide.prototype={Top:0,Right:1,Bottom:2,Left:3};
Telerik.Web.BoxSide.registerEnum("Telerik.Web.BoxSide",false);
if(Sys.CultureInfo.prototype._getAbbrMonthIndex){
try{
Sys.CultureInfo.prototype._getAbbrMonthIndex("");
}
catch(ex){
Sys.CultureInfo.prototype._getAbbrMonthIndex=function(_115){
if(!this._upperAbbrMonths){
this._upperAbbrMonths=this._toUpperArray(this.dateTimeFormat.AbbreviatedMonthNames);
}
return Array.indexOf(this._upperAbbrMonths,this._toUpper(_115));
};
Sys.CultureInfo.CurrentCulture._getAbbrMonthIndex=Sys.CultureInfo.prototype._getAbbrMonthIndex;
Sys.CultureInfo.InvariantCulture._getAbbrMonthIndex=Sys.CultureInfo.prototype._getAbbrMonthIndex;
}
}
Telerik.Web.UI.EditorCommandEventArgs=function(_116,tool,_118){
Telerik.Web.UI.EditorCommandEventArgs.initializeBase(this);
this._name=this._commandName=_116;
this._tool=tool;
this._value=_118;
this.value=_118;
this._callbackFunction=null;
};
Telerik.Web.UI.EditorCommandEventArgs.prototype={get_name:function(){
return this._name;
},get_commandName:function(){
return this._commandName;
},get_tool:function(){
return this._tool;
},get_value:function(){
return this._value;
},set_value:function(val){
this.value=val;
this._value=val;
},set_callbackFunction:function(val){
this._callbackFunction=val;
}};
Telerik.Web.UI.EditorCommandEventArgs.registerClass("Telerik.Web.UI.EditorCommandEventArgs",Sys.CancelEventArgs);
Telerik.Web.IParameterConsumer=function(){
};
Telerik.Web.IParameterConsumer.prototype={clientInit:function(_11b){
throw Error.notImplemented();
}};
Telerik.Web.IParameterConsumer.registerInterface("Telerik.Web.IParameterConsumer");
Type.registerNamespace("Telerik.Web.UI.Dialogs");
Telerik.Web.UI.Dialogs.CommonDialogScript=function(){
};
Telerik.Web.UI.Dialogs.CommonDialogScript.get_windowReference=function(){
if(window.radWindow){
return window.radWindow;
}
if(window.frameElement&&window.frameElement.radWindow){
return window.frameElement.radWindow;
}
if(!window.__localRadEditorRadWindowReference&&window.opener.__getCurrentRadEditorRadWindowReference){
window.__localRadEditorRadWindowReference=window.opener.__getCurrentRadEditorRadWindowReference();
}
return window.__localRadEditorRadWindowReference;
};
Telerik.Web.UI.Dialogs.CommonDialogScript.registerClass("Telerik.Web.UI.Dialogs.CommonDialogScript",null);
Telerik.Web.UI.WebServiceLoaderEventArgs=function(_11c){
Telerik.Web.UI.WebServiceLoaderEventArgs.initializeBase(this);
this._context=_11c;
};
Telerik.Web.UI.WebServiceLoaderEventArgs.prototype={get_context:function(){
return this._context;
}};
Telerik.Web.UI.WebServiceLoaderEventArgs.registerClass("Telerik.Web.UI.WebServiceLoaderEventArgs",Sys.EventArgs);
Telerik.Web.UI.WebServiceLoaderSuccessEventArgs=function(data,_11e){
Telerik.Web.UI.WebServiceLoaderSuccessEventArgs.initializeBase(this,[_11e]);
this._data=data;
};
Telerik.Web.UI.WebServiceLoaderSuccessEventArgs.prototype={get_data:function(){
return this._data;
}};
Telerik.Web.UI.WebServiceLoaderSuccessEventArgs.registerClass("Telerik.Web.UI.WebServiceLoaderSuccessEventArgs",Telerik.Web.UI.WebServiceLoaderEventArgs);
Telerik.Web.UI.WebServiceLoaderErrorEventArgs=function(_11f,_120){
Telerik.Web.UI.WebServiceLoaderErrorEventArgs.initializeBase(this,[_120]);
this._message=_11f;
};
Telerik.Web.UI.WebServiceLoaderErrorEventArgs.prototype={get_message:function(){
return this._message;
}};
Telerik.Web.UI.WebServiceLoaderErrorEventArgs.registerClass("Telerik.Web.UI.WebServiceLoaderErrorEventArgs",Telerik.Web.UI.WebServiceLoaderEventArgs);
Telerik.Web.UI.WebServiceLoader=function(_121){
this._webServiceSettings=_121;
this._events=null;
this._onWebServiceSuccessDelegate=Function.createDelegate(this,this._onWebServiceSuccess);
this._onWebServiceErrorDelegate=Function.createDelegate(this,this._onWebServiceError);
this._currentRequest=null;
};
Telerik.Web.UI.WebServiceLoader.prototype={get_webServiceSettings:function(){
return this._webServiceSettings;
},get_events:function(){
if(!this._events){
this._events=new Sys.EventHandlerList();
}
return this._events;
},loadData:function(_122,_123){
var _124=this.get_webServiceSettings();
this.invokeMethod(this._webServiceSettings.get_method(),_122,_123);
},invokeMethod:function(_125,_126,_127){
var _128=this.get_webServiceSettings();
if(_128.get_isEmpty()){
alert("Please, specify valid web service and method.");
return;
}
this._raiseEvent("loadingStarted",new Telerik.Web.UI.WebServiceLoaderEventArgs(_127));
var _129=_128.get_path();
var _12a=_128.get_useHttpGet();
this._currentRequest=Sys.Net.WebServiceProxy.invoke(_129,_125,_12a,_126,this._onWebServiceSuccessDelegate,this._onWebServiceErrorDelegate,_127);
},add_loadingStarted:function(_12b){
this.get_events().addHandler("loadingStarted",_12b);
},add_loadingError:function(_12c){
this.get_events().addHandler("loadingError",_12c);
},add_loadingSuccess:function(_12d){
this.get_events().addHandler("loadingSuccess",_12d);
},_serializeDictionaryAsKeyValuePairs:function(_12e){
var _12f=[];
for(var key in _12e){
_12f[_12f.length]={Key:key,Value:_12e[key]};
}
return _12f;
},_onWebServiceSuccess:function(data,_132){
var _133=new Telerik.Web.UI.WebServiceLoaderSuccessEventArgs(data,_132);
this._raiseEvent("loadingSuccess",_133);
},_onWebServiceError:function(_134,_135){
var _136=new Telerik.Web.UI.WebServiceLoaderErrorEventArgs(_134.get_message(),_135);
this._raiseEvent("loadingError",_136);
},_raiseEvent:function(_137,_138){
var _139=this.get_events().getHandler(_137);
if(_139){
if(!_138){
_138=Sys.EventArgs.Empty;
}
_139(this,_138);
}
}};
Telerik.Web.UI.WebServiceLoader.registerClass("Telerik.Web.UI.WebServiceLoader");
Telerik.Web.UI.WebServiceSettings=function(_13a){
this._path=null;
this._method=null;
this._useHttpGet=false;
if(!_13a){
_13a={};
}
if(typeof (_13a.path)!="undefined"){
this._path=_13a.path;
}
if(typeof (_13a.method)!="undefined"){
this._method=_13a.method;
}
if(typeof (_13a.useHttpGet)!="undefined"){
this._useHttpGet=_13a.useHttpGet;
}
};
Telerik.Web.UI.WebServiceSettings.prototype={get_isWcf:function(){
return /\.svc$/.test(this._path);
},get_path:function(){
return this._path;
},set_path:function(_13b){
this._path=_13b;
},get_method:function(){
return this._method;
},set_method:function(_13c){
this._method=_13c;
},get_useHttpGet:function(){
return this._useHttpGet;
},set_useHttpGet:function(_13d){
this._useHttpGet=_13d;
},get_isEmpty:function(){
var path=this.get_path();
var _13f=this.get_method();
return (!(path&&_13f));
}};
Telerik.Web.UI.WebServiceSettings.registerClass("Telerik.Web.UI.WebServiceSettings");
Telerik.Web.UI.AnimationType=function(){
};
Telerik.Web.UI.AnimationType.toEasing=function(_140){
return "ease"+Telerik.Web.UI.AnimationType.toString(_140);
};
Telerik.Web.UI.AnimationType.prototype={None:0,Linear:1,InQuad:2,OutQuad:3,InOutQuad:4,InCubic:5,OutCubic:6,InOutCubic:7,InQuart:8,OutQuart:9,InOutQuart:10,InQuint:11,OutQuint:12,InOutQuint:13,InSine:14,OutSine:15,InOutSine:16,InExpo:17,OutExpo:18,InOutExpo:19,InBack:20,OutBack:21,InOutBack:22,InBounce:23,OutBounce:24,InOutBounce:25,InElastic:26,OutElastic:27,InOutElastic:28};
Telerik.Web.UI.AnimationType.registerEnum("Telerik.Web.UI.AnimationType");
Telerik.Web.UI.AnimationSettings=function(_141){
this._type=Telerik.Web.UI.AnimationType.OutQuart;
this._duration=300;
if(typeof (_141.type)!="undefined"){
this._type=_141.type;
}
if(typeof (_141.duration)!="undefined"){
this._duration=_141.duration;
}
};
Telerik.Web.UI.AnimationSettings.prototype={get_type:function(){
return this._type;
},set_type:function(_142){
this._type=_142;
},get_duration:function(){
return this._duration;
},set_duration:function(_143){
this._duration=_143;
}};
Telerik.Web.UI.AnimationSettings.registerClass("Telerik.Web.UI.AnimationSettings");
Telerik.Web.UI.ActionsManager=function(_144){
Telerik.Web.UI.ActionsManager.initializeBase(this);
this._actions=[];
this._currentActionIndex=-1;
};
Telerik.Web.UI.ActionsManager.prototype={get_actions:function(){
return this._actions;
},shiftPointerLeft:function(){
this._currentActionIndex--;
},shiftPointerRight:function(){
this._currentActionIndex++;
},get_currentAction:function(){
return this.get_actions()[this._currentActionIndex];
},get_nextAction:function(){
return this.get_actions()[this._currentActionIndex+1];
},addAction:function(_145){
if(_145){
var args=new Telerik.Web.UI.ActionsManagerEventArgs(_145);
this.raiseEvent("executeAction",args);
this._clearActionsToRedo();
Array.add(this._actions,_145);
this._currentActionIndex=this._actions.length-1;
return true;
}
return false;
},undo:function(_147){
if(_147==null){
_147=1;
}
if(_147>this._actions.length){
_147=this._actions.length;
}
var _148=0;
var _149=null;
while(0<_147--&&0<=this._currentActionIndex&&this._currentActionIndex<this._actions.length){
_149=this._actions[this._currentActionIndex--];
if(_149){
var args=new Telerik.Web.UI.ActionsManagerEventArgs(_149);
this.raiseEvent("undoAction",args);
_148++;
}
}
},redo:function(_14b){
if(_14b==null){
_14b=1;
}
if(_14b>this._actions.length){
_14b=this._actions.length;
}
var _14c=0;
var _14d=null;
var _14e=this._currentActionIndex+1;
while(0<_14b--&&0<=_14e&&_14e<this._actions.length){
_14d=this._actions[_14e];
if(_14d){
var args=new Telerik.Web.UI.ActionsManagerEventArgs(_14d);
this.raiseEvent("redoAction",args);
this._currentActionIndex=_14e;
_14c++;
}
_14e++;
}
},removeActionAt:function(_150){
this._actions.splice(_150,1);
if(this._currentActionIndex>=_150){
this._currentActionIndex--;
}
},canUndo:function(){
return (-1<this._currentActionIndex);
},canRedo:function(){
return (this._currentActionIndex<this._actions.length-1);
},getActionsToUndo:function(){
if(this.canUndo()){
return (this._actions.slice(0,this._currentActionIndex+1)).reverse();
}
return [];
},getActionsToRedo:function(){
if(this.canRedo()){
return this._actions.slice(this._currentActionIndex+1);
}
return [];
},_clearActionsToRedo:function(){
if(this.canRedo()){
this._actions.splice(this._currentActionIndex+1,this._actions.length-this._currentActionIndex);
}
},add_undoAction:function(_151){
this.get_events().addHandler("undoAction",_151);
},remove_undoAction:function(_152){
this.get_events().removeHandler("undoAction",_152);
},add_redoAction:function(_153){
this.get_events().addHandler("redoAction",_153);
},remove_redoAction:function(_154){
this.get_events().removeHandler("redoAction",_154);
},add_executeAction:function(_155){
this.get_events().addHandler("executeAction",_155);
},remove_executeAction:function(_156){
this.get_events().removeHandler("executeAction",_156);
},raiseEvent:function(_157,args){
var _159=this.get_events().getHandler(_157);
if(_159){
_159(this,args);
}
}};
Telerik.Web.UI.ActionsManager.registerClass("Telerik.Web.UI.ActionsManager",Sys.Component);
Telerik.Web.UI.ActionsManagerEventArgs=function(_15a){
Telerik.Web.UI.ActionsManagerEventArgs.initializeBase(this);
this._action=_15a;
};
Telerik.Web.UI.ActionsManagerEventArgs.prototype={get_action:function(){
return this._action;
}};
Telerik.Web.UI.ActionsManagerEventArgs.registerClass("Telerik.Web.UI.ActionsManagerEventArgs",Sys.CancelEventArgs);
Telerik.Web.StringBuilder=function(){
this._buffer=[];
},Telerik.Web.StringBuilder.prototype={append:function(_15b){
this._buffer[this._buffer.length]=_15b;
return this;
},toString:function(){
return this._buffer.join("");
}};


/* END Telerik.Web.UI.Common.Core.js */
/* START Telerik.Web.UI.Common.jQuery.js */
/*
 * jQuery JavaScript Library v1.3.2
 * http://jquery.com/
 *
 * Copyright (c) 2009 John Resig
 * Dual licensed under the MIT and GPL licenses.
 * http://docs.jquery.com/License
 *
 * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
 * Revision: 6246
 */
(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F<J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||"").replace(/\r/g,"")}return g}if(typeof K==="number"){K+=""}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&&/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,K)>=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),this.length>1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H<I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&&L&&typeof L==="object"&&!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)==="[object Function]"},isArray:function(E){return s.call(E)==="[object Array]"},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&o.isXMLDoc(E.ownerDocument)},globalEval:function(G){if(G&&/\S/.test(G)){var F=document.getElementsByTagName("head")[0]||document.documentElement,E=document.createElement("script");E.type="text/javascript";if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H<I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H<I&&K.call(J,H,J)!==false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I==="number"&&G=="curCSS"&&!b.test(E)?I+"px":I},className:{add:function(E,F){o.each((F||"").split(/\s+/),function(G,H){if(E.nodeType==1&&!o.className.has(E.className,H)){E.className+=(E.className?" ":"")+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\s+/),function(G){return !o.className.has(F,G)}).join(" "):""}},has:function(F,E){return F&&o.inArray(E,(F.className||F).toString().split(/\s+/))>-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+"></"+T+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!O.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!O.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!O.indexOf("<td")||!O.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!O.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!o.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/<tbody/i.test(S),N=!O.indexOf("<table")&&!R?L.firstChild&&L.firstChild.childNodes:Q[1]=="<table>"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E<F;E++){if(H[E]===G){return E}}return -1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G<H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H<I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G<H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&&!/opera/.test(C),mozilla:/mozilla/.test(C)&&!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,"parentNode")},next:function(E){return o.nth(E,2,"nextSibling")},prev:function(E){return o.nth(E,2,"previousSibling")},nextAll:function(E){return o.dir(E,"nextSibling")},prevAll:function(E){return o.dir(E,"previousSibling")},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&&typeof G=="string"){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,F){o.fn[E]=function(G){var J=[],L=o(G);for(var K=0,H=L.length;K<H;K++){var I=(K>0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}});
/*
 * Sizzle CSS Selector Engine - v0.9.3
 *  Copyright 2009, The Dojo Foundation
 *  Released under the MIT, BSD, and GPL Licenses.
 *  More information: http://sizzlejs.com/
 */
(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa<ab.length;aa++){if(ab[aa]===ab[aa-1]){ab.splice(aa--,1)}}}}}return ab};F.matches=function(T,U){return F(T,null,null,U)};F.find=function(aa,T,ab){var Z,X;if(!aa){return[]}for(var W=0,V=I.order.length;W<V;W++){var Y=I.order[W],X;if((X=I.match[Y].exec(aa))){var U=RegExp.leftContext;if(U.substr(U.length-1)!=="\\"){X[1]=(X[1]||"").replace(/\\/g,"");Z=I.find[Y](X,T,ab);if(Z!=null){aa=aa.replace(I.match[Y],"");break}}}}if(!Z){Z=T.getElementsByTagName("*")}return{set:Z,expr:aa}};F.filter=function(ad,ac,ag,W){var V=ad,ai=[],aa=ac,Y,T,Z=ac&&ac[0]&&Q(ac[0]);while(ad&&ac.length){for(var ab in I.filter){if((Y=I.match[ab].exec(ad))!=null){var U=I.filter[ab],ah,af;T=false;if(aa==ai){ai=[]}if(I.preFilter[ab]){Y=I.preFilter[ab](Y,aa,ag,ai,W,Z);if(!Y){T=ah=true}else{if(Y===true){continue}}}if(Y){for(var X=0;(af=aa[X])!=null;X++){if(af){ah=U(af,Y,X,aa);var ae=W^!!ah;if(ag&&ah!=null){if(ae){T=true}else{aa[X]=false}}else{if(ae){ai.push(af);T=true}}}}}if(ah!==g){if(!ag){aa=ai}ad=ad.replace(I.match[ab],"");if(!T){return[]}break}}}if(ad==V){if(T==null){throw"Syntax error, unrecognized expression: "+ad}else{break}}V=ad}return aa};var I=F.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(T){return T.getAttribute("href")}},relative:{"+":function(aa,T,Z){var X=typeof T==="string",ab=X&&!/\W/.test(T),Y=X&&!ab;if(ab&&!Z){T=T.toUpperCase()}for(var W=0,V=aa.length,U;W<V;W++){if((U=aa[W])){while((U=U.previousSibling)&&U.nodeType!==1){}aa[W]=Y||U&&U.nodeName===T?U||false:U===T}}if(Y){F.filter(T,aa,true)}},">":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){var W=Y.parentNode;Z[V]=W.nodeName===U?W:false}}}else{for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){Z[V]=X?Y.parentNode:Y.parentNode===U}}if(X){F.filter(U,Z,true)}}},"":function(W,U,Y){var V=L++,T=S;if(!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("parentNode",U,V,W,X,Y)},"~":function(W,U,Y){var V=L++,T=S;if(typeof U==="string"&&!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("previousSibling",U,V,W,X,Y)}},find:{ID:function(U,V,W){if(typeof V.getElementById!=="undefined"&&!W){var T=V.getElementById(U[1]);return T?[T]:[]}},NAME:function(V,Y,Z){if(typeof Y.getElementsByName!=="undefined"){var U=[],X=Y.getElementsByName(V[1]);for(var W=0,T=X.length;W<T;W++){if(X[W].getAttribute("name")===V[1]){U.push(X[W])}}return U.length===0?null:U}},TAG:function(T,U){return U.getElementsByTagName(T[1])}},preFilter:{CLASS:function(W,U,V,T,Z,aa){W=" "+W[1].replace(/\\/g,"")+" ";if(aa){return W}for(var X=0,Y;(Y=U[X])!=null;X++){if(Y){if(Z^(Y.className&&(" "+Y.className+" ").indexOf(W)>=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return U<T[3]-0},gt:function(V,U,T){return U>T[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W<T;W++){if(Y[W]===Z){return false}}return true}}}},CHILD:function(T,W){var Z=W[1],U=T;switch(Z){case"only":case"first":while(U=U.previousSibling){if(U.nodeType===1){return false}}if(Z=="first"){return true}U=T;case"last":while(U=U.nextSibling){if(U.nodeType===1){return false}}return true;case"nth":var V=W[2],ac=W[3];if(V==1&&ac==0){return true}var Y=W[0],ab=T.parentNode;if(ab&&(ab.sizcache!==Y||!T.nodeIndex)){var X=0;for(U=ab.firstChild;U;U=U.nextSibling){if(U.nodeType===1){U.nodeIndex=++X}}ab.sizcache=Y}var aa=T.nodeIndex-ac;if(V==0){return aa==0}else{return(aa%V==0&&aa/V>=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V<T;V++){U.push(X[V])}}else{for(var V=0;X[V];V++){U.push(X[V])}}}return U}}var G;if(document.documentElement.compareDocumentPosition){G=function(U,T){var V=U.compareDocumentPosition(T)&4?-1:U===T?0:1;if(V===0){hasDuplicate=true}return V}}else{if("sourceIndex" in document.documentElement){G=function(U,T){var V=U.sourceIndex-T.sourceIndex;if(V===0){hasDuplicate=true}return V}}else{if(document.createRange){G=function(W,U){var V=W.ownerDocument.createRange(),T=U.ownerDocument.createRange();V.selectNode(W);V.collapse(true);T.selectNode(U);T.collapse(true);var X=V.compareBoundaryPoints(Range.START_TO_END,T);if(X===0){hasDuplicate=true}return X}}}}(function(){var U=document.createElement("form"),V="script"+(new Date).getTime();U.innerHTML="<input name='"+V+"'/>";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="<a href='#'></a>";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="<p class='TEST'></p>";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="<div class='test e'></div><div class='test'></div>";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1&&!ac){T.sizcache=Y;T.sizset=W}if(T.nodeName===Z){X=T;break}T=T[U]}ad[W]=X}}}function S(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1){if(!ac){T.sizcache=Y;T.sizset=W}if(typeof Z!=="string"){if(T===Z){X=true;break}}else{if(F.filter(Z,[T]).length>0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z<U;Z++){F(T,V[Z],W)}return F.filter(X,W)};o.find=F;o.filter=F.filter;o.expr=F.selectors;o.expr[":"]=o.expr.filters;F.selectors.filters.hidden=function(T){return T.offsetWidth===0||T.offsetHeight===0};F.selectors.filters.visible=function(T){return T.offsetWidth>0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F<E.length){o.event.proxy(G,E[F++])}return this.click(o.event.proxy(G,function(H){this.lastToggle=(this.lastToggle||0)%F;H.preventDefault();return E[this.lastToggle++].apply(this,arguments)||false}))},hover:function(E,F){return this.mouseenter(E).mouseleave(F)},ready:function(E){B();if(o.isReady){E.call(document,o)}else{o.readyList.push(E)}return this},live:function(G,F){var E=o.event.proxy(F);E.guid+=this.selector+G;o(document).bind(i(G,this.selector),this.selector,E);return this},die:function(F,E){o(document).unbind(i(F,this.selector),E?{guid:E.guid+this.selector+F}:null);return this}});function c(H){var E=RegExp("(^|\\.)"+H.type+"(\\.|$)"),G=true,F=[];o.each(o.data(this,"events").live||[],function(I,J){if(E.test(J.type)){var K=o(H.target).closest(J.data)[0];if(K){F.push({elem:K,fn:J})}}});F.sort(function(J,I){return o.data(J.elem,"closest")-o.data(I.elem,"closest")});o.each(F,function(){if(this.fn.call(this.elem,H,this.fn.data)===false){return(G=false)}});return G}function i(F,E){return["live",F,E.replace(/\./g,"`").replace(/ /g,"|")].join(".")}o.extend({isReady:false,readyList:[],ready:function(){if(!o.isReady){o.isReady=true;if(o.readyList){o.each(o.readyList,function(){this.call(document,o)});o.readyList=null}o(document).triggerHandler("ready")}}});var x=false;function B(){if(x){return}x=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);o.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);o.ready()}});if(document.documentElement.doScroll&&l==l.top){(function(){if(o.isReady){return}try{document.documentElement.doScroll("left")}catch(E){setTimeout(arguments.callee,0);return}o.ready()})()}}}o.event.add(l,"load",o.ready)}o.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(F,E){o.fn[E]=function(G){return G?this.bind(E,G):this.trigger(E)}});o(l).bind("unload",function(){for(var E in o.cache){if(E!=1&&o.cache[E].handle){o.event.remove(o.cache[E].handle.elem)}}});(function(){o.support={};var F=document.documentElement,G=document.createElement("script"),K=document.createElement("div"),J="script"+(new Date).getTime();K.style.display="none";K.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select>';var H=K.getElementsByTagName("*"),E=K.getElementsByTagName("a")[0];if(!H||!H.length||!E){return}o.support={leadingWhitespace:K.firstChild.nodeType==3,tbody:!K.getElementsByTagName("tbody").length,htmlSerialize:!!K.getElementsByTagName("link").length,style:/red/.test(E.getAttribute("style")),hrefNormalized:E.getAttribute("href")==="/a",opacity:E.style.opacity==="0.5",cssFloat:!!E.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};G.type="text/javascript";try{G.appendChild(document.createTextNode("window."+J+"=1;"))}catch(I){}F.insertBefore(G,F.firstChild);if(l[J]){o.support.scriptEval=true;delete l[J]}F.removeChild(G);if(K.attachEvent&&K.fireEvent){K.attachEvent("onclick",function(){o.support.noCloneEvent=false;K.detachEvent("onclick",arguments.callee)});K.cloneNode(true).fireEvent("onclick")}o(function(){var L=document.createElement("div");L.style.width=L.style.paddingLeft="1px";document.body.appendChild(L);o.boxModel=o.support.boxModel=L.offsetWidth===2;document.body.removeChild(L).style.display="none"})})();var w=o.support.cssFloat?"cssFloat":"styleFloat";o.props={"for":"htmlFor","class":"className","float":w,cssFloat:w,styleFloat:w,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};o.fn.extend({_load:o.fn.load,load:function(G,J,K){if(typeof G!=="string"){return this._load(G)}var I=G.indexOf(" ");if(I>=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("<div/>").append(M.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H<F;H++){var E=o.data(this[H],"olddisplay");this[H].style.display=E||"";if(o.css(this[H],"display")==="none"){var G=this[H].tagName,K;if(m[G]){K=m[G]}else{var I=o("<"+G+" />").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H<F;H++){this[H].style.display=o.data(this[H],"olddisplay")||""}return this}},hide:function(H,I){if(H){return this.animate(t("hide",3),H,I)}else{for(var G=0,F=this.length;G<F;G++){var E=o.data(this[G],"olddisplay");if(!E&&E!=="none"){o.data(this[G],"olddisplay",o.css(this[G],"display"))}}for(var G=0,F=this.length;G<F;G++){this[G].style.display="none"}return this}},_toggle:o.fn.toggle,toggle:function(G,F){var E=typeof G==="boolean";return o.isFunction(G)&&o.isFunction(F)?this._toggle.apply(this,arguments):G==null||E?this.each(function(){var H=E?G:o(this).is(":hidden");o(this)[H?"show":"hide"]()}):this.animate(t("toggle",3),G,F)},fadeTo:function(E,G,F){return this.animate({opacity:G},E,F)},animate:function(I,F,H,G){var E=o.speed(F,H,G);return this[E.queue===false?"each":"queue"](function(){var K=o.extend({},E),M,L=this.nodeType==1&&o(this).is(":hidden"),J=this;for(M in I){if(I[M]=="hide"&&L||I[M]=="show"&&!L){return K.complete.call(this)}if((M=="height"||M=="width")&&this.style){K.display=o.css(this,"display");K.overflow=this.style.overflow}}if(K.overflow!=null){this.style.overflow="hidden"}K.curAnim=o.extend({},I);o.each(I,function(O,S){var R=new o.fx(J,K,O);if(/toggle|show|hide/.test(S)){R[S=="toggle"?L?"show":"hide":S](I)}else{var Q=S.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),T=R.cur(true)||0;if(Q){var N=parseFloat(Q[2]),P=Q[3]||"px";if(P!="px"){J.style[O]=(N||1)+P;T=((N||1)/R.cur(true))*T;J.style[O]=T+P}if(Q[1]){N=((Q[1]=="-="?-1:1)*N)+T}R.custom(T,N,P)}else{R.custom(T,S,"")}}});return true})},stop:function(F,E){var G=o.timers;if(F){this.queue([])}this.each(function(){for(var H=G.length-1;H>=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J<K.length;J++){if(!K[J]()){K.splice(J--,1)}}if(!K.length){clearInterval(n);n=g}},13)}},show:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());o(this.elem).show()},hide:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(H){var G=e();if(H||G>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})();

// Move jQuery to $telerik
$telerik.$ = jQuery.noConflict(true);

/* END Telerik.Web.UI.Common.jQuery.js */
/* START Telerik.Web.UI.Common.jQueryPlugins.js */
if(typeof $telerik.$==="undefined"){
$telerik.$=jQuery;
}
(function(_1){
_1.easing["jswing"]=_1.easing["swing"];
_1.extend(_1.easing,{def:"easeOutQuad",swing:function(x,t,b,c,d){
return _1.easing[_1.easing.def](x,t,b,c,d);
},easeLinear:function(x,t,b,c,d){
return c*t/d+b;
},easeInQuad:function(x,t,b,c,d){
return c*(t/=d)*t+b;
},easeOutQuad:function(x,t,b,c,d){
return -c*(t/=d)*(t-2)+b;
},easeInOutQuad:function(x,t,b,c,d){
if((t/=d/2)<1){
return c/2*t*t+b;
}
return -c/2*((--t)*(t-2)-1)+b;
},easeInCubic:function(x,t,b,c,d){
return c*(t/=d)*t*t+b;
},easeOutCubic:function(x,t,b,c,d){
return c*((t=t/d-1)*t*t+1)+b;
},easeInOutCubic:function(x,t,b,c,d){
if((t/=d/2)<1){
return c/2*t*t*t+b;
}
return c/2*((t-=2)*t*t+2)+b;
},easeInQuart:function(x,t,b,c,d){
return c*(t/=d)*t*t*t+b;
},easeOutQuart:function(x,t,b,c,d){
return -c*((t=t/d-1)*t*t*t-1)+b;
},easeInOutQuart:function(x,t,b,c,d){
if((t/=d/2)<1){
return c/2*t*t*t*t+b;
}
return -c/2*((t-=2)*t*t*t-2)+b;
},easeInQuint:function(x,t,b,c,d){
return c*(t/=d)*t*t*t*t+b;
},easeOutQuint:function(x,t,b,c,d){
return c*((t=t/d-1)*t*t*t*t+1)+b;
},easeInOutQuint:function(x,t,b,c,d){
if((t/=d/2)<1){
return c/2*t*t*t*t*t+b;
}
return c/2*((t-=2)*t*t*t*t+2)+b;
},easeInSine:function(x,t,b,c,d){
return -c*Math.cos(t/d*(Math.PI/2))+c+b;
},easeOutSine:function(x,t,b,c,d){
return c*Math.sin(t/d*(Math.PI/2))+b;
},easeInOutSine:function(x,t,b,c,d){
return -c/2*(Math.cos(Math.PI*t/d)-1)+b;
},easeInExpo:function(x,t,b,c,d){
return (t==0)?b:c*Math.pow(2,10*(t/d-1))+b;
},easeOutExpo:function(x,t,b,c,d){
return (t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b;
},easeInOutExpo:function(x,t,b,c,d){
if(t==0){
return b;
}
if(t==d){
return b+c;
}
if((t/=d/2)<1){
return c/2*Math.pow(2,10*(t-1))+b;
}
return c/2*(-Math.pow(2,-10*--t)+2)+b;
},easeInCirc:function(x,t,b,c,d){
return -c*(Math.sqrt(1-(t/=d)*t)-1)+b;
},easeOutCirc:function(x,t,b,c,d){
return c*Math.sqrt(1-(t=t/d-1)*t)+b;
},easeInOutCirc:function(x,t,b,c,d){
if((t/=d/2)<1){
return -c/2*(Math.sqrt(1-t*t)-1)+b;
}
return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b;
},easeInElastic:function(x,t,b,c,d){
var s=1.70158;
var p=0;
var a=c;
if(t==0){
return b;
}
if((t/=d)==1){
return b+c;
}
if(!p){
p=d*0.3;
}
if(a<Math.abs(c)){
a=c;
var s=p/4;
}else{
var s=p/(2*Math.PI)*Math.asin(c/a);
}
return -(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;
},easeOutElastic:function(x,t,b,c,d){
var s=1.70158;
var p=0;
var a=c;
if(t==0){
return b;
}
if((t/=d)==1){
return b+c;
}
if(!p){
p=d*0.3;
}
if(a<Math.abs(c)){
a=c;
var s=p/4;
}else{
var s=p/(2*Math.PI)*Math.asin(c/a);
}
return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b;
},easeInOutElastic:function(x,t,b,c,d){
var s=1.70158;
var p=0;
var a=c;
if(t==0){
return b;
}
if((t/=d/2)==2){
return b+c;
}
if(!p){
p=d*(0.3*1.5);
}
if(a<Math.abs(c)){
a=c;
var s=p/4;
}else{
var s=p/(2*Math.PI)*Math.asin(c/a);
}
if(t<1){
return -0.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;
}
return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*0.5+c+b;
},easeInBack:function(x,t,b,c,d,s){
if(s==undefined){
s=1.70158;
}
return c*(t/=d)*t*((s+1)*t-s)+b;
},easeOutBack:function(x,t,b,c,d,s){
if(s==undefined){
s=1.70158;
}
return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;
},easeInOutBack:function(x,t,b,c,d,s){
if(s==undefined){
s=1.70158;
}
if((t/=d/2)<1){
return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;
}
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;
},easeInBounce:function(x,t,b,c,d){
return c-_1.easing.easeOutBounce(x,d-t,0,c,d)+b;
},easeOutBounce:function(x,t,b,c,d){
if((t/=d)<(1/2.75)){
return c*(7.5625*t*t)+b;
}else{
if(t<(2/2.75)){
return c*(7.5625*(t-=(1.5/2.75))*t+0.75)+b;
}else{
if(t<(2.5/2.75)){
return c*(7.5625*(t-=(2.25/2.75))*t+0.9375)+b;
}else{
return c*(7.5625*(t-=(2.625/2.75))*t+0.984375)+b;
}
}
}
},easeInOutBounce:function(x,t,b,c,d){
if(t<d/2){
return _1.easing.easeInBounce(x,t*2,0,c,d)*0.5+b;
}
return _1.easing.easeOutBounce(x,t*2-d,0,c,d)*0.5+c*0.5+b;
}});
})($telerik.$);
(function(_ae){
_ae.fx.step.height=function(fx){
var _b0=$telerik.quirksMode?1:0;
var _b1=fx.now>_b0?fx.now:_b0;
fx.elem.style[fx.prop]=Math.round(_b1)+fx.unit;
};
})($telerik.$);


/* END Telerik.Web.UI.Common.jQueryPlugins.js */
/* START Telerik.Web.UI.Common.Navigation.NavigationScripts.js */
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.AttributeCollection=function(_1){
this._owner=_1;
this._data={};
this._keys=[];
};
Telerik.Web.UI.AttributeCollection.prototype={getAttribute:function(_2){
return this._data[_2];
},setAttribute:function(_3,_4){
this._add(_3,_4);
var _5={};
_5[_3]=_4;
this._owner._notifyPropertyChanged("attributes",_5);
},_add:function(_6,_7){
if(Array.indexOf(this._keys,_6)<0){
Array.add(this._keys,_6);
}
this._data[_6]=_7;
},removeAttribute:function(_8){
Array.remove(this._keys,_8);
delete this._data[_8];
},_load:function(_9,_a){
if(_a){
for(var i=0,l=_9.length;i<l;i++){
this._add(_9[i].Key,_9[i].Value);
}
}else{
for(var _d in _9){
this._add(_d,_9[_d]);
}
}
},get_count:function(){
return this._keys.length;
}};
Telerik.Web.UI.AttributeCollection.registerClass("Telerik.Web.UI.AttributeCollection");
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.JavaScriptSerializer={_stringRegEx:new RegExp("[\"\b\f\n\r\t\\\\\x00-\x1f]","i"),serialize:function(_e){
var _f=new Telerik.Web.StringBuilder();
Telerik.Web.JavaScriptSerializer._serializeWithBuilder(_e,_f);
return _f.toString();
},_serializeWithBuilder:function(_10,_11){
var i;
switch(typeof _10){
case "object":
if(_10){
if(_10.constructor==Array){
_11.append("[");
for(i=0;i<_10.length;++i){
if(i>0){
_11.append(",");
}
this._serializeWithBuilder(_10[i],_11);
}
_11.append("]");
}else{
if(_10.constructor==Date){
_11.append("\"\\/Date(");
_11.append(_10.getTime());
_11.append(")\\/\"");
break;
}
var _13=[];
var _14=0;
for(var _15 in _10){
if(_15.startsWith("$")){
continue;
}
_13[_14++]=_15;
}
_11.append("{");
var _16=false;
for(i=0;i<_14;i++){
var _17=_10[_13[i]];
if(typeof _17!=="undefined"&&typeof _17!=="function"){
if(_16){
_11.append(",");
}else{
_16=true;
}
this._serializeWithBuilder(_13[i],_11);
_11.append(":");
this._serializeWithBuilder(_17,_11);
}
}
_11.append("}");
}
}else{
_11.append("null");
}
break;
case "number":
if(isFinite(_10)){
_11.append(String(_10));
}else{
throw Error.invalidOperation(Sys.Res.cannotSerializeNonFiniteNumbers);
}
break;
case "string":
_11.append("\"");
if(Sys.Browser.agent===Sys.Browser.Safari||Telerik.Web.JavaScriptSerializer._stringRegEx.test(_10)){
var _18=_10.length;
for(i=0;i<_18;++i){
var _19=_10.charAt(i);
if(_19>=" "){
if(_19==="\\"||_19==="\""){
_11.append("\\");
}
_11.append(_19);
}else{
switch(_19){
case "\b":
_11.append("\\b");
break;
case "\f":
_11.append("\\f");
break;
case "\n":
_11.append("\\n");
break;
case "\r":
_11.append("\\r");
break;
case "\t":
_11.append("\\t");
break;
default:
_11.append("\\u00");
if(_19.charCodeAt()<16){
_11.append("0");
}
_11.append(_19.charCodeAt().toString(16));
}
}
}
}else{
_11.append(_10);
}
_11.append("\"");
break;
case "boolean":
_11.append(_10.toString());
break;
default:
_11.append("null");
break;
}
}};
Telerik.Web.UI.ChangeLog=function(){
this._opCodeInsert=1;
this._opCodeDelete=2;
this._opCodeClear=3;
this._opCodePropertyChanged=4;
this._logEntries=null;
};
Telerik.Web.UI.ChangeLog.prototype={initialize:function(){
this._logEntries=[];
this._serializedEntries=null;
},logInsert:function(_1a){
var _1b={};
_1b.Type=this._opCodeInsert;
_1b.Index=_1a._getHierarchicalIndex();
_1b.Data=_1a._getData();
Array.add(this._logEntries,_1b);
},logDelete:function(_1c){
var _1d={};
_1d.Type=this._opCodeDelete;
_1d.Index=_1c._getHierarchicalIndex();
Array.add(this._logEntries,_1d);
},logClear:function(_1e){
var _1f={};
_1f.Type=this._opCodeClear;
if(_1e._getHierarchicalIndex){
_1f.Index=_1e._getHierarchicalIndex();
}
Array.add(this._logEntries,_1f);
},logPropertyChanged:function(_20,_21,_22){
var _23={};
_23.Type=this._opCodePropertyChanged;
_23.Index=_20._getHierarchicalIndex();
_23.Data={};
_23.Data[_21]=_22;
Array.add(this._logEntries,_23);
},serialize:function(){
if(this._logEntries.length==0){
if(this._serializedEntries==null){
return "[]";
}
return this._serializedEntries;
}
var _24=Telerik.Web.JavaScriptSerializer.serialize(this._logEntries);
if(this._serializedEntries==null){
this._serializedEntries=_24;
}else{
this._serializedEntries=this._serializedEntries.substring(0,this._serializedEntries.length-1)+","+_24.substring(1);
}
this._logEntries=[];
return this._serializedEntries;
}};
Telerik.Web.UI.ChangeLog.registerClass("Telerik.Web.UI.ChangeLog");
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.PropertyBag=function(_25){
this._data={};
this._owner=_25;
};
Telerik.Web.UI.PropertyBag.prototype={getValue:function(_26,_27){
var _28=this._data[_26];
if(typeof (_28)==="undefined"){
return _27;
}
return _28;
},setValue:function(_29,_2a,_2b){
this._data[_29]=_2a;
if(_2b){
this._owner._notifyPropertyChanged(_29,_2a);
}
},load:function(_2c){
this._data=_2c;
}};
Telerik.Web.UI.ControlItem=function(){
this._element=null;
this._parent=null;
this._text=null;
this._children=null;
this._childControlsCreated=false;
this._itemData=null;
this._control=null;
this._properties=new Telerik.Web.UI.PropertyBag(this);
};
Telerik.Web.UI.ControlItem.prototype={_shouldNavigate:function(){
var _2d=this.get_navigateUrl();
if(!_2d){
return false;
}
return !_2d.endsWith("#");
},_getNavigateUrl:function(){
if(this.get_linkElement()){
return this._properties.getValue("navigateUrl",this.get_linkElement().getAttribute("href",2));
}
return this._properties.getValue("navigateUrl",null);
},_initialize:function(_2e,_2f){
this.set_element(_2f);
this._properties.load(_2e);
if(_2e["attributes"]){
this.get_attributes()._load(_2e["attributes"]);
}
this._itemData=_2e["items"];
},_dispose:function(){
if(this._children){
this._children.forEach(function(_30){
_30._dispose();
});
}
if(this._element){
this._element._item=null;
this._element=null;
}
if(this._control){
this._control=null;
}
},_initializeRenderedItem:function(){
var _31=this._children;
if(!_31||_31.get_count()<1){
return;
}
var _32=this._getChildElements();
for(var i=0,_34=_31.get_count();i<_34;i++){
var _35=_31.getItem(i);
if(!_35.get_element()){
_35.set_element(_32[i]);
if(this._shouldInitializeChild(_35)){
_35._initializeRenderedItem();
}
}
}
},findControl:function(id){
return $telerik.findControl(this.get_element(),id);
},get_attributes:function(){
if(!this._attributes){
this._attributes=new Telerik.Web.UI.AttributeCollection(this);
}
return this._attributes;
},get_element:function(){
return this._element;
},set_element:function(_37){
this._element=_37;
this._element._item=this;
this._element._itemTypeName=Object.getTypeName(this);
},get_parent:function(){
return this._parent;
},set_parent:function(_38){
this._parent=_38;
},get_text:function(){
if(this._text!==null){
return this._text;
}
if(this._text=this._properties.getValue("text","")){
return this._text;
}
if(!this.get_element()){
return "";
}
var _39=this.get_textElement();
if(!_39){
return "";
}
if(typeof (_39.innerText)!="undefined"){
this._text=_39.innerText;
}else{
this._text=_39.textContent;
}
if($telerik.isSafari2){
this._text=_39.innerHTML;
}
return this._text;
},set_text:function(_3a){
var _3b=this.get_textElement();
if(_3b){
_3b.innerHTML=_3a;
}
this._text=_3a;
this._properties.setValue("text",_3a,true);
},get_value:function(){
return this._properties.getValue("value",null);
},set_value:function(_3c){
this._properties.setValue("value",_3c,true);
},get_itemData:function(){
return this._itemData;
},get_index:function(){
if(!this.get_parent()){
return -1;
}
return this.get_parent()._getChildren().indexOf(this);
},set_enabled:function(_3d){
this._properties.setValue("enabled",_3d,true);
},get_enabled:function(){
return this._properties.getValue("enabled",true)==true;
},get_isEnabled:function(){
var _3e=this._getControl();
if(_3e){
return _3e.get_enabled()&&this.get_enabled();
}
return this.get_enabled();
},set_visible:function(_3f){
this._properties.setValue("visible",_3f);
},get_visible:function(){
return this._properties.getValue("visible",true);
},get_level:function(){
var _40=this.get_parent();
var _41=0;
while(_40){
if(Telerik.Web.UI.ControlItemContainer.isInstanceOfType(_40)){
return _41;
}
_41++;
_40=_40.get_parent();
}
return _41;
},get_isLast:function(){
return this.get_index()==this.get_parent()._getChildren().get_count()-1;
},get_isFirst:function(){
return this.get_index()==0;
},get_nextSibling:function(){
if(!this.get_parent()){
return null;
}
return this.get_parent()._getChildren().getItem(this.get_index()+1);
},get_previousSibling:function(){
if(!this.get_parent()){
return null;
}
return this.get_parent()._getChildren().getItem(this.get_index()-1);
},toJsonString:function(){
return Sys.Serialization.JavaScriptSerializer.serialize(this._getData());
},_getHierarchicalIndex:function(){
var _42=[];
var _43=this._getControl();
var _44=this;
while(_44!=_43){
_42[_42.length]=_44.get_index();
_44=_44.get_parent();
}
return _42.reverse().join(":");
},_getChildren:function(){
this._ensureChildControls();
return this._children;
},_ensureChildControls:function(){
if(!this._childControlsCreated){
this._createChildControls();
this._childControlsCreated=true;
}
},_setCssClass:function(_45,_46){
if(_45.className!=_46){
_45.className=_46;
}
},_createChildControls:function(){
this._children=this._createItemCollection();
},_createItemCollection:function(){
},_getControl:function(){
if(!this._control){
var _47=this.get_parent();
if(_47){
if(Telerik.Web.UI.ControlItemContainer.isInstanceOfType(_47)){
this._control=_47;
}else{
this._control=_47._getControl();
}
}
}
return this._control;
},_getAllItems:function(){
var _48=[];
this._getAllItemsRecursive(_48,this);
return _48;
},_getAllItemsRecursive:function(_49,_4a){
var _4b=_4a._getChildren();
for(var i=0;i<_4b.get_count();i++){
var _4d=_4b.getItem(i);
Array.add(_49,_4d);
this._getAllItemsRecursive(_49,_4d);
}
},_getData:function(){
var _4e=this._properties._data;
delete _4e.items;
_4e["text"]=this.get_text();
if(this.get_attributes().get_count()>0){
_4e["attributes"]=this.get_attributes()._data;
}
return _4e;
},_notifyPropertyChanged:function(_4f,_50){
var _51=this._getControl();
if(_51){
_51._itemPropertyChanged(this,_4f,_50);
}
},_loadFromDictionary:function(_52,wcf){
if(typeof (_52.Text)!="undefined"){
this.set_text(_52.Text);
}
if(typeof (_52.Value)!="undefined"&&_52.Value!==""){
this.set_value(_52.Value);
}
if(typeof (_52.Enabled)!="undefined"&&_52.Enabled!==true){
this.set_enabled(_52.Enabled);
}
if(_52.Attributes){
this.get_attributes()._load(_52.Attributes,wcf);
}
},_createDomElement:function(){
var _54=document.createElement("ul");
var _55=[];
this._render(_55);
_54.innerHTML=_55.join("");
return _54.firstChild;
}};
Telerik.Web.UI.ControlItem.registerClass("Telerik.Web.UI.ControlItem");
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.ControlItemCollection=function(_56){
this._array=new Array();
this._parent=_56;
this._control=null;
};
Telerik.Web.UI.ControlItemCollection.prototype={add:function(_57){
var _58=this._array.length;
this.insert(_58,_57);
},insert:function(_59,_5a){
var _5b=_5a.get_parent();
var _5c=this._parent._getControl();
if(_5b){
_5b._getChildren().remove(_5a);
}
if(_5c){
_5c._childInserting(_59,_5a,this._parent);
}
Array.insert(this._array,_59,_5a);
_5a.set_parent(this._parent);
if(_5c){
_5c._childInserted(_59,_5a,this._parent);
_5c._logInserted(_5a);
}
},remove:function(_5d){
var _5e=this._parent._getControl();
if(_5e){
_5e._childRemoving(_5d);
}
Array.remove(this._array,_5d);
if(_5e){
_5e._childRemoved(_5d,this._parent);
}
_5d.set_parent(null);
_5d._control=null;
},removeAt:function(_5f){
var _60=this.getItem(_5f);
if(_60){
this.remove(_60);
}
},clear:function(){
var _61=this._parent._getControl();
if(_61){
_61._logClearing(this._parent);
_61._childrenCleared(this._parent);
}
this._array=new Array();
},get_count:function(){
return this._array.length;
},getItem:function(_62){
return this._array[_62];
},indexOf:function(_63){
for(var i=0,l=this._array.length;i<l;i++){
if(this._array[i]===_63){
return i;
}
}
return -1;
},forEach:function(_66){
for(var i=0,_68=this.get_count();i<_68;i++){
_66(this._array[i]);
}
}};
Telerik.Web.UI.ControlItemCollection.registerClass("Telerik.Web.UI.ControlItemCollection");
function WebForm_CallbackComplete(){
for(var i=0;i<__pendingCallbacks.length;i++){
var _6a=__pendingCallbacks[i];
if(_6a&&_6a.xmlRequest&&(_6a.xmlRequest.readyState==4)){
__pendingCallbacks[i]=null;
WebForm_ExecuteCallback(_6a);
if(!_6a.async){
__synchronousCallBackIndex=-1;
}
var _6b="__CALLBACKFRAME"+i;
var _6c=document.getElementById(_6b);
if(_6c){
_6c.parentNode.removeChild(_6c);
}
}
}
}
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.ControlItemContainer=function(_6d){
Telerik.Web.UI.ControlItemContainer.initializeBase(this,[_6d]);
this._childControlsCreated=false;
this._enabled=true;
this._log=new Telerik.Web.UI.ChangeLog();
this._enableClientStatePersistence=false;
this._eventMap=new Telerik.Web.UI.EventMap();
this._attributes=new Telerik.Web.UI.AttributeCollection(this);
this._children=null;
};
Telerik.Web.UI.ControlItemContainer.prototype={initialize:function(){
Telerik.Web.UI.ControlItemContainer.callBaseMethod(this,"initialize");
this._ensureChildControls();
this._log.initialize();
this._initializeEventMap();
},dispose:function(){
this._eventMap.dispose();
if(this._childControlsCreated){
for(var i=0;i<this._getChildren().get_count();i++){
this._getChildren().getItem(i)._dispose();
}
}
Telerik.Web.UI.ControlItemContainer.callBaseMethod(this,"dispose");
},trackChanges:function(){
this._enableClientStatePersistence=true;
},set_enabled:function(_6f){
this._enabled=_6f;
},get_enabled:function(){
return this._enabled;
},commitChanges:function(){
this.updateClientState();
this._enableClientStatePersistence=false;
},get_attributes:function(){
return this._attributes;
},set_attributes:function(_70){
this._attributes._load(_70);
},_initializeEventMap:function(){
this._eventMap.initialize(this);
},_getChildren:function(){
this._ensureChildControls();
return this._children;
},_extractErrorMessage:function(_71){
if(_71.get_message){
return _71.get_message();
}else{
return _71.replace(/(\d*\|.*)/,"");
}
},_notifyPropertyChanged:function(_72,_73){
},_childInserting:function(_74,_75,_76){
},_childInserted:function(_77,_78,_79){
if(!_79._childControlsCreated){
return;
}
if(!_79.get_element()){
return;
}
var _7a=_78._createDomElement();
var _7b=_79.get_childListElement();
if(!_7b){
_7b=_79._createChildListElement();
}
var _7c=_78.get_nextSibling();
var _7d=_7c?_7c.get_element():null;
_79.get_childListElement().insertBefore(_7a,_7d);
if(!_78.get_element()){
_78.set_element(_7a);
_78._initializeRenderedItem();
}else{
_78.set_element(_7a);
}
},_childrenCleared:function(_7e){
for(var i=0;i<_7e._getChildren().get_count();i++){
_7e._getChildren().getItem(i)._dispose();
}
var _80=_7e.get_childListElement();
if(_80){
_80.innerHTML="";
}
},_childRemoving:function(_81){
this._logRemoving(_81);
},_childRemoved:function(_82,_83){
_82._dispose();
},_createChildListElement:function(){
throw Error.notImplemented();
},_createDomElement:function(){
throw Error.notImplemented();
},_getControl:function(){
return this;
},_logInserted:function(_84){
if(!_84.get_parent()._childControlsCreated||!this._enableClientStatePersistence){
return;
}
this._log.logInsert(_84);
var _85=_84._getAllItems();
for(var i=0;i<_85.length;i++){
this._log.logInsert(_85[i]);
}
},_logRemoving:function(_87){
if(this._enableClientStatePersistence){
this._log.logDelete(_87);
}
},_logClearing:function(_88){
if(this._enableClientStatePersistence){
this._log.logClear(_88);
}
},_itemPropertyChanged:function(_89,_8a,_8b){
if(this._enableClientStatePersistence){
this._log.logPropertyChanged(_89,_8a,_8b);
}
},_ensureChildControls:function(){
if(!this._childControlsCreated){
this._createChildControls();
this._childControlsCreated=true;
}
},_extractItemFromDomElement:function(_8c){
this._ensureChildControls();
while(_8c&&_8c.nodeType!==9){
if(_8c._item&&this._verifyChildType(_8c._itemTypeName)){
return _8c._item;
}
_8c=_8c.parentNode;
}
return null;
},_verifyChildType:function(_8d){
return _8d===this._childTypeName;
},_getAllItems:function(){
var _8e=[];
for(var i=0;i<this._getChildren().get_count();i++){
var _90=this._getChildren().getItem(i);
Array.add(_8e,_90);
Array.addRange(_8e,_90._getAllItems());
}
return _8e;
},_findItemByText:function(_91){
var _92=this._getAllItems();
for(var i=0;i<_92.length;i++){
if(_92[i].get_text()==_91){
return _92[i];
}
}
return null;
},_findItemByValue:function(_94){
var _95=this._getAllItems();
for(var i=0;i<_95.length;i++){
if(_95[i].get_value()==_94){
return _95[i];
}
}
return null;
},_findItemByAttribute:function(_97,_98){
var _99=this._getAllItems();
for(var i=0;i<_99.length;i++){
if(_99[i].get_attributes().getAttribute(_97)==_98){
return _99[i];
}
}
return null;
},_findItemByAbsoluteUrl:function(_9b){
var _9c=this._getAllItems();
for(var i=0;i<_9c.length;i++){
if(_9c[i].get_linkElement()&&_9c[i].get_linkElement().href==_9b){
return _9c[i];
}
}
return null;
},_findItemByUrl:function(_9e){
var _9f=this._getAllItems();
for(var i=0;i<_9f.length;i++){
if(_9f[i].get_navigateUrl()==_9e){
return _9f[i];
}
}
return null;
},_findItemByHierarchicalIndex:function(_a1){
var _a2=null;
var _a3=this;
var _a4=_a1.split(":");
for(var i=0;i<_a4.length;i++){
var _a6=parseInt(_a4[i]);
if(_a3._getChildren().get_count()<=_a6){
return null;
}
_a2=_a3._getChildren().getItem(_a6);
_a3=_a2;
}
return _a2;
}};
Telerik.Web.UI.ControlItemContainer.registerClass("Telerik.Web.UI.ControlItemContainer",Telerik.Web.UI.RadWebControl);
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.EventMap=function(){
this._owner=null;
this._element=null;
this._eventMap={};
this._onDomEventDelegate=null;
this._browserHandlers={};
};
Telerik.Web.UI.EventMap.prototype={initialize:function(_a7,_a8){
this._owner=_a7;
if(!_a8){
_a8=this._owner.get_element();
}
this._element=_a8;
},skipElement:function(e,_aa){
var _ab=e.target;
var _ac=_ab.tagName.toLowerCase();
var _ad=_ab.className;
if(_ac=="select"){
return true;
}
if(_ac=="option"){
return true;
}
if(_ac=="a"&&(!_aa||_ad.indexOf(_aa)<0)){
return true;
}
if(_ac=="input"){
return true;
}
if(_ac=="textarea"){
return true;
}
if(_ac=="button"){
return true;
}
return false;
},dispose:function(){
if(this._onDomEventDelegate){
for(var _ae in this._eventMap){
if(this._shouldUseEventCapture(_ae)){
var _af=this._browserHandlers[_ae];
this._element.removeEventListener(_ae,_af,true);
}else{
$removeHandler(this._element,_ae,this._onDomEventDelegate);
}
}
this._onDomEventDelegate=null;
var _b0=true;
if(this._element._events){
for(var e in this._element._events){
if(this._element._events[e].length>0){
_b0=false;
break;
}
}
if(_b0){
this._element._events=null;
}
}
}
},addHandlerForClassName:function(_b2,_b3,_b4){
if(typeof (this._eventMap[_b2])=="undefined"){
this._eventMap[_b2]={};
if(this._shouldUseEventCapture(_b2)){
var _b5=this._getDomEventDelegate();
var _b6=this._element;
var _b7=function(e){
return _b5.call(_b6,new Sys.UI.DomEvent(e));
};
this._browserHandlers[_b2]=_b7;
_b6.addEventListener(_b2,_b7,true);
}else{
$addHandler(this._element,_b2,this._getDomEventDelegate());
}
}
var _b9=this._eventMap[_b2];
_b9[_b3]=_b4;
},_onDomEvent:function(e){
var _bb=this._eventMap[e.type];
if(!_bb){
return;
}
var _bc=e.target;
while(_bc&&_bc.nodeType!==9){
var _bd=_bc.className;
if(!_bd){
_bc=_bc.parentNode;
continue;
}
var _be=_bd.split(" ");
var _bf=null;
for(var i=0;i<_be.length;i++){
_bf=_bb[_be[i]];
if(_bf){
break;
}
}
if(_bf){
this._fillEventFields(e,_bc);
if(_bf.call(this._owner,e)!=true){
if(!_bc.parentNode){
e.stopPropagation();
}
return;
}
}
if(_bc==this._element){
return;
}
_bc=_bc.parentNode;
}
},_fillEventFields:function(e,_c2){
e.eventMapTarget=_c2;
if(e.rawEvent.relatedTarget){
e.eventMapRelatedTarget=e.rawEvent.relatedTarget;
}else{
if(e.type=="mouseover"){
e.eventMapRelatedTarget=e.rawEvent.fromElement;
}else{
e.eventMapRelatedTarget=e.rawEvent.toElement;
}
}
if(!e.eventMapRelatedTarget){
return;
}
try{
var _c3=e.eventMapRelatedTarget.className;
}
catch(ex){
e.eventMapRelatedTarget=this._element;
}
},_shouldUseEventCapture:function(_c4){
return (_c4=="blur"||_c4=="focus")&&$telerik.isFirefox&&Sys.Browser.version>=3;
},_getDomEventDelegate:function(){
if(!this._onDomEventDelegate){
this._onDomEventDelegate=Function.createDelegate(this,this._onDomEvent);
}
return this._onDomEventDelegate;
}};
Telerik.Web.UI.EventMap.registerClass("Telerik.Web.UI.EventMap");
(function($){
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.jSlideDirection=function(){
};
Telerik.Web.UI.jSlideDirection.prototype={Up:1,Down:2,Left:3,Right:4};
Telerik.Web.UI.jSlideDirection.registerEnum("Telerik.Web.UI.jSlideDirection");
Telerik.Web.UI.jSlide=function(_c6,_c7,_c8,_c9){
this._animatedElement=_c6;
this._element=_c6.parentNode;
this._expandAnimation=_c7;
this._collapseAnimation=_c8;
this._direction=Telerik.Web.UI.jSlideDirection.Down;
this._expanding=null;
if(_c9==null){
this._enableOverlay=true;
}else{
this._enableOverlay=_c9;
}
this._events=null;
this._overlay=null;
this._animationEndedDelegate=null;
};
Telerik.Web.UI.jSlide.prototype={initialize:function(){
if(Telerik.Web.UI.Overlay.IsSupported()&&this._enableOverlay){
var _ca=this.get_animatedElement();
this._overlay=new Telerik.Web.UI.Overlay(_ca);
this._overlay.initialize();
}
this._animationEndedDelegate=Function.createDelegate(this,this._animationEnded);
},dispose:function(){
this._animatedElement=null;
this._events=null;
if(this._overlay){
this._overlay.dispose();
this._overlay=null;
}
this._animationEndedDelegate=null;
},get_element:function(){
return this._element;
},get_animatedElement:function(){
return this._animatedElement;
},set_animatedElement:function(_cb){
this._animatedElement=_cb;
if(this._overlay){
this._overlay.set_targetElement(this._animatedElement);
}
},get_direction:function(){
return this._direction;
},set_direction:function(_cc){
this._direction=_cc;
},get_events:function(){
if(!this._events){
this._events=new Sys.EventHandlerList();
}
return this._events;
},updateSize:function(){
var _cd=this.get_animatedElement();
var _ce=this.get_element();
var top=0;
if(_cd.style.top){
top=Math.max(parseInt(_cd.style.top),0);
}
var _d0=0;
if(_cd.style.left){
_d0=Math.max(parseInt(_cd.style.left),0);
}
var _d1=_cd.offsetHeight+top;
if(_ce.style.height!=_d1+"px"){
_ce.style.height=Math.max(_d1,0)+"px";
}
var _d2=_cd.offsetWidth+_d0;
if(_ce.style.width!=_d2+"px"){
_ce.style.width=Math.max(_d2,0)+"px";
}
if(this._overlay){
this._updateOverlay();
}
},show:function(){
this._showElement();
},expand:function(){
this._expanding=true;
this.get_animatedElement().style.visibility="hidden";
this._resetState(true);
var _d3=null;
var _d4=null;
switch(this.get_direction()){
case Telerik.Web.UI.jSlideDirection.Up:
case Telerik.Web.UI.jSlideDirection.Left:
_d3=parseInt(this._getSize());
_d4=0;
break;
case Telerik.Web.UI.jSlideDirection.Down:
case Telerik.Web.UI.jSlideDirection.Right:
_d3=parseInt(this._getPosition());
_d4=0;
break;
}
this._expandAnimationStarted();
if((_d3==_d4)||(this._expandAnimation.get_type()==Telerik.Web.UI.AnimationType.None)){
this._setPosition(_d4);
this._animationEnded();
this.get_animatedElement().style.visibility="visible";
}else{
this._playAnimation(this._expandAnimation,_d4);
}
},collapse:function(){
this._resetState();
this._expanding=false;
var _d5=null;
var _d6=null;
var _d7=parseInt(this._getSize());
var _d8=parseInt(this._getPosition());
switch(this.get_direction()){
case Telerik.Web.UI.jSlideDirection.Up:
case Telerik.Web.UI.jSlideDirection.Left:
_d5=0;
_d6=_d7;
break;
case Telerik.Web.UI.jSlideDirection.Down:
case Telerik.Web.UI.jSlideDirection.Right:
_d5=0;
_d6=_d8-_d7;
break;
}
this._collapseAnimationStarted();
if((_d5==_d6)||(this._collapseAnimation.get_type()==Telerik.Web.UI.AnimationType.None)){
this._setPosition(_d6);
this._animationEnded();
}else{
this._playAnimation(this._collapseAnimation,_d6);
}
},add_collapseAnimationStarted:function(_d9){
this.get_events().addHandler("collapseAnimationStarted",_d9);
},remove_collapseAnimationStarted:function(_da){
this.get_events().removeHandler("collapseAnimationStarted",_da);
},add_collapseAnimationEnded:function(_db){
this.get_events().addHandler("collapseAnimationEnded",_db);
},remove_collapseAnimationEnded:function(_dc){
this.get_events().removeHandler("collapseAnimationEnded",_dc);
},add_expandAnimationStarted:function(_dd){
this.get_events().addHandler("expandAnimationStarted",_dd);
},remove_expandAnimationStarted:function(_de){
this.get_events().removeHandler("expandAnimationStarted",_de);
},add_expandAnimationEnded:function(_df){
this.get_events().addHandler("expandAnimationEnded",_df);
},remove_expandAnimationEnded:function(_e0){
this.get_events().removeHandler("expandAnimationEnded",_e0);
},_playAnimation:function(_e1,_e2){
this.get_animatedElement().style.visibility="visible";
var _e3=this._getAnimationQuery();
var _e4=this._getAnimatedStyleProperty();
var _e5={};
_e5[_e4]=_e2;
var _e6=_e1.get_duration();
_e3.animate(_e5,_e6,Telerik.Web.UI.AnimationType.toEasing(_e1.get_type()),this._animationEndedDelegate);
},_expandAnimationStarted:function(){
this._raiseEvent("expandAnimationStarted",Sys.EventArgs.Empty);
},_collapseAnimationStarted:function(){
this._raiseEvent("collapseAnimationStarted",Sys.EventArgs.Empty);
},_animationEnded:function(){
if(this._expanding){
this.get_element().style.overflow="visible";
this._raiseEvent("expandAnimationEnded",Sys.EventArgs.Empty);
}else{
this.get_element().style.display="none";
this._raiseEvent("collapseAnimationEnded",Sys.EventArgs.Empty);
}
if(this._overlay){
this._updateOverlay();
}
},_updateOverlay:function(){
this._overlay.updatePosition();
},_showElement:function(){
var _e7=this.get_animatedElement();
var _e8=this.get_element();
if(!_e8){
return;
}
if(!_e8.style){
return;
}
_e8.style.display=(_e8.tagName.toUpperCase()!="TABLE")?"block":"";
_e7.style.display=(_e7.tagName.toUpperCase()!="TABLE")?"block":"";
_e8.style.overflow="hidden";
},_resetState:function(_e9){
this._stopAnimation();
this._showElement();
var _ea=this.get_animatedElement();
if(_e9){
var _ea=this.get_animatedElement();
switch(this.get_direction()){
case Telerik.Web.UI.jSlideDirection.Up:
_ea.style.top=_ea.offsetHeight+"px";
break;
case Telerik.Web.UI.jSlideDirection.Down:
_ea.style.top=-_ea.offsetHeight+"px";
break;
case Telerik.Web.UI.jSlideDirection.Left:
_ea.style.left=_ea.offsetWidth+"px";
break;
case Telerik.Web.UI.jSlideDirection.Right:
_ea.style.left=-_ea.offsetWidth+"px";
break;
default:
Error.argumentOutOfRange("direction",this.get_direction(),"Slide direction is invalid. Use one of the values in the Telerik.Web.UI.SlideDirection enumeration.");
break;
}
}
},_stopAnimation:function(){
this._getAnimationQuery().stop(false,true);
},_getAnimationQuery:function(){
var _eb=[this.get_animatedElement()];
if(this._enableOverlay&&this._overlay){
_eb[_eb.length]=this._overlay.get_element();
}
return $(_eb);
},_getSize:function(){
var _ec=this.get_animatedElement();
switch(this.get_direction()){
case Telerik.Web.UI.jSlideDirection.Up:
case Telerik.Web.UI.jSlideDirection.Down:
return _ec.offsetHeight;
break;
case Telerik.Web.UI.jSlideDirection.Left:
case Telerik.Web.UI.jSlideDirection.Right:
return _ec.offsetWidth;
break;
default:
return 0;
}
},_setPosition:function(_ed){
var _ee=this.get_animatedElement();
var _ef=this._getAnimatedStyleProperty();
_ee.style[_ef]=_ed;
},_getPosition:function(){
var _f0=this.get_animatedElement();
var _f1=this._getAnimatedStyleProperty();
return _f0.style[_f1];
},_getAnimatedStyleProperty:function(){
switch(this.get_direction()){
case Telerik.Web.UI.jSlideDirection.Up:
case Telerik.Web.UI.jSlideDirection.Down:
return "top";
case Telerik.Web.UI.jSlideDirection.Left:
case Telerik.Web.UI.jSlideDirection.Right:
return "left";
}
},_raiseEvent:function(_f2,_f3){
var _f4=this.get_events().getHandler(_f2);
if(_f4){
if(!_f3){
_f3=Sys.EventArgs.Empty;
}
_f4(this,_f3);
}
}};
Telerik.Web.UI.jSlide.registerClass("Telerik.Web.UI.jSlide",null,Sys.IDisposable);
})($telerik.$);
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.Overlay=function(_f5){
this._targetElement=_f5;
this._element=null;
};
Telerik.Web.UI.Overlay.IsSupported=function(){
return $telerik.isIE;
};
Telerik.Web.UI.Overlay.prototype={initialize:function(){
var _f6=document.createElement("div");
_f6.innerHTML="<iframe>Your browser does not support inline frames or is currently configured not to display inline frames.</iframe>";
this._element=_f6.firstChild;
this._element.src="javascript:'';";
this._targetElement.parentNode.insertBefore(this._element,this._targetElement);
if(this._targetElement.style.zIndex>0){
this._element.style.zIndex=this._targetElement.style.zIndex-1;
}
this._element.style.position="absolute";
this._element.style.border="0px";
this._element.frameBorder=0;
this._element.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)";
this._element.tabIndex=-1;
if(!$telerik.isSafari){
_f6.outerHTML=null;
}
this.updatePosition();
},dispose:function(){
if(this._element.parentNode){
this._element.parentNode.removeChild(this._element);
}
this._targetElement=null;
this._element=null;
},get_targetElement:function(){
return this._targetElement;
},set_targetElement:function(_f7){
this._targetElement=_f7;
},get_element:function(){
return this._element;
},updatePosition:function(){
this._element.style.top=this._toUnit(this._targetElement.style.top);
this._element.style.left=this._toUnit(this._targetElement.style.left);
this._element.style.width=this._targetElement.offsetWidth+"px";
this._element.style.height=this._targetElement.offsetHeight+"px";
},_toUnit:function(_f8){
if(!_f8){
return "0px";
}
return parseInt(_f8)+"px";
}};
Telerik.Web.UI.Overlay.registerClass("Telerik.Web.UI.Overlay",null,Sys.IDisposable);
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.SlideDirection=function(){
};
Telerik.Web.UI.SlideDirection.prototype={Up:1,Down:2,Left:3,Right:4};
Telerik.Web.UI.SlideDirection.registerEnum("Telerik.Web.UI.SlideDirection");
Telerik.Web.UI.Slide=function(_f9,_fa,_fb,_fc){
this._fps=60;
this._animatedElement=_f9;
this._element=_f9.parentNode;
this._expandAnimation=_fa;
this._collapseAnimation=_fb;
this._direction=Telerik.Web.UI.SlideDirection.Down;
this._animation=null;
this._expanding=null;
if(_fc==null){
this._enableOverlay=true;
}else{
this._enableOverlay=_fc;
}
this._events=null;
this._overlay=null;
this._animationEndedDelegate=null;
this._expandAnimationStartedDelegate=null;
this._updateOverlayDelegate=null;
};
Telerik.Web.UI.Slide.prototype={initialize:function(){
if(Telerik.Web.UI.Overlay.IsSupported()&&this._enableOverlay){
var _fd=this.get_animatedElement();
this._overlay=new Telerik.Web.UI.Overlay(_fd);
this._overlay.initialize();
}
this._animationEndedDelegate=Function.createDelegate(this,this._animationEnded);
this._expandAnimationStartedDelegate=Function.createDelegate(this,this._expandAnimationStarted);
this._updateOverlayDelegate=Function.createDelegate(this,this._updateOverlay);
},dispose:function(){
this._animatedElement=null;
this._events=null;
this._disposeAnimation();
if(this._overlay){
this._overlay.dispose();
this._overlay=null;
}
this._animationEndedDelegate=null;
this._expandAnimationStartedDelegate=null;
this._updateOverlayDelegate=null;
},get_element:function(){
return this._element;
},get_animatedElement:function(){
return this._animatedElement;
},set_animatedElement:function(_fe){
this._animatedElement=_fe;
if(this._overlay){
this._overlay.set_targetElement(this._animatedElement);
}
},get_direction:function(){
return this._direction;
},set_direction:function(_ff){
this._direction=_ff;
},get_events:function(){
if(!this._events){
this._events=new Sys.EventHandlerList();
}
return this._events;
},updateSize:function(){
var _100=this.get_animatedElement();
var _101=this.get_element();
var top=0;
if(_100.style.top){
top=Math.max(parseInt(_100.style.top),0);
}
var left=0;
if(_100.style.left){
left=Math.max(parseInt(_100.style.left),0);
}
var _104=_100.offsetHeight+top;
if(_101.style.height!=_104+"px"){
_101.style.height=Math.max(_104,0)+"px";
}
var _105=_100.offsetWidth+left;
if(_101.style.width!=_105+"px"){
_101.style.width=Math.max(_105,0)+"px";
}
if(this._overlay){
this._updateOverlay();
}
},show:function(){
this._showElement();
},expand:function(){
this._expanding=true;
this.get_animatedElement().style.visibility="hidden";
this._resetState(true);
var _106=null;
var _107=null;
switch(this.get_direction()){
case Telerik.Web.UI.SlideDirection.Up:
case Telerik.Web.UI.SlideDirection.Left:
_106=parseInt(this._getSize());
_107=0;
break;
case Telerik.Web.UI.SlideDirection.Down:
case Telerik.Web.UI.SlideDirection.Right:
_106=parseInt(this._getPosition());
_107=0;
break;
}
if(this._animation){
this._animation.stop();
}
if((_106==_107)||(this._expandAnimation.get_type()==Telerik.Web.UI.AnimationType.None)){
this._expandAnimationStarted();
this._setPosition(_107);
this._animationEnded();
this.get_animatedElement().style.visibility="visible";
}else{
this._playAnimation(this._expandAnimation,_106,_107);
}
},collapse:function(){
this._resetState();
this._expanding=false;
var _108=null;
var _109=null;
var size=parseInt(this._getSize());
var _10b=parseInt(this._getPosition());
switch(this.get_direction()){
case Telerik.Web.UI.SlideDirection.Up:
case Telerik.Web.UI.SlideDirection.Left:
_108=0;
_109=size;
break;
case Telerik.Web.UI.SlideDirection.Down:
case Telerik.Web.UI.SlideDirection.Right:
_108=0;
_109=_10b-size;
break;
}
if(this._animation){
this._animation.stop();
}
if((_108==_109)||(this._collapseAnimation.get_type()==Telerik.Web.UI.AnimationType.None)){
this._setPosition(_109);
this._animationEnded();
}else{
this._playAnimation(this._collapseAnimation,_108,_109);
}
},add_collapseAnimationEnded:function(_10c){
this.get_events().addHandler("collapseAnimationEnded",_10c);
},remove_collapseAnimationEnded:function(_10d){
this.get_events().removeHandler("collapseAnimationEnded",_10d);
},add_expandAnimationEnded:function(_10e){
this.get_events().addHandler("expandAnimationEnded",_10e);
},remove_expandAnimationEnded:function(_10f){
this.get_events().removeHandler("expandAnimationEnded",_10f);
},add_expandAnimationStarted:function(_110){
this.get_events().addHandler("expandAnimationStarted",_110);
},remove_expandAnimationStarted:function(_111){
this.get_events().removeHandler("expandAnimationStarted",_111);
},_playAnimation:function(_112,_113,_114){
var _115=_112.get_duration();
var _116=this._getAnimatedStyleProperty();
var _117=Telerik.Web.UI.AnimationFunctions.CalculateAnimationPoints(_112,_113,_114,this._fps);
var _118=this.get_animatedElement();
_118.style.visibility="visible";
if(this._animation){
this._animation.set_target(_118);
this._animation.set_duration(_115/1000);
this._animation.set_propertyKey(_116);
this._animation.set_values(_117);
}else{
this._animation=new $TWA.DiscreteAnimation(_118,_115/1000,this._fps,"style",_116,_117);
this._animation.add_started(this._expandAnimationStartedDelegate);
this._animation.add_ended(this._animationEndedDelegate);
if(this._overlay){
this._animation.add_onTick(this._updateOverlayDelegate);
}
}
this._animation.play();
},_animationEnded:function(){
if(this._expanding){
this.get_element().style.overflow="visible";
this._raiseEvent("expandAnimationEnded",Sys.EventArgs.Empty);
}else{
this.get_element().style.display="none";
this._raiseEvent("collapseAnimationEnded",Sys.EventArgs.Empty);
}
if(this._overlay){
this._updateOverlay();
}
},_expandAnimationStarted:function(){
this._raiseEvent("expandAnimationStarted",Sys.EventArgs.Empty);
},_updateOverlay:function(){
this._overlay.updatePosition();
},_showElement:function(){
var _119=this.get_animatedElement();
var _11a=this.get_element();
if(!_11a){
return;
}
if(!_11a.style){
return;
}
_11a.style.display=(_11a.tagName.toUpperCase()!="TABLE")?"block":"";
_119.style.display=(_119.tagName.toUpperCase()!="TABLE")?"block":"";
_11a.style.overflow="hidden";
},_resetState:function(_11b){
this._stopAnimation();
this._showElement();
if(_11b){
var _11c=this.get_animatedElement();
switch(this.get_direction()){
case Telerik.Web.UI.SlideDirection.Up:
_11c.style.top="0px";
break;
case Telerik.Web.UI.SlideDirection.Down:
_11c.style.top=-_11c.offsetHeight+"px";
break;
case Telerik.Web.UI.SlideDirection.Left:
_11c.style.left=_11c.offsetWidth+"px";
break;
case Telerik.Web.UI.SlideDirection.Right:
_11c.style.left=-_11c.offsetWidth+"px";
break;
default:
Error.argumentOutOfRange("direction",this.get_direction(),"Slide direction is invalid. Use one of the values in the Telerik.Web.UI.SlideDirection enumeration.");
break;
}
}
},_getSize:function(){
var _11d=this.get_animatedElement();
switch(this.get_direction()){
case Telerik.Web.UI.SlideDirection.Up:
case Telerik.Web.UI.SlideDirection.Down:
return _11d.offsetHeight;
break;
case Telerik.Web.UI.SlideDirection.Left:
case Telerik.Web.UI.SlideDirection.Right:
return _11d.offsetWidth;
break;
default:
return 0;
}
},_setPosition:function(_11e){
var _11f=this.get_animatedElement();
var _120=this._getAnimatedStyleProperty();
_11f.style[_120]=_11e;
},_getPosition:function(){
var _121=this.get_animatedElement();
var _122=this._getAnimatedStyleProperty();
return _121.style[_122];
},_getAnimatedStyleProperty:function(){
switch(this.get_direction()){
case Telerik.Web.UI.SlideDirection.Up:
case Telerik.Web.UI.SlideDirection.Down:
return "top";
case Telerik.Web.UI.SlideDirection.Left:
case Telerik.Web.UI.SlideDirection.Right:
return "left";
}
},_stopAnimation:function(){
if(this._animation){
this._animation.stop();
}
},_disposeAnimation:function(){
if(this._animation){
this._animation.dispose();
this._animation=null;
}
},_raiseEvent:function(_123,_124){
var _125=this.get_events().getHandler(_123);
if(_125){
if(!_124){
_124=Sys.EventArgs.Empty;
}
_125(this,_124);
}
}};
Telerik.Web.UI.Slide.registerClass("Telerik.Web.UI.Slide",null,Sys.IDisposable);


/* END Telerik.Web.UI.Common.Navigation.NavigationScripts.js */
/* START Telerik.Web.UI.ComboBox.RadComboBoxScripts.js */
Telerik.Web.UI.RadComboBoxEventArgs=function(e){
Telerik.Web.UI.RadComboBoxEventArgs.initializeBase(this);
this._domEvent=e;
};
Telerik.Web.UI.RadComboBoxEventArgs.prototype={get_domEvent:function(){
return this._domEvent;
}};
Telerik.Web.UI.RadComboBoxEventArgs.registerClass("Telerik.Web.UI.RadComboBoxEventArgs",Sys.EventArgs);
Telerik.Web.UI.RadComboBoxCancelEventArgs=function(e){
Telerik.Web.UI.RadComboBoxCancelEventArgs.initializeBase(this);
this._domEvent=e;
};
Telerik.Web.UI.RadComboBoxCancelEventArgs.prototype={get_domEvent:function(){
return this._domEvent;
}};
Telerik.Web.UI.RadComboBoxCancelEventArgs.registerClass("Telerik.Web.UI.RadComboBoxCancelEventArgs",Sys.CancelEventArgs);
Telerik.Web.UI.RadComboBoxItemEventArgs=function(_3,e){
Telerik.Web.UI.RadComboBoxItemEventArgs.initializeBase(this);
this._item=_3;
this._domEvent=e;
};
Telerik.Web.UI.RadComboBoxItemEventArgs.prototype={get_item:function(){
return this._item;
},get_domEvent:function(){
return this._domEvent;
}};
Telerik.Web.UI.RadComboBoxItemEventArgs.registerClass("Telerik.Web.UI.RadComboBoxItemEventArgs",Sys.EventArgs);
Telerik.Web.UI.RadComboBoxItemCancelEventArgs=function(_5,e){
Telerik.Web.UI.RadComboBoxItemCancelEventArgs.initializeBase(this);
this._item=_5;
this._domEvent=e;
};
Telerik.Web.UI.RadComboBoxItemCancelEventArgs.prototype={get_item:function(){
return this._item;
},get_domEvent:function(){
return this._domEvent;
}};
Telerik.Web.UI.RadComboBoxItemCancelEventArgs.registerClass("Telerik.Web.UI.RadComboBoxItemCancelEventArgs",Sys.CancelEventArgs);
Telerik.Web.UI.RadComboBoxRequestEventArgs=function(_7,e){
Telerik.Web.UI.RadComboBoxRequestEventArgs.initializeBase(this);
this._text=_7;
this._domEvent=e;
};
Telerik.Web.UI.RadComboBoxRequestEventArgs.prototype={get_text:function(){
return this._text;
},get_domEvent:function(){
return this._domEvent;
}};
Telerik.Web.UI.RadComboBoxRequestEventArgs.registerClass("Telerik.Web.UI.RadComboBoxRequestEventArgs",Sys.EventArgs);
Telerik.Web.UI.RadComboBoxRequestCancelEventArgs=function(_9,_a,e){
Telerik.Web.UI.RadComboBoxRequestCancelEventArgs.initializeBase(this);
this._text=_9;
this._context=_a;
this._domEvent=e;
};
Telerik.Web.UI.RadComboBoxRequestCancelEventArgs.prototype={get_text:function(){
return this._text;
},get_context:function(){
return this._context;
},get_domEvent:function(){
return this._domEvent;
}};
Telerik.Web.UI.RadComboBoxRequestCancelEventArgs.registerClass("Telerik.Web.UI.RadComboBoxRequestCancelEventArgs",Sys.CancelEventArgs);
Telerik.Web.UI.RadComboBoxItemsRequestFailedEventArgs=function(_c,_d,e){
Telerik.Web.UI.RadComboBoxItemsRequestFailedEventArgs.initializeBase(this);
this._text=_c;
this._errorMessage=_d;
this._domEvent=e;
};
Telerik.Web.UI.RadComboBoxItemsRequestFailedEventArgs.prototype={get_text:function(){
return this._text;
},get_errorMessage:function(){
return this._errorMessage;
},get_domEvent:function(){
return this._domEvent;
}};
Telerik.Web.UI.RadComboBoxItemsRequestFailedEventArgs.registerClass("Telerik.Web.UI.RadComboBoxItemsRequestFailedEventArgs",Telerik.Web.UI.RadComboBoxCancelEventArgs);
Telerik.Web.UI.RadComboBoxItemDataBoundEventArgs=function(_f,_10){
Telerik.Web.UI.RadComboBoxItemDataBoundEventArgs.initializeBase(this,[_f]);
this._dataItem=_10;
};
Telerik.Web.UI.RadComboBoxItemDataBoundEventArgs.prototype={get_dataItem:function(){
return this._dataItem;
}};
Telerik.Web.UI.RadComboBoxItemDataBoundEventArgs.registerClass("Telerik.Web.UI.RadComboBoxItemDataBoundEventArgs",Telerik.Web.UI.RadComboBoxItemEventArgs);
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.Keys=function(){
};
Telerik.Web.UI.Keys.prototype={Shift:16,Escape:27,Up:38,Down:40,Left:37,Right:39,Enter:13,Tab:9,Space:32,PageUp:33,Del:46,F1:112,F12:123};
Telerik.Web.UI.Keys.registerEnum("Telerik.Web.UI.Keys");
Telerik.Web.UI.RadComboBoxFilter=function(){
};
Telerik.Web.UI.RadComboBoxFilter.prototype={None:0,Contains:1,StartsWith:2};
Telerik.Web.UI.RadComboBoxFilter.registerEnum("Telerik.Web.UI.RadComboBoxFilter");
Telerik.Web.UI.RadComboBox=function(_11){
Telerik.Web.UI.RadComboBox.initializeBase(this,[_11]);
this._callbacktext="";
this._changeText=true;
this._children=null;
this._virtualScroll=true;
this._itemData=null;
this._selectedItem=null;
this._selectedIndex=null;
this._highlightedItem=null;
this._dropDownVisible=false;
this._enableLoadOnDemand=false;
this._enableTextSelection=true;
this._setSelectedItem=false;
this._enableItemCaching=false;
this._openDropDownOnLoad=false;
this._appendItems=false;
this._allowCustomText=false;
this._markFirstMatch=false;
this._filter=0;
this._originalText=this.get_inputDomElement().value;
this._cachedText=this._originalText;
this._cachedOffsetHeight="";
this._text="";
this._value=null;
this._isCaseSensitive=false;
this._autoCompleteSeparator=null;
this._postBackReference=null;
this._dropDownElement=null;
this._inputDomElement=null;
this._imageDomElement=null;
this._tableElement=null;
this._itemRequestTimeout=300;
this._isTemplated=false;
this._requestTimeoutID=0;
this._highlightTemplatedItems=false;
this._clientState={value:"",text:"",enabled:true,logEntries:[]};
this._uniqueId=null;
this._rightToLeft=false;
this._isDetached=false;
this._offsetX=0;
this._offsetY=0;
this._overlay=null;
this._enableScreenBoundaryDetection=true;
this._suppressChange=false;
this._lastKeyCode=null;
this._loadingDiv=null;
this._loadingMessage="Loading...";
this._showMoreResultsBox=false;
this._closeDropDownOnBlur=true;
this._focused=false;
this._causesValidation=true;
this.get_inputDomElement().setAttribute("autocomplete","off");
this._errorMessage="CallBack Error!";
this._showMoreMessage="";
this._webServiceSettings=new Telerik.Web.UI.WebServiceSettings({});
this._webServiceLoader=null;
this._clientDataString=null;
this._enabled=true;
this._fireEvents=this._enabled;
this._slide=null;
this._expandAnimation=new Telerik.Web.UI.AnimationSettings({});
this._expandDelay=100;
this._collapseAnimation=new Telerik.Web.UI.AnimationSettings({});
this._collapseDelay=500;
this._slideDirection=Telerik.Web.UI.jSlideDirection.Down;
this._animationEndedDelegate=null;
this._animationStartedDelegate=null;
this._showDropDownOnTextboxClick=true;
this._dropDownWidth="";
this._height="";
this._maxHeight="";
this._childListElementWrapper=null;
this._skin="";
this._skipLoadingItems=false;
this._ajaxRequest=false;
this._pendingAjaxRequestsCount=0;
this._endOfItems=false;
this._emptyMessage=null;
this._disposed=false;
this._disposeChildElements=true;
this._firstOpeningOfDropDown=true;
this.lodHashTable={};
};
Telerik.Web.UI.RadComboBox._getScrollBarWidth=function(){
if(Telerik.Web.UI.RadComboBox._scrollbarWidth){
return Telerik.Web.UI.RadComboBox._scrollbarWidth;
}
var _12,_13=0;
var _14=document.createElement("div");
_14.style.position="absolute";
_14.style.top="-1000px";
_14.style.left="-1000px";
_14.style.width="100px";
_14.style.height="50px";
_14.style.overflow="hidden";
var _15=document.createElement("div");
_15.style.width="100%";
_15.style.height="200px";
_14.appendChild(_15);
document.body.appendChild(_14);
var _16=_15.offsetWidth;
_14.style.overflow="auto";
var _17=_15.offsetWidth;
Telerik.Web.UI.RadComboBox._scrollbarWidth=_16-_17;
if(Telerik.Web.UI.RadComboBox._scrollbarWidth<=0){
_15.style.width="300px";
_12=_14.offsetWidth;
_13=_14.clientWidth;
Telerik.Web.UI.RadComboBox._scrollbarWidth=_12-_13;
}
if(Telerik.Web.UI.RadComboBox._scrollbarWidth<=0){
Telerik.Web.UI.RadComboBox._scrollbarWidth=16;
}
document.body.removeChild(document.body.lastChild);
return Telerik.Web.UI.RadComboBox._scrollbarWidth;
};
Telerik.Web.UI.RadComboBox._isIE8StandardsMode=((document.documentMode)&&(document.documentMode==8));
Telerik.Web.UI.RadComboBox.htmlEncode=function(_18){
var _19={"&":"&amp;","<":"&lt;",">":"&gt;"};
for(var _1a in _19){
_18=_18.replace(new RegExp(_1a,"g"),_19[_1a]);
}
return _18;
};
Telerik.Web.UI.RadComboBox.ComboBoxes=[];
Telerik.Web.UI.RadComboBox._createChildControls=function(_1b,_1c){
var _1d=_1b.get_itemData();
if(!_1d){
return;
}
var _1e=_1b.get_childListElement();
if(!_1e){
return;
}
var _1f=$telerik.getChildrenByTagName(_1b.get_childListElement(),"li");
var _20=_1f.length;
var _21=0;
if(_1f.length>0&&_1f[0].className=="rcbLoading"){
_20=_20-1;
_21=1;
}
for(var i=_21,_23=_1f.length;i<_23;i++){
var _24=new Telerik.Web.UI.RadComboBoxItem();
_1c.add(_24);
_24._initialize(_1d[i-_21],_1f[i]);
}
};
Telerik.Web.UI.RadComboBox.prototype={initialize:function(){
Telerik.Web.UI.ControlItemContainer.callBaseMethod(this,"initialize");
this._log.initialize();
this._initializeEventMap();
this._initializeAnimation();
this._clientState.value=this._value;
this._clientState.text=this._text;
this.updateClientState();
if(this._requiresRightToLeft()){
this._initRightToLeft();
}
if(this.get_childListElement()){
this._onDropDownClickDelegate=Function.createDelegate(this,this._onDropDownClick);
$addHandler(this.get_childListElement(),"click",this._onDropDownClickDelegate);
this._onDropDownHoverDelegate=Function.createDelegate(this,this._onDropDownHover);
$addHandler(this.get_childListElement(),"mouseover",this._onDropDownHoverDelegate);
this._cancelDelegate=Function.createDelegate(this,this._cancelEvent);
$addHandler(this.get_childListElement(),"selectstart",this._cancelDelegate);
$addHandler(this.get_childListElement(),"dragstart",this._cancelDelegate);
this._onDropDownOutDelegate=Function.createDelegate(this,this._onDropDownOut);
$addHandler(this.get_childListElement(),"mouseout",this._onDropDownOutDelegate);
if($telerik.isIE8&&$telerik.standardsMode){
this.get_childListElement().style.position="absolute";
this.get_childListElement().style.width="100%";
}
}
this._onTableHoverDelegate=Function.createDelegate(this,this._onTableHover);
$telerik.addExternalHandler(this.get_tableElement(),"mouseover",this._onTableHoverDelegate);
this._onTableOutDelegate=Function.createDelegate(this,this._onTableOut);
$telerik.addExternalHandler(this.get_tableElement(),"mouseout",this._onTableOutDelegate);
this._onPropertyChangeDelegate=Function.createDelegate(this,this._onInputPropertyChange);
$addHandler(this.get_inputDomElement(),"propertychange",this._onPropertyChangeDelegate);
this._onFocusDelegate=Function.createDelegate(this,this._onFocus);
$addHandler(this.get_inputDomElement(),"focus",this._onFocusDelegate);
this._onDocumentClickDelegate=Function.createDelegate(this,this._onDocumentClick);
if($telerik.isIE){
document.attachEvent("onmousedown",this._onDocumentClickDelegate);
document.attachEvent("oncontextmenu",this._onDocumentClickDelegate);
}else{
$addHandler(document,"mousedown",this._onDocumentClickDelegate);
$addHandler(document,"contextmenu",this._onDocumentClickDelegate);
}
this._onDropDownScrollDelegate=Function.createDelegate(this,this._onDropDownScroll);
$addHandler(this.get_childListElementWrapper(),"scroll",this._onDropDownScrollDelegate);
this._onInputCellClickDelegate=Function.createDelegate(this,this._onInputCellClick);
$telerik.addExternalHandler(this.get_inputDomElement().parentNode,"mouseup",this._onInputCellClickDelegate);
this._eventMap.addHandlerForClassName("keydown","rcbInput",this._onKeyDown);
this._eventMap.addHandlerForClassName("keypress","rcbInput",this._onKeyPress);
if(!$telerik.isIE){
this._eventMap.addHandlerForClassName("input","rcbInput",this._onInputChange);
}
if(this.get_imageDomElement()){
this._onImageClickDelegate=Function.createDelegate(this,this._onImageClick);
$addHandler(this.get_imageDomElement(),"click",this._onImageClickDelegate);
}
this._onWindowResizeDelegate=Function.createDelegate(this,this._onWindowResize);
$addHandler(window,"resize",this._onWindowResizeDelegate);
this._onWindowUnloadDelegate=Function.createDelegate(this,this._onWindowUnload);
$addHandler(window,"unload",this._onWindowUnloadDelegate);
if(this._openDropDownOnLoad){
this._onOpenOnLoad=Function.createDelegate(this,this.showDropDown);
$addHandler(window,"load",this._onOpenOnLoad);
}
if(this.get_moreResultsBoxElement()){
this._onMoreResultsBoxClickDelegate=Function.createDelegate(this,this._onMoreResultsBoxClick);
$addHandler(this.get_moreResultsBoxElement(),"click",this._onMoreResultsBoxClickDelegate);
this._onMoreResultsBoxOverDelegate=Function.createDelegate(this,this._onMoreResultsBoxOver);
$addHandler(this.get_moreResultsBoxElement(),"mouseover",this._onMoreResultsBoxOverDelegate);
this._onMoreResultsBoxOutDelegate=Function.createDelegate(this,this._onMoreResultsBoxOut);
$addHandler(this.get_moreResultsBoxElement(),"mouseout",this._onMoreResultsBoxOutDelegate);
}
if(this._openDropDownOnLoad&&!this.get_dropDownVisible()){
this.showDropDown();
}
var me=this;
Array.add(Telerik.Web.UI.RadComboBox.ComboBoxes,this);
if(this._fireEvents){
this.raiseEvent("load",null);
}
this.get_element().value=this._text;
},_applyZIndex:function(){
var _26=this.get_element().style.zIndex;
var _27=this.get_dropDownElement().parentNode.style.zIndex;
if(_26==0){
_26=_27;
}
this.get_dropDownElement().parentNode.style.zIndex=_26;
},_initializeAnimation:function(){
var _28=this._getAnimatedElement();
if(_28){
this._slide=new Telerik.Web.UI.jSlide(_28,this.get_expandAnimation(),this.get_collapseAnimation());
this._slide.initialize();
this._slide.set_direction(this.get_slideDirection());
}
this._animationEndedDelegate=Function.createDelegate(this,this._onAnimationEnded);
this._slide.add_expandAnimationEnded(this._animationEndedDelegate);
this._slide.add_collapseAnimationEnded(this._animationEndedDelegate);
this._animationStartedDelegate=Function.createDelegate(this,this._onAnimationStarted);
this._slide.add_expandAnimationStarted(this._animationStartedDelegate);
this._slide.add_collapseAnimationStarted(this._animationStartedDelegate);
},_onAnimationEnded:function(_29,e){
if(window.netscape&&!window.opera){
this.get_childListElementWrapper().style.overflow="auto";
}
if(this.get_dropDownVisible()){
var _2b=this.get_highlightedItem();
if(_2b){
_2b.scrollOnTop();
}
}
},_onAnimationStarted:function(_2c,e){
if(window.netscape&&!window.opera){
this.get_childListElementWrapper().style.overflow="hidden";
}
},_requiresRightToLeft:function(){
var _2e=this.get_element();
while(_2e.nodeType!==9){
if(_2e.dir=="rtl"){
return true;
}
_2e=_2e.parentNode;
}
return false;
},_initRightToLeft:function(){
this._rightToLeft=true;
if(this._skin){
this.get_element().className=String.format("{0} RadComboBox_{1}_rtl",this.get_element().className,this._skin);
this.get_dropDownElement().className=String.format("{0} RadComboBoxDropDown_{1}_rtl",this.get_dropDownElement().className,this._skin);
}
if(this.get_imageDomElement()){
if(Sys.UI.DomElement.containsCssClass(this.get_imageDomElement().parentNode,"rcbArrowCellRight")){
this._replaceCssClass(this.get_imageDomElement().parentNode,"rcbArrowCellRight","rcbArrowCellLeft");
this.get_inputDomElement().parentNode.className="rcbInputCell rcbInputCellRight";
}else{
this._replaceCssClass(this.get_imageDomElement().parentNode,"rcbArrowCellLeft","rcbArrowCellRight");
this.get_inputDomElement().parentNode.className="rcbInputCell rcbInputCellLeft";
}
}
},_replaceCssClass:function(_2f,_30,_31){
_2f.className=_2f.className.replace(_30,_31);
},dispose:function(){
Array.remove(Telerik.Web.UI.RadComboBox.ComboBoxes,this);
if(this._animationEndedDelegate){
if(this._slide){
this._slide.remove_expandAnimationEnded(this._animationEndedDelegate);
this._slide.remove_collapseAnimationEnded(this._animationEndedDelegate);
}
this._animationEndedDelegate=null;
}
if(this._animationStartedDelegate){
if(this._slide){
this._slide.remove_expandAnimationStarted(this._animationStartedDelegate);
this._slide.remove_collapseAnimationStarted(this._animationStartedDelegate);
}
this._animationStartedDelegate=null;
}
$removeHandler(window,"unload",this._onWindowUnloadDelegate);
$removeHandler(window,"resize",this._onWindowResizeDelegate);
$removeHandler(this.get_inputDomElement(),"propertychange",this._onPropertyChangeDelegate);
$removeHandler(this.get_inputDomElement(),"focus",this._onFocusDelegate);
if($telerik.isIE){
document.detachEvent("onmousedown",this._onDocumentClickDelegate);
document.detachEvent("oncontextmenu",this._onDocumentClickDelegate);
}else{
$removeHandler(document,"mousedown",this._onDocumentClickDelegate);
$removeHandler(document,"contextmenu",this._onDocumentClickDelegate);
}
if(this.get_childListElement()){
$removeHandler(this.get_childListElement(),"click",this._onDropDownClickDelegate);
$removeHandler(this.get_childListElement(),"mouseover",this._onDropDownHoverDelegate);
$removeHandler(this.get_childListElement(),"mouseout",this._onDropDownOutDelegate);
$removeHandler(this.get_childListElement(),"selectstart",this._cancelDelegate);
$removeHandler(this.get_childListElement(),"dragstart",this._cancelDelegate);
}
if(this.get_tableElement()){
$telerik.removeExternalHandler(this.get_tableElement(),"mouseover",this._onTableHoverDelegate);
$telerik.removeExternalHandler(this.get_tableElement(),"mouseout",this._onTableOutDelegate);
}
if(this.get_inputDomElement().parentNode){
$telerik.removeExternalHandler(this.get_inputDomElement().parentNode,"mouseup",this._onInputCellClickDelegate);
}
if(this.get_imageDomElement()){
$removeHandler(this.get_imageDomElement(),"click",this._onImageClickDelegate);
}
if(this._openDropDownOnLoad){
$removeHandler(window,"load",this._onOpenOnLoad);
}
if(this.get_moreResultsBoxElement()){
$removeHandler(this.get_moreResultsBoxElement(),"click",this._onMoreResultsBoxClickDelegate);
$removeHandler(this.get_moreResultsBoxElement(),"mouseover",this._onMoreResultsBoxOverDelegate);
$removeHandler(this.get_moreResultsBoxElement(),"mouseout",this._onMoreResultsBoxOutDelegate);
}
$removeHandler(this.get_childListElementWrapper(),"scroll",this._onDropDownScrollDelegate);
if(this._slide){
this._slide.dispose();
this._slide=null;
}
this._removeDropDown();
this._disposed=true;
Telerik.Web.UI.RadComboBox.callBaseMethod(this,"dispose");
this._tableElement._events=null;
this._inputDomElement._events=null;
this._imageDomElement._events=null;
this._childListElementWrapper._events=null;
},_cancelEvent:function(e){
e.preventDefault();
return false;
},_onDropDownScroll:function(e){
if(!this._virtualScroll||this._ajaxRequest||this._endOfItems){
return;
}
var _34=this.get_items().get_count();
var _35=22;
var _36=0;
if(_34>0){
_35=this.get_items().getItem(0).get_element().offsetHeight;
_36=this.get_items().getItem(_34-1).get_element().offsetTop;
}
var _37=$telerik.getFirstChildByTagName(this.get_childListElement(),"div",0);
if(_37){
var _38=_37.offsetHeight;
if(this.get_childListElementWrapper().scrollTop+_38>=this.get_childListElement().offsetHeight-_38){
this.requestItems(this.get_text(),true);
}
}
},_detachDropDown:function(){
if((!document.readyState||document.readyState=="complete"||document.readyState=="interactive")&&(!this._isDetached)){
var _39=this._findParentForm()||document.body;
var _3a=this.get_dropDownElement();
var _3b=this.get_dropDownElement().parentNode;
_3b.parentNode.removeChild(_3b);
_3b.style.marginLeft="0";
_39.insertBefore(_3b,_39.firstChild);
this._isDetached=true;
}
},_removeDropDown:function(){
var _3c=this.get_dropDownElement().parentNode;
_3c.parentNode.removeChild(_3c);
if(this._disposeChildElements&&typeof (Sys.WebForms)!="undefined"){
Sys.WebForms.PageRequestManager.getInstance()._destroyTree(_3c);
}
if(!$telerik.isSafari){
_3c.outerHTML=null;
}
this._dropDownElement=null;
},attachDropDown:function(){
var _3d=this.get_dropDownElement().parentNode;
_3d.parentNode.removeChild(_3d);
this.get_tableElement().parentNode.appendChild(_3d);
},_findParentForm:function(){
var _3e=this.get_element();
while(_3e&&_3e.tagName&&_3e.tagName.toLowerCase()!="form"){
_3e=_3e.parentNode;
}
if(!_3e.tagName){
_3e=null;
}
return _3e;
},_findNearestItem:function(_3f){
while(_3f.nodeType!==9){
if(_3f._item&&Telerik.Web.UI.RadComboBoxItem.isInstanceOfType(_3f._item)){
return _3f._item;
}
_3f=_3f.parentNode;
}
return null;
},_positionDropDown:function(){
if(this._skipDropDownPositioning){
return;
}
this._detachDropDown();
var _40=this.get_element();
var _41=this._getAnimationContainer();
_41.style.position="absolute";
var _42=$telerik.getLocation(_40);
var _43=this.get_dropDownElement();
var _44=this.get_element().offsetWidth;
if(this._dropDownWidth){
_44=this._dropDownWidth;
}
var _45=this.get_childListElement();
var _46=this.get_childListElementWrapper();
var _47=_42.y+this.get_offsetY()+this.get_element().offsetHeight;
_41.style.top=_47+"px";
_41.style.left=_42.x+this.get_offsetX()+"px";
if(this._rightToLeft&&document.body.dir=="rtl"){
_41.style.left="";
_41.style.left=_42.x+this.get_offsetX()-Telerik.Web.UI.RadComboBox._getScrollBarWidth()+"px";
}
_43.style.display="block";
_43.style.width=_44+"px";
var _48=0;
if(!this._dropDownWidth){
_48=_43.offsetWidth-_44;
}
if(_48>0&&_48<_44){
_43.style.width=_44-_48+"px";
}
if(this._rightToLeft){
_43.dir="rtl";
}
this._determineScreenBoundaryDetection();
},_calculateItemsHeight:function(){
var _49=0;
var _4a=this.get_items().get_count();
for(var i=0;i<_4a;i++){
_49+=this.get_items().getItem(i).get_element().offsetHeight;
}
return _49;
},_calculateDropDownAutoHeight:function(){
var _4c=this.get_dropDownElement();
var _4d=this._getAnimationContainer();
var _4e=$telerik.getLocation(this.get_element());
var _4d=this._getAnimationContainer();
var _4f=$telerik.getLocation(_4d);
var _50=$telerik.getViewPortSize();
var y=_4e.y-_4c.offsetHeight;
var _52=_50.height-_4f.y;
var _53=_4f.y-this.get_element().offsetHeight;
var _54=_52;
var _55=false;
var _56=0;
if(this._getHeaderElement()){
_56=_56+this._getHeaderElement().offsetHeight;
_55=true;
}
if(this._getFooterElement()){
_56=_56+this._getFooterElement().offsetHeight;
_55=true;
}
if(this.get_moreResultsBoxElement()){
_56=_56+this.get_moreResultsBoxElement().offsetHeight;
_55=true;
}
if(this._enableScreenBoundaryDetection&&_52<_53){
_54=_53;
}
var _57=this.get_childListElement().offsetHeight;
if(this._height==""&&this._maxHeight!=""&&_57>this._maxHeight){
_57=this._maxHeight;
}
if(!(_54>=0&&(_57+_56)>=_54)){
_54=_57+_56;
}
if(_55&&_56<_54){
this.get_childListElementWrapper().style.height=_54-_56+"px";
}else{
this.get_childListElementWrapper().style.height=_54+"px";
}
return _54;
},_determineScreenBoundaryDetection:function(){
var _58=this.get_dropDownElement();
var _59=this._getAnimationContainer();
var _5a=$telerik.getLocation(this.get_element());
var _59=this._getAnimationContainer();
var _5b=$telerik.getLocation(_59);
var _5c=$telerik.getViewPortSize();
var _5d=_58.offsetHeight;
if(this._height==""&&this.get_childListElement()){
if(this._maxHeight==""||this._calculateItemsHeight()<this._maxHeight){
this._cachedOffsetHeight=_5d;
_5d=this._calculateDropDownAutoHeight();
}else{
if(this._maxHeight!=""){
if(this._cachedOffsetHeight!=""){
_5d=this._cachedOffsetHeight;
}
this.get_dropDownElement().style.height="";
this.get_childListElementWrapper().style.height=this._maxHeight+"px";
}
}
}
if(this._enableScreenBoundaryDetection){
if(this._elementOverflowsBottom(_5c,_58,this.get_inputDomElement())){
var y=_5a.y-_5d;
if(y>=0){
this.set_slideDirection(Telerik.Web.UI.jSlideDirection.Up);
this._getAnimationContainer().style.height=this.get_dropDownElement().offsetHeight;
this._getAnimationContainer().style.top=_5a.y-this.get_offsetY()-_58.offsetHeight+"px";
if(window.netscape&&!window.opera){
this._getAnimationContainer().style.top=_5a.y-this.get_offsetY()-_58.offsetHeight+2+"px";
}
if(this._height==""&&(this._maxHeight==""||this._calculateItemsHeight()<this._maxHeight)&&_5d==_5b.y-this.get_element().offsetHeight){
this._getAnimationContainer().style.top="0px";
}
}else{
this.set_slideDirection(Telerik.Web.UI.jSlideDirection.Down);
}
}else{
this.set_slideDirection(Telerik.Web.UI.jSlideDirection.Down);
}
}
this.set_dropDownVisible(true);
},_elementOverflowsBottom:function(_5f,_60,_61){
var _62=$telerik.getLocation(_61).y+_60.offsetHeight;
return _62>_5f.height;
},_highlightFirstMatch:function(){
var _63=this._findItemToSelect();
if(_63&&_63.get_enabled()&&!_63.get_isSeparator()){
_63.highlight();
}
},_findItemToSelect:function(){
var _64=this.findItemByValue(this.get_value());
if(!_64){
_64=this.findItemByText(this.get_text());
}
return _64;
},clearItems:function(){
this.get_items().clear();
this._itemData=null;
},clearSelection:function(){
this.set_text("");
this.set_value("");
this.set_selectedItem(null);
this.set_highlightedItem(null);
},decodeText:function(_65){
var _66=_65;
var _67={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":"\""};
for(var _68 in _67){
_66=_66.replace(new RegExp(_68,"g"),_67[_68]);
}
return _66;
},_findNextAvailableIndex:function(_69,_6a){
var _6b=this.get_visibleItems();
for(var i=_69,_6d=_6b.length;i<_6d;i++){
if(_6b[i].get_enabled()&&!_6b[i].get_isSeparator()){
if(_6a==null){
return i;
}
if(_6a&&_6b[i].get_text().indexOf(_6a)==0){
return i;
}
}
}
return _6b.length;
},_findPrevAvailableIndex:function(_6e){
var _6f=this.get_visibleItems();
if(_6f.length<1){
return -1;
}
for(var i=_6e;i>=0;i--){
if(_6f[i].get_enabled()&&!_6f[i].get_isSeparator()){
return i;
}
}
return -1;
},_onDropDownClick:function(e){
if(this._eventMap.skipElement(e,null)){
return;
}
if(!this._enabled){
return;
}
var _72=this._findNearestItem(e.target);
if(!_72||!_72.get_enabled()||_72.get_isSeparator()){
return;
}
try{
this.get_inputDomElement().focus();
}
catch(e){
}
this._performSelect(_72,e);
this._hideDropDown(e);
if(!this.get_isTemplated()&&this.get_filter()!=Telerik.Web.UI.RadComboBoxFilter.None&&e.stopPropagation){
e.stopPropagation();
}
},_onDropDownHover:function(e){
if(!this._enabled||this._ajaxRequest){
return;
}
var _74=this._findNearestItem(e.target);
if(!_74||!_74.get_enabled()||_74.get_isSeparator()){
return;
}
_74.highlight();
},_onDropDownOut:function(e){
if(!this._enabled){
return;
}
if(!e){
e=event;
}
var _76=this._getRelatedTarget(e);
if(!_76){
return;
}
while(_76&&_76.nodeType!==9){
if(_76.parentNode==this.get_dropDownElement()){
return;
}
_76=_76.parentNode;
}
var _77=this.get_highlightedItem();
if(_77){
_77.unHighlight();
}
},_onTableHover:function(e){
if(!this._enabled){
return;
}
var _79=this.get_tableElement();
if(_79!=null&&_79.className!="rcbFocused"){
_79.className="rcbHovered";
}
},_onTableOut:function(e){
if(!this._enabled){
return;
}
if(!e){
e=event;
}
var _7b=this.get_tableElement();
var _7c=e.target||e.srcElement;
var _7d=this._getRelatedTarget(e);
if(!_7d){
return;
}
while(_7d&&_7d.nodeType!==9){
if(_7d.parentNode&&_7d.parentNode==_7b){
return;
}
_7d=_7d.parentNode;
}
if(_7b!=null&&_7b.className=="rcbHovered"){
_7b.className="";
}
},_getRelatedTarget:function(e){
var _7f=e.toElement||e.relatedTarget||e.fromElement;
if(!_7f){
return null;
}
try{
var _80=_7f.tagName;
}
catch(ex){
_7f=null;
}
return _7f;
},_onDocumentClick:function(e){
if(!e){
e=event;
}
var _82=e.target||e.srcElement;
while(_82.nodeType!==9){
if(_82.parentNode==null||_82==this.get_element()||_82==this.get_dropDownElement()){
return;
}
_82=_82.parentNode;
}
if(this._focused){
this._raiseClientBlur(e);
this._selectItemOnBlur(e);
this._focused=false;
}
if(this.get_dropDownVisible()&&this.get_closeDropDownOnBlur()){
this._hideDropDown(e);
}
},_selectItemOnBlur:function(e){
if(this.get_emptyMessage()&&this.get_text()==this.get_emptyMessage()){
return;
}
var _84=this._findItemToSelect();
if(!_84&&!this.get_allowCustomText()&&this.get_items().get_count()>0){
if(this.get_markFirstMatch()){
if(this.get_text()==""){
this.set_text(this._originalText);
}
this.highlightMatches();
this.selectText(0,0);
_84=this.get_highlightedItem();
}
}
if(this.get_filter()!=Telerik.Web.UI.RadComboBoxFilter.None){
this.setAllItemsVisible(true);
}
this._performSelect(_84,e);
},_onWindowResize:function(){
if(this.get_dropDownVisible()){
this._positionDropDown();
}
},_onWindowUnload:function(){
this._disposeChildElements=false;
},_onKeyDown:function(e){
if(!this._fireEvents||this._ajaxRequest){
return;
}
if(!e){
e=event;
}
this.raise_onClientKeyPressing(e);
var _86=e.keyCode||e.which;
this._lastKeyCode=_86;
var _87=String.fromCharCode(_86);
if(_86==Telerik.Web.UI.Keys.Escape&&this.get_dropDownVisible()){
if(this.get_dropDownVisible()){
this._hideDropDown(e);
}
return;
}else{
if(_86===Telerik.Web.UI.Keys.Enter){
if(this.get_dropDownVisible()){
this._hideDropDown(e);
}
this._performSelect(this.get_highlightedItem(),e);
if(this.get_markFirstMatch()){
var _88=this.get_text().length;
this.selectText(_88,_88);
}
e.returnValue=false;
if(e.preventDefault){
e.preventDefault();
}
return;
}else{
if(_86===Telerik.Web.UI.Keys.Down){
e.returnValue=false;
if(e.altKey){
this._toggleDropDown(e);
return;
}
this.highlightNextItem(null);
if(e.preventDefault){
e.preventDefault();
}
return;
}else{
if(_86===Telerik.Web.UI.Keys.Up){
e.returnValue=false;
if(e.altKey){
this._toggleDropDown(e);
return;
}
this.highlightPreviousItem();
if(e.preventDefault){
e.preventDefault();
}
return;
}else{
if(_86===Telerik.Web.UI.Keys.Tab){
if(this.get_dropDownVisible()){
this._hideDropDown(e);
}
this._raiseClientBlur(e);
this._selectItemOnBlur(e);
this._focused=false;
return;
}
}
}
}
}
if(_86==Telerik.Web.UI.Keys.Left||_86==Telerik.Web.UI.Keys.Right){
return;
}
if(_87&&(!e.altKey)&&!(this.get_enableLoadOnDemand()||!this.get_readOnly())){
this.highlightNextItem(_87);
return;
}
},_onKeyPress:function(e){
if(!this._fireEvents||this._ajaxRequest){
return;
}
var _8a=e.charCode||e.keyCode;
if((this.get_markFirstMatch())&&(this.get_autoCompleteSeparator())&&(this.get_autoCompleteSeparator().charCodeAt(0)==_8a)){
this._performSelect(this.get_highlightedItem(),e);
if(this.get_highlightedItem()){
this.get_highlightedItem().unHighlight();
}
var _8b=this.get_text().length;
this.selectText(_8b,_8b);
}
},_onImageClick:function(e){
if(this._enabled){
this._toggleDropDown(e);
}
},_onInputCellClick:function(e){
if(this._enabled){
if(this.get_text()!==this.get_emptyMessage()){
this.selectText(0,this.get_text().length);
}
if(!this.get_dropDownVisible()&&this._showDropDownOnTextboxClick){
this._showDropDown(e);
}
return true;
}
},_onMoreResultsBoxClick:function(e){
this.requestItems(this.get_text(),true);
},_onMoreResultsBoxOver:function(e){
this.get_moreResultsBoxElement().style.cursor="pointer";
},_onMoreResultsBoxOut:function(e){
this.get_moreResultsBoxElement().style.cursor="default";
},_onFocus:function(e){
if(this._focused){
return;
}
if(this.get_emptyMessage()&&this.get_emptyMessage()==this.get_text()){
this._suppressChange=true;
this.get_inputDomElement().value=this._text;
(function(_92){
setTimeout(function(){
_92.get_inputDomElement().className="rcbInput";
},0);
})(this);
this._suppressChange=false;
}
var _93=this.get_tableElement();
if(_93!=null){
(function(){
setTimeout(function(){
_93.className="rcbFocused";
},0);
})();
}
if(!e&&typeof (event)!="undefined"){
e=event;
}
this._focused=true;
this.raise_onClientFocus(e);
return true;
},_raiseClientBlur:function(e){
if(this._focused){
var _95=this.get_tableElement();
if(_95!=null){
_95.className="";
}
this._applyEmptyMessage();
this.raise_onClientBlur(e);
}
},_applyEmptyMessage:function(){
if(this.get_emptyMessage()&&this.get_text()==""){
this._suppressChange=true;
this.get_inputDomElement().className+=" rcbEmptyMessage";
this.get_inputDomElement().value=this.get_emptyMessage();
this._suppressChange=false;
}
},_onInputChange:function(){
this.set_value("");
var _96=this.get_text();
if(!this.get_emptyMessage()||_96!=this.get_emptyMessage()){
this._ensureChildControls();
this._text=_96;
}
this.get_element().value=this._text;
this.updateClientState();
if(this.get_enableLoadOnDemand()&&!this._suppressChange){
var me=this;
if(this._requestTimeoutID>0){
window.clearTimeout(this._requestTimeoutID);
this._requestTimeoutID=0;
}
if(!this._showDropDownOnTextboxClick){
this._skipLoadingItems=true;
}
if(!this.get_dropDownVisible()){
this.showDropDown();
}
this._requestTimeoutID=window.setTimeout(function(){
if(me._disposed){
return;
}
me.requestItems(me.get_text(),false);
},me.get_itemRequestTimeout());
return;
}
if(!this._suppressChange){
if(this.get_filter()==Telerik.Web.UI.RadComboBoxFilter.None){
if(this._shouldHighlight()){
this.highlightMatches();
}
}else{
this.highlightAllMatches(this.get_text());
}
}
},_onInputPropertyChange:function(){
if(!event.propertyName){
event=event.rawEvent;
}
if(event.propertyName=="value"){
var _98=this.get_text();
if(this._cachedText!=_98){
this._cachedText=_98;
this._onInputChange(event);
}
}
},_shouldHighlight:function(){
if(this._lastKeyCode<Telerik.Web.UI.Keys.Space){
return false;
}
if(this._lastKeyCode>=Telerik.Web.UI.Keys.PageUp&&this._lastKeyCode<=Telerik.Web.UI.Keys.Del){
return false;
}
if(this._lastKeyCode>=Telerik.Web.UI.Keys.F1&&this._lastKeyCode<=Telerik.Web.UI.Keys.F12){
return false;
}
return true;
},_showDropDown:function(e){
if(this._firstOpeningOfDropDown){
this._applyZIndex();
this._firstOpeningOfDropDown=false;
}
this._highlightFirstMatch();
if(this.raise_dropDownOpening(e)==true){
return;
}
var _9a=this._getAnimationContainer();
if(!_9a){
return;
}
var _9b=this.get_text();
if(this.get_emptyMessage()==this.get_text()){
_9b="";
}
if(this.get_enableLoadOnDemand()&&this.get_items().get_count()==0&&!this._skipLoadingItems){
this.requestItems(_9b,false);
}
_9a.style.visibility="hidden";
this.get_dropDownElement().style.visibility="hidden";
if(window.netscape&&!window.opera){
this.get_childListElementWrapper().style.overflow="hidden";
}
this._slide.show();
this._resetAnimatedElementPosition();
this._slide.set_direction(this.get_slideDirection());
try{
this.get_inputDomElement().focus();
}
catch(e){
}
this._onFocus(e);
this.set_dropDownVisible(true);
this._positionDropDown();
var _9c=this.get_dropDownElement();
_9c.style.top=-_9c.offsetHeight+"px";
this._skipDropDownPositioning=true;
this._slide.updateSize();
this._skipDropDownPositioning=null;
_9a.style.visibility="visible";
this._slide.expand();
this.raise_dropDownOpened(e);
},_toggleDropDown:function(e){
if(this.get_dropDownVisible()){
this._hideDropDown(e);
}else{
this._showDropDown(e);
}
},_hideDropDown:function(e){
if(!this.get_dropDownVisible()){
return;
}
if(this.raise_dropDownClosing(e)==true){
return;
}
this.get_dropDownElement().style.display="none";
if(!this._getAnimationContainer()){
return;
}
if(window.netscape&&!window.opera){
this.get_childListElementWrapper().scrollTop=0;
}
this._slide.collapse();
this.set_dropDownVisible(false);
if(this.get_filter()!=Telerik.Web.UI.RadComboBoxFilter.None){
this._removeEmTagsFromAllItems();
}
this.raise_dropDownClosed(e);
},get_dropDownElement:function(){
if(!this._dropDownElement){
this._dropDownElement=this._getChildElement("DropDown");
}
return this._dropDownElement;
},get_inputDomElement:function(){
if(!this._inputDomElement){
this._inputDomElement=this._getChildElement("Input");
}
return this._inputDomElement;
},get_moreResultsBoxMessageElement:function(){
var box=this.get_moreResultsBoxElement();
var _a0=$telerik.getFirstChildByTagName(box,"span",0);
return _a0;
},get_moreResultsBoxElement:function(){
var box=this._getChildElement("MoreResultsBox");
return box;
},get_emptyMessage:function(){
return this._emptyMessage;
},set_emptyMessage:function(_a2){
if(this._emptyMessage!==_a2){
this._emptyMessage=_a2;
}
this._applyEmptyMessage();
},get_imageDomElement:function(){
if(!this._imageDomElement){
this._imageDomElement=this._getChildElement("Arrow");
}
return this._imageDomElement;
},get_slideDirection:function(){
return this._slideDirection;
},set_slideDirection:function(_a3){
this._slideDirection=_a3;
this._slide.set_direction(_a3);
},hideDropDown:function(){
this._hideDropDown(null);
},showDropDown:function(){
if(this._enabled){
this._showDropDown(null);
}
},toggleDropDown:function(){
if(this._enabled){
this._toggleDropDown(null);
}
},_resetAnimatedElementPosition:function(){
var _a4=this._getAnimatedElement();
_a4.style.top="0px";
_a4.style.left="0px";
},get_readOnly:function(){
return !(this.get_allowCustomText()||this.get_markFirstMatch())&&this.get_filter()==Telerik.Web.UI.RadComboBoxFilter.None;
},_performSelect:function(_a5,e){
if(_a5&&_a5!=this.get_selectedItem()&&!this.get_enableLoadOnDemand()){
_a5._select(e);
return;
}
if(_a5&&_a5==this.get_selectedItem()&&this.getLastWord(this.get_text())!=_a5.get_text()&&!this.get_readOnly()){
this.set_text(_a5.get_text());
return;
}
if(_a5&&_a5==this.get_selectedItem()){
return;
}
if(_a5&&this.get_originalText()!=_a5.get_text()){
_a5._select(e);
return;
}
if(_a5&&(!this.get_selectedItem()||this.get_selectedItem().get_value()!=_a5.get_value())){
_a5._select(e);
return;
}
if(this.get_originalText()!=this.get_text()){
if(this.get_highlightedItem()){
this.get_highlightedItem().unHighlight();
}
if(this.raise_textChange(this,e)==true){
return;
}
var _a7={Command:"TextChanged"};
this.postback(_a7);
}
},set_value:function(_a8){
this._value=_a8;
this.updateClientState();
},get_value:function(){
return this._value;
},set_text:function(_a9){
_a9=this.decodeText(_a9);
this.get_element().value=_a9;
this._suppressChange=true;
var _aa=this.get_inputDomElement();
_aa.value=_a9;
this.set_value("");
if(_aa.fireEvent&&document.createEventObject){
var _ab=document.createEventObject();
_aa.fireEvent("onchange",_ab);
}else{
if(_aa.dispatchEvent){
var _ac=true;
var _ab=document.createEvent("HTMLEvents");
_ab.initEvent("change",_ac,true);
_aa.dispatchEvent(_ab);
}
}
this._suppressChange=false;
this._ensureChildControls();
this._text=_a9;
this.updateClientState();
},get_webServiceSettings:function(){
return this._webServiceSettings;
},set_webServiceSettings:function(_ad){
var _ae=Sys.Serialization.JavaScriptSerializer.deserialize(_ad);
this._webServiceSettings=new Telerik.Web.UI.WebServiceSettings(_ae);
},get_text:function(){
return this.get_inputDomElement().value;
},enable:function(){
this.get_inputDomElement().disabled=false;
var _af=this.get_tableElement();
if(_af!=null){
_af.className="";
}
this.set_enabled(true);
this.enableEvents();
var _b0=this.get_items().get_count();
for(var i=0;i<_b0;i++){
this._children.getItem(i).enable();
}
},disable:function(){
var _b2=this.get_tableElement();
if(_b2!=null){
_b2.className="rcbDisabled";
}
this.set_enabled(false);
this.get_inputDomElement().disabled="disabled";
this.disableEvents();
var _b3=this.get_items().get_count();
for(var i=0;i<_b3;i++){
this._children.getItem(i).disable();
}
},set_enabled:function(_b5){
this._enabled=_b5;
this.updateClientState();
},get_enabled:function(){
return this._enabled;
},disableEvents:function(){
this._fireEvents=false;
},enableEvents:function(){
this._fireEvents=true;
},findItemByText:function(_b6){
var _b7=this.get_items();
var _b8=_b7.get_count();
for(var i=0;i<_b8;i++){
if(_b7.getItem(i).get_text()==_b6){
return _b7.getItem(i);
}
}
return null;
},findItemByValue:function(_ba){
if(!_ba){
return null;
}
var _bb=this.get_items();
var _bc=_bb.get_count();
for(var i=0;i<_bc;i++){
if(_bb.getItem(i).get_value()==_ba){
return _bb.getItem(i);
}
}
return null;
},_getAnimationContainer:function(){
if(!this._animationContainer){
if(this.get_dropDownElement()){
this._animationContainer=this.get_dropDownElement().parentNode;
}
}
return this._animationContainer;
},highlightPreviousItem:function(){
var _be=this.get_visibleItems();
var _bf=this.get_highlightedItem();
if(!_bf){
_bf=this.get_selectedItem();
}
var _c0=0;
if(_bf){
var _c1=_be.length;
for(var i=0;i<_c1;i++){
if(_be[i]==_bf){
_c0=i-1;
}
}
}
_c0=this._findPrevAvailableIndex(_c0);
if(_c0>=0){
_be[_c0].highlight();
_be[_c0].scrollIntoView();
var _c3=this._getLastSeparatorIndex(this.get_text());
var _c4=this.get_text().substring(0,_c3+1)+_be[_c0].get_text();
if(this.get_changeText()){
this.set_text(_c4);
this.set_value(_be[_c0].get_value());
}
}
},highlightNextItem:function(_c5){
var _c6=this.get_visibleItems();
var _c7=this.get_highlightedItem();
if(!_c7){
_c7=this.get_selectedItem();
}
var _c8=0;
if(_c7){
var _c9=_c6.length;
for(var i=0;i<_c9;i++){
if(_c6[i]==_c7){
_c8=i+1;
}
}
}
_c8=this._findNextAvailableIndex(_c8,_c5);
if(_c5&&_c8==_c6.length){
_c8=this._findNextAvailableIndex(0,_c5);
}
if(_c8<_c6.length){
_c6[_c8].highlight();
_c6[_c8].scrollIntoView();
var _cb=this._getLastSeparatorIndex(this.get_text());
var _cc=this.get_text().substring(0,_cb+1)+_c6[_c8].get_text();
if(this.get_changeText()){
this.set_text(_cc);
this.set_value(_c6[_c8].get_value());
}
}
},findFirstMatch:function(_cd){
if(!_cd){
return null;
}
var _ce=this.get_items();
var _cf=_ce.get_count();
for(var i=0;i<_cf;i++){
if(_ce.getItem(i).get_text().length<_cd.length){
continue;
}
if(_ce.getItem(i).get_enabled()==false||_ce.getItem(i).get_isSeparator()){
continue;
}
var _d1=_ce.getItem(i).get_text().substring(0,_cd.length);
if(!this.get_isCaseSensitive()){
if(_d1.toLowerCase()==_cd.toLowerCase()){
return _ce.getItem(i);
}
}else{
if(_d1==_cd){
return _ce.getItem(i);
}
}
}
return null;
},highlightAllMatches:function(_d2){
if(this.get_filter()==Telerik.Web.UI.RadComboBoxFilter.None){
return;
}
if(this.get_highlightedItem()){
this.get_highlightedItem().unHighlight();
}
var _d3=this.getLastWord(_d2);
if(this._getLastSeparator(_d2)==_d2.charAt(_d2.length-1)){
this._removeEmTagsFromAllItems();
this.setAllItemsVisible(true);
return;
}
this.get_items().forEach(function(_d4,_d5){
_d4._markText(_d3);
});
if(this.get_markFirstMatch()){
this.highlightFirstVisibleEnabledItem();
}
},highlightFirstVisibleEnabledItem:function(){
if(this.get_text().length>0){
var _d6=this.get_visibleItems();
var _d7=_d6.length;
for(var _d8=0;_d8<_d7;_d8++){
var _d9=_d6[_d8];
if(_d9.get_enabled()==true){
_d9.highlight();
return;
}
}
}
},setAllItemsVisible:function(_da){
var _da=_da;
this.get_items().forEach(function(_db){
_db.set_visible(_da);
});
},_removeEmTagsFromAllItems:function(){
if(this.get_isTemplated()||this.get_filter()==Telerik.Web.UI.RadComboBoxFilter.None){
return;
}
this.get_items().forEach(function(_dc){
var _dd=_dc.get_text();
_dc.set_text(_dd);
_dc.get_element().innerHTML=Telerik.Web.UI.RadComboBox.htmlEncode(_dd);
});
},highlightMatches:function(){
if(!this.get_markFirstMatch()){
return;
}
var _de=this.get_text();
var _df=this.getLastWord(_de);
if(this._getLastSeparator(_de)==_de.charAt(_de.length-1)){
return;
}
var _e0=this.findFirstMatch(_df);
if(this.get_highlightedItem()){
this.get_highlightedItem().unHighlight();
}
if(!_e0){
if(!this.get_allowCustomText()&&!this.get_enableLoadOnDemand()){
if(_de){
var _e1=this._getLastSeparatorIndex(_de);
if(_e1<_de.length-1){
var _e2=_de.substring(0,_de.length-1);
if(_e2==""&&$telerik.isSafari){
var me=this;
window.setTimeout(function(){
me.set_text(_e2);
},0);
}else{
this.set_text(_e2);
this.highlightMatches();
}
}
}
}
return;
}
_e0.highlight();
_e0.scrollOnTop();
var _e1=this._getLastSeparatorIndex(_de);
var _e4=_de.substring(0,_e1+1)+_e0.get_text();
if(_de!=_e4){
this.set_text(_e4);
}
this.set_value(_e0.get_value());
var _e5=_e1+_df.length+1;
var _e6=_e4.length-_e5;
this.selectText(_e5,_e6);
},postback:function(_e7){
if(!this._postBackReference){
return;
}
var _e8=this._postBackReference.replace("arguments",Sys.Serialization.JavaScriptSerializer.serialize(_e7));
eval(_e8);
},_getLastSeparator:function(_e9){
if(!this.get_autoCompleteSeparator()){
return null;
}
var _ea=this._getLastSeparatorIndex(_e9);
return _e9.charAt(_ea);
},getLastWord:function(_eb){
var _ec=-1;
if(this.get_autoCompleteSeparator()!=null){
_ec=this._getLastSeparatorIndex(_eb);
}
var _ed=_eb.substring(_ec+1,_eb.length);
return _ed;
},get_lastWord:function(){
var _ee=this.getLastWord(this.get_text());
return _ee;
},_getLastSeparatorIndex:function(_ef){
var _f0=-1;
if(!this.get_autoCompleteSeparator()){
return _f0;
}
for(var i=0,_f2=this.get_autoCompleteSeparator().length;i<_f2;i++){
var _f3=this.get_autoCompleteSeparator().charAt(i);
var _f4=_ef.lastIndexOf(_f3);
if(_f4>_f0&&!this._checkIsThisPartOfWord(_f4,_f3)){
_f0=_f4;
}
}
return _f0;
},_checkIsThisPartOfWord:function(_f5,_f6){
var _f7="";
if(this.get_selectedItem()){
_f7=this.get_selectedItem().get_text();
}
var _f8=_f7.lastIndexOf(_f6);
if(_f8>-1&&_f8==_f5){
return true;
}
return false;
},selectText:function(_f9,_fa){
if(!this.get_enableTextSelection()){
return;
}
if((!this.get_enableLoadOnDemand())&&(this.get_readOnly())){
return;
}
if(this.get_inputDomElement().createTextRange){
var _fb=this.get_inputDomElement().createTextRange();
if(_f9==0&&_fa==0){
_fb.collapse(true);
return;
}
_fb.moveStart("character",_f9);
_fb.moveEnd("character",_fa);
_fb.select();
}else{
this.get_inputDomElement().setSelectionRange(_f9,_f9+_fa);
}
},_childRemoving:function(_fc){
var _fd=_fc.get_index();
if(this._itemData){
Array.remove(this._itemData,this._itemData[_fd]);
}
Telerik.Web.UI.RadComboBox.callBaseMethod(this,"_childRemoving",[_fc]);
},_childRemoved:function(_fe,_ff){
var _100=_fe.get_element();
if(_fe==this.get_selectedItem()){
this.set_selectedItem(null);
this.set_highlightedItem(null);
this.set_text("");
}
if(_ff.get_items().get_count()==0&&!this._getHeaderElement()&&!this._getFooterElement()){
_100=_ff._childListElement;
_ff._childListElement=null;
}
if(_100){
_100.innerHTML="";
if(_100.parentNode){
_100.parentNode.removeChild(_100);
}
_100=null;
}
Telerik.Web.UI.RadComboBox.callBaseMethod(this,"_childRemoved",[_fe,_ff]);
},_childrenCleared:function(_101){
this.set_selectedItem(null);
this.set_highlightedItem(null);
var _102=_101.get_childListElement();
var _103=_101.get_items().get_count();
if(_102&&!this._getHeaderElement()&&!this._getFooterElement()){
for(var i=0;i<_103;i++){
_101.get_items().getItem(i)._dispose();
}
_102.innerHTML="";
_102=null;
}else{
if(_102){
for(var i=0;i<_103;i++){
this._childRemoved(_101.get_items().getItem(i),_101);
}
}
}
},_createChildControls:function(){
this._children=new Telerik.Web.UI.RadComboBoxItemCollection(this);
Telerik.Web.UI.RadComboBox._createChildControls(this,this._children);
},_ensureChildControls:function(){
if(!this._childControlsCreated){
this._createChildControls();
this._childControlsCreated=true;
if(!this._setSelectedItem){
this._setSelectedItem=true;
this._setFirstSelectedItem();
}
}
},_createChildListElement:function(){
var _105=document.createElement("ul");
_105.className="rcbList";
this.get_childListElementWrapper().appendChild(_105);
this._onDropDownClickDelegate=Function.createDelegate(this,this._onDropDownClick);
$addHandler(this.get_childListElement(),"click",this._onDropDownClickDelegate);
this._onDropDownHoverDelegate=Function.createDelegate(this,this._onDropDownHover);
$addHandler(this.get_childListElement(),"mouseover",this._onDropDownHoverDelegate);
this._cancelDelegate=Function.createDelegate(this,this._cancelEvent);
$addHandler(this.get_childListElement(),"selectstart",this._cancelDelegate);
$addHandler(this.get_childListElement(),"dragstart",this._cancelDelegate);
this._onDropDownOutDelegate=Function.createDelegate(this,this._onDropDownOut);
$addHandler(this.get_childListElement(),"mouseout",this._onDropDownOutDelegate);
if($telerik.isIE8&&$telerik.standardsMode){
_105.style.position="absolute";
_105.style.width="100%";
}
},_setFirstSelectedItem:function(){
var item=this.findItemByText(this._text);
if(item&&!item.get_isSeparator()){
this.set_selectedItem(item);
}
},get_childListElement:function(){
if(!this._childListElement){
var _107=this.get_childListElementWrapper();
this._childListElement=$telerik.getFirstChildByTagName(_107,"ul",0);
}
return this._childListElement;
},get_childListElementWrapper:function(){
if(!this._childListElementWrapper){
var _108=this.get_dropDownElement();
if(this._getHeaderElement()){
this._childListElementWrapper=$telerik.getFirstChildByTagName(_108,"div",1);
}else{
this._childListElementWrapper=$telerik.getFirstChildByTagName(_108,"div",0);
}
}
return this._childListElementWrapper;
},_getHeaderElement:function(){
if(this.get_dropDownElement()){
return $telerik.getChildByClassName(this.get_dropDownElement(),"rcbHeader",0);
}
return null;
},_getFooterElement:function(){
if(this.get_dropDownElement()){
return $telerik.getChildByClassName(this.get_dropDownElement(),"rcbFooter",0);
}
return null;
},get_tableElement:function(){
if(!this._tableElement){
this._tableElement=$telerik.getFirstChildByTagName(this.get_element(),"table",0);
}
return this._tableElement;
},get_expandAnimation:function(){
return this._expandAnimation;
},set_expandAnimation:function(_109){
var _10a=Sys.Serialization.JavaScriptSerializer.deserialize(_109);
this._expandAnimation=new Telerik.Web.UI.AnimationSettings(_10a);
},get_collapseAnimation:function(){
return this._collapseAnimation;
},set_collapseAnimation:function(_10b){
var _10c=Sys.Serialization.JavaScriptSerializer.deserialize(_10b);
this._collapseAnimation=new Telerik.Web.UI.AnimationSettings(_10c);
},_getAnimatedElement:function(){
if(!this._animatedElement){
this._animatedElement=this.get_dropDownElement();
}
return this._animatedElement;
},get_items:function(){
return this._getChildren();
},get_visibleItems:function(){
var _10d=[];
var _10e=this._getChildren().get_count();
for(var i=0;i<_10e;i++){
var item=this._getChildren().getItem(i);
if(item.get_visible()){
Array.add(_10d,item);
}
}
return _10d;
},set_items:function(_111){
this._children=_111;
},get_itemData:function(){
return this._itemData;
},set_itemData:function(_112){
this._itemData=_112;
},get_itemRequestTimeout:function(){
return this._itemRequestTimeout;
},set_itemRequestTimeout:function(_113){
this._itemRequestTimeout=_113;
},get_appendItems:function(){
return this._appendItems;
},set_appendItems:function(_114){
this._appendItems=_114;
},get_selectedItem:function(){
if(!this._setSelectedItem){
this._setSelectedItem=true;
this._setFirstSelectedItem();
}
return this._selectedItem;
},set_selectedItem:function(_115){
this._selectedItem=_115;
},get_selectedIndex:function(){
var _116=this.get_selectedItem();
if(_116){
return _116.get_index();
}
return this._selectedIndex;
},set_selectedIndex:function(_117){
this._selectedIndex=_117;
},get_causesValidation:function(){
return this._causesValidation;
},set_causesValidation:function(_118){
this._causesValidation=_118;
},get_closeDropDownOnBlur:function(){
return this._closeDropDownOnBlur;
},set_closeDropDownOnBlur:function(_119){
this._closeDropDownOnBlur=_119;
},get_isTemplated:function(){
return this._isTemplated;
},set_isTemplated:function(_11a){
this._isTemplated=_11a;
},get_highlightTemplatedItems:function(){
return this._highlightTemplatedItems;
},set_highlightTemplatedItems:function(_11b){
this._highlightTemplatedItems=_11b;
},get_enableLoadOnDemand:function(){
return this._enableLoadOnDemand;
},set_enableLoadOnDemand:function(_11c){
this._enableLoadOnDemand=_11c;
},get_enableItemCaching:function(){
return this._enableItemCaching;
},set_enableItemCaching:function(_11d){
this._enableItemCaching=_11d;
},_setReadOnlyCssClass:function(){
var _11e=this.get_tableElement().getElementsByTagName("tr")[0];
if(this.get_readOnly()){
Sys.UI.DomElement.addCssClass(_11e,"rcbReadOnly");
}else{
Sys.UI.DomElement.removeCssClass(_11e,"rcbReadOnly");
}
},get_allowCustomText:function(){
return this._allowCustomText;
},set_allowCustomText:function(_11f){
this._allowCustomText=_11f;
this._setReadOnlyCssClass();
},get_changeText:function(){
return this._changeText;
},set_changeText:function(_120){
this._changeText=_120;
},get_markFirstMatch:function(){
return this._markFirstMatch;
},set_markFirstMatch:function(_121){
this._markFirstMatch=_121;
this._setReadOnlyCssClass();
},get_filter:function(){
return this._filter;
},set_filter:function(_122){
this._filter=_122;
},get_enableTextSelection:function(){
return this._enableTextSelection;
},set_enableTextSelection:function(_123){
this._enableTextSelection=_123;
},get_originalText:function(){
return this._originalText;
},set_originalText:function(_124){
this._originalText=_124;
},get_highlightedItem:function(){
return this._highlightedItem;
},set_highlightedItem:function(_125){
this._highlightedItem=_125;
},get_isCaseSensitive:function(){
return this._isCaseSensitive;
},set_isCaseSensitive:function(_126){
this._isCaseSensitive=_126;
},get_dropDownVisible:function(){
return this._dropDownVisible;
},set_dropDownVisible:function(_127){
this._dropDownVisible=_127;
},get_autoCompleteSeparator:function(){
return this._autoCompleteSeparator;
},set_autoCompleteSeparator:function(_128){
this._autoCompleteSeparator=_128;
},get_showMoreMessage:function(){
return this._showMoreMessage;
},set_showMoreMessage:function(_129){
this._showMoreMessage=_129;
},get_loadingMessage:function(){
return this._loadingMessage;
},set_loadingMessage:function(_12a){
this._loadingMessage=_12a;
},get_errorMessage:function(){
return this._errorMessage;
},set_errorMessage:function(_12b){
this._errorMessage=_12b;
},set_endOfItems:function(_12c){
this._endOfItems=_12c;
},get_endOfItems:function(){
return this._endOfItems;
},get_clientDataString:function(){
return this._clientDataString;
},set_clientDataString:function(_12d){
this._clientDataString=_12d;
},get_offsetX:function(){
return this._offsetX;
},set_offsetX:function(_12e){
this._offsetX=_12e;
},get_offsetY:function(){
return this._offsetY;
},set_offsetY:function(_12f){
this._offsetY=_12f;
},add_keyPressing:function(_130){
this.get_events().addHandler("keyPressing",_130);
},remove_keyPressing:function(_131){
this.get_events().removeHandler("keyPressing",_131);
},raise_keyPressing:function(_132){
this.raiseEvent("keyPressing",_132);
},add_textChange:function(_133){
this.get_events().addHandler("textChange",_133);
},remove_textChange:function(_134){
this.get_events().removeHandler("textChange",_134);
},raise_textChange:function(_135,e){
var _135=new Telerik.Web.UI.RadComboBoxCancelEventArgs(e);
this.raiseEvent("textChange",_135);
return _135.get_cancel();
},add_selectedIndexChanging:function(_137){
this.get_events().addHandler("selectedIndexChanging",_137);
},remove_selectedIndexChanging:function(_138){
this.get_events().removeHandler("selectedIndexChanging",_138);
},raise_selectedIndexChanging:function(item,e){
var _13b=new Telerik.Web.UI.RadComboBoxItemCancelEventArgs(item,e);
this.raiseEvent("selectedIndexChanging",_13b);
return _13b.get_cancel();
},add_selectedIndexChanged:function(_13c){
this.get_events().addHandler("selectedIndexChanged",_13c);
},remove_selectedIndexChanged:function(_13d){
this.get_events().removeHandler("selectedIndexChanged",_13d);
},raise_selectedIndexChanged:function(item,e){
var _140=new Telerik.Web.UI.RadComboBoxItemEventArgs(item,e);
this.raiseEvent("selectedIndexChanged",_140);
},add_itemsRequesting:function(_141){
this.get_events().addHandler("itemsRequesting",_141);
},remove_itemsRequesting:function(_142){
this.get_events().removeHandler("itemsRequesting",_142);
},add_itemsRequested:function(_143){
this.get_events().addHandler("itemsRequested",_143);
},remove_itemsRequested:function(_144){
this.get_events().removeHandler("itemsRequested",_144);
},raise_itemsRequested:function(text,e){
var _147=new Telerik.Web.UI.RadComboBoxRequestEventArgs(text,e);
this.raiseEvent("itemsRequested",_147);
},add_itemDataBound:function(_148){
this.get_events().addHandler("itemDataBound",_148);
},remove_itemDataBound:function(_149){
this.get_events().removeHandler("itemDataBound",_149);
},add_dropDownOpening:function(_14a){
this.get_events().addHandler("dropDownOpening",_14a);
},remove_dropDownOpening:function(_14b){
this.get_events().removeHandler("dropDownOpening",_14b);
},raise_dropDownOpening:function(e){
var _14d=new Telerik.Web.UI.RadComboBoxCancelEventArgs(e);
this.raiseEvent("dropDownOpening",_14d);
return _14d.get_cancel();
},add_dropDownClosing:function(_14e){
this.get_events().addHandler("dropDownClosing",_14e);
},remove_dropDownClosing:function(_14f){
this.get_events().removeHandler("dropDownClosing",_14f);
},add_dropDownOpened:function(_150){
this.get_events().addHandler("dropDownOpened",_150);
},remove_dropDownOpened:function(_151){
this.get_events().removeHandler("dropDownOpened",_151);
},raise_dropDownOpened:function(e){
var _153=new Telerik.Web.UI.RadComboBoxEventArgs(e);
this.raiseEvent("dropDownOpened",_153);
},add_dropDownClosed:function(_154){
this.get_events().addHandler("dropDownClosed",_154);
},remove_dropDownClosed:function(_155){
this.get_events().removeHandler("dropDownClosed",_155);
},raise_dropDownClosed:function(e){
var _157=new Telerik.Web.UI.RadComboBoxEventArgs(e);
this.raiseEvent("dropDownClosed",_157);
},add_itemsRequestFailed:function(_158){
this.get_events().addHandler("itemsRequestFailed",_158);
},remove_itemsRequestFailed:function(_159){
this.get_events().removeHandler("itemsRequestFailed",_159);
},raise_itemsRequestFailed:function(text,_15b,e){
var _15d=new Telerik.Web.UI.RadComboBoxItemsRequestFailedEventArgs(text,_15b,e);
this.raiseEvent("itemsRequestFailed",_15d);
return _15d.get_cancel();
},raise_dropDownClosing:function(e){
var _15f=new Telerik.Web.UI.RadComboBoxCancelEventArgs(e);
this.raiseEvent("dropDownClosing",_15f);
return _15f.get_cancel();
},add_onClientFocus:function(_160){
this.get_events().addHandler("onClientFocus",_160);
},remove_onClientFocus:function(_161){
this.get_events().removeHandler("onClientFocus",_161);
},raise_onClientFocus:function(e){
var _163=new Telerik.Web.UI.RadComboBoxEventArgs(e);
this.raiseEvent("onClientFocus",_163);
},add_onClientBlur:function(_164){
this.get_events().addHandler("onClientBlur",_164);
},remove_onClientBlur:function(_165){
this.get_events().removeHandler("onClientBlur",_165);
},raise_onClientBlur:function(e){
var _167=new Telerik.Web.UI.RadComboBoxEventArgs(e);
this.raiseEvent("onClientBlur",_167);
},add_onClientKeyPressing:function(_168){
this.get_events().addHandler("keyPressing",_168);
},remove_onClientKeyPressing:function(_169){
this.get_events().removeHandler("keyPressing",_169);
},raise_onClientKeyPressing:function(e){
var _16b=new Telerik.Web.UI.RadComboBoxEventArgs(e);
this.raiseEvent("keyPressing",_16b);
},add_load:function(_16c){
this.get_events().addHandler("load",_16c);
},remove_load:function(_16d){
this.get_events().removeHandler("load",_16d);
},_logInserted:function(item){
if(!item.get_parent()._childControlsCreated||!this._enableClientStatePersistence){
return;
}
this._log.logInsert(item);
},saveClientState:function(){
var _16f=this._log._logEntries;
var _170={logEntries:_16f,value:this._value,text:this._text,enabled:this._enabled};
return Sys.Serialization.JavaScriptSerializer.serialize(_170);
},requestItems:function(text,_172){
if(this._disposed){
return;
}
if((_172)&&(this._pendingAjaxRequestsCount>0)){
return;
}
this._ensureChildControls();
text=text.replace(/'/g,"&squote");
this._ajaxRequest=true;
var _173={};
this.set_appendItems(_172);
_173.Text=text;
_173.NumberOfItems=0;
if(this.get_appendItems()){
_173.NumberOfItems=this.get_items().get_count();
}
var _174=new Telerik.Web.UI.RadComboBoxRequestCancelEventArgs(text,_173);
this.raiseEvent("itemsRequesting",_174);
if(_174.get_cancel()){
this._ajaxRequest=false;
return;
}
if(this.get_highlightedItem()){
this.get_highlightedItem().unHighlight();
}
if(!this._loadingDiv){
this._loadingDiv=document.createElement("li");
this._loadingDiv.className="rcbLoading";
this._loadingDiv.id=this.get_id()+"_LoadingDiv";
this._loadingDiv.innerHTML=this.get_loadingMessage();
if(!this.get_childListElement()){
this._createChildListElement();
}
this.get_childListElement().insertBefore(this._loadingDiv,this.get_childListElement().firstChild);
}
text=encodeURIComponent(text);
this._callbacktext=text;
this._pendingAjaxRequestsCount++;
if(this.get_webServiceSettings().get_method()){
this._doLoadOnDemandFromWebService(text,_173);
}else{
this._doLoadOnDemand(text,_173);
}
},_doLoadOnDemand:function(text,_176){
var _177=0;
if(this.get_appendItems()){
_177=this.get_items().get_count();
}
var _178={Command:"LOD",Text:text,ClientState:this._clientState,Context:_176,NumberOfItems:_177};
var _179=Function.createDelegate(this,this._onCallbackResponse);
var _17a=Function.createDelegate(this,this._onErrorReceived);
if(this.get_enableItemCaching()&&this.lodHashTable[text+"$"+_177]!=null){
this._onCallbackResponse(this.lodHashTable[text+"$"+_177]);
}else{
WebForm_DoCallback(this._uniqueId,Sys.Serialization.JavaScriptSerializer.serialize(_178),_179,text,_17a,true);
}
},_onCallbackResponse:function(_17b){
if(this._disposed){
return;
}
this._pendingAjaxRequestsCount--;
this.set_selectedItem(null);
this.set_highlightedItem(null);
var _17c=this._children.get_count();
var text=this.get_text();
var _17e=0;
var _17f=_17b.split("_$$_")[4];
if(this._pendingAjaxRequestsCount==0){
if(_17f!=this._callbacktext){
this.requestItems(this._callbacktext,this.get_appendItems());
return;
}
}
if(this.get_appendItems()){
_17e=this.get_items().get_count();
}
if(this.get_enableItemCaching()&&this.lodHashTable[_17f+"$"+_17e]==null){
this.lodHashTable[_17f+"$"+_17e]=_17b;
}
var _180=_17b.split("_$$_");
var _181;
if(_180[0]=="[]"){
_181=null;
}else{
_181=eval(_180[0]);
}
if(_180[3]=="True"){
this._endOfItems=true;
}else{
this._endOfItems=false;
}
if(this.get_appendItems()&&this._itemData&&_181){
Array.addRange(this._itemData,_181);
}else{
this._itemData=_181;
}
if(this._loadingDiv){
if(this._loadingDiv.parentNode){
this._loadingDiv.parentNode.removeChild(this._loadingDiv);
}
this._loadingDiv=null;
}
var _182=this.get_childListElement();
if(!_182){
_182=this._createChildListElement();
}
this._childControlsCreated=true;
var _183=$telerik.getFirstChildByTagName(_182,"div",0);
if(_183){
_183.parentNode.removeChild(_183);
}
if(this.get_appendItems()){
var _184=document.createElement("ul");
_184.innerHTML=_180[1];
var _185=$telerik.getChildrenByTagName(_184,"li");
var _186=_185.length;
for(var i=0;i<_186;i++){
_182.appendChild(_185[i]);
this._childControlsCreated=false;
var item=new Telerik.Web.UI.RadComboBoxItem();
this._children.add(item);
item._initialize(_181[i],_185[i]);
}
}else{
this._children.clear();
_182.innerHTML=_180[1];
this._childControlsCreated=false;
this._createChildControls();
}
this._childControlsCreated=true;
this._restoreSelectionAfterRequest();
this.set_showMoreMessage(_180[2]);
this._setUpDropDownAfterRequest(this.get_text(),_182,_17c);
},_restoreSelectionAfterRequest:function(){
var _189=this.findItemByValue(this.get_value());
if(_189&&_189.get_enabled()&&(!_189.get_isSeparator())){
_189.set_selected(true);
_189.highlight();
this.set_selectedItem(_189);
}
},clearCache:function(){
this.lodHashTable={};
},_setUpScroll:function(_18a,_18b){
var _18c=22;
var _18d=this.get_items().get_count();
if(_18d>0){
_18c=this.get_items().getItem(0).get_element().offsetHeight;
}
if(_18a){
var _18e=$telerik.getFirstChildByTagName(_18b,"div",0);
if(_18e){
_18e.parentNode.removeChild(_18e);
}
}else{
var _18e=document.createElement("div");
if(this._height==""&&this._maxHeight!=""){
_18e.style.height=this._maxHeight+"px";
}else{
_18e.style.height=this.get_childListElementWrapper().offsetHeight+"px";
}
_18b.appendChild(_18e);
}
},_onErrorReceived:function(_18f,text){
if(this._requestTimeoutID>0){
window.clearTimeout(this._requestTimeoutID);
this._requestTimeoutID=0;
}
var _191=this._extractErrorMessage(_18f);
if(this.raise_itemsRequestFailed(text,_191,null)==true){
return;
}
alert(_191);
},_initializeWebServiceLoader:function(){
this._webServiceLoader=new Telerik.Web.UI.WebServiceLoader(this.get_webServiceSettings());
this._webServiceLoader.add_loadingSuccess(Function.createDelegate(this,this._onWebServiceResponse));
this._webServiceLoader.add_loadingError(Function.createDelegate(this,this._onWebServiceError));
},_doLoadOnDemandFromWebService:function(text,_193){
if(!this._webServiceLoader){
this._initializeWebServiceLoader();
}
var _194={context:_193};
if(this.get_webServiceSettings().get_isWcf()){
_194.context=this._webServiceLoader._serializeDictionaryAsKeyValuePairs(_194.context);
}
var _195=_193.NumberOfItems;
if(this.get_enableItemCaching()&&this.lodHashTable[text+"$"+_195]!=null){
this._addNewItems(text,this.lodHashTable[text+"$"+_195]);
}else{
this._webServiceLoader.loadData(_194,text);
}
},_onWebServiceResponse:function(_196,_197){
this._pendingAjaxRequestsCount--;
var _198=_197.get_data();
var text=_197.get_context();
var _19a=0;
if(this.get_appendItems()){
_19a=this.get_items().get_count();
}
if(this._pendingAjaxRequestsCount==0){
if(text!=this._callbacktext){
this.requestItems(this._callbacktext,this.get_appendItems());
return;
}
}
if(this.get_enableItemCaching()){
this.lodHashTable[text+"$"+_19a]=_198;
}
this._addNewItems(text,_198);
},_addNewItems:function(text,_19c){
this.set_selectedItem(null);
this.set_highlightedItem(null);
this._childControlsCreated=true;
var _19d=this.get_items().get_count();
if(this._loadingDiv){
if(this._loadingDiv.parentNode){
this._loadingDiv.parentNode.removeChild(this._loadingDiv);
}
this._loadingDiv=null;
}
if(!this.get_appendItems()){
this.clearItems();
}
var _19e=this.get_childListElement();
if(!_19e){
_19e=this._createChildListElement();
}
if(this._virtualScroll){
this._setUpScroll(true,_19e);
}
var _19f=null;
if(Array.prototype.isPrototypeOf(_19c)){
_19f=_19c;
}else{
_19f=_19c.Items;
this._endOfItems=_19c.EndOfItems;
this._showMoreMessage=_19c.Message;
}
this._childControlsCreated=false;
var wcf=this.get_webServiceSettings().get_isWcf();
var html=[];
for(var i=0,_1a3=_19f.length;i<_1a3;i++){
var item=new Telerik.Web.UI.RadComboBoxItem();
var data=_19f[i];
item._loadFromDictionary(data,wcf);
this._children.add(item);
item._render(html);
}
this._childControlsCreated=true;
if(this.get_appendItems()){
_19e.innerHTML=_19e.innerHTML+html.join("");
}else{
_19e.innerHTML=html.join("");
}
var _1a6=this.get_events().getHandler("itemDataBound");
var _1a7=$telerik.getChildrenByTagName(_19e,"li");
for(var i=0,_1a3=this._children.get_count();i<_1a3;i++){
var item=this._children.getItem(i);
item.set_element(_1a7[i]);
if(_1a6){
var _1a8=new Telerik.Web.UI.RadComboBoxItemDataBoundEventArgs(item,_19f[i]);
this.raiseEvent("itemDataBound",_1a8);
}
}
this._setUpDropDownAfterRequest(text,_19e,_19d);
},_setUpDropDownAfterRequest:function(text,_1aa,_1ab){
if(this._virtualScroll){
this._setUpScroll(this._endOfItems,_1aa);
}
if(this.get_appendItems()){
if(this.get_items().getItem(_1ab+1)!=null){
this.get_items().getItem(_1ab+1).scrollIntoView();
}
}
if(this._showMoreResultsBox&&this.get_moreResultsBoxMessageElement()){
this.get_moreResultsBoxMessageElement().innerHTML=this.get_showMoreMessage();
}
this.raise_itemsRequested(text,null);
if(this.get_filter()==Telerik.Web.UI.RadComboBoxFilter.None){
this.highlightMatches();
}else{
this.highlightAllMatches(this.get_text());
}
if(this.get_dropDownVisible()){
this._skipDropDownPositioning=true;
if(this._slide){
this._slide.updateSize();
}
this._skipDropDownPositioning=null;
this._positionDropDown();
}
this._ajaxRequest=false;
},_onWebServiceError:function(_1ac,_1ad){
var _1ae=_1ad.get_message();
var text=_1ad.get_context();
this._onErrorReceived(_1ae,text);
}};
Telerik.Web.UI.RadComboBox._preInitialize=function(_1b0){
var _1b1=$get(_1b0);
if($telerik.isIE6||$telerik.isIE7){
_1b1.style.display="inline";
}else{
if($telerik.isFirefox2){
_1b1.style.display="-moz-inline-stack";
}else{
_1b1.style.display="inline-block";
}
}
};
Telerik.Web.UI.RadComboBox.registerClass("Telerik.Web.UI.RadComboBox",Telerik.Web.UI.ControlItemContainer);
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.RadComboBoxItem=function(){
Telerik.Web.UI.RadComboBoxItem.initializeBase(this);
};
Telerik.Web.UI.RadComboBoxItem.prototype={_shouldInitializeChild:function(_1b2){
return false;
},get_text:function(){
if(this._text!==null){
return this._removeEmTags(this._text);
}
if((this._text=this._properties.getValue("text",null))!=null){
return this._removeEmTags(this._text);
}
if(!this.get_element()){
return "";
}
var _1b3=this.get_textElement();
if(!_1b3){
return "";
}
if(typeof (_1b3.innerText)!="undefined"){
this._text=_1b3.innerText;
}else{
this._text=_1b3.textContent;
}
if($telerik.isSafari2){
this._text=_1b3.innerHTML;
}
return this._removeEmTags(this._text);
},get_baseText:function(){
return Telerik.Web.UI.RadComboBoxItem.callBaseMethod(this,"get_text");
},_removeEmTags:function(text){
var _1b5=text.indexOf("<em>");
var _1b6=text.indexOf("</em>");
if(_1b5>=0&&_1b6>_1b5){
text=String.format("{0}{1}{2}",text.substr(0,_1b5),text.substr(_1b5+4,_1b6-_1b5-4),text.substr(_1b6+5));
}
return text;
},set_visible:function(_1b7){
var _1b8=this.get_visible()!=_1b7;
if(!_1b8){
return;
}
Telerik.Web.UI.RadComboBoxItem.callBaseMethod(this,"set_visible",[_1b7]);
if(_1b7){
this.get_element().style.display="";
}else{
this.get_element().style.display="none";
}
},_markText:function(text){
var _1ba=this.get_comboBox();
var _1bb=this.get_baseText();
var _1bc=this.get_text();
if(!_1ba.get_isTemplated()){
this.set_text(_1bc);
this.get_element().innerHTML=Telerik.Web.UI.RadComboBox.htmlEncode(_1bc);
}
_1bb=_1bc;
var _1bd=_1bb.toLowerCase().indexOf(text.toLowerCase());
var _1be=_1ba.get_filter()==Telerik.Web.UI.RadComboBoxFilter.Contains&&_1bd>=0;
var _1bf=_1ba.get_filter()==Telerik.Web.UI.RadComboBoxFilter.StartsWith&&_1bd==0;
if(_1be||_1bf){
if(text!=""&&!_1ba.get_isTemplated()){
var _1c0="{0}<em>{1}</em>{2}";
var _1c1=_1bb.substr(0,_1bd);
var _1c2=_1bb.substring(_1bd,_1bd+text.length);
var _1c3=_1bb.substr(_1bd+text.length);
var _1c4=String.format(_1c0,_1c1,_1c2,_1c3);
this.set_text(_1c4);
this.get_element().innerHTML=String.format(_1c0,Telerik.Web.UI.RadComboBox.htmlEncode(_1c1),Telerik.Web.UI.RadComboBox.htmlEncode(_1c2),Telerik.Web.UI.RadComboBox.htmlEncode(_1c3));
}
this.set_visible(true);
}else{
this.set_visible(false);
}
},_render:function(html){
html[html.length]="<li class='";
if(this.get_enabled()){
if(this.get_isSeparator()){
html[html.length]="rcbItem rcbSeparator'>";
}else{
html[html.length]="rcbItem'>";
}
}else{
html[html.length]="rcbDisabled'>";
}
if(this.get_imageUrl()){
this._renderImage(html);
}
html[html.length]=this.get_text();
html[html.length]="</li>";
},_renderImage:function(html){
html[html.length]="<img alt='' src='"+this.get_imageUrl()+"' class='rcbImage'";
if(!this.get_enabled()){
html[html.length]=" disabled='disabled'";
}
html[html.length]="/>";
return html;
},_updateImageSrc:function(){
var _1c7=this.get_imageUrl();
if(!this.get_enabled()&&this.get_disabledImageUrl()){
_1c7=this.get_disabledImageUrl();
}
if(_1c7&&this.get_element()){
var _1c8=this.get_imageElement();
if(!_1c8){
_1c8=this._createImageElement();
}
_1c7=_1c7.replace(/&amp;/ig,"&");
if(_1c7!=_1c8.src){
_1c8.src=_1c7;
}
}
},_createImageElement:function(){
this._imageElement=document.createElement("img");
this._imageElement.className="rcbImage";
if(!this.get_enabled()){
this._imageElement.disabled="disabled";
}
var _1c9=this.get_element();
if(_1c9.firstChild){
_1c9.insertBefore(this._imageElement,_1c9.firstChild);
}else{
_1c9.appendChild(this._imageElement);
}
return this._imageElement;
},get_imageElement:function(){
if(!this._imageElement){
var _1ca=this.get_element();
this._imageElement=$telerik.getFirstChildByTagName(_1ca,"img",0);
}
return this._imageElement;
},get_disabledImageUrl:function(){
return this._properties.getValue("disabledImageUrl",null);
},set_disabledImageUrl:function(_1cb){
this._properties.setValue("disabledImageUrl",_1cb,true);
this._updateImageSrc();
},get_imageUrl:function(){
if(this._imageUrl=this._properties.getValue("imageUrl",null)){
return this._imageUrl;
}
if(!this._imageUrl){
var _1cc=this.get_imageElement();
if(_1cc){
this._imageUrl=_1cc.src;
}
}
return this._imageUrl;
},set_imageUrl:function(_1cd){
this._imageUrl=_1cd;
this._properties.setValue("imageUrl",_1cd,true);
this._updateImageSrc();
},get_value:function(){
return this._properties.getValue("value","");
},select:function(){
this._select(null);
},hide:function(){
this.set_visible(false);
},show:function(){
this.set_visible(true);
},_select:function(e){
if(!this.get_isEnabled()||this.get_isSeparator()){
return;
}
var _1cf=this.get_comboBox();
if(_1cf.raise_selectedIndexChanging(this,e)==true){
return;
}
var text=_1cf.get_text();
var _1d1=_1cf._getLastSeparatorIndex(text);
var _1d2=text.substring(0,_1d1+1)+this.get_text();
_1cf.set_text(_1d2);
_1cf.set_originalText(_1d2);
_1cf.set_value(this.get_value());
_1cf.set_selectedItem(this);
_1cf.set_selectedIndex(this.get_index());
this.set_selected(true);
this.highlight();
_1cf.raise_selectedIndexChanged(this,e);
var _1d3={Command:"Select",Index:this.get_index()};
_1cf.postback(_1d3);
},_createChildControls:function(){
},unHighlight:function(){
var _1d4=this.get_comboBox();
if(!_1d4.get_isTemplated()||_1d4.get_highlightTemplatedItems()){
this._replaceCssClass(this.get_element(),"rcbHovered","rcbItem");
}
_1d4.set_highlightedItem(null);
},highlight:function(){
if(!this.get_isEnabled()||this.get_isSeparator()){
return;
}
var _1d5=this.get_comboBox();
if(!_1d5.get_isTemplated()||_1d5.get_highlightTemplatedItems()){
var _1d6=_1d5.get_highlightedItem();
if(_1d6){
_1d6.unHighlight();
}
var _1d7=this.get_element();
if(_1d7){
this._replaceCssClass(_1d7,"rcbItem","rcbHovered");
}
}
_1d5.set_highlightedItem(this);
},scrollOnTop:function(){
var _1d8=this.get_element().offsetTop;
var _1d9=this.get_comboBox();
var _1da=_1d9._getHeaderElement();
if(_1da){
_1d8=_1d8-_1da.offsetHeight;
}
_1d9.get_childListElementWrapper().scrollTop=_1d8;
},scrollIntoView:function(){
var _1db=this.get_element().offsetTop;
var _1dc=this.get_element().offsetHeight;
var _1dd=this.get_comboBox().get_childListElementWrapper();
var _1de=_1dd.scrollTop;
var _1df=_1dd.offsetHeight;
if(_1db+_1dc>_1de+_1df){
_1dd.scrollTop=_1db+_1dc-_1df;
if(_1dd.clientWidth<_1dd.scrollWidth){
var _1e0=Telerik.Web.UI.RadComboBox._getScrollBarWidth();
_1dd.scrollTop+=_1e0;
}
}else{
if(_1db+_1dc<=_1de){
_1dd.scrollTop=_1db;
}
}
},nextItem:function(){
return this.get_comboBox().get_items().getItem(this.get_index()+1);
},_replaceCssClass:function(_1e1,_1e2,_1e3){
_1e1.className=_1e1.className.replace(_1e2,_1e3);
},_createChildListElement:function(){
var _1e4=document.createElement("ul");
this.get_combobox().get_dropDownElement().appendChild(_1e4);
},set_selected:function(_1e5){
this._properties.setValue("selected",_1e5);
},get_selected:function(){
return this._properties.getValue("selected",false);
},get_highlighted:function(){
var _1e6=this.get_comboBox();
if(!_1e6){
return false;
}
return _1e6.get_highlightedItem()==this;
},disable:function(){
this.set_enabled(false);
this.get_element().className="rcbDisabled";
},enable:function(){
this.set_enabled(true);
this.get_element().className="rcbItem";
},set_enabled:function(_1e7){
this._properties.setValue("enabled",_1e7,true);
this._updateImageSrc();
},get_textElement:function(){
return this.get_element();
},get_comboBox:function(){
return this._parent;
},_getHierarchicalIndex:function(){
return this.get_index();
},get_isSeparator:function(){
return this._properties.getValue("isSeparator",false);
},set_isSeparator:function(_1e8){
this._properties.setValue("isSeparator",_1e8,true);
if(this.get_element()){
Sys.UI.DomElement.toggleCssClass(this.get_element(),"rcbSeparator");
}
}};
Telerik.Web.UI.RadComboBoxItem.registerClass("Telerik.Web.UI.RadComboBoxItem",Telerik.Web.UI.ControlItem);
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.RadComboBoxItemCollection=function(_1e9){
Telerik.Web.UI.RadComboBoxItemCollection.initializeBase(this,[_1e9]);
};
Telerik.Web.UI.RadComboBoxItemCollection.registerClass("Telerik.Web.UI.RadComboBoxItemCollection",Telerik.Web.UI.ControlItemCollection);


/* END Telerik.Web.UI.ComboBox.RadComboBoxScripts.js */
/* START Telerik.Web.UI.FormDecorator.RadFormDecorator.js */
if(typeof HTMLElement!="undefined"&&!HTMLElement.prototype.insertAdjacentElement){
HTMLElement.prototype.insertAdjacentElement=function(_1,_2){
switch(_1){
case "beforeBegin":
this.parentNode.insertBefore(_2,this);
break;
case "afterBegin":
this.insertBefore(_2,this.firstChild);
break;
case "beforeEnd":
this.appendChild(_2);
break;
case "afterEnd":
if(this.nextSibling){
this.parentNode.insertBefore(_2,this.nextSibling);
}else{
this.parentNode.appendChild(_2);
}
break;
}
};
}
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.RadFormDecorator=function(_3){
Telerik.Web.UI.RadFormDecorator.initializeBase(this,[_3]);
this._skin="Default";
this._enableRoundedCorners=true;
this._formDecoratorCssUrl="";
this._decorationZoneID=null;
this._decoratedControls=Telerik.Web.UI.FormDecoratorDecoratedControls.Default;
this._arcLength=3;
this._decoratedElements=[];
};
Telerik.Web.UI.RadFormDecorator._globalReplaceSetters=function(_4){
if($telerik.isIE){
return;
}
var _5=Telerik.Web.UI.RadFormDecorator;
var _6=_4.__lookupSetter__("checked");
if(_6){
_4.__defineSetter__("rfd_checked",_6);
_4.__defineSetter__("checked",_5._globalInputChecked);
}
var _7=_4.__lookupSetter__("disabled");
if(_7){
_4.__defineSetter__("rfd_disabled",_7);
_4.__defineSetter__("disabled",_5._globalInputDisabled);
}
if($telerik.isSafari){
_4.__defineSetter__("safarichecked",_5._globalInputChecked);
_4.__defineSetter__("safaridisabled",_5._globalInputDisabled);
}
};
Telerik.Web.UI.RadFormDecorator._globalInputChecked=function(_8){
this.rfd_checked=_8;
Telerik.Web.UI.RadFormDecorator.prototype.set_elementChecked(this,_8);
};
Telerik.Web.UI.RadFormDecorator._globalInputDisabled=function(_9){
this.rfd_disabled=_9;
Telerik.Web.UI.RadFormDecorator.prototype.set_elementDisabled(this,_9);
};
Telerik.Web.UI.RadFormDecorator.getDecoratedElement=function(_a){
var _b=document.getElementById(_a);
return document.getElementById(_b._rfddecoratedID);
};
Telerik.Web.UI.RadFormDecorator.set_enabled=function(_c,_d){
_c.disabled=!_d;
var _e=this.getDecoratedElement(_c.id);
if(!_e){
return;
}
var _f=function(_10,_11){
if(_11){
Sys.UI.DomElement.removeCssClass(_e,_10);
}else{
Sys.UI.DomElement.addCssClass(_e,_10);
}
};
switch(_c.tagName){
case "INPUT":
case "BUTTON":
_f("rfdInputDisabled",_d);
break;
case "SELECT":
_f("rfdSelectDisabled",_d);
break;
}
};
if(typeof (HTMLInputElement)!="undefined"){
var decoratorClass=Telerik.Web.UI.RadFormDecorator;
decoratorClass._globalReplaceSetters(HTMLInputElement.prototype);
decoratorClass._globalReplaceSetters(HTMLButtonElement.prototype);
}
Telerik.Web.UI.RadFormDecorator.initializePage=function(_12,_13,_14){
var _15=document.createElement("style");
_15.id=_12+"_hiddenInputsStyle";
var _16=document.getElementsByTagName("head")[0];
_16.appendChild(_15);
var _17="input, textarea, button, select { visibility: hidden !important; }";
_17+="input, textarea, fieldset { border-color: transparent; border-width:1px; border-style:solid; }";
_17+=" label { line-height:18px;}";
if($telerik.isIE){
try{
if(_15.styleSheet){
_15.styleSheet.cssText=_17;
}
}
catch(ex){
}
}else{
_15[$telerik.isSafari?"innerText":"innerHTML"]=_17;
}
if(_13){
return;
}
var _18="rfd"+_14;
try{
Sys.UI.DomElement.addCssClass(document.documentElement,_18);
}
catch(ex){
}
};
Telerik.Web.UI.RadFormDecorator.prototype={initialize:function(){
var _19=this.get_decorationZoneID();
if(_19){
var _1a=$get(_19);
if(_1a){
this.decorate(_1a);
}else{
return;
}
}else{
this.decorate();
}
this._showHiddenInputs();
window.setTimeout(Function.createDelegate(this,function(){
this._trackPageUpdates();
}),0);
},_showHiddenInputs:function(){
var _1b=$get(this.get_id()+"_hiddenInputsStyle");
if(_1b){
_1b.parentNode.removeChild(_1b);
}
if(!$telerik.isIE){
return;
}
var _1c=document.getElementsByTagName("INPUT");
for(var i=0;i<_1c.length;i++){
var _1e=_1c[i];
_1e.style.zoom="1";
_1e.style.zoom="";
}
},decorate:function(_1f){
var _20=_1f;
if(!_1f){
_1f=$telerik.quirksMode?document.body:document.documentElement;
_20=(document.forms&&document.forms.length>0)?document.forms[0]:document.body;
}
Sys.UI.DomElement.addCssClass(_1f,"RadForm_"+this._skin);
if($telerik.isRightToLeft(_20)){
Sys.UI.DomElement.addCssClass(_20,"rfdRtl");
}
var _21=Telerik.Web.UI.FormDecoratorDecoratedControls;
if((this._decoratedControls&_21.CheckBoxes)>0){
this.decorateInputs("checkbox",_1f);
}
if((this._decoratedControls&_21.RadioButtons)>0){
this.decorateInputs("radio",_1f);
}
if((this._decoratedControls&_21.Buttons)>0){
this.decorateButtons(_1f);
}
if((this._decoratedControls&_21.Scrollbars)>0){
Sys.UI.DomElement.addCssClass(_1f,"rfdScrollBars");
}
if((this._decoratedControls&_21.Zone)>0){
Sys.UI.DomElement.addCssClass(_1f,"rfdZone");
}
if((this._decoratedControls&_21.Label)>0){
this._decorateElementList(_1f,"label","rfdLabel");
}
if((this._decoratedControls&_21.H4H5H6)>0){
this._decorateElementList(_1f,"h4","rfdH4");
this._decorateElementList(_1f,"h5","rfdH5");
this._decorateElementList(_1f,"h6","rfdH6");
}
if((this._decoratedControls&_21.Select)>0){
this.decorateSelects(_1f);
}
this._decorateElementsWithVerticalCorners(_1f);
},_decorateElementsWithVerticalCorners:function(_22){
var _23=Telerik.Web.UI.FormDecoratorDecoratedControls;
if((this._decoratedControls&_23.Textbox)>0){
this.decorateTextboxes(_22);
}
if((this._decoratedControls&_23.Textarea)>0){
this._decorateVertically(_22,"textarea");
}
if((this._decoratedControls&_23.Fieldset)>0){
this._decorateVertically(_22,"fieldset");
}
},decorateTextboxes:function(_24){
if(!_24){
_24=document.body;
}
var _25=_24.getElementsByTagName("input");
var _26=_25.length;
for(var i=0;i<_26;i++){
var box=_25[i];
var _29=box.type;
if(_29=="text"||_29=="password"){
this.createVerticalRoundedCorners(box);
}
}
},_decorateVertically:function(_2a,_2b){
if(!_2a){
_2a=document.body;
}
var _2c=_2a.getElementsByTagName(_2b);
var _2d=_2c.length;
for(var i=_2d-1;i>=0;i--){
this.createVerticalRoundedCorners(_2c[i]);
}
},_decorateElementList:function(_2f,_30,_31){
if(!_2f){
_2f=document.body;
}
var _32=_2f.getElementsByTagName(_30);
var _33=_32.length;
for(var i=0;i<_33;i++){
var _35=_32[i];
if(!_35.className){
_35.className=_31;
}
}
},runWhenParentBecomesVisible:function(e){
var _37=e.target;
this.remove_parentShowing(_37);
_37.style.visibility="hidden";
this._decorateElementsWithVerticalCorners(_37);
this._decorateSelectsOnParentShowing(_37);
_37.style.visibility="";
},clearParentShowingHandlers:function(){
if(!this._invisibleParentsArray){
return;
}
var _38=this._invisibleParentsArray;
for(var i=0;i<_38.length;i++){
this.remove_parentShowing(_38[i]);
}
this._invisibleParentsArray=[];
},remove_parentShowing:function(_3a){
if(this._invisibleParentsArray){
Array.remove(this._invisibleParentsArray,_3a);
}
this._handleInvisibleParent(false,_3a);
},add_parentShowing:function(_3b){
var _3c=this._getInvisibleParent(_3b);
if(!_3c){
return;
}
if(!this._invisibleParentsArray){
this._invisibleParentsArray=[];
}
if(!Array.contains(this._invisibleParentsArray,_3c)){
Array.add(this._invisibleParentsArray,_3c);
this._handleInvisibleParent(true,_3c);
}
},_getInvisibleParent:function(_3d){
var _3e=_3d;
while(_3e&&_3e!=document){
if("none"==$telerik.getCurrentStyle(_3e,"display","")){
return _3e;
}
_3e=_3e.parentNode;
}
return null;
},_handleInvisibleParent:function(_3f,_40){
if(!this._onParentVisibilityChangeDelegate){
this._onParentVisibilityChangeDelegate=Function.createDelegate(this,this._onParentVisibilityChange);
}
var _41=this._onParentVisibilityChangeDelegate;
if(_3f){
if(_40){
if($telerik.isIE){
$addHandler(_40,"propertychange",_41);
}else{
_40.addEventListener("DOMAttrModified",_41,false);
}
}
}else{
if(_40&&_41){
if($telerik.isIE){
$removeHandler(_40,"propertychange",_41);
}else{
_40.removeEventListener("DOMAttrModified",_41,false);
}
}
}
},_onParentVisibilityChange:function(e){
if($telerik.isIE){
var e=e.rawEvent;
if(!e){
return;
}
var _43=e.srcElement;
if(e.propertyName=="style.display"||e.propertyName=="className"){
var _44=$telerik.getCurrentStyle(_43,"display");
if(_44!="none"){
e.target=_43;
this.runWhenParentBecomesVisible(e);
}
}
}else{
if(e.attrName=="style"||e.attrName=="class"){
var _45=e.target;
if((e.currentTarget==e.target)&&("none"!=$telerik.getCurrentStyle(_45,"display"))){
window.setTimeout(Function.createDelegate(this,function(){
this.runWhenParentBecomesVisible(e);
}),0);
}
}
}
},_trackPageUpdates:function(){
if(Sys.WebForms){
this._pageLoadedHandler=Function.createDelegate(this,function(_46,_47){
var _48=_47.get_panelsUpdated();
if(!_48){
return;
}
for(var i=0;i<_48.length;i++){
var _4a=_48[i];
var _4b=this.get_decorationZoneID();
if(_4b){
var _4c=$get(_4b);
if(_4c){
var _4d=$telerik.isDescendantOrSelf(_4a,_4c);
if(_4d){
this.decorate(_4c);
}else{
if($telerik.isDescendantOrSelf(_4c,_4a)){
this.decorate(_4a);
}
}
}
}else{
this.decorate(_4a);
}
}
});
var prm=Sys.WebForms.PageRequestManager.getInstance();
prm.add_pageLoaded(this._pageLoadedHandler);
}
},createVerticalRoundedCorners:function(_4f){
var _50=_4f.tagName;
var _51="rfd"+_50.charAt(0)+_50.substring(1).toLowerCase();
if(_4f.className&&_4f.className!=_51){
return;
}
_4f.className=_51;
if(!this.get_enableRoundedCorners()){
return;
}
if($telerik.isFirefox||$telerik.isSafari){
Sys.UI.DomElement.addCssClass(_4f,"rfdRoundedCorners");
return;
}
var _52=_4f.offsetHeight;
if(_52>0){
this._wrapWithRoundedCorners(_4f);
}else{
this.add_parentShowing(_4f);
}
},_wrapWithRoundedCorners:function(_53){
var _54=this._arcLength;
var _55=this._getWrapperTable(_54);
var _56=_55.rows[0].cells[_54];
_55.className=_53.tagName!="FIELDSET"?"rfdRoundedWrapper":"rfdRoundedWrapper_fieldset";
if($telerik.isFirefox){
_55.style.display="block";
}
var _57=_55.style;
_57.marginLeft=$telerik.getCurrentStyle(_53,"marginLeft");
_57.marginRight=$telerik.getCurrentStyle(_53,"marginRight");
_57.marginTop=$telerik.getCurrentStyle(_53,"marginTop");
_57.marginBottom=$telerik.getCurrentStyle(_53,"marginBottom");
_53.style.margin="0";
var _58=_53.parentNode;
_58.replaceChild(_55,_53);
_56.appendChild(_53);
if($telerik.isOpera){
_53.style.borderLeftWidth="0px";
_53.style.borderRightWidth="0px";
}
var _59=$telerik.getCurrentStyle(_53,"fontSize");
var _5a=$telerik.getCurrentStyle(_53,"lineHeight");
if($telerik.isSafari&&_53.tagName=="INPUT"){
_53.style.lineHeight=(_53.offsetHeight-2)+"px";
}
var _5b=_53.offsetHeight;
if(_53.tagName!="FIELDSET"){
_56.style.fontSize="1px";
}
if(_5b%2){
if(!$telerik.isIE&&!$telerik.isOpera){
_5b+=1;
}
}
var _5c=0;
if(_53.tagName=="FIELDSET"){
var _5d=_53.getElementsByTagName("LEGEND")[0];
if(_5d){
var _5e=_5d.offsetHeight;
if($telerik.isFirefox||$telerik.isSafari){
_5e-=1;
}
_5c=Math.floor(_5e/2);
if($telerik.isIE){
var _5f=$telerik.getCurrentStyle(_53,"backgroundImage");
if(_5f){
_53.style.backgroundPosition="0px "+_5c+"px";
}
}
}
}
_5b-=_5c;
var _60=2;
var _61=_5b-_54*2+_60-($telerik.isIE?0:1);
var _62=_61;
var _63=$telerik.getCurrentStyle(_53,"borderTopColor");
var _64=$telerik.getCurrentStyle(_53,"backgroundColor");
var _5f=$telerik.getCurrentStyle(_53,"backgroundImage");
var _65=$telerik.getCurrentStyle(_53,"opacity");
var _66=$telerik.getCurrentStyle(_53,"filter");
var _67=_55.rows[0].cells;
var _68=_67.length-1;
for(var i=1;i<_68;i++){
if(i==_54){
_60=-_60;
_62+=_60;
continue;
}
var _6a=_67[i].firstChild.style;
if(_5c){
_6a.marginTop=_5c+"px";
}
_6a.backgroundColor=_64;
_6a.backgroundImage=_5f;
_6a.borderTop=_6a.borderBottom="solid 1px "+_63;
_6a.height=_62+"px";
if(1!=_65){
_6a.opacity=_65;
}
_6a.filter=_66;
_62+=_60;
}
if($telerik.isFirefox){
_55.style.display="";
}
var _6b=_67[0].firstChild.style;
var _6c=_67[_68].firstChild.style;
_6b.height=_61+"px";
_6b.backgroundColor=_63;
if(_5c){
_6b.marginTop=_5c+"px";
}
if(1!=_65){
_6b.opacity=_65;
}
_6b.filter=_66;
_6c.height=_6b.height;
_6c.backgroundColor=_6b.backgroundColor;
_6c.marginTop=_6b.marginTop;
_6c.opacity=_6b.opacity;
_6c.filter=_6b.filter;
var _57=_53.style;
_57.borderLeftWidth="0px";
_57.borderRightWidth="0px";
},_getWrapperTable:function(_6d){
var _6d=this._arcLength;
if(!this._textboxWrapper){
var _6e=document.createElement("TABLE");
_6e.cellSpacing=0;
_6e.cellPadding=0;
_6e.insertRow(-1);
var _6f=document.createElement("DIV");
_6f.innerHTML="&nbsp;";
_6f.className="rfdRoundedOuter";
var _70=document.createElement("DIV");
_70.className="rfdRoundedInner";
_70.innerHTML="&nbsp;";
var row=_6e.rows[0];
row.insertCell(-1).appendChild(_6f);
for(var i=1;i<_6d*2;i++){
var _73=row.insertCell(-1);
if(i==_6d){
continue;
}
_73.appendChild(_70.cloneNode(true));
}
row.insertCell(-1).appendChild(_6f.cloneNode(true));
this._textboxWrapper=_6e;
}
return this._textboxWrapper.cloneNode(true);
},dispose:function(){
this.disposeHandlers();
if(this._pageLoadedHandler){
var prm=Sys.WebForms.PageRequestManager.getInstance();
prm.remove_pageLoaded(this._pageLoadedHandler);
this._pageLoadedHandler=null;
}
Telerik.Web.UI.RadFormDecorator.callBaseMethod(this,"dispose");
},disposeHandlers:function(){
var _75=this._decoratedElements;
for(var i=0,_77=_75.length;i<_77;i++){
$clearHandlers(_75[i]);
if(Sys.UI.DomElement.containsCssClass(_75[i],"rfdSelect")){
this.disposeSelectHandlers(_75[i],false);
}else{
if(Sys.UI.DomElement.containsCssClass(_75[i],"rfdSelectBox")){
this.disposeSelectHandlers(_75[i],true);
}
}
}
this._decoratedElements=[];
},disposeSelectHandlers:function(_78,_79){
if(!_79){
$clearHandlers(_78.childNodes[0].childNodes[1]);
_78=_78.nextSibling;
}
var _7a=_78.getElementsByTagName("li");
for(var i=0;i<_7a.length;i++){
$clearHandlers(_7a[i]);
}
},saveClientState:function(){
var _7c=[""];
var _7d={};
for(var i=0;i<_7c.length;i++){
}
return Sys.Serialization.JavaScriptSerializer.serialize(_7d);
},decorateButtons:function(_7f){
this.decorateButtonsByTagName("input",_7f);
this.decorateButtonsByTagName("button",_7f);
},decorateButtonsByTagName:function(_80,_81){
if(!_81){
_81=document.body;
}
var _82=_81.getElementsByTagName(_80);
var _83=_82.length;
for(var i=0;i<_83;i++){
var _85=_82[i];
var _86=_85.getAttribute("type");
if(_80=="button"||_86=="button"||_86=="submit"||_86=="reset"){
if(_85.className){
continue;
}
var _87=(_80=="button"?_85.innerHTML:_85.value);
var _88=this.getSkinnedButton(_85,_87);
_85.insertAdjacentElement("beforeBegin",_88);
}
}
},_getButtonRootElement:function(e){
e=e?e:window.event;
var _8a=e.srcElement?e.srcElement:e.target;
var _8b=_8a;
while(_8b.tagName!="A"){
_8b=_8b.parentNode;
}
return _8b;
},buttonClickHandler:function(e){
var _8d=this._getButtonRootElement(e);
var _8e=_8d.nextSibling;
_8e.click();
return false;
},buttonMouseOutHandler:function(e){
var _90=this._getButtonRootElement(e);
if(_90){
Sys.UI.DomElement.removeCssClass(_90,"rfdClicked");
}
},buttonMouseUpHandler:function(e){
var _92=this._getButtonRootElement(e);
if(_92){
Sys.UI.DomElement.removeCssClass(_92,"rfdClicked");
}
},buttonMouseDownHandler:function(e){
var _94=this._getButtonRootElement(e);
if(_94){
Sys.UI.DomElement.addCssClass(_94,"rfdClicked");
}
},_setStatus:function(){
window.status="";
return true;
},getSkinnedButton:function(_95,_96){
var _97=document.createElement("a");
_97.setAttribute("href","javascript:void(0)");
_97.onmouseover=this._setStatus;
_97.onmouseout=this._setStatus;
_97.setAttribute("id","_rfdSkinned"+_95.id);
_95.setAttribute("_rfddecoratedID",_97.id);
_95._rfddecoratedID=_97.id;
var _98=_95.getAttribute("title");
if(_98){
_97.setAttribute("title",_98);
}
var _99=_95.getAttribute("tabIndex");
if(_99){
_97.setAttribute("tabIndex",_99);
_95.setAttribute("tabIndex","-1");
}
_97.className="rfdSkinnedButton RadForm_"+this._skin;
_95.className="rfdRealButton";
$addHandler(_97,"click",Function.createDelegate(this,this.buttonClickHandler));
$addHandler(_97,"mousedown",Function.createDelegate(this,this.buttonMouseDownHandler));
$addHandler(_97,"mouseup",Function.createDelegate(this,this.buttonMouseUpHandler));
$addHandler(_97,"mouseout",Function.createDelegate(this,this.buttonMouseOutHandler));
_97.style.width=$telerik.getCurrentStyle(_95,"width");
_97.innerHTML="<span class=\"rfdOuter\"><span class=\"rfdInner\">"+_96+"</span></span>";
if(_95.disabled){
_97.className+=" "+"rfdInputDisabled";
}
if($telerik.isIE){
$addHandler(_95,"propertychange",Function.createDelegate(this,this.inputPropertyClickHandler));
}else{
if($telerik.isOpera){
Telerik.Web.UI.RadFormDecorator._globalReplaceSetters(_95);
}
}
this._addToDecoratedElements(_97);
return _97;
},decorateInputs:function(_9a,_9b){
if(!_9b){
_9b=document.body;
}
var _9c=_9b.getElementsByTagName("input");
for(var i=0;i<_9c.length;i++){
var _9e=_9c[i];
if(_9e.type==_9a){
this.decorateInput(_9e);
}
}
},decorateInput:function(_9f){
var _a0=_9f.nextSibling;
if(_a0==null||_a0.tagName==null||_a0.tagName.toLowerCase()!="label"){
_a0=this.addLabel(_9f);
}
this.configureLabel(_a0,_9f);
if($telerik.isIE){
$addHandler(_9f,"propertychange",Function.createDelegate(this,this.inputPropertyClickHandler));
$addHandler(_9f,"click",Function.createDelegate(this,this.inputClickHandler));
}else{
$addHandler(_9f,"click",Function.createDelegate(this,this.inputClickHandler));
if($telerik.isOpera){
Telerik.Web.UI.RadFormDecorator._globalReplaceSetters(_9f);
}
}
this._addToDecoratedElements(_9f);
},decorateSelects:function(_a1){
var _a2=_a1.getElementsByTagName("select");
for(var i=0;i<_a2.length;i++){
this.decorateSelect(_a2[i]);
}
},_decorateSelectsOnParentShowing:function(_a4){
var _a5=Telerik.Web.UI.FormDecoratorDecoratedControls;
if((this._decoratedControls&_a5.Select)>0){
this.decorateSelects(_a4);
}
},decorateSelect:function(_a6){
var _a7=$telerik.getSize(_a6);
if(!$telerik.isSafari&&_a7.height==0){
this.add_parentShowing(_a6);
return;
}
_a6.style.display="none";
if(!_a6.id){
_a6.id=new Date()-1;
}
var _a8=null;
if(!_a6.multiple&&_a6.size==0){
_a8=document.createElement("a");
_a8.setAttribute("href","javascript:void(0)");
_a8.setAttribute("id","Skinned"+_a6.id);
Sys.UI.DomElement.addCssClass(_a8,"rfdSelect");
Sys.UI.DomElement.addCssClass(_a8,"rfdSelect_"+this._skin);
}
var _a9=_a6.selectedIndex>-1?_a6.options[_a6.selectedIndex]:-1;
var _aa=this.createSelectBox(_a6);
if(!_a6.multiple&&_a6.size==0){
_a8.innerHTML="<span class=\"rfdSelectOuter\">"+"<span class=\"rfdSelectText\">"+(_a9.innerHTML==undefined?"":_a9.innerHTML)+"</span>"+"<span class=\"rfdSelectArrow\"><span>Click to Expand</span></span>"+"</span>";
if(_a6.disabled){
Sys.UI.DomElement.addCssClass(_a8,"rfdSelectDisabled");
this._attachPropertyChangedListeners(_a6);
}else{
this._attachSelectHandlers(_a6,_a8,_aa);
}
_a8.forSelect=_a6.id;
_aa.style.position="absolute";
_aa.style.zIndex=100;
if(_a6.nextSibling){
_a6.parentNode.insertBefore(_a8,_a6.nextSibling);
_a6.parentNode.insertBefore(_aa,_a8.nextSibling);
}else{
_a6.parentNode.appendChild(_a8);
_a6.parentNode.appendChild(_aa);
}
}else{
_a8=_aa;
_a8.setAttribute("id","Skinned"+_a6.id);
_a8.style.display="";
_a8.multiple=true;
_a8.forSelect=_a6.id;
if(_a6.disabled){
Sys.UI.DomElement.addCssClass(_a8,"rfdSelectDisabled");
this._attachPropertyChangedListeners(_a6);
}else{
this._attachSelectHandlers(_a6,null,_aa);
}
if(_a6.nextSibling){
_a6.parentNode.insertBefore(_a8,_a6.nextSibling);
}else{
_a6.parentNode.appendChild(_a8);
}
}
var _ab=_a6.getAttribute("tabIndex");
if(_ab){
_a8.setAttribute("tabIndex",_ab);
_a6.setAttribute("tabIndex",-1);
}
_a8.style.position=_a6.style.position;
_a8.style.left=_a6.style.left;
_a8.style.top=_a6.style.top;
_a8.selectValue=_a9.value;
if(_a7.height>0){
var _ac=_a7.width;
if($telerik.isFirefox){
_ac+=1;
}
if($telerik.isSafari){
_ac+=7;
}
if($telerik.isChrome){
_ac-=10;
}
_a8.style.width=_ac+"px";
if(_a8.multiple&&_a6.size>0){
var ul=_a8.childNodes[0];
var li=ul.childNodes[0];
if(li){
var _af=$telerik.getSize(li).height;
ul.style.height=_a6.size*_af+"px";
}
}
}
_a6._rfddecoratedID=_a8.id;
this._addToDecoratedElements(_a8);
},createSelectBox:function(_b0){
var div=document.createElement("div");
Sys.UI.DomElement.addCssClass(div,"rfdSelectBox");
Sys.UI.DomElement.addCssClass(div,"rfdSelectBox_"+this._skin);
div.style.display="none";
var ul=document.createElement("ul");
ul.style.overflowY="auto";
div.appendChild(ul);
var _b3=_b0.options;
var _b4,_b5;
for(var i=0;i<_b3.length;i++){
if(_b3[i].parentNode.tagName.toLowerCase()=="optgroup"){
div.optGroups=true;
_b4=_b4?(_b5!=_b3[i].parentNode.label?document.createElement("ul"):_b4):document.createElement("ul");
if(i>1&&_b3[i].parentNode!=_b3[i-1].parentNode){
_b4=document.createElement("ul");
}
if(_b5!=_b3[i].parentNode.label||(i>1&&_b3[i].parentNode!=_b3[i-1].parentNode)){
Sys.UI.DomElement.addCssClass(_b4,"rfdSelectBox_optgroup");
ul.appendChild(_b4);
var _b7=document.createElement("li");
_b5=_b3[i].parentNode.label;
_b7.innerHTML=_b3[i].parentNode.label;
if(_b3[i].parentNode.disabled){
Sys.UI.DomElement.addCssClass(_b4,"rfdSelectBox_optgroup_disabled");
}else{
$addHandler(_b7,"click",Function.createDelegate(this,this._optionClickHandler));
}
Sys.UI.DomElement.addCssClass(_b7,"rfdSelectBox_optgroup_label");
_b4.appendChild(_b7);
}
}else{
_b4=null;
}
var li=document.createElement("li");
li.optionValue=_b3[i].value;
li.innerHTML=_b3[i].innerHTML;
if(_b3[i].selected){
Sys.UI.DomElement.addCssClass(li,"rfdSelect_selected");
}
if(_b4){
if(!_b0.disabled&&!Sys.UI.DomElement.containsCssClass(_b4,"rfdSelectBox_optgroup_disabled")){
$addHandler(li,"click",Function.createDelegate(this,this._optionClickHandler));
}
}else{
if(!_b0.disabled){
$addHandler(li,"click",Function.createDelegate(this,this._optionClickHandler));
}
}
if(!_b0.multiple){
$addHandler(li,"mouseover",Function.createDelegate(this,this._optionMouseOverHandler));
}
if(_b4){
_b4.appendChild(li);
}else{
ul.appendChild(li);
}
}
if(!_b0.disabled&&$telerik.isIE){
div.eventListeners=true;
}
return div;
},_attachPropertyChangedListeners:function(_b9){
if($telerik.isIE){
$addHandler(_b9,"propertychange",Function.createDelegate(this,this._selectPropertyChanged));
}else{
var _ba=HTMLSelectElement.prototype.__lookupGetter__("disabled");
if(_ba){
HTMLSelectElement.prototype.__defineSetter__("rfd_disabled",_ba);
HTMLSelectElement.prototype.__defineSetter__("disabled",function(_bb){
this.rfd_disabled=_bb;
var _bc=document.getElementById("Skinned"+this.id);
Telerik.Web.UI.RadFormDecorator.prototype._toggleDisabledState(this,_bc,_bb);
});
}
if($telerik.isSafari){
}
}
},_attachSelectHandlers:function(_bd,_be,_bf,_c0){
if(_be){
$addHandler(_be,"click",Function.createDelegate(this,this.selectItemClickHandler));
$addHandler(_be.childNodes[0].childNodes[1],"click",Function.createDelegate(this,this.selectItemClickHandler));
if($telerik.isIE&&!_bd.disabled){
_be.eventListeners=true;
}
}
if(!_c0){
this._attachPropertyChangedListeners(_bd);
}
if($telerik.isIE){
var _c1=_bd.appendChild;
var _c2=_bd.removeChild;
var _c3=_bd.insertBefore;
_bd.appendChild=Function.createDelegate(this,function(_c4){
_c1(_c4);
var obj={};
obj.target=_c4;
this.domNodeInsertedHandler(obj);
});
_bd.removeChild=Function.createDelegate(this,function(_c6){
if(_c6.parentNode.tagName=="OPTGROUP"){
_c6.parentNode.removeChild(_c6);
}else{
_c2(_c6);
}
var obj={};
obj.target=_c6;
obj.parentNodeId=_bd.id;
this.domNodeRemovedHandler(obj);
});
_bd.insertBefore=Function.createDelegate(this,function(_c8,_c9){
if(_c9.parentNode.tagName=="OPTGROUP"){
_c9.parentNode.insertBefore(_c8,_c9);
}else{
_c3(_c8,_c9);
}
var obj={};
obj.target=_c8;
this.domNodeInsertedHandler(obj);
});
}else{
if(HTMLSelectElement!=="undefined"){
var _cb=HTMLSelectElement.prototype.__lookupGetter__("selectedIndex");
if(_cb){
HTMLSelectElement.prototype.__defineSetter__("rfd_selectedIndex",_cb);
HTMLSelectElement.prototype.__defineSetter__("selectedIndex",function(_cc){
this.rfd_selectedIndex=_cc;
var _cd=document.getElementById("Skinned"+this.id);
Telerik.Web.UI.RadFormDecorator.prototype._selectedIndexChanged(this,_cd,_cc);
});
}
if(!_bf.eventListeners){
_bd.addEventListener("DOMNodeInserted",Function.createDelegate(this,this.domNodeInsertedHandler),false);
_bd.addEventListener("DOMNodeRemoved",Function.createDelegate(this,this.domNodeRemovedHandler),false);
_bf.eventListeners=true;
if(_be){
_be.eventListeners=true;
}
}
}
}
},_attachSelectBoxHandlers:function(_ce){
var _cf=_ce.getElementsByTagName("li");
for(var i=0;i<_cf.length;i++){
if(!Sys.UI.DomElement.containsCssClass(_cf[i],"rfdSelectBox_optgroup_label")){
$addHandler(_cf[i],"click",Function.createDelegate(this,this._optionClickHandler));
if(!_ce.multiple){
$addHandler(_cf[i],"mouseover",Function.createDelegate(this,this._optionMouseOverHandler));
}
}
}
},_selectPropertyChanged:function(e){
var _d2=e.target;
e=e.rawEvent;
if(!e){
return;
}
var _d3=document.getElementById("Skinned"+_d2.id);
if(e.propertyName=="selectedIndex"){
var _d4=_d2.selectedIndex>-1?_d2.options[_d2.selectedIndex]:null;
this._selectedIndexChanged(_d2,_d3,_d2.selectedIndex);
}else{
if(e.propertyName=="disabled"){
this._toggleDisabledState(_d2,_d3,_d2.disabled);
}
}
},_selectedIndexChanged:function(_d5,_d6,_d7){
var _d8;
if(Sys.UI.DomElement.containsCssClass(_d6,"rfdSelect")){
_d6.childNodes[0].childNodes[0].innerHTML=_d5.options[_d7>-1?_d7:0].innerHTML;
_d8=_d6.nextSibling;
}else{
_d8=_d6;
}
this.dehighlightElements(_d8);
if(_d7==-1){
return;
}
var _d9=_d8.getElementsByTagName("li");
var _da=0;
var _db=_d9.length>_d7?_d7+1:_d9.length;
for(var i=0;i<_db;i++){
if(Sys.UI.DomElement.containsCssClass(_d9[i],"rfdSelectBox_optgroup_label")){
_da++;
_db++;
}
}
Sys.UI.DomElement.addCssClass(_d9[_d7+_da],"rfdSelect_selected");
},_toggleDisabledState:function(_dd,_de,_df){
if(!_df){
var _e0=Sys.UI.DomElement.containsCssClass(_de,"rfdSelect")?_de:null;
var _e1=Sys.UI.DomElement.containsCssClass(_de,"rfdSelectBox")?_de:_de.nextSibling;
if($telerik.isIE){
if(!_de.eventListeners){
this._attachSelectHandlers(_dd,_e0,_e1,true);
this._attachSelectBoxHandlers(_e1);
}
}else{
this._attachSelectHandlers(_dd,_e0,_e1,true);
this._attachSelectBoxHandlers(_e1);
}
Sys.UI.DomElement.removeCssClass(_de,"rfdSelectDisabled");
if(_de!=_e1){
Sys.UI.DomElement.removeCssClass(_e1,"rfdSelectDisabled");
}
}else{
var _e1;
if(Sys.UI.DomElement.containsCssClass(_de,"rfdSelect")){
$clearHandlers(_de);
$clearHandlers(_de.childNodes[0].childNodes[1]);
_e1=_de.nextSibling;
}else{
_e1=_de;
}
var _e2=_e1.getElementsByTagName("li");
for(var i=0;i<_e2.length;i++){
$clearHandlers(_e2[i]);
}
Sys.UI.DomElement.addCssClass(_de,"rfdSelectDisabled");
}
},domNodeInsertedHandler:function(e){
var _e5=e.target;
var _e6=_e5.parentNode;
if(_e6.tagName=="OPTGROUP"){
_e6=_e6.parentNode;
}
var _e7=document.getElementById("Skinned"+_e6.id);
var _e8=Sys.UI.DomElement.containsCssClass(_e7,"rfdSelect")?_e7.nextSibling:_e7;
var li=document.createElement("li");
li.optionValue=_e5.value;
li.innerHTML=_e5.innerHTML;
if($telerik.isIE){
$addHandler(li,"click",Function.createDelegate(this,this._optionClickHandler));
}else{
li.addEventListener("click",Function.createDelegate(this,this._optionClickHandler),false);
}
if(_e5.nextSibling){
var _ea=_e8.getElementsByTagName("li");
for(var i=0;i<_ea.length;i++){
if(_ea[i].optionValue==_e5.nextSibling.value){
_ea[i].parentNode.insertBefore(li,_ea[i]);
break;
}
}
}else{
if(!_e6.multiple&&_e8.childNodes[0].childNodes.length==0){
_e7.childNodes[0].childNodes[0].innerHTML=_e5.innerHTML;
}
_e8.childNodes[0].appendChild(li);
}
},domNodeRemovedHandler:function(e){
var _ed=e.target;
var _ee=document.getElementById("Skinned"+(typeof _ed.parentNode.id!="undefined"?_ed.parentNode.id:e.parentNodeId));
var _ef;
var _f0;
if(_ee.multiple){
_ef=_ee.getElementsByTagName("li");
}else{
_f0=_ee.nextSibling;
if(_f0&&Sys.UI.DomElement.containsCssClass(_f0,"rfdSelectBox")){
_ef=_f0.getElementsByTagName("li");
}
}
for(var i=0;i<_ef.length;i++){
if(_ef[i].optionValue==_ed.value&&_ef[i].innerHTML==_ed.innerHTML){
_ef[i].parentNode.removeChild(_ef[i]);
}
}
if(!_ee.multiple&&_ee.childNodes[0].childNodes[0].innerHTML==_ed.innerHTML){
_ee.childNodes[0].childNodes[0].innerHTML=_f0.childNodes[0].childNodes.length>0?_f0.childNodes[0].childNodes[0].innerHTML:"";
}
},getLiElementIndices:function(li){
var _f3=Sys.UI.DomElement.containsCssClass(li.parentNode,"rfdSelectBox_optgroup")?li.parentNode.parentNode:li.parentNode;
var _f4={};
_f4.index=-1;
_f4.optGroups=0;
var _f5=-1;
var _f6=0;
var _f7=_f3.getElementsByTagName("li");
for(var i=0;i<_f7.length;i++){
if(_f7[i].optionValue==li.optionValue){
_f4.index=i-_f4.optGroups;
break;
}else{
if(Sys.UI.DomElement.containsCssClass(_f7[i],"rfdSelectBox_optgroup_label")){
_f4.optGroups++;
}
}
}
return _f4;
},dehighlightElements:function(_f9){
var _fa=_f9.getElementsByTagName("li");
for(var i=0;i<_fa.length;i++){
Sys.UI.DomElement.removeCssClass(_fa[i],"rfdSelect_selected");
}
},highlightElementAt:function(_fc,_fd){
var _fe=_fc.getElementsByTagName("li");
if(_fd>-1&&_fd<_fe.length){
Sys.UI.DomElement.addCssClass(_fe[_fd],"rfdSelect_selected");
}
},toggleHighlightElementAt:function(_ff,_100){
var _101=_ff.getElementsByTagName("li");
if(Sys.UI.DomElement.containsCssClass(_101[_100],"rfdSelect_selected")){
Sys.UI.DomElement.removeCssClass(_101[_100],"rfdSelect_selected");
}else{
Sys.UI.DomElement.addCssClass(_101[_100],"rfdSelect_selected");
}
},loseFocus:function(e){
if(!this._decoratedElements){
return;
}
for(var i=0;i<this._decoratedElements.length;i++){
if(Sys.UI.DomElement.containsCssClass(this._decoratedElements[i],"rfdSelect")&&this._decoratedElements[i].nextSibling.style.display!="none"){
var _104=this._decoratedElements[i].nextSibling;
_104.style.display="none";
this.dehighlightElements(_104);
break;
}
}
},selectItemClickHandler:function(e){
this.loseFocus();
var _106;
var _107=e.target;
while(!Sys.UI.DomElement.containsCssClass(_107,"rfdSelect")){
_107=_107.parentNode;
}
_106=_107.nextSibling;
if(_106&&Sys.UI.DomElement.containsCssClass(_106,"rfdSelectBox")){
var size=$telerik.getSize(_106.previousSibling);
var _109=$telerik.getLocation(_106.previousSibling);
_106.style.left=_109.x+"px";
_106.style.top=_109.y+size.height+"px";
var _10a=size.width-2;
_106.style.width=_10a+"px";
_106.childNodes[0].style.width=_10a+"px";
this.dehighlightElements(_106);
this.highlightElementAt(_106,_106.selectedIndex?_106.selectedIndex:0);
this.toggleSelectBoxVisibility(_106);
if(_106.style.display!="none"){
var ul=_106.childNodes[0];
var _10c=ul.childNodes;
var li=_10c[0];
if(li){
var _10e=$telerik.getSize(li).height;
if(10<_10c.length){
ul.style.height=_10e*10+"px";
}
}
}
}
e.stopPropagation();
},_optionClickHandler:function(e){
var _110=e.target.parentNode.parentNode;
var _111=Sys.UI.DomElement.containsCssClass(_110,"rfdSelectBox")?_110:_110.parentNode;
var _112=null;
if(!_111.multiple){
var _113=_111.previousSibling;
if(_113&&Sys.UI.DomElement.containsCssClass(_113,"rfdSelect")){
_113.childNodes[0].childNodes[0].innerHTML=e.target.innerHTML;
_112=document.getElementById(_113.forSelect);
}
}else{
_112=document.getElementById(_111.forSelect);
}
if(Sys.UI.DomElement.containsCssClass(e.target,"rfdSelectBox_optgroup_label")){
this.dehighlightElements(_111);
if(!$telerik.isFirefox){
_112.selectedIndex=-1;
}else{
for(var i=0;i<_112.options.length;i++){
_112.options[i].selected=false;
}
}
this.loseFocus();
return;
}
if(!_111.multiple){
var _115=this.getLiElementIndices(e.target);
_112.selectedIndex=_115.index;
_111.selectedIndex=_115.index+_115.optGroups;
this.toggleSelectBoxVisibility(_111);
this.dehighlightElements(_111);
this.toggleHighlightElementAt(_111,_115.index+_115.optGroups);
}else{
var _115=this.getLiElementIndices(e.target);
if((!_111.lastKeyShift&&!e.ctrlKey)||(!e.ctrlKey&&!e.shiftKey)){
this.dehighlightElements(_111);
if(!$telerik.isFirefox){
_112.selectedIndex=-1;
}else{
for(var i=0;i<_112.options.length;i++){
_112.options[i].selected=false;
}
}
}
if(e.shiftKey){
var _116=_111.getElementsByTagName("li");
var idx=0;
if(_111.lastSelectedIndex>=0){
if(_111.prevIndex&&_111.nextIndex){
idx=_115.index<_111.prevIndex?_111.prevIndex:_111.nextIndex;
}else{
idx=_111.lastSelectedIndex;
if(!Sys.UI.DomElement.containsCssClass(_116[idx],"rfdSelectBox_optgroup_label")){
Sys.UI.DomElement.addCssClass(_116[idx],"rfdSelect_selected");
}
_112.options[idx].selected=true;
}
}
var _118=_115.index>idx?idx:_115.index;
var _119=(_115.index>idx?_115.index:idx)+1;
var _11a=0;
if(_111.optGroups){
for(var i=0;i<_118;i++){
if(Sys.UI.DomElement.containsCssClass(_116[i],"rfdSelectBox_optgroup_label")){
_11a+=1;
_119+=1;
}
}
}
for(var i=_118;i<_119;i++){
var _11b=Sys.UI.DomElement.containsCssClass(_116[i].parentNode,"rfdSelectBox_optgroup_disabled");
var _11c=false;
if(!Sys.UI.DomElement.containsCssClass(_116[i],"rfdSelectBox_optgroup_label")){
Sys.UI.DomElement.addCssClass(_116[i],"rfdSelect_selected");
_112.options[i-_11a].selected=true;
}else{
_11a+=1;
_119+=1;
_11c=true;
}
if(_11b){
Sys.UI.DomElement.removeCssClass(_116[i],"rfdSelect_selected");
_112.options[i-(_11c?_11a-1:_11a)].selected=false;
}
}
var _11d=0;
for(var i=0;i<_118;i++){
Sys.UI.DomElement.removeCssClass(_116[i],"rfdSelect_selected");
if(!Sys.UI.DomElement.containsCssClass(_116[i],"rfdSelectBox_optgroup_label")){
_112.options[i-_11d].selected=false;
}else{
_11d+=1;
}
}
for(var i=_119;i<_116.length;i++){
Sys.UI.DomElement.removeCssClass(_116[i],"rfdSelect_selected");
if(!Sys.UI.DomElement.containsCssClass(_116[i],"rfdSelectBox_optgroup_label")){
_112.options[i-_11a].selected=false;
}else{
_11a+=1;
}
}
_111.lastKeyShift=true;
this._fireOnChangeEvent(_112);
e.stopPropagation();
return;
}
_111.lastKeyShift=false;
_112.options[_115.index].selected=_112.options[_115.index].selected?false:true;
if(Sys.UI.DomElement.containsCssClass(e.target,"rfdSelect_selected")){
Sys.UI.DomElement.removeCssClass(e.target,"rfdSelect_selected");
}else{
Sys.UI.DomElement.addCssClass(e.target,"rfdSelect_selected");
}
if(e.ctrlKey&&!Sys.UI.DomElement.containsCssClass(e.target,"rfdSelect_selected")){
_111.prevIndex=_115.index-1;
_111.nextIndex=_115.index+1;
}else{
_111.prevIndex="";
_111.nextIndex="";
_111.lastSelectedIndex=_115.index;
}
this.loseFocus();
}
this._fireOnChangeEvent(_112);
e.stopPropagation();
},_fireOnChangeEvent:function(_11e){
if($telerik.isIE){
var _11f=document.createEventObject();
_11e.fireEvent("onchange",_11f);
}else{
var evt=document.createEvent("UIEvent");
evt.initUIEvent("change",true,false,null,null);
_11e.dispatchEvent(evt);
}
},_optionMouseOverHandler:function(e){
var _122=e.target;
while(!Sys.UI.DomElement.containsCssClass(_122,"rfdSelectBox")){
_122=_122.parentNode;
}
this.dehighlightElements(_122);
Sys.UI.DomElement.addCssClass(e.target,"rfdSelect_selected");
},toggleSelectBoxVisibility:function(_123){
_123.style.display=_123.style.display=="none"?"":"none";
},_addToDecoratedElements:function(_124){
this._decoratedElements[this._decoratedElements.length]=_124;
},inputPropertyClickHandler:function(e){
var _126=e;
var e=e.rawEvent;
if(!e){
return;
}
var _127=_126.target;
var prop=e.propertyName;
if(prop=="checked"){
this.inputClickHandler(_126);
}else{
if(prop=="disabled"){
this.set_elementDisabled(_127,_127.disabled);
}
}
},inputClickHandler:function(e){
e=e?e:window.event;
var _12a=e.srcElement?e.srcElement:e.target;
if(_12a.type=="radio"){
this.setAllRadiosUnchecked(_12a.name);
}
if(!_12a.disabled){
this.configureLabel(_12a.myLabel,_12a);
}
},addLabel:function(_12b){
var id=_12b.id;
if(!id){
id=this._getUniqueID();
_12b.id=id;
}
var _12d=document.createElement("label");
_12d.htmlFor=id;
_12d.setAttribute("unselectable","on");
_12b.insertAdjacentElement("afterEnd",_12d);
return _12d;
},configureLabel:function(_12e,_12f){
if(!_12e.id){
_12e.setAttribute("id","_rfdSkinned"+_12f.id);
}
_12f.setAttribute("_rfddecoratedID",_12e.id);
_12f._rfddecoratedID=_12e.id;
_12f.className=this._skin+" input";
if(!_12f.myLabel){
_12f.myLabel=_12e;
}
_12e.className=this._skin;
if(_12e.innerHTML==""){
_12e.innerHTML="&nbsp;";
}
if(_12f.disabled){
_12e.className+=" "+"rfdInputDisabled";
}
var type=_12f.type;
var _131=type.charAt(0).toUpperCase()+type.substring(1);
if(_12f.checked){
_12e.className+=" rfd"+_131+"Checked";
}else{
_12e.className+=" rfd"+_131+"Unchecked";
}
},_getUniqueID:function(){
if(!this._idCounter){
this._idCounter=1;
}
this._idCounter++;
return (this.get_id()+(new Date()-100)+this._idCounter);
},setAllRadiosUnchecked:function(_132){
var skin=this._skin;
var _134=document.getElementsByTagName("input");
for(var i=0;i<_134.length;i++){
var _136=_134[i];
if(_136.type=="radio"&&_136.name==_132&&!_136.disabled){
var _137=_136.checked;
_136.myLabel.className=skin+(_137?" rfdRadioChecked":" rfdRadioUnchecked");
}
}
},set_elementChecked:function(_138,val){
var _13a=_138.nextSibling;
if(_13a&&_13a.tagName=="LABEL"){
var type=_138.type;
if(type=="radio"){
Telerik.Web.UI.RadFormDecorator.prototype.setAllRadiosUnchecked(_138.name);
}
var _13c=type.charAt(0).toUpperCase()+type.substring(1);
var _13d="rfd"+_13c+"Checked";
var _13e="rfd"+_13c+"Unchecked";
Sys.UI.DomElement.removeCssClass(_13a,val?_13e:_13d);
Sys.UI.DomElement.addCssClass(_13a,val?_13d:_13e);
}
},set_elementDisabled:function(_13f,val){
var _141=_13f;
var _142=_13f.nextSibling;
var type=_13f.type;
if((type=="checkbox"||type=="radio")&&_142&&_142.tagName=="LABEL"){
_141=_142;
}else{
if(type=="button"||type=="reset"||type=="submit"||_13f.tagName=="BUTTON"){
var _144=_13f.previousSibling;
if(_144&&_144.tagName=="A"){
_141=_144;
}
}
}
if(val){
Sys.UI.DomElement.addCssClass(_141,"rfdInputDisabled");
}else{
Sys.UI.DomElement.removeCssClass(_141,"rfdInputDisabled");
}
if(!val&&$telerik.isIE&&_141.parentNode.disabled){
_141.parentNode.disabled=val;
}
},get_enableRoundedCorners:function(){
return this._enableRoundedCorners;
},set_enableRoundedCorners:function(_145){
if(this._enableRoundedCorners!=_145){
this._enableRoundedCorners=_145;
}
},get_decoratedControls:function(){
return this._decoratedControls;
},set_decoratedControls:function(_146){
if(this._decoratedControls!=_146){
this._decoratedControls=_146;
}
},get_decorationZoneID:function(){
return this._decorationZoneID;
},set_decorationZoneID:function(_147){
if(this._decorationZoneID!=_147){
this._decorationZoneID=_147;
}
},get_skin:function(){
return this._skin;
},set_skin:function(_148){
if(this._skin!=_148){
this._skin=_148;
}
}};
Telerik.Web.UI.RadFormDecorator.registerClass("Telerik.Web.UI.RadFormDecorator",Telerik.Web.UI.RadWebControl);
Telerik.Web.UI.FormDecoratorDecoratedControls=function(){
throw Error.invalidOperation();
};
Telerik.Web.UI.FormDecoratorDecoratedControls.prototype={None:0,CheckBoxes:1,RadioButtons:2,Buttons:4,Scrollbars:8,Textbox:16,Textarea:32,Fieldset:64,Label:128,H4H5H6:256,Zone:1024,Default:(1|2|4|8),All:4095|1024};
Telerik.Web.UI.FormDecoratorDecoratedControls.registerEnum("Telerik.Web.UI.FormDecoratorDecoratedControls",false);


/* END Telerik.Web.UI.FormDecorator.RadFormDecorator.js */
/* START AjaxControlToolkit.Common.Common.js */
// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Permissive License.
// See http://www.microsoft.com/resources/sharedsource/licensingbasics/sharedsourcelicenses.mspx.
// All other rights reserved.


/// <reference name="MicrosoftAjax.debug.js" />
/// <reference name="MicrosoftAjaxTimer.debug.js" />
/// <reference name="MicrosoftAjaxWebForms.debug.js" />


// Add common toolkit scripts here.  To consume the scripts on a control add
// 
//      [RequiredScript(typeof(CommonToolkitScripts))] 
//      public class SomeExtender : ...
// 
// to the controls extender class declaration.


Type.registerNamespace('AjaxControlToolkit');


AjaxControlToolkit.BoxSide = function() {
    /// <summary>
    /// The BoxSide enumeration describes the sides of a DOM element
    /// </summary>
    /// <field name="Top" type="Number" integer="true" static="true" />
    /// <field name="Right" type="Number" integer="true" static="true" />
    /// <field name="Bottom" type="Number" integer="true" static="true" />
    /// <field name="Left" type="Number" integer="true" static="true" />
}
AjaxControlToolkit.BoxSide.prototype = {
    Top : 0,
    Right : 1,
    Bottom : 2,
    Left : 3
}
AjaxControlToolkit.BoxSide.registerEnum("AjaxControlToolkit.BoxSide", false);


AjaxControlToolkit._CommonToolkitScripts = function() {
    /// <summary>
    /// The _CommonToolkitScripts class contains functionality utilized across a number
    /// of controls (but not universally)
    /// </summary>
    /// <remarks>
    /// You should not create new instances of _CommonToolkitScripts.  Instead you should use the shared instance CommonToolkitScripts (or AjaxControlToolkit.CommonToolkitScripts).
    /// </remarks>
}
AjaxControlToolkit._CommonToolkitScripts.prototype = {
    // The order of these lookup tables is directly linked to the BoxSide enum defined above
    _borderStyleNames : ["borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle"],
    _borderWidthNames : ["borderTopWidth", "borderRightWidth", "borderBottomWidth", "borderLeftWidth"],
    _paddingWidthNames : ["paddingTop", "paddingRight", "paddingBottom", "paddingLeft"],
    _marginWidthNames : ["marginTop", "marginRight", "marginBottom", "marginLeft"],

    getCurrentStyle : function(element, attribute, defaultValue) {
        /// <summary>
        /// CommonToolkitScripts.getCurrentStyle is used to compute the value of a style attribute on an
        /// element that is currently being displayed.  This is especially useful for scenarios where
        /// several CSS classes and style attributes are merged, or when you need information about the
        /// size of an element (such as its padding or margins) that is not exposed in any other fashion.
        /// </summary>
        /// <param name="element" type="Sys.UI.DomElement" domElement="true">
        /// Live DOM element to check style of
        /// </param>
        /// <param name="attribute" type="String">
        /// The style attribute's name is expected to be in a camel-cased form that you would use when
        /// accessing a JavaScript property instead of the hyphenated form you would use in a CSS
        /// stylesheet (i.e. it should be "backgroundColor" and not "background-color").
        /// </param>
        /// <param name="defaultValue" type="Object" mayBeNull="true" optional="true">
        /// In the event of a problem (i.e. a null element or an attribute that cannot be found) we
        /// return this object (or null if none if not specified).
        /// </param>
        /// <returns type="Object">
        /// Current style of the element's attribute
        /// </returns>

        var currentValue = null;
        if (element) {
            if (element.currentStyle) {
                currentValue = element.currentStyle[attribute];
            } else if (document.defaultView && document.defaultView.getComputedStyle) {
                var style = document.defaultView.getComputedStyle(element, null);
                if (style) {
                    currentValue = style[attribute];
                }
            }
            
            if (!currentValue && element.style.getPropertyValue) {
                currentValue = element.style.getPropertyValue(attribute);
            }
            else if (!currentValue && element.style.getAttribute) {
                currentValue = element.style.getAttribute(attribute);
            }       
        }
        
        if ((!currentValue || currentValue == "" || typeof(currentValue) === 'undefined')) {
            if (typeof(defaultValue) != 'undefined') {
                currentValue = defaultValue;
            }
            else {
                currentValue = null;
            }
        }   
        return currentValue;  
    },

    getInheritedBackgroundColor : function(element) {
        /// <summary>
        /// CommonToolkitScripts.getInheritedBackgroundColor provides the ability to get the displayed
        /// background-color of an element.  In most cases calling CommonToolkitScripts.getCurrentStyle
        /// won't do the job because it will return "transparent" unless the element has been given a
        /// specific background color.  This function will walk up the element's parents until it finds
        /// a non-transparent color.  If we get all the way to the top of the document or have any other
        /// problem finding a color, we will return the default value '#FFFFFF'.  This function is
        /// especially important when we're using opacity in IE (because ClearType will make text look
        /// horrendous if you fade it with a transparent background color).
        /// </summary>
        /// <param name="element" type="Sys.UI.DomElement" domElement="true">
        /// Live DOM element to get the background color of
        /// </param>
        /// <returns type="String">
        /// Background color of the element
        /// </returns>
        
        if (!element) return '#FFFFFF';
        var background = this.getCurrentStyle(element, 'backgroundColor');
        try {
            while (!background || background == '' || background == 'transparent' || background == 'rgba(0, 0, 0, 0)') {
                element = element.parentNode;
                if (!element) {
                    background = '#FFFFFF';
                } else {
                    background = this.getCurrentStyle(element, 'backgroundColor');
                }
            }
        } catch(ex) {
            background = '#FFFFFF';
        }
        return background;
    },

    getLocation : function(element) {
    /// <summary>Gets the coordinates of a DOM element.</summary>
    /// <param name="element" domElement="true"/>
    /// <returns type="Sys.UI.Point">
    ///   A Point object with two fields, x and y, which contain the pixel coordinates of the element.
    /// </returns>

    // workaround for an issue in getLocation where it will compute the location of the document element.
    // this will return an offset if scrolled.
    //
    if (element === document.documentElement) {
        return new Sys.UI.Point(0,0);
    }

    // Workaround for IE6 bug in getLocation (also required patching getBounds - remove that fix when this is removed)
    if (Sys.Browser.agent == Sys.Browser.InternetExplorer && Sys.Browser.version < 7) {
        if (element.window === element || element.nodeType === 9 || !element.getClientRects || !element.getBoundingClientRect) return new Sys.UI.Point(0,0);

        // Get the first bounding rectangle in screen coordinates
        var screenRects = element.getClientRects();
        if (!screenRects || !screenRects.length) {
            return new Sys.UI.Point(0,0);
        }
        var first = screenRects[0];

        // Delta between client coords and screen coords
        var dLeft = 0;
        var dTop = 0;

        var inFrame = false;
        try {
            inFrame = element.ownerDocument.parentWindow.frameElement;
        } catch(ex) {
            // If accessing the frameElement fails, a frame is probably in a different
            // domain than its parent - and we still want to do the calculation below
            inFrame = true;
        }

        // If we're in a frame, get client coordinates too so we can compute the delta
        if (inFrame) {
            // Get the bounding rectangle in client coords
            var clientRect = element.getBoundingClientRect();
            if (!clientRect) {
                return new Sys.UI.Point(0,0);
            }

            // Find the minima in screen coords
            var minLeft = first.left;
            var minTop = first.top;
            for (var i = 1; i < screenRects.length; i++) {
                var r = screenRects[i];
                if (r.left < minLeft) {
                    minLeft = r.left;
                }
                if (r.top < minTop) {
                    minTop = r.top;
                }
            }

            // Compute the delta between screen and client coords
            dLeft = minLeft - clientRect.left;
            dTop = minTop - clientRect.top;
        }

        // Subtract 2px, the border of the viewport (It can be changed in IE6 by applying a border style to the HTML element,
        // but this is not supported by ASP.NET AJAX, and it cannot be changed in IE7.), and also subtract the delta between
        // screen coords and client coords
        var ownerDocument = element.document.documentElement;
        return new Sys.UI.Point(first.left - 2 - dLeft + ownerDocument.scrollLeft, first.top - 2 - dTop + ownerDocument.scrollTop);
    }

    return Sys.UI.DomElement.getLocation(element);
},

    setLocation : function(element, point) {
        /// <summary>
        /// Sets the current location for an element.
        /// </summary>
        /// <param name="element" type="Sys.UI.DomElement" domElement="true">
        /// DOM element
        /// </param>
        /// <param name="point" type="Object">
        /// Point object (of the form {x,y})
        /// </param>
        /// <remarks>
        /// This method does not attempt to set the positioning mode of an element.
        /// The position is relative from the elements nearest position:relative or
        /// position:absolute element.
        /// </remarks>
        Sys.UI.DomElement.setLocation(element, point.x, point.y);
    },
    
    getContentSize : function(element) {
        /// <summary>
        /// Gets the "content-box" size of an element.
        /// </summary>
        /// <param name="element" type="Sys.UI.DomElement" domElement="true">
        /// DOM element
        /// </param>
        /// <returns type="Object">
        /// Size of the element (in the form {width,height})
        /// </returns>
        /// <remarks>
        /// The "content-box" is the size of the content area *inside* of the borders and
        /// padding of an element. The "content-box" size does not include the margins around
        /// the element.
        /// </remarks>
        
        if (!element) {
            throw Error.argumentNull('element');
        }
        var size = this.getSize(element);
        var borderBox = this.getBorderBox(element);
        var paddingBox = this.getPaddingBox(element);
        return {
            width :  size.width - borderBox.horizontal - paddingBox.horizontal,
            height : size.height - borderBox.vertical - paddingBox.vertical
        }
    },

    getSize : function(element) {
        /// <summary>
        /// Gets the "border-box" size of an element.
        /// </summary>
        /// <param name="element" type="Sys.UI.DomElement" domElement="true">
        /// DOM element
        /// </param>
        /// <returns type="Object">
        /// Size of the element (in the form {width,height})
        /// </returns>
        /// <remarks>
        /// The "border-box" is the size of the content area *outside* of the borders and
        /// padding of an element.  The "border-box" size does not include the margins around
        /// the element.
        /// </remarks>
        
        if (!element) {
            throw Error.argumentNull('element');
        }
        return {
            width:  element.offsetWidth,
            height: element.offsetHeight
        };
    },
    
    setContentSize : function(element, size) {
        /// <summary>
        /// Sets the "content-box" size of an element.
        /// </summary>
        /// <param name="element" type="Sys.UI.DomElement" domElement="true">
        /// DOM element
        /// </param>
        /// <param name="size" type="Object">
        /// Size of the element (in the form {width,height})
        /// </param>
        /// <remarks>
        /// The "content-box" is the size of the content area *inside* of the borders and
        /// padding of an element. The "content-box" size does not include the margins around
        /// the element.
        /// </remarks>
        
        if (!element) {
            throw Error.argumentNull('element');
        }
        if (!size) {
            throw Error.argumentNull('size');
        }
        // FF respects -moz-box-sizing css extension, so adjust the box size for the border-box
        if(this.getCurrentStyle(element, 'MozBoxSizing') == 'border-box' || this.getCurrentStyle(element, 'BoxSizing') == 'border-box') {
            var borderBox = this.getBorderBox(element);
            var paddingBox = this.getPaddingBox(element);
            size = {
                width: size.width + borderBox.horizontal + paddingBox.horizontal,
                height: size.height + borderBox.vertical + paddingBox.vertical
            };
        }
        element.style.width = size.width.toString() + 'px';
        element.style.height = size.height.toString() + 'px';
    },
    
    setSize : function(element, size) {
        /// <summary>
        /// Sets the "border-box" size of an element.
        /// </summary>
        /// <remarks>
        /// The "border-box" is the size of the content area *outside* of the borders and 
        /// padding of an element.  The "border-box" size does not include the margins around
        /// the element.
        /// </remarks>
        /// <param name="element" type="Sys.UI.DomElement">DOM element</param>
        /// <param name="size" type="Object">Size of the element (in the form {width,height})</param>
        /// <returns />
        
        if (!element) {
            throw Error.argumentNull('element');
        }
        if (!size) {
            throw Error.argumentNull('size');
        }
        var borderBox = this.getBorderBox(element);
        var paddingBox = this.getPaddingBox(element);
        var contentSize = {
            width:  size.width - borderBox.horizontal - paddingBox.horizontal,
            height: size.height - borderBox.vertical - paddingBox.vertical
        };
        this.setContentSize(element, contentSize);
    },
    
    getBounds : function(element) {
        /// <summary>Gets the coordinates, width and height of an element.</summary>
        /// <param name="element" domElement="true"/>
        /// <returns type="Sys.UI.Bounds">
        ///   A Bounds object with four fields, x, y, width and height, which contain the pixel coordinates,
        ///   width and height of the element.
        /// </returns>
        /// <remarks>
        ///   Use the CommonToolkitScripts version of getLocation to handle the workaround for IE6.  We can
        ///   remove the below implementation and just call Sys.UI.DomElement.getBounds when the other bug
        ///   is fixed.
        /// </remarks>
        
        var offset = $common.getLocation(element);
        return new Sys.UI.Bounds(offset.x, offset.y, element.offsetWidth || 0, element.offsetHeight || 0);
    }, 
    
    setBounds : function(element, bounds) {
        /// <summary>
        /// Sets the "border-box" bounds of an element
        /// </summary>
        /// <param name="element" type="Sys.UI.DomElement" domElement="true">
        /// DOM element
        /// </param>
        /// <param name="bounds" type="Object">
        /// Bounds of the element (of the form {x,y,width,height})
        /// </param>
        /// <remarks>
        /// The "border-box" is the size of the content area *outside* of the borders and
        /// padding of an element.  The "border-box" size does not include the margins around
        /// the element.
        /// </remarks>
        
        if (!element) {
            throw Error.argumentNull('element');
        }
        if (!bounds) {
            throw Error.argumentNull('bounds');
        }
        this.setSize(element, bounds);
        $common.setLocation(element, bounds);
    },
    
    getClientBounds : function() {
        /// <summary>
        /// Gets the width and height of the browser client window (excluding scrollbars)
        /// </summary>
        /// <returns type="Sys.UI.Bounds">
        /// Browser's client width and height
        /// </returns>

        var clientWidth;
        var clientHeight;
        switch(Sys.Browser.agent) {
            case Sys.Browser.InternetExplorer:
                clientWidth = document.documentElement.clientWidth;
                clientHeight = document.documentElement.clientHeight;
                break;
            case Sys.Browser.Safari:
                clientWidth = window.innerWidth;
                clientHeight = window.innerHeight;
                break;
            case Sys.Browser.Opera:
                clientWidth = Math.min(window.innerWidth, document.body.clientWidth);
                clientHeight = Math.min(window.innerHeight, document.body.clientHeight);
                break;
            default:  // Sys.Browser.Firefox, etc.
                clientWidth = Math.min(window.innerWidth, document.documentElement.clientWidth);
                clientHeight = Math.min(window.innerHeight, document.documentElement.clientHeight);
                break;
        }
        return new Sys.UI.Bounds(0, 0, clientWidth, clientHeight);
    },
   
    getMarginBox : function(element) {
        /// <summary>
        /// Gets the entire margin box sizes.
        /// </summary>
        /// <param name="element" type="Sys.UI.DomElement" domElement="true">
        /// DOM element
        /// </param>
        /// <returns type="Object">
        /// Element's margin box sizes (of the form {top,left,bottom,right,horizontal,vertical})
        /// </returns>
        
        if (!element) {
            throw Error.argumentNull('element');
        }
        var box = {
            top: this.getMargin(element, AjaxControlToolkit.BoxSide.Top),
            right: this.getMargin(element, AjaxControlToolkit.BoxSide.Right),
            bottom: this.getMargin(element, AjaxControlToolkit.BoxSide.Bottom),
            left: this.getMargin(element, AjaxControlToolkit.BoxSide.Left)
        };
        box.horizontal = box.left + box.right;
        box.vertical = box.top + box.bottom;
        return box;
    },
    
    getBorderBox : function(element) {
        /// <summary>
        /// Gets the entire border box sizes.
        /// </summary>
        /// <param name="element" type="Sys.UI.DomElement" domElement="true">
        /// DOM element
        /// </param>
        /// <returns type="Object">
        /// Element's border box sizes (of the form {top,left,bottom,right,horizontal,vertical})
        /// </returns>
        
        if (!element) {
            throw Error.argumentNull('element');
        }
        var box = {
            top: this.getBorderWidth(element, AjaxControlToolkit.BoxSide.Top),
            right: this.getBorderWidth(element, AjaxControlToolkit.BoxSide.Right),
            bottom: this.getBorderWidth(element, AjaxControlToolkit.BoxSide.Bottom),
            left: this.getBorderWidth(element, AjaxControlToolkit.BoxSide.Left)
        };
        box.horizontal = box.left + box.right;
        box.vertical = box.top + box.bottom;
        return box;
    },
    
    getPaddingBox : function(element) {
        /// <summary>
        /// Gets the entire padding box sizes.
        /// </summary>
        /// <param name="element" type="Sys.UI.DomElement" domElement="true">
        /// DOM element
        /// </param>
        /// <returns type="Object">
        /// Element's padding box sizes (of the form {top,left,bottom,right,horizontal,vertical})
        /// </returns>
        
        if (!element) {
            throw Error.argumentNull('element');
        }
        var box = {
            top: this.getPadding(element, AjaxControlToolkit.BoxSide.Top),
            right: this.getPadding(element, AjaxControlToolkit.BoxSide.Right),
            bottom: this.getPadding(element, AjaxControlToolkit.BoxSide.Bottom),
            left: this.getPadding(element, AjaxControlToolkit.BoxSide.Left)
        };
        box.horizontal = box.left + box.right;
        box.vertical = box.top + box.bottom;
        return box;
    },
    
    isBorderVisible : function(element, boxSide) {
        /// <summary>
        /// Gets whether the current border style for an element on a specific boxSide is not 'none'.
        /// </summary>
        /// <param name="element" type="Sys.UI.DomElement" domElement="true">
        /// DOM element
        /// </param>
        /// <param name="boxSide" type="AjaxControlToolkit.BoxSide">
        /// Side of the element
        /// </param>
        /// <returns type="Boolean">
        /// Whether the current border style for an element on a specific boxSide is not 'none'.
        /// </returns>
        
        if (!element) {
            throw Error.argumentNull('element');
        }
        if(boxSide < AjaxControlToolkit.BoxSide.Top || boxSide > AjaxControlToolkit.BoxSide.Left) {
            throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue, boxSide, 'AjaxControlToolkit.BoxSide'));
        }
        var styleName = this._borderStyleNames[boxSide];
        var styleValue = this.getCurrentStyle(element, styleName);
        return styleValue != "none";
    },
    
    getMargin : function(element, boxSide) {
        /// <summary>
        /// Gets the margin thickness of an element on a specific boxSide.
        /// </summary>
        /// <param name="element" type="Sys.UI.DomElement" domElement="true">
        /// DOM element
        /// </param>
        /// <param name="boxSide" type="AjaxControlToolkit.BoxSide">
        /// Side of the element
        /// </param>
        /// <returns type="Number" integer="true">
        /// Margin thickness on the element's specified side
        /// </returns>
        
        if (!element) {
            throw Error.argumentNull('element');
        }
        if(boxSide < AjaxControlToolkit.BoxSide.Top || boxSide > AjaxControlToolkit.BoxSide.Left) {
            throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue, boxSide, 'AjaxControlToolkit.BoxSide'));
        }
        var styleName = this._marginWidthNames[boxSide];
        var styleValue = this.getCurrentStyle(element, styleName);
        try { return this.parsePadding(styleValue); } catch(ex) { return 0; }
    },

    getBorderWidth : function(element, boxSide) {
        /// <summary>
        /// Gets the border thickness of an element on a specific boxSide.
        /// </summary>
        /// <param name="element" type="Sys.UI.DomElement" domElement="true">
        /// DOM element
        /// </param>
        /// <param name="boxSide" type="AjaxControlToolkit.BoxSide">
        /// Side of the element
        /// </param>
        /// <returns type="Number" integer="true">
        /// Border thickness on the element's specified side
        /// </returns>
        
        if (!element) {
            throw Error.argumentNull('element');
        }
        if(boxSide < AjaxControlToolkit.BoxSide.Top || boxSide > AjaxControlToolkit.BoxSide.Left) {
            throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue, boxSide, 'AjaxControlToolkit.BoxSide'));
        }
        if(!this.isBorderVisible(element, boxSide)) {
            return 0;
        }        
        var styleName = this._borderWidthNames[boxSide];    
        var styleValue = this.getCurrentStyle(element, styleName);
        return this.parseBorderWidth(styleValue);
    },
    
    getPadding : function(element, boxSide) {
        /// <summary>
        /// Gets the padding thickness of an element on a specific boxSide.
        /// </summary>
        /// <param name="element" type="Sys.UI.DomElement" domElement="true">
        /// DOM element
        /// </param>
        /// <param name="boxSide" type="AjaxControlToolkit.BoxSide">
        /// Side of the element
        /// </param>
        /// <returns type="Number" integer="true">
        /// Padding on the element's specified side
        /// </returns>
        
        if (!element) {
            throw Error.argumentNull('element');
        }
        if(boxSide < AjaxControlToolkit.BoxSide.Top || boxSide > AjaxControlToolkit.BoxSide.Left) {
            throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue, boxSide, 'AjaxControlToolkit.BoxSide'));
        }
        var styleName = this._paddingWidthNames[boxSide];
        var styleValue = this.getCurrentStyle(element, styleName);
        return this.parsePadding(styleValue);
    },
    
    parseBorderWidth : function(borderWidth) {
        /// <summary>
        /// Parses a border-width string into a pixel size
        /// </summary>
        /// <param name="borderWidth" type="String" mayBeNull="true">
        /// Type of border ('thin','medium','thick','inherit',px unit,null,'')
        /// </param>
        /// <returns type="Number" integer="true">
        /// Number of pixels in the border-width
        /// </returns>
        if (!this._borderThicknesses) {
            
            // Populate the borderThicknesses lookup table
            var borderThicknesses = { };
            var div0 = document.createElement('div');
            div0.style.visibility = 'hidden';
            div0.style.position = 'absolute';
            div0.style.fontSize = '1px';
            document.body.appendChild(div0)
            var div1 = document.createElement('div');
            div1.style.height = '0px';
            div1.style.overflow = 'hidden';
            div0.appendChild(div1);
            var base = div0.offsetHeight;
            div1.style.borderTop = 'solid black';
            div1.style.borderTopWidth = 'thin';
            borderThicknesses['thin'] = div0.offsetHeight - base;
            div1.style.borderTopWidth = 'medium';
            borderThicknesses['medium'] = div0.offsetHeight - base;
            div1.style.borderTopWidth = 'thick';
            borderThicknesses['thick'] = div0.offsetHeight - base;
            div0.removeChild(div1);
            document.body.removeChild(div0);
            this._borderThicknesses = borderThicknesses;
        }
        
        if (borderWidth) {
            switch(borderWidth) {
                case 'thin':
                case 'medium':
                case 'thick':
                    return this._borderThicknesses[borderWidth];
                case 'inherit':
                    return 0;
            }
            var unit = this.parseUnit(borderWidth);
            Sys.Debug.assert(unit.type == 'px', String.format(AjaxControlToolkit.Resources.Common_InvalidBorderWidthUnit, unit.type));
            return unit.size;
        }
        return 0;
    },
    
    parsePadding : function(padding) {
        /// <summary>
        /// Parses a padding string into a pixel size
        /// </summary>
        /// <param name="padding" type="String" mayBeNull="true">
        /// Padding to parse ('inherit',px unit,null,'')
        /// </param>
        /// <returns type="Number" integer="true">
        /// Number of pixels in the padding
        /// </returns>
        
        if(padding) {
            if(padding == 'inherit') {
                return 0;
            }
            var unit = this.parseUnit(padding);
            Sys.Debug.assert(unit.type == 'px', String.format(AjaxControlToolkit.Resources.Common_InvalidPaddingUnit, unit.type));
            return unit.size;
        }
        return 0;
    },
    
    parseUnit : function(value) {
        /// <summary>
        /// Parses a unit string into a unit object
        /// </summary>
        /// <param name="value" type="String" mayBeNull="true">
        /// Value to parse (of the form px unit,% unit,em unit,...)
        /// </param>
        /// <returns type="Object">
        /// Parsed unit (of the form {size,type})
        /// </returns>
        
        if (!value) {
            throw Error.argumentNull('value');
        }
        
        value = value.trim().toLowerCase();
        var l = value.length;
        var s = -1;
        for(var i = 0; i < l; i++) {
            var ch = value.substr(i, 1);
            if((ch < '0' || ch > '9') && ch != '-' && ch != '.' && ch != ',') {
                break;
            }
            s = i;
        }
        if(s == -1) {
            throw Error.create(AjaxControlToolkit.Resources.Common_UnitHasNoDigits);
        }
        var type;
        var size;
        if(s < (l - 1)) {
            type = value.substring(s + 1).trim();
        } else {
            type = 'px';
        }
        size = parseFloat(value.substr(0, s + 1));
        if(type == 'px') {
            size = Math.floor(size);
        }
        return { 
            size: size,
            type: type
        };
    },
    
    getElementOpacity : function(element) {
        /// <summary>
        /// Get the element's opacity
        /// </summary>
        /// <param name="element" type="Sys.UI.DomElement" domElement="true">
        /// Element
        /// </param>
        /// <returns type="Number">
        /// Opacity of the element
        /// </returns>
        
        if (!element) {
            throw Error.argumentNull('element');
        }
        
        var hasOpacity = false;
        var opacity;
        
        if (element.filters) {
            var filters = element.filters;
            if (filters.length !== 0) {
                var alphaFilter = filters['DXImageTransform.Microsoft.Alpha'];
                if (alphaFilter) {
                    opacity = alphaFilter.opacity / 100.0;
                    hasOpacity = true;
                }
            }
        }
        else {
            opacity = this.getCurrentStyle(element, 'opacity', 1);
            hasOpacity = true;
        }
        
        if (hasOpacity === false) {
            return 1.0;
        }
        return parseFloat(opacity);
    },

    setElementOpacity : function(element, value) {
        /// <summary>
        /// Set the element's opacity
        /// </summary>
        /// <param name="element" type="Sys.UI.DomElement" domElement="true">
        /// Element
        /// </param>
        /// <param name="value" type="Number">
        /// Opacity of the element
        /// </param>
        
        if (!element) {
            throw Error.argumentNull('element');
        }
        
        if (element.filters) {
            var filters = element.filters;
            var createFilter = true;
            if (filters.length !== 0) {
                var alphaFilter = filters['DXImageTransform.Microsoft.Alpha'];
                if (alphaFilter) {
                    createFilter = false;
                    alphaFilter.opacity = value * 100;
                }
            }
            if (createFilter) {
                element.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity=' + (value * 100) + ')';
            }
        }
        else {
            element.style.opacity = value;
        }
    },
    
    getVisible : function(element) {
        /// <summary>
        /// Check if an element is visible
        /// </summary>
        /// <param name="element" type="Sys.UI.DomElement" domElement="true">
        /// Element
        /// </param>
        /// <returns type="Boolean" mayBeNull="false">
        /// True if the element is visible, false otherwise
        /// </returns>
        
        // Note: reference to CommonToolkitScripts must be left intact (i.e. don't
        // replace with 'this') because this function will be aliased
        
        return (element &&
                ("none" != $common.getCurrentStyle(element, "display")) &&
                ("hidden" != $common.getCurrentStyle(element, "visibility")));
    },
    
    setVisible : function(element, value) {
        /// <summary>
        /// Check if an element is visible
        /// </summary>
        /// <param name="element" type="Sys.UI.DomElement" domElement="true">
        /// Element
        /// </param>
        /// <param name="value" type="Boolean" mayBeNull="false">
        /// True to make the element visible, false to hide it
        /// </param>
        
        // Note: reference to CommonToolkitScripts must be left intact (i.e. don't
        // replace with 'this') because this function will be aliased
        
        if (element && value != $common.getVisible(element)) {
            if (value) {
                if (element.style.removeAttribute) {
                    element.style.removeAttribute("display");
                } else {
                   element.style.removeProperty("display");
                }
            } else {
                element.style.display = 'none';
            }
            element.style.visibility = value ? 'visible' : 'hidden';
        }
    },
    
    resolveFunction : function(value) {
        /// <summary>
        /// Returns a function reference that corresponds to the provided value
        /// </summary>
        /// <param name="value" type="Object">
        /// The value can either be a Function, the name of a function (that can be found using window['name']),
        /// or an expression that evaluates to a function.
        /// </param>
        /// <returns type="Function">
        /// Reference to the function, or null if not found
        /// </returns>
        
        if (value) {
            if (value instanceof Function) {
                return value;
            } else if (String.isInstanceOfType(value) && value.length > 0) {
                var func;
                if ((func = window[value]) instanceof Function) {
                    return func;
                } else if ((func = eval(value)) instanceof Function) {
                    return func;
                }
            }
        }
        return null;
    },

    addCssClasses : function(element, classNames) {
        /// <summary>
        /// Adds multiple css classes to a DomElement
        /// </summary>
        /// <param name="element" type="Sys.UI.DomElement">The element to modify</param>
        /// <param name="classNames" type="Array">The class names to add</param>
        
        for(var i = 0; i < classNames.length; i++) {
            Sys.UI.DomElement.addCssClass(element, classNames[i]);
        }
    },
    removeCssClasses : function(element, classNames) {
        /// <summary>
        /// Removes multiple css classes to a DomElement
        /// </summary>
        /// <param name="element" type="Sys.UI.DomElement">The element to modify</param>
        /// <param name="classNames" type="Array">The class names to remove</param>
        
        for(var i = 0; i < classNames.length; i++) {
            Sys.UI.DomElement.removeCssClass(element, classNames[i]);
        }
    },
    setStyle : function(element, style) {
        /// <summary>
        /// Sets the style of the element using the supplied style template object
        /// </summary>
        /// <param name="element" type="Sys.UI.DomElement">The element to modify</param>
        /// <param name="style" type="Object">The template</param>

        $common.applyProperties(element.style, style);
    },
    removeHandlers : function(element, events) {
        /// <summary>
        /// Removes a set of event handlers from an element
        /// </summary>
        /// <param name="element" type="Sys.UI.DomElement">The element to modify</param>
        /// <param name="events" type="Object">The template object that contains event names and delegates</param>
        /// <remarks>
        /// This is NOT the same as $clearHandlers which removes all delegates from a DomElement.  This rather removes select delegates 
        /// from a specified element and has a matching signature as $addHandlers
        /// </remarks>
        for (var name in events) {
            $removeHandler(element, name, events[name]);
        }
    },
    
    overlaps : function(r1, r2) {
        /// <summary>
        /// Determine if two rectangles overlap
        /// </summary>
        /// <param name="r1" type="Object">
        /// Rectangle
        /// </param>
        /// <param name="r2" type="Object">
        /// Rectangle
        /// </param>
        /// <returns type="Boolean">
        /// True if the rectangles overlap, false otherwise
        /// </returns>
        
         return r1.x < (r2.x + r2.width)
                && r2.x < (r1.x + r1.width)
                && r1.y < (r2.y + r2.height)
                && r2.y < (r1.y + r1.height);
    },
    
    containsPoint : function(rect, x, y) {
        /// <summary>
        /// Tests whether a point (x,y) is contained within a rectangle
        /// </summary>
        /// <param name="rect" type="Object">The rectangle</param>
        /// <param name="x" type="Number">The x coordinate of the point</param>
        /// <param name="y" type="Number">The y coordinate of the point</param>
        
        return x >= rect.x && x < (rect.x + rect.width) && y >= rect.y && y < (rect.y + rect.height);
    },

    isKeyDigit : function(keyCode) { 
        /// <summary>
        /// Gets whether the supplied key-code is a digit
        /// </summary>
        /// <param name="keyCode" type="Number" integer="true">The key code of the event (from Sys.UI.DomEvent)</param>
        /// <returns type="Boolean" />

        return (0x30 <= keyCode && keyCode <= 0x39); 
    },
    
    isKeyNavigation : function(keyCode) { 
        /// <summary>
        /// Gets whether the supplied key-code is a navigation key
        /// </summary>
        /// <param name="keyCode" type="Number" integer="true">The key code of the event (from Sys.UI.DomEvent)</param>
        /// <returns type="Boolean" />

        return (Sys.UI.Key.left <= keyCode && keyCode <= Sys.UI.Key.down); 
    },
    
    padLeft : function(text, size, ch, truncate) { 
        /// <summary>
        /// Pads the left hand side of the supplied text with the specified pad character up to the requested size
        /// </summary>
        /// <param name="text" type="String">The text to pad</param>
        /// <param name="size" type="Number" integer="true" optional="true">The size to pad the text (default is 2)</param>
        /// <param name="ch" type="String" optional="true">The single character to use as the pad character (default is ' ')</param>
        /// <param name="truncate" type="Boolean" optional="true">Whether to truncate the text to size (default is false)</param>
        
        return $common._pad(text, size || 2, ch || ' ', 'l', truncate || false); 
    },
    
    padRight : function(text, size, ch, truncate) { 
        /// <summary>
        /// Pads the right hand side of the supplied text with the specified pad character up to the requested size
        /// </summary>
        /// <param name="text" type="String">The text to pad</param>
        /// <param name="size" type="Number" integer="true" optional="true">The size to pad the text (default is 2)</param>
        /// <param name="ch" type="String" optional="true">The single character to use as the pad character (default is ' ')</param>
        /// <param name="truncate" type="Boolean" optional="true">Whether to truncate the text to size (default is false)</param>

        return $common._pad(text, size || 2, ch || ' ', 'r', truncate || false); 
    },
    
    _pad : function(text, size, ch, side, truncate) {
        /// <summary>
        /// Pads supplied text with the specified pad character up to the requested size
        /// </summary>
        /// <param name="text" type="String">The text to pad</param>
        /// <param name="size" type="Number" integer="true">The size to pad the text</param>
        /// <param name="ch" type="String">The single character to use as the pad character</param>
        /// <param name="side" type="String">Either 'l' or 'r' to siginfy whether to pad the Left or Right side respectively</param>
        /// <param name="truncate" type="Boolean">Whether to truncate the text to size</param>

        text = text.toString();
        var length = text.length;
        var builder = new Sys.StringBuilder();
        if (side == 'r') {
            builder.append(text);
        } 
        while (length < size) {
            builder.append(ch);
            length++;
        }
        if (side == 'l') {
            builder.append(text);
        }
        var result = builder.toString();
        if (truncate && result.length > size) {
            if (side == 'l') {
                result = result.substr(result.length - size, size);
            } else {
                result = result.substr(0, size);
            }
        }
        return result;
    },
    
    __DOMEvents : {
        focusin : { eventGroup : "UIEvents", init : function(e, p) { e.initUIEvent("focusin", true, false, window, 1); } },
        focusout : { eventGroup : "UIEvents", init : function(e, p) { e.initUIEvent("focusout", true, false, window, 1); } },
        activate : { eventGroup : "UIEvents", init : function(e, p) { e.initUIEvent("activate", true, true, window, 1); } },
        focus : { eventGroup : "UIEvents", init : function(e, p) { e.initUIEvent("focus", false, false, window, 1); } },
        blur : { eventGroup : "UIEvents", init : function(e, p) { e.initUIEvent("blur", false, false, window, 1); } },
        click : { eventGroup : "MouseEvents", init : function(e, p) { e.initMouseEvent("click", true, true, window, 1, p.screenX || 0, p.screenY || 0, p.clientX || 0, p.clientY || 0, p.ctrlKey || false, p.altKey || false, p.shiftKey || false, p.metaKey || false, p.button || 0, p.relatedTarget || null); } },
        dblclick : { eventGroup : "MouseEvents", init : function(e, p) { e.initMouseEvent("click", true, true, window, 2, p.screenX || 0, p.screenY || 0, p.clientX || 0, p.clientY || 0, p.ctrlKey || false, p.altKey || false, p.shiftKey || false, p.metaKey || false, p.button || 0, p.relatedTarget || null); } },
        mousedown : { eventGroup : "MouseEvents", init : function(e, p) { e.initMouseEvent("mousedown", true, true, window, 1, p.screenX || 0, p.screenY || 0, p.clientX || 0, p.clientY || 0, p.ctrlKey || false, p.altKey || false, p.shiftKey || false, p.metaKey || false, p.button || 0, p.relatedTarget || null); } },
        mouseup : { eventGroup : "MouseEvents", init : function(e, p) { e.initMouseEvent("mouseup", true, true, window, 1, p.screenX || 0, p.screenY || 0, p.clientX || 0, p.clientY || 0, p.ctrlKey || false, p.altKey || false, p.shiftKey || false, p.metaKey || false, p.button || 0, p.relatedTarget || null); } },
        mouseover : { eventGroup : "MouseEvents", init : function(e, p) { e.initMouseEvent("mouseover", true, true, window, 1, p.screenX || 0, p.screenY || 0, p.clientX || 0, p.clientY || 0, p.ctrlKey || false, p.altKey || false, p.shiftKey || false, p.metaKey || false, p.button || 0, p.relatedTarget || null); } },
        mousemove : { eventGroup : "MouseEvents", init : function(e, p) { e.initMouseEvent("mousemove", true, true, window, 1, p.screenX || 0, p.screenY || 0, p.clientX || 0, p.clientY || 0, p.ctrlKey || false, p.altKey || false, p.shiftKey || false, p.metaKey || false, p.button || 0, p.relatedTarget || null); } },
        mouseout : { eventGroup : "MouseEvents", init : function(e, p) { e.initMouseEvent("mousemove", true, true, window, 1, p.screenX || 0, p.screenY || 0, p.clientX || 0, p.clientY || 0, p.ctrlKey || false, p.altKey || false, p.shiftKey || false, p.metaKey || false, p.button || 0, p.relatedTarget || null); } },
        load : { eventGroup : "HTMLEvents", init : function(e, p) { e.initEvent("load", false, false); } },
        unload : { eventGroup : "HTMLEvents", init : function(e, p) { e.initEvent("unload", false, false); } },
        select : { eventGroup : "HTMLEvents", init : function(e, p) { e.initEvent("select", true, false); } },
        change : { eventGroup : "HTMLEvents", init : function(e, p) { e.initEvent("change", true, false); } },
        submit : { eventGroup : "HTMLEvents", init : function(e, p) { e.initEvent("submit", true, true); } },
        reset : { eventGroup : "HTMLEvents", init : function(e, p) { e.initEvent("reset", true, false); } },
        resize : { eventGroup : "HTMLEvents", init : function(e, p) { e.initEvent("resize", true, false); } },
        scroll : { eventGroup : "HTMLEvents", init : function(e, p) { e.initEvent("scroll", true, false); } }
    },
    
    tryFireRawEvent : function(element, rawEvent) {
        /// <summary>
        /// Attempts to fire a raw DOM event on an element
        /// </summary>
        /// <param name="element" type="Sys.UI.DomElement">The element to fire the event</param>
        /// <param name="rawEvent" type="Object">The raw DOM event object to fire. Must not be Sys.UI.DomEvent</param>
        /// <returns type="Boolean">True if the event was successfully fired, otherwise false</returns>
        
        try {
            if (element.fireEvent) {
                element.fireEvent("on" + rawEvent.type, rawEvent);
                return true;
            } else if (element.dispatchEvent) {
                element.dispatchEvent(rawEvent);
                return true;
            }
        } catch (e) {
        }
        return false;
    },    

    tryFireEvent : function(element, eventName, properties) {
        /// <summary>
        /// Attempts to fire a DOM event on an element
        /// </summary>
        /// <param name="element" type="Sys.UI.DomElement">The element to fire the event</param>
        /// <param name="eventName" type="String">The name of the event to fire (without an 'on' prefix)</param>
        /// <param name="properties" type="Object">Properties to add to the event</param>
        /// <returns type="Boolean">True if the event was successfully fired, otherwise false</returns>
        
        try {
            if (document.createEventObject) {
                var e = document.createEventObject();
                $common.applyProperties(e, properties || {});
                element.fireEvent("on" + eventName, e);
                return true;
            } else if (document.createEvent) {
                var def = $common.__DOMEvents[eventName];
                if (def) {
                    var e = document.createEvent(def.eventGroup);
                    def.init(e, properties || {});
                    element.dispatchEvent(e);
                    return true;
                }
            }
        } catch (e) {
        }
        return false;
    },

    wrapElement : function(innerElement, newOuterElement, newInnerParentElement) {
        /// <summary>
        /// Wraps an inner element with a new outer element at the same DOM location as the inner element
        /// </summary>
        /// <param name="innerElement" type="Sys.UI.DomElement">The element to be wrapped</param>
        /// <param name="newOuterElement" type="Sys.UI.DomElement">The new parent for the element</param>
        /// <returns />
        
        var parent = innerElement.parentNode;
        parent.replaceChild(newOuterElement, innerElement);        
        (newInnerParentElement || newOuterElement).appendChild(innerElement);
    },

    unwrapElement : function(innerElement, oldOuterElement) {
        /// <summary>
        /// Unwraps an inner element from an outer element at the same DOM location as the outer element
        /// </summary>
        /// <param name="innerElement" type="Sys.UI.DomElement">The element to be wrapped</param>
        /// <param name="newOuterElement" type="Sys.UI.DomElement">The new parent for the element</param>
        /// <returns />

        var parent = oldOuterElement.parentNode;
        if (parent != null) {
            $common.removeElement(innerElement);
            parent.replaceChild(innerElement, oldOuterElement);
        }
    },
    
    removeElement : function(element) {
        /// <summary>
        /// Removes an element from the DOM tree
        /// </summary>
        /// <param name="element" type="Sys.UI.DomElement">The element to be removed</param>
        /// <returns />

        var parent = element.parentNode;
        if (parent != null) {
            parent.removeChild(element);
        }
    },
 
    applyProperties : function(target, properties) {
        /// <summary>
        /// Quick utility method to copy properties from a template object to a target object
        /// </summary>
        /// <param name="target" type="Object">The object to apply to</param>
        /// <param name="properties" type="Object">The template to copy values from</param>
        
        for (var p in properties) {
            var pv = properties[p];
            if (pv != null && Object.getType(pv)===Object) {
                var tv = target[p];
                $common.applyProperties(tv, pv);
            } else {
                target[p] = pv;
            }
        }
    },
        
    createElementFromTemplate : function(template, appendToParent, nameTable) {
        /// <summary>
        /// Creates an element for the current document based on a template object
        /// </summary>
        /// <param name="template" type="Object">The template from which to create the element</param>
        /// <param name="appendToParent" type="Sys.UI.DomElement" optional="true" mayBeNull="true">A DomElement under which to append this element</param>
        /// <param name="nameTable" type="Object" optional="true" mayBeNull="true">An object to use as the storage for the element using template.name as the key</param>
        /// <returns type="Sys.UI.DomElement" />
        /// <remarks>
        /// This method is useful if you find yourself using the same or similar DomElement constructions throughout a class.  You can even set the templates
        /// as static properties for a type to cut down on overhead.  This method is often called with a JSON style template:
        /// <code>
        /// var elt = $common.createElementFromTemplate({
        ///     nodeName : "div",
        ///     properties : {
        ///         style : {
        ///             height : "100px",
        ///             width : "100px",
        ///             backgroundColor : "white"
        ///         },
        ///         expandoAttribute : "foo"
        ///     },
        ///     events : {
        ///         click : function() { alert("foo"); },
        ///         mouseover : function() { elt.backgroundColor = "silver"; },
        ///         mouseout : function() { elt.backgroundColor = "white"; }
        ///     },
        ///     cssClasses : [ "class0", "class1" ],
        ///     visible : true,
        ///     opacity : .5
        /// }, someParent);
        /// </code>
        /// </remarks>
        
        // if we wish to override the name table we do so here
        if (typeof(template.nameTable)!='undefined') {
            var newNameTable = template.nameTable;
            if (String.isInstanceOfType(newNameTable)) {
                newNameTable = nameTable[newNameTable];
            }
            if (newNameTable != null) {
                nameTable = newNameTable;
            }
        }
        
        // get a name for the element in the nameTable
        var elementName = null;
        if (typeof(template.name)!=='undefined') {
            elementName = template.name;
        }
        
        // create or acquire the element
        var elt = document.createElement(template.nodeName);
        
        // if our element is named, add it to the name table
        if (typeof(template.name)!=='undefined' && nameTable) {
            nameTable[template.name] = elt;
        }
        
        // if we wish to supply a default parent we do so here
        if (typeof(template.parent)!=='undefined' && appendToParent == null) {
            var newParent = template.parent;
            if (String.isInstanceOfType(newParent)) {
                newParent = nameTable[newParent];
            }
            if (newParent != null) {
                appendToParent = newParent;
            }
        }
        
        // properties are applied as expando values to the element
        if (typeof(template.properties)!=='undefined' && template.properties != null) {
            $common.applyProperties(elt, template.properties);
        }
        
        // css classes are added to the element's className property
        if (typeof(template.cssClasses)!=='undefined' && template.cssClasses != null) {
            $common.addCssClasses(elt, template.cssClasses);
        }
        
        // events are added to the dom element using $addHandlers
        if (typeof(template.events)!=='undefined' && template.events != null) {
            $addHandlers(elt, template.events);
        }
        
        // if the element is visible or not its visibility is set
        if (typeof(template.visible)!=='undefined' && template.visible != null) {
            this.setVisible(elt, template.visible);
        }
        
        // if we have an appendToParent we will now append to it
        if (appendToParent) {
            appendToParent.appendChild(elt);
        }

        // if we have opacity, apply it
        if (typeof(template.opacity)!=='undefined' && template.opacity != null) {
            $common.setElementOpacity(elt, template.opacity);
        }
        
        // if we have child templates, process them
        if (typeof(template.children)!=='undefined' && template.children != null) {
            for (var i = 0; i < template.children.length; i++) {
                var subtemplate = template.children[i];
                $common.createElementFromTemplate(subtemplate, elt, nameTable);
            }
        }
        
        // if we have a content presenter for the element get it (the element itself is the default presenter for content)
        var contentPresenter = elt;
        if (typeof(template.contentPresenter)!=='undefined' && template.contentPresenter != null) {
            contentPresenter = nameTable[contentPresenter];
        }
        
        // if we have content, add it
        if (typeof(template.content)!=='undefined' && template.content != null) {
            var content = template.content;
            if (String.isInstanceOfType(content)) {
                content = nameTable[content];
            }
            if (content.parentNode) {
                $common.wrapElement(content, elt, contentPresenter);
            } else {
                contentPresenter.appendChild(content);
            }
        }
        
        // return the created element
        return elt;
    },
    
    prepareHiddenElementForATDeviceUpdate : function () {
        /// <summary>
        /// JAWS, an Assistive Technology device responds to updates to form elements 
        /// and refreshes its document buffer to what is showing live
        /// in the browser. To ensure that Toolkit controls that make XmlHttpRequests to
        /// retrieve content are useful to users with visual disabilities, we update a
        /// hidden form element to ensure that JAWS conveys what is in
        /// the browser. See this article for more details: 
        /// http://juicystudio.com/article/improving-ajax-applications-for-jaws-users.php
        /// This method creates a hidden input on the screen for any page that uses a Toolkit
        /// control that will perform an XmlHttpRequest.
        /// </summary>   
        var objHidden = document.getElementById('hiddenInputToUpdateATBuffer_CommonToolkitScripts');
        if (!objHidden) {
            var objHidden = document.createElement('input');
            objHidden.setAttribute('type', 'hidden');
            objHidden.setAttribute('value', '1');
            objHidden.setAttribute('id', 'hiddenInputToUpdateATBuffer_CommonToolkitScripts');
            objHidden.setAttribute('name', 'hiddenInputToUpdateATBuffer_CommonToolkitScripts');
            if ( document.forms[0] ) {
                document.forms[0].appendChild(objHidden);
            }
        }
    },
    
    updateFormToRefreshATDeviceBuffer : function () {
        /// <summary>
        /// Updates the hidden buffer to ensure that the latest document stream is picked up
        /// by the screen reader.
        /// </summary>
        var objHidden = document.getElementById('hiddenInputToUpdateATBuffer_CommonToolkitScripts');

        if (objHidden) {
            if (objHidden.getAttribute('value') == '1') {
                objHidden.setAttribute('value', '0');
            } else {
                objHidden.setAttribute('value', '1');
            }
        }
    }
}

// Create the singleton instance of the CommonToolkitScripts
var CommonToolkitScripts = AjaxControlToolkit.CommonToolkitScripts = new AjaxControlToolkit._CommonToolkitScripts();
var $common = CommonToolkitScripts;

// Alias functions that were moved from BlockingScripts into Common
Sys.UI.DomElement.getVisible = $common.getVisible;
Sys.UI.DomElement.setVisible = $common.setVisible;
Sys.UI.Control.overlaps = $common.overlaps;

AjaxControlToolkit._DomUtility = function() {
    /// <summary>
    /// Utility functions for manipulating the DOM
    /// </summary>
}
AjaxControlToolkit._DomUtility.prototype = {
    isDescendant : function(ancestor, descendant) {
        /// <summary>
        /// Whether the specified element is a descendant of the ancestor
        /// </summary>
        /// <param name="ancestor" type="Sys.UI.DomElement">Ancestor node</param>
        /// <param name="descendant" type="Sys.UI.DomElement">Possible descendant node</param>
        /// <returns type="Boolean" />
        
        for (var n = descendant.parentNode; n != null; n = n.parentNode) {
            if (n == ancestor) return true;
        }
        return false;
    },
    isDescendantOrSelf : function(ancestor, descendant) {
        /// <summary>
        /// Whether the specified element is a descendant of the ancestor or the same as the ancestor
        /// </summary>
        /// <param name="ancestor" type="Sys.UI.DomElement">Ancestor node</param>
        /// <param name="descendant" type="Sys.UI.DomElement">Possible descendant node</param>
        /// <returns type="Boolean" />

        if (ancestor === descendant) 
            return true;
        return AjaxControlToolkit.DomUtility.isDescendant(ancestor, descendant);
    },
    isAncestor : function(descendant, ancestor) {
        /// <summary>
        /// Whether the specified element is an ancestor of the descendant
        /// </summary>
        /// <param name="descendant" type="Sys.UI.DomElement">Descendant node</param>
        /// <param name="ancestor" type="Sys.UI.DomElement">Possible ancestor node</param>
        /// <returns type="Boolean" />

        return AjaxControlToolkit.DomUtility.isDescendant(ancestor, descendant);
    },
    isAncestorOrSelf : function(descendant, ancestor) {
        /// <summary>
        /// Whether the specified element is an ancestor of the descendant or the same as the descendant
        /// </summary>
        /// <param name="descendant" type="Sys.UI.DomElement">Descendant node</param>
        /// <param name="ancestor" type="Sys.UI.DomElement">Possible ancestor node</param>
        /// <returns type="Boolean" />
        
        if (descendant === ancestor)
            return true;
            
        return AjaxControlToolkit.DomUtility.isDescendant(ancestor, descendant);
    },
    isSibling : function(self, sibling) {
        /// <summary>
        /// Whether the specified element is a sibling of the self element
        /// </summary>
        /// <param name="self" type="Sys.UI.DomElement">Self node</param>
        /// <param name="sibling" type="Sys.UI.DomElement">Possible sibling node</param>
        /// <returns type="Boolean" />
        
        var parent = self.parentNode;
        for (var i = 0; i < parent.childNodes.length; i++) {
            if (parent.childNodes[i] == sibling) return true;
        }
        return false;
    }
}
AjaxControlToolkit._DomUtility.registerClass("AjaxControlToolkit._DomUtility");
AjaxControlToolkit.DomUtility = new AjaxControlToolkit._DomUtility();


AjaxControlToolkit.TextBoxWrapper = function(element) {
    /// <summary>
    /// Class that wraps a TextBox (INPUT type="text") to abstract-out the
    /// presence of a watermark (which may be visible to the user but which
    /// should never be read by script.
    /// </summary>
    /// <param name="element" type="Sys.UI.DomElement" domElement="true">
    /// The DOM element the behavior is associated with
    /// </param>
    AjaxControlToolkit.TextBoxWrapper.initializeBase(this, [element]);
    this._current = element.value;
    this._watermark = null;
    this._isWatermarked = false;
}

AjaxControlToolkit.TextBoxWrapper.prototype = {

    dispose : function() {
        /// <summary>
        /// Dispose the behavior
        /// </summary>
        this.get_element().AjaxControlToolkitTextBoxWrapper = null;
        AjaxControlToolkit.TextBoxWrapper.callBaseMethod(this, 'dispose');
    },

    get_Current : function() {
        /// <value type="String">
        /// Current value actually in the TextBox (i.e., TextBox.value)
        /// </value>
        this._current = this.get_element().value;
        return this._current;
    },
    set_Current : function(value) {
        this._current = value;
        this._updateElement();
    },

    get_Value : function() {
        /// <value type="String">
        /// Conceptual "value" of the TextBox - its contents if no watermark is present
        /// or "" if one is
        /// </value>
        if (this.get_IsWatermarked()) {
            return "";
        } else {
            return this.get_Current();
        }
    },
    set_Value : function(text) {
        this.set_Current(text);
        if (!text || (0 == text.length)) {
            if (null != this._watermark) {
                this.set_IsWatermarked(true);
            }
        } else {
            this.set_IsWatermarked(false);
        }
    },

    get_Watermark : function() {
        /// <value type="String">
        /// Text of the watermark for the TextBox
        /// </value>
        return this._watermark;
    },
    set_Watermark : function(value) {
        this._watermark = value;
        this._updateElement();
    },

    get_IsWatermarked : function() {
        /// <value type="Boolean">
        /// true iff the TextBox is watermarked
        /// </value>
        return this._isWatermarked;
    },
    set_IsWatermarked : function(isWatermarked) {
        if (this._isWatermarked != isWatermarked) {
            this._isWatermarked = isWatermarked;
            this._updateElement();
            this._raiseWatermarkChanged();
        }
    },

    _updateElement : function() {
        /// <summary>
        /// Updates the actual contents of the TextBox according to what should be there
        /// </summary>
        var element = this.get_element();
        if (this._isWatermarked) {
            if (element.value != this._watermark) {
                element.value = this._watermark;
            }
        } else {
            if (element.value != this._current) {
                element.value = this._current;
            }
        }
    },

    add_WatermarkChanged : function(handler) {
        /// <summary>
        /// Adds a handler for the WatermarkChanged event
        /// </summary>
        /// <param name="handler" type="Function">
        /// Handler
        /// </param>
        this.get_events().addHandler("WatermarkChanged", handler);
    },
    remove_WatermarkChanged : function(handler) {
        /// <summary>
        /// Removes a handler for the WatermarkChanged event
        /// </summary>
        /// <param name="handler" type="Function">
        /// Handler
        /// </param>
        this.get_events().removeHandler("WatermarkChanged", handler);
    },
    _raiseWatermarkChanged : function() {
        /// <summary>
        /// Raises the WatermarkChanged event
        /// </summary>
        var onWatermarkChangedHandler = this.get_events().getHandler("WatermarkChanged");
        if (onWatermarkChangedHandler) {
            onWatermarkChangedHandler(this, Sys.EventArgs.Empty);
        }
    }
}
AjaxControlToolkit.TextBoxWrapper.get_Wrapper = function(element) {
    /// <summary>
    /// Gets (creating one if necessary) the TextBoxWrapper for the specified TextBox
    /// </summary>
    /// <param name="element" type="Sys.UI.DomElement" domElement="true">
    /// TextBox for which to get the wrapper
    /// </param>
    /// <returns type="AjaxControlToolkit.TextBoxWrapper">
    /// TextBoxWrapper instance
    /// </returns>
    if (null == element.AjaxControlToolkitTextBoxWrapper) {
        element.AjaxControlToolkitTextBoxWrapper = new AjaxControlToolkit.TextBoxWrapper(element);
    }
    return element.AjaxControlToolkitTextBoxWrapper;
}
AjaxControlToolkit.TextBoxWrapper.registerClass('AjaxControlToolkit.TextBoxWrapper', Sys.UI.Behavior);

AjaxControlToolkit.TextBoxWrapper.validatorGetValue = function(id) {
    /// <summary>
    /// Wrapper for ASP.NET's validatorGetValue to return the value from the wrapper if present
    /// </summary>
    /// <param name="id" type="String">
    /// id of the element
    /// </param>
    /// <returns type="Object">
    /// Value from the wrapper or result of original ValidatorGetValue
    /// </returns>
    var control = $get(id);
    if (control && control.AjaxControlToolkitTextBoxWrapper) {
        return control.AjaxControlToolkitTextBoxWrapper.get_Value();
    }
    return AjaxControlToolkit.TextBoxWrapper._originalValidatorGetValue(id);
}

// Wrap ASP.NET's ValidatorGetValue with AjaxControlToolkit.TextBoxWrapper.validatorGetValue
// to make validators work properly with watermarked TextBoxes
if (typeof(ValidatorGetValue) == 'function') {
    AjaxControlToolkit.TextBoxWrapper._originalValidatorGetValue = ValidatorGetValue;
    ValidatorGetValue = AjaxControlToolkit.TextBoxWrapper.validatorGetValue;
}


// Temporary fix null reference bug in Sys.CultureInfo._getAbbrMonthIndex
if (Sys.CultureInfo.prototype._getAbbrMonthIndex) {
    try {
        Sys.CultureInfo.prototype._getAbbrMonthIndex('');
    } catch(ex) {
        Sys.CultureInfo.prototype._getAbbrMonthIndex = function(value) {
            if (!this._upperAbbrMonths) {
                this._upperAbbrMonths = this._toUpperArray(this.dateTimeFormat.AbbreviatedMonthNames);
            }
            return Array.indexOf(this._upperAbbrMonths, this._toUpper(value));
        }
        Sys.CultureInfo.CurrentCulture._getAbbrMonthIndex = Sys.CultureInfo.prototype._getAbbrMonthIndex;
        Sys.CultureInfo.InvariantCulture._getAbbrMonthIndex = Sys.CultureInfo.prototype._getAbbrMonthIndex;
    }
}

/* END AjaxControlToolkit.Common.Common.js */
/* START AjaxControlToolkit.Compat.Timer.Timer.js */
// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Permissive License.
// See http://www.microsoft.com/resources/sharedsource/licensingbasics/sharedsourcelicenses.mspx.
// All other rights reserved.


/// <reference name="MicrosoftAjax.debug.js" />
/// <reference name="MicrosoftAjaxTimer.debug.js" />
/// <reference name="MicrosoftAjaxWebForms.debug.js" />


///////////////////////////////////////////////////////////////////////////////
// Sys.Timer

Sys.Timer = function() {
    Sys.Timer.initializeBase(this);
    
    this._interval = 1000;
    this._enabled = false;
    this._timer = null;
}

Sys.Timer.prototype = {
    get_interval: function() {
        
        return this._interval;
    },
    set_interval: function(value) {
        
        if (this._interval !== value) {
            this._interval = value;
            this.raisePropertyChanged('interval');
            
            if (!this.get_isUpdating() && (this._timer !== null)) {
                this._stopTimer();
                this._startTimer();
            }
        }
    },
    
    get_enabled: function() {
        
        return this._enabled;
    },
    set_enabled: function(value) {
        
        if (value !== this.get_enabled()) {
            this._enabled = value;
            this.raisePropertyChanged('enabled');
            if (!this.get_isUpdating()) {
                if (value) {
                    this._startTimer();
                }
                else {
                    this._stopTimer();
                }
            }
        }
    },

    
    add_tick: function(handler) {
        
        
        this.get_events().addHandler("tick", handler);
    },

    remove_tick: function(handler) {
        
        
        this.get_events().removeHandler("tick", handler);
    },

    dispose: function() {
        this.set_enabled(false);
        this._stopTimer();
        
        Sys.Timer.callBaseMethod(this, 'dispose');
    },
    
    updated: function() {
        Sys.Timer.callBaseMethod(this, 'updated');

        if (this._enabled) {
            this._stopTimer();
            this._startTimer();
        }
    },

    _timerCallback: function() {
        var handler = this.get_events().getHandler("tick");
        if (handler) {
            handler(this, Sys.EventArgs.Empty);
        }
    },

    _startTimer: function() {
        this._timer = window.setInterval(Function.createDelegate(this, this._timerCallback), this._interval);
    },

    _stopTimer: function() {
        window.clearInterval(this._timer);
        this._timer = null;
    }
}

Sys.Timer.descriptor = {
    properties: [   {name: 'interval', type: Number},
                    {name: 'enabled', type: Boolean} ],
    events: [ {name: 'tick'} ]
}

Sys.Timer.registerClass('Sys.Timer', Sys.Component);

/* END AjaxControlToolkit.Compat.Timer.Timer.js */
/* START AjaxControlToolkit.Animation.Animations.js */
// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Permissive License.
// See http://www.microsoft.com/resources/sharedsource/licensingbasics/sharedsourcelicenses.mspx.
// All other rights reserved.


/// <reference name="MicrosoftAjax.debug.js" />
/// <reference name="MicrosoftAjaxTimer.debug.js" />
/// <reference name="MicrosoftAjaxWebForms.debug.js" />
/// <reference path="../Compat/Timer/Timer.js" />
/// <reference path="../Common/Common.js" />


Type.registerNamespace('AjaxControlToolkit.Animation');

// Create an alias for the namespace to save 25 chars each time it's used since
// this is a very long script and will take awhile to download
var $AA = AjaxControlToolkit.Animation;

$AA.registerAnimation = function(name, type) {
    /// <summary>
    /// Register an animation with the AJAX Control Toolkit animation framework. This serves a dual purpose:
    /// 1) to add standard utility methods to the animation type (such as a <code>play</code> method that creates
    /// an animation, plays it, and disposes it when the animation is over), and 2) to associate a name with the
    /// type that will be used when creating animations from a JSON description.  This method can also be called
    /// by other animation libraries to seamlessly interoperate with the AJAX Control Toolkit's animation
    /// framework.
    /// </summary>
    /// <param name="name" type="String">
    /// Name of the animation that will be used as the XML tag name in the XML animation description.  It
    /// should be a valid XML tag (i.e. an alpha-numeric sequence with no spaces, special characters, etc.).
    /// </param>
    /// <param name="type" type="Type">
    /// The type of the new animation must inherit from <see cref="AjaxControlToolkit.Animation.Animation" />.
    /// </param>
    /// <returns />

    // Make sure the type inherits from AjaxControlToolkit.Animation.Animation
    if (type && ((type === $AA.Animation) || (type.inheritsFrom && type.inheritsFrom($AA.Animation)))) {
        // We'll store the animation name/type mapping in a "static" object off of
        // AjaxControlToolkit.Animation.  If this __animations object hasn't been
        // created yet, demand create it on the first registration.
        if (!$AA.__animations) {
            $AA.__animations = { };
        }
        
        // Add the current type to the collection of animations
        $AA.__animations[name.toLowerCase()] = type;
        
        // Add a play function that will make it very easy to create, play, and
        // dispose of an animation.  This is effectively a "static" function on
        // each animation and will take the same parameters as that animation's
        // constructor.
        type.play = function() {
            /// <summary>
            /// Create an animation, play it immediately, and dispose it when finished.
            /// </summary>
            /// <param parameterArray="true" elementType="Object">
            /// The play function takes the same parameters as the type's constructor
            /// </param>
            /// <returns />
        
            // Create and initialize a new animation of the right type and pass in
            // any arguments given to the play function
            var animation = new type();
            type.apply(animation, arguments);
            animation.initialize();
            
            // Add an event handler to dispose the animation when it's finished
            var handler = Function.createDelegate(animation,
                function() {
                    /// <summary>
                    /// Dispose the animation after playing
                    /// </summary>
                    /// <returns />
                    animation.remove_ended(handler);
                    handler = null;
                    animation.dispose();
                });
            animation.add_ended(handler);
            
            // Once the animation has been created and initialized, play it and
            // dispose it as soon as it's finished
            animation.play();            
        }
    } else {
        // Raise an error if someone registers an animation that doesn't inherit
        // from our base Animation class
        throw Error.argumentType('type', type, $AA.Animation, AjaxControlToolkit.Resources.Animation_InvalidBaseType);
    }
}

$AA.buildAnimation = function(json, defaultTarget) {
    /// <summary>
    /// The <code>buildAnimation</code> function is used to turn a JSON animation description
    /// into an actual animation object that can be played.
    /// </summary>
    /// <param name="json" type="String" mayBeNull="true">
    /// JSON description of the animation in the format expected by createAnimation
    /// </param>
    /// <param name="defaultTarget" type="Sys.UI.DomElement" mayBeNull="true" domElement="true">
    /// Target of the animation if none is specified in the JSON description.  The semantics of
    /// target assignment are provided in more detail in createAnimation.
    /// </param>
    /// <returns type="AjaxControlToolkit.Animation.Animation" mayBeNull="true">
    /// Animation created from the JSON description
    /// </returns>
    
    // Ensure we have a description to create an animation with
    if (!json || json === '') {
        return null;
    }

    // "Parse" the JSON so we can easily manipulate it
    // (we don't wrap it in a try/catch when debugging to raise any errors)
    var obj;
    json = '(' + json + ')';
    if (! Sys.Debug.isDebug) {
        try { obj = Sys.Serialization.JavaScriptSerializer.deserialize(json); } catch (ex) { } 
    } else {
        obj = Sys.Serialization.JavaScriptSerializer.deserialize(json);
    }
    
    // Create a new instance of the animation
    return $AA.createAnimation(obj, defaultTarget);    
}

$AA.createAnimation = function(obj, defaultTarget) {
    /// <summary>
    /// The <code>createAnimation</code> function builds a new
    /// <see cref="AjaxControlToolkit.Animation.Animation" /> instance from an object
    /// that describes it.
    /// </summary>
    /// <param name="obj" type="Object">
    /// The object provides a description of the animation to be be generated in
    /// a very specific format. It has two special properties: <code>AnimationName</code>
    /// and <code>AnimationChildren</code>.  The <code>AnimationName</code> is required
    /// and used to find the type of animation to create (this name should map to
    /// one of the animation names supplied to <code>registerAnimation</code>).  The
    /// <code>AnimationChildren</code> property supplies an optional array for
    /// animations that use child animations (such as
    /// <see cref="AjaxControlToolkit.Animation.ParallelAnimation" /> and
    /// <see cref="AjaxControlToolkit.Animation.SequenceAnimation" />). The elements of
    /// the <code>AnimationChildren</code> array are valid
    /// <see cref="AjaxControlToolkit.Animation.Animation" /> objects that meet these same
    /// requirements.  In order for an animation to support child animations, it must
    /// derive from the <see cref="AjaxControlToolkit.Animation.ParentAnimation" /> class
    /// which provides common methods like <code>add</code>, <code>clear</code>, etc. The
    /// remaining properties of the object are used to set parameters specific to the type
    /// of animation being created (e.g. <code>duration</code>, <code>minimumOpacity</code>,
    /// <code>startValue</code>, etc.) and should have a corresponding property on the
    /// animation.  You can also assign an arbitrary JavaScript expression to any property
    /// by adding 'Script' to the end of its name (i.e., Height="70" can be replaced by
    /// HeightScript="$get('myElement').offsetHeight") and have the property set to the
    /// result of evaluating the expression before the animation is played each time.
    /// </param>
    /// <param name="defaultTarget" type="Sys.UI.DomElement" mayBeNull="true" domElement="true">
    /// The function also takes a <code>defaultTarget</code> parameter that is used as the
    /// target of the animation if the object does not specify one.  This parameter should be
    /// an instance of <see cref="Sys.UI.DomElement" /> and not just the name of an element.
    /// </param>
    /// <returns type="AjaxControlToolkit.Animation.Animation">
    /// <see cref="AjaxControlToolkit.Animation.Animation" /> created from the description
    /// </returns>
    /// <remarks>
    /// Exceptions are thrown when the <code>AnimationName</code> cannot be found.  Also,
    /// any exceptions raised by setting properties or providing properties with invalid
    /// names will only be raised when debugging.
    /// </remarks>

    // Create a default instance of the animation by looking up the AnimationName
    // in the global __animations object.
    if (!obj || !obj.AnimationName) {
        throw Error.argument('obj', AjaxControlToolkit.Resources.Animation_MissingAnimationName);
    }
    var type = $AA.__animations[obj.AnimationName.toLowerCase()];
    if (!type) {
        throw Error.argument('type', String.format(AjaxControlToolkit.Resources.Animation_UknownAnimationName, obj.AnimationName));
    }
    var animation = new type();
    
    // Set the animation's target if provided via defaultTarget (note that setting
    // it via AnimationTarget will happen during the regular property setting phase)
    if (defaultTarget) {
        animation.set_target(defaultTarget);
    }
    
    // If there is an AnimationChildren array and the animation inherits from
    // ParentAnimation, then we will recusively build the child animations.  It is
    // important that we create the child animations before setting the animation's
    // properties or initializing (because some properties and initialization may be
    // propogated down from parent to child).
    if (obj.AnimationChildren && obj.AnimationChildren.length) {
        if ($AA.ParentAnimation.isInstanceOfType(animation)) {
            for (var i = 0; i < obj.AnimationChildren.length; i++) {
                var child = $AA.createAnimation(obj.AnimationChildren[i]);
                if (child) {
                    animation.add(child);
                }
            }
        } else {
            throw Error.argument('obj', String.format(AjaxControlToolkit.Resources.Animation_ChildrenNotAllowed, type.getName()));
        }
    }
    
    // Get the list of all properties available to set on the current animation's
    // type.  We create a mapping from the property's lowercase friendly name
    // (i.e., "duration") to the name of its setter (i.e., "set_duration").  This is
    // essentialy in setting properties so we only copy over valid values.
    var properties = type.__animationProperties;
    if (!properties) {
        // Get the properties for this type by walking its prototype - by doing
        // this we'll effectively ignore anything not defined in the prototype
        type.__animationProperties = { };
        type.resolveInheritance();
        for (var name in type.prototype) {
            if (name.startsWith('set_')) {
                type.__animationProperties[name.substr(4).toLowerCase()] = name;
            }
        }
        
        // Remove the 'id' property as it shouldn't be set by the animation
        // (NOTE: the 'target' proeprty shouldn't be set to a string value, but it
        // isn't removed because it can be used as a valid dynamic property - i.e.
        // Target="myElement" *DOES NOT WORK*, but it's OKAY to use
        // TargetScript="$get('myElement')".  Validation for this scenario will be
        // handled automatically by _validateParams when debugging as Target is required
        // to be a dom element.)
        delete type.__animationProperties['id'];
        properties = type.__animationProperties;
    }
    
    // Loop through each of the properties in the object and check if it's in the list
    // of valid property names.  We will check the type of the propertyName to make sure
    // it's a String (as other types can be added by the ASP.NET AJAX compatability
    // layers to all objects and cause errors if you don't exclude them).  We will first
    // try to set a property with the same name if it exists.  If we can't find one but
    // the name of the property ends in 'script', then we will try to set a corresponding
    // dynamic property.  If no matches can be found at all, we'll raise an error when
    // debugging.
    for (var property in obj) {
        // Ignore the special properties in the object that don't correspond
        // to any actual properties on the animation
        var prop = property.toLowerCase();
        if (prop == 'animationname' || prop == 'animationchildren') {
            continue;
        }
        
        var value = obj[property];
        
        // Try to directly set the value of this property
        var setter = properties[prop];
        if (setter && String.isInstanceOfType(setter) && animation[setter]) {
            // Ignore any exceptions raised by setting the property
            // unless we're debugging
            if (! Sys.Debug.isDebug) {
                try { animation[setter](value); } catch (ex) { }
            } else {
                animation[setter](value);
            }
        } else {
            // Try to set the value of a dynamic property
            if (prop.endsWith('script')) {
                setter = properties[prop.substr(0, property.length - 6)];
                if (setter && String.isInstanceOfType(setter) && animation[setter]) {
                    animation.DynamicProperties[setter] = value;
                } else if ( Sys.Debug.isDebug) {
                    // Raise an error when debugging if we could not find a matching property
                    throw Error.argument('obj', String.format(AjaxControlToolkit.Resources.Animation_NoDynamicPropertyFound, property, property.substr(0, property.length - 5)));
                }
            } else if ( Sys.Debug.isDebug) {
                // Raise an error when debugging if we could not find a matching property
                throw Error.argument('obj', String.format(AjaxControlToolkit.Resources.Animation_NoPropertyFound, property));
            }
        }
    }
    
    return animation;
}


// In the Xml comments for each of the animations below, there is a special <animation /> tag
// that describes how the animation is referenced from a generic XML animation description


$AA.Animation = function(target, duration, fps) {
    /// <summary>
    /// <code>Animation</code> is an abstract base class used as a starting point for all the other animations.
    /// It provides the basic mechanics for the animation (playing, pausing, stopping, timing, etc.)
    /// and leaves the actual animation to be done in the abstract methods <code>getAnimatedValue</code>
    /// and <code>setValue</code>.
    /// </summary>
    /// <param name="target" type="Sys.UI.DomElement" mayBeNull="true" optional="true" domElement="true">
    /// Target of the animation
    /// </param>
    /// <param name="duration" type="Number" mayBeNull="true" optional="true">
    /// Length of the animation in seconds.  The default is 1.
    /// </param>
    /// <param name="fps" type="Number" mayBeNull="true" optional="true" integer="true">
    /// Number of steps per second.  The default is 25.
    /// </param>
    /// <field name="DynamicProperties" type="Object">
    /// The DynamicProperties collection is used to associate JavaScript expressions with
    /// properties.  The expressions are evaluated just before the animation is played
    /// everytime (in the base onStart method).  The object itself maps strings with the
    /// names of property setters (like "set_verticalOffset") to JavaScript expressions
    /// (like "$find('MyBehavior').get_element().offsetHeight").  Note specifically that
    /// the dynamic properties are JavaScript expressions and not abitrary statements (i.e.
    /// you can't include things like "return foo;"), although you can include anything
    /// inside an anonymous function definition that you immediately invoke (i.e.,
    /// "(function() { return foo; })()").  A dynamic property can be set in the generic
    /// XML animation description by appending Script onto any legitimate property name
    /// (for example, instead of Height="70" we could use
    /// HeightScript="$find('MyBehavior').get_element().offsetHeight").  Any exceptions
    /// raised when setting dynamic properties (including both JavaScript evaluation errors
    /// and other exceptions raised by property setters) will only be propogated when
    /// debugging.
    /// </field>
    /// <remarks>
    /// Animations need to be as fast as possible - even in debug mode.  Don't add validation code to
    /// methods involved in every step of the animation.
    /// </remarks>
    /// <animation>Animation</animation>
    $AA.Animation.initializeBase(this);
    
    // Length of the animation in seconds
    this._duration = 1;
    
    // Number of steps per second
    this._fps = 25;
    
    // Target Sys.UI.DomElement of the animation
    this._target = null;
    
    // Tick event handler
    this._tickHandler = null;
    
    // Animation timer
    this._timer = null;
    
    // Percentage of the animation already played
    this._percentComplete = 0;
    
    // Percentage of the animation to play on each step
    this._percentDelta = null;
    
    // Reference to the animation that owns this animation (currently only set in 
    // ParallelAnimation.add).  This concept of ownership allows an entire animation
    // subtree to be driven off a single timer so all the operations are properly
    // synchronized.
    this._owner = null;
    
    // Reference to the animation that contains this as a child (this is set
    // in ParentAnimation.add).  The primary use of the parent animation is in
    // resolving the animation target when one isn't specified.
    this._parentAnimation = null;
    
    // The DynamicProperties collection is used to associate JavaScript expressions with
    // properties.  The expressions are evaluated just before the animation is played
    // everytime (in the base onStart method).  See the additional information in the
    // XML <field> comment above.
    this.DynamicProperties = { };
    
    // Set the target, duration, and fps if they were provided in the constructor
    if (target) {
        this.set_target(target);
    }
    if (duration) {
        this.set_duration(duration);
    }
    if (fps) { 
        this.set_fps(fps);
    }
}
$AA.Animation.prototype = {
    dispose : function() {
        /// <summary>
        /// Dispose the animation
        /// </summary>
        /// <returns />
        
        if (this._timer) {
            this._timer.dispose();
            this._timer = null;
        }
        
        this._tickHandler = null;
        this._target = null;
        
        $AA.Animation.callBaseMethod(this, 'dispose');
    },
    
    play : function() {
        /// <summary>
        /// Play the animation from the beginning or where it was left off when paused.
        /// </summary>
        /// <returns />
        /// <remarks>
        /// If this animation is the child of another, you must call <code>play</code> on its parent instead.
        /// </remarks>
        
        // If ownership of this animation has been claimed, then we'll require the parent to
        // handle playing the animation (this is very important because then the entire animation
        // tree runs on the same timer and updates consistently)
        if (!this._owner) {
            var resume = true;
            if (!this._timer) {
                resume = false;
                
                if (!this._tickHandler) {
                    this._tickHandler = Function.createDelegate(this, this._onTimerTick);
                }

                this._timer = new Sys.Timer();
                this._timer.add_tick(this._tickHandler);
               
                this.onStart();
                
                this._timer.set_interval(1000 / this._fps);
                this._percentDelta = 100 / (this._duration * this._fps);
                this._updatePercentComplete(0, true);
            }

            this._timer.set_enabled(true);
            
            this.raisePropertyChanged('isPlaying');
            if (!resume) {
                this.raisePropertyChanged('isActive');
            }
        }
    },
    
    pause : function() {
        /// <summary>
        /// Pause the animation if it is playing.  Calling <code>play</code> will resume where
        /// the animation left off.
        /// </summary>
        /// <returns />
        /// <remarks>
        /// If this animation is the child of another, you must call <code>pause</code> on its parent instead.
        /// </remarks>
        
        if (!this._owner) {
            if (this._timer) {
                this._timer.set_enabled(false);
                
                this.raisePropertyChanged('isPlaying');
            }
        }
    },
    
    stop : function(finish) {
        /// <summary>
        /// Stop playing the animation.
        /// </summary>
        /// <param name="finish" type="Boolean" mayBeNull="true" optional="true">
        /// Whether or not stopping the animation should leave the target element in a state
        /// consistent with the animation playing completely by performing the last step.
        /// The default value is true.
        /// </param>
        /// <returns />
        /// <remarks>
        /// If this animation is the child of another, you must call <code>stop</code> on
        /// its parent instead.
        /// </remarks>
        
        if (!this._owner) {
            var t = this._timer;
            this._timer = null;
            if (t) {
                t.dispose();
                
                if (this._percentComplete !== 100) {
                    this._percentComplete = 100;
                    this.raisePropertyChanged('percentComplete');
                    if (finish || finish === undefined) {
                        this.onStep(100);
                    }
                }
                this.onEnd();
                
                this.raisePropertyChanged('isPlaying');
                this.raisePropertyChanged('isActive');
            }
        }
    },
    
    onStart : function() {
        /// <summary>
        /// The <code>onStart</code> method is called just before the animation is played each time.
        /// </summary>
        /// <returns />
        
        this.raiseStarted();
        
        // Initialize any dynamic properties
        for (var property in this.DynamicProperties) {
            try {
                // Invoke the property's setter on the evaluated expression
                this[property](eval(this.DynamicProperties[property]));
            } catch(ex) {
                // Propogate any exceptions if we're debugging, otherwise eat them
                if ( Sys.Debug.isDebug) {
                    throw ex;
                }
            }
        }
    },
    
    onStep : function(percentage) {
        /// <summary>
        /// The <code>onStep</code> method is called repeatedly to progress the animation through each frame
        /// </summary>
        /// <param name="percentage" type="Number">Percentage of the animation already complete</param>
        /// <returns />
        
        this.setValue(this.getAnimatedValue(percentage));
    },
    
    onEnd : function() {
        /// <summary>
        /// The <code>onEnd</code> method is called just after the animation is played each time.
        /// </summary>
        /// <returns />
        
        this.raiseEnded();
    },
    
    getAnimatedValue : function(percentage) {
        /// <summary>
        /// Determine the state of the animation after the given percentage of its duration has elapsed
        /// </summary>
        /// <param name="percentage" type="Number">Percentage of the animation already complete</param>
        /// <returns type="Object">
        /// State of the animation after the given percentage of its duration has elapsed that will
        /// be passed to <code>setValue</code>
        /// </returns>
        throw Error.notImplemented();
    },
    
    setValue : function(value) {
        /// <summary>
        /// Set the current state of the animation
        /// </summary>
        /// <param name="value" type="Object">Current state of the animation (as retreived from <code>getAnimatedValue</code>)</param>
        /// <returns />
        throw Error.notImplemented();
    },
    
    interpolate : function(start, end, percentage) {
        /// <summary>
        /// The <code>interpolate</code> function is used to find the appropriate value between starting and
        /// ending values given the current percentage.
        /// </summary>
        /// <param name="start" type="Number">
        /// Start of the range to interpolate
        /// </param>
        /// <param name="end" type="Number">
        /// End of the range to interpolate
        /// </param>
        /// <param name="percentage" type="Number">
        /// Percentage completed in the range to interpolate
        /// </param>
        /// <returns type="Number">
        /// Value the desired percentage between the start and end values
        /// </returns>
        /// <remarks>
        /// In the future, we hope to make several implementations of this available so we can dynamically
        /// change the apparent speed of the animations, although it may make more sense to modify the
        /// <code>_updatePercentComplete</code> function instead.
        /// </remarks>
        return start + (end - start) * (percentage / 100);
    },
    
    _onTimerTick : function() {
        /// <summary>
        /// Handler for the tick event to move the animation along through its duration
        /// </summary>
        /// <returns />
        this._updatePercentComplete(this._percentComplete + this._percentDelta, true);
    },
    
    _updatePercentComplete : function(percentComplete, animate) {
        /// <summary>
        /// Update the animation and its target given the current percentage of its duration that
        /// has already elapsed
        /// </summary>
        /// <param name="percentComplete" type="Number">
        /// Percentage of the animation duration that has already elapsed
        /// </param>
        /// <param name="animate" type="Boolean" mayBeNull="true" optional="true">
        /// Whether or not updating the animation should visually modify the animation's target
        /// </param>
        /// <returns />
        
        if (percentComplete > 100) {
            percentComplete = 100;
        }
        
        this._percentComplete = percentComplete;
        this.raisePropertyChanged('percentComplete');
        
        if (animate) {
            this.onStep(percentComplete);
        }
        
        if (percentComplete === 100) {
            this.stop(false);
        }
    },
    
    setOwner : function(owner) {
        /// <summary>
        /// Make this animation the child of another animation
        /// </summary>
        /// <param name="owner" type="AjaxControlToolkit.Animation.Animation">
        /// Parent animation
        /// </param>
        /// <returns />
        this._owner = owner;
    },
    
    raiseStarted : function() {
        /// <summary>
        /// Raise the <code>started</code> event
        /// </summary>
        /// <returns />
        var handlers = this.get_events().getHandler('started');
        if (handlers) {
            handlers(this, Sys.EventArgs.Empty);
        }
    },
    
    add_started : function(handler) {
        /// <summary>
        /// Adds an event handler for the <code>started</code> event.
        /// </summary>
        /// <param name="handler" type="Function">
        /// The handler to add to the event.
        /// </param>
        /// <returns />
        this.get_events().addHandler("started", handler);
    },
    
    remove_started : function(handler) {
        /// <summary>
        /// Removes an event handler for the <code>started</code> event.
        /// </summary>
        /// <param name="handler" type="Function">
        /// The handler to remove from the event.
        /// </param>
        /// <returns />
        this.get_events().removeHandler("started", handler);
    },
    
    raiseEnded : function() {
        /// <summary>
        /// Raise the <code>ended</code> event
        /// </summary>
        /// <returns />
        var handlers = this.get_events().getHandler('ended');
        if (handlers) {
            handlers(this, Sys.EventArgs.Empty);
        }
    },
    
    add_ended : function(handler) {
        /// <summary>
        /// Adds an event handler for the <code>ended</code> event.
        /// </summary>
        /// <param name="handler" type="Function">
        /// The handler to add to the event.
        /// </param>
        /// <returns />
        this.get_events().addHandler("ended", handler);
    },
    
    remove_ended : function(handler) {
        /// <summary>
        /// Removes an event handler for the <code>ended</code> event.
        /// </summary>
        /// <param name="handler" type="Function">
        /// The handler to remove from the event.
        /// </param>
        /// <returns />
        this.get_events().removeHandler("ended", handler);
    },
    
    get_target : function() {
        /// <value type="Sys.UI.DomElement" domElement="true" mayBeNull="true">
        /// Target of the animation.  If the target of this animation is null and
        /// the animation has a parent, then it will recursively use the target of
        /// the parent animation instead.
        /// </value>
        /// <remarks>
        /// Do not set this property in a generic Xml animation description. It should be set
        /// using either the extender's TargetControlID or the AnimationTarget property (the latter
        /// maps to AjaxControlToolkit.Animation.set_animationTarget).  The only valid way to
        /// set this property in the generic Xml animation description is to use the dynamic
        /// property TargetScript="$get('myElement')".
        /// <remarks>
        if (!this._target && this._parentAnimation) {
            return this._parentAnimation.get_target();
        }
        return this._target;
    },
    set_target : function(value) {
        if (this._target != value) {
            this._target = value;
            this.raisePropertyChanged('target');
        }
    },
    
    set_animationTarget : function(id) {
        /// <value type="string" mayBeNull="false">
        /// ID of a Sys.UI.DomElement or Sys.UI.Control to use as the target of the animation
        /// </value>
        /// <remarks>
        /// If no Sys.UI.DomElement or Sys.UI.Control can be found for the given ID, an
        /// argument exception will be thrown.
        /// <remarks>
        
        // Try to find a Sys.UI.DomElement
        var target = null;
        var element = $get(id);
        if (element) {
            target = element;
        } else {
            // Try to find the control in the AJAX controls collection
            var ctrl = $find(id);
            if (ctrl) {
                element = ctrl.get_element();
                if (element) {
                    target = element;
                }
            }
        }
        
        // Use the new target if we have one, or raise an error if not
        if (target) { 
            this.set_target(target);
        } else {
            throw Error.argument('id', String.format(AjaxControlToolkit.Resources.Animation_TargetNotFound, id));
        }
    },
    
    get_duration : function() {
        /// <value type="Number">
        /// Length of the animation in seconds.  The default is 1.
        /// </value>
        return this._duration;
    },
    set_duration : function(value) {
        value = this._getFloat(value);
        if (this._duration != value) {
            this._duration = value;
            this.raisePropertyChanged('duration');
        }
    },
    
    get_fps : function() {
        /// <value type="Number" integer="true">
        /// Number of steps per second.  The default is 25.
        /// </value>
        return this._fps;
    },
    set_fps : function(value) {
        value = this._getInteger(value);
        if (this.fps != value) {
            this._fps = value;
            this.raisePropertyChanged('fps');
        }
    },
    
    get_isActive : function() {
        /// <value type="Boolean">
        /// <code>true</code> if animation is active, <code>false</code> if not.
        /// </value>
        return (this._timer !== null);
    },
    
    get_isPlaying : function() {
        /// <value type="Boolean">
        /// <code>true</code> if animation is playing, <code>false</code> if not.
        /// </value>
        return (this._timer !== null) && this._timer.get_enabled();
    },
    
    get_percentComplete : function() {
        /// <value type="Number">
        /// Percentage of the animation already played.
        /// </value>
        return this._percentComplete;
    },
    
    _getBoolean : function(value) {
        /// <summary>
        /// Helper to convert strings to booleans for property setters
        /// </summary>
        /// <param name="value" type="Object">
        /// Value to convert if it's a string
        /// </param>
        /// <returns type="Object">
        /// Value that has been converted if it was a string
        /// </returns>
        if (String.isInstanceOfType(value)) {
            return Boolean.parse(value);
        }
        return value;
    },
    
    _getInteger : function(value) {
        /// <summary>
        /// Helper to convert strings to integers for property setters
        /// </summary>
        /// <param name="value" type="Object">Value to convert if it's a string</param>
        /// <returns type="Object">Value that has been converted if it was a string</returns>
        if (String.isInstanceOfType(value)) {
            return parseInt(value);
        }
        return value;
    },
    
    _getFloat : function(value) {
        /// <summary>
        /// Helper to convert strings to floats for property setters
        /// </summary>
        /// <param name="value" type="Object">Value to convert if it's a string</param>
        /// <returns type="Object">Value that has been converted if it was a string</returns>
        if (String.isInstanceOfType(value)) {
            return parseFloat(value);
        }
        return value;
    },
    
    _getEnum : function(value, type) {
        /// <summary>
        /// Helper to convert strings to enum values for property setters
        /// </summary>
        /// <param name="value" type="Object">Value to convert if it's a string</param>
        /// <param name="type" type="Type">Type of the enum to convert to</param>
        /// <returns type="Object">Value that has been converted if it was a string</returns>
        if (String.isInstanceOfType(value) && type && type.parse) {
            return type.parse(value);
        }
        return value;
    }
}
$AA.Animation.registerClass('AjaxControlToolkit.Animation.Animation', Sys.Component);
$AA.registerAnimation('animation', $AA.Animation);


$AA.ParentAnimation = function(target, duration, fps, animations) {
    /// <summary>
    /// The <code>ParentAnimation</code> serves as a base class for all animations that contain children (such as
    /// <see cref="AjaxControlToolkit.Animation.ParallelAnimation" />, <see cref="AjaxControlToolkit.SequenceAnimation" />,
    /// etc.).  It does not actually play the animations, so any classes that inherit from it must do so.  Any animation
    /// that requires nested child animations must inherit from this class, although it will likely want to inherit off of
    /// <see cref="AjaxControlToolkit.Animation.ParallelAnimation" /> or <see cref="AjaxControlToolkit.SequenceAnimation" />
    /// which will actually play their child animations.
    /// </summary>
    /// <param name="target" type="Sys.UI.DomElement" mayBeNull="true" optional="true" domElement="true">
    /// Target of the animation
    /// </param>
    /// <param name="duration" type="Number" mayBeNull="true" optional="true">
    /// Length of the animation in seconds.  The default is 1.
    /// </param>
    /// <param name="fps" type="Number" mayBeNull="true" optional="true" integer="true">
    /// Number of steps per second.  The default is 25.
    /// </param>
    /// <param name="animations" mayBeNull="true" optional="true" parameterArray="true" elementType="AjaxControlToolkit.Animation.Animation">
    /// Array of child animations to be played
    /// </param>
    /// <animation>Parent</animation>
    $AA.ParentAnimation.initializeBase(this, [target, duration, fps]);
    
    // Array of child animations (there are no assumptions placed on order because
    // it will matter for some derived animations like SequenceAnimation, but not
    // for others like ParallelAnimation) that is demand created in add
    this._animations = [];
    
    // Add any child animations passed into the constructor
    if (animations && animations.length) {
        for (var i = 0; i < animations.length; i++) {
            this.add(animations[i]);
        }
    }
}
$AA.ParentAnimation.prototype = {
    initialize : function() {
    	/// <summary>
        /// Initialize the parent along with any child animations that have not yet been initialized themselves
    	/// </summary>
    	/// <returns />
        $AA.ParentAnimation.callBaseMethod(this, 'initialize');
        
        // Initialize all the uninitialized child animations
        if (this._animations) {
            for (var i = 0; i < this._animations.length; i++) {
                var animation = this._animations[i];
                if (animation && !animation.get_isInitialized) {
                    animation.initialize();
                }
            }
        }
    },
    
    dispose : function() {
    	/// <summary>
        /// Dispose of the child animations
    	/// </summary>
    	/// <returns />

        this.clear();
        this._animations = null;
        $AA.ParentAnimation.callBaseMethod(this, 'dispose');
    },
    
    get_animations : function() {
    	/// <value elementType="AjaxControlToolkit.Animation.Animation">
        /// Array of child animations to be played (there are no assumptions placed on order because it will matter for some
        /// derived animations like <see cref="AjaxControlToolkit.Animation.SequenceAnimation" />, but not for
        /// others like <see cref="AjaxControlToolkit.Animation.ParallelAnimation" />).  To manipulate the child
        /// animations, use the functions <code>add</code>, <code>clear</code>, <code>remove</code>, and <code>removeAt</code>.
    	/// </value>
        return this._animations;
    },
    
    add : function(animation) {
    	/// <summary>
        /// Add an animation as a child of this animation.
    	/// </summary>
    	/// <param name="animation" type="AjaxControlToolkit.Animation.Animation">Child animation to add</param>
    	/// <returns />

        if (this._animations) {
            if (animation) {
                animation._parentAnimation = this;
            }
            Array.add(this._animations, animation);
            this.raisePropertyChanged('animations');
        }
    },
    
    remove : function(animation) {
        /// <summary>
        /// Remove the animation from the array of child animations.
        /// </summary>
        /// <param name="animation" type="AjaxControlToolkit.Animation.Animation">
        /// Child animation to remove
        /// </param>
        /// <returns />
        /// <remarks>
        /// This will dispose the removed animation.
        /// </remarks>

        if (this._animations) {
            if (animation) {
                animation.dispose();
            }
            Array.remove(this._animations, animation);
            this.raisePropertyChanged('animations');
        }
    },
    
    removeAt : function(index) {
        /// <summary>
        /// Remove the animation at a given index from the array of child animations.
        /// </summary>
        /// <param name="index" type="Number" integer="true">
        /// Index of the child animation to remove
        /// </param>
        /// <returns />
        
        if (this._animations) {
            var animation = this._animations[index];
            if (animation) {
                animation.dispose();
            }
            Array.removeAt(this._animations, index);
            this.raisePropertyChanged('animations');
        }
    },
    
    clear : function() {
    	/// <summary>
        /// Clear the array of child animations.
    	/// </summary>
    	/// <remarks>
    	/// This will dispose the cleared child animations.
    	/// </remarks>
    	/// <returns />

        if (this._animations) {
            for (var i = this._animations.length - 1; i >= 0; i--) {
                this._animations[i].dispose();
                this._animations[i] = null;
            }
            Array.clear(this._animations);
            this._animations = [];
            this.raisePropertyChanged('animations');
        }
    }
}
$AA.ParentAnimation.registerClass('AjaxControlToolkit.Animation.ParentAnimation', $AA.Animation);
$AA.registerAnimation('parent', $AA.ParentAnimation);


$AA.ParallelAnimation = function(target, duration, fps, animations) {
    /// <summary>
    /// The <code>ParallelAnimation</code> plays several animations simultaneously.  It inherits from
    /// <see cref="AjaxControlToolkit.Animation.ParentAnimation" />, but makes itself the owner of all
    /// its child animations to allow the use a single timer and syncrhonization mechanisms shared with
    /// all the children (in other words, the <code>duration</code> properties of any child animations
    /// are ignored in favor of the parent's <code>duration</code>).  It is very useful in creating
    /// sophisticated effects through combination of simpler animations.
    /// </summary>
    /// <param name="target" type="Sys.UI.DomElement" mayBeNull="true" optional="true" domElement="true">
    /// Target of the animation
    /// </param>
    /// <param name="duration" type="Number" mayBeNull="true" optional="true">
    /// Length of the animation in seconds.  The default is 1.
    /// </param>
    /// <param name="fps" type="Number" mayBeNull="true" optional="true" integer="true">
    /// Number of steps per second.  The default is 25.
    /// </param>
    /// <param name="animations" mayBeNull="true" optional="true" parameterArray="true" elementType="AjaxControlToolkit.Animation.Animation">
    /// Array of child animations
    /// </param>
    /// <animation>Parallel</animation>
    $AA.ParallelAnimation.initializeBase(this, [target, duration, fps, animations]);
}
$AA.ParallelAnimation.prototype = {
    add : function(animation) {
    	/// <summary>
        /// Add an animation as a child of this animation and make ourselves its owner.
    	/// </summary>
    	/// <param name="animation" type="AjaxControlToolkit.Animation.Animation">Child animation to add</param>
    	/// <returns />
        $AA.ParallelAnimation.callBaseMethod(this, 'add', [animation]);
        animation.setOwner(this);
    },
    
    onStart : function() {
        /// <summary>
        /// Get the child animations ready to play
        /// </summary>
        /// <returns />

        $AA.ParallelAnimation.callBaseMethod(this, 'onStart');
        var animations = this.get_animations();
        for (var i = 0; i < animations.length; i++) {
            animations[i].onStart();
        }
    },
    
    onStep : function(percentage) {
        /// <summary>
        /// Progress the child animations through each frame
        /// </summary>
        /// <param name="percentage" type="Number">
        /// Percentage of the animation already complete
        /// </param>
        /// <returns />

        var animations = this.get_animations();
        for (var i = 0; i < animations.length; i++) {
            animations[i].onStep(percentage);
        }
    },
    
    onEnd : function() {
        /// <summary>
        /// Finish playing all of the child animations
        /// </summary>
        /// <returns />

        var animations = this.get_animations();
        for (var i = 0; i < animations.length; i++) {
            animations[i].onEnd();
        }
        $AA.ParallelAnimation.callBaseMethod(this, 'onEnd');
    }
}
$AA.ParallelAnimation.registerClass('AjaxControlToolkit.Animation.ParallelAnimation', $AA.ParentAnimation);
$AA.registerAnimation('parallel', $AA.ParallelAnimation);


$AA.SequenceAnimation = function(target, duration, fps, animations, iterations) {
    /// <summary>
    /// The <code>SequenceAnimation</code> runs several animations one after the other.  It can also
    /// repeat the sequence of animations for a specified number of iterations (which defaults to a
    /// single iteration, but will repeat forever if you specify zero or less iterations).  Also, the
    /// <code>SequenceAnimation</code> cannot be a child of a <see cref="AjaxControlToolkit.Animation.ParallelAnimation" />
    /// (or any animation inheriting from it).
    /// </summary>
    /// <param name="target" type="Sys.UI.DomElement" mayBeNull="true" optional="true" domElement="true">
    /// Target of the animation
    /// </param>
    /// <param name="duration" type="Number" mayBeNull="true" optional="true">
    /// Length of the animation in seconds.  The default is 1.
    /// </param>
    /// <param name="fps" type="Number" mayBeNull="true" optional="true" integer="true">
    /// Number of steps per second.  The default is 25.
    /// </param>
    /// <param name="animations" mayBeNull="true" optional="true" parameterArray="true" elementType="AjaxControlToolkit.Animation.Animation">
    /// Array of child animations
    /// </param>
    /// <param name="iterations" type="Number" mayBeNull="true" optional="true" integer="true">
    /// Number of times to repeatedly play the sequence.  If zero or less iterations are specified, the sequence
    /// will repeat forever.  The default value is 1 iteration.
    /// </param>
    /// <remarks>
    /// The <code>SequenceAnimation</code> ignores the <code>duration</code> and <code>fps</code>
    /// properties, and will let each of its child animations use any settings they please.
    /// </remarks>
    /// <animation>Sequence</animation>
    $AA.SequenceAnimation.initializeBase(this, [target, duration, fps, animations]);

    // Handler used to determine when an animation has finished
    this._handler = null;
    
    // Flags to note whether we're playing, paused, or stopped
    this._paused = false;
    this._playing = false;
    
    // Index of the currently executing animation in the sequence
    this._index = 0;
    
    // Counter used when playing the animation to determine the remaining number of times to play the entire sequence
    this._remainingIterations = 0;
    
    // Number of iterations
    this._iterations = (iterations !== undefined) ? iterations : 1;
}
$AA.SequenceAnimation.prototype = {
    dispose : function() {
    	/// <summary>
        /// Dispose the animation
        /// </summary>
        /// <returns />
        this._handler = null;
        $AA.SequenceAnimation.callBaseMethod(this, 'dispose');
    },
    
    stop : function() {
        /// <summary>
        /// Stop playing the entire sequence of animations
        /// </summary>
        /// <returns />
        /// <remarks>
        /// Stopping this animation will perform the last step of each child animation, thereby leaving their
        /// target elements in a state consistent with the animation playing completely. If this animation is
        /// the child of another, you must call <code>stop</code> on its parent instead.
        /// </remarks>

        if (this._playing) {
            var animations = this.get_animations();
            if (this._index < animations.length) {
                // Remove the handler from the currently running animation
                animations[this._index].remove_ended(this._handler);
                // Call stop on all remaining animations to ensure their
                // effects will be seen
                for (var i = this._index; i < animations.length; i++) {
                    animations[i].stop();
                }
            }
            this._playing = false;
            this._paused = false;
            this.raisePropertyChanged('isPlaying');
            this.onEnd();
        }
    },
    
    pause : function() {
        /// <summary>
        /// Pause the animation if it is playing.  Calling <code>play</code> will resume where
        /// the animation left off.
        /// </summary>
        /// <returns />
        /// <remarks>
        /// If this animation is the child of another, you must call <code>pause</code> on its parent instead.
        /// </remarks>

        if (this.get_isPlaying()) {
            var current = this.get_animations()[this._index];
            if (current != null) {
                current.pause();
            }
            this._paused = true;
            this.raisePropertyChanged('isPlaying');
        }
    },
    
    play : function() {
        /// <summary>
        /// Play the sequence of animations from the beginning or where it was left off when paused
        /// </summary>
        /// <returns />
        /// <remarks>
        /// If this animation is the child of another, you must call <code>play</code> on its parent instead
        /// </remarks>

        var animations = this.get_animations();
        if (!this._playing) {
            this._playing = true;
            if (this._paused) {
                this._paused = false;
                var current = animations[this._index];
                if (current != null) {
                    current.play();
                    this.raisePropertyChanged('isPlaying');
                }
            } else {
                this.onStart();
                // Reset the index and attach the handler to the first
                this._index = 0;
                var first = animations[this._index];
                if (first) {
                    first.add_ended(this._handler);
                    first.play();
                    this.raisePropertyChanged('isPlaying');
                } else {
                    this.stop();
                }
            }
        }
    },
    
    onStart : function() {
        /// <summary>
        /// The <code>onStart</code> method is called just before the animation is played each time
        /// </summary>
        /// <returns />
        $AA.SequenceAnimation.callBaseMethod(this, 'onStart');
        this._remainingIterations = this._iterations - 1;
        
        // Create the handler we attach to each animation as it plays to determine when we've finished with it
        if (!this._handler) {
            this._handler = Function.createDelegate(this, this._onEndAnimation);
        }
    },
    
    _onEndAnimation : function() {
    	/// <summary>
        /// Wait for the end of each animation, and then continue by playing the other animations remaining
        /// in the sequence.  Stop when it reaches the last animation and there are no remaining iterations.
    	/// </summary>
    	/// <returns />

        // Remove the handler from the current animation
        var animations = this.get_animations();
        var current = animations[this._index++];
        if (current) {
            current.remove_ended(this._handler);
        }
        
        // Keep running animations and stop when we're out
        if (this._index < animations.length) {
            var next = animations[this._index];
            next.add_ended(this._handler);
            next.play();
        } else if (this._remainingIterations >= 1 || this._iterations <= 0) {
            this._remainingIterations--;
            this._index = 0;
            var first = animations[0];
            first.add_ended(this._handler);
            first.play();
        } else {
            this.stop();
        }
    },
    
    onStep : function(percentage) {
        /// <summary>
        /// Raises an invalid operation exception because this will only be called if a <code>SequenceAnimation</code>
        /// has been nested inside an <see cref="AjaxControlToolkit.Animation.ParallelAnimation" /> (or a derived type).
        /// </summary>
        /// <param name="percentage" type="Number">Percentage of the animation already complete</param>
        /// <returns />
        throw Error.invalidOperation(AjaxControlToolkit.Resources.Animation_CannotNestSequence);
    },
    
    onEnd : function() {
        /// <summary>
        /// The <code>onEnd</code> method is called just after the animation is played each time.
        /// </summary>
        /// <returns />
        this._remainingIterations = 0;
        $AA.SequenceAnimation.callBaseMethod(this, 'onEnd');
    },
    
    get_isActive : function() {
    	/// <value type="Boolean">
        /// <code>true</code> if animation is active, <code>false</code> if not.
        /// </value>
        return true;
    },
    
    get_isPlaying : function() {
    	/// <value type="Boolean">
        /// <code>true</code> if animation is playing, <code>false</code> if not.
        /// </value>
        return this._playing && !this._paused;
    },
    
    get_iterations : function() {
        /// <value type="Number" integer="true">
        /// Number of times to repeatedly play the sequence.  If zero or less iterations are specified, the sequence
        /// will repeat forever.  The default value is 1 iteration.
        /// </value>
        return this._iterations;
    },
    set_iterations : function(value) {
        value = this._getInteger(value);
        if (this._iterations != value) {
            this._iterations = value;
            this.raisePropertyChanged('iterations');
        }
    },
    
    get_isInfinite : function() {
    	/// <value type="Boolean">
        /// <code>true</code> if this animation will repeat forever, <code>false</code> otherwise.
    	/// </value>
        return this._iterations <= 0;
    }
}
$AA.SequenceAnimation.registerClass('AjaxControlToolkit.Animation.SequenceAnimation', $AA.ParentAnimation);
$AA.registerAnimation('sequence', $AA.SequenceAnimation);


$AA.SelectionAnimation = function(target, duration, fps, animations) {
    /// <summary>
    /// The <code>SelectionAnimation</code> will run a single animation chosen from of its child animations. It is
    /// important to note that the <code>SelectionAnimation</code> ignores the <code>duration</code> and <code>fps</code>
    /// properties, and will let each of its child animations use any settings they please.  This is a base class with no
    /// functional implementation, so consider using <see cref="AjaxControlToolkit.Animation.ConditionAnimation" /> or
    /// <see cref="AjaxControlToolkit.Animation.CaseAnimation" /> instead.
    /// </summary>
    /// <param name="target" type="Sys.UI.DomElement" mayBeNull="true" optional="true" domElement="true">
    /// Target of the animation
    /// </param>
    /// <param name="duration" type="Number" mayBeNull="true" optional="true">
    /// Length of the animation in seconds.  The default is 1.
    /// </param>
    /// <param name="fps" type="Number" mayBeNull="true" optional="true" integer="true">
    /// Number of steps per second.  The default is 25.
    /// </param>
    /// <param name="animations" mayBeNull="true" optional="true" parameterArray="true" elementType="AjaxControlToolkit.Animation.Animation">
    /// Array of child animations
    /// </param>
    /// <animation>Selection</animation>
    $AA.SelectionAnimation.initializeBase(this, [target, duration, fps, animations]);
    
    // Index of the animation selected to play
    this._selectedIndex = -1;
    
    // Reference to the animation selected to play
    this._selected = null;
}
$AA.SelectionAnimation.prototype = {    
    getSelectedIndex : function() {
        /// <summary>
        /// Get the index of the animation that is selected to be played.  If this returns an index outside the bounds of
        /// the child animations array, then nothing is played.
        /// </summary>
        /// <returns type="Number" integer="true">
        /// Index of the selected child animation to play
        /// </returns>
        throw Error.notImplemented();
    },
    
    onStart : function() {
    	/// <summary>
        /// The <code>onStart</code> method is called just before the animation is played each time.
        /// </summary>
        /// <returns />
	    $AA.SelectionAnimation.callBaseMethod(this, 'onStart');
	    
	    var animations = this.get_animations();
	    this._selectedIndex = this.getSelectedIndex();
	    if (this._selectedIndex >= 0 && this._selectedIndex < animations.length) {
	        this._selected = animations[this._selectedIndex];
	        if (this._selected) {
	            this._selected.setOwner(this);
	            this._selected.onStart();
	        }
	    }
    },
    
    onStep : function(percentage) {
    	/// <summary>
        /// The <code>onStep</code> method is called repeatedly to progress the animation through each frame
        /// </summary>
        /// <param name="percentage" type="Number">Percentage of the animation already complete</param>
        /// <returns />

        if (this._selected) {
    	    this._selected.onStep(percentage);
    	}
    },
    
    onEnd : function() {
    	/// <summary>
        /// The <code>onEnd</code> method is called just after the animation is played each time.
        /// </summary>
        /// <returns />

        if (this._selected) {
    	    this._selected.onEnd();
    	    this._selected.setOwner(null);
    	}
    	this._selected = null;
    	this._selectedIndex = null;
	    $AA.SelectionAnimation.callBaseMethod(this, 'onEnd');
    }
}
$AA.SelectionAnimation.registerClass('AjaxControlToolkit.Animation.SelectionAnimation', $AA.ParentAnimation);
$AA.registerAnimation('selection', $AA.SelectionAnimation);


$AA.ConditionAnimation = function(target, duration, fps, animations, conditionScript) {
    /// <summary>
    /// The <code>ConditionAnimation</code> is used as a control structure to play a specific child animation
    /// depending on the result of executing the <code>conditionScript</code>.  If the <code>conditionScript</code>
    /// evaluates to <code>true</code>, the first child animation is played.  If it evaluates to <code>false</code>,
    /// the second child animation is played (although nothing is played if a second animation is not present).
    /// </summary>
    /// <param name="target" type="Sys.UI.DomElement" mayBeNull="true" optional="true" domElement="true">
    /// Target of the animation
    /// </param>
    /// <param name="duration" type="Number" mayBeNull="true" optional="true">
    /// Length of the animation in seconds.  The default is 1.
    /// </param>
    /// <param name="fps" type="Number" mayBeNull="true" optional="true" integer="true">
    /// Number of steps per second.  The default is 25.
    /// </param>
    /// <param name="animations" mayBeNull="true" optional="true" parameterArray="true" elementType="AjaxControlToolkit.Animation.Animation">
    /// Array of child animations
    /// </param>
    /// <param name="conditionScript" type="String" mayBeNull="true" optional="true">
    /// JavaScript that should evaluate to <code>true</code> or <code>false</code> to determine which child
    /// animation to play.
    /// </param>
    /// <animation>Condition</animation>
    $AA.ConditionAnimation.initializeBase(this, [target, duration, fps, animations]);
    
    // Condition to determine which index we will play
    this._conditionScript = conditionScript;   
}
$AA.ConditionAnimation.prototype = {    
   getSelectedIndex : function() {
       /// <summary>
       /// Get the index of the animation that is selected to be played.  If this returns an index outside the bounds of
       /// the child animations array, then nothing is played.
       /// </summary>
       /// <returns type="Number" integer="true">
       /// Index of the selected child animation to play
       /// </returns>

        var selected = -1;
        if (this._conditionScript && this._conditionScript.length > 0) {
            try {
                selected = eval(this._conditionScript) ? 0 : 1;
            } catch(ex) {
            }
        }
        return selected;
    },
    
    get_conditionScript : function() {
    	/// <value type="String">
        /// JavaScript that should evaluate to <code>true</code> or <code>false</code> to determine which
        /// child animation to play.
    	/// </value>
        return this._conditionScript;
    },
    set_conditionScript : function(value) {
        if (this._conditionScript != value) {
            this._conditionScript = value;
            this.raisePropertyChanged('conditionScript');
        }
    }
}
$AA.ConditionAnimation.registerClass('AjaxControlToolkit.Animation.ConditionAnimation', $AA.SelectionAnimation);
$AA.registerAnimation('condition', $AA.ConditionAnimation);


$AA.CaseAnimation = function(target, duration, fps, animations, selectScript) {
    /// <summary>
    /// The <code>CaseAnimation</code> is used as a control structure to play a specific child animation depending on
    /// the result of executing the <code>selectScript</code>, which should return the index of the child animation to
    /// play (this is similar to the <code>case</code> or <code>select</code> statements in C#/VB, etc.).  If the provided
    /// index is outside the bounds of the child animations array (or if nothing was returned) then we will not play anything.
    /// </summary>
    /// <param name="target" type="Sys.UI.DomElement" mayBeNull="true" optional="true" domElement="true">
    /// Target of the animation
    /// </param>
    /// <param name="duration" type="Number" mayBeNull="true" optional="true">
    /// Length of the animation in seconds.  The default is 1.
    /// </param>
    /// <param name="fps" type="Number" mayBeNull="true" optional="true" integer="true">
    /// Number of steps per second.  The default is 25.
    /// </param>
    /// <param name="animations" mayBeNull="true" optional="true" parameterArray="true" elementType="AjaxControlToolkit.Animation.Animation">
    /// Array of child animations
    /// </param>
    /// <param name="selectScript" type="String" mayBeNull="true" optional="true">
    /// JavaScript that should evaluate to the index of the appropriate child animation to play.  If this returns an index outside the bounds of the child animations array, then nothing is played.
    /// </param>
    /// <animation>Case</animation>
    $AA.CaseAnimation.initializeBase(this, [target, duration, fps, animations]);

    // Condition to determine which index we will play
    this._selectScript = selectScript;
}
$AA.CaseAnimation.prototype = {
    getSelectedIndex : function() {
        /// <summary>
        /// Get the index of the animation that is selected to be played.  If this returns an index outside the bounds of
        /// the child animations array, then nothing is played.
        /// </summary>
        /// <returns type="Number" integer="true">
        /// Index of the selected child animation to play
        /// </returns>

        var selected = -1;
        if (this._selectScript && this._selectScript.length > 0) {
            try {
                var result = eval(this._selectScript)
                if (result !== undefined)
                    selected = result;
            } catch (ex) {
            }
        }
        return selected;
    },
    
    get_selectScript : function() {
        /// <value type="String">
        /// JavaScript that should evaluate to the index of the appropriate child animation to play.  If this returns an index outside the bounds of the child animations array, then nothing is played.
        /// </value>
        return this._selectScript;
    },
    set_selectScript : function(value) {
        if (this._selectScript != value) {
            this._selectScript = value;
            this.raisePropertyChanged('selectScript');
        }
    }
}
$AA.CaseAnimation.registerClass('AjaxControlToolkit.Animation.CaseAnimation', $AA.SelectionAnimation);
$AA.registerAnimation('case', $AA.CaseAnimation);


$AA.FadeEffect = function() {
    /// <summary>
    /// The FadeEffect enumeration determines whether a fade animation is used to fade in or fade out.
    /// </summary>
    /// <field name="FadeIn" type="Number" integer="true" />
    /// <field name="FadeOut" type="Number" integer="true" />
    throw Error.invalidOperation();
}
$AA.FadeEffect.prototype = {
    FadeIn : 0,
    FadeOut : 1
}
$AA.FadeEffect.registerEnum("AjaxControlToolkit.Animation.FadeEffect", false);


$AA.FadeAnimation = function(target, duration, fps, effect, minimumOpacity, maximumOpacity, forceLayoutInIE) {
    /// <summary>
    /// The <code>FadeAnimation</code> is used to fade an element in or out of view, depending on the
    /// provided <see cref="AjaxControlToolkit.Animation.FadeEffect" />, by settings its opacity.
    /// The minimum and maximum opacity values can be specified to precisely control the fade.
    /// You may also consider using <see cref="AjaxControlToolkit.Animation.FadeInAnimation" /> or
    /// <see cref="AjaxControlToolkit.Animation.FadeOutAnimation" /> if you know the only direction you
    /// are fading.
    /// </summary>
    /// <param name="target" type="Sys.UI.DomElement" mayBeNull="true" optional="true" domElement="true">
    /// Target of the animation
    /// </param>
    /// <param name="duration" type="Number" mayBeNull="true" optional="true">
    /// Length of the animation in seconds.  The default is 1.
    /// </param>
    /// <param name="fps" type="Number" mayBeNull="true" optional="true" integer="true">
    /// Number of steps per second.  The default is 25.
    /// </param>
    /// <param name="effect" type="AjaxControlToolkit.Animation.FadeEffect" mayBeNull="true" optional="true">
    /// Determine whether to fade the element in or fade the element out.  The possible values are <code>FadeIn</code>
    /// and <code>FadeOut</code>.  The default value is <code>FadeOut</code>.
    /// </param>
    /// <param name="minimumOpacity" type="Number" mayBeNull="true" optional="true">
    /// Minimum opacity to use when fading in or out. Its value can range from between 0 to 1. The default value is 0.
    /// </param>
    /// <param name="maximumOpacity" type="Number" mayBeNull="true" optional="true">
    /// Maximum opacity to use when fading in or out. Its value can range from between 0 to 1. The default value is 1.
    /// </param>
    /// <param name="forceLayoutInIE" type="Boolean" mayBeNull="true" optional="true">
    /// Whether or not we should force a layout to be created for Internet Explorer by giving it a width and setting its
    /// background color (the latter is required in case the user has ClearType enabled). The default value is <code>true</code>.
    /// This is obviously ignored when working in other browsers.
    /// </param>
    /// <animation>Fade</animation>
    $AA.FadeAnimation.initializeBase(this, [target, duration, fps]);

    // The effect determines whether or not we fade in or out
    this._effect = (effect !== undefined) ? effect : $AA.FadeEffect.FadeIn;
    
    // Maximum and minimum opacities default to 100% and 0%
    this._max = (maximumOpacity !== undefined) ? maximumOpacity : 1;
    this._min = (minimumOpacity !== undefined) ? minimumOpacity : 0;
    
    // Starting and ending opacities
    this._start = this._min;
    this._end = this._max;
    
    // Whether the a layout has already been created (to work around IE problems)
    this._layoutCreated = false;

    // Whether or not we should force a layout to be created for IE by giving it a width
    // and setting its background color (the latter is required in case the user has ClearType enabled).
    // http://msdn.microsoft.com/library/default.asp?url=/workshop/author/filter/reference/filters/alpha.asp
    this._forceLayoutInIE = (forceLayoutInIE === undefined || forceLayoutInIE === null) ? true : forceLayoutInIE;
    
    // Current target of the animation that is cached before the animation plays (since looking up
    // the target could mean walking all the way up to the root of the animation's tree, which we don't
    // want to do for every step of the animation)
    this._currentTarget = null;
    
    // Properly set up the min/max values provided by the constructor
    this._resetOpacities();
}
$AA.FadeAnimation.prototype = {
    _resetOpacities : function() {
    	/// <summary>
        /// Set the starting and ending opacity values based on the effect (i.e. when we're fading
        /// in we go from <code>_min</code> to <code>_max</code>, but we go <code>_max</code> to
        /// <code>_min</code> when fading out)
    	/// </summary>
    	/// <returns />

        if (this._effect == $AA.FadeEffect.FadeIn) {
            this._start = this._min;
            this._end = this._max;
        } else {
            this._start = this._max;
            this._end = this._min;
        }
    },
    
    _createLayout : function() {
    	/// <summary>
        /// Create a layout when using Internet Explorer (which entails setting a width and also
        /// a background color if it currently has neither)
    	/// </summary>
    	/// <returns />

        var element = this._currentTarget;
        if (element) {
            // Get the original width/height/back color
            var originalWidth = $common.getCurrentStyle(element, 'width');
            var originalHeight = $common.getCurrentStyle(element, 'height');
            var originalBackColor = $common.getCurrentStyle(element, 'backgroundColor');

            // Set the width which will force the creation of a layout
            if ((!originalWidth || originalWidth == '' || originalWidth == 'auto') &&
                (!originalHeight || originalHeight == '' || originalHeight == 'auto')) {
                element.style.width = element.offsetWidth + 'px';
            }
            
            // Set the back color to avoid ClearType problems
            if (!originalBackColor || originalBackColor == '' || originalBackColor == 'transparent' || originalBackColor == 'rgba(0, 0, 0, 0)') {
                element.style.backgroundColor = $common.getInheritedBackgroundColor(element);
            }
            
            // Mark that we've created the layout so we only do it once
            this._layoutCreated = true;
        }
    },
    
    onStart : function() {
    	/// <summary>
        /// The <code>onStart</code> method is called just before the animation is played each time.
        /// </summary>
        /// <returns />       
        $AA.FadeAnimation.callBaseMethod(this, 'onStart');
        
        this._currentTarget = this.get_target();
        this.setValue(this._start);
        
        // Force the creation of a layout in IE if we're supposed to and the current browser is Internet Explorer
        if (this._forceLayoutInIE && !this._layoutCreated && Sys.Browser.agent == Sys.Browser.InternetExplorer) {
            this._createLayout();
        }
    },
    
    getAnimatedValue : function(percentage) {
    	/// <summary>
        /// Determine the current opacity after the given percentage of its duration has elapsed
        /// </summary>
        /// <param name="percentage" type="Number">Percentage of the animation already complete</param>
        /// <returns type="Number">
        /// Current opacity after the given percentage of its duration has elapsed that will
        /// be passed to <code>setValue</code>
        /// </returns>
        return this.interpolate(this._start, this._end, percentage);
    },
    
    setValue : function(value) {
        /// <summary>
        /// Set the current opacity of the element.
        /// </summary>
        /// <param name="value" type="Number">
        /// Current opacity (as retreived from <code>getAnimatedValue</code>)
        /// </param>
        /// <returns />
        /// <remarks>
        /// This method will be replaced by a dynamically generated function that requires no logic
        /// to determine whether it should use filters or the style's opacity.
        /// </remarks>
        if (this._currentTarget) {
            $common.setElementOpacity(this._currentTarget, value);
        }
    },
    
//    set_target : function(value) {
//        /// <value type="Sys.UI.DomElement">
//        /// Override the <code>target</code> property to dynamically create the setValue function.
//        /// </value>
//        /// <remarks>
//        /// Do not set this property in a generic Xml animation description. It will be set automatically
//        /// using either the extender's TargetControlID or the AnimationTarget property.
//        /// <remarks>
//        $AA.FadeAnimation.callBaseMethod(this, 'set_target', [value]);
//        
//        var element = value;
//        if (element) {
//            var filters = element.filters;
//            if (filters) {
//                var alphaFilter = null;
//                if (filters.length !== 0) {
//                    alphaFilter = filters['DXImageTransform.Microsoft.Alpha'];
//                }
//                if (!alphaFilter) {
//                    element.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity=' + (this._start * 100) + ')';
//                    alphaFilter = filters['DXImageTransform.Microsoft.Alpha'];
//                }
//                if (alphaFilter) {
//                    this.setValue = function(val) { alphaFilter.opacity = val * 100; }
//                } else {
//                    this.setValue = function(val) {
//                        element.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity=' + (val * 100) + ')';
//                    };
//                }
//            }
//            else {
//                this.setValue = function(val) { element.style.opacity = val; };
//            }
//        }
//    },
    
    get_effect : function() {
    	/// <value type="AjaxControlToolkit.Animation.FadeEffect">
        /// Determine whether to fade the element in or fade the element out.  The possible values are
        /// <code>FadeIn</code> and <code>FadeOut</code>.  The default value is <code>FadeOut</code>.
    	/// </value>
        return this._effect;
    },
    set_effect : function(value) {
        value = this._getEnum(value, $AA.FadeEffect);
        if (this._effect != value) {
            this._effect = value;
            this._resetOpacities();
            this.raisePropertyChanged('effect');
        }
    },
    
    get_minimumOpacity : function() {
        /// <value type="Number">
        /// Minimum opacity to use when fading in or out. Its value can range from between 0 to 1.
        /// The default value is 0.
        /// </value>
	    return this._min;
    },
    set_minimumOpacity : function(value) {
        value = this._getFloat(value);
        if (this._min != value) {
            this._min = value;
            this._resetOpacities();
            this.raisePropertyChanged('minimumOpacity');
        }
    },
    
    get_maximumOpacity : function() {
        /// <value type="Number">
        /// Maximum opacity to use when fading in or out. Its value can range from between 0 to 1.
        /// The default value is 1.
        /// </value>
        return this._max;
    },
    set_maximumOpacity : function(value) {
        value = this._getFloat(value);
        if (this._max != value) {
            this._max = value;
            this._resetOpacities();
            this.raisePropertyChanged('maximumOpacity');
        }
    },
    
    get_forceLayoutInIE : function() {
        /// <value type="Boolean">
        /// Whether or not we should force a layout to be created for Internet Explorer by giving it a width and setting its
        /// background color (the latter is required in case the user has ClearType enabled). The default value is <code>true</code>.
        /// This is obviously ignored when working in other browsers.
        /// </value>
        return this._forceLayoutInIE;
    },
    set_forceLayoutInIE : function(value) {
        value = this._getBoolean(value);
        if (this._forceLayoutInIE != value) {
            this._forceLayoutInIE = value;
            this.raisePropertyChanged('forceLayoutInIE');
        }
    },
    
    set_startValue : function(value) {
        /// <value type="Number">
        /// Set the start value (so that child animations can set the current opacity as the start value when fading in or out)
        /// </value>
        value = this._getFloat(value);
        this._start = value;
    }
}
$AA.FadeAnimation.registerClass('AjaxControlToolkit.Animation.FadeAnimation', $AA.Animation);
$AA.registerAnimation('fade', $AA.FadeAnimation);


$AA.FadeInAnimation = function(target, duration, fps, minimumOpacity, maximumOpacity, forceLayoutInIE) {
    /// <summary>
    /// The <code>FadeInAnimation</code> will fade the target in by moving from hidden to visible.
    /// It starts the animation the target's current opacity.
    /// </summary>
    /// <param name="target" type="Sys.UI.DomElement" mayBeNull="true" optional="true" domElement="true">
    /// Target of the animation
    /// </param>
    /// <param name="duration" type="Number" mayBeNull="true" optional="true">
    /// Length of the animation in seconds.  The default is 1.
    /// </param>
    /// <param name="fps" type="Number" mayBeNull="true" optional="true" integer="true">
    /// Number of steps per second.  The default is 25.
    /// </param>
    /// <param name="minimumOpacity" type="Number" mayBeNull="true" optional="true">
    /// Minimum opacity to use when fading in or out. Its value can range from between 0 to 1. The default value is 0.
    /// </param>
    /// <param name="maximumOpacity" type="Number" mayBeNull="true" optional="true">
    /// Maximum opacity to use when fading in or out. Its value can range from between 0 to 1. The default value is 1.
    /// </param>
    /// <param name="forceLayoutInIE" type="Boolean" mayBeNull="true" optional="true">
    /// Whether or not we should force a layout to be created for Internet Explorer by giving it a width and setting its
    /// background color (the latter is required in case the user has ClearType enabled). The default value is <code>true</code>.
    /// This is obviously ignored when working in other browsers.
    /// </param>
    /// <animation>FadeIn</animation>
    $AA.FadeInAnimation.initializeBase(this, [target, duration, fps, $AA.FadeEffect.FadeIn, minimumOpacity, maximumOpacity, forceLayoutInIE]);
}
$AA.FadeInAnimation.prototype = {
    onStart : function() {
    	/// <summary>
        /// The <code>onStart</code> method is called just before the animation is played each time.
        /// </summary>
        /// <returns />
        $AA.FadeInAnimation.callBaseMethod(this, 'onStart');
        
        if (this._currentTarget) {
            this.set_startValue($common.getElementOpacity(this._currentTarget));
        }
    }
}
$AA.FadeInAnimation.registerClass('AjaxControlToolkit.Animation.FadeInAnimation', $AA.FadeAnimation);
$AA.registerAnimation('fadeIn', $AA.FadeInAnimation);


$AA.FadeOutAnimation = function(target, duration, fps, minimumOpacity, maximumOpacity, forceLayoutInIE) {
    /// <summary>
    /// The FadeInAnimation will fade the element out by moving from visible to hidden. It starts the animation
    /// at the element's current opacity.
    /// </summary>
    /// <param name="target" type="Sys.UI.DomElement" mayBeNull="true" optional="true" domElement="true">
    /// Target of the animation
    /// </param>
    /// <param name="duration" type="Number" mayBeNull="true" optional="true">
    /// Length of the animation in seconds.  The default is 1.
    /// </param>
    /// <param name="fps" type="Number" mayBeNull="true" optional="true" integer="true">
    /// Number of steps per second.  The default is 25.
    /// </param>
    /// <param name="minimumOpacity" type="Number" mayBeNull="true" optional="true">
    /// Minimum opacity to use when fading in or out. Its value can range from between 0 to 1. The default value is 0.
    /// </param>
    /// <param name="maximumOpacity" type="Number" mayBeNull="true" optional="true">
    /// Maximum opacity to use when fading in or out. Its value can range from between 0 to 1. The default value is 1.
    /// </param>
    /// <param name="forceLayoutInIE" type="Boolean" mayBeNull="true" optional="true">
    /// Whether or not we should force a layout to be created for Internet Explorer by giving it a width and setting its
    /// background color (the latter is required in case the user has ClearType enabled). The default value is <code>true</code>.
    /// This is obviously ignored when working in other browsers.
    /// </param>
    /// <animation>FadeOut</animation>
    $AA.FadeOutAnimation.initializeBase(this, [target, duration, fps, $AA.FadeEffect.FadeOut, minimumOpacity, maximumOpacity, forceLayoutInIE]);
}
$AA.FadeOutAnimation.prototype = {
    onStart : function() {
    	/// <summary>
        /// The <code>onStart</code> method is called just before the animation is played each time.
        /// </summary>
        /// <returns />
        $AA.FadeOutAnimation.callBaseMethod(this, 'onStart');

        if (this._currentTarget) {
            this.set_startValue($common.getElementOpacity(this._currentTarget));
        }
    }
}
$AA.FadeOutAnimation.registerClass('AjaxControlToolkit.Animation.FadeOutAnimation', $AA.FadeAnimation);
$AA.registerAnimation('fadeOut', $AA.FadeOutAnimation);


$AA.PulseAnimation = function(target, duration, fps, iterations, minimumOpacity, maximumOpacity, forceLayoutInIE) {
    /// <summary>
    /// The PulseAnimation fades an element in and our repeatedly to create a pulsating
    /// effect.  The iterations determines how many pulses there will be (which defaults
    /// to three, but it will repeat infinitely if given zero or less).  The duration
    /// property defines the duration of each fade in or fade out, not the duration of
    /// the animation as a whole.
    /// </summary>
    /// <param name="target" type="Sys.UI.DomElement" mayBeNull="true" optional="true" domElement="true">
    /// Target of the animation
    /// </param>
    /// <param name="duration" type="Number" mayBeNull="true" optional="true">
    /// Length of the animation in seconds.  The default is 1.
    /// </param>
    /// <param name="fps" type="Number" mayBeNull="true" optional="true" integer="true">
    /// Number of steps per second.  The default is 25.
    /// </param>
    /// <param name="iterations" type="Number" mayBeNull="true" optional="true" integer="true">
    /// Number of times to repeatedly play the sequence.  If zero or less iterations are specified, the sequence
    /// will repeat forever.  The default value is 1 iteration.
    /// </param>
    /// <param name="minimumOpacity" type="Number" mayBeNull="true" optional="true">
    /// Minimum opacity to use when fading in or out. Its value can range from between 0 to 1. The default value is 0.
    /// </param>
    /// <param name="maximumOpacity" type="Number" mayBeNull="true" optional="true">
    /// Maximum opacity to use when fading in or out. Its value can range from between 0 to 1. The default value is 1.
    /// </param>
    /// <param name="forceLayoutInIE" type="Boolean" mayBeNull="true" optional="true">
    /// Whether or not we should force a layout to be created for Internet Explorer by giving it a width and setting its
    /// background color (the latter is required in case the user has ClearType enabled). The default value is <code>true</code>.
    /// This is obviously ignored when working in other browsers.
    /// </param>
    /// <animation>Pulse</animation>
    $AA.PulseAnimation.initializeBase(this, [target, duration, fps, null, ((iterations !== undefined) ? iterations : 3)]);

    // Create the FadeOutAnimation
    this._out = new $AA.FadeOutAnimation(target, duration, fps, minimumOpacity, maximumOpacity, forceLayoutInIE);
    this.add(this._out);
    
    // Create the FadeInAnimation
    this._in = new $AA.FadeInAnimation(target, duration, fps, minimumOpacity, maximumOpacity, forceLayoutInIE);
    this.add(this._in);
}
$AA.PulseAnimation.prototype = {
   
    get_minimumOpacity : function() {
        /// <value type="Number">
        /// Minimum opacity to use when fading in or out. Its value can range from between 0 to 1. The default value is 0.
        /// </value>
        return this._out.get_minimumOpacity();
    },
    set_minimumOpacity : function(value) {
        value = this._getFloat(value);
        this._out.set_minimumOpacity(value);
        this._in.set_minimumOpacity(value);
        this.raisePropertyChanged('minimumOpacity');
    },
    
    get_maximumOpacity : function() {
        /// <value type="Number">
        /// Maximum opacity to use when fading in or out. Its value can range from between 0 to 1. The default value is 1.
        /// </value>
        return this._out.get_maximumOpacity();
    },
    set_maximumOpacity : function(value) {
        value = this._getFloat(value);
        this._out.set_maximumOpacity(value);
        this._in.set_maximumOpacity(value);
        this.raisePropertyChanged('maximumOpacity');
    },
    
    get_forceLayoutInIE : function() {
        /// <value type="Boolean">
        /// Whether or not we should force a layout to be created for Internet Explorer by giving it a width and setting its
        /// background color (the latter is required in case the user has ClearType enabled). The default value is <code>true</code>.
        /// This is obviously ignored when working in other browsers.
        /// </value>
        return this._out.get_forceLayoutInIE();
    },
    set_forceLayoutInIE : function(value) {
        value = this._getBoolean(value);
        this._out.set_forceLayoutInIE(value);
        this._in.set_forceLayoutInIE(value);
        this.raisePropertyChanged('forceLayoutInIE');
    },
    
    set_duration : function(value) {
        /// <value type="Number">
        /// Override the <code>duration</code> property
        /// </value>
        value = this._getFloat(value);
        $AA.PulseAnimation.callBaseMethod(this, 'set_duration', [value]);
        this._in.set_duration(value);
        this._out.set_duration(value);
    },
    
    set_fps : function(value) {
        /// <value type="Number" integer="true">
        /// Override the <code>fps</code> property
        /// </value>
        value = this._getInteger(value);
        $AA.PulseAnimation.callBaseMethod(this, 'set_fps', [value]);
        this._in.set_fps(value);
        this._out.set_fps(value);
    }
    
}
$AA.PulseAnimation.registerClass('AjaxControlToolkit.Animation.PulseAnimation', $AA.SequenceAnimation);
$AA.registerAnimation('pulse', $AA.PulseAnimation);


$AA.PropertyAnimation = function(target, duration, fps, property, propertyKey) {
    /// <summary>
    /// The <code>PropertyAnimation</code> is a useful base animation that will assign the value from
    /// <code>getAnimatedValue</code> to a specified <code>property</code>. You can provide the name of
    /// a <code>property</code> alongside an optional <code>propertyKey</code> (which indicates the value
    /// <code>property[propertyKey]</code>, like <code>style['backgroundColor']</code>).
    /// </summary>
    /// <param name="target" type="Sys.UI.DomElement" mayBeNull="true" optional="true" domElement="true">
    /// Target of the animation
    /// </param>
    /// <param name="duration" type="Number" mayBeNull="true" optional="true">
    /// Length of the animation in seconds.  The default is 1.
    /// </param>
    /// <param name="fps" type="Number" mayBeNull="true" optional="true" integer="true">
    /// Number of steps per second.  The default is 25.
    /// </param>
    /// <param name="property" type="String" mayBeNull="true" optional="true">
    /// Property of the <code>target</code> element to set when animating
    /// </param>
    /// <param name="propertyKey" type="String" mayBeNull="true" optional="true">
    /// Optional key of the property to be set (which indicates the value property[propertyKey], like style['backgroundColor']). Note that for the style property, the key must be in a JavaScript friendly format (i.e. backgroundColor instead of background-color).
    /// </param>
    /// <animation>Property</animation>
    $AA.PropertyAnimation.initializeBase(this, [target, duration, fps]);

    // Name of the property to set
    this._property = property;
    
    // Optional Key of the property to set (i.e., if the property were "style" then
    // this might be "backgroundColor")
    this._propertyKey = propertyKey;
    
    // Current target of the animation that is cached before the animation plays (since looking up
    // the target could mean walking all the way up to the root of the animation's tree, which we don't
    // want to do for every step of the animation)
    this._currentTarget = null;
}
$AA.PropertyAnimation.prototype = {
    onStart : function() {
    	/// <summary>
        /// The <code>onStart</code> method is called just before the animation is played each time.
        /// </summary>
        /// <returns />
        $AA.PropertyAnimation.callBaseMethod(this, 'onStart');

        this._currentTarget = this.get_target();
    },

    setValue : function(value) {
        /// <summary>
        /// Set the current value of the property
        /// </summary>
        /// <param name="value" type="Object" mayBeNull="true">
        /// Value to assign
        /// </param>
        /// <returns />

        var element = this._currentTarget;
        if (element && this._property && this._property.length > 0) { 
            if (this._propertyKey && this._propertyKey.length > 0 && element[this._property]) {
                element[this._property][this._propertyKey] = value;
            } else {
                element[this._property] = value;
            }
        }
        // Sys.TypeDescriptor.setProperty(this.get_target(), this._property, value, this._propertyKey);
    },
    
    getValue : function() {
        /// <summary>
        /// Get the current value from the property
        /// </summary>
        /// <returns type="Object" mayBeNull="true">
        /// Current value of the property
        /// </returns>

        var element = this.get_target();
        if (element && this._property && this._property.length > 0) { 
            var property = element[this._property];
            if (property) {
                if (this._propertyKey && this._propertyKey.length > 0) {
                    return property[this._propertyKey];
                }
                return property;
            }
        }
        return null;
        // return Sys.TypeDescriptor.getProperty(this.get_target(), this._property, this._propertyKey);
    },
    
    get_property : function() {
        /// <value type="String">
        /// Property of the <code>target</code> element to set when animating
        /// </value>
        return this._property;
    },
    set_property : function(value) {
        if (this._property != value) {
            this._property = value;
            this.raisePropertyChanged('property');
        }
    },
    
    get_propertyKey : function() {
        /// <value type="String" mayBeNull="true" optional="true">
        /// Optional key of the property to be set (which indicates the value property[propertyKey], like style['backgroundColor']). Note that for the style property, the key must be in a JavaScript friendly format (i.e. backgroundColor instead of background-color).
        /// </value>
        return this._propertyKey;
    },
    set_propertyKey : function(value) {
        if (this._propertyKey != value) {
            this._propertyKey = value;
            this.raisePropertyChanged('propertyKey');
        }
    }
}
$AA.PropertyAnimation.registerClass('AjaxControlToolkit.Animation.PropertyAnimation', $AA.Animation);
$AA.registerAnimation('property', $AA.PropertyAnimation);


$AA.DiscreteAnimation = function(target, duration, fps, property, propertyKey, values) {
    /// <summary>
    /// The <code>DiscreteAnimation</code> inherits from <see cref="AjaxControlToolkit.Animation.PropertyAnimation" />
    /// and sets the value of the <code>property</code> to the elements in a provided array of <code>values</code>.
    /// </summary>
    /// <param name="target" type="Sys.UI.DomElement" mayBeNull="true" optional="true">
    /// Target of the animation
    /// </param>
    /// <param name="duration" type="Number" mayBeNull="true" optional="true">
    /// Length of the animation in seconds.  The default is 1.
    /// </param>
    /// <param name="fps" type="Number" mayBeNull="true" optional="true">
    /// Number of steps per second.  The default is 25.
    /// </param>
    /// <param name="property" type="String" mayBeNull="true" optional="true">
    /// Property of the <code>target</code> element to set when animating
    /// </param>
    /// <param name="propertyKey" type="String" mayBeNull="true" optional="true">
    /// Optional key of the property to be set (which indicates the value property[propertyKey], like style['backgroundColor']). Note that for the style property, the key must be in a JavaScript friendly format (i.e. backgroundColor instead of background-color).
    /// </param>
    /// <param name="values" mayBeNull="true" optional="true" parameterArray="true" elementType="Object">
    /// Array of possible values of the property that will be iterated over as the animation is played
    /// </param>
    /// <animation>Discrete</animation>
    $AA.DiscreteAnimation.initializeBase(this, [target, duration, fps, property, propertyKey]);

    // Values to assign to the property
    this._values = (values && values.length) ? values : [];
}
$AA.DiscreteAnimation.prototype = {
    getAnimatedValue : function(percentage) {
        /// <summary>
        /// Assign the value whose index corresponds to the current percentage
        /// </summary>
        /// <param name="percentage" type="Number">
        /// Percentage of the animation already complete
        /// </param>
        /// <returns type="Object">
        /// State of the animation after the given percentage of its duration has elapsed that will
        /// be passed to <code>setValue</code>
        /// </returns>
        var index = Math.floor(this.interpolate(0, this._values.length - 1, percentage));
        return this._values[index];
    },
    
    get_values : function() {
        /// <value parameterArray="true" elementType="Object">
        /// Array of possible values of the property that will be iterated over as the animation is played
        /// </value>
        return this._values;
    },
    set_values : function(value) {
        if (this._values != value) {
            this._values = value;
            this.raisePropertyChanged('values');
        }
    }
}
$AA.DiscreteAnimation.registerClass('AjaxControlToolkit.Animation.DiscreteAnimation', $AA.PropertyAnimation);
$AA.registerAnimation('discrete', $AA.DiscreteAnimation);


$AA.InterpolatedAnimation = function(target, duration, fps, property, propertyKey, startValue, endValue) {
    /// <summary>
    /// The <code>InterpolatedAnimation</code> assigns a range of values between <code>startValue</code>
    /// and <code>endValue</code> to the designated property.
    /// </summary>
    /// <param name="target" type="Sys.UI.DomElement" mayBeNull="true" optional="true" domElement="true">
    /// Target of the animation
    /// </param>
    /// <param name="duration" type="Number" mayBeNull="true" optional="true">
    /// Length of the animation in seconds.  The default is 1.
    /// </param>
    /// <param name="fps" type="Number" mayBeNull="true" optional="true" integer="true">
    /// Number of steps per second.  The default is 25.
    /// </param>
    /// <param name="property" type="String" mayBeNull="true" optional="true">
    /// Property of the <code>target</code> element to set when animating.  The default value is 'style'.
    /// </param>
    /// <param name="propertyKey" type="String" mayBeNull="true" optional="true">
    /// Optional key of the property to be set (which indicates the value property[propertyKey], like style['backgroundColor']). Note that for the style property, the key must be in a JavaScript friendly format (i.e. backgroundColor instead of background-color).
    /// </param>
    /// <param name="startValue" type="Number" mayBeNull="true" optional="true">
    /// Start of the range of 