﻿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(b,c,k,j,h,d){var a;if(typeof b==="undefined")if(h)return null;else{a=Error.argumentUndefined(d);a.popStackFrame();return a}if(b===null)if(h)return null;else{a=Error.argumentNull(d);a.popStackFrame();return a}if(c&&c.__enum){if(typeof b!=="number"){a=Error.argumentType(d,Object.getType(b),c);a.popStackFrame();return a}if(b%1===0){var e=c.prototype;if(!c.__flags||b===0){for(var g in e)if(e[g]===b)return null}else{var i=b;for(var g in e){var f=e[g];if(f===0)continue;if((f&b)===f)i-=f;if(i===0)return null}}}a=Error.argumentOutOfRange(d,b,String.format(Sys.Res.enumInvalidValue,b,c.getName()));a.popStackFrame();return a}if(j&&b!==window&&b!==document&&!(window.HTMLElement&&b instanceof HTMLElement)&&typeof b.nodeName!=="string"){a=Error.argument(d,Sys.Res.argumentDomElement);a.popStackFrame();return a}if(c&&!c.isInstanceOfType(b)){a=Error.argumentType(d,Object.getType(b),c);a.popStackFrame();return a}if(c===Number&&k)if(b%1!==0){a=Error.argumentOutOfRange(d,b,Sys.Res.argumentInteger);a.popStackFrame();return a}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")};if(!window)this.window=this;window.Type=Function;window.__rootNamespaces=[];window.__registeredTypes={};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}if(!window.__classes)window.__classes={};window.__classes[c.toUpperCase()]=this;if(d){this.__interfaces=[];for(var a=2;a<arguments.length;a++){var e=arguments[a];this.__interfaces.push(e)}}return this};Type.prototype.registerInterface=function(a){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(window.__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){if(!window.__classes)return null;fn=window.__classes[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]={};if(b===0)window.__rootNamespaces[window.__rootNamespaces.length]=a;a.__namespace=true;a.__typeName=c.slice(0,b+1).join(".");a.getName=function(){return this.__typeName}}d=a}};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()};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;break}}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?)");break}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){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=Date._parseInt(a);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=Date._parseInt(a)-1;if(c<0||c>11)return null;break;case "y":case "yy":f=Date._expandYear(m,Date._parseInt(a));if(f<0||f>9999)return null;break;case "yyyy":f=Date._parseInt(a);if(f<0||f>9999)return null;break;case "h":case "hh":d=Date._parseInt(a);if(d===12)d=0;if(d<0||d>11)return null;break;case "H":case "HH":d=Date._parseInt(a);if(d<0||d>23)return null;break;case "m":case "mm":n=Date._parseInt(a);if(n<0||n>59)return null;break;case "s":case "ss":o=Date._parseInt(a);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=Date._parseInt(a)*100;if(e<0||e>999)return null;break;case "ff":e=Date._parseInt(a)*10;if(e<0||e>999)return null;break;case "fff":e=Date._parseInt(a);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=Date._parseInt(q[0]);if(i<-12||i>13)return null;var l=Date._parseInt(q[1]);if(l<0||l>59)return null;k=i*60+(a.startsWith("-")?-l:l);break;case "z":case "zz":var i=Date._parseInt(a);if(i<-12||i>13)return null;k=i*60;break}}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),t%60)}return b}};Date._parseInt=function(a){return parseInt(a.replace(/^[\s0]+(\d+)$/,"$1"))};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)));break}}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(g,f){var a=g.trim();if(a.match(/infinity/i)!==null)return parseFloat(a);if(a.match(/^0x[a-f0-9]+$/i)!==null)return parseInt(a);var d=f.numberFormat,b=d.NumberDecimalSeparator,c=d.NumberGroupSeparator,e=new RegExp("^[+-]?[\\d\\"+c+"]*\\"+b+"?\\d*([eE][+-]?\\d+)?$");if(!a.match(e))return Number.NaN;a=a.split(c).join("");a=a.replace(b,".");return parseFloat(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 q=["n %","n%","%n"],p=["-n %","-n%","-%n"],r=["(n)","-n","- n","n-","n -"],o=["$n","n$","$ n","n $"],n=["($n)","-$n","$-n","$n-","(n$)","-n$","n-$","n$-","-n $","-$ n","n $-","$ n-","$ -n","n- $","($ n)","(n $)"];function i(p,k,j,l,o){var e=j[0],g=1,c=p.toString(),a="",m="",i=c.split(".");if(i.length>1){c=i[0];a=i[1];var h=a.split(/e/i);if(h.length>1){a=h[0];m="e"+h[1]}}if(k>0){var f=a.length-k;if(f>0)a=a.slice(0,k);else if(f<0)for(var n=0;n<Math.abs(f);n++)a+="0";a=o+a}else a="";a+=m;var b=c.length-1,d="";while(b>=0){if(e===0||e>b)if(d.length>0)return c.slice(0,b+1)+l+d+a;else return c.slice(0,b+1)+a;if(d.length>0)d=c.slice(b-e+1,b+1)+l+d;else d=c.slice(b-e+1,b+1);b-=e;if(g<j.length){e=j[g];g++}}return c.slice(0,b+1)+l+d+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));var c;switch(d.charAt(0)){case "d":case "D":c="n";if(b!==-1){var g=""+e,k=b-g.length;if(k>0)for(var m=0;m<k;m++)g="0"+g;e=g}if(this<0)e=-e;break;case "c":case "C":if(this<0)c=n[a.CurrencyNegativePattern];else c=o[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=r[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=p[a.PercentNegativePattern];else c=q[a.PercentPositivePattern];if(b===-1)b=a.PercentDecimalDigits;e=i(Math.abs(this),b,a.PercentGroupSizes,a.PercentGroupSeparator,a.PercentDecimalSeparator);break;default:throw Error.format(Sys.Res.formatBadFormatSpecifier)}var l=/n|\$|-|%/g,f="";for(;true;){var s=l.lastIndex,h=l.exec(c);f+=c.slice(s,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;break}}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)};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))+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};Type.registerNamespace("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","Microsoft.XMLHTTP"];for(var a=0;a<b.length;a++)try{var c=new ActiveXObject(b[a]);return c}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);if(navigator.userAgent.indexOf(" MSIE ")>-1){Sys.Browser.agent=Sys.Browser.InternetExplorer;Sys.Browser.version=parseFloat(navigator.userAgent.match(/MSIE (\d+\.\d+)/)[1]);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(" Safari/")>-1){Sys.Browser.agent=Sys.Browser.Safari;Sys.Browser.version=parseFloat(navigator.userAgent.match(/Safari\/(\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(c,b){for(var a in this.prototype)this[a]=this.prototype[a];this.__typeName=c;this.parse=Sys$Enum$parse;this.__string=this.toString();this.toString=Sys$Enum$toString;this.__flags=b;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);if(!a._handler)a._handler=function(c,d){for(var b=0,e=a.length;b<e;b++)a[b](c,d)};return a._handler},_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]);b._createdComponents[b._createdComponents.length]=a;if(a.get_id())b.addComponent(a);if(i)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.DomEvent=function(c){var a=c;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(a.type==="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(this.target){var b=Sys.UI.DomElement.getLocation(this.target);this.offsetX=typeof a.offsetX!=="undefined"?a.offsetX:window.pageXOffset+(a.clientX||0)-b.x;this.offsetY=typeof a.offsetY!=="undefined"?a.offsetY:window.pageYOffset+(a.clientY||0)-b.y}this.screenX=a.screenX;this.screenY=a.screenY;this.shiftKey=a.shiftKey;this.type=a.type};Sys.UI.DomEvent.prototype={preventDefault:function(){if(this.rawEvent.preventDefault)this.rawEvent.preventDefault();else if(window.event)window.event.returnValue=false},stopPropagation:function(){if(this.rawEvent.stopPropagation)this.rawEvent.stopPropagation();else if(window.event)window.event.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(){return e.call(a,new Sys.UI.DomEvent(window.event))};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],d=null;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.IContainer=function(){};Sys.IContainer.prototype={};Sys.IContainer.registerInterface("Sys.IContainer");Sys._ScriptLoader=function(){this._scriptsToLoad=null;this._scriptLoadedDelegate=Function.createDelegate(this,this._scriptLoadedHandler)};Sys._ScriptLoader.prototype={dispose:function(){this._stopLoading();if(this._events)delete this._events;this._scriptLoadedDelegate=null},loadScripts:function(a,c,d,b){this._loading=true;this._allScriptsLoadedCallback=c;this._scriptLoadFailedCallback=d;this._scriptLoadTimeoutCallback=b;if(a>0)this._timeoutCookie=window.setTimeout(Function.createDelegate(this,this._scriptLoadTimeoutHandler),a*1000);this._loadScriptsInternal()},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(){if(this._scriptsToLoad&&this._scriptsToLoad.length>0){var b=Array.dequeue(this._scriptsToLoad),a=this._createScriptElement(b);if(a.text&&Sys.Browser.agent===Sys.Browser.Safari){a.innerHTML=a.text;delete a.text}if(typeof b.src==="string"){this._currentTask=new Sys._ScriptLoaderTask(a,this._scriptLoadedDelegate);this._currentTask.execute()}else{document.getElementsByTagName("HEAD")[0].appendChild(a);Sys._ScriptLoader._clearScript(a);this._loadScriptsInternal()}}else{var c=this._allScriptsLoadedCallback;this._stopLoading();if(c)c(this)}},_raiseError:function(a){var c=this._scriptLoadFailedCallback,b=this._currentTask.get_scriptElement();this._stopLoading();if(c)c(this,b,a);else 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._scriptLoadTimeoutCallback;this._stopLoading();if(a)a(this)},_stopLoading:function(){if(this._timeoutCookie){window.clearTimeout(this._timeoutCookie);this._timeoutCookie=null}if(this._currentTask){this._currentTask.dispose();this._currentTask=null}this._scriptsToLoad=null;this._loading=null;this._allScriptsLoadedCallback=null;this._scriptLoadFailedCallback=null;this._scriptLoadTimeoutCallback=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);this._scriptErrorDelegate=Function.createDelegate(this,this._scriptErrorHandler);$addHandler(this._scriptElement,"error",this._scriptErrorDelegate)},_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);$removeHandler(a,"error",this._scriptErrorDelegate);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._Application=function(){Sys._Application.initializeBase(this);this._disposableObjects=[];this._components={};this._createdComponents=[];this._secondPassComponents=[];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},add_load:function(a){this.get_events().addHandler("load",a)},remove_load:function(a){this.get_events().removeHandler("load",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_unload:function(a){this.get_events().addHandler("unload",a)},remove_unload:function(a){this.get_events().removeHandler("unload",a)},addComponent:function(a){this._components[a.get_id()]=a},beginCreateComponents:function(){this._creatingComponents=true},dispose:function(){if(!this._disposing){this._disposing=true;if(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]},unregisterDisposableObject:function(a){if(!this._disposing)Array.remove(this._disposableObjects,a)},_addComponentToSecondPass:function(b,a){this._secondPassComponents[this._secondPassComponents.length]={component:b,references:a}},_doInitialize:function(){Sys._Application.callBaseMethod(this,"initialize");var a=this.get_events().getHandler("init");if(a){this.beginCreateComponents();a(this,Sys.EventArgs.Empty);this.endCreateComponents()}this.raiseLoad();this._initializing=false},_loadHandler:function(){if(this._loadHandlerDelegate){Sys.UI.DomEvent.removeHandler(window,"load",this._loadHandlerDelegate);this._loadHandlerDelegate=null}this.initialize()},_unloadHandler:function(){this.dispose()}};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");window.XMLDOM=function(d){if(!window.DOMParser){var c=["Msxml2.DOMDocument.3.0","Msxml2.DOMDocument"];for(var b=0;b<c.length;b++)try{var a=new ActiveXObject(c[b]);a.async=false;a.loadXML(d);a.setProperty("SelectionLanguage","XPath");return a}catch(f){}return null}else try{var e=new window.DOMParser;return e.parseFromString(d,"text/xml")}catch(f){return null}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){a._clearTimer();a._responseAvailable=true;a._webRequest.completed(Sys.EventArgs.Empty);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");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(){return this._xmlHttpRequest.status},get_statusText:function(){return this._xmlHttpRequest.statusText},get_xml:function(){var a=this._xmlHttpRequest.responseXML;if(!a||!a.documentElement){a=new 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;var a=this._webRequest._get_eventHandlerList().getHandler("completed");if(a)a(this,Sys.EventArgs.Empty)}}};Sys.Net.XMLHttpExecutor.registerClass("Sys.Net.XMLHttpExecutor",Sys.Net.WebRequestExecutor);Sys.Net._WebRequestManager=function(){this._this=this;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 c=document.getElementsByTagName("base")[0];if(c&&c.href&&c.href.length>0)a=c.href;else a=document.URL}var d=a.indexOf("?");if(d!==-1)a=a.substr(0,d);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={set_timeout:function(a){this._timeout=a},get_timeout:function(){return this._timeout},set_defaultUserContext:function(a){this._userContext=a},get_defaultUserContext:function(){return this._userContext},set_defaultSucceededCallback:function(a){this._succeeded=a},get_defaultSucceededCallback:function(){return this._succeeded},set_defaultFailedCallback:function(a){this._failed=a},get_defaultFailedCallback:function(){return this._failed},set_path:function(a){this._path=a},get_path:function(){return this._path},_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+"/"+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 e=d.get_statusCode(),b=null;try{var j=d.getResponseHeader("Content-Type");if(j.startsWith("application/json"))b=d.get_object();else if(j.startsWith("text/xml"))b=d.get_xml();else b=d.get_responseData()}catch(m){}var k=d.getResponseHeader("jsonerror"),g=k==="true";if(g)b=new Sys.Net.WebServiceError(false,b.Message,b.StackTrace,b.ExceptionType);if(e<200||e>=300||g){if(c){if(!b||!g)b=new Sys.Net.WebServiceError(false,String.format(Sys.Res.webServiceFailedNoMsg,a),"","");b._statusCode=e;c(b,f,a)}}else if(i)i(b,f,a)}else{var h;if(d.get_timedOut())h=String.format(Sys.Res.webServiceTimedOut,a);else h=String.format(Sys.Res.webServiceFailedNoMsg,a);if(c)c(new Sys.Net.WebServiceError(d.get_timedOut(),h,"",""),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={_defaultFailedCallback:null,_defaultLoadCompletedCallback:null,_defaultSaveCompletedCallback:null,_path:"",_timeout:0,get_defaultFailedCallback:function(){return this._defaultFailedCallback},set_defaultFailedCallback:function(a){this._defaultFailedCallback=a},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},set_path:function(a){if(!a||!a.length)a="";this._path=a},get_timeout:function(){return this._timeout},set_timeout:function(a){this._timeout=a},load:function(b,d,e,f){var c={},a;if(!b)a="GetAllPropertiesForCurrentUser";else{a="GetPropertiesForCurrentUser";c={properties:this._clonePropertyNames(b)}}this._invoke(this._get_path(),a,false,c,Function.createDelegate(this,this._onLoadComplete),Function.createDelegate(this,this._onLoadFailed),[d,e,f])},save:function(d,a,c,e){var b=this._flattenProperties(d,this.properties);this._invoke(this._get_path(),"SetPropertiesForCurrentUser",false,{values:b},Function.createDelegate(this,this._onSaveComplete),Function.createDelegate(this,this._onSaveFailed),[a,c,e])},_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,h,i){var b={},e,d;if(a&&a.length===0)return b;for(var c in h){e=h[c];d=i?i+"."+c:c;if(Sys.Services.ProfileGroup.isInstanceOfType(e)){var g=this._flattenProperties(a,e,d);for(var f in g){var j=g[f];b[f]=j}}else if(!a||Array.indexOf(a,d)!==-1)b[d]=e}return b},_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,f,g){if(typeof a!=="object")throw Error.invalidOperation(String.format(Sys.Res.webServiceInvalidReturnType,g,"Object"));var d=this._unflattenProperties(a);for(var b in d)this.properties[b]=d[b];var c=f[0],e=c?c:this._defaultLoadCompletedCallback;if(e)e(a.length,f[2],"Sys.Services.ProfileService.load")},_onLoadFailed:function(d,c){var a=c[1],b=a?a:this._defaultFailedCallback;if(b)b(d,c[2],"Sys.Services.ProfileService.load")},_onSaveComplete:function(d,c,f){if(typeof d!=="number")throw Error.invalidOperation(String.format(Sys.Res.webServiceInvalidReturnType,f,"Number"));var a=c[0],e=c[2],b=a?a:this._defaultSaveCompletedCallback;if(b)b(d,e,"Sys.Services.ProfileService.save")},_onSaveFailed:function(e,c){var a=c[1],d=c[2],b=a?a:this._defaultFailedCallback;if(b)b(e,d,"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={_defaultFailedCallback:null,_defaultLoginCompletedCallback:null,_defaultLogoutCompletedCallback:null,_path:"",_timeout:0,_authenticated:false,get_defaultFailedCallback:function(){return this._defaultFailedCallback},set_defaultFailedCallback:function(a){this._defaultFailedCallback=a},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},set_path:function(a){if(!a||!a.length)a="";this._path=a},get_timeout:function(){return this._timeout},set_timeout:function(a){this._timeout=a},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,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(f,c,g){if(typeof f!=="boolean")throw Error.invalidOperation(String.format(Sys.Res.webServiceInvalidReturnType,g,"Boolean"));var b=c[3],d=c[4],e=c[6],a=d?d:this._defaultLoginCompletedCallback;if(f){this._authenticated=true;if(a)a(true,e,"Sys.Services.AuthenticationService.login");if(typeof b!=="undefined"&&b!==null)window.location.href=b}else if(a)a(false,e,"Sys.Services.AuthenticationService.login")},_onLoginFailed:function(d,c){var a=c[5],b=a?a:this._defaultFailedCallback;if(b)b(d,c[6],"Sys.Services.AuthenticationService.login")},_onLogoutComplete:function(g,a,f){if(g!==null)throw Error.invalidOperation(String.format(Sys.Res.webServiceInvalidReturnType,f,"null"));var c=a[0],b=a[1],e=a[3],d=b?b:this._defaultLogoutCompletedCallback;this._authenticated=false;if(d)d(null,e,"Sys.Services.AuthenticationService.logout");if(!c)window.location.reload();else window.location.href=c},_onLogoutFailed:function(d,c){var a=c[2],b=a?a:this._defaultFailedCallback;if(b)b(d,c[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;Type.registerNamespace("Sys.Serialization");Sys.Serialization.JavaScriptSerializer=function(){};Sys.Serialization.JavaScriptSerializer.registerClass("Sys.Serialization.JavaScriptSerializer");Sys.Serialization.JavaScriptSerializer._stringRegEx=new RegExp('["\b\f\n\r\t\\\\\x00-\x1F]',"i");Sys.Serialization.JavaScriptSerializer._serializeWithBuilder=function(b,a,h){var c;switch(typeof b){case "object":if(b)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)}a.append("]")}else{if(Date.isInstanceOfType(b)){a.append('"\\/Date(');a.append(b.getTime());a.append(')\\/"');break}var e=[],i=0;for(var g in b){if(g.startsWith("$"))continue;e[i++]=g}if(h)e.sort();a.append("{");var j=false;for(c=0;c<i;c++){var f=b[e[c]];if(typeof f!=="undefined"&&typeof f!=="function"){if(j)a.append(",");else j=true;Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(e[c],a,h);a.append(":");Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(f,a,h)}}a.append("}")}else a.append("null");break;case "number":if(isFinite(b))a.append(String(b));else throw Error.invalidOperation(Sys.Res.cannotSerializeNonFiniteNumbers);break;case "string":a.append('"');if(Sys.Browser.agent===Sys.Browser.Safari||Sys.Serialization.JavaScriptSerializer._stringRegEx.test(b)){var k=b.length;for(c=0;c<k;++c){var d=b.charAt(c);if(d>=" "){if(d==="\\"||d==='"')a.append("\\");a.append(d)}else switch(d){case "\b":a.append("\\b");break;case "\f":a.append("\\f");break;case "\n":a.append("\\n");break;case "\r":a.append("\\r");break;case "\t":a.append("\\t");break;default:a.append("\\u00");if(d.charCodeAt()<16)a.append("0");a.append(d.charCodeAt().toString(16))}}}else a.append(b);a.append('"');break;case "boolean":a.append(b.toString());break;default:a.append("null");break}};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){if(data.length===0)throw Error.argument("data",Sys.Res.cannotDeserializeEmptyString);try{var exp=data.replace(new RegExp('(^|[^\\\\])\\"\\\\/Date\\((-?[0-9]+)\\)\\\\/\\"',"g"),"$1new Date($2)");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._upperMonths,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.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.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 Sys$UI$DomElement$getLocation(a){if(a.self||a.nodeType===9)return new Sys.UI.Point(0,0);var d=a.getClientRects();if(!d||!d.length)return new Sys.UI.Point(0,0);var e=a.ownerDocument.parentWindow,g=e.screenLeft-top.screenLeft-top.document.documentElement.scrollLeft+2,h=e.screenTop-top.screenTop-top.document.documentElement.scrollTop+2,c=e.frameElement||null;if(c){var b=c.currentStyle;g+=(c.frameBorder||1)*2+(parseInt(b.paddingLeft)||0)+(parseInt(b.borderLeftWidth)||0)-a.ownerDocument.documentElement.scrollLeft;h+=(c.frameBorder||1)*2+(parseInt(b.paddingTop)||0)+(parseInt(b.borderTopWidth)||0)-a.ownerDocument.documentElement.scrollTop}var f=d[0];return new Sys.UI.Point(f.left-g,f.top-h)};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 g=0,h=0,j=null,f=null,b;for(var a=c;a;j=a,(f=b,a=a.offsetParent)){b=Sys.UI.DomElement._getCurrentStyle(a);var e=a.tagName;if((a.offsetLeft||a.offsetTop)&&(e!=="BODY"||(!f||f.position!=="absolute"))){g+=a.offsetLeft;h+=a.offsetTop}}b=Sys.UI.DomElement._getCurrentStyle(c);var d=b?b.position:null,k=d&&d!=="static";if(!d||d!=="absolute")for(var a=c.parentNode;a;a=a.parentNode){e=a.tagName;if(e!=="BODY"&&e!=="HTML"&&(a.scrollLeft||a.scrollTop)){g-=a.scrollLeft||0;h-=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(g,h)};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;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,h=null,b=null;for(var a=d;a;i=a,(h=b,a=a.offsetParent)){var c=a.tagName;b=Sys.UI.DomElement._getCurrentStyle(a);if((a.offsetLeft||a.offsetTop)&&!(c==="BODY"&&(!h||h.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 g=b?b.position:null,j=g&&g!=="static";if(!g||g!=="absolute")for(var a=d.parentNode;a;a=a.parentNode){c=a.tagName;if(c!=="BODY"&&c!=="HTML"&&(a.scrollLeft||a.scrollTop)){e-=a.scrollLeft||0;f-=a.scrollTop||0;b=Sys.UI.DomElement._getCurrentStyle(a);e+=parseInt(b.borderLeftWidth)||0;f+=parseInt(b.borderTopWidth)||0}}return new Sys.UI.Point(e,f)};break}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._getCurrentStyle=function(a){var b=(a.ownerDocument?a.ownerDocument:a.documentElement).defaultView;return b&&a!==b&&b.getComputedStyle?b.getComputedStyle(a,null):a.style};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;this._oldDisplayMode=this._element.style.display;if(!this._oldDisplayMode||this._oldDisplayMode=="none")this._oldDisplayMode=""};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;else{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 this._visibilityMode},set_visibilityMode:function(a){if(this._visibilityMode!==a){this._visibilityMode=a;if(this.get_visible()===false)if(this._visibilityMode===Sys.UI.VisibilityMode.hide)this._element.style.display=this._oldDisplayMode;else this._element.style.display="none"}this._visibilityMode=a},get_visible:function(){return this._element.style.visibility!="hidden"},set_visible:function(a){if(a!=this.get_visible()){this._element.style.visibility=a?"visible":"hidden";if(a||this._visibilityMode===Sys.UI.VisibilityMode.hide)this._element.style.display=this._oldDisplayMode;else this._element.style.display="none"}},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}},initialize:function(){Sys.UI.Control.callBaseMethod(this,"initialize");var a=this._element},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)
Sys.Res={'argumentInteger':'Value must be an integer.','scriptLoadMultipleCallbacks':'The script \'{0}\' contains multiple calls to Sys.Application.notifyScriptLoaded(). Only one is allowed.','invokeCalledTwice':'Cannot call invoke more than once.','webServiceFailed':'The server method \'{0}\' failed with the following error: {1}','argumentType':'Object cannot be converted to the required type.','argumentNull':'Value cannot be null.','controlCantSetId':'The id property can\'t be set on a control.','formatBadFormatSpecifier':'Format specifier was invalid.','webServiceFailedNoMsg':'The server method \'{0}\' 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':'\'{0}\' is not a valid value for enum {1}.','scriptLoadFailed':'The script \'{0}\' 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 \'{0}\' returned an invalid type. Expected type: {1}','servicePathNotSet':'The path to the web service has not been set.','argumentTypeWithTypes':'Object of type \'{0}\' cannot be converted to type \'{1}\'.','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.','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 \'{0}\' 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?'};
if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();
Function.prototype.getFunctionName=function(){var C=null;var B=this.toString();var D=/^function(?:\ )?([a-zA-Z_\$][a-zA-Z0-9_\$]*)?.*$/;var A=D.exec(this.getFunctionDefinition());if(A!=null){if(A.length>1&&A[1]!=null){C=A[1]}else{C=""}}return C};Function.prototype.getFunctionDefinition=function(){var B=this.toString();var C=B.indexOf("\n");var A;if(C>=0){A=B.substring(0,C)}else{A=B}return A};function assertThrows(B,A){if(arguments.length!=2){throw new Error("Operation 'assertThrows' expects exactly two arguments, but was called with "+arguments.length+" argument"+(arguments.length>1?"s":""))}if(typeof (B)!="function"){throw new Error("Argument 'functor' must be a type of function, but was of type '"+typeof (B)+"'")}if(typeof (A)!="function"||typeof (A)=="undefined"){throw new Error("Argument 'expectedThrown' must be a type of function, but was of type '"+typeof (A)+"'")}var D=assertThrows._resolveFunctionName(A);try{B()}catch(C){var E=assertThrows._resolveFunctionName(C.constructor);assertTrue("Thrown type '"+E+"' did not match expected type '"+D+"'",C instanceof A);return }fail("Expected functor:\n\n"+B.toString()+"\n\n to throw: '"+D+"'")}assertThrows._resolveFunctionName=function(B){var E=null;var D=[assertThrows._resolveCustomFunctionName,assertThrows._resolvePredefinedExceptionType];for(var C=0;C<D.length;C++){var A=D[C];E=A(B);if(E!=null){break}}if(E!=null){return E}else{throw new Error("Cannot resolve function name for functor:\n\n"+B.toString())}};assertThrows._resolveCustomFunctionName=function(A){return A.getFunctionName()};assertThrows._PREDEFINED_EXCEPTION_TYPES=[[Error,"Error"],[EvalError,"EvalError"],[RangeError,"RangeError"],[ReferenceError,"ReferenceError"],[SyntaxError,"SyntaxError"],[TypeError,"TypeError"],[URIError,"URIError"]];assertThrows._resolvePredefinedExceptionType=function(A){var F=null;for(var B=0;B<assertThrows._PREDEFINED_EXCEPTION_TYPES.length;B++){var D=assertThrows._PREDEFINED_EXCEPTION_TYPES[B][0];var E=assertThrows._PREDEFINED_EXCEPTION_TYPES[B][1];var C=D();if(C instanceof A){F=E;break}}return F};Function.prototype.extend=function(C){var B=function(){};B.prototype=C.prototype;var A=this.prototype;this.prototype=new B();this.prototype.constructor=this;for(var D in A){this.prototype[D]=A[D]}};Function.prototype.isTypeOf=function(B){if(typeof (B)!="function"){throw new IllegalArgumentException("Argument 'baseType' must be a type of function, but was of type '"+typeof (B)+"'")}if(arguments.length!=1){throw new IllegalArgumentException("Operation 'isTypeOf()' expects exactly 1 argument")}function A(){}A.prototype=this.prototype;return(new A() instanceof B)};function Exception(){switch(arguments.length){case 2:if(typeof (arguments[0])!="string"){throw new IllegalArgumentException("Argument must be of type 'string', but was of type '"+typeof (arguments[0])+"'")}if(!(arguments[1] instanceof Error)){throw new IllegalArgumentException("Argument must be of type 'Error', but was of type '"+typeof (arguments[1])+"'")}this._message=arguments[0];this.message=arguments[0];this._cause=arguments[1];break;case 1:if(arguments[0] instanceof Error){this._cause=arguments[0]}else{if(typeof (arguments[0])=="string"){this._message=arguments[0];this.message=arguments[0]}else{throw new IllegalArgumentException("Argument must be of type 'Error' or 'string', but was of type '"+typeof (arguments[0])+"'")}}break;case 0:default:return }}Exception.prototype={_message:"",_cause:null,getMessage:function(){return this._message},getCause:function(){return this._cause}};Exception.extend(Error);function ArrayUtils(){throw new InstantiationException("Type 'ArrayUtils' not meant to be instantiated")}Array.prototype.forEach=function(A){for(var B=0;B<this.length;B++){A(this[B],B,this)}};ArrayUtils.arrayContains=function(C,B){if(!(C instanceof Array)){throw new IllegalArgumentException("Argument 'array' must be an instance of 'Array'")}for(var A=0;A<C.length;A++){if(C[A]==B){return true}}return false};ArrayUtils.cloneShallow=function(C){if(typeof (C)=="undefined"){throw new IllegalArgumentException("Argument `array` cannot be undefined or null")}if(C===null){return null}var A;A=[];for(var B=0;B<C.length;B++){A[B]=C[B]}return A};Array.prototype.sortAsc=function(C){if(!(typeof (C)=="string"||typeof (C)=="function")){throw new IllegalArgumentException("Argument 'field' must be of type 'string' or 'function', but was: "+typeof (C))}var A=Object.prototype.toString;var B=Array.prototype.toString;if(typeof (C)=="function"){Object.prototype.toString=C;Array.prototype.toString=C}else{Object.prototype.toString=function(){return this[C]};Array.prototype.toString=function(){return this[C]}}this.sort();Array.prototype.toString=B;Object.prototype.toString=A};Array.prototype.sortDesc=function(C){if(!(typeof (C)=="string"||typeof (C)=="function")){throw new IllegalArgumentException("Argument 'field' must be of type 'string' or 'function', but was: "+typeof (C))}var A=Object.prototype.toString;var B=Array.prototype.toString;if(typeof (C)=="function"){Object.prototype.toString=C;Array.prototype.toString=C}else{Object.prototype.toString=function(){return this[C]};Array.prototype.toString=function(){return this[C]}}this.sort();this.reverse();Array.prototype.toString=B;Object.prototype.toString=A};Array.prototype.sortIntAsc=function(A){if(!(typeof (A)=="string")){throw new IllegalArgumentException("Argument 'field' must be of type 'string', but was: "+typeof (A))}this._sortIntAsc(A);this._parseInt(A)};Array.prototype.sortIntDesc=function(A){if(!(typeof (A)=="string")){throw new IllegalArgumentException("Argument 'field' must be of type 'string', but was: "+typeof (A))}this._sortIntDesc(A);this._parseInt(A)};Array.prototype._sortPrep=function(E){if(!this.maximum){this.maximum=this[0][E];var A=this.length;while(A--){if(this.maximum<this[A][E]){this.maximum=this[A][E]}}}if(this.maximum){var D=new Array();var B=this.maximum.toString().length;var A=B;var C="";while(A--){D.push(C);C+="0"}for(var A=0;A<this.length;A++){this[A][E]=(this[A][E].toString().length<B?D[B-this[A][E].toString().length]:"")+this[A][E]}}};Array.prototype._sortIntAsc=function(C){this._sortPrep(C);var A=Object.prototype.toString;var B=Array.prototype.toString;Object.prototype.toString=function(){return this[C]};Array.prototype.toString=function(){return this[C]};this.sort();Array.prototype.toString=B;Object.prototype.toString=A};Array.prototype._sortIntDesc=function(C){this._sortPrep(C);var A=Object.prototype.toString;var B=Array.prototype.toString;Object.prototype.toString=function(){return this[C]};Array.prototype.toString=function(){return this[C]};this.sort();this.reverse();Array.prototype.toString=B;Object.prototype.toString=A};Array.prototype._parseInt=function(B){for(var A=0;A<this.length;A++){this[A][B]=this[A][B]*1}};function Assert(){throw new InstantiationException("Type 'Assert' not meant to be instantiated")}Assert.notNull=function(A,B){if(arguments.length!=2){throw new IllegalArgumentException("'Assert.notNull()' expects exactly 2 arguments")}if(A==null||typeof (A)=="undefined"){throw new IllegalArgumentException("Argument 'object' must not be null")}if(B==null||typeof (B)=="undefined"){throw new IllegalArgumentException("Argument 'message' must not be null")}};function DataAccessException(){Exception.apply(this,arguments)}DataAccessException.extend(Exception);function DateUtils(){throw new InstantiationException("Type 'DateUtils' not meant to be instantiated")}DateUtils.AscendingDateComparer=function(B,A){if(!(B instanceof Object)){throw new IllegalArgumentException("Argument 'a' must be an object")}if(!(A instanceof Object)){throw new IllegalArgumentException("Argument 'b' must be an object")}var F=B.getDate();var D=A.getDate();if(!(typeof (F)=="string")){throw new IllegalArgumentException("a.getDate() did not return a type of 'string'")}if(!(typeof (D)=="string")){throw new IllegalArgumentException("b.getDate() did not return a type of 'string'")}var C=Date.parse(F.replace(/-/g,"/"));var E=Date.parse(D.replace(/-/g,"/"));return C-E};function GenericDelete(){throw new InstantiationException("Type 'GenericDelete' not meant to be instantiated")}GenericDelete.confirmDelete=function(A,B){if(typeof (A)=="undefined"||A==null||typeof (A)!="string"){throw new IllegalArgumentException("Argument 'message' must be of type 'string'.")}if(typeof (B)=="undefined"||B==null||!(B instanceof Function)){throw new IllegalArgumentException("Argument 'deleteFunction' must be instance of 'Function'.")}if(confirm(A)){B()}};function IllegalArgumentException(){Exception.apply(this,arguments)}IllegalArgumentException.extend(Exception);function IllegalStateException(){Exception.apply(this,arguments)}IllegalStateException.extend(Exception);function InstantiationException(){Exception.apply(this,arguments)}InstantiationException.extend(Exception);ObjectUtils=function(){throw new InstantiationException("Type 'ObjectUtils' not meant to be instantiated")};ObjectUtils.clone=function(B){if(typeof (B)=="undefined"){throw new IllegalArgumentException("Argument `object` cannot be undefined or null")}if(B===null){return null}var A;if(B instanceof Date){A=new Date()}else{A={}}for(var C in B){if(typeof (B[C])=="object"&&B[C]!==null){A[C]=ObjectUtils.clone(B[C])}else{A[C]=B[C]}}return A};function UnsupportedOperationException(){Exception.apply(this,arguments)}UnsupportedOperationException.extend(Exception);Function.prototype.mixWith=function(B){var A=B.prototype;for(var C in A){if(this.prototype[C]===undefined){this.prototype[C]=A[C]}else{throw new IllegalStateException("Cannot add member '"+C+"' from mixin '"+B.getFunctionName()+"' to '"+this.getFunctionName()+"', because the latter already has a member with this name.")}}};(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(j){for(f in e){O.attr(g?this.style:this,f,O.prop(this,e[f],g,j,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(l){if(l===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 j=e.selectedIndex,m=[],n=e.options,h=e.type=="select-one";if(j<0){return null}for(var f=h?j:0,k=h?j+1:n.length;f<k;f++){var g=n[f];if(g.selected){l=O(g).val();if(h){return l}m.push(l)}}return m}return(e.value||"").replace(/\r/g,"")}return G}if(typeof l==="number"){l+=""}return this.each(function(){if(this.nodeType!=1){return }if(O.isArray(l)&&/radio|checkbox/.test(this.type)){this.checked=(O.inArray(this.value,l)>=0||O.inArray(this.name,l)>=0)}else{if(O.nodeName(this,"select")){var i=O.makeArray(l);O("option",this).each(function(){this.selected=(O.inArray(this.value,i)>=0||O.inArray(this.text,i)>=0)});if(!i.length){this.selectedIndex=-1}}else{this.value=l}}})},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(k,o,n){if(this[0]){var j=(this[0].ownerDocument||this[0]).createDocumentFragment(),f=O.clean(k,(this[0].ownerDocument||this[0]),j),h=j.firstChild;if(h){for(var g=0,e=this.length;g<e;g++){n.call(m(this[g],h),this.length>1||g>0?j.cloneNode(true):j)}}if(f){O.each(f,Z)}}return this;function m(i,l){return o&&O.nodeName(i,"table")&&O.nodeName(l,"tr")?(i.getElementsByTagName("tbody")[0]||i.appendChild(i.ownerDocument.createElement("tbody"))):i}}};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 k=arguments[0]||{},h=1,j=arguments.length,e=false,g;if(typeof k==="boolean"){e=k;k=arguments[1]||{};h=2}if(typeof k!=="object"&&!O.isFunction(k)){k={}}if(j==h){k=this;--h}for(;h<j;h++){if((g=arguments[h])!=null){for(var f in g){var l=k[f],m=g[f];if(k===m){continue}if(e&&m&&typeof m==="object"&&!m.nodeType){k[f]=O.extend(e,l||(m.length!=null?[]:{}),m)}else{if(m!==G){k[f]=m}}}}}return k};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,l,f){var e,h=0,j=g.length;if(f){if(j===G){for(e in g){if(l.apply(g[e],f)===false){break}}}else{for(;h<j;){if(l.apply(g[h++],f)===false){break}}}}else{if(j===G){for(e in g){if(l.call(g[e],e,g[e])===false){break}}}else{for(var k=g[0];h<j&&l.call(k,h,k)!==false;k=g[++h]){}}}return g},prop:function(h,j,g,f,e){if(O.isFunction(j)){j=j.call(h,f)}return typeof j==="number"&&g=="curCSS"&&!B.test(e)?j+"px":j},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,l,j){l=l||document;if(typeof l.createElement==="undefined"){l=l.ownerDocument||l[0]&&l[0].ownerDocument||document}if(!j&&f.length===1&&typeof f[0]==="string"){var h=/^<(\w+)\s*\/?>$/.exec(f[0]);if(h){return[l.createElement(h[1])]}}var g=[],e=[],m=l.createElement("div");O.each(f,function(q,t){if(typeof t==="number"){t+=""}if(!t){return }if(typeof t==="string"){t=t.replace(/(<(\w+)[^>]*?)\/>/g,function(u,v,i){return i.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?u:v+"></"+i+">"});var p=t.replace(/^\s+/,"").substring(0,10).toLowerCase();var r=!p.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!p.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||p.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!p.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!p.indexOf("<td")||!p.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!p.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!O.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];m.innerHTML=r[1]+t+r[2];while(r[0]--){m=m.lastChild}if(!O.support.tbody){var s=/<tbody/i.test(t),o=!p.indexOf("<table")&&!s?m.firstChild&&m.firstChild.childNodes:r[1]=="<table>"&&!s?m.childNodes:[];for(var n=o.length-1;n>=0;--n){if(O.nodeName(o[n],"tbody")&&!o[n].childNodes.length){o[n].parentNode.removeChild(o[n])}}}if(!O.support.leadingWhitespace&&/^\s/.test(t)){m.insertBefore(l.createTextNode(t.match(/^\s*/)[0]),m.firstChild)}t=O.makeArray(m.childNodes)}if(t.nodeType){g.push(t)}else{g=O.merge(g,t)}});if(j){for(var k=0;g[k];k++){if(O.nodeName(g[k],"script")&&(!g[k].type||g[k].type.toLowerCase()==="text/javascript")){e.push(g[k].parentNode?g[k].parentNode.removeChild(g[k]):g[k])}else{if(g[k].nodeType===1){g.splice.apply(g,[k+1,0].concat(O.makeArray(g[k].getElementsByTagName("script"))))}j.appendChild(g[k])}}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,j=h.length;if(!O.support.getAll){while((g=e[f++])!=null){if(g.nodeType!=8){h[j++]=g}}}else{while((g=e[f++])!=null){h[j++]=g}}return h},unique:function(m){var g=[],f={};try{for(var h=0,j=m.length;h<j;h++){var l=O.data(m[h]);if(!f[l]){f[l]=true;g.push(m[h])}}}catch(k){g=m}return g},grep:function(f,k,e){var g=[];for(var h=0,j=f.length;h<j;h++){if(!e!=!k(f[h],h)){g.push(f[h])}}return g},map:function(e,k){var f=[];for(var g=0,h=e.length;g<h;g++){var j=k(e[g],g);if(j!=null){f[f.length]=j}}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 k=[],n=O(g);for(var m=0,h=n.length;m<h;m++){var j=(m>0?this.clone(true):this).get();O.fn[f].apply(O(n[m]),j);k=k.concat(j)}return this.pushStack(k,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(g,f){g=g==L?a:g;var i=g[H];if(f){if(O.cache[i]){delete O.cache[i][f];f="";for(f in O.cache[i]){break}if(!f){O.removeData(g)}}}else{try{delete g[H]}catch(h){if(g.removeAttribute){g.removeAttribute(H)}}delete O.cache[i]}},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)})}});(function(){var s=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,m=0,i=Object.prototype.toString;var g=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,e,AD,v,x=true;s.lastIndex=0;while((w=s.exec(y))!==null){z.push(w[1]);if(w[2]){v=RegExp.rightContext;break}}if(z.length>1&&n.exec(y)){if(z.length===2&&j.relative[z[0]]){AF=k(z[0]+z[1],u)}else{AF=j.relative[z[0]]?[u]:g(z.shift(),u);while(z.length){y=z.shift();if(j.relative[y]){y+=z.shift()}AF=k(y,AF)}}}else{var AE=AC?{expr:z.pop(),set:f(AC)}:g.find(z.pop(),z.length===1&&u.parentNode?u.parentNode:u,r(u));AF=g.filter(AE.expr,AE.set);if(z.length>0){AI=f(AF)}else{x=false}while(z.length){var AH=z.pop(),AG=AH;if(!j.relative[AH]){AH=""}else{AG=z.pop()}if(AG==null){AG=u}j.relative[AH](AI,AG,r(u))}}if(!AI){AI=AF}if(!AI){throw"Syntax error, unrecognized expression: "+(AH||y)}if(i.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&&l(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{f(AI,AB)}if(v){g(v,u,AB,AC);if(h){hasDuplicate=false;AB.sort(h);if(hasDuplicate){for(var AA=1;AA<AB.length;AA++){if(AB[AA]===AB[AA-1]){AB.splice(AA--,1)}}}}}return AB};g.matches=function(e,u){return g(e,null,null,u)};g.find=function(AA,e,AB){var z,x;if(!AA){return[]}for(var w=0,v=j.order.length;w<v;w++){var y=j.order[w],x;if((x=j.match[y].exec(AA))){var u=RegExp.leftContext;if(u.substr(u.length-1)!=="\\"){x[1]=(x[1]||"").replace(/\\/g,"");z=j.find[y](x,e,AB);if(z!=null){AA=AA.replace(j.match[y],"");break}}}}if(!z){z=e.getElementsByTagName("*")}return{set:z,expr:AA}};g.filter=function(AD,AC,AG,w){var v=AD,AI=[],AA=AC,y,e,z=AC&&AC[0]&&r(AC[0]);while(AD&&AC.length){for(var AB in j.filter){if((y=j.match[AB].exec(AD))!=null){var u=j.filter[AB],AH,AF;e=false;if(AA==AI){AI=[]}if(j.preFilter[AB]){y=j.preFilter[AB](y,AA,AG,AI,w,z);if(!y){e=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){e=true}else{AA[x]=false}}else{if(AE){AI.push(AF);e=true}}}}}if(AH!==G){if(!AG){AA=AI}AD=AD.replace(j.match[AB],"");if(!e){return[]}break}}}if(AD==v){if(e==null){throw"Syntax error, unrecognized expression: "+AD}else{break}}v=AD}return AA};var j=g.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(e){return e.getAttribute("href")}},relative:{"+":function(AA,e,z){var x=typeof e==="string",AB=x&&!/\W/.test(e),y=x&&!AB;if(AB&&!z){e=e.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===e?u||false:u===e}}if(y){g.filter(e,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,e=z.length;v<e;v++){var y=z[v];if(y){var w=y.parentNode;z[v]=w.nodeName===u?w:false}}}else{for(var v=0,e=z.length;v<e;v++){var y=z[v];if(y){z[v]=x?y.parentNode:y.parentNode===u}}if(x){g.filter(u,z,true)}}},"":function(w,u,y){var v=m++,e=t;if(!u.match(/\W/)){var x=u=y?u:u.toUpperCase();e=q}e("parentNode",u,v,w,x,y)},"~":function(w,u,y){var v=m++,e=t;if(typeof u==="string"&&!u.match(/\W/)){var x=u=y?u:u.toUpperCase();e=q}e("previousSibling",u,v,w,x,y)}},find:{ID:function(u,v,w){if(typeof v.getElementById!=="undefined"&&!w){var e=v.getElementById(u[1]);return e?[e]:[]}},NAME:function(v,y,z){if(typeof y.getElementsByName!=="undefined"){var u=[],x=y.getElementsByName(v[1]);for(var w=0,e=x.length;w<e;w++){if(x[w].getAttribute("name")===v[1]){u.push(x[w])}}return u.length===0?null:u}},TAG:function(e,u){return u.getElementsByTagName(e[1])}},preFilter:{CLASS:function(w,u,v,e,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){e.push(y)}}else{if(v){u[x]=false}}}}return false},ID:function(e){return e[1].replace(/\\/g,"")},TAG:function(u,e){for(var v=0;e[v]===false;v++){}return e[v]&&r(e[v])?u[1]:u[1].toUpperCase()},CHILD:function(e){if(e[1]=="nth"){var u=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(e[2]=="even"&&"2n"||e[2]=="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(u[1]+(u[2]||1))-0;e[3]=u[3]-0}e[0]=m++;return e},ATTR:function(x,u,v,e,y,z){var w=x[1].replace(/\\/g,"");if(!z&&j.attrMap[w]){x[1]=j.attrMap[w]}if(x[2]==="~="){x[4]=" "+x[4]+" "}return x},PSEUDO:function(x,u,v,e,y){if(x[1]==="not"){if(x[3].match(s).length>1||/^\w/.test(x[3])){x[3]=g(x[3],null,null,u)}else{var w=g.filter(x[3],u,v,true^y);if(!v){e.push.apply(e,w)}return false}}else{if(j.match.POS.test(x[0])||j.match.CHILD.test(x[0])){return true}}return x},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){e.parentNode.selectedIndex;return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(v,u,e){return !!g(e[3],v).length},header:function(e){return/h\d/i.test(e.nodeName)},text:function(e){return"text"===e.type},radio:function(e){return"radio"===e.type},checkbox:function(e){return"checkbox"===e.type},file:function(e){return"file"===e.type},password:function(e){return"password"===e.type},submit:function(e){return"submit"===e.type},image:function(e){return"image"===e.type},reset:function(e){return"reset"===e.type},button:function(e){return"button"===e.type||e.nodeName.toUpperCase()==="BUTTON"},input:function(e){return/input|select|textarea|button/i.test(e.nodeName)}},setFilters:{first:function(u,e){return e===0},last:function(v,u,e,w){return u===w.length-1},even:function(u,e){return e%2===0},odd:function(u,e){return e%2===1},lt:function(v,u,e){return u<e[3]-0},gt:function(v,u,e){return u>e[3]-0},nth:function(v,u,e){return e[3]-0==u},eq:function(v,u,e){return e[3]-0==u}},filter:{PSEUDO:function(z,v,w,AA){var u=v[1],x=j.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,e=y.length;w<e;w++){if(y[w]===z){return false}}return true}}}},CHILD:function(e,w){var z=w[1],u=e;switch(z){case"only":case"first":while(u=u.previousSibling){if(u.nodeType===1){return false}}if(z=="first"){return true}u=e;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=e.parentNode;if(AB&&(AB.sizcache!==y||!e.nodeIndex)){var x=0;for(u=AB.firstChild;u;u=u.nextSibling){if(u.nodeType===1){u.nodeIndex=++x}}AB.sizcache=y}var AA=e.nodeIndex-AC;if(v==0){return AA==0}else{return(AA%v==0&&AA/v>=0)}}},ID:function(u,e){return u.nodeType===1&&u.getAttribute("id")===e},TAG:function(u,e){return(e==="*"&&u.nodeType===1)||u.nodeName===e},CLASS:function(u,e){return(" "+(u.className||u.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(y,w){var v=w[1],e=j.attrHandle[v]?j.attrHandle[v](y):y[v]!=null?y[v]:y.getAttribute(v),z=e+"",x=w[2],u=w[4];return e==null?x==="!=":x==="="?z===u:x==="*="?z.indexOf(u)>=0:x==="~="?(" "+z+" ").indexOf(u)>=0:!u?z&&e!==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 e=u[2],w=j.setFilters[e];if(w){return w(x,v,u,y)}}}};var n=j.match.POS;for(var p in j.match){j.match[p]=RegExp(j.match[p].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var f=function(u,e){u=Array.prototype.slice.call(u);if(e){e.push.apply(e,u);return e}return u};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(o){f=function(x,w){var u=w||[];if(i.call(x)==="[object Array]"){Array.prototype.push.apply(u,x)}else{if(typeof x.length==="number"){for(var v=0,e=x.length;v<e;v++){u.push(x[v])}}else{for(var v=0;x[v];v++){u.push(x[v])}}}return u}}var h;if(document.documentElement.compareDocumentPosition){h=function(u,e){var v=u.compareDocumentPosition(e)&4?-1:u===e?0:1;if(v===0){hasDuplicate=true}return v}}else{if("sourceIndex" in document.documentElement){h=function(u,e){var v=u.sourceIndex-e.sourceIndex;if(v===0){hasDuplicate=true}return v}}else{if(document.createRange){h=function(w,u){var v=w.ownerDocument.createRange(),e=u.ownerDocument.createRange();v.selectNode(w);v.collapse(true);e.selectNode(u);e.collapse(true);var x=v.compareBoundaryPoints(Range.START_TO_END,e);if(x===0){hasDuplicate=true}return x}}}}(function(){var u=document.createElement("form"),v="script"+(new Date).getTime();u.innerHTML="<input name='"+v+"'/>";var e=document.documentElement;e.insertBefore(u,e.firstChild);if(!!document.getElementById(v)){j.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:[]}};j.filter.ID=function(y,w){var x=typeof y.getAttributeNode!=="undefined"&&y.getAttributeNode("id");return y.nodeType===1&&x&&x.nodeValue===w}}e.removeChild(u)})();(function(){var e=document.createElement("div");e.appendChild(document.createComment(""));if(e.getElementsByTagName("*").length>0){j.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}}e.innerHTML="<a href='#'></a>";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){j.attrHandle.href=function(u){return u.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var e=g,u=document.createElement("div");u.innerHTML="<p class='TEST'></p>";if(u.querySelectorAll&&u.querySelectorAll(".TEST").length===0){return }g=function(y,x,v,w){x=x||document;if(!w&&x.nodeType===9&&!r(x)){try{return f(x.querySelectorAll(y),v)}catch(z){}}return e(y,x,v,w)};g.find=e.find;g.filter=e.filter;g.selectors=e.selectors;g.matches=e.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var e=document.createElement("div");e.innerHTML="<div class='test e'></div><div class='test'></div>";if(e.getElementsByClassName("e").length===0){return }e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return }j.order.splice(1,0,"CLASS");j.find.CLASS=function(u,v,w){if(typeof v.getElementsByClassName!=="undefined"&&!w){return v.getElementsByClassName(u[1])}}})()}function q(u,z,y,AD,AA,AC){var AB=u=="previousSibling"&&!AC;for(var w=0,v=AD.length;w<v;w++){var e=AD[w];if(e){if(AB&&e.nodeType===1){e.sizcache=y;e.sizset=w}e=e[u];var x=false;while(e){if(e.sizcache===y){x=AD[e.sizset];break}if(e.nodeType===1&&!AC){e.sizcache=y;e.sizset=w}if(e.nodeName===z){x=e;break}e=e[u]}AD[w]=x}}}function t(u,z,y,AD,AA,AC){var AB=u=="previousSibling"&&!AC;for(var w=0,v=AD.length;w<v;w++){var e=AD[w];if(e){if(AB&&e.nodeType===1){e.sizcache=y;e.sizset=w}e=e[u];var x=false;while(e){if(e.sizcache===y){x=AD[e.sizset];break}if(e.nodeType===1){if(!AC){e.sizcache=y;e.sizset=w}if(typeof z!=="string"){if(e===z){x=true;break}}else{if(g.filter(z,[e]).length>0){x=e;break}}}e=e[u]}AD[w]=x}}}var l=document.compareDocumentPosition?function(u,e){return u.compareDocumentPosition(e)&16}:function(u,e){return u!==e&&(u.contains?u.contains(e):true)};var r=function(e){return e.nodeType===9&&e.documentElement.nodeName!=="HTML"||!!e.ownerDocument&&r(e.ownerDocument)};var k=function(e,AA){var w=[],x="",y,v=AA.nodeType?[AA]:AA;while((y=j.match.PSEUDO.exec(e))){x+=y[0];e=e.replace(j.match.PSEUDO,"")}e=j.relative[e]?e+"*":e;for(var z=0,u=v.length;z<u;z++){g(e,v[z],w)}return g.filter(x,w)};O.find=g;O.filter=g.filter;O.expr=g.selectors;O.expr[":"]=O.expr.filters;g.selectors.filters.hidden=function(e){return e.offsetWidth===0||e.offsetHeight===0};g.selectors.filters.visible=function(e){return e.offsetWidth>0||e.offsetHeight>0};g.selectors.filters.animated=function(e){return O.grep(O.timers,function(u){return e===u.elem}).length};O.multiFilter=function(v,e,u){if(u){v=":not("+v+")"}return g.matches(v,e)};O.dir=function(v,u){var e=[],w=v[u];while(w&&w!=document){if(w.nodeType==1){e.push(w)}w=w[u]}return e};O.nth=function(x,e,v,w){e=e||1;var u=0;for(;x;x=x[v]){if(x.nodeType==1&&++u==e){break}}return x};O.sibling=function(v,u){var e=[];for(;v;v=v.nextSibling){if(v.nodeType==1&&v!=u){e.push(v)}}return e};return ;L.Sizzle=g})();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(j,l,i,f){var h=j.type||j;if(!f){j=typeof j==="object"?j[H]?j:O.extend(O.Event(h),j):O.Event(h);if(h.indexOf("!")>=0){j.type=h=h.slice(0,-1);j.exclusive=true}if(!i){j.stopPropagation();if(this.global[h]){O.each(O.cache,function(){if(this.events&&this.events[h]){O.event.trigger(j,l,this.handle.elem)}})}}if(!i||i.nodeType==3||i.nodeType==8){return G}j.result=G;j.target=i;l=O.makeArray(l);l.unshift(j)}j.currentTarget=i;var k=O.data(i,"handle");if(k){k.apply(i,l)}if((!i[h]||(O.nodeName(i,"a")&&h=="click"))&&i["on"+h]&&i["on"+h].apply(i,l)===false){j.result=false}if(!f&&i[h]&&!j.isDefaultPrevented()&&!(O.nodeName(i,"a")&&h=="click")){this.triggered=true;try{i[h]()}catch(m){}}this.triggered=false;if(!j.isPropagationStopped()){var g=i.parentNode||i.ownerDocument;if(g){O.event.trigger(j,l,g,true)}}},handle:function(l){var k,e;l=arguments[0]=O.event.fix(l||L.event);l.currentTarget=this;var m=l.type.split(".");l.type=m.shift();k=!m.length&&!l.exclusive;var i=RegExp("(^|\\.)"+m.slice().sort().join(".*\\.")+"(\\.|$)");e=(O.data(this,"events")||{})[l.type];for(var g in e){var h=e[g];if(k||i.test(h.type)){l.handler=h;l.data=h.data;var f=h.apply(this,arguments);if(f!==G){l.result=f;if(f===false){l.preventDefault();l.stopPropagation()}}if(l.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,k;g;){k=this.props[--g];h[k]=f[k]}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 j=document.documentElement,e=document.body;h.pageX=h.clientX+(j&&j.scrollLeft||e&&e.scrollLeft||0)-(j.clientLeft||0);h.pageY=h.clientY+(j&&j.scrollTop||e&&e.scrollTop||0)-(j.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 f=this.originalEvent;if(!f){return }if(f.preventDefault){f.preventDefault()}f.returnValue=false},stopPropagation:function(){this.isPropagationStopped=U;var f=this.originalEvent;if(!f){return }if(f.stopPropagation){f.stopPropagation()}f.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=U;this.stopPropagation()},isDefaultPrevented:K,isPropagationStopped:K,isImmediatePropagationStopped:K};var A=function(g){var f=g.relatedTarget;while(f&&f!=this){try{f=f.parentNode}catch(h){f=this}}if(f!=this){g.type=g.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(j,k){if(e.test(k.type)){var l=O(h.target).closest(k.data)[0];if(l){f.push({elem:l,fn:k})}}});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 g=document.documentElement,h=document.createElement("script"),l=document.createElement("div"),k="script"+(new Date).getTime();l.style.display="none";l.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var i=l.getElementsByTagName("*"),f=l.getElementsByTagName("a")[0];if(!i||!i.length||!f){return }O.support={leadingWhitespace:l.firstChild.nodeType==3,tbody:!l.getElementsByTagName("tbody").length,objectAll:!!l.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!l.getElementsByTagName("link").length,style:/red/.test(f.getAttribute("style")),hrefNormalized:f.getAttribute("href")==="/a",opacity:f.style.opacity==="0.5",cssFloat:!!f.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};h.type="text/javascript";try{h.appendChild(document.createTextNode("window."+k+"=1;"))}catch(j){}g.insertBefore(h,g.firstChild);if(L[k]){O.support.scriptEval=true;delete L[k]}g.removeChild(h);if(l.attachEvent&&l.fireEvent){l.attachEvent("onclick",function(){O.support.noCloneEvent=false;l.detachEvent("onclick",arguments.callee)});l.cloneNode(true).fireEvent("onclick")}O(function(){var e=document.createElement("div");e.style.width=e.style.paddingLeft="1px";document.body.appendChild(e);O.boxModel=O.support.boxModel=e.offsetWidth===2;document.body.removeChild(e).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(j,h){return{name:f.name,value:j}}):{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(n){n=O.extend(true,n,O.extend(true,{},O.ajaxSettings,n));var y,g=/=\?(&|$)/g,t,x,h=n.type.toUpperCase();if(n.data&&n.processData&&typeof n.data!=="string"){n.data=O.param(n.data)}if(n.dataType=="jsonp"){if(h=="GET"){if(!n.url.match(g)){n.url+=(n.url.match(/\?/)?"&":"?")+(n.jsonp||"callback")+"=?"}}else{if(!n.data||!n.data.match(g)){n.data=(n.data?n.data+"&":"")+(n.jsonp||"callback")+"=?"}}n.dataType="json"}if(n.dataType=="json"&&(n.data&&n.data.match(g)||n.url.match(g))){y="jsonp"+R++;if(n.data){n.data=(n.data+"").replace(g,"="+y+"$1")}n.url=n.url.replace(g,"="+y+"$1");n.dataType="script";L[y]=function(s){x=s;j();m();L[y]=G;try{delete L[y]}catch(z){}if(i){i.removeChild(v)}}}if(n.dataType=="script"&&n.cache==null){n.cache=false}if(n.cache===false&&h=="GET"){var f=E();var w=n.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+f+"$2");n.url=w+((w==n.url)?(n.url.match(/\?/)?"&":"?")+"_="+f:"")}if(n.data&&h=="GET"){n.url+=(n.url.match(/\?/)?"&":"?")+n.data;n.data=null}if(n.global&&!O.active++){O.event.trigger("ajaxStart")}var r=/^(\w+:)?\/\/([^\/?#]+)/.exec(n.url);if(n.dataType=="script"&&h=="GET"&&r&&(r[1]&&r[1]!=location.protocol||r[2]!=location.host)){var i=document.getElementsByTagName("head")[0];var v=document.createElement("script");v.src=n.url;if(n.scriptCharset){v.charset=n.scriptCharset}if(!y){var p=false;v.onload=v.onreadystatechange=function(){if(!p&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){p=true;j();m();v.onload=v.onreadystatechange=null;i.removeChild(v)}}}i.appendChild(v);return G}var l=false;var k=n.xhr();if(n.username){k.open(h,n.url,n.async,n.username,n.password)}else{k.open(h,n.url,n.async)}try{if(n.data){k.setRequestHeader("Content-Type",n.contentType)}if(n.ifModified){k.setRequestHeader("If-Modified-Since",O.lastModified[n.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}k.setRequestHeader("X-Requested-With","XMLHttpRequest");k.setRequestHeader("Accept",n.dataType&&n.accepts[n.dataType]?n.accepts[n.dataType]+", */*":n.accepts._default)}catch(u){}if(n.beforeSend&&n.beforeSend(k,n)===false){if(n.global&&!--O.active){O.event.trigger("ajaxStop")}k.abort();return false}if(n.global){O.event.trigger("ajaxSend",[k,n])}var o=function(s){if(k.readyState==0){if(q){clearInterval(q);q=null;if(n.global&&!--O.active){O.event.trigger("ajaxStop")}}}else{if(!l&&k&&(k.readyState==4||s=="timeout")){l=true;if(q){clearInterval(q);q=null}t=s=="timeout"?"timeout":!O.httpSuccess(k)?"error":n.ifModified&&O.httpNotModified(k,n.url)?"notmodified":"success";if(t=="success"){try{x=O.httpData(k,n.dataType,n)}catch(AA){t="parsererror"}}if(t=="success"){var z;try{z=k.getResponseHeader("Last-Modified")}catch(AA){}if(n.ifModified&&z){O.lastModified[n.url]=z}if(!y){j()}}else{O.handleError(n,k,t)}m();if(s){k.abort()}if(n.async){k=null}}}};if(n.async){var q=setInterval(o,13);if(n.timeout>0){setTimeout(function(){if(k&&!l){o("timeout")}},n.timeout)}}try{k.send(n.data)}catch(u){O.handleError(n,k,null,u)}if(!n.async){o()}function j(){if(n.success){n.success(x,t)}if(n.global){O.event.trigger("ajaxSuccess",[k,n])}}function m(){if(n.complete){n.complete(k,t)}if(n.global){O.event.trigger("ajaxComplete",[k,n])}if(n.global&&!--O.active){O.event.trigger("ajaxStop")}}return k},handleError:function(g,i,f,h){if(g.error){g.error(i,f,h)}if(g.global){O.event.trigger("ajaxError",[i,g,h])}},active:0,httpSuccess:function(g){try{return !g.status&&location.protocol=="file:"||(g.status>=200&&g.status<300)||g.status==304||g.status==1223}catch(f){}return false},httpNotModified:function(h,f){try{var i=h.getResponseHeader("Last-Modified");return h.status==304||i==O.lastModified[f]}catch(g){}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(k,n){if(k){return this.animate(T("show",3),k,n)}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,m;if(M[g]){m=M[g]}else{var j=O("<"+g+" />").appendTo("body");m=j.css("display");if(m==="none"){m="block"}j.remove();M[g]=m}O.data(this[h],"olddisplay",m)}}for(var h=0,f=this.length;h<f;h++){this[h].style.display=O.data(this[h],"olddisplay")||""}return this}},hide:function(h,j){if(h){return this.animate(T("hide",3),h,j)}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 j in this.options.curAnim){O.attr(this.elem.style,j,this.options.orig[j])}}this.options.complete.call(this.elem)}return false}else{var k=g-this.startTime;this.state=k/this.options.duration;this.pos=O.easing[this.options.easing||(O.easing.swing?"swing":"linear")](this.state,k,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(j,g){var e=j?"Left":"Top",h=j?"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(i){return this[0]?O.css(this[0],f,false,i?"margin":"border"):null};var k=g.toLowerCase();O.fn[k]=function(i){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]):i===G?(this.length?O.css(this[0],k):null):this.css(k,typeof i==="string"?i:i+"px")}})})();function IESafeOffsetParent(A){try{return A.offsetParent}catch(B){return document.body}}jQuery.fn.offset=function(){var left=0,top=0,elem=this[0],results;if(elem){with(jQuery.browser){var parent=elem.parentNode,offsetChild=elem,offsetParent=IESafeOffsetParent(elem),doc=elem.ownerDocument,safari2=safari&&parseInt(version)<522&&!/adobeair/i.test(userAgent),css=jQuery.curCSS,fixed=css(elem,"position")=="fixed";if(false&&elem.getBoundingClientRect){var box=elem.getBoundingClientRect();add(box.left+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),box.top+Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));add(-doc.documentElement.clientLeft,-doc.documentElement.clientTop)}else{add(elem.offsetLeft,elem.offsetTop);while(offsetParent){add(offsetParent.offsetLeft,offsetParent.offsetTop);if(mozilla&&!/^t(able|d|h)$/i.test(offsetParent.tagName)||safari&&!safari2){border(offsetParent)}if(!fixed&&css(offsetParent,"position")=="fixed"){fixed=true}offsetChild=/^body$/i.test(offsetParent.tagName)?offsetChild:offsetParent;offsetParent=offsetParent.offsetParent}while(parent&&parent.tagName&&!/^body|html$/i.test(parent.tagName)){if(!/^inline|table.*$/i.test(css(parent,"display"))){add(-parent.scrollLeft,-parent.scrollTop)}if(mozilla&&css(parent,"overflow")!="visible"){border(parent)}parent=parent.parentNode}if((safari2&&(fixed||css(offsetChild,"position")=="absolute"))||(mozilla&&css(offsetChild,"position")!="absolute")){add(-doc.body.offsetLeft,-doc.body.offsetTop)}if(fixed){add(Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),Math.max(doc.documentElement.scrollTop,doc.body.scrollTop))}}results={top:top,left:left}}}function border(elem){add(jQuery.curCSS(elem,"borderLeftWidth",true),jQuery.curCSS(elem,"borderTopWidth",true))}function add(l,t){left+=parseInt(l,10)||0;top+=parseInt(t,10)||0}return results};(function(){var K=1;var N=2;var I=3;var M=4;var J=true;var H=function(B,A,C){var E=B[A];var D;if(C.type==K){D=function(){var F=E.apply(this,arguments);return C.value.apply(this,[F,A])}}else{if(C.type==N){D=function(){C.value.apply(this,[arguments,A]);return E.apply(this,arguments)}}else{if(C.type==M){D=function(){return C.value.apply(this,arguments)}}else{if(C.type==I){D=function(){var F={object:this,args:arguments};return C.value.apply(F.object,[{arguments:F.args,method:A,proceed:function(){return E.apply(F.object,F.args)}}])}}}}}D.unweave=function(){B[A]=E;pointcut=B=D=E=null};B[A]=D;return D};var L=function(D,E){var B=(typeof (D.target.prototype)!="undefined")?D.target.prototype:D.target;var C=[];if(E.type!=M&&typeof (B[D.method])=="undefined"){for(var A in B){if(B[A]!=null&&B[A] instanceof Function&&A.match(D.method)){C[C.length]=H(B,A,E)}}if(C.length==0){throw"No method: "+D.method}}else{C[0]=H(B,D.method,E)}return J?C:C[0]};jQuery.aop={after:function(A,B){return L(A,{type:K,value:B})},before:function(A,B){return L(A,{type:N,value:B})},around:function(A,B){return L(A,{type:I,value:B})},introduction:function(A,B){return L(A,{type:M,value:B})},setup:function(A){J=A.regexMatch}}})();var ProcessStatus={New:0,Active:1,Suspended:2,Stopped:3};var ThreadStatus={New:0,Active:1,Suspended:2,Stopped:3};var ProcessManager={_processes:new Object(),_processCounter:0,_nextProcessId:1,_threads:new Object(),_threadCounter:0,_nextThreadId:1,_THREAD_START_TIMEOUT:1,startProcess:function(A){A.setProcessId(ProcessManager._nextProcessId+=1);ProcessManager._processes[A.getProcessId]=A;A.setThreads(new Array());A.setChildProcesses(new Array());ProcessManager._processCounter++;A.setStatus(ProcessStatus.Active);A.startMainThread()},StartProcess:function(A){return ProcessManager.startProcess(A)},stopProcess:function(D){var B=D.getChildProcesses();for(var F in B){var E=B[F];if(E instanceof Process&&E.getStatus()!=ProcessStatus.Stopped){B[F].stop()}}var C=D.getThreads();for(var G in C){var A=C[G];if(A instanceof Thread&&A!=null&&A.getStatus()!=ThreadStatus.Stopped){C[G].stop()}}ProcessManager._processes[D.getProcessId()]=null;clearTimeout(D.getTimeoutId());D.setStatus(ProcessStatus.Stopped);ProcessManager._processCounter--},StopProcess:function(A){return ProcessManager.stopProcess(A)},registerThread:function(A){A.setThreadId(ProcessManager._nextThreadId+=1);ProcessManager._threads[A.getThreadId()]=A},RegisterThread:function(A){return ProcessManager.registerThread(A)},startThread:function(A,B){if(typeof (A.getThreadId())=="undefined"||A.getThreadId()==0){ProcessManager.registerThread(A)}ProcessManager._actualThreadStart(A,B)},StartThread:function(A,B){return ProcessManager.startThread(A,B)},_actualThreadStart:function(A,B){A.setTimeoutId(setTimeout(function(){var D=A.getParentProcess();var C=A.getStatus();if(D.getStatus()==ProcessStatus.Active&&(C==ThreadStatus.New||C==ThreadStatus.Suspended)){ProcessManager._threadCounter++;A.setStatus(ThreadStatus.Active);if(!B){B=new Array()}try{A.getTarget().apply(A.getScope(),B)}catch(E){if(E instanceof Exception){throw (new Error(E.getMessage()))}else{throw E}}if(A==D.getMainThread()){A.suspend()}else{A.stop()}}},this._THREAD_START_TIMEOUT))},getThreadStart:function(A){return function(){A.start.apply(A,arguments)}},GetThreadStart:function(A){return ProcessManager.getThreadStart()},getClonedThreadStart:function(B,A){return function(){var C=B.getThread(A);C.start.apply(C,arguments)}},GetClonedThreadStart:function(B,A){return ProcessManager.getClonedThreadStart(B,A)},getDelayedThreadStart:function(A){ProcessManager.registerThread(A);return function(){A.start.apply(A,arguments)}},stopThread:function(A){ProcessManager._threads[A.ThreadId]=null;clearTimeout(A.getTimeoutId());A.setStatus(ThreadStatus.Stopped)},StopThread:function(A){return ProcessManager.stopThread(A)},suspendThread:function(A){if(A.getStatus()==ThreadStatus.Active){ProcessManager._threadCounter--;A.setStatus(ThreadStatus.Suspended)}},SuspendThread:function(A){return ProcessManager.suspendThread(A)},resumeThread:function(A){if(A.getStatus()==ThreadStatus.Suspended){ProcessManager._actualThreadStart(A)}},ResumeThread:function(A){return ProcessManager.resumeThread(A)}};function Process(){this._childProcesses=new Array();this._threads=new Array()}Process.prototype={_processManager:ProcessManager,_parentProcess:null,_childProcesses:null,_threads:null,_processId:0,_status:ProcessStatus.New,_title:"",_timeoutId:0,_mainThread:null,_runningThreads:0,_threadsCompleted:false,_onThreadCompleteTarget:null,main:null,startMainThread:function(){this._mainThread=this.getThread(this.main);this._mainThread.start()},__startMainThread:function(){return this.startMainThread()},start:function(){this._processManager.startProcess(this)},Start:function(){return this.start()},stop:function(){this._processManager.stopProcess(this)},Stop:function(){return this.stop()},getThread:function(B){var A=new Thread();A.setParentProcess(this);A.setScope(this);if(typeof (B)=="function"){A.setTarget(B)}this._threads.push(A);return A},_createCallback:function(A){return this.getThread(A).getDelayedThreadStart()},GetThread:function(A){return this.getThread(A)},getProcess:function(A,C){if(typeof (C)!="function"){throw new IllegalArgumentException("processType should be a (subclass of) Process.")}var D=function(){};D.prototype=C.prototype;if(!(new D() instanceof Process)){throw new IllegalArgumentException("processType should be a (subclass of) Process.")}var B=new C();B.setParentProcess(this);this._childProcesses.push(B);if(typeof (A)=="function"){B.setMain(A)}SettingsAdviceChain.getInstance().process(B);return B},GetProcess:function(A,B){return this.getProcess(A,B)},_onThreadsComplete:function(A){this._onThreadCompleteTarget=A;this._threadsCompleted=false;if(this._runningThreads==1){this._threadsCompleted=true;this._onThreadCompleteTarget();if(this._threadsCompleted){this._onThreadCompleteTarget=null}}},OnThreadsComplete:function(A){return this._onThreadsComplete(A)},startThread:function(A,B){if(A.getThreadId()==0){this._runningThreads++}this._processManager.startThread(A,B)},StartThread:function(A,B){return this.startThread(A,B)},stopThread:function(A){this._processManager.stopThread(A);this._runningThreads--;if(this._onThreadCompleteTarget!=null&&this._runningThreads==1){this._mainThread.resume(this._onThreadCompleteTarget);this._onThreadCompleteTarget=null}},StopThread:function(A){return this.stopThread(A)},getThreadStart:function(A){return this._processManager.getThreadStart(A)},GetThreadStart:function(A){return this.getThreadStart(A)},getClonedThreadStart:function(A){return this._processManager.getClonedThreadStart(this,A)},GetClonedThreadStart:function(A){return this.getClonedThreadStart(A)},getDelayedThreadStart:function(A){this._runningThreads++;return this._processManager.getDelayedThreadStart(A)},setParentProcess:function(A){this._parentProcess=A},getParentProcess:function(){return this._parentProcess},setMain:function(A){this.main=A},getMain:function(){return this.main},getProcessId:function(){return this._processId},setProcessId:function(A){this._processId=A},setThreads:function(A){this._threads=A},getThreads:function(){return this._threads},setChildProcesses:function(A){this._childProcesses=A},getChildProcesses:function(){return this._childProcesses},setStatus:function(A){this._status=A},getStatus:function(){return this._status},setTimeoutId:function(A){this._timeoutId=A},getTimeoutId:function(){return this._timeoutId},getMainThread:function(){return this._mainThread},setMainThread:function(A){this._mainThread=A}};function Thread(){this._processManager=ProcessManager;this._threadId=0;this._status=ThreadStatus.New}Thread.prototype={_processManager:null,_parentProcess:null,_scope:null,_threadId:null,_status:null,_title:"",_timeoutId:0,_target:null,Start:function(){return this.start.apply(this,arguments)},start:function(){this._parentProcess.startThread(this,arguments)},Stop:function(){return this.stop()},stop:function(){this._parentProcess.stopThread(this)},GetThreadStart:function(){return this.getThreadStart()},getThreadStart:function(){return this._parentProcess.getThreadStart(this)},getDelayedThreadStart:function(){return this._parentProcess.getDelayedThreadStart(this)},Suspend:function(){return this.suspend()},suspend:function(){this._processManager.suspendThread(this)},Resume:function(A){return this.resume(A)},resume:function(A){this._target=A;this._processManager.resumeThread(this)},setScope:function(A){this._scope=A},getScope:function(){return this._scope},setParentProcess:function(A){this._parentProcess=A},getParentProcess:function(){return this._parentProcess},setTarget:function(A){this._target=A},getTarget:function(){return this._target},setThreadId:function(A){this._threadId=A},getThreadId:function(){return this._threadId},setTimeoutId:function(A){this._timeoutId=A},getTimeoutId:function(){return this._timeoutId},setStatus:function(A){this._status=A},getStatus:function(){return this._status}};var WindowStyle={CHROMELESS:0,MODULE:1};var WindowManager={_classNamePrefix:"windowManager",show:function(A){var M=WindowManager.createElement("div");var K=A.constructor.getFunctionName();FollowMe.Browser.addClass(M,K);if(typeof (A.getWindowStyle())=="undefined"||A.getWindowStyle()==null){A.setWindowStyle(WindowStyle.CHROMELESS)}var H=null;var L=null;var I=A.getView();switch(A.getWindowStyle()){case WindowStyle.MODULE:FollowMe.Browser.addClass(M,this._classNamePrefix+"_windowArea");var B=WindowManager.createElement("div",M);B.style.zIndex=FollowMe.Browser.zIndexes.high;FollowMe.Browser.addClass(B,this._classNamePrefix+"_headerBox");var C=WindowManager.createElement("div",B);FollowMe.Browser.addClass(C,this._classNamePrefix+"_headerHolder");var G=WindowManager.createElement("div",C);FollowMe.Browser.addClass(G,this._classNamePrefix+"_header");var F=WindowManager.createElement("h3",G);FollowMe.Browser.addClass(F,this._classNamePrefix+"_headerText");F.innerHTML=A.getTitle();I.setTitleArea(F);var E=WindowManager.createElement("div",B);FollowMe.Browser.addClass(E,this._classNamePrefix+"_headerIcon icon48x48");FollowMe.Browser.setPng(E,A.getIcon(),null,null);I.setIconArea(E);H=WindowManager.createElement("div",M);FollowMe.Browser.addClass(H,this._classNamePrefix+"_windowContentContainer");L=WindowManager.createElement("div",H);FollowMe.Browser.addClass(L,this._classNamePrefix+"_windowContent");var N=A.isPrintableAsPDF();if(A.isPrintable()||N){var J=WindowManager.createElement("a",B);FollowMe.Browser.addClass(J,this._classNamePrefix+"_printIcon icon16x16");FollowMe.Browser.setPng(J,(N?"Images/icons/16x16/pdf.png":"Images/icons/16x16/printer.png"),null,null);FollowMe.Browser.setHandCursor(J);if(!N){FollowMe.EventHandler.add(J,"click",new Delegate(this,function(){J.style.display="none";E.style.display="none";FollowMe.Browser.printElement(M,A.isCorrectedForIE());J.style.display="block";E.style.display="block"}))}else{FollowMe.EventHandler.add(J,"click",function(){FollowMe.Browser.printElementAsPDF(this,A.getStudentIdForPDF())})}}if(!FollowMe.getIsExport()){var D=WindowManager.createElement("div",B);FollowMe.Browser.addClass(D,this._classNamePrefix+"_visibilityIconArea icon16x16");FollowMe.Browser.setHandCursor(D);I.setVisibilityArea(D)}FollowMe.EventHandler.add(null,FollowMe.EventHandler.getDocumentMouseDown(),WindowManager.getModuleSelectedEventHandler(A,M,G,H));break;case WindowStyle.CHROMELESS:default:L=WindowManager.createElement("div",M);break}I.setWindowArea(M);I.init(L);A.getContainer().add(M)},getModuleSelectedEventHandler:function(C,A,D,B){return this._moduleSelectHandlerHelper(C,A,D,B)},_moduleSelectHandlerHelper:function(C,A,D,B){return new Delegate(this,function(E){this._moduleSelectHandler(C,A,D,B,E)})},_moduleSelectHandler:function(E,B,F,D,C){if(!C.targetobject){return }if(FollowMe.Browser.isChildNode(B,C.targetobject)){if(this.currentlySelectedHeader==F){return }if(this.currentlySelectedHeader){FollowMe.Browser.removeClass(this.currentlySelectedHeader,this._classNamePrefix+"_activeHeader");FollowMe.Browser.addClass(this.currentlySelectedHeader,this._classNamePrefix+"_inactiveHeader");if(this.currentlySelectedHeader.parentNode&&this.currentlySelectedHeader.parentNode.style){this.currentlySelectedHeader.parentNode.style.backgroundImage="url(Images/inactive-header.jpg)";this.currentlySelectedHeader.parentNode.style.position=""}}if(this.currentlySelectedContent){FollowMe.Browser.removeClass(this.currentlySelectedContent,this._classNamePrefix+"_activeContent");FollowMe.Browser.addClass(this.currentlySelectedContent,this._classNamePrefix+"_inactiveContent")}this.currentlySelectedHeader=F;this.currentlySelectedContent=D;FollowMe.Browser.removeClass(this.currentlySelectedContent,this._classNamePrefix+"_inactiveContent");FollowMe.Browser.addClass(this.currentlySelectedContent,this._classNamePrefix+"_activeContent");this.currentlySelectedHeader.parentNode.style.position="";FollowMe.Browser.removeClass(this.currentlySelectedHeader,this._classNamePrefix+"_inactiveHeader");FollowMe.Browser.addClass(this.currentlySelectedHeader,this._classNamePrefix+"_activeHeader");if(this.currentlySelectedHeader.parentNode&&this.currentlySelectedHeader.parentNode.style){this.currentlySelectedHeader.parentNode.style.backgroundImage="url(Images/active-header.jpg)"}var A={};E.onselect(A)}},createElement:function(C,B){var A=document.createElement(C);if(B){B.appendChild(A)}return A}};function View(A){if(!(A instanceof Object)){throw new IllegalArgumentException("The controller must be of type 'Object'.")}this._controller=A}View.prototype={_controller:null,_clientArea:null,_titleArea:null,_iconArea:null,_windowArea:null,_visibilityArea:null,_visibilitySetting:null,setTitleArea:function(A){this._titleArea=A},setIconArea:function(A){this._iconArea=A},setWindowArea:function(A){this._windowArea=A},setVisibilityArea:function(A){this._visibilityArea=A;if(this._visibilitySetting!=null&&this._visibilitySetting!=""){this._enableVisibilityArea()}},setTitle:function(A){if(this._titleArea!=null){this._titleArea.innerHTML=A}},setClassName:function(A){this.setClassNameOnHtmlElement(A,this._clientArea)},setClassNameOnHtmlElement:function(B,A){FollowMe.Browser.addClass(A,B)},removeClassName:function(A){this.removeClassNameFromHtmlElement(A,this._clientArea)},removeClassNameFromHtmlElement:function(B,A){FollowMe.Browser.removeClass(A,B)},setIcon:function(A){if(this._iconArea!=null){if(A==""){this._iconArea.style.display="none"}else{this._iconArea.style.display="block";FollowMe.Browser.setPng(this._iconArea,A,null,null)}}},setVisibilitySetting:function(A){this._visibilitySetting=A;if(this._visibilitySetting==null||this._visibilitySetting==""){this._enableVisibilityArea()}else{this._disableVisibilityArea()}},_enableVisibilityArea:function(){if(this._visibilityArea==null){return }if(FollowMe.Settings.get(this._visibilitySetting)=="1"){this._showVisibleIcon(true)}else{this._showVisibleIcon(false)}FollowMe.EventHandler.add(this._visibilityArea,"click",new Delegate(this,this._toggleVisibility));this._visibilityArea.style.display="block"},_disableVisibilityArea:function(){if(this._visibilityArea==null){return }this._visibilityArea.style.display="none"},_toggleVisibility:function(){if(FollowMe.Settings.get(this._visibilitySetting)=="1"){FollowMe.Settings.set(this._visibilitySetting,"0");this._showVisibleIcon(false)}else{FollowMe.Settings.set(this._visibilitySetting,"1");this._showVisibleIcon(true)}},_showVisibleIcon:function(A){if(A){FollowMe.Browser.setPng(this._visibilityArea,"Images/icons/16x16/users_family.png");this._visibilityArea.title="Verberg in "+FollowMe.Settings.get("label.structure.rate.showcase")}else{FollowMe.Browser.setPng(this._visibilityArea,"Images/icons/16x16/user3.png");this._visibilityArea.title="Toon in "+FollowMe.Settings.get("label.structure.rate.showcase")}},init:function(A){this._clientArea=A},createElement:function(C,B){if(!(typeof (C)=="string")){throw new IllegalArgumentException("The type parameter must be of type 'string'")}var A=document.createElement(C);A.getCells=this._element_getCells;try{if(typeof (HTMLElement)=="undefined"||!(A instanceof HTMLElement)){A.constructor=Object}}catch(D){if(window.console){console.warn("Error creating constructor.")}}finally{if(B){B.appendChild(A)}return A}},_element_getCells:function(){return this.cells},clear:function(){FollowMe.Browser.removeAllChilds(this._clientArea)},dispose:function(){if(this._windowArea!=null){FollowMe.Browser.removeNode(this._windowArea)}},showError:function(A){if(!(typeof (A)=="string")){throw new IllegalArgumentException("The errorMessage parameter must be of type 'string'")}var B=this.createElement("div",this._clientArea);B.innerHTML=A;B.style.fontWeight="bold";B.style.color="#F00";B.style.height="1%";jQuery(B).appendTo(this._clientArea)},showLoading:function(F){var B=F||this._clientArea;if(B){jQuery(B).parent().hide().fadeIn("fast");var C=this.createElement("div",B);C.className="ViewLoadingArea";var A=this._getLoadingMessage();var E=new FormImage("LoadingImage",A);E.setImageSrc("Images/ajax-loader.gif");E.addClassName("icon32x32");E.addClassName("floatL");E.appendTo(C);var D=this.createElement("div",B);D.className="errorClearer";D.style.clear="both"}else{if(window.console){console.warn("View.showLoading called, but the view has no client area.")}}},_getLoadingMessage:function(){return this._getSetting?this._getSetting("gui.message.loading"):""},setZindex:function(A){if(this._windowArea){this._windowArea.style.zIndex=A}},showEntirely:function(){if(this._windowArea){this._windowArea.style.display="block"}},hideEntirely:function(){if(this._windowArea){this._windowArea.style.display="none"}}};function FormsApplication(){Process.call(this)}FormsApplication.prototype={context:null,_view:null,_windowManager:WindowManager,_windowStyle:null,_onInit:function(){var A=this._init();if(typeof (A)=="undefined"||A){this._onThreadsComplete(this._initComplete)}else{return }},_init:function(){if(this.init){this.init()}},_initComplete:function(){this._windowManager.show(this);this._onLoad()},_onLoad:function(){var A=this._load();if(typeof (A)=="undefined"||A){this._onThreadsComplete(this._onRender)}else{return }},_load:function(){if(this.load){this.load()}},_isPrintable:false,_IsPrintableAsPDF:false,_studentIdForPDF:null,_correctPrintingForIE:true,_onRender:function(){this._render()},_render:function(){if(this.render){this.render()}},_onUnload:function(){this._unload();this._onThreadsComplete(this._onDispose)},_unload:function(){},_onDispose:function(){if(this._view!=null){this._view.dispose()}this._dispose();this._onThreadsComplete(function(){Process.prototype.stop.call(this)})},_dispose:function(){},main:function(){this._onInit()},show:function(A){this._container=A;this.start()},stop:function(){this._onUnload()},setContext:function(A){this.context=A},getContext:function(){return this.context},setView:function(A){if(!(A instanceof View)){throw new IllegalArgumentException("The 'view' argument must be an instance of 'View'.")}this._view=A},getView:function(){return this._view},getContainer:function(){return this._container},setWindowStyle:function(A){this._windowStyle=A},getWindowStyle:function(){return this._windowStyle},setPrintable:function(A){this._isPrintable=A},setPrintableAsPDF:function(A){this._IsPrintableAsPDF=A},setStudentIdForPFD:function(A){this._studentIdForPDF=A},getStudentIdForPDF:function(){return this._studentIdForPDF},isPrintable:function(){return this._isPrintable},isPrintableAsPDF:function(){return this._IsPrintableAsPDF},setCorrectPrintingForIE:function(A){this._correctPrintingForIE=A},isCorrectedForIE:function(){return this._correctPrintingForIE}};FormsApplication.extend(Process);function Container(){}Container.prototype={_clientArea:null,_modules:null,_isEmpty:true,getClientArea:function(){return this._clientArea},init:function(A){this._modules=[];this._clientArea=A},add:function(A){this._modules.push(A);this._clientArea.appendChild(A);this._isEmpty=false},clear:function(){FollowMe.Browser.removeAllChilds(this._clientArea);this._modules=[];this._isEmpty=true},remove:function(A){FollowMe.Browser.removeNode(this._modules[A]);this._modules.splice(A);this._isEmpty=this._modules.length==0},setHtmlClassname:function(A){this._clientArea.className=A},getIsEmpty:function(){return this._isEmpty}};function Delegate(A,C){if(typeof (A)!="object"||A==null){throw new IllegalArgumentException("Argument 'owner' must be of type 'object'")}if(typeof (C)!="function"){throw new IllegalArgumentException("Argument 'method' must be of type 'function'")}var B=function(){return C.apply(A,arguments)};B.constructor=Delegate;B.getOwner=function(){return A};B.getMethod=function(){return C};return B}Delegate.extend(Function);function Role(B,A){if(typeof (B)!="string"){throw new IllegalArgumentException("Argument 'identifier' must be of type 'string'")}this._identifier=B;this._titleSetting=A}Role.prototype={_identifier:null,_titleSetting:null,getTitle:function(){if(this._titleSetting!=null){return FollowMe.Settings.get(this._titleSetting)}else{return this._identifier}}};function ControlEvent(){this._handlers=[]}ControlEvent.prototype={_handlers:null,addHandler:function(A){if(typeof (A)!="function"&&typeof (A)!="Delegate"){throw new IllegalArgumentException("Handler must be function or delegate.")}if(this._handlers==null){this._handlers=[]}this._handlers.push(A);return true},removeHandler:function(B){var A=this._findHandler(B);if(A!=null&&A>=0&&A<this._handlers.length){this._handlers.splice(A,1);return true}else{return false}},hasHandlers:function(){return this._handlers!=null&&this._handlers.length>0},removeAllHandlers:function(){this._handlers=[]},fire:function(B,C){if(this._handlers!=null){var A;for(A=0;A<this._handlers.length;A++){this._handlers[A](B,C)}}},_findHandler:function(B){if(this._handlers==null){return null}var A;for(A=0;A<this._handlers.length;A++){if(this._handlers[A]===B){return A}}return null}};Function.prototype.getNumberOfArguments=function(){var D=null;var C=this.toString();var E=/^function(?:\ )?([a-zA-Z_\$][a-zA-Z0-9_\$]*)?\(([a-zA-Z_\$][a-zA-Z0-9_\$\,\ ]*)\).*$/;var A=E.exec(this.getFunctionDefinition());var B=null;if(A!=null&&A.length>=3){B=A[2];if(B&&B.length>0){A=B.split(",");if(A){return A.length}}}return 0};function LoadingProxyFactory(){}LoadingProxyFactory.prototype={create:function(C){var E={};if(C.__typeName){E.Name=C.__typeName}E.loadingEvent=new ControlEvent();E.loadingFinishedEvent=new ControlEvent();E.loadingFailedEvent=new ControlEvent();for(var A in C){var D=C[A];if(C.hasOwnProperty(A)&&typeof (D)=="function"){var B=this._createLoadingProxyFunction(A,D,E);E[A]=B}else{if(C instanceof CachedWebserviceProxy){E[A]=D}}}return E},_createLoadingProxyFunction:function(A,C,B){return new Delegate(this,function(){var N=B.Name+"."+A;var E=arguments;var D=arguments.length;var I=C.getNumberOfArguments();var J=I-D;var K;var M;switch(J){case 0:K=D-3;M=D-2;break;case 1:K=D-2;M=D-1;break;case 2:E[D]=null;D++;K=D-2;M=D-1;break;case 3:E[D]=null;D++;E[D]=null;D++;K=D-2;M=D-1;break;default:break}var G=E[K];var F;if(G!=null){if(typeof (G)!="function"&&!(G instanceof Delegate)){throw new IllegalArgumentException("Success callback for "+N+" is not a function or delegate. ")}F=new Delegate(B,function(){this.loadingFinishedEvent.fire(N);G.apply(this,arguments)})}else{F=new Delegate(B,function(){this.loadingFinishedEvent.fire(N)})}E[K]=F;var L=E[M];var H;if(L!=null){if(typeof (L)!="function"&&!(L instanceof Delegate)){throw new IllegalArgumentException("Failure callback for "+N+" is not a function or delegate. ")}H=new Delegate(B,function(){this.loadingFailedEvent.fire(N);L.apply(this,arguments)})}else{H=new Delegate(B,function(){this.loadingFailedEvent.fire(N)})}E[M]=H;B.loadingEvent.fire(N);C.apply(this,E)})}};function AbstractAdviceMatcher(A,B){this._advice=A;this._pointCuts=B}AbstractAdviceMatcher.prototype={_advice:null,_pointCuts:null,matches:function(A){throw new Exception("Needs to be overridden")},getAdvice:function(){return this._advice},getPointCuts:function(){return this._pointCuts}};function AdviceChain(){}AdviceChain.prototype={_adviceMatchers:null,setAdviceMatchers:function(A){this._adviceMatchers=A},process:function(D){for(var F=0;F<this._adviceMatchers.length;F++){var A=this._adviceMatchers[F];if(A.matches(D)){var C=A.getAdvice();var E=A.getPointCuts();for(var B=0;B<E.length;B++){jQuery.aop.around({target:D,method:E[B]},C)}return }}}};function LoadSettingsAdviceMatcher(){AbstractAdviceMatcher.call(this,function(A){FollowMe.Settings.prefetchBatch(this.getRequiredSettings(),this.getThread(function(){}));return A.proceed()},["_load"])}LoadSettingsAdviceMatcher.prototype={matches:function(A){if(!(A instanceof FormsApplication)){return false}if(typeof (A.getRequiredSettings)!="function"){return false}return true}};LoadSettingsAdviceMatcher.extend(AbstractAdviceMatcher);function SettingsAdviceChain(){}(function(){var A=null;SettingsAdviceChain.getInstance=function(){if(A==null){A=new SettingsAdviceChain();var B=[];B.push(new LoadSettingsAdviceMatcher());A.setAdviceMatchers(B)}return A}})();SettingsAdviceChain.prototype={};SettingsAdviceChain.extend(AdviceChain);function SettingPathHelper(){}SettingPathHelper.prototype={_separator:".",_groupChar:"*",_group:function(){return this._separator+this._groupChar},isGroup:function(A){return A.indexOf(this._group())>=0},removeGroup:function(A){return A.substr(0,A.length-this._group().length)},addGroup:function(A){return this.join(A,this._groupChar)},split:function(A){return A.split(this._separator)},join:function(B,A){if(B!=""&&A!=""){return B+this._separator+A}else{return B+A}}};function SettingCache(A){this._settingPathHelper=A;this._cache=new Object();this._groups=new Object()}SettingCache.prototype={_cache:null,_groups:null,_settingPathHelper:null,contains:function(A){if(this._settingPathHelper.isGroup(A)){if(this._containsGroup(A)){return true}}else{if(this._cache.hasOwnProperty(A)){return true}}return false},_containsGroup:function(A){if(this._groups.hasOwnProperty(A)){return true}else{return false}},get:function(A){if(this._cache[A]!=null){return this._cache[A]}else{if(window.console){console.error("Tried to get a non-existent setting '"+A+"'. Perhaps prefetch first.")}return(typeof (A)=="string")?A:A.toString()}},set:function(B,A){if(this._settingPathHelper.isGroup(B)){if(!this._containsGroup(B)){B=this._settingPathHelper.removeGroup(B);this._addGroup(B,A)}else{}}else{this._cache[B]=A}},_addGroup:function(C,D){if(this._settingPathHelper.isGroup(C)){C=this._settingPathHelper.removeGroup(C)}var B;for(var A in D){B=this._settingPathHelper.join(C,A);if(typeof (D[A])=="string"){this._setQuietly(B,D[A])}else{if(D[A] instanceof Object){this._addGroup(B,D[A])}}}this._addToGroupList(C)},_setQuietly:function(B,A){if(!this.contains(B)){this._cache[B]=A}},_addToGroupList:function(A){if(!this._settingPathHelper.isGroup(A)){A=this._settingPathHelper.addGroup(A)}this._groups[A]=true}};function Settings(){this._settingPathHelper=new SettingPathHelper();this._settingCache=new SettingCache(this._settingPathHelper)}Settings.prototype={_departmentId:null,_schoolId:null,_settingCache:null,_settingPathHelper:null,_userId:null,_webservice:null,setWebService:function(A){this._webservice=A},setSchoolId:function(A){this._schoolId=A},setDepartmentId:function(A){this._departmentId=A},setUserId:function(A){this._userId=A},prefetch:function(B,C){if(this._settingCache.contains(B)){C(B)}else{var A=new Delegate(this,function(D){this._prefetchComplete(B,D,C)});if(this._settingPathHelper.isGroup(B)){this._webservice.GetSettingGroup(B,this._schoolId,this._departmentId,this._userId,A)}else{this._webservice.GetSetting(B,this._schoolId,this._departmentId,this._userId,A)}}},prefetchBatch:function(D,B){if(D&&D.length>0){for(var C=0;C<D.length;C++){var A=B.getParentProcess().getThread(function(){}).getDelayedThreadStart();this.prefetch(D[C],A)}}(B.getDelayedThreadStart())()},prefetchGroups:function(E,B){if(E&&E.length>0){var D=[];for(var C=0;C<E.length;C++){if(!this._settingCache.contains(E[C])){D.push(E[C])}}var A=B.getParentProcess().getThread(function(){}).getDelayedThreadStart();var F=new Delegate(this,function(G){this._prefetchGroupComplete(G,A)});this._webservice.GetSettingGroups(D,this._schoolId,this._departmentId,this._userId,F);B.getDelayedThreadStart()()}},_prefetchComplete:function(B,A,C){this._settingCache.set(B,A);C(B)},_prefetchGroupComplete:function(B,C){for(var A=0;A<B.length;A++){this._settingCache.set(B[A].Name,B[A].Settings)}C()},get:function(B){var A=this._settingCache.get(B);return(A==B)?B:A.replace(/\\n/g,"\n").replace(/\\t/g,"\t")},contains:function(A){return this._settingCache.contains(A)},set:function(B,A){FollowMe.SettingService.PersistSettingValue(B,A,null,null,this._userId);this._settingCache.set(B,A)}};BasicCache=function(){this._results={}};BasicCache.prototype={_expirationTime:2*60000,_results:null,setExpirationTime:function(A){this._expirationTime=A},getExpirationTime:function(){return this._expirationTime},isEmpty:function(){for(var A in this._results){return false}return true},put:function(D,C,A){if(!this._results[D]){this._results[D]={}}var B=this._parametersToString(C);this._results[D][B]={timestamp:new Date(),result:A}},get:function(D,C){var B=this._parametersToString(C);if(this._results[D]&&this._results[D][B]){var A=this._results[D][B];if(!this._hasExpired(A)){return A.result}else{this.emptyForMethod(D)}}return null},_parametersToString:function(C){var B="";if(C){for(var A=0;param=C[A];A++){if(A>0){B+=","}B+=this._parameterToString(param)}}return B},_parameterToString:function(A){if(A==null){return"null"}if(typeof (A)=="object"){return this._objectToString(A)}else{if(typeof (A)=="function"){return A.getName()}else{return A.toString()}}},_objectToString:function(C){if(C.Id){return"{Id:"+C.Id.toString()+"}"}var B="{";var A=true;for(var D in C){if(C.hasOwnProperty(D)){if(!A){B+=","}else{A=false}B+=D+":"+this._parameterToString(C[D])}}B+="}";return B},_hasExpired:function(B){var C=new Date().getTime();var A=B.timestamp.getTime();return this._expirationTime<(C-A)},empty:function(){this._results={}},emptyForMethod:function(A){if(this._results[A]){delete this._results[A]}},emptyForMethodListString:function(B){var A=B.split(",");if(A!=null&&A.length>0){A.forEach(new Delegate(this,function(C){this.emptyForMethod(jQuery.trim(C))}))}}};function WebserviceInvocation(B,A,C){this._arguments=C;this._method=A;this._webservice=B}WebserviceInvocation.prototype={_webservice:null,_method:null,_arguments:null,_executed:false,_successDelegateIndex:null,_failureDelegateIndex:null,isExecuted:function(){return this._executed},init:function(){this._analyseArguments()},proceed:function(B){if(this._executed){return }this._executed=true;var A=ArrayUtils.cloneShallow(this._arguments);A[this._successDelegateIndex]=new Delegate(this,function(C){if(B){B(C)}if(this._arguments[this._successDelegateIndex]){this._arguments[this._successDelegateIndex](C)}});this._method.apply(this._webservice,A)},intercept:function(A){this._callCallback(this._successDelegateIndex,A)},fail:function(A){this._callCallback(this._failureDelegateIndex,A)},_callCallback:function(B,A){if(this._executed){return }this._executed=true;if(this._arguments[B]){this._arguments[B](A)}},getArguments:function(){return this._arguments},getValueArguments:function(){if(this._successDelegateIndex>=0){var B=[];for(var A=0;A<this._successDelegateIndex&&A<this._arguments.length;A++){B[A]=this._arguments[A]}return B}else{return this._arguments}},_analyseArguments:function(){var A=this._arguments.length;var B=this._method.getNumberOfArguments();var C=B-A;switch(C){case 0:this._successDelegateIndex=A-3;this._failureDelegateIndex=A-2;break;case 1:this._successDelegateIndex=A-2;this._failureDelegateIndex=A-1;break;case 2:A++;this._successDelegateIndex=A-2;this._failureDelegateIndex=A-1;break;case 3:A+=2;this._successDelegateIndex=A-2;this._failureDelegateIndex=A-1;break;default:break}}};CachedWebserviceProxy=function(A,B){this._cache=new BasicCache();this.setWebservice(A);this.setMethods(B)};CachedWebserviceProxy.prototype={_cache:null,_isResolved:false,_methodsConfiguration:null,_webservice:null,setExpirationTime:function(A){this._cache.setExpirationTime(A*60000)},setMethods:function(A){this._methodsConfiguration=A},setWebservice:function(A){this._webservice=A;for(var B in A){this[B]=A[B]}},_createDefaultCachingDelegate:function(A){return new Delegate(this,function(C,B){var D=this._cache.get(A.Name,B);if(D==null){C.proceed(new Delegate(this,function(E){this._cache.put(A.Name,B,E)}))}else{C.intercept(D)}})},_createClearingCachingDelegate:function(A){return new Delegate(this,function(C,B){C.proceed(new Delegate(this,function(D){this.emptyForMethodListString(A.For);if(A.Cascade){jQuery.each(A.Cascade,new Delegate(this,function(F,E){if(E.Service&&E.For){service=FollowMe[E.Service];if(service&&service.emptyForMethodListString){service.emptyForMethodListString(E.For)}else{if(service==null){throw new Error("Service '"+E.Service+"' is not defined.")}else{throw new Error("Service '"+E.Service+"' has no cache to empty.")}}}}))}}))})},resolve:function(){var A=this._methodsConfiguration;if(this._isResolved){throw new Error("CachedWebserviceProxy for '"+this._webservice.constructor.__typeName+"' should be singleton!")}if(A&&!this._isResolved){this._isResolved=true;A.forEach(new Delegate(this,function(D){var C;if(D.Name.toLowerCase()=="all"){C=[];for(var B in this){if(this.hasOwnProperty(B)&&B[0]>="A"&&B[0]<="Z"){C.push(B)}}}else{C=D.Name.split(",")}C.forEach(new Delegate(this,function(E){var F=ObjectUtils.clone(D);F.Name=jQuery.trim(E);this._resolveMethod(F)}))}))}return this},_resolveMethod:function(C){var D=this[C.Name];var B=this;var A;if(C.Type==null||C.Type.toLowerCase()=="default"){A=this._createDefaultCachingDelegate(C)}else{if(C.Type.toLowerCase()=="clear"){A=this._createClearingCachingDelegate(C)}}this[C.Name]=new Delegate(this,function(){var E=new WebserviceInvocation(B,D,arguments);E.init();A(E,E.getValueArguments());if(!E.isExecuted()){E.proceed()}})},emptyForMethodListString:function(A){if(A){if(A.toLowerCase()=="all"){this._cache.empty()}else{this._cache.emptyForMethodListString(A)}}}};var FollowMe=new Process();FollowMe._title="FollowMe 3.0";FollowMe._version="FollowMe3-1.3.3.9";FollowMe.getVersion=function(){return FollowMe._version};FollowMe._isLoaded=false;FollowMe.setFinishedLoading=function(){FollowMe._isLoaded=true};FollowMe._isExport=false;FollowMe.getIsExport=function(){return FollowMe._isExport};FollowMe.setIsExport=function(){FollowMe._isExport=true};FollowMe._findUnreadCountInterval=null;FollowMe.setHelpUrl=function(A){if(A==""||A==null){A="http://ict.aps.nl/fm3/help/handleiding.htm"}FollowMe._mainWindow.setHelpUrl(A)};FollowMe._view=null;FollowMe._user=null;FollowMe.getUser=function(){return FollowMe._user};FollowMe._portfolioUser=null;FollowMe.getPortfolioUser=function(){if(!FollowMe.getIsExport()){return FollowMe._portfolioUser}else{return FollowMe._user}};FollowMe.setPortfolioUser=function(A){FollowMe._portfolioUser=A};FollowMe._currentRole=null;FollowMe._previousRole=null;FollowMe.setPreviousRole=function(A){FollowMe._previousRole=A};FollowMe.getPreviousRole=function(){return FollowMe._previousRole};FollowMe._roles=null;FollowMe.Roles={MeetingPoint:new Role("Meeting Point","label.user.meetingpoint"),Student:new Role("Student","label.user.student"),Teacher:new Role("Vakdocent","label.user.teacherrole"),Coach:new Role("Coach","label.user.coachrole"),Admin:new Role("Admin","label.user.schooladmin"),Supervisor:new Role("Supervisor","label.user.supervisor"),Visitor:new Role("Visitor"),Parent:new Role("Parent","label.user.parent")};FollowMe.getUserRoles=function(){if(FollowMe._user==null){throw new IllegalStateException("Can't retrieve user roles when user not set")}if(FollowMe._roles!=null){return FollowMe._roles}FollowMe._roles=[];switch(FollowMe._user.UserType.Id){case UserType.MP.Id:FollowMe._roles.push(FollowMe.Roles.MeetingPoint);return FollowMe._roles;case UserType.STUDENT.Id:FollowMe._roles.push(FollowMe.Roles.Student);break;case UserType.TEACHER.Id:FollowMe._roles.push(FollowMe.Roles.Teacher);if(this._user.Department!=null){FollowMe._roles.push(FollowMe.Roles.Coach)}break;case UserType.ADMIN.Id:FollowMe._roles.push(FollowMe.Roles.Admin);break;case UserType.SUPERVISOR.Id:FollowMe._roles.push(FollowMe.Roles.Supervisor);break;case UserType.PARENT.Id:FollowMe._roles.push(FollowMe.Roles.Parent);break;default:break}if(FollowMe._user.IsMeetingPoint&&FollowMe.Settings.get("part.general.meetingpoint")=="1"){FollowMe._roles.push(FollowMe.Roles.MeetingPoint)}return FollowMe._roles};FollowMe.getCurrentRole=function(){if(FollowMe._currentRole==null){FollowMe._currentRole=FollowMe.getUserRoles()[0]}return FollowMe._currentRole};FollowMe.setCurrentRole=function(A){if(A!=FollowMe._currentRole){FollowMe._previousRole=FollowMe._currentRole;FollowMe._currentRole=A}};FollowMe._mainWindow=null;FollowMe.getMainWindow=function(){return this._mainWindow};FollowMe.getQueryString=function(){return this._mainWindow.getQueryString()};FollowMe.navigate=function(A){FollowMe.setLocation(A);this._mainWindow.continueRender()};FollowMe.setLocation=function(A){if(A){document.location.href="#/"+A}};FollowMe._acceptedTypes=null;FollowMe.main=function(){FollowMe._view=new FollowMeView(this);FollowMe._view.init(document.body);FollowMe.Settings=new Settings();if(!FollowMe.getIsExport()){var A=new LoadingProxyFactory();FollowMe.SettingService=FollowMe._wrapWebservice(SettingWebService,A);FollowMe.SchoolService=FollowMe._wrapWebservice(SchoolWebService,A);FollowMe.UserService=FollowMe._wrapWebservice(UserWebService,A);var B=A.create(SettingWebService);B.loadingEvent.addHandler(FollowMe._onWebserviceLoad);B.loadingFinishedEvent.addHandler(FollowMe._onWebserviceLoadFinished);B.loadingFailedEvent.addHandler(FollowMe._onWebserviceLoadFailed)}else{FollowMe.SettingService=SettingWebService;FollowMe.SchoolService=SchoolWebService;FollowMe.UserService=UserWebService}FollowMe.Settings.setWebService(FollowMe.SettingService);FollowMe.loadPreLogin()};FollowMe.useCache=true;FollowMe._wrapWebservice=function(B,A){var C;if(FollowMe.useCache&&FollowMe.CacheConfiguration[B.__typeName]){C=new CachedWebserviceProxy(B,FollowMe.CacheConfiguration[B.__typeName]);C.resolve()}return A.create(C||B)};FollowMe.loadWebservices=function(){if(!FollowMe.getIsExport()){var A=new LoadingProxyFactory();FollowMe.ApplicationGroupService=FollowMe._wrapWebservice(ApplicationGroupWebService,A);FollowMe.ApplicationService=FollowMe._wrapWebservice(ApplicationWebService,A);FollowMe.AssessmentService=FollowMe._wrapWebservice(AssessmentWebService,A);FollowMe.AssignmentService=FollowMe._wrapWebservice(AssignmentWebService,A);FollowMe.CertificateService=FollowMe._wrapWebservice(CertificateWebService,A);FollowMe.CollectionService=FollowMe._wrapWebservice(CollectionWebService,A);FollowMe.DepartmentService=FollowMe._wrapWebservice(DepartmentWebService,A);FollowMe.ExportService=FollowMe._wrapWebservice(ExportWebService,A);FollowMe.FavoriteService=FollowMe._wrapWebservice(FavoriteWebService,A);FollowMe.FileLabelService=FollowMe._wrapWebservice(FileLabelWebService,A);FollowMe.FileSystemService=FollowMe._wrapWebservice(FileSystemWebService,A);FollowMe.GradeService=FollowMe._wrapWebservice(GradeWebService,A);FollowMe.GuestbookEntryService=FollowMe._wrapWebservice(GuestbookEntryWebService,A);FollowMe.LineService=FollowMe._wrapWebservice(LineWebService,A);FollowMe.MessageService=FollowMe._wrapWebservice(MessageWebService,A);FollowMe.ProofService=FollowMe._wrapWebservice(ProofWebService,A);FollowMe.RatingService=FollowMe._wrapWebservice(RatingWebService,A);FollowMe.ClassService=FollowMe._wrapWebservice(ClassWebService,A);FollowMe.SubjectService=FollowMe._wrapWebservice(SubjectWebService,A);for(var B in FollowMe){if(B.length>7&&B.indexOf("Service")==B.length-7){var C=FollowMe[B];if(C.loadingEvent){C.loadingEvent.addHandler(FollowMe._onWebserviceLoad);C.loadingFinishedEvent.addHandler(FollowMe._onWebserviceLoadFinished);C.loadingFailedEvent.addHandler(FollowMe._onWebserviceLoadFailed)}}}}else{FollowMe.ApplicationGroupService=ApplicationGroupWebService;FollowMe.ApplicationService=ApplicationWebService;FollowMe.AssessmentService=AssessmentWebService;FollowMe.AssignmentService=AssignmentWebService;FollowMe.CertificateService=CertificateWebService;FollowMe.CollectionService=CollectionWebService;FollowMe.DepartmentService=DepartmentWebService;FollowMe.FavoriteService=FavoriteWebService;FollowMe.GradeService=GradeWebService;FollowMe.LineService=LineWebService;FollowMe.MessageService=MessageWebService;FollowMe.ProofService=ProofWebService;FollowMe.RatingService=RatingWebService}};FollowMe._onWebserviceLoad=function(A){if(FollowMe._mainWindow){FollowMe._mainWindow.loadingEventHandler(A)}};FollowMe._onWebserviceLoadFinished=function(A){if(FollowMe._mainWindow){FollowMe._mainWindow.loadFinishedEventHandler(A)}};FollowMe._onWebserviceLoadFailed=function(A){if(FollowMe._mainWindow){FollowMe._mainWindow.loadFailedEventHandler(A)}};FollowMe.loadPreLogin=function(){var A=1;FollowMe.Settings.setSchoolId(A);FollowMe.Settings.prefetch("layout.schoollogo",FollowMe.getThread(function(){}).getDelayedThreadStart());FollowMe._onThreadsComplete(new Delegate(FollowMe,FollowMe.schoollogoLoaded))};FollowMe.schoollogoLoaded=function(){FollowMe.showMainWindow()};FollowMe.showMainWindow=function(){jQuery(".preloadedContent").hide();FollowMe._mainWindow=FollowMe.getProcess(null,MainWindow);FollowMe._view.createContainer();FollowMe._mainWindow.show(FollowMe._view.getContainer())};FollowMe.continueRenderMainWindow=function(A){FollowMe._mainWindow.showWaitingMessage("U wordt ingelogd in FollowMe3. Even geduld alstublieft...");FollowMe._user=A;FollowMe.Settings.setSchoolId(FollowMe.getUser().School.Id);if(FollowMe.getUser().UserType.Id==UserType.STUDENT.Id){FollowMe.Settings.setDepartmentId(FollowMe.getUser().Department.Id)}else{FollowMe.Settings.setDepartmentId(null)}FollowMe.Settings.setUserId(FollowMe.getUser().Id);FollowMe.Settings.prefetchGroups(["gui.*","label.*","form.*","part.*","score.*","layout.*","xml.*"],FollowMe.getThread(function(){}));FollowMe._onThreadsComplete(new Delegate(FollowMe,FollowMe.continueRenderAfterSettingsLoaded))};FollowMe.loadExtraScripts=function(){if(FollowMe._isLoaded==false){var A=FollowMe.getThread(function(){}).getDelayedThreadStart();jQuery.getScript("fm3-2.js",A)}};FollowMe.continueRenderAfterSettingsLoaded=function(){FollowMe.loadWebservices();FollowMe._mainWindow.setTabButtonResolver(FollowMe.getTabButtonResolver());FollowMe._mainWindow.continueRender();if(!FollowMe.getIsExport()){FollowMe.checkForNewMessages();FollowMe._findUnreadCountInterval=setInterval(FollowMe.checkForNewMessages,60000)}jQuery(".preloadedContent").hide()};FollowMe.showSettingsEnvironment=function(){FollowMe._mainWindow.switchTabButtons(FollowMe.getSettingsTabButtonResolver())};FollowMe.getTabButtonResolver=function(){if(FollowMe.getIsExport()){return new PortfolioExportTabButtonResolver()}switch(FollowMe.getCurrentRole()){case FollowMe.Roles.Student:return new StudentTabButtonResolver();case FollowMe.Roles.Coach:return new CoachTabButtonResolver();case FollowMe.Roles.Teacher:return new TeacherTabButtonResolver();case FollowMe.Roles.MeetingPoint:return new MPTabButtonResolver();case FollowMe.Roles.Admin:return new AdminTabButtonResolver();case FollowMe.Roles.Supervisor:return new SupervisorTabButtonResolver();case FollowMe.Roles.Visitor:return new VisitorTabButtonResolver();case FollowMe.Roles.Parent:return new ParentTabButtonResolver();default:return new FollowMeTabButtonResolver()}return{}};FollowMe.getSettingsTabButtonResolver=function(){switch(FollowMe.getCurrentRole()){case FollowMe.Roles.Student:return new StudentSettingsTabButtonResolver();case FollowMe.Roles.Teacher:return new TeacherSettingsTabButtonResolver();case FollowMe.Roles.Coach:return new CoachSettingsTabButtonResolver();case FollowMe.Roles.Parent:return new ParentSettingsTabButtonResolver();default:return{}}return{}};FollowMe.registerDropArea=function(D,F,E){if(F==null||typeof (F)!="function"){throw new IllegalArgumentException("The callBack must be of type 'function'.")}if(!(E instanceof Array)){throw new IllegalArgumentException("The acceptedTypes must be an instance of 'Array'.")}var C={activeClass:"droppable-active",hoverClass:"droppable-hover",drop:function(G,H){F(H.draggable[0].classType,H.draggable[0].classInstance)}};var B="";if(E&&E.length>0){for(var A=0;A<E.length;A++){B+="."+E[A]+((A<(E.length-1))?", ":"")}}else{B=".block"}C.accept=B;$(D).droppable(C);$(D).addClass("drop")};FollowMe._messageTabButton=null;FollowMe.setMessageTabButton=function(A){FollowMe._messageTabButton=A};FollowMe._newMessagesQuantityNewCount=0;FollowMe._newMessagesQuantityLastCount=0;FollowMe._isFirstCheck=true;FollowMe.processNewMessagesQuantity=function(A){FollowMe._newMessagesQuantityNewCount=A;var B="Berichten";if(FollowMe._newMessagesQuantityNewCount>0){B+=" ("+FollowMe._newMessagesQuantityNewCount+")"}if(FollowMe._newMessagesQuantityNewCount!=FollowMe._newMessagesQuantityLastCount){FollowMe._newMessagesQuantityLastCount=FollowMe._newMessagesQuantityNewCount;FollowMe._messageTabButton.notify();if(!FollowMe._isFirstCheck&&FollowMe._mainWindow.getCurrentTab().getSystemName()=="messages"){FollowMe.onnewmessagesquantitychanged()}FollowMe._isFirstCheck=false}if(FollowMe._newMessagesQuantityNewCount>0){FollowMe._messageTabButton.setTitle(B);FollowMe._mainWindow._view.renderTabButtons()}};FollowMe.checkForNewMessages=function(){var C=FollowMe.getUser().Id;var B=FollowMe.getThread(function(E){FollowMe.processNewMessagesQuantity(E)});var D=B.getDelayedThreadStart();var A=FollowMe.getThread(function(){clearInterval(FollowMe._findUnreadCountInterval)}).getThreadStart();FollowMe.MessageService.FindUnreadCount(C,D,A)};FollowMe.decrementUnreadMessagesCount=function(){FollowMe._adjustMessageCount(-1)};FollowMe.incrementUnreadMessagesCount=function(){FollowMe._adjustMessageCount(1)};FollowMe._adjustMessageCount=function(A){FollowMe._newMessagesQuantityNewCount+=A;FollowMe._newMessagesQuantityLastCount+=A;var B="Berichten";if(FollowMe._newMessagesQuantityLastCount!=0){B+=" ("+FollowMe._newMessagesQuantityNewCount+")"}FollowMe._messageTabButton.setTitle(B);FollowMe._mainWindow._view.renderTabButtons()};FollowMe.onnewmessagesquantitychanged=function(){};FollowMe.stop=function(){jQuery("body").empty();FollowMe.EventHandler.dispose();Process.prototype.stop.call(this)};FollowMe.alert=function(A){FollowMe._view.alert(A)};FollowMe.info=function(A){FollowMe._view.info(A)};FollowMe.error=function(A){FollowMe._view.error(A)};function FollowMeView(A){this._controller=A}FollowMeView.prototype={_container:null,createContainer:function(){this._container=new Container();this._container.init(this._clientArea)},getContainer:function(){return this._container},unload:function(){this._container=null},alert:function(A,B){this._okDialog(A,"Waarschuwing","warning",B)},info:function(A,B){this._okDialog(A,"Info","info",B)},error:function(A,B){this._okDialog(A,"Fout","error",B)},_okDialog:function(A,D,C,E){if(this._okDialogArea==null){this._okDialogArea=this.createElement("div",this._container.getClientArea());this._okDialogArea.style.display="none";jQuery(this._okDialogArea).dialog({title:D,autoOpen:false,modal:true,buttons:{OK:function(){$(this).dialog("close");if(typeof (E)=="function"){E()}}}})}FollowMe.Browser.removeAllChilds(this._okDialogArea);jQuery(this._okDialogArea).dialog("open");FollowMe.ImageLib.createDiv(C,32,this._okDialogArea);var B=this.createElement("div",this._okDialogArea);B.style.padding="5px";B.style.marginLeft="37px";B.innerHTML=A}};FollowMeView.extend(View);FollowMe.CacheConfiguration={ApplicationWebService:[{Name:"FindById,FindByStudentId,FindByAssignmentId",Type:"default"},{Name:"Persist,Remove,RemoveById,SetApplicationState",Type:"clear",For:"all",Cascade:[{Service:"AssignmentService",For:"all"},{Service:"ApplicationGroupService",For:"all"},{Service:"CollectionService",For:"all"}]}],ApplicationGroupWebService:[{Name:"FindByAssignmentId,FindById",Type:"default"},{Name:"Persist,Remove",Type:"clear",For:"all",Cascade:[{Service:"AssignmentService",For:"all"},{Service:"ApplicationService",For:"all"}]}],AssignmentWebService:[{Name:"FindAllForSchoolId,FindById,FindActiveForStudentId,FindForSupervisor,FindHeaderInformationForStudent,FindTasksForAssignment",Type:"default"},{Name:"PersistTask,Persist,Remove,RemoveTask",Type:"clear",For:"all",Cascade:[{Service:"ApplicationService",For:"all"},{Service:"ApplicationGroupService",For:"all"}]}],AssessmentWebService:[{Name:"FindAllForStudent,FindCurrentUnfinishedAssessmentByStudentId",Type:"default"},{Name:"FinishAssessment",Type:"clear",For:"all",Cascade:[{Service:"LineService",For:"all"},{Service:"RatingService",For:"all"},{Service:"GradeService",For:"all"},{Service:"CertificateService",For:"all"}]}],CertificateWebService:[{Name:"FindCertificatesByDepartmentId,FindCertificatesByStudentId",Type:"default"}],CollectionWebService:[{Name:"FindByParentUser,FindFolderTreeByUserId",Type:"default"},{Name:"PersistFile,PersistFolder,PersistHyperLink,PersistRichText",Type:"clear",For:"all",Cascade:[]}],DepartmentWebService:[{Name:"FindBySchoolId",Type:"default"}],GradeWebService:[{Name:"FindGradesAndTestByStudentIdAndDepartmentId,FindSubjectsByDepartmentId,FindSubjectsByTeacherIsAndDepartmentId,FindDefiniteSubjectsByStudentId,FindDefiniteGradesAndTestByStudentId,FindTentativeSubjectsByStudentId,FindTentativeGradesAndTestByStudentId",Type:"default"},{Name:"PersistGrade,PersistTest,RemoveGrade,RemoveTest",Type:"clear",For:"all",Cascade:[]}],LineWebService:[{Name:"FindCurrentLevelByLineIdAndStudentId,FindLevelsBySchoolId,FindLinesByUserId,FindStatusesForStudentByTeacherIdAndDepartmentId,FindAllWithDepartments",Type:"default"},{Name:"AddLineToTeacherDepartment,RemoveLineFromTeacherDepartment",Type:"clear",For:"all",Cascade:[]}],ProofWebService:[{Name:"FindAllAcceptedByStudentIdAndAssessmentId,FindLastAcceptedByStudentIdAndAssessmentId",Type:"default"},{Name:"Persist",Type:"clear",For:"all",Cascade:[{Service:"CollectionService",For:"all"}]}],RatingWebService:[{Name:"FindAllRecentDefiniteRatingsByStudentId,FindAssessmentRatingsByStudentId,FindCommentsOfAssessmentByStudentId,FindCurrentAssessmentRatingsFromOthers,FindCurrentDefiniteRatingForStudent",Type:"default"},{Name:"Persist",Type:"clear",For:"all",Cascade:[{Service:"AssessmentService",For:"all"},{Service:"LineService",For:"all"}]}],UserWebService:[{Name:"FindById",Type:"default"}]};function MainWindow(){}MainWindow.prototype={_view:null,_title:null,_currentTab:null,_disclaimerModule:null,_activityMonitor:null,_urlSelector:null,getQueryString:function(){return this._urlSelector},_bannerTitleIsEditable:true,getBannerTitleIsEditable:function(){return this._bannerTitleIsEditable},setBannerTitleIsEditable:function(A){this._bannerTitleIsEditable=A},_tabButtons:null,_windowStyle:null,_parentsStudents:null,_currentTabProcess:null,_tabButtonResolver:null,setTabButtonResolver:function(A){if(!(A instanceof AbstractTabButtonResolver)){throw new IllegalArgumentException("Argument 'tabButtonResolver' must be an instance of 'AbstractTabButtonResolver'")}this._tabButtonResolver=A},_init:function(){this._view=new MainWindowView(this);this._title="FollowMe 3.0";this._currentTab=null},_load:function(){},_parseLocationHash:function(A){if(A==null||typeof (A)!="string"){throw new IllegalArgumentException("The hash must be of type 'string'.")}return A.substring(2).split("/")},render:function(){this._view.renderLayout();var A=this.getProcess(null,Login);A.setWindowStyle(WindowStyle.MODULE);A.show(this._view.getCenteredContainer());this._renderActivityMonitor();this._view.renderPopupInBackground();this._view.renderLoginTitleBanner()},_renderActivityMonitor:function(){if(this._activityMonitor!=null){return }this._activityMonitor=this.getProcess(null,ActivityMonitor);this._activityMonitor.show(this._view.getActivityMonitorContainer())},loadingEventHandler:function(A){if(this._activityMonitor){this._activityMonitor.loadingEventHandler(A)}},loadFinishedEventHandler:function(A){if(this._activityMonitor){this._activityMonitor.loadFinishedEventHandler(A)}},loadFailedEventHandler:function(A){if(this._activityMonitor){this._activityMonitor.loadFailedEventHandler(A)}},renderDisclaimer:function(){if(this._disclaimerModule!=null){return }this._disclaimerModule=this.getProcess(null,Disclaimer);this._disclaimerModule.setWindowStyle(WindowStyle.MODULE);this._view.addDisclaimer()},continueRender:function(){var A=FollowMe.getUser();var F=this._getTitleUsername(A);var C=A.School;var E=A.HomeTitle;this._view.renderTitleBanner(E,F,C);this.renderDisclaimer();if(A.UserType.Id==UserType.PARENT.Id&&this._parentsStudents==null){var D=this.getThread(function(G){this._setParentsStudents(G)});var B=D.getDelayedThreadStart();FollowMe.UserService.FindStudentsByParentId(A.Id,B)}else{this._rerenderTabButtons()}},_getTitleUsername:function(A){switch(A.UserType.Id){case UserType.SUPERVISOR.Id:return A.UserName;default:return Format.userToFullName(A)}},_rerenderTabButtons:function(){this._loadTabButtons();this._view.renderTabButtons();this._showTab()},_showTab:function(){if(this._currentTabProcess!=null){this._currentTabProcess.stop();this._onThreadsComplete(new Delegate(this,function(){this._currentTabProcess=null;this._showTab()}))}else{this._currentTabProcess=this.getProcess(null,this._currentTab.getBaseTabType());this._view.renderTab(this._currentTabProcess)}},_setParentsStudents:function(A){this._parentsStudents=A;if(this._parentsStudents!=null&&this._parentsStudents.length>0){if(FollowMe.getPortfolioUser()==null){this.switchPortfolio(A[0])}this._view.createDropdownParentsStudentsSelector()}},_loadTabButtons:function(){this._currentTab=this._getCurrentTabFromUrl();if(this._currentTab==null){this._currentTab=this._tabButtonResolver.getDefaultTabButton();FollowMe.setLocation("")}for(var A=this._tabButtons.length-1;A>=0;A--){if(this._tabButtons[A].getSystemName()=="messages"){var B=this._tabButtons[A];FollowMe.setMessageTabButton(B);break}}this._currentTab.getView().setSelected(true)},_getCurrentTabFromUrl:function(){var C=null;this._urlSelector=this._parseLocationHash(window.location.hash);this._tabButtons=this._tabButtonResolver.getTabButtons();if(this._urlSelector!=null&&this._urlSelector.length>0&&this._urlSelector[0].toLowerCase()!=""){var B=this._urlSelector[0].toLowerCase();try{C=this._tabButtonResolver.getTabButtonByName(B)}catch(A){C=null}}return C},loadApp:function(){},unload:function(){},dispose:function(){delete this._view},setWindowStyle:function(A){if(A!=WindowStyle.CHROMELESS&&A!=WindowStyle.MODULE){throw new IllegalArgumentException("The 'windowStyle' argument must be a reference to the WindowStyle.CHROMELESS or WindowStyle.MODULE constants.")}this._windowStyle=A},getWindowStyle:function(){return this._windowStyle},getTabs:function(){return this._tabButtons},getCurrentTab:function(){return this._currentTab},getTitleEventHandler:function(A){if(A){return this.getClonedThreadStart(this._enableTitleEdit)}else{return this.getClonedThreadStart(this._disableTitleEditAndSave)}},_enableTitleEdit:function(){this._view.toggleTitleEdit(true)},_disableTitleEditAndSave:function(){this._view.toggleTitleEdit(false);if((FollowMe.getCurrentRole()!=FollowMe.Roles.Visitor)&&this._bannerTitleIsEditable){var A=FollowMe.getUser();A.HomeTitle=this._view.getTitle();FollowMe.UserService.Persist(A)}},getTabSelectedEventHandler:function(A){if(!(A instanceof TabButton)){throw new IllegalArgumentException("Argument 'tab' argument must be an instance of 'TabButton'.")}return new Delegate(this,function(){this._selectTab(A)})},_selectTab:function(A){this._view.deSelectTab(this._currentTab);this._currentTab=A;FollowMe.setHelpUrl(this._currentTab.getHelpUrl());this._currentTab.selectTab()},getTabHoverEventHandler:function(A){if(!(A instanceof TabButton)){throw new IllegalArgumentException("The 'tab' argument must be an instance of 'TabButton'.")}return this.getClonedThreadStart(function(B){A.getView().mouseOver()})},getTabMouseOutEventHandler:function(A){if(!(A instanceof TabButton)){throw new IllegalArgumentException("The 'tab' argument must be an instance of 'TabButton'.")}return this.getClonedThreadStart(function(B){A.getView().mouseOut()})},changeRole:function(A){if(A==null){throw new IllegalArgumentException("Argument 'role' must be supplied")}FollowMe.setCurrentRole(A)},switchRole:function(B){this.changeRole(B);var A=FollowMe.getTabButtonResolver();this.setTabButtonResolver(A);this._rerenderTabButtons()},switchPortfolio:function(A){if(A!=FollowMe.getPortfolioUser()){FollowMe.setPortfolioUser(A);this._rerenderTabButtons()}},visitUser:function(A){this._switchEnvironment(A,FollowMe.Roles.Visitor)},switchTabButtons:function(A){this.setTabButtonResolver(A);this._rerenderTabButtons()},getBannerLogoClickHandler:function(){return new Delegate(this,this._bannerLogoClick)},_bannerLogoClick:function(){if(FollowMe.getCurrentRole()==FollowMe.Roles.Visitor){this._exitPortfolio()}else{this._toggleSettingsEnvironment()}},_exitPortfolio:function(){user=FollowMe.getUser();this._switchEnvironment(user,FollowMe.getPreviousRole())},_toggleSettingsEnvironment:function(){this._view.toggleBannerLogo()},_switchEnvironment:function(A,B){if(A==null){throw new IllegalArgumentException("Argument 'user' must be supplied and cannot be null.")}if(B==FollowMe.Roles.Visitor){FollowMe.setPortfolioUser(A)}else{FollowMe.setPortfolioUser(null)}this.changeRole(B);if(FollowMe.getPreviousRole()==FollowMe.Roles.Visitor){FollowMe.setLocation("others")}else{FollowMe.setLocation("profile")}this._view.setBannerValuesForUser(A)},getParentsStudents:function(){return this._parentsStudents},showDisclaimer:function(A){var B=this._view.showDisclaimerPopup();this._disclaimerModule.show(B);FollowMe.EventHandler.add(this._view.getBackgroundCover(),"click",new Delegate(this,this._closePopup))},_closePopup:function(A){this._view.hideDisclaimerPopup()},setHelpUrl:function(A){this._view.setHelpUrl(A)},clear:function(){this._view.clearApplicationContainer()},showWaitingMessage:function(A){this._view.showWaitingMessage(A)}};MainWindow.extend(FormsApplication);function MainWindowView(A){if(!(A instanceof MainWindow)){throw new IllegalArgumentException("The controller must be an instance of 'MainWindow'.")}this._controller=A}MainWindowView.prototype={_applicationContainer:null,_headerArea:null,_footerArea:null,_tabArea:null,_applicationAreaBox:null,_applicationArea:null,_bannerLogoUrl:null,_titleBanner:null,_titleEditArea:null,_titleEditAreaFocus:false,_bannerUsernameArea:null,_bannerLogoArea:null,_title:"",_bannerDropdownSelectDiv:null,_bannerDropdownSelect:null,_DEFAULT_SCHOOL_LOGO:"Images/icons/48x48/blackboard_gears.png",setBannerLogoUrl:function(A){this._bannerLogoUrl=A},_helpLink:null,getBackgroundCover:function(){return this._backgroundCover},renderLayout:function(){this._clientArea.parentNode.parentNode.style.padding="0px";if(this._clientArea.parentNode.parentNode.tagName.toLowerCase()=="body"){this._clientArea.parentNode.className="mainWindowAreaParentNode";this._clientArea.parentNode.parentNode.className="mainWindowAreaParentNodeParentNode";document.getElementsByTagName("html")[0].style.height="100%"}this._clientArea.className="mainWindowArea floatL";this._clientArea.id="mainWindowArea";this._renderHeader();this._renderTabHeader();this._renderApplicationArea();this._initApplicationContainer();this._renderFooter()},_renderHeader:function(){this._headerArea=this.createElement("div",this._clientArea);this._headerArea.style.height="30px";this._headerArea.style.backgroundImage="url(Images/Topbar_Back.png)";this._headerArea.style.backgroundRepeat="repeat-x"},_renderFooter:function(){this._footerArea=this.createElement("div",this._clientArea);this._footerArea.className="footerArea";var A=this.createElement("span",this._footerArea);A.innerHTML=FollowMe.getVersion();FollowMe.Browser.addClass(A,"version")},getActivityMonitorContainer:function(){var B=this.createElement("div",this._clientArea);B.className="ActivityMonitor";var A=new Container();A.init(B);return A},addDisclaimer:function(){var B=this.createElement("span",this._footerArea);B.innerHTML="&nbsp;-&nbsp;";FollowMe.Browser.addClass(B,"seperator");var A=this.createElement("a",this._footerArea);A.innerHTML="Disclaimer";FollowMe.Browser.addClass(A,"disclaimer");FollowMe.Browser.setHandCursor(A);FollowMe.EventHandler.add(A,"click",new Delegate(this._controller,this._controller.showDisclaimer))},_renderTabHeader:function(){this._tabArea=this.createElement("div",this._clientArea);this._tabArea.className="mainTabMenu"},renderTabButtons:function(){FollowMe.Browser.removeAllChilds(this._tabArea);var C=this._controller.getTabs();var D=25;for(var A=0;A<C.length;A++){var F=C[A];F.setAllowColorChange(!FollowMe.getIsExport());F.tabColorChangedEvent.addHandler(new Delegate(this,this._switchApplicationAreaColor));tabColor=F.getActiveTabColor();var E=this.createElement("div",this._tabArea);E.style.color=F.getTabTextColor();E.className="mainTab floatL";E.style.backgroundColor=tabColor;if(this._controller.getCurrentTab()==F){FollowMe.Browser.addClass(E,TabButtonView.SELECTED_CLASS);this._applicationAreaBox.style.backgroundColor=tabColor}else{FollowMe.Browser.addClass(E,TabButtonView.UNSELECTED_CLASS)}var B=this.createElement("div",E);B.innerHTML=F.getTitle();F.getView().setTabArea(E);F.getView().setTabName(B);E.style.position="absolute";E.style.left=D+"px";D+=(E.offsetWidth+10);FollowMe.Browser.setHandCursor(E);FollowMe.EventHandler.add(E,"click",this._controller.getTabSelectedEventHandler(F));FollowMe.EventHandler.add(E,"mouseover",this._controller.getTabHoverEventHandler(F));FollowMe.EventHandler.add(E,"mouseout",this._controller.getTabMouseOutEventHandler(F))}},_switchApplicationAreaColor:function(A){this._applicationAreaBox.style.backgroundColor=A.primary},_renderApplicationArea:function(){this._applicationAreaBox=this.createElement("div",this._clientArea);this._applicationAreaBox.className="applicationAreaBox";this._applicationAreaBox.style.zIndex=FollowMe.Browser.zIndexes.high;this._applicationAreaBox.id="applicationArea";this._applicationArea=this.createElement("div",this._applicationAreaBox);FollowMe.Browser.addClass(this._applicationArea,"applicationArea")},_initApplicationContainer:function(){this._applicationContainer=new Container();this._applicationContainer.init(this._applicationArea)},selectTab:function(A){if(!(A instanceof TabButton)){throw new IllegalArgumentException("The 'tab' argument must be an instance of 'TabButton'.")}A.selectTab()},deSelectTab:function(A){if(!(A instanceof TabButton)){throw new IllegalArgumentException("The 'tab' argument must be an instance of 'TabButton'.")}A.deSelectTab()},renderTab:function(A){if(!(A instanceof Process)){throw new IllegalArgumentException("The 'app' argument must be an instance of 'Process'.")}this._applicationContainer.clear();A.show(this._applicationContainer)},getCenteredContainer:function(){var C=this.createElement("div",this._applicationArea);C.className="centeredDiv";C.style.zIndex=FollowMe.Browser.zIndexes.high;var B=FollowMe.Browser.getWindowWidth()/2;C.style.left=(B-(150))+"px";var D=(this._applicationAreaBox.offsetHeight/2);C.style.top=(D-(110))+"px";FollowMe.Browser.addClass(C,"centeredDiv");var A=new Container();A.init(C);return A},renderLoginTitleBanner:function(){if(this._titleBanner!=null){return }this._bannerLogoUrl=this._getLogoFile();this._showLogo()},renderTitleBanner:function(D,E,B){if(this._titleBanner!=null){return }if(this._applicationAreaBox!=null){FollowMe.Browser.addClass(this._applicationAreaBox,"applicationAreaBox");this._applicationAreaBox.style.backgroundColor="#FFFFFF"}this._bannerLogoUrl=this._getLogoFile();if(!FollowMe.getIsExport()){var A=this.createElement("div",this._headerArea);A.className="logoutArea floatL";var C=this.createElement("div",A);C.title="Uitloggen";C.className="icon24x24";FollowMe.Browser.setPng(C,"Images/icons/24x24/exit.png");FollowMe.EventHandler.add(C,"click",function(){window.location.reload(false)});FollowMe.Browser.setHandCursor(C)}this._bannerUsernameArea=this.createElement("div",this._headerArea);this._bannerUsernameArea.className="bannerUsernameArea floatL";this._titleBanner=this.createElement("div",this._headerArea);this._titleBanner.className="titleBanner floatL";if(!FollowMe.getIsExport()){this._titleEditArea=this.createElement("input",this._titleBanner)}else{this._titleEditArea=this.createElement("div",this._titleBanner)}this._titleEditArea.value=this._title;this._titleEditArea.tabIndex="-1";this._titleEditArea.className="titleEditArea titleEditArea_noselect";if(!FollowMe.getIsExport()){FollowMe.EventHandler.add(this._titleEditArea,"click",this._controller.getTitleEventHandler(true));FollowMe.EventHandler.add(this._titleEditArea,"blur",this._controller.getTitleEventHandler(false));this.createDropdownSelector();this._helpLink=this.createElement("a",this._headerArea);this._helpLink.href="http://ict.aps.nl/fm3/help/handleiding.htm";this._helpLink.target="_blank";this._helpLink.title="Help";this._helpLink.className="helpLink floatL";FollowMe.Browser.setPng(this._helpLink,"Images/icons/24x24/help2.png")}this._createLogo(FollowMe.Settings.get("label.menu.settings"));this.setTitle(D);this.setBannerUsername(E)},_createLogo:function(D){var C=[FollowMe.Roles.Teacher,FollowMe.Roles.Coach,FollowMe.Roles.Student,FollowMe.Roles.Parent,FollowMe.Roles.Visitor];this._showLogo();if(FollowMe.getIsExport()){return }var B=FollowMe.getCurrentRole();for(var A=0;A<C.length;A++){if(B===C[A]){this._bannerLogoArea.title=D;FollowMe.Browser.setHandCursor(this._bannerLogoArea);FollowMe.EventHandler.add(this._bannerLogoArea,"click",this._controller.getBannerLogoClickHandler())}}},_showLogo:function(){this._removeLogo();this._bannerLogoArea=this.createElement("div",this._headerArea);this._bannerLogoArea.className="bannerLogoArea icon48x48";this._bannerLogoArea.src=this._bannerLogoUrl;FollowMe.Browser.setPng(this._bannerLogoArea,this._bannerLogoUrl,null,null)},_removeLogo:function(){if(this._bannerLogoArea){this._headerArea.removeChild(this._bannerLogoArea);this._bannerLogoArea=null}},_getLogoFile:function(){var A=FollowMe.Settings.get("layout.schoollogo");if(A.length>0){if(!FollowMe.getIsExport()){return"webservice/FileDownload.aspx?GUID="+A}else{return"Files/"+A}}else{return this._DEFAULT_SCHOOL_LOGO}},createDropdownSelector:function(){if(FollowMe.getUser().UserType.Id==UserType.PARENT.Id){this.createDropdownParentsStudentsSelector()}else{this._createDropdownRoleSelector()}},createDropdownParentsStudentsSelector:function(){var A=this._headerArea;if(A==null){return }if(this._bannerDropdownSelectDiv!=null){FollowMe.Browser.removeNode(this._bannerDropdownSelectDiv)}var F=this._controller.getParentsStudents();if(F!=null&&F.length>=0){this._bannerDropdownSelectDiv=this.createElement("div",A);this._bannerDropdownSelectDiv.id="ParentsStudentsSelector";this._bannerDropdownSelectDiv.className="bannerDropdownSelectDiv floatL";var E=FollowMe.getPortfolioUser();this._bannerDropdownSelect=this.createElement("select",this._bannerDropdownSelectDiv);for(var B=0;B<F.length;B++){var D=F[B];var C=this.createElement("option",this._bannerDropdownSelect);C.value=B;C.text=Format.userToFullName(D);if(D.Id==E.Id){C.selected=true}}FollowMe.EventHandler.add(this._bannerDropdownSelect,"change",new Delegate(this,this._parentsStudentChanged))}},_createDropdownRoleSelector:function(){var A=this._headerArea;if(A==null){return }var D=FollowMe.getUserRoles();if(D.length>1){this._bannerDropdownSelectDiv=this.createElement("div",A);this._bannerDropdownSelectDiv.id="RoleSelector";this._bannerDropdownSelectDiv.className="_bannerDropdownSelectDiv floatL";var E=FollowMe.getCurrentRole();this._bannerDropdownSelect=this.createElement("select",this._bannerDropdownSelectDiv);for(var B=0;B<D.length;B++){var C=this.createElement("option",this._bannerDropdownSelect);C.value=B;C.text=D[B].getTitle();if(D[B]==E){C.selected=true}}FollowMe.EventHandler.add(this._bannerDropdownSelect,"change",new Delegate(this,this._roleChanged))}},setBannerUsername:function(A){if(this._titleBanner==null){throw new IllegalStateException("Before calling the setBannerUsername the renderTitleBanner method should be called first.")}this._bannerUsernameArea.innerHTML=A},setBannerValuesForUser:function(A){if(this._titleBanner==null){throw new IllegalStateException("Before calling the setBannerUsername the renderTitleBanner method should be called first.")}this.setBannerUsername(Format.userToFullName(A));this.toggleBannerLogo()},toggleBannerLogo:function(){var A=this._getLogoFile();if((FollowMe.getCurrentRole()==FollowMe.Roles.Visitor||this._bannerLogoUrl==A)){this.setBannerLogoUrl("images/icons/32x32/return.png");this._createLogo("Terug");if(FollowMe.getCurrentRole()==FollowMe.Roles.Visitor){this.backgroundHandle("dark_Green");this.setTitle(FollowMe.getPortfolioUser().HomeTitle);this._controller.setBannerTitleIsEditable(false);this._controller.switchTabButtons(FollowMe.getTabButtonResolver())}else{this._controller.setBannerTitleIsEditable(false);this.backgroundHandle("dark_Red");this.setTitle(FollowMe.Settings.get("label.menu.settings"));this._controller.switchTabButtons(FollowMe.getSettingsTabButtonResolver())}}else{this._controller.switchTabButtons(FollowMe.getTabButtonResolver());this.backgroundHandle("dark_Blue");this.setBannerLogoUrl(this._getLogoFile());this._controller.setBannerTitleIsEditable(true);this.setTitle(FollowMe.getUser().HomeTitle);this._createLogo(FollowMe.Settings.get("label.menu.settings"))}},getTitle:function(){return this._title},setTitle:function(A){if((FollowMe.getCurrentRole()!=FollowMe.Roles.Visitor)||this._controller.getBannerTitleIsEditable()){if(A==null||A==""){A=FollowMe.Settings.get("gui.text.motto")}this._titleEditArea.value=A}else{if(A==null){this._title=""}}this._title=A},_roleChanged:function(){if(FollowMe.getCurrentRole()==FollowMe.Roles.Visitor){this._controller._exitPortfolio()}var A=FollowMe.getUserRoles();var B=this._bannerDropdownSelect.selectedIndex;this._controller.switchRole(A[B]);this._bannerLogoUrl=this._getLogoFile();this._createLogo(this._bannerLogoArea.title);this.setTitle(FollowMe.getUser().HomeTitle);this.backgroundHandle("dark_Blue");this._controller.setBannerTitleIsEditable(true)},_parentsStudentChanged:function(){var B=this._controller.getParentsStudents();var A=this._bannerDropdownSelect.selectedIndex;this._controller.switchPortfolio(B[A])},toggleTitleEdit:function(A){if(FollowMe.getCurrentRole()==FollowMe.Roles.Visitor){if(A){this._titleEditArea.blur();return }else{return }}if(this._titleBanner==null){throw new IllegalStateException("Before calling the setBannerUsername the renderTitleBanner method should be called first.")}if(!this._controller.getBannerTitleIsEditable()){this._titleEditArea.blur();return }if(A){FollowMe.Browser.removeClass(this._titleEditArea,"titleEditArea_noselect");FollowMe.Browser.addClass(this._titleEditArea,"titleEditArea_select");this._titleEditArea.focus();this._titleEditAreaFocus=true}else{FollowMe.Browser.removeClass(this._titleEditArea,"titleEditArea_select");FollowMe.Browser.addClass(this._titleEditArea,"titleEditArea_noselect");this._titleEditAreaFocus=false;this.setTitle(this._titleEditArea.value)}},_popupContainer:null,_containerDiv:null,_backgroundCover:null,_disclaimerWidth:600,_disclaimerHeigth:300,renderPopupInBackground:function(){this._containerDiv=this.createElement("div");this._popupContainer=new Container();this._popupContainer.init(this._containerDiv);this._backgroundCover=this.createElement("div");this._backgroundCover.className="backgroundCover";this._backgroundCover.style.width=FollowMe.Browser.getWindowWidth()+"px";this._backgroundCover.style.height=FollowMe.Browser.getWindowHeight()+"px";this._backgroundCover.style.zIndex=FollowMe.Browser.zIndexes.min;FollowMe.Browser.setOpacity(this._backgroundCover,50);this._containerDiv.className="containerDiv";this._containerDiv.style.width=this._disclaimerWidth;this._containerDiv.style.height=this._disclaimerHeigth;this._containerDiv.style.left=((FollowMe.Browser.getWindowWidth()/2)-(this._disclaimerWidth/2))+"px";this._containerDiv.style.top=((FollowMe.Browser.getWindowHeight()/2)-(this._disclaimerHeigth/2))+"px";this._containerDiv.style.zIndex=FollowMe.Browser.zIndexes.min;FollowMe.Browser.setCaretPosition(this._containerDiv,this._containerDiv.style.top);this._clientArea.appendChild(this._backgroundCover);this._clientArea.appendChild(this._containerDiv)},showDisclaimerPopup:function(){this._backgroundCover.style.display="block";this._backgroundCover.style.zIndex=FollowMe.Browser.zIndexes.max;document.body.appendChild(this._backgroundCover);this._containerDiv.style.display="block";this._containerDiv.style.zIndex=this._backgroundCover.style.zIndex+1;document.body.appendChild(this._containerDiv);return this._popupContainer},hideDisclaimerPopup:function(){this._backgroundCover.style.display="none";this._containerDiv.style.display="none";this._backgroundCover.style.zIndex=FollowMe.Browser.zIndexes.min;this._containerDiv.style.zIndex=FollowMe.Browser.zIndexes.min;this._clientArea.appendChild(this._backgroundCover);this._clientArea.appendChild(this._containerDiv)},setHelpUrl:function(A){if(this._helpLink!=null){this._helpLink.href=A}},clearApplicationContainer:function(){this._applicationContainer.clear()},backgroundHandle:function(A){switch(A){case"dark_Green":this._headerArea.style.backgroundImage="url(Images/Topbar_Back_Green.png)";this._clientArea.style.backgroundColor="#003510";break;case"dark_Red":this._headerArea.style.backgroundImage="url(Images/Topbar_Back_Red.png)";this._clientArea.style.backgroundColor="#601414";break;case"dark_Blue":default:this._headerArea.style.backgroundImage="url(Images/Topbar_Back.png)";this._clientArea.style.backgroundColor="#002252";break}},showWaitingMessage:function(B){this.clearApplicationContainer();var A=jQuery("p.preloadedContent");if(typeof (B)=="string"){A.contents()[1].nodeValue=B}A.appendTo(jQuery(this._applicationArea)).show()}};MainWindowView.extend(View);function DragAndDrop(){}DragAndDrop.prototype={_container:null,getHandle:function(){return this._container},registerAsDND:function(D,G,F,C,J,E,A,B){this._container=C;F.classType=D;F.classInstance=G;var H={start:J,drag:E,stop:A};H.appendTo=C||F.parentNode;H.containment=C||".applicationAreaBox";for(var I in B){if(B.hasOwnProperty(I)){H[I]=B[I]}}$(F).draggable(H);$(F).addClass("block");if(D){$(F).addClass(D)}}};FollowMe.Browser={isSelectEnabled:true,zIndexes:{min:-100,lower:-10,low:-5,normal:0,high:5,higher:10,max:100,_highest:25,getHighest:function(){if((this._highest+1)<this.max){return ++this._highest}else{return this._highest}}},blank:"about:blank",setLocation:function(B,A,C){if(typeof (B)!="object"){return }B.style.left=A+"px";B.style.top=C+"px"},getWindowWidth:function(){if(document.documentElement.clientWidth){return document.documentElement.clientWidth}else{return document.body.clientWidth}},getInnerText:function(B){var A=B.innerText;if(A==undefined){A=B.textContent}return A},escapeHtml:function(A){A=A.replace(/\&/g,"&amp;");A=A.replace(/\</g,"&lt;");A=A.replace(/\>/g,"&gt;");return A},unEscapeHtml:function(A){A=A.replace(/\&gt;/g,">");A=A.replace(/\&lt;/g,"<");A=A.replace(/\&amp;/g,"&");return A},browserEvent:function(B){if(B&&B.Done){return B}var D=B||window.event;if(typeof (D)=="undefined"||D==null){return null}var A=D.target||D.srcElement;var C={Done:true,x:D.clientX,y:D.clientY,targetobject:A,keyCode:D.keyCode,extraParams:D.extraParams};return C},getWindowHeight:function(){return document.clientHeight||document.documentElement.clientHeight||document.body.clientHeight},openWindow:function(B,A){if(B.length==0){B=this.blank}return this.openSizedWindow(B,false,false,A)},openSizedWindow:function(C,A,D,B){var E;if(C.length==0){C=this.Blank}if(!B){B=""}if(!A||!D){E=window.open(C,B)}else{E=window.open(C,B,"width="+A+",height="+D)}if(E==null){alert("Een popup killer blokkeerde de popup!")}return E},setHandCursor:function(A){this.addClass(A,"handCursor")},isChildNode:function(B,C){if(B.hasChildNodes()){var A=C;while(A=A.parentNode){if(A==B){return true}}}return false},removeAllChilds:function(A){if(A==null){return }if(navigator.appVersion.indexOf("MSIE 6.")!=-1){while(A.hasChildNodes()){var B=A.firstChild;if(B.childNodes.length>0&&B.hasChildNodes()&&(!B.tagName||B.tagName.toLowerCase()!="select")){this.removeAllChilds(B)}A.removeChild(B)}}else{if((navigator.appVersion.indexOf("MSIE 7.")!=-1)||(navigator.appVersion.indexOf("MSIE 8.")!=-1)){A.innerHTML=""}else{A.innerHTML=null}}},removeNode:function(A){if(A.hasChildNodes()){FollowMe.Browser.removeAllChilds(A)}if(A.parentNode!=null){A.parentNode.removeChild(A)}},setOpacity:function(B,A){if(A<100){B.style.opacity=(A/100);B.style.MozOpacity=(A/100);B.style.KhtmlOpacity=(A/100);B.style.filter="alpha(opacity="+A+")"}else{B.style.opacity="";B.style.MozOpacity="";B.style.KhtmlOpacity="";B.style.filter=""}},setPng:function(D,C,B,A){if(D.style.filter==undefined||navigator.appVersion.indexOf("MSIE 7.")>-1){if(B==null){B=" no-repeat"}D.style.background="url("+C+")"+B}else{if(A==null){A=" sizingMethod='crop'"}D.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+C+"', "+A+")"}},setInputPng:function(B){if(B.style.filter==undefined||navigator.appVersion.indexOf("MSIE 7.")>-1){return }var A=B.src;B.src="Images/icons/transparentpixel.gif";B.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+A+"', sizingMethod='crop')"},enableSelect:function(){this.isSelectEnabled=true},disableSelect:function(){this.isSelectEnabled=false},setCaretPosition:function(B,C){if(B.setSelectionRange){B.focus();B.setSelectionRange(C,C)}else{if(B.createTextRange){var A=B.createTextRange();A.collapse(true);A.moveEnd("character",C);A.moveStart("character",C);A.select()}}},printElement:function(B,A){var D=document.getElementById("printArea");if(!D){D=document.createElement("div");D.id="printArea";document.body.appendChild(D);this._resetScrollHeight(D)}D.innerHTML=B.innerHTML;if(D.children&&A){$(D).find(".windowManager_windowContentContainer").css("position","absolute");$(D).find(".windowManager_windowContentContainer").css("width","180mm");$(D).find("table").css("table-layout","fixed")}var C=window.open("","","");C.document.write("<link rel='stylesheet' type='text/css' href='styles/fm3.css' />");C.document.write(D.innerHTML);C.document.close();C.print();if(C!=null){C.close()}},printElementAsPDF:function(C,B){var A=B||(FollowMe.getPortfolioUser()?FollowMe.getPortfolioUser().Id:FollowMe.getUser().Id);if(FollowMe.getIsExport()){C.href="Files\\rapport.pdf"}else{C.href="webservice/GetReport.aspx?StudentId="+A+"&PrintAsPDF=1"}C.target="_blank"},_resetScrollHeight:function(B){if(B.scrollHeight>B.offsetHeight){B.style.overflow="";B.style.height=""}for(var A=0;A<B.childNodes.length;A++){this._resetScrollHeight(B.childNodes[A])}},addClass:function(A,B){$(A).addClass(B)},removeClass:function(B,A){$(B).removeClass(A)}};FollowMe.EventHandler={_keyDown:"keydown",getKeyDown:function(){return this._keyDown},_keyUp:"keyup",getKeyUp:function(){return this._keyUp},_documentClick:"click",getDocumentClick:function(){return this._documentClick},_documentMouseUp:"mouseup",getDocumentMouseUp:function(){return this._documentMouseUp},_documentMouseDown:"mousedown",getDocumentMouseDown:function(){return this._documentMouseDown},_documentMouseMove:"mousemove",getDocumentMouseMove:function(){return this._documentMouseMove},_documentOnBeforeUnload:"beforeunload",getDocumentOnBeforeUnload:function(){return this._documentOnBeforeUnload},_wrappers:new Object(),getWrappers:function(){return this._wrappers},_objects:new Object(),getObjects:function(){return this._objects},_newWrapperId:1,add:function(F,C,G,E){if(!F||typeof (F)!="object"){F=this.getCorrObject(C)}if(!F){return null}if(!F.eventWrapper){this._wrappers[this._newWrapperId]=new EventWrapper(this._newWrapperId,F);this._newWrapperId++}var A=this._objects[C.toLowerCase()];if(A==null){A=new Array()}var D=false;for(var B=0;B<A.length;B++){if(A[B].eventWrapper.Id==F.eventWrapper.Id){D=true;break}}if(!D){A.push(F)}return F.eventWrapper.add(C,G,E)},exists:function(A,B){if(typeof (item)!="object"){return null}return(A&&A.eventWrapper&&A.eventWrapper[B]!=null)},remove:function(A,B){if(!A||typeof (A)!="object"){A=this.getCorrObject(A)}if(!A){return null}return A.eventWrapper.remove(B)},dispose:function(A){if(!A){for(var B in this._wrappers){if(this._wrappers[B]){this._wrappers[B].dispose();this._wrappers[B]=null}}}else{if(A.eventWrapper){A.eventWrapper.dispose();this._wrappers[A.eventWrapper._id]=null}}},getCorrObject:function(A){switch(A){case FollowMe.EventHandler.getKeyDown():case FollowMe.EventHandler.getKeyUp():return window.document;case FollowMe.EventHandler.getDocumentClick():case FollowMe.EventHandler.getDocumentMouseUp():case FollowMe.EventHandler.getDocumentMouseDown():case FollowMe.EventHandler.getDocumentMouseMove():return document;case FollowMe.EventHandler.getDocumentOnBeforeUnload():return document.body;default:break}return null}};function EventWrapper(A,B){this._id=A;this._object=B;this._object.eventWrapper=this;this._events=new Object()}EventWrapper.prototype={_id:-1,_object:null,_events:null,_newId:1,getFireEvents:function(B,A){return function(D){if(FollowMe==null){return }var C=FollowMe.EventHandler.getWrappers();if(C&&C[B]&&typeof (C[B].fireEvents)=="function"){FollowMe.EventHandler.getWrappers()[B].fireEvents(A,D)}else{throw new IllegalStateException("No eventWrapper for requested event of type '"+A+"'!")}}},add:function(A,E,B){if(this._events[A]==null){this._events[A]=new Object();try{this._object["on"+A]=this.getFireEvents(this._id,A)}catch(C){alert("Unexpected EventWrap Exception! ("+A+")");return -1}}if(B){this.removeAll(A)}var D=new Object();D.callback=E;D.id=this._newId;this._events[A][this._newId]=D;return this._newId+=1},remove:function(C){for(var A in this._events){if(this._events[A]){for(var B in this._events[A]){if(this._events[A][B]&&this._events[A][B].id==C){this._events[A][B].callback=null;this._events[A][B]=null;return true}}}}return false},removeAll:function(A){for(var B in this._events[A]){if(this._events[A][B]){this._events[A][B].callback=null;this._events[A][B]=null}}},fireEvents:function(B,E){if(!this._events[B]){return }for(var D in this._events[B]){if(this._events[B]!=null&&this._events[B][D]!=null){var C=this._events[B][D].callback}try{if(C!=null&&typeof (C.call)=="function"){C.call(this._object,FollowMe.Browser.browserEvent(E))}}catch(A){alert("Fire event error: "+A.message)}}},dispose:function(){for(var A in this._events){if(this._events[A]){try{this._object["on"+A]=null}catch(C){}try{for(var B in this._events[A]){if(this._events[A][B]){this._events[A][B].callback=null;this._events[A][B]=null}}}catch(C){alert(C.message)}}}this._object.eventWrapper=null}};function SynchronizedHeap(){this._heap=[];this.executedEvent=new ControlEvent()}SynchronizedHeap.prototype={executedEvent:null,_heap:null,_executionIntervalTime:40,_executionIntervalTimerId:null,setIntervalTime:function(A){this._executionIntervalTime=A},start:function(){if(this._executionIntervalTimerId){if(console){console.warn("Starting an synchronized heap that is already running.")}this.stop()}this._heap=[];this._executionIntervalTimerId=setInterval(new Delegate(this,this._execute),this._executionIntervalTime)},stop:function(){this._execute();this._kill()},add:function(A){if(!this._heap){throw new Exception("Synchronization heap is null.")}this._heap.push(A)},_kill:function(){clearInterval(this._executionIntervalTimerId);this._executionIntervalTimerId=null;this._heap=null},_execute:function(){var A=this._heap.length;if(A>0){var B;for(B=0;B<A;B++){this._heap[B].call(this)}this._heap.splice(0,A);this.executedEvent.fire(A)}}};var UserType={STUDENT:{Id:1},TEACHER:{Id:2},MP:{Id:3},ADMIN:{Id:4},SUPERVISOR:{Id:5},EXTERNAL:{Id:6},PARENT:{Id:7}};var UsersDataSource={findUsers:function(){new Error("Not implemented")},findMeetingPointEmployees:function(){new Error("Not implemented")},findByUserName:function(A){new Error("Not implemented")},findUserById:function(A){new Error("Not implemented")},FindById:function(A){new Error("Not implemented")},findStudentsByTeacherId:function(){new Error("Not implemented")},findStudentsByDepartmentId:function(){new Error("Not implemented")},findUsersByStudentId:function(A){new Error("Not implemented")},findUsersWhoRatedStudentAndLine:function(B,A){new Error("Not implemented")},setCoachByStudentId:function(A,B){new Error("Not implemented")},findStudentsByCoachId:function(A){new Error("Not implemented")},persist:function(A){new Error("Not implemented")}};function AbstractModule(){FormsApplication.call(this)}AbstractModule.prototype={DEFAULT_ICON:"Images/Icons/48x48/calendar.png",_title:null,_icon:null,_requiredSettings:null,_doToggleVisibility:null,setTitle:function(A){if(A==null||typeof (A)!="string"){throw new IllegalArgumentException("The 'title' argument must be of type 'string'.")}this._title=A;this._view.setTitle(A)},getTitle:function(){return this._title},getRequiredSettings:function(){return this._requiredSettings==null?[]:this._requiredSettings},setIcon:function(A){if(typeof (A)!="string"){throw new IllegalArgumentException("The 'icon' argument must be of type 'string'.")}this._icon=A;this._view.setIcon(A)},getIcon:function(){if(this._icon==null){return this.DEFAULT_ICON}else{return this._icon}},reloadAndRender:function(){this._load();this._onThreadsComplete(this._render)},onselect:function(){}};AbstractModule.extend(FormsApplication);function Login(){}Login.prototype={USERNAME_PASSWORD_WARNING:"Ongeldige gebruikersnaam of wachtwoord.",_introText:null,_init:function(){if(!FollowMe.getIsExport()){this._view=new LoginView(this);this.setTitle("Inloggen");this.setIcon("Images/icons/32x32/signpost.png")}else{this._validateUser("export","export")}},_load:function(){var C=1;var B=this.getThread(this.setLoginText);var A=B.getDelayedThreadStart();FollowMe.SettingService.FindSettingTextBySchoolId(C,"login",A)},setLoginText:function(A){if(A==null){A="Voer het volgende in om toegang te krijgen tot je eigen omgeving."}this._introText=A},getLoginText:function(){return this._introText},_render:function(){this._view.clear();this._view.showLoginScreen();FollowMe.loadExtraScripts()},_unload:function(){if(this._view){this._view.clear()}},_dispose:function(){this._view=null;this.context=null},_checkLogin:function(B,A){if(typeof (B)!="string"){throw new IllegalArgumentException("The 'string' argument must be of type 'string'")}if(typeof (A)!="string"){throw new IllegalArgumentException("The 'password' argument must be of type 'string'")}this._view.disableButton();if(this._isEmpty(B)){this._view.focusUserNameField();this._view.displayWarning("Ongeldige gebruikersnaam of wachtwoord.");this._view.colorInput(this._view.getUserNameField(),true);this._view.enableButton();return }if(this._isEmpty(A)){this._view.focusPasswordField();this._view.displayWarning("Ongeldige gebruikersnaam of wachtwoord.");this._view.colorInput(this._view.getPasswordField(),true);this._view.enableButton();return }this._validateUser(B,A)},_isEmpty:function(B){var A=true;if(!(B==null||B=="")){A=false}return A},_validateUser:function(E,A){if(typeof (E)!="string"){throw new IllegalArgumentException("The 'username' argument must be of type 'string'")}if(typeof (A)!="string"){throw new IllegalArgumentException("The 'password' argument must be of type 'string'")}var D=this.getThread(function(F){this._userValidated(F)});var B=D.getDelayedThreadStart();var C=1;if(!FollowMe.getIsExport()){FollowMe.UserService.FindByUserNameAndPassword(E,A,C,B)}else{FollowMe.UserService.FindByUserNameAndPassword(E,B)}},_userValidated:function(A,B){if(A==null){this._view.focusUserNameField();this._view.selectUserNameField();this._view.displayWarning(this.USERNAME_PASSWORD_WARNING);this._view.colorInput(this._view.getUserNameField(),false);this._view.colorInput(this._view.getPasswordField(),true);this._view.enableButton()}else{this._continueLogin(A)}},_continueLogin:function(A){FollowMe.setLocation("");FollowMe.continueRenderMainWindow(A);this.stop()},getBlurEventHandler:function(){return this.getClonedThreadStart(function(A){var B=A.targetobject.value;if(this._isEmpty(B)){this._view.colorInput(A.targetobject,true);this._view.displayWarning(this.USERNAME_PASSWORD_WARNING)}})},getFocusEventHandler:function(){return this.getClonedThreadStart(function(A){this._view.resetColor(A.targetobject)})},getKeyPressedOnInputEventHandler:function(){return this.getClonedThreadStart(function(A){if(A.keyCode==13&&!this._view.loginDisabled()){this._checkLogin(this._view.getUserName(),this._view.getPassword())}else{this._view.resetColor(A.targetobject)}})},getSubmitSelectedEventHandler:function(){return this.getClonedThreadStart(function(A){this._checkLogin(this._view.getUserName(),this._view.getPassword())})}};Login.extend(AbstractModule);function LoginView(A){if(!(A instanceof Login)){throw new IllegalArgumentException("The 'controller' argument must be an instance of 'Login'")}this._controller=A}LoginView.prototype={_classNamePrefix:"login",DEFAULTUSER:"",DEFAULTPASSWORD:"",_loginDisabled:false,_userNameInput:null,getUserName:function(){return this._userNameInput.value},getUserNameField:function(){return this._userNameInput},_passwordInput:null,getPassword:function(){return this._passwordInput.value},getPasswordField:function(){return this._passwordInput},_warningText:null,_submitButton:null,showLoginScreen:function(){this._container=new Container();this._container.init(this._clientArea);var F=this.createElement("div");var D=this.createElement("div",F);D.innerHTML=this._controller.getLoginText();D.className=this._classNamePrefix+"_introTextDiv floatL";var H=this.createElement("div",F);H.className=this._classNamePrefix+"_userNameDiv floatL";var C=this.createElement("div",H);C.innerHTML="Gebruikersnaam";C.className="floatL";this._userNameInput=this.createElement("input");this._userNameInput.type="text";this._userNameInput.className=this._classNamePrefix+"_userNameInput floatR";this._userNameInput.name="username";this._userNameInput.tabIndex="1";H.appendChild(this._userNameInput);FollowMe.EventHandler.add(this._userNameInput,"focus",this._controller.getFocusEventHandler());FollowMe.EventHandler.add(this._userNameInput,"keypress",this._controller.getKeyPressedOnInputEventHandler());this.resetColor(this._userNameInput);var B=this.createElement("div",F);B.className=this._classNamePrefix+"_passwordDiv floatL";var A=this.createElement("div",B);A.innerHTML="Wachtwoord";A.className="floatL";this._passwordInput=this.createElement("input");this._passwordInput.type="password";this._passwordInput.className=this._classNamePrefix+"_passwordInput floatR";this._passwordInput.name="password";this._passwordInput.tabIndex="2";B.appendChild(this._passwordInput);FollowMe.EventHandler.add(this._passwordInput,"focus",this._controller.getFocusEventHandler());FollowMe.EventHandler.add(this._passwordInput,"keypress",this._controller.getKeyPressedOnInputEventHandler());this.resetColor(this._passwordInput);this._warningText=this.createElement("div",F);this._warningText.className=this._classNamePrefix+("_warningTextHide floatL");var G=this.createElement("div",F);G.className="floatR";this._submitButton=this.createElement("input");this._submitButton.style.marginTop="10px";this._submitButton.type="button";this._submitButton.value="Inloggen";this._submitButton.tabIndex="4";G.appendChild(this._submitButton);FollowMe.EventHandler.add(this._submitButton,"click",this._controller.getSubmitSelectedEventHandler());var E=this.createElement("div",F);E.style.clear="both";this._userNameInput.value=this.DEFAULTUSER;this._passwordInput.value=this.DEFAULTPASSWORD;this._clientArea.appendChild(F);this._userNameInput.focus()},colorInput:function(A,B){if(typeof (B)!="boolean"){throw new IllegalArgumentException("The 'emptyInput' argument must be of type 'boolean'")}if(B){A.value=""}},resetColor:function(A){FollowMe.Browser.addClass(A,this._classNamePrefix+"_inputField");A.style.border="solid 1px gray";A.style.backgroundColor="#FFFFFF"},displayWarning:function(A){if(typeof (A)!="string"){throw new IllegalArgumentException("The 'text' argument must be of type 'string'")}this._warningText.className=this._classNamePrefix+"_warningTextShow floatL";this._warningText.innerHTML=A},focusUserNameField:function(){this._userNameInput.focus()},selectUserNameField:function(){this._userNameInput.select()},focusPasswordField:function(){this._passwordInput.focus()},disableButton:function(){this._loginDisabled=true;this._submitButton.disabled="disabled"},enableButton:function(){this._loginDisabled=false;this._submitButton.removeAttribute("disabled")},loginDisabled:function(){return this._loginDisabled}};LoginView.extend(View);function ActivityMonitor(){AbstractModule.apply(this,arguments);this._windowStyle=WindowStyle.CHROMELESS;this._nrOfLoading=0;this._synchronizedHeap=new SynchronizedHeap();this._synchronizedHeap.executedEvent.addHandler(new Delegate(this,this._onExecuted))}ActivityMonitor.prototype={_nrOfLoading:0,_synchronizedHeap:null,_init:function(){this._view=new ActivityMonitorView()},_load:function(){},_unload:function(){if(this._synchronizedHeap){this._synchronizedHeap.stop();this._synchronizedHeap=null}},_render:function(){this._view.render();this._synchronizedHeap.start()},loadingEventHandler:function(A){this._synchronizedHeap.add(new Delegate(this,function(){this._handleNewLoading(A)}))},_handleNewLoading:function(A){this._nrOfLoading=this._nrOfLoading+1},loadFinishedEventHandler:function(A){this._synchronizedHeap.add(new Delegate(this,function(){this._handleFinished(A)}))},_handleFinished:function(A){if(this._nrOfLoading>0){this._nrOfLoading=this._nrOfLoading-1}},loadFailedEventHandler:function(A){this._synchronizedHeap.add(new Delegate(this,function(){this._handleFailed(A)}))},_handleFailed:function(A){if(this._nrOfLoading>0){this._nrOfLoading=this._nrOfLoading-1}if(this._view){this._view.renderFailed()}},_onExecuted:function(){if(this._nrOfLoading>1){if(this._view){this._view.renderLoading()}this._timeoutId=setTimeout(new Delegate(this,function(){this._view.renderFinished();this._nrOfLoading=0;clearTimeout(this._timeoutId)}),5000)}else{clearTimeout(this._timeoutId);if(this._view){this._view.renderFinished()}}}};ActivityMonitor.extend(AbstractModule);function ActivityMonitorView(){}ActivityMonitorView.prototype={_loadingIconArea:null,_failureIconArea:null,render:function(){this._loadingIconArea=this.createElement("div",this._clientArea);this._loadingIconArea.className="loadingIcon hidden";var A=this.createElement("div",this._loadingIconArea);A.className="largeIcon";A.title="FollowMe is aan het laden.";FollowMe.Browser.setPng(A,"Images/icons/32x32/hourglass.png");this._failureIconArea=this.createElement("div",this._clientArea);this._failureIconArea.className="failureIcon";this._failureIconArea.style.display="none";A=this.createElement("div",this._failureIconArea);A.className="largeIcon";A.title="Het laden is mislukt, herlaad FollowMe. Contacteer systeembeheer bij herhaling.";FollowMe.Browser.setPng(A,"Images/icons/32x32/error.png")},renderLoading:function(){if(this._loadingIconArea){this._show(this._loadingIconArea)}if(this._failureIconArea){this._hide(this._failureIconArea)}},renderFailed:function(){if(this._loadingIconArea){this._hide(this._loadingIconArea)}if(this._failureIconArea){this._show(this._failureIconArea)}},renderFinished:function(){if(this._loadingIconArea){this._hide(this._loadingIconArea)}},_show:function(A){FollowMe.Browser.removeClass(A,"hidden")},_hide:function(A){FollowMe.Browser.addClass(A,"hidden")}};ActivityMonitorView.extend(View);jQuery(document).ready(function(){jQuery("body").resize(function(){if(FollowMe&&typeof (FollowMe.onresize)=="function"){FollowMe.onresize({})}});var E=document.getElementsByTagName("body")[0];E.ondragstart=function(){return false};E.ondrag=function(){return false};E.onselectstart=function(){return FollowMe.Browser.isSelectEnabled};E.onunload=document.onunload=window.onunload=function(){return FollowMe.stop()};if(window.location.search&&window.location.search.length>0){var G=window.location.search.substr(1);var A=G.split("&");if(A&&A.length>0){var D;var I={};for(var C=0;D=A[C];C++){var B=D.split("=");if(B&&B.length==2){var H=B[0].toLowerCase();var F=B[1].toLowerCase();I[H]=F}}if(I.caching){FollowMe.useCache=I.caching==null||I.caching=="true"||I.caching=="yes"||I.caching=="on"||I.caching=="";if(window.console){console.warn("Caching is "+(FollowMe.useCache?"on":"off")+".")}else{if(typeof (window.loadFirebugConsole)=="function"){window.loadFirebugConsole();console.warn("Caching is "+(FollowMe.useCache?"on":"off")+".")}}}if(I.delay){ProcessManager._THREAD_START_TIMEOUT=I.delay;if(window.console){console.warn("Threads and webservice calls are delayed for "+ProcessManager._THREAD_START_TIMEOUT+" milliseconds.")}else{if(typeof (window.loadFirebugConsole)=="function"){window.loadFirebugConsole();console.warn("Threads and webservice calls are delayed for "+ProcessManager._THREAD_START_TIMEOUT+" milliseconds.")}}}}}FollowMe.start()});
