﻿/*
 * jQuery JavaScript Library v1.3.1
 * http://jquery.com/
 *
 * Copyright (c) 2009 John Resig
 * Dual licensed under the MIT and GPL licenses.
 * http://docs.jquery.com/License
 *
 * Date: 2009-01-21 20:42:16 -0500 (Wed, 21 Jan 2009)
 * Revision: 6158
 */
(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.makeArray(E))},selector:"",jquery:"1.3.1",size:function(){return this.length},get:function(E){return E===g?o.makeArray(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,find:function(E){if(this.length===1&&!/,/.test(E)){var G=this.pushStack([],"find",E);G.length=0;o.find(E,this[0],G);return G}else{var F=o.map(this,function(H){return o.find(E,H)});return this.pushStack(/[^+>] [^+>]/.test(E)?o.unique(F):F,"find",E)}},clone:function(F){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.cloneNode(true),H=document.createElement("div");H.appendChild(I);return o.clean([H.innerHTML])[0]}else{return this.cloneNode(true)}});var G=E.find("*").andSelf().each(function(){if(this[h]!==g){this[h]=null}});if(F===true){this.find("*").andSelf().each(function(I){if(this.nodeType==3){return}var H=o.data(this,"events");for(var K in H){for(var J in H[K]){o.event.add(G[I],K,H[K][J],H[K][J].data)}}})}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 F=o.expr.match.POS.test(E)?o(E):null;return this.map(function(){var G=this;while(G&&G.ownerDocument){if(F?F.index(G)>-1:o(G).is(E)){return G}G=G.parentNode}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F<J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||"").replace(/\r/g,"")}return g}if(typeof K==="number"){K+=""}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&&/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,K)>=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML: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,N,M){if(this[0]){var J=(this[0].ownerDocument||this[0]).createDocumentFragment(),G=o.clean(K,(this[0].ownerDocument||this[0]),J),I=J.firstChild,E=this.length>1?J.cloneNode(true):J;if(I){for(var H=0,F=this.length;H<F;H++){M.call(L(this[H],I),H>0?E.cloneNode(true):J)}}if(G){o.each(G,z)}}return this;function L(O,P){return N&&o.nodeName(O,"table")&&o.nodeName(P,"tr")?(O.getElementsByTagName("tbody")[0]||O.appendChild(O.ownerDocument.createElement("tbody"))):O}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H<I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&&L&&typeof L==="object"&&!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)==="[object Function]"},isArray:function(E){return s.call(E)==="[object Array]"},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&o.isXMLDoc(E.ownerDocument)},globalEval:function(G){G=o.trim(G);if(G){var F=document.getElementsByTagName("head")[0]||document.documentElement,E=document.createElement("script");E.type="text/javascript";if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H<I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H<I&&K.call(J,H,J)!==false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I==="number"&&G=="curCSS"&&!b.test(E)?I+"px":I},className:{add:function(E,F){o.each((F||"").split(/\s+/),function(G,H){if(E.nodeType==1&&!o.className.has(E.className,H)){E.className+=(E.className?" ":"")+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\s+/),function(G){return !o.className.has(F,G)}).join(" "):""}},has:function(F,E){return F&&o.inArray(E,(F.className||F).toString().split(/\s+/))>-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(G,E,I){if(E=="width"||E=="height"){var K,F={position:"absolute",visibility:"hidden",display:"block"},J=E=="width"?["Left","Right"]:["Top","Bottom"];function H(){K=E=="width"?G.offsetWidth:G.offsetHeight;var M=0,L=0;o.each(J,function(){M+=parseFloat(o.curCSS(G,"padding"+this,true))||0;L+=parseFloat(o.curCSS(G,"border"+this+"Width",true))||0});K-=Math.round(M+L)}if(o(G).is(":visible")){H()}else{o.swap(G,F,H)}return Math.max(0,K)}return o.curCSS(G,E,I)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,R){if(typeof R==="number"){R+=""}if(!R){return}if(typeof R==="string"){R=R.replace(/(<(\w+)[^>]*?)\/>/g,function(T,U,S){return S.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?T:U+"></"+S+">"});var O=o.trim(R).toLowerCase();var Q=!O.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!O.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!O.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!O.indexOf("<td")||!O.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!O.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!o.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];L.innerHTML=Q[1]+R+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var N=!O.indexOf("<table")&&O.indexOf("<tbody")<0?L.firstChild&&L.firstChild.childNodes:Q[1]=="<table>"&&O.indexOf("<tbody")<0?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(R)){L.insertBefore(K.createTextNode(R.match(/^\s*/)[0]),L.firstChild)}R=o.makeArray(L.childNodes)}if(R.nodeType){G.push(R)}else{G=o.merge(G,R)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E<F;E++){if(H[E]===G){return E}}return -1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G<H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H<I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G<H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&&!/opera/.test(C),mozilla:/mozilla/.test(C)&&!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,"parentNode")},next:function(E){return o.nth(E,2,"nextSibling")},prev:function(E){return o.nth(E,2,"previousSibling")},nextAll:function(E){return o.dir(E,"nextSibling")},prevAll:function(E){return o.dir(E,"previousSibling")},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&&typeof G=="string"){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,F){o.fn[E]=function(){var G=arguments;return this.each(function(){for(var H=0,I=G.length;H<I;H++){o(G[H])[F](this)}})}});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).remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}});
/*
 * Sizzle CSS Selector Engine - v0.9.3
 *  Copyright 2009, The Dojo Foundation
 *  Released under the MIT, BSD, and GPL Licenses.
 *  More information: http://sizzlejs.com/
 */
(function(){var Q=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]+['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[]+)+|[>+~])(\s*,\s*)?/g,K=0,G=Object.prototype.toString;var F=function(X,T,aa,ab){aa=aa||[];T=T||document;if(T.nodeType!==1&&T.nodeType!==9){return[]}if(!X||typeof X!=="string"){return aa}var Y=[],V,ae,ah,S,ac,U,W=true;Q.lastIndex=0;while((V=Q.exec(X))!==null){Y.push(V[1]);if(V[2]){U=RegExp.rightContext;break}}if(Y.length>1&&L.exec(X)){if(Y.length===2&&H.relative[Y[0]]){ae=I(Y[0]+Y[1],T)}else{ae=H.relative[Y[0]]?[T]:F(Y.shift(),T);while(Y.length){X=Y.shift();if(H.relative[X]){X+=Y.shift()}ae=I(X,ae)}}}else{var ad=ab?{expr:Y.pop(),set:E(ab)}:F.find(Y.pop(),Y.length===1&&T.parentNode?T.parentNode:T,P(T));ae=F.filter(ad.expr,ad.set);if(Y.length>0){ah=E(ae)}else{W=false}while(Y.length){var ag=Y.pop(),af=ag;if(!H.relative[ag]){ag=""}else{af=Y.pop()}if(af==null){af=T}H.relative[ag](ah,af,P(T))}}if(!ah){ah=ae}if(!ah){throw"Syntax error, unrecognized expression: "+(ag||X)}if(G.call(ah)==="[object Array]"){if(!W){aa.push.apply(aa,ah)}else{if(T.nodeType===1){for(var Z=0;ah[Z]!=null;Z++){if(ah[Z]&&(ah[Z]===true||ah[Z].nodeType===1&&J(T,ah[Z]))){aa.push(ae[Z])}}}else{for(var Z=0;ah[Z]!=null;Z++){if(ah[Z]&&ah[Z].nodeType===1){aa.push(ae[Z])}}}}}else{E(ah,aa)}if(U){F(U,T,aa,ab)}return aa};F.matches=function(S,T){return F(S,null,null,T)};F.find=function(Z,S,aa){var Y,W;if(!Z){return[]}for(var V=0,U=H.order.length;V<U;V++){var X=H.order[V],W;if((W=H.match[X].exec(Z))){var T=RegExp.leftContext;if(T.substr(T.length-1)!=="\\"){W[1]=(W[1]||"").replace(/\\/g,"");Y=H.find[X](W,S,aa);if(Y!=null){Z=Z.replace(H.match[X],"");break}}}}if(!Y){Y=S.getElementsByTagName("*")}return{set:Y,expr:Z}};F.filter=function(ab,aa,ae,V){var U=ab,ag=[],Y=aa,X,S;while(ab&&aa.length){for(var Z in H.filter){if((X=H.match[Z].exec(ab))!=null){var T=H.filter[Z],af,ad;S=false;if(Y==ag){ag=[]}if(H.preFilter[Z]){X=H.preFilter[Z](X,Y,ae,ag,V);if(!X){S=af=true}else{if(X===true){continue}}}if(X){for(var W=0;(ad=Y[W])!=null;W++){if(ad){af=T(ad,X,W,Y);var ac=V^!!af;if(ae&&af!=null){if(ac){S=true}else{Y[W]=false}}else{if(ac){ag.push(ad);S=true}}}}}if(af!==g){if(!ae){Y=ag}ab=ab.replace(H.match[Z],"");if(!S){return[]}break}}}ab=ab.replace(/\s*,\s*/,"");if(ab==U){if(S==null){throw"Syntax error, unrecognized expression: "+ab}else{break}}U=ab}return Y};var H=F.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(S){return S.getAttribute("href")}},relative:{"+":function(W,T){for(var U=0,S=W.length;U<S;U++){var V=W[U];if(V){var X=V.previousSibling;while(X&&X.nodeType!==1){X=X.previousSibling}W[U]=typeof T==="string"?X||false:X===T}}if(typeof T==="string"){F.filter(T,W,true)}},">":function(X,T,Y){if(typeof T==="string"&&!/\W/.test(T)){T=Y?T:T.toUpperCase();for(var U=0,S=X.length;U<S;U++){var W=X[U];if(W){var V=W.parentNode;X[U]=V.nodeName===T?V:false}}}else{for(var U=0,S=X.length;U<S;U++){var W=X[U];if(W){X[U]=typeof T==="string"?W.parentNode:W.parentNode===T}}if(typeof T==="string"){F.filter(T,X,true)}}},"":function(V,T,X){var U="done"+(K++),S=R;if(!T.match(/\W/)){var W=T=X?T:T.toUpperCase();S=O}S("parentNode",T,U,V,W,X)},"~":function(V,T,X){var U="done"+(K++),S=R;if(typeof T==="string"&&!T.match(/\W/)){var W=T=X?T:T.toUpperCase();S=O}S("previousSibling",T,U,V,W,X)}},find:{ID:function(T,U,V){if(typeof U.getElementById!=="undefined"&&!V){var S=U.getElementById(T[1]);return S?[S]:[]}},NAME:function(S,T,U){if(typeof T.getElementsByName!=="undefined"&&!U){return T.getElementsByName(S[1])}},TAG:function(S,T){return T.getElementsByTagName(S[1])}},preFilter:{CLASS:function(V,T,U,S,Y){V=" "+V[1].replace(/\\/g,"")+" ";var X;for(var W=0;(X=T[W])!=null;W++){if(X){if(Y^(" "+X.className+" ").indexOf(V)>=0){if(!U){S.push(X)}}else{if(U){T[W]=false}}}}return false},ID:function(S){return S[1].replace(/\\/g,"")},TAG:function(T,S){for(var U=0;S[U]===false;U++){}return S[U]&&P(S[U])?T[1]:T[1].toUpperCase()},CHILD:function(S){if(S[1]=="nth"){var T=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(S[2]=="even"&&"2n"||S[2]=="odd"&&"2n+1"||!/\D/.test(S[2])&&"0n+"+S[2]||S[2]);S[2]=(T[1]+(T[2]||1))-0;S[3]=T[3]-0}S[0]="done"+(K++);return S},ATTR:function(T){var S=T[1].replace(/\\/g,"");if(H.attrMap[S]){T[1]=H.attrMap[S]}if(T[2]==="~="){T[4]=" "+T[4]+" "}return T},PSEUDO:function(W,T,U,S,X){if(W[1]==="not"){if(W[3].match(Q).length>1){W[3]=F(W[3],null,null,T)}else{var V=F.filter(W[3],T,U,true^X);if(!U){S.push.apply(S,V)}return false}}else{if(H.match.POS.test(W[0])){return true}}return W},POS:function(S){S.unshift(true);return S}},filters:{enabled:function(S){return S.disabled===false&&S.type!=="hidden"},disabled:function(S){return S.disabled===true},checked:function(S){return S.checked===true},selected:function(S){S.parentNode.selectedIndex;return S.selected===true},parent:function(S){return !!S.firstChild},empty:function(S){return !S.firstChild},has:function(U,T,S){return !!F(S[3],U).length},header:function(S){return/h\d/i.test(S.nodeName)},text:function(S){return"text"===S.type},radio:function(S){return"radio"===S.type},checkbox:function(S){return"checkbox"===S.type},file:function(S){return"file"===S.type},password:function(S){return"password"===S.type},submit:function(S){return"submit"===S.type},image:function(S){return"image"===S.type},reset:function(S){return"reset"===S.type},button:function(S){return"button"===S.type||S.nodeName.toUpperCase()==="BUTTON"},input:function(S){return/input|select|textarea|button/i.test(S.nodeName)}},setFilters:{first:function(T,S){return S===0},last:function(U,T,S,V){return T===V.length-1},even:function(T,S){return S%2===0},odd:function(T,S){return S%2===1},lt:function(U,T,S){return T<S[3]-0},gt:function(U,T,S){return T>S[3]-0},nth:function(U,T,S){return S[3]-0==T},eq:function(U,T,S){return S[3]-0==T}},filter:{CHILD:function(S,V){var Y=V[1],Z=S.parentNode;var X=V[0];if(Z&&(!Z[X]||!S.nodeIndex)){var W=1;for(var T=Z.firstChild;T;T=T.nextSibling){if(T.nodeType==1){T.nodeIndex=W++}}Z[X]=W-1}if(Y=="first"){return S.nodeIndex==1}else{if(Y=="last"){return S.nodeIndex==Z[X]}else{if(Y=="only"){return Z[X]==1}else{if(Y=="nth"){var ab=false,U=V[2],aa=V[3];if(U==1&&aa==0){return true}if(U==0){if(S.nodeIndex==aa){ab=true}}else{if((S.nodeIndex-aa)%U==0&&(S.nodeIndex-aa)/U>=0){ab=true}}return ab}}}}},PSEUDO:function(Y,U,V,Z){var T=U[1],W=H.filters[T];if(W){return W(Y,V,U,Z)}else{if(T==="contains"){return(Y.textContent||Y.innerText||"").indexOf(U[3])>=0}else{if(T==="not"){var X=U[3];for(var V=0,S=X.length;V<S;V++){if(X[V]===Y){return false}}return true}}}},ID:function(T,S){return T.nodeType===1&&T.getAttribute("id")===S},TAG:function(T,S){return(S==="*"&&T.nodeType===1)||T.nodeName===S},CLASS:function(T,S){return S.test(T.className)},ATTR:function(W,U){var S=H.attrHandle[U[1]]?H.attrHandle[U[1]](W):W[U[1]]||W.getAttribute(U[1]),X=S+"",V=U[2],T=U[4];return S==null?V==="!=":V==="="?X===T:V==="*="?X.indexOf(T)>=0:V==="~="?(" "+X+" ").indexOf(T)>=0:!U[4]?S:V==="!="?X!=T:V==="^="?X.indexOf(T)===0:V==="$="?X.substr(X.length-T.length)===T:V==="|="?X===T||X.substr(0,T.length+1)===T+"-":false},POS:function(W,T,U,X){var S=T[2],V=H.setFilters[S];if(V){return V(W,U,T,X)}}}};var L=H.match.POS;for(var N in H.match){H.match[N]=RegExp(H.match[N].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(T,S){T=Array.prototype.slice.call(T);if(S){S.push.apply(S,T);return S}return T};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(M){E=function(W,V){var T=V||[];if(G.call(W)==="[object Array]"){Array.prototype.push.apply(T,W)}else{if(typeof W.length==="number"){for(var U=0,S=W.length;U<S;U++){T.push(W[U])}}else{for(var U=0;W[U];U++){T.push(W[U])}}}return T}}(function(){var T=document.createElement("form"),U="script"+(new Date).getTime();T.innerHTML="<input name='"+U+"'/>";var S=document.documentElement;S.insertBefore(T,S.firstChild);if(!!document.getElementById(U)){H.find.ID=function(W,X,Y){if(typeof X.getElementById!=="undefined"&&!Y){var V=X.getElementById(W[1]);return V?V.id===W[1]||typeof V.getAttributeNode!=="undefined"&&V.getAttributeNode("id").nodeValue===W[1]?[V]:g:[]}};H.filter.ID=function(X,V){var W=typeof X.getAttributeNode!=="undefined"&&X.getAttributeNode("id");return X.nodeType===1&&W&&W.nodeValue===V}}S.removeChild(T)})();(function(){var S=document.createElement("div");S.appendChild(document.createComment(""));if(S.getElementsByTagName("*").length>0){H.find.TAG=function(T,X){var W=X.getElementsByTagName(T[1]);if(T[1]==="*"){var V=[];for(var U=0;W[U];U++){if(W[U].nodeType===1){V.push(W[U])}}W=V}return W}}S.innerHTML="<a href='#'></a>";if(S.firstChild&&S.firstChild.getAttribute("href")!=="#"){H.attrHandle.href=function(T){return T.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var S=F,T=document.createElement("div");T.innerHTML="<p class='TEST'></p>";if(T.querySelectorAll&&T.querySelectorAll(".TEST").length===0){return}F=function(X,W,U,V){W=W||document;if(!V&&W.nodeType===9&&!P(W)){try{return E(W.querySelectorAll(X),U)}catch(Y){}}return S(X,W,U,V)};F.find=S.find;F.filter=S.filter;F.selectors=S.selectors;F.matches=S.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){H.order.splice(1,0,"CLASS");H.find.CLASS=function(S,T){return T.getElementsByClassName(S[1])}}function O(T,Z,Y,ac,aa,ab){for(var W=0,U=ac.length;W<U;W++){var S=ac[W];if(S){S=S[T];var X=false;while(S&&S.nodeType){var V=S[Y];if(V){X=ac[V];break}if(S.nodeType===1&&!ab){S[Y]=W}if(S.nodeName===Z){X=S;break}S=S[T]}ac[W]=X}}}function R(T,Y,X,ab,Z,aa){for(var V=0,U=ab.length;V<U;V++){var S=ab[V];if(S){S=S[T];var W=false;while(S&&S.nodeType){if(S[X]){W=ab[S[X]];break}if(S.nodeType===1){if(!aa){S[X]=V}if(typeof Y!=="string"){if(S===Y){W=true;break}}else{if(F.filter(Y,[S]).length>0){W=S;break}}}S=S[T]}ab[V]=W}}}var J=document.compareDocumentPosition?function(T,S){return T.compareDocumentPosition(S)&16}:function(T,S){return T!==S&&(T.contains?T.contains(S):true)};var P=function(S){return S.nodeType===9&&S.documentElement.nodeName!=="HTML"||!!S.ownerDocument&&P(S.ownerDocument)};var I=function(S,Z){var V=[],W="",X,U=Z.nodeType?[Z]:Z;while((X=H.match.PSEUDO.exec(S))){W+=X[0];S=S.replace(H.match.PSEUDO,"")}S=H.relative[S]?S+"*":S;for(var Y=0,T=U.length;Y<T;Y++){F(S,U[Y],V)}return F.filter(W,V)};o.find=F;o.filter=F.filter;o.expr=F.selectors;o.expr[":"]=o.expr.filters;F.selectors.filters.hidden=function(S){return"hidden"===S.type||o.css(S,"display")==="none"||o.css(S,"visibility")==="hidden"};F.selectors.filters.visible=function(S){return"hidden"!==S.type&&o.css(S,"display")!=="none"&&o.css(S,"visibility")!=="hidden"};F.selectors.filters.animated=function(S){return o.grep(o.timers,function(T){return S===T.elem}).length};o.multiFilter=function(U,S,T){if(T){U=":not("+U+")"}return F.matches(U,S)};o.dir=function(U,T){var S=[],V=U[T];while(V&&V!=document){if(V.nodeType==1){S.push(V)}V=V[T]}return S};o.nth=function(W,S,U,V){S=S||1;var T=0;for(;W;W=W[U]){if(W.nodeType==1&&++T==S){break}}return W};o.sibling=function(U,T){var S=[];for(;U;U=U.nextSibling){if(U.nodeType==1&&U!=T){S.push(U)}}return S};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F<E.length){o.event.proxy(G,E[F++])}return this.click(o.event.proxy(G,function(H){this.lastToggle=(this.lastToggle||0)%F;H.preventDefault();return E[this.lastToggle++].apply(this,arguments)||false}))},hover:function(E,F){return this.mouseenter(E).mouseleave(F)},ready:function(E){B();if(o.isReady){E.call(document,o)}else{o.readyList.push(E)}return this},live:function(G,F){var E=o.event.proxy(F);E.guid+=this.selector+G;o(document).bind(i(G,this.selector),this.selector,E);return this},die:function(F,E){o(document).unbind(i(F,this.selector),E?{guid:E.guid+this.selector+F}:null);return this}});function c(H){var E=RegExp("(^|\\.)"+H.type+"(\\.|$)"),G=true,F=[];o.each(o.data(this,"events").live||[],function(I,J){if(E.test(J.type)){var K=o(H.target).closest(J.data)[0];if(K){F.push({elem:K,fn:J})}}});o.each(F,function(){if(this.fn.call(this.elem,H,this.fn.data)===false){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&&typeof l.frameElement==="undefined"){(function(){if(o.isReady){return}try{document.documentElement.doScroll("left")}catch(E){setTimeout(arguments.callee,0);return}o.ready()})()}}}o.event.add(l,"load",o.ready)}o.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(F,E){o.fn[E]=function(G){return G?this.bind(E,G):this.trigger(E)}});o(l).bind("unload",function(){for(var E in o.cache){if(E!=1&&o.cache[E].handle){o.event.remove(o.cache[E].handle.elem)}}});(function(){o.support={};var F=document.documentElement,G=document.createElement("script"),K=document.createElement("div"),J="script"+(new Date).getTime();K.style.display="none";K.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var H=K.getElementsByTagName("*"),E=K.getElementsByTagName("a")[0];if(!H||!H.length||!E){return}o.support={leadingWhitespace:K.firstChild.nodeType==3,tbody:!K.getElementsByTagName("tbody").length,objectAll:!!K.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!K.getElementsByTagName("link").length,style:/red/.test(E.getAttribute("style")),hrefNormalized:E.getAttribute("href")==="/a",opacity:E.style.opacity==="0.5",cssFloat:!!E.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};G.type="text/javascript";try{G.appendChild(document.createTextNode("window."+J+"=1;"))}catch(I){}F.insertBefore(G,F.firstChild);if(l[J]){o.support.scriptEval=true;delete l[J]}F.removeChild(G);if(K.attachEvent&&K.fireEvent){K.attachEvent("onclick",function(){o.support.noCloneEvent=false;K.detachEvent("onclick",arguments.callee)});K.cloneNode(true).fireEvent("onclick")}o(function(){var L=document.createElement("div");L.style.width="1px";L.style.paddingLeft="1px";document.body.appendChild(L);o.boxModel=o.support.boxModel=L.offsetWidth===2;document.body.removeChild(L)})})();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/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H<F;H++){var E=o.data(this[H],"olddisplay");this[H].style.display=E||"";if(o.css(this[H],"display")==="none"){var G=this[H].tagName,K;if(m[G]){K=m[G]}else{var I=o("<"+G+" />").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}this[H].style.display=o.data(this[H],"olddisplay",K)}}return this}},hide:function(H,I){if(H){return this.animate(t("hide",3),H,I)}else{for(var G=0,F=this.length;G<F;G++){var E=o.data(this[G],"olddisplay");if(!E&&E!=="none"){o.data(this[G],"olddisplay",o.css(this[G],"display"))}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)==1){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)}},13)}},show:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());o(this.elem).show()},hide:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(H){var G=e();if(H||G>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(H,F){var E=H?"Left":"Top",G=H?"Right":"Bottom";o.fn["inner"+F]=function(){return this[F.toLowerCase()]()+j(this,"padding"+E)+j(this,"padding"+G)};o.fn["outer"+F]=function(J){return this["inner"+F]()+j(this,"border"+E+"Width")+j(this,"border"+G+"Width")+(J?j(this,"margin"+E)+j(this,"margin"+G):0)};var I=F.toLowerCase();o.fn[I]=function(J){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+F]||document.body["client"+F]:this[0]==document?Math.max(document.documentElement["client"+F],document.body["scroll"+F],document.documentElement["scroll"+F],document.body["offset"+F],document.documentElement["offset"+F]):J===g?(this.length?o.css(this[0],I):null):this.css(I,typeof J==="string"?J:J+"px")}})})(); 
/* 
 * (c) Copyright Microsoft Corporation. 
 * This source is subject to the Microsoft Permissive License. 
 * See http://www.microsoft.com/resources/sharedsource/licensingbasics/sharedsourcelicenses.mspx. 
 * All other rights reserved. 
 */ 
Type.registerNamespace("AjaxControlToolkit");AjaxControlToolkit.BehaviorBase=function(a){AjaxControlToolkit.BehaviorBase.initializeBase(this,[a]);this._clientStateFieldID=null;this._pageRequestManager=null;this._partialUpdateBeginRequestHandler=null;this._partialUpdateEndRequestHandler=null};AjaxControlToolkit.BehaviorBase.prototype={initialize:function(){AjaxControlToolkit.BehaviorBase.callBaseMethod(this,"initialize")},dispose:function(){AjaxControlToolkit.BehaviorBase.callBaseMethod(this,"dispose");if(this._pageRequestManager){if(this._partialUpdateBeginRequestHandler){this._pageRequestManager.remove_beginRequest(this._partialUpdateBeginRequestHandler);this._partialUpdateBeginRequestHandler=null}if(this._partialUpdateEndRequestHandler){this._pageRequestManager.remove_endRequest(this._partialUpdateEndRequestHandler);this._partialUpdateEndRequestHandler=null}this._pageRequestManager=null}},get_ClientStateFieldID:function(){return this._clientStateFieldID},set_ClientStateFieldID:function(a){if(this._clientStateFieldID!=a){this._clientStateFieldID=a;this.raisePropertyChanged("ClientStateFieldID")}},get_ClientState:function(){if(this._clientStateFieldID){var a=document.getElementById(this._clientStateFieldID);if(a){return a.value}}return null},set_ClientState:function(b){if(this._clientStateFieldID){var a=document.getElementById(this._clientStateFieldID);if(a){a.value=b}}},registerPartialUpdateEvents:function(){if(Sys&&Sys.WebForms&&Sys.WebForms.PageRequestManager){this._pageRequestManager=Sys.WebForms.PageRequestManager.getInstance();if(this._pageRequestManager){this._partialUpdateBeginRequestHandler=Function.createDelegate(this,this._partialUpdateBeginRequest);this._pageRequestManager.add_beginRequest(this._partialUpdateBeginRequestHandler);this._partialUpdateEndRequestHandler=Function.createDelegate(this,this._partialUpdateEndRequest);this._pageRequestManager.add_endRequest(this._partialUpdateEndRequestHandler)}}},_partialUpdateBeginRequest:function(a,b){},_partialUpdateEndRequest:function(a,b){}};AjaxControlToolkit.BehaviorBase.registerClass("AjaxControlToolkit.BehaviorBase",Sys.UI.Behavior);AjaxControlToolkit.DynamicPopulateBehaviorBase=function(a){AjaxControlToolkit.DynamicPopulateBehaviorBase.initializeBase(this,[a]);this._DynamicControlID=null;this._DynamicContextKey=null;this._DynamicServicePath=null;this._DynamicServiceMethod=null;this._cacheDynamicResults=false;this._dynamicPopulateBehavior=null;this._populatingHandler=null;this._populatedHandler=null};AjaxControlToolkit.DynamicPopulateBehaviorBase.prototype={initialize:function(){AjaxControlToolkit.DynamicPopulateBehaviorBase.callBaseMethod(this,"initialize");this._populatingHandler=Function.createDelegate(this,this._onPopulating);this._populatedHandler=Function.createDelegate(this,this._onPopulated)},dispose:function(){if(this._populatedHandler){if(this._dynamicPopulateBehavior){this._dynamicPopulateBehavior.remove_populated(this._populatedHandler)}this._populatedHandler=null}if(this._populatingHandler){if(this._dynamicPopulateBehavior){this._dynamicPopulateBehavior.remove_populating(this._populatingHandler)}this._populatingHandler=null}if(this._dynamicPopulateBehavior){this._dynamicPopulateBehavior.dispose();this._dynamicPopulateBehavior=null}AjaxControlToolkit.DynamicPopulateBehaviorBase.callBaseMethod(this,"dispose")},populate:function(a){if(this._dynamicPopulateBehavior&&(this._dynamicPopulateBehavior.get_element()!=$get(this._DynamicControlID))){this._dynamicPopulateBehavior.dispose();this._dynamicPopulateBehavior=null}if(!this._dynamicPopulateBehavior&&this._DynamicControlID&&this._DynamicServiceMethod){this._dynamicPopulateBehavior=$create(AjaxControlToolkit.DynamicPopulateBehavior,{id:this.get_id()+"_DynamicPopulateBehavior",ContextKey:this._DynamicContextKey,ServicePath:this._DynamicServicePath,ServiceMethod:this._DynamicServiceMethod,cacheDynamicResults:this._cacheDynamicResults},null,null,$get(this._DynamicControlID));this._dynamicPopulateBehavior.add_populating(this._populatingHandler);this._dynamicPopulateBehavior.add_populated(this._populatedHandler)}if(this._dynamicPopulateBehavior){this._dynamicPopulateBehavior.populate(a?a:this._DynamicContextKey)}},_onPopulating:function(b,a){this.raisePopulating(a)},_onPopulated:function(b,a){this.raisePopulated(a)},get_dynamicControlID:function(){return this._DynamicControlID},get_DynamicControlID:this.get_dynamicControlID,set_dynamicControlID:function(a){if(this._DynamicControlID!=a){this._DynamicControlID=a;this.raisePropertyChanged("dynamicControlID");this.raisePropertyChanged("DynamicControlID")}},set_DynamicControlID:this.set_dynamicControlID,get_dynamicContextKey:function(){return this._DynamicContextKey},get_DynamicContextKey:this.get_dynamicContextKey,set_dynamicContextKey:function(a){if(this._DynamicContextKey!=a){this._DynamicContextKey=a;this.raisePropertyChanged("dynamicContextKey");this.raisePropertyChanged("DynamicContextKey")}},set_DynamicContextKey:this.set_dynamicContextKey,get_dynamicServicePath:function(){return this._DynamicServicePath},get_DynamicServicePath:this.get_dynamicServicePath,set_dynamicServicePath:function(a){if(this._DynamicServicePath!=a){this._DynamicServicePath=a;this.raisePropertyChanged("dynamicServicePath");this.raisePropertyChanged("DynamicServicePath")}},set_DynamicServicePath:this.set_dynamicServicePath,get_dynamicServiceMethod:function(){return this._DynamicServiceMethod},get_DynamicServiceMethod:this.get_dynamicServiceMethod,set_dynamicServiceMethod:function(a){if(this._DynamicServiceMethod!=a){this._DynamicServiceMethod=a;this.raisePropertyChanged("dynamicServiceMethod");this.raisePropertyChanged("DynamicServiceMethod")}},set_DynamicServiceMethod:this.set_dynamicServiceMethod,get_cacheDynamicResults:function(){return this._cacheDynamicResults},set_cacheDynamicResults:function(a){if(this._cacheDynamicResults!=a){this._cacheDynamicResults=a;this.raisePropertyChanged("cacheDynamicResults")}},add_populated:function(a){this.get_events().addHandler("populated",a)},remove_populated:function(a){this.get_events().removeHandler("populated",a)},raisePopulated:function(a){var b=this.get_events().getHandler("populated");if(b){b(this,a)}},add_populating:function(a){this.get_events().addHandler("populating",a)},remove_populating:function(a){this.get_events().removeHandler("populating",a)},raisePopulating:function(a){var b=this.get_events().getHandler("populating");if(b){b(this,a)}}};AjaxControlToolkit.DynamicPopulateBehaviorBase.registerClass("AjaxControlToolkit.DynamicPopulateBehaviorBase",AjaxControlToolkit.BehaviorBase);AjaxControlToolkit.ControlBase=function(a){AjaxControlToolkit.ControlBase.initializeBase(this,[a]);this._clientStateField=null;this._callbackTarget=null;this._onsubmit$delegate=Function.createDelegate(this,this._onsubmit);this._oncomplete$delegate=Function.createDelegate(this,this._oncomplete);this._onerror$delegate=Function.createDelegate(this,this._onerror)};AjaxControlToolkit.ControlBase.prototype={initialize:function(){AjaxControlToolkit.ControlBase.callBaseMethod(this,"initialize");if(this._clientStateField){this.loadClientState(this._clientStateField.value)}if(typeof(Sys.WebForms)!=="undefined"&&typeof(Sys.WebForms.PageRequestManager)!=="undefined"){Array.add(Sys.WebForms.PageRequestManager.getInstance()._onSubmitStatements,this._onsubmit$delegate)}else{$addHandler(document.forms[0],"submit",this._onsubmit$delegate)}},dispose:function(){if(typeof(Sys.WebForms)!=="undefined"&&typeof(Sys.WebForms.PageRequestManager)!=="undefined"){Array.remove(Sys.WebForms.PageRequestManager.getInstance()._onSubmitStatements,this._onsubmit$delegate)}else{$removeHandler(document.forms[0],"submit",this._onsubmit$delegate)}AjaxControlToolkit.ControlBase.callBaseMethod(this,"dispose")},findElement:function(a){return $get(this.get_id()+"_"+a.split(":").join("_"))},get_clientStateField:function(){return this._clientStateField},set_clientStateField:function(a){if(this.get_isInitialized()){throw Error.invalidOperation(AjaxControlToolkit.Resources.ExtenderBase_CannotSetClientStateField)}if(this._clientStateField!=a){this._clientStateField=a;this.raisePropertyChanged("clientStateField")}},loadClientState:function(a){},saveClientState:function(){return null},_invoke:function(e,d,b){if(!this._callbackTarget){throw Error.invalidOperation(AjaxControlToolkit.Resources.ExtenderBase_ControlNotRegisteredForCallbacks)}if(typeof(WebForm_DoCallback)==="undefined"){throw Error.invalidOperation(AjaxControlToolkit.Resources.ExtenderBase_PageNotRegisteredForCallbacks)}var c=[];for(var f=0;f<d.length;f++){c[f]=d[f]}var a=this.saveClientState();if(a!=null&&!String.isInstanceOfType(a)){throw Error.invalidOperation(AjaxControlToolkit.Resources.ExtenderBase_InvalidClientStateType)}var g=Sys.Serialization.JavaScriptSerializer.serialize({name:e,args:c,state:this.saveClientState()});WebForm_DoCallback(this._callbackTarget,g,this._oncomplete$delegate,b,this._onerror$delegate,true)},_oncomplete:function(a,b){a=Sys.Serialization.JavaScriptSerializer.deserialize(a);if(a.error){throw Error.create(a.error)}this.loadClientState(a.state);b(a.result)},_onerror:function(b,a){throw Error.create(b)},_onsubmit:function(){if(this._clientStateField){this._clientStateField.value=this.saveClientState()}return true}};AjaxControlToolkit.ControlBase.registerClass("AjaxControlToolkit.ControlBase",Sys.UI.Control);Type.registerNamespace("AjaxControlToolkit");AjaxControlToolkit.BoxSide=function(){};AjaxControlToolkit.BoxSide.prototype={Top:0,Right:1,Bottom:2,Left:3};AjaxControlToolkit.BoxSide.registerEnum("AjaxControlToolkit.BoxSide",false);AjaxControlToolkit._CommonToolkitScripts=function(){};AjaxControlToolkit._CommonToolkitScripts.prototype={_borderStyleNames:["borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle"],_borderWidthNames:["borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth"],_paddingWidthNames:["paddingTop","paddingRight","paddingBottom","paddingLeft"],_marginWidthNames:["marginTop","marginRight","marginBottom","marginLeft"],getCurrentStyle:function(b,e,a){var d=null;if(b){if(b.currentStyle){d=b.currentStyle[e]}else{if(document.defaultView&&document.defaultView.getComputedStyle){var c=document.defaultView.getComputedStyle(b,null);if(c){d=c[e]}}}if(!d&&b.style.getPropertyValue){d=b.style.getPropertyValue(e)}else{if(!d&&b.style.getAttribute){d=b.style.getAttribute(e)}}}if((!d||d==""||typeof(d)==="undefined")){if(typeof(a)!="undefined"){d=a}else{d=null}}return d},getInheritedBackgroundColor:function(c){if(!c){return"#FFFFFF"}var b=this.getCurrentStyle(c,"backgroundColor");try{while(!b||b==""||b=="transparent"||b=="rgba(0, 0, 0, 0)"){c=c.parentNode;if(!c){b="#FFFFFF"}else{b=this.getCurrentStyle(c,"backgroundColor")}}}catch(a){b="#FFFFFF"}return b},getLocation:function(f){if(f===document.documentElement){return new Sys.UI.Point(0,0)}if(Sys.Browser.agent==Sys.Browser.InternetExplorer&&Sys.Browser.version<7){if(f.window===f||f.nodeType===9||!f.getClientRects||!f.getBoundingClientRect){return new Sys.UI.Point(0,0)}var l=f.getClientRects();if(!l||!l.length){return new Sys.UI.Point(0,0)}var g=l[0];var m=0;var k=0;var h=false;try{h=f.ownerDocument.parentWindow.frameElement}catch(j){h=true}if(h){var b=f.getBoundingClientRect();if(!b){return new Sys.UI.Point(0,0)}var d=g.left;var c=g.top;for(var e=1;e<l.length;e++){var a=l[e];if(a.left<d){d=a.left}if(a.top<c){c=a.top}}m=d-b.left;k=c-b.top}var n=f.document.documentElement;return new Sys.UI.Point(g.left-2-m+n.scrollLeft,g.top-2-k+n.scrollTop)}return Sys.UI.DomElement.getLocation(f)},setLocation:function(b,a){Sys.UI.DomElement.setLocation(b,a.x,a.y)},getContentSize:function(c){if(!c){throw Error.argumentNull("element")}var b=this.getSize(c);var d=this.getBorderBox(c);var a=this.getPaddingBox(c);return{width:b.width-d.horizontal-a.horizontal,height:b.height-d.vertical-a.vertical}},getSize:function(a){if(!a){throw Error.argumentNull("element")}return{width:a.offsetWidth,height:a.offsetHeight}},setContentSize:function(c,b){if(!c){throw Error.argumentNull("element")}if(!b){throw Error.argumentNull("size")}if(this.getCurrentStyle(c,"MozBoxSizing")=="border-box"||this.getCurrentStyle(c,"BoxSizing")=="border-box"){var d=this.getBorderBox(c);var a=this.getPaddingBox(c);b={width:b.width+d.horizontal+a.horizontal,height:b.height+d.vertical+a.vertical}}c.style.width=b.width.toString()+"px";c.style.height=b.height.toString()+"px"},setSize:function(c,b){if(!c){throw Error.argumentNull("element")}if(!b){throw Error.argumentNull("size")}var d=this.getBorderBox(c);var a=this.getPaddingBox(c);var e={width:b.width-d.horizontal-a.horizontal,height:b.height-d.vertical-a.vertical};this.setContentSize(c,e)},getBounds:function(a){var b=$common.getLocation(a);return new Sys.UI.Bounds(b.x,b.y,a.offsetWidth||0,a.offsetHeight||0)},setBounds:function(a,b){if(!a){throw Error.argumentNull("element")}if(!b){throw Error.argumentNull("bounds")}this.setSize(a,b);$common.setLocation(a,b)},getClientBounds:function(){var b;var a;switch(Sys.Browser.agent){case Sys.Browser.InternetExplorer:b=document.documentElement.clientWidth;a=document.documentElement.clientHeight;break;case Sys.Browser.Safari:b=window.innerWidth;a=window.innerHeight;break;case Sys.Browser.Opera:b=Math.min(window.innerWidth,document.body.clientWidth);a=Math.min(window.innerHeight,document.body.clientHeight);break;default:b=Math.min(window.innerWidth,document.documentElement.clientWidth);a=Math.min(window.innerHeight,document.documentElement.clientHeight);break}return new Sys.UI.Bounds(0,0,b,a)},getMarginBox:function(a){if(!a){throw Error.argumentNull("element")}var b={top:this.getMargin(a,AjaxControlToolkit.BoxSide.Top),right:this.getMargin(a,AjaxControlToolkit.BoxSide.Right),bottom:this.getMargin(a,AjaxControlToolkit.BoxSide.Bottom),left:this.getMargin(a,AjaxControlToolkit.BoxSide.Left)};b.horizontal=b.left+b.right;b.vertical=b.top+b.bottom;return b},getBorderBox:function(a){if(!a){throw Error.argumentNull("element")}var b={top:this.getBorderWidth(a,AjaxControlToolkit.BoxSide.Top),right:this.getBorderWidth(a,AjaxControlToolkit.BoxSide.Right),bottom:this.getBorderWidth(a,AjaxControlToolkit.BoxSide.Bottom),left:this.getBorderWidth(a,AjaxControlToolkit.BoxSide.Left)};b.horizontal=b.left+b.right;b.vertical=b.top+b.bottom;return b},getPaddingBox:function(a){if(!a){throw Error.argumentNull("element")}var b={top:this.getPadding(a,AjaxControlToolkit.BoxSide.Top),right:this.getPadding(a,AjaxControlToolkit.BoxSide.Right),bottom:this.getPadding(a,AjaxControlToolkit.BoxSide.Bottom),left:this.getPadding(a,AjaxControlToolkit.BoxSide.Left)};b.horizontal=b.left+b.right;b.vertical=b.top+b.bottom;return b},isBorderVisible:function(c,d){if(!c){throw Error.argumentNull("element")}if(d<AjaxControlToolkit.BoxSide.Top||d>AjaxControlToolkit.BoxSide.Left){throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,d,"AjaxControlToolkit.BoxSide"))}var b=this._borderStyleNames[d];var a=this.getCurrentStyle(c,b);return a!="none"},getMargin:function(d,e){if(!d){throw Error.argumentNull("element")}if(e<AjaxControlToolkit.BoxSide.Top||e>AjaxControlToolkit.BoxSide.Left){throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,e,"AjaxControlToolkit.BoxSide"))}var c=this._marginWidthNames[e];var a=this.getCurrentStyle(d,c);try{return this.parsePadding(a)}catch(b){return 0}},getBorderWidth:function(c,d){if(!c){throw Error.argumentNull("element")}if(d<AjaxControlToolkit.BoxSide.Top||d>AjaxControlToolkit.BoxSide.Left){throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,d,"AjaxControlToolkit.BoxSide"))}if(!this.isBorderVisible(c,d)){return 0}var b=this._borderWidthNames[d];var a=this.getCurrentStyle(c,b);return this.parseBorderWidth(a)},getPadding:function(c,d){if(!c){throw Error.argumentNull("element")}if(d<AjaxControlToolkit.BoxSide.Top||d>AjaxControlToolkit.BoxSide.Left){throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,d,"AjaxControlToolkit.BoxSide"))}var b=this._paddingWidthNames[d];var a=this.getCurrentStyle(c,b);return this.parsePadding(a)},parseBorderWidth:function(b){if(!this._borderThicknesses){var a={};var e=document.createElement("div");e.style.visibility="hidden";e.style.position="absolute";e.style.fontSize="1px";document.body.appendChild(e);var c=document.createElement("div");c.style.height="0px";c.style.overflow="hidden";e.appendChild(c);var f=e.offsetHeight;c.style.borderTop="solid black";c.style.borderTopWidth="thin";a.thin=e.offsetHeight-f;c.style.borderTopWidth="medium";a.medium=e.offsetHeight-f;c.style.borderTopWidth="thick";a.thick=e.offsetHeight-f;e.removeChild(c);document.body.removeChild(e);this._borderThicknesses=a}if(b){switch(b){case"thin":case"medium":case"thick":return this._borderThicknesses[b];case"inherit":return 0}var d=this.parseUnit(b);Sys.Debug.assert(d.type=="px",String.format(AjaxControlToolkit.Resources.Common_InvalidBorderWidthUnit,d.type));return d.size}return 0},parsePadding:function(b){if(b){if(b=="inherit"){return 0}var a=this.parseUnit(b);Sys.Debug.assert(a.type=="px",String.format(AjaxControlToolkit.Resources.Common_InvalidPaddingUnit,a.type));return a.size}return 0},parseUnit:function(g){if(!g){throw Error.argumentNull("value")}g=g.trim().toLowerCase();var a=g.length;var f=-1;for(var c=0;c<a;c++){var e=g.substr(c,1);if((e<"0"||e>"9")&&e!="-"&&e!="."&&e!=","){break}f=c}if(f==-1){throw Error.create(AjaxControlToolkit.Resources.Common_UnitHasNoDigits)}var d;var b;if(f<(a-1)){d=g.substring(f+1).trim()}else{d="px"}b=parseFloat(g.substr(0,f+1));if(d=="px"){b=Math.floor(b)}return{size:b,type:d}},getElementOpacity:function(c){if(!c){throw Error.argumentNull("element")}var e=false;var b;if(c.filters){var d=c.filters;if(d.length!==0){var a=d["DXImageTransform.Microsoft.Alpha"];if(a){b=a.opacity/100;e=true}}}else{b=this.getCurrentStyle(c,"opacity",1);e=true}if(e===false){return 1}return parseFloat(b)},setElementOpacity:function(c,e){if(!c){throw Error.argumentNull("element")}if(c.filters){var d=c.filters;var b=true;if(d.length!==0){var a=d["DXImageTransform.Microsoft.Alpha"];if(a){b=false;a.opacity=e*100}}if(b){c.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+(e*100)+")"}}else{c.style.opacity=e}},getVisible:function(a){return(a&&("none"!=$common.getCurrentStyle(a,"display"))&&("hidden"!=$common.getCurrentStyle(a,"visibility")))},setVisible:function(a,b){if(a&&b!=$common.getVisible(a)){if(b){if(a.style.removeAttribute){a.style.removeAttribute("display")}else{a.style.removeProperty("display")}}else{a.style.display="none"}a.style.visibility=b?"visible":"hidden"}},resolveFunction:function(value){if(value){if(value instanceof Function){return value}else{if(String.isInstanceOfType(value)&&value.length>0){var func;if((func=window[value]) instanceof Function){return func}else{if((func=eval(value)) instanceof Function){return func}}}}}return null},addCssClasses:function(b,c){for(var a=0;a<c.length;a++){Sys.UI.DomElement.addCssClass(b,c[a])}},removeCssClasses:function(b,c){for(var a=0;a<c.length;a++){Sys.UI.DomElement.removeCssClass(b,c[a])}},setStyle:function(a,b){$common.applyProperties(a.style,b)},removeHandlers:function(c,b){for(var a in b){$removeHandler(c,a,b[a])}},overlaps:function(b,a){return b.x<(a.x+a.width)&&a.x<(b.x+b.width)&&b.y<(a.y+a.height)&&a.y<(b.y+b.height)},containsPoint:function(b,a,c){return a>=b.x&&a<(b.x+b.width)&&c>=b.y&&c<(b.y+b.height)},isKeyDigit:function(a){return(48<=a&&a<=57)},isKeyNavigation:function(a){return(Sys.UI.Key.left<=a&&a<=Sys.UI.Key.down)},padLeft:function(d,b,c,a){return $common._pad(d,b||2,c||" ","l",a||false)},padRight:function(d,b,c,a){return $common._pad(d,b||2,c||" ","r",a||false)},_pad:function(h,e,f,d,c){h=h.toString();var g=h.length;var b=new Sys.StringBuilder();if(d=="r"){b.append(h)}while(g<e){b.append(f);g++}if(d=="l"){b.append(h)}var a=b.toString();if(c&&a.length>e){if(d=="l"){a=a.substr(a.length-e,e)}else{a=a.substr(0,e)}}return a},__DOMEvents:{focusin:{eventGroup:"UIEvents",init:function(b,a){b.initUIEvent("focusin",true,false,window,1)}},focusout:{eventGroup:"UIEvents",init:function(b,a){b.initUIEvent("focusout",true,false,window,1)}},activate:{eventGroup:"UIEvents",init:function(b,a){b.initUIEvent("activate",true,true,window,1)}},focus:{eventGroup:"UIEvents",init:function(b,a){b.initUIEvent("focus",false,false,window,1)}},blur:{eventGroup:"UIEvents",init:function(b,a){b.initUIEvent("blur",false,false,window,1)}},click:{eventGroup:"MouseEvents",init:function(b,a){b.initMouseEvent("click",true,true,window,1,a.screenX||0,a.screenY||0,a.clientX||0,a.clientY||0,a.ctrlKey||false,a.altKey||false,a.shiftKey||false,a.metaKey||false,a.button||0,a.relatedTarget||null)}},dblclick:{eventGroup:"MouseEvents",init:function(b,a){b.initMouseEvent("click",true,true,window,2,a.screenX||0,a.screenY||0,a.clientX||0,a.clientY||0,a.ctrlKey||false,a.altKey||false,a.shiftKey||false,a.metaKey||false,a.button||0,a.relatedTarget||null)}},mousedown:{eventGroup:"MouseEvents",init:function(b,a){b.initMouseEvent("mousedown",true,true,window,1,a.screenX||0,a.screenY||0,a.clientX||0,a.clientY||0,a.ctrlKey||false,a.altKey||false,a.shiftKey||false,a.metaKey||false,a.button||0,a.relatedTarget||null)}},mouseup:{eventGroup:"MouseEvents",init:function(b,a){b.initMouseEvent("mouseup",true,true,window,1,a.screenX||0,a.screenY||0,a.clientX||0,a.clientY||0,a.ctrlKey||false,a.altKey||false,a.shiftKey||false,a.metaKey||false,a.button||0,a.relatedTarget||null)}},mouseover:{eventGroup:"MouseEvents",init:function(b,a){b.initMouseEvent("mouseover",true,true,window,1,a.screenX||0,a.screenY||0,a.clientX||0,a.clientY||0,a.ctrlKey||false,a.altKey||false,a.shiftKey||false,a.metaKey||false,a.button||0,a.relatedTarget||null)}},mousemove:{eventGroup:"MouseEvents",init:function(b,a){b.initMouseEvent("mousemove",true,true,window,1,a.screenX||0,a.screenY||0,a.clientX||0,a.clientY||0,a.ctrlKey||false,a.altKey||false,a.shiftKey||false,a.metaKey||false,a.button||0,a.relatedTarget||null)}},mouseout:{eventGroup:"MouseEvents",init:function(b,a){b.initMouseEvent("mousemove",true,true,window,1,a.screenX||0,a.screenY||0,a.clientX||0,a.clientY||0,a.ctrlKey||false,a.altKey||false,a.shiftKey||false,a.metaKey||false,a.button||0,a.relatedTarget||null)}},load:{eventGroup:"HTMLEvents",init:function(b,a){b.initEvent("load",false,false)}},unload:{eventGroup:"HTMLEvents",init:function(b,a){b.initEvent("unload",false,false)}},select:{eventGroup:"HTMLEvents",init:function(b,a){b.initEvent("select",true,false)}},change:{eventGroup:"HTMLEvents",init:function(b,a){b.initEvent("change",true,false)}},submit:{eventGroup:"HTMLEvents",init:function(b,a){b.initEvent("submit",true,true)}},reset:{eventGroup:"HTMLEvents",init:function(b,a){b.initEvent("reset",true,false)}},resize:{eventGroup:"HTMLEvents",init:function(b,a){b.initEvent("resize",true,false)}},scroll:{eventGroup:"HTMLEvents",init:function(b,a){b.initEvent("scroll",true,false)}}},tryFireRawEvent:function(a,b){try{if(a.fireEvent){a.fireEvent("on"+b.type,b);return true}else{if(a.dispatchEvent){a.dispatchEvent(b);return true}}}catch(c){}return false},tryFireEvent:function(c,a,b){try{if(document.createEventObject){var f=document.createEventObject();$common.applyProperties(f,b||{});c.fireEvent("on"+a,f);return true}else{if(document.createEvent){var d=$common.__DOMEvents[a];if(d){var f=document.createEvent(d.eventGroup);d.init(f,b||{});c.dispatchEvent(f);return true}}}}catch(f){}return false},wrapElement:function(c,d,b){var a=c.parentNode;a.replaceChild(d,c);(b||d).appendChild(c)},unwrapElement:function(b,c){var a=c.parentNode;if(a!=null){$common.removeElement(b);a.replaceChild(b,c)}},removeElement:function(a){var b=a.parentNode;if(b!=null){b.removeChild(a)}},applyProperties:function(e,b){for(var d in b){var c=b[d];if(c!=null&&Object.getType(c)===Object){var a=e[d];$common.applyProperties(a,c)}else{e[d]=c}}},createElementFromTemplate:function(f,g,k){if(typeof(f.nameTable)!="undefined"){var j=f.nameTable;if(String.isInstanceOfType(j)){j=k[j]}if(j!=null){k=j}}var l=null;if(typeof(f.name)!=="undefined"){l=f.name}var c=document.createElement(f.nodeName);if(typeof(f.name)!=="undefined"&&k){k[f.name]=c}if(typeof(f.parent)!=="undefined"&&g==null){var h=f.parent;if(String.isInstanceOfType(h)){h=k[h]}if(h!=null){g=h}}if(typeof(f.properties)!=="undefined"&&f.properties!=null){$common.applyProperties(c,f.properties)}if(typeof(f.cssClasses)!=="undefined"&&f.cssClasses!=null){$common.addCssClasses(c,f.cssClasses)}if(typeof(f.events)!=="undefined"&&f.events!=null){$addHandlers(c,f.events)}if(typeof(f.visible)!=="undefined"&&f.visible!=null){this.setVisible(c,f.visible)}if(g){g.appendChild(c)}if(typeof(f.opacity)!=="undefined"&&f.opacity!=null){$common.setElementOpacity(c,f.opacity)}if(typeof(f.children)!=="undefined"&&f.children!=null){for(var d=0;d<f.children.length;d++){var a=f.children[d];$common.createElementFromTemplate(a,c,k)}}var b=c;if(typeof(f.contentPresenter)!=="undefined"&&f.contentPresenter!=null){b=k[b]}if(typeof(f.content)!=="undefined"&&f.content!=null){var e=f.content;if(String.isInstanceOfType(e)){e=k[e]}if(e.parentNode){$common.wrapElement(e,c,b)}else{b.appendChild(e)}}return c},prepareHiddenElementForATDeviceUpdate:function(){var a=document.getElementById("hiddenInputToUpdateATBuffer_CommonToolkitScripts");if(!a){var a=document.createElement("input");a.setAttribute("type","hidden");a.setAttribute("value","1");a.setAttribute("id","hiddenInputToUpdateATBuffer_CommonToolkitScripts");a.setAttribute("name","hiddenInputToUpdateATBuffer_CommonToolkitScripts");if(document.forms[0]){document.forms[0].appendChild(a)}}},updateFormToRefreshATDeviceBuffer:function(){var a=document.getElementById("hiddenInputToUpdateATBuffer_CommonToolkitScripts");if(a){if(a.getAttribute("value")=="1"){a.setAttribute("value","0")}else{a.setAttribute("value","1")}}}};var CommonToolkitScripts=AjaxControlToolkit.CommonToolkitScripts=new AjaxControlToolkit._CommonToolkitScripts();var $common=CommonToolkitScripts;Sys.UI.DomElement.getVisible=$common.getVisible;Sys.UI.DomElement.setVisible=$common.setVisible;Sys.UI.Control.overlaps=$common.overlaps;AjaxControlToolkit._DomUtility=function(){};AjaxControlToolkit._DomUtility.prototype={isDescendant:function(a,b){for(var c=b.parentNode;c!=null;c=c.parentNode){if(c==a){return true}}return false},isDescendantOrSelf:function(a,b){if(a===b){return true}return AjaxControlToolkit.DomUtility.isDescendant(a,b)},isAncestor:function(b,a){return AjaxControlToolkit.DomUtility.isDescendant(a,b)},isAncestorOrSelf:function(b,a){if(b===a){return true}return AjaxControlToolkit.DomUtility.isDescendant(a,b)},isSibling:function(a,d){var c=a.parentNode;for(var b=0;b<c.childNodes.length;b++){if(c.childNodes[b]==d){return true}}return false}};AjaxControlToolkit._DomUtility.registerClass("AjaxControlToolkit._DomUtility");AjaxControlToolkit.DomUtility=new AjaxControlToolkit._DomUtility();AjaxControlToolkit.TextBoxWrapper=function(a){AjaxControlToolkit.TextBoxWrapper.initializeBase(this,[a]);this._current=a.value;this._watermark=null;this._isWatermarked=false};AjaxControlToolkit.TextBoxWrapper.prototype={dispose:function(){this.get_element().AjaxControlToolkitTextBoxWrapper=null;AjaxControlToolkit.TextBoxWrapper.callBaseMethod(this,"dispose")},get_Current:function(){this._current=this.get_element().value;return this._current},set_Current:function(a){this._current=a;this._updateElement()},get_Value:function(){if(this.get_IsWatermarked()){return""}else{return this.get_Current()}},set_Value:function(a){this.set_Current(a);if(!a||(0==a.length)){if(null!=this._watermark){this.set_IsWatermarked(true)}}else{this.set_IsWatermarked(false)}},get_Watermark:function(){return this._watermark},set_Watermark:function(a){this._watermark=a;this._updateElement()},get_IsWatermarked:function(){return this._isWatermarked},set_IsWatermarked:function(a){if(this._isWatermarked!=a){this._isWatermarked=a;this._updateElement();this._raiseWatermarkChanged()}},_updateElement:function(){var a=this.get_element();if(this._isWatermarked){if(a.value!=this._watermark){a.value=this._watermark}}else{if(a.value!=this._current){a.value=this._current}}},add_WatermarkChanged:function(a){this.get_events().addHandler("WatermarkChanged",a)},remove_WatermarkChanged:function(a){this.get_events().removeHandler("WatermarkChanged",a)},_raiseWatermarkChanged:function(){var a=this.get_events().getHandler("WatermarkChanged");if(a){a(this,Sys.EventArgs.Empty)}}};AjaxControlToolkit.TextBoxWrapper.get_Wrapper=function(a){if(null==a.AjaxControlToolkitTextBoxWrapper){a.AjaxControlToolkitTextBoxWrapper=new AjaxControlToolkit.TextBoxWrapper(a)}return a.AjaxControlToolkitTextBoxWrapper};AjaxControlToolkit.TextBoxWrapper.registerClass("AjaxControlToolkit.TextBoxWrapper",Sys.UI.Behavior);AjaxControlToolkit.TextBoxWrapper.validatorGetValue=function(b){var a=$get(b);if(a&&a.AjaxControlToolkitTextBoxWrapper){return a.AjaxControlToolkitTextBoxWrapper.get_Value()}return AjaxControlToolkit.TextBoxWrapper._originalValidatorGetValue(b)};if(typeof(ValidatorGetValue)=="function"){AjaxControlToolkit.TextBoxWrapper._originalValidatorGetValue=ValidatorGetValue;ValidatorGetValue=AjaxControlToolkit.TextBoxWrapper.validatorGetValue}if(Sys.CultureInfo.prototype._getAbbrMonthIndex){try{Sys.CultureInfo.prototype._getAbbrMonthIndex("")}catch(ex){Sys.CultureInfo.prototype._getAbbrMonthIndex=function(a){if(!this._upperAbbrMonths){this._upperAbbrMonths=this._toUpperArray(this.dateTimeFormat.AbbreviatedMonthNames)}return Array.indexOf(this._upperAbbrMonths,this._toUpper(a))};Sys.CultureInfo.CurrentCulture._getAbbrMonthIndex=Sys.CultureInfo.prototype._getAbbrMonthIndex;Sys.CultureInfo.InvariantCulture._getAbbrMonthIndex=Sys.CultureInfo.prototype._getAbbrMonthIndex}};Type.registerNamespace("AjaxControlToolkit");AjaxControlToolkit.TextBoxWatermarkBehavior=function(a){AjaxControlToolkit.TextBoxWatermarkBehavior.initializeBase(this,[a]);this._watermarkText=null;this._watermarkCssClass=null;this._focusHandler=null;this._blurHandler=null;this._keyPressHandler=null;this._propertyChangedHandler=null;this._watermarkChangedHandler=null;this._oldClassName=null;this._clearedForSubmit=null;this._maxLength=null;if((typeof(WebForm_OnSubmit)=="function")&&!AjaxControlToolkit.TextBoxWatermarkBehavior._originalWebForm_OnSubmit){AjaxControlToolkit.TextBoxWatermarkBehavior._originalWebForm_OnSubmit=WebForm_OnSubmit;WebForm_OnSubmit=AjaxControlToolkit.TextBoxWatermarkBehavior.WebForm_OnSubmit}};AjaxControlToolkit.TextBoxWatermarkBehavior.prototype={initialize:function(){AjaxControlToolkit.TextBoxWatermarkBehavior.callBaseMethod(this,"initialize");var d=this.get_element();var c=false;var a=AjaxControlToolkit.TextBoxWatermarkBehavior.callBaseMethod(this,"get_ClientState");if(a!=null&&a!=""){c=(a=="Focused");AjaxControlToolkit.TextBoxWatermarkBehavior.callBaseMethod(this,"set_ClientState",null)}this._oldClassName=d.className;this._focusHandler=Function.createDelegate(this,this._onFocus);this._blurHandler=Function.createDelegate(this,this._onBlur);this._keyPressHandler=Function.createDelegate(this,this._onKeyPress);$addHandler(d,"focus",this._focusHandler);$addHandler(d,"blur",this._blurHandler);$addHandler(d,"keypress",this._keyPressHandler);this.registerPropertyChanged();var b=AjaxControlToolkit.TextBoxWrapper.get_Wrapper(this.get_element()).get_Current();var f=AjaxControlToolkit.TextBoxWrapper.get_Wrapper(this.get_element());if((""==b)||(this._watermarkText==b)){f.set_Watermark(this._watermarkText);f.set_IsWatermarked(true)}if(c){this._onFocus()}else{d.blur();this._onBlur()}this._clearedForSubmit=false;this.registerPartialUpdateEvents();this._watermarkChangedHandler=Function.createDelegate(this,this._onWatermarkChanged);f.add_WatermarkChanged(this._watermarkChangedHandler)},dispose:function(){var a=this.get_element();if(this._watermarkChangedHandler){AjaxControlToolkit.TextBoxWrapper.get_Wrapper(this.get_element()).remove_WatermarkChanged(this._watermarkChangedHandler);this._watermarkChangedHandler=null}if(a.control&&this._propertyChangedHandler){a.control.remove_propertyChanged(this._propertyChangedHandler);this._propertyChangedHandler=null}if(this._focusHandler){$removeHandler(a,"focus",this._focusHandler);this._focusHandler=null}if(this._blurHandler){$removeHandler(a,"blur",this._blurHandler);this._blurHandler=null}if(this._keyPressHandler){$removeHandler(a,"keypress",this._keyPressHandler);this._keyPressHandler=null}if(AjaxControlToolkit.TextBoxWrapper.get_Wrapper(this.get_element()).get_IsWatermarked()){this.clearText(false)}AjaxControlToolkit.TextBoxWatermarkBehavior.callBaseMethod(this,"dispose")},_onWatermarkChanged:function(b,a){if(AjaxControlToolkit.TextBoxWrapper.get_Wrapper(this.get_element()).get_IsWatermarked()){this._onBlur()}else{this._onFocus()}},clearText:function(a){var b=this.get_element();var c=AjaxControlToolkit.TextBoxWrapper.get_Wrapper(b);c.set_Value("");c.set_IsWatermarked(false);if(a){b.setAttribute("autocomplete","off");b.select()}},_onFocus:function(a){var b=this.get_element();if(AjaxControlToolkit.TextBoxWrapper.get_Wrapper(b).get_IsWatermarked()){this.clearText(a?true:false)}b.className=this._oldClassName;if(this._maxLength>0){this.get_element().maxLength=this._maxLength;this._maxLength=null}},_onBlur:function(){var a=AjaxControlToolkit.TextBoxWrapper.get_Wrapper(this.get_element());if((""==a.get_Current())||a.get_IsWatermarked()){if(this.get_element().maxLength>0&&this._watermarkText.length>this.get_element().maxLength){this._maxLength=this.get_element().maxLength;this.get_element().maxLength=this._watermarkText.length}this._applyWatermark()}},_applyWatermark:function(){var a=AjaxControlToolkit.TextBoxWrapper.get_Wrapper(this.get_element());a.set_Watermark(this._watermarkText);a.set_IsWatermarked(true);if(this._watermarkCssClass){this.get_element().className=this._watermarkCssClass}},_onKeyPress:function(){AjaxControlToolkit.TextBoxWrapper.get_Wrapper(this.get_element()).set_IsWatermarked(false)},registerPropertyChanged:function(){var a=this.get_element();if(a.control&&!this._propertyChangedHandler){this._propertyChangedHandler=Function.createDelegate(this,this._onPropertyChanged);a.control.add_propertyChanged(this._propertyChangedHandler)}},_onPropertyChanged:function(a,b){if("text"==b.get_propertyName()){this.set_Value(AjaxControlToolkit.TextBoxWrapper.get_Wrapper(this.get_element()).get_Current())}},_onSubmit:function(){if(AjaxControlToolkit.TextBoxWrapper.get_Wrapper(this.get_element()).get_IsWatermarked()){this.clearText(false);this._clearedForSubmit=true}},_partialUpdateEndRequest:function(a,b){AjaxControlToolkit.TextBoxWatermarkBehavior.callBaseMethod(this,"_partialUpdateEndRequest",[a,b]);if(this.get_element()&&this._clearedForSubmit){this.get_element().blur();this._onBlur();this._clearedForSubmit=false}},get_WatermarkText:function(){return this._watermarkText},set_WatermarkText:function(a){if(this._watermarkText!=a){this._watermarkText=a;if(AjaxControlToolkit.TextBoxWrapper.get_Wrapper(this.get_element()).get_IsWatermarked()){this._applyWatermark()}this.raisePropertyChanged("WatermarkText")}},get_WatermarkCssClass:function(){return this._watermarkCssClass},set_WatermarkCssClass:function(a){if(this._watermarkCssClass!=a){this._watermarkCssClass=a;if(AjaxControlToolkit.TextBoxWrapper.get_Wrapper(this.get_element()).get_IsWatermarked()){this._applyWatermark()}this.raisePropertyChanged("WatermarkCssClass")}},get_Text:function(){return AjaxControlToolkit.TextBoxWrapper.get_Wrapper(this.get_element()).get_Value()},set_Text:function(a){if(""==a){AjaxControlToolkit.TextBoxWrapper.get_Wrapper(this.get_element()).set_Current("");this.get_element().blur();this._onBlur()}else{this._onFocus();AjaxControlToolkit.TextBoxWrapper.get_Wrapper(this.get_element()).set_Current(a)}}};AjaxControlToolkit.TextBoxWatermarkBehavior.registerClass("AjaxControlToolkit.TextBoxWatermarkBehavior",AjaxControlToolkit.BehaviorBase);AjaxControlToolkit.TextBoxWatermarkBehavior.WebForm_OnSubmit=function(){var a=AjaxControlToolkit.TextBoxWatermarkBehavior._originalWebForm_OnSubmit();if(a){var d=Sys.Application.getComponents();for(var c=0;c<d.length;c++){var b=d[c];if(AjaxControlToolkit.TextBoxWatermarkBehavior.isInstanceOfType(b)){b._onSubmit()}}}return a};Type.registerNamespace("Sys.Data");Sys.Data.ActionResult=function Sys$Data$ActionResult(a,c,f,b){var d=Function._validateParams(arguments,[{name:"result",mayBeNull:true},{name:"error",type:Sys.Data.DataServiceError,mayBeNull:true},{name:"actionContext",mayBeNull:true},{name:"operation",type:String}]);if(d){throw d}this._result=a;this._error=c;this._actionContext=f;this._operation=b};function Sys$Data$ActionResult$get_result(){if(arguments.length!==0){throw Error.parameterCount()}return this._result}function Sys$Data$ActionResult$get_error(){if(arguments.length!==0){throw Error.parameterCount()}return this._error}function Sys$Data$ActionResult$get_actionContext(){if(arguments.length!==0){throw Error.parameterCount()}return this._actionContext}function Sys$Data$ActionResult$get_operation(){if(arguments.length!==0){throw Error.parameterCount()}return this._operation}Sys.Data.ActionResult.prototype={get_result:Sys$Data$ActionResult$get_result,get_error:Sys$Data$ActionResult$get_error,get_actionContext:Sys$Data$ActionResult$get_actionContext,get_operation:Sys$Data$ActionResult$get_operation};Sys.Data.ActionResult.registerClass("Sys.Data.ActionResult");Sys.Data.ActionSequence=function Sys$Data$ActionSequence(b){var a=Function._validateParams(arguments,[{name:"dataService",type:Sys.Data.DataService}]);if(a){throw a}this._dataService=b;this._actionQueue=new Array()};function Sys$Data$ActionSequence$get_service(){if(arguments.length!==0){throw Error.parameterCount()}return this._dataService}function Sys$Data$ActionSequence$addInsertAction(a,f,d){var b=Function._validateParams(arguments,[{name:"item",type:Object},{name:"resourceSetUri",type:String,mayBeNull:true},{name:"actionContext",mayBeNull:true,optional:true}]);if(b){throw b}var c=this._dataService;Array.enqueue(this._actionQueue,function(e){c.insert(a,f,Sys.Data.ActionSequence._genSuccessCallback(e),Sys.Data.ActionSequence._genFailureCallback(e),d)})}function Sys$Data$ActionSequence$addUpdateAction(b,a,f){var c=Function._validateParams(arguments,[{name:"item",type:Object},{name:"resourceUri",type:String,mayBeNull:true,optional:true},{name:"actionContext",mayBeNull:true,optional:true}]);if(c){throw c}var d=this._dataService;Array.enqueue(this._actionQueue,function(e){d.update(b,a,Sys.Data.ActionSequence._genSuccessCallback(e),Sys.Data.ActionSequence._genFailureCallback(e),f)})}function Sys$Data$ActionSequence$addRemoveAction(b,a,f){var c=Function._validateParams(arguments,[{name:"item",type:Object,mayBeNull:true},{name:"resourceUri",type:String,mayBeNull:true,optional:true},{name:"actionContext",mayBeNull:true,optional:true}]);if(c){throw c}var d=this._dataService;Array.enqueue(this._actionQueue,function(e){d.remove(b,a,Sys.Data.ActionSequence._genSuccessCallback(e),Sys.Data.ActionSequence._genFailureCallback(e),f)})}function Sys$Data$ActionSequence$clearActions(){if(arguments.length!==0){throw Error.parameterCount()}Array.clear(this._actionQueue)}function Sys$Data$ActionSequence$executeActions(a,d){var b=Function._validateParams(arguments,[{name:"actionsCallback",type:Function,mayBeNull:true,optional:true},{name:"userContext",mayBeNull:true,optional:true}]);if(b){throw b}var c={actionResultQueue:new Array(),hasError:false,remainingActions:this._actionQueue};this._actionQueue=new Array();Array.enqueue(c.remainingActions,function(e){if(a){window.setTimeout(function(){a(e.actionResultQueue,e.hasError,d)},0)}});Array.dequeue(c.remainingActions)(c)}Sys.Data.ActionSequence.prototype={get_service:Sys$Data$ActionSequence$get_service,addInsertAction:Sys$Data$ActionSequence$addInsertAction,addUpdateAction:Sys$Data$ActionSequence$addUpdateAction,addRemoveAction:Sys$Data$ActionSequence$addRemoveAction,clearActions:Sys$Data$ActionSequence$clearActions,executeActions:Sys$Data$ActionSequence$executeActions};Sys.Data.ActionSequence._genSuccessCallback=function Sys$Data$ActionSequence$_genSuccessCallback(a){return function(b,e,c){var d=new Sys.Data.ActionResult(b,null,e,c);Array.enqueue(a.actionResultQueue,d);Array.dequeue(a.remainingActions)(a)}};Sys.Data.ActionSequence._genFailureCallback=function Sys$Data$ActionSequence$_genFailureCallback(a){return function(c,e,b){a.hasError=true;var d=new Sys.Data.ActionResult(null,c,e,b);Array.enqueue(a.actionResultQueue,d);Array.dequeue(a.remainingActions)(a)}};Sys.Data.ActionSequence.registerClass("Sys.Data.ActionSequence");Sys.Data.DataService=function Sys$Data$DataService(a){var b=Function._validateParams(arguments,[{name:"serviceUri",type:String}]);if(b){throw b}this._serviceUri=a;this._timeout=0;this._defaultUserContext=null;this._defaultSucceededCallback=null;this._defaultFailedCallback=null};function Sys$Data$DataService$get_serviceUri(){if(arguments.length!==0){throw Error.parameterCount()}return this._serviceUri}function Sys$Data$DataService$get_timeout(){if(arguments.length!==0){throw Error.parameterCount()}if(this._timeout===0){return Sys.Net.WebRequestManager.get_defaultTimeout()}return this._timeout}function Sys$Data$DataService$set_timeout(a){var b=Function._validateParams(arguments,[{name:"value",type:Number,integer:true}]);if(b){throw b}this._timeout=a}function Sys$Data$DataService$get_defaultUserContext(){if(arguments.length!==0){throw Error.parameterCount()}return this._defaultUserContext}function Sys$Data$DataService$set_defaultUserContext(a){var b=Function._validateParams(arguments,[{name:"value",mayBeNull:true}]);if(b){throw b}this._defaultUserContext=a}function Sys$Data$DataService$get_defaultSucceededCallback(){if(arguments.length!==0){throw Error.parameterCount()}return this._defaultSucceededCallback}function Sys$Data$DataService$set_defaultSucceededCallback(a){var b=Function._validateParams(arguments,[{name:"value",type:Function,mayBeNull:true}]);if(b){throw b}this._defaultSucceededCallback=a}function Sys$Data$DataService$get_defaultFailedCallback(){if(arguments.length!==0){throw Error.parameterCount()}return this._defaultFailedCallback}function Sys$Data$DataService$set_defaultFailedCallback(a){var b=Function._validateParams(arguments,[{name:"value",type:Function,mayBeNull:true}]);if(b){throw b}this._defaultFailedCallback=a}function Sys$Data$DataService$query(f,d,b,h,c){var g=Function._validateParams(arguments,[{name:"query",type:String,mayBeNull:true,optional:true},{name:"succeededCallback",type:Function,mayBeNull:true,optional:true},{name:"failedCallback",type:Function,mayBeNull:true,optional:true},{name:"userContext",mayBeNull:true,optional:true},{name:"webRequest",type:Sys.Net.WebRequest,mayBeNull:true,optional:true}]);if(g){throw g}var a=this._prepWebRequest(null,f,"GET",d,b,h,f,c);a.invoke()}function Sys$Data$DataService$loadProperty(j,h,k,g,f,i){var d=Function._validateParams(arguments,[{name:"item",type:Object},{name:"property",type:String},{name:"succeededCallback",type:Function,mayBeNull:true,optional:true},{name:"failedCallback",type:Function,mayBeNull:true,optional:true},{name:"userContext",mayBeNull:true,optional:true},{name:"webRequest",type:Sys.Net.WebRequest,mayBeNull:true,optional:true}]);if(d){throw d}var c=function(e,m,l){j[l]=e;if(!k){k=this._defaultSucceededCallback}if(k){k(j,m,l)}};var a;if(j[h]&&j[h].__metadata&&j[h].__metadata.uri){a=j[h].__metadata.uri}else{if(j.__metadata&&j.__metadata.uri){a=j.__metadata.uri+"/"+h}else{throw Error.create(Sys.Data.Res.dataServiceLoadPropertyUriNotPresent)}}var b=this._prepWebRequest(null,a,"GET",c,g,f,h,i);b.invoke()}function Sys$Data$DataService$insert(d,h,f,b,i,c){var g=Function._validateParams(arguments,[{name:"item",type:Object},{name:"resourceSetUri",type:String,mayBeNull:true},{name:"succeededCallback",type:Function,mayBeNull:true,optional:true},{name:"failedCallback",type:Function,mayBeNull:true,optional:true},{name:"userContext",mayBeNull:true,optional:true},{name:"webRequest",type:Sys.Net.WebRequest,mayBeNull:true,optional:true}]);if(g){throw g}var a=this._prepWebRequest(null,h,"POST",f,b,i,"insert",c);a.set_body(Sys.Serialization.JavaScriptSerializer.serializeDC(d));a.get_headers()["Content-Type"]="application/json";a.invoke()}function Sys$Data$DataService$update(f,d,g,b,i,c){var h=Function._validateParams(arguments,[{name:"item",type:Object},{name:"resourceUri",type:String,mayBeNull:true},{name:"succeededCallback",type:Function,mayBeNull:true,optional:true},{name:"failedCallback",type:Function,mayBeNull:true,optional:true},{name:"userContext",mayBeNull:true,optional:true},{name:"webRequest",type:Sys.Net.WebRequest,mayBeNull:true,optional:true}]);if(h){throw h}var a=this._prepWebRequest(f,d,"PUT",g,b,i,"update",c);a.get_headers()["Content-Type"]="application/json";a.invoke()}function Sys$Data$DataService$remove(f,d,g,b,i,c){var h=Function._validateParams(arguments,[{name:"item",type:Object,mayBeNull:true},{name:"resourceUri",type:String,mayBeNull:true,optional:true},{name:"succeededCallback",type:Function,mayBeNull:true,optional:true},{name:"failedCallback",type:Function,mayBeNull:true,optional:true},{name:"userContext",mayBeNull:true,optional:true},{name:"webRequest",type:Sys.Net.WebRequest,mayBeNull:true,optional:true}]);if(h){throw h}if(!((f&&f.__metadata&&f.__metadata.uri)||d)){throw Error.create(Sys.Data.Res.dataServiceRemoveUriNotPresent)}var a=this._prepWebRequest(f,d,"DELETE",this._cbReplaceResult(g,null),b,i,"remove",c);delete a.get_headers()["Content-Type"];a.set_body(null);a.invoke()}function Sys$Data$DataService$invoke(a,f,i,k,h,g,j){var d=Function._validateParams(arguments,[{name:"operationUri",type:String},{name:"httpVerb",type:String,optional:true},{name:"parameters",type:Object,optional:true},{name:"succeededCallback",type:Function,mayBeNull:true,optional:true},{name:"failedCallback",type:Function,mayBeNull:true,optional:true},{name:"userContext",mayBeNull:true,optional:true},{name:"webRequest",type:Sys.Net.WebRequest,mayBeNull:true,optional:true}]);if(d){throw d}var b=new Sys.Data.QueryBuilder(a);for(key in i){b.get_queryParams()[encodeURIComponent(key)]=encodeURIComponent(i[key])}var c=this._prepWebRequest(null,b.toString(),f,k,h,g,a,j);if(f=="POST"){c.get_headers()["X-Service-Post"]="true"}c.invoke()}function Sys$Data$DataService$createActionSequence(){if(arguments.length!==0){throw Error.parameterCount()}return new Sys.Data.ActionSequence(this)}function Sys$Data$DataService$_prepWebRequest(i,e,d,h,b,a,f,g){if(!e){e=""}if(!g){g=new Sys.Net.WebRequest()}g.set_url(Sys.Data.DataService._concatUris(this._serviceUri,e));g.set_httpVerb(d);g.set_timeout(this.get_timeout());var c=g.get_headers();c.Accept="application/json";if(i){g.set_body(Sys.Serialization.JavaScriptSerializer.serializeDC(i));c["Content-Type"]="application/json";if(i.__metadata&&i.__metadata.uri){g.set_url(i.__metadata.uri)}}if(!h){h=this._defaultSucceededCallback}if(!b){b=this._defaultFailedCallback}if(!a){a=this._defaultUserContext}g.add_completed(function(k,j){Sys.Data.DataService._callbackHelper(k,j,h,b,a,f)});return g}function Sys$Data$DataService$_cbReplaceResult(a,b){if(!a){a=this._defaultSucceededCallback}return(a)?function(c,e,d){a(b,e,d)}:null}Sys.Data.DataService.prototype={get_serviceUri:Sys$Data$DataService$get_serviceUri,get_timeout:Sys$Data$DataService$get_timeout,set_timeout:Sys$Data$DataService$set_timeout,get_defaultUserContext:Sys$Data$DataService$get_defaultUserContext,set_defaultUserContext:Sys$Data$DataService$set_defaultUserContext,get_defaultSucceededCallback:Sys$Data$DataService$get_defaultSucceededCallback,set_defaultSucceededCallback:Sys$Data$DataService$set_defaultSucceededCallback,get_defaultFailedCallback:Sys$Data$DataService$get_defaultFailedCallback,set_defaultFailedCallback:Sys$Data$DataService$set_defaultFailedCallback,query:Sys$Data$DataService$query,loadProperty:Sys$Data$DataService$loadProperty,insert:Sys$Data$DataService$insert,update:Sys$Data$DataService$update,remove:Sys$Data$DataService$remove,invoke:Sys$Data$DataService$invoke,createActionSequence:Sys$Data$DataService$createActionSequence,_prepWebRequest:Sys$Data$DataService$_prepWebRequest,_cbReplaceResult:Sys$Data$DataService$_cbReplaceResult};Sys.Data.DataService._concatUris=function Sys$Data$DataService$_concatUris(a,b){if(a.endsWith("/")){a=a.substr(0,a.length-1)}if(b.startsWith("/")){b=b.substr(1)}return a+"/"+b};Sys.Data.DataService._callbackHelper=function Sys$Data$DataService$_callbackHelper(d,a,i,b,h,e){if(d.get_responseAvailable()){var f=d.get_statusCode();if(f==1223){f=204}var m=null;try{var l=d.getResponseHeader("Content-Type");if(l.startsWith("application/json")){m=d.get_objectDC()}else{if(l.startsWith("text/xml")){m=d.get_xml()}else{m=d.get_responseData()}}}catch(g){}var j=d.getResponseHeader("jsonerror");var k=(j==="true");if(k){if(m){m=new Sys.Data.DataServiceError(false,m.Message,m.StackTrace,m.ExceptionType)}}else{if(typeof(m.error)!=="undefined"){k=true;if(typeof(m.error.innererror)!=="undefined"){m=new Sys.Data.DataServiceError(false,m.error.innererror.message,m.error.innererror.stacktrace,m.error.innererror.type)}else{m=new Sys.Data.DataServiceError(false,m.error.message.value,"","")}}else{if(l.startsWith("application/json")){if(!m||typeof(m.d)==="undefined"){throw Sys.Data.DataService._createFailedError(e,String.format("The data operation '{0}' returned invalid data. The JSON wrapper is incorrect.",e))}m=m.d}}}if(((f<200)||(f>=300))||k){if(b){if(!m||!k){m=new Sys.Data.DataServiceError(false,String.format("The data operation '{0}' failed.",e),"","")}m._statusCode=f;b(m,h,e)}else{if(m&&k){j=m.get_exceptionType()+"-- "+m.get_message()}else{j=d.get_responseData()}throw Sys.Data.DataService._createFailedError(e,String.format("The data operation '{0}' failed with the following error: {1}",e,j))}}else{if(i){i(m,h,e)}}}else{var c;if(d.get_timedOut()){c=String.format("The data operation '{0}' timed out.",e)}else{c=String.format("The data operation '{0}' failed.",e)}if(b){b(new Sys.Data.DataServiceError(d.get_timedOut(),c,"",""),h,e)}else{throw Sys.Data.DataService._createFailedError(e,c)}}};Sys.Data.DataService._createFailedError=function Sys$Data$DataService$_createFailedError(b,c){var a="Sys.Data.DataServiceFailedException: "+c;var d=Error.create(a,{name:"Sys.Data.DataServiceFailedException",operation:b});d.popStackFrame();return d};Sys.Data.DataService.registerClass("Sys.Data.DataService");Sys.Data.DataServiceError=function Sys$Data$DataServiceError(b,d,a,c){var f=Function._validateParams(arguments,[{name:"timedOut",type:Boolean},{name:"message",type:String,mayBeNull:true},{name:"stackTrace",type:String,mayBeNull:true},{name:"exceptionType",type:String,mayBeNull:true}]);if(f){throw f}this._timedOut=b;this._message=d;this._stackTrace=a;this._exceptionType=c;this._statusCode=-1};function Sys$Data$DataServiceError$get_timedOut(){if(arguments.length!==0){throw Error.parameterCount()}return this._timedOut}function Sys$Data$DataServiceError$get_statusCode(){if(arguments.length!==0){throw Error.parameterCount()}return this._statusCode}function Sys$Data$DataServiceError$get_message(){if(arguments.length!==0){throw Error.parameterCount()}return this._message}function Sys$Data$DataServiceError$get_stackTrace(){if(arguments.length!==0){throw Error.parameterCount()}return this._stackTrace}function Sys$Data$DataServiceError$get_exceptionType(){if(arguments.length!==0){throw Error.parameterCount()}return this._exceptionType}Sys.Data.DataServiceError.prototype={get_timedOut:Sys$Data$DataServiceError$get_timedOut,get_statusCode:Sys$Data$DataServiceError$get_statusCode,get_message:Sys$Data$DataServiceError$get_message,get_stackTrace:Sys$Data$DataServiceError$get_stackTrace,get_exceptionType:Sys$Data$DataServiceError$get_exceptionType};Sys.Data.DataServiceError.registerClass("Sys.Data.DataServiceError");Sys.Data.QueryBuilder=function Sys$Data$QueryBuilder(b){var f=Function._validateParams(arguments,[{name:"uri",type:String}]);if(f){throw f}this._queryparams=new Object();this._uri=b;var d=b.indexOf("?");if(d>=0){this._uri=b.substr(0,d);var g=b.substr(d+1).split("&");for(var a in g){param=g[a];var c=param.indexOf("=");if(c>=0){this._queryparams[param.substr(0,c)]=param.substr(c+1)}else{this._queryparams[param]=""}}}};function Sys$Data$QueryBuilder$get_skip(){if(arguments.length!==0){throw Error.parameterCount()}return this._getIntParam("$skip")}function Sys$Data$QueryBuilder$set_skip(a){var b=Function._validateParams(arguments,[{name:"value",type:Number,mayBeNull:true,integer:true}]);if(b){throw b}this._setParam("$skip",a)}function Sys$Data$QueryBuilder$get_top(){if(arguments.length!==0){throw Error.parameterCount()}return this._getIntParam("$top")}function Sys$Data$QueryBuilder$set_top(a){var b=Function._validateParams(arguments,[{name:"value",type:Number,mayBeNull:true,integer:true}]);if(b){throw b}this._setParam("$top",a)}function Sys$Data$QueryBuilder$get_orderby(){if(arguments.length!==0){throw Error.parameterCount()}return this._getStringParam("$orderby")}function Sys$Data$QueryBuilder$set_orderby(a){var b=Function._validateParams(arguments,[{name:"value",type:String,mayBeNull:true}]);if(b){throw b}this._setParam("$orderby",a)}function Sys$Data$QueryBuilder$get_filter(){if(arguments.length!==0){throw Error.parameterCount()}return this._getStringParam("$filter")}function Sys$Data$QueryBuilder$set_filter(a){var b=Function._validateParams(arguments,[{name:"value",type:String,mayBeNull:true}]);if(b){throw b}this._setParam("$filter",a)}function Sys$Data$QueryBuilder$get_expand(){if(arguments.length!==0){throw Error.parameterCount()}return this._getStringParam("$expand")}function Sys$Data$QueryBuilder$set_expand(a){var b=Function._validateParams(arguments,[{name:"value",type:String,mayBeNull:true}]);if(b){throw b}this._setParam("$expand",a)}function Sys$Data$QueryBuilder$get_resourcePath(){if(arguments.length!==0){throw Error.parameterCount()}return this._uri}function Sys$Data$QueryBuilder$get_queryParams(){if(arguments.length!==0){throw Error.parameterCount()}return this._queryparams}function Sys$Data$QueryBuilder$toString(){if(arguments.length!==0){throw Error.parameterCount()}var e=new Array();for(var b in this._queryparams){if(!Array.contains(Sys.Data.QueryBuilder._queryOptions,b)){var d=this._queryparams[b];if(d!=null){Array.add(e,{key:b,value:d})}}}for(var a in Sys.Data.QueryBuilder._queryOptions){var b=Sys.Data.QueryBuilder._queryOptions[a];var d=this._queryparams[b];if(d!=null){Array.add(e,{key:b,value:d})}}var f=new Sys.StringBuilder(this._uri);var c=true;for(var a in e){f.append((c)?"?":"&");f.append(e[a].key);f.append("=");f.append(e[a].value);c=false}return f.toString()}function Sys$Data$QueryBuilder$_setParam(a,b){if(b==null){delete this._queryparams[a]}else{this._queryparams[a]=b}}function Sys$Data$QueryBuilder$_getStringParam(a){var b=this._queryparams[a];return(b===undefined)?null:b}function Sys$Data$QueryBuilder$_getIntParam(a){var b=parseInt(this._queryparams[a]);return(isNaN(b))?null:b}Sys.Data.QueryBuilder.prototype={get_skip:Sys$Data$QueryBuilder$get_skip,set_skip:Sys$Data$QueryBuilder$set_skip,get_top:Sys$Data$QueryBuilder$get_top,set_top:Sys$Data$QueryBuilder$set_top,get_orderby:Sys$Data$QueryBuilder$get_orderby,set_orderby:Sys$Data$QueryBuilder$set_orderby,get_filter:Sys$Data$QueryBuilder$get_filter,set_filter:Sys$Data$QueryBuilder$set_filter,get_expand:Sys$Data$QueryBuilder$get_expand,set_expand:Sys$Data$QueryBuilder$set_expand,get_resourcePath:Sys$Data$QueryBuilder$get_resourcePath,get_queryParams:Sys$Data$QueryBuilder$get_queryParams,toString:Sys$Data$QueryBuilder$toString,_setParam:Sys$Data$QueryBuilder$_setParam,_getStringParam:Sys$Data$QueryBuilder$_getStringParam,_getIntParam:Sys$Data$QueryBuilder$_getIntParam};Sys.Data.QueryBuilder._queryOptions=new Array("$filter","$orderby","$skip","$top");Sys.Data.QueryBuilder.registerClass("Sys.Data.QueryBuilder");Sys.Serialization.JavaScriptSerializer._serializeWithBuilderDC=function(s,t,l,n){var r;switch(typeof s){case"object":if(s){if(Number.isInstanceOfType(s)){Sys.Serialization.JavaScriptSerializer._serializeNumberWithBuilder(s,t)}else{if(Boolean.isInstanceOfType(s)){Sys.Serialization.JavaScriptSerializer._serializeBooleanWithBuilder(s,t)}else{if(String.isInstanceOfType(s)){Sys.Serialization.JavaScriptSerializer._serializeStringWithBuilder(s,t)}else{if(Array.isInstanceOfType(s)){t.append("[");for(r=0;r<s.length;++r){if(r>0){t.append(",")}Sys.Serialization.JavaScriptSerializer._serializeWithBuilderDC(s[r],t,false,n)}t.append("]")}else{if(Date.isInstanceOfType(s)){t.append('"\\/Date(');t.append(s.getTime()-s.getTimezoneOffset()*60000);t.append(')\\/"');break}var q=[],o=0;for(var p in s){if(p.startsWith("$")){continue}if(p===Sys.Serialization.JavaScriptSerializer._serverTypeFieldName&&o!==0){q[o++]=q[0];q[0]=p}else{q[o++]=p}}if(l){q.sort()}t.append("{");var k=false;for(r=0;r<o;r++){var m=s[q[r]];if(typeof m!=="undefined"&&typeof m!=="function"){if(k){t.append(",")}else{k=true}Sys.Serialization.JavaScriptSerializer._serializeWithBuilderDC(q[r],t,l,n);t.append(":");Sys.Serialization.JavaScriptSerializer._serializeWithBuilderDC(m,t,l,n)}}t.append("}")}}}}}else{t.append("null")}break;case"number":Sys.Serialization.JavaScriptSerializer._serializeNumberWithBuilder(s,t);break;case"string":Sys.Serialization.JavaScriptSerializer._serializeStringWithBuilder(s,t);break;case"boolean":Sys.Serialization.JavaScriptSerializer._serializeBooleanWithBuilder(s,t);break;default:t.append("null")}};Sys.Serialization.JavaScriptSerializer.serializeDC=function(c){var d=new Sys.StringBuilder;Sys.Serialization.JavaScriptSerializer._serializeWithBuilderDC(c,d,false);return d.toString()};Sys.Serialization.JavaScriptSerializer.deserializeDC=function(data,secure){if(data.length===0){throw Error.argument("data",Sys.Res.cannotDeserializeEmptyString)}try{var exp=data.replace(Sys.Serialization.JavaScriptSerializer._dateRegEx,"$1new Date((new Date($2)).valueOf() + (new Date($2)).getTimezoneOffset() * 60000)");if(secure&&Sys.Serialization.JavaScriptSerializer._jsonRegEx.test(exp.replace(Sys.Serialization.JavaScriptSerializer._jsonStringRegEx,""))){throw null}return eval("("+exp+")")}catch(a){throw Error.argument("data",Sys.Res.cannotDeserializeInvalidJson)}};Sys.Net.WebRequestExecutor.prototype.get_objectDC=function(){if(!this._resultObject){this._resultObject=Sys.Serialization.JavaScriptSerializer.deserializeDC(this.get_responseData())}return this._resultObject};if(typeof(Sys)!=="undefined"){Sys.Application.notifyScriptLoaded()}; 
/* 
 * AppGeo.Web.Extensions.js 
 * (c) 2007-2009, Applied Geographics, Inc. All rights reserved. 
 */ 
 
Type.registerNamespace("Ag");String.isNullOrEmpty=function String$isNullOrEmpty(a){return(typeof(a)==="undefined"||!String.isInstanceOfType(a)||a===null||a.length===0)};if(typeof(Sys.Browser.Chrome)==="undefined"){Sys.Browser.Chrome={};if(navigator.userAgent.indexOf(" Chrome/")>-1){Sys.Browser.agent=Sys.Browser.Chrome;Sys.Browser.version=parseFloat(navigator.userAgent.match(/ Chrome\/(\d+(\.\d+)?)/)[1]);Sys.Browser.name="Chrome"}}Ag.StorageType=function(){if(arguments.length!==0){throw Error.parameterCount()}throw Error.notImplemented()};Ag.StorageType.prototype={none:0,dom:1,userData:2,gears:3};Ag.StorageType.registerEnum("Ag.StorageType");Sys.Browser.storage=Ag.StorageType.none;switch(Sys.Browser.agent){case Sys.Browser.InternetExplorer:switch(Sys.Browser.version){case 6:case 7:Sys.Browser.storage=Ag.StorageType.userData;break;case 8:Sys.Browser.storage=Ag.StorageType.dom;break}break;case Sys.Browser.Firefox:Sys.Browser.storage=Ag.StorageType.dom;break;case Sys.Browser.Safari:switch(Sys.Browser.version){case 4:Sys.Browser.storage=Ag.StorageType.dom;break}break;case Sys.Browser.Chrome:Sys.Browser.storage=Ag.StorageType.gears;break};(function(){if(window.google&&google.gears){return}var a=null;if(typeof GearsFactory!="undefined"){a=new GearsFactory()}else{try{a=new ActiveXObject("Gears.Factory");if(a.getBuildInfo().indexOf("ie_mobile")!=-1){a.privateSetGlobalObject(this)}}catch(b){if((typeof navigator.mimeTypes!="undefined")&&navigator.mimeTypes["application/x-googlegears"]){a=document.createElement("object");a.style.display="none";a.width=0;a.height=0;a.type="application/x-googlegears";document.documentElement.appendChild(a)}}}if(!a){return}if(!window.google){google={}}if(!google.gears){google.gears={factory:a}}})();Type.registerNamespace("Ag");Ag.AppState=function(){Ag.AppState.initializeBase(this);this.$_autoPromote=true;this.$_storage=null};Ag.AppState.prototype={initialize:function(){Ag.AppState.callBaseMethod(this,"initialize");switch(Sys.Browser.storage){case Ag.StorageType.dom:try{this.$_storage=globalStorage[AgContext.ApplicationName+"."+window.location.hostname]}catch(g){Sys.Debug.trace("Global DOM storage is not available, cross-document state sharing is disabled");this.$_storage=sessionStorage}break;case Ag.StorageType.userData:this.$_storage=$common.createElementFromTemplate({nodeName:"div",properties:{id:this.get_id()+"_userData",style:{behavior:"url(#default#userdata)"}}},document.getElementsByTagName("body")[0]);break;case Ag.StorageType.gears:this.$_storage=google.gears.factory.create("beta.database");this.$_storage.open("AppGeo.Web.Extensions");this.$_storage.execute("create table if not exists AppState (ItemKey text, ItemValue text)");break}if(this.$_autoPromote){switch(Sys.Browser.storage){case Ag.StorageType.dom:for(var d=0;d<this.$_storage.length;d++){var c=this.$_storage.getItem(this.$_storage.key(d));if(c!=null){this[this.$_storage.key(d)]=Sys.Serialization.JavaScriptSerializer.deserialize(c.toString())}}break;case Ag.StorageType.userData:this.$_storage.load("xmlStore");for(var d=0;d<this.$_storage.XMLDocument.childNodes[0].attributes.length;d++){var a=this.$_storage.XMLDocument.childNodes[0].attributes[d];if(a!=null){this[a.nodeName]=Sys.Serialization.JavaScriptSerializer.deserialize(a.nodeValue)}}break;case Ag.StorageType.gears:var b=this.$_storage.execute("select * from AppState");while(b.isValidRow()){var f=b.field(1);if(f!=null){this[b.field(0)]=Sys.Serialization.JavaScriptSerializer.deserialize(f)}b.next()}b.close();break}}},dispose:function(){Ag.AppState.callBaseMethod(this,"dispose")},clear:function(){switch(Sys.Browser.storage){case Ag.StorageType.dom:if(this.$_autoPromote){for(var c=0;c<this.$_storage.length;c++){delete this[this.$_storage.key(c)]}}while(this.$_storage.length>0){this.$_storage.removeItem(this.$_storage.key(0))}break;case Ag.StorageType.userData:this.$_storage.load("xmlStore");var d=0;while(this.$_storage.XMLDocument.childNodes[0].attributes.length>d){var a=this.$_storage.XMLDocument.childNodes[0].attributes[d];if(a!=null){if(this.$_autoPromote){delete this[a.nodeName]}this.$_storage.removeAttribute(a.nodeName)}else{d++}}this.$_storage.save("xmlStore");break;case Ag.StorageType.gears:if(this.$_autoPromote){var b=this.$_storage.execute("select ItemKey from AppState");while(b.isValidRow()){delete this[b.field(0)];b.next()}b.close()}this.$_storage.execute("delete from AppState");break}},contains:function(c){switch(Sys.Browser.storage){case Ag.StorageType.dom:return this.$_storage.getItem(c)!=null;case Ag.StorageType.userData:this.$_storage.load("xmlStore");return this.$_storage.getAttribute(c)!=null;case Ag.StorageType.gears:var b=this.$_storage.execute("select ItemKey from AppState where ItemKey = ?",[c]);var a=b.isValidRow();b.close();return a}},encode:function(){var d={};switch(Sys.Browser.storage){case Ag.StorageType.dom:for(var f=0;f<this.$_storage.length;f++){var c=this.$_storage.getItem(this.$_storage.key(f));if(c!=null){d[this.$_storage.key(f)]=Sys.Serialization.JavaScriptSerializer.deserialize(c.toString())}}break;case Ag.StorageType.userData:this.$_storage.load("xmlStore");for(var f=0;f<this.$_storage.XMLDocument.childNodes[0].attributes.length;f++){var a=this.$_storage.XMLDocument.childNodes[0].attributes[f];if(a!=null){d[a.nodeName]=Sys.Serialization.JavaScriptSerializer.deserialize(a.nodeValue)}}break;case Ag.StorageType.gears:var b=this.$_storage.execute("select * from AppState");while(b.isValidRow()){d[b.field(0)]=Sys.Serialization.JavaScriptSerializer.deserialize(b.field(1));b.next()}b.close();break}var e=Sys.Serialization.JavaScriptSerializer.serialize(d);return encodeURIComponent(e)},getItem:function(d){var c=null;switch(Sys.Browser.storage){case Ag.StorageType.dom:var b=this.$_storage.getItem(d);c=(b==null?null:b.toString());break;case Ag.StorageType.userData:this.$_storage.load("xmlStore");c=this.$_storage.getAttribute(d);break;case Ag.StorageType.gears:var a=this.$_storage.execute("select ItemValue from AppState where ItemKey = ?",[d]);if(a.isValidRow()){c=a.field(0)}a.close();break}return c==null?null:Sys.Serialization.JavaScriptSerializer.deserialize(c)},remove:function(a){if(this.$_autoPromote){delete this[a]}switch(Sys.Browser.storage){case Ag.StorageType.dom:this.$_storage.removeItem(a);break;case Ag.StorageType.userData:this.$_storage.removeAttribute(a);this.$_storage.save("xmlStore");break;case Ag.StorageType.gears:this.$_storage.execute("delete from AppState where ItemKey = ?",[a]);break}},setItem:function(b,c){var a=Sys.Serialization.JavaScriptSerializer.serialize(c);switch(Sys.Browser.storage){case Ag.StorageType.dom:this.$_storage.setItem(b,a);break;case Ag.StorageType.userData:this.$_storage.setAttribute(b,a);this.$_storage.save("xmlStore");break;case Ag.StorageType.gears:if(this.contains(b)){this.$_storage.execute("update AppState set ItemValue = ? where ItemKey = ?",[a,b])}else{this.$_storage.execute("insert into AppState values (?, ?)",[b,a])}break}if(this.$_autoPromote){this[b]=c}},setItems:function(b,a){for(var d in b){var c=b[d];if(a||this.getItem(d)==null){this.setItem(d,c)}}},get_autoPromote:function(){return this.$_autoPromote},set_autoPromote:function(a){this.$_autoPromote=a}};Ag.AppState.registerClass("Ag.AppState",Sys.Component);Type.registerNamespace("Ag");Ag.ArgumentEncoder=function(){if(arguments.length!==0){throw Error.parameterCount()}};Ag.ArgumentEncoder.registerClass("Ag.ArgumentEncoder");Ag.ArgumentEncoder.decode=function(c,a){var d=decodeURIComponent(c);var b=Sys.Serialization.JavaScriptSerializer.deserialize(d);if(arguments.length===2){$common.applyProperties(a,b)}return b};Ag.ArgumentEncoder.encode=function(a){var b=Sys.Serialization.JavaScriptSerializer.serialize(a);return encodeURIComponent(b)};Type.registerNamespace("Ag");Ag.QueryString=function(){this._allKeys=[];var f=window.location.search.substring(1);var e=f.split("&");for(var c=0;c<e.length;c++){var a=e[c].indexOf("=");if(a>0){var b=e[c].substring(0,a);var d=e[c].substring(a+1);this[b]=d;Array.add(this._allKeys,b)}}};Ag.QueryString.prototype={get_allKeys:function(){return this._allKeys},contains:function(a){return Array.contains(this._allKeys,a)}};Ag.QueryString.registerClass("Ag.QueryString");Type.registerNamespace("Ag");Type.registerNamespace("Ag.Net");Ag.Net.ProxyCall=function(e,b,a,c,l,h){this._service=typeof(e)!=="undefined"?e:null;this._verb=typeof(b)!=="undefined"?b:"GET";this._method=typeof(a)!=="undefined"?a:"";this._params=typeof(c)!=="undefined"?c:null;this._target="";this._isFormPost=false;this._isDataMethod=false;this._webRequest=null;this._succeededCallback=null;this._failedCallback=null;if(String.isInstanceOfType(e)){this._isFormPost=true;this._target=l}else{this._isDataMethod=Sys.Data.DataService.isInstanceOfType(this._service);if(this._isDataMethod&&this._method.length>0&&this._method.charAt(0)!="/"){this._method="/"+this._method}if(!this._isDataMethod&&b!=="GET"){throw Error.argument(b,"Only DataServices support insert, update and delete operations")}var k=/\.asmx|\.svc|[\.\\\/]/g;var f=this.get_name().replace(k,"");var j=this._method.replace(k,"");if(typeof(l)==="undefined"||l==null){if(e.get_defaultSucceededCallback()!=null){l=e.get_defaultSucceededCallback()}else{if(String.isInstanceOfType(a)){var i=f+"_"+j+"_succeeded";try{l=$common.resolveFunction(i)}catch(g){l=null}}}}if(typeof(h)==="undefined"||h==null){if(e.get_defaultFailedCallback()!=null){h=e.get_defaultFailedCallback()}else{if(String.isInstanceOfType(a)){var d=f+"_"+j+"_failed";try{h=$common.resolveFunction(d)}catch(g){h=null}}}}this._succeededCallback=l;this._failedCallback=h}};Ag.Net.ProxyCall.prototype={equals:function(a){return(a.get_path()==this.get_path()&&a.get_method()==this._method)},get_service:function(){return this._service},set_service:function(a){this._service=a},get_verb:function(){return this._verb},set_verb:function(a){this._verb=a},get_path:function(){if(this._service!=null){if(this._isFormPost){return this._service}else{if(this._isDataMethod){return this._service.get_serviceUri()}else{return this._service.get_path()}}}else{return""}},get_name:function(){if(this._service!=null){if(this._isDataMethod){var a=this._service.get_serviceUri().split("/");return a[a.length-1]}else{var a=this._service.get_path().split("/");return a[a.length-1]}}else{return""}},get_isDataMethod:function(){return this._isDataMethod},get_method:function(){return this._method},get_isFormPost:function(){return this._isFormPost},get_method:function(){return this._method},set_method:function(a){this._method=a},get_params:function(){return this._params},set_params:function(a){this._params=a},get_succeededCallback:function(){return this._succeededCallback},set_succeededCallback:function(a){this._succeededCallback=a},get_failedCallback:function(){return this._failedCallback},set_failedCallback:function(a){this._failedCallback=a},get_target:function(){return this._target},set_target:function(a){this._target=a},get__webRequest:function(){return this._webRequest},set__webRequest:function(a){this._webRequest=a}};Ag.Net.ProxyCall.registerClass("Ag.Net.ProxyCall");Ag.Net.WebRequestQueue=function(){Ag.Net.WebRequestQueue.initializeBase(this);this._invokingHandler=Function.createDelegate(this,this._webRequestManager_invokingRequest);this._completedHandler=Function.createDelegate(this,this._webRequestManager_completedRequest);this._requestQueue=[];this._currentProxy=null;this._executing=false;this._externalRequestCount=0};Ag.Net.WebRequestQueue.prototype={initialize:function(){Ag.Net.WebRequestQueue.callBaseMethod(this,"initialize");Sys.Net.WebRequestManager.add_invokingRequest(this._invokingHandler);Sys.Net.WebRequestManager.add_completedRequest(this._completedHandler)},dispose:function(){Sys.Net.WebRequestManager.remove_invokingRequest(this._invokingHandler);Sys.Net.WebRequestManager.remove_completedRequest(this._completedHandler);Ag.Net.WebRequestQueue.callBaseMethod(this,"dispose")},cancel:function(a,e){var d=this._executing||this._requestQueue.length>0;var c=new Ag.Net.ProxyCall(a,"GET",e);if(this._executing){if(this._currentProxy.equals(c)){this._currentProxy.get__webRequest().get_executor().abort();Sys.Debug.trace(String.format("WebRequestQueue.cancel - {0}.{1} aborted",this._currentProxy.get_name(),e));this._executing=false;this._currentProxy=null}}for(var b=0;b<this._requestQueue.length;b++){if(this._requestQueue[b].equals(c)){Array.removeAt(this._requestQueue,b);b--}}if(this._requestQueue.length>0){this.executeQueue()}else{if(d){this._onRequestsCompleted()}}},clear:function(){var a=this._executing||this._requestQueue.length>0;if(this._executing){this._currentProxy.get__webRequest().get_executor().abort();Sys.Debug.trace(String.format("WebRequestQueue.clear - {0}.{1} aborted",this._currentProxy.get_name(),method));this._executing=false;this._currentProxy=null}this._requestQueue=[];if(a){this._onRequestsCompleted()}},executeQueue:function(){while(this._requestQueue.length>0&&!this._executing){var e=Array.dequeue(this._requestQueue);if(e!=null){if(e.get_isFormPost()){var c=document.forms.namedItem("Ag_Net_WebRequestQueue_Form");if(c!=null){$common.removeElement(c)}c=$common.createElementFromTemplate({nodeName:"form",properties:{id:"Ag_Net_WebRequestQueue_Form",action:e.get_path(),method:"POST",target:e.get_target()}},document.body);var d=e.get_params();for(var b in d){var h=null;if(String.isInstanceOfType(d[b])||Number.isInstanceOfType(d[b])){h=d[b]}else{h=Sys.Serialization.JavaScriptSerializer.serialize(d[b])}$common.createElementFromTemplate({nodeName:"input",properties:{type:"hidden",name:b,value:h}},c)}c.submit();if(this._requestQueue.length==0){this._onRequestsCompleted()}}else{this._currentProxy=e;var i=null;if(e.get_isDataMethod()){i=new Sys.Net.WebRequest();var g=e.get_method();switch(e.get_verb()){case"GET":var f=new Sys.StringBuilder();var d=e.get_params();for(var b in d){if(String.isInstanceOfType(d[b])){if(b.startsWith("$")){f.append(String.format("{0}={1}",b,d[b]))}else{f.append(String.format("{0}='{1}'",b,d[b]))}}else{if(Date.isInstanceOfType(d[b])){if(!(isNaN(d[b])||isNaN(d[b].valueOf()))){f.append(String.format("{0}=datetime'{1}'",b,d[b].format("s")))}}else{if(!isNaN(d[b])){f.append(String.format("{0}={1}",b,d[b]))}}}}var a=f.toString("&");if(a.length>0){g+="?"+a}e.get_service().query(g,e.get_succeededCallback(),e.get_failedCallback(),null,i);break;case"POST":i=e.get_service().insert(e.get_params(),g,e.get_succeededCallback(),e.get_failedCallback(),null,i);break;case"PUT":i=e.get_service().update(e.get_params(),g,e.get_succeededCallback(),e.get_failedCallback(),null,i);break;case"DELETE":i=e.get_service().remove(e.get_params(),g,e.get_succeededCallback(),e.get_failedCallback(),null,i);break}}else{i=Sys.Net.WebServiceProxy.invoke(e.get_path(),e.get_method(),false,e.get_params(),e.get_succeededCallback(),e.get_failedCallback())}e.set__webRequest(i)}}}},newContent:function(a,d,c){c=(typeof(c)!=="undefined"?c:"");var b=new Ag.Net.ProxyCall(a,"POST",null,d,c);this._queueProxy(b)},queue:function(a,f,e,d,c){var b=new Ag.Net.ProxyCall(a,"GET",f,e,d,c);this._queueProxy(b)},queueInsert:function(a,f,d,e,c){var b=new Ag.Net.ProxyCall(a,"POST",f,d,e,c);this._queueProxy(b)},queueUpdate:function(a,f,d,e,c){var b=new Ag.Net.ProxyCall(a,"PUT",f,d,e,c);this._queueProxy(b)},queueDelete:function(a,f,d,e,c){var b=new Ag.Net.ProxyCall(a,"DELETE",f,d,e,c);this._queueProxy(b)},queueExternal:function(a){if(typeof(a)==="undefined"){a=1}if(a&&a>0){this._externalRequestCount+=a;this._onRequestsQueued()}},completedExternal:function(a){if(typeof(a)==="undefined"){a=1}if(a&&a>0){this._externalRequestCount=(a>this._externalRequestCount?0:this._externalRequestCount-a);if(this._requestQueue.length==0&&this._externalRequestCount==0){this._onRequestsCompleted()}}},get_length:function(){return this._requestQueue.length+this._externalRequestCount},add_requestsCompleted:function(a){this.get_events().addHandler("requestsCompleted",a)},remove_requestsCompleted:function(a){this.get_events().removeHandler("requestsCompleted",a)},add_requestsQueued:function(a){this.get_events().addHandler("requestsQueued",a)},remove_requestsQueued:function(a){this.get_events().removeHandler("requestsQueued",a)},_onRequestsCompleted:function(){var a=this.get_events().getHandler("requestsCompleted");if(a!==null){a(this,Sys.EventArgs.Empty)}},_onRequestsQueued:function(){var a=this.get_events().getHandler("requestsQueued");if(a!==null){a(this,Sys.EventArgs.Empty)}},_queueProxy:function(a){if(this._requestQueue.length==0){this._onRequestsQueued()}Array.enqueue(this._requestQueue,a);if(!this._executing){this.executeQueue()}},_webRequestManager_invokingRequest:function(a,b){this._executing=true},_webRequestManager_completedRequest:function(b,a){this._executing=false;this._currentProxy=null;if(this._requestQueue.length==0&&this._externalRequestCount==0){this._onRequestsCompleted()}else{if(this._requestQueue.length>0){this.executeQueue()}}}};Ag.Net.WebRequestQueue.registerClass("Ag.Net.WebRequestQueue",Sys.Component);Type.registerNamespace("Ag");Type.registerNamespace("Ag.Geo");Ag.Geo.Envelope=function(b,d,a,c){this.minx=NaN;this.miny=NaN;this.maxx=NaN;this.maxy=NaN;if(arguments.length==4){this.minx=Math.min(b,a);this.miny=Math.min(d,c);this.maxx=Math.max(b,a);this.maxy=Math.max(d,c)}};Ag.Geo.Envelope.fromObject=function(a){return new Ag.Geo.Envelope(a.minx,a.miny,a.maxx,a.maxy)};Ag.Geo.Envelope.prototype={clone:function(){return new Ag.Geo.Envelope(this.minx,this.miny,this.maxx,this.maxy)},contains:function(a){if(Ag.Geo.Coordinate.isInstanceOfType(a)){return this._containsCoord([a])}else{if(Ag.Geo.Point.isInstanceOfType(a)){return this._containsCoord([a.coordinate])}else{if(Ag.Geo.LineString.isInstanceOfType(a)){return this._containsCoord(a.coordinates)}else{if(Ag.Geo.Polygon.isInstanceOfType(a)){return this._containsCoord(a.exteriorRing.coordinates)}else{throw Error.argumentType("geometry",null,null,"Must be Coordinate, Point, LineString or Polygon")}}}}},equals:function(a){if(this.get_isEmpty()&&a.get_isEmpty()){return true}return(this.minx==a.minx&&this.miny==a.miny&&this.maxx==a.maxx&&this.maxy==a.maxy)},reaspect:function(f){var e=this.get_width();var a=this.get_height();if(e==0||a==0||f<=0){return}var d;var b;if(e/a>f){d=e/2;b=d/f}else{b=a/2;d=b*f}var g=this.get_center();this.minx=g.x-d;this.miny=g.y-b;this.maxx=g.x+d;this.maxy=g.y+b},scaleBy:function(d){var e=this.get_center();var b=this.get_width()*d/2;var a=this.get_height()*d/2;this.minx=e.x-b;this.miny=e.y-a;this.maxx=e.x+b;this.maxy=e.y+a},toString:function(){return String.format("ENVELOPE({0},{1},{2},{3})",this.minx,this.miny,this.maxx,this.maxy)},get_center:function(){return new Ag.Geo.Coordinate((this.minx+this.maxx)/2,(this.miny+this.maxy)/2)},set_center:function(e){var d=this.get_center();var b=e.x-d.x;var a=e.y-d.y;this.minx+=b;this.miny+=a;this.maxx+=b;this.maxy+=a},get_height:function(){return this.maxy-this.miny},get_isEmpty:function(){return isNaN(this.minx)||isNaN(this.miny)||isNaN(this.maxx)||isNaN(this.maxy)},get_width:function(){return this.maxx-this.minx},_containsCoord:function(b){for(var a=0;a<b.length;a++){var d=b[a];if(this.minx<=d.x&&d.x<=this.maxx&&this.miny<=d.y&&d.y<=this.maxy){return true}}return false}};Ag.Geo.Envelope.registerClass("Ag.Geo.Envelope");Ag.Geo.Coordinate=function(a,b){this.x=(typeof(a)!=="undefined"?a:NaN);this.y=(typeof(b)!=="undefined"?b:NaN)};Ag.Geo.Coordinate.fromObject=function(a){return new Ag.Geo.Coordinate(a.x,a.y)};Ag.Geo.Coordinate.prototype={get_isEmpty:function(){return isNaN(this.x)||isNaN(this.y)},toString:function(){return this.x+" "+this.y}};Ag.Geo.Coordinate.registerClass("Ag.Geo.Coordinate");Ag.Geo.GeometryType=function(){if(arguments.length!==0){throw Error.parameterCount()}throw Error.notImplemented()};Ag.Geo.GeometryType.prototype={point:0,lineString:1,polygon:2,multiPoint:3,multiLineString:4,multiPolygon:5,geometryCollection:6};Ag.Geo.GeometryType.registerEnum("Ag.Geo.GeometryType");Ag.Geo.Geometry=function(){};Ag.Geo.Geometry.fromObject=function(a){if("x" in a&&"y" in a){return new Ag.Geo.Point(a.x,a.y)}else{if("coordinate" in a){return Ag.Geo.Point.fromObject(a)}else{if("coordinates" in a){return Ag.Geo.LineString.fromObject(a)}else{if("exteriorRing" in a){return Ag.Geo.Polygon.fromObject(a)}else{if("_points" in a){return Ag.Geo.MultiPoint.fromObject(a)}else{if("_lineStrings" in a){return Ag.Geo.MultiLineString.fromObject(a)}else{if("_polygons" in a){return Ag.Geo.MultiPolygon.fromObject(a)}else{if("_geometries" in a){return Ag.Geo.GeometryCollection.fromObject(a)}else{throw Error.argument("o","An object passed to Geometry.fromObject does not match a Geometry pattern")}}}}}}}}};Ag.Geo.Geometry.prototype={get_geometryType:function(){throw Error.notImplemented()},distance:function(a){throw Error.notImplemented("The distance method is not implemented for that geometry combination")},toFormattedString:function(a){switch(a){case"n":return this.get_isEmpty()?"0":"1";default:return this.toString()}}};Ag.Geo.Geometry.registerClass("Ag.Geo.Geometry");Ag.Geo.Point=function(a,b){Ag.Geo.Point.initializeBase(this);if(Ag.Geo.Coordinate.isInstanceOfType(a)){this.coordinate=a}else{this.coordinate=new Ag.Geo.Coordinate(a,b)}};Ag.Geo.Point.fromObject=function(a){return new Ag.Geo.Point(a.coordinate.x,a.coordinate.y)};Ag.Geo.Point.prototype={get_geometryType:function(){return Ag.Geo.GeometryType.point},get_isEmpty:function(){return this.coordinate.get_isEmpty()},get_x:function(){return this.coordinate.x},set_x:function(a){this.coordinate.x=a},get_y:function(){return this.coordinate.y},set_y:function(a){this.coordinate.y=a},distance:function(a){if(Ag.Geo.Coordinate.isInstanceOfType(a)){var c=a.x-this.coordinate.x;var b=a.y-this.coordinate.y;return Math.sqrt((c*c)+(b*b))}else{if(Ag.Geo.Point.isInstanceOfType(a)){var c=a.coordinate.x-this.coordinate.x;var b=a.coordinate.y-this.coordinate.y;return Math.sqrt((c*c)+(b*b))}else{if(Ag.Geo.LineString.isInstanceOfType(a)){return a.distance(this)}else{if(Ag.Geo.Polygon.isInstanceOfType(a)){return a.distance(this)}else{throw Error.notImplemented("The distance method is not implemented for that geometry combination")}}}}},toString:function(){return"POINT "+this.toUntaggedString()},toUntaggedString:function(){if(this.get_isEmpty()){return"EMPTY"}else{return"("+this.coordinate+")"}}};Ag.Geo.Point.registerClass("Ag.Geo.Point",Ag.Geo.Geometry);Ag.Geo.LineString=function(a){Ag.Geo.LineString.initializeBase(this);if(typeof(a)!=="undefined"){this.coordinates=a}else{this.coordinates=[]}};Ag.Geo.LineString.fromObject=function(c){var b=new Ag.Geo.LineString();if(c.coordinates!=null){for(var a=0;a<c.coordinates.length;a++){Array.add(b.coordinates,new Ag.Geo.Coordinate(c.coordinates[a].x,c.coordinates[a].y))}}return b};Ag.Geo.LineString.prototype={get_geometryType:function(){return Ag.Geo.GeometryType.lineString},get_isEmpty:function(){return this.coordinates.length==0},get_length:function(){var e=0;for(var c=1;c<this.coordinates.length;++c){var b=this.coordinates[c].x-this.coordinates[c-1].x;var a=this.coordinates[c].y-this.coordinates[c-1].y;e+=Math.sqrt((b*b)+(a*a))}return e},distance:function(a){if(Ag.Geo.Point.isInstanceOfType(a)){return this._distanceToCoord(a.coordinate)}else{throw Error.notImplemented("The distance method is not implemented for that geometry combination")}},toString:function(){return"LINESTRING "+this.toUntaggedString()},toUntaggedString:function(){if(this.get_isEmpty()){return"EMPTY"}else{var b="(";for(var a=0;a<this.coordinates.length;a++){if(a>0){b+=", "}b+=this.coordinates[a]}b+=")";return b}},_distanceToCoord:function(j){var o=Number.POSITIVE_INFINITY;if(this.coordinates.length>0){var n=this.coordinates[0];var q=j.x-n.x;var p=j.y-n.y;if(this.coordinates.length==1){return Math.sqrt(q*q+p*p)}else{for(var g=1;g<this.coordinates.length;++g){var l=this.coordinates[g];var m=l.x-n.x;var k=l.y-n.y;var f=j.x-l.x;var e=j.y-l.y;var h=this._segmentDistanceToPoint2(m,k,q,p,f,e);if(h==0){return 0}if(h<o){o=h}n=l;q=f;p=e}}}return Math.sqrt(o)},_segmentDistanceToPoint2:function(d,c,b,a,f,e){var h=d*b+c*a;if(h<=0){return b*b+a*a}var g=d*d+c*c;if(h>=g){return f*f+e*e}return b*b+a*a-h*h/g}};Ag.Geo.LineString.registerClass("Ag.Geo.LineString",Ag.Geo.Geometry);Ag.Geo.Polygon=function(a){Ag.Geo.Polygon.initializeBase(this);this.exteriorRing=new Ag.Geo.LineString(a);this.interiorRings=[]};Ag.Geo.Polygon.fromObject=function(c){var b=new Ag.Geo.Polygon();b.exteriorRing=Ag.Geo.LineString.fromObject(c.exteriorRing);if(c.interiorRings!=null){for(var a=0;a<c.interiorRings.length;a++){Array.add(b.interiorRings,Ag.Geo.LineString.fromObject(c.interiorRings[a]))}}return b};Ag.Geo.Polygon.prototype={get_area:function(){var b=0;var e=this.exteriorRing.coordinates;for(var d=1;d<=e.length;++d){var c=d%e.length;b+=(e[d-1].x-e[c].x)*(e[d-1].y+e[c].y)/2}return Math.abs(b)},get_centroid:function(){var b=0;var h=new Ag.Geo.Coordinate(0,0);var f=this.exteriorRing.coordinates;for(var e=1;e<=f.length;++e){var d=e%f.length;var g=(f[e-1].x*f[d].y)-(f[d].x*f[e-1].y);b+=g;h.x+=(f[e-1].x+f[d].x)*g;h.y+=(f[e-1].y+f[d].y)*g}if(b==0){return null}b*=3;h.x/=b;h.y/=b;return h},get_geometryType:function(){return Ag.Geo.GeometryType.polygon},get_isEmpty:function(){return this.exteriorRing.get_isEmpty()},distance:function(a){if(Ag.Geo.Point.isInstanceOfType(a)){if(this._containsCoord(a.coordinate)){return 0}else{return this.exteriorRing.distance(a)}}else{throw Error.notImplemented("The distance method is not implemented for that geometry combination")}},toString:function(){return"POLYGON "+this.toUntaggedString()},toUntaggedString:function(){if(this.get_isEmpty()){return"EMTPY"}else{var b="(";b+=this.exteriorRing.toUntaggedString();for(var a=0;a<this.interiorRings.length;a++){b+=", ";b+=this.interiorRings[a].toUntaggedString()}b+=")";return b}},_containsCoord:function(j){if(this.exteriorRing.coordinates.length<3){return false}var h=0;var f=this.exteriorRing.coordinates[0];for(var g=1;g<this.exteriorRing.coordinates.length;++g){var e=this.exteriorRing.coordinates[g];if((f.y<=j.y&&j.y<e.y)||(e.y<=j.y&&j.y<f.y)&&(j.x<f.x||j.x<e.x)){var d=f.x+(e.x-f.x)*(j.y-f.y)/(e.y-f.y);if(d>j.x){++h}}f=e}return h%2==1}};Ag.Geo.Polygon.registerClass("Ag.Geo.Polygon",Ag.Geo.Geometry);Ag.Geo.MultiPoint=function(){Ag.Geo.MultiPoint.initializeBase(this);this._points=[]};Ag.Geo.MultiPoint.fromObject=function(b){if(b==null){throw Error.argumentNull("o")}var a=new Ag.Geo.MultiPoint();a._points=b._points;return a};Ag.Geo.MultiPoint.prototype={get_count:function(){return this._points.length},get_geometryType:function(){return Ag.Geo.GeometryType.multiPoint},add:function(a){this.setItem(this._points.length,a)},clear:function(){this._points=[]},getItem:function(a){if(a<0||a>=this._points.length){throw Error.argumentOutOfRange("index",a)}if(!Ag.Geo.Point.isInstanceOfType(this._points[a])){this._points[a]=Ag.Geo.Point.fromObject(this._points[a])}return this._points[a]},setItem:function(a,b){if(a<0||a>this._points.length){throw Error.argumentOutOfRange("index",a)}this._points[a]=b},removeAt:function(a){Array.removeAt(this._points,a)}};Ag.Geo.MultiPoint.registerClass("Ag.Geo.MultiPoint",Ag.Geo.Geometry);Ag.Geo.MultiLineString=function(){Ag.Geo.MultiLineString.initializeBase(this);this._lineStrings=[]};Ag.Geo.MultiLineString.fromObject=function(b){if(b==null){throw Error.argumentNull("o")}var a=new Ag.Geo.MultiLineString();a._lineStrings=b._lineStrings;return a};Ag.Geo.MultiLineString.prototype={get_count:function(){return this._lineStrings.length},get_geometryType:function(){return Ag.Geo.GeometryType.multiLineString},add:function(a){this.setItem(this._lineStrings.length,a)},clear:function(){this._lineStrings=[]},getItem:function(a){if(a<0||a>=this._lineStrings.length){throw Error.argumentOutOfRange("index",a)}if(!Ag.Geo.LineString.isInstanceOfType(this._lineStrings[a])){this._lineStrings[a]=Ag.Geo.LineString.fromObject(this._lineStrings[a])}return this._lineStrings[a]},setItem:function(a,b){if(a<0||a>this._lineStrings.length){throw Error.argumentOutOfRange("index",a)}this._lineStrings[a]=b},removeAt:function(a){Array.removeAt(this._lineStrings,a)}};Ag.Geo.MultiLineString.registerClass("Ag.Geo.MultiLineString",Ag.Geo.Geometry);Ag.Geo.MultiPolygon=function(){Ag.Geo.MultiPolygon.initializeBase(this);this._polygons=[]};Ag.Geo.MultiPolygon.fromObject=function(b){if(b==null){throw Error.argumentNull("o")}var a=new Ag.Geo.MultiPolygon();a._polygons=b._polygons;return a};Ag.Geo.MultiPolygon.prototype={get_count:function(){return this._polygons.length},get_geometryType:function(){return Ag.Geo.GeometryType.multiPolygon},add:function(a){this.setItem(this._polygons.length,a)},clear:function(){this._polygons=[]},getItem:function(a){if(a<0||a>=this._polygons.length){throw Error.argumentOutOfRange("index",a)}if(!Ag.Geo.Polygon.isInstanceOfType(this._polygons[a])){this._polygons[a]=Ag.Geo.Polygon.fromObject(this._polygons[a])}return this._polygons[a]},setItem:function(a,b){if(a<0||a>this._polygons.length){throw Error.argumentOutOfRange("index",a)}this._polygons[a]=b},removeAt:function(a){Array.removeAt(this._polygons,a)}};Ag.Geo.MultiPolygon.registerClass("Ag.Geo.MultiPolygon",Ag.Geo.Geometry);Ag.Geo._GeoVariantType=function(){if(arguments.length!==0){throw Error.parameterCount()}throw Error.notImplemented()};Ag.Geo._GeoVariantType.prototype={gvtUnknown:0,gvtPoint:1,gvtLineString:2,gvtPolygon:3,gvtMultiPoint:4,gvtMultiLineString:5,gvtMultiPolygon:6,gvtGeometryCollection:7};Ag.Geo._GeoVariantType.registerEnum("Ag.Geo._GeoVariantType");Ag.Geo.GeometryCollection=function(){Ag.Geo.GeometryCollection.initializeBase(this);this._geometries=[]};Ag.Geo.GeometryCollection.fromObject=function(b){if(b==null){throw Error.argumentNull("o")}var a=new Ag.Geo.GeometryCollection();a._geometries=b._geometries;return a};Ag.Geo.GeometryCollection.prototype={get_count:function(){return this._geometries.length},get_geometryType:function(){return Ag.Geo.GeometryType.geometryCollection},add:function(a){this.setItem(this._geometries.length,a)},clear:function(){this._geometries=[]},contains:function(a){return this.indexOf(a)>=0},getItem:function(a){if(a<0||a>=this._geometries.length){throw Error.argumentOutOfRange("index",a)}switch(this._geometries[a].t){case Ag.Geo._GeoVariantType.gvtPoint:if(!Ag.Geo.Point.isInstanceOfType(this._geometries[a].pt)){this._geometries[a].pt=Ag.Geo.Point.fromObject(this._geometries[a].pt)}return this._geometries[a].pt;case Ag.Geo._GeoVariantType.gvtLineString:if(!Ag.Geo.LineString.isInstanceOfType(this._geometries[a].ls)){this._geometries[a].ls=Ag.Geo.LineString.fromObject(this._geometries[a].ls)}return this._geometries[a].ls;case Ag.Geo._GeoVariantType.gvtPolygon:if(!Ag.Geo.Polygon.isInstanceOfType(this._geometries[a].pg)){this._geometries[a].pg=Ag.Geo.Polygon.fromObject(this._geometries[a].pg)}return this._geometries[a].pg;case Ag.Geo._GeoVariantType.gvtMultiPoint:if(!Ag.Geo.MultiPoint.isInstanceOfType(this._geometries[a].mpt)){this._geometries[a].mpt=Ag.Geo.MultiPoint.fromObject(this._geometries[a].mpt)}return this._geometries[a].mpt;case Ag.Geo._GeoVariantType.gvtMultiLineString:if(!Ag.Geo.MultiLineString.isInstanceOfType(this._geometries[a].mls)){this._geometries[a].mls=Ag.Geo.MultiLineString.fromObject(this._geometries[a].mls)}return this._geometries[a].mls;case Ag.Geo._GeoVariantType.gvtMultiPolygon:if(!Ag.Geo.MultiPolygon.isInstanceOfType(this._geometries[a].mpg)){this._geometries[a].mpg=Ag.Geo.MultiPolygon.fromObject(this._geometries[a].mpg)}return this._geometries[a].mpg;case Ag.Geo._GeoVariantType.gvtGeometryCollection:if(!Ag.Geo.GeometryCollection.isInstanceOfType(this._geometries[a].gc)){this._geometries[a].gc=Ag.Geo.GeometryCollection.fromObject(this._geometries[a].gc)}return this._geometries[a].gc;default:return null}},setItem:function(a,c){if(a<0||a>this._geometries.length){throw Error.argumentOutOfRange("index",a)}var b={t:Ag.Geo._GeoVariantType.gvtUnknown};switch(c.get_geometryType()){case Ag.Geo.GeometryType.point:b.t=Ag.Geo._GeoVariantType.gvtPoint;b.pt=c;break;case Ag.Geo.GeometryType.lineString:b.t=Ag.Geo._GeoVariantType.gvtLineString;b.ls=c;break;case Ag.Geo.GeometryType.polygon:b.t=Ag.Geo._GeoVariantType.gvtPolygon;b.pg=c;break;case Ag.Geo.GeometryType.multiPoint:b.t=Ag.Geo._GeoVariantType.gvtMultiPoint;b.mpt=c;break;case Ag.Geo.GeometryType.multiLineString:b.t=Ag.Geo._GeoVariantType.gvtMultiLineString;b.mls=c;break;case Ag.Geo.GeometryType.multiPolygon:b.t=Ag.Geo._GeoVariantType.gvtMultiPolygon;b.mpg=c;break;case Ag.Geo.GeometryType.geometryCollection:b.t=Ag.Geo._GeoVariantType.gvtGeometryCollection;b.gc=c;break}this._geometries[a]=b},indexOf:function(b){for(var a=0;a<this._geometries.length;a++){if(this.getItem(a)==b){return a}}return -1},remove:function(b){var a=this.indexOf(b);if(a>=0){Array.removeAt(this._geometries,a)}},removeAt:function(a){Array.removeAt(this._geometries,a)}};Ag.Geo.GeometryCollection.registerClass("Ag.Geo.GeometryCollection",Ag.Geo.Geometry);Type.registerNamespace("Ag");Type.registerNamespace("Ag.UI");Ag.UI.CheckBox=function(a){Ag.UI.CheckBox.initializeBase(this,[a]);this._clickDelegate=null};Ag.UI.CheckBox.create=function(e,b,d,a){e.type="checkbox";var c=$common.createElementFromTemplate({nodeName:"input",properties:e},b);return $create(Ag.UI.CheckBox,d,a,null,c)};Ag.UI.CheckBox.prototype={initialize:function(){Ag.UI.CheckBox.callBaseMethod(this,"initialize");var a=this.get_element();if(this._clickDelegate===null){this._clickDelegate=Function.createDelegate(this,this._clickHandler)}$addHandler(a,"click",this._clickDelegate)},dispose:function(){var a=this.get_element();if(this._clickDelegate!==null){$removeHandler(a,"click",this._clickDelegate);delete this._clickDelegate}Ag.UI.CheckBox.callBaseMethod(this,"dispose")},get_checked:function(){return this.get_element().checked},set_checked:function(b){var a=this.get_element();if(a.checked!==b){a.checked=b;this._onCheckedChanged()}},get_value:function(){return this.get_element().value},set_value:function(b){var a=this.get_element();if(a.value!==b){a.value=b;this.raisePropertyChanged("value")}},add_checkedChanged:function(a){this.get_events().addHandler("checkedChanged",a)},remove_checkedChanged:function(a){this.get_events().removeHandler("checkedChanged",a)},_clickHandler:function(a){this._onCheckedChanged()},_onCheckedChanged:function(){this.raisePropertyChanged("checked");var a=this.get_events().getHandler("checkedChanged");if(a!==null){a(this,Sys.EventArgs.Empty)}}};Ag.UI.CheckBox.registerClass("Ag.UI.CheckBox",Sys.UI.Control);Type.registerNamespace("Ag");Type.registerNamespace("Ag.UI");Ag.UI.InfoBar=function(a){Ag.UI.InfoBar.initializeBase(this,[a]);this._sStatus="None";this._sMessage="";this._sErrorCssClass="InfoBarError";this._sOkCssClass="InfoBarOk";this._sWarningCssClass="InfoBarWarning"};Ag.UI.InfoBar.prototype={clearInfo:function(){this.setInfo("None","")},setInfo:function(c,b){this._sStatus=c;this._sMessage=b;var a=this.get_element();switch(this._sStatus){case"Ok":Sys.UI.DomElement.removeCssClass(a,this._sWarningCssClass);Sys.UI.DomElement.removeCssClass(a,this._sErrorCssClass);Sys.UI.DomElement.addCssClass(a,this._sOkCssClass);break;case"Warning":Sys.UI.DomElement.removeCssClass(a,this._sOkCssClass);Sys.UI.DomElement.removeCssClass(a,this._sErrorCssClass);Sys.UI.DomElement.addCssClass(a,this._sWarningCssClass);break;case"Error":Sys.UI.DomElement.removeCssClass(a,this._sOkCssClass);Sys.UI.DomElement.removeCssClass(a,this._sWarningCssClass);Sys.UI.DomElement.addCssClass(a,this._sErrorCssClass);break;default:Sys.UI.DomElement.removeCssClass(a,this._sOkCssClass);Sys.UI.DomElement.removeCssClass(a,this._sWarningCssClass);Sys.UI.DomElement.removeCssClass(a,this._sErrorCssClass);break}a.innerHTML=this._sMessage},get_errorCssClass:function(){return this._sErrorCssClass},set_errorCssClass:function(a){this._sErrorCssClass=a},get_okCssClass:function(){return this._sOkCssClass},set_okCssClass:function(a){this._sOkCssClass=a},get_warningCssClass:function(){return this._sWarningCssClass},set_warningCssClass:function(a){this._sWarningCssClass=a}};Ag.UI.InfoBar.registerClass("Ag.UI.InfoBar",Sys.UI.Control);Type.registerNamespace("Ag");Type.registerNamespace("Ag.UI");Ag.UI.MultiView=function(){Ag.UI.MultiView.initializeBase(this);this._viewIds=[];this._selectedIndex=-1};Ag.UI.MultiView.prototype={addView:function(a){var b=$get(a);if(b!=null){Array.add(this._viewIds,a);if(this._viewIds.length-1==this._selectedIndex){$common.setVisible(b,true)}else{$common.setVisible(b,false)}}},addViews:function(b){for(var a=0;a<b.length;a++){this.addView(b[a])}},clear:function(){this._viewIds=[];this._selectedIndex=-1},indexOf:function(a){return Array.indexOf(this._viewIds,a)},get_selectedId:function(){if(this._selectedIndex>=0&&this._selectedIndex<this._viewIds.length){return this._viewIds[this._selectedIndex]}else{return""}},set_selectedId:function(b){var a=this.indexOf(b);this.set_selectedIndex(a)},get_selectedIndex:function(){return this._selectedIndex},set_selectedIndex:function(a){if(a>=-1&&a<this._viewIds.length){if(this._selectedIndex!==a){if(this._selectedIndex>=0&&this._selectedIndex<this._viewIds.length){$common.setVisible($get(this._viewIds[this._selectedIndex]),false)}if(a>=0&&a<this._viewIds.length){$common.setVisible($get(this._viewIds[a]),true)}this._selectedIndex=a;this.raisePropertyChanged("selectedIndex")}}},get_viewIds:function(){return Array.clone(this._viewIds)},set_viewIds:function(b){var c=Function._validateParams(arguments,[{name:"value",type:Array,elementType:String}]);if(c){throw c}this.clear();for(var a=0;a<b.length;a++){this.addView(b[a])}}};Ag.UI.MultiView.registerClass("Ag.UI.MultiView",Sys.Component);Type.registerNamespace("Ag");Type.registerNamespace("Ag.UI");Ag.UI.TextBox=function(a){Ag.UI.TextBox.initializeBase(this,[a]);this._watermarkText=""};Ag.UI.TextBox.prototype={initialize:function(){Ag.UI.TextBox.callBaseMethod(this,"initialize")},dispose:function(){Ag.UI.TextBox.callBaseMethod(this,"dispose")},get_text:function(){return this.get_Text()},set_text:function(a){this.set_Text(a)},get_watermarkCssClass:function(){return this.get_WatermarkCssClass()},set_watermarkCssClass:function(a){this.set_WatermarkCssClass(a)},get_watermarkText:function(){return this.get_WatermarkText()},set_watermarkText:function(a){this.set_WatermarkText(a)},_applyWatermark:function(){var a=AjaxControlToolkit.TextBoxWrapper.get_Wrapper(this.get_element());a.set_Watermark(this._watermarkText);a.set_IsWatermarked(true);if(this._watermarkCssClass){Sys.UI.DomElement.addCssClass(this.get_element(),this._watermarkCssClass)}}};Ag.UI.TextBox.registerClass("Ag.UI.TextBox",AjaxControlToolkit.TextBoxWatermarkBehavior);Type.registerNamespace("Ag");Type.registerNamespace("Ag.UI");Ag.UI.ToolMenuEventArgs=function(b){var a=Function._validateParams(arguments,[{name:"itemId",type:String}]);if(a){throw a}Ag.UI.ToolMenuEventArgs.initializeBase(this);this.itemId=b};Ag.UI.ToolMenuEventArgs.prototype={get_itemId:function(){return this.itemId}};Ag.UI.ToolMenuEventArgs.registerClass("Ag.UI.ToolMenuEventArgs",Sys.EventArgs);Ag.UI.ToolMenu=function(){Ag.UI.ToolMenu.initializeBase(this);this._itemIds=[];this._disabledIds=[];this._selectedIndex=-1;this._hoverCssClass="";this._selectedCssClass="";this._disabledCssClass="";this._clickHandler=Function.createDelegate(this,this._item_click);this._mouseoutHandler=Function.createDelegate(this,this._item_mouseout);this._mouseoverHandler=Function.createDelegate(this,this._item_mouseover)};Ag.UI.ToolMenu.prototype={dispose:function(){this.clear();Ag.UI.ToolMenu.callBaseMethod(this,"dispose")},addItem:function(b){var a=$get(b);if(a!=null){switch(Sys.Browser.agent){case Sys.Browser.InternetExplorer:a.unselectable="on";break;case Sys.Browser.Firefox:a.style.MozUserSelect="none";break}$addHandler(a,"click",this._clickHandler);$addHandler(a,"mouseout",this._mouseoutHandler);$addHandler(a,"mouseover",this._mouseoverHandler);Array.add(this._itemIds,b);if(this._itemIds.length-1==this._selectedIndex){this.setSelected($get(this._itemIds[length-1]),true)}}},addItems:function(a){for(var b=0;b<a.length;b++){this.addItem(a[b])}},clear:function(){for(var b=0;b<this._itemIds.length;b++){var a=$get(this._itemIds[b]);if(a!=null){$clearHandlers(a);$(a).removeClass(this._hoverCssClass+" "+this._selectedCssClass+" "+this._disabledCssClass)}}this._itemIds=[];this._disabledIds=[];this._selectedIndex=-1},getEnabled:function(a){return !Array.contains(this._disabledIds,a)},getItemId:function(a){if(a>=0&&a<this._itemIds.length){return this._itemIds[a]}else{return""}},indexOf:function(a){return Array.indexOf(this._itemIds,a)},setEnabled:function(c,b){if(b&&!this.getEnabled(c)){$("#"+c).removeClass(this._disabledCssClass);Array.remove(this._disabledIds,c)}else{if(!b&&this.getEnabled(c)){var a=this.indexOf(c);if(a<0){return}if(a==this._selectedIndex){this.set_selectedIndex(-1)}$("#"+c).addClass(this._disabledCssClass);Array.add(this._disabledIds,c)}}},get_count:function(){return this._itemIds.length},get_disabledCssClass:function(){return this._disabledCssClass},set_disabledCssClass:function(b){var a;if(this._disabledCssClass.length>0){for(a=0;a<this._disabledIds.length;a++){$("#"+this._disabledIds[a]).removeClass(this._disabledCssClass)}}this._disabledCssClass=String.isNullOrEmpty(b)?"":b;if(this._disabledCssClass.length>0){for(a=0;a<this._disabledIds.length;a++){$("#"+this._disabledIds[a]).addClass(this._disabledCssClass)}}},get_disabledIds:function(){return Array.clone(this._disabledIds)},set_disabledIds:function(b){var c=Function._validateParams(arguments,[{name:"value",type:Array,elementType:String}]);if(c){throw c}var a;for(a=0;a<this._disabledIds.length;a++){this.setEnabled(this._disabledIds[a],true)}this._disabledIds=[];for(a=0;a<b.length;a++){this.setEnabled(b[a],false)}},get_hoverCssClass:function(){return this._hoverCssClass},set_hoverCssClass:function(a){this._hoverCssClass=String.isNullOrEmpty(a)?"":a},get_itemIds:function(){return Array.clone(this._itemIds)},set_itemIds:function(b){var c=Function._validateParams(arguments,[{name:"value",type:Array,elementType:String}]);if(c){throw c}this.clear();for(var a=0;a<b.length;a++){this.addItem(b[a])}},get_selectedCssClass:function(){return this._selectedCssClass},set_selectedCssClass:function(a){if(this._selectedCssClass.length>0&&this._selectedIndex>=0){$("#"+this._itemIds[this._selectedIndex]).removeClass(this._selectedCssClass)}this._selectedCssClass=String.isNullOrEmpty(a)?"":a;if(this._selectedCssClass.length>0&&this._selectedIndex>=0){$("#"+this._itemIds[this._selectedIndex]).addClass(this._selectedCssClass)}},get_selectedIndex:function(){return this._selectedIndex},set_selectedIndex:function(a){if(a>=-1&&a<this._itemIds.length){if(this._selectedIndex!==a){if(this._selectedIndex>=0&&this._selectedIndex<this._itemIds.length){this.setSelected($get(this._itemIds[this._selectedIndex]),false)}if(a>=0&&a<this._itemIds.length){this.setSelected($get(this._itemIds[a]),true)}this._selectedIndex=a;this.raisePropertyChanged("selectedIndex")}}},get_selectedId:function(){if(this._selectedIndex>=0&&this._selectedIndex<this._itemIds.length){return this._itemIds[this._selectedIndex]}else{return""}},set_selectedId:function(b){var a=this.indexOf(b);this.set_selectedIndex(a)},add_menuItemClick:function(a){this.get_events().addHandler("menuItemClick",a)},remove_menuItemClick:function(a){this.get_events().removeHandler("menuItemClick",a)},add_selectedIndexChanged:function(a){this.get_events().addHandler("selectedIndexChanged",a)},remove_selectedIndexChanged:function(a){this.get_events().removeHandler("selectedIndexChanged",a)},setSelected:function(a,b){if(a&&this._selectedCssClass){var c=$(a);if(b){if(this._hoverCssClass){c.removeClass(this._hoverCssClass)}c.addClass(this._selectedCssClass)}else{c.removeClass(this._selectedCssClass)}}},_clearHandlers:function(){for(var b=0;b<this._itemIds.length;b++){var a=$get(this._itemIds[b]);if(a!=null){$clearHandlers(a)}}},_onMenuItemClick:function(b){var a=this.get_events().getHandler("menuItemClick");if(a!==null){a(this,new Ag.UI.ToolMenuEventArgs(b))}},_onSelectedIndexChanged:function(){var a=this.get_events().getHandler("selectedIndexChanged");if(a!==null){a(this,Sys.EventArgs.Empty)}},_item_click:function(c){for(var a=0;a<this._itemIds.length;a++){var b=$get(this._itemIds[a]);if(AjaxControlToolkit.DomUtility.isDescendantOrSelf(b,c.target)&&this.getEnabled(b.id)){this._onMenuItemClick(b.id);this.set_selectedIndex(a);this._onSelectedIndexChanged();break}}},_item_mouseout:function(c){if(this._hoverCssClass!=""){for(var a=0;a<this._itemIds.length;a++){var b=$get(this._itemIds[a]);if(AjaxControlToolkit.DomUtility.isDescendantOrSelf(b,c.target)){Sys.UI.DomElement.removeCssClass(b,this._hoverCssClass);break}}}},_item_mouseover:function(d){if(this._hoverCssClass!=""){var a=this.get_selectedId();for(var b=0;b<this._itemIds.length;b++){var c=$get(this._itemIds[b]);if(AjaxControlToolkit.DomUtility.isDescendantOrSelf(c,d.target)){if(c.id!=a&&this.getEnabled(c.id)){Sys.UI.DomElement.addCssClass(c,this._hoverCssClass)}break}}}}};Ag.UI.ToolMenu.registerClass("Ag.UI.ToolMenu",Sys.Component);Type.registerNamespace("Ag");Type.registerNamespace("Ag.UI");Ag.UI.DataBoundControl=function(a){Ag.UI.DataBoundControl.initializeBase(this,[a]);this._dataSource=null};Ag.UI.DataBoundControl.prototype={dataBind:function(){throw Error.notImplemented("Implement the dataBind method, be sure to fire the dataBound event when done")},get_dataSource:function(){return this._dataSource},set_dataSource:function(a){if(a||this._dataSource){this._dataSource=a;this.raisePropertyChanged("dataSource")}},get_supportedAttributes:function(){return["alt","checked","href","src","tag","text","title","value","visible"]},add_dataBound:function(a){this.get_events().addHandler("dataBound",a)},remove_dataBound:function(a){this.get_events().removeHandler("dataBound",a)},_getElementValue:function(b,h,j,f,a){var g=null;var d="String";var i=false;switch(h){case"checked":g=b.checked;d="Boolean";i=true;break;case"value":if(b.nodeName.toLowerCase()==="input"){if(f=="Ag.Geo.Geometry"){g=b.shape;d=f;i=true}else{if(!String.isNullOrEmpty(b.value)){g=b.value}}}else{if(b.nodeName.toLowerCase()==="select"){if(b.selectedIndex>=0){g=b.options[b.selectedIndex].value}}}i=true;break}if(g!==null&&f!==null&&f!==d){try{switch(f){case"Boolean":g=Boolean.parse(g).valueOf();break;case"Date":g=Date.parseLocale(g);break;case"Number":g=Number.parseLocale(g).valueOf();break;case"String":g=g.toString();break}}catch(c){g=null}}if(i){if(g==null){delete a[j]}else{a[j]=g}}},_getItemValue:function(b,e){var a=e.split(".");var d=b;for(var c=0;c<a.length;c++){if(typeof(d)==="undefined"||d===null){return null}else{if(a[c]=="*"){return d}else{if(typeof(d[a[c]])==="undefined"||d[a[c]]===null||(typeof(d[a[c]])==="number"&&isNaN(d[a[c]]))){return null}else{d=d[a[c]]}}}}return d},_initializeElement:function(d,n,a){var b=$(d);var q=b.attr("data-"+n);var f=q.split(",");var l=this._getItemValue(a,f[0]);var p=typeof(l)!=="undefined"&&l!=null;var j=b.attr("data-type");if(j){try{switch(j){case"Ag.Geo.Geometry":if(!Ag.Geo.Geometry.isInstanceOfType(l)){l=Ag.Geo.Geometry.fromObject(l)}break}}catch(g){Sys.Debug.trace(g);p=false}}var k=b.attr("data-"+n+"-format");if(k&&p){if((k.indexOf(":n")>=0||k.indexOf(":c")>=0)&&String.isInstanceOfType(l)){var o=parseFloat(l);if(!isNaN(o)){l=o}else{p=false}}if(p){if(f.length>1){var m=[k];for(var c=0;c<f.length;c++){Array.add(m,this._getItemValue(a,f[c]))}l=String._toFormattedString(true,m)}else{l=String.localeFormat(k,l)}}}switch(n){case"checked":d.checked=!!l;break;case"tag":d.tag=(p?l:a);break;case"text":b.text(p?l.toString():"");break;case"value":var h=d.nodeName.toLowerCase();if(j=="Ag.UI.Geometry"){d.shape=(p?l:null)}else{if(h==="input"&&d._behaviors){for(var c=0;c<d._behaviors.length;c++){if(Ag.UI.TextBox.isInstanceOfType(d._behaviors[c])){d._behaviors[c].set_text(p?l:"");break}}}else{if(h==="select"){d.selectedIndex=-1;for(var c=0;c<d.options.length;c++){if(d.options[c].value==l){d.selectedIndex=c;break}}}else{d.value=(p?l:"")}}}break;case"visible":!!l?b.show():b.hide();break;case"src":if(p){d.src=l;b.show()}else{b.hide()}break;default:if(typeof(d[n])!=="undefined"){d[n]=(p?l:"")}break}},_onDataBound:function(){var a=this.get_events().getHandler("dataBound");if(a!==null){a(this,Sys.EventArgs.Empty)}},_dataBindNodes:function(e,d){var g=this.get_supportedAttributes();var b=$(e);for(var f=0;f<g.length;f++){var a="data-"+g[f]+"";var h=b.attr(a)?b.find("["+a+"]").andSelf():b.find("["+a+"]");for(var c=0;c<h.length;c++){this._initializeElement(h.get(c),g[f],d)}}},_getNodeValues:function(c,a){var e=this.get_supportedAttributes();var d=0;if(c.attributes){for(d=0;d<e.length;d++){var f=e[d];var g=$(c).attr("data-"+f);var b=$(c).attr("data-type");if(g){this._getElementValue(c,f,g,b,a)}}}for(d=0;d<c.childNodes.length;d++){this._getNodeValues(c.childNodes[d],a)}}};Ag.UI.DataBoundControl.registerClass("Ag.UI.DataBoundControl",Sys.UI.Control);Type.registerNamespace("Ag");Type.registerNamespace("Ag.UI");Ag.UI.ComparisonView=function(a){Ag.UI.ComparisonView.initializeBase(this,[a]);this._itemTemplateColumn=1;this._originalNumCols=-1};Ag.UI.ComparisonView.prototype={initialize:function(){Ag.UI.ComparisonView.callBaseMethod(this,"initialize");var b=this.get_element();Sys.Debug.assert(b.rows.length>0,"Table for ComparisonView must have at least one row",true);if(b.rows.length>0){this._originalNumCols=b.rows[0].cells.length;if(this._itemTemplateColumn>=0){for(var a=0;a<b.rows.length;a++){$common.setVisible(b.rows[a].cells[this._itemTemplateColumn],false)}}}},dataBind:function(){var d=this.get_element();for(var c=0;c<d.rows.length;c++){while(d.rows[c].cells.length>this._originalNumCols){if(Sys.Browser.agent==Sys.Browser.InternetExplorer){d.rows[c].deleteCell()}else{d.rows[c].deleteCell(d.rows[c].cells.length-1)}}}if(this._dataSource!=null&&this._itemTemplateColumn>=0){for(var b=0;b<this._dataSource.length;b++){for(var a=0;a<d.rows.length;a++){var f=d.rows[a];var e=f.cells[this._itemTemplateColumn].cloneNode(true);this._dataBindNodes(e,this._dataSource[b]);$common.setVisible(e,true);f.appendChild(e)}}}this._onDataBound()},get_itemTemplateColumn:function(){return this._itemTemplateColumn},set_itemTemplateColumn:function(a){this._itemTemplateColumn=a}};Ag.UI.ComparisonView.registerClass("Ag.UI.ComparisonView",Ag.UI.DataBoundControl);Type.registerNamespace("Ag");Type.registerNamespace("Ag.UI");Ag.JsonObjectType=function(){if(arguments.length!==0){throw Error.parameterCount()}throw Error.notImplemented()};Ag.JsonObjectType.prototype={jotPrimative:0,jotGeometry:1};Ag.JsonObjectType.registerEnum("Ag.JsonObjectType");Ag.UI.DynamicViewStyle=function(){if(arguments.length!==0){throw Error.parameterCount()}throw Error.notImplemented()};Ag.UI.DynamicViewStyle.prototype={formView:0,gridView:1};Ag.UI.DynamicViewStyle.registerEnum("Ag.UI.DynamicViewStyle");Ag.UI.DynamicViewMode=function(){if(arguments.length!==0){throw Error.parameterCount()}throw Error.notImplemented()};Ag.UI.DynamicViewMode.prototype={empty:0,readOnly:1,edit:2};Ag.UI.DynamicViewMode.registerEnum("Ag.UI.DynamicViewMode");Ag.UI.DynamicViewDataType=function(){if(arguments.length!==0){throw Error.parameterCount()}throw Error.notImplemented()};Ag.UI.DynamicViewDataType.prototype={dvNumber:0,dvString:1,dvBool:2,dvDate:3,dvGeometry:4};Ag.UI.DynamicViewDataType.registerEnum("Ag.UI.DynamicViewDataType");Ag.UI.DynamicViewField=function(){this.fieldName="";this.dataType=Ag.UI.DynamicViewDataType.string;this.description="";this.defaultValue=null;this.maxLength=-1;this.required=false;this.domain=[];this.tag=null};Ag.UI.DynamicViewField.prototype={};Ag.UI.DynamicViewField.registerClass("Ag.UI.DynamicViewField");Ag.UI.DynamicViewSchema=function(){this.name="";this.fields=[]};Ag.UI.DynamicViewSchema.prototype={};Ag.UI.DynamicViewSchema.registerClass("Ag.UI.DynamicViewSchema");Ag.UI.DynamicItemData=function(a){this._values=[];if(a&&a.length){for(var b=0;b<a;b++){this.setValue(b,a[b])}}};Ag.UI.DynamicItemData.prototype={getValue:function(a){if(a>=0&&a<this._values.length){if(this._values[a]._t==Ag.JsonObjectType.jotGeometry){return this._values[a]._g}else{return this._values[a]._p}}},setValue:function(a,b){if(Ag.Geo.Geometry.isInstanceOfType(b)){this._values[a]={_t:Ag.JsonObjectType.jotGeometry,_g:b}}else{this._values[a]={_t:Ag.JsonObjectType.jotPrimative,_p:b}}}};Ag.UI.DynamicItemData.registerClass("Ag.UI.DynamicItemData");Ag.UI.DynamicView=function(a){Ag.UI.DynamicView.initializeBase(this,[a]);this._jEl=$(a);this._style=Ag.UI.DynamicViewStyle.formView;this._currentMode=Ag.UI.DynamicViewMode.readOnly;this._dataSource=null;this._schema=null;this._childElement=null;this._childControl=null;this._emptyTemplate=null;this._itemTemplate=null;this._editTemplate=null};Ag.UI.DynamicView.prototype={initialize:function(){Ag.UI.DynamicView.callBaseMethod(this,"initialize");this._emptyTemplate=this._jEl.children("[data-template='empty']").remove().removeAttr("data-template").show();this._itemTemplate=this._jEl.children("[data-template='item']").remove().removeAttr("data-template").show();this._editTemplate=this._jEl.children("[data-template='edit']").remove().removeAttr("data-template").show()},dispose:function(){Ag.UI.DynamicView.callBaseMethod(this,"dispose")},dataBind:function(){if(!this._childControl){throw Error.invalidOperation("You must call schemaBind before calling dataBind")}else{this._childControl.dataBind()}},schemaBind:function(){if(this._childControl){this._childControl.dispose()}if(this._schema){switch(this._style){case Ag.UI.DynamicViewStyle.formView:this._jEl.html(this._genFormHtml());if(this._emptyTemplate.size()){this._jEl.find("[data-stencil='empty']").append(this._emptyTemplate.clone())}if(this._itemTemplate.size()){this._jEl.find("[data-stencil='item']").append(this._itemTemplate.clone())}if(this._editTemplate.size()){this._jEl.find("[data-stencil='edit']").append(this._editTemplate.clone())}this._childElement=this._jEl.children().get(0);this._childControl=$create(Ag.UI.FormView,{currentMode:this._currentMode},null,null,this._childElement);break;case Ag.UI.DynamicViewStyle.gridView:this._jEl.html(this._genGridHtml());break}}else{this._jEl.html("")}},get_currentMode:function(){return this._currentMode},set_currentMode:function(a){var b=Function._validateParams(arguments,[{name:"value",type:Ag.UI.DynamicViewMode}]);if(b){throw b}if(a!==this._currentMode){this._currentMode=a;if(this._childControl){this._childControl.set_currentMode(a)}}},get_dataSource:function(){return this._dataSource},set_dataSource:function(a){if(a||this._dataSource){this._dataSource=a;this._setChildDataSource(a);this.raisePropertyChanged("dataSource")}},get_editObject:function(){if(this._childControl){var b=this._childControl.get_editObject();var a=new Ag.UI.DynamicItemData();for(var c=0;c<this._schema.fields.length;c++){var d=this._schema.fields[c];a.setValue(c,b[d.fieldName]||null)}return a}else{return null}},get_schema:function(){return this._schema},set_schema:function(a){this._schema=a},_genFormHtml:function(){var a=new Sys.StringBuilder(String.format("<div id='{0}FormView'>",this.get_element().id));a.append("<div data-template='item'><table>");for(var c=0;c<this._schema.fields.length;c++){var f=this._schema.fields[c];var e=f.dataType==Ag.UI.DynamicViewDataType.dvDate?"data-text-format='{0:d}'":"";var d=f.dataType==Ag.UI.DynamicViewDataType.dvGeometry?"data-type='Ag.Geo.Geometry'":"";a.append(String.format("<tr><th>{0}</th><td data-text='{1}' {2} {3}></td></tr>",f.displayName||f.fieldName,f.fieldName,e,d))}if(this._itemTemplate.size()){a.append("<tr><td data-stencil='item' colspan='2'></td></tr>")}a.append("</table></div>");a.append("<div data-template='edit'><table>");for(var c=0;c<this._schema.fields.length;c++){var f=this._schema.fields[c];var b=new Sys.StringBuilder("<tr><th>{0}</th>");switch(f.dataType){case Ag.UI.DynamicViewDataType.dvNumber:b.append("<td><input type='text' data-value='{1}' data-type='Number'/></td>");break;case Ag.UI.DynamicViewDataType.dvString:b.append("<td><input type='text' data-value='{1}'/></td>");break;case Ag.UI.DynamicViewDataType.dvBool:b.append("<td><input type='checkbox' data-checked='{1}' data-type='Boolean'/></td>");break;case Ag.UI.DynamicViewDataType.dvDate:b.append("<td><input type='text' data-value='{1}' data-value-format='{{0:d}}' data-type='Date'/></td>");break;case Ag.UI.DynamicViewDataType.dvGeometry:b.append("<td><input type='hidden' data-value='{1}' data-type='Ag.Geo.Geometry'/></td>");break}b.append("</tr>");a.append(String.format(b.toString(),f.displayName||f.fieldName,f.fieldName))}if(this._editTemplate.size()){a.append("<tr><td data-stencil='edit' colspan='2'></td></tr>")}a.append("</table></div>");a.append("</div>");return a.toString()},_genGridHtml:function(){return""},_isValidArray:function(a){return(Function._validateParameterType(a,Array,false,false,false,"value")?false:true)},_setChildDataSource:function(f){if(this._childControl){if(f){var c=this._isValidArray(f)?f:[f];var d=[];for(var b=0;b<c.length;b++){var a={};for(var e=0;e<this._schema.fields.length;e++){a[this._schema.fields[e].fieldName]=c[b].getValue(e)}Array.add(d,a)}this._childControl.set_dataSource(d)}else{this._childControl.set_dataSource(null)}}}};Ag.UI.DynamicView.registerClass("Ag.UI.DynamicView",Sys.UI.Control);Type.registerNamespace("Ag");Type.registerNamespace("Ag.UI");Ag.UI.FormViewMode=function(){if(arguments.length!==0){throw Error.parameterCount()}throw Error.notImplemented()};Ag.UI.FormViewMode.prototype={empty:0,readOnly:1,edit:2,insert:3};Ag.UI.FormViewMode.registerEnum("Ag.UI.FormViewMode");Ag.UI.FormView=function(a){Ag.UI.FormView.initializeBase(this,[a]);this._currentMode=Ag.UI.FormViewMode.readOnly;this._isArray=false;this._emptyTemplate=null;this._itemTemplate=null;this._editTemplate=null;this._bound=false;this._pageIdx=0};Ag.UI.FormView.prototype={initialize:function(){Ag.UI.FormView.callBaseMethod(this,"initialize");var c=this.get_element();var a=c.getElementsByTagName("div");for(var b=0;b<a.length;b++){var d=$(a[b]).attr("data-template");if(d==="empty"){this._emptyTemplate=a[b];$common.setVisible(this._emptyTemplate,this._currentMode===Ag.UI.FormViewMode.empty)}else{if(d==="item"){this._itemTemplate=a[b];$common.setVisible(this._itemTemplate,this._currentMode===Ag.UI.FormViewMode.readOnly)}else{if(d==="edit"){this._editTemplate=a[b];$common.setVisible(this._editTemplate,this._currentMode===Ag.UI.FormViewMode.edit)}}}}if(!this._emptyTemplate&&!this._itemTemplate&&!this._editTemplate){this._itemTemplate=c}},dataBind:function(){var a=(this._dataSource!=null?this._dataSource[this._pageIdx]:null);switch(this._currentMode){case Ag.UI.FormViewMode.readOnly:this._dataBindNodes(this._itemTemplate,a);this._bound=true;break;case Ag.UI.FormViewMode.edit:this._dataBindNodes(this._editTemplate,a);this._bound=true;break}this._onDataBound()},next:function(){this.set_pageIndex(this._pageIdx+1)},prev:function(){this.set_pageIndex(this._pageIdx-1)},get_currentMode:function(){return this._currentMode},set_currentMode:function(a){var b=Function._validateParams(arguments,[{name:"value",type:Ag.UI.FormViewMode}]);if(b){throw b}if(a!==this._currentMode){this._currentMode=a;$common.setVisible(this._emptyTemplate,this._currentMode===Ag.UI.FormViewMode.empty);$common.setVisible(this._itemTemplate,this._currentMode===Ag.UI.FormViewMode.readOnly);$common.setVisible(this._editTemplate,this._currentMode===Ag.UI.FormViewMode.edit);this._bound=false;this._onModeChanged()}},get_dataSource:function(){if(this._dataSource==null){return null}else{return(this._isArray?this._dataSource:this._dataSource[0])}},set_dataSource:function(a){this._pageIdx=0;this._bound=false;if(a!=null||this._dataSource!=null){this._isArray=this._isValidArray(a);if(this._isArray){this._dataSource=a}else{if(a!=null){this._dataSource=[a]}else{this._dataSource=null}}this.raisePropertyChanged("dataSource")}},get_editObject:function(){var c=(this._dataSource!=null?this._dataSource[this._pageIdx]:null);var a={};if(c!=null){for(var b in c){if(c[b]!==null&&c[b]!==""){a[b]=c[b]}}}if(this._editTemplate!=null){this._getNodeValues(this._editTemplate,a)}return a},get_pageIndex:function(){return this._pageIdx},set_pageIndex:function(a){var b=Function._validateParams(arguments,[{name:"value",type:Number}]);if(b){throw b}if(a>=0&&this._dataSource!=null&&a<this._dataSource.length&&this._pageIdx!==a){this._pageIdx=a;if(this._bound){this.dataBind()}}},get_supportedAttributes:function(){var a=Ag.UI.FormView.callBaseMethod(this,"get_supportedAttributes");Array.addRange(a,["pager"]);return a},add_modeChanged:function(a){this.get_events().addHandler("modeChanged",a)},remove_modeChanged:function(a){this.get_events().removeHandler("modeChanged",a)},_initializeElement:function(c,d,b){var a=$(c);var e=a.attr("data-"+d);switch(d){case"pager":switch(e){case"current":a.text(String(this._dataSource!=null?this._pageIdx+1:0));break;case"total":a.text(String(this._dataSource!=null?this._dataSource.length:0));break}break;default:Ag.UI.FormView.callBaseMethod(this,"_initializeElement",[c,d,b]);break}},_isValidArray:function(a){return(Function._validateParameterType(a,Array,false,false,false,"value")?false:true)},_onModeChanged:function(){var a=this.get_events().getHandler("modeChanged");if(a!==null){a(this,Sys.EventArgs.Empty)}}};Ag.UI.FormView.registerClass("Ag.UI.FormView",Ag.UI.DataBoundControl);Type.registerNamespace("Ag");Type.registerNamespace("Ag.UI");Ag.UI.GridViewRowMode=function(){if(arguments.length!==0){throw Error.parameterCount()}throw Error.notImplemented()};Ag.UI.GridViewRowMode.prototype={empty:0,readOnly:1,edit:2};Ag.UI.GridViewRowMode.registerEnum("Ag.UI.GridViewRowMode");Ag.UI.GridViewSelectionMode=function(){if(arguments.length!==0){throw Error.parameterCount()}throw Error.notImplemented()};Ag.UI.GridViewSelectionMode.prototype={none:0,single:1,multiple:2};Ag.UI.GridViewSelectionMode.registerEnum("Ag.UI.GridViewSelectionMode");Ag.UI.GridViewSortEventArgs=function(b,a){Ag.UI.GridViewSortEventArgs.initializeBase(this);this.sortDirection=b;this.sortExpression=a};Ag.UI.GridViewSortEventArgs.prototype={get_sortDirection:function(){return this.sortDirection},get_sortExpression:function(){return this.sortExpression}};Ag.UI.GridViewSortEventArgs.registerClass("Ag.UI.GridViewSortEventArgs",Sys.EventArgs);Ag.UI.GridView=function(a){Ag.UI.GridView.initializeBase(this,[a]);this._allowSorting=false;this._alternatingRowCssClass="";this._currentRowMode=Ag.UI.GridViewRowMode.readOnly;this._dataBound=false;this._fillEmptyWithSpace=false;this._container=null;this._containerCount=0;this._editIndex=-1;this._editRowSource=null;this._editTemplate=null;this._itemTemplate=null;this._selectedIndexes=[];this._selectedRowCssClass="";this._selectionMode=Ag.UI.GridViewSelectionMode.none;this._sortExpression="";this._sortAsc=true;this._th_click_delegate=Function.createDelegate(this,this._th_click);this._tr_click_delegate=Function.createDelegate(this,this._tr_click)};Ag.UI.GridView.prototype={initialize:function(){Ag.UI.GridView.callBaseMethod(this,"initialize");var c=this.get_element();var f=$(c).find("tr[data-template='item']");if(f.length>0){var e=f.get(0);this._itemTemplate=e.cloneNode(true);$common.setVisible(this._itemTemplate,true);this._container=e.parentNode;$common.removeElement(e);f=$(this._container).find("tr[data-template='edit']");if(f.length>0){e=f.get(0);this._editTemplate=e.cloneNode(true);$common.setVisible(this._editTemplate,true);$common.removeElement(e)}this._containerCount=this._container.rows.length}if(this._allowSorting){var b=c.getElementsByTagName("th");for(var d=0;d<b.length;d++){var a=null;var g=b[d].attributes.getNamedItem("data-sort");if(g!=null){a=g.nodeValue}else{if(typeof(b[d].abbr)!=="undefined"){a=b[d].abbr}}if(a!=null&&a.length>0){b[d].sortExpression=a;$addHandler(b[d],"click",this._th_click_delegate)}}}},dispose:function(){Ag.UI.GridView.callBaseMethod(this,"dispose")},clearSelection:function(){for(var a=0;a<this._selectedIndexes.length;++a){var b=this._selectedIndexes[a]+this._containerCount;Sys.UI.DomElement.removeCssClass(this._container.rows[b],this._selectedRowCssClass)}this._selectedIndexes=[]},addRow:function(b){var c="addRow()";this._checkDataBound(c);if(b==null){b=this.get_rowCount()}else{this._checkIndex(c,b,this.get_rowCount())}var a=this._itemTemplate.cloneNode(true);if(b==this.get_rowCount()){this._dataSource.push(null);this._container.appendChild(a)}else{this._dataSource.splice(b,0,null);this._container.insertBefore(a,this._container.rows[b+this._containerCount])}this._shadeAlternating(this._container,b,this._containerCount);this._shiftSelection(b,1);if(this._editIndex>=b){this._editIndex+=1}return b},dataBind:function(){this._currentRowMode=Ag.UI.GridViewRowMode.readOnly;this._dataBound=true;this._editIndex=-1;this._editRowSource=null;this._selectedIndexes=[];while(this._container.rows.length>this._containerCount){this._container.deleteRow(this._container.rows.length-1)}if(this._dataSource!=null){var b=document.createDocumentFragment();for(var c=0;c<this._dataSource.length;c++){var a=this._itemTemplate.cloneNode(true);this._dataBindNodes(a,this._dataSource[c]);this._fillEmpties(a);if(this._selectionMode>Ag.UI.GridViewSelectionMode.none){$addHandler(a,"click",this._tr_click_delegate)}b.appendChild(a)}this._shadeAlternating(b,0,0);this._container.appendChild(b)}this._onDataBound()},dataBindRow:function(d,a,g){var e="dataBindRow()";this._checkDataBound(e);this._checkIndex(e,d);var f=Ag.UI.GridViewRowMode.readOnly;var b=this._dataSource[d];switch(arguments.length){case 2:if(typeof a=="number"){f=a}else{b=a}break;case 3:f=a;b=g;break}var c;if(f==Ag.UI.GridViewRowMode.edit){if(this._currentRowMode==f){throw Error.invalidOperation("Cannot edit a row while another is currently in edit mode")}this._editIndex=d;this._editRowSource=b;c=this._editTemplate.cloneNode(true)}else{if(d==this._editIndex){this._editIndex=-1;this._editRowSource=null}this._dataSource[d]=b;c=this._itemTemplate.cloneNode(true)}this._dataBindNodes(c,b);this._fillEmpties(c);if(this._alternatingRowCssClass!=null&&d%2==1){Sys.UI.DomElement.addCssClass(c,this._alternatingRowCssClass)}if(this._selectedRowCssClass!=null&&Array.contains(this._selectedIndexes,d)){Sys.UI.DomElement.addCssClass(c,this._selectedRowCssClass)}if(this._selectionMode>Ag.UI.GridViewSelectionMode.none){$addHandler(c,"click",this._tr_click_delegate)}this._container.insertBefore(c,this._container.rows[d+this._containerCount]);this._container.removeChild(this._container.rows[d+this._containerCount+1])},deleteRow:function(a){var b="deleteRow()";this._checkDataBound(b);this._checkIndex(b,a);this._dataSource.splice(a,1);this._container.removeChild(this._container.rows[a+this._containerCount]);this._shadeAlternating(this._container,a,this._containerCount);this._shiftSelection(a+1,-1);if(this._editIndex==a){this._currentRowMode=Ag.UI.GridViewRowMode.readOnly;this._editIndex=-1;this._editRowSource=null}else{if(this._editIndex>a){this._editIndex-=1}}},getRow:function(a){return this._container.rows[a+this._containerCount]},getRowIndex:function(a){while(a.tagName!="TR"){a=a.parentNode}return $(this._container).children().index(a)-this._containerCount},get_allowSorting:function(){return this._allowSorting},set_allowSorting:function(a){this._allowSorting=a},get_alternatingRowCssClass:function(){return this._alternatingRowCssClass},set_alternatingRowCssClass:function(a){this._alternatingRowCssClass=a},get_currentRowMode:function(){return this._currentRowMode},get_editIndex:function(){return this._editIndex},get_editObject:function(){var a=this._editRowSource;var c={};if(a!=null){for(var b in a){if(a[b]!==null&&a[b]!==""){c[b]=a[b]}}}if(this._editIndex>-1){this._getNodeValues(this._container.rows[this._editIndex],c)}return c},get_fillEmptyWithSpace:function(){return this._fillEmptyWithSpace},set_fillEmptyWithSpace:function(a){this._fillEmptyWithSpace=a},get_rowCount:function(){return this._container.rows.length-this._containerCount},get_selectedIndexes:function(){return this._selectedIndexes},set_selectedIndexes:function(b){this.clearSelection();if(b==null){b=[]}else{for(var a=0;a<b.length;++a){var c=b[a]+this._containerCount;if(this._containerCount<=c&&c<this._container.rows.length){Sys.UI.DomElement.addCssClass(this._container.rows[c],this._selectedRowCssClass)}else{throw Error.argumentOutOfRange("selectedIndexes",b[a])}}}this._selectedIndexes=b},get_selectedRowCssClass:function(){return this._selectedRowCssClass},set_selectedRowCssClass:function(a){this._selectedRowCssClass=a},get_selectionMode:function(){return this._selectionMode},set_selectionMode:function(a){this._selectionMode=a},get_sortDirection:function(){return(this._sortAsc?"ASC":"DESC")},set_sortDirection:function(a){this._sortAsc=(a!=="DESC")},get_sortExpression:function(){return this._sortExpression},set_sortExpression:function(a){if(this._sortExpression!==a){this._sortExpression=a;this._sortAsc=true}else{this._sortAsc=!this._sortAsc}},add_sort:function(a){this.get_events().addHandler("sort",a)},remove_sort:function(a){this.get_events().removeHandler("sort",a)},add_selectionChanged:function(a){this.get_events().addHandler("selectionChanged",a)},remove_selectionChanged:function(a){this.get_events().removeHandler("selectionChanged",a)},_checkDataBound:function(a){if(!this._dataBound){throw Error.invalidOperation(a+" is only allowed on a read-only GridView after databinding")}},_checkIndex:function(b,a,c){if(c==null){c=this.get_rowCount()-1}if(a<0||c<a){throw Error.argumentOutOfRange(b,a)}},_fillEmpties:function(c){if(this._fillEmptyWithSpace){for(var b=0;b<c.childNodes.length;++b){var a=c.childNodes.item(b);if(a.nodeName!="#text"){if(!a.firstChild){a.appendChild(document.createTextNode(" "))}else{if(a.childNodes.length==1&&a.firstChild.nodeName=="#text"&&a.firstChild.data.length==0){a.firstChild.data=" "}}}}}},_onSort:function(){var a=this.get_events().getHandler("sort");if(a!==null){a(this,new Ag.UI.GridViewSortEventArgs(this.get_sortDirection(),this._sortExpression))}},_onSelectionChanged:function(){var a=this.get_events().getHandler("selectionChanged");if(a!==null){a(this,Sys.EventArgs.Empty)}},_shadeAlternating:function(a,e,c){if(this._alternatingRowCssClass!=null){for(var b=e;b<a.childNodes.length;++b){var d=a.childNodes.item(b+c);if((b%2)==1){Sys.UI.DomElement.addCssClass(d,this._alternatingRowCssClass)}else{Sys.UI.DomElement.removeCssClass(d,this._alternatingRowCssClass)}}}},_shiftSelection:function(c,b){for(var a=0;a<this._selectedIndexes.length;++a){if(this._selectedIndexes[a]>=c){this._selectedIndexes[a]+=b}}},_th_click:function(a){this.set_sortExpression(a.target.sortExpression);this._onSort()},_tr_click:function(c){var d=c.target;if(d.tagName!="TR"){if(d.tagName=="TD"){d=d.parentNode}else{return}}var f=$(this._container).children().index(d);var b=f-this._containerCount;var a=Array.contains(this._selectedIndexes,b);switch(this._selectionMode){case Ag.UI.GridViewSelectionMode.single:this.clearSelection();break;case Ag.UI.GridViewSelectionMode.multiple:if(a){Sys.UI.DomElement.removeCssClass(this._container.rows[f],this._selectedRowCssClass);Array.remove(this._selectedIndexes,b)}break}if(!a){Sys.UI.DomElement.addCssClass(this._container.rows[f],this._selectedRowCssClass);this._selectedIndexes.push(b)}this._onSelectionChanged()}};Ag.UI.GridView.registerClass("Ag.UI.GridView",Ag.UI.DataBoundControl);Type.registerNamespace("Ag");Type.registerNamespace("Ag.UI");Ag.UI.Repeater=function(a){Ag.UI.Repeater.initializeBase(this,[a]);this._itemTemplate=document.createDocumentFragment()};Ag.UI.Repeater.prototype={initialize:function(){Ag.UI.Repeater.callBaseMethod(this,"initialize");var b=this.get_element();for(var a=0;a<b.childNodes.length;a++){this._itemTemplate.appendChild(b.childNodes[a].cloneNode(true))}b.innerHTML=""},dispose:function(){Ag.UI.Repeater.callBaseMethod(this,"dispose")},dataBind:function(){var e=this.get_element();e.innerHTML="";if(this._dataSource!=null){var b=document.createDocumentFragment();for(var d=0;d<this._dataSource.length;d++){var c=this._itemTemplate.cloneNode(true);for(var a=0;a<c.childNodes.length;a++){this._dataBindNodes(c.childNodes[a],this._dataSource[d])}b.appendChild(c)}e.appendChild(b)}this._onDataBound()}};Ag.UI.Repeater.registerClass("Ag.UI.Repeater",Ag.UI.DataBoundControl);Type.registerNamespace("Ag");Type.registerNamespace("Ag.UI");Ag.UI.SelectList=function(a){Ag.UI.SelectList.initializeBase(this,[a]);this._changeDelegate=null;this._appendDataBoundItems=false;this._iOriginalLength=-1;this._sDataTextField="";this._sDataValueField="";this._showLoading=false;this._doneLoading=false;this._loadingText="Loading...";this._loadingReplaceText="";this._text="";this._index=-1;this._handle=null;this._changeHandlerEnabled=true};Ag.UI.SelectList.prototype={initialize:function(){Ag.UI.SelectList.callBaseMethod(this,"initialize");var a=this.get_element();this._iOriginalLength=a.options.length;if(this._showLoading){if(this._iOriginalLength==0){this.addItem(this._loadingText,"")}else{this._loadingReplaceText=a.options[0].text;a.options[0].text=this._loadingText}}if(this._changeDelegate===null){this._changeDelegate=Function.createDelegate(this,this._changeHandler)}$addHandler(a,"change",this._changeDelegate);$addHandler(a,"keypress",Function.createDelegate(this,this._keyPress))},dispose:function(){var a=this.get_element();if(this._changeDelegate!==null){$removeHandler(a,"change",this._changeDelegate);delete this._changeDelegate}Ag.UI.SelectList.callBaseMethod(this,"dispose")},addItem:function(c,b){var a=document.createElement("option");a.text=c;a.value=b;if(Sys.Browser.agent===Sys.Browser.InternetExplorer){this.get_element().add(a)}else{this.get_element().add(a,null)}},clearSelection:function(){var b=this.get_element();for(var a=0;a<b.options.length;a++){b.options[a].selected=false}this.set_selectedIndex(-1)},dataBind:function(d){var e=(typeof(d)!=="undefined"?d:null);var c=this.get_element();if(this._showLoading&&!this._doneLoading){if(this._iOriginalLength==0){c.remove(0)}else{c.options[0].text=this._loadingReplaceText}this._doneLoading=true}var g=this.get_selectedIndex();var a=c.options.length;if(!this._appendDataBoundItems){$(c).empty()}else{while(c.options.length>this._iOriginalLength){c.remove(c.options.length-1)}}if(this._dataSource!==null){for(var b=0;b<this._dataSource.length;b++){var f=null;if(this._sDataTextField.length>0){this.addItem(this._dataSource[b][this._sDataTextField],this._dataSource[b][this._sDataValueField]);f=this._dataSource[b][this._sDataValueField]}else{this.addItem(this._dataSource[b],this._dataSource[b]);f=this._dataSource[b]}if(e!=null&&f==e){c.selectedIndex=c.length-1}}}this._onDataBound();if(this.get_selectedIndex()!==g&&a>0){this.raisePropertyChanged("selectedIndex")}},getItem:function(c){var b=this.get_element();if(Number.isInstanceOfType(c)){if(index>=0&&index<b.options.length){return b.options[index]}}else{if(String.isInstanceOfType(c)){for(var a=0;a<b.options.length;a++){if(b.options[a].value===c){return b.options[a]}}}}return null},get_appendDataBoundItems:function(){return this._appendDataBoundItems},set_appendDataBoundItems:function(a){this._appendDataBoundItems=a},get_dataSource:function(){return this._dataSource},set_dataSource:function(a){if(a!==null||this._dataSource!==null){this._dataSource=a;this.raisePropertyChanged("dataSource")}},get_dataTextField:function(){return this._sDataTextField},set_dataTextField:function(a){this._sDataTextField=a},get_dataValueField:function(){return this._sDataValueField},set_dataValueField:function(a){this._sDataValueField=a},get_dropDownList:function(){return(this.get_element().multiple==false)},set_dropDownList:function(a){this.get_element().multiple=!a},get_length:function(){return this.get_element().length},get_loadingText:function(){return this._loadingText},set_loadingText:function(a){this._loadingText=a},get_selectedIndex:function(){return this.get_element().selectedIndex},set_selectedIndex:function(a){if(a!==this.get_selectedIndex()){this.get_element().selectedIndex=a;this.raisePropertyChanged("selectedIndex")}},get_selectedItem:function(){var a=this.get_selectedIndex();if(a>=0){return this.get_element().options[a]}else{return null}},get_selectedValue:function(){var a=this.get_element();if(a.selectedIndex>=0){return a.options[a.selectedIndex].value}else{return""}},set_selectedValue:function(c){var b=this.get_element();if(b.options.length>0){for(var a=0;a<b.options.length;a++){if(b.options[a].value===c){this.set_selectedIndex(a);break}}if(a==b.options.length){this.set_selectedIndex(-1)}}},get_showLoading:function(){return this._showLoading},set_showLoading:function(a){this._showLoading=a},add_dataBound:function(a){this.get_events().addHandler("dataBound",a)},remove_dataBound:function(a){this.get_events().removeHandler("dataBound",a)},add_selectedIndexChanged:function(a){this.get_events().addHandler("selectedIndexChanged",a)},remove_selectedIndexChanged:function(a){this.get_events().removeHandler("selectedIndexChanged",a)},_changeHandler:function(a){this._onSelectedIndexChanged()},_keyPress:function(g){var f=g.charCode?g.charCode:g.which;var d=this.get_events().getHandler("selectedIndexChanged");if(f==13&&d){d(this,Sys.EventArgs.Empty);return true}if(f>=32){if(d){this._changeHandlerEnabled=false}if(97<=f&&f<=122){f-=32}this._text+=String.fromCharCode(f);var a=this._text.length;var c=this.get_element();for(var b=0;b<c.options.length;++b){var h=c.options[b].text.toUpperCase().substr(0,a);if(h==this._text){this._index=b;break}}}setTimeout(Function.createDelegate(this,this._setIndexStart),1);return false},_onSelectedIndexChanged:function(){if(this._changeHandlerEnabled){this.raisePropertyChanged("selectedIndex");var a=this.get_events().getHandler("selectedIndexChanged");if(a!==null){a(this,Sys.EventArgs.Empty)}}},_setIndexStart:function(){if(this._handle!=null){clearTimeout(this._handle);this._handle=null}if(this._index>-1){this.set_selectedIndex(this._index);this._handle=setTimeout(Function.createDelegate(this,this._setIndexFinish),1000)}},_setIndexFinish:function(){var a=this._index>-1;this._text="";this._index=-1;this._handle=null;this._changeHandlerEnabled=true;if(a){this._onSelectedIndexChanged()}}};Ag.UI.SelectList.registerClass("Ag.UI.SelectList",Ag.UI.DataBoundControl);Type.registerNamespace("Ag");Type.registerNamespace("Ag.UI");Ag.UI.TreeViewSelection=function(){if(arguments.length!==0){throw Error.parameterCount()}throw Error.notImplemented()};Ag.UI.TreeViewSelection.prototype={noSelection:0,leafNodesOnly:1,allNodes:2};Ag.UI.TreeViewSelection.registerEnum("Ag.UI.TreeViewSelection");Ag.UI.TreeView=function(a){Ag.UI.TreeView.initializeBase(this,[a]);this._selectedNodeChangedDelegate=null;this._dataSource=null;this._selectedNode=null;this._selectionType=Ag.UI.TreeViewSelection.allNodes;this._sDataNodesField="Nodes";this._sDataTextField="Text";this._sButtonCssClass="TreeViewButton";this._sButtonOpenCssClass="TreeViewButtonOpen";this._sButtonClosedCssClass="TreeViewButtonClosed";this._sLineNodeCssClass="TreeViewLineNode";this._sLineOuterCssClass="TreeViewLineOuter";this._sNodeCssClass="TreeViewNode";this._sNodeSelectableCssClass="TreeViewNodeSelectable";this._sNodeSelectedCssClass="TreeViewNodeSelected"};Ag.UI.TreeView.prototype={dispose:function(){Ag.UI.TreeView.callBaseMethod(this,"dispose")},dataBind:function(){var b=this.get_element();if(this._dataSource!==null){for(var a=0;a<this._dataSource.length;a++){if(this._dataSource[a]!=null){this._createNodeTable(b,this._dataSource[a],a==this._dataSource.length-1)}}}},get_buttonCssClass:function(){return this._sButtonCssClass},set_buttonCssClass:function(a){this._sButtonCssClass=a},get_buttonClosedCssClass:function(){return this._sButtonClosedCssClass},set_buttonClosedCssClass:function(a){this._sButtonClosedCssClass=a},get_buttonOpenCssClass:function(){return this._sButtonOpenCssClass},set_buttonOpenCssClass:function(a){this._sButtonOpenCssClass=a},get_dataSource:function(){return this._dataSource},set_dataSource:function(a){if(a!==null||this._dataSource!==null){this._dataSource=a;this.raisePropertyChanged("dataSource")}},get_dataTextField:function(){return this._sDataTextField},set_dataTextField:function(a){this._sDataTextField=a},get_dataNodesField:function(){return this._sDataNodesField},set_dataNodesField:function(a){this._sDataNodesField=a},get_lineNodeCssClass:function(){return this._sLineNodeCssClass},set_lineNodeCssClass:function(a){this._sLineNodeCssClass=a},get_lineOuterCssClass:function(){return this._sLineOuterCssClass},set_lineOuterCssClass:function(a){this._sLineOuterCssClass=a},get_nodeCssClass:function(){return this._sNodeCssClass},set_nodeCssClass:function(a){this._sNodeCssClass=a},get_nodeSelectableCssClass:function(){return this._sNodeSelectableCssClass},set_nodeSelectableCssClass:function(a){this._sNodeSelectableCssClass=a},get_nodeSelectedCssClass:function(){return this._sNodeSelectedCssClass},set_nodeSelectedCssClass:function(a){this._sNodeSelectedCssClass=a},get_selectedNode:function(){return this._selectedNode},get_selectionType:function(){return this._selectionType},set_selectionType:function(a){this._selectionType=a},add_selectedNodeChanged:function(a){this.get_events().addHandler("selectedNodeChanged",a)},remove_selectedNodeChanged:function(a){this.get_events().removeHandler("selectedNodeChanged",a)},_createNode:function(b,a){$common.createElementFromTemplate({nodeName:"span",properties:{innerHTML:a[this._sDataTextField]}},b)},_createNodeTable:function(l,f,b){var j=$common.createElementFromTemplate({nodeName:"table",properties:{border:"0",cellPadding:"0px",cellSpacing:"0px"},cssClasses:["TreeViewNodeTable"]},l);j.appendChild(document.createElement("tbody"));var h=j.tBodies[0].insertRow(-1);var k=h.insertCell(0);k.innerHTML="&nbsp;";Sys.UI.DomElement.addCssClass(k,this._sButtonCssClass);if(f[this._sDataNodesField]!==null){Sys.UI.DomElement.addCssClass(k,this._sButtonOpenCssClass);var n=Function.createDelegate(this,this._button_click);$addHandler(k,"click",n)}else{Sys.UI.DomElement.addCssClass(k,this._sLineNodeCssClass)}var a=h.insertCell(1);a.tag=f;var e=Function.createDelegate(this,this._node_click);$addHandler(a,"click",e);Sys.UI.DomElement.addCssClass(a,this._sNodeCssClass);if(this._selectionType==Ag.UI.TreeViewSelection.allNodes||(this._selectionType==Ag.UI.TreeViewSelection.leafNodesOnly&&f[this._sDataNodesField]==null)){Sys.UI.DomElement.addCssClass(a,this._sNodeSelectableCssClass)}this._createNode(a,f);if(f[this._sDataNodesField]!==null){var g=j.tBodies[0].insertRow(-1);var c=g.insertCell(0);if(!b){Sys.UI.DomElement.addCssClass(c,this._sLineOuterCssClass)}var m=g.insertCell(1);for(var d=0;d<f[this._sDataNodesField].length;d++){this._createNodeTable(m,f[this._sDataNodesField][d],d==f[this._sDataNodesField].length-1)}}},_onSelectedNodeChanged:function(){this.raisePropertyChanged("selectedNode");var a=this.get_events().getHandler("selectedNodeChanged");if(a!==null){a(this,Sys.EventArgs.Empty)}},_button_click:function(b){var a=b.target.parentNode.parentNode;if(Sys.UI.DomElement.containsCssClass(b.target,this._sButtonOpenCssClass)){Sys.UI.DomElement.removeCssClass(b.target,this._sButtonOpenCssClass);Sys.UI.DomElement.addCssClass(b.target,this._sButtonClosedCssClass);$common.setVisible(a.rows[1].cells[1],false)}else{Sys.UI.DomElement.removeCssClass(b.target,this._sButtonClosedCssClass);Sys.UI.DomElement.addCssClass(b.target,this._sButtonOpenCssClass);$common.setVisible(a.rows[1].cells[1],true)}},_node_click:function(b){if(this._selectionType==Ag.UI.TreeViewSelection.noSelection){return}var a=b.target;while(a.nodeName!=="TD"){if(a.parentNode==null){return}a=a.parentNode}if(a!=this._selectedNode){if(this._selectionType==Ag.UI.TreeViewSelection.leafNodesOnly&&a.tag[this._sDataNodesField]!=null){return}if(this._selectedNode!=null){Sys.UI.DomElement.removeCssClass(this._selectedNode,this._sNodeSelectedCssClass)}Sys.UI.DomElement.addCssClass(a,this._sNodeSelectedCssClass);this._selectedNode=a;this._onSelectedNodeChanged()}}};Ag.UI.TreeView.registerClass("Ag.UI.TreeView",Sys.UI.Control);Type.registerNamespace("Ag");Type.registerNamespace("Ag.UI");Ag.UI.GraphicsType=function(){if(arguments.length!==0){throw Error.parameterCount()}throw Error.notImplemented()};Ag.UI.GraphicsType.prototype={none:0,vml:1,canvas:2};Ag.UI.GraphicsType.registerEnum("Ag.UI.GraphicsType");Ag.UI.GraphicStyle=function(a){this._cssClass="";this.color="#000000";this.backgroundColor="";this.backgroundOpacity=1;this.fontSize="medium";this.fontWeight="normal";this.opacity=1;this.outlineWidth=1;this.outlineOpacity=1;if(typeof(a)!=="undefined"){if(String.isInstanceOfType(a)){this.set_cssClass(a)}else{this.applyGraphicStyle(a)}}};Ag.UI.GraphicStyle.prototype={applyGraphicStyle:function(a){if(a!=null){if(typeof(a.color)!=="undefined"){this.color=a.color}if(typeof(a.backgroundColor)!=="undefined"){this.backgroundColor=a.backgroundColor}if(typeof(a.backgroundOpacity)!=="undefined"){this.backgroundOpacity=a.backgroundOpacity}if(a.fontSize){this.fontSize=a.fontSize}if(a.fontWeight){this.fontWeight=a.fontWeight}if(typeof(a.opacity)!=="undefined"){this.opacity=a.opacity}if(typeof(a.outlineWidth)!=="undefined"){this.outlineWidth=a.outlineWidth}if(typeof(a.outlineOpacity)!=="undefined"){this.outlineOpacity=a.outlineOpacity}}},clone:function(){return new Ag.UI.GraphicStyle(this)},set_cssClass:function(a){this._cssClass=a;var b=this._getCssStyle(a);if(b!=null){if(typeof(b.color)!=="undefined"){if(b.color!="transparent"){this.color=b.color}}if(typeof(b.backgroundColor)!=="undefined"){if(b.backgroundColor!="transparent"){this.backgroundColor=b.backgroundColor}}if(b.fontSize){this.fontSize=b.fontSize}if(b.fontWeight){this.fontWeight=b.fontWeight}if(typeof(b.opacity)!=="undefined"){this.opacity=b.opacity}if(typeof(b.outlineWidth)!=="undefined"){if(b.outlineWidth!="auto"){this.outlineWidth=$common.parseUnit(b.outlineWidth).size}}}},_getCssStyle:function(a){var b=$common.createElementFromTemplate({nodeName:"div",style:{position:"absolute",display:"none"}},document.body);if(typeof(a)!=="undefined"){Sys.UI.DomElement.addCssClass(b,a)}var d=null;if(b.currentStyle){d={color:b.currentStyle.color,backgroundColor:b.currentStyle.backgroundColor,opacity:b.currentStyle.opacity,outlineWidth:b.currentStyle.outlineWidth}}else{if(document.defaultView&&document.defaultView.getComputedStyle){var c=document.defaultView.getComputedStyle(b,null);if(c){d={color:c.color,backgroundColor:c.backgroundColor,opacity:c.opacity,outlineWidth:c.outlineWidth}}}}if(!d&&b.style.getPropertyValue){d={color:b.style.getPropertyValue("color"),backgroundColor:b.style.getPropertyValue("backgroundColor"),opacity:b.style.getPropertyValue("opacity"),outlineWidth:b.style.getPropertyValue("outlineWidth")}}else{if(!d&&b.style.getAttribute){d={color:b.style.getAttribute("color"),backgroundColor:b.style.getAttribute("backgroundColor"),opacity:b.style.getAttribute("opacity"),outlineWidth:b.style.getAttribute("outlineWidth")}}}$common.removeElement(b);return d}};Ag.UI.GraphicStyle.registerClass("Ag.UI.GraphicStyle");Ag.UI.Graphics=function(b){Ag.UI.Graphics.initializeBase(this,[b]);$(b).css("display","inline-block").css("overflow","hidden");var a=$common.getSize(b);var c=$common.getBorderBox(b);this._width=a.width-c.horizontal;this._height=a.height-c.vertical;this._cssClass="";this._gxStyle=new Ag.UI.GraphicStyle();this._graphicsType=Ag.UI.GraphicsType.none;this._context=null};Ag.UI.Graphics.prototype={initialize:function(){Ag.UI.Graphics.callBaseMethod(this,"initialize");var b=this.get_element();var a=$common.getCurrentStyle(b,"position");if(a!=="relative"&&a!="absolute"){$common.setStyle(b,{position:"relative"})}switch(Sys.Browser.agent){case Sys.Browser.Firefox:this._graphicsType=Ag.UI.GraphicsType.canvas;this._canvas=$common.createElementFromTemplate({nodeName:"canvas",properties:{width:this._width,height:this._height,style:{left:"0px",top:"0px",width:this._width+"px",height:this._height+"px"}}},b);this._context=this._canvas.getContext("2d");break;case Sys.Browser.InternetExplorer:this._graphicsType=Ag.UI.GraphicsType.vml;this._canvas=$common.createElementFromTemplate({nodeName:"div",properties:{style:{left:"0px",top:"0px",width:this._width+"px",height:this._height+"px"}}},b);if(document.readyState==="complete"){this._initVml()}else{$addHandler(document,"readystatechange",Function.createDelegate(this,this._document_readystatechange))}break;default:break}},dispose:function(){Ag.UI.Graphics.callBaseMethod(this,"dispose")},clear:function(){var b=this.get_element();for(var a=0;a<b.childNodes.length;a++){if(b.childNodes[a].name==="drawString"){$common.removeElement(b.childNodes[b.childNodes.length-1])}}this._context.clearRect(0,0,this._width,this._height)},drawArc:function(g,e,h,d){var f=this._getGraphicStyle(d);var i=f.color.length>0&&f.outlineWidth>0;var j=f.backgroundColor.length>0;e=(e*Math.PI/180);h=(h*Math.PI/180);var c=new Sys.UI.Point(Math.round(g.x+g.width/2),Math.round(g.y+g.height/2));var a=Math.round(Math.min(g.width,g.height)/2);if(f.backgroundColor.length>0){this._context.fillStyle=f.backgroundColor}this._context.lineJoin="round";this._context.lineWidth=f.outlineWidth;if(f.color.length>0){this._context.strokeStyle=f.color}this._context.beginPath();this._context.arc(c.x,c.y,a,e,h,false);if(j){this._context.globalAlpha=f.opacity*f.backgroundOpacity;this._context.fill()}if(i){this._context.globalAlpha=f.opacity*f.outlineOpacity;this._context.stroke()}},drawLine:function(c,b,a){this._drawLines([c,b],false,a)},drawLines:function(b,a){this._drawLines(b,false,a)},drawPolygon:function(b,a){this._drawLines(b,true,a)},drawRectangle:function(a,c){var f=this._getGraphicStyle(c);var e=f.color.length>0&&f.outlineWidth>0;var d=f.backgroundColor.length>0;if(f.backgroundColor.length>0){this._context.fillStyle=f.backgroundColor}this._context.lineJoin="round";this._context.lineWidth=f.outlineWidth;if(f.color.length>0){this._context.strokeStyle=f.color}this._context.beginPath();if(d){this._context.globalAlpha=f.opacity*f.backgroundOpacity;this._context.fillRect(a.x,a.y,a.width,a.height)}if(e){this._context.globalAlpha=f.opacity*f.outlineOpacity;this._context.strokeRect(a.x,a.y,a.width,a.height)}},drawString:function(d,a,c){var f=$common.createElementFromTemplate({nodeName:"div",properties:{innerHTML:d,name:"drawString",style:{position:"absolute",left:a.x+"px",top:a.y+"px"}}},this.get_element());var b=$(f);var e=this._getGraphicStyle(c);b.css({color:e.color,"background-color":e.backgroundColor,"font-size":e.fontSize,"font-weight":e.fontWeight,opacity:e.opacity});return{width:b.width(),height:b.height()}},get_cssClass:function(){return this._cssClass},set_cssClass:function(a){this._cssClass=a;this._gxStyle=new Ag.UI.GraphicStyle(this._cssClass)},get_graphicStyle:function(){return this._gxStyle.clone()},set_graphicStyle:function(a){this._gxStyle=new Ag.UI.GraphicStyle(a)},_drawLines:function(c,g,b){if(c==null||c.length<2){return}var f=this._getGraphicStyle(b);var e=f.color.length>0&&f.outlineWidth>0;var d=(f.backgroundColor.length>0&&g);if(f.backgroundColor.length>0){this._context.fillStyle=f.backgroundColor}this._context.lineJoin="round";this._context.lineWidth=f.outlineWidth;if(f.color.length>0){this._context.strokeStyle=f.color}this._context.beginPath();this._context.moveTo(c[0].x,c[0].y);for(var a=1;a<c.length;a++){this._context.lineTo(c[a].x,c[a].y)}if(g){this._context.closePath()}if(d){this._context.globalAlpha=f.opacity*f.backgroundOpacity;this._context.fill()}if(e){this._context.globalAlpha=f.opacity*f.outlineOpacity;this._context.stroke()}},_getGraphicStyle:function(a){var b=this._gxStyle.clone();if(typeof(a)!=="undefined"){if(String.isInstanceOfType(a)){b.set_cssClass(a)}else{b.applyGraphicStyle(a)}}return b},_initVml:function(){G_vmlCanvasManager.initElement(this._canvas);this._context=this._canvas.getContext("2d")},_document_readystatechange:function(a){if(this._graphicsType==Ag.UI.GraphicsType.vml){this._initVml()}}};Ag.UI.Graphics.registerClass("Ag.UI.Graphics",Sys.UI.Control);Type.registerNamespace("Ag");Type.registerNamespace("Ag.UI");Ag.UI.LegendCheckMode=function(){};Ag.UI.LegendCheckMode.prototype={None:0,Empty:1,Checked:2,Unchecked:3};Ag.UI.LegendCheckMode.registerEnum("Ag.UI.LegendCheckMode");Ag.UI.LegendExpandIcon=function(){};Ag.UI.LegendExpandIcon.Open='WebResource.axd?d=lMZkEqmUub0QIqSAWwzYATPjHQEnUrbHX1tLNNnpF3VciIdVtWeE81qZZHy25s560&t=633868096223498346';Ag.UI.LegendExpandIcon.Close='WebResource.axd?d=lMZkEqmUub0QIqSAWwzYATPjHQEnUrbHX1tLNNnpF3V4qNrNfpVvL0KfPTxtM6BT0&t=633868096223498346';Ag.UI.LegendExpandMode=function(){};Ag.UI.LegendExpandMode.prototype={None:0,Empty:1,Expanded:2,Collapsed:3};Ag.UI.LegendExpandMode.registerEnum("Ag.UI.LegendExpandMode");Ag.UI.Legend=function(a){Ag.UI.Legend.initializeBase(this,[a]);this._cssClass=null;this._expand=Ag.UI.LegendExpandMode.None;this._check=Ag.UI.LegendCheckMode.None;this._imageUrl=null;this._imageWidth=20;this._imageHeight=16;this._label=null;this._value=null;this._children=null;this._childLegends=[];this._expandImg=null;this._checkBox=null;this._content=null;this._dataSource=null;this._initialized=false};Ag.UI.Legend.prototype={initialize:function(){Ag.UI.Legend.callBaseMethod(this,"initialize")},dispose:function(){Ag.UI.Legend.callBaseMethod(this,"dispose")},dataBind:function(){if(this._dataSource!=null){this._cssClass=this._dataSource.cssClass;this._expand=this._dataSource.expand;this._check=this._dataSource.check;this._imageUrl=this._dataSource.imageUrl;this._imageWidth=this._dataSource.imageWidth;this._imageHeight=this._dataSource.imageHeight;this._label=this._dataSource.label;this._value=this._dataSource.value;this._children=this._dataSource.children;var e=this.get_element();if(this._cssClass!=null){Sys.UI.DomElement.addCssClass(e,this._cssClass)}var h=document.createDocumentFragment();if(this._expand!=Ag.UI.LegendExpandMode.None||this._check!=Ag.UI.LegendCheckMode.None||this._imageUrl!=null||this._label!=null){var l=$common.createElementFromTemplate({nodeName:"table",properties:{cellPadding:0,cellSpacing:0}},h);var f=$common.createElementFromTemplate({nodeName:"tbody"},l);var j=$common.createElementFromTemplate({nodeName:"tr"},f);var c;if(this._expand!=Ag.UI.LegendExpandMode.None){c=$common.createElementFromTemplate({nodeName:"td",properties:{vAlign:"top",style:{width:"13px",paddingTop:"5px"}}},j);if(this._expand!=Ag.UI.LegendExpandMode.Empty){this._expandImg=$common.createElementFromTemplate({nodeName:"img",properties:{src:this._expand==Ag.UI.LegendExpandMode.Expanded?Ag.UI.LegendExpandIcon.Close:Ag.UI.LegendExpandIcon.Open,style:{width:"11px",height:"11px"}}},c);$addHandler(this._expandImg,"mousedown",Function.createDelegate(this,this._expandToggled))}}if(this._check!=Ag.UI.LegendCheckMode.None){c=$common.createElementFromTemplate({nodeName:"td",properties:{vAlign:"top",style:{width:"22px"}}},j);if(this._check!=Ag.UI.LegendCheckMode.Empty){this._checkBox=$common.createElementFromTemplate({nodeName:"input",properties:{type:"checkbox"}},c);this._checkBox.checked=this._check==Ag.UI.LegendCheckMode.Checked;$addHandler(this._checkBox,"click",Function.createDelegate(this,this._checkChanged))}}if(this._imageUrl!=null){c=$common.createElementFromTemplate({nodeName:"td",properties:{vAlign:"top",style:{width:(this._imageWidth+5)+"px"}}},j);var g=$common.createElementFromTemplate({nodeName:"img",properties:{src:this._imageUrl,style:{width:this._imageWidth+"px",height:this._imageHeight+"px"}}},c)}if(this._label!=null){c=$common.createElementFromTemplate({nodeName:"td",properties:{vAlign:"top",style:{paddingTop:"2px"}}},j);c.innerHTML=this._label}}if(this._children!=null&&this._children.length>0){this._content=$common.createElementFromTemplate({nodeName:"div",properties:{style:{display:this._expand!=Ag.UI.LegendExpandMode.Collapsed?"block":"none"}}},h);var k=e.id+"__";for(var d=0;d<this._children.length;++d){var a=$common.createElementFromTemplate({nodeName:"div",properties:{id:k+d}},this._content);var b=$create(Ag.UI.Legend,null,null,{parent:e.id},a);Array.add(this._childLegends,b);b.set_dataSource(this._children[d]);b.dataBind()}}e.appendChild(h);this._initialized=true}},uncheckAll:function(){this.set_check(false);this._checkCascade(false)},get_check:function(){return this._check},set_check:function(a){this._check=a;if(this._checkBox){this._checkBox.checked=a==Ag.UI.LegendCheckMode.Checked;this._checkBox.style.display=a>Ag.UI.LegendCheckMode.Empty?"inline":"none"}},get_checkedValues:function(){var a=[];this._getCheckedValues(this,a);return a},get_children:function(){return this._children},set_children:function(a){this._children=a},get_cssClass:function(){return this._cssClass},set_cssClass:function(a){this._cssClass=a},get_dataSource:function(){return this._dataSource},set_dataSource:function(a){if(a!=null||this._dataSource!=null){this._dataSource=a;this.raisePropertyChanged("dataSource")}},get_expand:function(){return this._expand},set_expand:function(a){this._expand=a},get_imageUrl:function(){return this._imageUrl},set_imageUrl:function(a){this._imageUrl=a},get_imageHeight:function(){return this._imageHeight},set_imageHeight:function(a){this._imageHeight=a},get_imageWidth:function(){return this._imageWidth},set_imageWidth:function(a){this._imageWidth=a},get_label:function(){return this._label},set_label:function(a){this._label=a},get_value:function(){return this._value},set_value:function(a){this._value=a},add_checkChanged:function(a){this.get_events().addHandler("checkChanged",a)},remove_checkChanged:function(a){this.get_events().removeHandler("checkChanged",a)},_checkBubble:function(c){if(c&&this._check==Ag.UI.LegendCheckMode.Unchecked){this._checkBox.checked=true;this._check=Ag.UI.LegendCheckMode.Checked}var b=this.get_parent();if(b!=null){b._checkBubble(c)}else{var a=this.get_events().getHandler("checkChanged");if(a!==null){a(this,Sys.EventArgs.Empty)}}},_checkCascade:function(b){if(this._check>=Ag.UI.LegendCheckMode.Checked){this._checkBox.checked=b;this._check=b?Ag.UI.LegendCheckMode.Checked:Ag.UI.LegendCheckMode.Unchecked}for(var a=0;a<this._childLegends.length;++a){this._childLegends[a]._checkCascade(b)}},_checkChanged:function(a){this._check=this._checkBox.checked?Ag.UI.LegendCheckMode.Checked:Ag.UI.LegendCheckMode.Unchecked;this._checkCascade(this._checkBox.checked);this._checkBubble(this._checkBox.checked)},_expandCascade:function(a){this._expandDisplay(a);for(var b=0;b<this._childLegends.length;++b){this._childLegends[b]._expandCascade(a)}},_expandDisplay:function(a){if(this._expand>=Ag.UI.LegendExpandMode.Expanded){this._expand=a?Ag.UI.LegendExpandMode.Expanded:Ag.UI.LegendExpandMode.Collapsed;this._expandImg.src=a?Ag.UI.LegendExpandIcon.Close:Ag.UI.LegendExpandIcon.Open;if(this._content){this._content.style.display=a?"block":"none"}}},_expandToggled:function(b){var a=this._expand!=Ag.UI.LegendExpandMode.Expanded;this._expandDisplay(a);if(b.shiftKey){this._expandCascade(a)}},_getCheckedValues:function(c,a){if(c._value!=null&&c._check!=Ag.UI.LegendCheckMode.Unchecked){if(!String.isInstanceOfType(c._value)||c._value.length>0){a[a.length]=c._value}}for(var b=0;b<c._childLegends.length;++b){this._getCheckedValues(c._childLegends[b],a)}}};Ag.UI.Legend.registerClass("Ag.UI.Legend",Sys.UI.Control);Type.registerNamespace("Ag");Type.registerNamespace("Ag.UI");Ag.UI.ScaleType=function(){if(arguments.length!==0){throw Error.parameterCount()}throw Error.notImplemented()};Ag.UI.ScaleType.prototype={arbitrary:0,fixed:1};Ag.UI.ScaleType.registerEnum("Ag.UI.ScaleType");Ag.UI.Units=function(){if(arguments.length!==0){throw Error.parameterCount()}throw Error.notImplemented()};Ag.UI.Units.prototype={feet:0,meters:1,pixels:2};Ag.UI.Units.registerEnum("Ag.UI.Units");Ag.UI.ClickMode=function(){if(arguments.length!==0){throw Error.parameterCount()}throw Error.notImplemented()};Ag.UI.ClickMode.prototype={click:0,zoomIn:1,pan:2,drawRectangle:3,drawPoint:4,drawLineString:5,drawPolygon:6,drawCircle:7,measureLength:8,measureArea:9};Ag.UI.ClickMode.registerEnum("Ag.UI.ClickMode");Ag.UI.MapClearType=function(){if(arguments.length!==0){throw Error.parameterCount()}throw Error.notImplemented()};Ag.UI.MapClearType.prototype={scale:0,all:1};Ag.UI.MapClearType.registerEnum("Ag.UI.MapClearType");Ag.UI.WheelMode=function(){if(arguments.length!==0){throw Error.parameterCount()}throw Error.notImplemented()};Ag.UI.WheelMode.prototype={off:0,panZoomOnly:1,on:2};Ag.UI.WheelMode.registerEnum("Ag.UI.WheelMode");Ag.UI.MapCoordEventArgs=function(b){var a=Function._validateParams(arguments,[{name:"mapCoord",type:Ag.Geo.Coordinate}]);if(a){throw a}Ag.UI.MapCoordEventArgs.initializeBase(this);this.mapCoord=b};Ag.UI.MapCoordEventArgs.prototype={get_mapCoord:function(){return this.mapCoord}};Ag.UI.MapCoordEventArgs.registerClass("Ag.UI.MapCoordEventArgs",Sys.EventArgs);Ag.UI.MapShapeEventArgs=function(a){var b=Function._validateParams(arguments,[{name:"mapShape",type:Ag.Geo.Geometry}]);if(b){throw b}Ag.UI.MapShapeEventArgs.initializeBase(this);this.mapShape=a};Ag.UI.MapShapeEventArgs.prototype={get_mapShape:function(){return this.mapShape}};Ag.UI.MapShapeEventArgs.registerClass("Ag.UI.MapShapeEventArgs",Sys.EventArgs);Ag.UI.Map=function(e){Ag.UI.Map.initializeBase(this,[e]);var b=$(e);var a=$common.getCurrentStyle(e,"position");if(a!=="relative"&&a!="absolute"){$common.setStyle(e,{position:"relative"})}var d={width:b.width(),height:b.height()};if(!(d.width&&d.height)){d={width:parseInt(b.css("width")),height:parseInt(b.css("height"))}}var c=$common.getPaddingBox(e);this._contentBounds={x:c.left,y:c.top,width:d.width,height:d.height};this._contentFrame=null;this._drawImageFrame=null;this._graphicsContainer=null;this._text=null;this._eventTarget=null;this._createChildren();this._graphics=null;this._dpi=96;this._fullExtent=new Ag.Geo.Envelope();this._extent=new Ag.Geo.Envelope();this._originMapCoord=new Ag.Geo.Coordinate();this._clear=false;this._units=Ag.UI.Units.feet;this._clickMode=Ag.UI.ClickMode.click;this._wheelMode=Ag.UI.WheelMode.panZoomOnly;this._mouseDown=false;this._anchor=new Sys.UI.Point(0,0);this._originalMapOffset=null;this._wheelTimer=null;this._wheelLevel=0;this._imageShape=null;this._imageShapeCoords=null;this._mapShape=null;this._mapShapeCoords=null;this._slices=180;this._mapServices=[];this._mapService_propertyChanged_delegate=Function.createDelegate(this,this._mapService_propertyChanged);this._webRequestQueue=null;this._wheelZoomFactor=1.18920711500273;this._zoomFactor=2};Ag.UI.Map.prototype={initialize:function(){Ag.UI.Map.callBaseMethod(this,"initialize");var a=this.get_element();$addHandler(this._eventTarget,"dblclick",Function.createDelegate(this,this._eventTarget_dblclick));$addHandler(this._eventTarget,"mousedown",Function.createDelegate(this,this._eventTarget_mousedown));$addHandler(this._eventTarget,"mousemove",Function.createDelegate(this,this._eventTarget_mousemove));$addHandler(this._eventTarget,"mouseup",Function.createDelegate(this,this._eventTarget_mouseup));$addHandler(this._eventTarget,"mousewheel",Function.createDelegate(this,this._eventTarget_mousewheel));this._graphics=$create(Ag.UI.Graphics,{graphicStyle:{color:"#7f7f7f",backgroundColor:"#dedede",backgroundOpacity:0.5,outlineWidth:2}},null,null,this._graphicsContainer)},dispose:function(){Ag.UI.Map.callBaseMethod(this,"dispose")},addService:function(a,b){b=(typeof(b)!=="undefined"?b:true);a.set__map(this);var c=$common.createElementFromTemplate({nodeName:"div"},this._drawImageFrame);a.set_serviceContainer(c);a.add_propertyChanged(this._mapService_propertyChanged_delegate);Array.add(this._mapServices,a);if(b){this._clear=true;this.refresh()}},insertService:function(b,a,c){c=(typeof(c)!=="undefined"?c:true);a.set__map(this);var d=$common.createElementFromTemplate({nodeName:"div"});this._drawImageFrame.insertBefore(d,this._drawImageFrame.childNodes[b]);a.set_serviceContainer(d);a.add_propertyChanged(this._mapService_propertyChanged_delegate);Array.insert(this._mapServices,b,a);if(c){this._clear=true;this.refresh()}},removeService:function(a){var b=Array.indexOf(this._mapServices,a);if(b>=0){Array.removeAt(this._mapServices,b);a.remove_propertyChanged(this._mapService_propertyChanged_delegate);var c=a.get_serviceContainer();$(c).remove()}},pan:function(f,e){var c=this._extent.get_width()*f;var g=this._extent.get_height()*e;this._extent.minx+=c;this._extent.miny+=g;this._extent.maxx+=c;this._extent.maxy+=g;this._onExtentChanged();var d=this.get_mapOffset();var b=this.get_width()*-f;var a=this.get_height()*e;d.x+=b;d.y+=a;this.set_mapOffset(d);this.refresh()},refresh:function(){if(this._clear){this._clearServices();for(var b=0;b<this._mapServices.length;b++){if(Ag.UI.TiledMapService.isInstanceOfType(this._mapServices[b])){this.set_mapOffset({x:0,y:0});this._originMapCoord=this.toMapCoord(new Sys.UI.Point(0,0));break}}this._clear=false}for(var b=0;b<this._mapServices.length;b++){var a=this._mapServices[b];if(!this._mouseDown||a.get_continuousRefresh()){a.refresh()}}},resize:function(d){var l=this._contentBounds.width;var i=this._contentBounds.height;var n=this.get_extent();var f=this.get_mapOffset();var g=this.get_element();var e=$(g);var p={width:e.width(),height:e.height()};if(!(p.width&&p.height)){p={width:parseInt(e.css("width")),height:parseInt(e.css("height"))}}var k=$common.getPaddingBox(g);this._contentBounds={x:k.left,y:k.top,width:p.width,height:p.height};$common.setBounds(this._contentFrame,this._contentBounds);$common.setBounds(this._eventTable,this._contentBounds);$common.setSize(this._eventTarget,this._contentBounds);f.x+=(p.width-l)*0.5;f.y+=(p.height-i)*0.5;this.set_mapOffset(f);if(d){var j=n.get_center();var o=n.get_width()*0.5;var m=n.get_height()*0.5;var b=p.width/l;var a=p.height/i;this._extent.minx=j.x-o*b;this._extent.miny=j.y-m*a;this._extent.maxx=j.x+o*b;this._extent.maxy=j.y+m*a}},toMapCoord:function(c){var b=this._extent;var a=b.minx+(c.x*b.get_width()/this.get_width());var d=(c.y*b.get_height()/this.get_height());var e=this._units==Ag.UI.Units.pixels?b.miny+d:b.maxy-d;return new Ag.Geo.Coordinate(a,e)},toMapCoords:function(h){var j=this._extent;var a=j.get_width()/this.get_width();var d=j.get_height()/this.get_height();var e=[];for(var c=0;c<h.length;c++){var g=j.minx+(h[c].x*a);var b=(h[c].y*d);var f=this._units==Ag.UI.Units.pixels?j.miny+b:j.maxy-b;e[c]=new Ag.Geo.Coordinate(g,f)}return e},toPixelPoint:function(c){if(c==null){return null}var b=this._extent;var a=(c.x-b.minx)*this.get_width()/b.get_width();var d=this._units==Ag.UI.Units.pixels?c.y-b.miny:b.maxy-c.y;var e=d*this.get_height()/b.get_height();return{x:a,y:e}},toPixelPoints:function(f){var e=this._extent;var c=this.get_width()/e.get_width();var a=this.get_height()/e.get_height();var b=[];for(var d=0;d<f.length;d++){b[d]={};b[d].x=(f[d].x-e.minx)*c;var g=this._units==Ag.UI.Units.pixels?f[d].y-e.miny:e.maxy-f[d].y;b[d].y=g*a}return b},zoom:function(b){var a=this.get_extent();a.scaleBy(b);this.set_extent(a)},zoomTo:function(c,b){b=b<1?1:b;var a=this.get_fullExtent().clone();a.scaleBy(1/Math.pow(this._zoomFactor,b-1));a.set_center(c);this.set_extent(a)},get_clickMode:function(){return this._clickMode},set_clickMode:function(a){if(a!==this._clickMode){this._clickMode=a;switch(a){case Ag.UI.ClickMode.pan:$common.setStyle(this._eventTarget,{cursor:"default"});break;default:$common.setStyle(this._eventTarget,{cursor:"crosshair"});break}this.raisePropertyChanged("clickMode")}},get_extent:function(){return this._extent.clone()},set_extent:function(a){var b=Function._validateParams(arguments,[{name:"value",type:Object,mayBeNull:false,optional:false}]);if(b){throw b}if(!Ag.Geo.Envelope.isInstanceOfType(a)){a=new Ag.Geo.Envelope(a.minx,a.miny,a.maxx,a.maxy)}a.reaspect(this._contentBounds.width/this._contentBounds.height);this._extent.minx=a.minx;this._extent.miny=a.miny;this._extent.maxx=a.maxx;this._extent.maxy=a.maxy;this._onExtentChanged();this._clear=true;this.refresh()},get_fullExtent:function(){return this._fullExtent.clone()},set_fullExtent:function(a){$common.applyProperties(this._fullExtent,a)},get_height:function(){return this._contentBounds.height},get_mapOffset:function(){if(Sys.Browser.agent==Sys.Browser.InternetExplorer){return new Sys.UI.Point(this._drawImageFrame.runtimeStyle.pixelLeft,this._drawImageFrame.runtimeStyle.pixelTop)}else{var b=$common.parseUnit(this._drawImageFrame.style.left);var a=$common.parseUnit(this._drawImageFrame.style.top);return new Sys.UI.Point(b.size,a.size)}},set_mapOffset:function(a){if(Sys.Browser.agent==Sys.Browser.InternetExplorer){this._drawImageFrame.runtimeStyle.pixelLeft=a.x;this._drawImageFrame.runtimeStyle.pixelTop=a.y}else{this._drawImageFrame.style.left=a.x+"px";this._drawImageFrame.style.top=a.y+"px"}},get_pixelSize:function(){return this.get_extent().get_width()/this._contentBounds.width},get_requestCount:function(){return this._serverRequests},get_scale:function(){return this.get_pixelSize()*this._dpi},set_scale:function(b){var c=this.get_scale();var a=0;if(b>=20&&b){a=b/c}else{if(b<20){a=20/c}}this.zoom(a)},get_services:function(){return this._mapServices},get_slices:function(){return this._slices},set_slices:function(a){this._slices=slices},get_units:function(){return this._units},set_units:function(a){this._units=a},get_webRequestQueue:function(){return this._webRequestQueue},set_webRequestQueue:function(a){this._webRequestQueue=a},get_width:function(){return this._contentBounds.width},get_zoomFactor:function(){return this._zoomFactor},set_zoomFactor:function(a){this._zoomFactor=a},get_zoomLevel:function(){var b=this.get_extent();b.reaspect(this.get_width()/this.get_height());var a=this.get_fullExtent();a.reaspect(this.get_width()/this.get_height());return(Math.log(a.get_width()/b.get_width())/Math.log(this._zoomFactor))+1},set_zoomLevel:function(b){b=b<1?1:b;var d=this.get_extent().get_center();var a=this.get_fullExtent().clone();a.scaleBy(1/Math.pow(this._zoomFactor,b-1));a.set_center(d);this.set_extent(a)},add_extentChanged:function(a){this.get_events().addHandler("extentChanged",a)},remove_extentChanged:function(a){this.get_events().removeHandler("extentChanged",a)},add_mapClick:function(a){this.get_events().addHandler("mapClick",a)},remove_mapClick:function(a){this.get_events().removeHandler("mapClick",a)},add_mapMove:function(a){this.get_events().addHandler("mapMove",a)},remove_mapMove:function(a){this.get_events().removeHandler("mapMove",a)},add_mapShape:function(a){this.get_events().addHandler("mapShape",a)},remove_mapShape:function(a){this.get_events().removeHandler("mapShape",a)},add_requestsCompleted:function(a){this.get_events().addHandler("requestsCompleted",a)},remove_requestsCompleted:function(a){this.get_events().removeHandler("requestsCompleted",a)},_appendMapOffset:function(b,a){if(Sys.Browser.agent==Sys.Browser.InternetExplorer){this._drawImageFrame.runtimeStyle.pixelLeft+=b;this._drawImageFrame.runtimeStyle.pixelTop+=a}else{var d=$common.parseUnit(this._drawImageFrame.style.left);var c=$common.parseUnit(this._drawImageFrame.style.top);this._drawImageFrame.style.left=String(d.size+b)+"px";this._drawImageFrame.style.top=String(c.size+a)+"px"}},_clearGraphics:function(){this._resetGraphics();this._graphics.clear()},_createChildren:function(){var b=this.get_element();var g=String(this._contentBounds.x);var f=String(this._contentBounds.y);var c=String(this._contentBounds.width);var a=String(this._contentBounds.height);var e=b.firstChild;this._contentFrame=$common.createElementFromTemplate({nodeName:"div",properties:{id:b.id+"_contentFrame",style:{position:"absolute",left:g+"px",top:f+"px",width:c+"px",height:a+"px",overflow:"hidden"}}});b.insertBefore(this._contentFrame,e);this._drawImageFrame=$common.createElementFromTemplate({nodeName:"div",properties:{id:b.id+"_drawImageFrame",style:{position:"absolute",left:"0px",top:"0px"}}},this._contentFrame);this._graphicsContainer=$common.createElementFromTemplate({nodeName:"div",properties:{style:{position:"absolute",left:"0px",top:"0px",width:c+"px",height:a+"px"}}},this._contentFrame);this._text=$common.createElementFromTemplate({nodeName:"div",properties:{style:{color:"#800000",display:"none",fontFamily:"Verdana",fontSize:"11px",textAlign:"center",position:"absolute",left:"0px",top:"0px",width:"100px",height:"100px"}}},this._contentFrame);this._eventTable=$common.createElementFromTemplate({nodeName:"table",properties:{border:"0",cellPadding:"0",cellSpacing:"0",style:{position:"absolute",left:g+"px",top:f+"px",width:c+"px",height:a+"px"}}},b);var d=this._eventTable.insertRow(-1);this._eventTarget=$common.createElementFromTemplate({nodeName:"td",properties:{style:{backgroundColor:"#ccccff",width:c+"px",height:a+"px",MozUserSelect:"none"},unselectable:"on"}},d);$(this._eventTarget).css("opacity","0.0")},_labelShape:function(){var n=null;var h=null;var b=0.3048;var j=1/(this._units==Ag.UI.Units.feet?1:b);switch(this._clickMode){case Ag.UI.ClickMode.measureLength:var g=this._mapShape.get_length()*j;if(g<5280){n=Math.round(g)+" ft"}else{n=(g/5280).toFixed(1)+" mi"}n+="\n";g*=b;if(g<1000){n+=Math.round(g)+" m"}else{n+=(g/1000).toFixed(1)+" km"}break;case Ag.UI.ClickMode.measureArea:h=this._imageShape.get_centroid();if(h!=null){var m=this._mapShape.get_area()*j*j;var e=m/43560;if(m<=2787840){n=Math.round(m)+" sq ft"}else{n=(m/27878400).toFixed(2)+" sq mi"}n+="\n";m*=b*b;if(m<=100000){n+=Math.round(m)+" sq m"}else{n+=(m/1000000).toFixed(2)+" sq km"}n+="\n";n+=e.toFixed(2)+" acres"}break}if(n==null){$common.setVisible(this._text,false)}else{while(this._text.childNodes.length>0){this._text.removeChild(this._text.lastChild)}var o=n.split("\n");for(var f=0;f<o.length;++f){this._text.appendChild(document.createTextNode(o[f]));if(f<o.length-1){this._text.appendChild(document.createElement("br"))}}if(this._clickMode==Ag.UI.ClickMode.measureLength){if(this._imageShape.coordinates.length==2){var l=this._imageShape.coordinates[0].x-50;var k=this._imageShape.coordinates[0].y+(this._imageShape.coordinates[1].y<this._imageShape.coordinates[0].y?7:-33);$common.setLocation(this._text,{x:l,y:k});$common.setVisible(this._text,true)}}else{$common.setLocation(this._text,{x:Math.round(h.x)-50,y:Math.round(h.y)-22});$common.setVisible(this._text,true)}}},_onExtentChanged:function(){var a=this.get_events().getHandler("extentChanged");if(a!==null){a(this,Sys.EventArgs.Empty)}},_onMapClick:function(b){var a=this.get_events().getHandler("mapClick");if(a!==null){a(this,new Ag.UI.MapCoordEventArgs(b))}},_onMapMove:function(b){var a=this.get_events().getHandler("mapMove");if(a!==null){a(this,new Ag.UI.MapCoordEventArgs(b))}},_onMapShape:function(a){var b=this.get_events().getHandler("mapShape");if(b!==null){b(this,new Ag.UI.MapShapeEventArgs(a))}},_requestQueued:function(){if(this._webRequestQueue){this._webRequestQueue.queueExternal()}},_requestCompleted:function(){if(this._webRequestQueue){this._webRequestQueue.completedExternal()}},_redrawShape:function(){var a=this.get__imageShapeCoords();this._graphics.clear();if(this._clickMode==Ag.UI.ClickMode.drawPolygon||this._clickMode==Ag.UI.ClickMode.drawCircle||this._clickMode==Ag.UI.ClickMode.measureArea){this._graphics.drawPolygon(a)}else{this._graphics.drawLines(a)}},_clearServices:function(){for(var a=0;a<this._mapServices.length;a++){this._mapServices[a]._clearFrame(Ag.UI.MapClearType.scale)}},_resetGraphics:function(){$common.setVisible(this._text,false);this._imageShapeCoords=null;this._imageShape=null;this._mapShapeCoords=null;this._mapShape=null},get__imageShapeCoords:function(){return this._imageShapeCoords},get__mapShapeCoords:function(){return this._mapShapeCoords},_mouseWheelFinish:function(){this._wheelTimer=null;if(this._wheelLevel!=0){var b=this.toMapCoord(this._anchor);var c=Math.pow(this._wheelZoomFactor,-this._wheelLevel);var a=this.get_extent();a.scaleBy(c);this.set_extent(a);this._wheelLevel=0;this.refresh()}},_eventTarget_dblclick:function(d){switch(this._clickMode){case Ag.UI.ClickMode.drawLineString:this._mapShapeCoords.length--;var c=new Ag.Geo.LineString();c.coordinates=this._mapShapeCoords;this._onMapShape(c);this._clearGraphics();break;case Ag.UI.ClickMode.drawPolygon:if(this._mapShapeCoords.length>2){var a=this._mapShapeCoords.length-1;this._mapShapeCoords[a]=new Ag.Geo.Coordinate(this._mapShapeCoords[0].x,this._mapShapeCoords[0].y);var b=new Ag.Geo.Polygon();b.exteriorRing.coordinates=this._mapShapeCoords;this._onMapShape(b);this._clearGraphics()}break;case Ag.UI.ClickMode.measureLength:case Ag.UI.ClickMode.measureArea:this._clearGraphics();break}},_eventTarget_mousedown:function(f){var g;var c;switch(this._clickMode){case Ag.UI.ClickMode.click:c=this.toMapCoord({x:f.offsetX,y:f.offsetY});this._onMapClick(c);break;case Ag.UI.ClickMode.pan:this._anchor.x=f.clientX;this._anchor.y=f.clientY;this._mouseDown=true;this._originalMapOffset=this.get_mapOffset();if(Sys.Browser.agent==Sys.Browser.InternetExplorer){this._eventTarget.setCapture()}break;case Ag.UI.ClickMode.zoomIn:case Ag.UI.ClickMode.drawRectangle:this._anchor.x=f.offsetX;this._anchor.y=f.offsetY;this._mouseDown=true;break;case Ag.UI.ClickMode.drawPoint:c=this.toMapCoord({x:f.offsetX,y:f.offsetY});this._onMapShape(new Ag.Geo.Point(c));break;case Ag.UI.ClickMode.drawLineString:case Ag.UI.ClickMode.drawPolygon:case Ag.UI.ClickMode.measureLength:case Ag.UI.ClickMode.measureArea:g=new Sys.UI.Point(f.offsetX,f.offsetY);c=this.toMapCoord(g);if(this._imageShape==null||this._mapShape==null){if(this._clickMode==Ag.UI.ClickMode.drawLineString||this._clickMode==Ag.UI.ClickMode.measureLength){this._imageShape=new Ag.Geo.LineString();this._imageShapeCoords=this._imageShape.coordinates;this._mapShape=new Ag.Geo.LineString();this._mapShapeCoords=this._mapShape.coordinates}else{this._imageShape=new Ag.Geo.Polygon();this._imageShapeCoords=this._imageShape.exteriorRing.coordinates;this._mapShape=new Ag.Geo.Polygon();this._mapShapeCoords=this._mapShape.exteriorRing.coordinates}}var d=this.get__imageShapeCoords();var a=this.get__mapShapeCoords();var b=(d.length==0?0:d.length-1);d[b]=g;a[b]=c;++b;d[b]=g;a[b]=c;this._redrawShape();if(this._clickMode==Ag.UI.ClickMode.measureArea){this._labelShape()}break;case Ag.UI.ClickMode.drawCircle:this._anchor.x=f.offsetX;this._anchor.y=f.offsetY;this._mouseDown=true;break}},_eventTarget_mousemove:function(j){var h,b;var l,k;switch(this._clickMode){case Ag.UI.ClickMode.click:h=new Sys.UI.Point(j.offsetX,j.offsetY);b=this.toMapCoord(h);this._onMapMove(b);break;case Ag.UI.ClickMode.pan:if(this._mouseDown){l=j.clientX-this._anchor.x;k=j.clientY-this._anchor.y;if(l!=0||k!=0){this._appendMapOffset(l,k);this._anchor.x=j.clientX;this._anchor.y=j.clientY;this.refresh()}}break;case Ag.UI.ClickMode.zoomIn:case Ag.UI.ClickMode.drawRectangle:if(this._mouseDown){var g=new Ag.Geo.Envelope(this._anchor.x,this._anchor.y,j.offsetX,j.offsetY);this._graphics.clear();this._graphics.drawRectangle({x:g.minx,y:g.miny,width:g.get_width(),height:g.get_height()})}break;case Ag.UI.ClickMode.drawLineString:case Ag.UI.ClickMode.drawPolygon:case Ag.UI.ClickMode.measureLength:case Ag.UI.ClickMode.measureArea:if(this._imageShape!=null){h=new Sys.UI.Point(j.offsetX,j.offsetY);b=this.toMapCoord(h);var c=this.get__imageShapeCoords();var f=this.get__mapShapeCoords();var d=c.length-1;c[d]=h;f[d]=b;this._redrawShape();if(this._clickMode==Ag.UI.ClickMode.measureLength||this._clickMode==Ag.UI.ClickMode.measureArea){this._labelShape()}}break;case Ag.UI.ClickMode.drawCircle:if(this._mouseDown){l=this._anchor.x-j.offsetX;k=this._anchor.y-j.offsetY;var a=Math.sqrt((l*l)+(k*k));this._graphics.clear();this._graphics.drawArc({x:this._anchor.x-a,y:this._anchor.y-a,width:a*2,height:a*2},0,360)}break}},_eventTarget_mouseup:function(w){var o=this._mouseDown;this._mouseDown=false;if(Sys.Browser.agent==Sys.Browser.InternetExplorer){document.releaseCapture()}if(o){var l,k;var m;switch(this._clickMode){case Ag.UI.ClickMode.pan:var g=this.get_mapOffset();l=g.x-this._originalMapOffset.x;k=g.y-this._originalMapOffset.y;var u=l/this.get_width();var t=k/this.get_height();var v=this._extent.get_width()*-u;var B=this._extent.get_height()*t;this._extent.minx+=v;this._extent.miny+=B;this._extent.maxx+=v;this._extent.maxy+=B;this._onExtentChanged();this.refresh();break;case Ag.UI.ClickMode.zoomIn:case Ag.UI.ClickMode.drawRectangle:var f=this.toMapCoord(this._anchor);var c=this.toMapCoord(new Sys.UI.Point(w.offsetX,w.offsetY));if(this._clickMode==Ag.UI.ClickMode.zoomIn){var p=new Ag.Geo.Envelope(f.x,f.y,c.x,c.y);var b=this.get_pixelSize()*6;if(p.get_width()<b&&p.get_height()<b){this._extent.set_center(p.get_center());this._extent.scaleBy(0.5);this._onExtentChanged();this._clear=true;this.refresh()}else{this.set_extent(p)}}else{m=new Ag.Geo.Polygon();m.exteriorRing.coordinates=[{x:Math.min(f.x,c.x),y:Math.min(f.y,c.y)},{x:Math.min(f.x,c.x),y:Math.max(f.y,c.y)},{x:Math.max(f.x,c.x),y:Math.max(f.y,c.y)},{x:Math.max(f.x,c.x),y:Math.min(f.y,c.y)},{x:Math.min(f.x,c.x),y:Math.min(f.y,c.y)}];this._onMapShape(m)}this._graphics.clear();break;case Ag.UI.ClickMode.drawCircle:l=this._anchor.x-w.offsetX;k=this._anchor.y-w.offsetY;if(l!=0&&k!=0){var z=Math.sqrt((l*l)+(k*k));m=new Ag.Geo.Polygon();var s=m.exteriorRing.coordinates;var q=this._slices;for(var r=0;r<=q;++r){var A=(r*360/q)*(Math.PI/180);var j=this._anchor.x+Math.cos(A)*z;var h=this._anchor.y+Math.sin(A)*z;s[r]=this.toMapCoord({x:j,y:h})}this._onMapShape(m)}this._clearGraphics();break}}},_eventTarget_mousewheel:function(b){if(this._wheelMode==Ag.UI.WheelMode.off||(this._wheelMode==Ag.UI.WheelMode.panZoomOnly&&this._clickMode!=Ag.UI.ClickMode.pan&&this._clickMode!=Ag.UI.ClickMode.zoomIn)){return}var d=0;if(b.rawEvent.wheelDelta){d=b.rawEvent.wheelDelta/120;if(Sys.Browser.agent==Sys.Browser.Opera){d=-d}}else{if(b.rawEvent.detail){d=-b.detail/3}}if(d!=0){if(this._wheelTimer==null){this._anchor.x=b.clientX;this._anchor.y=b.clientY}else{window.clearTimeout(this._wheelTimer);this._wheelTimer=null}this._wheelLevel+=d;var c=Math.pow(this._wheelZoomFactor,this._wheelLevel);var a=this;this._wheelTimer=window.setTimeout(function(){a._mouseWheelFinish()},1000)}},_mapService_propertyChanged:function(b,a){if(a.get_propertyName()=="urlFormat"){this._clear=true}}};Ag.UI.Map.registerClass("Ag.UI.Map",Sys.UI.Control);Ag.UI.MapImage=function(e,f,c,d,a,b){Ag.UI.MapImage.initializeBase(this);this._extent=e.clone();this._pixelSize=b;this._loaded=false;this._originOffset=new Sys.UI.Point(f.x,f.y);this._width=d;this._height=a;this._imageUrl="";this._image=null;this._image_load_delegate=Function.createDelegate(this,this._image_load);this._events=null;if(c){this.set_imageUrl(c)}};Ag.UI.MapImage.prototype={dispose:function(){if(this._image!=null){$removeHandler(this._image,"load",this._image_load_delegate);delete this._image}},get_events:function(){if(arguments.length!==0){throw Error.parameterCount()}if(!this._events){this._events=new Sys.EventHandlerList()}return this._events},get_extent:function(){return this._extent.clone()},set_extent:function(a){$common.applyProperties(this._extent,a)},get_imageUrl:function(){return this._imageUrl},set_imageUrl:function(a){this._imageUrl=a;this._loaded=false;if(this._image!=null){$removeHandler(this._image,"load",this._image_load_delegate)}this._image=$common.createElementFromTemplate({nodeName:"img",properties:{style:{position:"absolute",left:String(this._originOffset.x)+"px",top:String(this._originOffset.y)+"px",width:String(this._width)+"px",height:String(this._height)+"px",MozUserSelect:"none"},unselectable:"on"}});$addHandler(this._image,"load",this._image_load_delegate);this._image.src=this._imageUrl},get_loaded:function(){return this._loaded},get_originOffset:function(){return new Sys.UI.Point(this._originOffset.x,this._originOffset.y)},set_originOffset:function(a){$common.applyProperties(this._originOffset,a)},get_pixelSize:function(){return this._pixelSize},set_pixelSize:function(a){this._pixelSize=a},get_image:function(){return this._image},add_load:function(a){this.get_events().addHandler("load",a)},remove_load:function(a){this.get_events().removeHandler("load",a)},_onLoad:function(){this._loaded=true;var a=this.get_events().getHandler("load");if(a!==null){a(this,Sys.EventArgs.Empty)}},_image_load:function(a){this._onLoad()}};Ag.UI.MapImage.registerClass("Ag.UI.MapImage");Ag.UI.MapService=function(){Ag.UI.MapService.initializeBase(this);this._map=null;this._serviceContainer=null;this._scaleType=Ag.UI.ScaleType.arbitrary;this._urlFormat=""};Ag.UI.MapService.prototype={refresh:function(){},get_continuousRefresh:function(){throw Error.notImplemented(null)},get_serviceContainer:function(){return this._serviceContainer},set_serviceContainer:function(a){this._serviceContainer=a},get_scaleType:function(){return this._scaleType},set_scaleType:function(a){this._scaleType=a},get_urlFormat:function(){return this._urlFormat},set_urlFormat:function(a){if(a!==this._urlFormat){this._urlFormat=a;this.raisePropertyChanged("urlFormat")}},_clearFrame:function(a){},set__map:function(a){this._map=a}};Ag.UI.MapService.registerClass("Ag.UI.MapService",Sys.Component);Ag.UI.ImageBasedMapService=function(){Ag.UI.ImageBasedMapService.initializeBase(this);this._maxMapImages=4;this._mapImages=[];this._usePost=false;this._mapImage_load_delegate=Function.createDelegate(this,this._mapImage_load)};Ag.UI.ImageBasedMapService.prototype={get_mapImages:function(){return this._mapImages},get_usePost:function(){return this._usePost},set_usePost:function(a){this._usePost=a},_clearFrame:function(c){while(this._mapImages.length>0){var a=this._mapImages[0];if(!a.get_loaded()){this._map._requestCompleted()}var b=a.get_image();if(b){$common.removeElement(b)}a.dispose();Array.removeAt(this._mapImages,0)}},_loadMapImage:function(a){this._map._requestQueued();if(a.get_loaded()){this._onMapImageLoaded(a)}else{a.add_load(this._mapImage_load_delegate)}},_mapImageExists:function(e,b){for(var c=0;c<this._mapImages.length;c++){var d=this._mapImages[c];var a=d.get_originOffset();if(d.get_pixelSize()==b&&a.x==e.x&&a.y==e.y){return true}}return false},_onMapImageLoaded:function(a){this._serviceContainer.appendChild(a.get_image());this._map._requestCompleted()},_mapImage_load:function(b,a){this._onMapImageLoaded(b)}};Ag.UI.ImageBasedMapService.registerClass("Ag.UI.ImageBasedMapService",Ag.UI.MapService);Ag.UI.TiledMapService=function(){Ag.UI.TiledMapService.initializeBase(this);this._tileSize=512};Ag.UI.TiledMapService.prototype={refresh:function(){if(this._urlFormat!==""){var q=this._map.get_pixelSize();var e=this._map.get_mapOffset();var k=this._map._originMapCoord;var i=this._tileSize;var o=Math.floor(-e.x/i)*i;var n=Math.floor(-e.y/i)*i;var b=o+this._map.get_width()+Math.abs(e.x%i);var a=n+this._map.get_height()+Math.abs(e.y%i);for(var h=o;h<b;h+=i){for(var g=n;g<a;g+=i){var r=new Sys.UI.Point(h,g);if(!this._mapImageExists(r,q)){var l=new Ag.Geo.Coordinate(k.x+(h)*q,k.y-(g)*q);var f=new Ag.Geo.Coordinate(k.x+(h+i-0.1)*q,k.y-(g+i-0.1)*q);var j=new Ag.Geo.Envelope(l.x,f.y,f.x,l.y);var p=String.format(this._urlFormat,j.minx,j.miny,j.maxx,j.maxy,i,i);var m;if(this._usePost){var d=p.substr(p.indexOf("?")+1);p=p.substr(0,p.length-d.length-1);m=new Ag.UI.MapImage(j,r,"",i,i,q);Array.add(this._mapImages,m);var c=function(s,t){var u=function(v,w){s._post_succeeded(v,w,t)};$.post(p,d,u,"text")};c(this,m)}else{m=new Ag.UI.MapImage(j,r,p,i,i,q);Array.add(this._mapImages,m);this._loadMapImage(m)}}}}}},get_continuousRefresh:function(){return true},get_tileSize:function(){return this._tileSize},set_tileSize:function(a){this._tileSize=a},_post_succeeded:function(b,c,a){a.set_imageUrl(b);this._loadMapImage(a)}};Ag.UI.TiledMapService.registerClass("Ag.UI.TiledMapService",Ag.UI.ImageBasedMapService);Ag.UI.ShingledMapService=function(){Ag.UI.ShingledMapService.initializeBase(this)};Ag.UI.ShingledMapService.prototype={refresh:function(){if(this._urlFormat!==""){var f=this._map.get_extent();var d=this._map.get_mapOffset();var e=this._map.get_width();var a=this._map.get_height();var b=String.format(this._urlFormat,f.minx,f.miny,f.maxx,f.maxy,e,a);if(this._usePost){var h=b.substr(b.indexOf("?")+1);b=b.substr(0,b.length-h.length-1);var c=this;$.post(b,h,function(i,j){c._post_succeeded(i,j,f,d,e,a)},"text")}else{var g=new Ag.UI.MapImage(f,new Sys.UI.Point(-d.x,-d.y),b,e,a,this._map.get_pixelSize());Array.add(this._mapImages,g);this._loadMapImage(g)}}},get_continuousRefresh:function(){return false},_onMapImageLoaded:function(a){var b=a.get_image();this._serviceContainer.appendChild(b);while(this._serviceContainer.childNodes.length>1){$common.removeElement(this._serviceContainer.childNodes[0])}this._map._requestCompleted()},_post_succeeded:function(f,g,d,b,c,a){var e=new Ag.UI.MapImage(d,new Sys.UI.Point(-b.x,-b.y),f,c,a,this._map.get_pixelSize());this._loadMapImage(e)}};Ag.UI.ShingledMapService.registerClass("Ag.UI.ShingledMapService",Ag.UI.ImageBasedMapService);Ag.UI.GraphicServiceItemData=function(e,a,c,b,d){this._labelSize=null;this._geometry=new Ag.Geo.GeometryCollection();this._geometry.add(e);this._label=a;this._labelCoord=Ag.Geo.Coordinate.fromObject(c);this._style=new Ag.UI.GraphicStyle(b);this._pointSize={width:d.width,height:d.height}};Ag.UI.GraphicServiceItemData.prototype={get_geometry:function(){return this._geometry.getItem(0)},set_geometry:function(a){this._geometry.clear();this._geometry.add(a)},get_label:function(){return this._label},set_label:function(a){this._label=a},get_labelCoord:function(){return this._labelCoord},set_labelCoord:function(a){this._labelCoord=Ag.Geo.Coordinate.fromObject(a)},get_style:function(){return this._style},set_style:function(a){this._style=new Ag.UI.GraphicStyle(a)},get_pointSize:function(){return this._pointSize},set_pointSize:function(a){this._pointSize={width:a.width,height:a.height}}};Ag.UI.GraphicServiceItemData.registerClass("Ag.UI.GraphicServiceItemData");Ag.UI.GraphicService=function(){Ag.UI.GraphicService.initializeBase(this);this._items=[];this._graphicTiles=[];this._cssClass="";this._gxStyle=new Ag.UI.GraphicStyle();this._pointSize={width:8,height:8}};Ag.UI.GraphicService.prototype={initialize:function(){Ag.UI.GraphicService.callBaseMethod(this,"initialize")},dispose:function(){Ag.UI.GraphicService.callBaseMethod(this,"dispose")},addShape:function(a,b){if(typeof(b)==="undefined"||b===null){b=""}var c=this._get_currentTile();var d=new Ag.UI.GraphicServiceItemData(a,b,this._getLabelCoord(a),this._gxStyle,this._pointSize);d._labelSize=this._drawGraphic(c,a,b,this._gxStyle,this._pointSize);Array.add(this._items,d)},findShape:function(g,b){var c=this._map.toPixelPoint(g.coordinate);var e=this._map.get_pixelSize()*b;for(var d=0;d<this._items.length;d++){var a=this._items[d].get_geometry();if(a.distance(g)<e){return a}var f=this._map.toPixelPoint(this._items[d]._labelCoord);if(f.x-b<=c.x&&c.x<=f.x+this._items[d]._labelSize.width+b&&f.y-b<=c.y&&c.y<=f.y+this._items[d]._labelSize.height+b){return a}}return null},refresh:function(){this._clearFrame(Ag.UI.MapClearType.all);var a=this._newGraphicTile();this._drawGraphics(a);Array.add(this._graphicTiles,a)},removeShape:function(b){var a=0;for(;a<this._items.length;a++){if(this._items[a].get_geometry()===b){break}}if(a<this._items.length){Array.removeAt(this._items,a)}this.refresh()},clear:function(){this._items=[];this.refresh()},get_cssClass:function(){return this._cssClass},set_cssClass:function(a){this._cssClass=a;this._gxStyle=new Ag.UI.GraphicStyle(a)},get_continuousRefresh:function(){return false},get_graphicStyle:function(){return this._gxStyle.clone()},set_graphicStyle:function(a){this._gxStyle=new Ag.UI.GraphicStyle(a)},get_length:function(){return this._items.length},get_geometries:function(){var b=new Ag.Geo.GeometryCollection();for(var a=0;a<this._items.length;a++){b.add(this._items[a].get_geometry())}return b},get_items:function(){return this._items},get_pointSize:function(){return this._pointSize},set_pointSize:function(a){if(typeof(a)==="undefined"||a==null||a.width<=0||a.height<=0){a={width:0,height:0}}this._pointSize=a},_clearFrame:function(d){var b,c;if(d==Ag.UI.MapClearType.scale){var a=this._map.get_pixelSize();for(b=0;b<this._graphicTiles.length;b++){if(this._graphicTiles[b].pixelSize!==a){c=this._graphicTiles[b].get_element();this._graphicTiles[b].dispose();$common.removeElement(c);Array.removeAt(this._graphicTiles,b);b--}}}else{for(b=0;b<this._graphicTiles.length;b++){c=this._graphicTiles[b].get_element();this._graphicTiles[b].dispose();$common.removeElement(c)}Array.clear(this._graphicTiles)}},_drawGraphic:function(e,a,c,d,f){e.set_graphicStyle(d);switch(a.get_geometryType()){case Ag.Geo.GeometryType.point:this._drawPointGraphic(e,a,f);break;case Ag.Geo.GeometryType.lineString:this._drawLineStringGraphic(e,a);break;case Ag.Geo.GeometryType.polygon:this._drawPolygonGraphic(e,a);break}var b={width:0,height:0};switch(a.get_geometryType()){case Ag.Geo.GeometryType.point:b=this._drawPointLabel(e,a,c);break;case Ag.Geo.GeometryType.lineString:b=this._drawLineStringLabel(e,a,c);break;case Ag.Geo.GeometryType.polygon:b=this._drawPolygonLabel(e,a,c);break}return b},_drawGraphics:function(c){for(var b=0;b<this._items.length;b++){c.set_graphicStyle(this._items[b]._style);var a=this._items[b].get_geometry();switch(a.get_geometryType()){case Ag.Geo.GeometryType.point:this._drawPointGraphic(c,a,this._items[b]._pointSize);this._items[b]._labelSize=this._drawPointLabel(c,a,this._items[b]._label);break;case Ag.Geo.GeometryType.lineString:this._drawLineStringGraphic(c,a);this._items[b]._labelSize=this._drawLineStringLabel(c,a,this._items[b]._label);break;case Ag.Geo.GeometryType.polygon:this._drawPolygonGraphic(c,a);this._items[b]._labelSize=this._drawPolygonLabel(c,a,this._items[b]._label);break}}},_drawPointGraphic:function(c,a,d){if(d.width>0&&d.height>0){if(this._map._extent.contains(a)){var e=new Sys.UI.Bounds(0,0,d.width,d.height);var b=this._map.toPixelPoint(a.coordinate);e.x=b.x-(e.width/2);e.y=b.y-(e.height/2);c.drawArc(e,0,360)}}},_drawPointLabel:function(d,a,b){if(b!==""&&this._map._extent.contains(a)){var c=this._map.toPixelPoint(a.coordinate);return d.drawString(b,c)}else{return{width:0,height:0}}},_drawLineStringGraphic:function(a,b){if(this._map._extent.contains(b)){var c=this._map.toPixelPoints(b.coordinates);a.drawLines(c)}},_drawLineStringLabel:function(c,d,a){if(a!==""&&this._map._extent.contains(d)){var b=this._map.toPixelPoint(d.coordinates[0]);return c.drawString(a,b)}else{return{width:0,height:0}}},_drawPolygonGraphic:function(b,a){if(this._map._extent.contains(a)){var c=this._map.toPixelPoints(a.exteriorRing.coordinates);b.drawPolygon(c)}},_drawPolygonLabel:function(d,b,a){if(a!==""&&this._map._extent.contains(b)){var c=this._map.toPixelPoint(b.get_centroid());return d.drawString(a,c)}else{return{width:0,height:0}}},_getLabelCoord:function(a){switch(a.get_geometryType()){case Ag.Geo.GeometryType.point:return a.coordinate;case Ag.Geo.GeometryType.lineString:return a.coordinates[0];case Ag.Geo.GeometryType.polygon:return a.get_centroid();default:throw Error.argumentType("mapShape",Object.getType(a),Ag.Geo.Geometry)}},_newGraphicTile:function(){var a=this._map.get_mapOffset();var b=$common.createElementFromTemplate({nodeName:"div",properties:{style:{position:"absolute",left:-a.x+"px",top:-a.y+"px",width:this._map.get_width()+"px",height:this._map.get_height()+"px"}}},this._serviceContainer);var c=$create(Ag.UI.Graphics,null,null,null,b);c.pixelSize=this._map.get_pixelSize();return c},_get_currentTile:function(){if(this._graphicTiles.length==0){return null}else{return this._graphicTiles[this._graphicTiles.length-1]}}};Ag.UI.GraphicService.registerClass("Ag.UI.GraphicService",Ag.UI.MapService);Type.registerNamespace("Ag");Type.registerNamespace("Ag.UI");Ag.UI.ScaleTextUnits=function(){};Ag.UI.ScaleTextUnits.prototype={Feet:0,Meters:1};Ag.UI.ScaleTextUnits.registerEnum("Ag.UI.ScaleTextUnits");Ag.UI.ScaleText=function(a){Ag.UI.ScaleText.initializeBase(this,[a]);this._metersPerFoot=0.3048;this._map=null;this._pixelLength=0;this._precision=3;this._units=Ag.UI.ScaleTextUnits.Feet};Ag.UI.ScaleText.prototype={initialize:function(){Ag.UI.ScaleText.callBaseMethod(this,"initialize");if(this._map!=null){this._map.add_extentChanged(Function.createDelegate(this,this._mapExtentChanged));this._updateText()}},dispose:function(){Ag.UI.ScaleText.callBaseMethod(this,"dispose")},get_map:function(){return this._map},set_map:function(a){this._map=a},get_pixelLength:function(){return this._pixelLength},set_pixelLength:function(a){this._pixelLength=a},get_units:function(){return this._units},set_units:function(a){this._units=a},_getLengthText:function(){if(this._map===null||this._pixelLength<=0){return""}var a=this._map.get_pixelSize()*this._pixelLength;if(this._map.get_units()==Ag.UI.Units.Pixels){return String.format("{0:n0} pixels",a)}if(this._units==Ag.UI.ScaleTextUnits.Feet){if(this._map.get_units()==Ag.UI.Units.meters){a/=this._metersPerFoot}if(a<5280){var b=a>=100?"{0:n0}":a>=10?"{0:n1}":"{0:n2}";return String.format(b+" ft",a)}else{a/=5280;return String.format("{0:n2} mi",a)}}else{if(this._map.get_units()==Ag.UI.Units.feet){a*=this._metersPerFoot}if(a<1000){var b=a>=100?"{0:n0}":a>=10?"{0:n1}":"{0:n2}";return String.format(b+" m",a)}else{a*=0.001;return String.format("{0:n2} km",a)}}},_mapExtentChanged:function(){this._updateText()},_updateText:function(){this.get_element().innerHTML=this._getLengthText()}};Ag.UI.ScaleText.registerClass("Ag.UI.ScaleText",Sys.UI.Control);Type.registerNamespace("Ag");Type.registerNamespace("Ag.UI");Ag.UI.PanDirection=function(){};Ag.UI.PanDirection.prototype={North:0,East:1,South:2,West:3};Ag.UI.PanDirection.registerEnum("Ag.UI.PanDirection");Ag.UI.ZoomBarDirection=function(){};Ag.UI.ZoomBarDirection.prototype={Normal:0,Reversed:1};Ag.UI.ZoomBarDirection.registerEnum("Ag.UI.ZoomBarDirection");Ag.UI.ZoomBarOrientation=function(){};Ag.UI.ZoomBarOrientation.prototype={Vertical:0,Horizontal:1};Ag.UI.ZoomBarOrientation.registerEnum("Ag.UI.ZoomBarOrientation");Ag.UI.PanEventArgs=function(a){Ag.UI.PanEventArgs.initializeBase(this);this._direction=a};Ag.UI.PanEventArgs.prototype={get_direction:function(){return this._direction}};Ag.UI.PanEventArgs.registerClass("Ag.UI.PanEventArgs",Sys.EventArgs);Ag.UI.ZoomBar=function(a){Ag.UI.ZoomBar.initializeBase(this,[a]);this._levelCount=9;this._currentLevel=1;this._showPan=true;this._direction=Ag.UI.ZoomBarDirection.Normal;this._orientation=Ag.UI.ZoomBarOrientation.Vertical;this._initialized=false;this._slider=null;this._sliderPosition=null;this._isSliding=false;this._map=null};Ag.UI.ZoomBar.prototype={initialize:function(){Ag.UI.ZoomBar.callBaseMethod(this,"initialize");var u=this._isPositive();var m=this._orientation==Ag.UI.ZoomBarOrientation.Vertical;var o=this._showPan?37:17;var f=(this._showPan?42:0)+this._levelCount*8+45;var e=this.get_element();e.style.width=(m?o:f)+"px";e.style.height=(m?f:o)+"px";if(this._showPan){var h=$common.createElementFromTemplate({nodeName:"img",properties:{src:'WebResource.axd?d=lMZkEqmUub0QIqSAWwzYAbQzbpkDcFzE6uZkI-Hb_XbwJRAwTkc-ZtBUN3v90ZJG0&t=633868096223498346',title:"Pan N/S/E/W",style:{position:"absolute",left:"0px",top:"0px",width:"37px",height:"37px"}}},e);$addHandler(h,"mousedown",Function.createDelegate(this,this._onPan));this._disableSelection(h)}var s=$common.createElementFromTemplate({nodeName:"div",properties:{id:e.id+"_Bar",style:{position:"absolute"}}},e);if(this._showPan){s.style.left=m?"10px":"42px";s.style.top=m?"42px":"10px"}$addHandler(s,"mousedown",Function.createDelegate(this,this._onMouseDown));$addHandler(s,"mousemove",Function.createDelegate(this,this._onMouseMove));$addHandler(s,"mouseup",Function.createDelegate(this,this._onMouseUp));var t=$common.createElementFromTemplate({nodeName:"table",properties:{cellPadding:0,cellSpacing:0,style:{position:"absolute",left:"0px",top:"0px"}}},s);var b=$common.createElementFromTemplate({nodeName:"tbody"},t);var d=$common.createElementFromTemplate({nodeName:"tr"},b);var k=$common.createElementFromTemplate({nodeName:"td"},d);k.style[m?"paddingBottom":"paddingRight"]="3px";var v='WebResource.axd?d=lMZkEqmUub0QIqSAWwzYAaWWFX5JwJ6iraUCk6SHujxuOkF5gwV-zQVKvYqpJq0F0&t=633868096223498346';var n='WebResource.axd?d=lMZkEqmUub0QIqSAWwzYAaWWFX5JwJ6iraUCk6SHujwgOb8M9RDr5EiAwHOU4gXP0&t=633868096223498346';var y=$common.createElementFromTemplate({nodeName:"img",properties:{id:e.id+(u?"_Plus":"_Minus"),src:u?v:n,title:u?"Zoom In":"Zoom Out",style:{width:"17px",height:"17px"}}},k);$addHandler(y,"click",Function.createDelegate(this,u?this._onPlus:this._onMinus));this._disableSelection(y);if(m){d=$common.createElementFromTemplate({nodeName:"tr"},b)}k=$common.createElementFromTemplate({nodeName:"td"},d);var x='WebResource.axd?d=lMZkEqmUub0QIqSAWwzYAaWWFX5JwJ6iraUCk6SHujwWPPfj01awS6BQlts6RZSx0&t=633868096223498346';var p='WebResource.axd?d=lMZkEqmUub0QIqSAWwzYAaWWFX5JwJ6iraUCk6SHujwncgp2Ecpcbdzbbn6Pcfyt0&t=633868096223498346';var y=$common.createElementFromTemplate({nodeName:"img",properties:{id:e.id+"_"+(u?this._levelCount:1),src:m?x:p,style:{width:m?"17px":"10px",height:m?"10px":"17px"}}},k);this._disableSelection(y);var j='WebResource.axd?d=lMZkEqmUub0QIqSAWwzYAaWWFX5JwJ6iraUCk6SHujzm04ZCJEKyL0HzObtGXmkz0&t=633868096223498346';var a='WebResource.axd?d=lMZkEqmUub0QIqSAWwzYAaWWFX5JwJ6iraUCk6SHujw9Gs2oAfnVsfbqNgE2xU3k0&t=633868096223498346';for(var r=this._levelCount-1;r>=2;--r){if(m){d=$common.createElementFromTemplate({nodeName:"tr"},b)}k=$common.createElementFromTemplate({nodeName:"td"},d);y=$common.createElementFromTemplate({nodeName:"img",properties:{id:e.id+"_"+(u?r:this._levelCount-r+1),src:m?j:a,style:{width:m?"17px":"8px",height:m?"8px":"17px"}}},k);this._disableSelection(y)}if(m){d=$common.createElementFromTemplate({nodeName:"tr"},b)}k=$common.createElementFromTemplate({nodeName:"td"},d);var c='WebResource.axd?d=lMZkEqmUub0QIqSAWwzYAaWWFX5JwJ6iraUCk6SHujxGNPNUKvBC8bX520ZpU0OJ0&t=633868096223498346';var q='WebResource.axd?d=lMZkEqmUub0QIqSAWwzYAaWWFX5JwJ6iraUCk6SHujxxIJsHo6PtIlH66E43VSl-0&t=633868096223498346';y=$common.createElementFromTemplate({nodeName:"img",properties:{id:e.id+"_"+(u?1:this._levelCount),src:m?c:q,style:{width:m?"17px":"11px",height:m?"11px":"17px"}}},k);this._disableSelection(y);if(m){d=$common.createElementFromTemplate({nodeName:"tr"},b)}k=$common.createElementFromTemplate({nodeName:"td"},d);k.style[m?"paddingTop":"paddingLeft"]="3px";y=$common.createElementFromTemplate({nodeName:"img",properties:{id:e.id+(u?"_Minus":"_Plus"),src:u?n:v,title:u?"Zoom Out":"Zoom In",style:{width:"17px",height:"17px"}}},k);$addHandler(y,"click",Function.createDelegate(this,u?this._onMinus:this._onPlus));this._disableSelection(y);var l=((this._levelCount-this._currentLevel)*8+22)+"px";var w='WebResource.axd?d=lMZkEqmUub0QIqSAWwzYAaWWFX5JwJ6iraUCk6SHujw_WtGtThZzfftgTBCvEuw-0&t=633868096223498346';var g='WebResource.axd?d=lMZkEqmUub0QIqSAWwzYAaWWFX5JwJ6iraUCk6SHujzg57qJ0X5OJdzPkjAesR0G6YuNAuzsBF78AdQ9jw2jZQ2&t=633868096223498346';this._slider=$common.createElementFromTemplate({nodeName:"img",properties:{id:e.id+"_Slider",src:m?w:g,style:{position:"absolute",left:m?"0px":u?l:"22px",top:!m?"0px":u?l:"22px",width:m?"17px":"9px",height:m?"9px":"17px"}}},s);this._disableSelection(this._slider);this._sliderPosition=this._positionFromLevel(this._currentLevel);this._initialized=true;if(this._map!=null){this._map.add_extentChanged(Function.createDelegate(this,this._mapExtentChanged))}},dispose:function(){Ag.UI.ZoomBar.callBaseMethod(this,"dispose")},get_currentLevel:function(){return this._currentLevel},set_currentLevel:function(a){var b=parseInt(Math.round(a));b=b<1?1:(b>this._levelCount?this._levelCount:b);if(this._orientation==Ag.UI.ZoomBarOrientation.Vertical){this._slider.style.top=this._positionFromLevel(b)+"px"}else{this._slider.style.left=this._positionFromLevel(b)+"px"}this._currentLevel=b},get_levelCount:function(){return this._levelCount},set_levelCount:function(a){this._checkInitialized("levelCount");this._levelCount=a},get_direction:function(){return this._direction},set_direction:function(a){this._checkInitialized("direction");this._direction=a},get_orientation:function(){return this._orientation},set_orientation:function(a){this._checkInitialized("orientation");this._orientation=a},get_map:function(){return this._map},set_map:function(a){this._map=a},get_showPan:function(){return this._showPan},set_showPan:function(a){this._checkInitialized("showPan");this._showPan=a},add_pan:function(a){this.get_events().addHandler("pan",a)},remove_pan:function(a){this.get_events().removeHandler("pan",a)},add_levelChanged:function(a){this.get_events().addHandler("levelChanged",a)},remove_levelChanged:function(a){this.get_events().removeHandler("levelChanged",a)},_onMinus:function(){if(this._currentLevel>1){this.set_currentLevel(this._currentLevel-1);this._levelChanged()}},_onMouseDown:function(b){var a=b.target?b.target:b.srcElement;var c=this._extractPartId(a.id);if(c.length>0&&c!="Plus"&&c!="Minus"){this._isSliding=true;this._setSlider(b)}},_onMouseMove:function(b){if(this._isSliding){var a=b.target?b.target:b.srcElement;var c=this._extractPartId(a.id);if(c.length>0&&c!="Plus"&&c!="Minus"){this._setSlider(b)}}},_onMouseUp:function(){if(this._isSliding){this._isSliding=false;var a=(this._sliderPosition-22)/8;a=parseInt(Math.round(this._isPositive()?this._levelCount-a:a+1));if(a!=this._currentLevel){this.set_currentLevel(a);this._levelChanged()}}},_onPan:function(h){var b=h.layerX?h.layerX-19:h.offsetX-18;var j=h.layerY?h.layerY-19:h.offsetY-18;var i=0.70710678118655;var d=j*-i+b*i;var a=j*-i+b*-i;if(-13<=d&&d<=13&&-13<=a&&a<=13){var f=a>=0?(d>=0?Ag.UI.PanDirection.North:Ag.UI.PanDirection.West):(d>=0?Ag.UI.PanDirection.East:Ag.UI.PanDirection.South);var g=this.get_events().getHandler("pan");if(g!==null){g(this,new Ag.UI.PanEventArgs(f))}if(this._map!==null){switch(f){case Ag.UI.PanDirection.North:this._map.pan(0,0.6);break;case Ag.UI.PanDirection.East:this._map.pan(0.6,0);break;case Ag.UI.PanDirection.South:this._map.pan(0,-0.6);break;case Ag.UI.PanDirection.West:this._map.pan(-0.6,0);break}}}},_onPlus:function(){if(this._currentLevel<this._levelCount){this.set_currentLevel(this._currentLevel+1);this._levelChanged()}},_checkInitialized:function(a){if(this.initialized){throw Error.invalidOperation("Cannot set "+a+" property after the control has been initialized.")}},_disableSelection:function(a){if(Sys.Browser.agent==Sys.Browser.InternetExplorer){$addHandler(a,"onselectstart",function(){return false});a.unselectable="on"}else{$addHandler(a,"mousedown",function(b){b.preventDefault()})}},_extractPartId:function(b){var a=this.get_element();return b.substr(a.id.length+1)},_isPositive:function(){var a=this._direction==Ag.UI.ZoomBarDirection.Normal;return this._orientation==Ag.UI.ZoomBarOrientation.Vertical?a:!a},_levelChanged:function(){if(this._map!=null){this._map.set_zoomLevel(this._currentLevel)}var a=this.get_events().getHandler("levelChanged");if(a!==null){a(this,Sys.EventArgs.Empty)}},_mapExtentChanged:function(b,a){this.set_currentLevel(b.get_zoomLevel())},_positionFromLevel:function(a){return(this._isPositive()?this._levelCount-a:a-1)*8+22},_setSlider:function(f){var d=f.target?f.target:f.srcElement;var i=this._extractPartId(d.id);if(i=="Bar"){return}if(i!="Slider"){this._sliderPosition=this._positionFromLevel(parseInt(i))}else{var h=(f.layerY?f.layerY:f.offsetY)-5;if(this._orientation==Ag.UI.ZoomBarOrientation.Vertical){this._sliderPosition+=(f.layerY?f.layerY:f.offsetY)-5}else{this._sliderPosition+=(f.layerX?f.layerX:f.offsetX)-5}var c=this._positionFromLevel(1);var g=this._positionFromLevel(this._levelCount);var b=Math.min(c,g);var a=Math.max(c,g);this._sliderPosition=this._sliderPosition<b?b:this._sliderPosition>a?a:this._sliderPosition}if(this._orientation==Ag.UI.ZoomBarOrientation.Vertical){this._slider.style.top=this._sliderPosition+"px"}else{this._slider.style.left=this._sliderPosition+"px"}}};Ag.UI.ZoomBar.registerClass("Ag.UI.ZoomBar",Sys.UI.Control);
Type.registerNamespace('AjaxControlToolkit');AjaxControlToolkit.Resources={"PasswordStrength_InvalidWeightingRatios":"Strength Weighting ratios must have 4 elements","Animation_ChildrenNotAllowed":"AjaxControlToolkit.Animation.createAnimation cannot add child animations to type \"{0}\" that does not derive from AjaxControlToolkit.Animation.ParentAnimation","PasswordStrength_RemainingSymbols":"{0} symbol characters","ExtenderBase_CannotSetClientStateField":"clientStateField can only be set before initialization","RTE_PreviewHTML":"Preview HTML","RTE_JustifyCenter":"Justify Center","PasswordStrength_RemainingUpperCase":"{0} more upper case characters","Animation_TargetNotFound":"AjaxControlToolkit.Animation.Animation.set_animationTarget requires the ID of a Sys.UI.DomElement or Sys.UI.Control.  No element or control could be found corresponding to \"{0}\"","RTE_FontColor":"Font Color","RTE_LabelColor":"Label Color","Common_InvalidBorderWidthUnit":"A unit type of \"{0}\"\u0027 is invalid for parseBorderWidth","RTE_Heading":"Heading","Tabs_PropertySetBeforeInitialization":"{0} cannot be changed before initialization","RTE_OrderedList":"Ordered List","ReorderList_DropWatcherBehavior_NoChild":"Could not find child of list with id \"{0}\"","CascadingDropDown_MethodTimeout":"[Method timeout]","RTE_Columns":"Columns","RTE_InsertImage":"Insert Image","RTE_InsertTable":"Insert Table","RTE_Values":"Values","RTE_OK":"OK","ExtenderBase_PageNotRegisteredForCallbacks":"This Page has not been registered for callbacks","Animation_NoDynamicPropertyFound":"AjaxControlToolkit.Animation.createAnimation found no property corresponding to \"{0}\" or \"{1}\"","Animation_InvalidBaseType":"AjaxControlToolkit.Animation.registerAnimation can only register types that inherit from AjaxControlToolkit.Animation.Animation","RTE_UnorderedList":"Unordered List","ResizableControlBehavior_InvalidHandler":"{0} handler not a function, function name, or function text","Animation_InvalidColor":"Color must be a 7-character hex representation (e.g. #246ACF), not \"{0}\"","RTE_CellColor":"Cell Color","PasswordStrength_RemainingMixedCase":"Mixed case characters","RTE_Italic":"Italic","CascadingDropDown_NoParentElement":"Failed to find parent element \"{0}\"","ValidatorCallout_DefaultErrorMessage":"This control is invalid","RTE_Indent":"Indent","ReorderList_DropWatcherBehavior_CallbackError":"Reorder failed, see details below.\\r\\n\\r\\n{0}","PopupControl_NoDefaultProperty":"No default property supported for control \"{0}\" of type \"{1}\"","RTE_Normal":"Normal","PopupExtender_NoParentElement":"Couldn\u0027t find parent element \"{0}\"","RTE_ViewValues":"View Values","RTE_Legend":"Legend","RTE_Labels":"Labels","RTE_CellSpacing":"Cell Spacing","PasswordStrength_RemainingNumbers":"{0} more numbers","RTE_Border":"Border","RTE_Create":"Create","RTE_BackgroundColor":"Background Color","RTE_Cancel":"Cancel","RTE_JustifyFull":"Justify Full","RTE_JustifyLeft":"Justify Left","RTE_Cut":"Cut","ResizableControlBehavior_CannotChangeProperty":"Changes to {0} not supported","RTE_ViewSource":"View Source","Common_InvalidPaddingUnit":"A unit type of \"{0}\" is invalid for parsePadding","RTE_Paste":"Paste","ExtenderBase_ControlNotRegisteredForCallbacks":"This Control has not been registered for callbacks","Calendar_Today":"Today: {0}","MultiHandleSlider_CssHeightWidthRequired":"You must specify a CSS width and height for all handle styles as well as the rail.","Common_DateTime_InvalidFormat":"Invalid format","ListSearch_DefaultPrompt":"Type to search","CollapsiblePanel_NoControlID":"Failed to find element \"{0}\"","RTE_ViewEditor":"View Editor","RTE_BarColor":"Bar Color","PasswordStrength_DefaultStrengthDescriptions":"NonExistent;Very Weak;Weak;Poor;Almost OK;Barely Acceptable;Average;Good;Strong;Excellent;Unbreakable!","RTE_Inserttexthere":"Insert text here","Animation_UknownAnimationName":"AjaxControlToolkit.Animation.createAnimation could not find an Animation corresponding to the name \"{0}\"","ExtenderBase_InvalidClientStateType":"saveClientState must return a value of type String","Rating_CallbackError":"An unhandled exception has occurred:\\r\\n{0}","Tabs_OwnerExpected":"owner must be set before initialize","DynamicPopulate_WebServiceTimeout":"Web service call timed out","PasswordStrength_RemainingLowerCase":"{0} more lower case characters","Animation_MissingAnimationName":"AjaxControlToolkit.Animation.createAnimation requires an object with an AnimationName property","RTE_JustifyRight":"Justify Right","Tabs_ActiveTabArgumentOutOfRange":"Argument is not a member of the tabs collection","RTE_CellPadding":"Cell Padding","RTE_ClearFormatting":"Clear Formatting","AlwaysVisible_ElementRequired":"AjaxControlToolkit.AlwaysVisibleControlBehavior must have an element","Slider_NoSizeProvided":"Please set valid values for the height and width attributes in the slider\u0027s CSS classes","DynamicPopulate_WebServiceError":"Web Service call failed: {0}","PasswordStrength_StrengthPrompt":"Strength: ","PasswordStrength_RemainingCharacters":"{0} more characters","PasswordStrength_Satisfied":"Nothing more required","RTE_Hyperlink":"Hyperlink","Animation_NoPropertyFound":"AjaxControlToolkit.Animation.createAnimation found no property corresponding to \"{0}\"","PasswordStrength_InvalidStrengthDescriptionStyles":"Text Strength description style classes must match the number of text descriptions.","PasswordStrength_GetHelpRequirements":"Get help on password requirements","PasswordStrength_InvalidStrengthDescriptions":"Invalid number of text strength descriptions specified","RTE_Underline":"Underline","Tabs_PropertySetAfterInitialization":"{0} cannot be changed after initialization","RTE_Rows":"Rows","RTE_Redo":"Redo","RTE_Size":"Size","RTE_Undo":"Undo","RTE_Bold":"Bold","RTE_Copy":"Copy","RTE_Font":"Font","CascadingDropDown_MethodError":"[Method error {0}]","RTE_BorderColor":"Border Color","RTE_Paragraph":"Paragraph","RTE_InsertHorizontalRule":"Insert Horizontal Rule","Common_UnitHasNoDigits":"No digits","RTE_Outdent":"Outdent","Common_DateTime_InvalidTimeSpan":"\"{0}\" is not a valid TimeSpan format","Animation_CannotNestSequence":"AjaxControlToolkit.Animation.SequenceAnimation cannot be nested inside AjaxControlToolkit.Animation.ParallelAnimation","Shared_BrowserSecurityPreventsPaste":"Your browser security settings don\u0027t permit the automatic execution of paste operations. Please use the keyboard shortcut Ctrl+V instead."};
if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();